diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-08-10 01:35:38 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-08-10 01:35:38 +0000 |
commit | d17b1c9f1f38a6723a2f2105a29fb0267780f6df (patch) | |
tree | 07a14c4b9e0aaa80db64fdb1b0b4bb099c3666bb /ace/RMCast | |
parent | 08b69395778460c45103748cafe19819657dfa4b (diff) | |
download | ATCD-d17b1c9f1f38a6723a2f2105a29fb0267780f6df.tar.gz |
ChangeLogTag:Wed Aug 9 18:16:26 2000 Carlos O'Ryan <coryan@uci.edu>
Diffstat (limited to 'ace/RMCast')
36 files changed, 2447 insertions, 316 deletions
diff --git a/ace/RMCast/Makefile b/ace/RMCast/Makefile index 8ffb9265813..748b21fe602 100644 --- a/ace/RMCast/Makefile +++ b/ace/RMCast/Makefile @@ -9,11 +9,20 @@ LIB = libACE_RMCast.a SHLIB = libACE_RMCast.$(SOEXT) FILES= \ - RMCast_Partial_Message \ - RMCast_Header_Size -TEMPLATE_FILES = \ + RMCast \ + RMCast_Module \ RMCast_Fragment \ - RMCast_Reassembly + RMCast_Reassembly \ + RMCast_Partial_Message \ + \ + RMCast_Sender_Proxy \ + RMCast_Sender_Proxy_Best_Effort \ + RMCast_Sender_Proxy_Factory \ + \ + RMCast_UDP_Receiver \ + RMCast_UDP_Event_Handler \ + \ + RMCast_UDP_Sender #---------------------------------------------------------------------------- # Include macros and targets @@ -38,4 +47,944 @@ include $(ACE_ROOT)/include/makeinclude/rules.local.GNU #---------------------------------------------------------------------------- # DO NOT DELETE THIS LINE -- g++dep uses it. # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. + + +.obj/RMCast.o .obj/RMCast.so .shobj/RMCast.o .shobj/RMCast.so: RMCast.cpp RMCast.h \ + $(ACE_ROOT)/ace/pre.h \ + $(ACE_ROOT)/ace/OS.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/OS_Dirent.h \ + $(ACE_ROOT)/ace/OS_Export.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 \ + RMCast_Export.h RMCast.i + +.obj/RMCast_Module.o .obj/RMCast_Module.so .shobj/RMCast_Module.o .shobj/RMCast_Module.so: RMCast_Module.cpp RMCast_Module.h \ + $(ACE_ROOT)/ace/pre.h \ + RMCast.h $(ACE_ROOT)/ace/OS.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/OS_Dirent.h \ + $(ACE_ROOT)/ace/OS_Export.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 \ + RMCast_Export.h RMCast.i RMCast_Module.i + +.obj/RMCast_Fragment.o .obj/RMCast_Fragment.so .shobj/RMCast_Fragment.o .shobj/RMCast_Fragment.so: RMCast_Fragment.cpp RMCast_Fragment.h \ + $(ACE_ROOT)/ace/pre.h \ + RMCast_Module.h RMCast.h \ + $(ACE_ROOT)/ace/OS.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/OS_Dirent.h \ + $(ACE_ROOT)/ace/OS_Export.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 \ + RMCast_Export.h RMCast.i RMCast_Module.i \ + $(ACE_ROOT)/ace/Synch.h \ + $(ACE_ROOT)/ace/ACE.h \ + $(ACE_ROOT)/ace/ACE.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/Synch.i \ + $(ACE_ROOT)/ace/Synch_T.h \ + $(ACE_ROOT)/ace/Event_Handler.h \ + $(ACE_ROOT)/ace/Event_Handler.i \ + $(ACE_ROOT)/ace/Synch_T.i \ + $(ACE_ROOT)/ace/Thread.h \ + $(ACE_ROOT)/ace/Thread.i \ + $(ACE_ROOT)/ace/Atomic_Op.i \ + $(ACE_ROOT)/ace/Synch_T.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 \ + RMCast_Fragment.i \ + $(ACE_ROOT)/ace/Message_Block.h \ + $(ACE_ROOT)/ace/Malloc.h \ + $(ACE_ROOT)/ace/Malloc_Base.h \ + $(ACE_ROOT)/ace/Based_Pointer_T.h \ + $(ACE_ROOT)/ace/Based_Pointer_T.i \ + $(ACE_ROOT)/ace/Based_Pointer_T.cpp \ + $(ACE_ROOT)/ace/Based_Pointer_Repository.h \ + $(ACE_ROOT)/ace/Singleton.h \ + $(ACE_ROOT)/ace/Singleton.i \ + $(ACE_ROOT)/ace/Singleton.cpp \ + $(ACE_ROOT)/ace/Object_Manager.h \ + $(ACE_ROOT)/ace/Object_Manager.i \ + $(ACE_ROOT)/ace/Managed_Object.h \ + $(ACE_ROOT)/ace/Managed_Object.i \ + $(ACE_ROOT)/ace/Managed_Object.cpp \ + $(ACE_ROOT)/ace/Malloc.i \ + $(ACE_ROOT)/ace/Malloc_T.h \ + $(ACE_ROOT)/ace/Free_List.h \ + $(ACE_ROOT)/ace/Free_List.i \ + $(ACE_ROOT)/ace/Free_List.cpp \ + $(ACE_ROOT)/ace/Malloc_T.i \ + $(ACE_ROOT)/ace/Malloc_T.cpp \ + $(ACE_ROOT)/ace/Memory_Pool.h \ + $(ACE_ROOT)/ace/Signal.h \ + $(ACE_ROOT)/ace/Containers.h \ + $(ACE_ROOT)/ace/Containers.i \ + $(ACE_ROOT)/ace/Containers_T.h \ + $(ACE_ROOT)/ace/Containers_T.i \ + $(ACE_ROOT)/ace/Containers_T.cpp \ + $(ACE_ROOT)/ace/Signal.i \ + $(ACE_ROOT)/ace/Mem_Map.h \ + $(ACE_ROOT)/ace/Mem_Map.i \ + $(ACE_ROOT)/ace/Memory_Pool.i \ + $(ACE_ROOT)/ace/Message_Block.i \ + $(ACE_ROOT)/ace/Message_Block_T.h \ + $(ACE_ROOT)/ace/Message_Block_T.i \ + $(ACE_ROOT)/ace/Message_Block_T.cpp + +.obj/RMCast_Reassembly.o .obj/RMCast_Reassembly.so .shobj/RMCast_Reassembly.o .shobj/RMCast_Reassembly.so: RMCast_Reassembly.cpp RMCast_Reassembly.h \ + $(ACE_ROOT)/ace/pre.h \ + RMCast_Module.h RMCast.h \ + $(ACE_ROOT)/ace/OS.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/OS_Dirent.h \ + $(ACE_ROOT)/ace/OS_Export.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 \ + RMCast_Export.h RMCast.i RMCast_Module.i \ + $(ACE_ROOT)/ace/Hash_Map_Manager.h \ + $(ACE_ROOT)/ace/Functor.h \ + $(ACE_ROOT)/ace/ACE.h \ + $(ACE_ROOT)/ace/ACE.i \ + $(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/Log_Msg.h \ + $(ACE_ROOT)/ace/Log_Record.h \ + $(ACE_ROOT)/ace/Log_Priority.h \ + $(ACE_ROOT)/ace/Log_Record.i \ + $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \ + $(ACE_ROOT)/ace/Synch.h \ + $(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/Synch.i \ + $(ACE_ROOT)/ace/Synch_T.h \ + $(ACE_ROOT)/ace/Event_Handler.h \ + $(ACE_ROOT)/ace/Event_Handler.i \ + $(ACE_ROOT)/ace/Synch_T.i \ + $(ACE_ROOT)/ace/Thread.h \ + $(ACE_ROOT)/ace/Thread.i \ + $(ACE_ROOT)/ace/Atomic_Op.i \ + $(ACE_ROOT)/ace/Synch_T.cpp \ + $(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/Signal.h \ + $(ACE_ROOT)/ace/Containers.h \ + $(ACE_ROOT)/ace/Malloc_Base.h \ + $(ACE_ROOT)/ace/Containers.i \ + $(ACE_ROOT)/ace/Containers_T.h \ + $(ACE_ROOT)/ace/Containers_T.i \ + $(ACE_ROOT)/ace/Containers_T.cpp \ + $(ACE_ROOT)/ace/Malloc.h \ + $(ACE_ROOT)/ace/Based_Pointer_T.h \ + $(ACE_ROOT)/ace/Based_Pointer_T.i \ + $(ACE_ROOT)/ace/Based_Pointer_T.cpp \ + $(ACE_ROOT)/ace/Based_Pointer_Repository.h \ + $(ACE_ROOT)/ace/Singleton.h \ + $(ACE_ROOT)/ace/Singleton.i \ + $(ACE_ROOT)/ace/Singleton.cpp \ + $(ACE_ROOT)/ace/Object_Manager.h \ + $(ACE_ROOT)/ace/Object_Manager.i \ + $(ACE_ROOT)/ace/Managed_Object.h \ + $(ACE_ROOT)/ace/Managed_Object.i \ + $(ACE_ROOT)/ace/Managed_Object.cpp \ + $(ACE_ROOT)/ace/Malloc.i \ + $(ACE_ROOT)/ace/Malloc_T.h \ + $(ACE_ROOT)/ace/Free_List.h \ + $(ACE_ROOT)/ace/Free_List.i \ + $(ACE_ROOT)/ace/Free_List.cpp \ + $(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/Memory_Pool.i \ + $(ACE_ROOT)/ace/Signal.i \ + $(ACE_ROOT)/ace/SString.h \ + $(ACE_ROOT)/ace/SString.i \ + $(ACE_ROOT)/ace/Service_Config.i \ + $(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/Timer_Queue_T.h \ + $(ACE_ROOT)/ace/Timer_Queue_T.i \ + $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ + $(ACE_ROOT)/ace/Reactor.i \ + $(ACE_ROOT)/ace/Reactor_Impl.h \ + $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ + RMCast_Reassembly.i RMCast_Partial_Message.h \ + $(ACE_ROOT)/ace/Task.h \ + $(ACE_ROOT)/ace/Thread_Manager.h \ + $(ACE_ROOT)/ace/Thread_Manager.i \ + $(ACE_ROOT)/ace/Task.i \ + $(ACE_ROOT)/ace/Task_T.h \ + $(ACE_ROOT)/ace/Message_Queue.h \ + $(ACE_ROOT)/ace/Message_Block.h \ + $(ACE_ROOT)/ace/Message_Block.i \ + $(ACE_ROOT)/ace/Message_Block_T.h \ + $(ACE_ROOT)/ace/Message_Block_T.i \ + $(ACE_ROOT)/ace/Message_Block_T.cpp \ + $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ + $(ACE_ROOT)/ace/Message_Queue_T.h \ + $(ACE_ROOT)/ace/Message_Queue_T.i \ + $(ACE_ROOT)/ace/Message_Queue_T.cpp \ + $(ACE_ROOT)/ace/Strategies.h \ + $(ACE_ROOT)/ace/Strategies_T.h \ + $(ACE_ROOT)/ace/Synch_Options.h \ + $(ACE_ROOT)/ace/Synch_Options.i \ + $(ACE_ROOT)/ace/Strategies_T.i \ + $(ACE_ROOT)/ace/Strategies_T.cpp \ + $(ACE_ROOT)/ace/Service_Repository.h \ + $(ACE_ROOT)/ace/Service_Types.h \ + $(ACE_ROOT)/ace/Service_Types.i \ + $(ACE_ROOT)/ace/Service_Repository.i \ + $(ACE_ROOT)/ace/WFMO_Reactor.h \ + $(ACE_ROOT)/ace/WFMO_Reactor.i \ + $(ACE_ROOT)/ace/Strategies.i \ + $(ACE_ROOT)/ace/Message_Queue.i \ + $(ACE_ROOT)/ace/Task_T.i \ + $(ACE_ROOT)/ace/Task_T.cpp \ + $(ACE_ROOT)/ace/Module.h \ + $(ACE_ROOT)/ace/Module.i \ + $(ACE_ROOT)/ace/Module.cpp \ + $(ACE_ROOT)/ace/Stream_Modules.h \ + $(ACE_ROOT)/ace/Stream_Modules.cpp \ + RMCast_Partial_Message.i + +.obj/RMCast_Partial_Message.o .obj/RMCast_Partial_Message.so .shobj/RMCast_Partial_Message.o .shobj/RMCast_Partial_Message.so: RMCast_Partial_Message.cpp \ + RMCast_Partial_Message.h \ + $(ACE_ROOT)/ace/pre.h \ + RMCast_Export.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/Task.h \ + $(ACE_ROOT)/ace/Service_Object.h \ + $(ACE_ROOT)/ace/Shared_Object.h \ + $(ACE_ROOT)/ace/ACE.h \ + $(ACE_ROOT)/ace/OS.h \ + $(ACE_ROOT)/ace/OS_Dirent.h \ + $(ACE_ROOT)/ace/OS_Export.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/ACE.i \ + $(ACE_ROOT)/ace/Shared_Object.i \ + $(ACE_ROOT)/ace/Event_Handler.h \ + $(ACE_ROOT)/ace/Event_Handler.i \ + $(ACE_ROOT)/ace/Service_Object.i \ + $(ACE_ROOT)/ace/Thread_Manager.h \ + $(ACE_ROOT)/ace/Thread.h \ + $(ACE_ROOT)/ace/Thread.i \ + $(ACE_ROOT)/ace/Synch.h \ + $(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/Synch.i \ + $(ACE_ROOT)/ace/Synch_T.h \ + $(ACE_ROOT)/ace/Synch_T.i \ + $(ACE_ROOT)/ace/Atomic_Op.i \ + $(ACE_ROOT)/ace/Synch_T.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/Containers.h \ + $(ACE_ROOT)/ace/Malloc_Base.h \ + $(ACE_ROOT)/ace/Containers.i \ + $(ACE_ROOT)/ace/Containers_T.h \ + $(ACE_ROOT)/ace/Containers_T.i \ + $(ACE_ROOT)/ace/Containers_T.cpp \ + $(ACE_ROOT)/ace/Malloc.h \ + $(ACE_ROOT)/ace/Based_Pointer_T.h \ + $(ACE_ROOT)/ace/Based_Pointer_T.i \ + $(ACE_ROOT)/ace/Based_Pointer_T.cpp \ + $(ACE_ROOT)/ace/Based_Pointer_Repository.h \ + $(ACE_ROOT)/ace/Singleton.h \ + $(ACE_ROOT)/ace/Singleton.i \ + $(ACE_ROOT)/ace/Singleton.cpp \ + $(ACE_ROOT)/ace/Object_Manager.h \ + $(ACE_ROOT)/ace/Object_Manager.i \ + $(ACE_ROOT)/ace/Managed_Object.h \ + $(ACE_ROOT)/ace/Managed_Object.i \ + $(ACE_ROOT)/ace/Managed_Object.cpp \ + $(ACE_ROOT)/ace/Malloc.i \ + $(ACE_ROOT)/ace/Malloc_T.h \ + $(ACE_ROOT)/ace/Free_List.h \ + $(ACE_ROOT)/ace/Free_List.i \ + $(ACE_ROOT)/ace/Free_List.cpp \ + $(ACE_ROOT)/ace/Malloc_T.i \ + $(ACE_ROOT)/ace/Malloc_T.cpp \ + $(ACE_ROOT)/ace/Memory_Pool.h \ + $(ACE_ROOT)/ace/Signal.h \ + $(ACE_ROOT)/ace/Signal.i \ + $(ACE_ROOT)/ace/Mem_Map.h \ + $(ACE_ROOT)/ace/Mem_Map.i \ + $(ACE_ROOT)/ace/Memory_Pool.i \ + $(ACE_ROOT)/ace/Thread_Manager.i \ + $(ACE_ROOT)/ace/Task.i \ + $(ACE_ROOT)/ace/Task_T.h \ + $(ACE_ROOT)/ace/Message_Queue.h \ + $(ACE_ROOT)/ace/Message_Block.h \ + $(ACE_ROOT)/ace/Message_Block.i \ + $(ACE_ROOT)/ace/Message_Block_T.h \ + $(ACE_ROOT)/ace/Message_Block_T.i \ + $(ACE_ROOT)/ace/Message_Block_T.cpp \ + $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ + $(ACE_ROOT)/ace/Message_Queue_T.h \ + $(ACE_ROOT)/ace/Message_Queue_T.i \ + $(ACE_ROOT)/ace/Message_Queue_T.cpp \ + $(ACE_ROOT)/ace/Strategies.h \ + $(ACE_ROOT)/ace/Strategies_T.h \ + $(ACE_ROOT)/ace/Service_Config.h \ + $(ACE_ROOT)/ace/SString.h \ + $(ACE_ROOT)/ace/SString.i \ + $(ACE_ROOT)/ace/Service_Config.i \ + $(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/Timer_Queue_T.h \ + $(ACE_ROOT)/ace/Timer_Queue_T.i \ + $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ + $(ACE_ROOT)/ace/Reactor.i \ + $(ACE_ROOT)/ace/Reactor_Impl.h \ + $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ + $(ACE_ROOT)/ace/Synch_Options.h \ + $(ACE_ROOT)/ace/Synch_Options.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/Strategies_T.i \ + $(ACE_ROOT)/ace/Strategies_T.cpp \ + $(ACE_ROOT)/ace/Service_Repository.h \ + $(ACE_ROOT)/ace/Service_Types.h \ + $(ACE_ROOT)/ace/Service_Types.i \ + $(ACE_ROOT)/ace/Service_Repository.i \ + $(ACE_ROOT)/ace/WFMO_Reactor.h \ + $(ACE_ROOT)/ace/WFMO_Reactor.i \ + $(ACE_ROOT)/ace/Strategies.i \ + $(ACE_ROOT)/ace/Message_Queue.i \ + $(ACE_ROOT)/ace/Task_T.i \ + $(ACE_ROOT)/ace/Task_T.cpp \ + $(ACE_ROOT)/ace/Module.h \ + $(ACE_ROOT)/ace/Module.i \ + $(ACE_ROOT)/ace/Module.cpp \ + $(ACE_ROOT)/ace/Stream_Modules.h \ + $(ACE_ROOT)/ace/Stream_Modules.cpp \ + RMCast_Partial_Message.i + +.obj/RMCast_Sender_Proxy.o .obj/RMCast_Sender_Proxy.so .shobj/RMCast_Sender_Proxy.o .shobj/RMCast_Sender_Proxy.so: RMCast_Sender_Proxy.cpp RMCast_Sender_Proxy.h \ + $(ACE_ROOT)/ace/pre.h \ + RMCast.h $(ACE_ROOT)/ace/OS.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/OS_Dirent.h \ + $(ACE_ROOT)/ace/OS_Export.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 \ + RMCast_Export.h RMCast.i RMCast_Sender_Proxy.i RMCast_Module.h \ + RMCast_Module.i \ + $(ACE_ROOT)/ace/Message_Block.h \ + $(ACE_ROOT)/ace/ACE.h \ + $(ACE_ROOT)/ace/ACE.i \ + $(ACE_ROOT)/ace/Malloc.h \ + $(ACE_ROOT)/ace/Malloc_Base.h \ + $(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/Based_Pointer_T.h \ + $(ACE_ROOT)/ace/Based_Pointer_T.i \ + $(ACE_ROOT)/ace/Based_Pointer_T.cpp \ + $(ACE_ROOT)/ace/Based_Pointer_Repository.h \ + $(ACE_ROOT)/ace/Singleton.h \ + $(ACE_ROOT)/ace/Synch.h \ + $(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/Synch.i \ + $(ACE_ROOT)/ace/Synch_T.h \ + $(ACE_ROOT)/ace/Event_Handler.h \ + $(ACE_ROOT)/ace/Event_Handler.i \ + $(ACE_ROOT)/ace/Synch_T.i \ + $(ACE_ROOT)/ace/Thread.h \ + $(ACE_ROOT)/ace/Thread.i \ + $(ACE_ROOT)/ace/Atomic_Op.i \ + $(ACE_ROOT)/ace/Synch_T.cpp \ + $(ACE_ROOT)/ace/Singleton.i \ + $(ACE_ROOT)/ace/Singleton.cpp \ + $(ACE_ROOT)/ace/Object_Manager.h \ + $(ACE_ROOT)/ace/Object_Manager.i \ + $(ACE_ROOT)/ace/Managed_Object.h \ + $(ACE_ROOT)/ace/Managed_Object.i \ + $(ACE_ROOT)/ace/Managed_Object.cpp \ + $(ACE_ROOT)/ace/Malloc.i \ + $(ACE_ROOT)/ace/Malloc_T.h \ + $(ACE_ROOT)/ace/Free_List.h \ + $(ACE_ROOT)/ace/Free_List.i \ + $(ACE_ROOT)/ace/Free_List.cpp \ + $(ACE_ROOT)/ace/Malloc_T.i \ + $(ACE_ROOT)/ace/Malloc_T.cpp \ + $(ACE_ROOT)/ace/Memory_Pool.h \ + $(ACE_ROOT)/ace/Signal.h \ + $(ACE_ROOT)/ace/Containers.h \ + $(ACE_ROOT)/ace/Containers.i \ + $(ACE_ROOT)/ace/Containers_T.h \ + $(ACE_ROOT)/ace/Containers_T.i \ + $(ACE_ROOT)/ace/Containers_T.cpp \ + $(ACE_ROOT)/ace/Signal.i \ + $(ACE_ROOT)/ace/Mem_Map.h \ + $(ACE_ROOT)/ace/Mem_Map.i \ + $(ACE_ROOT)/ace/Memory_Pool.i \ + $(ACE_ROOT)/ace/Message_Block.i \ + $(ACE_ROOT)/ace/Message_Block_T.h \ + $(ACE_ROOT)/ace/Message_Block_T.i \ + $(ACE_ROOT)/ace/Message_Block_T.cpp + +.obj/RMCast_Sender_Proxy_Best_Effort.o .obj/RMCast_Sender_Proxy_Best_Effort.so .shobj/RMCast_Sender_Proxy_Best_Effort.o .shobj/RMCast_Sender_Proxy_Best_Effort.so: RMCast_Sender_Proxy_Best_Effort.cpp \ + RMCast_Sender_Proxy_Best_Effort.h \ + $(ACE_ROOT)/ace/pre.h \ + RMCast_Sender_Proxy.h RMCast.h \ + $(ACE_ROOT)/ace/OS.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/OS_Dirent.h \ + $(ACE_ROOT)/ace/OS_Export.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 \ + RMCast_Export.h RMCast.i RMCast_Sender_Proxy.i \ + RMCast_Sender_Proxy_Best_Effort.i RMCast_Module.h RMCast_Module.i \ + $(ACE_ROOT)/ace/Message_Block.h \ + $(ACE_ROOT)/ace/ACE.h \ + $(ACE_ROOT)/ace/ACE.i \ + $(ACE_ROOT)/ace/Malloc.h \ + $(ACE_ROOT)/ace/Malloc_Base.h \ + $(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/Based_Pointer_T.h \ + $(ACE_ROOT)/ace/Based_Pointer_T.i \ + $(ACE_ROOT)/ace/Based_Pointer_T.cpp \ + $(ACE_ROOT)/ace/Based_Pointer_Repository.h \ + $(ACE_ROOT)/ace/Singleton.h \ + $(ACE_ROOT)/ace/Synch.h \ + $(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/Synch.i \ + $(ACE_ROOT)/ace/Synch_T.h \ + $(ACE_ROOT)/ace/Event_Handler.h \ + $(ACE_ROOT)/ace/Event_Handler.i \ + $(ACE_ROOT)/ace/Synch_T.i \ + $(ACE_ROOT)/ace/Thread.h \ + $(ACE_ROOT)/ace/Thread.i \ + $(ACE_ROOT)/ace/Atomic_Op.i \ + $(ACE_ROOT)/ace/Synch_T.cpp \ + $(ACE_ROOT)/ace/Singleton.i \ + $(ACE_ROOT)/ace/Singleton.cpp \ + $(ACE_ROOT)/ace/Object_Manager.h \ + $(ACE_ROOT)/ace/Object_Manager.i \ + $(ACE_ROOT)/ace/Managed_Object.h \ + $(ACE_ROOT)/ace/Managed_Object.i \ + $(ACE_ROOT)/ace/Managed_Object.cpp \ + $(ACE_ROOT)/ace/Malloc.i \ + $(ACE_ROOT)/ace/Malloc_T.h \ + $(ACE_ROOT)/ace/Free_List.h \ + $(ACE_ROOT)/ace/Free_List.i \ + $(ACE_ROOT)/ace/Free_List.cpp \ + $(ACE_ROOT)/ace/Malloc_T.i \ + $(ACE_ROOT)/ace/Malloc_T.cpp \ + $(ACE_ROOT)/ace/Memory_Pool.h \ + $(ACE_ROOT)/ace/Signal.h \ + $(ACE_ROOT)/ace/Containers.h \ + $(ACE_ROOT)/ace/Containers.i \ + $(ACE_ROOT)/ace/Containers_T.h \ + $(ACE_ROOT)/ace/Containers_T.i \ + $(ACE_ROOT)/ace/Containers_T.cpp \ + $(ACE_ROOT)/ace/Signal.i \ + $(ACE_ROOT)/ace/Mem_Map.h \ + $(ACE_ROOT)/ace/Mem_Map.i \ + $(ACE_ROOT)/ace/Memory_Pool.i \ + $(ACE_ROOT)/ace/Message_Block.i \ + $(ACE_ROOT)/ace/Message_Block_T.h \ + $(ACE_ROOT)/ace/Message_Block_T.i \ + $(ACE_ROOT)/ace/Message_Block_T.cpp + +.obj/RMCast_Sender_Proxy_Factory.o .obj/RMCast_Sender_Proxy_Factory.so .shobj/RMCast_Sender_Proxy_Factory.o .shobj/RMCast_Sender_Proxy_Factory.so: RMCast_Sender_Proxy_Factory.cpp \ + RMCast_Sender_Proxy_Factory.h \ + $(ACE_ROOT)/ace/pre.h \ + RMCast.h $(ACE_ROOT)/ace/OS.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/OS_Dirent.h \ + $(ACE_ROOT)/ace/OS_Export.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 \ + RMCast_Export.h RMCast.i RMCast_Sender_Proxy_Factory.i + +.obj/RMCast_UDP_Receiver.o .obj/RMCast_UDP_Receiver.so .shobj/RMCast_UDP_Receiver.o .shobj/RMCast_UDP_Receiver.so: RMCast_UDP_Receiver.cpp RMCast_UDP_Receiver.h \ + $(ACE_ROOT)/ace/pre.h \ + RMCast_UDP_Event_Handler.h RMCast_Export.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/Event_Handler.h \ + $(ACE_ROOT)/ace/ACE.h \ + $(ACE_ROOT)/ace/OS.h \ + $(ACE_ROOT)/ace/OS_Dirent.h \ + $(ACE_ROOT)/ace/OS_Export.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/ACE.i \ + $(ACE_ROOT)/ace/Event_Handler.i \ + RMCast_UDP_Event_Handler.i \ + $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.h \ + $(ACE_ROOT)/ace/SOCK_Dgram.h \ + $(ACE_ROOT)/ace/SOCK.h \ + $(ACE_ROOT)/ace/Addr.h \ + $(ACE_ROOT)/ace/Addr.i \ + $(ACE_ROOT)/ace/IPC_SAP.h \ + $(ACE_ROOT)/ace/IPC_SAP.i \ + $(ACE_ROOT)/ace/QoS_Session.h \ + $(ACE_ROOT)/ace/INET_Addr.h \ + $(ACE_ROOT)/ace/INET_Addr.i \ + $(ACE_ROOT)/ace/SOCK.i \ + $(ACE_ROOT)/ace/SOCK_Dgram.i \ + $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.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/Log_Msg.h \ + $(ACE_ROOT)/ace/Log_Record.h \ + $(ACE_ROOT)/ace/Log_Priority.h \ + $(ACE_ROOT)/ace/Log_Record.i \ + $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \ + $(ACE_ROOT)/ace/Synch.h \ + $(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/Synch.i \ + $(ACE_ROOT)/ace/Synch_T.h \ + $(ACE_ROOT)/ace/Synch_T.i \ + $(ACE_ROOT)/ace/Thread.h \ + $(ACE_ROOT)/ace/Thread.i \ + $(ACE_ROOT)/ace/Atomic_Op.i \ + $(ACE_ROOT)/ace/Synch_T.cpp \ + $(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/Signal.h \ + $(ACE_ROOT)/ace/Containers.h \ + $(ACE_ROOT)/ace/Malloc_Base.h \ + $(ACE_ROOT)/ace/Containers.i \ + $(ACE_ROOT)/ace/Containers_T.h \ + $(ACE_ROOT)/ace/Containers_T.i \ + $(ACE_ROOT)/ace/Containers_T.cpp \ + $(ACE_ROOT)/ace/Malloc.h \ + $(ACE_ROOT)/ace/Based_Pointer_T.h \ + $(ACE_ROOT)/ace/Based_Pointer_T.i \ + $(ACE_ROOT)/ace/Based_Pointer_T.cpp \ + $(ACE_ROOT)/ace/Based_Pointer_Repository.h \ + $(ACE_ROOT)/ace/Singleton.h \ + $(ACE_ROOT)/ace/Singleton.i \ + $(ACE_ROOT)/ace/Singleton.cpp \ + $(ACE_ROOT)/ace/Object_Manager.h \ + $(ACE_ROOT)/ace/Object_Manager.i \ + $(ACE_ROOT)/ace/Managed_Object.h \ + $(ACE_ROOT)/ace/Managed_Object.i \ + $(ACE_ROOT)/ace/Managed_Object.cpp \ + $(ACE_ROOT)/ace/Malloc.i \ + $(ACE_ROOT)/ace/Malloc_T.h \ + $(ACE_ROOT)/ace/Free_List.h \ + $(ACE_ROOT)/ace/Free_List.i \ + $(ACE_ROOT)/ace/Free_List.cpp \ + $(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/Memory_Pool.i \ + $(ACE_ROOT)/ace/Signal.i \ + $(ACE_ROOT)/ace/SString.h \ + $(ACE_ROOT)/ace/SString.i \ + $(ACE_ROOT)/ace/Service_Config.i \ + $(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/Timer_Queue_T.h \ + $(ACE_ROOT)/ace/Timer_Queue_T.i \ + $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ + $(ACE_ROOT)/ace/Reactor.i \ + $(ACE_ROOT)/ace/Reactor_Impl.h \ + $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ + RMCast_UDP_Receiver.i RMCast_Sender_Proxy.h RMCast.h RMCast.i \ + RMCast_Sender_Proxy.i RMCast_Sender_Proxy_Factory.h \ + RMCast_Sender_Proxy_Factory.i + +.obj/RMCast_UDP_Event_Handler.o .obj/RMCast_UDP_Event_Handler.so .shobj/RMCast_UDP_Event_Handler.o .shobj/RMCast_UDP_Event_Handler.so: RMCast_UDP_Event_Handler.cpp \ + RMCast_UDP_Event_Handler.h \ + $(ACE_ROOT)/ace/pre.h \ + RMCast_Export.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/Event_Handler.h \ + $(ACE_ROOT)/ace/ACE.h \ + $(ACE_ROOT)/ace/OS.h \ + $(ACE_ROOT)/ace/OS_Dirent.h \ + $(ACE_ROOT)/ace/OS_Export.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/ACE.i \ + $(ACE_ROOT)/ace/Event_Handler.i \ + RMCast_UDP_Event_Handler.i RMCast_UDP_Receiver.h \ + $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.h \ + $(ACE_ROOT)/ace/SOCK_Dgram.h \ + $(ACE_ROOT)/ace/SOCK.h \ + $(ACE_ROOT)/ace/Addr.h \ + $(ACE_ROOT)/ace/Addr.i \ + $(ACE_ROOT)/ace/IPC_SAP.h \ + $(ACE_ROOT)/ace/IPC_SAP.i \ + $(ACE_ROOT)/ace/QoS_Session.h \ + $(ACE_ROOT)/ace/INET_Addr.h \ + $(ACE_ROOT)/ace/INET_Addr.i \ + $(ACE_ROOT)/ace/SOCK.i \ + $(ACE_ROOT)/ace/SOCK_Dgram.i \ + $(ACE_ROOT)/ace/SOCK_Dgram_Mcast.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/Log_Msg.h \ + $(ACE_ROOT)/ace/Log_Record.h \ + $(ACE_ROOT)/ace/Log_Priority.h \ + $(ACE_ROOT)/ace/Log_Record.i \ + $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \ + $(ACE_ROOT)/ace/Synch.h \ + $(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/Synch.i \ + $(ACE_ROOT)/ace/Synch_T.h \ + $(ACE_ROOT)/ace/Synch_T.i \ + $(ACE_ROOT)/ace/Thread.h \ + $(ACE_ROOT)/ace/Thread.i \ + $(ACE_ROOT)/ace/Atomic_Op.i \ + $(ACE_ROOT)/ace/Synch_T.cpp \ + $(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/Signal.h \ + $(ACE_ROOT)/ace/Containers.h \ + $(ACE_ROOT)/ace/Malloc_Base.h \ + $(ACE_ROOT)/ace/Containers.i \ + $(ACE_ROOT)/ace/Containers_T.h \ + $(ACE_ROOT)/ace/Containers_T.i \ + $(ACE_ROOT)/ace/Containers_T.cpp \ + $(ACE_ROOT)/ace/Malloc.h \ + $(ACE_ROOT)/ace/Based_Pointer_T.h \ + $(ACE_ROOT)/ace/Based_Pointer_T.i \ + $(ACE_ROOT)/ace/Based_Pointer_T.cpp \ + $(ACE_ROOT)/ace/Based_Pointer_Repository.h \ + $(ACE_ROOT)/ace/Singleton.h \ + $(ACE_ROOT)/ace/Singleton.i \ + $(ACE_ROOT)/ace/Singleton.cpp \ + $(ACE_ROOT)/ace/Object_Manager.h \ + $(ACE_ROOT)/ace/Object_Manager.i \ + $(ACE_ROOT)/ace/Managed_Object.h \ + $(ACE_ROOT)/ace/Managed_Object.i \ + $(ACE_ROOT)/ace/Managed_Object.cpp \ + $(ACE_ROOT)/ace/Malloc.i \ + $(ACE_ROOT)/ace/Malloc_T.h \ + $(ACE_ROOT)/ace/Free_List.h \ + $(ACE_ROOT)/ace/Free_List.i \ + $(ACE_ROOT)/ace/Free_List.cpp \ + $(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/Memory_Pool.i \ + $(ACE_ROOT)/ace/Signal.i \ + $(ACE_ROOT)/ace/SString.h \ + $(ACE_ROOT)/ace/SString.i \ + $(ACE_ROOT)/ace/Service_Config.i \ + $(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/Timer_Queue_T.h \ + $(ACE_ROOT)/ace/Timer_Queue_T.i \ + $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ + $(ACE_ROOT)/ace/Reactor.i \ + $(ACE_ROOT)/ace/Reactor_Impl.h \ + $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ + RMCast_UDP_Receiver.i + +.obj/RMCast_UDP_Sender.o .obj/RMCast_UDP_Sender.so .shobj/RMCast_UDP_Sender.o .shobj/RMCast_UDP_Sender.so: RMCast_UDP_Sender.cpp RMCast_UDP_Sender.h \ + $(ACE_ROOT)/ace/pre.h \ + RMCast_Module.h RMCast.h \ + $(ACE_ROOT)/ace/OS.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/OS_Dirent.h \ + $(ACE_ROOT)/ace/OS_Export.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 \ + RMCast_Export.h RMCast.i RMCast_Module.i \ + $(ACE_ROOT)/ace/SOCK_Dgram.h \ + $(ACE_ROOT)/ace/SOCK.h \ + $(ACE_ROOT)/ace/ACE.h \ + $(ACE_ROOT)/ace/ACE.i \ + $(ACE_ROOT)/ace/Addr.h \ + $(ACE_ROOT)/ace/Addr.i \ + $(ACE_ROOT)/ace/IPC_SAP.h \ + $(ACE_ROOT)/ace/IPC_SAP.i \ + $(ACE_ROOT)/ace/QoS_Session.h \ + $(ACE_ROOT)/ace/INET_Addr.h \ + $(ACE_ROOT)/ace/INET_Addr.i \ + $(ACE_ROOT)/ace/SOCK.i \ + $(ACE_ROOT)/ace/SOCK_Dgram.i \ + RMCast_UDP_Sender.i \ + $(ACE_ROOT)/ace/Message_Block.h \ + $(ACE_ROOT)/ace/Malloc.h \ + $(ACE_ROOT)/ace/Malloc_Base.h \ + $(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/Based_Pointer_T.h \ + $(ACE_ROOT)/ace/Based_Pointer_T.i \ + $(ACE_ROOT)/ace/Based_Pointer_T.cpp \ + $(ACE_ROOT)/ace/Based_Pointer_Repository.h \ + $(ACE_ROOT)/ace/Singleton.h \ + $(ACE_ROOT)/ace/Synch.h \ + $(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/Synch.i \ + $(ACE_ROOT)/ace/Synch_T.h \ + $(ACE_ROOT)/ace/Event_Handler.h \ + $(ACE_ROOT)/ace/Event_Handler.i \ + $(ACE_ROOT)/ace/Synch_T.i \ + $(ACE_ROOT)/ace/Thread.h \ + $(ACE_ROOT)/ace/Thread.i \ + $(ACE_ROOT)/ace/Atomic_Op.i \ + $(ACE_ROOT)/ace/Synch_T.cpp \ + $(ACE_ROOT)/ace/Singleton.i \ + $(ACE_ROOT)/ace/Singleton.cpp \ + $(ACE_ROOT)/ace/Object_Manager.h \ + $(ACE_ROOT)/ace/Object_Manager.i \ + $(ACE_ROOT)/ace/Managed_Object.h \ + $(ACE_ROOT)/ace/Managed_Object.i \ + $(ACE_ROOT)/ace/Managed_Object.cpp \ + $(ACE_ROOT)/ace/Malloc.i \ + $(ACE_ROOT)/ace/Malloc_T.h \ + $(ACE_ROOT)/ace/Free_List.h \ + $(ACE_ROOT)/ace/Free_List.i \ + $(ACE_ROOT)/ace/Free_List.cpp \ + $(ACE_ROOT)/ace/Malloc_T.i \ + $(ACE_ROOT)/ace/Malloc_T.cpp \ + $(ACE_ROOT)/ace/Memory_Pool.h \ + $(ACE_ROOT)/ace/Signal.h \ + $(ACE_ROOT)/ace/Containers.h \ + $(ACE_ROOT)/ace/Containers.i \ + $(ACE_ROOT)/ace/Containers_T.h \ + $(ACE_ROOT)/ace/Containers_T.i \ + $(ACE_ROOT)/ace/Containers_T.cpp \ + $(ACE_ROOT)/ace/Signal.i \ + $(ACE_ROOT)/ace/Mem_Map.h \ + $(ACE_ROOT)/ace/Mem_Map.i \ + $(ACE_ROOT)/ace/Memory_Pool.i \ + $(ACE_ROOT)/ace/Message_Block.i \ + $(ACE_ROOT)/ace/Message_Block_T.h \ + $(ACE_ROOT)/ace/Message_Block_T.i \ + $(ACE_ROOT)/ace/Message_Block_T.cpp + # IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/ace/RMCast/RMCast.cpp b/ace/RMCast/RMCast.cpp new file mode 100644 index 00000000000..92ea637e481 --- /dev/null +++ b/ace/RMCast/RMCast.cpp @@ -0,0 +1,9 @@ +// $Id$ + +#include "RMCast.h" + +#if !defined (__ACE_INLINE__) +#include "RMCast.i" +#endif /* __ACE_INLINE__ */ + +ACE_RCSID(ace, RMCast, "$Id$") diff --git a/ace/RMCast/RMCast.h b/ace/RMCast/RMCast.h new file mode 100644 index 00000000000..025f82a1bfb --- /dev/null +++ b/ace/RMCast/RMCast.h @@ -0,0 +1,228 @@ +/* -*- C++ -*- */ +// $Id$ + +// ============================================================================ +// +// = LIBRARY +// ace +// +// = FILENAME +// RMCast.h +// +// = AUTHOR +// Carlos O'Ryan <coryan@uci.edu> +// +// ============================================================================ + +#ifndef ACE_RMCAST_H +#define ACE_RMCAST_H +#include "ace/pre.h" + +#include "ace/OS.h" +#include "RMCast_Export.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +class ACE_Message_Block; + +class ACE_RMCast_Export ACE_RMCast +{ +public: + + // Message formats + + // From SENDER to RECEIVER + // + // POLL + // +---------+----------------------+ + // | 8 bits | MT_POLL | + // +---------+----------------------+ + // + // ACK_JOIN + // +---------+----------------------+ + // | 8 bits | MT_ACK_JOIN | + // +---------+----------------------+ + // | 32 bits | next_sequence_number | + // +---------+----------------------+ + // + // ACK_LEAVE + // +---------+----------------------+ + // | 8 bits | ACK_LEAVE | + // +---------+----------------------+ + // + // DATA + // +---------+----------------------+ + // | 8 bits | DATA | + // +---------+----------------------+ + // | 32 bits | sequence_number | + // +---------+----------------------+ + // | 32 bits | message_size | + // +---------+----------------------+ + // | 32 bits | fragment_offset | + // +---------+----------------------+ + // | 32 bits | payload_size | + // +---------+----------------------+ + // | | payload | + // +---------+----------------------+ + // + + // From RECEIVER to SENDER + // + // MT_JOIN + // +---------+----------------------+ + // | 8 bits | MT_JOIN | + // +---------+----------------------+ + // + // MT_LEAVE + // +---------+----------------------+ + // | 8 bits | MT_LEAVE | + // +---------+----------------------+ + // + // MT_ACK + // +---------+----------------------+ + // | 8 bits | MT_ACK | + // +---------+----------------------+ + // | 32 bits | last_successful | + // +---------+----------------------+ + // | 32 bits | last_received | + // +---------+----------------------+ + // + + enum Message_Type + { + // Sender initiated + MT_POLL, + MT_ACK_JOIN, + MT_ACK_LEAVE, + MT_DATA, + // Receiver initiated + MT_JOIN, + MT_LEAVE, + MT_ACK, + MT_LAST + }; + + enum Receiver_State + { + RS_NON_EXISTENT, + RS_JOINING, + RS_JOINED, + RS_LEAVING + }; + + // State transition (and actions) for the receivers. + // This configuration is pesimistic, any invalid message is cause + // enough to reclaim all the resources. This partially addresses + // situations where either accidentally or intentionally a sender is + // multicasting packets to the wrong group. + // + // NON_EXISTENT JOINING JOINED LEAVING + // ---------------------------------------------------------------- + // POLL JOINING JOINING JOINED LEAVING + // Send/Join Send/Join Send/Ack Send/Leave + // + // ACK NON_EXISTENT NON_EXISTENT NON_EXISTENT NON_EXISTENT + // Noop Destroy Destroy Destroy + // + // JOIN NON_EXISTENT NON_EXISTENT NON_EXISTENT NON_EXISTENT + // Noop Destroy Destroy Destroy + // + // LEAVE NON_EXISTENT NON_EXISTENT NON_EXISTENT NON_EXISTENT + // Noop Destroy Destroy Destroy + // + // ACK_JOIN JOINING JOINED JOINED LEAVING + // Send/Join Update ACT Update ACT Send/Leave + // + // ACK_LEAVE NON_EXISTENT NON_EXISTENT NON_EXISTENT NON_EXISTENT + // Noop Destroy Destroy Destroy + // + // SEND_DATA JOINING JOINING JOINED LEAVING + // Send/Join Send/Join Recv/Data Send/Leave + // + + enum Sender_State + { + SS_NON_EXISTENT, + SS_JOINED + }; + + // State transition (and actions) for the senders. + // This configuration is pesimistic, any invalid message is cause + // enough to reclaim all the resources. This partially addresses + // situations where either accidentally or intentionally a sender is + // multicasting packets to the wrong group. + // + // NON_EXISTENT JOINED + // ------------------------------------------ + // POLL NON_EXISTENT NON_EXISTENT + // Destroy Destroy + // + // ACK NON_EXISTENT JOINED + // Noop Process/Ack + // + // JOIN JOINED NON_EXISTENT + // Send/Join_Ack Send/Join_Ack + // + // LEAVE NON_EXISTENT NON_EXISTENT + // Send/Leave_Ack Send/Leave_Ack + // Destroy + // + // ACK_JOIN NON_EXISTENT NON_EXISTENT + // Noop Destroy + // + // ACK_LEAVE NON_EXISTENT NON_EXISTENT + // Noop Destroy + // + // SEND_DATA NON_EXISTENT NON_EXISTENT + // Noop Destroy + // + + + // These structures define the basic layout of the messages. + struct Data + { + // Source ID is implicit in recvfrom()... + ACE_UINT32 sequence_number; + ACE_UINT32 total_size; + ACE_UINT32 fragment_offset; + // @@ TODO: we may want to add optional fields, such as: + // - Polling clients for their status + // - Sending the range of messages in the queue + // - If we are using authentic group communication we may + // piggyback the ACK / NAK messages + + ACE_Message_Block *payload; + }; + + struct Ack + { + ACE_UINT32 expected; + ACE_UINT32 last_received; + }; + + struct Join + { + }; + + struct Leave + { + }; + + struct Ack_Join + { + ACE_INT32 next_sequence_number; + }; + + struct Ack_Leave + { + }; +}; + +#if defined (__ACE_INLINE__) +#include "RMCast.i" +#endif /* __ACE_INLINE__ */ + +#include "ace/post.h" +#endif /* ACE_RMCAST_H */ diff --git a/ace/RMCast/RMCast.i b/ace/RMCast/RMCast.i new file mode 100644 index 00000000000..cfa1da318d3 --- /dev/null +++ b/ace/RMCast/RMCast.i @@ -0,0 +1 @@ +// $Id$ diff --git a/ace/RMCast/RMCast_Fragment.cpp b/ace/RMCast/RMCast_Fragment.cpp index 0578690f018..b3baee4f972 100644 --- a/ace/RMCast/RMCast_Fragment.cpp +++ b/ace/RMCast/RMCast_Fragment.cpp @@ -1,9 +1,7 @@ // $Id$ -#ifndef ACE_RMCAST_FRAGMENT_C -#define ACE_RMCAST_FRAGMENT_C - #include "RMCast_Fragment.h" +#include "ace/Message_Block.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once @@ -15,36 +13,44 @@ ACE_RCSID(ace, RMCast_Fragment, "$Id$") - -template <ACE_SYNCH_DECL> -ACE_RMCast_Fragment<ACE_SYNCH_USE>:: -ACE_RMCast_Fragment (ACE_Thread_Manager *thr_mgr, - ACE_Message_Queue<ACE_SYNCH_USE> *mq) - : ACE_Task<ACE_SYNCH_USE> (thr_mgr, mq) +ACE_RMCast_Fragment:: +ACE_RMCast_Fragment (void) + : ACE_RMCast_Module () , max_fragment_size_ (ACE_RMCAST_DEFAULT_FRAGMENT_SIZE) { } -template <ACE_SYNCH_DECL> -ACE_RMCast_Fragment<ACE_SYNCH_USE>:: -~ACE_RMCast_Fragment (void) +ACE_RMCast_Fragment::~ACE_RMCast_Fragment (void) { } -template <ACE_SYNCH_DECL> int -ACE_RMCast_Fragment<ACE_SYNCH_USE>::put (ACE_Message_Block *mb, - ACE_Time_Value *tv) +int +ACE_RMCast_Fragment::put_data (ACE_RMCast::Data &received_data) { + if (this->next () == 0) + return 0; + + // The Data object sent downstream + ACE_RMCast::Data data = received_data; + + ACE_Message_Block *mb = data.payload; + // @@ We should keep the total size precomputed - size_t total_size = mb->total_size (); + data.total_size = mb->total_size (); + // We must leave room for the header #if defined (ACE_HAS_BROKEN_DGRAM_SENDV) - const int TAO_WRITEV_MAX = IOV_MAX - 1; + const int ACE_RMCAST_WRITEV_MAX = IOV_MAX - 2; #else - const int TAO_WRITEV_MAX = IOV_MAX; + const int ACE_RMCAST_WRITEV_MAX = IOV_MAX - 1; #endif /* ACE_HAS_BROKEN_DGRAM_SENDV */ - const size_t max_fragment_payload = this->max_fragment_size_; + // Assume the header will be included on each fragment, so readuce + // the maximum amount of memory allowed on each fragment.... + const size_t fragment_header_size = 1 + 3 * sizeof(ACE_UINT32); + + const size_t max_fragment_payload = + this->max_fragment_size_ - fragment_header_size; // Iterate over all the message blocks in the chain. If there is // enough data to send an MTU then it is sent immediately. @@ -64,57 +70,43 @@ ACE_RMCast_Fragment<ACE_SYNCH_USE>::put (ACE_Message_Block *mb, // - The total size of the message, so the reassembly layer knows // when a complete message has been received. - ACE_UINT32 message_sequence_number; - ACE_UINT32 fragment_offset = 0; - { - ACE_GUARD_RETURN (ACE_SYNCH_MUTEX_T, ace_mon, this->mutex_, -1); - message_sequence_number = ++(this->sequence_number_generator_); - } + // Complete the initialization of the <data> structure + data.fragment_offset = 0; // The underlying transport layer can only tolerate so many elements // in a chain, so we must count them and send a fragment if we are // going over the limit. - ACE_Message_Block blocks[TAO_WRITEV_MAX]; - - // The first message block contains the fragmentation layer - // header... - ACE_UINT32 header[3]; - header[0] = ACE_HTONL(message_sequence_number); - header[1] = ACE_HTONL(fragment_offset); - header[2] = ACE_HTONL(total_size); + ACE_Message_Block blocks[ACE_RMCAST_WRITEV_MAX]; - const size_t fragment_header_size = sizeof(header); - - blocks[0].init (ACE_reinterpret_cast(char*,header), - fragment_header_size); - blocks[0].wr_ptr (fragment_header_size); // How many elements of the <blocks> array are in use... - int iovcnt = 1; + int iovcnt = 0; // The size of the current message, adding the size of all its // message blocks. - size_t fragment_size = fragment_header_size; + size_t fragment_size = 0; for (ACE_Message_Block* b = mb; b != 0; b = b->cont ()) { + ACE_Message_Block *current_block = &blocks[iovcnt]; + // Add the block to the vector... - ACE_Message_Block *last_block = blocks + iovcnt; + current_block->data_block (b->data_block ()->duplicate ()); + current_block->rd_ptr (b->rd_ptr ()); + current_block->wr_ptr (b->wr_ptr ()); + current_block->cont (0); - last_block->data_block (b->data_block ()->duplicate ()); - last_block->rd_ptr (b->rd_ptr ()); - last_block->wr_ptr (b->wr_ptr ()); - last_block->cont (0); // Set the continuation field - blocks[iovcnt - 1].cont (last_block); + if (iovcnt != 0) + blocks[iovcnt-1].cont (current_block); - size_t last_block_length = last_block->length (); + size_t current_block_length = current_block->length (); // Recompute the state of the fragment - fragment_size += last_block_length; + fragment_size += current_block_length; iovcnt++; while (fragment_size >= max_fragment_payload) @@ -126,29 +118,29 @@ ACE_RMCast_Fragment<ACE_SYNCH_USE>::put (ACE_Message_Block *mb, // First adjust the last message block to exactly fit in the // fragment: size_t last_sent_mb_len = - max_fragment_payload - (fragment_size - last_block_length); + max_fragment_payload - (fragment_size - current_block_length); // Send only enough data of the last message block to fill // the fragment... - last_block->wr_ptr (last_block->rd_ptr () + current_block->wr_ptr (current_block->rd_ptr () + last_sent_mb_len); - if (this->put_next (blocks, tv) == -1) + data.payload = blocks; + if (this->next ()->put_data (data) == -1) return -1; // adjust the offset - fragment_offset += max_fragment_payload - fragment_header_size; - header[1] = ACE_HTONL(fragment_offset); + data.fragment_offset += max_fragment_payload; // Now compute how much data is left in the last message // block, to check if we should continue sending it... - last_block_length -= last_sent_mb_len; - if (last_block_length == 0) + current_block_length -= last_sent_mb_len; + if (current_block_length == 0) { // No more data from this message block, just continue // the outer loop... - iovcnt = 1; - fragment_size = fragment_header_size; + iovcnt = 0; + fragment_size = 0; blocks[0].cont (0); break; // while } @@ -158,22 +150,18 @@ ACE_RMCast_Fragment<ACE_SYNCH_USE>::put (ACE_Message_Block *mb, // loop will adjust things. // We must put the data in the right place in the array.. - char *rd_ptr = last_block->rd_ptr () + last_sent_mb_len; - char *wr_ptr = rd_ptr + last_block_length; - blocks[1].data_block (last_block->replace_data_block (0)); + char *rd_ptr = current_block->rd_ptr () + last_sent_mb_len; + char *wr_ptr = rd_ptr + current_block_length; + blocks[0].data_block (current_block->replace_data_block (0)); // And determine what segment of the data will be sent.. - blocks[1].rd_ptr (rd_ptr); - blocks[1].wr_ptr (wr_ptr); - blocks[1].cont (0); - last_block = &blocks[1]; - - // Setup the cont field... - blocks[0].cont (last_block); + blocks[0].rd_ptr (rd_ptr); + blocks[0].wr_ptr (wr_ptr); + blocks[0].cont (0); // Adjust the state of the fragment - fragment_size = last_block_length + fragment_header_size; - iovcnt = 2; + fragment_size = current_block_length; + iovcnt = 1; // Notice that if <fragment_size> is too big the start of // this loop will continue the fragmentation. @@ -182,23 +170,19 @@ ACE_RMCast_Fragment<ACE_SYNCH_USE>::put (ACE_Message_Block *mb, // It is also possible to fill up the iovec array before the // fragment is completed, in this case we must send whatever we // have: - if (iovcnt == TAO_WRITEV_MAX) + if (iovcnt == ACE_RMCAST_WRITEV_MAX) { - if (this->put_next (blocks, tv) == -1) + if (this->next ()->put_data (data) == -1) return -1; - fragment_offset += fragment_size - fragment_header_size; - header[1] = ACE_HTONL(fragment_offset); - iovcnt = 1; - fragment_size = fragment_header_size; + iovcnt = 0; + fragment_size = 0; blocks[0].cont (0); } } - if (iovcnt == 1) + if (iovcnt == 0) return 0; - return this->put_next (blocks, tv); + return this->next ()->put_data (data); } - -#endif /* ACE_RMCAST_FRAGMENT_C */ diff --git a/ace/RMCast/RMCast_Fragment.h b/ace/RMCast/RMCast_Fragment.h index 8aa7024770e..e42440b6c12 100644 --- a/ace/RMCast/RMCast_Fragment.h +++ b/ace/RMCast/RMCast_Fragment.h @@ -6,7 +6,7 @@ // The fragmentation task for the reliable multicast library // // = AUTHOR -// Carlos O'Ryan <coryan@cs.wustl.edu> +// Carlos O'Ryan <coryan@uci.edu> // // ============================================================================ @@ -14,8 +14,8 @@ #define ACE_RMCAST_FRAGMENT_H #include "ace/pre.h" -#include "RMCast_Export.h" -#include "ace/Task.h" +#include "RMCast_Module.h" +#include "ace/Synch.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once @@ -25,12 +25,10 @@ # define ACE_RMCAST_DEFAULT_FRAGMENT_SIZE 1024 #endif /* ACE_RMCAST_DEFAULT_FRAGMENT_SIZE */ -template <ACE_SYNCH_DECL> -class ACE_RMCast_Export ACE_RMCast_Fragment : public ACE_Task<ACE_SYNCH_USE> +class ACE_RMCast_Export ACE_RMCast_Fragment : public ACE_RMCast_Module { public: - ACE_RMCast_Fragment (ACE_Thread_Manager *thr_mgr = 0, - ACE_Message_Queue<ACE_SYNCH_USE> *mq = 0); + ACE_RMCast_Fragment (void); // Constructor virtual ~ACE_RMCast_Fragment (void); @@ -41,28 +39,16 @@ public: // There is no modifier, the maximum fragment size is obtained using // feedback from the lower layer (transport?) - // = The ACE_Task methods - int put (ACE_Message_Block *, ACE_Time_Value *timeout = 0); + // = The ACE_RMCast_Module methods + virtual int put_data (ACE_RMCast::Data &data); private: size_t max_fragment_size_; - - ACE_SYNCH_MUTEX_T mutex_; - ACE_UINT32 sequence_number_generator_; - // The sequence number generator }; #if defined (__ACE_INLINE__) #include "RMCast_Fragment.i" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "RMCast_Fragment.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("RMCast_Fragment.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - #include "ace/post.h" #endif /* ACE_RMCAST_FRAGMENT_H */ diff --git a/ace/RMCast/RMCast_Fragment.i b/ace/RMCast/RMCast_Fragment.i index 0cf9f7eea9b..8e628093b8c 100644 --- a/ace/RMCast/RMCast_Fragment.i +++ b/ace/RMCast/RMCast_Fragment.i @@ -1,8 +1,7 @@ // $Id$ -template <ACE_SYNCH_DECL> ACE_INLINE size_t -ACE_RMCast_Fragment<ACE_SYNCH_USE>::max_fragment_size (void) const +ACE_INLINE size_t +ACE_RMCast_Fragment::max_fragment_size (void) const { return this->max_fragment_size_; } - diff --git a/ace/RMCast/RMCast_Header_Size.cpp b/ace/RMCast/RMCast_Header_Size.cpp deleted file mode 100644 index f98259eb255..00000000000 --- a/ace/RMCast/RMCast_Header_Size.cpp +++ /dev/null @@ -1,15 +0,0 @@ -// $Id$ - -#include "RMCast_Header_Size.h" - -#if !defined (__ACE_INLINE__) -#include "RMCast_Header_Size.i" -#endif /* __ACE_INLINE__ */ - -ACE_RCSID(ace, RMCast_Header_Size, "$Id$") - -ACE_RMCast_Header_Size:: -ACE_RMCast_Header_Size (void) - : ACE_Message_Block (0, ACE_Message_Block::MB_PROTO) -{ -} diff --git a/ace/RMCast/RMCast_Header_Size.h b/ace/RMCast/RMCast_Header_Size.h deleted file mode 100644 index eb6aa9599af..00000000000 --- a/ace/RMCast/RMCast_Header_Size.h +++ /dev/null @@ -1,55 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = DESCRIPTION -// Helper class used in the reassembly layer of the realiable -// multicast library. -// -// = AUTHOR -// Carlos O'Ryan <coryan@cs.wustl.edu> -// -// ============================================================================ - -#ifndef ACE_RMCAST_HEADER_SIZE_H -#define ACE_RMCAST_HEADER_SIZE_H -#include "ace/pre.h" - -#include "RMCast_Export.h" -#include "ace/Task.h" - -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ - -class ACE_RMCast_Export ACE_RMCast_Header_Size : public ACE_Message_Block -{ - // = TITLE - // A control message to compute the total header size in the stack - // - // = DESCRIPTION - // As layers are pushed into the stack it is often required to add - // headers in one or more layers. The headers could be appended - // using the message block chain. - // -public: - ACE_RMCast_Header_Size (void); - // Constructor - - void add_to_header_size (size_t size); - // Add a header to the total size - - size_t header_size (void) const; - // Return the current header size - -private: - size_t header_size_; - // The header size -}; - -#if defined (__ACE_INLINE__) -#include "RMCast_Header_Size.i" -#endif /* __ACE_INLINE__ */ - -#include "ace/post.h" -#endif /* ACE_RMCAST_HEADER_SIZE_H */ diff --git a/ace/RMCast/RMCast_Header_Size.i b/ace/RMCast/RMCast_Header_Size.i deleted file mode 100644 index ae197528578..00000000000 --- a/ace/RMCast/RMCast_Header_Size.i +++ /dev/null @@ -1,14 +0,0 @@ -// $Id$ - -ACE_INLINE void -ACE_RMCast_Header_Size::add_to_header_size (size_t size) -{ - this->header_size_ += size; -} - -ACE_INLINE size_t -ACE_RMCast_Header_Size::header_size (void) const -{ - return this->header_size_; -} - diff --git a/ace/RMCast/RMCast_Module.cpp b/ace/RMCast/RMCast_Module.cpp new file mode 100644 index 00000000000..b47694abe4d --- /dev/null +++ b/ace/RMCast/RMCast_Module.cpp @@ -0,0 +1,57 @@ +// +// $Id$ +// + +#include "RMCast_Module.h" + +#if !defined (__ACE_INLINE__) +# include "RMCast_Module.i" +#endif /* ! __ACE_INLINE__ */ + +ACE_RCSID(ace, RMCast_Module, "$Id$") + +ACE_RMCast_Module::~ACE_RMCast_Module (void) +{ +} + +int +ACE_RMCast_Module::next (ACE_RMCast_Module *next) +{ + if (this->next_ != 0 && next != 0) + return 1; + this->next_ = next; + return 0; +} + +ACE_RMCast_Module * +ACE_RMCast_Module::next (void) const +{ + return this->next_; +} + +int +ACE_RMCast_Module::prev (ACE_RMCast_Module *prev) +{ + if (this->prev_ != 0 && prev != 0) + return 1; + this->prev_ = prev; + return 0; +} + +ACE_RMCast_Module * +ACE_RMCast_Module::prev (void) const +{ + return this->prev_; +} + +int +ACE_RMCast_Module::open (void) +{ + return 0; +} + +int +ACE_RMCast_Module::close (void) +{ + return 0; +} diff --git a/ace/RMCast/RMCast_Module.h b/ace/RMCast/RMCast_Module.h new file mode 100644 index 00000000000..30f3da2f4fe --- /dev/null +++ b/ace/RMCast/RMCast_Module.h @@ -0,0 +1,76 @@ +/* -*- C++ -*- */ +// $Id$ + +// ============================================================================ +// +// = LIBRARY +// ace +// +// = FILENAME +// RMCast_Module.h +// +// = AUTHOR +// Carlos O'Ryan <coryan@uci.edu> +// +// ============================================================================ + +#ifndef ACE_RMCAST_MODULE_H +#define ACE_RMCAST_MODULE_H +#include "ace/pre.h" + +#include "RMCast.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +class ACE_Message_Block; +class ACE_Time_Value; + +class ACE_RMCast_Export ACE_RMCast_Module +{ + // = TITLE + // Reliable Multicast Module + // + // = DESCRIPTION + // The reliable multicast protocol is implemented as a stack of + // "Modules" each one performing one specific task. + // In short, this is an instance of the pipes-and-filters + // architectural pattern. + // +public: + // = Initialization and termination methods. + ACE_RMCast_Module (void); + // Constructor + + virtual ~ACE_RMCast_Module (void); + // Destructor + + virtual int next (ACE_RMCast_Module *next); + virtual ACE_RMCast_Module* next (void) const; + virtual int prev (ACE_RMCast_Module *prev); + virtual ACE_RMCast_Module* prev (void) const; + // Modifiers and accessors for the previous and next module in the + // stack + + virtual int open (void); + // Initialize the module, setting up the next module + + virtual int close (void); + // Close the module. + + virtual int put_data (ACE_RMCast::Data &data) = 0; + // Push data down the stack + +private: + ACE_RMCast_Module *next_; + ACE_RMCast_Module *prev_; + // The next and previous modules in the stack +}; + +#if defined (__ACE_INLINE__) +#include "RMCast_Module.i" +#endif /* __ACE_INLINE__ */ + +#include "ace/post.h" +#endif /* ACE_RMCAST_MODULE_H */ diff --git a/ace/RMCast/RMCast_Module.i b/ace/RMCast/RMCast_Module.i new file mode 100644 index 00000000000..61099903d20 --- /dev/null +++ b/ace/RMCast/RMCast_Module.i @@ -0,0 +1,8 @@ +// $Id$ + +ACE_INLINE +ACE_RMCast_Module::ACE_RMCast_Module (void) + : next_ (0) + , prev_ (0) +{ +} diff --git a/ace/RMCast/RMCast_Partial_Message.cpp b/ace/RMCast/RMCast_Partial_Message.cpp index 2515c52459b..5de2e660a11 100644 --- a/ace/RMCast/RMCast_Partial_Message.cpp +++ b/ace/RMCast/RMCast_Partial_Message.cpp @@ -34,23 +34,28 @@ ACE_RMCast_Partial_Message::fragment_received (ACE_UINT32 message_size, ACE_Message_Block *mb) { if (this->message_body_.length () != message_size) - return -1; + { + // ACE_DEBUG ((LM_DEBUG, + // "Partial_Message::fragment_received - " + // "invalid message length\n")); + return -1; + } // Just copy the data... char *rd_ptr = this->message_body_.rd_ptr () + offset; - size_t total_length = mb->length () - 12; - if (total_length > 0) - { - ACE_OS::memcpy (rd_ptr, - mb->rd_ptr () + 12, - total_length); - rd_ptr += total_length; - } + size_t total_length = 0; { - for (const ACE_Message_Block *i = mb->cont (); i != 0; i = i->cont ()) + for (const ACE_Message_Block *i = mb; i != 0; i = i->cont ()) { + if (rd_ptr + i->length () > this->message_body_.wr_ptr ()) + { + // ACE_DEBUG ((LM_DEBUG, + // "Partial_Message::fragment_received - " + // "invalid payload length\n")); + return -1; + } ACE_OS::memcpy (rd_ptr, i->rd_ptr (), i->length ()); - rd_ptr += i->length (); + rd_ptr += i->length (); total_length += i->length (); } } @@ -63,61 +68,77 @@ ACE_RMCast_Partial_Message::fragment_received (ACE_UINT32 message_size, // iteration if the ACE_UINT32 start = offset; - ACE_UINT32 end = offset + total_length; + ACE_UINT32 end = offset + total_length; - for (size_t i = 0; i < this->hole_count_; ++i) + while (start != end && this->hole_count_ != 0) { - Hole& hole = this->hole_list_[i]; - - if (end <= hole.start) - return 0; - if (start >= hole.end) - continue; - - // OK there is some intersection. - - // There are only three cases for the <start> value: - // start < hole.start - // start == hole.start - // hole.start < start < hole.end - // - // But the code for both start == hole.start and start < - // hole.start is identical.... - - if (start <= hole.start) + for (size_t i = 0; i < this->hole_count_; ++i) { - if (end < hole.end) - { - // In this case we shrink the hole - hole.start = end; - return 0; - } - else // end >= hole.end + Hole& hole = this->hole_list_[i]; + + // First check if the new data insersects the hole... + if (end <= hole.start) + return 0; + if (start >= hole.end) { - // We remove the hole, and continue the iteration... - if (this->remove_hole (i) == -1) - return -1; - continue; + if (i == this->hole_count_ - 1) + return 0; + else + continue; } - } - else // hole.start < start < hole.end - { - if (end >= hole.end) + + // The hole and the new fragment intersect, we have to + // update the hole list. + // + // There are only three cases for the <start> value: + // start < hole.start + // start == hole.start + // hole.start < start < hole.end + // + // But the code for both start == hole.start and start < + // hole.start is identical.... + + if (start <= hole.start) { - // Just adjust the size of the hole... - hole.start = start; - return 0; + if (end < hole.end) + { + // NOTE: hole.start < end, because of previous test + + // In this case we shrink the hole, but it is not + // removed! + hole.start = end; + return 0; + } + else // end >= hole.end + { + start = hole.end; + // We remove the hole, and continue the iteration... + if (this->remove_hole (i) == -1) + return -1; + break; + } } - else // if (end < hole.end) + else // hole.start < start < hole.end { - // Nasty, we need to insert a new hole... - if (this->insert_hole (i, end, hole.end) == -1) - return -1; - // and change the old hole... - // NOTE: we have to refetch it because the array may - // have been reallocated! - this->hole_list_[i].end = start; - continue; + if (end >= hole.end) + { + // Just adjust the size of the hole... + ACE_UINT32 tmp = hole.end; + hole.end = start; + start = tmp; + break; + } + else // if (end < hole.end) + { + // Nasty, we need to insert a new hole... + if (this->insert_hole (i, end, hole.end) == -1) + return -1; + // and change the old hole... + // NOTE: we have to refetch it because the array may + // have been reallocated! + this->hole_list_[i].end = start; + return 0; + } } } } @@ -150,7 +171,10 @@ ACE_RMCast_Partial_Message::insert_hole (size_t i, ACE_UINT32 start, ACE_UINT32 end) { - if (this->hole_count_ == this->max_hole_count_) + // ACE_DEBUG ((LM_DEBUG, + // "Partial_Message::insert_hole %d = [%d,%d]\n", + // i, start, end)); + if (this->hole_count_ + 1 > this->max_hole_count_) { this->max_hole_count_ *= 2; Hole *tmp; @@ -159,10 +183,15 @@ ACE_RMCast_Partial_Message::insert_hole (size_t i, { tmp[j] = this->hole_list_[j]; } + delete[] this->hole_list_; + this->hole_list_ = tmp; } - for (size_t j = this->hole_count_; j != i + 1; --j) + if (this->hole_count_ != 0) { - this->hole_list_[j] = this->hole_list_[j - 1]; + for (size_t j = this->hole_count_ - 1; j >= i + 1; --j) + { + this->hole_list_[j+1] = this->hole_list_[j]; + } } this->hole_list_[i + 1].start = start; @@ -175,6 +204,9 @@ ACE_RMCast_Partial_Message::insert_hole (size_t i, int ACE_RMCast_Partial_Message::remove_hole (size_t i) { + // ACE_DEBUG ((LM_DEBUG, + // "Partial_Message::remove_hole %d\n", + // i)); for (size_t j = i; j != this->hole_count_ - 1; ++j) this->hole_list_[j] = this->hole_list_[j + 1]; diff --git a/ace/RMCast/RMCast_Partial_Message.h b/ace/RMCast/RMCast_Partial_Message.h index af66435825a..9b71eb4a541 100644 --- a/ace/RMCast/RMCast_Partial_Message.h +++ b/ace/RMCast/RMCast_Partial_Message.h @@ -7,7 +7,7 @@ // multicast library. // // = AUTHOR -// Carlos O'Ryan <coryan@cs.wustl.edu> +// Carlos O'Ryan <coryan@uci.edu> // // ============================================================================ diff --git a/ace/RMCast/RMCast_Reassembly.cpp b/ace/RMCast/RMCast_Reassembly.cpp index be56e6cd9e8..a52791e1ebf 100644 --- a/ace/RMCast/RMCast_Reassembly.cpp +++ b/ace/RMCast/RMCast_Reassembly.cpp @@ -1,34 +1,26 @@ // $Id$ -#ifndef ACE_RMCAST_REASSEMBLY_C -#define ACE_RMCAST_REASSEMBLY_C - #include "RMCast_Reassembly.h" +#include "RMCast_Partial_Message.h" +#include "ace/Message_Block.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "RMCast_Partial_Message.h" - #if !defined (__ACE_INLINE__) #include "RMCast_Reassembly.i" #endif /* __ACE_INLINE__ */ ACE_RCSID(ace, RMCast_Reassembly, "$Id$") - -template <ACE_SYNCH_DECL> -ACE_RMCast_Reassembly<ACE_SYNCH_USE>:: -ACE_RMCast_Reassembly (ACE_Thread_Manager *thr_mgr, - ACE_Message_Queue<ACE_SYNCH_USE> *mq) - : ACE_Task<ACE_SYNCH_USE> (thr_mgr, mq) +ACE_RMCast_Reassembly:: +ACE_RMCast_Reassembly (void) + : ACE_RMCast_Module () { } -template <ACE_SYNCH_DECL> -ACE_RMCast_Reassembly<ACE_SYNCH_USE>:: -~ACE_RMCast_Reassembly (void) +ACE_RMCast_Reassembly::~ACE_RMCast_Reassembly (void) { for (Message_Map_Iterator i = this->messages_.begin (); i != this->messages_.end (); @@ -41,39 +33,30 @@ ACE_RMCast_Reassembly<ACE_SYNCH_USE>:: this->messages_.unbind_all (); } -template <ACE_SYNCH_DECL> int -ACE_RMCast_Reassembly<ACE_SYNCH_USE>::put (ACE_Message_Block *mb, - ACE_Time_Value *tv) +int +ACE_RMCast_Reassembly::put_data (ACE_RMCast::Data &data) { - ACE_UINT32 header[3]; - size_t fragment_header_size = sizeof(header); - - if (mb->length () < fragment_header_size) - ACE_ERROR_RETURN ((LM_ERROR, - "Message block too small, " - "not enough room for the header\n"), - -1); - - ACE_OS::memcpy (header, mb->rd_ptr (), fragment_header_size); - - ACE_UINT32 message_sequence_number = ACE_NTOHL(header[0]); - ACE_UINT32 offset = ACE_NTOHL(header[1]); - ACE_UINT32 message_size = ACE_NTOHL(header[2]); + if (this->next () == 0) + return 0; - if (mb->length () + offset > message_size) - return -1; // Corrupt message? + if (data.payload->length () + data.fragment_offset > data.total_size) + { + ACE_DEBUG ((LM_DEBUG, + "RMCast_Reassembly::put_data - invalid size\n")); + return -1; // Corrupt message? + } ACE_RMCast_Partial_Message *message; { - ACE_GUARD_RETURN (ACE_SYNCH_MUTEX_T, ace_mon, this->mutex_, -1); - if (this->messages_.find (message_sequence_number, message) == -1) + ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, ace_mon, this->mutex_, -1); + if (this->messages_.find (data.sequence_number, message) == -1) { ACE_NEW_RETURN (message, - ACE_RMCast_Partial_Message (message_size), + ACE_RMCast_Partial_Message (data.total_size), -1); - if (this->messages_.bind (message_sequence_number, + if (this->messages_.bind (data.sequence_number, message) == -1) return -1; // Internal error? } @@ -83,26 +66,45 @@ ACE_RMCast_Reassembly<ACE_SYNCH_USE>::put (ACE_Message_Block *mb, if (message == 0) return 0; - if (message->fragment_received (message_size, - offset, - mb) == -1) - return -1; + if (message->fragment_received (data.total_size, + data.fragment_offset, + data.payload) == -1) + { + ACE_DEBUG ((LM_DEBUG, + "Error in fragment_received\n")); + return -1; + } if (!message->is_complete ()) return 0; // Remove the message from the collection, but leave a marker // to indicate that it was already received... - if (this->messages_.rebind (message_sequence_number, 0) == -1) + if (this->messages_.rebind (data.sequence_number, + (ACE_RMCast_Partial_Message*)0) == -1) return -1; } // Push the message... - int r = this->put_next (message->message_body (), tv); + ACE_RMCast::Data downstream_data; + downstream_data.sequence_number = data.sequence_number; + downstream_data.total_size = message->message_body ()->length (); + downstream_data.fragment_offset = 0; + downstream_data.payload = message->message_body (); + + int r = this->next ()->put_data (downstream_data); delete message; return r; } -#endif /* ACE_RMCAST_REASSEMBLY_C */ +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) + +template class ACE_Hash_Map_Manager<ACE_UINT32,ACE_RMCast_Partial_Message*,ACE_Null_Mutex>; +template class ACE_Hash_Map_Manager_Ex<ACE_UINT32,ACE_RMCast_Partial_Message*,ACE_Hash<ACE_UINT32>,ACE_Equal_To<ACE_UINT32>,ACE_Null_Mutex>; +template class ACE_Hash_Map_Iterator<ACE_UINT32,ACE_RMCast_Partial_Message*,ACE_Null_Mutex>; +template class ACE_Hash_Map_Iterator_Base_Ex<ACE_UINT32,ACE_RMCast_Partial_Message*,ACE_Hash<ACE_UINT32>,ACE_Equal_To<ACE_UINT32>,ACE_Null_Mutex >; +template class ACE_Hash_Map_Entry<ACE_UINT32,ACE_RMCast_Partial_Message*>; + +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/ace/RMCast/RMCast_Reassembly.h b/ace/RMCast/RMCast_Reassembly.h index 456c060948a..0982d059c7c 100644 --- a/ace/RMCast/RMCast_Reassembly.h +++ b/ace/RMCast/RMCast_Reassembly.h @@ -6,7 +6,7 @@ // The reassembly task for the reliable multicast library // // = AUTHOR -// Carlos O'Ryan <coryan@cs.wustl.edu> +// Carlos O'Ryan <coryan@uci.edu> // // ============================================================================ @@ -14,9 +14,9 @@ #define ACE_RMCAST_REASSEMBLY_H #include "ace/pre.h" -#include "RMCast_Export.h" -#include "ace/Task.h" +#include "RMCast_Module.h" #include "ace/Hash_Map_Manager.h" +#include "ace/Synch.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once @@ -24,22 +24,20 @@ class ACE_RMCast_Partial_Message; -template <ACE_SYNCH_DECL> -class ACE_RMCast_Export ACE_RMCast_Reassembly : public ACE_Task<ACE_SYNCH_USE> +class ACE_RMCast_Export ACE_RMCast_Reassembly : public ACE_RMCast_Module { public: - ACE_RMCast_Reassembly (ACE_Thread_Manager *thr_mgr = 0, - ACE_Message_Queue<ACE_SYNCH_USE> *mq = 0); + ACE_RMCast_Reassembly (void); // Constructor virtual ~ACE_RMCast_Reassembly (void); // Destructor - // = The ACE_Task methods - int put (ACE_Message_Block *, ACE_Time_Value *timeout = 0); + // = The ACE_RMCast_Module methods + virtual int put_data (ACE_RMCast::Data &data); private: - ACE_SYNCH_MUTEX_T mutex_; + ACE_SYNCH_MUTEX mutex_; typedef ACE_Hash_Map_Manager<ACE_UINT32,ACE_RMCast_Partial_Message*,ACE_Null_Mutex> Message_Map; @@ -55,13 +53,5 @@ private: #include "RMCast_Reassembly.i" #endif /* __ACE_INLINE__ */ -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "RMCast_Reassembly.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ - -#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) -#pragma implementation ("RMCast_Reassembly.cpp") -#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ - #include "ace/post.h" #endif /* ACE_RMCAST_REASSEMBLY_H */ diff --git a/ace/RMCast/RMCast_Reassembly.i b/ace/RMCast/RMCast_Reassembly.i index 74e88caa0c5..cfa1da318d3 100644 --- a/ace/RMCast/RMCast_Reassembly.i +++ b/ace/RMCast/RMCast_Reassembly.i @@ -1,2 +1 @@ // $Id$ - diff --git a/ace/RMCast/RMCast_Sender_Proxy.cpp b/ace/RMCast/RMCast_Sender_Proxy.cpp new file mode 100644 index 00000000000..ff1b7b33f15 --- /dev/null +++ b/ace/RMCast/RMCast_Sender_Proxy.cpp @@ -0,0 +1,20 @@ +// $Id$ + +#include "RMCast_Sender_Proxy.h" +#include "RMCast_Module.h" +#include "ace/Message_Block.h" + +#if !defined (__ACE_INLINE__) +# include "RMCast_Sender_Proxy.i" +#endif /* ! __ACE_INLINE__ */ + +ACE_RCSID(ace, RMCast_Sender_Proxy, "$Id$") + +ACE_RMCast_Sender_Proxy::ACE_RMCast_Sender_Proxy (ACE_RMCast_Module *module) + : module_ (module) +{ +} + +ACE_RMCast_Sender_Proxy::~ACE_RMCast_Sender_Proxy (void) +{ +} diff --git a/ace/RMCast/RMCast_Sender_Proxy.h b/ace/RMCast/RMCast_Sender_Proxy.h new file mode 100644 index 00000000000..c6b51f78b48 --- /dev/null +++ b/ace/RMCast/RMCast_Sender_Proxy.h @@ -0,0 +1,61 @@ +/* -*- C++ -*- */ +// $Id$ + +// ============================================================================ +// +// = LIBRARY +// ace +// +// = FILENAME +// RMCast_Sender_Proxy.h +// +// = AUTHOR +// Carlos O'Ryan <coryan@uci.edu> +// +// ============================================================================ + +#ifndef ACE_RMCAST_SENDER_PROXY_H +#define ACE_RMCAST_SENDER_PROXY_H +#include "ace/pre.h" + +#include "RMCast.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +class ACE_RMCast_Module; + +class ACE_RMCast_Export ACE_RMCast_Sender_Proxy +{ + // = TITLE + // Reliable Multicast Sender Ambassador + // + // = DESCRIPTION + // Implement an Ambassador for the reliable multicast senders. + // +public: + ACE_RMCast_Sender_Proxy (ACE_RMCast_Module *module); + // Constructor + + virtual ~ACE_RMCast_Sender_Proxy (void); + // Destructor + + ACE_RMCast_Module *module (void) const; + // Return the internal module + + virtual int receive_message (char *buffer, size_t size) = 0; + // A new message has been received, process it + +private: + ACE_RMCast_Module *module_; + // Process the data, control messages are processed by the Sender + // proxy +}; + +#if defined (__ACE_INLINE__) +#include "RMCast_Sender_Proxy.i" +#endif /* __ACE_INLINE__ */ + +#include "ace/post.h" +#endif /* ACE_RMCAST_SENDER_PROXY_H */ diff --git a/ace/RMCast/RMCast_Sender_Proxy.i b/ace/RMCast/RMCast_Sender_Proxy.i new file mode 100644 index 00000000000..b47573711ea --- /dev/null +++ b/ace/RMCast/RMCast_Sender_Proxy.i @@ -0,0 +1,7 @@ +// $Id$ + +ACE_INLINE ACE_RMCast_Module * +ACE_RMCast_Sender_Proxy::module (void) const +{ + return this->module_; +} diff --git a/ace/RMCast/RMCast_Sender_Proxy_Best_Effort.cpp b/ace/RMCast/RMCast_Sender_Proxy_Best_Effort.cpp new file mode 100644 index 00000000000..ba525f245bc --- /dev/null +++ b/ace/RMCast/RMCast_Sender_Proxy_Best_Effort.cpp @@ -0,0 +1,72 @@ +// $Id$ + +#include "RMCast_Sender_Proxy_Best_Effort.h" +#include "RMCast_Module.h" +#include "ace/Message_Block.h" + +#if !defined (__ACE_INLINE__) +# include "RMCast_Sender_Proxy_Best_Effort.i" +#endif /* ! __ACE_INLINE__ */ + +ACE_RCSID(ace, RMCast_Sender_Proxy_Best_Effort, "$Id$") + +ACE_RMCast_Sender_Proxy_Best_Effort:: + ACE_RMCast_Sender_Proxy_Best_Effort (ACE_RMCast_Module *module) + : ACE_RMCast_Sender_Proxy (module) +{ +} + +ACE_RMCast_Sender_Proxy_Best_Effort:: + ~ACE_RMCast_Sender_Proxy_Best_Effort (void) +{ +} + +int +ACE_RMCast_Sender_Proxy_Best_Effort::receive_message (char *buffer, + size_t size) +{ + int type = buffer[0]; + + // All control messages are ignored... + if (type != ACE_RMCast::MT_DATA) + return 0; + + // @@ Push the event through the stack +#if 0 + ACE_DEBUG ((LM_DEBUG, + "Proxy(%x) - received data\n", long(this))); + ACE_HEX_DUMP ((LM_DEBUG, buffer, header, "Proxy")); +#endif + + const size_t header_size = 1 + 3 * sizeof(ACE_UINT32); + if (size < header_size) + { + // The message is too small + return 0; + } + + ACE_UINT32 tmp; + + ACE_RMCast::Data data; + + ACE_OS::memcpy (&tmp, buffer + 1, + sizeof(tmp)); + data.sequence_number = ACE_NTOHL (tmp); + + ACE_OS::memcpy (&tmp, buffer + 1 + sizeof(tmp), + sizeof(tmp)); + data.total_size = ACE_NTOHL (tmp); + + ACE_OS::memcpy (&tmp, buffer + 1 + 2 * sizeof(tmp), + sizeof(tmp)); + data.fragment_offset = ACE_NTOHL (tmp); + + // Pass it up the module... + ACE_Message_Block *mb; + ACE_NEW_RETURN (mb, ACE_Message_Block, -1); + mb->size (size - header_size); + mb->copy (buffer + header_size, size - header_size); + + data.payload = mb; + return this->module ()->put_data (data); +} diff --git a/ace/RMCast/RMCast_Sender_Proxy_Best_Effort.h b/ace/RMCast/RMCast_Sender_Proxy_Best_Effort.h new file mode 100644 index 00000000000..304e026afc3 --- /dev/null +++ b/ace/RMCast/RMCast_Sender_Proxy_Best_Effort.h @@ -0,0 +1,53 @@ +/* -*- C++ -*- */ +// $Id$ + +// ============================================================================ +// +// = LIBRARY +// ace +// +// = FILENAME +// RMCast_Sender_Proxy_Best_Effort.h +// +// = AUTHOR +// Carlos O'Ryan <coryan@uci.edu> +// +// ============================================================================ + +#ifndef ACE_RMCAST_SENDER_PROXY_BEST_EFFORT_H +#define ACE_RMCAST_SENDER_PROXY_BEST_EFFORT_H +#include "ace/pre.h" + +#include "RMCast_Sender_Proxy.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +class ACE_RMCast_Module; + +class ACE_RMCast_Export ACE_RMCast_Sender_Proxy_Best_Effort : public ACE_RMCast_Sender_Proxy +{ + // = TITLE + // Reliable Multicast Sender Ambassador + // + // = DESCRIPTION + // Implement an Ambassador for the reliable multicast senders. + // +public: + ACE_RMCast_Sender_Proxy_Best_Effort (ACE_RMCast_Module *module); + // Constructor + + ~ACE_RMCast_Sender_Proxy_Best_Effort (void); + // Destructor + + virtual int receive_message (char *buffer, size_t size); + // A DATA message was received. +}; + +#if defined (__ACE_INLINE__) +#include "RMCast_Sender_Proxy_Best_Effort.i" +#endif /* __ACE_INLINE__ */ + +#include "ace/post.h" +#endif /* ACE_RMCAST_SENDER_PROXY_BEST_EFFORT_H */ diff --git a/ace/RMCast/RMCast_Sender_Proxy_Best_Effort.i b/ace/RMCast/RMCast_Sender_Proxy_Best_Effort.i new file mode 100644 index 00000000000..cfa1da318d3 --- /dev/null +++ b/ace/RMCast/RMCast_Sender_Proxy_Best_Effort.i @@ -0,0 +1 @@ +// $Id$ diff --git a/ace/RMCast/RMCast_Sender_Proxy_Factory.cpp b/ace/RMCast/RMCast_Sender_Proxy_Factory.cpp new file mode 100644 index 00000000000..48a82b5dfbc --- /dev/null +++ b/ace/RMCast/RMCast_Sender_Proxy_Factory.cpp @@ -0,0 +1,13 @@ +// $Id$ + +#include "RMCast_Sender_Proxy_Factory.h" + +#if !defined (__ACE_INLINE__) +# include "RMCast_Sender_Proxy_Factory.i" +#endif /* ! __ACE_INLINE__ */ + +ACE_RCSID(ace, RMCast_Sender_Proxy_Factory, "$Id$") + +ACE_RMCast_Sender_Proxy_Factory::~ACE_RMCast_Sender_Proxy_Factory (void) +{ +} diff --git a/ace/RMCast/RMCast_Sender_Proxy_Factory.h b/ace/RMCast/RMCast_Sender_Proxy_Factory.h new file mode 100644 index 00000000000..7dff4d2796f --- /dev/null +++ b/ace/RMCast/RMCast_Sender_Proxy_Factory.h @@ -0,0 +1,55 @@ +/* -*- C++ -*- */ +// $Id$ + +// ============================================================================ +// +// = LIBRARY +// ace +// +// = FILENAME +// RMCast_Sender_Proxy_Factory.h +// +// = AUTHOR +// Carlos O'Ryan <coryan@uci.edu> +// +// ============================================================================ + +#ifndef ACE_RMCAST_SENDER_PROXY_FACTORY_H +#define ACE_RMCAST_SENDER_PROXY_FACTORY_H +#include "ace/pre.h" + +#include "RMCast.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +class ACE_RMCast_Sender_Proxy; + +class ACE_RMCast_Export ACE_RMCast_Sender_Proxy_Factory +{ + // = DESCRIPTION + // Defines the interface to create Sender_Proxies. + // The application provides a Sender_Proxy_Factory, this is used + // by the receiver side to create a different proxy for each + // remote sender. The application configures the proxy with the + // correct modules to process incoming events and achieve the + // desired level of reliability. + // +public: + virtual ~ACE_RMCast_Sender_Proxy_Factory (void); + // Destructor + + virtual ACE_RMCast_Sender_Proxy *create (void) = 0; + // Create a new proxy + + virtual void destroy (ACE_RMCast_Sender_Proxy *) = 0; + // Destroy a proxy +}; + +#if defined (__ACE_INLINE__) +#include "RMCast_Sender_Proxy_Factory.i" +#endif /* __ACE_INLINE__ */ + +#include "ace/post.h" +#endif /* ACE_RMCAST_SENDER_PROXY_FACTORY_H */ diff --git a/ace/RMCast/RMCast_Sender_Proxy_Factory.i b/ace/RMCast/RMCast_Sender_Proxy_Factory.i new file mode 100644 index 00000000000..cfa1da318d3 --- /dev/null +++ b/ace/RMCast/RMCast_Sender_Proxy_Factory.i @@ -0,0 +1 @@ +// $Id$ diff --git a/ace/RMCast/RMCast_UDP_Event_Handler.cpp b/ace/RMCast/RMCast_UDP_Event_Handler.cpp new file mode 100644 index 00000000000..69cfc337113 --- /dev/null +++ b/ace/RMCast/RMCast_UDP_Event_Handler.cpp @@ -0,0 +1,36 @@ +// +// $Id$ +// + +#include "RMCast_UDP_Event_Handler.h" +#include "RMCast_UDP_Receiver.h" + +#if !defined (__ACE_INLINE__) +# include "RMCast_UDP_Event_Handler.i" +#endif /* ! __ACE_INLINE__ */ + +ACE_RCSID(ace, RMCast_Event_Handler, "$Id$") + +ACE_RMCast_UDP_Event_Handler::~ACE_RMCast_UDP_Event_Handler (void) +{ +} + +ACE_HANDLE +ACE_RMCast_UDP_Event_Handler::get_handle (void) const +{ + return this->receiver_->get_handle (); +} + +int +ACE_RMCast_UDP_Event_Handler::handle_input (ACE_HANDLE h) +{ + return this->receiver_->handle_input (h); +} + +int +ACE_RMCast_UDP_Event_Handler::handle_timeout (const ACE_Time_Value &, + const void *) +{ + // @@ return this->receiver_->handle_timeout (); + return 0; +} diff --git a/ace/RMCast/RMCast_UDP_Event_Handler.h b/ace/RMCast/RMCast_UDP_Event_Handler.h new file mode 100644 index 00000000000..193d7038cd8 --- /dev/null +++ b/ace/RMCast/RMCast_UDP_Event_Handler.h @@ -0,0 +1,53 @@ +// $Id$ + +// ============================================================================ +// +// = DESCRIPTION +// Implement an adapter between the ACE Reactor and the +// ACE_RMCast_UDP_Receiver +// +// = AUTHOR +// Carlos O'Ryan <coryan@uci.edu> +// +// ============================================================================ + +#ifndef ACE_RMCAST_UDP_EVENT_HANDLER_H +#define ACE_RMCAST_UDP_EVENT_HANDLER_H +#include "ace/pre.h" + +#include "RMCast_Export.h" +#include "ace/Event_Handler.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +class ACE_RMCast_UDP_Receiver; +class ACE_INET_Addr; + +class ACE_RMCast_Export ACE_RMCast_UDP_Event_Handler : public ACE_Event_Handler +{ +public: + ACE_RMCast_UDP_Event_Handler (ACE_RMCast_UDP_Receiver *receiver); + // Constructor + + ~ACE_RMCast_UDP_Event_Handler (void); + // Destructor + + // = The Event_Handler methods + virtual ACE_HANDLE get_handle (void) const; + virtual int handle_input (ACE_HANDLE fd = ACE_INVALID_HANDLE); + virtual int handle_timeout (const ACE_Time_Value ¤t_time, + const void *act = 0); + +private: + ACE_RMCast_UDP_Receiver *receiver_; + // The sender +}; + +#if defined (__ACE_INLINE__) +#include "RMCast_UDP_Event_Handler.i" +#endif /* __ACE_INLINE__ */ + +#include "ace/post.h" +#endif /* ACE_RMCAST_UDP_EVENT_HANDLER_H */ diff --git a/ace/RMCast/RMCast_UDP_Event_Handler.i b/ace/RMCast/RMCast_UDP_Event_Handler.i new file mode 100644 index 00000000000..b35aeefa3f4 --- /dev/null +++ b/ace/RMCast/RMCast_UDP_Event_Handler.i @@ -0,0 +1,9 @@ +// $Id$ + +ACE_INLINE +ACE_RMCast_UDP_Event_Handler:: +ACE_RMCast_UDP_Event_Handler (ACE_RMCast_UDP_Receiver *receiver) + : receiver_ (receiver) +{ +} + diff --git a/ace/RMCast/RMCast_UDP_Receiver.cpp b/ace/RMCast/RMCast_UDP_Receiver.cpp new file mode 100644 index 00000000000..eeb03f50bcf --- /dev/null +++ b/ace/RMCast/RMCast_UDP_Receiver.cpp @@ -0,0 +1,241 @@ +// +// $Id$ +// + +#include "RMCast_UDP_Receiver.h" +#include "RMCast_Sender_Proxy.h" +#include "RMCast_Sender_Proxy_Factory.h" +#include "ace/Handle_Set.h" +#include "ace/Reactor.h" + +#if !defined (__ACE_INLINE__) +# include "RMCast_UDP_Receiver.i" +#endif /* ! __ACE_INLINE__ */ + +ACE_RCSID(ace, RMCast_Receiver, "$Id$") + +ACE_RMCast_UDP_Receiver::~ACE_RMCast_UDP_Receiver (void) +{ +} + +int +ACE_RMCast_UDP_Receiver::subscribe (const ACE_INET_Addr &mcast_addr, + int reuse_addr, + const ACE_TCHAR *net_if, + int protocol_family, + int protocol) +{ + return this->dgram_.subscribe (mcast_addr, + reuse_addr, + net_if, + protocol_family, + protocol); +} + +int +ACE_RMCast_UDP_Receiver::handle_events (ACE_Time_Value *tv) +{ + ACE_HANDLE h = this->dgram_.get_handle (); + if (h == ACE_INVALID_HANDLE) + return -1; + + ACE_Handle_Set handle_set; + handle_set.set_bit (h); + + ACE_Countdown_Time countdown (tv); + + int r = ACE_OS::select (int(h) + 1, + handle_set, 0, 0, + tv); + if (r == -1) + { + if (errno == EINTR) + return 0; + else + return -1; + } + else if (r == 0) + { + return 0; + } + + return this->handle_input (h); +} + +int +ACE_RMCast_UDP_Receiver::register_handlers (ACE_Reactor *reactor) +{ + this->eh_.reactor (reactor); + return reactor->register_handler (&this->eh_, + ACE_Event_Handler::READ_MASK); +} + +int +ACE_RMCast_UDP_Receiver::remove_handlers (void) +{ + ACE_Reactor *r = this->eh_.reactor (); + if (r != 0) + { + r->remove_handler (&this->eh_, + ACE_Event_Handler::ALL_EVENTS_MASK + | ACE_Event_Handler::DONT_CALL); + this->eh_.reactor (0); + } + return 0; +} + +int +ACE_RMCast_UDP_Receiver::handle_input (ACE_HANDLE) +{ + // @@ We should use a system constant instead of this literal + const int max_udp_packet_size = 65536; + char buffer[max_udp_packet_size]; + + ACE_INET_Addr from_address; + ssize_t r = + this->dgram_.recv (buffer, sizeof(buffer), from_address); + + if (r == -1) + { + // @@ LOG?? + ACE_DEBUG ((LM_DEBUG, + "RMCast_UDP_Receiver::handle_input () - " + "error in recv\n")); + return -1; + } + + // ACE_HEX_DUMP ((LM_DEBUG, buffer, 16, "Receiver::handle_input")); + + // @@ Locking! + + int type = buffer[0]; + + ACE_RMCast_Sender_Proxy *sender_proxy; + if (this->map_.find (from_address, sender_proxy) != 0) + { + // State == RS_NON_EXISTENT + + if (type == ACE_RMCast::MT_ACK + || type == ACE_RMCast::MT_JOIN + || type == ACE_RMCast::MT_LEAVE + || type == ACE_RMCast::MT_ACK_LEAVE) + { + // All these message types indicate a problem, the should be + // generated by receivers, not received by them. + return 0; + } + + // The message type is valid, we must create a new proxy, + // initially in the JOINING state... + sender_proxy = + this->factory_->create (); + if (sender_proxy == 0) + { + // @@ LOG?? + return 0; + } + if (this->map_.bind (from_address, sender_proxy) != 0) + { + // @@ LOG?? + return 0; + } + + // Send back a JOIN message... + return sender_proxy->receive_message (buffer, r); + } + + if (type == ACE_RMCast::MT_ACK + || type == ACE_RMCast::MT_JOIN + || type == ACE_RMCast::MT_LEAVE + || type == ACE_RMCast::MT_ACK_LEAVE + || type < 0 + || type >= ACE_RMCast::MT_LAST) + { + // In this case the message is invalid, but the proxy is already + // in the table, must destroy it because there was a violation + // in the protocol.... + + this->factory_->destroy (sender_proxy); + this->map_.unbind (from_address); + return 0; + } + + return sender_proxy->receive_message (buffer, r); +} + +ACE_HANDLE +ACE_RMCast_UDP_Receiver::get_handle (void) const +{ + return this->dgram_.get_handle (); +} + +#if 0 +int +ACE_RMCast_UDP_Receiver::send_join (ACE_INET_Addr &from) +{ + char buffer[16]; + buffer[0] = ACE_RMCast::MT_JOIN; + + ACE_SOCK_Dgram &dgram = this->dgram_; + ssize_t r = dgram.send (buffer, 1, from); + + if (r == -1) + return -1; + + return 0; +} + +int +ACE_RMCast_UDP_Receiver::send_ack (ACE_RMCast_Sender_Proxy *sender_proxy, + ACE_INET_Addr &from) +{ + char buffer[16]; + buffer[0] = ACE_RMCast::MT_ACK; + + ACE_UINT32 expected = sender_proxy->expected (); + expected = ACE_HTONL (expected); + + ACE_UINT32 last_received = sender_proxy->last_received (); + last_received = ACE_HTONL (last_received); + + ACE_OS::memcpy (buffer + 1, &expected, sizeof(expected)); + ACE_OS::memcpy (buffer + 1 + sizeof(expected), &last_received, + sizeof(last_received)); + + ACE_SOCK_Dgram &dgram = this->dgram_; + ssize_t r = dgram.send (buffer, + + sizeof(expected) + + sizeof(last_received), + from); + + if (r == -1) + return -1; + + return 0; +} + +int +ACE_RMCast_UDP_Receiver::send_leave (ACE_INET_Addr &from) +{ + char buffer[16]; + buffer[0] = ACE_RMCast::MT_LEAVE; + + ACE_SOCK_Dgram &dgram = this->dgram_; + ssize_t r = dgram.send (buffer, 1, from); + + if (r == -1) + return -1; + + return 0; +} +#endif /* 0 */ + +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) + +template class ACE_Hash_Map_Manager<ACE_INET_Addr,ACE_RMCast_Sender_Proxy*,ACE_Null_Mutex>; +template class ACE_Hash_Map_Manager_Ex<ACE_INET_Addr,ACE_RMCast_Sender_Proxy*,ACE_Hash<ACE_INET_Addr>,ACE_Equal_To<ACE_INET_Addr>,ACE_Null_Mutex>; +template class ACE_Hash_Map_Iterator<ACE_INET_Addr,ACE_RMCast_Sender_Proxy*,ACE_Null_Mutex>; +template class ACE_Hash_Map_Iterator_Base_Ex<ACE_INET_Addr,ACE_RMCast_Sender_Proxy*,ACE_Hash<ACE_INET_Addr>,ACE_Equal_To<ACE_INET_Addr>,ACE_Null_Mutex>; +template class ACE_Hash_Map_Entry<ACE_INET_Addr,ACE_RMCast_Sender_Proxy*>; + +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/ace/RMCast/RMCast_UDP_Receiver.h b/ace/RMCast/RMCast_UDP_Receiver.h new file mode 100644 index 00000000000..bfc56d89705 --- /dev/null +++ b/ace/RMCast/RMCast_UDP_Receiver.h @@ -0,0 +1,102 @@ +// $Id$ + +// ============================================================================ +// +// = DESCRIPTION +// Encapsulate the I/O layer for a UDP based receiver +// +// = AUTHOR +// Carlos O'Ryan <coryan@uci.edu> +// +// ============================================================================ + +#ifndef ACE_RMCAST_UDP_RECEIVER_H +#define ACE_RMCAST_UDP_RECEIVER_H +#include "ace/pre.h" + +#include "RMCast_UDP_Event_Handler.h" +#include "ace/SOCK_Dgram_Mcast.h" +#include "ace/Hash_Map_Manager.h" +#include "ace/Synch.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +class ACE_RMCast_Sender_Proxy; +class ACE_RMCast_Sender_Proxy_Factory; +class ACE_Reactor; +class ACE_Time_Value; +class ACE_INET_Addr; + +class ACE_RMCast_Export ACE_RMCast_UDP_Receiver +{ +public: + ACE_RMCast_UDP_Receiver (ACE_RMCast_Sender_Proxy_Factory *factory); + // Constructor + // <factory> is used to create the Sender_Proxy and Modules that + // process incoming messages. + // The caller owns <factory>. + + ~ACE_RMCast_UDP_Receiver (void); + // Destructor + + int subscribe (const ACE_INET_Addr &mcast_addr, + int reuse_addr = 1, + const ACE_TCHAR *net_if = 0, + int protocol_family = PF_INET, + int protocol = 0); + // Start receiving data for the <mcast_addr> multicast group. + // Please read the documentation of <ACE_SOCK_Dgram_Mcast> for more + // details. + + // The class can be used with a Reactor or using blocking I/O + // depending on what method of the following two is called. + + int handle_events (ACE_Time_Value *tv = 0); + // Wait for events for the period <tv>. If <tv> is zero it blocks + // forever. + + int register_handlers (ACE_Reactor *reactor); + // Register any event handlers into <reactor> + + int remove_handlers (void); + // Remove all the handlers from the reactor + + int handle_input (ACE_HANDLE h); + // There is data to read, read it and process it. + + ACE_HANDLE get_handle (void) const; + // Obtain the handle for the underlying socket + +private: + int send_join (ACE_INET_Addr &from); + // Send a JOIN message + + int send_ack (ACE_RMCast_Sender_Proxy *sender_proxy, + ACE_INET_Addr &from); + // Send an ACK message + + int send_leave (ACE_INET_Addr &from); + // Send a LEAVE messsage + +private: + ACE_RMCast_Sender_Proxy_Factory *factory_; + // The factory used to create Sender proxies + + ACE_SOCK_Dgram_Mcast dgram_; + // The socket + + typedef ACE_Hash_Map_Manager<ACE_INET_Addr,ACE_RMCast_Sender_Proxy*,ACE_Null_Mutex> Map; + Map map_; + + ACE_RMCast_UDP_Event_Handler eh_; + // The event handler adapter +}; + +#if defined (__ACE_INLINE__) +#include "RMCast_UDP_Receiver.i" +#endif /* __ACE_INLINE__ */ + +#include "ace/post.h" +#endif /* ACE_RMCAST_UDP_RECEIVER_H */ diff --git a/ace/RMCast/RMCast_UDP_Receiver.i b/ace/RMCast/RMCast_UDP_Receiver.i new file mode 100644 index 00000000000..81aeb8e2752 --- /dev/null +++ b/ace/RMCast/RMCast_UDP_Receiver.i @@ -0,0 +1,9 @@ +// $Id$ + +ACE_INLINE +ACE_RMCast_UDP_Receiver:: + ACE_RMCast_UDP_Receiver (ACE_RMCast_Sender_Proxy_Factory *factory) + : factory_ (factory) + , eh_ (this) +{ +} diff --git a/ace/RMCast/RMCast_UDP_Sender.cpp b/ace/RMCast/RMCast_UDP_Sender.cpp new file mode 100644 index 00000000000..c02ad6fb9cf --- /dev/null +++ b/ace/RMCast/RMCast_UDP_Sender.cpp @@ -0,0 +1,91 @@ +// +// $Id$ +// + +#include "RMCast_UDP_Sender.h" +#include "RMCast.h" +#include "ace/Message_Block.h" + +#if !defined (__ACE_INLINE__) +# include "RMCast_UDP_Sender.i" +#endif /* ! __ACE_INLINE__ */ + +ACE_RCSID(ace, RMCast_UDP_Sender, "$Id$") + +ACE_RMCast_UDP_Sender::ACE_RMCast_UDP_Sender (const ACE_INET_Addr &mcast_addr) + : ACE_RMCast_Module () + , mcast_addr_ (mcast_addr) +{ +} + +ACE_RMCast_UDP_Sender::~ACE_RMCast_UDP_Sender (void) +{ +} + +int +ACE_RMCast_UDP_Sender::open (void) +{ + return this->dgram_.open (ACE_Addr::sap_any); +} + +int +ACE_RMCast_UDP_Sender::close (void) +{ + return this->dgram_.close (); +} + +int +ACE_RMCast_UDP_Sender::put_data (ACE_RMCast::Data &data) +{ + // The first message block contains the header + // @@ TODO: We could keep the header pre-initialized, and only + // update the portions that do change... + ACE_UINT32 tmp; + char header[1 + 3 * sizeof(ACE_UINT32)]; + header[0] = ACE_RMCast::MT_DATA; + + tmp = ACE_HTONL (data.sequence_number); + ACE_OS::memcpy (header + 1, + &tmp, sizeof(ACE_UINT32)); + tmp = ACE_HTONL (data.total_size); + ACE_OS::memcpy (header + 1 + sizeof(ACE_UINT32), + &tmp, sizeof(ACE_UINT32)); + tmp = ACE_HTONL (data.fragment_offset); + ACE_OS::memcpy (header + 1 + 2 * sizeof(ACE_UINT32), + &tmp, sizeof(ACE_UINT32)); + + iovec iov[IOV_MAX]; + int iovcnt = 1; + + iov[0].iov_base = header; + iov[0].iov_len = sizeof(header); + + ACE_Message_Block *mb = data.payload; + + for (const ACE_Message_Block *i = mb; i != 0; i = i->cont ()) + { + iov[iovcnt].iov_base = i->rd_ptr (); + iov[iovcnt].iov_len = i->length (); + iovcnt++; + if (iovcnt >= IOV_MAX) + return -1; + } + + ACE_Time_Value tv (0, 10000); + ACE_OS::sleep (tv); + if (this->dgram_.send (iov, iovcnt, + this->mcast_addr_) == -1) + return -1; + +#if 0 + ACE_HEX_DUMP ((LM_DEBUG, + (char*)iov[0].iov_base, iov[0].iov_len, "Sending")); +#endif + + return 0; +} + + +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) + +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/ace/RMCast/RMCast_UDP_Sender.h b/ace/RMCast/RMCast_UDP_Sender.h new file mode 100644 index 00000000000..474ebbc7f27 --- /dev/null +++ b/ace/RMCast/RMCast_UDP_Sender.h @@ -0,0 +1,70 @@ +/* -*- C++ -*- */ +// $Id$ + +// ============================================================================ +// +// = LIBRARY +// ace +// +// = FILENAME +// RMCast_UDP_Sender.h +// +// = AUTHOR +// Carlos O'Ryan <coryan@uci.edu> +// +// ============================================================================ + +#ifndef ACE_RMCAST_UDP_SENDER_H +#define ACE_RMCAST_UDP_SENDER_H +#include "ace/pre.h" + +#include "RMCast_Module.h" +#include "ace/SOCK_Dgram.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +class ACE_RMCast_Export ACE_RMCast_UDP_Sender : public ACE_RMCast_Module +{ + // = TITLE + // Reliable Multicast UDP_Sender + // + // = DESCRIPTION + // Implements a Facade to the classes that implement a reliable + // multicast protocol. +public: + // = Initialization and termination methods. + ACE_RMCast_UDP_Sender (const ACE_INET_Addr &mcast_addr); + // Constructor + + virtual ~ACE_RMCast_UDP_Sender (void); + // Destructor + + // = The RMCast_Module methods + virtual int open (void); + virtual int close (void); + virtual int put_data (ACE_RMCast::Data &data); + // Send the Message block, this is the callback invoked at the end + // of the stack. + +protected: + ACE_SOCK_Dgram dgram_; + // This is the socket used to send the multicast data. + // @@ This should be strategized, what if we want to use something + // like ATM networks to send the data, then the types would be + // different.... + + ACE_INET_Addr mcast_addr_; + // The multicast group we send to. + // @@ Can we really strategize the addressing, without introducing + // too much complexity? How can we decouple the reliability aspect + // from the transport aspects of the system??? +}; + +#if defined (__ACE_INLINE__) +#include "RMCast_UDP_Sender.i" +#endif /* __ACE_INLINE__ */ + +#include "ace/post.h" +#endif /* ACE_RMCAST_UDP_SENDER_H */ diff --git a/ace/RMCast/RMCast_UDP_Sender.i b/ace/RMCast/RMCast_UDP_Sender.i new file mode 100644 index 00000000000..cfa1da318d3 --- /dev/null +++ b/ace/RMCast/RMCast_UDP_Sender.i @@ -0,0 +1 @@ +// $Id$ |