Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

WvIPPortAddr Class Reference

#include <wvaddr.h>

Inherits WvIPAddr.

Collaboration diagram for WvIPPortAddr:

[legend]
List of all members.

Detailed Description

An IP+Port address also includes a port number, with the resulting form www.xxx.yyy.zzz:pppp.

Note that the rawdata() function is inherited from WvIPAddr, so it does not include the port number in the raw data.

Definition at line 387 of file wvaddr.h.

Public Member Functions

 WvIPPortAddr ()
 WvIPPortAddr (const unsigned char _ipaddr[4], __u16 _port=0)
 WvIPPortAddr (const WvIPAddr &_ipaddr, __u16 _port=0)
 WvIPPortAddr (const char string[])
 WvIPPortAddr (WvStringParm string)
void string_init (const char string[])
 WvIPPortAddr (__u16 _port)
 WvIPPortAddr (const char string[], __u16 _port)
 WvIPPortAddr (struct sockaddr_in *sin)
virtual ~WvIPPortAddr ()
virtual bool comparator (const WvAddr *a2, bool first_pass=true) const
virtual const char * type () const
virtual struct sockaddr * sockaddr () const
virtual unsigned WvHash () 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
__u32 addr () const
bool is_zero () const
virtual WvEncap encap () const
virtual size_t sockaddr_len () const
virtual const unsigned char * rawdata () const
virtual size_t rawdata_len () const
 operator WvString () const
virtual bool isbroadcast () const
bool operator== (const WvAddr &a2) const
bool operator!= (const WvAddr &a2) const

Static Public Member Functions

WvAddrgen (struct sockaddr *addr)

Public Attributes

__u16 port
unsigned char binaddr [4]

Protected Member Functions

virtual WvString printable () const


Constructor & Destructor Documentation

WvIPPortAddr::WvIPPortAddr  ) 
 

Definition at line 644 of file wvaddr.cc.

References port.

WvIPPortAddr::WvIPPortAddr const unsigned char  _ipaddr[4],
__u16  _port = 0
[inline]
 

Definition at line 396 of file wvaddr.h.

References port.

WvIPPortAddr::WvIPPortAddr const WvIPAddr _ipaddr,
__u16  _port = 0
 

Definition at line 650 of file wvaddr.cc.

References __u16, and port.

WvIPPortAddr::WvIPPortAddr const char  string[]  )  [inline]
 

Definition at line 399 of file wvaddr.h.

References string_init().

WvIPPortAddr::WvIPPortAddr WvStringParm  string  )  [inline]
 

Definition at line 401 of file wvaddr.h.

References string_init(), and WvStringParm.

WvIPPortAddr::WvIPPortAddr __u16  _port  ) 
 

Definition at line 685 of file wvaddr.cc.

References __u16, and port.

WvIPPortAddr::WvIPPortAddr const char  string[],
__u16  _port
 

Definition at line 692 of file wvaddr.cc.

References __u16, and port.

WvIPPortAddr::WvIPPortAddr struct sockaddr_in *  sin  )  [inline]
 

Definition at line 407 of file wvaddr.h.

References port.

WvIPPortAddr::~WvIPPortAddr  )  [virtual]
 

Definition at line 699 of file wvaddr.cc.


Member Function Documentation

__u32 WvIPAddr::addr  )  const [inline, inherited]
 

Definition at line 277 of file wvaddr.h.

References __u32, and WvIPAddr::binaddr.

Referenced by WvIPNet::bits(), WvIPAddr::is_zero(), WvIPAddr::operator+(), WvIPAddr::operator-(), and WvIPAddr::sockaddr().

bool WvIPPortAddr::comparator const WvAddr a2,
bool  first_pass = true
const [virtual]
 

Reimplemented from WvIPAddr.

Definition at line 728 of file wvaddr.cc.

References WvAddr::comparator(), WvIPAddr::comparator(), port, WvAddr::type(), and WVIPPORTADDR.

WvEncap WvIPAddr::encap  )  const [virtual, inherited]
 

Implements WvAddr.

Definition at line 481 of file wvaddr.cc.

WvAddr * WvAddr::gen struct sockaddr *  addr  )  [static, inherited]
 

Definition at line 89 of file wvaddr.cc.

References WvEncap::cap, and WvAddr::encap().

Referenced by WvInterface::hwaddr().

bool WvIPAddr::is_zero  )  const [inline, inherited]
 

Definition at line 280 of file wvaddr.h.

References WvIPAddr::addr().

bool WvAddr::isbroadcast  )  const [virtual, inherited]
 

Reimplemented in WvEtherAddr.

Definition at line 114 of file wvaddr.cc.

WvIPAddr WvIPAddr::operator & const WvIPAddr a2  )  const [inherited]
 

Definition at line 421 of file wvaddr.cc.

References WvIPAddr::binaddr, and WvIPAddr::WvIPAddr().

WvAddr::operator WvString  )  const [inline, inherited]
 

Definition at line 123 of file wvaddr.h.

References WvAddr::printable().

bool WvAddr::operator!= const WvAddr a2  )  const [inline, inherited]
 

Definition at line 142 of file wvaddr.h.

WvIPAddr WvIPAddr::operator+ int  n  )  const [inherited]
 

Definition at line 467 of file wvaddr.cc.

References __u32, WvIPAddr::addr(), and WvIPAddr::WvIPAddr().

WvIPAddr WvIPAddr::operator- int  n  )  const [inherited]
 

Definition at line 474 of file wvaddr.cc.

References __u32, WvIPAddr::addr(), and WvIPAddr::WvIPAddr().

bool WvAddr::operator== const WvAddr a2  )  const [inline, inherited]
 

Definition at line 140 of file wvaddr.h.

References WvAddr::comparator().

WvIPAddr WvIPAddr::operator^ const WvIPAddr a2  )  const [inherited]
 

Definition at line 443 of file wvaddr.cc.

References WvIPAddr::binaddr, and WvIPAddr::WvIPAddr().

WvIPAddr WvIPAddr::operator| const WvIPAddr a2  )  const [inherited]
 

Definition at line 432 of file wvaddr.cc.

References WvIPAddr::binaddr, and WvIPAddr::WvIPAddr().

WvIPAddr WvIPAddr::operator~  )  const [inherited]
 

Definition at line 454 of file wvaddr.cc.

References WvIPAddr::binaddr, and WvIPAddr::WvIPAddr().

WvString WvIPPortAddr::printable  )  const [protected, virtual]
 

Reimplemented from WvIPAddr.

Definition at line 706 of file wvaddr.cc.

References port.

const unsigned char * WvIPAddr::rawdata  )  const [virtual, inherited]
 

Reimplemented from WvAddr.

Definition at line 487 of file wvaddr.cc.

References WvIPAddr::binaddr.

Referenced by WvIPAddr::comparator().

size_t WvIPAddr::rawdata_len  )  const [virtual, inherited]
 

Reimplemented from WvAddr.

Definition at line 493 of file wvaddr.cc.

Referenced by WvIPAddr::comparator().

sockaddr_bin * WvIPPortAddr::sockaddr  )  const [virtual]
 

Reimplemented from WvIPAddr.

Definition at line 715 of file wvaddr.cc.

References port, WvIPAddr::sockaddr(), and sockaddr_bin.

Referenced by WvTCPConn::do_connect(), WvUDPStream::uwrite(), WvTCPListener::WvTCPListener(), and WvUDPStream::WvUDPStream().

size_t WvIPAddr::sockaddr_len  )  const [virtual, inherited]
 

Implements WvAddr.

Definition at line 514 of file wvaddr.cc.

Referenced by WvInterface::addarp(), WvTCPConn::do_connect(), WvInterface::setipaddr(), WvUDPStream::uwrite(), WvIPRawStream::uwrite(), WvIPRawStream::WvIPRawStream(), WvTCPListener::WvTCPListener(), and WvUDPStream::WvUDPStream().

void WvIPPortAddr::string_init const char  string[]  ) 
 

Reimplemented from WvIPAddr.

Definition at line 658 of file wvaddr.cc.

References port.

Referenced by WvIPPortAddr().

virtual const char* WvIPPortAddr::type  )  const [inline, virtual]
 

Reimplemented from WvIPAddr.

Definition at line 412 of file wvaddr.h.

References WVIPPORTADDR.

unsigned WvIPPortAddr::WvHash  )  const [virtual]
 

Reimplemented from WvAddr.

Definition at line 723 of file wvaddr.cc.

References port, and WvAddr::WvHash().


Member Data Documentation

unsigned char WvIPAddr::binaddr[4] [inherited]
 

Definition at line 248 of file wvaddr.h.

Referenced by WvIPAddr::addr(), WvIPAddr::comparator(), WvIPNet::is_default(), WvIPNet::is_host(), WvIPAddr::operator &(), WvIPAddr::operator^(), WvIPAddr::operator|(), WvIPAddr::operator~(), WvIPAddr::printable(), WvIPAddr::rawdata(), WvIPAddr::string_init(), and WvIPAddr::WvIPAddr().

__u16 WvIPPortAddr::port
 

Definition at line 393 of file wvaddr.h.

Referenced by WvTCPConn::check_resolver(), comparator(), printable(), sockaddr(), string_init(), WvHash(), WvIPPortAddr(), WvTCPConn::WvTCPConn(), and WvTCPListener::WvTCPListener().


The documentation for this class was generated from the following files:
Generated on Sat Feb 21 21:06:29 2004 for WvStreams by doxygen 1.3.5