aboutsummaryrefslogtreecommitdiffstats
path: root/com32/include/netinet/in.h
blob: b24f80468eb78a573e8689afcafa1708f9937f78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef _NETINET_IN_H
#define _NETINET_IN_H

/* COM32 will be running on an i386 platform */

#include <klibc/compiler.h>
#include <klibc/extern.h>
#include <stdint.h>
#include <byteswap.h>

#define htons(x) bswap_16(x)
#define ntohs(x) bswap_16(x)
#define htonl(x) bswap_32(x)
#define ntohl(x) bswap_32(x)
#define htonq(x) bswap_64(x)
#define ntohq(x) bswap_64(x)

typedef uint32_t in_addr_t;
typedef uint16_t in_port_t;

struct in_addr {
    in_addr_t s_addr;
};

__extern char *inet_ntoa(struct in_addr);

#endif /* _NETINET_IN_H */