RFC 3849 - IPv6 Address Prefix Reserved for Documentation
This commit is contained in:
@@ -522,6 +522,19 @@ bool Ipv6Address::IsAny () const
|
||||
return (*this == any);
|
||||
}
|
||||
|
||||
|
||||
bool Ipv6Address::IsDocumentation () const
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
Ipv6Address documentation ("2001:db8::0");
|
||||
if (((Ipv6Address*)this)->CombinePrefix (Ipv6Prefix (32)) == documentation)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool Ipv6Address::IsMatchingType (const Address& address)
|
||||
{
|
||||
NS_LOG_FUNCTION (address);
|
||||
|
||||
@@ -212,6 +212,12 @@ public:
|
||||
*/
|
||||
bool IsAny () const;
|
||||
|
||||
/**
|
||||
* \brief If the IPv6 address is a documentation address (2001:DB8::/32).
|
||||
* \return true if the address is documentation, false otherwise
|
||||
*/
|
||||
bool IsDocumentation () const;
|
||||
|
||||
/**
|
||||
* \brief Combine this address with a prefix.
|
||||
* \param prefix a IPv6 prefix
|
||||
|
||||
Reference in New Issue
Block a user