shibsp::IPRange Class Reference

Represents a range of IP addresses. More...

#include <shibsp/util/IPRange.h>

List of all members.

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.


Detailed Description

Represents a range of IP addresses.

Constructor & Destructor Documentation

shibsp::IPRange::IPRange ( const std::bitset< 32 > &  address,
int  maskSize 
)

Constructor.

Parameters:
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.

Parameters:
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


Member Function Documentation

bool shibsp::IPRange::contains ( const char *  address  )  const

Determines whether the given address is contained in the IP range.

Parameters:
address the address to check
Returns:
true iff the address is in the range

bool shibsp::IPRange::contains ( const struct sockaddr *  address  )  const

Determines whether the given address is contained in the IP range.

Parameters:
address the address to check
Returns:
true iff the address is in the range

static IPRange shibsp::IPRange::parseCIDRBlock ( const char *  cidrBlock  )  [static]

Parses a CIDR block definition in to an IP range.

Parameters:
cidrBlock the CIDR block definition
Returns:
the resultant IP range


The documentation for this class was generated from the following file:

Generated on Tue Jun 18 02:31:23 2013 for shibboleth-2.5.2 by  doxygen 1.5.6