FBB::InetAddress

FBB::InetAddress

libbobcat1-dev_2.00.1-x.tar.gz

2005-2008


FBB::InetAddress(3bobcat)

FBB::InetAddress(3bobcat)

libbobcat1-dev_2.00.1-x.tar.gz Network Byte Order

2005-2008

NAME

FBB::InetAddress - Converting between host byte order and network byte order

SYNOPSIS

#include <bobcat/inetaddress>
Linking option: -lbobcat

DESCRIPTION

Computers differ their word-byte order, called `endianness'. A little-endian computer has its least significant byte at the byte having the lower address of a two-byte value, whereas a big-endian computer has its least significant byte at at the byte having the higher address of a two-byte value. In order to allow these computers to communicate over over Internet, host byte order was designed. Objects of the class FBB::InetAddress may be used to convert between network byte order and host byte order (and vice versa).

The class only has a few public members. Most members are protected, and FBB::InetAddress is therefore primarily used as a base class from which other classes are derived. In practice there will be little need to construct objects of the class FBB::InetAddress, which is primarily a support class for the FBB socket-classes.

Internally, all data are stored in network byte order.

As the class' constructors depend on the proper functioning of members of the FBB:GetHostent class, the class' objects can only be constructed when the host whose name or address is searched can be resolved by a name resolution process, e.g., bind(1).

Objects of the class FBB::InetAddress store address information about a host in a struct sockaddr_in data member. A struct sockaddr_in is the data type used to represent socket addresses in the Internet namespace. It has the following members:

NAMESPACE

FBB
All constructors, members, operators and manipulators, mentioned in this man-page, are defined in the namespace FBB.

INHERITS FROM

-

PROTECTED CONSTRUCTORS

The copy constructor is not available.

MEMBER FUNCTIONS

PROTECTED MEMBER FUNCTIONS

EXAMPLE

To do

FILES

bobcat/inetaddress - defines the class interface

SEE ALSO

bind(1), bobcat(7), gethostent(3bobcat), socketbase(3bobcat)

BUGS

None Reported.

DISTRIBUTION FILES

BOBCAT

Bobcat is an acronym of `Brokken's Own Base Classes And Templates'.

COPYRIGHT

This is free software, distributed under the terms of the GNU General Public License (GPL).

AUTHOR

Frank B. Brokken (f.b.brokken@rug.nl).