dtntunnel::DTNTunnel Class Reference

Main wrapper class for the DTN Tunnel. More...

#include <DTNTunnel.h>

List of all members.

Classes

struct  BundleHeader
 Struct to encapsulate the header sent with each tunneled bundle. More...

Public Member Functions

 DTNTunnel ()
 Constructor.
int send_bundle (dtn::APIBundle *bundle, dtn_endpoint_id_t *dest_eid)
 Hook for various tunnel classes to send a bundle.
int handle_bundle (dtn_bundle_spec_t *spec, dtn_bundle_payload_t *payload)
 Called for arriving bundles.
int main (int argc, char *argv[])
 Main application loop.
void fill_options ()
 Virtual from oasys::App.
void validate_options (int argc, char *const argv[], int remainder)
u_int max_size ()
 Accessors.
u_int delay ()
dtn_endpoint_id_tdest_eid ()

Public Attributes

struct
dtntunnel::DTNTunnel::BundleHeader 
packed
 Struct to encapsulate the header sent with each tunneled bundle.

Protected Member Functions

void init_tunnel ()
void init_registration ()

Protected Attributes

UDPTunneludptunnel_
TCPTunneltcptunnel_
dtn_handle_t recv_handle_
dtn_handle_t send_handle_
oasys::Mutex send_lock_
bool listen_
dtn_endpoint_id_t local_eid_
dtn_endpoint_id_t dest_eid_
bool custody_
u_int expiration_
bool tcp_
bool udp_
in_addr_t local_addr_
u_int16_t local_port_
in_addr_t remote_addr_
u_int16_t remote_port_
u_int delay_
u_int max_size_
std::string tunnel_spec_
bool tunnel_spec_set_

Detailed Description

Main wrapper class for the DTN Tunnel.

Definition at line 39 of file DTNTunnel.h.


Constructor & Destructor Documentation

dtntunnel::DTNTunnel::DTNTunnel (  ) 

Constructor.

Definition at line 47 of file DTNTunnel.cc.

References dest_eid_, and local_eid_.


Member Function Documentation

u_int dtntunnel::DTNTunnel::delay (  )  [inline]

Definition at line 107 of file DTNTunnel.h.

References delay_.

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

dtn_endpoint_id_t* dtntunnel::DTNTunnel::dest_eid (  )  [inline]

Definition at line 108 of file DTNTunnel.h.

References dest_eid_.

Referenced by dtntunnel::UDPTunnel::Listener::run().

void dtntunnel::DTNTunnel::fill_options (  ) 

Virtual from oasys::App.

Definition at line 73 of file DTNTunnel.cc.

References custody_, delay_, expiration_, listen_, local_eid_, max_size_, tcp_, tunnel_spec_, tunnel_spec_set_, and udp_.

int dtntunnel::DTNTunnel::handle_bundle ( dtn_bundle_spec_t spec,
dtn_bundle_payload_t payload 
)
void dtntunnel::DTNTunnel::init_registration (  )  [protected]
void dtntunnel::DTNTunnel::init_tunnel (  )  [protected]
int dtntunnel::DTNTunnel::main ( int  argc,
char *  argv[] 
)
u_int dtntunnel::DTNTunnel::max_size (  )  [inline]

Accessors.

Definition at line 106 of file DTNTunnel.h.

References max_size_.

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

int dtntunnel::DTNTunnel::send_bundle ( dtn::APIBundle bundle,
dtn_endpoint_id_t dest_eid 
)
void dtntunnel::DTNTunnel::validate_options ( int  argc,
char *const   argv[],
int  remainder 
)

Member Data Documentation

Definition at line 120 of file DTNTunnel.h.

Referenced by fill_options(), and send_bundle().

u_int dtntunnel::DTNTunnel::delay_ [protected]

Definition at line 128 of file DTNTunnel.h.

Referenced by delay(), and fill_options().

Definition at line 119 of file DTNTunnel.h.

Referenced by dest_eid(), DTNTunnel(), init_registration(), and validate_options().

Definition at line 121 of file DTNTunnel.h.

Referenced by fill_options(), and send_bundle().

Definition at line 117 of file DTNTunnel.h.

Referenced by fill_options(), init_registration(), init_tunnel(), and validate_options().

in_addr_t dtntunnel::DTNTunnel::local_addr_ [protected]

Definition at line 124 of file DTNTunnel.h.

Referenced by init_registration(), init_tunnel(), and validate_options().

Definition at line 118 of file DTNTunnel.h.

Referenced by DTNTunnel(), fill_options(), init_registration(), and send_bundle().

u_int16_t dtntunnel::DTNTunnel::local_port_ [protected]

Definition at line 125 of file DTNTunnel.h.

Referenced by init_registration(), init_tunnel(), and validate_options().

Definition at line 129 of file DTNTunnel.h.

Referenced by fill_options(), and max_size().

Struct to encapsulate the header sent with each tunneled bundle.

Note that since it is declared as a packed struct, it can be sent over the wire as-is.

XXX/demmer if this is used for non-IP tunnels, the address fields will need to be union'd or something like that

Definition at line 114 of file DTNTunnel.h.

Referenced by init_registration(), main(), and send_bundle().

in_addr_t dtntunnel::DTNTunnel::remote_addr_ [protected]

Definition at line 126 of file DTNTunnel.h.

Referenced by init_registration(), init_tunnel(), and validate_options().

u_int16_t dtntunnel::DTNTunnel::remote_port_ [protected]

Definition at line 127 of file DTNTunnel.h.

Referenced by init_registration(), init_tunnel(), and validate_options().

Definition at line 115 of file DTNTunnel.h.

Referenced by init_registration(), main(), and send_bundle().

oasys::Mutex dtntunnel::DTNTunnel::send_lock_ [protected]

Definition at line 116 of file DTNTunnel.h.

Referenced by send_bundle().

Definition at line 122 of file DTNTunnel.h.

Referenced by fill_options(), init_registration(), init_tunnel(), and validate_options().

Definition at line 112 of file DTNTunnel.h.

Referenced by handle_bundle(), and init_tunnel().

std::string dtntunnel::DTNTunnel::tunnel_spec_ [protected]

Definition at line 130 of file DTNTunnel.h.

Referenced by fill_options(), and validate_options().

Definition at line 131 of file DTNTunnel.h.

Referenced by fill_options(), and validate_options().

Definition at line 123 of file DTNTunnel.h.

Referenced by fill_options(), init_tunnel(), and validate_options().

Definition at line 111 of file DTNTunnel.h.

Referenced by handle_bundle(), and init_tunnel().


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