X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FProtocols%2FRaw%2FMACAddress.hh;h=64049dd6b6a230ba17a062b158625f88c95fe39c;hb=3863d46dd898b7bc35ea8c6ccd8563b18762a6b6;hp=c62c1df14b6e98d89bcad506001cee21f02bd78d;hpb=410c2ef7f40307909299f574b6cbb9f11bd9773e;p=senf.git
diff --git a/Socket/Protocols/Raw/MACAddress.hh b/Socket/Protocols/Raw/MACAddress.hh
index c62c1df..64049dd 100644
--- a/Socket/Protocols/Raw/MACAddress.hh
+++ b/Socket/Protocols/Raw/MACAddress.hh
@@ -42,7 +42,7 @@
namespace senf {
/** \brief Ethernet MAC address
-
+
The Ethernet MAC is modelled as a fixed-size container/sequence of 6 bytes.
The following statements all create the same MAC address 00:1A:2B:3C:4D:5F
@@ -85,7 +85,7 @@ namespace senf {
\ingroup addr_group
*/
struct MACAddress
- : public boost::array,
+ : public boost::array,
public comparable_safe_bool
{
static MACAddress const Broadcast; ///< The broadcast address
@@ -103,7 +103,7 @@ namespace senf {
accepted as a delimiter.
\throws AddressSyntaxException */
- template
+ template
static MACAddress from_data(InputIterator i);
///< Construct address from raw data
/**< Copies the data from \a i into the MAC address.
@@ -126,18 +126,21 @@ namespace senf {
boost::uint32_t oui() const; ///< Return first 3 bytes of the address
boost::uint32_t nic() const; ///< Return last 3 bytes of the address
-
- boost::uint64_t eui64() const; ///< Build EUI-64 from the MAC address
- boost::uint64_t uint64() const; ///< Return MAC address as uint64 value
-
- std::string toString() const; ///< Return string representation of MAC address like 12:34:56:78:90:ab
+ boost::uint64_t eui64() const; ///< Build EUI-64 from the MAC address
+ boost::uint64_t uint64() const; ///< Return MAC address as uint64 value
};
- /** \brief Write MAC address
+ /** \brief Output MAC instance as it's string representation
\related MACAddress
*/
std::ostream & operator<<(std::ostream & os, MACAddress const & mac);
+ /** \brief Try to initialize MACAddress instance from a string representation
+ sets std::ios::failbit on the stream if an error occurred
+ \see MACAddress from_string()
+ \related MACAddress
+ */
+ std::istream & operator>>(std::istream & os, MACAddress & mac);
}
@@ -147,7 +150,7 @@ namespace senf {
//#include "MACAddress.cti"
#endif
-
+
// Local Variables:
// mode: c++
// fill-column: 100