ucommon
Public Member Functions | Friends
ost::IPV4Host Class Reference

This object is used to hold the actual and valid internet address of a specific host machine that will be accessed through a socket. More...

#include <address.h>

Inheritance diagram for ost::IPV4Host:
Inheritance graph
[legend]
Collaboration diagram for ost::IPV4Host:
Collaboration graph
[legend]

Public Member Functions

 IPV4Host (char *host=((void *) 0))
 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 the accept() call or getsockpeer() into an internet host address object.
IPV4Hostoperator&= (IPV4Mask &mask)
 Mask the internet host address object with a network mask address.
IPV4Addressoperator= (unsigned long addr)
 Allows assignment from the return of functions like inet_addr() or htonl()

Friends

class IPV4Mask
IPV4Host operator& (IPV4Host &addr, IPV4Mask &mask)

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.

Definition at line 543 of file address.h.


Constructor & Destructor Documentation

ost::IPV4Host::IPV4Host ( char *  host = ((void *) 0))

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:
hostdns or physical address of an Internet host.
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:
addrbinary address of internet host.

Member Function Documentation

IPV4Host& ost::IPV4Host::operator&= ( IPV4Mask mask)

Mask the internet host address object with a network mask address.

This is commonly used to coerce an address by subnet.


The documentation for this class was generated from the following file: