21 #ifndef IPV6_ADDRESS_H 
   22 #define IPV6_ADDRESS_H 
   29 #include "ns3/attribute-helper.h" 
   30 #include "ns3/address.h" 
   31 #include "ns3/ipv4-address.h" 
   89   void Set (
char const* address);
 
   97   void Set (uint8_t address[16]);
 
  192   void Print (std::ostream& os) 
const;
 
  334   void GetBytes (uint8_t buf[16]) 
const;
 
  445   void GetBytes (uint8_t buf[16]) 
const;
 
  466   void Print (std::ostream &os) 
const;
 
bool IsMatch(Ipv6Address a, Ipv6Address b) const 
If the Address match the type. 
 
static bool IsMatchingType(const Address &address)
If the Address matches the type. 
 
bool IsAny() const 
If the IPv6 address is the "Any" address. 
 
static Ipv6Address GetLoopback()
Get the loopback address. 
 
std::istream & operator>>(std::istream &is, Angles &a)
initialize a struct Angles from input 
 
Ipv6Address()
Default constructor. 
 
uint8_t m_address[16]
The address representation on 128 bits (16 bytes). 
 
bool IsLinkLocalMulticast() const 
If the IPv6 address is link-local multicast (ff02::/16). 
 
friend bool operator!=(Ipv6Address const &a, Ipv6Address const &b)
Not equal to operator. 
 
Ipv6Prefix()
Default constructor. 
 
friend bool operator<(Ipv6Address const &a, Ipv6Address const &b)
Less than to operator. 
 
friend bool operator==(Ipv6Prefix const &a, Ipv6Prefix const &b)
Equal to operator. 
 
static Ipv6Address Deserialize(const uint8_t buf[16])
Deserialize this address. 
 
bool IsLinkLocal() const 
If the IPv6 address is a link-local address (fe80::/64). 
 
bool IsAllRoutersMulticast() const 
If the IPv6 address is "all routers multicast" (ff02::2/8). 
 
bool IsEqual(const Ipv6Prefix &other) const 
Comparison operation between two Ipv6Prefix. 
 
static Ipv6Address GetAny()
Get the "any" (::) Ipv6Address. 
 
static Ipv6Address MakeAutoconfiguredAddress(Mac16Address addr, Ipv6Address prefix)
Make the autoconfigured IPv6 address with Mac16Address. 
 
size_t operator()(Ipv6Address const &x) const 
Unary operator to hash IPv6 address. 
 
bool IsEqual(const Ipv6Address &other) const 
Comparison operation between two Ipv6Addresses. 
 
bool IsDocumentation() const 
If the IPv6 address is a documentation address (2001:DB8::/32). 
 
bool IsAllHostsMulticast() const 
If the IPv6 address is "all hosts multicast" (ff02::3/8). 
 
friend bool operator!=(Ipv6Prefix const &a, Ipv6Prefix const &b)
Not equal to operator. 
 
bool IsAllNodesMulticast() const 
If the IPv6 address is "all nodes multicast" (ff02::1/8). 
 
static Ipv6Prefix GetZero()
Get the zero prefix ( /0). 
 
a polymophic address class 
 
Address ConvertTo(void) const 
convert the IPv6Address object to an Address object. 
 
static Ipv6Address GetZero()
Get the 0 (::) Ipv6Address. 
 
void Print(std::ostream &os) const 
Print this address to the given output stream. 
 
void GetBytes(uint8_t buf[16]) const 
Get the bytes corresponding to the address. 
 
bool operator<(const int64x64_t &lhs, const int64x64_t &rhs)
Less than operator. 
 
void Set(char const *address)
Sets an Ipv6Address by parsing the input C-string. 
 
static Ipv6Address GetAllHostsMulticast()
Get the "all hosts multicast" address. 
 
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output 
 
bool operator!=(Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 > a, Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 > b)
Inequality test. 
 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
 
bool IsMulticast() const 
If the IPv6 address is multicast (ff00::/8). 
 
static Ipv6Address GetAllNodesMulticast()
Get the "all nodes multicast" address. 
 
uint8_t m_prefix[16]
The prefix representation. 
 
This class can contain 16 bit addresses. 
 
Hash function class for IPv6 addresses. 
 
static Ipv6Address MakeAutoconfiguredLinkLocalAddress(Mac16Address mac)
Make the autoconfigured link-local IPv6 address with Mac16Address. 
 
Describes an IPv6 address. 
 
Ipv4 addresses are stored in host order in this class. 
 
void Print(std::ostream &os) const 
Print this address to the given output stream. 
 
bool IsSolicitedMulticast() const 
If the IPv6 address is a Solicited multicast address. 
 
static Ipv6Prefix GetOnes()
Get the "all-1" IPv6 mask (ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff). 
 
void GetBytes(uint8_t buf[16]) const 
Get the bytes corresponding to the prefix. 
 
bool operator==(const EventId &a, const EventId &b)
 
~Ipv6Address()
Destructor. 
 
static Ipv6Address GetOnes()
Get the "all-1" IPv6 address (ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff). 
 
static Ipv6Prefix GetLoopback()
Get the loopback prefix ( /128). 
 
Describes an IPv6 prefix. 
 
Ipv4Address GetIpv4MappedAddress() const 
Return the Ipv4 address. 
 
uint8_t GetPrefixLength() const 
Get prefix length. 
 
bool IsLocalhost() const 
If the IPv6 address is localhost (::1). 
 
friend bool operator==(Ipv6Address const &a, Ipv6Address const &b)
Equal to operator. 
 
static Ipv6Address MakeIpv4MappedAddress(Ipv4Address addr)
Make the Ipv4-mapped IPv6 address. 
 
Ipv6Address CombinePrefix(Ipv6Prefix const &prefix)
Combine this address with a prefix. 
 
bool IsIpv4MappedAddress() const 
If the address is an IPv4-mapped address. 
 
#define ATTRIBUTE_HELPER_HEADER(type)
Declare the attribute value, accessor and checkers for class type. 
 
static uint8_t GetType(void)
Return the Type of address. 
 
static Ipv6Address MakeSolicitedAddress(Ipv6Address addr)
Make the solicited IPv6 address. 
 
static Ipv6Address GetAllRoutersMulticast()
Get the "all routers multicast" address. 
 
static Ipv6Address ConvertFrom(const Address &address)
Convert the Address object into an Ipv6Address ones. 
 
void Serialize(uint8_t buf[16]) const 
Serialize this address to a 16-byte buffer.