[BACK]Return to socket.h CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / sys

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/sys/socket.h between version 1.26 and 1.39

version 1.26, 1997/05/05 06:29:09 version 1.39, 1998/11/09 04:01:55
Line 32 
Line 32 
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF   * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.   * SUCH DAMAGE.
  *   *
  *      @(#)socket.h    8.4 (Berkeley) 2/21/94   *      @(#)socket.h    8.6 (Berkeley) 5/3/95
  */   */
   
 #ifndef _SYS_SOCKET_H_  #ifndef _SYS_SOCKET_H_
Line 83 
Line 83 
  */   */
 struct  linger {  struct  linger {
         int     l_onoff;                /* option on/off */          int     l_onoff;                /* option on/off */
         int     l_linger;               /* linger time */          int     l_linger;               /* linger time in seconds */
 };  };
   
 /*  /*
Line 127  struct linger {
Line 127  struct linger {
 #define AF_NATM         27              /* native ATM access */  #define AF_NATM         27              /* native ATM access */
 #define AF_ARP          28              /* (rev.) addr. res. prot. (RFC 826) */  #define AF_ARP          28              /* (rev.) addr. res. prot. (RFC 826) */
 #define pseudo_AF_KEY   29              /* Internal key management protocol  */  #define pseudo_AF_KEY   29              /* Internal key management protocol  */
   #define pseudo_AF_HDRCMPLT 30           /* Used by BPF to not rewrite hdrs
                                              in interface output routine */
   
 #define AF_MAX          30  #define AF_MAX          31
   
 /*  /*
  * Structure used by kernel to store most   * Structure used by kernel to store most
Line 189  struct sockproto {
Line 191  struct sockproto {
 #define PF_MAX          AF_MAX  #define PF_MAX          AF_MAX
   
 /*  /*
    * Socket credentials.
    */
   struct sockcred {
           uid_t   sc_uid;                 /* real user id */
           uid_t   sc_euid;                /* effective user id */
           gid_t   sc_gid;                 /* real group id */
           gid_t   sc_egid;                /* effective group id */
           int     sc_ngroups;             /* number of supplemental groups */
           gid_t   sc_groups[1];           /* variable length */
   };
   
   /*
    * Compute size of a sockcred structure with groups.
    */
   #define SOCKCREDSIZE(ngrps) \
           (sizeof(struct sockcred) + (sizeof(gid_t) * ((ngrps) - 1)))
   
   
   #if !defined(_XOPEN_SOURCE)
   /*
  * Definitions for network related sysctl, CTL_NET.   * Definitions for network related sysctl, CTL_NET.
  *   *
  * Second level is protocol family.   * Second level is protocol family.
Line 200  struct sockproto {
Line 222  struct sockproto {
   
 #define CTL_NET_NAMES { \  #define CTL_NET_NAMES { \
         { 0, 0 }, \          { 0, 0 }, \
         { "unix", CTLTYPE_NODE }, \          { "local", CTLTYPE_NODE }, \
         { "inet", CTLTYPE_NODE }, \          { "inet", CTLTYPE_NODE }, \
         { "implink", CTLTYPE_NODE }, \          { "implink", CTLTYPE_NODE }, \
         { "pup", CTLTYPE_NODE }, \          { "pup", CTLTYPE_NODE }, \
Line 230  struct sockproto {
Line 252  struct sockproto {
         { "arp", CTLTYPE_NODE }, \          { "arp", CTLTYPE_NODE }, \
         { "key", CTLTYPE_NODE }, \          { "key", CTLTYPE_NODE }, \
 }  }
   #endif /* !_XOPEN_SOURCE */
   
   #if !defined(_XOPEN_SOURCE)
 /*  /*
  * PF_ROUTE - Routing table   * PF_ROUTE - Routing table
  *   *
Line 250  struct sockproto {
Line 274  struct sockproto {
         { "flags", CTLTYPE_STRUCT }, \          { "flags", CTLTYPE_STRUCT }, \
         { "iflist", CTLTYPE_STRUCT }, \          { "iflist", CTLTYPE_STRUCT }, \
 }  }
   #endif /* !_XOPEN_SOURCE */
   
 /*  /*
  * Maximum queue length specifiable by listen(2).   * Maximum queue length specifiable by listen(2).
Line 279  struct msghdr {
Line 304  struct msghdr {
 #define MSG_CTRUNC      0x20            /* control data lost before delivery */  #define MSG_CTRUNC      0x20            /* control data lost before delivery */
 #define MSG_WAITALL     0x40            /* wait for full request or error */  #define MSG_WAITALL     0x40            /* wait for full request or error */
 #define MSG_DONTWAIT    0x80            /* this message should be nonblocking */  #define MSG_DONTWAIT    0x80            /* this message should be nonblocking */
   #define MSG_BCAST       0x100           /* this message was rcvd using link-level brdcst */
   #define MSG_MCAST       0x200           /* this message was rcvd using link-level mcast */
   
 /*  /*
  * Header for ancillary data objects in msg_control buffer.   * Header for ancillary data objects in msg_control buffer.
Line 308  struct cmsghdr {
Line 335  struct cmsghdr {
 /* "Socket"-level control message types: */  /* "Socket"-level control message types: */
 #define SCM_RIGHTS      0x01            /* access rights (array of int) */  #define SCM_RIGHTS      0x01            /* access rights (array of int) */
 #define SCM_TIMESTAMP   0x02            /* timestamp (struct timeval) */  #define SCM_TIMESTAMP   0x02            /* timestamp (struct timeval) */
   #define SCM_CREDS       0x04            /* credientials (struct sockcred) */
   
   /*
    * Types of socket shutdown(2).
    */
   #define SHUT_RD         0               /* Disallow further receives. */
   #define SHUT_WR         1               /* Disallow further sends. */
   #define SHUT_RDWR       2               /* Disallow further sends/receives. */
   
 /*  /*
  * 4.3 compat sockaddr, move to compat file later   * 4.3 compat sockaddr, move to compat file later
Line 354  int socket __P((int, int, int));
Line 389  int socket __P((int, int, int));
 int     socketpair __P((int, int, int, int *));  int     socketpair __P((int, int, int, int *));
 __END_DECLS  __END_DECLS
 #else  #else
   # if !defined(_LKM)
   #  include "opt_compat_freebsd.h"
   #  include "opt_compat_linux.h"
   #  include "opt_compat_sunos.h"
   #  include "opt_compat_hpux.h"
   # endif
 # if defined(COMPAT_43) || defined(COMPAT_SUNOS) || defined(COMPAT_LINUX) || \  # if defined(COMPAT_43) || defined(COMPAT_SUNOS) || defined(COMPAT_LINUX) || \
      defined(COMPAT_HPUX) || defined(COMPAT_FREEBSD)       defined(COMPAT_HPUX) || defined(COMPAT_FREEBSD) || defined(COMPAT_ULTRIX)
 #  define COMPAT_OLDSOCK  #  define COMPAT_OLDSOCK
 #  define MSG_COMPAT    0x8000  #  define MSG_COMPAT    0x8000
 # endif  # endif

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.39

CVSweb <webmaster@jp.NetBSD.org>