ost::IPV4Mask(3)
π ost::IPV4Mask π β from the Library Functions Manual (section 3, bestie)
okay so picture this: you're out here doing subnet math and you need an address that's literally just a mask, like 255.255.255.0? yeah. that's this. welcome to the group chat. π
β¨ NAME β¨
ost::IPV4Mask β Internet addresses used specifically as masking addresses (such as ' 255.255.255.0') are held in the IPV4Mask derived object.
β¨ SYNOPSIS β¨
#include <address.h>
Inherits ost::IPV4Address. π
πΈ Public Member Functions πΈ
IPV4Mask(const char *mask) β Create the mask from a null terminated ASCII string such as '255.255.255.128'.IPV4Address & operator=(unsigned long addr) β Allows assignment from the return of functions likeinet_addr()orhtonl()
π¦ Friends π¦
__EXPORT IPV4Host operator&(const IPV4Host &addr,const IPV4Mask &mask) β Masks are usually used to coerce host addresses into a specific router or class domain.
π Additional Inherited Members π
(they're inherited, they're giving legacy, they're fine, moving on π)
β¨ Detailed Description β¨
Internet addresses used specifically as masking addresses (such as ' 255.255.255.0') are held in the IPV4Mask derived object. π«Ά
The separate class is used so that C++ type casting can automatically determine when an IPV4Address object is really a mask address object rather than simply using the base class. This also allows manipulative operators for address masking to operate only when presented with a Masked address as well as providing cleaner and safer source. cleaner and safer source?? we love to see it. β¨
Author
- David Sugar
dyfet@ostel.com
Internet Address Mask such as subnet masks. π
β¨ Constructor & Destructor Documentation β¨
π ost::IPV4Mask::IPV4Mask (const char * mask)
Create the mask from a null terminated ASCII string such as '255.255.255.128'.
Parameters
- mask β null terminated ASCII mask string.
β¨ Member Function Documentation β¨
π IPV4Address& ost::IPV4Mask::operator= (unsigned long addr) [inline]
Allows assignment from the return of functions like inet_addr() or htonl()
References ost::IPV4Address::operator=().
β¨ Friends And Related Function Documentation β¨
π __EXPORT IPV4Host operator& (const IPV4Host & addr, const IPV4Mask & mask) [friend]
Masks are usually used to coerce host addresses into a specific router or class domain. This can be done by taking the Inet Host Address object and 'and'ing it with an address mask. This operation can be directly expressed in C++ through the & operator.
Returns
- a internet host address that has been masked.
Parameters
- addr β host address to be masked by subnet.
- mask β inetnet mask address object to mask by.
β¨ Author β¨
Generated automatically by Doxygen for GNU CommonC++ from the source code.
and that's the whole page, bestie, no cap. this one came straight outta GNU CommonC++, dated Sun Dec 27 2020, page ost::IPV4Mask(3) β go mask something iconic, mwah π
πππ¦πΈ
π¦ 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