The cidr class is used to support routing tables and validate address policies.
#include <address.h>
struct in_addr getNetwork (void) const
Get network address associated with this cidr. struct in_addr getNetmask (void) const
Get network mask associated with this cidr. struct in_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 an address/mask, or a host/bits specification. IPV4Cidr (const char *cidr)
Construct a new cidr from a string. IPV4Cidr ()
Construct an empty cidr. IPV4Cidr (IPV4Cidr &)
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 in_addr &inaddr) const
See if a low level address object is a member of this cidr's net. bool operator== (const struct sockaddr *a) const
bool operator== (const struct in_addr &a) const
unsigned getMask (const char *cp) const
struct in_addr netmask network
The CIDR class is used to support routing tables and validate address policies.
Author:
David Sugar [email protected] Classless Internet Domain Routing
Construct a new cidr from a string.
Parameters:
cidr string to use.
Construct an empty cidr.
Construct a copy of a cidr.
Parameters:
cidr to copy from.
Compute the broadcast address associated with this cidr.
Returns:
system binary coded network address.
Get network mask associated with this cidr.
Returns:
system binary coded network mask.
Get network address associated with this cidr.
Returns:
system binary coded address.
See if a socket address is a member of this cidr's network.
Parameters:
saddr pointer to test.
Returns:
true if member of cidr.
See if a low level address object is a member of this cidr's net.
Parameters:
inaddr object to test.
Returns:
true if member of cidr.
Set the cidr from a full or partial hostname, or from an address/mask, or a host/bits specification.
Parameters:
cidr string to use.
Generated automatically by Doxygen for GNU CommonC++ from the source code.