#include <netinet/in.h>
#include <sys/socket.h>
Go to the source code of this file.
◆ INET_ADDRSTR_LEN
| #define INET_ADDRSTR_LEN INET6_ADDRSTRLEN /* fits AF_INET and AF_INET6 */ |
IPv4/IPv6 address helpers, cf.
the inet.[ch] wrapper in SMCRoute
Definition at line 8 of file inet.h.
◆ inet_addr_t
◆ inet_anyaddr()
| void inet_anyaddr |
( |
sa_family_t |
family, |
|
|
in_port_t |
port, |
|
|
inet_addr_t * |
ss |
|
) |
| |
Initialize @ss to the wildcard address of @family with @port.
◆ inet_family()
Family of @ss, AF_INET or AF_INET6.
◆ inet_len()
Length of the concrete sockaddr in @ss, for bind()/connect()/sendto()
◆ inet_ntop2()
| const char * inet_ntop2 |
( |
const inet_addr_t * |
ss, |
|
|
char * |
buf, |
|
|
size_t |
len |
|
) |
| |
Presentation string of the address in @ss, e.g.
for logging
◆ inet_port()
Port in host byte order, regardless of family.
◆ inet_set_port()
| void inet_set_port |
( |
inet_addr_t * |
ss, |
|
|
in_port_t |
port |
|
) |
| |
Set the port (host byte order) in the correct family-specific field.