From owner-svn-src-stable@freebsd.org Sat Jan 16 14:43:28 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0780A85D29; Sat, 16 Jan 2016 14:43:28 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9162F17DF; Sat, 16 Jan 2016 14:43:28 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0GEhRsv093562; Sat, 16 Jan 2016 14:43:27 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0GEhRkn093561; Sat, 16 Jan 2016 14:43:27 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201601161443.u0GEhRkn093561@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sat, 16 Jan 2016 14:43:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r294150 - stable/10/usr.bin/netstat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2016 14:43:28 -0000 Author: tuexen Date: Sat Jan 16 14:43:27 2016 New Revision: 294150 URL: https://svnweb.freebsd.org/changeset/base/294150 Log: MFC r287284: Use the userland exported states and handle them completely. Modified: stable/10/usr.bin/netstat/sctp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/netstat/sctp.c ============================================================================== --- stable/10/usr.bin/netstat/sctp.c Sat Jan 16 14:41:44 2016 (r294149) +++ stable/10/usr.bin/netstat/sctp.c Sat Jan 16 14:43:27 2016 (r294150) @@ -572,25 +572,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: