protlib Namespace Reference
[Address ObjectsThreadsFast QueueInformation ElementsInternal MessagesNetwork MessagesQueue ManagerThread-safe setuid program supportThread-safe DBTimerTimer ModuleTransport ProtocolTP over TCPTP over UDP]


Namespaces

namespace  log

Classes

class  address
 Address base class. More...
class  hostaddress
 IP Host Address. More...
class  appladdress
class  netaddress
 Network Prefix (or net address). More...
class  udsaddress
 Unix Domain Socket Address. More...
class  RadixTrie
class  AddressList
struct  AssocData
 SCTP lib interface. More...
struct  AssocDataUDS
 SCTP lib interface. More...
class  ConnectionMap
class  ConnectionMapUDS
class  FastQueue
class  IE
class  IEError
class  PDUSyntaxError
class  IEMsgTooShort
class  IEWrongVersion
class  IEWrongType
class  IEWrongSubtype
class  IEWrongLength
class  IETooBigForImpl
class  IEProtocolSpecific
class  IEErrorList
 IE error list. More...
class  IE_Key
struct  hash_IE_Key
class  IEManager
class  message
 internal messages More...
class  NetMsgError
class  NetMsg
 network message More...
class  ProtLibException
class  uint128
class  QueueManagerError
 QueueManager errors. More...
class  QueueManager
class  setuid
 Thread-safe setuid. More...
class  ThreadParam
class  ThreadError
class  Thread
class  ThreadStarter
class  tsdb
 Thread-safe DB. More...
class  TimerCallback
 Timer Callback. More...
class  TimerManager
 Timer Manager. More...
class  TimerMsg
 timer message More...
struct  TimerModuleParam
 timer module parameters More...
class  TimerModule
 timer module class More...
class  TP
 transport protocol base class More...
class  TPMsg
 transport protcol message More...
struct  TPoverTCPParam
class  TPoverTCP
 TP over TCP. More...
class  TPoverTCPMsg
struct  TPoverUDPParam
class  TPoverUDP
 TP over UDP. More...
class  TPoverUDPMsg
class  TPError
 Transport Protocol Error. More...
class  TPErrorBadDestAddress
class  TPErrorArgsNotInit
class  TPErrorUnreachable
class  TPErrorInternal
class  TPErrorPayload
class  TPErrorInitFailed
class  TPErrorSendFailed
class  TPErrorConnectSetupFail
class  TPErrorCloseInd
class  TPErrorAbortInd

Typedefs

typedef unsigned char uchar
typedef char int8
typedef unsigned char uint8
typedef short int int16
typedef unsigned short int uint16
typedef int32_t int32
typedef u_int32_t uint32
typedef int64_t int64
typedef u_int64_t uint64
typedef uint8 prefix_length_t
 Network prefix length.
typedef uint8 protocol_t
 Protocol number, as it is given in an IP header.
typedef uint16 port_t
 Port number, as given in TCP or UDP headers.
typedef uint64 gp_id_t
 A general purpose ID type.
typedef uint64 timer_id_t
 timer ID
typedef void * timer_callback_param_t
 timer callback parameter
typedef int socketfd_t
 socket type interface
typedef unsigned int associd_t

Functions

ostream & operator<< (ostream &out, const hostaddress &addr)
ostream & operator<< (ostream &out, const netaddress &addr)
ostream & operator<< (ostream &out, const AddressList::AddrProperty &prop)
ostream & operator<< (ostream &out, const appladdress &addr)
ostream & operator<< (ostream &out, const udsaddress &addr)
template<class T >
void call_unlock (void *pobj)
 unlock template
void call_void_fun (void(*f)())
 call void function
ostream & operator<< (ostream &os, const IE &ie)
 print an IE to an ostream
istream & operator>> (istream &is, IE &ie)
 input operator
uint32 round_up4 (uint32 i)
 round uint32 up
ostream & operator<< (ostream &os, NetMsg &msg)
std::ostream & operator<< (std::ostream &out, const NetMsg &msg)
ostream & operator<< (ostream &os, const ProtLibException &err)
template<class T >
void * thread_starter (void *thread_object)
static void normalize_timespec (struct timespec &ts)
static void fill_timespec (struct timespec &ts, int32 sec, int32 msec)
static void add_timespecs (struct timespec &ts1, struct timespec &ts2, struct timespec &res)
static void gettimeofday_timespec (struct timespec &ts)

Variables

const protocol_t prot_tls_tcp = 254
const protocol_t prot_query_encap = 255
const protocol_t prot_tcp = IPPROTO_TCP
const protocol_t prot_udp = IPPROTO_UDP
const protocol_t prot_sctp = IPPROTO_SCTP
static const char *const action_t_str []
char in6_addrstr [INET6_ADDRSTRLEN+1]
char in6_addrstr_loc [INET6_ADDRSTRLEN+1]

Detailed Description

GIST address objects

----------------------------------------------------------

Id
assocdata_uds.h 2872 2008-02-18 10:58:03Z bless
HeadURL
https://svn.ipv6.tm.uka.de/nsis/protlib/trunk/include/assocdata_uds.h

This header file defines a preprocessor macro to install cleanup handlers.

This cannot be done without macros because the pthread library also uses macros for cleanup. References to a common base class of all lockable classes also are not useful because they are casted to void* and cannot be casted back correctly after that in all cases, especially when pointers are changed while casting. This happens when casting around in a type hierarchy.

This file defines the base class of all information elements, the information elements for the GIST protocol and an IE manager singleton object. Although the IEs are closely related to the structure of GIST messages, they may be used in other contexts as well because of the coding shemes.

Todo:
Use objectpool by deriving classes from class poolobject and linking executables against objectpool.o or including objectpool.o into libie.a.
This header file defines the base class of all information elements, the information elements for the protocol and an IE manager object.

For performance only pointers are exchanged. The copy member function is the way to duplicate an IE. It does much the same as a copy constructor but returns not the IE but a pointer to it. If the IE contains pointers, their target objects are copied too.

These messages are sent internally between threads (modules).

This is a generic class for network messages, represented as a byte stream (buffer containing bytes).

This is a generic class for network messages. A network message consists of a number of bytes. There are no access member functions. So the user has full control over the buffer.

This is the queuemanager which records queues and message source IDs.

Thread-safe setuid support for linux. Change effective user ID in a thread-safe way.

tsdb::init() must be called before calling setuid::init().

Classes to support multi-threaded programming.

A Thread module class must inherit from Thread. Several instances may run simultaneously but they share exactly one module object. So you must take care of this fact when writing the module code and use locks accordingly.

Use lock(), unlock(), wait_cond() and signal_cond() the way you would use the corresponding POSIX thread functions.

Use the ThreadStarter template class to create threads.

As the reentrant functions for netdb access seem not portable, I decided to write some wrappers for those functions I need. This is not object-oriented because the NetDB would be another singleton object and I only want some wrapper functions.

Thread-safe netdb access for linux.

As the reentrant functions for netdb access seem not portable, I decided to write some wrappers for those functions I need. This is not object-oriented because the NetDB would be another singleton object and I only want some wrapper functions.

You can create a software timer and attach a callback object to it. Timers are only accessed through their TimerManager and timer ID. timer managers are thread-safe.

Timers are stored in an ordered list to ease checking for elapsed timers. Additionally, their IDs are kept in a hash_map, so a pointer to a timer object can be obtained very fast.

The timer module provides a way for other modules to set timers via a message and receive a message back on their queue when the timer goes off.

This is the interface for sending network messages over a transport protocol. You can receive messages through queues.

@ file TP over TCP

@ file TP over UDP


Function Documentation

ostream& protlib::operator<< ( ostream &  out,
const udsaddress &  addr 
) [inline]

ostream& protlib::operator<< ( ostream &  out,
const appladdress &  addr 
) [inline]

ostream& protlib::operator<< ( ostream &  out,
const AddressList::AddrProperty &  prop 
) [inline]

ostream& protlib::operator<< ( ostream &  out,
const netaddress &  addr 
) [inline]

ostream& protlib::operator<< ( ostream &  out,
const hostaddress &  addr 
) [inline]

Definition at line 199 of file address.h.

References protlib::hostaddress::get_ip_str().


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