|
nsz |
f81126 |
#include <sys/socket.h>
|
|
nsz |
f81126 |
#define T(t) (t*)0;
|
|
nsz |
f81126 |
#define F(t,n) {t *y = &x.;;}
|
|
nsz |
f81126 |
#define C(n) switch(n){case n:;}
|
|
nsz |
f81126 |
static void f()
|
|
nsz |
f81126 |
{
|
|
nsz |
f81126 |
T(size_t)
|
|
nsz |
f81126 |
T(ssize_t)
|
|
nsz |
f81126 |
T(socklen_t)
|
|
nsz |
f81126 |
T(sa_family_t)
|
|
nsz |
f81126 |
{
|
|
nsz |
f81126 |
struct sockaddr x;
|
|
nsz |
f81126 |
F(sa_family_t,sa_family)
|
|
nsz |
f81126 |
F(char, sa_data[0])
|
|
nsz |
f81126 |
}
|
|
nsz |
f81126 |
{
|
|
nsz |
f81126 |
struct sockaddr_storage x;
|
|
nsz |
f81126 |
F(sa_family_t, ss_family)
|
|
nsz |
f81126 |
}
|
|
nsz |
f81126 |
{
|
|
nsz |
f81126 |
struct msghdr x;
|
|
nsz |
f81126 |
F(void*,msg_name)
|
|
nsz |
f81126 |
F(socklen_t,msg_namelen)
|
|
nsz |
f81126 |
F(struct iovec*,msg_iov)
|
|
nsz |
f81126 |
F(int,msg_iovlen)
|
|
nsz |
f81126 |
F(void*,msg_control)
|
|
nsz |
f81126 |
F(socklen_t,msg_controllen)
|
|
nsz |
f81126 |
F(int,msg_flags)
|
|
nsz |
f81126 |
}
|
|
nsz |
f81126 |
{
|
|
Szabolcs Nagy |
7ab89d |
struct iovec x;
|
|
Szabolcs Nagy |
7ab89d |
F(void *,iov_base)
|
|
Szabolcs Nagy |
7ab89d |
F(size_t,iov_len)
|
|
Szabolcs Nagy |
7ab89d |
}
|
|
Szabolcs Nagy |
7ab89d |
{
|
|
nsz |
f81126 |
struct cmsghdr x;
|
|
nsz |
f81126 |
F(socklen_t,cmsg_len)
|
|
nsz |
f81126 |
F(int,cmsg_level)
|
|
nsz |
f81126 |
F(int,cmsg_type)
|
|
nsz |
f81126 |
}
|
|
nsz |
f81126 |
C(SCM_RIGHTS)
|
|
nsz |
f81126 |
#ifndef CMSG_DATA
|
|
nsz |
f81126 |
#error no CMSG_DATA
|
|
nsz |
f81126 |
#endif
|
|
nsz |
f81126 |
#ifndef CMSG_NXTHDR
|
|
nsz |
f81126 |
#error no CMSG_NXTHDR
|
|
nsz |
f81126 |
#endif
|
|
nsz |
f81126 |
#ifndef CMSG_FIRSTHDR
|
|
nsz |
f81126 |
#error CMSG_FIRSTTHDR
|
|
nsz |
f81126 |
#endif
|
|
nsz |
f81126 |
{
|
|
nsz |
f81126 |
struct linger x;
|
|
nsz |
f81126 |
F(int,l_onoff)
|
|
nsz |
f81126 |
F(int,l_linger)
|
|
nsz |
f81126 |
}
|
|
nsz |
f81126 |
C(SOCK_DGRAM)
|
|
nsz |
f81126 |
C(SOCK_RAW)
|
|
nsz |
f81126 |
C(SOCK_SEQPACKET)
|
|
nsz |
f81126 |
C(SOCK_STREAM)
|
|
nsz |
f81126 |
C(SOL_SOCKET)
|
|
nsz |
f81126 |
C(SO_ACCEPTCONN)
|
|
nsz |
f81126 |
C(SO_BROADCAST)
|
|
nsz |
f81126 |
C(SO_DEBUG)
|
|
nsz |
f81126 |
C(SO_DONTROUTE)
|
|
nsz |
f81126 |
C(SO_ERROR)
|
|
nsz |
f81126 |
C(SO_KEEPALIVE)
|
|
nsz |
f81126 |
C(SO_LINGER)
|
|
nsz |
f81126 |
C(SO_OOBINLINE)
|
|
nsz |
f81126 |
C(SO_RCVBUF)
|
|
nsz |
f81126 |
C(SO_RCVLOWAT)
|
|
nsz |
f81126 |
C(SO_RCVTIMEO)
|
|
nsz |
f81126 |
C(SO_REUSEADDR)
|
|
nsz |
f81126 |
C(SO_SNDBUF)
|
|
nsz |
f81126 |
C(SO_SNDLOWAT)
|
|
nsz |
f81126 |
C(SO_SNDTIMEO)
|
|
nsz |
f81126 |
C(SO_TYPE)
|
|
nsz |
f81126 |
C(SOMAXCONN)
|
|
nsz |
f81126 |
C(MSG_CTRUNC)
|
|
nsz |
f81126 |
C(MSG_DONTROUTE)
|
|
nsz |
f81126 |
C(MSG_EOR)
|
|
nsz |
f81126 |
C(MSG_OOB)
|
|
nsz |
f81126 |
C(MSG_NOSIGNAL)
|
|
nsz |
f81126 |
C(MSG_PEEK)
|
|
nsz |
f81126 |
C(MSG_TRUNC)
|
|
nsz |
f81126 |
C(MSG_WAITALL)
|
|
nsz |
f81126 |
C(AF_INET)
|
|
nsz |
f81126 |
C(AF_INET6)
|
|
nsz |
f81126 |
C(AF_UNIX)
|
|
nsz |
f81126 |
C(AF_UNSPEC)
|
|
nsz |
f81126 |
C(SHUT_RD)
|
|
nsz |
f81126 |
C(SHUT_RDWR)
|
|
nsz |
f81126 |
C(SHUT_WR)
|
|
nsz |
0ef264 |
{int(*p)(int,struct sockaddr*restrict,socklen_t*restrict) = accept;}
|
|
nsz |
0ef264 |
{int(*p)(int,const struct sockaddr*,socklen_t) = bind;}
|
|
nsz |
0ef264 |
{int(*p)(int,const struct sockaddr*,socklen_t) = connect;}
|
|
nsz |
0ef264 |
{int(*p)(int,struct sockaddr*restrict,socklen_t*restrict) = getpeername;}
|
|
nsz |
0ef264 |
{int(*p)(int,struct sockaddr*restrict,socklen_t*restrict) = getsockname;}
|
|
nsz |
0ef264 |
{int(*p)(int,int,int,void*restrict,socklen_t*restrict) = getsockopt;}
|
|
nsz |
0ef264 |
{int(*p)(int,int) = listen;}
|
|
nsz |
0ef264 |
{ssize_t(*p)(int,void*,size_t,int) = recv;}
|
|
nsz |
0ef264 |
{ssize_t(*p)(int,void*restrict,size_t,int,struct sockaddr*restrict,socklen_t*restrict) = recvfrom;}
|
|
nsz |
0ef264 |
{ssize_t(*p)(int,struct msghdr*,int) = recvmsg;}
|
|
nsz |
0ef264 |
{ssize_t(*p)(int,const void*,size_t,int) = send;}
|
|
nsz |
0ef264 |
{ssize_t(*p)(int,const struct msghdr*,int) = sendmsg;}
|
|
nsz |
0ef264 |
{ssize_t(*p)(int,const void*,size_t,int,const struct sockaddr*,socklen_t) = sendto;}
|
|
nsz |
0ef264 |
{int(*p)(int,int,int,const void*,socklen_t) = setsockopt;}
|
|
nsz |
0ef264 |
{int(*p)(int,int) = shutdown;}
|
|
nsz |
0ef264 |
{int(*p)(int) = sockatmark;}
|
|
nsz |
0ef264 |
{int(*p)(int,int,int) = socket;}
|
|
nsz |
0ef264 |
{int(*p)(int,int,int,int[]) = socketpair;}
|
|
nsz |
f81126 |
}
|