aboutsummaryrefslogtreecommitdiff
path: root/system/include/net/arpa/inet.h
blob: 2b701c15f1c724734d934a2ba27a0d413faed206 (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
28
29
30
31
32
#ifndef _NET_ARPA_INET_H
#define _NET_ARPA_INET_H

#ifdef __cplusplus
extern "C" {
#endif

#include <stdint.h>
#include <netdb.h>
#include <netinet/in.h>

uint32_t htonl(uint32_t hostlong);
uint16_t htons(uint16_t hostshort);
uint32_t ntohl(uint32_t netlong);
uint16_t ntohs(uint16_t netshort);

int inet_aton(const char *cp, struct in_addr *addr);
char *inet_ntoa(struct in_addr in);

int inet_pton(int af, const char *src, void *dst);
const char *inet_ntop(int af, const void *src, char *dst, socklen_t size);

typedef long in_addr_t;
in_addr_t inet_addr(const char *cp);

#ifdef __cplusplus
}
#endif

#endif