1 #ifndef BGLIBS__NET__CMSG__H__
2 #define BGLIBS__NET__CMSG__H__
5 #define _XOPEN_SOURCE 500
8 #include <sys/socket.h>
11 #define MSG_NOSIGNAL 0
15 #define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \
16 & (size_t) ~(sizeof (size_t) - 1))
20 #define CMSG_SPACE(len) (CMSG_ALIGN(sizeof(struct cmsghdr)) + CMSG_ALIGN(len))
24 #define CMSG_LEN(len) (CMSG_ALIGN(sizeof(struct cmsghdr)) + (len))