dtntunnel::TCPTunnel::TCPTunnel::Connection Class Reference

Helper class to handle an actively proxied connection. More...

#include <TCPTunnel.h>

List of all members.

Public Member Functions

 Connection (TCPTunnel *t, dtn_endpoint_id_t *dest_eid, in_addr_t client_addr, u_int16_t client_port, in_addr_t remote_addr, u_int16_t remote_port, u_int32_t connection_id)
 Constructor called to initiate a connection due to an arriving bundle request.
 Connection (TCPTunnel *t, dtn_endpoint_id_t *dest_eid, int fd, in_addr_t client_addr, u_int16_t client_port, in_addr_t remote_addr, u_int16_t remote_port, u_int32_t connection_id)
 Constructor called when a new connection was accepted.
 ~Connection ()
 Destructor.
int format (char *buf, size_t sz) const
 Virtual from Formatter.
void handle_bundle (dtn::APIBundle *bundle)
 Handle a newly arriving bundle.

Protected Types

typedef std::map< u_int32_t,
dtn::APIBundle * > 
ReorderTable
 Table for out-of-order bundles.

Protected Member Functions

void run ()
 virtual run method

Protected Attributes

TCPTunneltcptun_
 The tcp tunnel object.
oasys::TCPClient sock_
 The tcp socket.
dtn::APIBundleQueue queue_
 Queue for bundles on this connection.
ReorderTable reorder_table_
u_int32_t next_seqno_
 Running sequence number counter.
dtn_endpoint_id_t dest_eid_
 Parameters for the connection.
in_addr_t client_addr_
u_int16_t client_port_
in_addr_t remote_addr_
u_int16_t remote_port_
u_int32_t connection_id_

Friends

class TCPTunnel


Detailed Description

Helper class to handle an actively proxied connection.

Definition at line 73 of file TCPTunnel.h.


Member Typedef Documentation

typedef std::map<u_int32_t, dtn::APIBundle*> dtntunnel::TCPTunnel::TCPTunnel::Connection::ReorderTable [protected]

Table for out-of-order bundles.

Definition at line 116 of file TCPTunnel.h.


Constructor & Destructor Documentation

dtntunnel::TCPTunnel::TCPTunnel::Connection::Connection ( TCPTunnel t,
dtn_endpoint_id_t dest_eid,
in_addr_t  client_addr,
u_int16_t  client_port,
in_addr_t  remote_addr,
u_int16_t  remote_port,
u_int32_t  connection_id 
)

Constructor called to initiate a connection due to an arriving bundle request.

Definition at line 225 of file TCPTunnel.cc.

References dtntunnel::TCPTunnel::TCPTunnel::Connection::dest_eid_, and dtn_copy_eid().

dtntunnel::TCPTunnel::TCPTunnel::Connection::Connection ( TCPTunnel t,
dtn_endpoint_id_t dest_eid,
int  fd,
in_addr_t  client_addr,
u_int16_t  client_port,
in_addr_t  remote_addr,
u_int16_t  remote_port,
u_int32_t  connection_id 
)

Constructor called when a new connection was accepted.

Definition at line 245 of file TCPTunnel.cc.

References dtntunnel::TCPTunnel::TCPTunnel::Connection::dest_eid_, and dtn_copy_eid().

dtntunnel::TCPTunnel::TCPTunnel::Connection::~Connection (  ) 

Destructor.

Definition at line 266 of file TCPTunnel.cc.

References dtntunnel::TCPTunnel::TCPTunnel::Connection::queue_.


Member Function Documentation

int dtntunnel::TCPTunnel::TCPTunnel::Connection::format ( char *  buf,
size_t  sz 
) const

void dtntunnel::TCPTunnel::TCPTunnel::Connection::handle_bundle ( dtn::APIBundle bundle  ) 

void dtntunnel::TCPTunnel::TCPTunnel::Connection::run (  )  [protected]


Friends And Related Function Documentation

friend class TCPTunnel [friend]

Definition at line 101 of file TCPTunnel.h.


Member Data Documentation

in_addr_t dtntunnel::TCPTunnel::TCPTunnel::Connection::client_addr_ [protected]

u_int16_t dtntunnel::TCPTunnel::TCPTunnel::Connection::client_port_ [protected]

u_int32_t dtntunnel::TCPTunnel::TCPTunnel::Connection::connection_id_ [protected]

dtn_endpoint_id_t dtntunnel::TCPTunnel::TCPTunnel::Connection::dest_eid_ [protected]

u_int32_t dtntunnel::TCPTunnel::TCPTunnel::Connection::next_seqno_ [protected]

Running sequence number counter.

Definition at line 120 of file TCPTunnel.h.

Referenced by dtntunnel::TCPTunnel::TCPTunnel::Connection::handle_bundle().

dtn::APIBundleQueue dtntunnel::TCPTunnel::TCPTunnel::Connection::queue_ [protected]

in_addr_t dtntunnel::TCPTunnel::TCPTunnel::Connection::remote_addr_ [protected]

u_int16_t dtntunnel::TCPTunnel::TCPTunnel::Connection::remote_port_ [protected]

ReorderTable dtntunnel::TCPTunnel::TCPTunnel::Connection::reorder_table_ [protected]

oasys::TCPClient dtntunnel::TCPTunnel::TCPTunnel::Connection::sock_ [protected]

The tcp socket.

Definition at line 110 of file TCPTunnel.h.

Referenced by dtntunnel::TCPTunnel::TCPTunnel::Connection::run().

TCPTunnel* dtntunnel::TCPTunnel::TCPTunnel::Connection::tcptun_ [protected]

The tcp tunnel object.

Definition at line 107 of file TCPTunnel.h.

Referenced by dtntunnel::TCPTunnel::TCPTunnel::Connection::run().


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

Generated on Fri Jan 30 09:43:15 2009 for DTN Reference Implementation by  doxygen 1.5.8