ipv4addr.cpp File Reference

Detailed Description

Implementation of IPV4Addr class.

Definition in file ipv4addr.cpp.

#include <hn/hnprec.h>
#include <hn/ipv4addr.h>
#include <boost/lexical_cast.hpp>
#include <netinet/in.h>
#include <arpa/inet.h>

Include dependency graph for ipv4addr.cpp:

Go to the source code of this file.


namespace  Socket


uint32_t makeAddr (const std::string &addr)
 Makes internet address from string.
std::string getAddr (uint32_t ip)
 Creates human-readable address from ip.
std::ostream & operator<< (std::ostream &o, const IPV4Address &a)

Function Documentation

DLLEXPORT std::string Socket::getAddr uint32_t  ip  ) 

Creates human-readable address from ip.

Basically this is inet_aton.

ip Ip address
Human-readable address, e.g. ""

Definition at line 37 of file ipv4addr.cpp.

Referenced by IPV4Address::getAddrStr().

DLLEXPORT uint32_t Socket::makeAddr const std::string &  data  ) 

Makes internet address from string.

Basically this is inet_ntoa()

data Dot-separated IP address, e.g. ""
Internet address, used in binary formats.

Definition at line 34 of file ipv4addr.cpp.

Referenced by SchedBase::SchedBase(), and IPV4Address::setAddr().

std::ostream& operator<< std::ostream &  o,
const IPV4Address a

Definition at line 52 of file ipv4addr.cpp.