libctru v2.5.0
Loading...
Searching...
No Matches
inet.h
1#pragma once
2
3#include <netinet/in.h>
4#include <stdint.h>
5
6static inline uint32_t htonl(uint32_t hostlong)
7{
8 return __builtin_bswap32(hostlong);
9}
10
11static inline uint16_t htons(uint16_t hostshort)
12{
13 return __builtin_bswap16(hostshort);
14}
15
16static inline uint32_t ntohl(uint32_t netlong)
17{
18 return __builtin_bswap32(netlong);
19}
20
21static inline uint16_t ntohs(uint16_t netshort)
22{
23 return __builtin_bswap16(netshort);
24}
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30 in_addr_t inet_addr(const char *cp);
31 int inet_aton(const char *cp, struct in_addr *inp);
32 char* inet_ntoa(struct in_addr in);
33
34 const char *inet_ntop(int af, const void * src, char * dst, socklen_t size);
35 int inet_pton(int af, const char * src, void * dst);
36
37#ifdef __cplusplus
38}
39#endif
Definition in.h:30