Skip to content

Commit

Permalink
sctp: add transport state in /proc/net/sctp/remaddr
Browse files Browse the repository at this point in the history
It is often quite helpful to be able to know the state of a transport
outside of the application itself (for troubleshooting purposes or for
monitoring purposes). Add it under /proc/net/sctp/remaddr.

Signed-off-by: Michele Baldessari <michele@acksyn.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Michele Baldessari authored and David S. Miller committed Oct 30, 2014
1 parent b2ad5e5 commit 891310d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions net/sctp/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ static void *sctp_remaddr_seq_start(struct seq_file *seq, loff_t *pos)

if (*pos == 0)
seq_printf(seq, "ADDR ASSOC_ID HB_ACT RTO MAX_PATH_RTX "
"REM_ADDR_RTX START\n");
"REM_ADDR_RTX START STATE\n");

return (void *)pos;
}
Expand Down Expand Up @@ -497,7 +497,13 @@ static int sctp_remaddr_seq_show(struct seq_file *seq, void *v)
* currently implemented, but we can record it with a
* jiffies marker in a subsequent patch
*/
seq_printf(seq, "0");
seq_printf(seq, "0 ");

/*
* The current state of this destination. I.e.
* SCTP_ACTIVE, SCTP_INACTIVE, ...
*/
seq_printf(seq, "%d", tsp->state);

seq_printf(seq, "\n");
}
Expand Down

0 comments on commit 891310d

Please sign in to comment.