svn commit: r323505 - head/sys/netinet

Michael Tuexen tuexen at FreeBSD.org
Tue Sep 12 21:08:52 UTC 2017


Author: tuexen
Date: Tue Sep 12 21:08:50 2017
New Revision: 323505
URL: https://svnweb.freebsd.org/changeset/base/323505

Log:
  Export the UDP encapsualation port and the path state.

Modified:
  head/sys/netinet/sctp_sysctl.c
  head/sys/netinet/sctp_uio.h

Modified: head/sys/netinet/sctp_sysctl.c
==============================================================================
--- head/sys/netinet/sctp_sysctl.c	Tue Sep 12 21:07:48 2017	(r323504)
+++ head/sys/netinet/sctp_sysctl.c	Tue Sep 12 21:08:50 2017	(r323505)
@@ -506,6 +506,14 @@ sctp_sysctl_handle_assoclist(SYSCTL_HANDLER_ARGS)
 				xraddr.rtt = net->rtt / 1000;
 				xraddr.heartbeat_interval = net->heart_beat_delay;
 				xraddr.ssthresh = net->ssthresh;
+				xraddr.encaps_port = net->port;
+				if (net->dest_state & SCTP_ADDR_UNCONFIRMED) {
+					xraddr.state = SCTP_UNCONFIRMED;
+				} else if (net->dest_state & SCTP_ADDR_REACHABLE) {
+					xraddr.state = SCTP_ACTIVE;
+				} else {
+					xraddr.state = SCTP_INACTIVE;
+				}
 				xraddr.start_time.tv_sec = (uint32_t)net->start_time.tv_sec;
 				xraddr.start_time.tv_usec = (uint32_t)net->start_time.tv_usec;
 				SCTP_INP_RUNLOCK(inp);

Modified: head/sys/netinet/sctp_uio.h
==============================================================================
--- head/sys/netinet/sctp_uio.h	Tue Sep 12 21:07:48 2017	(r323504)
+++ head/sys/netinet/sctp_uio.h	Tue Sep 12 21:08:50 2017	(r323505)
@@ -1239,7 +1239,9 @@ struct xsctp_raddr {
 	uint32_t rtt;
 	uint32_t heartbeat_interval;
 	uint32_t ssthresh;
-	uint32_t extra_padding[30];	/* future */
+	uint16_t encaps_port;
+	uint16_t state;
+	uint32_t extra_padding[29];	/* future */
 };
 
 #define SCTP_MAX_LOGGING_SIZE 30000


More information about the svn-src-head mailing list