.TH "ost::IPV4Cidr" 3 "Sun Dec 27 2020" "GNU CommonC++" \" -*- nroff -*- .ad l .nh .SH NAME ost::IPV4Cidr \- The CIDR class is used to support routing tables and validate address policies\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .SS "Public Member Functions" .in +1c .ti -1c .RI "struct in_addr \fBgetNetwork\fP (void) const" .br .RI "Get network address associated with this cidr\&. " .ti -1c .RI "struct in_addr \fBgetNetmask\fP (void) const" .br .RI "Get network mask associated with this cidr\&. " .ti -1c .RI "struct in_addr \fBgetBroadcast\fP (void) const" .br .RI "Compute the broadcast address associated with this cidr\&. " .ti -1c .RI "void \fBset\fP (const char *cidr)" .br .RI "Set the cidr from a full or partial hostname, or from an address/mask, or a host/bits specification\&. " .ti -1c .RI "\fBIPV4Cidr\fP (const char *cidr)" .br .RI "Construct a new cidr from a string\&. " .ti -1c .RI "\fBIPV4Cidr\fP ()" .br .RI "Construct an empty cidr\&. " .ti -1c .RI "\fBIPV4Cidr\fP (\fBIPV4Cidr\fP &)" .br .RI "Construct a copy of a cidr\&. " .ti -1c .RI "bool \fBisMember\fP (const struct sockaddr *saddr) const" .br .RI "See if a socket address is a member of this cidr's network\&. " .ti -1c .RI "bool \fBisMember\fP (const struct in_addr &inaddr) const" .br .RI "See if a low level address object is a member of this cidr's net\&. " .ti -1c .RI "bool \fBoperator==\fP (const struct sockaddr *a) const" .br .ti -1c .RI "bool \fBoperator==\fP (const struct in_addr &a) const" .br .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "unsigned \fBgetMask\fP (const char *cp) const" .br .in -1c .SS "Protected Attributes" .in +1c .ti -1c .RI "struct in_addr netmask \fBnetwork\fP" .br .in -1c .SH "Detailed Description" .PP The CIDR class is used to support routing tables and validate address policies\&. .PP \fBAuthor\fP .RS 4 David Sugar dyfet@gnutelephony.org .RE .PP Classless Internet Domain Routing .SH "Constructor & Destructor Documentation" .PP .SS "ost::IPV4Cidr::IPV4Cidr (const char * cidr)" .PP Construct a new cidr from a string\&. .PP \fBParameters\fP .RS 4 \fIcidr\fP string to use\&. .RE .PP .SS "ost::IPV4Cidr::IPV4Cidr ()" .PP Construct an empty cidr\&. .SS "ost::IPV4Cidr::IPV4Cidr (\fBIPV4Cidr\fP &)" .PP Construct a copy of a cidr\&. .PP \fBParameters\fP .RS 4 \fIcidr\fP to copy from\&. .RE .PP .SH "Member Function Documentation" .PP .SS "struct in_addr ost::IPV4Cidr::getBroadcast (void) const" .PP Compute the broadcast address associated with this cidr\&. .PP \fBReturns\fP .RS 4 system binary coded network address\&. .RE .PP .SS "unsigned ost::IPV4Cidr::getMask (const char * cp) const\fC [protected]\fP" .SS "struct in_addr ost::IPV4Cidr::getNetmask (void) const\fC [inline]\fP" .PP Get network mask associated with this cidr\&. .PP \fBReturns\fP .RS 4 system binary coded network mask\&. .RE .PP .SS "struct in_addr ost::IPV4Cidr::getNetwork (void) const\fC [inline]\fP" .PP Get network address associated with this cidr\&. .PP \fBReturns\fP .RS 4 system binary coded address\&. .RE .PP .SS "bool ost::IPV4Cidr::isMember (const struct in_addr & inaddr) const" .PP See if a low level address object is a member of this cidr's net\&. .PP \fBParameters\fP .RS 4 \fIinaddr\fP object to test\&. .RE .PP \fBReturns\fP .RS 4 true if member of cidr\&. .RE .PP .SS "bool ost::IPV4Cidr::isMember (const struct sockaddr * saddr) const" .PP See if a socket address is a member of this cidr's network\&. .PP \fBParameters\fP .RS 4 \fIsaddr\fP pointer to test\&. .RE .PP \fBReturns\fP .RS 4 true if member of cidr\&. .RE .PP .SS "bool ost::IPV4Cidr::operator== (const struct in_addr & a) const\fC [inline]\fP" .SS "bool ost::IPV4Cidr::operator== (const struct sockaddr * a) const\fC [inline]\fP" .SS "void ost::IPV4Cidr::set (const char * cidr)" .PP Set the cidr from a full or partial hostname, or from an address/mask, or a host/bits specification\&. .PP \fBParameters\fP .RS 4 \fIcidr\fP string to use\&. .RE .PP .SH "Member Data Documentation" .PP .SS "struct in_addr netmask ost::IPV4Cidr::network\fC [protected]\fP" .SH "Author" .PP Generated automatically by Doxygen for GNU CommonC++ from the source code\&.