class IPvXNet

IPvXNet class. More...

Definition#include <ipvxnet.hh>
InheritsBaseIPvXNet [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Public Static Methods


Detailed Description

IPvXNet class. Container for IPv4 and IPv6 networks.

Also see IPNet for available methods.

explicit  IPvXNet (int family)
throw (InvalidFamily)

IPvXNet

Constructor for a specified address family.

Creates a network address of specified family, and address value of INADDR_ANY or IN6ADDR_ANY (for IPv4 and IPv6 respectively).

Parameters:
familythe address family.

 IPvXNet (const BaseIPvXNet& n)

IPvXNet

Copy constructor for BaseIPvXNet subnet address

Parameters:
nthe subnet to copy from.

 IPvXNet (const IPvXNet& n)

IPvXNet

Copy constructor for IPvXNet subnet address

Parameters:
nthe subnet to copy from.

 IPvXNet (const IPv4Net& v4net)

IPvXNet

Copy constructor for IPv4Net subnet address

Parameters:
v4netthe subnet to copy from.

 IPvXNet (const IPv6Net& v6net)

IPvXNet

Copy constructor for IPv6Net subnet address

Parameters:
v6netthe subnet to copy from.

 IPvXNet (const char *cp)
throw (InvalidString, InvalidNetmaskLength)

IPvXNet

Constructor from a string.

Parameters:
from_cstringC-style string with slash separated address and prefix length. Examples: "12.34.56/24", "1234:5678/32::"

 IPvXNet (const IPvX& a, int preflen)
throw (InvalidNetmaskLength)

IPvXNet

Constructor from a given base address and a prefix length.

Parameters:
abase address for the subnet.
preflenlength of subnet mask.

inline bool  is_ipv4 ()

is_ipv4

[const]

Test if this subnet is IPv4 subnet.

Returns: true if the subnet is IPv4.

inline bool  is_ipv6 ()

is_ipv6

[const]

Test if this subnet is IPv6 subnet.

Returns: true if the subnet is IPv6.

inline IPv4Net  get_ipv4net ()
throw (InvalidCast)

get_ipv4net

[const]

Get IPv4Net subnet.

Returns: IPv4Net subnet contained with IPvXNet structure.

inline IPv6Net  get_ipv6net ()
throw (InvalidCast)

get_ipv6net

[const]

Get IPv6Net subnet.

Returns: IPv6Net subnet contained with IPvXNet structure.

inline void  get (IPv4Net& to_ipv4net)
throw (InvalidCast)

get

[const]

Assign address value to an IPv4Net subnet.

Parameters:
to_ipv4netIPv4Net subnet to be assigned IPv4Net value contained within this subnet.

inline void  get (IPv6Net& to_ipv6net)
throw (InvalidCast)

get

[const]

Assign address value to an IPv6Net subnet.

Parameters:
to_ipv6netIPv6Net subnet to be assigned IPv6Net value contained within this subnet.

inline int  af ()

af

[const]

Get the address family.

Returns: the address family of this subnet (AF_INET or AF_INET6).

inline IPvXNet  ip_multicast_base_prefix (int family)
throw (InvalidFamily)

ip_multicast_base_prefix

[static]

Get the multicast base subnet.

Note that this is a static function and can be used without a particular object. Example: size_t my_len = IPvXNet::ip_multicast_base_prefix(my_family);

Parameters:
familythe address family.

Returns: the multicast base prefix address for address family of family.

bool  is_multicast ()

is_multicast

[const]

Test if this subnet is a valid multicast prefix address.

Returns: true if this is a valid multicast prefix address.


Generated by: pavlin on possum.icir.org on Thu Aug 28 12:51:57 2003, using kdoc 2.0a54+XORP.