NAME | SYNOPSIS | DESCRIPTION | SEE ALSO
#include <arpa/inet.h>
The <arpa/inet.h> header defines the type in_port_t, the type in_addr_t, and the in_addr structure, as described in in(5).
Inclusion of the <arpa/inet.h> header may also make visible all symbols from in(5).
The following are declared as functions, and may also be defined as macros:
in_addr_t | inet_addr(const char *cp); |
in_addr_t | inet_lnaof(struct in_addr in); |
struct in_addr | inet_makeaddr(in_addr_t net, in_addr_t lna); |
in_addr_t | inet_netof(struct in_addr in); |
in_addr_t | inet_network(const char *cp); |
char | *inet_ntoa(struct in_addr in); |
For applications that do not require standard-conforming behavior (those that use the socket interfaces described in section 3N of the reference manual; see Intro(3) and standards(5)), the following may be declared as functions, or defined as macros, or both:
uint32_t | htonl(uint32_t hostlong); |
uint16_t | htons(uint16_t hostshort); |
uint32_t | ntohl(uint32_t netlong); |
uint16_t | ntohs(uint16_t netshort); |
For applications that require standard-conforming behavior (those that use the socket interfaces described in section 3XN of the reference manual; see Intro(3) and standards(5)), the following may be declared as functions, or defined as macros, or both:
in_addr_t | htonl(in_addr_t hostlong); |
in_port_t | htons(in_port_t hostshort); |
in_addr_t | ntohl(in_addr_t netlong); |
in_port_t | ntohs(in_port_t netshort); |
NAME | SYNOPSIS | DESCRIPTION | SEE ALSO