Open Lighting Architecture  Latest Git
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | Friends | List of all members
ola::network::Interface Class Reference
Collaboration diagram for ola::network::Interface:
Collaboration graph
[legend]

Public Types

enum  { DEFAULT_INDEX = -1 }
 

Public Member Functions

 Interface (const std::string &name, const IPV4Address &ip_address, const IPV4Address &broadcast_address, const IPV4Address &subnet_mask, const MACAddress &hw_address, bool loopback, int32_t index=DEFAULT_INDEX, uint16_t type=ARP_VOID_TYPE)
 
 Interface (const Interface &other)
 
Interfaceoperator= (const Interface &other)
 
bool operator== (const Interface &other) const
 
std::string ToString (const std::string &separator=", ") const
 Convert the Interface to a string. More...
 

Public Attributes

std::string name
 
IPV4Address ip_address
 
IPV4Address bcast_address
 
IPV4Address subnet_mask
 
MACAddress hw_address
 
bool loopback
 
int32_t index
 
uint16_t type
 

Static Public Attributes

static const uint16_t ARP_VOID_TYPE = 0xffff
 
static const uint16_t ARP_ETHERNET_TYPE = 1
 

Friends

std::ostream & operator<< (std::ostream &out, const Interface &iface)
 Write the string representation of this Interface to an ostream. More...
 

Member Function Documentation

◆ ToString()

string ola::network::Interface::ToString ( const std::string &  separator = ", ") const

Convert the Interface to a string.

Parameters
separatorthe separator to use between items, defaults to ", ".
Returns
the string representation of this Interface.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const Interface iface 
)
friend

Write the string representation of this Interface to an ostream.

Parameters
outthe ostream to write to.
ifacethe iface to write.

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