Print this page
    
OS-3752 Increase IOV_MAX to at least 1024
    
      
        | Split | 
	Close | 
      
      | Expand all | 
      | Collapse all | 
    
    
          --- old/usr/src/lib/libbc/inc/include/sys/socket.h
          +++ new/usr/src/lib/libbc/inc/include/sys/socket.h
   1    1  /*
   2    2   * Copyright 1989 Sun Microsystems, Inc.  All rights reserved.
   3    3   * Use is subject to license terms.
   4    4   */
   5    5  
   6      -#pragma ident   "%Z%%M% %I%     %E% SMI"
   7      -
   8    6  /*
   9    7   * Copyright (c) 1982, 1985, 1986 Regents of the University of California.
  10    8   * All rights reserved.  The Berkeley software License Agreement
  11    9   * specifies the terms and conditions for redistribution.
  12   10   */
  13   11  
  14   12  #ifndef _sys_socket_h
  15   13  #define _sys_socket_h
  16   14  
  17   15  /*
  18   16   * Definitions related to sockets: types, address families, options.
  19   17   */
  20   18  
  21   19  /*
  22   20   * Types
  23   21   */
  24   22  #define SOCK_STREAM     1               /* stream socket */
  25   23  #define SOCK_DGRAM      2               /* datagram socket */
  26   24  #define SOCK_RAW        3               /* raw-protocol interface */
  27   25  #define SOCK_RDM        4               /* reliably-delivered message */
  28   26  #define SOCK_SEQPACKET  5               /* sequenced packet stream */
  29   27  
  30   28  /*
  31   29   * Option flags per-socket.
  32   30   */
  33   31  #define SO_DEBUG        0x0001          /* turn on debugging info recording */
  34   32  #define SO_ACCEPTCONN   0x0002          /* socket has had listen() */
  35   33  #define SO_REUSEADDR    0x0004          /* allow local address reuse */
  36   34  #define SO_KEEPALIVE    0x0008          /* keep connections alive */
  37   35  #define SO_DONTROUTE    0x0010          /* just use interface addresses */
  38   36  #define SO_BROADCAST    0x0020          /* permit sending of broadcast msgs */
  39   37  #define SO_USELOOPBACK  0x0040          /* bypass hardware when possible */
  40   38  #define SO_LINGER       0x0080          /* linger on close if data present */
  41   39  #define SO_OOBINLINE    0x0100          /* leave received OOB data in line */
  42   40  /*
  43   41   * N.B.: The following definition is present only for compatibility
  44   42   * with release 3.0.  It will disappear in later releases.
  45   43   */
  46   44  #define SO_DONTLINGER   (~SO_LINGER)    /* ~SO_LINGER */
  47   45  
  48   46  /*
  49   47   * Additional options, not kept in so_options.
  50   48   */
  51   49  #define SO_SNDBUF       0x1001          /* send buffer size */
  52   50  #define SO_RCVBUF       0x1002          /* receive buffer size */
  53   51  #define SO_SNDLOWAT     0x1003          /* send low-water mark */
  54   52  #define SO_RCVLOWAT     0x1004          /* receive low-water mark */
  55   53  #define SO_SNDTIMEO     0x1005          /* send timeout */
  56   54  #define SO_RCVTIMEO     0x1006          /* receive timeout */
  57   55  #define SO_ERROR        0x1007          /* get error status and clear */
  58   56  #define SO_TYPE         0x1008          /* get socket type */
  59   57  
  60   58  /*
  61   59   * Structure used for manipulating linger option.
  62   60   */
  63   61  struct  linger {
  64   62          int     l_onoff;                /* option on/off */
  65   63          int     l_linger;               /* linger time */
  66   64  };
  67   65  
  68   66  /*
  69   67   * Level number for (get/set)sockopt() to apply to socket itself.
  70   68   */
  71   69  #define SOL_SOCKET      0xffff          /* options for socket level */
  72   70  
  73   71  /*
  74   72   * Address families.
  75   73   */
  76   74  #define AF_UNSPEC       0               /* unspecified */
  77   75  #define AF_UNIX         1               /* local to host (pipes, portals) */
  78   76  #define AF_INET         2               /* internetwork: UDP, TCP, etc. */
  79   77  #define AF_IMPLINK      3               /* arpanet imp addresses */
  80   78  #define AF_PUP          4               /* pup protocols: e.g. BSP */
  81   79  #define AF_CHAOS        5               /* mit CHAOS protocols */
  82   80  #define AF_NS           6               /* XEROX NS protocols */
  83   81  #define AF_NBS          7               /* nbs protocols */
  84   82  #define AF_ECMA         8               /* european computer manufacturers */
  85   83  #define AF_DATAKIT      9               /* datakit protocols */
  86   84  #define AF_CCITT        10              /* CCITT protocols, X.25 etc */
  87   85  #define AF_SNA          11              /* IBM SNA */
  88   86  #define AF_DECnet       12              /* DECnet */
  89   87  #define AF_DLI          13              /* Direct data link interface */
  90   88  #define AF_LAT          14              /* LAT */
  91   89  #define AF_HYLINK       15              /* NSC Hyperchannel */
  92   90  #define AF_APPLETALK    16              /* Apple Talk */
  93   91  
  94   92  #define AF_NIT          17              /* Network Interface Tap */
  95   93  #define AF_802          18              /* IEEE 802.2, also ISO 8802 */
  96   94  #define AF_OSI          19              /* umbrella for all families used
  97   95                                           * by OSI (e.g. protosw lookup) */
  98   96  #define AF_X25          20              /* CCITT X.25 in particular */
  99   97  #define AF_OSINET       21              /* AFI = 47, IDI = 4 */
 100   98  #define AF_GOSIP        22              /* U.S. Government OSI */
 101   99  
 102  100  #define AF_MAX          21
 103  101  
 104  102  /*
 105  103   * Structure used by kernel to store most
 106  104   * addresses.
 107  105   */
 108  106  struct sockaddr {
 109  107          u_short sa_family;              /* address family */
 110  108          char    sa_data[14];            /* up to 14 bytes of direct address */
 111  109  };
 112  110  
 113  111  /*
 114  112   * Structure used by kernel to pass protocol
 115  113   * information in raw sockets.
 116  114   */
 117  115  struct sockproto {
 118  116          u_short sp_family;              /* address family */
 119  117          u_short sp_protocol;            /* protocol */
 120  118  };
 121  119  
 122  120  /*
 123  121   * Protocol families, same as address families for now.
 124  122   */
 125  123  #define PF_UNSPEC       AF_UNSPEC
 126  124  #define PF_UNIX         AF_UNIX
 127  125  #define PF_INET         AF_INET
 128  126  #define PF_IMPLINK      AF_IMPLINK
 129  127  #define PF_PUP          AF_PUP
 130  128  #define PF_CHAOS        AF_CHAOS
 131  129  #define PF_NS           AF_NS
 132  130  #define PF_NBS          AF_NBS
 133  131  #define PF_ECMA         AF_ECMA
 134  132  #define PF_DATAKIT      AF_DATAKIT
 135  133  #define PF_CCITT        AF_CCITT
 136  134  #define PF_SNA          AF_SNA
 137  135  #define PF_DECnet       AF_DECnet
 138  136  #define PF_DLI          AF_DLI
 139  137  #define PF_LAT          AF_LAT
 140  138  #define PF_HYLINK       AF_HYLINK
 141  139  #define PF_APPLETALK    AF_APPLETALK
 142  140  #define PF_NIT          AF_NIT
 143  141  #define PF_802          AF_802
 144  142  #define PF_OSI          AF_OSI
 145  143  #define PF_X25          AF_X25
 146  144  #define PF_OSINET       AF_OSINET
 147  145  #define PF_GOSIP        AF_GOSIP
 148  146  
 149  147  #define PF_MAX          AF_MAX
 150  148  
 151  149  /*
 152  150   * Maximum queue length specifiable by listen.
 153  151   */
 154  152  #define SOMAXCONN       5
 155  153  
 156  154  /*
 157  155   * Message header for recvmsg and sendmsg calls.
 158  156   */
 159  157  struct msghdr {
 160  158          caddr_t msg_name;               /* optional address */
 161  159          int     msg_namelen;            /* size of address */
  
    | 
      ↓ open down ↓ | 
    144 lines elided | 
    
      ↑ open up ↑ | 
  
 162  160          struct  iovec *msg_iov;         /* scatter/gather array */
 163  161          int     msg_iovlen;             /* # elements in msg_iov */
 164  162          caddr_t msg_accrights;          /* access rights sent/received */
 165  163          int     msg_accrightslen;
 166  164  };
 167  165  
 168  166  #define MSG_OOB         0x1             /* process out-of-band data */
 169  167  #define MSG_PEEK        0x2             /* peek at incoming message */
 170  168  #define MSG_DONTROUTE   0x4             /* send without using routing tables */
 171  169  
 172      -#define MSG_MAXIOVLEN   16
 173      -
 174  170  #endif /*!_sys_socket_h*/
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX