X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FProtocols%2FINet%2FINet6Address.hh;h=436d5fe187b2e3c7373c09c54620b55bbcf47d90;hb=6f50bf49e282c0528f51faa0a245bbfa2b867399;hp=1639ba3a2e8643741a79ee9f4199525e6c2b1d9e;hpb=8d2d26f114d3df0a60c5c516fcf40671b1e55558;p=senf.git diff --git a/Socket/Protocols/INet/INet6Address.hh b/Socket/Protocols/INet/INet6Address.hh index 1639ba3..436d5fe 100644 --- a/Socket/Protocols/INet/INet6Address.hh +++ b/Socket/Protocols/INet/INet6Address.hh @@ -1,8 +1,8 @@ // $Id$ // // Copyright (C) 2007 -// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) -// Kompetenzzentrum fuer Satelitenkommunikation (SatCom) +// Fraunhofer Institute for Open Communication Systems (FOKUS) +// Competence Center NETwork research (NET), St. Augustin, GERMANY // Stefan Bund // // This program is free software; you can redistribute it and/or modify @@ -32,7 +32,8 @@ #include #include #include -#include "../../../Utils/SafeBool.hh" +#include "../../../Utils/safe_bool.hh" +#include "../../../Utils/Tags.hh" #include "INet4Address.hh" //#include "INet6Address.mpp" @@ -41,14 +42,14 @@ namespace senf { - /** \brief IpV6 network address + /** \brief IPv6 network address - This implementation of an IpV6 address is based strictly on + This implementation of an IPv6 address is based strictly on RFC 4291: Internet Protocol Version 6 (IPv6) Addressing Architecture. This class provides accessors to all the information fields defined in this document. - The IpV6 addressing architecture however has several other components defined in other + The IPv6 addressing architecture however has several other components defined in other RFC's. These RFC's should be implemented in additional modules: \li RFC 4193: @@ -68,8 +69,8 @@ namespace senf { - - + + @@ -97,7 +98,7 @@ namespace senf { */ class INet6Address : public boost::array, - public ComparableSafeBool + public comparable_safe_bool { public: /////////////////////////////////////////////////////////////////////////// @@ -108,7 +109,6 @@ namespace senf { static INet6Address const AllNodes; ///< The 'all nodes' link-local multicast address static INet6Address const AllRouters; ///< The 'all routers' link-local multicast address - enum NoInit_t { noinit }; enum Resolve_t { ResolveINet6, ResolveINet4 }; /** \brief Possible scope values @@ -134,7 +134,7 @@ namespace senf { ///\name Structors and default members ///@{ - explicit INet6Address(NoInit_t); ///< Construct uninitialized (!) address + explicit INet6Address(senf::NoInit_t); ///< Construct uninitialized (!) address INet6Address(boost::uint16_t a0=0u, boost::uint16_t a1=0u, boost::uint16_t a2=0u, boost::uint16_t a3=0u, boost::uint16_t a4=0u, boost::uint16_t a5=0u, boost::uint16_t a6=0u, boost::uint16_t a7=0u); @@ -153,8 +153,8 @@ namespace senf { \param[in] s Address literal or hostname \param[in] resolve If this is set to \c ResolveINet4, the call will additionally try to interpret \a s as - an IpV4 address if no valid IpV6 address is - found. The address will be returned as mapped IpV6 + an IPv4 address if no valid IPv6 address is + found. The address will be returned as mapped IPv6 address. */ template @@ -165,14 +165,14 @@ namespace senf { network byte order. */ static INet6Address from_inet4address(INet4Address addr); - ///< Construct an IpV6-mapped IpV4 address + ///< Construct an IPv6-mapped IPv4 address /**< This will construct an address of the form ::FFFF::w.x.y.z where w.x.y.z is the INet4Address value. This kind of address is called - an IpV6-mapped IpV4 address (see + an IPv6-mapped IPv4 address (see RFC 4291). \par - IpV4 compatible IpV6 addresses are not directly + IPv4 compatible IPv6 addresses are not directly supported, they are deprecated in the RFC. */ ///@} /////////////////////////////////////////////////////////////////////////// @@ -199,16 +199,16 @@ namespace senf { bool globalScope() const; ///< \c true, if address is global unicast or multicast bool linkScope() const; ///< \c true, if address is link-local unicast or multicast - INet4Address inet4address() const; ///< Return embedded IpV4 address - /**< Returns the IpV4 address embedded within an IpV4 - compatible or IpV4 mapped unicast address. This address - is given by the last 32 bits of the IpV6 address. \par - The value returned is only a valid IpV4 address if + INet4Address inet4address() const; ///< Return embedded IPv4 address + /**< Returns the IPv4 address embedded within an IPv4 + compatible or IPv4 mapped unicast address. This address + is given by the last 32 bits of the IPv6 address. \par + The value returned is only a valid IPv4 address if either ipv4Compatible() or ipv4Mapped() return \c true. */ - bool ipv4Compatible() const; ///< \c true, if address is IpV4 compatible - /**< IpV4 compatible IpV6 addresses are deprecated. */ - bool ipv4Mapped() const; ///< \c true, if address is IpV4 mapped + bool ipv4Compatible() const; ///< \c true, if address is IPv4 compatible + /**< IPv4 compatible IPv6 addresses are deprecated. */ + bool ipv4Mapped() const; ///< \c true, if address is IPv4 mapped bool globalMulticastAddr() const; ///< \c true, if T bit is \e not set /**< Any multicast address with a cleared T bit must be @@ -288,13 +288,13 @@ namespace senf { : public detail::CheckINet6Network_impl {}; - /** \brief IpV6 network prefix + /** \brief IPv6 network prefix - This class represents an IpV6 network prefix in CIDR notation. + This class represents an IPv6 network prefix in CIDR notation. */ class INet6Network : public boost::equality_comparable, - public ComparableSafeBool + public comparable_safe_bool { public: ///////////////////////////////////////////////////////////////////////////
Prefix Description Definition Note
::/96 IpV4 compatible IpV6 address RFC4291 deprecated
::ffff:0:0/96 IpV6 mapped IpV4 address RFC4291
::/96 IPv4 compatible IPv6 address RFC4291 deprecated
::ffff:0:0/96 IPv6 mapped IPv4 address RFC4291
2000::/3 Global unicast addresses RFC3587 only noted, not defined
2001:db8::/32 Documentation-only prefix RFC3849
2002::/16 6to4 addressing RFC3056