![]() |
Namespaces | |
namespace | protlib |
Functions | |
virtual void | protlib::TPoverUDP::send (NetMsg *msg, const address &addr, bool use_existing_connection) |
sends a network message, spawns receiver thread if necessary | |
void | protlib::TPoverUDP::udpsend (NetMsg *msg, appladdress *addr) |
send a message to the network via UDP | |
static void * | protlib::TPoverUDP::listener_thread_starter (void *argp) |
a static starter method to invoke the listener thread | |
void | protlib::TPoverUDP::listener_thread () |
listener thread procedure | |
virtual | protlib::TPoverUDP::~TPoverUDP () |
virtual destructor | |
virtual void | protlib::TPoverUDP::main_loop (uint32 nr) |
main loop | |
virtual void | protlib::TPoverUDP::terminate (const address &addr) |
terminates an existing signaling association/connection | |
Variables | |
char | protlib::in6_addrstr_loc [INET6_ADDRSTRLEN+1] |
void protlib::TPoverUDP::listener_thread | ( | ) | [private, inherited] |
listener thread procedure
UDP master receiver thread: waits for incoming connections at the well-known udp port
receive data from socket buffer (recv will not block)
Definition at line 341 of file tp_over_udp.cpp.
References protlib::log::DEBUG_LOG, protlib::TPoverUDPParam::dest, DLog, ERRCLog, ERRLog, EVLog, protlib::NetMsg::get_buffer(), protlib::message::get_id(), protlib::Thread::get_state(), protlib::TP::get_underlying_protocol(), protlib::in6_addrstr_loc, Log, protlib::log::LOG_NORMAL, protlib::log::LOG_UNIMP, protlib::TPoverUDP::master_listener_socket, protlib::NetMsg::max_size, protlib::ThreadParam::name, protlib::TPoverUDPParam::port, protlib::message::send(), protlib::hostaddress::set_ip(), protlib::appladdress::set_port(), protlib::appladdress::set_protocol(), protlib::ThreadParam::sleep_time, protlib::TPoverUDPParam::source, protlib::Thread::STATE_ABORT, protlib::Thread::STATE_STOP, status, protlib::TPoverUDP::terminate(), protlib::TPoverUDP::tpparam, and protlib::NetMsg::truncate().
void * protlib::TPoverUDP::listener_thread_starter | ( | void * | argp | ) | [static, private, inherited] |
a static starter method to invoke the listener thread
IPv4 catcher thread starter: just a static starter method to allow starting the actual master_listener_thread() method.
argp | - pointer to the current TPoverUDP object instance |
Definition at line 323 of file tp_over_udp.cpp.
Referenced by protlib::TPoverUDP::main_loop().
void protlib::TPoverUDP::main_loop | ( | uint32 | nr | ) | [virtual, inherited] |
main loop
TPoverUDP Thread main loop. This loop checks for internal messages of either a send() call to start a new receiver thread, or, of a receiver_thread() that signals its own termination for proper cleanup of control structures.
nr | number of current thread instance |
Implements protlib::Thread.
Definition at line 570 of file tp_over_udp.cpp.
References protlib::log::color, ERRCLog, protlib::Thread::get_state(), protlib::log::green, protlib::log::INFO_LOG, protlib::TPoverUDP::listener_thread_starter(), Log, protlib::log::LOG_NORMAL, protlib::ThreadParam::name, protlib::log::off, protlib::TPoverUDPParam::port, ariba::utility::Helper::sleep(), protlib::Thread::STATE_ABORT, protlib::Thread::STATE_STOP, and protlib::TPoverUDP::tpparam.
void protlib::TPoverUDP::send | ( | NetMsg * | netmsg, | |
const address & | in_addr, | |||
bool | use_existing_connection | |||
) | [virtual, inherited] |
sends a network message, spawns receiver thread if necessary
generates an internal TPoverUDP message to send a NetMsg to the network
Implements protlib::TP.
Definition at line 90 of file tp_over_udp.cpp.
References protlib::address::copy(), and protlib::TPoverUDP::udpsend().
void protlib::TPoverUDP::terminate | ( | const address & | addr | ) | [virtual, inherited] |
terminates an existing signaling association/connection
Implements protlib::TP.
Definition at line 620 of file tp_over_udp.cpp.
Referenced by protlib::TPoverUDP::listener_thread().
void protlib::TPoverUDP::udpsend | ( | NetMsg * | netmsg, | |
appladdress * | addr | |||
) | [private, inherited] |
send a message to the network via UDP
sends a NetMsg to the network.
Definition at line 111 of file tp_over_udp.cpp.
References protlib::TP::check_send_args(), protlib::hostaddress::convert_to_ipv6(), protlib::log::DEBUG_LOG, protlib::TPoverUDP::debug_pdu, DLog, ERRCLog, ERRLog, protlib::log::EVENT_LOG, protlib::NetMsg::get_buffer(), protlib::appladdress::get_if_index(), protlib::hostaddress::get_ip(), protlib::appladdress::get_ip_ttl(), protlib::appladdress::get_port(), protlib::NetMsg::get_size(), protlib::NetMsg::hexdump(), Log, protlib::log::LOG_NORMAL, protlib::TPoverUDP::master_listener_socket, protlib::ThreadParam::name, ariba::utility::Helper::sleep(), protlib::TPoverUDP::tpparam, UDP_SEND_FAILURE, and UDP_SUCCESS.
Referenced by protlib::TPoverUDP::send().
protlib::TPoverUDP::~TPoverUDP | ( | ) | [virtual, inherited] |
virtual destructor
Definition at line 553 of file tp_over_udp.cpp.
References protlib::log::DEBUG_LOG, protlib::TP::init, Log, protlib::log::LOG_NORMAL, protlib::ThreadParam::name, and protlib::TPoverUDP::tpparam.
char protlib::in6_addrstr_loc[INET6_ADDRSTRLEN+1] |