|
|
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 |
Mac (const string& s)
throw (InvalidString) | Mac |
Construct MAC address from string. Mac address format must conform to one of known types.
Parameters:
s | string 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]