[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.46.2.1 and 1.62

version 1.46.2.1, 2000/11/20 18:11:35 version 1.62, 2001/09/07 08:13:01
Line 189  struct linger {
Line 189  struct linger {
  * addresses.   * addresses.
  */   */
 struct sockaddr {  struct sockaddr {
         u_char          sa_len;         /* total length */          uint8_t         sa_len;         /* total length */
         sa_family_t     sa_family;      /* address family */          sa_family_t     sa_family;      /* address family */
         char            sa_data[14];    /* actually longer; address value */          char            sa_data[14];    /* actually longer; address value */
 };  };
Line 211  struct sockproto {
Line 211  struct sockproto {
  */   */
 #define _SS_MAXSIZE     128  #define _SS_MAXSIZE     128
 #define _SS_ALIGNSIZE   (sizeof(int64_t))  #define _SS_ALIGNSIZE   (sizeof(int64_t))
 #define _SS_PAD1SIZE    (_SS_ALIGNSIZE - sizeof(u_char) * 2)  #define _SS_PAD1SIZE    (_SS_ALIGNSIZE - 2)
 #define _SS_PAD2SIZE    (_SS_MAXSIZE - sizeof(u_char) * 2 - \  #define _SS_PAD2SIZE    (_SS_MAXSIZE - 2 - \
                                 _SS_PAD1SIZE - _SS_ALIGNSIZE)                                  _SS_PAD1SIZE - _SS_ALIGNSIZE)
   
 #if !defined(_XOPEN_SOURCE) || (_XOPEN_SOURCE - 0) >= 500  #if !defined(_XOPEN_SOURCE) || (_XOPEN_SOURCE - 0) >= 500
 struct sockaddr_storage {  struct sockaddr_storage {
         u_char          ss_len;         /* address length */          uint8_t         ss_len;         /* address length */
         sa_family_t     ss_family;      /* address family */          sa_family_t     ss_family;      /* address family */
         char            __ss_pad1[_SS_PAD1SIZE];          char            __ss_pad1[_SS_PAD1SIZE];
         int64_t      __ss_align;/* force desired structure storage alignment */          int64_t      __ss_align;/* force desired structure storage alignment */
Line 431  struct cmsghdr {
Line 431  struct cmsghdr {
             (struct cmsghdr *)NULL : \              (struct cmsghdr *)NULL : \
             (struct cmsghdr *)((caddr_t)(cmsg) + __CMSG_ALIGN((cmsg)->cmsg_len)))              (struct cmsghdr *)((caddr_t)(cmsg) + __CMSG_ALIGN((cmsg)->cmsg_len)))
   
 #define CMSG_FIRSTHDR(mhdr)     ((struct cmsghdr *)(mhdr)->msg_control)  /*
    * RFC 2292 requires to check msg_controllen, in case that the kernel returns
    * an empty list for some reasons.
    */
   #define CMSG_FIRSTHDR(mhdr) \
           ((mhdr)->msg_controllen >= sizeof(struct cmsghdr) ? \
            (struct cmsghdr *)(mhdr)->msg_control : \
            (struct cmsghdr *)NULL)
   
 #define CMSG_SPACE(l)   (__CMSG_ALIGN(sizeof(struct cmsghdr)) + __CMSG_ALIGN(l))  #define CMSG_SPACE(l)   (__CMSG_ALIGN(sizeof(struct cmsghdr)) + __CMSG_ALIGN(l))
 #define CMSG_LEN(l)     (__CMSG_ALIGN(sizeof(struct cmsghdr)) + (l))  #define CMSG_LEN(l)     (__CMSG_ALIGN(sizeof(struct cmsghdr)) + (l))
Line 455  struct cmsghdr {
Line 462  struct cmsghdr {
  * 4.3 compat sockaddr, move to compat file later   * 4.3 compat sockaddr, move to compat file later
  */   */
 struct osockaddr {  struct osockaddr {
         u_short sa_family;              /* address family */          uint16_t        sa_family;      /* address family */
         char    sa_data[14];            /* up to 14 bytes of direct address */          char            sa_data[14];    /* up to 14 bytes of direct address */
 };  };
   
 /*  /*
Line 501  int shutdown __P((int, int));
Line 508  int shutdown __P((int, int));
 int     socket __P((int, int, int));  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  
 #ifdef COMPAT_OLDSOCK  
 #define MSG_COMPAT      0x8000  
 #endif  
 #endif /* !_KERNEL */  #endif /* !_KERNEL */
   
 #endif /* !_SYS_SOCKET_H_ */  #endif /* !_SYS_SOCKET_H_ */

Legend:
Removed from v.1.46.2.1  
changed lines
  Added in v.1.62

CVSweb <webmaster@jp.NetBSD.org>