3a289ebfed71c784ed14d51253480fc913446974
[tpg/acess2.git] / Usermode / Libraries / libpsocket.so_src / include_exp / netinet / in.h
1 /*
2  * Acess2 POSIX Sockets Emulation
3  * - By John Hodge (thePowersGang)
4  *
5  * netinet/in.h
6  * - ?Addressing?
7  */
8 #ifndef _LIBPSOCKET__NETINET__IN_H_
9 #define _LIBPSOCKET__NETINET__IN_H_
10
11 #include <stdint.h>
12
13 typedef uint32_t        in_addr_t;
14
15 struct in_addr
16 {
17         in_addr_t s_addr;
18 };
19
20 struct sockaddr_in
21 {
22         uint16_t        sin_family;
23         uint16_t        sin_port;
24         struct in_addr  sin_addr;
25 };
26
27 #define INADDR_ANY      0x00000000
28 #define INADDR_BROADCAST        0xFFFFFFFF
29
30 // getsockopt/setsockopt(level)
31 enum {
32         IPPROTO_IP = 1,
33         IPPROTO_ICMP,
34         IPPROTO_TCP,
35         IPPROTO_UDP
36 };
37
38 struct in6_addr
39 {
40         unsigned char   s6_addr[16];
41 };
42
43 struct sockaddr_in6
44 {
45         uint16_t        sin6_family;
46         uint16_t        sin6_port;
47         uint32_t        sin6_flowinfo;
48         struct in6_addr sin6_addr;
49         uint32_t        sin6_scope_id;
50 };
51
52 #endif
53

UCC git Repository :: git.ucc.asn.au