ost::IPV4Cidr(3)
π ost::IPV4Cidr β Library Functions Manual π
okay so bestie, we're in the Library Functions Manual today and the main character is ost::IPV4Cidr. grab a boba, this one's actually cute. β¨
πΈ NAME πΈ
ost::IPV4Cidr β literally the CIDR class, bestie. she's the one holding down routing tables and validating address policies. no cap. π
β¨ SYNOPSIS β¨
#include <address.h>
π«Ά Public Member Functions π«Ά
struct in_addr getNetwork (void) constβ grab the network address that belongs to this cidr.struct in_addr getNetmask (void) constβ grab the network mask that belongs to this cidr.struct in_addr getBroadcast (void) constβ compute the broadcast address that goes with this cidr.void set (const char *cidr)β set the cidr, and you can feed her a full or partial hostname, or an address/mask, or a host/bits specification. she's flexible like that. πββοΈIPV4Cidr (const char *cidr)β build a brand new cidr out of a string.IPV4Cidr ()β build an empty cidr. a blank canvas, an empty group chat, a fresh start π¦IPV4Cidr (IPV4Cidr &)β build a copy of a cidr. twin energy π―bool isMember (const struct sockaddr *saddr) constβ check whether a socket address is a member of this cidr's network.bool isMember (const struct in_addr &inaddr) constβ check whether a low level address object is a member of this cidr's net.bool operator== (const struct sockaddr *a) constbool operator== (const struct in_addr &a) const
π Protected Member Functions π
unsigned getMask (const char *cp) const
π Protected Attributes π
struct in_addr netmask network
π Detailed Description π
The CIDR class is used to support routing tables and validate address policies. that's it, that's the whole vibe. she routes, she validates, she serves. π
π« Author π«
David Sugar dyfet@gnutelephony.org
Classless Internet Domain Routing β yes bestie, that's what CIDR stands for, iykyk π§
π· Constructor & Destructor Documentation π·
ost::IPV4Cidr::IPV4Cidr (const char * cidr)
Construct a new cidr from a string. β¨
Parameters
- cidr β string to use.
ost::IPV4Cidr::IPV4Cidr ()
Construct an empty cidr. so minimalist, so serene π
ost::IPV4Cidr::IPV4Cidr (IPV4Cidr &)
Construct a copy of a cidr. π
Parameters
- cidr β to copy from.
π₯ Member Function Documentation π₯
struct in_addr ost::IPV4Cidr::getBroadcast (void) const
Compute the broadcast address associated with this cidr.
Returns
- system binary coded network address.
unsigned ost::IPV4Cidr::getMask (const char * cp) const [protected]
(this one's protected, so she's a little shy π β no extra details given, don't come for me)
struct in_addr ost::IPV4Cidr::getNetmask (void) const [inline]
Get network mask associated with this cidr.
Returns
- system binary coded network mask.
struct in_addr ost::IPV4Cidr::getNetwork (void) const [inline]
Get network address associated with this cidr.
Returns
- system binary coded address.
bool ost::IPV4Cidr::isMember (const struct in_addr & inaddr) const
See if a low level address object is a member of this cidr's net.
Parameters
- inaddr β object to test.
Returns
trueif member of cidr.
bool ost::IPV4Cidr::isMember (const struct sockaddr * saddr) const
See if a socket address is a member of this cidr's network.
Parameters
- saddr β pointer to test.
Returns
trueif member of cidr.
bool ost::IPV4Cidr::operator== (const struct in_addr & a) const [inline]
bool ost::IPV4Cidr::operator== (const struct sockaddr * a) const [inline]
void ost::IPV4Cidr::set (const char * cidr)
Set the cidr from a full or partial hostname, or from an address/mask, or a host/bits specification.
Parameters
- cidr β string to use.
π Member Data Documentation π
struct in_addr netmask ost::IPV4Cidr::network [protected]
protected attribute, bestie. hands off unless you're in the family π
π Author π
Generated automatically by Doxygen for GNU CommonC++ from the source code. so it's not me writing this part, it's the robot, and honestly? the robot ate. π€β¨
mwah, that's the whole page bestie β go route some tables, validate some policies, be the main character of your network π
this was GNU CommonC++, dated Sun Dec 27 2020, and it lives at ost::IPV4Cidr(3) π bye pookie! π«Ά
π¦ where this page comes from
- ubuntu jammy: libcommoncpp2-doc 1.8.1-10
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms