Describes an IPv6 address. More...
#include <ipv6-address.h>
Public Member Functions | |
| Ipv6Address () | |
| Default constructor. | |
| Ipv6Address (char const *address) | |
| Constructs an Ipv6Address by parsing the input C-string. | |
| Ipv6Address (uint8_t address[16]) | |
| Constructs an Ipv6Address by using the input 16 bytes. | |
| Ipv6Address (Ipv6Address const &addr) | |
| Copy constructor. | |
| Ipv6Address (Ipv6Address const *addr) | |
| Copy constructor. | |
| ~Ipv6Address () | |
| Destructor. | |
| void | Set (char const *address) |
| Sets an Ipv6Address by parsing the input C-string. | |
| void | Set (uint8_t address[16]) |
| Set an Ipv6Address by using the input 16 bytes. | |
| bool | IsEqual (const Ipv6Address &other) const |
| Comparison operation between two Ipv6Addresses. | |
| void | Serialize (uint8_t buf[16]) const |
| Serialize this address to a 16-byte buffer. | |
| void | Print (std::ostream &os) const |
| Print this address to the given output stream. | |
| bool | IsLocalhost () const |
| If the IPv6 address is localhost (::1). | |
| bool | IsMulticast () const |
| If the IPv6 address is multicast (ff00::/8). | |
| bool | IsAllNodesMulticast () const |
| If the IPv6 address is "all nodes multicast" (ff02::1/8). | |
| bool | IsAllRoutersMulticast () const |
| If the IPv6 address is "all routers multicast" (ff02::2/8). | |
| bool | IsAllHostsMulticast () const |
| If the IPv6 address is "all hosts multicast" (ff02::3/8). | |
| bool | IsLinkLocal () const |
| If the IPv6 address is a link-local address (fe80::/64). | |
| bool | IsSolicitedMulticast () const |
| If the IPv6 address is a Solicited multicast address. | |
| bool | IsAny () const |
| If the IPv6 address is the "Any" address. | |
| Ipv6Address | CombinePrefix (Ipv6Prefix const &prefix) |
| Combine this address with a prefix. | |
| operator Address () const | |
| Convert to Address object. | |
| void | GetBytes (uint8_t buf[16]) const |
| Get the bytes corresponding to the address. | |
Static Public Member Functions | |
| static Ipv6Address | Deserialize (const uint8_t buf[16]) |
| Deserialize this address. | |
| static Ipv6Address | MakeSolicitedAddress (Ipv6Address addr) |
| Make the solicited IPv6 address. | |
| static Ipv6Address | MakeAutoconfiguredAddress (Mac48Address addr, Ipv6Address prefix) |
| Make the autoconfigured IPv6 address with Mac48Address. | |
| static Ipv6Address | MakeAutoconfiguredLinkLocalAddress (Mac48Address mac) |
| Make the autoconfigured link-local IPv6 address with Mac48Address. | |
| static bool | IsMatchingType (const Address &address) |
| If the Address matches the type. | |
| static Ipv6Address | ConvertFrom (const Address &address) |
| Convert the Address object into an Ipv6Address ones. | |
| static Ipv6Address | GetZero () |
| Get the 0 (::) Ipv6Address. | |
| static Ipv6Address | GetAny () |
| Get the "any" (::) Ipv6Address. | |
| static Ipv6Address | GetAllNodesMulticast () |
| Get the "all nodes multicast" address. | |
| static Ipv6Address | GetAllRoutersMulticast () |
| Get the "all routers multicast" address. | |
| static Ipv6Address | GetAllHostsMulticast () |
| Get the "all hosts multicast" address. | |
| static Ipv6Address | GetLoopback () |
| Get the loopback address. | |
| static Ipv6Address | GetOnes () |
| Get the "all-1" IPv6 address (ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff). | |
Friends | |
| bool | operator== (Ipv6Address const &a, Ipv6Address const &b) |
| bool | operator!= (Ipv6Address const &a, Ipv6Address const &b) |
| bool | operator< (Ipv6Address const &a, Ipv6Address const &b) |
Describes an IPv6 address.
| ns3::Ipv6Address::Ipv6Address | ( | char const * | address | ) |
Constructs an Ipv6Address by parsing the input C-string.
| address | the C-string containing the IPv6 address (e.g. 2001:660:4701::1). |
| ns3::Ipv6Address::Ipv6Address | ( | uint8_t | address[16] | ) |
Constructs an Ipv6Address by using the input 16 bytes.
| address | the 128-bit address |
| ns3::Ipv6Address::Ipv6Address | ( | Ipv6Address const & | addr | ) |
Copy constructor.
| addr | Ipv6Address object |
| ns3::Ipv6Address::Ipv6Address | ( | Ipv6Address const * | addr | ) |
Copy constructor.
| addr | Ipv6Address pointer |
| Ipv6Address ns3::Ipv6Address::CombinePrefix | ( | Ipv6Prefix const & | prefix | ) |
Combine this address with a prefix.
| prefix | a IPv6 prefix |
| static Ipv6Address ns3::Ipv6Address::ConvertFrom | ( | const Address & | address | ) | [static] |
Convert the Address object into an Ipv6Address ones.
| address | address to convert |
| static Ipv6Address ns3::Ipv6Address::Deserialize | ( | const uint8_t | buf[16] | ) | [static] |
| static Ipv6Address ns3::Ipv6Address::GetAllHostsMulticast | ( | ) | [static] |
Get the "all hosts multicast" address.
| static Ipv6Address ns3::Ipv6Address::GetAllNodesMulticast | ( | ) | [static] |
Get the "all nodes multicast" address.
| static Ipv6Address ns3::Ipv6Address::GetAllRoutersMulticast | ( | ) | [static] |
Get the "all routers multicast" address.
| static Ipv6Address ns3::Ipv6Address::GetAny | ( | ) | [static] |
Get the "any" (::) Ipv6Address.
| void ns3::Ipv6Address::GetBytes | ( | uint8_t | buf[16] | ) | const |
Get the bytes corresponding to the address.
| buf | buffer to store the data |
| static Ipv6Address ns3::Ipv6Address::GetLoopback | ( | ) | [static] |
Get the loopback address.
| static Ipv6Address ns3::Ipv6Address::GetOnes | ( | ) | [static] |
Get the "all-1" IPv6 address (ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff).
| static Ipv6Address ns3::Ipv6Address::GetZero | ( | ) | [static] |
Get the 0 (::) Ipv6Address.
| bool ns3::Ipv6Address::IsAllHostsMulticast | ( | ) | const |
If the IPv6 address is "all hosts multicast" (ff02::3/8).
| bool ns3::Ipv6Address::IsAllNodesMulticast | ( | ) | const |
If the IPv6 address is "all nodes multicast" (ff02::1/8).
| bool ns3::Ipv6Address::IsAllRoutersMulticast | ( | ) | const |
If the IPv6 address is "all routers multicast" (ff02::2/8).
| bool ns3::Ipv6Address::IsAny | ( | ) | const |
If the IPv6 address is the "Any" address.
| bool ns3::Ipv6Address::IsEqual | ( | const Ipv6Address & | other | ) | const |
Comparison operation between two Ipv6Addresses.
| other | the IPv6 address to which to compare thisaddress |
| bool ns3::Ipv6Address::IsLinkLocal | ( | ) | const |
If the IPv6 address is a link-local address (fe80::/64).
| bool ns3::Ipv6Address::IsLocalhost | ( | ) | const |
If the IPv6 address is localhost (::1).
| static bool ns3::Ipv6Address::IsMatchingType | ( | const Address & | address | ) | [static] |
If the Address matches the type.
| address | other address |
| bool ns3::Ipv6Address::IsMulticast | ( | ) | const |
If the IPv6 address is multicast (ff00::/8).
| bool ns3::Ipv6Address::IsSolicitedMulticast | ( | ) | const |
If the IPv6 address is a Solicited multicast address.
| static Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredAddress | ( | Mac48Address | addr, | |
| Ipv6Address | prefix | |||
| ) | [static] |
Make the autoconfigured IPv6 address with Mac48Address.
| addr | the MAC address (48 bits). | |
| prefix | the IPv6 prefix |
| static Ipv6Address ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress | ( | Mac48Address | mac | ) | [static] |
Make the autoconfigured link-local IPv6 address with Mac48Address.
| mac | the MAC address (48 bits). |
| static Ipv6Address ns3::Ipv6Address::MakeSolicitedAddress | ( | Ipv6Address | addr | ) | [static] |
Make the solicited IPv6 address.
| addr | the IPv6 address |
| void ns3::Ipv6Address::Print | ( | std::ostream & | os | ) | const |
Print this address to the given output stream.
The print format is in the typical "2001:660:4701::1".
| os | the output stream to which this Ipv6Address is printed |
| void ns3::Ipv6Address::Serialize | ( | uint8_t | buf[16] | ) | const |
Serialize this address to a 16-byte buffer.
| buf | the output buffer to which this address gets overwritten with this Ipv6Address |
| void ns3::Ipv6Address::Set | ( | uint8_t | address[16] | ) |
Set an Ipv6Address by using the input 16 bytes.
| address | the 128-bit address |
| void ns3::Ipv6Address::Set | ( | char const * | address | ) |
Sets an Ipv6Address by parsing the input C-string.
| address | the C-string containing the IPv6 address (e.g. 2001:660:4701::1). |
1.6.1