XPMP2
X-Plane multiplayer library 2 - using instancing
Public Member Functions | Public Attributes | List of all members
XPMP2::InetAddrTy Struct Reference

Numerical IP address, used for both ipv4 and ipv6, for ease of handling. More...

#include <Network.h>

Public Member Functions

 InetAddrTy ()
 Default does nothing. More...
 
 InetAddrTy (const SockAddrTy &sa)
 Take over from structure. More...
 
 InetAddrTy (const sockaddr *pSa)
 Take over from structure. More...
 
void CopyFrom (const SockAddrTy &sa)
 Take over address from structure. More...
 
bool operator== (const InetAddrTy &o) const
 Equality means: all elements are equal. More...
 
bool operator< (const InetAddrTy &o) const
 Comparison also uses memcmp for defined order. More...
 

Public Attributes

union {
std::uint32_t addr [4] = {0,0,0,0}
 
struct in_addr in_addr
 
struct in6_addr in6_addr
 
}; 
 

Detailed Description

Numerical IP address, used for both ipv4 and ipv6, for ease of handling.

Constructor & Destructor Documentation

◆ InetAddrTy() [1/3]

XPMP2::InetAddrTy::InetAddrTy ( )
inline

Default does nothing.

◆ InetAddrTy() [2/3]

XPMP2::InetAddrTy::InetAddrTy ( const SockAddrTy sa)
inline

Take over from structure.

◆ InetAddrTy() [3/3]

XPMP2::InetAddrTy::InetAddrTy ( const sockaddr *  pSa)
inline

Take over from structure.

Member Function Documentation

◆ CopyFrom()

void XPMP2::InetAddrTy::CopyFrom ( const SockAddrTy sa)

Take over address from structure.

Extracts the numerical address and puts it into addr for generic address use.

◆ operator<()

bool XPMP2::InetAddrTy::operator< ( const InetAddrTy o) const
inline

Comparison also uses memcmp for defined order.

◆ operator==()

bool XPMP2::InetAddrTy::operator== ( const InetAddrTy o) const
inline

Equality means: all elements are equal.

Member Data Documentation

◆ 

union { ... }

The documentation for this struct was generated from the following files: