inet.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2013-15 Freie Universität Berlin
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
23 #ifndef ARPA_INET_H
24 #define ARPA_INET_H
25 
26 #include "net/af.h"
27 #include "sys/bytes.h"
28 #include "netinet/in.h"
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
37 #ifndef INADDRSZ
38 #define INADDRSZ (4)
39 #endif
40 
44 #ifndef IN6ADDRSZ
45 #define IN6ADDRSZ (16)
46 #endif
47 
62 const char *inet_ntop(int af, const void *restrict src, char *restrict dst,
63  socklen_t size);
64 
79 int inet_pton(int af, const char *src, void *dst);
80 
81 #ifdef __cplusplus
82 }
83 #endif
84 
88 #endif /* ARPA_INET_H */
inet_pton
int inet_pton(int af, const char *src, void *dst)
Converts an IP address string representation to a byte-represented IP address.
af.h
Global UNIX address family definitions.
socklen_t
size_t socklen_t
socket address length
Definition: bytes.h:31
in.h
Main socket header.
bytes.h
System-internal byte operations.
inet_ntop
const char * inet_ntop(int af, const void *restrict src, char *restrict dst, socklen_t size)
Converts an IP address to its string representation.