[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.75.4.2 and 1.89.28.1

version 1.75.4.2, 2006/12/30 20:50:55 version 1.89.28.1, 2008/06/23 04:32:03
Line 136  typedef _BSD_SSIZE_T_ ssize_t;
Line 136  typedef _BSD_SSIZE_T_ ssize_t;
 #define SO_TYPE         0x1008          /* get socket type */  #define SO_TYPE         0x1008          /* get socket type */
 #define SO_OVERFLOWED   0x1009          /* datagrams: return packets dropped */  #define SO_OVERFLOWED   0x1009          /* datagrams: return packets dropped */
   
   #define SO_NOHEADER     0x100a          /* user supplies no header to kernel;
                                            * kernel removes header and supplies
                                            * payload
                                            */
 /*  /*
  * Structure used for manipulating linger option.   * Structure used for manipulating linger option.
  */   */
Line 195  struct linger {
Line 199  struct linger {
 #define pseudo_AF_HDRCMPLT 30           /* Used by BPF to not rewrite hdrs  #define pseudo_AF_HDRCMPLT 30           /* Used by BPF to not rewrite hdrs
                                            in interface output routine */                                             in interface output routine */
 #endif  #endif
 #define AF_BLUETOOTH    31  #define AF_BLUETOOTH    31              /* Bluetooth: HCI, SCO, L2CAP, RFCOMM */
   #define AF_IEEE80211    32              /* IEEE80211 */
   
 #define AF_MAX          32  #define AF_MAX          33
   
 /*  /*
  * Structure used by kernel to store most   * Structure used by kernel to store most
Line 238  struct sockaddr_storage {
Line 243  struct sockaddr_storage {
         __int64_t     __ss_align;/* force desired structure storage alignment */          __int64_t     __ss_align;/* force desired structure storage alignment */
         char            __ss_pad2[_SS_PAD2SIZE];          char            __ss_pad2[_SS_PAD2SIZE];
 };  };
   #define sstosa(__ss)    ((struct sockaddr *)(__ss))
   #define sstocsa(__ss)   ((const struct sockaddr *)(__ss))
 #endif /* _XOPEN_SOURCE >= 500 || _NETBSD_SOURCE */  #endif /* _XOPEN_SOURCE >= 500 || _NETBSD_SOURCE */
 #endif /* 1 */  #endif /* 1 */
   
Line 462  struct msghdr {
Line 469  struct msghdr {
 #define MSG_MCAST       0x0200          /* this message was rcvd using link-level mcast */  #define MSG_MCAST       0x0200          /* this message was rcvd using link-level mcast */
 #define MSG_NOSIGNAL    0x0400          /* do not generate SIGPIPE on EOF */  #define MSG_NOSIGNAL    0x0400          /* do not generate SIGPIPE on EOF */
   
   /* Extra flags used internally only */
   #define MSG_USERFLAGS   0x0ffffff
   #define MSG_NAMEMBUF    0x1000000       /* msg_name is an mbuf */
   #define MSG_CONTROLMBUF 0x2000000       /* msg_control is an mbuf */
   #define MSG_IOVUSRSPACE 0x4000000       /* msg_iov is in user space */
   #define MSG_LENUSRSPACE 0x8000000       /* address length is in user space */
   
 /*  /*
  * Header for ancillary data objects in msg_control buffer.   * Header for ancillary data objects in msg_control buffer.
  * Used for additional information with/about a datagram   * Used for additional information with/about a datagram
Line 498  struct cmsghdr {
Line 512  struct cmsghdr {
   
 /* given pointer to struct cmsghdr, return pointer to next cmsghdr */  /* given pointer to struct cmsghdr, return pointer to next cmsghdr */
 #define CMSG_NXTHDR(mhdr, cmsg) \  #define CMSG_NXTHDR(mhdr, cmsg) \
         (((__caddr_t)(cmsg) + __CMSG_ALIGN((cmsg)->cmsg_len) + \          (((char *)(cmsg) + __CMSG_ALIGN((cmsg)->cmsg_len) + \
                             __CMSG_ALIGN(sizeof(struct cmsghdr)) > \                              __CMSG_ALIGN(sizeof(struct cmsghdr)) > \
             (((__caddr_t)(mhdr)->msg_control) + (mhdr)->msg_controllen)) ? \              (((char *)(mhdr)->msg_control) + (mhdr)->msg_controllen)) ? \
             (struct cmsghdr *)0 : \              (struct cmsghdr *)0 : \
             (struct cmsghdr *)((__caddr_t)(cmsg) + \              (struct cmsghdr *)((char *)(cmsg) + \
                 __CMSG_ALIGN((cmsg)->cmsg_len)))                  __CMSG_ALIGN((cmsg)->cmsg_len)))
   
 /*  /*
Line 537  __BEGIN_DECLS
Line 551  __BEGIN_DECLS
 int     __cmsg_alignbytes(void);  int     __cmsg_alignbytes(void);
 __END_DECLS  __END_DECLS
   
   #ifdef  _KERNEL
   static inline socklen_t
   sockaddr_getlen(const struct sockaddr *sa)
   {
           return sa->sa_len;
   }
   
   __BEGIN_DECLS
   struct sockaddr *sockaddr_copy(struct sockaddr *, socklen_t,
       const struct sockaddr *);
   struct sockaddr *sockaddr_alloc(sa_family_t, socklen_t, int);
   const void *sockaddr_const_addr(const struct sockaddr *, socklen_t *);
   void *sockaddr_addr(struct sockaddr *, socklen_t *);
   const struct sockaddr *sockaddr_any(const struct sockaddr *);
   const void *sockaddr_anyaddr(const struct sockaddr *, socklen_t *);
   int sockaddr_cmp(const struct sockaddr *, const struct sockaddr *);
   struct sockaddr *sockaddr_dup(const struct sockaddr *, int);
   void sockaddr_free(struct sockaddr *);
   __END_DECLS
   #endif /* _KERNEL */
   
 #ifndef _KERNEL  #ifndef _KERNEL
   
 __BEGIN_DECLS  __BEGIN_DECLS
Line 545  int bind(int, const struct sockaddr *, s
Line 580  int bind(int, const struct sockaddr *, s
 int     connect(int, const struct sockaddr *, socklen_t);  int     connect(int, const struct sockaddr *, socklen_t);
 int     getpeername(int, struct sockaddr * __restrict, socklen_t * __restrict);  int     getpeername(int, struct sockaddr * __restrict, socklen_t * __restrict);
 int     getsockname(int, struct sockaddr * __restrict, socklen_t * __restrict);  int     getsockname(int, struct sockaddr * __restrict, socklen_t * __restrict);
 int     getsockopt(int, int, int, void * __restrict, socklen_t * __restrict);  int     getsockopt(int, int, int, void *__restrict, socklen_t * __restrict);
 int     listen(int, int);  int     listen(int, int);
 ssize_t recv(int, void *, size_t, int);  ssize_t recv(int, void *, size_t, int);
 ssize_t recvfrom(int, void * __restrict, size_t, int,  ssize_t recvfrom(int, void *__restrict, size_t, int,
             struct sockaddr * __restrict, socklen_t * __restrict);              struct sockaddr * __restrict, socklen_t * __restrict);
 ssize_t recvmsg(int, struct msghdr *, int);  ssize_t recvmsg(int, struct msghdr *, int);
 ssize_t send(int, const void *, size_t, int);  ssize_t send(int, const void *, size_t, int);

Legend:
Removed from v.1.75.4.2  
changed lines
  Added in v.1.89.28.1

CVSweb <webmaster@jp.NetBSD.org>