ost::IPV4Host(3)
π ost::IPV4Host π
okay so bestie, welcome to the ost::IPV4Host page β it lives in the Library Functions Manual (section 3, we love a library call), and it's genuinely one of the most useful lil objects in GNU CommonC++.
β¨ NAME β¨
ost::IPV4Host β this object is used to hold the actual and valid internet address of a specific host machine that will be accessed through a socket.
πΈ SYNOPSIS πΈ
#include <address.h>
Inherits ost::IPV4Address. yes bestie, it's giving inheritance, it's giving legacy code that actually works π«Ά
π Public Member Functions
IPV4Host(const char *host=NULL) β Create a new host address for a specific internet host.IPV4Host(struct in_addr addr) β Convert a system socket binary address such as may be returned through theaccept()call orgetsockpeer()into an internet host address object.IPV4Address & operator=(unsigned long addr) β Allows assignment from the return of functions likeinet_addr()orhtonl()IPV4Host & operator&=(const IPV4Mask &mask) β Mask the internet host address object with a network mask address.
π¦ Friends
class __EXPORT IPV4Mask__EXPORT IPV4Host operator&(const IPV4Host &addr,const IPV4Mask &mask)
π Additional Inherited Members
(yes there's more, it inherits stuff, go read ost::IPV4Address for the full tea π
)
π Detailed Description π
This object is used to hold the actual and valid internet address of a specific host machine that will be accessed through a socket.
Author David Sugar dyfet@ostel.com
Address of a specific Internet host machine. literally its whole personality π
π§ Constructor & Destructor Documentation π§
π ost::IPV4Host::IPV4Host (const char * host = NULL)
Create a new host address for a specific internet host. The internet host can be specified in a null terminated ASCII string and include either the physical host address or the DNS name of a host machine. Hence, an IPV4Host ('www.voxilla.org') can be directly declaired in this manner.
Defaults to the IP address that represents the interface matching 'gethostname()'.
Parameters
- host β dns or physical address of an Internet host.
not me giving you the whole DNS name OR the raw address, your choice bestie, we're flexible like that π
π ost::IPV4Host::IPV4Host (struct in_addr addr)
Convert a system socket binary address such as may be returned through the accept() call or getsockpeer() into an internet host address object.
Parameters
- addr β binary address of internet host.
β Member Function Documentation β
π₯ IPV4Host& ost::IPV4Host::operator&= (const IPV4Mask & mask)
Mask the internet host address object with a network mask address. This is commonly used to coerce an address by subnet.
π₯ IPV4Address& ost::IPV4Host::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 π
π friend class __EXPORT IPV4Mask [friend]
π __EXPORT IPV4Host operator& (const IPV4Host & addr, const IPV4Mask & mask) [friend]
π Author π
Generated automatically by Doxygen for GNU CommonC++ from the source code.
okay that's the whole page, you ate it, slay π β¨
sign-off bestie: this iconic lil doc came from GNU CommonC++, dated Sun Dec 27 2020 β the whole manual page is literally titled ost::IPV4Host(3) and yes it's a real one, no cap. go build something cute with it π¦π
π¦ 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