From owner-svn-src-stable@FreeBSD.ORG Sun Mar 11 00:48:54 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E9434106566B; Sun, 11 Mar 2012 00:48:54 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D39C18FC0A; Sun, 11 Mar 2012 00:48:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2B0msvO086108; Sun, 11 Mar 2012 00:48:54 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2B0ms5c086105; Sun, 11 Mar 2012 00:48:54 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203110048.q2B0ms5c086105@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 11 Mar 2012 00:48:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r232805 - in stable/9/sys: kern sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 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: Sun, 11 Mar 2012 00:48:55 -0000 Author: kib Date: Sun Mar 11 00:48:54 2012 New Revision: 232805 URL: http://svn.freebsd.org/changeset/base/232805 Log: MFC r232179: Add SO_PROTOCOL/SO_PROTOTYPE socket SOL_SOCKET-level option to get the socket protocol number. PR: kern/162352 Modified: stable/9/sys/kern/uipc_socket.c stable/9/sys/sys/socket.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/uipc_socket.c ============================================================================== --- stable/9/sys/kern/uipc_socket.c Sun Mar 11 00:43:01 2012 (r232804) +++ stable/9/sys/kern/uipc_socket.c Sun Mar 11 00:48:54 2012 (r232805) @@ -2728,6 +2728,10 @@ integer: optval = so->so_type; goto integer; + case SO_PROTOCOL: + optval = so->so_proto->pr_protocol; + goto integer; + case SO_ERROR: SOCK_LOCK(so); optval = so->so_error; Modified: stable/9/sys/sys/socket.h ============================================================================== --- stable/9/sys/sys/socket.h Sun Mar 11 00:43:01 2012 (r232804) +++ stable/9/sys/sys/socket.h Sun Mar 11 00:48:54 2012 (r232805) @@ -138,6 +138,8 @@ typedef __uid_t uid_t; #define SO_LISTENINCQLEN 0x1013 /* socket's incomplete queue length */ #define SO_SETFIB 0x1014 /* use this FIB to route */ #define SO_USER_COOKIE 0x1015 /* user cookie (dummynet etc.) */ +#define SO_PROTOCOL 0x1016 /* get socket protocol (Linux name) */ +#define SO_PROTOTYPE SO_PROTOCOL /* alias for SO_PROTOCOL (SunOS name) */ #endif /*