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