[xtensa-cvscommit] linux/include/asm-xtensa socket.h,1.1.1.1,1.2
Brought to you by:
zankel
|
From: <joe...@us...> - 2002-09-26 20:45:21
|
Update of /cvsroot/xtensa/linux/include/asm-xtensa In directory usw-pr-cvs1:/tmp/cvs-serv12341/include/asm-xtensa Modified Files: socket.h Log Message: Fix TCP problems. The kernel and glibc now agree on the enumeration values for SOCK_DGRAM and SOCK_STREAM. Further, I replaced all the bit-field definitions for the other values in socket.h with consecutive values starting from 1. On Xtensa, this change improves efficiency in related code by eliminating the loading of literals. However, it also requires rebuilding of any user apps that say "#include <sys/socket.h>". Index: socket.h =================================================================== RCS file: /cvsroot/xtensa/linux/include/asm-xtensa/socket.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** socket.h 28 Aug 2002 16:11:31 -0000 1.1.1.1 --- socket.h 26 Sep 2002 20:45:16 -0000 1.2 *************** *** 5,57 **** * include/asm-xtensa/socket.h * ! * Derived from MIPS. * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. - * - * Copyright (C) 2001 Tensilica Inc. */ #include <asm/sockios.h> ! /* ! * For setsockoptions(2) ! * ! * This defines are ABI conformant as far as Linux supports these ... ! */ ! #define SOL_SOCKET 0xffff ! ! #define SO_DEBUG 0x0001 /* Record debugging information. */ ! #define SO_REUSEADDR 0x0004 /* Allow reuse of local addresses. */ ! #define SO_KEEPALIVE 0x0008 /* Keep connections alive and send ! SIGPIPE when they die. */ ! #define SO_DONTROUTE 0x0010 /* Don't do local routing. */ ! #define SO_BROADCAST 0x0020 /* Allow transmission of ! broadcast messages. */ ! #define SO_LINGER 0x0080 /* Block on close of a reliable ! socket to transmit pending data. */ ! #define SO_OOBINLINE 0x0100 /* Receive out-of-band data in-band. */ ! #if 0 ! To add: #define SO_REUSEPORT 0x0200 /* Allow local address and port reuse. */ ! #endif ! ! #define SO_TYPE 0x1008 /* Compatible name for SO_STYLE. */ ! #define SO_STYLE SO_TYPE /* Synonym */ ! #define SO_ERROR 0x1007 /* get error status and clear */ ! #define SO_SNDBUF 0x1001 /* Send buffer size. */ ! #define SO_RCVBUF 0x1002 /* Receive buffer. */ ! #define SO_SNDLOWAT 0x1003 /* send low-water mark */ ! #define SO_RCVLOWAT 0x1004 /* receive low-water mark */ ! #define SO_SNDTIMEO 0x1005 /* send timeout */ ! #define SO_RCVTIMEO 0x1006 /* receive timeout */ ! /* linux-specific, might as well be the same as on i386 */ #define SO_NO_CHECK 11 #define SO_PRIORITY 12 #define SO_BSDCOMPAT 14 ! ! #define SO_PASSCRED 17 ! #define SO_PEERCRED 18 /* Security levels - as per NRL IPv6 - don't actually do anything */ --- 5,41 ---- * include/asm-xtensa/socket.h * ! * Copied from i386. * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. */ #include <asm/sockios.h> ! /* For setsockoptions(2) */ ! #define SOL_SOCKET 1 ! #define SO_DEBUG 1 ! #define SO_REUSEADDR 2 ! #define SO_TYPE 3 ! #define SO_ERROR 4 ! #define SO_DONTROUTE 5 ! #define SO_BROADCAST 6 ! #define SO_SNDBUF 7 ! #define SO_RCVBUF 8 ! #define SO_KEEPALIVE 9 ! #define SO_OOBINLINE 10 #define SO_NO_CHECK 11 #define SO_PRIORITY 12 + #define SO_LINGER 13 #define SO_BSDCOMPAT 14 ! /* To add :#define SO_REUSEPORT 15 */ ! #define SO_PASSCRED 16 ! #define SO_PEERCRED 17 ! #define SO_RCVLOWAT 18 ! #define SO_SNDLOWAT 19 ! #define SO_RCVTIMEO 20 ! #define SO_SNDTIMEO 21 /* Security levels - as per NRL IPv6 - don't actually do anything */ *************** *** 60,64 **** #define SO_SECURITY_ENCRYPTION_NETWORK 24 ! #define SO_BINDTODEVICE 25 /* Socket filtering */ --- 44,48 ---- #define SO_SECURITY_ENCRYPTION_NETWORK 24 ! #define SO_BINDTODEVICE 25 /* Socket filtering */ *************** *** 66,70 **** #define SO_DETACH_FILTER 27 ! #define SO_PEERNAME 28 #define SO_TIMESTAMP 29 #define SCM_TIMESTAMP SO_TIMESTAMP --- 50,54 ---- #define SO_DETACH_FILTER 27 ! #define SO_PEERNAME 28 #define SO_TIMESTAMP 29 #define SCM_TIMESTAMP SO_TIMESTAMP *************** *** 72,80 **** #define SO_ACCEPTCONN 30 ! /* Nast libc5 fixup - bletch */ ! #if defined(__KERNEL__) /* Socket types. */ ! #define SOCK_DGRAM 1 /* datagram (conn.less) socket */ ! #define SOCK_STREAM 2 /* stream (connection) socket */ #define SOCK_RAW 3 /* raw socket */ #define SOCK_RDM 4 /* reliably-delivered message */ --- 56,64 ---- #define SO_ACCEPTCONN 30 ! /* Nasty libc5 fixup - bletch */ ! #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) /* Socket types. */ ! #define SOCK_STREAM 1 /* stream (connection) socket */ ! #define SOCK_DGRAM 2 /* datagram (conn.less) socket */ #define SOCK_RAW 3 /* raw socket */ #define SOCK_RDM 4 /* reliably-delivered message */ |