hwsd  1.2.1
Local and remote ZeroConf service discovery for hardware resources.
 All Classes Files Functions Variables Enumerations Enumerator Macros
hwsd::NetInfo Struct Reference

A structure containing network-specific information. More...

#include <netInfo.h>

+ Inheritance diagram for hwsd::NetInfo:
+ Collaboration diagram for hwsd::NetInfo:

Public Types

enum  Type {
  TYPE_ETHERNET = LB_BIT1, TYPE_INFINIBAND = LB_BIT2, TYPE_LOOPBACK = LB_BIT3, TYPE_TUNNEL_ETHERNET = LB_BIT4,
  TYPE_TUNNEL_6TO4 = LB_BIT5, TYPE_UNKNOWN = LB_BIT31, TYPE_ALL = LB_BIT_ALL_32
}
 

Public Member Functions

HWSD_API NetInfo ()
 Default constructor pointing to the default display. More...
 
HWSD_API bool operator== (const NetInfo &rhs) const
 
HWSD_API bool operator!= (const NetInfo &rhs) const
 
HWSD_API std::string getType () const
 
HWSD_API void setType (const std::string &strType)
 
- Public Member Functions inherited from hwsd::NodeInfo
HWSD_API NodeInfo ()
 Default constructor describing a local session. More...
 
HWSD_API bool operator== (const NodeInfo &rhs) const
 
HWSD_API bool operator!= (const NodeInfo &rhs) const
 
HWSD_API bool isLocal () const
 

Public Attributes

Type type
 The type of the network interface. More...
 
std::string name
 The name of the interface (e.g. More...
 
std::string hostname
 The hostname assigned to this interface. More...
 
std::string hwAddress
 The MAC address (':' as separator) of the interface. More...
 
std::string inetAddress
 The IPv4 address (':' as separator) of the interface. More...
 
std::string inet6Address
 The IPv6 address (':' as separator) of the interface. More...
 
unsigned int linkspeed
 The interface link speed in Megabits per second. More...
 
bool up
 Whether the interface is up or down. More...
 
- Public Attributes inherited from hwsd::NodeInfo
servus::uint128_t id
 Random unique ID identifing the origin node. More...
 
std::string nodeName
 System hostname if remote, empty for local. More...
 
std::string session
 The session name: local, default or custom string. More...
 

Static Public Attributes

static const unsigned defaultValue = UINT_MAX
 A non-enumerated value. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from hwsd::NodeInfo
static HWSD_API bool isLocal (const std::string &name)
 
static std::string getLocalSession ()
 

Detailed Description

A structure containing network-specific information.

Definition at line 32 of file netInfo.h.

Member Enumeration Documentation

Enumerator
TYPE_TUNNEL_ETHERNET 

gif interface on Darwin

TYPE_TUNNEL_6TO4 

stf interface on Darwin

Definition at line 34 of file netInfo.h.

Constructor & Destructor Documentation

HWSD_API hwsd::NetInfo::NetInfo ( )

Default constructor pointing to the default display.

Version
1.0

Member Function Documentation

HWSD_API bool hwsd::NetInfo::operator!= ( const NetInfo rhs) const
Returns
true if both infos are not identical.
Version
1.0
HWSD_API bool hwsd::NetInfo::operator== ( const NetInfo rhs) const
Returns
true if both informations are identical.
Version
1.0

Member Data Documentation

const unsigned hwsd::NetInfo::defaultValue = UINT_MAX
static

A non-enumerated value.

Version
1.0

Definition at line 46 of file netInfo.h.

std::string hwsd::NetInfo::hostname

The hostname assigned to this interface.

Version
1.0

Definition at line 68 of file netInfo.h.

std::string hwsd::NetInfo::hwAddress

The MAC address (':' as separator) of the interface.

Version
1.0

Definition at line 71 of file netInfo.h.

std::string hwsd::NetInfo::inet6Address

The IPv6 address (':' as separator) of the interface.

Version
1.0

Definition at line 77 of file netInfo.h.

std::string hwsd::NetInfo::inetAddress

The IPv4 address (':' as separator) of the interface.

Version
1.0

Definition at line 74 of file netInfo.h.

unsigned int hwsd::NetInfo::linkspeed

The interface link speed in Megabits per second.

Version
1.0

Definition at line 80 of file netInfo.h.

std::string hwsd::NetInfo::name

The name of the interface (e.g.

eth0, ib0).

Version
1.0

Definition at line 65 of file netInfo.h.

Type hwsd::NetInfo::type

The type of the network interface.

Version
1.0

Definition at line 62 of file netInfo.h.

bool hwsd::NetInfo::up

Whether the interface is up or down.

Version
1.0

Definition at line 83 of file netInfo.h.


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