ucommon
Public Member Functions | Protected Member Functions | Protected Attributes
ost::IPV6Cidr Class Reference

The CIDR class is used to support routing tables and validate address policies. More...

#include <address.h>

Public Member Functions

struct in6_addr getBroadcast (void)
 Compute the broadcast address associated with this cidr.
struct in6_addr getNetmask (void)
 Get network mask associated with this cidr.
struct in6_addr getNetwork (void)
 Get network address associated with this cidr.
 IPV6Cidr (char *cidr)
 Construct a new cidr from a string.
 IPV6Cidr ()
 Construct an empty cidr.
 IPV6Cidr (IPV6Cidr &)
 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 in6_addr &inaddr)
 See if a low level address object is a member of this cidr's net.
bool operator== (struct sockaddr *sa)
bool operator== (struct in6_addr &a)
void set (char *cidr)
 Set the cidr from a full or partial hostname, or from a host/bits specification.

Protected Member Functions

unsigned getMask (char *cp)

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

Definition at line 236 of file address.h.


Constructor & Destructor Documentation

ost::IPV6Cidr::IPV6Cidr ( char *  cidr)

Construct a new cidr from a string.

Parameters:
cidrstring to use.

Construct a copy of a cidr.

Parameters:
cidrto copy from.

Member Function Documentation

struct in6_addr ost::IPV6Cidr::getBroadcast ( void  ) [read]

Compute the broadcast address associated with this cidr.

Returns:
system binary coded network address.
struct in6_addr ost::IPV6Cidr::getNetmask ( void  ) [inline, read]

Get network mask associated with this cidr.

Returns:
system binary coded network mask.

Definition at line 256 of file address.h.

struct in6_addr ost::IPV6Cidr::getNetwork ( void  ) [inline, read]

Get network address associated with this cidr.

Returns:
system binary coded address.

Definition at line 248 of file address.h.

bool ost::IPV6Cidr::isMember ( struct sockaddr *  saddr)

See if a socket address is a member of this cidr's network.

Parameters:
saddrpointer to test.
Returns:
true if member of cidr.
bool ost::IPV6Cidr::isMember ( struct in6_addr &  inaddr)

See if a low level address object is a member of this cidr's net.

Parameters:
inaddrobject to test.
Returns:
true if member of cidr.
void ost::IPV6Cidr::set ( char *  cidr)

Set the cidr from a full or partial hostname, or from a host/bits specification.

Parameters:
cidrstring to use.

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