Update valgrind suppressions
[senf.git] / Socket / Protocols / INet / INet6Address.hh
index 98fb726..3eb7094 100644 (file)
@@ -37,6 +37,7 @@
 #include "../../../Utils/Tags.hh"
 #include "INet4Address.hh"
 #include "../AddressExceptions.hh"
+#include "../Raw/MACAddress.hh"
 
 //#include "INet6Address.mpp"
 #include "INet6Address.ih"
@@ -193,7 +194,7 @@ namespace senf {
                                              data as accessed by the iterator. The data must be in
                                              network byte order. */
 
-        static INet6Address from_inet4address(INet4Address addr);
+        static INet6Address from_inet4address(INet4Address const & addr);
                                         ///< Construct an INet6-mapped INet4 address
                                         /**< This will construct an address of the form
                                              <tt>::FFFF::w.x.y.z</tt> where <tt>w.x.y.z</tt> is
@@ -203,11 +204,12 @@ namespace senf {
                                              \par
                                              INet4 compatible INet6 addresses are not directly
                                              supported, they are deprecated in the RFC. */
-        std::string toString() const;
-                                        ///< get the string representation of this INet6Address
-        in6_addr  toin6_addr() const;
-                                        ///< get the linux in6_addr struct (convinience only)
-
+        static INet6Address from_mac(senf::MACAddress const & mac);
+                                        ///< Construct a link-local INet6 address
+                                        /**< This will construct a link local address of the form
+                                             <tt>fe80::xxxx:xxff:fexx:xxxx</tt>. */
+        
+        in6_addr toin6_addr() const;    ///< get the linux in6_addr struct (convinience only)
 
         ///@}
         ///////////////////////////////////////////////////////////////////////////
@@ -283,6 +285,12 @@ namespace senf {
         \related INet6Address
      */
     std::ostream & operator<<(std::ostream & os, INet6Address const & addr);
+    /** \brief Try to initialize INet6Address instance from a string representation
+        sets std::ios::failbit on the stream if an error occurred
+        \see INet6Address from_string()
+        \related INet6Address
+     */
+    std::istream & operator>>(std::istream & is, INet6Address & addr);
 
     /** \brief Check INet6Address against a fixed network prefix
 
@@ -333,9 +341,9 @@ namespace senf {
         ///@{
 
         INet6Network();                 ///< Construct empty (::/0) network
-        INet6Network(INet6Address address, unsigned prefix_len);
+        INet6Network(INet6Address const & address, unsigned prefix_len);
                                         ///< Construct network from given address and prefix length
-        explicit INet6Network(std::string s); ///< Construct network from CIDR notation
+        explicit INet6Network(std::string const & s); ///< Construct network from CIDR notation
 
         ///@}
         ///////////////////////////////////////////////////////////////////////////
@@ -347,8 +355,8 @@ namespace senf {
         bool operator==(INet6Network const & other) const;
                                         ///< Compare two networks for equality
 
-        bool match(INet6Address addr) const; ///< \c true, if the network includes \a addr
-        bool match(INet6Network net) const; ///< \c true, if the network includes \a net
+        bool match(INet6Address const & addr) const; ///< \c true, if the network includes \a addr
+        bool match(INet6Network const & net) const; ///< \c true, if the network includes \a net
                                         /**< The is true, if \a net is sub-network (or the same as)
                                              \c this. */
         INet6Address host(boost::uint64_t id); ///< Return the host with the given id
@@ -387,7 +395,7 @@ namespace senf {
 #include "INet6Address.cti"
 #endif
 
-\f
+
 // Local Variables:
 // mode: c++
 // fill-column: 100