|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NLNET::CInetAddress Class ReferenceInternet address (IP + port).
More...
#include <inet_address.h>
List of all members.
Detailed Description
Internet address (IP + port).
The structure sockaddr_in is internally in network byte order -
Todo:
-
cado: Test big/little endian transfers to check if byte ordering is ok.
-
Author:
-
Olivier Cado , Nevrax France
-
Date:
-
2000
Definition at line 64 of file inet_address.h.
Constructor & Destructor Documentation
NLNET::CInetAddress::CInetAddress |
( |
|
) |
|
|
NLNET::CInetAddress::CInetAddress |
( |
const std::string & |
hostName, |
|
|
uint16 |
port |
|
) |
|
|
NLNET::CInetAddress::CInetAddress |
( |
const std::string & |
hostNameAndPort |
) |
|
|
NLNET::CInetAddress::CInetAddress |
( |
const CInetAddress & |
other |
) |
|
|
NLNET::CInetAddress::~CInetAddress |
( |
|
) |
|
|
NLNET::CInetAddress::CInetAddress |
( |
const in_addr * |
ip |
) |
[protected] |
|
Member Function Documentation
std::string NLNET::CInetAddress::asIPString |
( |
|
) |
const |
|
std::string NLNET::CInetAddress::asString |
( |
|
) |
const |
|
const string & NLNET::CInetAddress::hostName |
( |
|
) |
const |
|
void NLNET::CInetAddress::init |
( |
|
) |
[private] |
|
uint32 NLNET::CInetAddress::internalIPAddress |
( |
|
) |
const |
|
uint32 NLNET::CInetAddress::internalNetAddress |
( |
|
) |
const |
|
|
Returns the internal network address (it s the network address for example 192.168.0.0 for a C class).
Definition at line 320 of file inet_address.cpp.
References internalIPAddress. |
string NLNET::CInetAddress::ipAddress |
( |
|
) |
const |
|
bool NLNET::CInetAddress::is127001 |
( |
|
) |
const |
|
bool NLNET::CInetAddress::isValid |
( |
|
) |
const |
|
std::vector< CInetAddress > NLNET::CInetAddress::localAddresses |
( |
|
) |
[static] |
|
|
Returns the list of the local host addresses (with port=0) (especially useful if the host is multihomed).
Definition at line 465 of file inet_address.cpp.
References CInetAddress. |
CInetAddress NLNET::CInetAddress::localHost |
( |
|
) |
[static] |
|
CInetAddress & NLNET::CInetAddress::operator= |
( |
const CInetAddress & |
other |
) |
|
|
uint16 NLNET::CInetAddress::port |
( |
|
) |
const |
|
|
Serialize.
Definition at line 407 of file inet_address.cpp.
References _SockAddr, _Valid, asIPString, NLMISC::IStream::isReading, s, NLMISC::IStream::serial, NLMISC::CMemStream::serial, NLMISC::IStream::serialBuffer, setNameAndPort, setSockAddr, and NLMISC::CMemStream::stringMode. |
CInetAddress & NLNET::CInetAddress::setByName |
( |
const std::string & |
hostname |
) |
|
|
void NLNET::CInetAddress::setNameAndPort |
( |
const std::string & |
hostNameAndPort |
) |
|
|
void NLNET::CInetAddress::setPort |
( |
uint16 |
port |
) |
|
|
void NLNET::CInetAddress::setSockAddr |
( |
const sockaddr_in * |
saddr |
) |
|
|
const sockaddr_in * NLNET::CInetAddress::sockAddr |
( |
|
) |
const |
|
Friends And Related Function Documentation
bool operator< |
( |
const CInetAddress & |
a1, |
|
|
const CInetAddress & |
a2 |
|
) |
[friend] |
|
bool operator== |
( |
const CInetAddress & |
a1, |
|
|
const CInetAddress & |
a2 |
|
) |
[friend] |
|
Member Data Documentation
std::string NLNET::CInetAddress::_HostName [private]
|
|
sockaddr_in* NLNET::CInetAddress::_SockAddr [private]
|
|
|
Definition at line 162 of file inet_address.h.
Referenced by CInetAddress, init, internalIPAddress, ipAddress, isValid, operator=, port, serial, setByName, setPort, setSockAddr, sockAddr, and ~CInetAddress. |
bool NLNET::CInetAddress::_Valid [private]
|
|
bool NLNET::CInetAddress::RetrieveNames = false [static]
|
|
The documentation for this class was generated from the following files:
|
|