Usermode/libc,libpsocket - Various fixes to psockets and errno
[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 <sys/socket.h> // sa_family_t
12 #include <stdint.h>
13
14 typedef uint32_t        in_addr_t;
15
16 struct in_addr
17 {
18         in_addr_t s_addr;
19 };
20
21 struct sockaddr_in
22 {
23         sa_family_t     sin_family;
24         uint16_t        sin_port;
25         struct in_addr  sin_addr;
26 };
27
28 #define INADDR_ANY      0x00000000
29 #define INADDR_BROADCAST        0xFFFFFFFF
30
31 // getsockopt/setsockopt(level)
32 enum {
33         IPPROTO_IP = 1,
34         IPPROTO_ICMP,
35         IPPROTO_TCP,
36         IPPROTO_UDP
37 };
38
39 struct in6_addr
40 {
41         unsigned char   s6_addr[16];
42 };
43
44 struct sockaddr_in6
45 {
46         sa_family_t     sin6_family;
47         uint16_t        sin6_port;
48         uint32_t        sin6_flowinfo;
49         struct in6_addr sin6_addr;
50         uint32_t        sin6_scope_id;
51 };
52
53 #endif
54

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