2 * Acess2 POSIX Sockets Emulation
3 * - By John Hodge (thePowersGang)
8 #ifndef _LIBPSOCKET__NETINET__IN_H_
9 #define _LIBPSOCKET__NETINET__IN_H_
11 #include <sys/socket.h> // sa_family_t
14 typedef uint32_t in_addr_t;
23 sa_family_t sin_family;
25 struct in_addr sin_addr;
28 #define INADDR_ANY 0x00000000
29 #define INADDR_BROADCAST 0xFFFFFFFF
31 #define IPPORT_RESERVED 1024
32 #define IPPORT_UNRESERVED 0xC000
34 // getsockopt/setsockopt(level)
42 #define INET_ADDRSTRLEN 16
43 #define INET6_ADDRSTRLEN 48 // linux
47 unsigned char s6_addr[16];
50 extern struct in6_addr in6addr_any;
54 sa_family_t sin6_family;
56 uint32_t sin6_flowinfo;
57 struct in6_addr sin6_addr;
58 uint32_t sin6_scope_id;
61 #include <arpa/inet.h> // for hton*/ntoh* (bochs)