protlib::appladdress Class Reference

#include <source/ariba/utility/transport/tcpip/protlib/address.h>

Inherits protlib::hostaddress.

Collaboration diagram for protlib::appladdress:

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual appladdressnew_instance () const
virtual appladdresscopy () const
virtual bool operator== (const address &ie) const
virtual size_t get_hash () const
 hash function
 appladdress ()
 constructor
 appladdress (const appladdress &app)
 copy constructor
 appladdress (string socket)
 constructor for use as Unix Domain Address
 appladdress (int socket)
 constructor for use to specify a explicit socket number (used when no addressing for peer can be derived)
 appladdress (const hostaddress &h, protocol_t prot, port_t p)
 constructor from hostaddress, protocol ID and port
 appladdress (const sockaddr_in6 &sockaddr, protocol_t prot)
 constructor from sockaddr_in6 sockaddr
 appladdress (const hostaddress &h, const char *pname, port_t p, bool *res=NULL)
 constructor from hostaddress, protocol name and port
 appladdress (const char *str, protocol_t prot, port_t p, bool *res=NULL)
 constructor from string, protocol ID and port
 appladdress (const char *str, const char *pname, port_t p, bool *res=NULL)
 constructor from string, protocol name and port
 appladdress (const char *str, const char *pname, const char *portname, bool *res=NULL)
 constructor from string, protocol name and port name
appladdressoperator= (const appladdress &app)
 assignment
virtual ~appladdress ()
 virtual destructor
port_t set_port (port_t p)
 set port
port_t set_port (const char *pname, bool *res=NULL)
 set port
port_t set_port (const string &pname, bool *res=NULL)
 set port
port_t get_port () const
 get port
void get_sockaddr (struct sockaddr_in6 &sockaddr) const
 get sockaddr_in6
string get_port_name (bool *res=NULL) const
 get port name
protocol_t set_protocol (protocol_t p)
 set protocol by ID
protocol_t set_protocol (const char *pname, bool *res=NULL)
 set protocol by name
protocol_t set_protocol (const string &pname, bool *res=NULL)
 set protocol by name
protocol_t get_protocol () const
 get protocol ID
string get_protocol_name (bool *res=NULL) const
 get protocol name
uint8 get_prefix () const
 get prefix
void set_prefix (uint8 prfx)
 set prefix
void set_ip_ttl (uint16 ttl)
 set IP TTL
void unset_ip_ttl ()
 unset IP TTL
uint16 get_ip_ttl () const
 get IP TTL, if == 0, no IP TTL should be set
void set_rao (uint16 value)
 set RAO value
void unset_rao ()
 unset RAO value
uint16 get_rao () const
 get RAO value
bool rao_present () const
 test if RAO present
void set_if_index (uint16 value)
 set outgoing Interface index
uint16 get_if_index () const
 get outgoing Interface index
void unset_if_index ()
 unset outgoing Interface index

Protected Member Functions

virtual void set_subtype (bool ipv4)
 set subtype and IPv4 flag

Private Attributes

protocol_t proto
port_t port
uint8 prefix
uint16 rao
uint16 ip_ttl
bool rao_presence
uint16 if_index


Detailed Description

======================================================== IP Application Address ======================================================== Consists of a IP Host Address and a port number.

Definition at line 216 of file address.h.


Constructor & Destructor Documentation

protlib::appladdress::appladdress (  )  [inline]

constructor

Constructor sets address type and clears port sets prefix to 32 (ipv4).

Definition at line 386 of file address.h.

References protlib::hostaddress::ipv4flag, and set_subtype().

Referenced by copy(), and new_instance().

protlib::appladdress::appladdress ( const appladdress app  )  [inline]

copy constructor

Definition at line 401 of file address.h.

References protlib::hostaddress::ipv4flag, and set_subtype().

protlib::appladdress::appladdress ( string  socket  ) 

constructor for use as Unix Domain Address

protlib::appladdress::appladdress ( int  socket  ) 

constructor for use to specify a explicit socket number (used when no addressing for peer can be derived)

protlib::appladdress::appladdress ( const hostaddress h,
protocol_t  prot,
port_t  p 
) [inline]

constructor from hostaddress, protocol ID and port

Initialize with the given host address, protocol ID and port number.

Definition at line 421 of file address.h.

References protlib::hostaddress::ipv4flag, and set_subtype().

protlib::appladdress::appladdress ( const sockaddr_in6 &  sockaddr,
protocol_t  prot 
) [inline]

constructor from sockaddr_in6 sockaddr

Definition at line 378 of file address.h.

protlib::appladdress::appladdress ( const hostaddress h,
const char *  pname,
port_t  p,
bool *  res = NULL 
) [inline]

constructor from hostaddress, protocol name and port

Initialize with the given host address, protocol name and port number. If no protocol ID can be found in the protocol database, it is set to 0.

Definition at line 440 of file address.h.

References protlib::hostaddress::ipv4flag, and set_subtype().

protlib::appladdress::appladdress ( const char *  str,
protocol_t  prot,
port_t  p,
bool *  res = NULL 
) [inline]

constructor from string, protocol ID and port

Initialize from string, protocol ID and port. If the string does not contain a vaild IP address, it is set to all 0 by the hostaddress constructor.

Definition at line 461 of file address.h.

References protlib::hostaddress::ipv4flag, and set_subtype().

protlib::appladdress::appladdress ( const char *  str,
const char *  pname,
port_t  p,
bool *  res = NULL 
) [inline]

constructor from string, protocol name and port

Initialize from string, protocol name and port. If the string does not contain a vaild IP address, it is set to all 0 by the hostaddress constructor. If no protocol ID can be found in the protocol database, it is set to 0.

Definition at line 480 of file address.h.

References protlib::tsdb::getprotobyname(), protlib::hostaddress::ipv4flag, proto, and set_subtype().

protlib::appladdress::appladdress ( const char *  str,
const char *  pname,
const char *  portname,
bool *  res = NULL 
) [inline]

constructor from string, protocol name and port name

Initialize from string, protocol name and port name. If the string does not contain a vaild IP address, it is set to all 0 by the hostaddress constructor. If no protocol ID can be found in the protocol database, it is set to 0. If no port number can be found in the service database, it is set to 0.

Definition at line 504 of file address.h.

References protlib::tsdb::get_portnumber(), protlib::tsdb::getprotobyname(), protlib::hostaddress::ipv4flag, port, prefix, proto, and set_subtype().

virtual protlib::appladdress::~appladdress (  )  [inline, virtual]

virtual destructor

Definition at line 253 of file address.h.


Member Function Documentation

size_t protlib::appladdress::get_hash (  )  const [inline, virtual]

hash function

Reimplemented from protlib::hostaddress.

Definition at line 615 of file address.h.

References protlib::hostaddress::get_hash(), port, and proto.

Referenced by __gnu_cxx::hash< protlib::appladdress >::operator()().

uint16 protlib::appladdress::get_if_index (  )  const [inline]

get outgoing Interface index

Definition at line 350 of file address.h.

References if_index.

Referenced by protlib::TPoverUDP::udpsend().

uint16 protlib::appladdress::get_ip_ttl (  )  const [inline]

get IP TTL, if == 0, no IP TTL should be set

Definition at line 310 of file address.h.

References ip_ttl.

Referenced by protlib::TPoverUDP::udpsend().

port_t protlib::appladdress::get_port (  )  const [inline]

string protlib::appladdress::get_port_name ( bool *  res = NULL  )  const [inline]

get port name

Definition at line 574 of file address.h.

References protlib::tsdb::get_portname(), port, and proto.

uint8 protlib::appladdress::get_prefix (  )  const [inline]

get prefix

Definition at line 284 of file address.h.

References prefix.

protocol_t protlib::appladdress::get_protocol (  )  const [inline]

get protocol ID

Definition at line 607 of file address.h.

References proto.

string protlib::appladdress::get_protocol_name ( bool *  res = NULL  )  const [inline]

get protocol name

Definition at line 610 of file address.h.

References protlib::tsdb::getprotobynumber(), and proto.

Referenced by protlib::operator<<().

uint16 protlib::appladdress::get_rao (  )  const [inline]

get RAO value

Definition at line 331 of file address.h.

References rao.

void protlib::appladdress::get_sockaddr ( struct sockaddr_in6 &  sockaddr  )  const [inline]

get sockaddr_in6

Definition at line 622 of file address.h.

References protlib::hostaddress::ipv4flag, protlib::hostaddress::ipv6addr, and port.

Referenced by protlib::TPoverTCP::get_connection_to().

appladdress & protlib::appladdress::operator= ( const appladdress app  )  [inline]

assignment

Assigns the given application address by using hostaddress::operator=().

Definition at line 526 of file address.h.

References if_index, ip_ttl, port, prefix, proto, rao, and rao_presence.

bool protlib::appladdress::rao_present (  )  const [inline]

test if RAO present

Definition at line 338 of file address.h.

References rao_presence.

void protlib::appladdress::set_if_index ( uint16  value  )  [inline]

set outgoing Interface index

Definition at line 344 of file address.h.

References if_index.

void protlib::appladdress::set_ip_ttl ( uint16  ttl  )  [inline]

set IP TTL

Definition at line 296 of file address.h.

References ip_ttl.

port_t protlib::appladdress::set_port ( const string &  pname,
bool *  res = NULL 
) [inline]

set port

Set port and return old value. If the port name is not found in the service database, port is set to 0.

Definition at line 564 of file address.h.

References protlib::tsdb::get_portnumber(), port, and proto.

port_t protlib::appladdress::set_port ( const char *  pname,
bool *  res = NULL 
) [inline]

set port

Set port and return old value. If the port name is not found in the service database, port is set to 0.

Definition at line 554 of file address.h.

References protlib::tsdb::get_portnumber(), port, and proto.

port_t protlib::appladdress::set_port ( port_t  p  )  [inline]

set port

are they equivalent virtual bool equiv(const appladdress& h) const { return hostaddress::equiv(h); }

Set port and return old value.

Definition at line 542 of file address.h.

References port.

Referenced by protlib::TPoverUDP::listener_thread().

void protlib::appladdress::set_prefix ( uint8  prfx  )  [inline]

set prefix

Definition at line 290 of file address.h.

References prefix.

protocol_t protlib::appladdress::set_protocol ( const string &  pname,
bool *  res = NULL 
) [inline]

set protocol by name

Set protocol ID and return old value. If no protocol ID can be found in the protocol database, it is set to 0.

Definition at line 600 of file address.h.

References protlib::tsdb::getprotobyname(), and proto.

protocol_t protlib::appladdress::set_protocol ( const char *  pname,
bool *  res = NULL 
) [inline]

set protocol by name

Set protocol ID and return old value. If no protocol ID can be found in the protocol database, it is set to 0.

Definition at line 590 of file address.h.

References protlib::tsdb::getprotobyname(), and proto.

protocol_t protlib::appladdress::set_protocol ( protocol_t  p  )  [inline]

set protocol by ID

Set protocol ID and return old value.

Definition at line 580 of file address.h.

References proto.

Referenced by protlib::TPoverUDP::listener_thread().

void protlib::appladdress::set_rao ( uint16  value  )  [inline]

set RAO value

Definition at line 317 of file address.h.

References rao, and rao_presence.

void protlib::appladdress::set_subtype ( bool  ipv4  )  [inline, protected, virtual]

set subtype and IPv4 flag

Set subtype and IPv4 flag. This does NOT clear the outstring buffer. Use clear_ip().

Reimplemented from protlib::hostaddress.

Definition at line 1351 of file address.h.

References protlib::address::IPv4ApplAddress, protlib::hostaddress::ipv4flag, protlib::address::IPv6ApplAddress, and protlib::address::subtype.

Referenced by appladdress().

void protlib::appladdress::unset_if_index (  )  [inline]

unset outgoing Interface index

Definition at line 356 of file address.h.

References if_index.

void protlib::appladdress::unset_ip_ttl (  )  [inline]

unset IP TTL

Definition at line 303 of file address.h.

References ip_ttl.

void protlib::appladdress::unset_rao (  )  [inline]

unset RAO value

Definition at line 324 of file address.h.

References rao, and rao_presence.


Member Data Documentation

Definition at line 372 of file address.h.

Referenced by get_if_index(), operator=(), set_if_index(), and unset_if_index().

Definition at line 370 of file address.h.

Referenced by get_ip_ttl(), operator=(), set_ip_ttl(), and unset_ip_ttl().

Definition at line 367 of file address.h.

Referenced by appladdress(), get_prefix(), operator=(), and set_prefix().

Definition at line 369 of file address.h.

Referenced by get_rao(), operator=(), set_rao(), and unset_rao().

Definition at line 371 of file address.h.

Referenced by operator=(), rao_present(), set_rao(), and unset_rao().


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

Generated on Fri Aug 14 23:39:46 2009 for Ariba by  doxygen 1.5.8