diff options
Diffstat (limited to 'examples/QOS')
62 files changed, 0 insertions, 7983 deletions
diff --git a/examples/QOS/Change_Receiver_FlowSpec/Fill_ACE_QoS.cpp b/examples/QOS/Change_Receiver_FlowSpec/Fill_ACE_QoS.cpp deleted file mode 100644 index fbaed5667e6..00000000000 --- a/examples/QOS/Change_Receiver_FlowSpec/Fill_ACE_QoS.cpp +++ /dev/null @@ -1,114 +0,0 @@ -// Fill_ACE_QoS.cpp -// $Id$ - -#include "Fill_ACE_QoS.h" - -ACE_RCSID(QOS, Fill_ACE_QoS,"$Id$") - -const iovec Fill_ACE_QoS::iov_ = {0,0}; - -Fill_ACE_QoS::Fill_ACE_QoS (void) -{ - ACE_NEW (this->default_traffic_, - ACE_Flow_Spec (ACE_QOS_NOT_SPECIFIED, - ACE_QOS_NOT_SPECIFIED, - ACE_QOS_NOT_SPECIFIED, - ACE_QOS_NOT_SPECIFIED, - ACE_QOS_NOT_SPECIFIED, - ACE_SERVICETYPE_NOTRAFFIC, - ACE_QOS_NOT_SPECIFIED, - ACE_QOS_NOT_SPECIFIED, - 25, - 1)); -} - -// destructor. -Fill_ACE_QoS::~Fill_ACE_QoS (void) -{} - -int -Fill_ACE_QoS::fill_simplex_receiver_qos (ACE_QoS &ace_qos, - const ACE_CString &recv_flow_name) -{ - ACE_Flow_Spec *recv_flow_spec = 0; - - if (this->map ().find (recv_flow_name, recv_flow_spec) != 0) - ACE_ERROR_RETURN ((LM_DEBUG, - "Unable to find a FlowSpec with name %s", - recv_flow_name.c_str ()), - -1); - ace_qos.receiving_flowspec (recv_flow_spec); - ace_qos.sending_flowspec ((this->default_traffic_)); - ace_qos.provider_specific (Fill_ACE_QoS::iov_); - - return 0; -} - - -int -Fill_ACE_QoS::fill_simplex_sender_qos (ACE_QoS &ace_qos, - const ACE_CString &send_flow_name) -{ - ACE_Flow_Spec *send_flow_spec = 0; - - if (this->map ().find (send_flow_name, send_flow_spec) != 0) - ACE_ERROR_RETURN ((LM_DEBUG, - "Unable to find a FlowSpec with name %s", - send_flow_name.c_str ()), - -1); - - ace_qos.receiving_flowspec ((this->default_traffic_)); - ace_qos.sending_flowspec (send_flow_spec); - ace_qos.provider_specific (Fill_ACE_QoS::iov_); - - return 0; -} - -int -Fill_ACE_QoS::fill_duplex_qos (ACE_QoS &ace_qos, - const ACE_CString &recv_flow_name, - const ACE_CString &send_flow_name) -{ - ACE_Flow_Spec *send_flow_spec = 0; - ACE_Flow_Spec *recv_flow_spec = 0; - - if (this->map ().find (recv_flow_name, recv_flow_spec) != 0) - ACE_ERROR_RETURN ((LM_DEBUG, - "Unable to find a FlowSpec with name %s", - recv_flow_name.c_str ()), - -1); - - if (this->map ().find (send_flow_name, send_flow_spec) != 0) - ACE_ERROR_RETURN ((LM_DEBUG, - "Unable to find a FlowSpec with name %s", - send_flow_name.c_str ()), - -1); - - ace_qos.receiving_flowspec (recv_flow_spec); - ace_qos.sending_flowspec (send_flow_spec); - ace_qos.provider_specific (Fill_ACE_QoS::iov_); - - return 0; -} - -Fill_ACE_QoS::FLOW_SPEC_HASH_MAP& -Fill_ACE_QoS::map (void) -{ - return this->flow_spec_map_; -} - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -template class ACE_Hash_Map_Manager<ACE_CString,ACE_Flow_Spec *,ACE_Null_Mutex>; -template class ACE_Hash_Map_Manager_Ex<ACE_CString, ACE_Flow_Spec *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex>; -template class ACE_Hash_Map_Iterator_Base_Ex<ACE_CString, ACE_Flow_Spec *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex>; -template class ACE_Hash_Map_Entry<ACE_CString, ACE_Flow_Spec *>; -template class ACE_Hash_Map_Manager_Ex<ACE_CString, ACE_Flow_Spec *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Thread_Mutex>; -template class ACE_Hash_Map_Iterator_Base_Ex<ACE_CString, ACE_Flow_Spec *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Thread_Mutex>; -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Hash_Map_Manager<ACE_CString,ACE_Flow_Spec *,ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Manager_Ex<ACE_CString, ACE_Flow_Spec *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<ACE_CString, ACE_Flow_Spec *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Entry<ACE_CString, ACE_Flow_Spec *> -#pragma instantiate ACE_Hash_Map_Manager_Ex<ACE_CString, ACE_Flow_Spec *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Thread_Mutex> -#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<ACE_CString, ACE_Flow_Spec *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Thread_Mutex> -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/examples/QOS/Change_Receiver_FlowSpec/Fill_ACE_QoS.h b/examples/QOS/Change_Receiver_FlowSpec/Fill_ACE_QoS.h deleted file mode 100644 index 710b8bd7c94..00000000000 --- a/examples/QOS/Change_Receiver_FlowSpec/Fill_ACE_QoS.h +++ /dev/null @@ -1,76 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// ACE_wrappers/examples/QOS -// -// = FILENAME -// Fill_ACE_QoS.h -// -// = AUTHOR -// Vishal Kachroo <vishal@cs.wustl.edu> -// -// ============================================================================ - -#ifndef FILL_ACE_QOS_H -#define FILL_ACE_QOS_H - -#include "ace/SString.h" -#include "ace/Hash_Map_Manager.h" -#include "ace/Synch.h" -#include "ace/ACE.h" -#include "ace/OS.h" -#include "ace/OS_QoS.h" - -class Fill_ACE_QoS -{ - // TITLE - // This class helps users to add new flow specs and provides - // utility functions for filling up the flow specs for simplex/duplex - // sessions. - -public: - typedef ACE_Hash_Map_Manager <ACE_CString, ACE_Flow_Spec *, ACE_Null_Mutex> FLOW_SPEC_HASH_MAP; - - //Initialization and termination methods. - Fill_ACE_QoS (void); - // constructor. - - ~Fill_ACE_QoS (void); - // destructor. - - int fill_simplex_receiver_qos (ACE_QoS &ace_qos, - const ACE_CString &recv_flow_name); - // To be used by receivers. Fills the receiver qos and sets the - // sender qos to NO_TRAFFIC. - - int fill_simplex_sender_qos (ACE_QoS &ace_qos, - const ACE_CString &send_flow_name); - // To be used by senders. Fills the sender qos and sets the receiver - // qos to NO_TRAFFIC. - - int fill_duplex_qos (ACE_QoS &ace_qos, - const ACE_CString &recv_flow_name, - const ACE_CString &send_flow_name); - // To be used by applications that wish to be both receivers and - // senders. - - FLOW_SPEC_HASH_MAP& map (void); - // Returns the hash map of flowspecs indexed by flowspec name. - -private: - - // The Service Provider is currently set to NULL for all ACE_QoS. - static const iovec iov_; - - // A NO_TRAFFIC flow spec. Senders set the receiving qos to this - // while the receivers set the sending qos to this. - ACE_Flow_Spec *default_traffic_; - - // A list of flowspecs indexed by the flowspec name. - FLOW_SPEC_HASH_MAP flow_spec_map_; -}; - -#endif /* FILL_ACE_QOS_H */ diff --git a/examples/QOS/Change_Receiver_FlowSpec/FlowSpec_Dbase.h b/examples/QOS/Change_Receiver_FlowSpec/FlowSpec_Dbase.h deleted file mode 100644 index fc382048c13..00000000000 --- a/examples/QOS/Change_Receiver_FlowSpec/FlowSpec_Dbase.h +++ /dev/null @@ -1,52 +0,0 @@ -/* -*- C++ -*- */ -//$Id$ - -// ============================================================================ -// -// = LIBRARY -// ACE_wrappers/examples/QOS -// -// = FILENAME -// FlowSpec_Dbase.h -// -// = AUTHOR -// Vishal Kachroo <vishal@cs.wustl.edu> -// -// ============================================================================ - -#ifndef FLOWSPEC_DBASE_H -#define FLOWSPEC_DBASE_H - -// This file contains the different FlowSpecs that the QoS enabled -// application uses. Its a good idea to list them all here so the -// application code is clean. - -ACE_Flow_Spec notraffic (ACE_QOS_NOT_SPECIFIED, - ACE_QOS_NOT_SPECIFIED, - ACE_QOS_NOT_SPECIFIED, - ACE_QOS_NOT_SPECIFIED, - ACE_QOS_NOT_SPECIFIED, - ACE_SERVICETYPE_NOTRAFFIC, - ACE_QOS_NOT_SPECIFIED, - ACE_QOS_NOT_SPECIFIED, - 25, - 1); - -ACE_Flow_Spec g711 (9200, - 708, - 18400, - 0, - 0, - ACE_SERVICETYPE_CONTROLLEDLOAD, - 368, - 368, - 25, - 1); - -// The default session address is macarena.cs.wustl.edu. I am using macarena -// as my receiver for testing. -#define DEFAULT_QOS_SESSION_MACHINE "128.252.165.127" -#define DEFAULT_QOS_SESSION_PORT 8001 - -#endif /* FLOWSPEC_DBASE_H */ - diff --git a/examples/QOS/Change_Receiver_FlowSpec/Makefile b/examples/QOS/Change_Receiver_FlowSpec/Makefile deleted file mode 100644 index 9df41011767..00000000000 --- a/examples/QOS/Change_Receiver_FlowSpec/Makefile +++ /dev/null @@ -1,359 +0,0 @@ -#---------------------------------------------------------------------------- -# -# $Id$ -# -LDLIBS += -lACE_QoS - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -PSRC = $(addsuffix .cpp,$(BIN)) - -CLT_OBJS = \ - QoS_Signal_Handler.o \ - QoS_Util.o \ - Fill_ACE_QoS.o \ - sender.o \ - Sender_QoS_Event_Handler.o - -SVR_OBJS = \ - QoS_Signal_Handler.o \ - QoS_Util.o \ - Fill_ACE_QoS.o \ - receiver.o \ - Receiver_QoS_Event_Handler.o - -BIN2 = receiver \ - sender - -BIN = $(BIN2) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -receiver: $(addprefix $(VDIR),$(SVR_OBJS)) - $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK) - -sender: $(addprefix $(VDIR),$(CLT_OBJS)) - $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK) -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - - -.obj/receiver.o .obj/receiver.so .shobj/receiver.o .shobj/receiver.so: receiver.cpp \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/pre.h \ - $(ACE_ROOT)/ace/post.h \ - $(ACE_ROOT)/ace/ACE_export.h \ - $(ACE_ROOT)/ace/svc_export.h \ - $(ACE_ROOT)/ace/ace_wchar.h \ - $(ACE_ROOT)/ace/ace_wchar.inl \ - $(ACE_ROOT)/ace/OS_Errno.h \ - $(ACE_ROOT)/ace/OS_Export.h \ - $(ACE_ROOT)/ace/OS_Errno.inl \ - $(ACE_ROOT)/ace/OS_Dirent.h \ - $(ACE_ROOT)/ace/OS_Dirent.inl \ - $(ACE_ROOT)/ace/OS_String.h \ - $(ACE_ROOT)/ace/OS_String.inl \ - $(ACE_ROOT)/ace/OS_Memory.h \ - $(ACE_ROOT)/ace/OS_Memory.inl \ - $(ACE_ROOT)/ace/OS_TLI.h \ - $(ACE_ROOT)/ace/OS_TLI.inl \ - $(ACE_ROOT)/ace/Min_Max.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/QoS/QoS_Session.h \ - $(ACE_ROOT)/ace/QoS/ACE_QoS_Export.h \ - $(ACE_ROOT)/ace/INET_Addr.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/Flag_Manip.h \ - $(ACE_ROOT)/ace/Flag_Manip.i \ - $(ACE_ROOT)/ace/Handle_Ops.h \ - $(ACE_ROOT)/ace/Handle_Ops.i \ - $(ACE_ROOT)/ace/Lib_Find.h \ - $(ACE_ROOT)/ace/Lib_Find.i \ - $(ACE_ROOT)/ace/Init_ACE.h \ - $(ACE_ROOT)/ace/Init_ACE.i \ - $(ACE_ROOT)/ace/Sock_Connect.h \ - $(ACE_ROOT)/ace/Sock_Connect.i \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Addr.h \ - $(ACE_ROOT)/ace/Addr.i \ - $(ACE_ROOT)/ace/INET_Addr.i \ - $(ACE_ROOT)/ace/QoS/QoS_Session_Factory.h \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Node.h \ - $(ACE_ROOT)/ace/Node.cpp \ - $(ACE_ROOT)/ace/Array_Base.h \ - $(ACE_ROOT)/ace/Array_Base.inl \ - $(ACE_ROOT)/ace/Array_Base.cpp \ - $(ACE_ROOT)/ace/Unbounded_Set.h \ - $(ACE_ROOT)/ace/Unbounded_Set.inl \ - $(ACE_ROOT)/ace/Unbounded_Set.cpp \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.h \ - $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.inl \ - $(ACE_ROOT)/ace/Unbounded_Queue.h \ - $(ACE_ROOT)/ace/Unbounded_Queue.inl \ - $(ACE_ROOT)/ace/Unbounded_Queue.cpp \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/QoS/QoS_Decorator.h \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread_Adapter.h \ - $(ACE_ROOT)/ace/Base_Thread_Adapter.h \ - $(ACE_ROOT)/ace/Base_Thread_Adapter.inl \ - $(ACE_ROOT)/ace/Thread_Adapter.inl \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Test_and_Set.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Test_and_Set.i \ - $(ACE_ROOT)/ace/Test_and_Set.cpp \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(ACE_ROOT)/ace/QoS/SOCK_Dgram_Mcast_QoS.h \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.h \ - $(ACE_ROOT)/ace/SOCK.h \ - $(ACE_ROOT)/ace/IPC_SAP.h \ - $(ACE_ROOT)/ace/IPC_SAP.i \ - $(ACE_ROOT)/ace/SOCK.i \ - $(ACE_ROOT)/ace/SOCK_Dgram.i \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast_T.h \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast_T.i \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast_T.cpp \ - $(ACE_ROOT)/ace/QoS/QoS_Manager.h \ - $(ACE_ROOT)/ace/QoS/SOCK_Dgram_Mcast_QoS.i \ - QoS_Util.h Fill_ACE_QoS.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Hash_Map_Manager.h \ - $(ACE_ROOT)/ace/Functor.h \ - $(ACE_ROOT)/ace/Functor.i \ - $(ACE_ROOT)/ace/Functor_T.h \ - $(ACE_ROOT)/ace/Functor_T.i \ - $(ACE_ROOT)/ace/Functor_T.cpp \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \ - $(ACE_ROOT)/ace/Service_Config.h \ - $(ACE_ROOT)/ace/Service_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.i \ - $(ACE_ROOT)/ace/Service_Object.i \ - $(ACE_ROOT)/ace/Service_Config.i \ - $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Malloc_Allocator.h \ - $(ACE_ROOT)/ace/Malloc_Allocator.i \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - QoS_Signal_Handler.h Receiver_QoS_Event_Handler.h - -.obj/sender.o .obj/sender.so .shobj/sender.o .shobj/sender.so: sender.cpp \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/pre.h \ - $(ACE_ROOT)/ace/post.h \ - $(ACE_ROOT)/ace/ACE_export.h \ - $(ACE_ROOT)/ace/svc_export.h \ - $(ACE_ROOT)/ace/ace_wchar.h \ - $(ACE_ROOT)/ace/ace_wchar.inl \ - $(ACE_ROOT)/ace/OS_Errno.h \ - $(ACE_ROOT)/ace/OS_Export.h \ - $(ACE_ROOT)/ace/OS_Errno.inl \ - $(ACE_ROOT)/ace/OS_Dirent.h \ - $(ACE_ROOT)/ace/OS_Dirent.inl \ - $(ACE_ROOT)/ace/OS_String.h \ - $(ACE_ROOT)/ace/OS_String.inl \ - $(ACE_ROOT)/ace/OS_Memory.h \ - $(ACE_ROOT)/ace/OS_Memory.inl \ - $(ACE_ROOT)/ace/OS_TLI.h \ - $(ACE_ROOT)/ace/OS_TLI.inl \ - $(ACE_ROOT)/ace/Min_Max.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/QoS/QoS_Session.h \ - $(ACE_ROOT)/ace/QoS/ACE_QoS_Export.h \ - $(ACE_ROOT)/ace/INET_Addr.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/Flag_Manip.h \ - $(ACE_ROOT)/ace/Flag_Manip.i \ - $(ACE_ROOT)/ace/Handle_Ops.h \ - $(ACE_ROOT)/ace/Handle_Ops.i \ - $(ACE_ROOT)/ace/Lib_Find.h \ - $(ACE_ROOT)/ace/Lib_Find.i \ - $(ACE_ROOT)/ace/Init_ACE.h \ - $(ACE_ROOT)/ace/Init_ACE.i \ - $(ACE_ROOT)/ace/Sock_Connect.h \ - $(ACE_ROOT)/ace/Sock_Connect.i \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Addr.h \ - $(ACE_ROOT)/ace/Addr.i \ - $(ACE_ROOT)/ace/INET_Addr.i \ - $(ACE_ROOT)/ace/QoS/QoS_Session_Factory.h \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Node.h \ - $(ACE_ROOT)/ace/Node.cpp \ - $(ACE_ROOT)/ace/Array_Base.h \ - $(ACE_ROOT)/ace/Array_Base.inl \ - $(ACE_ROOT)/ace/Array_Base.cpp \ - $(ACE_ROOT)/ace/Unbounded_Set.h \ - $(ACE_ROOT)/ace/Unbounded_Set.inl \ - $(ACE_ROOT)/ace/Unbounded_Set.cpp \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.h \ - $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.inl \ - $(ACE_ROOT)/ace/Unbounded_Queue.h \ - $(ACE_ROOT)/ace/Unbounded_Queue.inl \ - $(ACE_ROOT)/ace/Unbounded_Queue.cpp \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/QoS/QoS_Session_Impl.h \ - \ - \ - \ - $(ACE_ROOT)/ace/QoS/QoS_Session_Impl.i \ - $(ACE_ROOT)/ace/QoS/QoS_Decorator.h \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread_Adapter.h \ - $(ACE_ROOT)/ace/Base_Thread_Adapter.h \ - $(ACE_ROOT)/ace/Base_Thread_Adapter.inl \ - $(ACE_ROOT)/ace/Thread_Adapter.inl \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Test_and_Set.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Test_and_Set.i \ - $(ACE_ROOT)/ace/Test_and_Set.cpp \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(ACE_ROOT)/ace/QoS/SOCK_Dgram_Mcast_QoS.h \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.h \ - $(ACE_ROOT)/ace/SOCK.h \ - $(ACE_ROOT)/ace/IPC_SAP.h \ - $(ACE_ROOT)/ace/IPC_SAP.i \ - $(ACE_ROOT)/ace/SOCK.i \ - $(ACE_ROOT)/ace/SOCK_Dgram.i \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast_T.h \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast_T.i \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast_T.cpp \ - $(ACE_ROOT)/ace/QoS/QoS_Manager.h \ - $(ACE_ROOT)/ace/QoS/SOCK_Dgram_Mcast_QoS.i \ - QoS_Util.h Fill_ACE_QoS.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Hash_Map_Manager.h \ - $(ACE_ROOT)/ace/Functor.h \ - $(ACE_ROOT)/ace/Functor.i \ - $(ACE_ROOT)/ace/Functor_T.h \ - $(ACE_ROOT)/ace/Functor_T.i \ - $(ACE_ROOT)/ace/Functor_T.cpp \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \ - $(ACE_ROOT)/ace/Service_Config.h \ - $(ACE_ROOT)/ace/Service_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.i \ - $(ACE_ROOT)/ace/Service_Object.i \ - $(ACE_ROOT)/ace/Service_Config.i \ - $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Malloc_Allocator.h \ - $(ACE_ROOT)/ace/Malloc_Allocator.i \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - QoS_Signal_Handler.h Sender_QoS_Event_Handler.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/QOS/Change_Receiver_FlowSpec/QoS_Signal_Handler.cpp b/examples/QOS/Change_Receiver_FlowSpec/QoS_Signal_Handler.cpp deleted file mode 100644 index 9f07ad5b378..00000000000 --- a/examples/QOS/Change_Receiver_FlowSpec/QoS_Signal_Handler.cpp +++ /dev/null @@ -1,34 +0,0 @@ -// QoS_Signal_Handler.cpp -// $Id$ - -#include "ace/Log_Msg.h" -#include "QoS_Signal_Handler.h" - -ACE_RCSID(QOS, QoS_Signal_Handler,"$Id$") - -// constructor. -QoS_Signal_Handler::QoS_Signal_Handler (ACE_QoS_Session *qos_session) - : qos_session_ (qos_session) -{ -} - -// Releases the QoS sessions gracefully. -int -QoS_Signal_Handler::handle_signal (int signum, siginfo_t *, ucontext_t*) -{ - if (signum == SIGINT) - { - if (this->qos_session_->close () == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to close the QoS session.\n"), - -1); - else - ACE_DEBUG ((LM_DEBUG, - "QoS Session with id %d closed successfully.\n", - this->qos_session_->session_id ())); - } - else - ACE_DEBUG ((LM_DEBUG, - "A signal other than SIGINT received.\nIgnoring.\n")); - return 0; -} diff --git a/examples/QOS/Change_Receiver_FlowSpec/QoS_Signal_Handler.h b/examples/QOS/Change_Receiver_FlowSpec/QoS_Signal_Handler.h deleted file mode 100644 index 35b9f3a19e7..00000000000 --- a/examples/QOS/Change_Receiver_FlowSpec/QoS_Signal_Handler.h +++ /dev/null @@ -1,45 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ===================================================================== -// -// = LIBRARY -// ACE_wrappers/examples/QOS -// -// = FILENAME -// QoS_Signal_Handler.h -// -// = AUTHOR -// Vishal Kachroo <vishal@cs.wustl.edu> -// -// ===================================================================== - -#ifndef QOS_SIGNAL_HANDLER_H -#define QOS_SIGNAL_HANDLER_H - -#include "ace/Event_Handler.h" -#include "ace/QoS/QoS_Session.h" - -class QoS_Signal_Handler : public ACE_Event_Handler -{ - // TITLE - // This class Handles the SIGINT signal through the Reactor. - // Useful to gracefully release QoS sessions. - -public: - - QoS_Signal_Handler (ACE_QoS_Session *qos_session); - // constructor. - - int handle_signal(int signum, siginfo_t*,ucontext_t*); - // Override this method to implement graceful shutdown. - -private: - - ACE_QoS_Session *qos_session_; - // Session to be gracefully shutdown. - -}; - -#endif /* QOS_SIGNAL_HANDLER_H */ - diff --git a/examples/QOS/Change_Receiver_FlowSpec/QoS_Util.cpp b/examples/QOS/Change_Receiver_FlowSpec/QoS_Util.cpp deleted file mode 100644 index 9a72bf56df1..00000000000 --- a/examples/QOS/Change_Receiver_FlowSpec/QoS_Util.cpp +++ /dev/null @@ -1,121 +0,0 @@ -// QoS_Session_Impl.cpp -// $Id$ - -#define SENDER_PORT 10001 - -#include "ace/Log_Msg.h" -#include "ace/Get_Opt.h" -#include "QoS_Util.h" - -ACE_RCSID(QOS, QoS_Util,"$Id$") - -// constructor. -QoS_Util::QoS_Util (int argc, - char *argv[]) - : argc_ (argc), - argv_ (argv), - source_port_ (SENDER_PORT), - protocol_ (IPPROTO_UDP), - multicast_flag_ (0) -{ - ACE_NEW (this->mult_session_addr_, - ACE_INET_Addr (ACE_DEFAULT_MULTICAST_PORT)); - - ACE_NEW (this->dest_addr_, - ACE_INET_Addr (ACE_DEFAULT_SERVER_PORT)); -} - -// destructor. -QoS_Util::~QoS_Util (void) -{ - delete this->mult_session_addr_; - delete this->dest_addr_; -} - -int -QoS_Util::parse_args (void) -{ - ACE_Get_Opt get_opts (this->argc_, this->argv_, "m:n:p:P:c"); - int c = 0; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'm': // multicast session address. - this->multicast_flag_ = 1; - this->mult_session_addr_->set (get_opts.opt_arg ()); - break; - case 'n': // to be used by Senders only to specify the destination. - this->dest_addr_->set (get_opts.opt_arg ()); - break; - case 'p': // protocol. - if (ACE_OS::strcasecmp (get_opts.opt_arg (), "tcp") == 0) - this->protocol_ = IPPROTO_TCP; - else - if (ACE_OS::strcasecmp (get_opts.opt_arg (), "udp") == 0) - this->protocol_ = IPPROTO_UDP; - else - ACE_DEBUG ((LM_DEBUG, - "Unknown protocol specified\n" - "UDP assumed\n")); - break; - case 'P': // sender source port. - this->source_port_ = ACE_OS::atoi (get_opts.opt_arg ()); - break; - case 'h': // display help for different options. - default: - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s" - " [-m host:port] QoS multicast session address" - " Overides the receiver address specified in the -n option" - " [-n host:port] Use for a unicast sender. " - " Follow by receiver addr" - " [-p tcp|udp] specify protocol to be used" - " [-P port] source sender port" - " [-h] <help>" - "\n", - argv_ [0]), - -1); - } - - // If multicast address is specified then ignore the unicast sender - // destination address and force the protocol to be UDP. - if (this->multicast_flag_ == 1) - { - this->dest_addr_ = this->mult_session_addr_; - this->protocol_ = IPPROTO_UDP; - } - - // Indicates successful parsing of command line. - return 0; -} - -ACE_INET_Addr * -QoS_Util::mult_session_addr (void) const -{ - return this->mult_session_addr_; -} - -ACE_INET_Addr * -QoS_Util::dest_addr (void) const -{ - return this->dest_addr_; -} - -u_short -QoS_Util::source_port (void) const -{ - return this->source_port_; -} - -ACE_Protocol_ID -QoS_Util::protocol (void) const -{ - return this->protocol_; -} - -int -QoS_Util::multicast_flag (void) const -{ - return this->multicast_flag_; -} diff --git a/examples/QOS/Change_Receiver_FlowSpec/QoS_Util.h b/examples/QOS/Change_Receiver_FlowSpec/QoS_Util.h deleted file mode 100644 index 6de6e2d24d3..00000000000 --- a/examples/QOS/Change_Receiver_FlowSpec/QoS_Util.h +++ /dev/null @@ -1,75 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ===================================================================== -// -// = LIBRARY -// ACE_wrappers/examples/QOS -// -// = FILENAME -// QoS_Util.h -// -// = AUTHOR -// Vishal Kachroo <vishal@cs.wustl.edu> -// -// ===================================================================== - -#ifndef QOS_UTIL_H -#define QOS_UTIL_H - -#include "ace/INET_Addr.h" -#include "ace/QoS/QoS_Session.h" - -class QoS_Util -{ - // = TITLE - // This class provides the utility functions like parse_args () - // required by a QoS enabled application. - -public: - - // constructor. - 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; - - ACE_INET_Addr *dest_addr (void) const; - - u_short source_port (void) const; - - ACE_Protocol_ID protocol (void) const; - - int multicast_flag (void) const; - -private: - - // Command line arguments. - int argc_; - char **argv_; - - // Multicast session address. - ACE_INET_Addr *mult_session_addr_; - - // Unicast destination address of the receiver. - ACE_INET_Addr *dest_addr_; - - // Source port for the sender. - u_short source_port_; - - // Protocol. - ACE_Protocol_ID protocol_; - - // Multicast Flag. - int multicast_flag_; - -}; - -#endif /* QOS_UTIL_H */ - diff --git a/examples/QOS/Change_Receiver_FlowSpec/README b/examples/QOS/Change_Receiver_FlowSpec/README deleted file mode 100644 index 58320ef8def..00000000000 --- a/examples/QOS/Change_Receiver_FlowSpec/README +++ /dev/null @@ -1,127 +0,0 @@ -$Id$ - -A Regression test for ACE QoS features. ---------------------------------------- - -This test implements a simple Receiver-Sender program that ensures -Quality of Service (QoS) guarantees on the underlying network before -transmitting data. The program tests the ACE QoS APIs/features. The -test works for Winsock2 APIs on Win2K as well as RAPI on Solaris. - -In addition it dynamically changes the receiver flow spec which in -turn changes the RESV messages sent. - - ------------------------------------------------------------------------- -WIN2K : - -Build Requirements : --------------------- -1. Two Win2K machines. -2. June98 Platform SDK or later. -3. Link with ws2_32.lib - -The test consists of a server (which is the receiver) and a client - (which is the sender). - - The receiver is started first (though it is not mandatory) as : - - server -m merengue.cs.wustl.edu:9091 - - -m: specifies the multicast session address that both client and - server subscribe to for QoS events. - - -p: Protocol to be used. Could be udp or tcp. Default is udp. - - -P: Sender source port. If not specified, DEFAULT_SOURCE_SENDER_PORT - (10001) will be used. - - -h: Displays the help on various options. - -The sample Sender is started next as : - - client -m merengue.cs.wustl.edu:9091 -P 10004 - - -m: specifies the multicast session address that both client and - server subscribe to for QoS events. - - -n: Option to be used by senders only to specify the destination - address. This option is overriden if a multicast address is also - specified through the -m option. - - -p: Protocol to be used. Could be udp or tcp. Default is udp. - - -P: Sender source port. If not specified, DEFAULT_SOURCE_SENDER_PORT - (10001) will be used. - - -h: Displays the help on various options. - -On Win2K the user must have administrative access to the machine to -run this program. It seems to be a pre-requisite to opening QoS -sockets. - -The sender and receiver should be run on different Win2K machines. - -The test demonstrates how to GQOS enable an application using the ACE QoS APIs. -It concentrates on the use of various ACE QoS APIs and their correctness. - -------------------------------------------------------------------------------- - -RAPI : - -0. The $ACE_ROOT/include/makeinclude/platform_macros.GNU should be the -following : - -include /project/doc/vishal/ACE_wrappers/include/makeinclude/platform_sunos5_sunc++.GNU -PLATFORM_RAPI_CPPFLAGS += -I/project/doc/vishal/rapi/rel4.2a4/rsvpd/ -PLATFORM_RAPI_LIBS += -lrsvp -PLATFORM_RAPI_LDFLAGS += -L/project/doc/vishal/rapi/rel4.2a4/rsvpd/ - -assuming that RAPI library is installed in /project/doc/vishal/rapi/rel4.2a4/ - -1. Compile ACE with - - make rapi=1 static_libs_only=1 - - Static library option is used because the RAPI library that we have - does not compile as a shared object. - -2. Run the RSVP Daemon on two machines: (merengue.cs and macarena.cs) - - /project/doc/vishal/rapi/rel4.2a4/rsvpd/rsvpd -D - - The current version of the daemon comes with an inbuilt rtap - application to test the various reservation commands and RAPI APIs. - - Typical values for rtap would be : - - sender merengue/5000 [ t 2000000 100000 2000000 512 1024 ] - reserve wf [ cl 4000000 200000 4000000 256 2024 ] - - - - From ACE: - dest udp macarena/5000 - sender ace/5000 [ t 2000000 100000 2000000 512 1024 ] - sender macarena/5022 [ t 2000000 100000 2000000 512 1024 ] - sender beguine/6000 [ t 2000000 100000 2000000 512 1024 ] - - From Macarena: - wait until done with ACE - dest udp macarena/5000 <session name> - reserve wf [ cl 2000000 100000 2000000 512 1024 ] - - - -3. If RTAP runs fine and the daemons show the debug messages about - RESV, PATH and other RSVP messages, run the QoS example, making sure - that rtap session is released on both machines. - -------------------------------------------------------------------------------- - -If you run into any problems with this test please contact Vishal -Kachroo <vishal@cs.wustl.edu>. - -This README last updated on 20th July, 2000. - -------------------------------------------------------------------------------- diff --git a/examples/QOS/Change_Receiver_FlowSpec/Receiver_QoS_Event_Handler.cpp b/examples/QOS/Change_Receiver_FlowSpec/Receiver_QoS_Event_Handler.cpp deleted file mode 100644 index 33176ba4da3..00000000000 --- a/examples/QOS/Change_Receiver_FlowSpec/Receiver_QoS_Event_Handler.cpp +++ /dev/null @@ -1,216 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// ACE_wrappers/examples/QOS -// -// = FILENAME -// Receiver_QoS_Event_Handler.cpp -// -// = AUTHOR -// Vishal Kachroo <vishal@cs.wustl.edu> -// -// ============================================================================ - -#include "Receiver_QoS_Event_Handler.h" -#include "ace/Log_Msg.h" -#include "ace/SString.h" -#include "Fill_ACE_QoS.h" - -// Constructor. -Receiver_QoS_Event_Handler::Receiver_QoS_Event_Handler (void) -{ -} - -Receiver_QoS_Event_Handler::Receiver_QoS_Event_Handler (const ACE_SOCK_Dgram_Mcast_QoS - &dgram_mcast_qos, - ACE_QoS_Session *qos_session) - : dgram_mcast_qos_ (dgram_mcast_qos), - qos_session_ (qos_session) -{ -} - -// Destructor. -Receiver_QoS_Event_Handler::~Receiver_QoS_Event_Handler (void) -{ -} - -// Return the handle of the Dgram_Mcast. This method is called -// internally by the reactor. -ACE_HANDLE -Receiver_QoS_Event_Handler::get_handle (void) const -{ - return this->dgram_mcast_qos_.get_handle (); -} - -// Called when there is a READ activity on the dgram_mcast_qos handle. -int -Receiver_QoS_Event_Handler::handle_input (ACE_HANDLE) -{ - char buf[BUFSIZ]; - - iovec iov; - iov.iov_base = buf; - iov.iov_len = BUFSIZ; - - ACE_OS::memset (iov.iov_base, - 0, - BUFSIZ); - - ACE_DEBUG ((LM_DEBUG, - "Inside handle_input () of Receiver_QoS_Event_Handler ()\n")); - - // Receive message from multicast group. - ssize_t result = - this->dgram_mcast_qos_.recv (&iov, - 1, - this->remote_addr_); - - if (result != -1) - { - ACE_DEBUG ((LM_DEBUG, - "Message Received : %s", - iov.iov_base)); - return 0; - } - else - return -1; -} - -// Called when there is a QoS Event. -int -Receiver_QoS_Event_Handler::handle_qos (ACE_HANDLE fd) -{ - ACE_UNUSED_ARG (fd); - - ACE_DEBUG ((LM_DEBUG, - "\nReceived a QOS event. Inside handle_qos ()\n")); - - // We have received an RSVP event. The following update_qos () call - // calls rapi_dispatch () in case of RAPI and WSAIoctl (GET_QOS) in - // case of W2K. It then does the QoS parameter translation and updates - // the QoS session object with the latest QoS. This call replaces the - // direct call that was being made to WSAIoctl (GET_QOS) here for the - // Win2K example. - - if (this->qos_session_->update_qos () == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Error in updating QoS\n"), - -1); - else - ACE_DEBUG ((LM_DEBUG, - " Updating QOS succeeds.\n")); - - // Now proactively query the QoS object for QoS. - ACE_QoS ace_get_qos = this->qos_session_->qos (); - - ACE_DEBUG ((LM_DEBUG, - "\nReceiving Flowspec :\t\t\tSending Flowspec :\n\n" - "\tToken Rate = %d\t\t\tToken Rate = %d\n" - "\tToken Bucket Size = %d\t\t\tToken Bucket Size = %d\n" - "\tPeak Bandwidth = %d\t\t\tPeak Bandwidth = %d\n" - "\tLatency = %d\t\t\t\tLatency = %d\n" - "\tDelay Variation = %d\t\t\tDelay Variation = %d\n" - "\tService Type = %d\t\t\tService Type = %d\n" - "\tMax SDU Size = %d\t\t\tMax SDU Size = %d\n" - "\tMinimum Policed Size = %d\t\tMinimum Policed Size = %d\n\n", - ace_get_qos.receiving_flowspec ()->token_rate (), - ace_get_qos.sending_flowspec ()->token_rate (), - ace_get_qos.receiving_flowspec ()->token_bucket_size (), - ace_get_qos.sending_flowspec ()->token_bucket_size (), - ace_get_qos.receiving_flowspec ()->peak_bandwidth (), - ace_get_qos.sending_flowspec ()->peak_bandwidth (), - ace_get_qos.receiving_flowspec ()->latency (), - ace_get_qos.sending_flowspec ()->latency (), - ace_get_qos.receiving_flowspec ()->delay_variation (), - ace_get_qos.sending_flowspec ()->delay_variation (), - ace_get_qos.receiving_flowspec ()->service_type (), - ace_get_qos.sending_flowspec ()->service_type (), - ace_get_qos.receiving_flowspec ()->max_sdu_size (), - ace_get_qos.sending_flowspec ()->max_sdu_size (), - ace_get_qos.receiving_flowspec ()->minimum_policed_size (), - ace_get_qos.sending_flowspec ()->minimum_policed_size ())); - - - // - // create a dynamic flow spec on each callback to test QoS retransmits - // - ACE_CString flow_id ("flow_id"); - - Fill_ACE_QoS flow_spec_list; - ACE_DEBUG ((LM_DEBUG, - "\nA new flow spec! in QoS handler.")); - - static int token_rate = 9400; - ++token_rate; - static int peak_bw = 18500; - ++peak_bw; - switch (flow_spec_list.map ().bind (flow_id, - new ACE_Flow_Spec (token_rate, - 708, - peak_bw, - 0, - 0, - ACE_SERVICETYPE_CONTROLLEDLOAD, - 368, - 368, - 25, - 1))) - { - case 1 : - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to bind the new flow spec\n" - "The Flow Spec name already exists\n"), - -1); - break; - case -1 : - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to bind the new flow spec\n"), - -1); - break; - } - - // - // set up the new qos - // - ACE_QoS another_qos_receiver; - if (flow_spec_list.fill_simplex_receiver_qos (another_qos_receiver, - flow_id) !=0) - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to fill handler-simplex receiver qos\n"), - -1); - else - ACE_DEBUG ((LM_DEBUG, - "Successfully built a new flowspec in handle_qos!\n")); - - // - // change the qos for the current session - // - ACE_QoS_Manager qos_manager = this->dgram_mcast_qos_.qos_manager (); - - ACE_DEBUG ((LM_DEBUG, - "QoS Manager was built in handle_qos!\n")); - - // Set the QoS for the session. Replaces the ioctl () call that - // was being made previously. - if (this->qos_session_->qos (&this->dgram_mcast_qos_, - &qos_manager, - another_qos_receiver) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to set QoS\n"), - -1); - else - ACE_DEBUG ((LM_DEBUG, - "Setting QOS succeeds.\n")); - -return 0; - -} - - - - - - diff --git a/examples/QOS/Change_Receiver_FlowSpec/Receiver_QoS_Event_Handler.h b/examples/QOS/Change_Receiver_FlowSpec/Receiver_QoS_Event_Handler.h deleted file mode 100644 index 874d628e3c1..00000000000 --- a/examples/QOS/Change_Receiver_FlowSpec/Receiver_QoS_Event_Handler.h +++ /dev/null @@ -1,61 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// ACE_wrappers/examples/QOS -// -// = FILENAME -// Receiver_QoS_Event_Handler.h -// -// = AUTHOR -// Vishal Kachroo <vishal@cs.wustl.edu> -// -// ============================================================================ - -#ifndef RECEIVER_QOS_EVENT_HANDLER_H -#define RECEIVER_QOS_EVENT_HANDLER_H - -#include "ace/Reactor.h" -#include "ace/INET_Addr.h" -#include "ace/Event_Handler.h" -#include "ace/QoS/QoS_Session.h" -#include "ace/QoS/SOCK_Dgram_Mcast_QoS.h" - -ACE_RCSID(Receiver_QoS_Event_Handler, Receiver_QoS_Event_Handler, "$Id$") - - class Receiver_QoS_Event_Handler : public ACE_Event_Handler - { - public: - // = Initialization and Termination methods. - Receiver_QoS_Event_Handler (void); - // Constructor. - - Receiver_QoS_Event_Handler::Receiver_QoS_Event_Handler (const ACE_SOCK_Dgram_Mcast_QoS &dgram_mcast_qos, - ACE_QoS_Session *qos_session); - // Constructor. - - ~Receiver_QoS_Event_Handler (void); - // Destructor. - - virtual ACE_HANDLE get_handle (void) const; - // Override this to return the handle of the Dgram_Mcast - // that we are using. - - virtual int handle_input (ACE_HANDLE fd); - // Handles a READ event. - - virtual int handle_qos (ACE_HANDLE fd); - // Handles a QoS event. - - private: - ACE_SOCK_Dgram_Mcast_QoS dgram_mcast_qos_; - ACE_QoS_Session *qos_session_; - ACE_INET_Addr remote_addr_; - }; - -#endif /* RECEIVER_QOS_EVENT_HANDLER_H */ - - - diff --git a/examples/QOS/Change_Receiver_FlowSpec/Sender_QoS_Event_Handler.cpp b/examples/QOS/Change_Receiver_FlowSpec/Sender_QoS_Event_Handler.cpp deleted file mode 100644 index 5be73e3853b..00000000000 --- a/examples/QOS/Change_Receiver_FlowSpec/Sender_QoS_Event_Handler.cpp +++ /dev/null @@ -1,147 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// ACE_wrappers/examples/QOS -// -// = FILENAME -// Sender_QoS_Event_Handler.cpp -// -// = AUTHOR -// Vishal Kachroo <vishal@cs.wustl.edu> -// -// ============================================================================ - -#include "Sender_QoS_Event_Handler.h" -#include "ace/Log_Msg.h" - -#include "ace/OS.h" -#include "Fill_ACE_QoS.h" - -// Constructor. -Sender_QoS_Event_Handler::Sender_QoS_Event_Handler (void) -{ -} - -// Constructor. -Sender_QoS_Event_Handler::Sender_QoS_Event_Handler (const ACE_SOCK_Dgram_Mcast_QoS - &dgram_mcast_qos, - ACE_QoS_Session *qos_session) - : dgram_mcast_qos_ (dgram_mcast_qos), - qos_session_ (qos_session) -{ -} - -// Destructor. -Sender_QoS_Event_Handler::~Sender_QoS_Event_Handler (void) -{ -} - -// Return the handle of the Dgram_Mcast. This method is called -// internally by the reactor. - -ACE_HANDLE -Sender_QoS_Event_Handler::get_handle (void) const -{ - return this->dgram_mcast_qos_.get_handle (); -} - -// Handle the QoS Event. In this case send data to the receiver -// using WSASendTo() that uses overlapped I/O. - -int -Sender_QoS_Event_Handler::handle_qos (ACE_HANDLE) -{ - ACE_DEBUG ((LM_DEBUG, - "\nReceived a QOS event. Inside handle_qos ()\n")); - - // We have received an RSVP event. The following update_qos () call - // calls rapi_dispatch () in case of RAPI and WSAIoctl (GET_QOS) in - // case of W2K. It then does the QoS parameter translation and updates - // the QoS session object with the latest QoS. This call replaces the - // direct call that was being made to WSAIoctl (GET_QOS) here for the - // Win2K example. - - if (this->qos_session_->update_qos () == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Error in updating QoS\n"), - -1); - else - ACE_DEBUG ((LM_DEBUG, - " Updating QOS succeeds.\n")); - - // Now proactively query the QoS object for QoS. - ACE_QoS ace_get_qos = this->qos_session_->qos (); - - ACE_DEBUG ((LM_DEBUG, - "\nReceiving Flowspec :\t\t\tSending Flowspec :\n\n" - "\tToken Rate = %d\t\t\tToken Rate = %d\n" - "\tToken Bucket Size = %d\t\t\tToken Bucket Size = %d\n" - "\tPeak Bandwidth = %d\t\t\tPeak Bandwidth = %d\n" - "\tLatency = %d\t\t\t\tLatency = %d\n" - "\tDelay Variation = %d\t\t\tDelay Variation = %d\n" - "\tService Type = %d\t\t\tService Type = %d\n" - "\tMax SDU Size = %d\t\t\tMax SDU Size = %d\n" - "\tMinimum Policed Size = %d\t\tMinimum Policed Size = %d\n\n", - ace_get_qos.receiving_flowspec ()->token_rate (), - ace_get_qos.sending_flowspec ()->token_rate (), - ace_get_qos.receiving_flowspec ()->token_bucket_size (), - ace_get_qos.sending_flowspec ()->token_bucket_size (), - ace_get_qos.receiving_flowspec ()->peak_bandwidth (), - ace_get_qos.sending_flowspec ()->peak_bandwidth (), - ace_get_qos.receiving_flowspec ()->latency (), - ace_get_qos.sending_flowspec ()->latency (), - ace_get_qos.receiving_flowspec ()->delay_variation (), - ace_get_qos.sending_flowspec ()->delay_variation (), - ace_get_qos.receiving_flowspec ()->service_type (), - ace_get_qos.sending_flowspec ()->service_type (), - ace_get_qos.receiving_flowspec ()->max_sdu_size (), - ace_get_qos.sending_flowspec ()->max_sdu_size (), - ace_get_qos.receiving_flowspec ()->minimum_policed_size (), - ace_get_qos.sending_flowspec ()->minimum_policed_size ())); - - // This is SPECIFIC TO WIN2K and should be done in the qos_update function. - -// ACE_QoS ace_get_qos; -// u_long dwBytes; - -// if (ACE_OS::ioctl (this->dgram_mcast_qos_.get_handle (), -// ACE_SIO_GET_QOS, -// ace_get_qos, -// &dwBytes) == -1) -// ACE_ERROR ((LM_ERROR, -// "Error in Qos get ACE_OS::ioctl ()\n" -// "Bytes Returned = %d\n", -// dwBytes)); -// else -// ACE_DEBUG ((LM_DEBUG, -// "Getting QOS using ACE_OS::ioctl () succeeds.\n")); - - char* msg = "Hello sent on a QoS enabled session !!\n"; - iovec iov[1]; - iov[0].iov_base = msg; - iov[0].iov_len = ACE_OS_String::strlen(msg); - - size_t bytes_sent = 0; - - // Send "Hello" to the QoS session address to which the receiver has - // subscribed. - if (this->dgram_mcast_qos_.send (iov, - 1, - bytes_sent, - 0, - this->qos_session_->dest_addr (), - 0, - 0) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Error in dgram_mcast.send ()\n"), - -1); - else - ACE_DEBUG ((LM_DEBUG, - "Using ACE_OS::sendto () : Bytes sent : %d", - bytes_sent)); - - return 0; -} diff --git a/examples/QOS/Change_Receiver_FlowSpec/Sender_QoS_Event_Handler.h b/examples/QOS/Change_Receiver_FlowSpec/Sender_QoS_Event_Handler.h deleted file mode 100644 index b691bbd0615..00000000000 --- a/examples/QOS/Change_Receiver_FlowSpec/Sender_QoS_Event_Handler.h +++ /dev/null @@ -1,61 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// ACE_wrappers/examples/QOS -// -// = FILENAME -// Sender_QoS_Event_Handler.h -// -// = AUTHOR -// Vishal Kachroo <vishal@cs.wustl.edu> -// -// ============================================================================ - -#ifndef SENDER_QOS_EVENT_HANDLER_H -#define SENDER_QOS_EVENT_HANDLER_H - -#include "ace/Event_Handler.h" -#include "ace/Reactor.h" -#include "ace/INET_Addr.h" -#include "ace/QoS/SOCK_Dgram_Mcast_QoS.h" -#include "ace/QoS/QoS_Session.h" - -//#define MY_DEFPORT 5001 -//#define DEFAULT_MULTICASTGROUP "234.5.6.7" - -ACE_RCSID(Sender_QoS_Event_Handler, Sender_QoS_Event_Handler, "$Id$") - -class Sender_QoS_Event_Handler : public ACE_Event_Handler -{ -public: - // = Initialization and Termination methods. - Sender_QoS_Event_Handler (void); - // Constructor. - - Sender_QoS_Event_Handler::Sender_QoS_Event_Handler (const ACE_SOCK_Dgram_Mcast_QoS - &dgram_mcast_qos, - ACE_QoS_Session *qos_session - ); - // Constructor. - - ~Sender_QoS_Event_Handler (void); - // Destructor. - - virtual ACE_HANDLE get_handle (void) const; - // Override this to return the handle of the Dgram_Mcast - // that we are using. - - virtual int handle_qos (ACE_HANDLE fd); - // Handles a QoS event. Right now, just - // prints a message. - -private: - - ACE_SOCK_Dgram_Mcast_QoS dgram_mcast_qos_; - ACE_QoS_Session *qos_session_; -}; - -#endif /* SENDER_QOS_EVENT_HANDLER_H */ diff --git a/examples/QOS/Change_Receiver_FlowSpec/receiver.cpp b/examples/QOS/Change_Receiver_FlowSpec/receiver.cpp deleted file mode 100644 index 38252c4c221..00000000000 --- a/examples/QOS/Change_Receiver_FlowSpec/receiver.cpp +++ /dev/null @@ -1,301 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// ACE_wrappers/examples/QOS -// -// = FILENAME -// server.cpp -// -// = AUTHOR -// Vishal Kachroo <vishal@cs.wustl.edu> -// -// ============================================================================ - -#define QOSEVENT_MAIN - -#include "ace/OS.h" -#include "ace/QoS/QoS_Session.h" -#include "ace/QoS/QoS_Session_Factory.h" -#include "ace/QoS/QoS_Decorator.h" -#include "ace/QoS/SOCK_Dgram_Mcast_QoS.h" - -#include "QoS_Util.h" -#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 -// via WSAGetQosByName. Notice that ProviderSpecific settings are -// being allowed when picking the "default" template but not for -// "well-known" QOS templates. Also notice that since data is only -// flowing from sender to receiver, different flowspecs are filled in -// depending upon whether this application is acting as a sender or -// receiver. - - -// This function fills up the ACE_QoS_Params with the supplied iovec -// and ACE_QoS. - -int -FillQoSParams (ACE_QoS_Params &qos_params, - iovec* iov, - ACE_QoS* qos) -{ - qos_params.callee_data (iov); - qos_params.caller_data (0); - qos_params.socket_qos (qos); - qos_params.group_socket_qos (0); - qos_params.flags (ACE_JL_BOTH); - - return 0; -} - -int -main (int argc, char * argv[]) -{ - - QoS_Util qos_util(argc, argv); - - if (qos_util.parse_args () == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Error in parsing args\n"), - -1); - - // This is a multicast application. - if (qos_util.multicast_flag ()) - { - Fill_ACE_QoS fill_ace_qos; - - // The application adds the flow specs that it wants into the - // Fill_ACE_QoS. The Fill_ACE_QoS indexes the flow specs by the - // flow spec names. Here the new flowspec being added is g_711. - ACE_CString g_711 ("g_711"); - - switch (fill_ace_qos.map ().bind (g_711, - new ACE_Flow_Spec (9200, - 708, - 18400, - 0, - 0, - ACE_SERVICETYPE_CONTROLLEDLOAD, - 368, - 368, - 25, - 1))) - { - case 1 : - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to bind the new flow spec\n" - "The Flow Spec name already exists\n"), - -1); - break; - case -1 : - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to bind the new flow spec\n"), - -1); - break; - } - - ACE_DEBUG ((LM_DEBUG, - "g_711 Flow Spec bound successfully\n")); - - // This is a receiver. So we fill in the receiving QoS parameters. - ACE_QoS ace_qos_receiver; - if (fill_ace_qos.fill_simplex_receiver_qos (ace_qos_receiver, - g_711) !=0) - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to fill simplex receiver qos\n"), - -1); - else - ACE_DEBUG ((LM_DEBUG, - "Filled up the Receiver QoS parameters\n")); - - // 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. - 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. - - ACE_QoS_Params qos_params; - FillQoSParams (qos_params, 0, &ace_qos_receiver); - - // Create a QoS Session Factory. - ACE_QoS_Session_Factory session_factory; - - // Ask the factory to create a QoS session. - ACE_QoS_Session *qos_session = - session_factory.create_session (); - - // Create a destination address for the QoS session. The same - // address should be used for the subscribe call later. A copy - // is made below only to distinguish the two usages of the dest - // address. - - ACE_INET_Addr dest_addr (mult_addr); - - // A QoS session is defined by the 3-tuple [DestAddr, DestPort, - // Protocol]. Initialize the QoS session. - if (qos_session->open (mult_addr, - IPPROTO_UDP) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Error in opening the QoS session\n"), - -1); - else - ACE_DEBUG ((LM_DEBUG, - "QoS session opened successfully\n")); - - // The following call opens the Dgram_Mcast and calls the - // <ACE_OS::join_leaf> with the qos_params supplied here. Note - // the QoS session object is passed into this call. This - // subscribes the underlying socket to the passed in QoS - // session. For joining multiple multicast sessions, the - // following subscribe call should be made with different - // multicast addresses and a new QoS session object should be - // passed in for each such call. The QoS session objects can be - // created only through the session factory. Care should be - // taken that the mult_addr for the subscribe() call matches the - // dest_addr of the QoS session object. If this is not done, the - // 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, - 0, - AF_INET, - // ACE_FROM_PROTOCOL_INFO, - 0, - 0, // ACE_Protocol_Info, - 0, - ACE_OVERLAPPED_SOCKET_FLAG - | ACE_FLAG_MULTIPOINT_C_LEAF - | ACE_FLAG_MULTIPOINT_D_LEAF, - qos_session) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Error in subscribe\n"), - -1); - else - ACE_DEBUG ((LM_DEBUG, - "Dgram_Mcast subscribe succeeds \n")); - - 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. - ACE_SIO_MULTICAST_SCOPE, // IO control code. - &nIP_TTL, // In buffer. - sizeof (nIP_TTL), // Length of in buffer. - achInBuf, // Out buffer. - BUFSIZ, // Length of Out buffer. - &dwBytes, // bytes returned. - 0, // Overlapped. - 0) == -1) // Func. - ACE_ERROR ((LM_ERROR, - "Error in Multicast scope ACE_OS::ioctl() \n")); - else - ACE_DEBUG ((LM_DEBUG, - "Setting TTL with Multicast scope ACE_OS::ioctl call succeeds \n")); - - int bFlag = 0; - - // 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. - ACE_SIO_MULTIPOINT_LOOPBACK, // IO control code. - &bFlag, // In buffer. - sizeof (bFlag), // Length of in buffer. - achInBuf, // Out buffer. - BUFSIZ, // Length of Out buffer. - &dwBytes, // bytes returned. - 0, // Overlapped. - 0) == -1) // Func. - ACE_ERROR ((LM_ERROR, - "Error in Loopback ACE_OS::ioctl() \n")); - else - ACE_DEBUG ((LM_DEBUG, - "Disable Loopback with ACE_OS::ioctl call succeeds \n")); - - // This is a receiver. - qos_session->flags (ACE_QoS_Session::ACE_QOS_RECEIVER); - - ACE_QoS_Manager qos_manager = dgram_mcast_qos.qos_manager (); - - // Set the QoS for the session. Replaces the ioctl () call that - // was being made previously. - if (qos_session->qos (&dgram_mcast_qos, - &qos_manager, - ace_qos_receiver) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to set QoS\n"), - -1); - else - ACE_DEBUG ((LM_DEBUG, - "Setting QOS succeeds.\n")); - - // Register a signal handler that helps to gracefully close the - // open QoS sessions. - QoS_Signal_Handler qos_signal_handler (qos_session); - - // Register the usual SIGINT signal handler with the Reactor for - // the application to gracefully release the QoS session and - // shutdown. - if (ACE_Reactor::instance ()->register_handler - (SIGINT, &qos_signal_handler) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Error in registering the Signal Handler.\n"), - -1); - - // Handler to process QoS and Data events for the reciever. - Receiver_QoS_Event_Handler qos_event_handler (dgram_mcast_qos, - qos_session); - - // Decorate the above handler with QoS functionality. - ACE_QoS_Decorator qos_decorator (&qos_event_handler, - qos_session); - - // Initialize the Decorator. - if (qos_decorator.init () != 0) - ACE_ERROR_RETURN ((LM_ERROR, - "QoS Decorator init () failed.\n"), - -1); - - // Register the decorated Event Handler with the Reactor. - if (ACE_Reactor::instance ()->register_handler (&qos_decorator, - ACE_Event_Handler::QOS_MASK | - ACE_Event_Handler::READ_MASK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Error in registering the Decorator with the Reactor\n"), - -1); - - - // Start the event loop. - ACE_DEBUG ((LM_DEBUG, - "Running the Event Loop ... \n")); - - ACE_Reactor::instance ()->run_event_loop (); - - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) shutting down server logging daemon\n")); - } - else - ACE_DEBUG ((LM_DEBUG, - "Specify a -m option for multicast application\n")); - return 0; -} - - - diff --git a/examples/QOS/Change_Receiver_FlowSpec/receiver.dsp b/examples/QOS/Change_Receiver_FlowSpec/receiver.dsp deleted file mode 100644 index ad894bf2c1d..00000000000 --- a/examples/QOS/Change_Receiver_FlowSpec/receiver.dsp +++ /dev/null @@ -1,138 +0,0 @@ -# Microsoft Developer Studio Project File - Name="receiver" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=receiver - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "receiver.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "receiver.mak" CFG="receiver - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "receiver - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "receiver - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "receiver - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 ace.lib ACE_QoS.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\ace" /libpath:"..\..\..\ace\QoS"
-
-!ELSEIF "$(CFG)" == "receiver - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /GX /Od /I "..\..\..\" /D "WIN32" /D "_DEBUG" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 aced.lib ACE_QoSd.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\ace" /libpath:"..\..\..\ace\QoS"
-
-!ENDIF
-
-# Begin Target
-
-# Name "receiver - Win32 Release"
-# Name "receiver - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\Fill_ACE_QoS.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\QoS_Signal_Handler.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\QoS_Util.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Receiver_QoS_Event_Handler.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\receiver.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\Fill_ACE_QoS.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\FlowSpec_Dbase.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\QoS_Signal_Handler.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\QoS_Util.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Receiver_QOS_Event_Handler.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/examples/QOS/Change_Receiver_FlowSpec/sender.cpp b/examples/QOS/Change_Receiver_FlowSpec/sender.cpp deleted file mode 100644 index 775f01e5cd0..00000000000 --- a/examples/QOS/Change_Receiver_FlowSpec/sender.cpp +++ /dev/null @@ -1,317 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// ACE_wrappers/examples/QOS -// -// = FILENAME -// client.cpp -// -// = AUTHOR -// Vishal Kachroo <vishal@cs.wustl.edu> -// -// ============================================================================ - - -#include "ace/OS.h" -#include "ace/QoS/QoS_Session.h" -#include "ace/QoS/QoS_Session_Factory.h" -#include "ace/QoS/QoS_Session_Impl.h" -#include "ace/QoS/QoS_Decorator.h" -#include "ace/QoS/SOCK_Dgram_Mcast_QoS.h" - -#include "QoS_Util.h" -#include "Fill_ACE_QoS.h" -#include "QoS_Signal_Handler.h" -#include "Sender_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 -// via WSAGetQosByName. Notice that ProviderSpecific settings are -// being allowed when picking the "default" template but not for -// "well-known" QOS templates. Also notice that since data is only -// flowing from sender to receiver, different flowspecs are filled in -// depending upon whether this application is acting as a sender or -// receiver. - -// This function fills up the ACE_QoS_Params with the supplied iovec and ACE_QoS. - -int -FillQoSParams (ACE_QoS_Params &qos_params, - iovec* iov, - ACE_QoS* qos) -{ - qos_params.callee_data (iov); - qos_params.caller_data (0); - qos_params.socket_qos (qos); - qos_params.group_socket_qos (0); - qos_params.flags (ACE_JL_BOTH); - - return 0; -} - -int -main (int argc, char * argv[]) -{ - - ACE_DEBUG ((LM_DEBUG, - "Sender\n")); - - QoS_Util qos_util(argc, argv); - - if (qos_util.parse_args () == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Error in parsing args\n"), - -1); - - // This is a multicast application. - if (qos_util.multicast_flag ()) - { - Fill_ACE_QoS fill_ace_qos; - - // The application adds the flow specs that it wants into the - // Fill_ACE_QoS. The Fill_ACE_QoS indexes the flow specs by the flow - // spec names. Here the new flowspec being added is g_711. - ACE_CString g_711 ("g_711"); - - switch (fill_ace_qos.map ().bind (g_711, - new ACE_Flow_Spec (9200, - 708, - 18400, - 0, - 0, - ACE_SERVICETYPE_CONTROLLEDLOAD, - 368, - 368, - 25, - 1))) - { - case 1 : - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to bind the new flow spec\n" - "The Flow Spec name already exists\n"), - -1); - break; - case -1 : - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to bind the new flow spec\n"), - -1); - break; - } - - ACE_DEBUG ((LM_DEBUG, - "g_711 Flow Spec bound successfully\n")); - - // This is a sender. So we fill in the sending QoS parameters. - ACE_QoS ace_qos_sender; - - if (fill_ace_qos.fill_simplex_sender_qos (ace_qos_sender, - g_711) !=0) - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to fill simplex sender qos\n"), - -1); - else - ACE_DEBUG ((LM_DEBUG, - "Filled up the Sender QoS parameters\n")); - - // Opening a new Multicast Datagram. It is absolutely necessary that - // the sender and the receiver subscribe to the same multicast - // addresses to make sure the "multicast sessions" for the two are - // the same. This is used to match the RESV<->PATH states. - 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. - 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. - - ACE_QoS_Params qos_params; - FillQoSParams (qos_params, 0, &ace_qos_sender); - - // Create a QoS Session Factory. - ACE_QoS_Session_Factory session_factory; - - // Ask the factory to create a QoS session. - ACE_QoS_Session *qos_session = - session_factory.create_session (); - - // Create a destination address for the QoS session. The same - // address should be used for the subscribe call later. A copy is - // made below only to distinguish the two usages of the dest - // address. - - ACE_INET_Addr dest_addr (mult_addr); - - // A QoS session is defined by the 3-tuple [DestAddr, DestPort, - // Protocol]. Initialize the QoS session. - if (qos_session->open (mult_addr, - IPPROTO_UDP) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Error in opening the QoS session\n"), - -1); - else - ACE_DEBUG ((LM_DEBUG, - "QoS session opened successfully\n")); - - // The following call opens the Dgram_Mcast and calls the - // <ACE_OS::join_leaf> with the qos_params supplied here. Note the - // QoS session object is passed into this call. This subscribes the - // underlying socket to the passed in QoS session. For joining - // multiple multicast sessions, the following subscribe call should - // be made with different multicast addresses and a new QoS session - // object should be passed in for each such call. The QoS session - // objects can be created only through the session factory. Care - // should be taken that the mult_addr for the subscribe() call - // matches the dest_addr of the QoS session object. If this is not - // done, the 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, - 0, - AF_INET, - // ACE_FROM_PROTOCOL_INFO, - 0, - 0, // ACE_Protocol_Info, - 0, - ACE_OVERLAPPED_SOCKET_FLAG - | ACE_FLAG_MULTIPOINT_C_LEAF - | ACE_FLAG_MULTIPOINT_D_LEAF, - qos_session) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Error in subscribe\n"), - -1); - else - ACE_DEBUG ((LM_DEBUG, - "Dgram_Mcast subscribe succeeds \n")); - - 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. - ACE_SIO_MULTICAST_SCOPE, // IO control code. - &nIP_TTL, // In buffer. - sizeof (nIP_TTL), // Length of in buffer. - achInBuf, // Out buffer. - BUFSIZ, // Length of Out buffer. - &dwBytes, // bytes returned. - 0, // Overlapped. - 0) == -1) // Func. - ACE_ERROR ((LM_ERROR, - "Error in Multicast scope ACE_OS::ioctl() \n")); - else - ACE_DEBUG ((LM_DEBUG, - "Setting TTL with Multicast scope ACE_OS::ioctl call succeeds \n")); - - int bFlag = 0; - - // 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. - ACE_SIO_MULTIPOINT_LOOPBACK, // IO control code. - &bFlag, // In buffer. - sizeof (bFlag), // Length of in buffer. - achInBuf, // Out buffer. - BUFSIZ, // Length of Out buffer. - &dwBytes, // bytes returned. - 0, // Overlapped. - 0) == -1) // Func. - ACE_ERROR ((LM_ERROR, - "Error in Loopback ACE_OS::ioctl() \n")); - else - ACE_DEBUG ((LM_DEBUG, - "Disable Loopback with ACE_OS::ioctl call succeeds \n")); - - // This is a sender. - qos_session->flags (ACE_QoS_Session::ACE_QOS_SENDER); - - ACE_QoS_Manager qos_manager = dgram_mcast_qos.qos_manager (); - - // Since we are using RSVP, it is imperative that the client - // application have the option of supplying the source sender - // port for the RSVP messages. A default will be chosen by the - // ACE API if this is not done. - qos_session->source_port (qos_util.source_port ()); - - // Set the QoS for the session. Replaces the ioctl () call that - // was being made previously. - if (qos_session->qos (&dgram_mcast_qos, - &qos_manager, - ace_qos_sender) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to set QoS\n"), - -1); - else - ACE_DEBUG ((LM_DEBUG, - "Setting QOS succeeds.\n")); - - // Register a signal handler that helps to gracefully close the open - // QoS sessions. - QoS_Signal_Handler qos_signal_handler (qos_session); - - // Register the usual SIGINT signal handler with the Reactor for - // the application to gracefully release the QoS session and - // shutdown. - if (ACE_Reactor::instance ()->register_handler - (SIGINT, &qos_signal_handler) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Error in registering the Signal Handler.\n"), - -1); - - // Handler to process QoS and Data events for the reciever. - Sender_QoS_Event_Handler qos_event_handler (dgram_mcast_qos, - qos_session); - - // Decorate the above handler with QoS functionality. - ACE_QoS_Decorator qos_decorator (&qos_event_handler, - qos_session); - - // Initialize the Decorator. - if (qos_decorator.init () != 0) - ACE_ERROR_RETURN ((LM_ERROR, - "QoS Decorator init () failed.\n"), - -1); - - // Register the decorated Event Handler with the Reactor. - if (ACE_Reactor::instance ()->register_handler (&qos_decorator, - ACE_Event_Handler::QOS_MASK | - ACE_Event_Handler::READ_MASK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Error in registering the Decorator with the Reactor\n"), - -1); - - - - - // Start the event loop. - ACE_DEBUG ((LM_DEBUG, - "Running the Event Loop ... \n")); - - ACE_Reactor::instance ()->run_event_loop (); - - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) shutting down server logging daemon\n")); - } - else - ACE_DEBUG ((LM_DEBUG, - "Specify a -m option for multicast application\n")); - return 0; -} - - - - - - - diff --git a/examples/QOS/Change_Receiver_FlowSpec/sender.dsp b/examples/QOS/Change_Receiver_FlowSpec/sender.dsp deleted file mode 100644 index 732d1f2692d..00000000000 --- a/examples/QOS/Change_Receiver_FlowSpec/sender.dsp +++ /dev/null @@ -1,138 +0,0 @@ -# Microsoft Developer Studio Project File - Name="sender" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=sender - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "sender.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "sender.mak" CFG="sender - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "sender - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "sender - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "sender - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 ace.lib ws2_32.lib ACE_QoS.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\ace" /libpath:"..\..\..\ace\QoS"
-
-!ELSEIF "$(CFG)" == "sender - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /GX /Od /I "..\..\..\" /D "WIN32" /D "_DEBUG" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 aced.lib ACE_QoSd.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\ace" /libpath:"..\..\..\ace\QoS"
-
-!ENDIF
-
-# Begin Target
-
-# Name "sender - Win32 Release"
-# Name "sender - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\sender.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Fill_ACE_QoS.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\QoS_Signal_Handler.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\QoS_Util.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Sender_QoS_Event_Handler.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\Fill_ACE_QoS.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\FlowSpec_Dbase.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\QoS_Signal_Handler.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\QoS_Util.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Sender_QOS_Event_Handler.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/examples/QOS/Change_Sender_TSpec/Fill_ACE_QoS.cpp b/examples/QOS/Change_Sender_TSpec/Fill_ACE_QoS.cpp deleted file mode 100644 index fbaed5667e6..00000000000 --- a/examples/QOS/Change_Sender_TSpec/Fill_ACE_QoS.cpp +++ /dev/null @@ -1,114 +0,0 @@ -// Fill_ACE_QoS.cpp -// $Id$ - -#include "Fill_ACE_QoS.h" - -ACE_RCSID(QOS, Fill_ACE_QoS,"$Id$") - -const iovec Fill_ACE_QoS::iov_ = {0,0}; - -Fill_ACE_QoS::Fill_ACE_QoS (void) -{ - ACE_NEW (this->default_traffic_, - ACE_Flow_Spec (ACE_QOS_NOT_SPECIFIED, - ACE_QOS_NOT_SPECIFIED, - ACE_QOS_NOT_SPECIFIED, - ACE_QOS_NOT_SPECIFIED, - ACE_QOS_NOT_SPECIFIED, - ACE_SERVICETYPE_NOTRAFFIC, - ACE_QOS_NOT_SPECIFIED, - ACE_QOS_NOT_SPECIFIED, - 25, - 1)); -} - -// destructor. -Fill_ACE_QoS::~Fill_ACE_QoS (void) -{} - -int -Fill_ACE_QoS::fill_simplex_receiver_qos (ACE_QoS &ace_qos, - const ACE_CString &recv_flow_name) -{ - ACE_Flow_Spec *recv_flow_spec = 0; - - if (this->map ().find (recv_flow_name, recv_flow_spec) != 0) - ACE_ERROR_RETURN ((LM_DEBUG, - "Unable to find a FlowSpec with name %s", - recv_flow_name.c_str ()), - -1); - ace_qos.receiving_flowspec (recv_flow_spec); - ace_qos.sending_flowspec ((this->default_traffic_)); - ace_qos.provider_specific (Fill_ACE_QoS::iov_); - - return 0; -} - - -int -Fill_ACE_QoS::fill_simplex_sender_qos (ACE_QoS &ace_qos, - const ACE_CString &send_flow_name) -{ - ACE_Flow_Spec *send_flow_spec = 0; - - if (this->map ().find (send_flow_name, send_flow_spec) != 0) - ACE_ERROR_RETURN ((LM_DEBUG, - "Unable to find a FlowSpec with name %s", - send_flow_name.c_str ()), - -1); - - ace_qos.receiving_flowspec ((this->default_traffic_)); - ace_qos.sending_flowspec (send_flow_spec); - ace_qos.provider_specific (Fill_ACE_QoS::iov_); - - return 0; -} - -int -Fill_ACE_QoS::fill_duplex_qos (ACE_QoS &ace_qos, - const ACE_CString &recv_flow_name, - const ACE_CString &send_flow_name) -{ - ACE_Flow_Spec *send_flow_spec = 0; - ACE_Flow_Spec *recv_flow_spec = 0; - - if (this->map ().find (recv_flow_name, recv_flow_spec) != 0) - ACE_ERROR_RETURN ((LM_DEBUG, - "Unable to find a FlowSpec with name %s", - recv_flow_name.c_str ()), - -1); - - if (this->map ().find (send_flow_name, send_flow_spec) != 0) - ACE_ERROR_RETURN ((LM_DEBUG, - "Unable to find a FlowSpec with name %s", - send_flow_name.c_str ()), - -1); - - ace_qos.receiving_flowspec (recv_flow_spec); - ace_qos.sending_flowspec (send_flow_spec); - ace_qos.provider_specific (Fill_ACE_QoS::iov_); - - return 0; -} - -Fill_ACE_QoS::FLOW_SPEC_HASH_MAP& -Fill_ACE_QoS::map (void) -{ - return this->flow_spec_map_; -} - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -template class ACE_Hash_Map_Manager<ACE_CString,ACE_Flow_Spec *,ACE_Null_Mutex>; -template class ACE_Hash_Map_Manager_Ex<ACE_CString, ACE_Flow_Spec *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex>; -template class ACE_Hash_Map_Iterator_Base_Ex<ACE_CString, ACE_Flow_Spec *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex>; -template class ACE_Hash_Map_Entry<ACE_CString, ACE_Flow_Spec *>; -template class ACE_Hash_Map_Manager_Ex<ACE_CString, ACE_Flow_Spec *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Thread_Mutex>; -template class ACE_Hash_Map_Iterator_Base_Ex<ACE_CString, ACE_Flow_Spec *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Thread_Mutex>; -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Hash_Map_Manager<ACE_CString,ACE_Flow_Spec *,ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Manager_Ex<ACE_CString, ACE_Flow_Spec *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<ACE_CString, ACE_Flow_Spec *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Entry<ACE_CString, ACE_Flow_Spec *> -#pragma instantiate ACE_Hash_Map_Manager_Ex<ACE_CString, ACE_Flow_Spec *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Thread_Mutex> -#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<ACE_CString, ACE_Flow_Spec *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Thread_Mutex> -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/examples/QOS/Change_Sender_TSpec/Fill_ACE_QoS.h b/examples/QOS/Change_Sender_TSpec/Fill_ACE_QoS.h deleted file mode 100644 index 710b8bd7c94..00000000000 --- a/examples/QOS/Change_Sender_TSpec/Fill_ACE_QoS.h +++ /dev/null @@ -1,76 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// ACE_wrappers/examples/QOS -// -// = FILENAME -// Fill_ACE_QoS.h -// -// = AUTHOR -// Vishal Kachroo <vishal@cs.wustl.edu> -// -// ============================================================================ - -#ifndef FILL_ACE_QOS_H -#define FILL_ACE_QOS_H - -#include "ace/SString.h" -#include "ace/Hash_Map_Manager.h" -#include "ace/Synch.h" -#include "ace/ACE.h" -#include "ace/OS.h" -#include "ace/OS_QoS.h" - -class Fill_ACE_QoS -{ - // TITLE - // This class helps users to add new flow specs and provides - // utility functions for filling up the flow specs for simplex/duplex - // sessions. - -public: - typedef ACE_Hash_Map_Manager <ACE_CString, ACE_Flow_Spec *, ACE_Null_Mutex> FLOW_SPEC_HASH_MAP; - - //Initialization and termination methods. - Fill_ACE_QoS (void); - // constructor. - - ~Fill_ACE_QoS (void); - // destructor. - - int fill_simplex_receiver_qos (ACE_QoS &ace_qos, - const ACE_CString &recv_flow_name); - // To be used by receivers. Fills the receiver qos and sets the - // sender qos to NO_TRAFFIC. - - int fill_simplex_sender_qos (ACE_QoS &ace_qos, - const ACE_CString &send_flow_name); - // To be used by senders. Fills the sender qos and sets the receiver - // qos to NO_TRAFFIC. - - int fill_duplex_qos (ACE_QoS &ace_qos, - const ACE_CString &recv_flow_name, - const ACE_CString &send_flow_name); - // To be used by applications that wish to be both receivers and - // senders. - - FLOW_SPEC_HASH_MAP& map (void); - // Returns the hash map of flowspecs indexed by flowspec name. - -private: - - // The Service Provider is currently set to NULL for all ACE_QoS. - static const iovec iov_; - - // A NO_TRAFFIC flow spec. Senders set the receiving qos to this - // while the receivers set the sending qos to this. - ACE_Flow_Spec *default_traffic_; - - // A list of flowspecs indexed by the flowspec name. - FLOW_SPEC_HASH_MAP flow_spec_map_; -}; - -#endif /* FILL_ACE_QOS_H */ diff --git a/examples/QOS/Change_Sender_TSpec/FlowSpec_Dbase.h b/examples/QOS/Change_Sender_TSpec/FlowSpec_Dbase.h deleted file mode 100644 index fc382048c13..00000000000 --- a/examples/QOS/Change_Sender_TSpec/FlowSpec_Dbase.h +++ /dev/null @@ -1,52 +0,0 @@ -/* -*- C++ -*- */ -//$Id$ - -// ============================================================================ -// -// = LIBRARY -// ACE_wrappers/examples/QOS -// -// = FILENAME -// FlowSpec_Dbase.h -// -// = AUTHOR -// Vishal Kachroo <vishal@cs.wustl.edu> -// -// ============================================================================ - -#ifndef FLOWSPEC_DBASE_H -#define FLOWSPEC_DBASE_H - -// This file contains the different FlowSpecs that the QoS enabled -// application uses. Its a good idea to list them all here so the -// application code is clean. - -ACE_Flow_Spec notraffic (ACE_QOS_NOT_SPECIFIED, - ACE_QOS_NOT_SPECIFIED, - ACE_QOS_NOT_SPECIFIED, - ACE_QOS_NOT_SPECIFIED, - ACE_QOS_NOT_SPECIFIED, - ACE_SERVICETYPE_NOTRAFFIC, - ACE_QOS_NOT_SPECIFIED, - ACE_QOS_NOT_SPECIFIED, - 25, - 1); - -ACE_Flow_Spec g711 (9200, - 708, - 18400, - 0, - 0, - ACE_SERVICETYPE_CONTROLLEDLOAD, - 368, - 368, - 25, - 1); - -// The default session address is macarena.cs.wustl.edu. I am using macarena -// as my receiver for testing. -#define DEFAULT_QOS_SESSION_MACHINE "128.252.165.127" -#define DEFAULT_QOS_SESSION_PORT 8001 - -#endif /* FLOWSPEC_DBASE_H */ - diff --git a/examples/QOS/Change_Sender_TSpec/Makefile b/examples/QOS/Change_Sender_TSpec/Makefile deleted file mode 100644 index 9df41011767..00000000000 --- a/examples/QOS/Change_Sender_TSpec/Makefile +++ /dev/null @@ -1,359 +0,0 @@ -#---------------------------------------------------------------------------- -# -# $Id$ -# -LDLIBS += -lACE_QoS - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -PSRC = $(addsuffix .cpp,$(BIN)) - -CLT_OBJS = \ - QoS_Signal_Handler.o \ - QoS_Util.o \ - Fill_ACE_QoS.o \ - sender.o \ - Sender_QoS_Event_Handler.o - -SVR_OBJS = \ - QoS_Signal_Handler.o \ - QoS_Util.o \ - Fill_ACE_QoS.o \ - receiver.o \ - Receiver_QoS_Event_Handler.o - -BIN2 = receiver \ - sender - -BIN = $(BIN2) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -receiver: $(addprefix $(VDIR),$(SVR_OBJS)) - $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK) - -sender: $(addprefix $(VDIR),$(CLT_OBJS)) - $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK) -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - - -.obj/receiver.o .obj/receiver.so .shobj/receiver.o .shobj/receiver.so: receiver.cpp \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/pre.h \ - $(ACE_ROOT)/ace/post.h \ - $(ACE_ROOT)/ace/ACE_export.h \ - $(ACE_ROOT)/ace/svc_export.h \ - $(ACE_ROOT)/ace/ace_wchar.h \ - $(ACE_ROOT)/ace/ace_wchar.inl \ - $(ACE_ROOT)/ace/OS_Errno.h \ - $(ACE_ROOT)/ace/OS_Export.h \ - $(ACE_ROOT)/ace/OS_Errno.inl \ - $(ACE_ROOT)/ace/OS_Dirent.h \ - $(ACE_ROOT)/ace/OS_Dirent.inl \ - $(ACE_ROOT)/ace/OS_String.h \ - $(ACE_ROOT)/ace/OS_String.inl \ - $(ACE_ROOT)/ace/OS_Memory.h \ - $(ACE_ROOT)/ace/OS_Memory.inl \ - $(ACE_ROOT)/ace/OS_TLI.h \ - $(ACE_ROOT)/ace/OS_TLI.inl \ - $(ACE_ROOT)/ace/Min_Max.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/QoS/QoS_Session.h \ - $(ACE_ROOT)/ace/QoS/ACE_QoS_Export.h \ - $(ACE_ROOT)/ace/INET_Addr.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/Flag_Manip.h \ - $(ACE_ROOT)/ace/Flag_Manip.i \ - $(ACE_ROOT)/ace/Handle_Ops.h \ - $(ACE_ROOT)/ace/Handle_Ops.i \ - $(ACE_ROOT)/ace/Lib_Find.h \ - $(ACE_ROOT)/ace/Lib_Find.i \ - $(ACE_ROOT)/ace/Init_ACE.h \ - $(ACE_ROOT)/ace/Init_ACE.i \ - $(ACE_ROOT)/ace/Sock_Connect.h \ - $(ACE_ROOT)/ace/Sock_Connect.i \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Addr.h \ - $(ACE_ROOT)/ace/Addr.i \ - $(ACE_ROOT)/ace/INET_Addr.i \ - $(ACE_ROOT)/ace/QoS/QoS_Session_Factory.h \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Node.h \ - $(ACE_ROOT)/ace/Node.cpp \ - $(ACE_ROOT)/ace/Array_Base.h \ - $(ACE_ROOT)/ace/Array_Base.inl \ - $(ACE_ROOT)/ace/Array_Base.cpp \ - $(ACE_ROOT)/ace/Unbounded_Set.h \ - $(ACE_ROOT)/ace/Unbounded_Set.inl \ - $(ACE_ROOT)/ace/Unbounded_Set.cpp \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.h \ - $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.inl \ - $(ACE_ROOT)/ace/Unbounded_Queue.h \ - $(ACE_ROOT)/ace/Unbounded_Queue.inl \ - $(ACE_ROOT)/ace/Unbounded_Queue.cpp \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/QoS/QoS_Decorator.h \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread_Adapter.h \ - $(ACE_ROOT)/ace/Base_Thread_Adapter.h \ - $(ACE_ROOT)/ace/Base_Thread_Adapter.inl \ - $(ACE_ROOT)/ace/Thread_Adapter.inl \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Test_and_Set.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Test_and_Set.i \ - $(ACE_ROOT)/ace/Test_and_Set.cpp \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(ACE_ROOT)/ace/QoS/SOCK_Dgram_Mcast_QoS.h \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.h \ - $(ACE_ROOT)/ace/SOCK.h \ - $(ACE_ROOT)/ace/IPC_SAP.h \ - $(ACE_ROOT)/ace/IPC_SAP.i \ - $(ACE_ROOT)/ace/SOCK.i \ - $(ACE_ROOT)/ace/SOCK_Dgram.i \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast_T.h \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast_T.i \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast_T.cpp \ - $(ACE_ROOT)/ace/QoS/QoS_Manager.h \ - $(ACE_ROOT)/ace/QoS/SOCK_Dgram_Mcast_QoS.i \ - QoS_Util.h Fill_ACE_QoS.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Hash_Map_Manager.h \ - $(ACE_ROOT)/ace/Functor.h \ - $(ACE_ROOT)/ace/Functor.i \ - $(ACE_ROOT)/ace/Functor_T.h \ - $(ACE_ROOT)/ace/Functor_T.i \ - $(ACE_ROOT)/ace/Functor_T.cpp \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \ - $(ACE_ROOT)/ace/Service_Config.h \ - $(ACE_ROOT)/ace/Service_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.i \ - $(ACE_ROOT)/ace/Service_Object.i \ - $(ACE_ROOT)/ace/Service_Config.i \ - $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Malloc_Allocator.h \ - $(ACE_ROOT)/ace/Malloc_Allocator.i \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - QoS_Signal_Handler.h Receiver_QoS_Event_Handler.h - -.obj/sender.o .obj/sender.so .shobj/sender.o .shobj/sender.so: sender.cpp \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/pre.h \ - $(ACE_ROOT)/ace/post.h \ - $(ACE_ROOT)/ace/ACE_export.h \ - $(ACE_ROOT)/ace/svc_export.h \ - $(ACE_ROOT)/ace/ace_wchar.h \ - $(ACE_ROOT)/ace/ace_wchar.inl \ - $(ACE_ROOT)/ace/OS_Errno.h \ - $(ACE_ROOT)/ace/OS_Export.h \ - $(ACE_ROOT)/ace/OS_Errno.inl \ - $(ACE_ROOT)/ace/OS_Dirent.h \ - $(ACE_ROOT)/ace/OS_Dirent.inl \ - $(ACE_ROOT)/ace/OS_String.h \ - $(ACE_ROOT)/ace/OS_String.inl \ - $(ACE_ROOT)/ace/OS_Memory.h \ - $(ACE_ROOT)/ace/OS_Memory.inl \ - $(ACE_ROOT)/ace/OS_TLI.h \ - $(ACE_ROOT)/ace/OS_TLI.inl \ - $(ACE_ROOT)/ace/Min_Max.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/QoS/QoS_Session.h \ - $(ACE_ROOT)/ace/QoS/ACE_QoS_Export.h \ - $(ACE_ROOT)/ace/INET_Addr.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/Flag_Manip.h \ - $(ACE_ROOT)/ace/Flag_Manip.i \ - $(ACE_ROOT)/ace/Handle_Ops.h \ - $(ACE_ROOT)/ace/Handle_Ops.i \ - $(ACE_ROOT)/ace/Lib_Find.h \ - $(ACE_ROOT)/ace/Lib_Find.i \ - $(ACE_ROOT)/ace/Init_ACE.h \ - $(ACE_ROOT)/ace/Init_ACE.i \ - $(ACE_ROOT)/ace/Sock_Connect.h \ - $(ACE_ROOT)/ace/Sock_Connect.i \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Addr.h \ - $(ACE_ROOT)/ace/Addr.i \ - $(ACE_ROOT)/ace/INET_Addr.i \ - $(ACE_ROOT)/ace/QoS/QoS_Session_Factory.h \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Node.h \ - $(ACE_ROOT)/ace/Node.cpp \ - $(ACE_ROOT)/ace/Array_Base.h \ - $(ACE_ROOT)/ace/Array_Base.inl \ - $(ACE_ROOT)/ace/Array_Base.cpp \ - $(ACE_ROOT)/ace/Unbounded_Set.h \ - $(ACE_ROOT)/ace/Unbounded_Set.inl \ - $(ACE_ROOT)/ace/Unbounded_Set.cpp \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.h \ - $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.inl \ - $(ACE_ROOT)/ace/Unbounded_Queue.h \ - $(ACE_ROOT)/ace/Unbounded_Queue.inl \ - $(ACE_ROOT)/ace/Unbounded_Queue.cpp \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/QoS/QoS_Session_Impl.h \ - \ - \ - \ - $(ACE_ROOT)/ace/QoS/QoS_Session_Impl.i \ - $(ACE_ROOT)/ace/QoS/QoS_Decorator.h \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread_Adapter.h \ - $(ACE_ROOT)/ace/Base_Thread_Adapter.h \ - $(ACE_ROOT)/ace/Base_Thread_Adapter.inl \ - $(ACE_ROOT)/ace/Thread_Adapter.inl \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Test_and_Set.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Test_and_Set.i \ - $(ACE_ROOT)/ace/Test_and_Set.cpp \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(ACE_ROOT)/ace/QoS/SOCK_Dgram_Mcast_QoS.h \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.h \ - $(ACE_ROOT)/ace/SOCK.h \ - $(ACE_ROOT)/ace/IPC_SAP.h \ - $(ACE_ROOT)/ace/IPC_SAP.i \ - $(ACE_ROOT)/ace/SOCK.i \ - $(ACE_ROOT)/ace/SOCK_Dgram.i \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast_T.h \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast_T.i \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast_T.cpp \ - $(ACE_ROOT)/ace/QoS/QoS_Manager.h \ - $(ACE_ROOT)/ace/QoS/SOCK_Dgram_Mcast_QoS.i \ - QoS_Util.h Fill_ACE_QoS.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Hash_Map_Manager.h \ - $(ACE_ROOT)/ace/Functor.h \ - $(ACE_ROOT)/ace/Functor.i \ - $(ACE_ROOT)/ace/Functor_T.h \ - $(ACE_ROOT)/ace/Functor_T.i \ - $(ACE_ROOT)/ace/Functor_T.cpp \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \ - $(ACE_ROOT)/ace/Service_Config.h \ - $(ACE_ROOT)/ace/Service_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.i \ - $(ACE_ROOT)/ace/Service_Object.i \ - $(ACE_ROOT)/ace/Service_Config.i \ - $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Malloc_Allocator.h \ - $(ACE_ROOT)/ace/Malloc_Allocator.i \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - QoS_Signal_Handler.h Sender_QoS_Event_Handler.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/QOS/Change_Sender_TSpec/QoS_Signal_Handler.cpp b/examples/QOS/Change_Sender_TSpec/QoS_Signal_Handler.cpp deleted file mode 100644 index 9f07ad5b378..00000000000 --- a/examples/QOS/Change_Sender_TSpec/QoS_Signal_Handler.cpp +++ /dev/null @@ -1,34 +0,0 @@ -// QoS_Signal_Handler.cpp -// $Id$ - -#include "ace/Log_Msg.h" -#include "QoS_Signal_Handler.h" - -ACE_RCSID(QOS, QoS_Signal_Handler,"$Id$") - -// constructor. -QoS_Signal_Handler::QoS_Signal_Handler (ACE_QoS_Session *qos_session) - : qos_session_ (qos_session) -{ -} - -// Releases the QoS sessions gracefully. -int -QoS_Signal_Handler::handle_signal (int signum, siginfo_t *, ucontext_t*) -{ - if (signum == SIGINT) - { - if (this->qos_session_->close () == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to close the QoS session.\n"), - -1); - else - ACE_DEBUG ((LM_DEBUG, - "QoS Session with id %d closed successfully.\n", - this->qos_session_->session_id ())); - } - else - ACE_DEBUG ((LM_DEBUG, - "A signal other than SIGINT received.\nIgnoring.\n")); - return 0; -} diff --git a/examples/QOS/Change_Sender_TSpec/QoS_Signal_Handler.h b/examples/QOS/Change_Sender_TSpec/QoS_Signal_Handler.h deleted file mode 100644 index 35b9f3a19e7..00000000000 --- a/examples/QOS/Change_Sender_TSpec/QoS_Signal_Handler.h +++ /dev/null @@ -1,45 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ===================================================================== -// -// = LIBRARY -// ACE_wrappers/examples/QOS -// -// = FILENAME -// QoS_Signal_Handler.h -// -// = AUTHOR -// Vishal Kachroo <vishal@cs.wustl.edu> -// -// ===================================================================== - -#ifndef QOS_SIGNAL_HANDLER_H -#define QOS_SIGNAL_HANDLER_H - -#include "ace/Event_Handler.h" -#include "ace/QoS/QoS_Session.h" - -class QoS_Signal_Handler : public ACE_Event_Handler -{ - // TITLE - // This class Handles the SIGINT signal through the Reactor. - // Useful to gracefully release QoS sessions. - -public: - - QoS_Signal_Handler (ACE_QoS_Session *qos_session); - // constructor. - - int handle_signal(int signum, siginfo_t*,ucontext_t*); - // Override this method to implement graceful shutdown. - -private: - - ACE_QoS_Session *qos_session_; - // Session to be gracefully shutdown. - -}; - -#endif /* QOS_SIGNAL_HANDLER_H */ - diff --git a/examples/QOS/Change_Sender_TSpec/QoS_Util.cpp b/examples/QOS/Change_Sender_TSpec/QoS_Util.cpp deleted file mode 100644 index 9a72bf56df1..00000000000 --- a/examples/QOS/Change_Sender_TSpec/QoS_Util.cpp +++ /dev/null @@ -1,121 +0,0 @@ -// QoS_Session_Impl.cpp -// $Id$ - -#define SENDER_PORT 10001 - -#include "ace/Log_Msg.h" -#include "ace/Get_Opt.h" -#include "QoS_Util.h" - -ACE_RCSID(QOS, QoS_Util,"$Id$") - -// constructor. -QoS_Util::QoS_Util (int argc, - char *argv[]) - : argc_ (argc), - argv_ (argv), - source_port_ (SENDER_PORT), - protocol_ (IPPROTO_UDP), - multicast_flag_ (0) -{ - ACE_NEW (this->mult_session_addr_, - ACE_INET_Addr (ACE_DEFAULT_MULTICAST_PORT)); - - ACE_NEW (this->dest_addr_, - ACE_INET_Addr (ACE_DEFAULT_SERVER_PORT)); -} - -// destructor. -QoS_Util::~QoS_Util (void) -{ - delete this->mult_session_addr_; - delete this->dest_addr_; -} - -int -QoS_Util::parse_args (void) -{ - ACE_Get_Opt get_opts (this->argc_, this->argv_, "m:n:p:P:c"); - int c = 0; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'm': // multicast session address. - this->multicast_flag_ = 1; - this->mult_session_addr_->set (get_opts.opt_arg ()); - break; - case 'n': // to be used by Senders only to specify the destination. - this->dest_addr_->set (get_opts.opt_arg ()); - break; - case 'p': // protocol. - if (ACE_OS::strcasecmp (get_opts.opt_arg (), "tcp") == 0) - this->protocol_ = IPPROTO_TCP; - else - if (ACE_OS::strcasecmp (get_opts.opt_arg (), "udp") == 0) - this->protocol_ = IPPROTO_UDP; - else - ACE_DEBUG ((LM_DEBUG, - "Unknown protocol specified\n" - "UDP assumed\n")); - break; - case 'P': // sender source port. - this->source_port_ = ACE_OS::atoi (get_opts.opt_arg ()); - break; - case 'h': // display help for different options. - default: - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s" - " [-m host:port] QoS multicast session address" - " Overides the receiver address specified in the -n option" - " [-n host:port] Use for a unicast sender. " - " Follow by receiver addr" - " [-p tcp|udp] specify protocol to be used" - " [-P port] source sender port" - " [-h] <help>" - "\n", - argv_ [0]), - -1); - } - - // If multicast address is specified then ignore the unicast sender - // destination address and force the protocol to be UDP. - if (this->multicast_flag_ == 1) - { - this->dest_addr_ = this->mult_session_addr_; - this->protocol_ = IPPROTO_UDP; - } - - // Indicates successful parsing of command line. - return 0; -} - -ACE_INET_Addr * -QoS_Util::mult_session_addr (void) const -{ - return this->mult_session_addr_; -} - -ACE_INET_Addr * -QoS_Util::dest_addr (void) const -{ - return this->dest_addr_; -} - -u_short -QoS_Util::source_port (void) const -{ - return this->source_port_; -} - -ACE_Protocol_ID -QoS_Util::protocol (void) const -{ - return this->protocol_; -} - -int -QoS_Util::multicast_flag (void) const -{ - return this->multicast_flag_; -} diff --git a/examples/QOS/Change_Sender_TSpec/QoS_Util.h b/examples/QOS/Change_Sender_TSpec/QoS_Util.h deleted file mode 100644 index 6de6e2d24d3..00000000000 --- a/examples/QOS/Change_Sender_TSpec/QoS_Util.h +++ /dev/null @@ -1,75 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ===================================================================== -// -// = LIBRARY -// ACE_wrappers/examples/QOS -// -// = FILENAME -// QoS_Util.h -// -// = AUTHOR -// Vishal Kachroo <vishal@cs.wustl.edu> -// -// ===================================================================== - -#ifndef QOS_UTIL_H -#define QOS_UTIL_H - -#include "ace/INET_Addr.h" -#include "ace/QoS/QoS_Session.h" - -class QoS_Util -{ - // = TITLE - // This class provides the utility functions like parse_args () - // required by a QoS enabled application. - -public: - - // constructor. - 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; - - ACE_INET_Addr *dest_addr (void) const; - - u_short source_port (void) const; - - ACE_Protocol_ID protocol (void) const; - - int multicast_flag (void) const; - -private: - - // Command line arguments. - int argc_; - char **argv_; - - // Multicast session address. - ACE_INET_Addr *mult_session_addr_; - - // Unicast destination address of the receiver. - ACE_INET_Addr *dest_addr_; - - // Source port for the sender. - u_short source_port_; - - // Protocol. - ACE_Protocol_ID protocol_; - - // Multicast Flag. - int multicast_flag_; - -}; - -#endif /* QOS_UTIL_H */ - diff --git a/examples/QOS/Change_Sender_TSpec/README b/examples/QOS/Change_Sender_TSpec/README deleted file mode 100644 index a8423774320..00000000000 --- a/examples/QOS/Change_Sender_TSpec/README +++ /dev/null @@ -1,126 +0,0 @@ -$Id$ - -A Regression test for ACE QoS features. ---------------------------------------- - -This test implements a simple Receiver-Sender program that ensures -Quality of Service (QoS) guarantees on the underlying network before -transmitting data. The program tests the ACE QoS APIs/features. The -test works for Winsock2 APIs on Win2K as well as RAPI on Solaris. - -In addition it dynamically changes the sender TSpec which in turn -changes the PATH messages. - ------------------------------------------------------------------------- -WIN2K : - -Build Requirements : --------------------- -1. Two Win2K machines. -2. June98 Platform SDK or later. -3. Link with ws2_32.lib - -The test consists of a server (which is the receiver) and a client - (which is the sender). - - The receiver is started first (though it is not mandatory) as : - - server -m merengue.cs.wustl.edu:9091 - - -m: specifies the multicast session address that both client and - server subscribe to for QoS events. - - -p: Protocol to be used. Could be udp or tcp. Default is udp. - - -P: Sender source port. If not specified, DEFAULT_SOURCE_SENDER_PORT - (10001) will be used. - - -h: Displays the help on various options. - -The sample Sender is started next as : - - client -m merengue.cs.wustl.edu:9091 -P 10004 - - -m: specifies the multicast session address that both client and - server subscribe to for QoS events. - - -n: Option to be used by senders only to specify the destination - address. This option is overriden if a multicast address is also - specified through the -m option. - - -p: Protocol to be used. Could be udp or tcp. Default is udp. - - -P: Sender source port. If not specified, DEFAULT_SOURCE_SENDER_PORT - (10001) will be used. - - -h: Displays the help on various options. - -On Win2K the user must have administrative access to the machine to -run this program. It seems to be a pre-requisite to opening QoS -sockets. - -The sender and receiver should be run on different Win2K machines. - -The test demonstrates how to GQOS enable an application using the ACE QoS APIs. -It concentrates on the use of various ACE QoS APIs and their correctness. - -------------------------------------------------------------------------------- - -RAPI : - -0. The $ACE_ROOT/include/makeinclude/platform_macros.GNU should be the -following : - -include /project/doc/vishal/ACE_wrappers/include/makeinclude/platform_sunos5_sunc++.GNU -PLATFORM_RAPI_CPPFLAGS += -I/project/doc/vishal/rapi/rel4.2a4/rsvpd/ -PLATFORM_RAPI_LIBS += -lrsvp -PLATFORM_RAPI_LDFLAGS += -L/project/doc/vishal/rapi/rel4.2a4/rsvpd/ - -assuming that RAPI library is installed in /project/doc/vishal/rapi/rel4.2a4/ - -1. Compile ACE with - - make rapi=1 static_libs_only=1 - - Static library option is used because the RAPI library that we have - does not compile as a shared object. - -2. Run the RSVP Daemon on two machines: (merengue.cs and macarena.cs) - - /project/doc/vishal/rapi/rel4.2a4/rsvpd/rsvpd -D - - The current version of the daemon comes with an inbuilt rtap - application to test the various reservation commands and RAPI APIs. - - Typical values for rtap would be : - - sender merengue/5000 [ t 2000000 100000 2000000 512 1024 ] - reserve wf [ cl 4000000 200000 4000000 256 2024 ] - - - - From ACE: - dest udp macarena/5000 - sender ace/5000 [ t 2000000 100000 2000000 512 1024 ] - sender macarena/5022 [ t 2000000 100000 2000000 512 1024 ] - sender beguine/6000 [ t 2000000 100000 2000000 512 1024 ] - - From Macarena: - wait until done with ACE - dest udp macarena/5000 <session name> - reserve wf [ cl 2000000 100000 2000000 512 1024 ] - - - -3. If RTAP runs fine and the daemons show the debug messages about - RESV, PATH and other RSVP messages, run the QoS example, making sure - that rtap session is released on both machines. - -------------------------------------------------------------------------------- - -If you run into any problems with this test please contact Vishal -Kachroo <vishal@cs.wustl.edu>. - -This README last updated on 20th July, 2000. - -------------------------------------------------------------------------------- diff --git a/examples/QOS/Change_Sender_TSpec/Receiver_QoS_Event_Handler.cpp b/examples/QOS/Change_Sender_TSpec/Receiver_QoS_Event_Handler.cpp deleted file mode 100644 index d6ece4d563c..00000000000 --- a/examples/QOS/Change_Sender_TSpec/Receiver_QoS_Event_Handler.cpp +++ /dev/null @@ -1,145 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// ACE_wrappers/examples/QOS -// -// = FILENAME -// Receiver_QoS_Event_Handler.cpp -// -// = AUTHOR -// Vishal Kachroo <vishal@cs.wustl.edu> -// -// ============================================================================ - -#include "Receiver_QoS_Event_Handler.h" -#include "ace/Log_Msg.h" -#include "ace/SString.h" -#include "Fill_ACE_QoS.h" - -// Constructor. -Receiver_QoS_Event_Handler::Receiver_QoS_Event_Handler (void) -{ -} - -Receiver_QoS_Event_Handler::Receiver_QoS_Event_Handler (const ACE_SOCK_Dgram_Mcast_QoS - &dgram_mcast_qos, - ACE_QoS_Session *qos_session) - : dgram_mcast_qos_ (dgram_mcast_qos), - qos_session_ (qos_session) -{ -} - -// Destructor. -Receiver_QoS_Event_Handler::~Receiver_QoS_Event_Handler (void) -{ -} - -// Return the handle of the Dgram_Mcast. This method is called -// internally by the reactor. -ACE_HANDLE -Receiver_QoS_Event_Handler::get_handle (void) const -{ - return this->dgram_mcast_qos_.get_handle (); -} - -// Called when there is a READ activity on the dgram_mcast_qos handle. -int -Receiver_QoS_Event_Handler::handle_input (ACE_HANDLE) -{ - char buf[BUFSIZ]; - - iovec iov; - iov.iov_base = buf; - iov.iov_len = BUFSIZ; - - ACE_OS::memset (iov.iov_base, - 0, - BUFSIZ); - - ACE_DEBUG ((LM_DEBUG, - "Inside handle_input () of Receiver_QoS_Event_Handler ()\n")); - - // Receive message from multicast group. - ssize_t result = - this->dgram_mcast_qos_.recv (&iov, - 1, - this->remote_addr_); - - if (result != -1) - { - ACE_DEBUG ((LM_DEBUG, - "Message Received : %s", - iov.iov_base)); - return 0; - } - else - return -1; -} - -// Called when there is a QoS Event. -int -Receiver_QoS_Event_Handler::handle_qos (ACE_HANDLE fd) -{ - ACE_UNUSED_ARG (fd); - - ACE_DEBUG ((LM_DEBUG, - "\nReceived a QOS event. Inside handle_qos ()\n")); - - // We have received an RSVP event. The following update_qos () call - // calls rapi_dispatch () in case of RAPI and WSAIoctl (GET_QOS) in - // case of W2K. It then does the QoS parameter translation and updates - // the QoS session object with the latest QoS. This call replaces the - // direct call that was being made to WSAIoctl (GET_QOS) here for the - // Win2K example. - - if (this->qos_session_->update_qos () == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Error in updating QoS\n"), - -1); - else - ACE_DEBUG ((LM_DEBUG, - " Updating QOS succeeds.\n")); - - // Now proactively query the QoS object for QoS. - ACE_QoS ace_get_qos = this->qos_session_->qos (); - - ACE_DEBUG ((LM_DEBUG, - "\nReceiving Flowspec :\t\t\tSending Flowspec :\n\n" - "\tToken Rate = %d\t\t\tToken Rate = %d\n" - "\tToken Bucket Size = %d\t\t\tToken Bucket Size = %d\n" - "\tPeak Bandwidth = %d\t\t\tPeak Bandwidth = %d\n" - "\tLatency = %d\t\t\t\tLatency = %d\n" - "\tDelay Variation = %d\t\t\tDelay Variation = %d\n" - "\tService Type = %d\t\t\tService Type = %d\n" - "\tMax SDU Size = %d\t\t\tMax SDU Size = %d\n" - "\tMinimum Policed Size = %d\t\tMinimum Policed Size = %d\n\n", - ace_get_qos.receiving_flowspec ()->token_rate (), - ace_get_qos.sending_flowspec ()->token_rate (), - ace_get_qos.receiving_flowspec ()->token_bucket_size (), - ace_get_qos.sending_flowspec ()->token_bucket_size (), - ace_get_qos.receiving_flowspec ()->peak_bandwidth (), - ace_get_qos.sending_flowspec ()->peak_bandwidth (), - ace_get_qos.receiving_flowspec ()->latency (), - ace_get_qos.sending_flowspec ()->latency (), - ace_get_qos.receiving_flowspec ()->delay_variation (), - ace_get_qos.sending_flowspec ()->delay_variation (), - ace_get_qos.receiving_flowspec ()->service_type (), - ace_get_qos.sending_flowspec ()->service_type (), - ace_get_qos.receiving_flowspec ()->max_sdu_size (), - ace_get_qos.sending_flowspec ()->max_sdu_size (), - ace_get_qos.receiving_flowspec ()->minimum_policed_size (), - ace_get_qos.sending_flowspec ()->minimum_policed_size ())); - - -return 0; - -} - - - - - - diff --git a/examples/QOS/Change_Sender_TSpec/Receiver_QoS_Event_Handler.h b/examples/QOS/Change_Sender_TSpec/Receiver_QoS_Event_Handler.h deleted file mode 100644 index 874d628e3c1..00000000000 --- a/examples/QOS/Change_Sender_TSpec/Receiver_QoS_Event_Handler.h +++ /dev/null @@ -1,61 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// ACE_wrappers/examples/QOS -// -// = FILENAME -// Receiver_QoS_Event_Handler.h -// -// = AUTHOR -// Vishal Kachroo <vishal@cs.wustl.edu> -// -// ============================================================================ - -#ifndef RECEIVER_QOS_EVENT_HANDLER_H -#define RECEIVER_QOS_EVENT_HANDLER_H - -#include "ace/Reactor.h" -#include "ace/INET_Addr.h" -#include "ace/Event_Handler.h" -#include "ace/QoS/QoS_Session.h" -#include "ace/QoS/SOCK_Dgram_Mcast_QoS.h" - -ACE_RCSID(Receiver_QoS_Event_Handler, Receiver_QoS_Event_Handler, "$Id$") - - class Receiver_QoS_Event_Handler : public ACE_Event_Handler - { - public: - // = Initialization and Termination methods. - Receiver_QoS_Event_Handler (void); - // Constructor. - - Receiver_QoS_Event_Handler::Receiver_QoS_Event_Handler (const ACE_SOCK_Dgram_Mcast_QoS &dgram_mcast_qos, - ACE_QoS_Session *qos_session); - // Constructor. - - ~Receiver_QoS_Event_Handler (void); - // Destructor. - - virtual ACE_HANDLE get_handle (void) const; - // Override this to return the handle of the Dgram_Mcast - // that we are using. - - virtual int handle_input (ACE_HANDLE fd); - // Handles a READ event. - - virtual int handle_qos (ACE_HANDLE fd); - // Handles a QoS event. - - private: - ACE_SOCK_Dgram_Mcast_QoS dgram_mcast_qos_; - ACE_QoS_Session *qos_session_; - ACE_INET_Addr remote_addr_; - }; - -#endif /* RECEIVER_QOS_EVENT_HANDLER_H */ - - - diff --git a/examples/QOS/Change_Sender_TSpec/Sender_QoS_Event_Handler.cpp b/examples/QOS/Change_Sender_TSpec/Sender_QoS_Event_Handler.cpp deleted file mode 100644 index d57a1b69812..00000000000 --- a/examples/QOS/Change_Sender_TSpec/Sender_QoS_Event_Handler.cpp +++ /dev/null @@ -1,222 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// ACE_wrappers/examples/QOS -// -// = FILENAME -// Sender_QoS_Event_Handler.cpp -// -// = AUTHOR -// Vishal Kachroo <vishal@cs.wustl.edu> -// -// ============================================================================ - -#include "Sender_QoS_Event_Handler.h" -#include "ace/Log_Msg.h" - -#include "ace/OS.h" -#include "Fill_ACE_QoS.h" - -// Constructor. -Sender_QoS_Event_Handler::Sender_QoS_Event_Handler (void) -{ -} - -// Constructor. -Sender_QoS_Event_Handler::Sender_QoS_Event_Handler (const ACE_SOCK_Dgram_Mcast_QoS - &dgram_mcast_qos, - ACE_QoS_Session *qos_session) - : dgram_mcast_qos_ (dgram_mcast_qos), - qos_session_ (qos_session) -{ -} - -// Destructor. -Sender_QoS_Event_Handler::~Sender_QoS_Event_Handler (void) -{ -} - -// Return the handle of the Dgram_Mcast. This method is called -// internally by the reactor. - -ACE_HANDLE -Sender_QoS_Event_Handler::get_handle (void) const -{ - return this->dgram_mcast_qos_.get_handle (); -} - -// Handle the QoS Event. In this case send data to the receiver -// using WSASendTo() that uses overlapped I/O. - -int -Sender_QoS_Event_Handler::handle_qos (ACE_HANDLE) -{ - ACE_DEBUG ((LM_DEBUG, - "\nReceived a QOS event. Inside handle_qos ()\n")); - - // We have received an RSVP event. The following update_qos () call - // calls rapi_dispatch () in case of RAPI and WSAIoctl (GET_QOS) in - // case of W2K. It then does the QoS parameter translation and updates - // the QoS session object with the latest QoS. This call replaces the - // direct call that was being made to WSAIoctl (GET_QOS) here for the - // Win2K example. - - if (this->qos_session_->update_qos () == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Error in updating QoS\n"), - -1); - else - ACE_DEBUG ((LM_DEBUG, - " Updating QOS succeeds.\n")); - - // Now proactively query the QoS object for QoS. - ACE_QoS ace_get_qos = this->qos_session_->qos (); - - ACE_DEBUG ((LM_DEBUG, - "\nReceiving Flowspec :\t\t\tSending Flowspec :\n\n" - "\tToken Rate = %d\t\t\tToken Rate = %d\n" - "\tToken Bucket Size = %d\t\t\tToken Bucket Size = %d\n" - "\tPeak Bandwidth = %d\t\t\tPeak Bandwidth = %d\n" - "\tLatency = %d\t\t\t\tLatency = %d\n" - "\tDelay Variation = %d\t\t\tDelay Variation = %d\n" - "\tService Type = %d\t\t\tService Type = %d\n" - "\tMax SDU Size = %d\t\t\tMax SDU Size = %d\n" - "\tMinimum Policed Size = %d\t\tMinimum Policed Size = %d\n\n", - ace_get_qos.receiving_flowspec ()->token_rate (), - ace_get_qos.sending_flowspec ()->token_rate (), - ace_get_qos.receiving_flowspec ()->token_bucket_size (), - ace_get_qos.sending_flowspec ()->token_bucket_size (), - ace_get_qos.receiving_flowspec ()->peak_bandwidth (), - ace_get_qos.sending_flowspec ()->peak_bandwidth (), - ace_get_qos.receiving_flowspec ()->latency (), - ace_get_qos.sending_flowspec ()->latency (), - ace_get_qos.receiving_flowspec ()->delay_variation (), - ace_get_qos.sending_flowspec ()->delay_variation (), - ace_get_qos.receiving_flowspec ()->service_type (), - ace_get_qos.sending_flowspec ()->service_type (), - ace_get_qos.receiving_flowspec ()->max_sdu_size (), - ace_get_qos.sending_flowspec ()->max_sdu_size (), - ace_get_qos.receiving_flowspec ()->minimum_policed_size (), - ace_get_qos.sending_flowspec ()->minimum_policed_size ())); - - // This is SPECIFIC TO WIN2K and should be done in the qos_update function. - -// ACE_QoS ace_get_qos; -// u_long dwBytes; - -// if (ACE_OS::ioctl (this->dgram_mcast_qos_.get_handle (), -// ACE_SIO_GET_QOS, -// ace_get_qos, -// &dwBytes) == -1) -// ACE_ERROR ((LM_ERROR, -// "Error in Qos get ACE_OS::ioctl ()\n" -// "Bytes Returned = %d\n", -// dwBytes)); -// else -// ACE_DEBUG ((LM_DEBUG, -// "Getting QOS using ACE_OS::ioctl () succeeds.\n")); - - char* msg = "Hello sent on a QoS enabled session !!\n"; - iovec iov[1]; - iov[0].iov_base = msg; - iov[0].iov_len = ACE_OS_String::strlen(msg); - - size_t bytes_sent = 0; - - // Send "Hello" to the QoS session address to which the receiver has - // subscribed. - if (this->dgram_mcast_qos_.send (iov, - 1, - bytes_sent, - 0, - this->qos_session_->dest_addr (), - 0, - 0) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Error in dgram_mcast.send ()\n"), - -1); - else - ACE_DEBUG ((LM_DEBUG, - "Using ACE_OS::sendto () : Bytes sent : %d", - bytes_sent)); - - // - // create a dynamic flow spec on each callback to test QoS retransmits - // - ACE_CString flow_id ("flow_id"); - - Fill_ACE_QoS flow_spec_list; - ACE_DEBUG ((LM_DEBUG, - "\nA new flow spec! in QoS handler.")); - - static int token_rate = 9400; - ++token_rate; - static int peak_bw = 18500; - ++peak_bw; - switch (flow_spec_list.map ().bind (flow_id, - new ACE_Flow_Spec (token_rate, - 708, - peak_bw, - 0, - 0, - ACE_SERVICETYPE_CONTROLLEDLOAD, - 368, - 368, - 25, - 1))) - { - case 1 : - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to bind the new flow spec\n" - "The Flow Spec name already exists\n"), - -1); - break; - case -1 : - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to bind the new flow spec\n"), - -1); - break; - } - - // - // set up the new qos - // - ACE_QoS another_qos_sender; - if (flow_spec_list.fill_simplex_sender_qos (another_qos_sender, - flow_id) !=0) - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to fill handler-simplex sender qos\n"), - -1); - else - ACE_DEBUG ((LM_DEBUG, - "Successfully built a new flowspec in handle_qos!\n")); - - // - // change the qos for the current session - // - ACE_QoS_Manager qos_manager = this->dgram_mcast_qos_.qos_manager (); - - ACE_DEBUG ((LM_DEBUG, - "QoS Manager was built in handle_qos!\n")); - - // Set the QoS for the session. Replaces the ioctl () call that - // was being made previously. - if (this->qos_session_->qos (&this->dgram_mcast_qos_, - &qos_manager, - another_qos_sender) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to set QoS\n"), - -1); - else - ACE_DEBUG ((LM_DEBUG, - "Setting QOS succeeds.\n")); - - - // ACE_SOCK_Dgram_Mcast_QoS dgram_mcast_qos_; - // ACE_QoS_Session *qos_session_; - - return 0; -} diff --git a/examples/QOS/Change_Sender_TSpec/Sender_QoS_Event_Handler.h b/examples/QOS/Change_Sender_TSpec/Sender_QoS_Event_Handler.h deleted file mode 100644 index b691bbd0615..00000000000 --- a/examples/QOS/Change_Sender_TSpec/Sender_QoS_Event_Handler.h +++ /dev/null @@ -1,61 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// ACE_wrappers/examples/QOS -// -// = FILENAME -// Sender_QoS_Event_Handler.h -// -// = AUTHOR -// Vishal Kachroo <vishal@cs.wustl.edu> -// -// ============================================================================ - -#ifndef SENDER_QOS_EVENT_HANDLER_H -#define SENDER_QOS_EVENT_HANDLER_H - -#include "ace/Event_Handler.h" -#include "ace/Reactor.h" -#include "ace/INET_Addr.h" -#include "ace/QoS/SOCK_Dgram_Mcast_QoS.h" -#include "ace/QoS/QoS_Session.h" - -//#define MY_DEFPORT 5001 -//#define DEFAULT_MULTICASTGROUP "234.5.6.7" - -ACE_RCSID(Sender_QoS_Event_Handler, Sender_QoS_Event_Handler, "$Id$") - -class Sender_QoS_Event_Handler : public ACE_Event_Handler -{ -public: - // = Initialization and Termination methods. - Sender_QoS_Event_Handler (void); - // Constructor. - - Sender_QoS_Event_Handler::Sender_QoS_Event_Handler (const ACE_SOCK_Dgram_Mcast_QoS - &dgram_mcast_qos, - ACE_QoS_Session *qos_session - ); - // Constructor. - - ~Sender_QoS_Event_Handler (void); - // Destructor. - - virtual ACE_HANDLE get_handle (void) const; - // Override this to return the handle of the Dgram_Mcast - // that we are using. - - virtual int handle_qos (ACE_HANDLE fd); - // Handles a QoS event. Right now, just - // prints a message. - -private: - - ACE_SOCK_Dgram_Mcast_QoS dgram_mcast_qos_; - ACE_QoS_Session *qos_session_; -}; - -#endif /* SENDER_QOS_EVENT_HANDLER_H */ diff --git a/examples/QOS/Change_Sender_TSpec/receiver.cpp b/examples/QOS/Change_Sender_TSpec/receiver.cpp deleted file mode 100644 index 7faf927b262..00000000000 --- a/examples/QOS/Change_Sender_TSpec/receiver.cpp +++ /dev/null @@ -1,320 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// ACE_wrappers/examples/QOS -// -// = FILENAME -// server.cpp -// -// = AUTHOR -// Vishal Kachroo <vishal@cs.wustl.edu> -// -// ============================================================================ - -#define QOSEVENT_MAIN - -#include "ace/OS.h" -#include "ace/QoS/QoS_Session.h" -#include "ace/QoS/QoS_Session_Factory.h" -#include "ace/QoS/QoS_Decorator.h" -#include "ace/QoS/SOCK_Dgram_Mcast_QoS.h" - -#include "QoS_Util.h" -#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 -// via WSAGetQosByName. Notice that ProviderSpecific settings are -// being allowed when picking the "default" template but not for -// "well-known" QOS templates. Also notice that since data is only -// flowing from sender to receiver, different flowspecs are filled in -// depending upon whether this application is acting as a sender or -// receiver. - - -// This function fills up the ACE_QoS_Params with the supplied iovec -// and ACE_QoS. - -int -FillQoSParams (ACE_QoS_Params &qos_params, - iovec* iov, - ACE_QoS* qos) -{ - qos_params.callee_data (iov); - qos_params.caller_data (0); - qos_params.socket_qos (qos); - qos_params.group_socket_qos (0); - qos_params.flags (ACE_JL_BOTH); - - return 0; -} - -int -main (int argc, char * argv[]) -{ - - QoS_Util qos_util(argc, argv); - - if (qos_util.parse_args () == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Error in parsing args\n"), - -1); - - // This is a multicast application. - if (qos_util.multicast_flag ()) - { - Fill_ACE_QoS fill_ace_qos; - - // The application adds the flow specs that it wants into the - // Fill_ACE_QoS. The Fill_ACE_QoS indexes the flow specs by the - // flow spec names. Here the new flowspec being added is g_711. - ACE_CString g_711 ("g_711"); - - switch (fill_ace_qos.map ().bind (g_711, - new ACE_Flow_Spec (9200, - 708, - 18400, - 0, - 0, - ACE_SERVICETYPE_CONTROLLEDLOAD, - 368, - 368, - 25, - 1))) - { - case 1 : - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to bind the new flow spec\n" - "The Flow Spec name already exists\n"), - -1); - break; - case -1 : - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to bind the new flow spec\n"), - -1); - break; - } - - ACE_DEBUG ((LM_DEBUG, - "g_711 Flow Spec bound successfully\n")); - - // This is a receiver. So we fill in the receiving QoS parameters. - ACE_QoS ace_qos_receiver; - if (fill_ace_qos.fill_simplex_receiver_qos (ace_qos_receiver, - g_711) !=0) - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to fill simplex receiver qos\n"), - -1); - else - ACE_DEBUG ((LM_DEBUG, - "Filled up the Receiver QoS parameters\n")); - - // 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. - 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. - - ACE_QoS_Params qos_params; - FillQoSParams (qos_params, 0, &ace_qos_receiver); - - // Create a QoS Session Factory. - ACE_QoS_Session_Factory session_factory; - - // Ask the factory to create a QoS session. - ACE_QoS_Session *qos_session = - session_factory.create_session (); - - // Create a destination address for the QoS session. The same - // address should be used for the subscribe call later. A copy - // is made below only to distinguish the two usages of the dest - // address. - - ACE_INET_Addr dest_addr (mult_addr); - - // A QoS session is defined by the 3-tuple [DestAddr, DestPort, - // Protocol]. Initialize the QoS session. - if (qos_session->open (mult_addr, - IPPROTO_UDP) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Error in opening the QoS session\n"), - -1); - else - ACE_DEBUG ((LM_DEBUG, - "QoS session opened successfully\n")); - - // The following call opens the Dgram_Mcast and calls the - // <ACE_OS::join_leaf> with the qos_params supplied here. Note - // the QoS session object is passed into this call. This - // subscribes the underlying socket to the passed in QoS - // session. For joining multiple multicast sessions, the - // following subscribe call should be made with different - // multicast addresses and a new QoS session object should be - // passed in for each such call. The QoS session objects can be - // created only through the session factory. Care should be - // taken that the mult_addr for the subscribe() call matches the - // dest_addr of the QoS session object. If this is not done, the - // 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, - 0, - AF_INET, - // ACE_FROM_PROTOCOL_INFO, - 0, - 0, // ACE_Protocol_Info, - 0, - ACE_OVERLAPPED_SOCKET_FLAG - | ACE_FLAG_MULTIPOINT_C_LEAF - | ACE_FLAG_MULTIPOINT_D_LEAF, - qos_session) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Error in subscribe\n"), - -1); - else - ACE_DEBUG ((LM_DEBUG, - "Dgram_Mcast subscribe succeeds \n")); - - 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. - ACE_SIO_MULTICAST_SCOPE, // IO control code. - &nIP_TTL, // In buffer. - sizeof (nIP_TTL), // Length of in buffer. - achInBuf, // Out buffer. - BUFSIZ, // Length of Out buffer. - &dwBytes, // bytes returned. - 0, // Overlapped. - 0) == -1) // Func. - ACE_ERROR ((LM_ERROR, - "Error in Multicast scope ACE_OS::ioctl() \n")); - else - ACE_DEBUG ((LM_DEBUG, - "Setting TTL with Multicast scope ACE_OS::ioctl call succeeds \n")); - - int bFlag = 0; - - // 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. - ACE_SIO_MULTIPOINT_LOOPBACK, // IO control code. - &bFlag, // In buffer. - sizeof (bFlag), // Length of in buffer. - achInBuf, // Out buffer. - BUFSIZ, // Length of Out buffer. - &dwBytes, // bytes returned. - 0, // Overlapped. - 0) == -1) // Func. - ACE_ERROR ((LM_ERROR, - "Error in Loopback ACE_OS::ioctl() \n")); - else - ACE_DEBUG ((LM_DEBUG, - "Disable Loopback with ACE_OS::ioctl call succeeds \n")); - - // This is a receiver. - qos_session->flags (ACE_QoS_Session::ACE_QOS_RECEIVER); - - ACE_QoS_Manager qos_manager = dgram_mcast_qos.qos_manager (); - - // Set the QoS for the session. Replaces the ioctl () call that - // was being made previously. - if (qos_session->qos (&dgram_mcast_qos, - &qos_manager, - ace_qos_receiver) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to set QoS\n"), - -1); - else - ACE_DEBUG ((LM_DEBUG, - "Setting QOS succeeds.\n")); - - // Register a signal handler that helps to gracefully close the - // open QoS sessions. - QoS_Signal_Handler qos_signal_handler (qos_session); - - // Register the usual SIGINT signal handler with the Reactor for - // the application to gracefully release the QoS session and - // shutdown. - if (ACE_Reactor::instance ()->register_handler - (SIGINT, &qos_signal_handler) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Error in registering the Signal Handler.\n"), - -1); - - // Handler to process QoS and Data events for the reciever. - Receiver_QoS_Event_Handler qos_event_handler (dgram_mcast_qos, - qos_session); - - // Decorate the above handler with QoS functionality. - ACE_QoS_Decorator qos_decorator (&qos_event_handler, - qos_session); - - // Initialize the Decorator. - if (qos_decorator.init () != 0) - ACE_ERROR_RETURN ((LM_ERROR, - "QoS Decorator init () failed.\n"), - -1); - - // Register the decorated Event Handler with the Reactor. - if (ACE_Reactor::instance ()->register_handler (&qos_decorator, - ACE_Event_Handler::QOS_MASK | - ACE_Event_Handler::READ_MASK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Error in registering the Decorator with the Reactor\n"), - -1); - -// // Register the RAPI Event Handler with the Reactor. This -// // handles the QoS events. -// if (ACE_Reactor::instance ()->register_handler -// (&rapi_event_handler, -// ACE_Event_Handler::QOS_MASK | ACE_Event_Handler::READ_MASK) == -1) -// ACE_ERROR_RETURN ((LM_ERROR, -// "Error in registering the RAPI Event Handler\n"), -// -1); - -// // The following event handler handles the data. -// ACE_QoS_Event_Handler data_event_handler (dgram_mcast_qos, -// qos_session); - -// // Register the Data Event Handler with the Reactor. -// if (ACE_Reactor::instance ()->register_handler -// (&data_event_handler,ACE_Event_Handler::READ_MASK) == -1) -// ACE_ERROR_RETURN ((LM_ERROR, -// "Error in registering Data Event Handler\n"), -// -1); - - // Start the event loop. - ACE_DEBUG ((LM_DEBUG, - "Running the Event Loop ... \n")); - - ACE_Reactor::instance ()->run_event_loop (); - - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) shutting down server logging daemon\n")); - } - else - ACE_DEBUG ((LM_DEBUG, - "Specify a -m option for multicast application\n")); - return 0; -} - - - diff --git a/examples/QOS/Change_Sender_TSpec/receiver.dsp b/examples/QOS/Change_Sender_TSpec/receiver.dsp deleted file mode 100644 index ad894bf2c1d..00000000000 --- a/examples/QOS/Change_Sender_TSpec/receiver.dsp +++ /dev/null @@ -1,138 +0,0 @@ -# Microsoft Developer Studio Project File - Name="receiver" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=receiver - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "receiver.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "receiver.mak" CFG="receiver - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "receiver - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "receiver - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "receiver - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 ace.lib ACE_QoS.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\ace" /libpath:"..\..\..\ace\QoS"
-
-!ELSEIF "$(CFG)" == "receiver - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /GX /Od /I "..\..\..\" /D "WIN32" /D "_DEBUG" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 aced.lib ACE_QoSd.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\ace" /libpath:"..\..\..\ace\QoS"
-
-!ENDIF
-
-# Begin Target
-
-# Name "receiver - Win32 Release"
-# Name "receiver - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\Fill_ACE_QoS.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\QoS_Signal_Handler.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\QoS_Util.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Receiver_QoS_Event_Handler.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\receiver.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\Fill_ACE_QoS.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\FlowSpec_Dbase.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\QoS_Signal_Handler.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\QoS_Util.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Receiver_QOS_Event_Handler.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/examples/QOS/Change_Sender_TSpec/sender.cpp b/examples/QOS/Change_Sender_TSpec/sender.cpp deleted file mode 100644 index 9468ca4647d..00000000000 --- a/examples/QOS/Change_Sender_TSpec/sender.cpp +++ /dev/null @@ -1,314 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// ACE_wrappers/examples/QOS -// -// = FILENAME -// client.cpp -// -// = AUTHOR -// Vishal Kachroo <vishal@cs.wustl.edu> -// -// ============================================================================ - - -#include "ace/OS.h" -#include "ace/QoS/QoS_Session.h" -#include "ace/QoS/QoS_Session_Factory.h" -#include "ace/QoS/QoS_Session_Impl.h" -#include "ace/QoS/QoS_Decorator.h" -#include "ace/QoS/SOCK_Dgram_Mcast_QoS.h" - -#include "QoS_Util.h" -#include "Fill_ACE_QoS.h" -#include "QoS_Signal_Handler.h" -#include "Sender_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 -// via WSAGetQosByName. Notice that ProviderSpecific settings are -// being allowed when picking the "default" template but not for -// "well-known" QOS templates. Also notice that since data is only -// flowing from sender to receiver, different flowspecs are filled in -// depending upon whether this application is acting as a sender or -// receiver. - -// This function fills up the ACE_QoS_Params with the supplied iovec and ACE_QoS. - -int -FillQoSParams (ACE_QoS_Params &qos_params, - iovec* iov, - ACE_QoS* qos) -{ - qos_params.callee_data (iov); - qos_params.caller_data (0); - qos_params.socket_qos (qos); - qos_params.group_socket_qos (0); - qos_params.flags (ACE_JL_BOTH); - - return 0; -} - -int -main (int argc, char * argv[]) -{ - - ACE_DEBUG ((LM_DEBUG, - "Sender\n")); - - QoS_Util qos_util(argc, argv); - - if (qos_util.parse_args () == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Error in parsing args\n"), - -1); - - // This is a multicast application. - if (qos_util.multicast_flag ()) - { - Fill_ACE_QoS fill_ace_qos; - - // The application adds the flow specs that it wants into the - // Fill_ACE_QoS. The Fill_ACE_QoS indexes the flow specs by the flow - // spec names. Here the new flowspec being added is g_711. - ACE_CString g_711 ("g_711"); - - switch (fill_ace_qos.map ().bind (g_711, - new ACE_Flow_Spec (9200, - 708, - 18400, - 0, - 0, - ACE_SERVICETYPE_CONTROLLEDLOAD, - 368, - 368, - 25, - 1))) - { - case 1 : - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to bind the new flow spec\n" - "The Flow Spec name already exists\n"), - -1); - break; - case -1 : - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to bind the new flow spec\n"), - -1); - break; - } - - ACE_DEBUG ((LM_DEBUG, - "g_711 Flow Spec bound successfully\n")); - - // This is a sender. So we fill in the sending QoS parameters. - ACE_QoS ace_qos_sender; - - if (fill_ace_qos.fill_simplex_sender_qos (ace_qos_sender, - g_711) !=0) - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to fill simplex sender qos\n"), - -1); - else - ACE_DEBUG ((LM_DEBUG, - "Filled up the Sender QoS parameters\n")); - - // Opening a new Multicast Datagram. It is absolutely necessary that - // the sender and the receiver subscribe to the same multicast - // addresses to make sure the "multicast sessions" for the two are - // the same. This is used to match the RESV<->PATH states. - 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. - 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. - - ACE_QoS_Params qos_params; - FillQoSParams (qos_params, 0, &ace_qos_sender); - - // Create a QoS Session Factory. - ACE_QoS_Session_Factory session_factory; - - // Ask the factory to create a QoS session. - ACE_QoS_Session *qos_session = - session_factory.create_session (); - - // Create a destination address for the QoS session. The same - // address should be used for the subscribe call later. A copy is - // made below only to distinguish the two usages of the dest - // address. - - ACE_INET_Addr dest_addr (mult_addr); - - // A QoS session is defined by the 3-tuple [DestAddr, DestPort, - // Protocol]. Initialize the QoS session. - if (qos_session->open (mult_addr, - IPPROTO_UDP) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Error in opening the QoS session\n"), - -1); - else - ACE_DEBUG ((LM_DEBUG, - "QoS session opened successfully\n")); - - // The following call opens the Dgram_Mcast and calls the - // <ACE_OS::join_leaf> with the qos_params supplied here. Note the - // QoS session object is passed into this call. This subscribes the - // underlying socket to the passed in QoS session. For joining - // multiple multicast sessions, the following subscribe call should - // be made with different multicast addresses and a new QoS session - // object should be passed in for each such call. The QoS session - // objects can be created only through the session factory. Care - // should be taken that the mult_addr for the subscribe() call - // matches the dest_addr of the QoS session object. If this is not - // done, the 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, - 0, - AF_INET, - // ACE_FROM_PROTOCOL_INFO, - 0, - 0, // ACE_Protocol_Info, - 0, - ACE_OVERLAPPED_SOCKET_FLAG - | ACE_FLAG_MULTIPOINT_C_LEAF - | ACE_FLAG_MULTIPOINT_D_LEAF, - qos_session) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Error in subscribe\n"), - -1); - else - ACE_DEBUG ((LM_DEBUG, - "Dgram_Mcast subscribe succeeds \n")); - - 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. - ACE_SIO_MULTICAST_SCOPE, // IO control code. - &nIP_TTL, // In buffer. - sizeof (nIP_TTL), // Length of in buffer. - achInBuf, // Out buffer. - BUFSIZ, // Length of Out buffer. - &dwBytes, // bytes returned. - 0, // Overlapped. - 0) == -1) // Func. - ACE_ERROR ((LM_ERROR, - "Error in Multicast scope ACE_OS::ioctl() \n")); - else - ACE_DEBUG ((LM_DEBUG, - "Setting TTL with Multicast scope ACE_OS::ioctl call succeeds \n")); - - int bFlag = 0; - - // 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. - ACE_SIO_MULTIPOINT_LOOPBACK, // IO control code. - &bFlag, // In buffer. - sizeof (bFlag), // Length of in buffer. - achInBuf, // Out buffer. - BUFSIZ, // Length of Out buffer. - &dwBytes, // bytes returned. - 0, // Overlapped. - 0) == -1) // Func. - ACE_ERROR ((LM_ERROR, - "Error in Loopback ACE_OS::ioctl() \n")); - else - ACE_DEBUG ((LM_DEBUG, - "Disable Loopback with ACE_OS::ioctl call succeeds \n")); - - // This is a sender. - qos_session->flags (ACE_QoS_Session::ACE_QOS_SENDER); - - ACE_QoS_Manager qos_manager = dgram_mcast_qos.qos_manager (); - - // Since we are using RSVP, it is imperative that the client - // application have the option of supplying the source sender - // port for the RSVP messages. A default will be chosen by the - // ACE API if this is not done. - qos_session->source_port (qos_util.source_port ()); - - // Set the QoS for the session. Replaces the ioctl () call that - // was being made previously. - if (qos_session->qos (&dgram_mcast_qos, - &qos_manager, - ace_qos_sender) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to set QoS\n"), - -1); - else - ACE_DEBUG ((LM_DEBUG, - "Setting QOS succeeds.\n")); - - // Register a signal handler that helps to gracefully close the open - // QoS sessions. - QoS_Signal_Handler qos_signal_handler (qos_session); - - // Register the usual SIGINT signal handler with the Reactor for - // the application to gracefully release the QoS session and - // shutdown. - if (ACE_Reactor::instance ()->register_handler - (SIGINT, &qos_signal_handler) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Error in registering the Signal Handler.\n"), - -1); - - // Handler to process QoS and Data events for the reciever. - Sender_QoS_Event_Handler qos_event_handler (dgram_mcast_qos, - qos_session); - - // Decorate the above handler with QoS functionality. - ACE_QoS_Decorator qos_decorator (&qos_event_handler, - qos_session); - - // Initialize the Decorator. - if (qos_decorator.init () != 0) - ACE_ERROR_RETURN ((LM_ERROR, - "QoS Decorator init () failed.\n"), - -1); - - // Register the decorated Event Handler with the Reactor. - if (ACE_Reactor::instance ()->register_handler (&qos_decorator, - ACE_Event_Handler::QOS_MASK | - ACE_Event_Handler::READ_MASK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Error in registering the Decorator with the Reactor\n"), - -1); - - // Start the event loop. - ACE_DEBUG ((LM_DEBUG, - "Running the Event Loop ... \n")); - - ACE_Reactor::instance ()->run_event_loop (); - - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) shutting down server logging daemon\n")); - } - else - ACE_DEBUG ((LM_DEBUG, - "Specify a -m option for multicast application\n")); - return 0; -} - - - - - - - diff --git a/examples/QOS/Change_Sender_TSpec/sender.dsp b/examples/QOS/Change_Sender_TSpec/sender.dsp deleted file mode 100644 index 732d1f2692d..00000000000 --- a/examples/QOS/Change_Sender_TSpec/sender.dsp +++ /dev/null @@ -1,138 +0,0 @@ -# Microsoft Developer Studio Project File - Name="sender" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=sender - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "sender.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "sender.mak" CFG="sender - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "sender - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "sender - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "sender - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 ace.lib ws2_32.lib ACE_QoS.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\ace" /libpath:"..\..\..\ace\QoS"
-
-!ELSEIF "$(CFG)" == "sender - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /GX /Od /I "..\..\..\" /D "WIN32" /D "_DEBUG" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 aced.lib ACE_QoSd.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\ace" /libpath:"..\..\..\ace\QoS"
-
-!ENDIF
-
-# Begin Target
-
-# Name "sender - Win32 Release"
-# Name "sender - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\sender.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Fill_ACE_QoS.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\QoS_Signal_Handler.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\QoS_Util.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Sender_QoS_Event_Handler.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\Fill_ACE_QoS.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\FlowSpec_Dbase.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\QoS_Signal_Handler.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\QoS_Util.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Sender_QOS_Event_Handler.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/examples/QOS/Diffserv/Diffserv.dsw b/examples/QOS/Diffserv/Diffserv.dsw deleted file mode 100644 index 450a10e0f46..00000000000 --- a/examples/QOS/Diffserv/Diffserv.dsw +++ /dev/null @@ -1,41 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "Examples Misc diffserv_test"=.\diffserv_test.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "Examples Misc server"=.\server.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/examples/QOS/Diffserv/Makefile b/examples/QOS/Diffserv/Makefile deleted file mode 100644 index cba0ef6f817..00000000000 --- a/examples/QOS/Diffserv/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -# $Id$ - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = diffserv_test server - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VBIN) - -LSRC=$(addsuffix .cpp,$(BIN)) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. diff --git a/examples/QOS/Diffserv/NOTES.txt b/examples/QOS/Diffserv/NOTES.txt deleted file mode 100644 index 4e73c66af0f..00000000000 --- a/examples/QOS/Diffserv/NOTES.txt +++ /dev/null @@ -1,58 +0,0 @@ -# $Id$ - -Linux notes -=========== - -Under Linux kernel 2.4, the following DSCP values -could not be set with the setsockopt call -unless you run as root: - -EF, CS5, CS6, CS7 - -Also, under Linux 2.4.2 kernel, if I could successfully -set the 2 bits reserved for ECN in the Diffserv Field to -0x00 or 0x02. However, the setsockopt call would -fail if it was set to 0x01 or 0x03. - -According to the Linux Diffserv mailing list: -http://diffserv.sourceforge.net -http://www.geocrawler.com/archives/3/11111/2001/10/0/6761099/ - -=========================================================================== -On Fri, Oct 05, 2001 at 08:18:06AM +0300, Pekka Savola wrote: -> On Tue, 2 Oct 2001, Craig Rodrigues wrote: -> > Can someone shed some light as to why I got this -> > error under Linux? Is it configuration problem, -> > or is there some sort of policy decision in the kernel that -> > requires the process to be run as root when setting -> > those DSCP values? -> -> A part of DSCP field was previously Precedence. -> -> Linux has required that in order to use 'Critical' or higher Precedence, -> one must have CAP_NET_ADMIN capability, in most cases, root. -> -> I'm not one to say whether this restriction should be removed. Perhaps. -> -> -- -> Pekka Savola "Tell me of difficulties surmounted, -> Netcore Oy not those you stumble over and fall" -> Systems. Networks. Security. -- Robert Jordan: A Crown of Swords -> -=========================================================================== - -FreeBSD notes -============= -Under FreeBSD 4.3, I encountered no problems -setting DSCP or ECN values, and I could set all -these values without being root. -However, FreeBSD seems to be more fussy about the size of the parameter -you pass into the setsockopt call. Make sure you get the -size right, and cast it properly, ie. don't cast a short, or some -other size. - - -Solaris notes -============= -No problems setting DSCP or ECN values. - diff --git a/examples/QOS/Diffserv/README b/examples/QOS/Diffserv/README deleted file mode 100644 index 285d514ad12..00000000000 --- a/examples/QOS/Diffserv/README +++ /dev/null @@ -1,107 +0,0 @@ -This directory contains an example which -tests the setting of the Diffserv Codepoint (DSCP) -values in the -IP TOS field of a stream of UDP packets. - -Running the example -=================== - -(1) On one host, run: - server [UDP port number] - - If port number is omitted, a default port number of 20002 - is used. - -(2) On a second host, run: - diffserv_test [destination host] [destination port] - - The host and port of where the server is running should - be specified. - - A stream of UDP packets will be sent from to the server, - with various codepoints set. - -(3) Look at the Diffserv Field (formerly known as the TOS field) - of your packets, using a protocol analyzer, such as Ethereal. - - - - -Introduction -============ -In RFC 2474, the Type of Service (TOS) field in -the IP header was renamed the Diffserv (DS) field. -The DS field is one octet (8 bits). - - 0 1 2 3 4 5 6 7 - +---+---+---+---+---+---+---+---+ - | DSCP | ECN | - +---+---+---+---+---+---+---+---+ - -The first 6 bits of the field are -reserved for the Diffserv Codepoint (DSCP). -There are 64 possible values (0-63) for the DSCP. - -Bits 6 and 7 of the DS field are reserved -for Explicit Congestion Notification (ECN). -ECN is defined in RFC 3168. - - -Per-Hop Behaviors (PHB) -======================= - -A Per-Hop Behavior (PHB) is a description of the externally -observable forwarding treatment applied at a differentiated -services compliant node. - -Certain PHB's are defined in RFC's and associated with -different DSCP values. Other values are undefined and left -for experimentation. Please refer to the RFC's for a full -explanation of the attributes of the various PHB's. - - -DSCP value PHB RFC -(binary) ------------------------------------------------------------ -000000 Default (Best Effort) 2474 -001000 Class Selector (CS1) 2474 -010000 Class Selector (CS2) 2474 -011000 Class Selector (CS3) 2474 -100000 Class Selector (CS4) 2474 -101000 Class Selector (CS5) 2474 -110000 Class Selector (CS6) 2474 -111000 Class Selector (CS7) 2474 -001010 Assured Forwarding (AF11) 2597 -001100 Assured Forwarding (AF12) 2597 -001110 Assured Forwarding (AF13) 2597 -010010 Assured Forwarding (AF21) 2597 -010100 Assured Forwarding (AF22) 2597 -010110 Assured Forwarding (AF23) 2597 -011010 Assured Forwarding (AF31) 2597 -011100 Assured Forwarding (AF32) 2597 -011110 Assured Forwarding (AF33) 2597 -100010 Assured Forwarding (AF41) 2597 -100100 Assured Forwarding (AF42) 2597 -100110 Assured Forwarding (AF43) 2597 -101110 Expedited Forwarding (EF) 2598 - - -References -========== -RFC 2474, "Definition of the Differentiated Services (DS Field) - in the IPv4 and IPv6 Headers", http://www.ietf.org/rfc/rfc2474.txt - -RFC 2475, "An Architecture for Differentiated Services", - http://www.ietf.org/rfc/rfc2475.txt - -RFC 2597, "Assured Forwarding PHB Group", http://www.ietf.org/rfc/rfc2597.txt - -RFC 3246, "An Expedited Forwarding PHB", http://www.ietf.org/rfc/rfc3246.txt - -RFC 3247, "Supplemental Information for the New Definition of the EF PHB", - http://www.ietf.org/rfc/rfc3247.txt - -RFC 3168, "The Addition of Explicit Congestion Notification (ECN) - to IP", http://www.ietf.org/rfc/rfc3168.txt - -Ethereal, http://www.ethereal.com diff --git a/examples/QOS/Diffserv/diffserv_test.cpp b/examples/QOS/Diffserv/diffserv_test.cpp deleted file mode 100644 index ac3acc2ed8f..00000000000 --- a/examples/QOS/Diffserv/diffserv_test.cpp +++ /dev/null @@ -1,133 +0,0 @@ -//============================================================================= -/** - * @file diffserv_test.cpp - * - * $Id$ - * - * @author Craig Rodrigues <crodrigu@bbn.com> - * @brief Send UDP packets to a destination host and port. - * Change the Diffserv field to various values. - */ -//============================================================================= - -#include "ace/Log_Msg.h" -#include "ace/SOCK_CODgram.h" -#include "ace/INET_Addr.h" - -#define IPDSFIELD_DSCP_DEFAULT 0x00 -#define IPDSFIELD_DSCP_CS1 0x08 -#define IPDSFIELD_DSCP_CS2 0x10 -#define IPDSFIELD_DSCP_CS3 0x18 -#define IPDSFIELD_DSCP_CS4 0x20 -#define IPDSFIELD_DSCP_CS5 0x28 -#define IPDSFIELD_DSCP_CS6 0x30 -#define IPDSFIELD_DSCP_CS7 0x38 -#define IPDSFIELD_DSCP_AF11 0x0A -#define IPDSFIELD_DSCP_AF12 0x0C -#define IPDSFIELD_DSCP_AF13 0x0E -#define IPDSFIELD_DSCP_AF21 0x12 -#define IPDSFIELD_DSCP_AF22 0x14 -#define IPDSFIELD_DSCP_AF23 0x16 -#define IPDSFIELD_DSCP_AF31 0x1A -#define IPDSFIELD_DSCP_AF32 0x1C -#define IPDSFIELD_DSCP_AF33 0x1E -#define IPDSFIELD_DSCP_AF41 0x22 -#define IPDSFIELD_DSCP_AF42 0x24 -#define IPDSFIELD_DSCP_AF43 0x26 -#define IPDSFIELD_DSCP_EF 0x2E -#define IPDSFIELD_ECT_MASK 0x02 -#define IPDSFIELD_CE_MASK 0x01 - -int dscp [] = - { - IPDSFIELD_DSCP_DEFAULT , - IPDSFIELD_DSCP_CS1 , - IPDSFIELD_DSCP_CS2 , - IPDSFIELD_DSCP_CS3 , - IPDSFIELD_DSCP_CS4 , - IPDSFIELD_DSCP_CS5 , - IPDSFIELD_DSCP_CS6 , - IPDSFIELD_DSCP_CS7 , - IPDSFIELD_DSCP_AF11 , - IPDSFIELD_DSCP_AF12 , - IPDSFIELD_DSCP_AF13 , - IPDSFIELD_DSCP_AF21 , - IPDSFIELD_DSCP_AF22 , - IPDSFIELD_DSCP_AF23 , - IPDSFIELD_DSCP_AF31 , - IPDSFIELD_DSCP_AF32 , - IPDSFIELD_DSCP_AF33 , - IPDSFIELD_DSCP_AF41 , - IPDSFIELD_DSCP_AF42 , - IPDSFIELD_DSCP_AF43 , - IPDSFIELD_DSCP_EF - }; - -const char *dscp_char[]= - { - "Normal", - "CS1", - "CS2", - "CS3", - "CS4", - "CS5", - "CS6", - "CS7", - "Assured Forwarding 11", - "Assured Forwarding 12", - "Assured Forwarding 13", - "Assured Forwarding 21", - "Assured Forwarding 22", - "Assured Forwarding 23", - "Assured Forwarding 31", - "Assured Forwarding 32", - "Assured Forwarding 33", - "Assured Forwarding 41", - "Assured Forwarding 42", - "Assured Forwarding 43", - "Expedited Forwarding" - }; - -int -main(int argc , char *argv[]) -{ - - if(argc != 3) - { - ACE_DEBUG((LM_DEBUG, "Usage:\n %s [destination host] [destination port]\n\n", argv[0])); - ACE_OS::exit(1); - } - - - char *buf = (char *)ACE_OS::malloc(20 * sizeof(char)); - ACE_OS::strcpy(buf, "Hello"); - - ACE_SOCK_CODgram sock; - ACE_INET_Addr raddr(ACE_OS::atoi(argv[2]), argv[1]); - - sock.open( raddr, ACE_Addr::sap_any, PF_INET, 0, 1); - int opt=0; - int ret =0, ret2=0; - unsigned int i; - for(i=0; i < 21; i++) - { - opt = dscp[i] << 2; - ret = sock.set_option(IPPROTO_IP, IP_TOS, (int *)&opt, (int)sizeof(opt) ); - if(ret == -1){ - ACE_DEBUG((LM_DEBUG, "setsockopt error: %m\n")); - } - - for (int j=0; j<3; j++) - { - ret2 = sock.send(buf, ACE_OS::strlen(buf)); - if(ret2 == -1){ - ACE_DEBUG((LM_DEBUG, "send error: %m\n")); - } - printf("opt: %u dscp: %u, %s, setsockopt returned: %d, send returned: %d\n", opt, opt >> 2, dscp_char[i], ret, ret2); - ACE_OS::sleep(1); - } - } - - ACE_OS::free(buf); - return 0; -} diff --git a/examples/QOS/Diffserv/diffserv_test.dsp b/examples/QOS/Diffserv/diffserv_test.dsp deleted file mode 100644 index bc7dbedbfaf..00000000000 --- a/examples/QOS/Diffserv/diffserv_test.dsp +++ /dev/null @@ -1,115 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Examples Misc diffserv_test" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=Examples Misc diffserv_test - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "diffserv_test.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "diffserv_test.mak" CFG="Examples Misc diffserv_test - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "Examples Misc diffserv_test - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "Examples Misc diffserv_test - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "Examples Misc diffserv_test - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release\diffserv_test"
-# PROP BASE Intermediate_Dir "Release\diffserv_test"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release\diffserv_test"
-# PROP Intermediate_Dir "Release\diffserv_test"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /D "WIN32" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /FD /c
-# ADD CPP /nologo /W3 /GX /D "WIN32" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /FD /c /D "NDEBUG" /O2 /MD /I "../../../"
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 /nologo /subsystem:console /machine:I386 ../../../ace/ACE.lib /out:"diffserv_test.exe"
-
-!ELSEIF "$(CFG)" == "Examples Misc diffserv_test - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir ""
-# PROP BASE Intermediate_Dir "Debug\diffserv_test"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug\diffserv_test"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /D "WIN32" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /FD /c /Gm /Zi
-# ADD CPP /nologo /W3 /GX /D "WIN32" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /FD /c /Gm /Zi /D "_DEBUG" /Od /MDd /I "../../../"
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /debug /pdbtype:sept
-# ADD LINK32 /nologo /subsystem:console /machine:I386 /debug /pdbtype:sept ../../../ace/ACEd.lib /out:"diffserv_test.exe"
-
-!ENDIF
-
-# Begin Target
-
-# Name "Examples Misc diffserv_test - Win32 Release"
-# Name "Examples Misc diffserv_test - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
-# Begin Source File
-
-SOURCE=.\diffserv_test.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;fi;fd"
-# End Group
-# Begin Group "IDL Files"
-
-# PROP Default_Filter "idl;pidl"
-# End Group
-# Begin Group "Inline Files"
-
-# PROP Default_Filter "inl;i"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/examples/QOS/Diffserv/run_test.pl b/examples/QOS/Diffserv/run_test.pl deleted file mode 100755 index aef0765bac8..00000000000 --- a/examples/QOS/Diffserv/run_test.pl +++ /dev/null @@ -1,40 +0,0 @@ -eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; - -# $Id$ -# -*- perl -*- - -use lib "$ENV{ACE_ROOT}/bin"; -use PerlACE::Run_Test; - -$iorfile = PerlACE::LocalFile ("ior"); - -unlink $iorfile; -$status = 0; - -$CL = new PerlACE::Process ("diffserv_test", "localhost 20002"); -$SV = new PerlACE::Process ("server"); - -$server = $SV->Spawn (); -$SV->TimedWait(2); - -$client = $CL->SpawnWaitKill (200); - -if ($client != 0) { - $time = localtime; - print STDERR "ERROR: client returned $client at $time\n"; - $status = 1; -} - -$server = $SV->WaitKill (400); - -if ($server != 0) { - $time = localtime; - print STDERR "ERROR: server returned $server at $time\n"; - $status = 1; -} - -unlink $iorfile; - -exit $status; diff --git a/examples/QOS/Diffserv/server.cpp b/examples/QOS/Diffserv/server.cpp deleted file mode 100644 index 2c082cdc1e7..00000000000 --- a/examples/QOS/Diffserv/server.cpp +++ /dev/null @@ -1,163 +0,0 @@ -//============================================================================= -/** - * @file server.cpp - * - * $Id$ - * - * @author Craig Rodrigues <crodrigu@bbn.com> - * @brief Start a server which listens for UDP packets on a specified port. - */ -//============================================================================= - -#include "ace/Reactor.h" -#include "ace/Process.h" -#include "ace/SOCK_Dgram.h" -#include "ace/INET_Addr.h" -#include "ace/Log_Msg.h" - -// Port used to receive for dgrams. -static u_short port1; - -class Dgram_Endpoint : public ACE_Event_Handler -{ -public: - Dgram_Endpoint (const ACE_INET_Addr &local_addr); - - // = Hook methods inherited from the <ACE_Event_Handler>. - virtual ACE_HANDLE get_handle (void) const; - virtual int handle_input (ACE_HANDLE handle); - virtual int handle_timeout (const ACE_Time_Value & tv, - const void *arg = 0); - virtual int handle_close (ACE_HANDLE handle, - ACE_Reactor_Mask close_mask); - - int send (const char *buf, size_t len, const ACE_INET_Addr &); - // Send the <buf> to the peer. - -private: - ACE_SOCK_Dgram endpoint_; - // Wrapper for sending/receiving dgrams. -}; - -int -Dgram_Endpoint::send (const char *buf, - size_t len, - const ACE_INET_Addr &addr) -{ - return this->endpoint_.send (buf, len, addr); -} - -Dgram_Endpoint::Dgram_Endpoint (const ACE_INET_Addr &local_addr) - : endpoint_ (local_addr) -{ -} - -ACE_HANDLE -Dgram_Endpoint::get_handle (void) const -{ - return this->endpoint_.get_handle (); -} - -int -Dgram_Endpoint::handle_close (ACE_HANDLE handle, - ACE_Reactor_Mask) -{ - ACE_UNUSED_ARG (handle); - - this->endpoint_.close (); - delete this; - return 0; -} - -int -Dgram_Endpoint::handle_input (ACE_HANDLE) -{ - char buf[BUFSIZ]; - ACE_INET_Addr from_addr; - - ssize_t n = this->endpoint_.recv (buf, - sizeof buf, - from_addr); - - if (n == -1) - ACE_ERROR ((LM_ERROR, - "%p\n", - "handle_input")); - else - { - buf[n] = 0; - ACE_DEBUG ((LM_DEBUG, - "Received buf of size %d = %s\n", - n, - buf)); - } - return 0; -} - -int -Dgram_Endpoint::handle_timeout (const ACE_Time_Value &, - const void *) -{ - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) timed out for endpoint\n")); - return 0; -} - -static int -run_test (u_short localport) -{ - ACE_INET_Addr local_addr (localport); - - Dgram_Endpoint *endpoint; - - ACE_NEW_RETURN (endpoint, - Dgram_Endpoint (local_addr), - -1); - - ACE_DEBUG((LM_DEBUG, "Starting server on port %d\n",port1)); - - // Read data from other side. - if (ACE_Reactor::instance ()->register_handler - (endpoint, - ACE_Event_Handler::READ_MASK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "ACE_Reactor::register_handler"), - -1); - - int ret; - while(1){ - ACE_Time_Value tv(10, 0); - ret = ACE_Reactor::instance ()->handle_events (&tv); - /* Error occurred while handling event */ - if (ret < 0) - { - ACE_ERROR_RETURN ((LM_DEBUG, - "(%P|%t) %p\n", - "handle_events"), - -1); - } - /* We have timed out without handling an event, break out of loop */ - if(ret == 0) break; - } - - return 0; -} - -int -main (int argc, char *argv[]) -{ - // Estabish call backs and socket names. - - port1 = argc > 1 ? ACE_OS::atoi (argv[1]) : ACE_DEFAULT_SERVER_PORT; - - if(argc < 3) - { - run_test (port1); - } - else{ - ACE_DEBUG((LM_DEBUG, "\nUsage:\n %s [port number]\n", argv[0])); - return -1; - } - - return 0; -} diff --git a/examples/QOS/Diffserv/server.dsp b/examples/QOS/Diffserv/server.dsp deleted file mode 100644 index a30d868a8e7..00000000000 --- a/examples/QOS/Diffserv/server.dsp +++ /dev/null @@ -1,115 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Examples Misc server" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=Examples Misc server - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "server.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "server.mak" CFG="Examples Misc server - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "Examples Misc server - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "Examples Misc server - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "Examples Misc server - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release\server"
-# PROP BASE Intermediate_Dir "Release\server"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release\server"
-# PROP Intermediate_Dir "Release\server"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /D "WIN32" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /FD /c
-# ADD CPP /nologo /W3 /GX /D "WIN32" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /FD /c /D "NDEBUG" /O2 /MD /I "../../../"
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 /nologo /subsystem:console /machine:I386 ../../../ace/ACE.lib /out:"server.exe"
-
-!ELSEIF "$(CFG)" == "Examples Misc server - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir ""
-# PROP BASE Intermediate_Dir "Debug\server"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug\server"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /D "WIN32" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /FD /c /Gm /Zi
-# ADD CPP /nologo /W3 /GX /D "WIN32" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /FD /c /Gm /Zi /D "_DEBUG" /Od /MDd /I "../../../"
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /debug /pdbtype:sept
-# ADD LINK32 /nologo /subsystem:console /machine:I386 /debug /pdbtype:sept ../../../ace/ACEd.lib /out:"server.exe"
-
-!ENDIF
-
-# Begin Target
-
-# Name "Examples Misc server - Win32 Release"
-# Name "Examples Misc server - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
-# Begin Source File
-
-SOURCE=.\server.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;fi;fd"
-# End Group
-# Begin Group "IDL Files"
-
-# PROP Default_Filter "idl;pidl"
-# End Group
-# Begin Group "Inline Files"
-
-# PROP Default_Filter "inl;i"
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/examples/QOS/Makefile b/examples/QOS/Makefile deleted file mode 100644 index 750aab5f183..00000000000 --- a/examples/QOS/Makefile +++ /dev/null @@ -1,29 +0,0 @@ -#---------------------------------------------------------------------------- -# -# $Id$ -# - -DIRS = Simple \ - Change_Sender_TSpec \ - Change_Receiver_FlowSpec \ - Diffserv - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -#include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nested.GNU -#include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU -#include $(ACE_ROOT)/include/makeinclude/rules.local.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nolocal.GNU - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. diff --git a/examples/QOS/QOS.dsw b/examples/QOS/QOS.dsw deleted file mode 100644 index cb1264568a6..00000000000 --- a/examples/QOS/QOS.dsw +++ /dev/null @@ -1,41 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "Simple_receiver"=".\Simple\receiver.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "Simple_sender"=".\Simple\sender.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/examples/QOS/Simple/Fill_ACE_QoS.cpp b/examples/QOS/Simple/Fill_ACE_QoS.cpp deleted file mode 100644 index fbaed5667e6..00000000000 --- a/examples/QOS/Simple/Fill_ACE_QoS.cpp +++ /dev/null @@ -1,114 +0,0 @@ -// Fill_ACE_QoS.cpp -// $Id$ - -#include "Fill_ACE_QoS.h" - -ACE_RCSID(QOS, Fill_ACE_QoS,"$Id$") - -const iovec Fill_ACE_QoS::iov_ = {0,0}; - -Fill_ACE_QoS::Fill_ACE_QoS (void) -{ - ACE_NEW (this->default_traffic_, - ACE_Flow_Spec (ACE_QOS_NOT_SPECIFIED, - ACE_QOS_NOT_SPECIFIED, - ACE_QOS_NOT_SPECIFIED, - ACE_QOS_NOT_SPECIFIED, - ACE_QOS_NOT_SPECIFIED, - ACE_SERVICETYPE_NOTRAFFIC, - ACE_QOS_NOT_SPECIFIED, - ACE_QOS_NOT_SPECIFIED, - 25, - 1)); -} - -// destructor. -Fill_ACE_QoS::~Fill_ACE_QoS (void) -{} - -int -Fill_ACE_QoS::fill_simplex_receiver_qos (ACE_QoS &ace_qos, - const ACE_CString &recv_flow_name) -{ - ACE_Flow_Spec *recv_flow_spec = 0; - - if (this->map ().find (recv_flow_name, recv_flow_spec) != 0) - ACE_ERROR_RETURN ((LM_DEBUG, - "Unable to find a FlowSpec with name %s", - recv_flow_name.c_str ()), - -1); - ace_qos.receiving_flowspec (recv_flow_spec); - ace_qos.sending_flowspec ((this->default_traffic_)); - ace_qos.provider_specific (Fill_ACE_QoS::iov_); - - return 0; -} - - -int -Fill_ACE_QoS::fill_simplex_sender_qos (ACE_QoS &ace_qos, - const ACE_CString &send_flow_name) -{ - ACE_Flow_Spec *send_flow_spec = 0; - - if (this->map ().find (send_flow_name, send_flow_spec) != 0) - ACE_ERROR_RETURN ((LM_DEBUG, - "Unable to find a FlowSpec with name %s", - send_flow_name.c_str ()), - -1); - - ace_qos.receiving_flowspec ((this->default_traffic_)); - ace_qos.sending_flowspec (send_flow_spec); - ace_qos.provider_specific (Fill_ACE_QoS::iov_); - - return 0; -} - -int -Fill_ACE_QoS::fill_duplex_qos (ACE_QoS &ace_qos, - const ACE_CString &recv_flow_name, - const ACE_CString &send_flow_name) -{ - ACE_Flow_Spec *send_flow_spec = 0; - ACE_Flow_Spec *recv_flow_spec = 0; - - if (this->map ().find (recv_flow_name, recv_flow_spec) != 0) - ACE_ERROR_RETURN ((LM_DEBUG, - "Unable to find a FlowSpec with name %s", - recv_flow_name.c_str ()), - -1); - - if (this->map ().find (send_flow_name, send_flow_spec) != 0) - ACE_ERROR_RETURN ((LM_DEBUG, - "Unable to find a FlowSpec with name %s", - send_flow_name.c_str ()), - -1); - - ace_qos.receiving_flowspec (recv_flow_spec); - ace_qos.sending_flowspec (send_flow_spec); - ace_qos.provider_specific (Fill_ACE_QoS::iov_); - - return 0; -} - -Fill_ACE_QoS::FLOW_SPEC_HASH_MAP& -Fill_ACE_QoS::map (void) -{ - return this->flow_spec_map_; -} - -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -template class ACE_Hash_Map_Manager<ACE_CString,ACE_Flow_Spec *,ACE_Null_Mutex>; -template class ACE_Hash_Map_Manager_Ex<ACE_CString, ACE_Flow_Spec *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex>; -template class ACE_Hash_Map_Iterator_Base_Ex<ACE_CString, ACE_Flow_Spec *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex>; -template class ACE_Hash_Map_Entry<ACE_CString, ACE_Flow_Spec *>; -template class ACE_Hash_Map_Manager_Ex<ACE_CString, ACE_Flow_Spec *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Thread_Mutex>; -template class ACE_Hash_Map_Iterator_Base_Ex<ACE_CString, ACE_Flow_Spec *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Thread_Mutex>; -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Hash_Map_Manager<ACE_CString,ACE_Flow_Spec *,ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Manager_Ex<ACE_CString, ACE_Flow_Spec *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<ACE_CString, ACE_Flow_Spec *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Null_Mutex> -#pragma instantiate ACE_Hash_Map_Entry<ACE_CString, ACE_Flow_Spec *> -#pragma instantiate ACE_Hash_Map_Manager_Ex<ACE_CString, ACE_Flow_Spec *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Thread_Mutex> -#pragma instantiate ACE_Hash_Map_Iterator_Base_Ex<ACE_CString, ACE_Flow_Spec *, ACE_Hash<ACE_CString>, ACE_Equal_To<ACE_CString>, ACE_Thread_Mutex> -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/examples/QOS/Simple/Fill_ACE_QoS.h b/examples/QOS/Simple/Fill_ACE_QoS.h deleted file mode 100644 index 710b8bd7c94..00000000000 --- a/examples/QOS/Simple/Fill_ACE_QoS.h +++ /dev/null @@ -1,76 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// ACE_wrappers/examples/QOS -// -// = FILENAME -// Fill_ACE_QoS.h -// -// = AUTHOR -// Vishal Kachroo <vishal@cs.wustl.edu> -// -// ============================================================================ - -#ifndef FILL_ACE_QOS_H -#define FILL_ACE_QOS_H - -#include "ace/SString.h" -#include "ace/Hash_Map_Manager.h" -#include "ace/Synch.h" -#include "ace/ACE.h" -#include "ace/OS.h" -#include "ace/OS_QoS.h" - -class Fill_ACE_QoS -{ - // TITLE - // This class helps users to add new flow specs and provides - // utility functions for filling up the flow specs for simplex/duplex - // sessions. - -public: - typedef ACE_Hash_Map_Manager <ACE_CString, ACE_Flow_Spec *, ACE_Null_Mutex> FLOW_SPEC_HASH_MAP; - - //Initialization and termination methods. - Fill_ACE_QoS (void); - // constructor. - - ~Fill_ACE_QoS (void); - // destructor. - - int fill_simplex_receiver_qos (ACE_QoS &ace_qos, - const ACE_CString &recv_flow_name); - // To be used by receivers. Fills the receiver qos and sets the - // sender qos to NO_TRAFFIC. - - int fill_simplex_sender_qos (ACE_QoS &ace_qos, - const ACE_CString &send_flow_name); - // To be used by senders. Fills the sender qos and sets the receiver - // qos to NO_TRAFFIC. - - int fill_duplex_qos (ACE_QoS &ace_qos, - const ACE_CString &recv_flow_name, - const ACE_CString &send_flow_name); - // To be used by applications that wish to be both receivers and - // senders. - - FLOW_SPEC_HASH_MAP& map (void); - // Returns the hash map of flowspecs indexed by flowspec name. - -private: - - // The Service Provider is currently set to NULL for all ACE_QoS. - static const iovec iov_; - - // A NO_TRAFFIC flow spec. Senders set the receiving qos to this - // while the receivers set the sending qos to this. - ACE_Flow_Spec *default_traffic_; - - // A list of flowspecs indexed by the flowspec name. - FLOW_SPEC_HASH_MAP flow_spec_map_; -}; - -#endif /* FILL_ACE_QOS_H */ diff --git a/examples/QOS/Simple/FlowSpec_Dbase.h b/examples/QOS/Simple/FlowSpec_Dbase.h deleted file mode 100644 index fc382048c13..00000000000 --- a/examples/QOS/Simple/FlowSpec_Dbase.h +++ /dev/null @@ -1,52 +0,0 @@ -/* -*- C++ -*- */ -//$Id$ - -// ============================================================================ -// -// = LIBRARY -// ACE_wrappers/examples/QOS -// -// = FILENAME -// FlowSpec_Dbase.h -// -// = AUTHOR -// Vishal Kachroo <vishal@cs.wustl.edu> -// -// ============================================================================ - -#ifndef FLOWSPEC_DBASE_H -#define FLOWSPEC_DBASE_H - -// This file contains the different FlowSpecs that the QoS enabled -// application uses. Its a good idea to list them all here so the -// application code is clean. - -ACE_Flow_Spec notraffic (ACE_QOS_NOT_SPECIFIED, - ACE_QOS_NOT_SPECIFIED, - ACE_QOS_NOT_SPECIFIED, - ACE_QOS_NOT_SPECIFIED, - ACE_QOS_NOT_SPECIFIED, - ACE_SERVICETYPE_NOTRAFFIC, - ACE_QOS_NOT_SPECIFIED, - ACE_QOS_NOT_SPECIFIED, - 25, - 1); - -ACE_Flow_Spec g711 (9200, - 708, - 18400, - 0, - 0, - ACE_SERVICETYPE_CONTROLLEDLOAD, - 368, - 368, - 25, - 1); - -// The default session address is macarena.cs.wustl.edu. I am using macarena -// as my receiver for testing. -#define DEFAULT_QOS_SESSION_MACHINE "128.252.165.127" -#define DEFAULT_QOS_SESSION_PORT 8001 - -#endif /* FLOWSPEC_DBASE_H */ - diff --git a/examples/QOS/Simple/Makefile b/examples/QOS/Simple/Makefile deleted file mode 100644 index 7697b9ad5b1..00000000000 --- a/examples/QOS/Simple/Makefile +++ /dev/null @@ -1,359 +0,0 @@ -#---------------------------------------------------------------------------- -# -# $Id$ -# -LDLIBS += -lACE_QoS - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -PSRC = $(addsuffix .cpp,$(BIN)) - -CLT_OBJS = \ - QoS_Signal_Handler.o \ - QoS_Util.o \ - Fill_ACE_QoS.o \ - sender.o \ - Sender_QoS_Event_Handler.o - -SVR_OBJS = \ - QoS_Signal_Handler.o \ - QoS_Util.o \ - Fill_ACE_QoS.o \ - receiver.o \ - Receiver_QoS_Event_Handler.o - -BIN2 = receiver \ - sender - -BIN = $(BIN2) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -receiver: $(addprefix $(VDIR),$(SVR_OBJS)) - $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK) - -sender: $(addprefix $(VDIR),$(CLT_OBJS)) - $(LINK.cc) $(LDFLAGS) -o $@ $^ $(VLDLIBS) $(POSTLINK) -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - - -.obj/receiver.o .obj/receiver.so .shobj/receiver.o .shobj/receiver.so: receiver.cpp \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/pre.h \ - $(ACE_ROOT)/ace/post.h \ - $(ACE_ROOT)/ace/ACE_export.h \ - $(ACE_ROOT)/ace/svc_export.h \ - $(ACE_ROOT)/ace/ace_wchar.h \ - $(ACE_ROOT)/ace/ace_wchar.inl \ - $(ACE_ROOT)/ace/OS_Errno.h \ - $(ACE_ROOT)/ace/OS_Export.h \ - $(ACE_ROOT)/ace/OS_Errno.inl \ - $(ACE_ROOT)/ace/OS_Dirent.h \ - $(ACE_ROOT)/ace/OS_Dirent.inl \ - $(ACE_ROOT)/ace/OS_String.h \ - $(ACE_ROOT)/ace/OS_String.inl \ - $(ACE_ROOT)/ace/OS_Memory.h \ - $(ACE_ROOT)/ace/OS_Memory.inl \ - $(ACE_ROOT)/ace/OS_TLI.h \ - $(ACE_ROOT)/ace/OS_TLI.inl \ - $(ACE_ROOT)/ace/Min_Max.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/QoS/QoS_Session.h \ - $(ACE_ROOT)/ace/QoS/ACE_QoS_Export.h \ - $(ACE_ROOT)/ace/INET_Addr.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/Flag_Manip.h \ - $(ACE_ROOT)/ace/Flag_Manip.i \ - $(ACE_ROOT)/ace/Handle_Ops.h \ - $(ACE_ROOT)/ace/Handle_Ops.i \ - $(ACE_ROOT)/ace/Lib_Find.h \ - $(ACE_ROOT)/ace/Lib_Find.i \ - $(ACE_ROOT)/ace/Init_ACE.h \ - $(ACE_ROOT)/ace/Init_ACE.i \ - $(ACE_ROOT)/ace/Sock_Connect.h \ - $(ACE_ROOT)/ace/Sock_Connect.i \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Addr.h \ - $(ACE_ROOT)/ace/Addr.i \ - $(ACE_ROOT)/ace/INET_Addr.i \ - $(ACE_ROOT)/ace/QoS/QoS_Session_Factory.h \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Node.h \ - $(ACE_ROOT)/ace/Node.cpp \ - $(ACE_ROOT)/ace/Array_Base.h \ - $(ACE_ROOT)/ace/Array_Base.inl \ - $(ACE_ROOT)/ace/Array_Base.cpp \ - $(ACE_ROOT)/ace/Unbounded_Set.h \ - $(ACE_ROOT)/ace/Unbounded_Set.inl \ - $(ACE_ROOT)/ace/Unbounded_Set.cpp \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.h \ - $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.inl \ - $(ACE_ROOT)/ace/Unbounded_Queue.h \ - $(ACE_ROOT)/ace/Unbounded_Queue.inl \ - $(ACE_ROOT)/ace/Unbounded_Queue.cpp \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/QoS/QoS_Decorator.h \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread_Adapter.h \ - $(ACE_ROOT)/ace/Base_Thread_Adapter.h \ - $(ACE_ROOT)/ace/Base_Thread_Adapter.inl \ - $(ACE_ROOT)/ace/Thread_Adapter.inl \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Test_and_Set.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Test_and_Set.i \ - $(ACE_ROOT)/ace/Test_and_Set.cpp \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(ACE_ROOT)/ace/QoS/SOCK_Dgram_Mcast_QoS.h \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.h \ - $(ACE_ROOT)/ace/SOCK.h \ - $(ACE_ROOT)/ace/IPC_SAP.h \ - $(ACE_ROOT)/ace/IPC_SAP.i \ - $(ACE_ROOT)/ace/SOCK.i \ - $(ACE_ROOT)/ace/SOCK_Dgram.i \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast_T.h \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast_T.i \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast_T.cpp \ - $(ACE_ROOT)/ace/QoS/QoS_Manager.h \ - $(ACE_ROOT)/ace/QoS/SOCK_Dgram_Mcast_QoS.i \ - QoS_Util.h Fill_ACE_QoS.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Hash_Map_Manager.h \ - $(ACE_ROOT)/ace/Functor.h \ - $(ACE_ROOT)/ace/Functor.i \ - $(ACE_ROOT)/ace/Functor_T.h \ - $(ACE_ROOT)/ace/Functor_T.i \ - $(ACE_ROOT)/ace/Functor_T.cpp \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \ - $(ACE_ROOT)/ace/Service_Config.h \ - $(ACE_ROOT)/ace/Service_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.i \ - $(ACE_ROOT)/ace/Service_Object.i \ - $(ACE_ROOT)/ace/Service_Config.i \ - $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Malloc_Allocator.h \ - $(ACE_ROOT)/ace/Malloc_Allocator.i \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - QoS_Signal_Handler.h Receiver_QoS_Event_Handler.h - -.obj/sender.o .obj/sender.so .shobj/sender.o .shobj/sender.so: sender.cpp \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/pre.h \ - $(ACE_ROOT)/ace/post.h \ - $(ACE_ROOT)/ace/ACE_export.h \ - $(ACE_ROOT)/ace/svc_export.h \ - $(ACE_ROOT)/ace/ace_wchar.h \ - $(ACE_ROOT)/ace/ace_wchar.inl \ - $(ACE_ROOT)/ace/OS_Errno.h \ - $(ACE_ROOT)/ace/OS_Export.h \ - $(ACE_ROOT)/ace/OS_Errno.inl \ - $(ACE_ROOT)/ace/OS_Dirent.h \ - $(ACE_ROOT)/ace/OS_Dirent.inl \ - $(ACE_ROOT)/ace/OS_String.h \ - $(ACE_ROOT)/ace/OS_String.inl \ - $(ACE_ROOT)/ace/OS_Memory.h \ - $(ACE_ROOT)/ace/OS_Memory.inl \ - $(ACE_ROOT)/ace/OS_TLI.h \ - $(ACE_ROOT)/ace/OS_TLI.inl \ - $(ACE_ROOT)/ace/Min_Max.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/QoS/QoS_Session.h \ - $(ACE_ROOT)/ace/QoS/ACE_QoS_Export.h \ - $(ACE_ROOT)/ace/INET_Addr.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/Flag_Manip.h \ - $(ACE_ROOT)/ace/Flag_Manip.i \ - $(ACE_ROOT)/ace/Handle_Ops.h \ - $(ACE_ROOT)/ace/Handle_Ops.i \ - $(ACE_ROOT)/ace/Lib_Find.h \ - $(ACE_ROOT)/ace/Lib_Find.i \ - $(ACE_ROOT)/ace/Init_ACE.h \ - $(ACE_ROOT)/ace/Init_ACE.i \ - $(ACE_ROOT)/ace/Sock_Connect.h \ - $(ACE_ROOT)/ace/Sock_Connect.i \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Addr.h \ - $(ACE_ROOT)/ace/Addr.i \ - $(ACE_ROOT)/ace/INET_Addr.i \ - $(ACE_ROOT)/ace/QoS/QoS_Session_Factory.h \ - $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Containers.h \ - $(ACE_ROOT)/ace/Malloc_Base.h \ - $(ACE_ROOT)/ace/Containers.i \ - $(ACE_ROOT)/ace/Node.h \ - $(ACE_ROOT)/ace/Node.cpp \ - $(ACE_ROOT)/ace/Array_Base.h \ - $(ACE_ROOT)/ace/Array_Base.inl \ - $(ACE_ROOT)/ace/Array_Base.cpp \ - $(ACE_ROOT)/ace/Unbounded_Set.h \ - $(ACE_ROOT)/ace/Unbounded_Set.inl \ - $(ACE_ROOT)/ace/Unbounded_Set.cpp \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.h \ - $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.inl \ - $(ACE_ROOT)/ace/Unbounded_Queue.h \ - $(ACE_ROOT)/ace/Unbounded_Queue.inl \ - $(ACE_ROOT)/ace/Unbounded_Queue.cpp \ - $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/QoS/QoS_Session_Impl.h \ - \ - \ - \ - $(ACE_ROOT)/ace/QoS/QoS_Session_Impl.i \ - $(ACE_ROOT)/ace/QoS/QoS_Decorator.h \ - $(ACE_ROOT)/ace/Reactor.h \ - $(ACE_ROOT)/ace/Handle_Set.h \ - $(ACE_ROOT)/ace/Handle_Set.i \ - $(ACE_ROOT)/ace/Timer_Queue.h \ - $(ACE_ROOT)/ace/Synch.h \ - $(ACE_ROOT)/ace/Synch.i \ - $(ACE_ROOT)/ace/Synch_T.h \ - $(ACE_ROOT)/ace/Synch_T.i \ - $(ACE_ROOT)/ace/Thread.h \ - $(ACE_ROOT)/ace/Thread_Adapter.h \ - $(ACE_ROOT)/ace/Base_Thread_Adapter.h \ - $(ACE_ROOT)/ace/Base_Thread_Adapter.inl \ - $(ACE_ROOT)/ace/Thread_Adapter.inl \ - $(ACE_ROOT)/ace/Thread.i \ - $(ACE_ROOT)/ace/Atomic_Op.i \ - $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Timer_Queue_T.h \ - $(ACE_ROOT)/ace/Free_List.h \ - $(ACE_ROOT)/ace/Free_List.i \ - $(ACE_ROOT)/ace/Free_List.cpp \ - $(ACE_ROOT)/ace/Test_and_Set.h \ - $(ACE_ROOT)/ace/Event_Handler.h \ - $(ACE_ROOT)/ace/Event_Handler.i \ - $(ACE_ROOT)/ace/Test_and_Set.i \ - $(ACE_ROOT)/ace/Test_and_Set.cpp \ - $(ACE_ROOT)/ace/Timer_Queue_T.i \ - $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ - $(ACE_ROOT)/ace/Signal.h \ - $(ACE_ROOT)/ace/Signal.i \ - $(ACE_ROOT)/ace/Reactor.i \ - $(ACE_ROOT)/ace/Reactor_Impl.h \ - $(ACE_ROOT)/ace/QoS/SOCK_Dgram_Mcast_QoS.h \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.h \ - $(ACE_ROOT)/ace/SOCK_Dgram.h \ - $(ACE_ROOT)/ace/SOCK.h \ - $(ACE_ROOT)/ace/IPC_SAP.h \ - $(ACE_ROOT)/ace/IPC_SAP.i \ - $(ACE_ROOT)/ace/SOCK.i \ - $(ACE_ROOT)/ace/SOCK_Dgram.i \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast_T.h \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast_T.i \ - $(ACE_ROOT)/ace/SOCK_Dgram_Mcast_T.cpp \ - $(ACE_ROOT)/ace/QoS/QoS_Manager.h \ - $(ACE_ROOT)/ace/QoS/SOCK_Dgram_Mcast_QoS.i \ - QoS_Util.h Fill_ACE_QoS.h \ - $(ACE_ROOT)/ace/SString.h \ - $(ACE_ROOT)/ace/SString.i \ - $(ACE_ROOT)/ace/Hash_Map_Manager.h \ - $(ACE_ROOT)/ace/Functor.h \ - $(ACE_ROOT)/ace/Functor.i \ - $(ACE_ROOT)/ace/Functor_T.h \ - $(ACE_ROOT)/ace/Functor_T.i \ - $(ACE_ROOT)/ace/Functor_T.cpp \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \ - $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \ - $(ACE_ROOT)/ace/Service_Config.h \ - $(ACE_ROOT)/ace/Service_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.h \ - $(ACE_ROOT)/ace/Shared_Object.i \ - $(ACE_ROOT)/ace/Service_Object.i \ - $(ACE_ROOT)/ace/Service_Config.i \ - $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ - $(ACE_ROOT)/ace/Malloc.h \ - $(ACE_ROOT)/ace/Malloc.i \ - $(ACE_ROOT)/ace/Malloc_T.h \ - $(ACE_ROOT)/ace/Malloc_Allocator.h \ - $(ACE_ROOT)/ace/Malloc_Allocator.i \ - $(ACE_ROOT)/ace/Malloc_T.i \ - $(ACE_ROOT)/ace/Malloc_T.cpp \ - $(ACE_ROOT)/ace/Memory_Pool.h \ - $(ACE_ROOT)/ace/Mem_Map.h \ - $(ACE_ROOT)/ace/Mem_Map.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ - $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ - $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ - $(ACE_ROOT)/ace/Memory_Pool.i \ - QoS_Signal_Handler.h Sender_QoS_Event_Handler.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/QOS/Simple/QoS_Signal_Handler.cpp b/examples/QOS/Simple/QoS_Signal_Handler.cpp deleted file mode 100644 index a0533bacdbc..00000000000 --- a/examples/QOS/Simple/QoS_Signal_Handler.cpp +++ /dev/null @@ -1,40 +0,0 @@ -// QoS_Signal_Handler.cpp -// $Id$ - -#include "ace/Log_Msg.h" -#include "QoS_Signal_Handler.h" - -ACE_RCSID(QOS, QoS_Signal_Handler,"$Id$") - -// constructor. -QoS_Signal_Handler::QoS_Signal_Handler (ACE_QoS_Session *qos_session) - : qos_session_ (qos_session) -{ -} - -// Releases the QoS sessions gracefully. -int -QoS_Signal_Handler::handle_signal (int signum, siginfo_t *, ucontext_t*) -{ - - ACE_DEBUG ((LM_DEBUG, - "QoS_Signal_Handler::handle_signal\n")); - - if (signum == SIGINT) - { - ACE_DEBUG ((LM_DEBUG, - "QoS_Signal_Handler::handle_signal SIGINT called\n")); - if (this->qos_session_->close () == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to close the QoS session.\n"), - -1); - else - ACE_DEBUG ((LM_DEBUG, - "QoS Session with id %d closed successfully.\n", - this->qos_session_->session_id ())); - } - else - ACE_DEBUG ((LM_DEBUG, - "A signal other than SIGINT received.\nIgnoring.\n")); - return 0; -} diff --git a/examples/QOS/Simple/QoS_Signal_Handler.h b/examples/QOS/Simple/QoS_Signal_Handler.h deleted file mode 100644 index 35b9f3a19e7..00000000000 --- a/examples/QOS/Simple/QoS_Signal_Handler.h +++ /dev/null @@ -1,45 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ===================================================================== -// -// = LIBRARY -// ACE_wrappers/examples/QOS -// -// = FILENAME -// QoS_Signal_Handler.h -// -// = AUTHOR -// Vishal Kachroo <vishal@cs.wustl.edu> -// -// ===================================================================== - -#ifndef QOS_SIGNAL_HANDLER_H -#define QOS_SIGNAL_HANDLER_H - -#include "ace/Event_Handler.h" -#include "ace/QoS/QoS_Session.h" - -class QoS_Signal_Handler : public ACE_Event_Handler -{ - // TITLE - // This class Handles the SIGINT signal through the Reactor. - // Useful to gracefully release QoS sessions. - -public: - - QoS_Signal_Handler (ACE_QoS_Session *qos_session); - // constructor. - - int handle_signal(int signum, siginfo_t*,ucontext_t*); - // Override this method to implement graceful shutdown. - -private: - - ACE_QoS_Session *qos_session_; - // Session to be gracefully shutdown. - -}; - -#endif /* QOS_SIGNAL_HANDLER_H */ - diff --git a/examples/QOS/Simple/QoS_Util.cpp b/examples/QOS/Simple/QoS_Util.cpp deleted file mode 100644 index 9a72bf56df1..00000000000 --- a/examples/QOS/Simple/QoS_Util.cpp +++ /dev/null @@ -1,121 +0,0 @@ -// QoS_Session_Impl.cpp -// $Id$ - -#define SENDER_PORT 10001 - -#include "ace/Log_Msg.h" -#include "ace/Get_Opt.h" -#include "QoS_Util.h" - -ACE_RCSID(QOS, QoS_Util,"$Id$") - -// constructor. -QoS_Util::QoS_Util (int argc, - char *argv[]) - : argc_ (argc), - argv_ (argv), - source_port_ (SENDER_PORT), - protocol_ (IPPROTO_UDP), - multicast_flag_ (0) -{ - ACE_NEW (this->mult_session_addr_, - ACE_INET_Addr (ACE_DEFAULT_MULTICAST_PORT)); - - ACE_NEW (this->dest_addr_, - ACE_INET_Addr (ACE_DEFAULT_SERVER_PORT)); -} - -// destructor. -QoS_Util::~QoS_Util (void) -{ - delete this->mult_session_addr_; - delete this->dest_addr_; -} - -int -QoS_Util::parse_args (void) -{ - ACE_Get_Opt get_opts (this->argc_, this->argv_, "m:n:p:P:c"); - int c = 0; - - while ((c = get_opts ()) != -1) - switch (c) - { - case 'm': // multicast session address. - this->multicast_flag_ = 1; - this->mult_session_addr_->set (get_opts.opt_arg ()); - break; - case 'n': // to be used by Senders only to specify the destination. - this->dest_addr_->set (get_opts.opt_arg ()); - break; - case 'p': // protocol. - if (ACE_OS::strcasecmp (get_opts.opt_arg (), "tcp") == 0) - this->protocol_ = IPPROTO_TCP; - else - if (ACE_OS::strcasecmp (get_opts.opt_arg (), "udp") == 0) - this->protocol_ = IPPROTO_UDP; - else - ACE_DEBUG ((LM_DEBUG, - "Unknown protocol specified\n" - "UDP assumed\n")); - break; - case 'P': // sender source port. - this->source_port_ = ACE_OS::atoi (get_opts.opt_arg ()); - break; - case 'h': // display help for different options. - default: - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s" - " [-m host:port] QoS multicast session address" - " Overides the receiver address specified in the -n option" - " [-n host:port] Use for a unicast sender. " - " Follow by receiver addr" - " [-p tcp|udp] specify protocol to be used" - " [-P port] source sender port" - " [-h] <help>" - "\n", - argv_ [0]), - -1); - } - - // If multicast address is specified then ignore the unicast sender - // destination address and force the protocol to be UDP. - if (this->multicast_flag_ == 1) - { - this->dest_addr_ = this->mult_session_addr_; - this->protocol_ = IPPROTO_UDP; - } - - // Indicates successful parsing of command line. - return 0; -} - -ACE_INET_Addr * -QoS_Util::mult_session_addr (void) const -{ - return this->mult_session_addr_; -} - -ACE_INET_Addr * -QoS_Util::dest_addr (void) const -{ - return this->dest_addr_; -} - -u_short -QoS_Util::source_port (void) const -{ - return this->source_port_; -} - -ACE_Protocol_ID -QoS_Util::protocol (void) const -{ - return this->protocol_; -} - -int -QoS_Util::multicast_flag (void) const -{ - return this->multicast_flag_; -} diff --git a/examples/QOS/Simple/QoS_Util.h b/examples/QOS/Simple/QoS_Util.h deleted file mode 100644 index 6de6e2d24d3..00000000000 --- a/examples/QOS/Simple/QoS_Util.h +++ /dev/null @@ -1,75 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ===================================================================== -// -// = LIBRARY -// ACE_wrappers/examples/QOS -// -// = FILENAME -// QoS_Util.h -// -// = AUTHOR -// Vishal Kachroo <vishal@cs.wustl.edu> -// -// ===================================================================== - -#ifndef QOS_UTIL_H -#define QOS_UTIL_H - -#include "ace/INET_Addr.h" -#include "ace/QoS/QoS_Session.h" - -class QoS_Util -{ - // = TITLE - // This class provides the utility functions like parse_args () - // required by a QoS enabled application. - -public: - - // constructor. - 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; - - ACE_INET_Addr *dest_addr (void) const; - - u_short source_port (void) const; - - ACE_Protocol_ID protocol (void) const; - - int multicast_flag (void) const; - -private: - - // Command line arguments. - int argc_; - char **argv_; - - // Multicast session address. - ACE_INET_Addr *mult_session_addr_; - - // Unicast destination address of the receiver. - ACE_INET_Addr *dest_addr_; - - // Source port for the sender. - u_short source_port_; - - // Protocol. - ACE_Protocol_ID protocol_; - - // Multicast Flag. - int multicast_flag_; - -}; - -#endif /* QOS_UTIL_H */ - diff --git a/examples/QOS/Simple/README b/examples/QOS/Simple/README deleted file mode 100644 index 13255842932..00000000000 --- a/examples/QOS/Simple/README +++ /dev/null @@ -1,142 +0,0 @@ -//$Id$ - -A Regression test for ACE QoS features. ---------------------------------------- - -This test implements a simple Receiver-Sender program that ensures -Quality of Service (QoS) guarantees on the underlying network before -transmitting data. The program tests the ACE QoS APIs/features. The -test works for Winsock2 APIs on Win2K as well as RAPI on Solaris. - - ------------------------------------------------------------------------- -WIN2K : - -Build Requirements : --------------------- -1. Two Win2K machines. -2. June98 Platform SDK or later. -3. Link with ws2_32.lib - -The test consists of a receiver and a sender. - - The sender is started first (though it is not mandatory) as : - - sender -m merengue.cs.wustl.edu:9091 -P 10004 - - -m: specifies the multicast session address that both client and - server subscribe to for QoS events. - - -p: Protocol to be used. Could be udp or tcp. Default is udp. - - -P: Sender source port. If not specified, DEFAULT_SOURCE_SENDER_PORT - (10001) will be used. - - -h: Displays the help on various options. - -The sample Sender is started next as : - - receiver -m merengue.cs.wustl.edu:9091 - - -m: specifies the multicast session address that both client and - server subscribe to for QoS events. - - -n: Option to be used by senders only to specify the destination - address. This option is overriden if a multicast address is also - specified through the -m option. - - -p: Protocol to be used. Could be udp or tcp. Default is udp. - - -P: Sender source port. If not specified, DEFAULT_SOURCE_SENDER_PORT - (10001) will be used. - - -h: Displays the help on various options. - -On Win2K the user must have administrative access to the machine to -run this program. It seems to be a pre-requisite to opening QoS -sockets. - -The sender and receiver should be run on different Win2K machines. - -The test demonstrates how to GQOS enable an application using the ACE QoS APIs. -It concentrates on the use of various ACE QoS APIs and their correctness. - -------------------------------------------------------------------------------- - -RAPI : - -0. The $ACE_ROOT/include/makeinclude/platform_macros.GNU should include the -following : - -include /project/doc/vishal/ACE_wrappers/include/makeinclude/<appropriate platform macros file eg.platform_sunos5_sunc++.GNU> -PLATFORM_RAPI_CPPFLAGS += -I/project/doc/vishal/rapi/rel4.2a4/rsvpd/ -PLATFORM_RAPI_LIBS += -lrsvp -PLATFORM_RAPI_LDFLAGS += -L/project/doc/vishal/rapi/rel4.2a4/rsvpd/ - -assuming that RAPI library is installed in /project/doc/vishal/rapi/rel4.2a4/ - -1. Compile ACE with - - make rapi=1 - -2. Run the RSVP Daemon on two machines: (merengue.cs and macarena.cs) - - /project/doc/vishal/rapi/rel4.2a4/rsvpd/rsvpd -D - - The current version of the daemon comes with an inbuilt rtap - application to test the various reservation commands and RAPI APIs. - - Typical values for rtap would be : - - dest udp macarena/5000 - sender merengue/5000 [ t 2000000 100000 2000000 512 1024 ] - - dest udp macarena/5000 - reserve wf [ cl 2000000 100000 2000000 512 1024 ] - -3. If RTAP runs fine and the daemons show the debug messages about - RESV, PATH and other RSVP messages, run the QoS example, making sure - that rtap session is released on both machines. - -The test consists of a receiver and a sender. - - The sender is started first (though it is not mandatory) as : - - sender -m macarena.cs.wustl.edu:9091 -P 10004 - - -m: specifies the multicast session address that both client and - server subscribe to for QoS events. - - -p: Protocol to be used. Could be udp or tcp. Default is udp. - - -P: Sender source port. If not specified, DEFAULT_SOURCE_SENDER_PORT - (10001) will be used. - - -h: Displays the help on various options. - -The sample Sender is started next as : - - receiver -m macarena.cs.wustl.edu:9091 - - -m: specifies the multicast session address that both client and - server subscribe to for QoS events. - - -n: Option to be used by senders only to specify the destination - address. This option is overriden if a multicast address is also - specified through the -m option. - - -p: Protocol to be used. Could be udp or tcp. Default is udp. - - -P: Sender source port. If not specified, DEFAULT_SOURCE_SENDER_PORT - (10001) will be used. - - -h: Displays the help on various options. - -------------------------------------------------------------------------------- - -If you run into any problems with this test please contact Vishal -Kachroo <vishal@cs.wustl.edu>. - -This README last updated on 20th July, 2000. - -------------------------------------------------------------------------------- diff --git a/examples/QOS/Simple/Receiver_QoS_Event_Handler.cpp b/examples/QOS/Simple/Receiver_QoS_Event_Handler.cpp deleted file mode 100644 index 96c1cb004f5..00000000000 --- a/examples/QOS/Simple/Receiver_QoS_Event_Handler.cpp +++ /dev/null @@ -1,136 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// ACE_wrappers/examples/QOS -// -// = FILENAME -// Receiver_QoS_Event_Handler.cpp -// -// = AUTHOR -// Vishal Kachroo <vishal@cs.wustl.edu> -// -// ============================================================================ - -#include "Receiver_QoS_Event_Handler.h" -#include "ace/Log_Msg.h" - -// Constructor. -Receiver_QoS_Event_Handler::Receiver_QoS_Event_Handler (void) -{ -} - -Receiver_QoS_Event_Handler::Receiver_QoS_Event_Handler (const ACE_SOCK_Dgram_Mcast_QoS - &dgram_mcast_qos, - ACE_QoS_Session *qos_session) - : dgram_mcast_qos_ (dgram_mcast_qos), - qos_session_ (qos_session) -{ -} - -// Destructor. -Receiver_QoS_Event_Handler::~Receiver_QoS_Event_Handler (void) -{ -} - -// Return the handle of the Dgram_Mcast. This method is called -// internally by the reactor. -ACE_HANDLE -Receiver_QoS_Event_Handler::get_handle (void) const -{ - return this->dgram_mcast_qos_.get_handle (); -} - -// Called when there is a READ activity on the dgram_mcast_qos handle. -int -Receiver_QoS_Event_Handler::handle_input (ACE_HANDLE) -{ - char buf[BUFSIZ]; - - iovec iov; - iov.iov_base = buf; - iov.iov_len = BUFSIZ; - - ACE_OS::memset (iov.iov_base, - 0, - BUFSIZ); - - ACE_DEBUG ((LM_DEBUG, - "Inside handle_input () of Receiver_QoS_Event_Handler ()\n")); - - // Receive message from multicast group. - ssize_t result = - this->dgram_mcast_qos_.recv (&iov, - 1, - this->remote_addr_); - - if (result != -1) - { - ACE_DEBUG ((LM_DEBUG, - "Message Received : %s", - iov.iov_base)); - return 0; - } - else - return -1; -} - -// Called when there is a QoS Event. -int -Receiver_QoS_Event_Handler::handle_qos (ACE_HANDLE fd) -{ - ACE_UNUSED_ARG (fd); - - ACE_DEBUG ((LM_DEBUG, - "\nReceived a QOS event. Inside handle_qos ()\n")); - - // We have received an RSVP event. The following update_qos () call - // calls rapi_dispatch () in case of RAPI and WSAIoctl (GET_QOS) in - // case of W2K. It then does the QoS parameter translation and updates - // the QoS session object with the latest QoS. This call replaces the - // direct call that was being made to WSAIoctl (GET_QOS) here for the - // Win2K example. - - if (this->qos_session_->update_qos () == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Error in updating QoS\n"), - -1); - else - ACE_DEBUG ((LM_DEBUG, - " Updating QOS succeeds.\n")); - - // Now proactively query the QoS object for QoS. - ACE_QoS ace_get_qos = this->qos_session_->qos (); - - ACE_DEBUG ((LM_DEBUG, - "\nReceiving Flowspec :\t\t\tSending Flowspec :\n\n" - "\tToken Rate = %d\t\t\tToken Rate = %d\n" - "\tToken Bucket Size = %d\t\t\tToken Bucket Size = %d\n" - "\tPeak Bandwidth = %d\t\t\tPeak Bandwidth = %d\n" - "\tLatency = %d\t\t\t\tLatency = %d\n" - "\tDelay Variation = %d\t\t\tDelay Variation = %d\n" - "\tService Type = %d\t\t\tService Type = %d\n" - "\tMax SDU Size = %d\t\t\tMax SDU Size = %d\n" - "\tMinimum Policed Size = %d\t\tMinimum Policed Size = %d\n\n", - ace_get_qos.receiving_flowspec ()->token_rate (), - ace_get_qos.sending_flowspec ()->token_rate (), - ace_get_qos.receiving_flowspec ()->token_bucket_size (), - ace_get_qos.sending_flowspec ()->token_bucket_size (), - ace_get_qos.receiving_flowspec ()->peak_bandwidth (), - ace_get_qos.sending_flowspec ()->peak_bandwidth (), - ace_get_qos.receiving_flowspec ()->latency (), - ace_get_qos.sending_flowspec ()->latency (), - ace_get_qos.receiving_flowspec ()->delay_variation (), - ace_get_qos.sending_flowspec ()->delay_variation (), - ace_get_qos.receiving_flowspec ()->service_type (), - ace_get_qos.sending_flowspec ()->service_type (), - ace_get_qos.receiving_flowspec ()->max_sdu_size (), - ace_get_qos.sending_flowspec ()->max_sdu_size (), - ace_get_qos.receiving_flowspec ()->minimum_policed_size (), - ace_get_qos.sending_flowspec ()->minimum_policed_size ())); - - return 0; - -} diff --git a/examples/QOS/Simple/Receiver_QoS_Event_Handler.h b/examples/QOS/Simple/Receiver_QoS_Event_Handler.h deleted file mode 100644 index 874d628e3c1..00000000000 --- a/examples/QOS/Simple/Receiver_QoS_Event_Handler.h +++ /dev/null @@ -1,61 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// ACE_wrappers/examples/QOS -// -// = FILENAME -// Receiver_QoS_Event_Handler.h -// -// = AUTHOR -// Vishal Kachroo <vishal@cs.wustl.edu> -// -// ============================================================================ - -#ifndef RECEIVER_QOS_EVENT_HANDLER_H -#define RECEIVER_QOS_EVENT_HANDLER_H - -#include "ace/Reactor.h" -#include "ace/INET_Addr.h" -#include "ace/Event_Handler.h" -#include "ace/QoS/QoS_Session.h" -#include "ace/QoS/SOCK_Dgram_Mcast_QoS.h" - -ACE_RCSID(Receiver_QoS_Event_Handler, Receiver_QoS_Event_Handler, "$Id$") - - class Receiver_QoS_Event_Handler : public ACE_Event_Handler - { - public: - // = Initialization and Termination methods. - Receiver_QoS_Event_Handler (void); - // Constructor. - - Receiver_QoS_Event_Handler::Receiver_QoS_Event_Handler (const ACE_SOCK_Dgram_Mcast_QoS &dgram_mcast_qos, - ACE_QoS_Session *qos_session); - // Constructor. - - ~Receiver_QoS_Event_Handler (void); - // Destructor. - - virtual ACE_HANDLE get_handle (void) const; - // Override this to return the handle of the Dgram_Mcast - // that we are using. - - virtual int handle_input (ACE_HANDLE fd); - // Handles a READ event. - - virtual int handle_qos (ACE_HANDLE fd); - // Handles a QoS event. - - private: - ACE_SOCK_Dgram_Mcast_QoS dgram_mcast_qos_; - ACE_QoS_Session *qos_session_; - ACE_INET_Addr remote_addr_; - }; - -#endif /* RECEIVER_QOS_EVENT_HANDLER_H */ - - - diff --git a/examples/QOS/Simple/Sender_QoS_Event_Handler.cpp b/examples/QOS/Simple/Sender_QoS_Event_Handler.cpp deleted file mode 100644 index 4d7891f191c..00000000000 --- a/examples/QOS/Simple/Sender_QoS_Event_Handler.cpp +++ /dev/null @@ -1,143 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// ACE_wrappers/examples/QOS -// -// = FILENAME -// Sender_QoS_Event_Handler.cpp -// -// = AUTHOR -// Vishal Kachroo <vishal@cs.wustl.edu> -// -// ============================================================================ - -#include "Sender_QoS_Event_Handler.h" -#include "ace/Log_Msg.h" - -// Constructor. -Sender_QoS_Event_Handler::Sender_QoS_Event_Handler (void) -{ -} - -// Constructor. -Sender_QoS_Event_Handler::Sender_QoS_Event_Handler (const ACE_SOCK_Dgram_Mcast_QoS - &dgram_mcast_qos, - ACE_QoS_Session *qos_session) - : dgram_mcast_qos_ (dgram_mcast_qos), - qos_session_ (qos_session) -{ -} - -// Destructor. -Sender_QoS_Event_Handler::~Sender_QoS_Event_Handler (void) -{ -} - -// Return the handle of the Dgram_Mcast. This method is called -// internally by the reactor. - -ACE_HANDLE -Sender_QoS_Event_Handler::get_handle (void) const -{ - return this->dgram_mcast_qos_.get_handle (); -} - -// Handle the QoS Event. In this case send data to the receiver -// using WSASendTo() that uses overlapped I/O. - -int -Sender_QoS_Event_Handler::handle_qos (ACE_HANDLE) -{ - ACE_DEBUG ((LM_DEBUG, - "\nReceived a QOS event. Inside handle_qos ()\n")); - - // We have received an RSVP event. The following update_qos () call - // calls rapi_dispatch () in case of RAPI and WSAIoctl (GET_QOS) in - // case of W2K. It then does the QoS parameter translation and updates - // the QoS session object with the latest QoS. This call replaces the - // direct call that was being made to WSAIoctl (GET_QOS) here for the - // Win2K example. - - if (this->qos_session_->update_qos () == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Error in updating QoS\n"), - -1); - else - ACE_DEBUG ((LM_DEBUG, - " Updating QOS succeeds.\n")); - - // Now proactively query the QoS object for QoS. - ACE_QoS ace_get_qos = this->qos_session_->qos (); - - ACE_DEBUG ((LM_DEBUG, - "\nReceiving Flowspec :\t\t\tSending Flowspec :\n\n" - "\tToken Rate = %d\t\t\tToken Rate = %d\n" - "\tToken Bucket Size = %d\t\t\tToken Bucket Size = %d\n" - "\tPeak Bandwidth = %d\t\t\tPeak Bandwidth = %d\n" - "\tLatency = %d\t\t\t\tLatency = %d\n" - "\tDelay Variation = %d\t\t\tDelay Variation = %d\n" - "\tService Type = %d\t\t\tService Type = %d\n" - "\tMax SDU Size = %d\t\t\tMax SDU Size = %d\n" - "\tMinimum Policed Size = %d\t\tMinimum Policed Size = %d\n\n", - ace_get_qos.receiving_flowspec ()->token_rate (), - ace_get_qos.sending_flowspec ()->token_rate (), - ace_get_qos.receiving_flowspec ()->token_bucket_size (), - ace_get_qos.sending_flowspec ()->token_bucket_size (), - ace_get_qos.receiving_flowspec ()->peak_bandwidth (), - ace_get_qos.sending_flowspec ()->peak_bandwidth (), - ace_get_qos.receiving_flowspec ()->latency (), - ace_get_qos.sending_flowspec ()->latency (), - ace_get_qos.receiving_flowspec ()->delay_variation (), - ace_get_qos.sending_flowspec ()->delay_variation (), - ace_get_qos.receiving_flowspec ()->service_type (), - ace_get_qos.sending_flowspec ()->service_type (), - ace_get_qos.receiving_flowspec ()->max_sdu_size (), - ace_get_qos.sending_flowspec ()->max_sdu_size (), - ace_get_qos.receiving_flowspec ()->minimum_policed_size (), - ace_get_qos.sending_flowspec ()->minimum_policed_size ())); - - // This is SPECIFIC TO WIN2K and should be done in the qos_update function. - -// ACE_QoS ace_get_qos; -// u_long dwBytes; - -// if (ACE_OS::ioctl (this->dgram_mcast_qos_.get_handle (), -// ACE_SIO_GET_QOS, -// ace_get_qos, -// &dwBytes) == -1) -// ACE_ERROR ((LM_ERROR, -// "Error in Qos get ACE_OS::ioctl ()\n" -// "Bytes Returned = %d\n", -// dwBytes)); -// else -// ACE_DEBUG ((LM_DEBUG, -// "Getting QOS using ACE_OS::ioctl () succeeds.\n")); - - char* msg = "Hello sent on a QoS enabled session !!\n"; - iovec iov[1]; - iov[0].iov_base = msg; - iov[0].iov_len = ACE_OS_String::strlen(msg); - - size_t bytes_sent = 0; - - // Send "Hello" to the QoS session address to which the receiver has - // subscribed. - if (this->dgram_mcast_qos_.send (iov, - 1, - bytes_sent, - 0, - this->qos_session_->dest_addr (), - 0, - 0) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Error in dgram_mcast.send ()\n"), - -1); - else - ACE_DEBUG ((LM_DEBUG, - "Using ACE_OS::sendto () : Bytes sent : %d", - bytes_sent)); - return 0; -} diff --git a/examples/QOS/Simple/Sender_QoS_Event_Handler.h b/examples/QOS/Simple/Sender_QoS_Event_Handler.h deleted file mode 100644 index b691bbd0615..00000000000 --- a/examples/QOS/Simple/Sender_QoS_Event_Handler.h +++ /dev/null @@ -1,61 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// ACE_wrappers/examples/QOS -// -// = FILENAME -// Sender_QoS_Event_Handler.h -// -// = AUTHOR -// Vishal Kachroo <vishal@cs.wustl.edu> -// -// ============================================================================ - -#ifndef SENDER_QOS_EVENT_HANDLER_H -#define SENDER_QOS_EVENT_HANDLER_H - -#include "ace/Event_Handler.h" -#include "ace/Reactor.h" -#include "ace/INET_Addr.h" -#include "ace/QoS/SOCK_Dgram_Mcast_QoS.h" -#include "ace/QoS/QoS_Session.h" - -//#define MY_DEFPORT 5001 -//#define DEFAULT_MULTICASTGROUP "234.5.6.7" - -ACE_RCSID(Sender_QoS_Event_Handler, Sender_QoS_Event_Handler, "$Id$") - -class Sender_QoS_Event_Handler : public ACE_Event_Handler -{ -public: - // = Initialization and Termination methods. - Sender_QoS_Event_Handler (void); - // Constructor. - - Sender_QoS_Event_Handler::Sender_QoS_Event_Handler (const ACE_SOCK_Dgram_Mcast_QoS - &dgram_mcast_qos, - ACE_QoS_Session *qos_session - ); - // Constructor. - - ~Sender_QoS_Event_Handler (void); - // Destructor. - - virtual ACE_HANDLE get_handle (void) const; - // Override this to return the handle of the Dgram_Mcast - // that we are using. - - virtual int handle_qos (ACE_HANDLE fd); - // Handles a QoS event. Right now, just - // prints a message. - -private: - - ACE_SOCK_Dgram_Mcast_QoS dgram_mcast_qos_; - ACE_QoS_Session *qos_session_; -}; - -#endif /* SENDER_QOS_EVENT_HANDLER_H */ diff --git a/examples/QOS/Simple/receiver.cpp b/examples/QOS/Simple/receiver.cpp deleted file mode 100644 index 30d0f2827d5..00000000000 --- a/examples/QOS/Simple/receiver.cpp +++ /dev/null @@ -1,302 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// ACE_wrappers/examples/QOS -// -// = FILENAME -// server.cpp -// -// = AUTHOR -// Vishal Kachroo <vishal@cs.wustl.edu> -// -// ============================================================================ - -#define QOSEVENT_MAIN - -#include "ace/OS.h" -#include "ace/QoS/QoS_Session.h" -#include "ace/QoS/QoS_Session_Factory.h" -#include "ace/QoS/QoS_Decorator.h" -#include "ace/QoS/SOCK_Dgram_Mcast_QoS.h" - -#include "QoS_Util.h" -#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 -// via WSAGetQosByName. Notice that ProviderSpecific settings are -// being allowed when picking the "default" template but not for -// "well-known" QOS templates. Also notice that since data is only -// flowing from sender to receiver, different flowspecs are filled in -// depending upon whether this application is acting as a sender or -// receiver. - - -// This function fills up the ACE_QoS_Params with the supplied iovec -// and ACE_QoS. - -int -FillQoSParams (ACE_QoS_Params &qos_params, - iovec* iov, - ACE_QoS* qos) -{ - qos_params.callee_data (iov); - qos_params.caller_data (0); - qos_params.socket_qos (qos); - qos_params.group_socket_qos (0); - qos_params.flags (ACE_JL_BOTH); - - return 0; -} - -int -main (int argc, char * argv[]) -{ - - QoS_Util qos_util(argc, argv); - - if (qos_util.parse_args () == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Error in parsing args\n"), - -1); - - // This is a multicast application. - if (qos_util.multicast_flag ()) - { - Fill_ACE_QoS fill_ace_qos; - - // The application adds the flow specs that it wants into the - // Fill_ACE_QoS. The Fill_ACE_QoS indexes the flow specs by the - // flow spec names. Here the new flowspec being added is g_711. - ACE_CString g_711 ("g_711"); - - switch (fill_ace_qos.map ().bind (g_711, - new ACE_Flow_Spec (9200, - 708, - 18400, - 0, - 0, - ACE_SERVICETYPE_CONTROLLEDLOAD, - 368, - 368, - 25, - 1))) - { - case 1 : - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to bind the new flow spec\n" - "The Flow Spec name already exists\n"), - -1); - break; - case -1 : - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to bind the new flow spec\n"), - -1); - break; - } - - ACE_DEBUG ((LM_DEBUG, - "g_711 Flow Spec bound successfully\n")); - - // This is a receiver. So we fill in the receiving QoS parameters. - ACE_QoS ace_qos_receiver; - if (fill_ace_qos.fill_simplex_receiver_qos (ace_qos_receiver, - g_711) !=0) - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to fill simplex receiver qos\n"), - -1); - else - ACE_DEBUG ((LM_DEBUG, - "Filled up the Receiver QoS parameters\n")); - - // 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. - 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. - - ACE_QoS_Params qos_params; - FillQoSParams (qos_params, 0, &ace_qos_receiver); - - // Create a QoS Session Factory. - ACE_QoS_Session_Factory session_factory; - - // Ask the factory to create a QoS session. This could be RAPI or - // GQoS based on the parameter passed. - ACE_QoS_Session *qos_session = - session_factory.create_session (); - - // Create a destination address for the QoS session. The same - // address should be used for the subscribe call later. A copy - // is made below only to distinguish the two usages of the dest - // address. - - ACE_INET_Addr dest_addr (mult_addr); - - // A QoS session is defined by the 3-tuple [DestAddr, DestPort, - // Protocol]. Initialize the QoS session. - if (qos_session->open (mult_addr, - IPPROTO_UDP) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Error in opening the QoS session\n"), - -1); - else - ACE_DEBUG ((LM_DEBUG, - "QoS session opened successfully\n")); - - // The following call opens the Dgram_Mcast and calls the - // <ACE_OS::join_leaf> with the qos_params supplied here. Note - // the QoS session object is passed into this call. This - // subscribes the underlying socket to the passed in QoS - // session. For joining multiple multicast sessions, the - // following subscribe call should be made with different - // multicast addresses and a new QoS session object should be - // passed in for each such call. The QoS session objects can be - // created only through the session factory. Care should be - // taken that the mult_addr for the subscribe() call matches the - // dest_addr of the QoS session object. If this is not done, the - // 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, - 0, - AF_INET, - // ACE_FROM_PROTOCOL_INFO, - 0, - 0, // ACE_Protocol_Info, - 0, - ACE_OVERLAPPED_SOCKET_FLAG - | ACE_FLAG_MULTIPOINT_C_LEAF - | ACE_FLAG_MULTIPOINT_D_LEAF, - qos_session) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Error in subscribe\n"), - -1); - else - ACE_DEBUG ((LM_DEBUG, - "Dgram_Mcast subscribe succeeds \n")); - - 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. - ACE_SIO_MULTICAST_SCOPE, // IO control code. - &nIP_TTL, // In buffer. - sizeof (nIP_TTL), // Length of in buffer. - achInBuf, // Out buffer. - BUFSIZ, // Length of Out buffer. - &dwBytes, // bytes returned. - 0, // Overlapped. - 0) == -1) // Func. - ACE_ERROR ((LM_ERROR, - "Error in Multicast scope ACE_OS::ioctl() \n")); - else - ACE_DEBUG ((LM_DEBUG, - "Setting TTL with Multicast scope ACE_OS::ioctl call succeeds \n")); - - int bFlag = 0; - - // 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. - ACE_SIO_MULTIPOINT_LOOPBACK, // IO control code. - &bFlag, // In buffer. - sizeof (bFlag), // Length of in buffer. - achInBuf, // Out buffer. - BUFSIZ, // Length of Out buffer. - &dwBytes, // bytes returned. - 0, // Overlapped. - 0) == -1) // Func. - ACE_ERROR ((LM_ERROR, - "Error in Loopback ACE_OS::ioctl() \n")); - else - ACE_DEBUG ((LM_DEBUG, - "Disable Loopback with ACE_OS::ioctl call succeeds \n")); - - // This is a receiver. - qos_session->flags (ACE_QoS_Session::ACE_QOS_RECEIVER); - - ACE_QoS_Manager qos_manager = dgram_mcast_qos.qos_manager (); - - // Set the QoS for the session. Replaces the ioctl () call that - // was being made previously. - if (qos_session->qos (&dgram_mcast_qos, - &qos_manager, - ace_qos_receiver) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to set QoS\n"), - -1); - else - ACE_DEBUG ((LM_DEBUG, - "Setting QOS succeeds.\n")); - - // Register a signal handler that helps to gracefully close the - // open QoS sessions. - QoS_Signal_Handler qos_signal_handler (qos_session); - - // Register the usual SIGINT signal handler with the Reactor for - // the application to gracefully release the QoS session and - // shutdown. - if (ACE_Reactor::instance ()->register_handler - (SIGINT, &qos_signal_handler) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Error in registering the Signal Handler.\n"), - -1); - - // Handler to process QoS and Data events for the reciever. - Receiver_QoS_Event_Handler qos_event_handler (dgram_mcast_qos, - qos_session); - - // Decorate the above handler with QoS functionality. - ACE_QoS_Decorator qos_decorator (&qos_event_handler, - qos_session); - - // Initialize the Decorator. - if (qos_decorator.init () != 0) - ACE_ERROR_RETURN ((LM_ERROR, - "QoS Decorator init () failed.\n"), - -1); - - // Register the decorated Event Handler with the Reactor. - if (ACE_Reactor::instance ()->register_handler (&qos_decorator, - ACE_Event_Handler::QOS_MASK | - ACE_Event_Handler::READ_MASK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Error in registering the Decorator with the Reactor\n"), - -1); - - - // Start the event loop. - ACE_DEBUG ((LM_DEBUG, - "Running the Event Loop ... \n")); - - ACE_Reactor::instance ()->run_event_loop (); - - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) shutting down server logging daemon\n")); - } - else - ACE_DEBUG ((LM_DEBUG, - "Specify a -m option for multicast application\n")); - return 0; -} - - - diff --git a/examples/QOS/Simple/receiver.dsp b/examples/QOS/Simple/receiver.dsp deleted file mode 100644 index b56cd1ddb35..00000000000 --- a/examples/QOS/Simple/receiver.dsp +++ /dev/null @@ -1,140 +0,0 @@ -# Microsoft Developer Studio Project File - Name="receiver" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=receiver - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "receiver.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "receiver.mak" CFG="receiver - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "receiver - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "receiver - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "receiver - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\\" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 ace.lib ACE_QoS.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\ace" /libpath:"..\..\..\ace\QoS"
-
-!ELSEIF "$(CFG)" == "receiver - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /GX /Od /I "..\..\..\\" /D "WIN32" /D "_DEBUG" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 aced.lib ACE_QoSd.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\ace" /libpath:"..\..\..\ace\QoS"
-
-!ENDIF
-
-# Begin Target
-
-# Name "receiver - Win32 Release"
-# Name "receiver - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\Fill_ACE_QoS.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\QoS_Signal_Handler.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\QoS_Util.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\receiver.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Receiver_QoS_Event_Handler.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\Fill_ACE_QoS.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\FlowSpec_Dbase.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\QoS_Signal_Handler.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\QoS_Util.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Receiver_QOS_Event_Handler.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/examples/QOS/Simple/sender.cpp b/examples/QOS/Simple/sender.cpp deleted file mode 100644 index baab9d72224..00000000000 --- a/examples/QOS/Simple/sender.cpp +++ /dev/null @@ -1,316 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// ACE_wrappers/examples/QOS -// -// = FILENAME -// client.cpp -// -// = AUTHOR -// Vishal Kachroo <vishal@cs.wustl.edu> -// -// ============================================================================ - - -#include "ace/OS.h" -#include "ace/QoS/QoS_Session.h" -#include "ace/QoS/QoS_Session_Factory.h" -#include "ace/QoS/QoS_Session_Impl.h" -#include "ace/QoS/QoS_Decorator.h" -#include "ace/QoS/SOCK_Dgram_Mcast_QoS.h" - -#include "QoS_Util.h" -#include "Fill_ACE_QoS.h" -#include "QoS_Signal_Handler.h" -#include "Sender_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 -// via WSAGetQosByName. Notice that ProviderSpecific settings are -// being allowed when picking the "default" template but not for -// "well-known" QOS templates. Also notice that since data is only -// flowing from sender to receiver, different flowspecs are filled in -// depending upon whether this application is acting as a sender or -// receiver. - -// This function fills up the ACE_QoS_Params with the supplied iovec and ACE_QoS. - -int -FillQoSParams (ACE_QoS_Params &qos_params, - iovec* iov, - ACE_QoS* qos) -{ - qos_params.callee_data (iov); - qos_params.caller_data (0); - qos_params.socket_qos (qos); - qos_params.group_socket_qos (0); - qos_params.flags (ACE_JL_BOTH); - - return 0; -} - -int -main (int argc, char * argv[]) -{ - - ACE_DEBUG ((LM_DEBUG, - "Sender\n")); - - QoS_Util qos_util(argc, argv); - - if (qos_util.parse_args () == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Error in parsing args\n"), - -1); - - // This is a multicast application. - if (qos_util.multicast_flag ()) - { - Fill_ACE_QoS fill_ace_qos; - - // The application adds the flow specs that it wants into the - // Fill_ACE_QoS. The Fill_ACE_QoS indexes the flow specs by the flow - // spec names. Here the new flowspec being added is g_711. - ACE_CString g_711 ("g_711"); - - switch (fill_ace_qos.map ().bind (g_711, - new ACE_Flow_Spec (9200, - 708, - 18400, - 0, - 0, - ACE_SERVICETYPE_CONTROLLEDLOAD, - 368, - 368, - 25, - 1))) - { - case 1 : - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to bind the new flow spec\n" - "The Flow Spec name already exists\n"), - -1); - break; - case -1 : - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to bind the new flow spec\n"), - -1); - break; - } - - ACE_DEBUG ((LM_DEBUG, - "g_711 Flow Spec bound successfully\n")); - - // This is a sender. So we fill in the sending QoS parameters. - ACE_QoS ace_qos_sender; - - if (fill_ace_qos.fill_simplex_sender_qos (ace_qos_sender, - g_711) !=0) - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to fill simplex sender qos\n"), - -1); - else - ACE_DEBUG ((LM_DEBUG, - "Filled up the Sender QoS parameters\n")); - - // Opening a new Multicast Datagram. It is absolutely necessary that - // the sender and the receiver subscribe to the same multicast - // addresses to make sure the "multicast sessions" for the two are - // the same. This is used to match the RESV<->PATH states. - 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. - 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. - - ACE_QoS_Params qos_params; - FillQoSParams (qos_params, 0, &ace_qos_sender); - - // Create a QoS Session Factory. - ACE_QoS_Session_Factory session_factory; - - // Ask the factory to create a QoS session. - ACE_QoS_Session *qos_session = - session_factory.create_session (); - - // Create a destination address for the QoS session. The same - // address should be used for the subscribe call later. A copy is - // made below only to distinguish the two usages of the dest - // address. - - ACE_INET_Addr dest_addr (mult_addr); - - // A QoS session is defined by the 3-tuple [DestAddr, DestPort, - // Protocol]. Initialize the QoS session. - if (qos_session->open (mult_addr, - IPPROTO_UDP) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Error in opening the QoS session\n"), - -1); - else - ACE_DEBUG ((LM_DEBUG, - "QoS session opened successfully\n")); - - // The following call opens the Dgram_Mcast and calls the - // <ACE_OS::join_leaf> with the qos_params supplied here. Note the - // QoS session object is passed into this call. This subscribes the - // underlying socket to the passed in QoS session. For joining - // multiple multicast sessions, the following subscribe call should - // be made with different multicast addresses and a new QoS session - // object should be passed in for each such call. The QoS session - // objects can be created only through the session factory. Care - // should be taken that the mult_addr for the subscribe() call - // matches the dest_addr of the QoS session object. If this is not - // done, the 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, - 0, - AF_INET, - // ACE_FROM_PROTOCOL_INFO, - 0, - 0, // ACE_Protocol_Info, - 0, - ACE_OVERLAPPED_SOCKET_FLAG - | ACE_FLAG_MULTIPOINT_C_LEAF - | ACE_FLAG_MULTIPOINT_D_LEAF, - qos_session) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Error in subscribe\n"), - -1); - else - ACE_DEBUG ((LM_DEBUG, - "Dgram_Mcast subscribe succeeds \n")); - - 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. - ACE_SIO_MULTICAST_SCOPE, // IO control code. - &nIP_TTL, // In buffer. - sizeof (nIP_TTL), // Length of in buffer. - achInBuf, // Out buffer. - BUFSIZ, // Length of Out buffer. - &dwBytes, // bytes returned. - 0, // Overlapped. - 0) == -1) // Func. - ACE_ERROR ((LM_ERROR, - "Error in Multicast scope ACE_OS::ioctl() \n")); - else - ACE_DEBUG ((LM_DEBUG, - "Setting TTL with Multicast scope ACE_OS::ioctl call succeeds \n")); - - int bFlag = 0; - - // 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. - ACE_SIO_MULTIPOINT_LOOPBACK, // IO control code. - &bFlag, // In buffer. - sizeof (bFlag), // Length of in buffer. - achInBuf, // Out buffer. - BUFSIZ, // Length of Out buffer. - &dwBytes, // bytes returned. - 0, // Overlapped. - 0) == -1) // Func. - ACE_ERROR ((LM_ERROR, - "Error in Loopback ACE_OS::ioctl() \n")); - else - ACE_DEBUG ((LM_DEBUG, - "Disable Loopback with ACE_OS::ioctl call succeeds \n")); - - // This is a sender. - qos_session->flags (ACE_QoS_Session::ACE_QOS_SENDER); - - ACE_QoS_Manager qos_manager = dgram_mcast_qos.qos_manager (); - - // Since we are using RSVP, it is imperative that the client - // application have the option of supplying the source sender - // port for the RSVP messages. A default will be chosen by the - // ACE API if this is not done. - qos_session->source_port (qos_util.source_port ()); - - // Set the QoS for the session. Replaces the ioctl () call that - // was being made previously. - if (qos_session->qos (&dgram_mcast_qos, - &qos_manager, - ace_qos_sender) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Unable to set QoS\n"), - -1); - else - ACE_DEBUG ((LM_DEBUG, - "Setting QOS succeeds.\n")); - - // Register a signal handler that helps to gracefully close the open - // QoS sessions. - QoS_Signal_Handler qos_signal_handler (qos_session); - - // Register the usual SIGINT signal handler with the Reactor for - // the application to gracefully release the QoS session and - // shutdown. - if (ACE_Reactor::instance ()->register_handler - (SIGINT, &qos_signal_handler) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Error in registering the Signal Handler.\n"), - -1); - - // Handler to process QoS and Data events for the reciever. - Sender_QoS_Event_Handler qos_event_handler (dgram_mcast_qos, - qos_session); - - // Decorate the above handler with QoS functionality. - ACE_QoS_Decorator qos_decorator (&qos_event_handler, - qos_session); - - // Initialize the Decorator. - if (qos_decorator.init () != 0) - ACE_ERROR_RETURN ((LM_ERROR, - "QoS Decorator init () failed.\n"), - -1); - - // Register the decorated Event Handler with the Reactor. - if (ACE_Reactor::instance ()->register_handler (&qos_decorator, - ACE_Event_Handler::QOS_MASK | - ACE_Event_Handler::READ_MASK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Error in registering the Decorator with the Reactor\n"), - -1); - - - - // Start the event loop. - ACE_DEBUG ((LM_DEBUG, - "Running the Event Loop ... \n")); - - ACE_Reactor::instance ()->run_event_loop (); - - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) shutting down server logging daemon\n")); - } - else - ACE_DEBUG ((LM_DEBUG, - "Specify a -m option for multicast application\n")); - return 0; -} - - - - - - - diff --git a/examples/QOS/Simple/sender.dsp b/examples/QOS/Simple/sender.dsp deleted file mode 100644 index 7e70596e51a..00000000000 --- a/examples/QOS/Simple/sender.dsp +++ /dev/null @@ -1,140 +0,0 @@ -# Microsoft Developer Studio Project File - Name="sender" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=sender - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "sender.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "sender.mak" CFG="sender - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "sender - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "sender - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "sender - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\\" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 ace.lib ws2_32.lib ACE_QoS.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\ace" /libpath:"..\..\..\ace\QoS"
-
-!ELSEIF "$(CFG)" == "sender - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /GX /Od /I "..\..\..\\" /D "WIN32" /D "_DEBUG" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 aced.lib ACE_QoSd.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\ace" /libpath:"..\..\..\ace\QoS"
-
-!ENDIF
-
-# Begin Target
-
-# Name "sender - Win32 Release"
-# Name "sender - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\Fill_ACE_QoS.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\QoS_Signal_Handler.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\QoS_Util.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\sender.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=.\Sender_QoS_Event_Handler.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\Fill_ACE_QoS.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\FlowSpec_Dbase.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\QoS_Signal_Handler.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\QoS_Util.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\Sender_QOS_Event_Handler.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
|