#include <FlowSpec_Entry.h>
Inheritance diagram for TAO_FlowSpec_Entry:
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) |
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_ |
Definition at line 68 of file FlowSpec_Entry.h.
|
Definition at line 72 of file FlowSpec_Entry.h.
00073 { 00074 TAO_AV_INVALID = -1, 00075 TAO_AV_DIR_IN = 0, 00076 TAO_AV_DIR_OUT = 1 00077 }; |
|
Definition at line 79 of file FlowSpec_Entry.h.
00080 { 00081 TAO_AV_INVALID_ROLE = -1, 00082 TAO_AV_PRODUCER = 0, 00083 TAO_AV_CONSUMER = 1 00084 }; |
|
default constructor.
Definition at line 21 of file FlowSpec_Entry.cpp.
00022 :address_ (0), 00023 clean_up_address_ (0), 00024 control_address_ (0), 00025 clean_up_control_address_ (0), 00026 address_str_ (), 00027 format_ (), 00028 direction_ (TAO_AV_INVALID), 00029 direction_str_ (), 00030 flowname_ (), 00031 protocol_ (TAO_AV_Core::TAO_AV_NOPROTOCOL), 00032 carrier_protocol_ (), 00033 flow_protocol_ (), 00034 use_flow_protocol_ (0), 00035 entry_ (), 00036 is_multicast_ (0), 00037 delete_peer_addr_ (false), 00038 peer_addr_ (0), 00039 local_sec_addr_ (0), 00040 num_local_sec_addrs_ (0), 00041 peer_sec_addr_ (0), 00042 num_peer_sec_addrs_ (0), 00043 peer_control_addr_ (0), 00044 local_addr_ (0), 00045 local_control_addr_ (0), 00046 transport_ (0), 00047 control_transport_ (0), 00048 handler_ (0), 00049 control_handler_ (0), 00050 protocol_object_ (0), 00051 control_protocol_object_ (0), 00052 role_ (TAO_AV_INVALID_ROLE) 00053 { 00054 } |
|
constructor to construct an entry from the arguments.
Definition at line 57 of file FlowSpec_Entry.cpp. References parse_flow_protocol_string(), set_direction(), and set_protocol().
00065 :address_ (fwd_address), 00066 clean_up_address_ (0), 00067 control_address_ (control_address), 00068 clean_up_control_address_ (0), 00069 address_str_ (), 00070 format_ (format_name), 00071 direction_str_ (direction ), 00072 flowname_ ( flowname ), 00073 carrier_protocol_ ( carrier_protocol ), 00074 flow_protocol_ ( flow_protocol ), 00075 use_flow_protocol_ (0), 00076 entry_ (), 00077 is_multicast_ (0), 00078 delete_peer_addr_ (false), 00079 peer_addr_ (0), 00080 local_sec_addr_ (0), 00081 num_local_sec_addrs_ (0), 00082 peer_sec_addr_ (0), 00083 num_peer_sec_addrs_ (0), 00084 peer_control_addr_ (0), 00085 local_addr_ (0), 00086 local_control_addr_ (0), 00087 transport_ (0), 00088 control_transport_ (0), 00089 handler_ (0), 00090 control_handler_ (0), 00091 protocol_object_ (0), 00092 control_protocol_object_ (0), 00093 role_ (TAO_AV_INVALID_ROLE) 00094 { 00095 this->set_protocol (); 00096 this->set_direction (this->direction_str_.c_str()); 00097 this->parse_flow_protocol_string (this->flow_protocol_.c_str() ); 00098 } |
|
Definition at line 100 of file FlowSpec_Entry.cpp. References parse_address(), parse_flow_protocol_string(), and set_direction().
00106 :address_ (0), 00107 clean_up_address_ (0), 00108 control_address_ (0), 00109 clean_up_control_address_ (0), 00110 address_str_ ( address ), 00111 format_ ( format_name ), 00112 direction_str_ ( direction ), 00113 flowname_ ( flowname ), 00114 carrier_protocol_ (), 00115 flow_protocol_ ( flow_protocol ), 00116 use_flow_protocol_ (0), 00117 entry_ (), 00118 is_multicast_ (0), 00119 peer_addr_ (0), 00120 local_sec_addr_ (0), 00121 num_local_sec_addrs_ (0), 00122 peer_sec_addr_ (0), 00123 num_peer_sec_addrs_ (0), 00124 peer_control_addr_ (0), 00125 local_addr_ (0), 00126 local_control_addr_ (0), 00127 transport_ (0), 00128 control_transport_ (0), 00129 handler_ (0), 00130 control_handler_ (0), 00131 protocol_object_ (0), 00132 control_protocol_object_ (0), 00133 role_ (TAO_AV_INVALID_ROLE) 00134 { 00135 this->parse_flow_protocol_string (this->flow_protocol_.c_str() ); 00136 this->parse_address (this->address_str_.c_str(), TAO_AV_Core::TAO_AV_DATA); 00137 this->set_direction (this->direction_str_.c_str()); 00138 } |
|
virtual destructor.
Definition at line 141 of file FlowSpec_Entry.cpp. References clean_up_address_, clean_up_control_address_, control_address_, delete_peer_addr_, local_control_addr_, and peer_addr_.
00142 { 00143 if (this->delete_peer_addr_) 00144 delete this->peer_addr_; 00145 00146 if (this->clean_up_address_) 00147 delete address_; 00148 if (this->clean_up_control_address_) 00149 delete control_address_; 00150 if (local_control_addr_ != 0) 00151 delete local_control_addr_; 00152 } |
|
Definition at line 94 of file FlowSpec_Entry.i.
00095 { 00096 this->address_ = addr; 00097 } |
|
accessor to address of the carrier protocol.
Definition at line 87 of file FlowSpec_Entry.i. Referenced by TAO_AV_Core::init_forward_flows(), TAO_AV_Core::init_reverse_flows(), TAO_AV_Acceptor_Registry::open(), TAO_AV_Connector_Registry::open(), and TAO_AV_UDP_Acceptor::open_i().
00088 { 00089 return this->address_; 00090 } |
|
Address in string format i. hostname:port.
Definition at line 115 of file FlowSpec_Entry.i. References address_str_.
00116 { 00117 return this->address_str_.c_str(); 00118 } |
|
accessor to carrier protocol i.e TCP,UDP,RTP/UDP.
Definition at line 73 of file FlowSpec_Entry.i.
00074 { 00075 return this->protocol_; 00076 } |
|
accessor to string version of carrier protocol.
Definition at line 80 of file FlowSpec_Entry.i. References carrier_protocol_. Referenced by TAO_AV_Core::init_forward_flows(), TAO_AV_Acceptor_Registry::open(), TAO_AV_Connector_Registry::open(), TAO_FlowEndPoint::open(), and TAO_AV_Acceptor_Registry::open_default().
00081 { 00082 return this->carrier_protocol_.c_str(); 00083 } |
|
Definition at line 108 of file FlowSpec_Entry.i. References control_address_.
00109 { 00110 this->control_address_ = addr; 00111 } |
|
Definition at line 101 of file FlowSpec_Entry.i. References control_address_. Referenced by TAO_AV_Core::init_forward_flows(), and TAO_AV_UDP_Acceptor::open_i().
00102 { 00103 return this->control_address_; 00104 } |
|
Definition at line 300 of file FlowSpec_Entry.i. References control_handler_.
00301 { 00302 this->control_handler_ = handler; 00303 } |
|
Definition at line 272 of file FlowSpec_Entry.i. References control_handler_. Referenced by TAO_AV_UDP_Connector::connect(), TAO_AV_UDP_Acceptor::open_i(), TAO_AV_UDP_Acceptor::~TAO_AV_UDP_Acceptor(), and TAO_AV_UDP_Connector::~TAO_AV_UDP_Connector().
00273 { 00274 return this->control_handler_; 00275 } |
|
Definition at line 328 of file FlowSpec_Entry.i. References control_protocol_object_.
00329 { 00330 this->control_protocol_object_ = object; 00331 } |
|
Definition at line 321 of file FlowSpec_Entry.i. References control_protocol_object_. Referenced by TAO_AV_UDP_Connector::connect(), TAO_AV_Acceptor_Registry::open(), TAO_AV_Connector_Registry::open(), TAO_AV_Acceptor_Registry::open_default(), and TAO_AV_UDP_Acceptor::open_i().
00322 { 00323 return this->control_protocol_object_; 00324 } |
|
Definition at line 258 of file FlowSpec_Entry.i. References control_transport_.
00259 { 00260 this->control_transport_ = control_transport; 00261 } |
|
Definition at line 251 of file FlowSpec_Entry.i. References control_transport_. Referenced by TAO_AV_Connector_Registry::open().
00252 { 00253 return this->control_transport_; 00254 } |
|
accessor to the direction.
Definition at line 45 of file FlowSpec_Entry.i. References direction_. Referenced by TAO_AV_Core::init_forward_flows(), and TAO_AV_Core::init_reverse_flows().
00046 { 00047 return this->direction_; 00048 } |
|
accessor to string version of direction .
Definition at line 52 of file FlowSpec_Entry.i. References direction_str_.
00053 { 00054 return this->direction_str_.c_str(); 00055 } |
|
converts the entry to a string.
Implemented in TAO_Forward_FlowSpec_Entry, and TAO_Reverse_FlowSpec_Entry. |
|
set the flow protocol string.
Definition at line 66 of file FlowSpec_Entry.i. References flow_protocol_, and CORBA::string_dup().
00067 { 00068 this->flow_protocol_ = CORBA::string_dup (str); 00069 } |
|
accessor to the flow protocol string.
Definition at line 59 of file FlowSpec_Entry.i. References flow_protocol_. Referenced by TAO_AV_Core::init_forward_flows(), TAO_AV_SFP_Factory::make_protocol_object(), TAO_AV_Acceptor_Registry::open(), TAO_AV_Connector_Registry::open(), and TAO_AV_Acceptor_Registry::open_default().
00060 { 00061 return this->flow_protocol_.c_str(); 00062 } |
|
accessor to name of this flow.
Definition at line 129 of file FlowSpec_Entry.i. Referenced by TAO_AV_Core::init_forward_flows(), TAO_AV_Core::init_reverse_flows(), TAO_AV_UDP_Flow_Factory::make_protocol_object(), TAO_AV_TCP_Flow_Factory::make_protocol_object(), TAO_AV_SFP_Factory::make_protocol_object(), TAO_AV_RTP_Flow_Factory::make_protocol_object(), TAO_AV_Acceptor_Registry::open(), and TAO_AV_Connector_Registry::open().
00130 { 00131 return this->flowname_.c_str(); 00132 } |
|
accessor to format to be used for this flow.
Definition at line 122 of file FlowSpec_Entry.i. Referenced by TAO_AV_Core::init_forward_flows().
00123 { 00124 return this->format_.c_str(); 00125 } |
|
Definition at line 175 of file FlowSpec_Entry.i.
00176 { 00177 return this->local_addr_; 00178 } |
|
Definition at line 464 of file FlowSpec_Entry.cpp. References ACE_CString, ACE_ERROR_RETURN, ACE_NEW_RETURN, ACE_Addr::get_type(), and LM_ERROR.
00465 { 00466 if (this->local_addr_ == 0) 00467 return 0; 00468 00469 switch (this->local_addr_->get_type ()) 00470 { 00471 case AF_INET: 00472 { 00473 char *buf; 00474 ACE_NEW_RETURN (buf, 00475 char [BUFSIZ], 00476 0); 00477 00478 ACE_INET_Addr *inet_addr = dynamic_cast<ACE_INET_Addr *> (this->local_addr_); 00479 inet_addr->addr_to_string (buf,BUFSIZ); 00480 ACE_CString cstring (buf, 0, 0); 00481 00482 return cstring.rep (); 00483 } 00484 default: 00485 ACE_ERROR_RETURN ((LM_ERROR,"Address family not supported"),0); 00486 } 00487 } |
|
Definition at line 182 of file FlowSpec_Entry.i. References local_control_addr_. Referenced by TAO_AV_UDP_Connector::connect(), and TAO_AV_UDP_Acceptor::open_i().
00183 { 00184 return this->local_control_addr_; 00185 } |
|
|
|
Definition at line 199 of file FlowSpec_Entry.i. References local_sec_addr_.
00200 { 00201 return this->local_sec_addr_; 00202 } |
|
Definition at line 152 of file FlowSpec_Entry.i. References peer_addr_. Referenced by TAO_AV_Core::init_forward_flows().
00153 { 00154 return this->peer_addr_; 00155 } |
|
|
|
Definition at line 223 of file FlowSpec_Entry.i. References peer_sec_addr_.
00224 { 00225 return this->peer_sec_addr_; 00226 } |
|
Definition at line 279 of file FlowSpec_Entry.i.
00280 { 00281 this->handler_ = handler; 00282 00283 // // Now remove the handler from the reactor if the handler is for a producer. 00284 // switch (this->role ()) 00285 // { 00286 // case TAO_AV_PRODUCER: 00287 // { 00288 // ACE_Event_Handler *event_handler = handler->event_handler (); 00289 // int result = event_handler->reactor ()->remove_handler (event_handler, 00290 // ACE_Event_Handler::READ_MASK); 00291 // if (result < 0) 00292 // ACE_ERROR ((LM_ERROR,"TAO_FlowSpec_Entry::handler\n")); 00293 // break; 00294 // } 00295 // } 00296 } |
|
Definition at line 265 of file FlowSpec_Entry.i. Referenced by TAO_AV_Core::init_forward_flows(), TAO_AV_TCP_Acceptor::make_svc_handler(), TAO_AV_TCP_Base_Acceptor::make_svc_handler(), TAO_AV_TCP_Connector::make_svc_handler(), and TAO_AV_UDP_Acceptor::open_i().
00266 { 00267 return this->handler_; 00268 } |
|
returns true for a multicast address.
Definition at line 335 of file FlowSpec_Entry.i. References is_multicast_.
00336 { 00337 return this->is_multicast_; 00338 } |
|
Definition at line 206 of file FlowSpec_Entry.i. References num_local_sec_addrs_.
00207 { 00208 return this->num_local_sec_addrs_; 00209 } |
|
Definition at line 230 of file FlowSpec_Entry.i. References num_peer_sec_addrs_.
00231 { 00232 return this->num_peer_sec_addrs_; 00233 } |
|
construct the entry from a string specified by the flowSpec grammar.
Implemented in TAO_Forward_FlowSpec_Entry, and TAO_Reverse_FlowSpec_Entry. |
|
sets the address for this flow.
Definition at line 239 of file FlowSpec_Entry.cpp. References ACE_CString, ACE_DEBUG, ACE_NEW_RETURN, address_str_, ACE_OS::atoi(), carrier_protocol_, clean_up_address_, clean_up_control_address_, control_address_, is_multicast_, LM_DEBUG, local_sec_addr_, num_local_sec_addrs_, TAO_Tokenizer::num_tokens(), set_protocol(), ACE_OS::strcasecmp(), ACE_OS::strcmp(), CORBA::string_dup(), and TAO_debug_level. Referenced by TAO_Reverse_FlowSpec_Entry::parse(), TAO_Forward_FlowSpec_Entry::parse(), and TAO_FlowSpec_Entry().
00241 { 00242 if (TAO_debug_level > 0) 00243 ACE_DEBUG ((LM_DEBUG, "TAO_FlowSpec_Entry::parse_address [%s]\n", address)); 00244 00245 if (address == 0) 00246 return 0; 00247 if (ACE_OS::strcmp (address,"") == 0) 00248 return 0; 00249 TAO_Tokenizer protocol_tokenizer (address,'='); 00250 00251 this->carrier_protocol_ = protocol_tokenizer[0]; 00252 00253 int result = this->set_protocol (); 00254 if (result < 0) 00255 return result; 00256 00257 if (protocol_tokenizer [1] != 0) 00258 { 00259 ACE_DEBUG ((LM_DEBUG, 00260 "Protocol tokenixer is not null\n")); 00261 if ((flow_comp == TAO_AV_Core::TAO_AV_DATA) || 00262 //(flow_comp == TAO_AV_Core::TAO_AV_BOTH) || 00263 (flow_comp == TAO_AV_Core::TAO_AV_CONTROL) ) 00264 { 00265 ACE_CString addr; 00266 if (this->protocol_ == TAO_AV_Core::TAO_AV_SCTP_SEQ) 00267 { 00268 TAO_Tokenizer addr_token (protocol_tokenizer [1], ';'); 00269 00270 ACE_DEBUG ((LM_DEBUG, 00271 "Number of local sec addresses = %d\n", 00272 addr_token.num_tokens () - 1)); 00273 00274 if (addr_token.num_tokens () != 0) 00275 { 00276 addr += addr_token [0]; 00277 ACE_NEW_RETURN (local_sec_addr_, char* [addr_token.num_tokens () - 1],-1); 00278 for (int j = 1; j <= addr_token.num_tokens () - 1; j++) 00279 { 00280 ACE_DEBUG ((LM_DEBUG, 00281 "adding addresses to sequence %s\n", 00282 addr_token [j])); 00283 00284 local_sec_addr_ [j-1] = CORBA::string_dup (addr_token [j]); 00285 } 00286 num_local_sec_addrs_ = addr_token.num_tokens () - 1; 00287 } 00288 } 00289 else addr += protocol_tokenizer[1]; 00290 00291 00292 switch (this->protocol_) 00293 { 00294 case TAO_AV_Core::TAO_AV_SFP_UDP: 00295 case TAO_AV_Core::TAO_AV_USERDEFINED_UDP: 00296 case TAO_AV_Core::TAO_AV_RTP_UDP: 00297 case TAO_AV_Core::TAO_AV_TCP: 00298 case TAO_AV_Core::TAO_AV_SCTP_SEQ: 00299 case TAO_AV_Core::TAO_AV_UDP: 00300 case TAO_AV_Core::TAO_AV_QOS_UDP: 00301 { 00302 if (flow_comp == TAO_AV_Core::TAO_AV_DATA) 00303 this->address_str_ = addr; 00304 ACE_INET_Addr *inet_addr; 00305 ACE_NEW_RETURN (inet_addr, 00306 ACE_INET_Addr (addr.c_str() ), 00307 -1); 00308 if (flow_comp == TAO_AV_Core::TAO_AV_DATA) 00309 { 00310 this->clean_up_address_ = 1; 00311 this->address_ = inet_addr; 00312 } 00313 else 00314 { 00315 this->clean_up_control_address_ = 1; 00316 this->control_address_ = inet_addr; 00317 } 00318 00319 if (IN_CLASSD (inet_addr->get_ip_address ())) 00320 { 00321 if (TAO_debug_level > 0) 00322 ACE_DEBUG ((LM_DEBUG, "TAO_FlowSpec_Entry::parse_address is multicast\n")); 00323 00324 this->is_multicast_ = 1; 00325 switch (this->protocol_) 00326 { 00327 case TAO_AV_Core::TAO_AV_UDP: 00328 this->protocol_ = TAO_AV_Core::TAO_AV_UDP_MCAST; 00329 break; 00330 case TAO_AV_Core::TAO_AV_RTP_UDP: 00331 this->protocol_ = TAO_AV_Core::TAO_AV_RTP_UDP_MCAST; 00332 break; 00333 case TAO_AV_Core::TAO_AV_SFP_UDP: 00334 this->protocol_ = TAO_AV_Core::TAO_AV_SFP_UDP_MCAST; 00335 break; 00336 case TAO_AV_Core::TAO_AV_USERDEFINED_UDP: 00337 this->protocol_ = TAO_AV_Core::TAO_AV_USERDEFINED_UDP_MCAST; 00338 break; 00339 default: 00340 break; 00341 } 00342 } 00343 } 00344 break; 00345 default: 00346 if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG,"ATM support not added yet\n")); 00347 } 00348 } 00349 else 00350 { 00351 ACE_DEBUG ((LM_DEBUG, 00352 "AV BOTH %s \n", 00353 protocol_tokenizer[1])); 00354 00355 TAO_Tokenizer address_tokenizer (protocol_tokenizer[1], ':'); 00356 TAO_Tokenizer port_tokenizer (address_tokenizer[1], ';'); 00357 ACE_CString addr; 00358 addr += address_tokenizer[0]; 00359 addr += ":"; 00360 addr += port_tokenizer[0]; 00361 00362 if (this->protocol_ == TAO_AV_Core::TAO_AV_SCTP_SEQ) 00363 { 00364 00365 ACE_DEBUG ((LM_DEBUG, 00366 "Number of local sec addresses = %d\n", 00367 port_tokenizer.num_tokens () - 1)); 00368 00369 if (port_tokenizer.num_tokens () - 1 != 0) 00370 { 00371 ACE_NEW_RETURN (local_sec_addr_, char* [port_tokenizer.num_tokens () - 1],-1); 00372 for (int j = 1; j <= port_tokenizer.num_tokens () - 1; j++) 00373 { 00374 ACE_DEBUG ((LM_DEBUG, 00375 "adding addresses to sequence %s\n", 00376 port_tokenizer [j])); 00377 00378 local_sec_addr_ [j-1] = CORBA::string_dup (port_tokenizer [j]); 00379 } 00380 num_local_sec_addrs_ = port_tokenizer.num_tokens () - 1; 00381 } 00382 } 00383 00384 short control_port = static_cast<short> (ACE_OS::atoi(port_tokenizer[0])) + 1; 00385 char control_port_str[6]; 00386 sprintf (control_port_str, "%d", control_port); 00387 00388 ACE_CString control_addr = ""; 00389 if (ACE_OS::strcasecmp (this->carrier_protocol_.c_str(),"RTP/UDP") == 0) 00390 { 00391 control_addr += address_tokenizer[0]; 00392 control_addr += ":"; 00393 if (port_tokenizer[1] != 0) 00394 control_addr += port_tokenizer[1]; 00395 else 00396 control_addr += control_port_str; 00397 } 00398 00399 switch (this->protocol_) 00400 { 00401 case TAO_AV_Core::TAO_AV_SFP_UDP: 00402 case TAO_AV_Core::TAO_AV_USERDEFINED_UDP: 00403 case TAO_AV_Core::TAO_AV_RTP_UDP: 00404 case TAO_AV_Core::TAO_AV_TCP: 00405 case TAO_AV_Core::TAO_AV_SCTP_SEQ: 00406 case TAO_AV_Core::TAO_AV_UDP: 00407 case TAO_AV_Core::TAO_AV_QOS_UDP: 00408 { 00409 this->address_str_ = addr; 00410 ACE_INET_Addr *inet_addr; 00411 ACE_NEW_RETURN (inet_addr, 00412 ACE_INET_Addr (addr.c_str() ), 00413 -1); 00414 this->clean_up_address_ = 1; 00415 this->address_ = inet_addr; 00416 00417 if (ACE_OS::strcasecmp (this->carrier_protocol_.c_str(),"RTP/UDP") == 0) 00418 { 00419 ACE_INET_Addr *control_inet_addr; 00420 ACE_NEW_RETURN (control_inet_addr, 00421 ACE_INET_Addr (control_addr.c_str() ), 00422 -1); 00423 this->clean_up_control_address_ = 1; 00424 this->control_address_ = control_inet_addr; 00425 } 00426 00427 if (IN_CLASSD (inet_addr->get_ip_address ())) 00428 { 00429 if (TAO_debug_level > 0) 00430 ACE_DEBUG ((LM_DEBUG, "TAO_FlowSpec_Entry::parse_address is multicast\n")); 00431 00432 this->is_multicast_ = 1; 00433 switch (this->protocol_) 00434 { 00435 case TAO_AV_Core::TAO_AV_UDP: 00436 this->protocol_ = TAO_AV_Core::TAO_AV_UDP_MCAST; 00437 break; 00438 case TAO_AV_Core::TAO_AV_RTP_UDP: 00439 this->protocol_ = TAO_AV_Core::TAO_AV_RTP_UDP_MCAST; 00440 break; 00441 case TAO_AV_Core::TAO_AV_SFP_UDP: 00442 this->protocol_ = TAO_AV_Core::TAO_AV_SFP_UDP_MCAST; 00443 break; 00444 case TAO_AV_Core::TAO_AV_USERDEFINED_UDP: 00445 this->protocol_ = TAO_AV_Core::TAO_AV_USERDEFINED_UDP_MCAST; 00446 break; 00447 default: 00448 break; 00449 } 00450 } 00451 } 00452 break; 00453 default: 00454 if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG,"ATM support not added yet\n")); 00455 } 00456 } 00457 } 00458 ACE_DEBUG ((LM_DEBUG, 00459 "Return from parse address\n")); 00460 return 0; 00461 } |
|
parses the flow protocol string with tokens separated by :
Definition at line 28 of file FlowSpec_Entry.i. References flow_protocol_, ACE_OS::strcmp(), and use_flow_protocol_. Referenced by TAO_Reverse_FlowSpec_Entry::parse(), TAO_Forward_FlowSpec_Entry::parse(), and TAO_FlowSpec_Entry().
00029 { 00030 if (flow_string == 0) 00031 return 0; 00032 00033 if (ACE_OS::strcmp (flow_string,"") == 0) 00034 return 0; 00035 00036 this->use_flow_protocol_ = 1; 00037 // do some flow protocol processing. 00038 this->flow_protocol_ = flow_string; 00039 00040 return 0; 00041 } |
|
Definition at line 314 of file FlowSpec_Entry.i. References protocol_object_.
00315 { 00316 this->protocol_object_ = object; 00317 } |
|
Definition at line 307 of file FlowSpec_Entry.i. References protocol_object_. Referenced by TAO_AV_UDP_Connector::connect(), TAO_AV_TCP_Acceptor::make_svc_handler(), TAO_AV_TCP_Connector::make_svc_handler(), TAO_AV_Acceptor_Registry::open(), TAO_AV_Connector_Registry::open(), TAO_AV_Acceptor_Registry::open_default(), and TAO_AV_UDP_Acceptor::open_i().
00308 { 00309 return this->protocol_object_; 00310 } |
|
Definition at line 342 of file FlowSpec_Entry.i. References role_.
00343 { 00344 this->role_ = role; 00345 } |
|
Implemented in TAO_Forward_FlowSpec_Entry, and TAO_Reverse_FlowSpec_Entry. Referenced by TAO_AV_Core::init_forward_flows(), TAO_AV_Core::init_reverse_flows(), and TAO_AV_SFP_Factory::make_protocol_object(). |
|
sets the direction flag.
Definition at line 11 of file FlowSpec_Entry.i. References direction_, direction_str_, ACE_OS::strcasecmp(), TAO_AV_DIR_IN, TAO_AV_DIR_OUT, and TAO_AV_INVALID. Referenced by TAO_Forward_FlowSpec_Entry::parse(), and TAO_FlowSpec_Entry().
00012 { 00013 this->direction_str_ = direction; 00014 if (direction == 0) 00015 { 00016 this->direction_ = TAO_AV_INVALID; 00017 return -1; 00018 } 00019 if (ACE_OS::strcasecmp (direction,"in") == 0) 00020 this->direction_ = TAO_AV_DIR_IN; 00021 else if (ACE_OS::strcasecmp (direction,"out") == 0) 00022 this->direction_ = TAO_AV_DIR_OUT; 00023 return 0; 00024 } |
|
Definition at line 159 of file FlowSpec_Entry.i. Referenced by TAO_AV_UDP_Acceptor::open_i().
00160 { 00161 this->local_addr_ = local_addr; 00162 return 0; 00163 } |
|
Definition at line 167 of file FlowSpec_Entry.i. References local_control_addr_. Referenced by TAO_AV_UDP_Connector::connect(), and TAO_AV_UDP_Acceptor::open_i().
00168 { 00169 this->local_control_addr_ = local_addr; 00170 return 0; 00171 } |
|
Definition at line 189 of file FlowSpec_Entry.i. References local_sec_addr_, and num_local_sec_addrs_.
00191 { 00192 this->local_sec_addr_ = local_sec_addr; 00193 this->num_local_sec_addrs_ = size; 00194 return 0; 00195 } |
|
Definition at line 137 of file FlowSpec_Entry.i. References delete_peer_addr_, peer_addr_, and TAO_AV_Flow_Handler::set_remote_address(). Referenced by TAO_AV_Core::init_reverse_flows().
00138 { 00139 if (this->delete_peer_addr_) 00140 delete this->peer_addr_; 00141 00142 this->delete_peer_addr_ = false; 00143 this->peer_addr_ = peer_addr; 00144 00145 if (this->handler_ != 0) 00146 this->handler_->set_remote_address (peer_addr); 00147 return 0; 00148 } |
|
|
|
Definition at line 213 of file FlowSpec_Entry.i. References num_peer_sec_addrs_, and peer_sec_addr_.
00215 { 00216 this->peer_sec_addr_ = peer_sec_addr; 00217 this->num_peer_sec_addrs_ = size; 00218 return 0; 00219 } |
|
sets the protocol_ enum from the carrier_protocol_ string.
Definition at line 155 of file FlowSpec_Entry.cpp. References ACE_DEBUG, flow_protocol_, is_multicast_, LM_DEBUG, ACE_OS::strcasecmp(), ACE_OS::strncasecmp(), TAO_debug_level, and use_flow_protocol_. Referenced by parse_address(), and TAO_FlowSpec_Entry().
00156 { 00157 if (!this->use_flow_protocol_) 00158 { 00159 if (ACE_OS::strcasecmp (this->carrier_protocol_.c_str(),"TCP") == 0) 00160 this->protocol_ = TAO_AV_Core::TAO_AV_TCP; 00161 else if (ACE_OS::strcasecmp (this->carrier_protocol_.c_str(),"SCTP_SEQ") == 0) 00162 this->protocol_ = TAO_AV_Core::TAO_AV_SCTP_SEQ; 00163 else if (ACE_OS::strcasecmp (this->carrier_protocol_.c_str(),"UDP") == 0) 00164 this->protocol_ = TAO_AV_Core::TAO_AV_UDP; 00165 else if (ACE_OS::strcasecmp (this->carrier_protocol_.c_str(),"QoS_UDP") == 0) 00166 this->protocol_ = TAO_AV_Core::TAO_AV_QOS_UDP; 00167 else if (ACE_OS::strcasecmp (this->carrier_protocol_.c_str(),"AAL5") == 0) 00168 this->protocol_ = TAO_AV_Core::TAO_AV_AAL5; 00169 else if (ACE_OS::strcasecmp (this->carrier_protocol_.c_str(),"AAL3_4") == 0) 00170 this->protocol_ = TAO_AV_Core::TAO_AV_AAL3_4; 00171 else if (ACE_OS::strcasecmp (this->carrier_protocol_.c_str(),"AAL1") == 0) 00172 this->protocol_ = TAO_AV_Core::TAO_AV_AAL1; 00173 else if (ACE_OS::strcasecmp (this->carrier_protocol_.c_str(),"RTP/UDP") == 0){ 00174 this->protocol_ = TAO_AV_Core::TAO_AV_UDP; 00175 flow_protocol_ = "RTP"; 00176 } 00177 else if (ACE_OS::strcasecmp (this->carrier_protocol_.c_str(),"RTP/AAL5") == 0) 00178 this->protocol_ = TAO_AV_Core::TAO_AV_RTP_AAL5; 00179 else if (ACE_OS::strcasecmp (this->carrier_protocol_.c_str(),"IPX") == 0) 00180 this->protocol_ = TAO_AV_Core::TAO_AV_IPX; 00181 else 00182 { 00183 this->protocol_ = TAO_AV_Core::TAO_AV_NOPROTOCOL; 00184 return -1; 00185 } 00186 } 00187 else 00188 { 00189 if (ACE_OS::strcasecmp (this->carrier_protocol_.c_str(),"UDP") == 0) 00190 { 00191 if (ACE_OS::strncasecmp (this->flow_protocol_.c_str (),"sfp",3) == 0) 00192 { 00193 this->protocol_ = TAO_AV_Core::TAO_AV_SFP_UDP; 00194 } 00195 else this->protocol_ = TAO_AV_Core::TAO_AV_USERDEFINED_UDP; 00196 } 00197 else 00198 { 00199 this->protocol_ = TAO_AV_Core::TAO_AV_NOPROTOCOL; 00200 return -1; 00201 } 00202 } 00203 00204 if (this->address_ != 0) 00205 { 00206 if (TAO_debug_level > 0) 00207 ACE_DEBUG ((LM_DEBUG, "TAO_FlowSpec_Entry::set_protocol address is not 0\n")); 00208 ACE_INET_Addr *inet_addr = dynamic_cast<ACE_INET_Addr*> (this->address_); 00209 char buf[BUFSIZ]; 00210 inet_addr->addr_to_string (buf,BUFSIZ); 00211 if (TAO_debug_level > 0) 00212 ACE_DEBUG ((LM_DEBUG,"TAO_FlowSpec_Entry::set_protocol:%s %x\n",buf, inet_addr->get_ip_address ())); 00213 if (IN_CLASSD (inet_addr->get_ip_address ())) 00214 { 00215 this->is_multicast_ = 1; 00216 switch (this->protocol_) 00217 { 00218 case TAO_AV_Core::TAO_AV_UDP: 00219 this->protocol_ = TAO_AV_Core::TAO_AV_UDP_MCAST; 00220 break; 00221 case TAO_AV_Core::TAO_AV_RTP_UDP: 00222 this->protocol_ = TAO_AV_Core::TAO_AV_RTP_UDP_MCAST; 00223 break; 00224 case TAO_AV_Core::TAO_AV_SFP_UDP: 00225 this->protocol_ = TAO_AV_Core::TAO_AV_SFP_UDP_MCAST; 00226 break; 00227 case TAO_AV_Core::TAO_AV_USERDEFINED_UDP: 00228 this->protocol_ = TAO_AV_Core::TAO_AV_USERDEFINED_UDP_MCAST; 00229 break; 00230 default: 00231 break; 00232 } 00233 } 00234 } 00235 return 0; 00236 } |
|
Definition at line 244 of file FlowSpec_Entry.i.
00245 { 00246 this->transport_ = transport; 00247 } |
|
Definition at line 237 of file FlowSpec_Entry.i. Referenced by TAO_AV_Connector_Registry::open().
00238 { 00239 return this->transport_; 00240 } |
|
Addr information for the carrier protocol.
Definition at line 206 of file FlowSpec_Entry.h. |
|
Fwd Addr in string format i.e hostname:port.
Definition at line 212 of file FlowSpec_Entry.h. Referenced by address_str(), and parse_address(). |
|
carrier protocol string.
Definition at line 233 of file FlowSpec_Entry.h. Referenced by carrier_protocol_str(), and parse_address(). |
|
Definition at line 207 of file FlowSpec_Entry.h. Referenced by parse_address(), and ~TAO_FlowSpec_Entry(). |
|
Definition at line 209 of file FlowSpec_Entry.h. Referenced by parse_address(), and ~TAO_FlowSpec_Entry(). |
|
Definition at line 208 of file FlowSpec_Entry.h. Referenced by control_address(), parse_address(), and ~TAO_FlowSpec_Entry(). |
|
Definition at line 256 of file FlowSpec_Entry.h. Referenced by control_handler(). |
|
Definition at line 258 of file FlowSpec_Entry.h. Referenced by control_protocol_object(). |
|
Definition at line 254 of file FlowSpec_Entry.h. Referenced by control_transport(). |
|
Definition at line 244 of file FlowSpec_Entry.h. Referenced by set_peer_addr(), and ~TAO_FlowSpec_Entry(). |
|
Direction of this flow.
Definition at line 221 of file FlowSpec_Entry.h. Referenced by direction(), and set_direction(). |
|
string representation of the direction.
Definition at line 224 of file FlowSpec_Entry.h. Referenced by direction_str(), and set_direction(). |
|
The flowspec entry;.
Definition at line 241 of file FlowSpec_Entry.h. |
|
flow protocol string.
Definition at line 236 of file FlowSpec_Entry.h. Referenced by flow_protocol_str(), parse_flow_protocol_string(), and set_protocol(). |
|
name of this flow.
Definition at line 227 of file FlowSpec_Entry.h. |
|
format string.
Definition at line 218 of file FlowSpec_Entry.h. |
|
Definition at line 255 of file FlowSpec_Entry.h. |
|
Definition at line 243 of file FlowSpec_Entry.h. Referenced by is_multicast(), parse_address(), and set_protocol(). |
|
Definition at line 251 of file FlowSpec_Entry.h. |
|
Definition at line 252 of file FlowSpec_Entry.h. Referenced by get_local_control_addr(), set_local_control_addr(), and ~TAO_FlowSpec_Entry(). |
|
Definition at line 246 of file FlowSpec_Entry.h. Referenced by get_local_sec_addr(), parse_address(), and set_local_sec_addr(). |
|
Definition at line 247 of file FlowSpec_Entry.h. Referenced by num_local_sec_addrs(), parse_address(), and set_local_sec_addr(). |
|
Definition at line 249 of file FlowSpec_Entry.h. Referenced by num_peer_sec_addrs(), and set_peer_sec_addr(). |
|
Definition at line 245 of file FlowSpec_Entry.h. Referenced by get_peer_addr(), set_peer_addr(), and ~TAO_FlowSpec_Entry(). |
|
Peer Addr in string format i.e hostname:port.
Definition at line 215 of file FlowSpec_Entry.h. |
|
Definition at line 250 of file FlowSpec_Entry.h. |
|
Definition at line 248 of file FlowSpec_Entry.h. Referenced by get_peer_sec_addr(), and set_peer_sec_addr(). |
|
name of the protocol used.
Definition at line 230 of file FlowSpec_Entry.h. |
|
Definition at line 257 of file FlowSpec_Entry.h. Referenced by protocol_object(). |
|
Definition at line 259 of file FlowSpec_Entry.h. Referenced by role(). |
|
Definition at line 253 of file FlowSpec_Entry.h. |
|
Definition at line 238 of file FlowSpec_Entry.h. Referenced by parse_flow_protocol_string(), and set_protocol(). |