gPTP Documentation
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PeerAddr Class Reference

#include <ipcdef.hpp>

Collaboration diagram for PeerAddr:
Collaboration graph

Public Member Functions

bool operator== (const PeerAddr &other) const
 Implements the operator '==' overloading method. More...
 
bool operator< (const PeerAddr &other) const
 Implements the operator '<' overloading method. More...
 

Public Attributes

AddrWhich which
 
union {
   uint8_t   mac [ETHER_ADDR_OCTETS]
 
   uint8_t   ip [IP_ADDR_OCTETS]
 
}; 
 

Detailed Description

Provides an interface for Peer addresses

Member Function Documentation

bool PeerAddr::operator< ( const PeerAddr other) const
inline

Implements the operator '<' overloading method.

Parameters
otherReference to the peer addresses to be compared.
Returns
TRUE if mac or ip address from the object is lower than the peer's.
bool PeerAddr::operator== ( const PeerAddr other) const
inline

Implements the operator '==' overloading method.

Parameters
other[in] Reference to the peer addresses
Returns
TRUE if mac or ip are the same. FALSE otherwise.

Member Data Documentation

union { ... }

shared memory between mac and ip addresses

uint8_t PeerAddr::ip[IP_ADDR_OCTETS]

IP Address

uint8_t PeerAddr::mac[ETHER_ADDR_OCTETS]

Link Layer address

AddrWhich PeerAddr::which

Peer address


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