From owner-svn-src-head@freebsd.org Sat Jul 14 17:12:05 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3837610337F1; Sat, 14 Jul 2018 17:12:05 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E1FC381271; Sat, 14 Jul 2018 17:12:04 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C434521E6A; Sat, 14 Jul 2018 17:12:04 +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 w6EHC4K7046312; Sat, 14 Jul 2018 17:12:04 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6EHC4aX046311; Sat, 14 Jul 2018 17:12:04 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201807141712.w6EHC4aX046311@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sat, 14 Jul 2018 17:12:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336285 - head/cddl/lib/libdtrace X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/cddl/lib/libdtrace X-SVN-Commit-Revision: 336285 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Jul 2018 17:12:05 -0000 Author: tuexen Date: Sat Jul 14 17:12:04 2018 New Revision: 336285 URL: https://svnweb.freebsd.org/changeset/base/336285 Log: Add support for TCP state names used by Solaris. For compatibility, add the TCP state names used by Solaris and given in the Dtrace Guide available at https://docs.oracle.com/cd/E37838_01/html/E61035/glhgu.html#OSDTGglhmv Reviewed by: markj@ Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D16269 Modified: head/cddl/lib/libdtrace/tcp.d Modified: head/cddl/lib/libdtrace/tcp.d ============================================================================== --- head/cddl/lib/libdtrace/tcp.d Sat Jul 14 16:59:17 2018 (r336284) +++ head/cddl/lib/libdtrace/tcp.d Sat Jul 14 17:12:04 2018 (r336285) @@ -55,6 +55,32 @@ inline int TCPS_FIN_WAIT_2 = 9; #pragma D binding "1.6.3" TCPS_TIME_WAIT inline int TCPS_TIME_WAIT = 10; +/* + * For compatibility also provide the names used by Solaris. + */ +#pragma D binding "1.13" TCP_STATE_CLOSED +inline int TCP_STATE_CLOSED = TCPS_CLOSED; +#pragma D binding "1.13" TCP_STATE_LISTEN +inline int TCP_STATE_LISTEN = TCPS_LISTEN; +#pragma D binding "1.13" TCP_STATE_SYN_SENT +inline int TCP_STATE_SYN_SENT = TCPS_SYN_SENT; +#pragma D binding "1.13" TCP_STATE_SYN_RECEIVED +inline int TCP_STATE_SYN_RECEIVED = TCPS_SYN_RECEIVED; +#pragma D binding "1.13" TCP_STATE_ESTABLISHED +inline int TCP_STATE_ESTABLISHED = TCPS_ESTABLISHED; +#pragma D binding "1.13" TCP_STATE_CLOSE_WAIT +inline int TCP_STATE_CLOSE_WAIT = TCPS_CLOSE_WAIT; +#pragma D binding "1.13" TCP_STATE_FIN_WAIT_1 +inline int TCP_STATE_FIN_WAIT_1 = TCPS_FIN_WAIT_1; +#pragma D binding "1.13" TCP_STATE_CLOSING +inline int TCP_STATE_CLOSING = TCPS_CLOSING; +#pragma D binding "1.13" TCP_STATE_LAST_ACK +inline int TCP_STATE_LAST_ACK = TCPS_LAST_ACK; +#pragma D binding "1.13" TCP_STATE_FIN_WAIT_2 +inline int TCP_STATE_FIN_WAIT_2 = TCPS_FIN_WAIT_2; +#pragma D binding "1.13" TCP_STATE_TIME_WAIT +inline int TCP_STATE_TIME_WAIT = TCPS_TIME_WAIT; + /* TCP segment flags. */ #pragma D binding "1.6.3" TH_FIN inline uint8_t TH_FIN = 0x01;