Internet address conversion functions (<arpa/inet.h>)
More...
#include <stddef.h>
#include <stdint.h>
#include <zephyr/net/net_ip.h>
Go to the source code of this file.
|
| #define | INET_ADDRSTRLEN NET_INET_ADDRSTRLEN |
| |
| #define | INET6_ADDRSTRLEN NET_INET6_ADDRSTRLEN |
| |
| #define | htonl(x) net_htonl(x) |
| | Convert 32-bit value from host to network byte order.
|
| |
| #define | htons(x) net_htons(x) |
| | Convert 16-bit value from host to network byte order.
|
| |
| #define | ntohl(x) net_ntohl(x) |
| | Convert 32-bit value from network to host byte order.
|
| |
| #define | ntohs(x) net_ntohs(x) |
| | Convert 16-bit value from network to host byte order.
|
| |
|
| in_addr_t | inet_addr (const char *cp) |
| | Convert an IPv4 address from dotted-decimal text to binary.
|
| |
| char * | inet_ntoa (struct in_addr in) |
| | Convert an IPv4 address from binary to dotted-decimal text.
|
| |
| char * | inet_ntop (sa_family_t family, const void *src, char *dst, size_t size) |
| | Convert an IPv4 or IPv6 address from binary to text form.
|
| |
| int | inet_pton (sa_family_t family, const char *src, void *dst) |
| | Convert an IPv4 or IPv6 address from text form to binary.
|
| |
Internet address conversion functions (<arpa/inet.h>)
- See also
- POSIX.1-2017 <arpa/inet.h>
Definition in file inet.h.
◆ htonl
| #define htonl |
( |
|
x | ) |
net_htonl(x) |
Convert 32-bit value from host to network byte order.
Definition at line 58 of file inet.h.
◆ htons
| #define htons |
( |
|
x | ) |
net_htons(x) |
Convert 16-bit value from host to network byte order.
Definition at line 60 of file inet.h.
◆ INET6_ADDRSTRLEN
| #define INET6_ADDRSTRLEN NET_INET6_ADDRSTRLEN |
◆ INET_ADDRSTRLEN
| #define INET_ADDRSTRLEN NET_INET_ADDRSTRLEN |
◆ ntohl
| #define ntohl |
( |
|
x | ) |
net_ntohl(x) |
Convert 32-bit value from network to host byte order.
Definition at line 62 of file inet.h.
◆ ntohs
| #define ntohs |
( |
|
x | ) |
net_ntohs(x) |
Convert 16-bit value from network to host byte order.
Definition at line 64 of file inet.h.
◆ in_addr_t
| typedef uint32_t in_addr_t |
◆ in_port_t
| typedef uint16_t in_port_t |
◆ sa_family_t
| typedef net_sa_family_t sa_family_t |