#include <shibsp/util/IPRange.h>
Public Member Functions | |
| IPRange (const std::bitset< 32 > &address, int maskSize) | |
| Constructor. | |
| IPRange (const std::bitset< 128 > &address, int maskSize) | |
| Constructor. | |
| bool | contains (const char *address) const |
| Determines whether the given address is contained in the IP range. | |
| bool | contains (const struct sockaddr *address) const |
| Determines whether the given address is contained in the IP range. | |
Static Public Member Functions | |
| static IPRange | parseCIDRBlock (const char *cidrBlock) |
| Parses a CIDR block definition in to an IP range. | |
| shibsp::IPRange::IPRange | ( | const std::bitset< 32 > & | address, | |
| int | maskSize | |||
| ) |
Constructor.
| address | address to base the range on; may be the network address or the address of a host within the network | |
| maskSize | the number of bits in the netmask |
| shibsp::IPRange::IPRange | ( | const std::bitset< 128 > & | address, | |
| int | maskSize | |||
| ) |
Constructor.
| address | address to base the range on; may be the network address or the address of a host within the network | |
| maskSize | the number of bits in the netmask |
| bool shibsp::IPRange::contains | ( | const struct sockaddr * | address | ) | const |
Determines whether the given address is contained in the IP range.
| address | the address to check |
| bool shibsp::IPRange::contains | ( | const char * | address | ) | const |
Determines whether the given address is contained in the IP range.
| address | the address to check |
| static IPRange shibsp::IPRange::parseCIDRBlock | ( | const char * | cidrBlock | ) | [static] |
Parses a CIDR block definition in to an IP range.
| cidrBlock | the CIDR block definition |
1.4.7