|
xorp
|
#include <ipvxnet.hh>
Public Member Functions | |
| IPvXNet (int family) throw (InvalidFamily) | |
| Constructor for a specified address family. | |
| IPvXNet (const BaseIPvXNet &n) | |
| Copy constructor for BaseIPvXNet subnet address. | |
| IPvXNet (const IPvXNet &n) | |
| Copy constructor for IPvXNet subnet address. | |
| IPvXNet (const IPv4Net &v4net) | |
| Copy constructor for IPv4Net subnet address. | |
| IPvXNet (const IPv6Net &v6net) | |
| Copy constructor for IPv6Net subnet address. | |
| IPvXNet (const char *cp) throw (InvalidString, InvalidNetmaskLength) | |
| Constructor from a string. | |
| IPvXNet (const IPvX &a, uint8_t prefix_len) throw (InvalidNetmaskLength) | |
| Constructor from a given base address and a prefix length. | |
| bool | is_ipv4 () const |
| Test if this subnet is IPv4 subnet. | |
| bool | is_ipv6 () const |
| Test if this subnet is IPv6 subnet. | |
| IPv4Net | get_ipv4net () const throw (InvalidCast) |
| Get IPv4Net subnet. | |
| IPv6Net | get_ipv6net () const throw (InvalidCast) |
| Get IPv6Net subnet. | |
| void | get (IPv4Net &to_ipv4net) const throw (InvalidCast) |
| Assign address value to an IPv4Net subnet. | |
| void | get (IPv6Net &to_ipv6net) const throw (InvalidCast) |
| Assign address value to an IPv6Net subnet. | |
| int | af () const |
| Get the address family. | |
| bool | is_unicast () const |
| Test if this subnet is a unicast prefix. | |
| bool | is_multicast () const |
| Test if this subnet is within the multicast address range. | |
| bool | is_class_a () const |
| Test if this subnet is within the IPv4 Class A address range (0.0.0.0/1). | |
| bool | is_class_b () const |
| Test if this subnet is within the IPv4 Class B address range (128.0.0.0/2). | |
| bool | is_class_c () const |
| Test if this subnet is within the IPv4 Class C address range (192.0.0.0/3). | |
| bool | is_experimental () const |
| Test if this subnet is within the IPv4 experimental Class E address range (240.0.0.0/4). | |
Static Public Member Functions | |
| static IPvXNet | ip_multicast_base_prefix (int family) throw (InvalidFamily) |
| Return the subnet containing all multicast addresses. | |
| static IPvXNet | ip_class_a_base_prefix (int family) throw (InvalidFamily) |
| Return the subnet containing all IPv4 Class A addresses (0.0.0.0/1). | |
| static IPvXNet | ip_class_b_base_prefix (int family) throw (InvalidFamily) |
| Return the subnet containing all IPv4 Class B addresses (128.0.0.0/2). | |
| static IPvXNet | ip_class_c_base_prefix (int family) throw (InvalidFamily) |
| Return the subnet containing all IPv4 Class C addresses (192.0.0.0/3). | |
| static IPvXNet | ip_experimental_base_prefix (int family) throw (InvalidFamily) |
| Return the subnet containing all IPv4 experimental Class E addresses (240.0.0.0/4). | |
| IPvXNet::IPvXNet | ( | int | family | ) | throw (InvalidFamily) [inline, explicit] |
| IPvXNet::IPvXNet | ( | const BaseIPvXNet & | n | ) | [inline] |
Copy constructor for BaseIPvXNet subnet address.
| n | the subnet to copy from. |
| IPvXNet::IPvXNet | ( | const IPvXNet & | n | ) | [inline] |
| IPvXNet::IPvXNet | ( | const IPv4Net & | v4net | ) | [inline] |
Copy constructor for IPv4Net subnet address.
| v4net | the subnet to copy from. |
| IPvXNet::IPvXNet | ( | const IPv6Net & | v6net | ) | [inline] |
Copy constructor for IPv6Net subnet address.
| v6net | the subnet to copy from. |
| IPvXNet::IPvXNet | ( | const char * | cp | ) | throw (InvalidString, InvalidNetmaskLength) [inline] |
Constructor from a string.
| from_cstring | C-style string with slash separated address and prefix length. Examples: "12.34.56/24", "1234:5678/32::" |
| IPvXNet::IPvXNet | ( | const IPvX & | a, |
| uint8_t | prefix_len | ||
| ) | throw (InvalidNetmaskLength) [inline] |
Constructor from a given base address and a prefix length.
| a | base address for the subnet. |
| prefix_len | length of subnet mask. |
| int IPvXNet::af | ( | ) | const [inline] |
| void IPvXNet::get | ( | IPv4Net & | to_ipv4net | ) | const throw (InvalidCast) [inline] |
Assign address value to an IPv4Net subnet.
| to_ipv4net | IPv4Net subnet to be assigned IPv4Net value contained within this subnet. |
| void IPvXNet::get | ( | IPv6Net & | to_ipv6net | ) | const throw (InvalidCast) [inline] |
Assign address value to an IPv6Net subnet.
| to_ipv6net | IPv6Net subnet to be assigned IPv6Net value contained within this subnet. |
| IPv4Net IPvXNet::get_ipv4net | ( | ) | const throw (InvalidCast) [inline] |
Get IPv4Net subnet.
| IPv6Net IPvXNet::get_ipv6net | ( | ) | const throw (InvalidCast) [inline] |
Get IPv6Net subnet.
| static IPvXNet IPvXNet::ip_class_a_base_prefix | ( | int | family | ) | throw (InvalidFamily) [inline, static] |
Return the subnet containing all IPv4 Class A addresses (0.0.0.0/1).
This method applies only for IPv4. Note that this is a static function and can be used without a particular object. Example: IPvXNet my_prefix = IPvXNet::ip_class_a_base_prefix(my_family);
| family | the address family. |
| static IPvXNet IPvXNet::ip_class_b_base_prefix | ( | int | family | ) | throw (InvalidFamily) [inline, static] |
Return the subnet containing all IPv4 Class B addresses (128.0.0.0/2).
This method applies only for IPv4. Note that this is a static function and can be used without a particular object. Example: IPvXNet my_prefix = IPvXNet::ip_class_b_base_prefix(my_family);
| family | the address family. |
| static IPvXNet IPvXNet::ip_class_c_base_prefix | ( | int | family | ) | throw (InvalidFamily) [inline, static] |
Return the subnet containing all IPv4 Class C addresses (192.0.0.0/3).
This method applies only for IPv4. Note that this is a static function and can be used without a particular object. Example: IPvXNet my_prefix = IPvXNet::ip_class_c_base_prefix(my_family);
| family | the address family. |
| static IPvXNet IPvXNet::ip_experimental_base_prefix | ( | int | family | ) | throw (InvalidFamily) [inline, static] |
Return the subnet containing all IPv4 experimental Class E addresses (240.0.0.0/4).
This method applies only for IPv4. Note that this is a static function and can be used without a particular object. Example: IPvXNet my_prefix = IPvXNet::ip_experimental_base_prefix(my_family);
| family | the address family. |
| static IPvXNet IPvXNet::ip_multicast_base_prefix | ( | int | family | ) | throw (InvalidFamily) [inline, static] |
Return the subnet containing all multicast addresses.
Note that this is a static function and can be used without a particular object. Example: IPvXNet my_prefix = IPvXNet::ip_multicast_base_prefix(my_family);
| family | the address family. |
| bool IPvXNet::is_class_a | ( | ) | const [inline] |
| bool IPvXNet::is_class_b | ( | ) | const [inline] |
| bool IPvXNet::is_class_c | ( | ) | const [inline] |
| bool IPvXNet::is_experimental | ( | ) | const [inline] |
| bool IPvXNet::is_ipv4 | ( | ) | const [inline] |
| bool IPvXNet::is_ipv6 | ( | ) | const [inline] |
| bool IPvXNet::is_multicast | ( | ) | const [inline] |
Test if this subnet is within the multicast address range.
Reimplemented from IPNet< A >.
| bool IPvXNet::is_unicast | ( | ) | const [inline] |
Test if this subnet is a unicast prefix.
In case of IPv4 all prefixes that fall within the Class A, Class B or Class C address space are unicast. In case of IPv6 all prefixes that don't contain the multicast address space are unicast. Note that the default route (0.0.0.0/0 for IPv4 or ::/0 for IPv6) is also considered an unicast prefix.
Reimplemented from IPNet< A >.