PcapPlusPlus  22.05
IpUtils.h File Reference
#include <stdint.h>

Go to the source code of this file.

Namespaces

 pcpp
 The main namespace for the PcapPlusPlus lib.
 

Functions

in_addr * pcpp::internal::sockaddr2in_addr (struct sockaddr *sa)
 
in6_addr * pcpp::internal::sockaddr2in6_addr (struct sockaddr *sa)
 
void pcpp::internal::sockaddr2string (struct sockaddr *sa, char *resultString)
 
uint32_t pcpp::internal::in_addr2int (in_addr inAddr)
 

Function Documentation

◆ in_addr2int()

uint32_t pcpp::internal::in_addr2int ( in_addr  inAddr)

Convert a in_addr format address to 32bit representation

Parameters
[in]inAddrAddress in in_addr format
Returns
Address in 32bit format

◆ sockaddr2in6_addr()

in6_addr* pcpp::internal::sockaddr2in6_addr ( struct sockaddr *  sa)

Extract IPv6 address from sockaddr

Parameters
[in]sa- input sockaddr
Returns
Address in in6_addr format

◆ sockaddr2in_addr()

in_addr* pcpp::internal::sockaddr2in_addr ( struct sockaddr *  sa)

Extract IPv4 address from sockaddr

Parameters
[in]sa- input sockaddr
Returns
Address in in_addr format

◆ sockaddr2string()

void pcpp::internal::sockaddr2string ( struct sockaddr *  sa,
char *  resultString 
)

Converts a sockaddr format address to its string representation

Parameters
[in]saAddress in sockaddr format
[out]resultStringString representation of the address