dtntunnel::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::Connection::ReorderTable [protected]

Table for out-of-order bundles.

Definition at line 116 of file TCPTunnel.h.


Constructor & Destructor Documentation

dtntunnel::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 dest_eid_, and dtn_copy_eid().

dtntunnel::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 dest_eid_, and dtn_copy_eid().

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

Destructor.

Definition at line 266 of file TCPTunnel.cc.

References queue_.


Member Function Documentation

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

Virtual from Formatter.

Definition at line 276 of file TCPTunnel.cc.

References client_addr_, client_port_, connection_id_, dest_eid_, remote_addr_, remote_port_, and dtn_endpoint_id_t::uri.

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

Handle a newly arriving bundle.

Definition at line 499 of file TCPTunnel.cc.

References next_seqno_, dtn::APIBundle::payload_, queue_, reorder_table_, and dtntunnel::DTNTunnel::BundleHeader::seqno_.

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

Friends And Related Function Documentation

friend class TCPTunnel [friend]

Definition at line 101 of file TCPTunnel.h.


Member Data Documentation

Parameters for the connection.

Definition at line 123 of file TCPTunnel.h.

Referenced by Connection(), format(), dtntunnel::TCPTunnel::kill_connection(), dtntunnel::TCPTunnel::new_connection(), and run().

Running sequence number counter.

Definition at line 120 of file TCPTunnel.h.

Referenced by handle_bundle().

Queue for bundles on this connection.

Definition at line 113 of file TCPTunnel.h.

Referenced by handle_bundle(), run(), and ~Connection().

Definition at line 117 of file TCPTunnel.h.

Referenced by handle_bundle().

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

The tcp socket.

Definition at line 110 of file TCPTunnel.h.

Referenced by run().

The tcp tunnel object.

Definition at line 107 of file TCPTunnel.h.

Referenced by run().


The documentation for this class was generated from the following files:
Generated on Sun Nov 21 13:21:28 2010 for DTN Reference Implementation by  doxygen 1.6.3