Functions | |
char * | inet_ntoa (uint32_t i_addr, char *s) |
Convert IP-address from 0xbbaaddcc to "aaa.bbb.ccc.ddd". More... | |
uint32_t | inet_aton (char *s) |
Converts zero terminated IP-address string from "aaa.bbb.ccc.ddd" to integer in network byte order. More... | |
static uint16_t | htons (uint16_t val) |
Convert a short int from host to network byte order. More... | |
static uint16_t | ntohs (uint16_t val) |
Convert a short int from network to host byte order. More... | |
static uint32_t | htonl (uint32_t val) |
Convert a long int from host to network byte order. More... | |
static uint32_t | ntohl (uint32_t val) |
Convert a long int from network to host byte order. More... | |
static uint32_t | nstohl (uint16_t val1, uint16_t val2) |
Convert two network short int to long host int. More... | |
static uint32_t | nstonl (uint16_t val1, uint16_t val2) |
Convert two network short int to long. More... | |
char * inet_ntoa | ( | uint32_t | i_addr, |
char * | s | ||
) |
i_addr | - IP address in network-byte-order |
s | - buffer space for conversion |
Convert IP address from network byte order to zero terminated ASCII string.
Usually all IP addresses in a network are stored and processed in network byte order. If the IP address of a specific connection should be printed out, use this conversion function.
uint32_t inet_aton | ( | char * | s | ) |
s | - ip address string |
Convert IP address string to network byte order.
Use this function to initialize a destination IP address before UDP send or to invalidate the ARP cache.
val | - short int to convert |
Convert a short int from host to network byte order
val | - long int to convert |
Convert a long int from host to network byte order
val | - long int to convert |
Convert a long int from network to host byte order
val1 | - high word |
val2 | - low word |
Convert two network short int to long host int