class Mac

Generic container for any type of MAC. More...

 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Methods

Protected Methods

Protected Members


Detailed Description

A class intended to carry any type of MAC. The assumption is that all current and future MAC classes will have a printable string representation and can be treated as opaque identifiers.

 Mac ()

Mac

Default constructor

 Mac (const string& s)
throw (InvalidString)

Mac

Construct MAC address from string. Mac address format must conform to one of known types.

Parameters:

sstring representation of mac.

Throws: InvalidString, if, s, is, not, recognized, Mac, type.

inline const string&  str ()

str

[const]

Returns: string representation of MAC address.

string  normalized_str ()

normalized_str

[const]

Get the normalized string of MAC address.

For example, in case of Ethernet MAC address, the original string with an EtherMAC address is converted 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"

Returns: normalized string representation of MAC address.

inline bool  empty ()

empty

[const]

Returns: true if MAC address value is unset.

inline void  set_rep (const string& s)

set_rep

[protected]

string _srep

_srep

[protected]


Generated by: pavlin on possum.icir.org on Wed Aug 2 15:35:43 2006, using kdoc $.