Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/sys/socket.h,v rcsdiff: /ftp/cvs/cvsroot/src/sys/sys/socket.h,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.69.4.1 retrieving revision 1.78.6.3 diff -u -p -r1.69.4.1 -r1.78.6.3 --- src/sys/sys/socket.h 2005/04/29 11:29:38 1.69.4.1 +++ src/sys/sys/socket.h 2006/08/11 15:47:26 1.78.6.3 @@ -1,4 +1,4 @@ -/* $NetBSD: socket.h,v 1.69.4.1 2005/04/29 11:29:38 kent Exp $ */ +/* $NetBSD: socket.h,v 1.78.6.3 2006/08/11 15:47:26 yamt Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -122,6 +122,7 @@ typedef _BSD_SSIZE_T_ ssize_t; #define SO_REUSEPORT 0x0200 /* allow local address & port reuse */ #define SO_TIMESTAMP 0x0400 /* timestamp received dgram traffic */ + /* * Additional options, not kept in so_options. */ @@ -194,8 +195,9 @@ struct linger { #define pseudo_AF_HDRCMPLT 30 /* Used by BPF to not rewrite hdrs in interface output routine */ #endif +#define AF_BLUETOOTH 31 -#define AF_MAX 31 +#define AF_MAX 32 /* * Structure used by kernel to store most @@ -281,6 +283,7 @@ struct sockaddr_storage { #if defined(_NETBSD_SOURCE) #define PF_KEY pseudo_AF_KEY /* like PF_ROUTE, only for key mgmt */ #endif +#define PF_BLUETOOTH AF_BLUETOOTH #define PF_MAX AF_MAX @@ -447,16 +450,17 @@ struct msghdr { int msg_flags; /* flags on received message */ }; -#define MSG_OOB 0x1 /* process out-of-band data */ -#define MSG_PEEK 0x2 /* peek at incoming message */ -#define MSG_DONTROUTE 0x4 /* send without using routing tables */ -#define MSG_EOR 0x8 /* data completes record */ -#define MSG_TRUNC 0x10 /* data discarded before delivery */ -#define MSG_CTRUNC 0x20 /* control data lost before delivery */ -#define MSG_WAITALL 0x40 /* wait for full request or error */ -#define MSG_DONTWAIT 0x80 /* this message should be nonblocking */ -#define MSG_BCAST 0x100 /* this message was rcvd using link-level brdcst */ -#define MSG_MCAST 0x200 /* this message was rcvd using link-level mcast */ +#define MSG_OOB 0x0001 /* process out-of-band data */ +#define MSG_PEEK 0x0002 /* peek at incoming message */ +#define MSG_DONTROUTE 0x0004 /* send without using routing tables */ +#define MSG_EOR 0x0008 /* data completes record */ +#define MSG_TRUNC 0x0010 /* data discarded before delivery */ +#define MSG_CTRUNC 0x0020 /* control data lost before delivery */ +#define MSG_WAITALL 0x0040 /* wait for full request or error */ +#define MSG_DONTWAIT 0x0080 /* this message should be nonblocking */ +#define MSG_BCAST 0x0100 /* this message was rcvd using link-level brdcst */ +#define MSG_MCAST 0x0200 /* this message was rcvd using link-level mcast */ +#define MSG_NOSIGNAL 0x0400 /* do not generate SIGPIPE on EOF */ /* * Header for ancillary data objects in msg_control buffer. @@ -474,6 +478,9 @@ struct cmsghdr { /* given pointer to struct cmsghdr, return pointer to data */ #define CMSG_DATA(cmsg) \ ((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. @@ -494,7 +501,7 @@ struct cmsghdr { (((__caddr_t)(cmsg) + __CMSG_ALIGN((cmsg)->cmsg_len) + \ __CMSG_ALIGN(sizeof(struct cmsghdr)) > \ (((__caddr_t)(mhdr)->msg_control) + (mhdr)->msg_controllen)) ? \ - (struct cmsghdr *)NULL : \ + (struct cmsghdr *)0 : \ (struct cmsghdr *)((__caddr_t)(cmsg) + \ __CMSG_ALIGN((cmsg)->cmsg_len))) @@ -505,7 +512,7 @@ struct cmsghdr { #define CMSG_FIRSTHDR(mhdr) \ ((mhdr)->msg_controllen >= sizeof(struct cmsghdr) ? \ (struct cmsghdr *)(mhdr)->msg_control : \ - (struct cmsghdr *)NULL) + (struct cmsghdr *)0) #define CMSG_SPACE(l) (__CMSG_ALIGN(sizeof(struct cmsghdr)) + __CMSG_ALIGN(l)) #define CMSG_LEN(l) (__CMSG_ALIGN(sizeof(struct cmsghdr)) + (l)) @@ -524,28 +531,6 @@ struct cmsghdr { #define SHUT_WR 1 /* Disallow further sends. */ #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 __BEGIN_DECLS @@ -573,7 +558,11 @@ ssize_t sendmsg(int, const struct msghdr int setsockopt(int, int, int, const void *, socklen_t); int shutdown(int, int); int sockatmark(int); -int socket(int, int, int); +int socket(int, int, int) +#if !defined(__LIBC12_SOURCE__) && !defined(_STANDALONE) +__RENAME(__socket30) +#endif + ; int socketpair(int, int, int, int *); __END_DECLS #endif /* !_KERNEL */