Jetson Inference
DNN Vision Library

TCP/UDP sockets and IP address manipulation. More...

Classes

struct  networkAdapter_t
 Info about a particular network interface. More...
 
class  Socket
 The Socket class provides TCP or UDP ethernet networking. More...
 

Enumerations

enum  SocketType { SOCKET_UDP = 0, SOCKET_TCP = 1 }
 TCP/UDP enumeration. More...
 

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...
 
std::string networkHostname ()
 Retrieve the host system's network hostname. More...
 
void networkAdapters (std::vector< networkAdapter_t > &interfaceList)
 Retrieve info about the different network interfaces of the system. More...
 

Detailed Description

TCP/UDP sockets and IP address manipulation.

Enumeration Type Documentation

◆ SocketType

enum SocketType

TCP/UDP enumeration.

Enumerator
SOCKET_UDP 

flag indicating UDP datagram service (SOCK_DGRAM)

SOCKET_TCP 

flag indicating TCP virtual circuit service (SOCK_STREAM)

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.

◆ networkAdapters()

void networkAdapters ( std::vector< networkAdapter_t > &  interfaceList)

Retrieve info about the different network interfaces of the system.

◆ networkHostname()

std::string networkHostname ( )

Retrieve the host system's network hostname.