Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 891310d5 authored by Michele Baldessari's avatar Michele Baldessari Committed by David S. Miller
Browse files

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: default avatarMichele Baldessari <michele@acksyn.org>
Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b2ad5e5f
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -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;
}
@@ -499,6 +499,12 @@ static int sctp_remaddr_seq_show(struct seq_file *seq, void *v)
			 */
			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");
		}
	}