|
nsz |
d7c151 |
#include <netinet/in.h>
|
|
nsz |
d7c151 |
#define T(t) (t*)0;
|
|
nsz |
d7c151 |
#define F(t,n) {t *y = &x.;;}
|
|
nsz |
d7c151 |
#define C(n) switch(n){case n:;}
|
|
nsz |
d7c151 |
#define I(n) {int i = n;}
|
|
nsz |
d7c151 |
static void f()
|
|
nsz |
d7c151 |
{
|
|
nsz |
d7c151 |
T(in_port_t)
|
|
nsz |
d7c151 |
T(in_addr_t)
|
|
nsz |
d7c151 |
T(sa_family_t)
|
|
nsz |
d7c151 |
T(uint8_t)
|
|
nsz |
d7c151 |
T(uint32_t)
|
|
nsz |
d7c151 |
{
|
|
nsz |
d7c151 |
struct in_addr x;
|
|
nsz |
d7c151 |
F(in_addr_t, s_addr)
|
|
nsz |
d7c151 |
}
|
|
nsz |
d7c151 |
{
|
|
nsz |
d7c151 |
struct sockaddr_in x;
|
|
nsz |
d7c151 |
F(sa_family_t, sin_family)
|
|
nsz |
d7c151 |
F(in_port_t, sin_port)
|
|
nsz |
d7c151 |
F(struct in_addr, sin_addr)
|
|
nsz |
d7c151 |
}
|
|
nsz |
d7c151 |
{
|
|
nsz |
d7c151 |
struct in6_addr x;
|
|
nsz |
d7c151 |
F(uint8_t, s6_addr[16])
|
|
nsz |
d7c151 |
}
|
|
nsz |
d7c151 |
{
|
|
nsz |
d7c151 |
struct sockaddr_in6 x;
|
|
nsz |
d7c151 |
F(sa_family_t, sin6_family)
|
|
nsz |
d7c151 |
F(in_port_t, sin6_port)
|
|
nsz |
d7c151 |
F(uint32_t, sin6_flowinfo)
|
|
nsz |
d7c151 |
F(struct in6_addr, sin6_addr)
|
|
nsz |
d7c151 |
F(uint32_t, sin6_scope_id)
|
|
nsz |
d7c151 |
}
|
|
nsz |
d7c151 |
{const struct in6_addr *x = &in6addr_any;}
|
|
nsz |
d7c151 |
{const struct in6_addr *x = &in6addr_loopback;}
|
|
nsz |
d7c151 |
{struct in6_addr x = IN6ADDR_ANY_INIT;}
|
|
nsz |
d7c151 |
{struct in6_addr x = IN6ADDR_LOOPBACK_INIT;}
|
|
nsz |
d7c151 |
{
|
|
nsz |
d7c151 |
struct ipv6_mreq x;
|
|
nsz |
d7c151 |
F(struct in6_addr, ipv6mr_multiaddr)
|
|
nsz |
bdd14f |
F(unsigned, ipv6mr_interface)
|
|
nsz |
d7c151 |
}
|
|
nsz |
d7c151 |
C(IPPROTO_IP)
|
|
nsz |
d7c151 |
C(IPPROTO_IPV6)
|
|
nsz |
d7c151 |
C(IPPROTO_ICMP)
|
|
nsz |
d7c151 |
C(IPPROTO_RAW)
|
|
nsz |
d7c151 |
C(IPPROTO_TCP)
|
|
nsz |
d7c151 |
C(IPPROTO_UDP)
|
|
nsz |
d7c151 |
C(INADDR_ANY)
|
|
nsz |
d7c151 |
C(INADDR_BROADCAST)
|
|
nsz |
d7c151 |
C(INET_ADDRSTRLEN)
|
|
nsz |
d7c151 |
I(htonl(0))
|
|
nsz |
d7c151 |
I(htons(0))
|
|
nsz |
d7c151 |
I(ntohl(0))
|
|
nsz |
d7c151 |
I(ntohs(0))
|
|
nsz |
d7c151 |
C(INET6_ADDRSTRLEN)
|
|
nsz |
d7c151 |
C(IPV6_JOIN_GROUP)
|
|
nsz |
d7c151 |
C(IPV6_LEAVE_GROUP)
|
|
nsz |
d7c151 |
C(IPV6_MULTICAST_HOPS)
|
|
nsz |
d7c151 |
C(IPV6_MULTICAST_IF)
|
|
nsz |
d7c151 |
C(IPV6_MULTICAST_LOOP)
|
|
nsz |
d7c151 |
C(IPV6_UNICAST_HOPS)
|
|
nsz |
d7c151 |
C(IPV6_V6ONLY)
|
|
nsz |
d7c151 |
I(IN6_IS_ADDR_UNSPECIFIED(&in6addr_any))
|
|
nsz |
d7c151 |
I(IN6_IS_ADDR_LOOPBACK(&in6addr_any))
|
|
nsz |
d7c151 |
I(IN6_IS_ADDR_MULTICAST(&in6addr_any))
|
|
nsz |
d7c151 |
I(IN6_IS_ADDR_LINKLOCAL(&in6addr_any))
|
|
nsz |
d7c151 |
I(IN6_IS_ADDR_SITELOCAL(&in6addr_any))
|
|
nsz |
d7c151 |
I(IN6_IS_ADDR_V4MAPPED(&in6addr_any))
|
|
nsz |
d7c151 |
I(IN6_IS_ADDR_V4COMPAT(&in6addr_any))
|
|
nsz |
d7c151 |
I(IN6_IS_ADDR_MC_NODELOCAL(&in6addr_any))
|
|
nsz |
d7c151 |
I(IN6_IS_ADDR_MC_LINKLOCAL(&in6addr_any))
|
|
nsz |
d7c151 |
I(IN6_IS_ADDR_MC_SITELOCAL(&in6addr_any))
|
|
nsz |
d7c151 |
I(IN6_IS_ADDR_MC_ORGLOCAL(&in6addr_any))
|
|
nsz |
d7c151 |
I(IN6_IS_ADDR_MC_GLOBAL(&in6addr_any))
|
|
nsz |
d7c151 |
}
|