Jetson Inference
DNN Vision Library
IPv4.h File Reference
#include <string>

Go to the source code of this file.

Functions

bool IPv4Address (const char *str, uint32_t *ip_out)
 Convert an IPv4 address string in "xxx.xxx.xxx.xxx" format to binary representation. More...
 
std::string IPv4AddressStr (uint32_t ip_address)
 Return text string of IPv4 address in "xxx.xxx.xxx.xxx" format. More...
 

Function Documentation

◆ IPv4Address()

bool IPv4Address ( const char *  str,
uint32_t *  ip_out 
)

Convert an IPv4 address string in "xxx.xxx.xxx.xxx" format to binary representation.

Parameters
strthe IPv4 string, in "xxx.xxx.xxx.xxx" format
ip_outoutput pointer to converted IPv4 address, in network byte order.
Returns
true, if str was a valid IPv4 address and the conversion was successful. false, if the conversion failed.

◆ IPv4AddressStr()

std::string IPv4AddressStr ( uint32_t  ip_address)

Return text string of IPv4 address in "xxx.xxx.xxx.xxx" format.

Parameters
ip_addressIPv4 address, supplied in network byte order.