A helper entry class in the flow spec sequence passed to bind_devs. More...
#include <FlowSpec_Entry.h>
Public Types | |
enum | Direction { TAO_AV_INVALID = -1, TAO_AV_DIR_IN = 0, TAO_AV_DIR_OUT = 1 } |
enum | Role { TAO_AV_INVALID_ROLE = -1, TAO_AV_PRODUCER = 0, TAO_AV_CONSUMER = 1 } |
Public Member Functions | |
TAO_FlowSpec_Entry (void) | |
default constructor. | |
TAO_FlowSpec_Entry (const char *flowname, const char *direction, const char *format_name, const char *flow_protocol, const char *carrier_protocol, ACE_Addr *fwd_address, ACE_Addr *control_address=0) | |
constructor to construct an entry from the arguments. | |
TAO_FlowSpec_Entry (const char *flowname, const char *direction, const char *format_name, const char *flow_protocol, const char *fwd_address) | |
virtual int | parse (const char *flowSpec_entry)=0 |
construct the entry from a string specified by the flowSpec grammar. | |
virtual | ~TAO_FlowSpec_Entry (void) |
virtual destructor. | |
int | direction (void) |
accessor to the direction. | |
virtual Role | role (void)=0 |
void | role (Role role) |
const char * | direction_str (void) const |
accessor to string version of direction . | |
const char * | flow_protocol_str (void) const |
accessor to the flow protocol string. | |
void | flow_protocol_str (const char *flow_protocol_str) |
set the flow protocol string. | |
ACE_Addr * | address (void) |
accessor to address of the carrier protocol. | |
ACE_Addr * | control_address (void) |
void | address (ACE_Addr *address, bool cleanup=false) |
void | control_address (ACE_Addr *address) |
const char * | address_str (void) const |
Address in string format i. hostname:port. | |
TAO_AV_Core::Protocol | carrier_protocol (void) |
accessor to carrier protocol i.e TCP,UDP,RTP/UDP. | |
const char * | carrier_protocol_str (void) const |
accessor to string version of carrier protocol. | |
const char * | format (void) const |
accessor to format to be used for this flow. | |
const char * | flowname (void) const |
accessor to name of this flow. | |
virtual const char * | entry_to_string (void)=0 |
converts the entry to a string. | |
int | set_peer_addr (ACE_Addr *peer_addr) |
ACE_Addr * | get_peer_addr (void) |
int | set_peer_control_addr (ACE_Addr *peer_control_addr) |
ACE_Addr * | get_peer_control_addr (void) |
int | set_local_sec_addr (char **local_sec_addr, int size) |
char ** | get_local_sec_addr (void) |
int | num_local_sec_addrs (void) |
int | set_peer_sec_addr (char **peer_sec_addr, int size) |
char ** | get_peer_sec_addr (void) |
int | num_peer_sec_addrs (void) |
int | set_local_addr (ACE_Addr *local_addr) |
ACE_Addr * | get_local_addr (void) |
char * | get_local_addr_str (void) |
int | set_local_control_addr (ACE_Addr *local_control_addr) |
ACE_Addr * | get_local_control_addr (void) |
char * | get_local_control_addr_str (void) |
TAO_AV_Transport * | transport (void) |
void | transport (TAO_AV_Transport *transport) |
TAO_AV_Transport * | control_transport (void) |
void | control_transport (TAO_AV_Transport *control_transport) |
TAO_AV_Flow_Handler * | handler (void) |
void | handler (TAO_AV_Flow_Handler *handler) |
TAO_AV_Flow_Handler * | control_handler (void) |
void | control_handler (TAO_AV_Flow_Handler *control_handler) |
TAO_AV_Protocol_Object * | protocol_object (void) |
void | protocol_object (TAO_AV_Protocol_Object *object) |
TAO_AV_Protocol_Object * | control_protocol_object (void) |
void | control_protocol_object (TAO_AV_Protocol_Object *object) |
int | parse_address (const char *format_string, TAO_AV_Core::Flow_Component flow_component) |
sets the address for this flow. | |
int | is_multicast (void) |
returns true for a multicast address. | |
Protected Member Functions | |
int | parse_flow_protocol_string (const char *flow_options_string) |
parses the flow protocol string with tokens separated by : | |
int | set_direction (const char *direction_string) |
sets the direction flag. | |
int | set_protocol (void) |
sets the protocol_ enum from the carrier_protocol_ string. | |
Protected Attributes | |
ACE_Addr * | address_ |
Addr information for the carrier protocol. | |
int | clean_up_address_ |
ACE_Addr * | control_address_ |
int | clean_up_control_address_ |
ACE_CString | address_str_ |
Fwd Addr in string format i.e hostname:port. | |
ACE_CString | peer_address_str_ |
Peer Addr in string format i.e hostname:port. | |
ACE_CString | format_ |
format string. | |
Direction | direction_ |
Direction of this flow. | |
ACE_CString | direction_str_ |
string representation of the direction. | |
ACE_CString | flowname_ |
name of this flow. | |
TAO_AV_Core::Protocol | protocol_ |
name of the protocol used. | |
ACE_CString | carrier_protocol_ |
carrier protocol string. | |
ACE_CString | flow_protocol_ |
flow protocol string. | |
int | use_flow_protocol_ |
ACE_CString | entry_ |
The flowspec entry;. | |
int | is_multicast_ |
bool | delete_peer_addr_ |
ACE_Addr * | peer_addr_ |
char ** | local_sec_addr_ |
int | num_local_sec_addrs_ |
char ** | peer_sec_addr_ |
int | num_peer_sec_addrs_ |
ACE_Addr * | peer_control_addr_ |
ACE_Addr * | local_addr_ |
ACE_Addr * | local_control_addr_ |
TAO_AV_Transport * | transport_ |
TAO_AV_Transport * | control_transport_ |
TAO_AV_Flow_Handler * | handler_ |
TAO_AV_Flow_Handler * | control_handler_ |
TAO_AV_Protocol_Object * | protocol_object_ |
TAO_AV_Protocol_Object * | control_protocol_object_ |
Role | role_ |
A helper entry class in the flow spec sequence passed to bind_devs.
Definition at line 68 of file FlowSpec_Entry.h.
Definition at line 72 of file FlowSpec_Entry.h.
{ TAO_AV_INVALID = -1, TAO_AV_DIR_IN = 0, TAO_AV_DIR_OUT = 1 };
Definition at line 79 of file FlowSpec_Entry.h.
{ TAO_AV_INVALID_ROLE = -1, TAO_AV_PRODUCER = 0, TAO_AV_CONSUMER = 1 };
TAO_FlowSpec_Entry::TAO_FlowSpec_Entry | ( | void | ) |
default constructor.
Definition at line 21 of file FlowSpec_Entry.cpp.
:address_ (0), clean_up_address_ (0), control_address_ (0), clean_up_control_address_ (0), address_str_ (), format_ (), direction_ (TAO_AV_INVALID), direction_str_ (), flowname_ (), protocol_ (TAO_AV_Core::TAO_AV_NOPROTOCOL), carrier_protocol_ (), flow_protocol_ (), use_flow_protocol_ (0), entry_ (), is_multicast_ (0), delete_peer_addr_ (false), peer_addr_ (0), local_sec_addr_ (0), num_local_sec_addrs_ (0), peer_sec_addr_ (0), num_peer_sec_addrs_ (0), peer_control_addr_ (0), local_addr_ (0), local_control_addr_ (0), transport_ (0), control_transport_ (0), handler_ (0), control_handler_ (0), protocol_object_ (0), control_protocol_object_ (0), role_ (TAO_AV_INVALID_ROLE) { }
TAO_FlowSpec_Entry::TAO_FlowSpec_Entry | ( | const char * | flowname, | |
const char * | direction, | |||
const char * | format_name, | |||
const char * | flow_protocol, | |||
const char * | carrier_protocol, | |||
ACE_Addr * | fwd_address, | |||
ACE_Addr * | control_address = 0 | |||
) |
constructor to construct an entry from the arguments.
Definition at line 57 of file FlowSpec_Entry.cpp.
:address_ (fwd_address), clean_up_address_ (0), control_address_ (control_address), clean_up_control_address_ (0), address_str_ (), format_ (format_name), direction_str_ (), // This is initialized in the call to set_direction() flowname_ ( flowname ), carrier_protocol_ ( carrier_protocol ), flow_protocol_ ( flow_protocol ), use_flow_protocol_ (0), entry_ (), is_multicast_ (0), delete_peer_addr_ (false), peer_addr_ (0), local_sec_addr_ (0), num_local_sec_addrs_ (0), peer_sec_addr_ (0), num_peer_sec_addrs_ (0), peer_control_addr_ (0), local_addr_ (0), local_control_addr_ (0), transport_ (0), control_transport_ (0), handler_ (0), control_handler_ (0), protocol_object_ (0), control_protocol_object_ (0), role_ (TAO_AV_INVALID_ROLE) { this->set_protocol (); this->set_direction (direction); this->parse_flow_protocol_string (this->flow_protocol_.c_str()); }
TAO_FlowSpec_Entry::TAO_FlowSpec_Entry | ( | const char * | flowname, | |
const char * | direction, | |||
const char * | format_name, | |||
const char * | flow_protocol, | |||
const char * | fwd_address | |||
) |
Definition at line 100 of file FlowSpec_Entry.cpp.
:address_ (0), clean_up_address_ (0), control_address_ (0), clean_up_control_address_ (0), address_str_ ( address ), format_ ( format_name ), direction_str_ (), // This is initialized in the call to set_direction() flowname_ ( flowname ), carrier_protocol_ (), flow_protocol_ ( flow_protocol ), use_flow_protocol_ (0), entry_ (), is_multicast_ (0), peer_addr_ (0), local_sec_addr_ (0), num_local_sec_addrs_ (0), peer_sec_addr_ (0), num_peer_sec_addrs_ (0), peer_control_addr_ (0), local_addr_ (0), local_control_addr_ (0), transport_ (0), control_transport_ (0), handler_ (0), control_handler_ (0), protocol_object_ (0), control_protocol_object_ (0), role_ (TAO_AV_INVALID_ROLE) { this->parse_flow_protocol_string (this->flow_protocol_.c_str() ); this->parse_address (this->address_str_.c_str(), TAO_AV_Core::TAO_AV_DATA); this->set_direction (direction); }
TAO_FlowSpec_Entry::~TAO_FlowSpec_Entry | ( | void | ) | [virtual] |
virtual destructor.
Definition at line 140 of file FlowSpec_Entry.cpp.
{ if (this->delete_peer_addr_) delete this->peer_addr_; if (this->clean_up_address_) delete address_; if (this->clean_up_control_address_) delete control_address_; if (local_control_addr_ != 0) delete local_control_addr_; }
ACE_Addr * TAO_FlowSpec_Entry::address | ( | void | ) |
accessor to address of the carrier protocol.
Definition at line 87 of file FlowSpec_Entry.inl.
{ return this->address_; }
void TAO_FlowSpec_Entry::address | ( | ACE_Addr * | address, | |
bool | cleanup = false | |||
) |
Definition at line 94 of file FlowSpec_Entry.inl.
{ if (this->clean_up_address_) delete this->address_; this->address_ = addr; this->clean_up_address_ = cleanup; }
const char * TAO_FlowSpec_Entry::address_str | ( | void | ) | const |
Address in string format i. hostname:port.
Definition at line 119 of file FlowSpec_Entry.inl.
{ return this->address_str_.c_str(); }
TAO_AV_Core::Protocol TAO_FlowSpec_Entry::carrier_protocol | ( | void | ) |
accessor to carrier protocol i.e TCP,UDP,RTP/UDP.
Definition at line 73 of file FlowSpec_Entry.inl.
{ return this->protocol_; }
const char * TAO_FlowSpec_Entry::carrier_protocol_str | ( | void | ) | const |
accessor to string version of carrier protocol.
Definition at line 80 of file FlowSpec_Entry.inl.
{ return this->carrier_protocol_.c_str(); }
ACE_Addr * TAO_FlowSpec_Entry::control_address | ( | void | ) |
Definition at line 105 of file FlowSpec_Entry.inl.
{ return this->control_address_; }
void TAO_FlowSpec_Entry::control_address | ( | ACE_Addr * | address | ) |
Definition at line 112 of file FlowSpec_Entry.inl.
{ this->control_address_ = addr; }
TAO_AV_Flow_Handler * TAO_FlowSpec_Entry::control_handler | ( | void | ) |
Definition at line 276 of file FlowSpec_Entry.inl.
{ return this->control_handler_; }
void TAO_FlowSpec_Entry::control_handler | ( | TAO_AV_Flow_Handler * | control_handler | ) |
Definition at line 304 of file FlowSpec_Entry.inl.
{ this->control_handler_ = handler; }
TAO_AV_Protocol_Object * TAO_FlowSpec_Entry::control_protocol_object | ( | void | ) |
Definition at line 325 of file FlowSpec_Entry.inl.
{ return this->control_protocol_object_; }
void TAO_FlowSpec_Entry::control_protocol_object | ( | TAO_AV_Protocol_Object * | object | ) |
Definition at line 332 of file FlowSpec_Entry.inl.
{ this->control_protocol_object_ = object; }
TAO_AV_Transport * TAO_FlowSpec_Entry::control_transport | ( | void | ) |
Definition at line 255 of file FlowSpec_Entry.inl.
{ return this->control_transport_; }
void TAO_FlowSpec_Entry::control_transport | ( | TAO_AV_Transport * | control_transport | ) |
Definition at line 262 of file FlowSpec_Entry.inl.
{ this->control_transport_ = control_transport; }
int TAO_FlowSpec_Entry::direction | ( | void | ) |
accessor to the direction.
Definition at line 45 of file FlowSpec_Entry.inl.
{ return this->direction_; }
const char * TAO_FlowSpec_Entry::direction_str | ( | void | ) | const |
accessor to string version of direction .
Definition at line 52 of file FlowSpec_Entry.inl.
{ return this->direction_str_.c_str(); }
virtual const char* TAO_FlowSpec_Entry::entry_to_string | ( | void | ) | [pure virtual] |
converts the entry to a string.
Implemented in TAO_Forward_FlowSpec_Entry, and TAO_Reverse_FlowSpec_Entry.
const char * TAO_FlowSpec_Entry::flow_protocol_str | ( | void | ) | const |
accessor to the flow protocol string.
Definition at line 59 of file FlowSpec_Entry.inl.
{ return this->flow_protocol_.c_str(); }
void TAO_FlowSpec_Entry::flow_protocol_str | ( | const char * | flow_protocol_str | ) |
set the flow protocol string.
Definition at line 66 of file FlowSpec_Entry.inl.
{ this->flow_protocol_ = CORBA::string_dup (str); }
const char * TAO_FlowSpec_Entry::flowname | ( | void | ) | const |
accessor to name of this flow.
Definition at line 133 of file FlowSpec_Entry.inl.
const char * TAO_FlowSpec_Entry::format | ( | void | ) | const |
accessor to format to be used for this flow.
Definition at line 126 of file FlowSpec_Entry.inl.
ACE_Addr * TAO_FlowSpec_Entry::get_local_addr | ( | void | ) |
Definition at line 179 of file FlowSpec_Entry.inl.
{ return this->local_addr_; }
char * TAO_FlowSpec_Entry::get_local_addr_str | ( | void | ) |
Definition at line 462 of file FlowSpec_Entry.cpp.
{ if (this->local_addr_ == 0) return 0; switch (this->local_addr_->get_type ()) { case AF_INET: { ACE_TCHAR *buf = 0; ACE_NEW_RETURN (buf, ACE_TCHAR [BUFSIZ], 0); ACE_INET_Addr *inet_addr = dynamic_cast<ACE_INET_Addr *> (this->local_addr_); inet_addr->addr_to_string (buf,BUFSIZ); ACE_CString cstring (ACE_TEXT_ALWAYS_CHAR(buf), 0, false); return cstring.rep (); } default: ACE_ERROR_RETURN ((LM_ERROR,"Address family not supported"),0); } }
ACE_Addr * TAO_FlowSpec_Entry::get_local_control_addr | ( | void | ) |
Definition at line 186 of file FlowSpec_Entry.inl.
{ return this->local_control_addr_; }
char* TAO_FlowSpec_Entry::get_local_control_addr_str | ( | void | ) |
char ** TAO_FlowSpec_Entry::get_local_sec_addr | ( | void | ) |
Definition at line 203 of file FlowSpec_Entry.inl.
{ return this->local_sec_addr_; }
ACE_Addr * TAO_FlowSpec_Entry::get_peer_addr | ( | void | ) |
Definition at line 156 of file FlowSpec_Entry.inl.
{ return this->peer_addr_; }
ACE_Addr* TAO_FlowSpec_Entry::get_peer_control_addr | ( | void | ) |
char ** TAO_FlowSpec_Entry::get_peer_sec_addr | ( | void | ) |
Definition at line 227 of file FlowSpec_Entry.inl.
{ return this->peer_sec_addr_; }
TAO_AV_Flow_Handler * TAO_FlowSpec_Entry::handler | ( | void | ) |
Definition at line 269 of file FlowSpec_Entry.inl.
{ return this->handler_; }
void TAO_FlowSpec_Entry::handler | ( | TAO_AV_Flow_Handler * | handler | ) |
Definition at line 283 of file FlowSpec_Entry.inl.
{ this->handler_ = handler; // // Now remove the handler from the reactor if the handler is for a producer. // switch (this->role ()) // { // case TAO_AV_PRODUCER: // { // ACE_Event_Handler *event_handler = handler->event_handler (); // int result = event_handler->reactor ()->remove_handler (event_handler, // ACE_Event_Handler::READ_MASK); // if (result < 0) // ACE_ERROR ((LM_ERROR,"TAO_FlowSpec_Entry::handler\n")); // break; // } // } }
int TAO_FlowSpec_Entry::is_multicast | ( | void | ) |
returns true for a multicast address.
Definition at line 339 of file FlowSpec_Entry.inl.
{ return this->is_multicast_; }
int TAO_FlowSpec_Entry::num_local_sec_addrs | ( | void | ) |
Definition at line 210 of file FlowSpec_Entry.inl.
{ return this->num_local_sec_addrs_; }
int TAO_FlowSpec_Entry::num_peer_sec_addrs | ( | void | ) |
Definition at line 234 of file FlowSpec_Entry.inl.
{ return this->num_peer_sec_addrs_; }
virtual int TAO_FlowSpec_Entry::parse | ( | const char * | flowSpec_entry | ) | [pure virtual] |
construct the entry from a string specified by the flowSpec grammar.
Implemented in TAO_Forward_FlowSpec_Entry, and TAO_Reverse_FlowSpec_Entry.
int TAO_FlowSpec_Entry::parse_address | ( | const char * | format_string, | |
TAO_AV_Core::Flow_Component | flow_component | |||
) |
sets the address for this flow.
Definition at line 238 of file FlowSpec_Entry.cpp.
{ if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, "TAO_FlowSpec_Entry::parse_address [%s]\n", address)); if (address == 0) return 0; if (ACE_OS::strcmp (address,"") == 0) return 0; TAO_Tokenizer protocol_tokenizer (address,'='); this->carrier_protocol_ = protocol_tokenizer[0]; int result = this->set_protocol (); if (result < 0) return result; if (protocol_tokenizer [1] != 0) { ACE_DEBUG ((LM_DEBUG, "Protocol tokenixer is not null\n")); if ((flow_comp == TAO_AV_Core::TAO_AV_DATA) || //(flow_comp == TAO_AV_Core::TAO_AV_BOTH) || (flow_comp == TAO_AV_Core::TAO_AV_CONTROL) ) { ACE_CString addr; if (this->protocol_ == TAO_AV_Core::TAO_AV_SCTP_SEQ) { TAO_Tokenizer addr_token (protocol_tokenizer [1], ';'); ACE_DEBUG ((LM_DEBUG, "Number of local sec addresses = %d\n", addr_token.num_tokens () - 1)); if (addr_token.num_tokens () != 0) { addr += addr_token [0]; ACE_NEW_RETURN (local_sec_addr_, char* [addr_token.num_tokens () - 1],-1); for (int j = 1; j <= addr_token.num_tokens () - 1; j++) { ACE_DEBUG ((LM_DEBUG, "adding addresses to sequence %s\n", addr_token [j])); local_sec_addr_ [j-1] = CORBA::string_dup (addr_token [j]); } num_local_sec_addrs_ = addr_token.num_tokens () - 1; } } else addr += protocol_tokenizer[1]; switch (this->protocol_) { case TAO_AV_Core::TAO_AV_SFP_UDP: case TAO_AV_Core::TAO_AV_USERDEFINED_UDP: case TAO_AV_Core::TAO_AV_RTP_UDP: case TAO_AV_Core::TAO_AV_TCP: case TAO_AV_Core::TAO_AV_SCTP_SEQ: case TAO_AV_Core::TAO_AV_UDP: case TAO_AV_Core::TAO_AV_QOS_UDP: { if (flow_comp == TAO_AV_Core::TAO_AV_DATA) this->address_str_ = addr; ACE_INET_Addr *inet_addr; ACE_NEW_RETURN (inet_addr, ACE_INET_Addr (addr.c_str() ), -1); if (flow_comp == TAO_AV_Core::TAO_AV_DATA) { this->clean_up_address_ = 1; this->address_ = inet_addr; } else { this->clean_up_control_address_ = 1; this->control_address_ = inet_addr; } if (IN_CLASSD (inet_addr->get_ip_address ())) { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, "TAO_FlowSpec_Entry::parse_address is multicast\n")); this->is_multicast_ = 1; switch (this->protocol_) { case TAO_AV_Core::TAO_AV_UDP: this->protocol_ = TAO_AV_Core::TAO_AV_UDP_MCAST; break; case TAO_AV_Core::TAO_AV_RTP_UDP: this->protocol_ = TAO_AV_Core::TAO_AV_RTP_UDP_MCAST; break; case TAO_AV_Core::TAO_AV_SFP_UDP: this->protocol_ = TAO_AV_Core::TAO_AV_SFP_UDP_MCAST; break; case TAO_AV_Core::TAO_AV_USERDEFINED_UDP: this->protocol_ = TAO_AV_Core::TAO_AV_USERDEFINED_UDP_MCAST; break; default: break; } } } break; default: if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG,"ATM support not added yet\n")); } } else { ACE_DEBUG ((LM_DEBUG, "AV BOTH %s\n", protocol_tokenizer[1])); TAO_Tokenizer address_tokenizer (protocol_tokenizer[1], ':'); TAO_Tokenizer port_tokenizer (address_tokenizer[1], ';'); ACE_CString addr; addr += address_tokenizer[0]; addr += ":"; addr += port_tokenizer[0]; if (this->protocol_ == TAO_AV_Core::TAO_AV_SCTP_SEQ) { ACE_DEBUG ((LM_DEBUG, "Number of local sec addresses = %d\n", port_tokenizer.num_tokens () - 1)); if (port_tokenizer.num_tokens () - 1 != 0) { ACE_NEW_RETURN (local_sec_addr_, char* [port_tokenizer.num_tokens () - 1],-1); for (int j = 1; j <= port_tokenizer.num_tokens () - 1; j++) { ACE_DEBUG ((LM_DEBUG, "adding addresses to sequence %s\n", port_tokenizer [j])); local_sec_addr_ [j-1] = CORBA::string_dup (port_tokenizer [j]); } num_local_sec_addrs_ = port_tokenizer.num_tokens () - 1; } } short control_port = static_cast<short> (ACE_OS::atoi(port_tokenizer[0])) + 1; char control_port_str[6]; ACE_OS::sprintf (control_port_str, "%d", control_port); ACE_CString control_addr = ""; if (ACE_OS::strcasecmp (this->carrier_protocol_.c_str(),"RTP/UDP") == 0) { control_addr += address_tokenizer[0]; control_addr += ":"; if (port_tokenizer[1] != 0) control_addr += port_tokenizer[1]; else control_addr += control_port_str; } switch (this->protocol_) { case TAO_AV_Core::TAO_AV_SFP_UDP: case TAO_AV_Core::TAO_AV_USERDEFINED_UDP: case TAO_AV_Core::TAO_AV_RTP_UDP: case TAO_AV_Core::TAO_AV_TCP: case TAO_AV_Core::TAO_AV_SCTP_SEQ: case TAO_AV_Core::TAO_AV_UDP: case TAO_AV_Core::TAO_AV_QOS_UDP: { this->address_str_ = addr; ACE_INET_Addr *inet_addr; ACE_NEW_RETURN (inet_addr, ACE_INET_Addr (addr.c_str() ), -1); this->clean_up_address_ = 1; this->address_ = inet_addr; if (ACE_OS::strcasecmp (this->carrier_protocol_.c_str(),"RTP/UDP") == 0) { ACE_INET_Addr *control_inet_addr; ACE_NEW_RETURN (control_inet_addr, ACE_INET_Addr (control_addr.c_str() ), -1); this->clean_up_control_address_ = 1; this->control_address_ = control_inet_addr; } if (IN_CLASSD (inet_addr->get_ip_address ())) { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, "TAO_FlowSpec_Entry::parse_address is multicast\n")); this->is_multicast_ = 1; switch (this->protocol_) { case TAO_AV_Core::TAO_AV_UDP: this->protocol_ = TAO_AV_Core::TAO_AV_UDP_MCAST; break; case TAO_AV_Core::TAO_AV_RTP_UDP: this->protocol_ = TAO_AV_Core::TAO_AV_RTP_UDP_MCAST; break; case TAO_AV_Core::TAO_AV_SFP_UDP: this->protocol_ = TAO_AV_Core::TAO_AV_SFP_UDP_MCAST; break; case TAO_AV_Core::TAO_AV_USERDEFINED_UDP: this->protocol_ = TAO_AV_Core::TAO_AV_USERDEFINED_UDP_MCAST; break; default: break; } } } break; default: if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG,"ATM support not added yet\n")); } } } ACE_DEBUG ((LM_DEBUG, "Return from parse address\n")); return 0; }
int TAO_FlowSpec_Entry::parse_flow_protocol_string | ( | const char * | flow_options_string | ) | [protected] |
parses the flow protocol string with tokens separated by :
Definition at line 28 of file FlowSpec_Entry.inl.
{ if (flow_string == 0) return 0; if (ACE_OS::strcmp (flow_string,"") == 0) return 0; this->use_flow_protocol_ = 1; // do some flow protocol processing. this->flow_protocol_ = flow_string; return 0; }
void TAO_FlowSpec_Entry::protocol_object | ( | TAO_AV_Protocol_Object * | object | ) |
Definition at line 318 of file FlowSpec_Entry.inl.
{ this->protocol_object_ = object; }
TAO_AV_Protocol_Object * TAO_FlowSpec_Entry::protocol_object | ( | void | ) |
Definition at line 311 of file FlowSpec_Entry.inl.
{ return this->protocol_object_; }
void TAO_FlowSpec_Entry::role | ( | TAO_FlowSpec_Entry::Role | role | ) |
Definition at line 346 of file FlowSpec_Entry.inl.
{ this->role_ = role; }
virtual Role TAO_FlowSpec_Entry::role | ( | void | ) | [pure virtual] |
Implemented in TAO_Forward_FlowSpec_Entry, and TAO_Reverse_FlowSpec_Entry.
int TAO_FlowSpec_Entry::set_direction | ( | const char * | direction_string | ) | [protected] |
sets the direction flag.
Definition at line 11 of file FlowSpec_Entry.inl.
{ this->direction_str_ = direction; if (direction == 0) { this->direction_ = TAO_AV_INVALID; return -1; } if (ACE_OS::strcasecmp (direction,"in") == 0) this->direction_ = TAO_AV_DIR_IN; else if (ACE_OS::strcasecmp (direction,"out") == 0) this->direction_ = TAO_AV_DIR_OUT; return 0; }
int TAO_FlowSpec_Entry::set_local_addr | ( | ACE_Addr * | local_addr | ) |
Definition at line 163 of file FlowSpec_Entry.inl.
{ this->local_addr_ = local_addr; return 0; }
int TAO_FlowSpec_Entry::set_local_control_addr | ( | ACE_Addr * | local_control_addr | ) |
Definition at line 171 of file FlowSpec_Entry.inl.
{ this->local_control_addr_ = local_addr; return 0; }
int TAO_FlowSpec_Entry::set_local_sec_addr | ( | char ** | local_sec_addr, | |
int | size | |||
) |
Definition at line 193 of file FlowSpec_Entry.inl.
{ this->local_sec_addr_ = local_sec_addr; this->num_local_sec_addrs_ = size; return 0; }
int TAO_FlowSpec_Entry::set_peer_addr | ( | ACE_Addr * | peer_addr | ) |
Definition at line 141 of file FlowSpec_Entry.inl.
{ if (this->delete_peer_addr_) delete this->peer_addr_; this->delete_peer_addr_ = false; this->peer_addr_ = peer_addr; if (this->handler_ != 0) this->handler_->set_remote_address (peer_addr); return 0; }
int TAO_FlowSpec_Entry::set_peer_control_addr | ( | ACE_Addr * | peer_control_addr | ) |
int TAO_FlowSpec_Entry::set_peer_sec_addr | ( | char ** | peer_sec_addr, | |
int | size | |||
) |
Definition at line 217 of file FlowSpec_Entry.inl.
{ this->peer_sec_addr_ = peer_sec_addr; this->num_peer_sec_addrs_ = size; return 0; }
int TAO_FlowSpec_Entry::set_protocol | ( | void | ) | [protected] |
sets the protocol_ enum from the carrier_protocol_ string.
Definition at line 154 of file FlowSpec_Entry.cpp.
{ if (!this->use_flow_protocol_) { if (ACE_OS::strcasecmp (this->carrier_protocol_.c_str(),"TCP") == 0) this->protocol_ = TAO_AV_Core::TAO_AV_TCP; else if (ACE_OS::strcasecmp (this->carrier_protocol_.c_str(),"SCTP_SEQ") == 0) this->protocol_ = TAO_AV_Core::TAO_AV_SCTP_SEQ; else if (ACE_OS::strcasecmp (this->carrier_protocol_.c_str(),"UDP") == 0) this->protocol_ = TAO_AV_Core::TAO_AV_UDP; else if (ACE_OS::strcasecmp (this->carrier_protocol_.c_str(),"QoS_UDP") == 0) this->protocol_ = TAO_AV_Core::TAO_AV_QOS_UDP; else if (ACE_OS::strcasecmp (this->carrier_protocol_.c_str(),"AAL5") == 0) this->protocol_ = TAO_AV_Core::TAO_AV_AAL5; else if (ACE_OS::strcasecmp (this->carrier_protocol_.c_str(),"AAL3_4") == 0) this->protocol_ = TAO_AV_Core::TAO_AV_AAL3_4; else if (ACE_OS::strcasecmp (this->carrier_protocol_.c_str(),"AAL1") == 0) this->protocol_ = TAO_AV_Core::TAO_AV_AAL1; else if (ACE_OS::strcasecmp (this->carrier_protocol_.c_str(),"RTP/UDP") == 0){ this->protocol_ = TAO_AV_Core::TAO_AV_UDP; flow_protocol_ = "RTP"; } else if (ACE_OS::strcasecmp (this->carrier_protocol_.c_str(),"RTP/AAL5") == 0) this->protocol_ = TAO_AV_Core::TAO_AV_RTP_AAL5; else if (ACE_OS::strcasecmp (this->carrier_protocol_.c_str(),"IPX") == 0) this->protocol_ = TAO_AV_Core::TAO_AV_IPX; else { this->protocol_ = TAO_AV_Core::TAO_AV_NOPROTOCOL; return -1; } } else { if (ACE_OS::strcasecmp (this->carrier_protocol_.c_str(),"UDP") == 0) { if (ACE_OS::strncasecmp (this->flow_protocol_.c_str (),"sfp",3) == 0) { this->protocol_ = TAO_AV_Core::TAO_AV_SFP_UDP; } else this->protocol_ = TAO_AV_Core::TAO_AV_USERDEFINED_UDP; } else { this->protocol_ = TAO_AV_Core::TAO_AV_NOPROTOCOL; return -1; } } if (this->address_ != 0) { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, "TAO_FlowSpec_Entry::set_protocol address is not 0\n")); ACE_INET_Addr *inet_addr = dynamic_cast<ACE_INET_Addr*> (this->address_); ACE_TCHAR buf[BUFSIZ]; inet_addr->addr_to_string (buf,BUFSIZ); if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG,"TAO_FlowSpec_Entry::set_protocol:%s %x\n",buf, inet_addr->get_ip_address ())); if (IN_CLASSD (inet_addr->get_ip_address ())) { this->is_multicast_ = 1; switch (this->protocol_) { case TAO_AV_Core::TAO_AV_UDP: this->protocol_ = TAO_AV_Core::TAO_AV_UDP_MCAST; break; case TAO_AV_Core::TAO_AV_RTP_UDP: this->protocol_ = TAO_AV_Core::TAO_AV_RTP_UDP_MCAST; break; case TAO_AV_Core::TAO_AV_SFP_UDP: this->protocol_ = TAO_AV_Core::TAO_AV_SFP_UDP_MCAST; break; case TAO_AV_Core::TAO_AV_USERDEFINED_UDP: this->protocol_ = TAO_AV_Core::TAO_AV_USERDEFINED_UDP_MCAST; break; default: break; } } } return 0; }
TAO_AV_Transport * TAO_FlowSpec_Entry::transport | ( | void | ) |
Definition at line 241 of file FlowSpec_Entry.inl.
{ return this->transport_; }
void TAO_FlowSpec_Entry::transport | ( | TAO_AV_Transport * | transport | ) |
Definition at line 248 of file FlowSpec_Entry.inl.
{ this->transport_ = transport; }
ACE_Addr* TAO_FlowSpec_Entry::address_ [protected] |
Addr information for the carrier protocol.
Definition at line 206 of file FlowSpec_Entry.h.
ACE_CString TAO_FlowSpec_Entry::address_str_ [protected] |
Fwd Addr in string format i.e hostname:port.
Definition at line 212 of file FlowSpec_Entry.h.
ACE_CString TAO_FlowSpec_Entry::carrier_protocol_ [protected] |
carrier protocol string.
Definition at line 233 of file FlowSpec_Entry.h.
int TAO_FlowSpec_Entry::clean_up_address_ [protected] |
Definition at line 207 of file FlowSpec_Entry.h.
int TAO_FlowSpec_Entry::clean_up_control_address_ [protected] |
Definition at line 209 of file FlowSpec_Entry.h.
ACE_Addr* TAO_FlowSpec_Entry::control_address_ [protected] |
Definition at line 208 of file FlowSpec_Entry.h.
TAO_AV_Flow_Handler* TAO_FlowSpec_Entry::control_handler_ [protected] |
Definition at line 256 of file FlowSpec_Entry.h.
Definition at line 258 of file FlowSpec_Entry.h.
TAO_AV_Transport* TAO_FlowSpec_Entry::control_transport_ [protected] |
Definition at line 254 of file FlowSpec_Entry.h.
bool TAO_FlowSpec_Entry::delete_peer_addr_ [protected] |
Definition at line 244 of file FlowSpec_Entry.h.
Direction TAO_FlowSpec_Entry::direction_ [protected] |
Direction of this flow.
Definition at line 221 of file FlowSpec_Entry.h.
ACE_CString TAO_FlowSpec_Entry::direction_str_ [protected] |
string representation of the direction.
Definition at line 224 of file FlowSpec_Entry.h.
ACE_CString TAO_FlowSpec_Entry::entry_ [protected] |
The flowspec entry;.
Definition at line 241 of file FlowSpec_Entry.h.
ACE_CString TAO_FlowSpec_Entry::flow_protocol_ [protected] |
flow protocol string.
Definition at line 236 of file FlowSpec_Entry.h.
ACE_CString TAO_FlowSpec_Entry::flowname_ [protected] |
name of this flow.
Definition at line 227 of file FlowSpec_Entry.h.
ACE_CString TAO_FlowSpec_Entry::format_ [protected] |
format string.
Definition at line 218 of file FlowSpec_Entry.h.
TAO_AV_Flow_Handler* TAO_FlowSpec_Entry::handler_ [protected] |
Definition at line 255 of file FlowSpec_Entry.h.
int TAO_FlowSpec_Entry::is_multicast_ [protected] |
Definition at line 243 of file FlowSpec_Entry.h.
ACE_Addr* TAO_FlowSpec_Entry::local_addr_ [protected] |
Definition at line 251 of file FlowSpec_Entry.h.
ACE_Addr* TAO_FlowSpec_Entry::local_control_addr_ [protected] |
Definition at line 252 of file FlowSpec_Entry.h.
char** TAO_FlowSpec_Entry::local_sec_addr_ [protected] |
Definition at line 246 of file FlowSpec_Entry.h.
int TAO_FlowSpec_Entry::num_local_sec_addrs_ [protected] |
Definition at line 247 of file FlowSpec_Entry.h.
int TAO_FlowSpec_Entry::num_peer_sec_addrs_ [protected] |
Definition at line 249 of file FlowSpec_Entry.h.
ACE_Addr* TAO_FlowSpec_Entry::peer_addr_ [protected] |
Definition at line 245 of file FlowSpec_Entry.h.
ACE_CString TAO_FlowSpec_Entry::peer_address_str_ [protected] |
Peer Addr in string format i.e hostname:port.
Definition at line 215 of file FlowSpec_Entry.h.
ACE_Addr* TAO_FlowSpec_Entry::peer_control_addr_ [protected] |
Definition at line 250 of file FlowSpec_Entry.h.
char** TAO_FlowSpec_Entry::peer_sec_addr_ [protected] |
Definition at line 248 of file FlowSpec_Entry.h.
TAO_AV_Core::Protocol TAO_FlowSpec_Entry::protocol_ [protected] |
name of the protocol used.
Definition at line 230 of file FlowSpec_Entry.h.
Definition at line 257 of file FlowSpec_Entry.h.
Role TAO_FlowSpec_Entry::role_ [protected] |
Definition at line 259 of file FlowSpec_Entry.h.
TAO_AV_Transport* TAO_FlowSpec_Entry::transport_ [protected] |
Definition at line 253 of file FlowSpec_Entry.h.
int TAO_FlowSpec_Entry::use_flow_protocol_ [protected] |
Definition at line 238 of file FlowSpec_Entry.h.