class EtherMac


 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Methods

Public Static Methods


Detailed Description

 EtherMac ()

EtherMac

Default constructor

 EtherMac (const string& s)
throw (InvalidString)

EtherMac

Construct EtherMac from a string representation.

Parameters:

sstring representation of the form XX:XX:XX:XX:XX:XX where X represents a hex-digit.

Throws: InvalidString, if, string, passed, does, not, match, expected, format.

 EtherMac (const Mac& m)
throw (BadMac)

EtherMac

Construct EtherMac from Mac.

Parameters:

mMac to construct EtherMac from.

Throws: BadMac, if, the, Mac's, string, representation, is, not, equivalent, to, the, EtherMac's, string, representation.

 EtherMac (const ether_addr& ea)
throw (BadMac)

EtherMac

Construct EtherMac from ether_addr.

bool  get_ether_addr (struct ether_addr& ea)

get_ether_addr

[const]

Convert to ether_addr representation.

Parameters:

eaether_addr to store representation.

Returns: true on success, false if underlying string is empty.

bool  valid (const string& s)

valid

[static]

Check whether string contains valid EtherMac representation.

Parameters:

spotential EtherMac string representation.

Returns: true if s is valid, false otherwise.

string  normalize (const string& s)
throw (InvalidString)

normalize

[static]

Normalize the string representation of an EtherMac address.

Convert the string with an EtherMAC address into an "struct ether_addr", and then back to a string. Thus, the string address representation is normalized to the system's internal preference. Example: "00:00:00:00:00:00" -> "0:0:0:0:0:0"

Parameters:

sthe string with the EtherMac address to normalize.

Returns: a string with the normalized EtherMac address.


Generated by: pavlin on possum.icir.org on Wed Mar 21 11:22:16 2007, using kdoc $.