version 1.102, 2012/01/20 00:25:29 |
version 1.111, 2014/12/02 19:38:16 |
Line 110 typedef _BSD_SSIZE_T_ ssize_t; |
|
Line 110 typedef _BSD_SSIZE_T_ ssize_t; |
|
|
|
#define SOCK_CLOEXEC 0x10000000 /* set close on exec on socket */ |
#define SOCK_CLOEXEC 0x10000000 /* set close on exec on socket */ |
#define SOCK_NONBLOCK 0x20000000 /* set non blocking i/o socket */ |
#define SOCK_NONBLOCK 0x20000000 /* set non blocking i/o socket */ |
|
#define SOCK_NOSIGPIPE 0x40000000 /* don't send sigpipe */ |
#define SOCK_FLAGS_MASK 0xf0000000 /* flags mask */ |
#define SOCK_FLAGS_MASK 0xf0000000 /* flags mask */ |
|
|
/* |
/* |
Line 126 typedef _BSD_SSIZE_T_ ssize_t; |
|
Line 127 typedef _BSD_SSIZE_T_ ssize_t; |
|
#define SO_OOBINLINE 0x0100 /* leave received OOB data in line */ |
#define SO_OOBINLINE 0x0100 /* leave received OOB data in line */ |
#define SO_REUSEPORT 0x0200 /* allow local address & port reuse */ |
#define SO_REUSEPORT 0x0200 /* allow local address & port reuse */ |
/* SO_OTIMESTAMP 0x0400 */ |
/* SO_OTIMESTAMP 0x0400 */ |
|
#define SO_NOSIGPIPE 0x0800 /* no SIGPIPE from EPIPE */ |
#define SO_ACCEPTFILTER 0x1000 /* there is an accept filter */ |
#define SO_ACCEPTFILTER 0x1000 /* there is an accept filter */ |
#define SO_TIMESTAMP 0x2000 /* timestamp received dgram traffic */ |
#define SO_TIMESTAMP 0x2000 /* timestamp received dgram traffic */ |
|
|
Line 339 struct sockcred { |
|
Line 341 struct sockcred { |
|
* Compute size of a sockcred structure with groups. |
* Compute size of a sockcred structure with groups. |
*/ |
*/ |
#define SOCKCREDSIZE(ngrps) \ |
#define SOCKCREDSIZE(ngrps) \ |
(sizeof(struct sockcred) + (sizeof(gid_t) * ((ngrps) - 1))) |
(sizeof(struct sockcred) + (sizeof(gid_t) * \ |
|
((ngrps) ? ((ngrps) - 1) : 0))) |
#endif /* _NETBSD_SOURCE */ |
#endif /* _NETBSD_SOURCE */ |
|
|
|
|
Line 426 struct kinfo_pcb { |
|
Line 429 struct kinfo_pcb { |
|
|
|
#define ki_src ki_s._kis_src |
#define ki_src ki_s._kis_src |
#define ki_dst ki_d._kid_dst |
#define ki_dst ki_d._kid_dst |
|
#define ki_spad ki_s._kis_pad |
|
#define ki_dpad ki_d._kid_pad |
|
|
#define PCB_SLOP 20 |
#define PCB_SLOP 20 |
#define PCB_ALL 0 |
#define PCB_ALL 0 |
|
|
#if defined(_NETBSD_SOURCE) |
#if defined(_NETBSD_SOURCE) |
#define MSG_CMSG_CLOEXEC 0x0800 /* close on exec receiving fd */ |
#define MSG_CMSG_CLOEXEC 0x0800 /* close on exec receiving fd */ |
#define MSG_NBIO 0x1000 /* use non-blocking I/O */ |
#define MSG_NBIO 0x1000 /* use non-blocking I/O */ |
|
#define MSG_WAITFORONE 0x2000 /* recvmmsg() wait for one message */ |
|
|
|
struct mmsghdr { |
|
struct msghdr msg_hdr; |
|
unsigned int msg_len; |
|
}; |
#endif |
#endif |
|
|
/* Extra flags used internally only */ |
/* Extra flags used internally only */ |
Line 531 struct cmsghdr { |
|
Line 542 struct cmsghdr { |
|
* without (2), we can't guarantee binary compatibility in case of future |
* without (2), we can't guarantee binary compatibility in case of future |
* changes in ALIGNBYTES. |
* changes in ALIGNBYTES. |
*/ |
*/ |
|
#define __CMSG_ALIGN(n) (((n) + __ALIGNBYTES) & ~__ALIGNBYTES) |
#ifdef _KERNEL |
#ifdef _KERNEL |
#define __CMSG_ALIGN(n) (((n) + ALIGNBYTES) & ~ALIGNBYTES) |
|
#define CMSG_ALIGN(n) __CMSG_ALIGN(n) |
|
#else |
|
#define __CMSG_ALIGN(n) (((n) + __cmsg_alignbytes()) & ~__cmsg_alignbytes()) |
|
#define CMSG_ALIGN(n) __CMSG_ALIGN(n) |
#define CMSG_ALIGN(n) __CMSG_ALIGN(n) |
#endif |
#endif |
|
|
Line 545 struct cmsghdr { |
|
Line 553 struct cmsghdr { |
|
__CMSG_ALIGN(sizeof(struct cmsghdr)) > \ |
__CMSG_ALIGN(sizeof(struct cmsghdr)) > \ |
(((char *)(mhdr)->msg_control) + (mhdr)->msg_controllen)) ? \ |
(((char *)(mhdr)->msg_control) + (mhdr)->msg_controllen)) ? \ |
(struct cmsghdr *)0 : \ |
(struct cmsghdr *)0 : \ |
(struct cmsghdr *)((char *)(cmsg) + \ |
(struct cmsghdr *)(void *)((char *)(cmsg) + \ |
__CMSG_ALIGN((cmsg)->cmsg_len))) |
__CMSG_ALIGN((cmsg)->cmsg_len))) |
|
|
/* |
/* |
Line 577 struct cmsghdr { |
|
Line 585 struct cmsghdr { |
|
|
|
#include <sys/cdefs.h> |
#include <sys/cdefs.h> |
|
|
#ifndef _KERNEL |
|
__BEGIN_DECLS |
|
int __cmsg_alignbytes(void) __constfunc; |
|
__END_DECLS |
|
#endif |
|
|
|
#ifdef _KERNEL |
#ifdef _KERNEL |
static inline socklen_t |
static inline socklen_t |
sockaddr_getlen(const struct sockaddr *sa) |
sockaddr_getlen(const struct sockaddr *sa) |
Line 603 const struct sockaddr *sockaddr_any_by_f |
|
Line 605 const struct sockaddr *sockaddr_any_by_f |
|
const void *sockaddr_anyaddr(const struct sockaddr *, socklen_t *); |
const void *sockaddr_anyaddr(const struct sockaddr *, socklen_t *); |
int sockaddr_cmp(const struct sockaddr *, const struct sockaddr *); |
int sockaddr_cmp(const struct sockaddr *, const struct sockaddr *); |
struct sockaddr *sockaddr_dup(const struct sockaddr *, int); |
struct sockaddr *sockaddr_dup(const struct sockaddr *, int); |
|
int sockaddr_format(const struct sockaddr *, char *, size_t); |
void sockaddr_free(struct sockaddr *); |
void sockaddr_free(struct sockaddr *); |
__END_DECLS |
__END_DECLS |
#endif /* _KERNEL */ |
#endif /* _KERNEL */ |
Line 636 __RENAME(__socket30) |
|
Line 639 __RENAME(__socket30) |
|
#endif |
#endif |
; |
; |
int socketpair(int, int, int, int *); |
int socketpair(int, int, int, int *); |
|
|
|
#if defined(_NETBSD_SOURCE) |
|
int sendmmsg(int, struct mmsghdr *, unsigned int, unsigned int); |
|
struct timespec; |
|
int recvmmsg(int, struct mmsghdr *, unsigned int, unsigned int, |
|
struct timespec *); |
|
#endif |
__END_DECLS |
__END_DECLS |
#endif /* !_KERNEL */ |
#endif /* !_KERNEL */ |
|
|