logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

ost::IPV4Cidr - The CIDR class is used to support routing tables and validate address policies.

Author

       Generated automatically by Doxygen for GNU CommonC++ from the source code.

GNU CommonC++                                    Sun Dec 27 2020                                ost::IPV4Cidr(3)

Constructor & Destructor Documentation

ost::IPV4Cidr::IPV4Cidr(constchar*cidr)
       Construct a new cidr from a string.

       Parameterscidr string to use.

   ost::IPV4Cidr::IPV4Cidr()
       Construct an empty cidr.

   ost::IPV4Cidr::IPV4Cidr(IPV4Cidr&)
       Construct a copy of a cidr.

       Parameterscidr to copy from.

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

Member Data Documentation

structin_addrnetmaskost::IPV4Cidr::network[protected]

Member Function Documentation

structin_addrost::IPV4Cidr::getBroadcast(void)const
       Compute the broadcast address associated with this cidr.

       Returns
           system binary coded network address.

   unsignedost::IPV4Cidr::getMask(constchar*cp)const[protected]structin_addrost::IPV4Cidr::getNetmask(void)const[inline]
       Get network mask associated with this cidr.

       Returns
           system binary coded network mask.

   structin_addrost::IPV4Cidr::getNetwork(void)const[inline]
       Get network address associated with this cidr.

       Returns
           system binary coded address.

   boolost::IPV4Cidr::isMember(conststructin_addr&inaddr)const
       See if a low level address object is a member of this cidr's net.

       Parametersinaddr object to test.

       Returns
           true if member of cidr.

   boolost::IPV4Cidr::isMember(conststructsockaddr*saddr)const
       See if a socket address is a member of this cidr's network.

       Parameterssaddr pointer to test.

       Returns
           true if member of cidr.

   boolost::IPV4Cidr::operator==(conststructin_addr&a)const[inline]boolost::IPV4Cidr::operator==(conststructsockaddr*a)const[inline]voidost::IPV4Cidr::set(constchar*cidr)
       Set the cidr from a full or partial hostname, or from an address/mask, or a host/bits specification.

       Parameterscidr string to use.

Name

       ost::IPV4Cidr - The CIDR class is used to support routing tables and validate address policies.

Synopsis

       #include <address.h>

   PublicMemberFunctions
       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

   ProtectedMemberFunctions
       unsigned getMask (const char *cp) const

   ProtectedAttributes
       struct in_addr netmask network

See Also