aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp
diff options
context:
space:
mode:
authorMichele Baldessari <michele@acksyn.org>2014-10-30 05:29:15 -0400
committerDavid S. Miller <davem@davemloft.net>2014-10-30 19:40:16 -0400
commit891310d53dcf396d6a92987da265a5ffe6c09d71 (patch)
tree2f41b3970a74b490d8cfa75e3271d35dc4667438 /net/sctp
parentb2ad5e5fcc7d2385ac7dcf0617a4b22f52245086 (diff)
sctp: add transport state in /proc/net/sctp/remaddr
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>
Diffstat (limited to 'net/sctp')
-rw-r--r--net/sctp/proc.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/net/sctp/proc.c b/net/sctp/proc.c
index 34229ee7f379..bfb242af06ab 100644
--- a/net/sctp/proc.c
+++ b/net/sctp/proc.c
@@ -417,7 +417,7 @@ static void *sctp_remaddr_seq_start(struct seq_file *seq, loff_t *pos)
417 417
418 if (*pos == 0) 418 if (*pos == 0)
419 seq_printf(seq, "ADDR ASSOC_ID HB_ACT RTO MAX_PATH_RTX " 419 seq_printf(seq, "ADDR ASSOC_ID HB_ACT RTO MAX_PATH_RTX "
420 "REM_ADDR_RTX START\n"); 420 "REM_ADDR_RTX START STATE\n");
421 421
422 return (void *)pos; 422 return (void *)pos;
423} 423}
@@ -497,7 +497,13 @@ static int sctp_remaddr_seq_show(struct seq_file *seq, void *v)
497 * currently implemented, but we can record it with a 497 * currently implemented, but we can record it with a
498 * jiffies marker in a subsequent patch 498 * jiffies marker in a subsequent patch
499 */ 499 */
500 seq_printf(seq, "0"); 500 seq_printf(seq, "0 ");
501
502 /*
503 * The current state of this destination. I.e.
504 * SCTP_ACTIVE, SCTP_INACTIVE, ...
505 */
506 seq_printf(seq, "%d", tsp->state);
501 507
502 seq_printf(seq, "\n"); 508 seq_printf(seq, "\n");
503 } 509 }