diff options
author | vishal <vishal@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-09-15 02:00:04 +0000 |
---|---|---|
committer | vishal <vishal@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-09-15 02:00:04 +0000 |
commit | 0e3bf0dcac8a98a86035fdca73866bec6a39fa3b (patch) | |
tree | f70db62812cfb030bb5d2a9db0a852e3031bf727 /examples/QOS | |
parent | 5a12c44489f0dd63e161c3d0571d0f7a4cbe4ba4 (diff) | |
download | ATCD-0e3bf0dcac8a98a86035fdca73866bec6a39fa3b.tar.gz |
*** empty log message ***
Diffstat (limited to 'examples/QOS')
-rw-r--r-- | examples/QOS/QosEvent.h | 13 | ||||
-rw-r--r-- | examples/QOS/Sender_QOS_Event_Handler.cpp | 7 | ||||
-rw-r--r-- | examples/QOS/client.cpp | 33 | ||||
-rw-r--r-- | examples/QOS/server.cpp | 29 |
4 files changed, 21 insertions, 61 deletions
diff --git a/examples/QOS/QosEvent.h b/examples/QOS/QosEvent.h index 822ebef01a1..90c99760fe1 100644 --- a/examples/QOS/QosEvent.h +++ b/examples/QOS/QosEvent.h @@ -47,6 +47,17 @@ #define WSA_FLAG_MULTIPOINT_D_LEAF 0x10 #define QOS_NOT_SPECIFIED 0xFFFFFFFF +#define SERVICETYPE_NOTRAFFIC 0x00000000 // No data in this direction. +#define SERVICETYPE_CONTROLLEDLOAD 0x00000002 // Controlled Load. +#define SERVICETYPE_GUARANTEED 0x00000003 // Guaranteed. + +#define JL_SENDER_ONLY 0x01 +#define JL_BOTH 0x04 + +#define SIO_GET_QOS (0x40000000 | 0x08000000 | 7) +#define SIO_MULTIPOINT_LOOPBACK (0x08000000 | 9) +#define SIO_MULTICAST_SCOPE (0x08000000 | 10) +#define SIO_SET_QOS (0x08000000 | 11) #endif /* ACE_HAS_WINSOCK2 */ @@ -206,8 +217,6 @@ ACE_Flow_Spec default_g711 (9200, 1); -SOCKADDR_IN g_destaddr; - #else extern FLOWSPEC default_notraffic; diff --git a/examples/QOS/Sender_QOS_Event_Handler.cpp b/examples/QOS/Sender_QOS_Event_Handler.cpp index f1c61177178..06c0d385259 100644 --- a/examples/QOS/Sender_QOS_Event_Handler.cpp +++ b/examples/QOS/Sender_QOS_Event_Handler.cpp @@ -52,7 +52,12 @@ ACE_QOS_Event_Handler::handle_qos (ACE_HANDLE) "\nReceived a QOS event. Inside handle_qos ()\n")); ACE_OVERLAPPED ace_overlapped; - const iovec iov = {5, "Hello"}; + +#if (defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)) + const iovec iov = {5,"Hello"}; +#else + const iovec iov = {"Hello", 5}; +#endif // For some really weird reason if I do not define the following // sockaddr_in, the send () call fails. diff --git a/examples/QOS/client.cpp b/examples/QOS/client.cpp index 366900b45e8..04f7bb15804 100644 --- a/examples/QOS/client.cpp +++ b/examples/QOS/client.cpp @@ -17,7 +17,7 @@ #include "ace/OS.h" #define QOSEVENT_MAIN -#include "qosevent.h" +#include "QosEvent.h" #include "Sender_QOS_Event_Handler.h" static u_short SERVER_PORT = MY_DEFPORT; @@ -43,35 +43,6 @@ static const u_short PORT = ACE_DEFAULT_SERVER_PORT; // depending upon whether this application is acting as a sender or // receiver. -static void -FillQosFlowspecDefault (QOS *pQos, - u_long *cbQosLen, - QOS_OPTIONS *pQosOptions) -{ - if (pQosOptions->bReceiver) - { - pQos->ReceivingFlowspec = default_g711; - pQos->SendingFlowspec = default_notraffic; - } - else - { - pQos->SendingFlowspec = default_g711; - pQos->ReceivingFlowspec = default_notraffic; - } - - ACE_DEBUG ((LM_DEBUG, - "Enabling QOS Signalling for the sender.\n")); - - // Enable the QOS signalling. - ACE_CLR_BITS (pQos->ReceivingFlowspec.ServiceType, - SERVICE_NO_QOS_SIGNALING); - - pQos->ProviderSpecific.len = 0; - pQos->ProviderSpecific.buf = 0; - *cbQosLen = sizeof (QOS) + pQos->ProviderSpecific.len; -} - - static int fill_ace_qos_flowspec_default (ACE_QoS *pQos, QOS_OPTIONS *pQosOptions) @@ -372,7 +343,9 @@ FindServiceProvider(int iProtocol, int bMulticast, ACE_Protocol_Info *pProtocolInfo) { + ACE_Protocol_Info *protocol_buffer = 0; + u_long buffer_length = 0; u_long dwErr; int bProtocolFound = FALSE; diff --git a/examples/QOS/server.cpp b/examples/QOS/server.cpp index acbeb51330c..cf57c08e9f6 100644 --- a/examples/QOS/server.cpp +++ b/examples/QOS/server.cpp @@ -19,7 +19,7 @@ #include "ace/SOCK_Dgram_Mcast.h" #include "ace/OS.h" -#include "qosevent.h" +#include "QosEvent.h" #include "Receiver_QOS_Event_Handler.h" static int ValidOptions (char *argv[], @@ -41,33 +41,6 @@ static const u_short PORT = ACE_DEFAULT_SERVER_PORT; // depending upon whether this application is acting as a sender or // receiver. -static void FillQosFlowspecDefault (QOS *pQos, - u_long *cbQosLen, - QOS_OPTIONS *pQosOptions) -{ - if (pQosOptions->bReceiver) - { - pQos->ReceivingFlowspec = default_g711; - pQos->SendingFlowspec = default_notraffic; - } - else - { - pQos->SendingFlowspec = default_g711; - pQos->ReceivingFlowspec = default_notraffic; - } - - ACE_DEBUG ((LM_DEBUG, - "Enabling the QOS Signalling for the receiver.\n")); - - // Enable the QOS signalling. - ACE_CLR_BITS (pQos->ReceivingFlowspec.ServiceType, - SERVICE_NO_QOS_SIGNALING); - - pQos->ProviderSpecific.len = 0; - pQos->ProviderSpecific.buf = 0; - *cbQosLen = sizeof (QOS) + pQos->ProviderSpecific.len; -} - static int fill_ace_qos_flowspec_default (ACE_QoS *pQos, QOS_OPTIONS *pQosOptions) |