WvStreams
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | List of all members
WvIPAddr Class Reference

An IP address is made up of a "dotted quad" – four decimal numbers in the form www.xxx.yyy.zzz. More...

#include <wvaddr.h>

Inheritance diagram for WvIPAddr:
Inheritance graph
[legend]

Public Member Functions

 WvIPAddr (const unsigned char *_binaddr)
 
 WvIPAddr (const uint32_t _binaddr=0)
 
 WvIPAddr (const char string[])
 
 WvIPAddr (WvStringParm string)
 
void string_init (const char string[])
 
 WvIPAddr (const struct sockaddr *addr)
 
 WvIPAddr (const WvIPAddr &_addr)
 
virtual bool comparator (const WvAddr *a2, bool first_pass=true) const
 
virtual const char * type () const
 
WvIPAddr operator& (const WvIPAddr &a2) const
 
WvIPAddr operator| (const WvIPAddr &a2) const
 
WvIPAddr operator^ (const WvIPAddr &a2) const
 
WvIPAddr operator~ () const
 
WvIPAddr operator+ (int n) const
 
WvIPAddr operator- (int n) const
 
uint32_t addr () const
 
bool is_zero () const
 
virtual WvEncap encap () const
 
virtual struct sockaddr * sockaddr () const
 
virtual size_t sockaddr_len () const
 
virtual const unsigned char * rawdata () const
 
virtual size_t rawdata_len () const
 
 WvIPAddr (const unsigned char *_binaddr)
 
 WvIPAddr (const uint32_t _binaddr=0)
 
 WvIPAddr (const char string[])
 
 WvIPAddr (WvStringParm string)
 
void string_init (const char string[])
 
 WvIPAddr (const struct sockaddr *addr)
 
 WvIPAddr (const WvIPAddr &_addr)
 
virtual bool comparator (const WvAddr *a2, bool first_pass=true) const
 
virtual const char * type () const
 
WvIPAddr operator& (const WvIPAddr &a2) const
 
WvIPAddr operator| (const WvIPAddr &a2) const
 
WvIPAddr operator^ (const WvIPAddr &a2) const
 
WvIPAddr operator~ () const
 
WvIPAddr operator+ (int n) const
 
WvIPAddr operator- (int n) const
 
uint32_t addr () const
 
bool is_zero () const
 
virtual WvEncap encap () const
 
virtual struct sockaddr * sockaddr () const
 
virtual size_t sockaddr_len () const
 
virtual const unsigned char * rawdata () const
 
virtual size_t rawdata_len () const
 
 operator WvString () const
 
 operator WvString () const
 
virtual bool isbroadcast () const
 
virtual bool isbroadcast () const
 
virtual unsigned WvHash () const
 
virtual unsigned WvHash () const
 
bool operator== (const WvAddr &a2) const
 
bool operator== (const WvAddr &a2) const
 
bool operator!= (const WvAddr &a2) const
 
bool operator!= (const WvAddr &a2) const
 

Static Public Member Functions

static WvAddrgen (struct sockaddr *addr)
 
static WvAddrgen (struct sockaddr *addr)
 

Public Attributes

unsigned char binaddr [4]
 

Protected Member Functions

virtual WvString printable () const
 
virtual WvString printable () const
 

Detailed Description

An IP address is made up of a "dotted quad" – four decimal numbers in the form www.xxx.yyy.zzz.

We don't support automatic name lookups yet, but this will be the place to do it when support is added.

Definition at line 249 of file debian/libwvstreams-dev/usr/include/wvstreams/wvaddr.h.

Constructor & Destructor Documentation

◆ WvIPAddr() [1/12]

WvIPAddr::WvIPAddr ( const unsigned char *  _binaddr)
inline

◆ WvIPAddr() [2/12]

WvIPAddr::WvIPAddr ( const uint32_t  _binaddr = 0)
inline

◆ WvIPAddr() [3/12]

WvIPAddr::WvIPAddr ( const char  string[])
inline

◆ WvIPAddr() [4/12]

WvIPAddr::WvIPAddr ( WvStringParm  string)
inline

◆ WvIPAddr() [5/12]

WvIPAddr::WvIPAddr ( const struct sockaddr *  addr)
inline

◆ WvIPAddr() [6/12]

WvIPAddr::WvIPAddr ( const WvIPAddr _addr)
inline

◆ ~WvIPAddr()

WvIPAddr::~WvIPAddr ( )
virtual

Definition at line 395 of file wvaddr.cc.

◆ WvIPAddr() [7/12]

WvIPAddr::WvIPAddr ( const unsigned char *  _binaddr)
inline

Definition at line 256 of file include/wvaddr.h.

◆ WvIPAddr() [8/12]

WvIPAddr::WvIPAddr ( const uint32_t  _binaddr = 0)
inline

Definition at line 258 of file include/wvaddr.h.

◆ WvIPAddr() [9/12]

WvIPAddr::WvIPAddr ( const char  string[])
inline

Definition at line 260 of file include/wvaddr.h.

◆ WvIPAddr() [10/12]

WvIPAddr::WvIPAddr ( WvStringParm  string)
inline

Definition at line 262 of file include/wvaddr.h.

◆ WvIPAddr() [11/12]

WvIPAddr::WvIPAddr ( const struct sockaddr *  addr)
inline

Definition at line 265 of file include/wvaddr.h.

◆ WvIPAddr() [12/12]

WvIPAddr::WvIPAddr ( const WvIPAddr _addr)
inline

Definition at line 268 of file include/wvaddr.h.

Member Function Documentation

◆ printable() [1/2]

WvString WvIPAddr::printable ( ) const
protectedvirtual

Implements WvAddr.

Definition at line 427 of file wvaddr.cc.

◆ string_init()

void WvIPAddr::string_init ( const char  string[])

Definition at line 378 of file wvaddr.cc.

◆ comparator() [1/2]

bool WvIPAddr::comparator ( const WvAddr a2,
bool  first_pass = true 
) const
virtual

Reimplemented from WvAddr.

Definition at line 400 of file wvaddr.cc.

◆ type() [1/2]

virtual const char * WvIPAddr::type ( ) const
inlinevirtual

Reimplemented from WvAddr.

Definition at line 273 of file debian/libwvstreams-dev/usr/include/wvstreams/wvaddr.h.

◆ operator&()

WvIPAddr WvIPAddr::operator& ( const WvIPAddr a2) const

Definition at line 435 of file wvaddr.cc.

◆ operator|()

WvIPAddr WvIPAddr::operator| ( const WvIPAddr a2) const

Definition at line 446 of file wvaddr.cc.

◆ operator^()

WvIPAddr WvIPAddr::operator^ ( const WvIPAddr a2) const

Definition at line 457 of file wvaddr.cc.

◆ operator~()

WvIPAddr WvIPAddr::operator~ ( ) const

Definition at line 468 of file wvaddr.cc.

◆ operator+()

WvIPAddr WvIPAddr::operator+ ( int  n) const

Definition at line 481 of file wvaddr.cc.

◆ operator-()

WvIPAddr WvIPAddr::operator- ( int  n) const

Definition at line 488 of file wvaddr.cc.

◆ addr() [1/2]

uint32_t WvIPAddr::addr ( ) const
inline

◆ is_zero() [1/2]

bool WvIPAddr::is_zero ( ) const
inline

◆ encap() [1/2]

WvEncap WvIPAddr::encap ( ) const
virtual

Implements WvAddr.

Definition at line 495 of file wvaddr.cc.

◆ sockaddr() [1/2]

sockaddr_bin * WvIPAddr::sockaddr ( ) const
virtual

Implements WvAddr.

Definition at line 516 of file wvaddr.cc.

◆ sockaddr_len() [1/2]

size_t WvIPAddr::sockaddr_len ( ) const
virtual

Implements WvAddr.

Definition at line 528 of file wvaddr.cc.

◆ rawdata() [1/2]

const unsigned char * WvIPAddr::rawdata ( ) const
virtual

Reimplemented from WvAddr.

Definition at line 501 of file wvaddr.cc.

◆ rawdata_len() [1/2]

size_t WvIPAddr::rawdata_len ( ) const
virtual

Reimplemented from WvAddr.

Definition at line 507 of file wvaddr.cc.

◆ printable() [2/2]

virtual WvString WvIPAddr::printable ( ) const
protectedvirtual

Implements WvAddr.

◆ comparator() [2/2]

virtual bool WvIPAddr::comparator ( const WvAddr a2,
bool  first_pass = true 
) const
virtual

Reimplemented from WvAddr.

◆ type() [2/2]

virtual const char * WvIPAddr::type ( ) const
inlinevirtual

Reimplemented from WvAddr.

Definition at line 273 of file include/wvaddr.h.

◆ addr() [2/2]

uint32_t WvIPAddr::addr ( ) const
inline

Definition at line 283 of file include/wvaddr.h.

◆ is_zero() [2/2]

bool WvIPAddr::is_zero ( ) const
inline

Definition at line 286 of file include/wvaddr.h.

◆ encap() [2/2]

virtual WvEncap WvIPAddr::encap ( ) const
virtual

Implements WvAddr.

◆ sockaddr() [2/2]

virtual struct sockaddr * WvIPAddr::sockaddr ( ) const
virtual

Implements WvAddr.

◆ sockaddr_len() [2/2]

virtual size_t WvIPAddr::sockaddr_len ( ) const
virtual

Implements WvAddr.

◆ rawdata() [2/2]

virtual const unsigned char * WvIPAddr::rawdata ( ) const
virtual

Reimplemented from WvAddr.

◆ rawdata_len() [2/2]

virtual size_t WvIPAddr::rawdata_len ( ) const
virtual

Reimplemented from WvAddr.

◆ gen()

WvAddr * WvAddr::gen ( struct sockaddr *  addr)
staticinherited

Definition at line 99 of file wvaddr.cc.

◆ operator WvString() [1/2]

WvAddr::operator WvString ( ) const
inlineinherited

◆ operator WvString() [2/2]

WvAddr::operator WvString ( ) const
inlineinherited

Definition at line 129 of file include/wvaddr.h.

◆ isbroadcast()

bool WvAddr::isbroadcast ( ) const
virtualinherited

Definition at line 127 of file wvaddr.cc.

◆ WvHash() [1/2]

unsigned WvAddr::WvHash ( ) const
virtualinherited

Reimplemented in WvIPNet, and WvIPNet.

Definition at line 145 of file wvaddr.cc.

◆ WvHash() [2/2]

virtual unsigned WvAddr::WvHash ( ) const
virtualinherited

Reimplemented in WvIPNet, and WvIPNet.

◆ operator==() [1/2]

bool WvAddr::operator== ( const WvAddr a2) const
inlineinherited

◆ operator==() [2/2]

bool WvAddr::operator== ( const WvAddr a2) const
inlineinherited

Definition at line 146 of file include/wvaddr.h.

◆ operator!=() [1/2]

bool WvAddr::operator!= ( const WvAddr a2) const
inlineinherited

◆ operator!=() [2/2]

bool WvAddr::operator!= ( const WvAddr a2) const
inlineinherited

Definition at line 148 of file include/wvaddr.h.

Member Data Documentation

◆ binaddr

unsigned char WvIPAddr::binaddr

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