[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.49 and 1.50

version 1.49, 2000/02/03 09:23:03 version 1.50, 2000/02/18 05:19:25
Line 396  struct cmsghdr {
Line 396  struct cmsghdr {
 };  };
   
 /* given pointer to struct cmsghdr, return pointer to data */  /* given pointer to struct cmsghdr, return pointer to data */
 #define CMSG_DATA(cmsg)         ((u_char *)((cmsg) + 1))  #define CMSG_DATA(cmsg) \
           ((u_char *)(cmsg) + CMSG_ALIGN(sizeof(struct cmsghdr)))
   
 /*  /*
  * Alignment requirement for CMSG struct manipulation.   * Alignment requirement for CMSG struct manipulation.
  * This is different from ALIGN() defined in ARCH/include/param.h.   * This is different from ALIGN() defined in ARCH/include/param.h.
  * XXX think again carefully about architecture dependencies.   * XXX think again carefully about architecture dependencies.
  */   */
 #define CMSG_ALIGN(n)           (((n) + 3) & ~3)  #define CMSG_ALIGN(n)   (((n) + (sizeof(long) - 1)) & ~(sizeof(long) - 1))
   
 /* 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)->cmsg_len + sizeof(struct cmsghdr) > \          (((caddr_t)(cmsg) + CMSG_ALIGN((cmsg)->cmsg_len) + \
                               CMSG_ALIGN(sizeof(struct cmsghdr)) > \
             (((caddr_t)(mhdr)->msg_control) + (mhdr)->msg_controllen)) ? \              (((caddr_t)(mhdr)->msg_control) + (mhdr)->msg_controllen)) ? \
             (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)))

Legend:
Removed from v.1.49  
changed lines
  Added in v.1.50

CVSweb <webmaster@jp.NetBSD.org>