diff options
Diffstat (limited to 'examples/QOS/Change_Receiver_FlowSpec')
-rw-r--r-- | examples/QOS/Change_Receiver_FlowSpec/QoS_Util.cpp | 8 | ||||
-rw-r--r-- | examples/QOS/Change_Receiver_FlowSpec/QoS_Util.h | 10 | ||||
-rw-r--r-- | examples/QOS/Change_Receiver_FlowSpec/receiver.cpp | 30 |
3 files changed, 24 insertions, 24 deletions
diff --git a/examples/QOS/Change_Receiver_FlowSpec/QoS_Util.cpp b/examples/QOS/Change_Receiver_FlowSpec/QoS_Util.cpp index 0ef3b353248..4005b40a25a 100644 --- a/examples/QOS/Change_Receiver_FlowSpec/QoS_Util.cpp +++ b/examples/QOS/Change_Receiver_FlowSpec/QoS_Util.cpp @@ -12,7 +12,7 @@ ACE_RCSID(QOS, QoS_Util,"$Id$") // constructor. QoS_Util::QoS_Util (int argc, - ACE_TCHAR *argv[]) + char *argv[]) : argc_ (argc), argv_ (argv), source_port_ (SENDER_PORT), @@ -36,7 +36,7 @@ QoS_Util::~QoS_Util (void) int QoS_Util::parse_args (void) { - ACE_Get_Opt get_opts (this->argc_, this->argv_, ACE_TEXT("m:n:p:P:c")); + ACE_Get_Opt get_opts (this->argc_, this->argv_, "m:n:p:P:c"); int c = 0; while ((c = get_opts ()) != -1) @@ -50,10 +50,10 @@ QoS_Util::parse_args (void) this->dest_addr_->set (get_opts.opt_arg ()); break; case 'p': // protocol. - if (ACE_OS::strcasecmp (get_opts.opt_arg (), ACE_TEXT("tcp")) == 0) + if (ACE_OS::strcasecmp (get_opts.opt_arg (), "tcp") == 0) this->protocol_ = IPPROTO_TCP; else - if (ACE_OS::strcasecmp (get_opts.opt_arg (), ACE_TEXT("udp")) == 0) + if (ACE_OS::strcasecmp (get_opts.opt_arg (), "udp") == 0) this->protocol_ = IPPROTO_UDP; else ACE_DEBUG ((LM_DEBUG, diff --git a/examples/QOS/Change_Receiver_FlowSpec/QoS_Util.h b/examples/QOS/Change_Receiver_FlowSpec/QoS_Util.h index ae347de68f6..6de6e2d24d3 100644 --- a/examples/QOS/Change_Receiver_FlowSpec/QoS_Util.h +++ b/examples/QOS/Change_Receiver_FlowSpec/QoS_Util.h @@ -22,21 +22,21 @@ class QoS_Util { - // = TITLE - // This class provides the utility functions like parse_args () + // = TITLE + // This class provides the utility functions like parse_args () // required by a QoS enabled application. public: // constructor. - QoS_Util (int argc, ACE_TCHAR *argv[]); + QoS_Util (int argc, char *argv[]); // destructor. ~QoS_Util (void); // Parse command-line arguments. int parse_args (void); - + // GET methods. ACE_INET_Addr *mult_session_addr (void) const; @@ -52,7 +52,7 @@ private: // Command line arguments. int argc_; - ACE_TCHAR **argv_; + char **argv_; // Multicast session address. ACE_INET_Addr *mult_session_addr_; diff --git a/examples/QOS/Change_Receiver_FlowSpec/receiver.cpp b/examples/QOS/Change_Receiver_FlowSpec/receiver.cpp index 8ef43514e9b..abeda6cd58e 100644 --- a/examples/QOS/Change_Receiver_FlowSpec/receiver.cpp +++ b/examples/QOS/Change_Receiver_FlowSpec/receiver.cpp @@ -25,7 +25,7 @@ #include "Fill_ACE_QoS.h" #include "QoS_Signal_Handler.h" #include "Receiver_QoS_Event_Handler.h" - + // To open QOS sockets administrative access is required on the // machine. Fill in default values for QoS structure. The default // values were simply choosen from existing QOS templates available @@ -42,7 +42,7 @@ int FillQoSParams (ACE_QoS_Params &qos_params, - iovec* iov, + iovec* iov, ACE_QoS* qos) { qos_params.callee_data (iov); @@ -55,8 +55,8 @@ FillQoSParams (ACE_QoS_Params &qos_params, } int -ACE_TMAIN (int argc, ACE_TCHAR * argv[]) -{ +main (int argc, char * argv[]) +{ QoS_Util qos_util(argc, argv); @@ -87,7 +87,7 @@ ACE_TMAIN (int argc, ACE_TCHAR * argv[]) 25, 1))) { - case 1 : + case 1 : ACE_ERROR_RETURN ((LM_ERROR, "Unable to bind the new flow spec\n" "The Flow Spec name already exists\n"), @@ -99,7 +99,7 @@ ACE_TMAIN (int argc, ACE_TCHAR * argv[]) -1); break; } - + ACE_DEBUG ((LM_DEBUG, "g_711 Flow Spec bound successfully\n")); @@ -116,12 +116,12 @@ ACE_TMAIN (int argc, ACE_TCHAR * argv[]) // Opening a new Multicast Datagram. ACE_SOCK_Dgram_Mcast_QoS dgram_mcast_qos; - + // Multicast Session Address specified by user at command line. - // If this address is not specified, - // <localhost:ACE_DEFAULT_MULTICAST_PORT> is assumed. + // If this address is not specified, + // <localhost:ACE_DEFAULT_MULTICAST_PORT> is assumed. ACE_INET_Addr mult_addr (*(qos_util.mult_session_addr ())); - + // Fill the ACE_QoS_Params to be passed to the <ACE_OS::join_leaf> // through subscribe. @@ -132,7 +132,7 @@ ACE_TMAIN (int argc, ACE_TCHAR * argv[]) ACE_QoS_Session_Factory session_factory; // Ask the factory to create a QoS session. - ACE_QoS_Session *qos_session = + ACE_QoS_Session *qos_session = session_factory.create_session (); // Create a destination address for the QoS session. The same @@ -167,7 +167,7 @@ ACE_TMAIN (int argc, ACE_TCHAR * argv[]) // subscribe call will fail. A more abstract version of // subscribe will be added that constrains the various features // of GQoS like different flags etc. - + if (dgram_mcast_qos.subscribe (mult_addr, qos_params, 1, @@ -177,8 +177,8 @@ ACE_TMAIN (int argc, ACE_TCHAR * argv[]) 0, 0, // ACE_Protocol_Info, 0, - ACE_OVERLAPPED_SOCKET_FLAG - | ACE_FLAG_MULTIPOINT_C_LEAF + ACE_OVERLAPPED_SOCKET_FLAG + | ACE_FLAG_MULTIPOINT_C_LEAF | ACE_FLAG_MULTIPOINT_D_LEAF, qos_session) == -1) ACE_ERROR_RETURN ((LM_ERROR, @@ -191,7 +191,7 @@ ACE_TMAIN (int argc, ACE_TCHAR * argv[]) int nIP_TTL = 25; char achInBuf [BUFSIZ]; u_long dwBytes; - + // Should this be abstracted into QoS objects ?? Doesnt seem to have // to do anything directly with QoS. if (ACE_OS::ioctl (dgram_mcast_qos.get_handle (), // Socket. |