Generic facilities for byteswapping and unaligned references
[syslinux/sherbszt.git] / com32 / include / netinet / in.h
blob0a0049fd3de2defe8279540088c471c0d64dfd98
1 #ifndef _NETINET_IN_H
2 #define _NETINET_IN_H
4 /* COM32 will be running on an i386 platform */
6 #include <klibc/compiler.h>
7 #include <klibc/extern.h>
8 #include <stdint.h>
9 #include <byteswap.h>
11 #define htons(x) cpu_to_be16(x)
12 #define ntohs(x) be16_to_cpu(x)
13 #define htonl(x) cpu_to_be32(x)
14 #define ntohl(x) be32_to_cpu(x)
15 #define htonq(x) cpu_to_be64(x)
16 #define ntohq(x) be64_to_cpu(x)
18 typedef uint32_t in_addr_t;
19 typedef uint16_t in_port_t;
21 struct in_addr {
22 in_addr_t s_addr;
25 __extern char *inet_ntoa(struct in_addr);
27 #endif /* _NETINET_IN_H */