some documentation updates
[senf.git] / Socket / Protocols / Raw / MACAddress.hh
index 0e26960..8511bb2 100644 (file)
@@ -40,15 +40,27 @@ namespace senf {
     /** \brief Ethernet MAC address
         
         The Ethernet MAC is modelled as a fixed-size container/sequence of 6 bytes.
+
+        \implementation We awkwardly need to use static named constructors (<tt>from_</tt> members)
+            instead of ordinarily overloaded constructors for one simple reason: <tt>char *</tt>
+            doubles as string literal and as arbitrary data iterator. The iterator constructor can
+            therefore not be distinguished from initialization with a string literal. Therefore we
+            need to disambiguate using the named constructors.
+
+        \ingroup addr_group
      */
     struct MACAddress
         : public boost::array<boost::uint8_t,6>, 
           public ComparableSafeBool<MACAddress>
     {
+        static MACAddress const Broadcast; ///< The broadcast address
+        static MACAddress const None;   ///< The empty (0) address
+
         enum NoInit_t { noinit };
         
         MACAddress();                   ///< Construct zero-initialized address
         MACAddress(NoInit_t);           ///< Construct uninitialized (!) address
+        explicit MACAddress(boost::uint64_t v); ///< Construct MACAddress constants
 
         static MACAddress from_string(std::string const & s);
                                         ///< Construct address from string representation
@@ -74,7 +86,7 @@ namespace senf {
                                                  EUI-64. */
 
         bool local() const;             ///< \c true, if address is locally administered
-        bool group() const;             ///< \c true, if address is a group/multicast address
+        bool multicast() const;             ///< \c true, if address is a group/multicast address
         bool broadcast() const;         ///< \c true, if address is the broadcast address
         bool boolean_test() const;      ///< \c true, if address is the zero address