|
ginnOS
The reference: libc, the libraries and the kernel
|
IPv4 addresses as text ("10.0.2.15") and back. More...
#include <netinet/in.h>Go to the source code of this file.
Functions | |
| int | inet_pton (int af, const char *src, void *dst) |
| text to an address. | |
| const char * | inet_ntop (int af, const void *src, char *dst, socklen_t size) |
| an address to text. | |
| in_addr_t | inet_addr (const char *text) |
| text to an address, as inet_aton does; the address, or INADDR_NONE. | |
| int | inet_aton (const char *text, struct in_addr *out) |
| text to an address. | |
| char * | inet_ntoa (struct in_addr in) |
| an address to text, in a buffer of the calling thread. | |
IPv4 addresses as text ("10.0.2.15") and back.
| int inet_pton | ( | int | af, |
| const char * | src, | ||
| void * | dst ) |
text to an address.
| af | AF_INET. |
| dst | receives a struct in_addr. |
| const char * inet_ntop | ( | int | af, |
| const void * | src, | ||
| char * | dst, | ||
| socklen_t | size ) |
an address to text.
| size | at least INET_ADDRSTRLEN for AF_INET. |
| in_addr_t inet_addr | ( | const char * | text | ) |
text to an address, as inet_aton does; the address, or INADDR_NONE.
| int inet_aton | ( | const char * | text, |
| struct in_addr * | out ) |
text to an address.
as well as a.b.c.d this takes the older forms: a.b.c (c is 16 bits), a.b (b is 24 bits) and a (32 bits), each part in decimal, octal (0) or hex (0x).
| char * inet_ntoa | ( | struct in_addr | in | ) |
an address to text, in a buffer of the calling thread.