The CIDR class is used to support routing tables and validate address policies.
More...
#include <address.h>
List of all members.
Public Member Functions |
struct in6_addr | getNetwork (void) const |
| Get network address associated with this cidr.
|
struct in6_addr | getNetmask (void) const |
| Get network mask associated with this cidr.
|
struct in6_addr | getBroadcast (void) const |
| Compute the broadcast address associated with this cidr.
|
void | set (const char *cidr) |
| Set the cidr from a full or partial hostname, or from a host/bits specification.
|
| IPV6Cidr (const char *cidr) |
| Construct a new cidr from a string.
|
| IPV6Cidr () |
| Construct an empty cidr.
|
| IPV6Cidr (IPV6Cidr &) |
| Construct a copy of a cidr.
|
bool | isMember (const struct sockaddr *saddr) const |
| See if a socket address is a member of this cidr's network.
|
bool | isMember (const struct in6_addr &inaddr) const |
| See if a low level address object is a member of this cidr's net.
|
bool | operator== (const struct sockaddr *sa) const |
bool | operator== (const struct in6_addr &a) const |
Protected Member Functions |
unsigned | getMask (const char *cp) const |
Protected Attributes |
struct in6_addr netmask | network |
Detailed Description
The CIDR class is used to support routing tables and validate address policies.
- Author:
- David Sugar <dyfet@gnutelephony.org> Classless Internet Domain Routing
Constructor & Destructor Documentation
ost::IPV6Cidr::IPV6Cidr |
( |
const char * |
cidr | ) |
|
Construct a new cidr from a string.
- Parameters:
-
ost::IPV6Cidr::IPV6Cidr |
( |
| ) |
|
Construct a copy of a cidr.
- Parameters:
-
Member Function Documentation
struct in6_addr ost::IPV6Cidr::getBroadcast |
( |
void |
| ) |
const [read] |
Compute the broadcast address associated with this cidr.
- Returns:
- system binary coded network address.
unsigned ost::IPV6Cidr::getMask |
( |
const char * |
cp | ) |
const [protected] |
struct in6_addr ost::IPV6Cidr::getNetmask |
( |
void |
| ) |
const [inline, read] |
Get network mask associated with this cidr.
- Returns:
- system binary coded network mask.
struct in6_addr ost::IPV6Cidr::getNetwork |
( |
void |
| ) |
const [inline, read] |
Get network address associated with this cidr.
- Returns:
- system binary coded address.
bool ost::IPV6Cidr::isMember |
( |
const struct in6_addr & |
inaddr | ) |
const |
See if a low level address object is a member of this cidr's net.
- Parameters:
-
- Returns:
- true if member of cidr.
bool ost::IPV6Cidr::isMember |
( |
const struct sockaddr * |
saddr | ) |
const |
See if a socket address is a member of this cidr's network.
- Parameters:
-
- Returns:
- true if member of cidr.
bool ost::IPV6Cidr::operator== |
( |
const struct in6_addr & |
a | ) |
const [inline] |
bool ost::IPV6Cidr::operator== |
( |
const struct sockaddr * |
sa | ) |
const [inline] |
void ost::IPV6Cidr::set |
( |
const char * |
cidr | ) |
|
Set the cidr from a full or partial hostname, or from a host/bits specification.
- Parameters:
-
Member Data Documentation
The documentation for this class was generated from the following file: