[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.67.2.9 and 1.68

version 1.67.2.9, 2005/12/11 10:29:36 version 1.68, 2003/08/07 16:34:14
Line 3 
Line 3 
 /*  /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.   * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
  * All rights reserved.   * All rights reserved.
  *   *
  * Redistribution and use in source and binary forms, with or without   * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions   * modification, are permitted provided that the following conditions
  * are met:   * are met:
Line 15 
Line 15 
  * 3. Neither the name of the project nor the names of its contributors   * 3. Neither the name of the project nor the names of its contributors
  *    may be used to endorse or promote products derived from this software   *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.   *    without specific prior written permission.
  *   *
  * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND   * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE   * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
Line 133  typedef _BSD_SSIZE_T_ ssize_t;
Line 133  typedef _BSD_SSIZE_T_ ssize_t;
 #define SO_RCVTIMEO     0x1006          /* receive timeout */  #define SO_RCVTIMEO     0x1006          /* receive timeout */
 #define SO_ERROR        0x1007          /* get error status and clear */  #define SO_ERROR        0x1007          /* get error status and clear */
 #define SO_TYPE         0x1008          /* get socket type */  #define SO_TYPE         0x1008          /* get socket type */
 #define SO_OVERFLOWED   0x1009          /* datagrams: return packets dropped */  
   
 /*  /*
  * Structure used for manipulating linger option.   * Structure used for manipulating linger option.
Line 271  struct sockaddr_storage {
Line 270  struct sockaddr_storage {
 #define PF_INET6        AF_INET6  #define PF_INET6        AF_INET6
 #define PF_IPX          AF_IPX          /* same format as AF_NS */  #define PF_IPX          AF_IPX          /* same format as AF_NS */
 #if defined(_NETBSD_SOURCE)  #if defined(_NETBSD_SOURCE)
 #define PF_RTIP         pseudo_AF_RTIP  /* same format as AF_INET */  #define PF_RTIP         pseudo_AF_FTIP  /* same format as AF_INET */
 #define PF_PIP          pseudo_AF_PIP  #define PF_PIP          pseudo_AF_PIP
 #endif  #endif
 #define PF_ISDN         AF_ISDN         /* same as E164 */  #define PF_ISDN         AF_ISDN         /* same as E164 */
Line 359  struct sockcred {
Line 358  struct sockcred {
         { "arp", CTLTYPE_NODE }, \          { "arp", CTLTYPE_NODE }, \
         { "key", CTLTYPE_NODE }, \          { "key", CTLTYPE_NODE }, \
 }  }
   
 struct kinfo_pcb {  
         __uint64_t      ki_pcbaddr;     /* PTR: pcb addr */  
         __uint64_t      ki_ppcbaddr;    /* PTR: ppcb addr */  
         __uint64_t      ki_sockaddr;    /* PTR: socket addr */  
   
         __uint32_t      ki_family;      /* INT: protocol family */  
         __uint32_t      ki_type;        /* INT: socket type */  
         __uint32_t      ki_protocol;    /* INT: protocol */  
         __uint32_t      ki_pflags;      /* INT: generic protocol flags */  
   
         __uint32_t      ki_sostate;     /* INT: socket state */  
         __uint32_t      ki_prstate;     /* INT: protocol state */  
         __int32_t       ki_tstate;      /* INT: tcp state */  
         __uint32_t      ki_tflags;      /* INT: tcp flags */  
   
         __uint64_t      ki_rcvq;        /* U_LONG: receive queue len */  
         __uint64_t      ki_sndq;        /* U_LONG: send queue len */  
   
         union {  
                 struct sockaddr _kis_src; /* STRUCT: local address */  
                 char _kis_pad[256 + 8];         /* pad to max addr length */  
         } ki_s;  
         union {  
                 struct sockaddr _kid_dst; /* STRUCT: remote address */  
                 char _kid_pad[256 + 8];         /* pad to max addr length */  
         } ki_d;  
   
         __uint64_t      ki_inode;       /* INO_T: fake inode number */  
         __uint64_t      ki_vnode;       /* PTR: if associated with file */  
         __uint64_t      ki_conn;        /* PTR: control block of peer */  
         __uint64_t      ki_refs;        /* PTR: referencing socket */  
         __uint64_t      ki_nextref;     /* PTR: link in refs list */  
 };  
   
 #define ki_src ki_s._kis_src  
 #define ki_dst ki_d._kid_dst  
   
 #define PCB_SLOP                20  
 #define PCB_ALL                 0  
   
 #endif /* _NETBSD_SOURCE */  #endif /* _NETBSD_SOURCE */
   
 #if defined(_NETBSD_SOURCE)  #if defined(_NETBSD_SOURCE)
Line 474  struct cmsghdr {
Line 432  struct cmsghdr {
 /* given pointer to struct cmsghdr, return pointer to data */  /* given pointer to struct cmsghdr, return pointer to data */
 #define CMSG_DATA(cmsg) \  #define CMSG_DATA(cmsg) \
         ((u_char *)(void *)(cmsg) + __CMSG_ALIGN(sizeof(struct cmsghdr)))          ((u_char *)(void *)(cmsg) + __CMSG_ALIGN(sizeof(struct cmsghdr)))
 #define CCMSG_DATA(cmsg) \  
         ((const u_char *)(const void *)(cmsg) + \  
         __CMSG_ALIGN(sizeof(struct cmsghdr)))  
   
 /*  /*
  * Alignment requirement for CMSG struct manipulation.   * Alignment requirement for CMSG struct manipulation.
Line 527  struct cmsghdr {
Line 482  struct cmsghdr {
 #define SHUT_WR         1               /* Disallow further sends. */  #define SHUT_WR         1               /* Disallow further sends. */
 #define SHUT_RDWR       2               /* Disallow further sends/receives. */  #define SHUT_RDWR       2               /* Disallow further sends/receives. */
   
   #if defined(_NETBSD_SOURCE)
   /*
    * 4.3 compat sockaddr, move to compat file later
    */
   struct osockaddr {
           __uint16_t      sa_family;      /* address family */
           char            sa_data[14];    /* up to 14 bytes of direct address */
   };
   
   /*
    * 4.3-compat message header (move to compat file later).
    */
   struct omsghdr {
           __caddr_t       msg_name;       /* optional address */
           int             msg_namelen;    /* size of address */
           struct iovec    *msg_iov;       /* scatter/gather array */
           int             msg_iovlen;     /* # elements in msg_iov */
           __caddr_t       msg_accrights;  /* access rights sent/received */
           int             msg_accrightslen;
   };
   #endif
   
 #include <sys/cdefs.h>  #include <sys/cdefs.h>
   
 __BEGIN_DECLS  __BEGIN_DECLS
 int     __cmsg_alignbytes(void);  int     __cmsg_alignbytes __P((void));
 __END_DECLS  __END_DECLS
   
 #ifndef _KERNEL  #ifndef _KERNEL
   
 __BEGIN_DECLS  __BEGIN_DECLS
 int     accept(int, struct sockaddr * __restrict, socklen_t * __restrict);  int     accept __P((int, struct sockaddr * __restrict, socklen_t * __restrict));
 int     bind(int, const struct sockaddr *, socklen_t);  int     bind __P((int, const struct sockaddr *, socklen_t));
 int     connect(int, const struct sockaddr *, socklen_t);  int     connect __P((int, const struct sockaddr *, socklen_t));
 int     getpeername(int, struct sockaddr * __restrict, socklen_t * __restrict);  int     getpeername __P((int, struct sockaddr * __restrict,
 int     getsockname(int, struct sockaddr * __restrict, socklen_t * __restrict);              socklen_t * __restrict));
 int     getsockopt(int, int, int, void * __restrict, socklen_t * __restrict);  int     getsockname __P((int, struct sockaddr * __restrict,
 int     listen(int, int);              socklen_t * __restrict));
 ssize_t recv(int, void *, size_t, int);  int     getsockopt __P((int, int, int, void * __restrict,
 ssize_t recvfrom(int, void * __restrict, size_t, int,              socklen_t * __restrict));
             struct sockaddr * __restrict, socklen_t * __restrict);  int     listen __P((int, int));
 ssize_t recvmsg(int, struct msghdr *, int);  ssize_t recv __P((int, void *, size_t, int));
 ssize_t send(int, const void *, size_t, int);  ssize_t recvfrom __P((int, void * __restrict, size_t, int,
 ssize_t sendto(int, const void *,              struct sockaddr * __restrict, socklen_t * __restrict));
             size_t, int, const struct sockaddr *, socklen_t);  ssize_t recvmsg __P((int, struct msghdr *, int));
 ssize_t sendmsg(int, const struct msghdr *, int);  ssize_t send __P((int, const void *, size_t, int));
 int     setsockopt(int, int, int, const void *, socklen_t);  ssize_t sendto __P((int, const void *,
 int     shutdown(int, int);              size_t, int, const struct sockaddr *, socklen_t));
 int     sockatmark(int);  ssize_t sendmsg __P((int, const struct msghdr *, int));
 int     socket(int, int, int);  int     setsockopt __P((int, int, int, const void *, socklen_t));
 int     socketpair(int, int, int, int *);  int     shutdown __P((int, int));
   int     sockatmark __P((int));
   int     socket __P((int, int, int));
   int     socketpair __P((int, int, int, int *));
 __END_DECLS  __END_DECLS
 #endif /* !_KERNEL */  #endif /* !_KERNEL */
   

Legend:
Removed from v.1.67.2.9  
changed lines
  Added in v.1.68

CVSweb <webmaster@jp.NetBSD.org>