Home | History | Annotate | Download | only in netinet
      1 #ifndef _NETINET_IN_H
      2 #define _NETINET_IN_H
      3 
      4 /* COM32 will be running on an i386 platform */
      5 
      6 #include <klibc/compiler.h>
      7 #include <klibc/extern.h>
      8 #include <stdint.h>
      9 #include <byteswap.h>
     10 
     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)
     17 
     18 typedef uint32_t in_addr_t;
     19 typedef uint16_t in_port_t;
     20 
     21 struct in_addr {
     22     in_addr_t s_addr;
     23 };
     24 
     25 __extern char *inet_ntoa(struct in_addr);
     26 
     27 #endif /* _NETINET_IN_H */
     28