Network related helper functions. More...
Functions | |
int | spdk_net_get_interface_name (const char *ip, char *ifc, size_t len) |
Gets the name of the network interface for the given IP address. | |
int | spdk_net_get_address_string (struct sockaddr *sa, char *addr, size_t len) |
Gets the address string for a given struct sockaddr. | |
bool | spdk_net_is_loopback (int fd) |
Checks if the given fd is a loopback interface or not. | |
int | spdk_net_getaddr (int fd, char *laddr, int llen, uint16_t *lport, char *paddr, int plen, uint16_t *pport) |
Network related helper functions.
int spdk_net_get_address_string | ( | struct sockaddr * | sa, |
char * | addr, | ||
size_t | len ) |
Gets the address string for a given struct sockaddr.
sa | sockaddr to get the address string for |
addr | string to put the address |
len | length of the the addr parameter |
int spdk_net_get_interface_name | ( | const char * | ip, |
char * | ifc, | ||
size_t | len ) |
Gets the name of the network interface for the given IP address.
ip | IP address to find the interface name for |
ifc | string output parameter for the interface name |
len | length of the ifc parameter in bytes |
bool spdk_net_is_loopback | ( | int | fd | ) |
Checks if the given fd is a loopback interface or not.
fd | file descriptor to check |