Author: tuexen
Date: Sat Aug 29 09:27:29 2015
New Revision: 287284
URL: https://svnweb.freebsd.org/changeset/base/287284

Log:
  Use the userland exported states and handle them completely.

Modified:
  head/usr.bin/netstat/sctp.c

Modified: head/usr.bin/netstat/sctp.c
==============================================================================
--- head/usr.bin/netstat/sctp.c Sat Aug 29 09:22:32 2015        (r287283)
+++ head/usr.bin/netstat/sctp.c Sat Aug 29 09:27:29 2015        (r287284)
@@ -614,25 +614,34 @@ sctp_statesprint(uint32_t state)
        int idx;
 
        switch (state) {
-       case SCTP_STATE_COOKIE_WAIT:
+       case SCTP_CLOSED:
+               idx = NETSTAT_SCTP_STATES_CLOSED;
+               break;
+       case SCTP_BOUND:
+               idx = NETSTAT_SCTP_STATES_BOUND;
+               break;
+       case SCTP_LISTEN:
+               idx = NETSTAT_SCTP_STATES_LISTEN;
+               break;
+       case SCTP_COOKIE_WAIT:
                idx = NETSTAT_SCTP_STATES_COOKIE_WAIT;
                break;
-       case SCTP_STATE_COOKIE_ECHOED:
+       case SCTP_COOKIE_ECHOED:
                idx = NETSTAT_SCTP_STATES_COOKIE_ECHOED;
                break;
-       case SCTP_STATE_OPEN:
+       case SCTP_ESTABLISHED:
                idx = NETSTAT_SCTP_STATES_ESTABLISHED;
                break;
-       case SCTP_STATE_SHUTDOWN_SENT:
+       case SCTP_SHUTDOWN_SENT:
                idx = NETSTAT_SCTP_STATES_SHUTDOWN_SENT;
                break;
-       case SCTP_STATE_SHUTDOWN_RECEIVED:
+       case SCTP_SHUTDOWN_RECEIVED:
                idx = NETSTAT_SCTP_STATES_SHUTDOWN_RECEIVED;
                break;
-       case SCTP_STATE_SHUTDOWN_ACK_SENT:
+       case SCTP_SHUTDOWN_ACK_SENT:
                idx = NETSTAT_SCTP_STATES_SHUTDOWN_ACK_SENT;
                break;
-       case SCTP_STATE_SHUTDOWN_PENDING:
+       case SCTP_SHUTDOWN_PENDING:
                idx = NETSTAT_SCTP_STATES_SHUTDOWN_PENDING;
                break;
        default:
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to