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

Stores information about local interface addresses. More...

Public Member Functions

 LocalIntfAddrTy ()
 Standard constructor keeps all empty/invalid. More...
 
 LocalIntfAddrTy (const char *_intfName, const sockaddr *sa, uint32_t _flags)
 Constructor looks up interface idx from its name. More...
 
 LocalIntfAddrTy (const char *_intfName, uint32_t _idx, const sockaddr *sa, uint32_t _flags)
 Constructor expects both interface name and index. More...
 
bool operator== (const LocalIntfAddrTy &o) const
 equality is by interface and address More...
 
bool operator< (const LocalIntfAddrTy &o) const
 sorting order is by intf idx, then address; this guarantees that while traversing we see all addresses of one interface together More...
 
bool operator== (const InetAddrTy &ia) const
 just compare the address More...
 

Public Attributes

uint32_t intfIdx = 0
 interface index More...
 
std::string intfName
 interface name More...
 
InetAddrTy addr
 address, internally this is in_addr or in6_addr More...
 
uint8_t family = 0
 either AF_INET or AF_INET6 More...
 
uint32_t flags = 0
 stuff like IFF_MULTICAST, IFF_LOOPBACK, IFF_BROADCAST... More...
 

Detailed Description

Stores information about local interface addresses.

Constructor & Destructor Documentation

◆ LocalIntfAddrTy() [1/3]

XPMP2::LocalIntfAddrTy::LocalIntfAddrTy ( )
inline

Standard constructor keeps all empty/invalid.

◆ LocalIntfAddrTy() [2/3]

XPMP2::LocalIntfAddrTy::LocalIntfAddrTy ( const char *  _intfName,
const sockaddr *  sa,
uint32_t  _flags 
)
inline

Constructor looks up interface idx from its name.

◆ LocalIntfAddrTy() [3/3]

XPMP2::LocalIntfAddrTy::LocalIntfAddrTy ( const char *  _intfName,
uint32_t  _idx,
const sockaddr *  sa,
uint32_t  _flags 
)
inline

Constructor expects both interface name and index.

Member Function Documentation

◆ operator<()

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

sorting order is by intf idx, then address; this guarantees that while traversing we see all addresses of one interface together

◆ operator==() [1/2]

bool XPMP2::LocalIntfAddrTy::operator== ( const InetAddrTy ia) const
inline

just compare the address

◆ operator==() [2/2]

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

equality is by interface and address

Member Data Documentation

◆ addr

InetAddrTy XPMP2::LocalIntfAddrTy::addr

address, internally this is in_addr or in6_addr

◆ family

uint8_t XPMP2::LocalIntfAddrTy::family = 0

either AF_INET or AF_INET6

◆ flags

uint32_t XPMP2::LocalIntfAddrTy::flags = 0

stuff like IFF_MULTICAST, IFF_LOOPBACK, IFF_BROADCAST...

◆ intfIdx

uint32_t XPMP2::LocalIntfAddrTy::intfIdx = 0

interface index

◆ intfName

std::string XPMP2::LocalIntfAddrTy::intfName

interface name


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