From owner-svn-src-head@freebsd.org Sat Mar 18 18:23:31 2017 Return-Path: Delivered-To: svn-src-head@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 C2476D12073; Sat, 18 Mar 2017 18:23:31 +0000 (UTC) (envelope-from dchagin@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 82878125E; Sat, 18 Mar 2017 18:23:31 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2IINUQs070535; Sat, 18 Mar 2017 18:23:30 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2IINU7d070531; Sat, 18 Mar 2017 18:23:30 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201703181823.v2IINU7d070531@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sat, 18 Mar 2017 18:23:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315501 - in head/sys: amd64/linux amd64/linux32 compat/linux i386/linux X-SVN-Group: head 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.23 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, 18 Mar 2017 18:23:31 -0000 Author: dchagin Date: Sat Mar 18 18:23:30 2017 New Revision: 315501 URL: https://svnweb.freebsd.org/changeset/base/315501 Log: To reduce code duplication move socket defines to the MI path. MFC after: 1 week Modified: head/sys/amd64/linux/linux.h head/sys/amd64/linux32/linux.h head/sys/compat/linux/linux_socket.h head/sys/i386/linux/linux.h Modified: head/sys/amd64/linux/linux.h ============================================================================== --- head/sys/amd64/linux/linux.h Sat Mar 18 18:21:41 2017 (r315500) +++ head/sys/amd64/linux/linux.h Sat Mar 18 18:23:30 2017 (r315501) @@ -383,50 +383,6 @@ union l_semun { l_uintptr_t __pad; }; -/* - * Socket defines - */ - -#define LINUX_SOL_SOCKET 1 -#define LINUX_SOL_IP 0 -#define LINUX_SOL_IPX 256 -#define LINUX_SOL_AX25 257 -#define LINUX_SOL_TCP 6 -#define LINUX_SOL_UDP 17 - -#define LINUX_SO_DEBUG 1 -#define LINUX_SO_REUSEADDR 2 -#define LINUX_SO_TYPE 3 -#define LINUX_SO_ERROR 4 -#define LINUX_SO_DONTROUTE 5 -#define LINUX_SO_BROADCAST 6 -#define LINUX_SO_SNDBUF 7 -#define LINUX_SO_RCVBUF 8 -#define LINUX_SO_KEEPALIVE 9 -#define LINUX_SO_OOBINLINE 10 -#define LINUX_SO_NO_CHECK 11 -#define LINUX_SO_PRIORITY 12 -#define LINUX_SO_LINGER 13 -#define LINUX_SO_PASSCRED 16 -#define LINUX_SO_PEERCRED 17 -#define LINUX_SO_RCVLOWAT 18 -#define LINUX_SO_SNDLOWAT 19 -#define LINUX_SO_RCVTIMEO 20 -#define LINUX_SO_SNDTIMEO 21 -#define LINUX_SO_TIMESTAMP 29 -#define LINUX_SO_ACCEPTCONN 30 - -#define LINUX_IP_TOS 1 -#define LINUX_IP_TTL 2 -#define LINUX_IP_HDRINCL 3 -#define LINUX_IP_OPTIONS 4 - -#define LINUX_IP_MULTICAST_IF 32 -#define LINUX_IP_MULTICAST_TTL 33 -#define LINUX_IP_MULTICAST_LOOP 34 -#define LINUX_IP_ADD_MEMBERSHIP 35 -#define LINUX_IP_DROP_MEMBERSHIP 36 - struct l_sockaddr { l_ushort sa_family; char sa_data[14]; Modified: head/sys/amd64/linux32/linux.h ============================================================================== --- head/sys/amd64/linux32/linux.h Sat Mar 18 18:21:41 2017 (r315500) +++ head/sys/amd64/linux32/linux.h Sat Mar 18 18:23:30 2017 (r315501) @@ -474,37 +474,6 @@ union l_semun { l_uintptr_t __pad; } __packed; -/* - * Socket defines - */ -#define LINUX_SOL_SOCKET 1 -#define LINUX_SOL_IP 0 -#define LINUX_SOL_IPX 256 -#define LINUX_SOL_AX25 257 -#define LINUX_SOL_TCP 6 -#define LINUX_SOL_UDP 17 - -#define LINUX_SO_DEBUG 1 -#define LINUX_SO_REUSEADDR 2 -#define LINUX_SO_TYPE 3 -#define LINUX_SO_ERROR 4 -#define LINUX_SO_DONTROUTE 5 -#define LINUX_SO_BROADCAST 6 -#define LINUX_SO_SNDBUF 7 -#define LINUX_SO_RCVBUF 8 -#define LINUX_SO_KEEPALIVE 9 -#define LINUX_SO_OOBINLINE 10 -#define LINUX_SO_NO_CHECK 11 -#define LINUX_SO_PRIORITY 12 -#define LINUX_SO_LINGER 13 -#define LINUX_SO_PEERCRED 17 -#define LINUX_SO_RCVLOWAT 18 -#define LINUX_SO_SNDLOWAT 19 -#define LINUX_SO_RCVTIMEO 20 -#define LINUX_SO_SNDTIMEO 21 -#define LINUX_SO_TIMESTAMP 29 -#define LINUX_SO_ACCEPTCONN 30 - struct l_sockaddr { l_ushort sa_family; char sa_data[14]; Modified: head/sys/compat/linux/linux_socket.h ============================================================================== --- head/sys/compat/linux/linux_socket.h Sat Mar 18 18:21:41 2017 (r315500) +++ head/sys/compat/linux/linux_socket.h Sat Mar 18 18:23:30 2017 (r315501) @@ -172,6 +172,39 @@ int linux_accept(struct thread *td, stru #define LINUX_SENDMMSG 20 #endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */ +/* Socket defines */ +#define LINUX_SOL_SOCKET 1 +#define LINUX_SOL_IP 0 +#define LINUX_SOL_TCP 6 +#define LINUX_SOL_UDP 17 +#define LINUX_SOL_IPV6 41 +#define LINUX_SOL_IPX 256 +#define LINUX_SOL_AX25 257 + +#define LINUX_SO_DEBUG 1 +#define LINUX_SO_REUSEADDR 2 +#define LINUX_SO_TYPE 3 +#define LINUX_SO_ERROR 4 +#define LINUX_SO_DONTROUTE 5 +#define LINUX_SO_BROADCAST 6 +#define LINUX_SO_SNDBUF 7 +#define LINUX_SO_RCVBUF 8 +#define LINUX_SO_KEEPALIVE 9 +#define LINUX_SO_OOBINLINE 10 +#define LINUX_SO_NO_CHECK 11 +#define LINUX_SO_PRIORITY 12 +#define LINUX_SO_LINGER 13 +#ifndef LINUX_SO_PASSCRED /* powerpc differs */ +#define LINUX_SO_PASSCRED 16 +#define LINUX_SO_PEERCRED 17 +#define LINUX_SO_RCVLOWAT 18 +#define LINUX_SO_SNDLOWAT 19 +#define LINUX_SO_RCVTIMEO 20 +#define LINUX_SO_SNDTIMEO 21 +#endif +#define LINUX_SO_TIMESTAMP 29 +#define LINUX_SO_ACCEPTCONN 30 + /* Socket options */ #define LINUX_IP_TOS 1 #define LINUX_IP_TTL 2 Modified: head/sys/i386/linux/linux.h ============================================================================== --- head/sys/i386/linux/linux.h Sat Mar 18 18:21:41 2017 (r315500) +++ head/sys/i386/linux/linux.h Sat Mar 18 18:23:30 2017 (r315501) @@ -453,37 +453,6 @@ union l_semun { void *__pad; }; -/* - * Socket defines - */ -#define LINUX_SOL_SOCKET 1 -#define LINUX_SOL_IP 0 -#define LINUX_SOL_IPX 256 -#define LINUX_SOL_AX25 257 -#define LINUX_SOL_TCP 6 -#define LINUX_SOL_UDP 17 - -#define LINUX_SO_DEBUG 1 -#define LINUX_SO_REUSEADDR 2 -#define LINUX_SO_TYPE 3 -#define LINUX_SO_ERROR 4 -#define LINUX_SO_DONTROUTE 5 -#define LINUX_SO_BROADCAST 6 -#define LINUX_SO_SNDBUF 7 -#define LINUX_SO_RCVBUF 8 -#define LINUX_SO_KEEPALIVE 9 -#define LINUX_SO_OOBINLINE 10 -#define LINUX_SO_NO_CHECK 11 -#define LINUX_SO_PRIORITY 12 -#define LINUX_SO_LINGER 13 -#define LINUX_SO_PEERCRED 17 -#define LINUX_SO_RCVLOWAT 18 -#define LINUX_SO_SNDLOWAT 19 -#define LINUX_SO_RCVTIMEO 20 -#define LINUX_SO_SNDTIMEO 21 -#define LINUX_SO_TIMESTAMP 29 -#define LINUX_SO_ACCEPTCONN 30 - struct l_sockaddr { l_ushort sa_family; char sa_data[14];