dtntunnel::UDPTunnel::Listener Class Reference

#include <UDPTunnel.h>

Inheritance diagram for dtntunnel::UDPTunnel::Listener:

oasys::Thread oasys::Logger List of all members.

Detailed Description

Helper class to handle a proxied UDP port.

Definition at line 51 of file UDPTunnel.h.

Public Member Functions

 Listener (in_addr_t listen_addr, u_int16_t listen_port, in_addr_t remote_addr, u_int16_t remote_port)
 Constructor.

Protected Member Functions

void run ()
 Main listen loop.

Protected Attributes

oasys::UDPClient sock_
 Receiver socket.
char recv_buf_ [65536]
 Static receiving buffer.
in_addr_t listen_addr_
 Proxy parameters.
u_int16_t listen_port_
 Proxy parameters.
in_addr_t remote_addr_
 Proxy parameters.
u_int16_t remote_port_
 Proxy parameters.


Constructor & Destructor Documentation

dtntunnel::UDPTunnel::Listener::Listener ( in_addr_t  listen_addr,
u_int16_t  listen_port,
in_addr_t  remote_addr,
u_int16_t  remote_port 
)

Constructor.

Definition at line 68 of file UDPTunnel.cc.

References oasys::Thread::start().


Member Function Documentation

void dtntunnel::UDPTunnel::Listener::run (  )  [protected, virtual]

Main listen loop.

Implements oasys::Thread.

Definition at line 83 of file UDPTunnel.cc.

References oasys::IPSocket::bind(), oasys::ScratchBuffer< _memory_t, _static_size >::buf(), dtntunnel::DTNTunnel::BundleHeader::client_addr_, dtntunnel::DTNTunnel::BundleHeader::client_port_, dtntunnel::DTNTunnel::dest_eid(), DTN_SUCCESS, errno, intoa, listen_addr_, listen_port_, log_err, log_info, dtn::APIBundle::payload_, dtntunnel::DTNTunnel::BundleHeader::protocol_, oasys::IPSocket::recv(), recv_buf_, remote_addr_, dtntunnel::DTNTunnel::BundleHeader::remote_addr_, remote_port_, dtntunnel::DTNTunnel::BundleHeader::remote_port_, dtntunnel::DTNTunnel::send_bundle(), dtntunnel::DTNTunnel::BundleHeader::seqno_, oasys::ExpandableBuffer::set_len(), and sock_.


Member Data Documentation

oasys::UDPClient dtntunnel::UDPTunnel::Listener::sock_ [protected]

Receiver socket.

Definition at line 62 of file UDPTunnel.h.

Referenced by run().

char dtntunnel::UDPTunnel::Listener::recv_buf_[65536] [protected]

Static receiving buffer.

Definition at line 65 of file UDPTunnel.h.

Referenced by run().

in_addr_t dtntunnel::UDPTunnel::Listener::listen_addr_ [protected]

Proxy parameters.

Definition at line 69 of file UDPTunnel.h.

Referenced by run().

u_int16_t dtntunnel::UDPTunnel::Listener::listen_port_ [protected]

Proxy parameters.

Definition at line 70 of file UDPTunnel.h.

Referenced by run().

in_addr_t dtntunnel::UDPTunnel::Listener::remote_addr_ [protected]

Proxy parameters.

Definition at line 71 of file UDPTunnel.h.

Referenced by run().

u_int16_t dtntunnel::UDPTunnel::Listener::remote_port_ [protected]

Proxy parameters.

Definition at line 72 of file UDPTunnel.h.

Referenced by run().


The documentation for this class was generated from the following files:
Generated on Thu Jun 7 16:56:59 2007 for DTN Reference Implementation by  doxygen 1.5.1