|
ns-3
|
Describes an IPv6 prefix. It is just a bitmask like Ipv4Mask. More...
#include <ipv6-address.h>
Public Member Functions | |
| Ipv6Prefix () | |
| Default constructor. | |
| Ipv6Prefix (uint8_t prefix[16]) | |
| Constructs an Ipv6Prefix by using the input 16 bytes. | |
| Ipv6Prefix (char const *prefix) | |
| Constructs an Ipv6Prefix by using the input string. | |
| Ipv6Prefix (uint8_t prefix) | |
| Constructs an Ipv6Prefix by using the input number of bits. | |
| Ipv6Prefix (Ipv6Prefix const &prefix) | |
| Copy constructor. | |
| Ipv6Prefix (Ipv6Prefix const *prefix) | |
| Copy constructor. | |
| ~Ipv6Prefix () | |
| Destructor. | |
| bool | IsMatch (Ipv6Address a, Ipv6Address b) const |
| If the Address match the type. | |
| void | GetBytes (uint8_t buf[16]) const |
| Get the bytes corresponding to the prefix. | |
| uint8_t | GetPrefixLength () const |
| Get prefix length. | |
| bool | IsEqual (const Ipv6Prefix &other) const |
| Comparison operation between two Ipv6Prefix. | |
| void | Print (std::ostream &os) const |
| Print this address to the given output stream. | |
Static Public Member Functions | |
| static Ipv6Prefix | GetLoopback () |
| Get the loopback prefix ( /128). | |
| static Ipv6Prefix | GetOnes () |
| Get the "all-1" IPv6 mask (ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff). | |
| static Ipv6Prefix | GetZero () |
| Get the zero prefix ( /0). | |
Describes an IPv6 prefix. It is just a bitmask like Ipv4Mask.
| ns3::Ipv6Prefix::Ipv6Prefix | ( | uint8_t | prefix[16] | ) |
Constructs an Ipv6Prefix by using the input 16 bytes.
| prefix | the 128-bit prefix |
| ns3::Ipv6Prefix::Ipv6Prefix | ( | char const * | prefix | ) |
Constructs an Ipv6Prefix by using the input string.
| prefix | the 128-bit prefix |
| ns3::Ipv6Prefix::Ipv6Prefix | ( | uint8_t | prefix | ) |
Constructs an Ipv6Prefix by using the input number of bits.
| prefix | number of bits of the prefix (0 - 128) |
References NS_ASSERT.
| ns3::Ipv6Prefix::Ipv6Prefix | ( | Ipv6Prefix const & | prefix | ) |
Copy constructor.
| prefix | Ipv6Prefix object |
| ns3::Ipv6Prefix::Ipv6Prefix | ( | Ipv6Prefix const * | prefix | ) |
Copy constructor.
| prefix | Ipv6Prefix pointer |
| void ns3::Ipv6Prefix::GetBytes | ( | uint8_t | buf[16] | ) | const |
Get the bytes corresponding to the prefix.
| buf | buffer to store the data |
| Ipv6Prefix ns3::Ipv6Prefix::GetLoopback | ( | void | ) | [static] |
Get the loopback prefix ( /128).
| Ipv6Prefix ns3::Ipv6Prefix::GetOnes | ( | void | ) | [static] |
Get the "all-1" IPv6 mask (ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff).
Referenced by ns3::Ipv6StaticRouting::AddHostRouteTo(), ns3::Ipv6RoutingTableEntry::CreateHostRouteTo(), and ns3::Ipv6RoutingTableEntry::IsHost().
| uint8_t ns3::Ipv6Prefix::GetPrefixLength | ( | void | ) | const |
| Ipv6Prefix ns3::Ipv6Prefix::GetZero | ( | void | ) | [static] |
Get the zero prefix ( /0).
Referenced by ns3::Ipv6StaticRouting::SetDefaultRoute().
| bool ns3::Ipv6Prefix::IsEqual | ( | const Ipv6Prefix & | other | ) | const |
Comparison operation between two Ipv6Prefix.
| other | the IPv6 prefix to which to compare this prefix |
Referenced by ns3::Ipv6RoutingTableEntry::IsHost().
| bool ns3::Ipv6Prefix::IsMatch | ( | Ipv6Address | a, |
| Ipv6Address | b | ||
| ) | const |
If the Address match the type.
| a | a first address |
| b | a second address |
References ns3::Ipv6Address::GetBytes().
Referenced by ns3::Ipv6Interface::GetAddressMatchingDestination(), and ns3::Ipv6StaticRouting::HasNetworkDest().
| void ns3::Ipv6Prefix::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 |