diff options
author | gthaker <gthaker@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-04-10 15:39:49 +0000 |
---|---|---|
committer | gthaker <gthaker@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-04-10 15:39:49 +0000 |
commit | b9dc8a6d0a3d38bd54306a1626cf3a88877d95b8 (patch) | |
tree | 277089292dfdd3c4fba24e426fa7d11c69cdf3b9 /tests | |
parent | 8a233c6bf4825ca485086a73f63ca10898ef5967 (diff) | |
download | ATCD-b9dc8a6d0a3d38bd54306a1626cf3a88877d95b8.tar.gz |
Jason Cohen <jcohen@atl.lmco.com>:
First SCTP checkin for ACE. The major contrib of this
checkin include the SOCK_SEQPACK classes, Multihomed_INET_Addr,
SCTP performance tests, and READMEs.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile | 263 | ||||
-rw-r--r-- | tests/Multihomed_INET_Addr_Test.cpp | 469 | ||||
-rw-r--r-- | tests/Multihomed_INET_Addr_Test.dsp | 155 | ||||
-rw-r--r-- | tests/RMCast/Makefile | 81 | ||||
-rw-r--r-- | tests/SOCK_SEQPACK_Association_Test.cpp | 153 | ||||
-rw-r--r-- | tests/SOCK_SEQPACK_Association_Test.dsp | 155 | ||||
-rw-r--r-- | tests/run_test.lst | 1 | ||||
-rw-r--r-- | tests/run_tests.bat | 1 |
8 files changed, 1216 insertions, 62 deletions
diff --git a/tests/Makefile b/tests/Makefile index fd11dbf1a6c..8040959da67 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -65,6 +65,7 @@ BIN = ACE_Test \ Message_Queue_Test_Ex \ Message_Queue_Notifications_Test \ Multicast_Test \ + Multihomed_INET_Addr_Test \ Notify_Performance_Test \ Object_Manager_Test \ Obstack_Test \ @@ -101,6 +102,7 @@ BIN = ACE_Test \ SOCK_Test \ SOCK_Connector_Test \ SOCK_Send_Recv_Test \ + SOCK_SEQPACK_Association_Test \ SPIPE_Test \ SString_Test \ SV_Shared_Memory_Test \ @@ -258,8 +260,7 @@ realclean: clean .obj/ACE_Test.o .obj/ACE_Test.so .shobj/ACE_Test.o .shobj/ACE_Test.so: ACE_Test.cpp $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/pre.h \ - $(ACE_ROOT)/ace/OS.h \ + $(ACE_ROOT)/ace/pre.h $(ACE_ROOT)/ace/OS.h \ $(ACE_ROOT)/ace/post.h \ $(ACE_ROOT)/ace/ace_wchar.h \ $(ACE_ROOT)/ace/ace_wchar.inl \ @@ -813,8 +814,7 @@ realclean: clean $(ACE_ROOT)/ace/Thread_Manager.i .obj/Basic_Types_Test.o .obj/Basic_Types_Test.so .shobj/Basic_Types_Test.o .shobj/Basic_Types_Test.so: Basic_Types_Test.cpp \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/pre.h \ + $(ACE_ROOT)/ace/OS.h $(ACE_ROOT)/ace/pre.h \ $(ACE_ROOT)/ace/post.h \ $(ACE_ROOT)/ace/ace_wchar.h \ $(ACE_ROOT)/ace/ace_wchar.inl \ @@ -1144,8 +1144,7 @@ realclean: clean $(ACE_ROOT)/ace/Stream.cpp .obj/Cache_Map_Manager_Test.o .obj/Cache_Map_Manager_Test.so .shobj/Cache_Map_Manager_Test.o .shobj/Cache_Map_Manager_Test.so: Cache_Map_Manager_Test.cpp \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/pre.h \ + $(ACE_ROOT)/ace/OS.h $(ACE_ROOT)/ace/pre.h \ $(ACE_ROOT)/ace/post.h \ $(ACE_ROOT)/ace/ace_wchar.h \ $(ACE_ROOT)/ace/ace_wchar.inl \ @@ -1305,8 +1304,7 @@ realclean: clean $(ACE_ROOT)/ace/Array_Base.cpp \ $(ACE_ROOT)/ace/Containers_T.i \ $(ACE_ROOT)/ace/Containers_T.cpp \ - $(ACE_ROOT)/ace/Get_Opt.i \ - Cache_Map_Manager_Test.h + $(ACE_ROOT)/ace/Get_Opt.i Cache_Map_Manager_Test.h .obj/Cached_Accept_Conn_Test.o .obj/Cached_Accept_Conn_Test.so .shobj/Cached_Accept_Conn_Test.o .shobj/Cached_Accept_Conn_Test.so: Cached_Accept_Conn_Test.cpp test_config.h \ $(ACE_ROOT)/ace/pre.h \ @@ -2383,8 +2381,7 @@ realclean: clean $(ACE_ROOT)/ace/Unbounded_Queue.inl \ $(ACE_ROOT)/ace/Unbounded_Queue.cpp \ $(ACE_ROOT)/ace/Containers_T.i \ - $(ACE_ROOT)/ace/Containers_T.cpp \ - Collection_Test.h + $(ACE_ROOT)/ace/Containers_T.cpp Collection_Test.h .obj/Config_Test.o .obj/Config_Test.so .shobj/Config_Test.o .shobj/Config_Test.so: Config_Test.cpp test_config.h \ $(ACE_ROOT)/ace/pre.h \ @@ -2453,8 +2450,8 @@ realclean: clean $(ACE_ROOT)/ace/ACE.i \ $(ACE_ROOT)/ace/Framework_Component_T.h \ $(ACE_ROOT)/ace/Framework_Component_T.inl \ - $(ACE_ROOT)/ace/Framework_Component_T.cpp \ - Config_Test.h $(ACE_ROOT)/ace/Configuration.h \ + $(ACE_ROOT)/ace/Framework_Component_T.cpp Config_Test.h \ + $(ACE_ROOT)/ace/Configuration.h \ $(ACE_ROOT)/ace/SString.h \ $(ACE_ROOT)/ace/String_Base.h \ $(ACE_ROOT)/ace/String_Base_Const.h \ @@ -3880,8 +3877,7 @@ realclean: clean $(ACE_ROOT)/ace/Atomic_Op_T.cpp \ $(ACE_ROOT)/ace/Atomic_Op.i -.obj/Get_Opt_Test.o .obj/Get_Opt_Test.so .shobj/Get_Opt_Test.o .shobj/Get_Opt_Test.so: Get_Opt_Test.cpp \ - $(ACE_ROOT)/ace/OS.h \ +.obj/Get_Opt_Test.o .obj/Get_Opt_Test.so .shobj/Get_Opt_Test.o .shobj/Get_Opt_Test.so: Get_Opt_Test.cpp $(ACE_ROOT)/ace/OS.h \ $(ACE_ROOT)/ace/pre.h \ $(ACE_ROOT)/ace/post.h \ $(ACE_ROOT)/ace/ace_wchar.h \ @@ -4915,8 +4911,7 @@ realclean: clean $(ACE_ROOT)/ace/Active_Map_Manager_T.i \ $(ACE_ROOT)/ace/Active_Map_Manager_T.cpp -.obj/Log_Msg_Test.o .obj/Log_Msg_Test.so .shobj/Log_Msg_Test.o .shobj/Log_Msg_Test.so: Log_Msg_Test.cpp \ - $(ACE_ROOT)/ace/streams.h \ +.obj/Log_Msg_Test.o .obj/Log_Msg_Test.so .shobj/Log_Msg_Test.o .shobj/Log_Msg_Test.so: Log_Msg_Test.cpp $(ACE_ROOT)/ace/streams.h \ $(ACE_ROOT)/ace/pre.h \ $(ACE_ROOT)/ace/post.h \ $(ACE_ROOT)/ace/ace_wchar.h \ @@ -5037,8 +5032,7 @@ realclean: clean $(ACE_ROOT)/ace/Framework_Component_T.cpp .obj/Logging_Strategy_Test.o .obj/Logging_Strategy_Test.so .shobj/Logging_Strategy_Test.o .shobj/Logging_Strategy_Test.so: Logging_Strategy_Test.cpp \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/pre.h \ + $(ACE_ROOT)/ace/OS.h $(ACE_ROOT)/ace/pre.h \ $(ACE_ROOT)/ace/post.h \ $(ACE_ROOT)/ace/ace_wchar.h \ $(ACE_ROOT)/ace/ace_wchar.inl \ @@ -5361,8 +5355,8 @@ realclean: clean $(ACE_ROOT)/ace/ACE.i \ $(ACE_ROOT)/ace/Framework_Component_T.h \ $(ACE_ROOT)/ace/Framework_Component_T.inl \ - $(ACE_ROOT)/ace/Framework_Component_T.cpp \ - Map_Test.h $(ACE_ROOT)/ace/Active_Map_Manager.h \ + $(ACE_ROOT)/ace/Framework_Component_T.cpp Map_Test.h \ + $(ACE_ROOT)/ace/Active_Map_Manager.h \ $(ACE_ROOT)/ace/Active_Map_Manager.i \ $(ACE_ROOT)/ace/Active_Map_Manager_T.h \ $(ACE_ROOT)/ace/Map_Manager.h \ @@ -5618,8 +5612,7 @@ realclean: clean $(ACE_ROOT)/ace/Caching_Strategies_T.cpp .obj/Max_Default_Port_Test.o .obj/Max_Default_Port_Test.so .shobj/Max_Default_Port_Test.o .shobj/Max_Default_Port_Test.so: Max_Default_Port_Test.cpp \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/pre.h \ + $(ACE_ROOT)/ace/OS.h $(ACE_ROOT)/ace/pre.h \ $(ACE_ROOT)/ace/post.h \ $(ACE_ROOT)/ace/ace_wchar.h \ $(ACE_ROOT)/ace/ace_wchar.inl \ @@ -5739,8 +5732,7 @@ realclean: clean $(ACE_ROOT)/ace/Framework_Component_T.h \ $(ACE_ROOT)/ace/Framework_Component_T.inl \ $(ACE_ROOT)/ace/Framework_Component_T.cpp \ - $(ACE_ROOT)/ace/Thread_Manager.i \ - Max_Default_Port_Test.h \ + $(ACE_ROOT)/ace/Thread_Manager.i Max_Default_Port_Test.h \ $(ACE_ROOT)/ace/SOCK_Acceptor.h \ $(ACE_ROOT)/ace/SOCK_Acceptor.i test_config.h @@ -6007,8 +5999,7 @@ realclean: clean $(ACE_ROOT)/ace/Process.h \ $(ACE_ROOT)/ace/Process.i \ $(ACE_ROOT)/ace/Process_Manager.h \ - $(ACE_ROOT)/ace/Process_Manager.i \ - MEM_Stream_Test.h + $(ACE_ROOT)/ace/Process_Manager.i MEM_Stream_Test.h .obj/Mem_Map_Test.o .obj/Mem_Map_Test.so .shobj/Mem_Map_Test.o .shobj/Mem_Map_Test.so: Mem_Map_Test.cpp test_config.h \ $(ACE_ROOT)/ace/pre.h \ @@ -6254,8 +6245,7 @@ realclean: clean $(ACE_ROOT)/ace/Framework_Component_T.h \ $(ACE_ROOT)/ace/Framework_Component_T.inl \ $(ACE_ROOT)/ace/Framework_Component_T.cpp \ - MT_Reactor_Timer_Test.h \ - $(ACE_ROOT)/ace/Reactor.h \ + MT_Reactor_Timer_Test.h $(ACE_ROOT)/ace/Reactor.h \ $(ACE_ROOT)/ace/Handle_Set.h \ $(ACE_ROOT)/ace/Handle_Set.i \ $(ACE_ROOT)/ace/Timer_Queue.h \ @@ -6987,8 +6977,7 @@ realclean: clean $(ACE_ROOT)/ace/Notification_Strategy.inl \ $(ACE_ROOT)/ace/Message_Queue.i \ $(ACE_ROOT)/ace/High_Res_Timer.h \ - $(ACE_ROOT)/ace/High_Res_Timer.i \ - Message_Queue_Test_Ex.h + $(ACE_ROOT)/ace/High_Res_Timer.i Message_Queue_Test_Ex.h .obj/Message_Queue_Notifications_Test.o .obj/Message_Queue_Notifications_Test.so .shobj/Message_Queue_Notifications_Test.o .shobj/Message_Queue_Notifications_Test.so: Message_Queue_Notifications_Test.cpp \ $(ACE_ROOT)/ace/pre.h \ @@ -7323,6 +7312,98 @@ realclean: clean $(ACE_ROOT)/ace/Atomic_Op_T.cpp \ $(ACE_ROOT)/ace/Atomic_Op.i +.obj/Multihomed_INET_Addr_Test.o .obj/Multihomed_INET_Addr_Test.so .shobj/Multihomed_INET_Addr_Test.o .shobj/Multihomed_INET_Addr_Test.so: Multihomed_INET_Addr_Test.cpp test_config.h \ + $(ACE_ROOT)/ace/pre.h \ + $(ACE_ROOT)/ace/post.h \ + $(ACE_ROOT)/ace/ace_wchar.h \ + $(ACE_ROOT)/ace/ace_wchar.inl \ + $(ACE_ROOT)/ace/OS.h \ + $(ACE_ROOT)/ace/OS_Dirent.h \ + $(ACE_ROOT)/ace/OS_Export.h \ + $(ACE_ROOT)/ace/OS_Errno.h \ + $(ACE_ROOT)/ace/OS_Errno.inl \ + $(ACE_ROOT)/ace/OS_Dirent.inl \ + $(ACE_ROOT)/ace/OS_String.h \ + $(ACE_ROOT)/ace/Basic_Types.h \ + $(ACE_ROOT)/ace/ACE_export.h \ + $(ACE_ROOT)/ace/Basic_Types.i \ + $(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/Time_Value.h \ + $(ACE_ROOT)/ace/Time_Value.inl \ + $(ACE_ROOT)/ace/Default_Constants.h \ + $(ACE_ROOT)/ace/Global_Macros.h \ + $(ACE_ROOT)/ace/Min_Max.h \ + $(ACE_ROOT)/ace/streams.h \ + $(ACE_ROOT)/ace/Trace.h \ + $(ACE_ROOT)/ace/OS.i \ + $(ACE_ROOT)/ace/Singleton.h \ + $(ACE_ROOT)/ace/Synch.h \ + $(ACE_ROOT)/ace/Synch.i \ + $(ACE_ROOT)/ace/Synch_T.h \ + $(ACE_ROOT)/ace/Synch_T.i \ + $(ACE_ROOT)/ace/Thread.h \ + $(ACE_ROOT)/ace/Thread_Adapter.h \ + $(ACE_ROOT)/ace/Base_Thread_Adapter.h \ + $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.h \ + $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.inl \ + $(ACE_ROOT)/ace/Base_Thread_Adapter.inl \ + $(ACE_ROOT)/ace/Thread_Adapter.inl \ + $(ACE_ROOT)/ace/Thread.i \ + $(ACE_ROOT)/ace/Synch_T.cpp \ + $(ACE_ROOT)/ace/Log_Msg.h \ + $(ACE_ROOT)/ace/Log_Priority.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/Framework_Component.h \ + $(ACE_ROOT)/ace/Framework_Component.inl \ + $(ACE_ROOT)/ace/ACE.h \ + $(ACE_ROOT)/ace/Flag_Manip.h \ + $(ACE_ROOT)/ace/Flag_Manip.i \ + $(ACE_ROOT)/ace/Handle_Ops.h \ + $(ACE_ROOT)/ace/Handle_Ops.i \ + $(ACE_ROOT)/ace/Lib_Find.h \ + $(ACE_ROOT)/ace/Lib_Find.i \ + $(ACE_ROOT)/ace/Init_ACE.h \ + $(ACE_ROOT)/ace/Init_ACE.i \ + $(ACE_ROOT)/ace/Sock_Connect.h \ + $(ACE_ROOT)/ace/Sock_Connect.i \ + $(ACE_ROOT)/ace/ACE.i \ + $(ACE_ROOT)/ace/Framework_Component_T.h \ + $(ACE_ROOT)/ace/Framework_Component_T.inl \ + $(ACE_ROOT)/ace/Framework_Component_T.cpp \ + $(ACE_ROOT)/ace/Multihomed_INET_Addr.h \ + $(ACE_ROOT)/ace/INET_Addr.h \ + $(ACE_ROOT)/ace/Addr.h \ + $(ACE_ROOT)/ace/Addr.i \ + $(ACE_ROOT)/ace/INET_Addr.i \ + $(ACE_ROOT)/ace/Containers_T.h \ + $(ACE_ROOT)/ace/Containers.h \ + $(ACE_ROOT)/ace/Containers.i \ + $(ACE_ROOT)/ace/Node.h \ + $(ACE_ROOT)/ace/Node.cpp \ + $(ACE_ROOT)/ace/Array_Base.h \ + $(ACE_ROOT)/ace/Malloc_Base.h \ + $(ACE_ROOT)/ace/Array_Base.inl \ + $(ACE_ROOT)/ace/Array_Base.cpp \ + $(ACE_ROOT)/ace/Unbounded_Set.h \ + $(ACE_ROOT)/ace/Unbounded_Set.inl \ + $(ACE_ROOT)/ace/Unbounded_Set.cpp \ + $(ACE_ROOT)/ace/Unbounded_Queue.h \ + $(ACE_ROOT)/ace/Unbounded_Queue.inl \ + $(ACE_ROOT)/ace/Unbounded_Queue.cpp \ + $(ACE_ROOT)/ace/Containers_T.i \ + $(ACE_ROOT)/ace/Containers_T.cpp \ + $(ACE_ROOT)/ace/Multihomed_INET_Addr.i + .obj/Notify_Performance_Test.o .obj/Notify_Performance_Test.so .shobj/Notify_Performance_Test.o .shobj/Notify_Performance_Test.so: Notify_Performance_Test.cpp test_config.h \ $(ACE_ROOT)/ace/pre.h \ $(ACE_ROOT)/ace/post.h \ @@ -7551,8 +7632,7 @@ realclean: clean $(ACE_ROOT)/ace/Framework_Component_T.inl \ $(ACE_ROOT)/ace/Framework_Component_T.cpp -.obj/Obstack_Test.o .obj/Obstack_Test.so .shobj/Obstack_Test.o .shobj/Obstack_Test.so: Obstack_Test.cpp \ - $(ACE_ROOT)/ace/OS.h \ +.obj/Obstack_Test.o .obj/Obstack_Test.so .shobj/Obstack_Test.o .shobj/Obstack_Test.so: Obstack_Test.cpp $(ACE_ROOT)/ace/OS.h \ $(ACE_ROOT)/ace/pre.h \ $(ACE_ROOT)/ace/post.h \ $(ACE_ROOT)/ace/ace_wchar.h \ @@ -8562,8 +8642,7 @@ realclean: clean $(ACE_ROOT)/ace/SOCK_Connector.h \ $(ACE_ROOT)/ace/SOCK_Connector.i \ $(ACE_ROOT)/ace/File_Lock.h \ - $(ACE_ROOT)/ace/File_Lock.inl \ - Process_Strategy_Test.h + $(ACE_ROOT)/ace/File_Lock.inl Process_Strategy_Test.h .obj/Priority_Buffer_Test.o .obj/Priority_Buffer_Test.so .shobj/Priority_Buffer_Test.o .shobj/Priority_Buffer_Test.so: Priority_Buffer_Test.cpp test_config.h \ $(ACE_ROOT)/ace/pre.h \ @@ -10118,8 +10197,7 @@ realclean: clean $(ACE_ROOT)/ace/Framework_Component_T.h \ $(ACE_ROOT)/ace/Framework_Component_T.inl \ $(ACE_ROOT)/ace/Framework_Component_T.cpp \ - Reactor_Performance_Test.h \ - $(ACE_ROOT)/ace/SOCK_Stream.h \ + Reactor_Performance_Test.h $(ACE_ROOT)/ace/SOCK_Stream.h \ $(ACE_ROOT)/ace/SOCK_IO.h \ $(ACE_ROOT)/ace/SOCK.h \ $(ACE_ROOT)/ace/Addr.h \ @@ -11818,6 +11896,83 @@ realclean: clean $(ACE_ROOT)/ace/SOCK_Acceptor.h \ $(ACE_ROOT)/ace/SOCK_Acceptor.i +.obj/SOCK_SEQPACK_Association_Test.o .obj/SOCK_SEQPACK_Association_Test.so .shobj/SOCK_SEQPACK_Association_Test.o .shobj/SOCK_SEQPACK_Association_Test.so: SOCK_SEQPACK_Association_Test.cpp \ + $(ACE_ROOT)/ace/OS.h $(ACE_ROOT)/ace/pre.h \ + $(ACE_ROOT)/ace/post.h \ + $(ACE_ROOT)/ace/ace_wchar.h \ + $(ACE_ROOT)/ace/ace_wchar.inl \ + $(ACE_ROOT)/ace/OS_Dirent.h \ + $(ACE_ROOT)/ace/OS_Export.h \ + $(ACE_ROOT)/ace/OS_Errno.h \ + $(ACE_ROOT)/ace/OS_Errno.inl \ + $(ACE_ROOT)/ace/OS_Dirent.inl \ + $(ACE_ROOT)/ace/OS_String.h \ + $(ACE_ROOT)/ace/Basic_Types.h \ + $(ACE_ROOT)/ace/ACE_export.h \ + $(ACE_ROOT)/ace/Basic_Types.i \ + $(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/Time_Value.h \ + $(ACE_ROOT)/ace/Time_Value.inl \ + $(ACE_ROOT)/ace/Default_Constants.h \ + $(ACE_ROOT)/ace/Global_Macros.h \ + $(ACE_ROOT)/ace/Min_Max.h \ + $(ACE_ROOT)/ace/streams.h \ + $(ACE_ROOT)/ace/Trace.h \ + $(ACE_ROOT)/ace/OS.i \ + $(ACE_ROOT)/ace/SOCK_SEQPACK_Association.h \ + $(ACE_ROOT)/ace/SOCK_IO.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/Flag_Manip.h \ + $(ACE_ROOT)/ace/Flag_Manip.i \ + $(ACE_ROOT)/ace/IPC_SAP.i \ + $(ACE_ROOT)/ace/SOCK.i \ + $(ACE_ROOT)/ace/ACE.h \ + $(ACE_ROOT)/ace/Handle_Ops.h \ + $(ACE_ROOT)/ace/Handle_Ops.i \ + $(ACE_ROOT)/ace/Lib_Find.h \ + $(ACE_ROOT)/ace/Lib_Find.i \ + $(ACE_ROOT)/ace/Init_ACE.h \ + $(ACE_ROOT)/ace/Init_ACE.i \ + $(ACE_ROOT)/ace/Sock_Connect.h \ + $(ACE_ROOT)/ace/Sock_Connect.i \ + $(ACE_ROOT)/ace/ACE.i \ + $(ACE_ROOT)/ace/SOCK_IO.i \ + $(ACE_ROOT)/ace/INET_Addr.h \ + $(ACE_ROOT)/ace/INET_Addr.i \ + $(ACE_ROOT)/ace/SOCK_SEQPACK_Association.i \ + $(ACE_ROOT)/ace/SOCK_SEQPACK_Connector.h \ + $(ACE_ROOT)/ace/Multihomed_INET_Addr.h \ + $(ACE_ROOT)/ace/Containers_T.h \ + $(ACE_ROOT)/ace/Containers.h \ + $(ACE_ROOT)/ace/Containers.i \ + $(ACE_ROOT)/ace/Node.h \ + $(ACE_ROOT)/ace/Node.cpp \ + $(ACE_ROOT)/ace/Array_Base.h \ + $(ACE_ROOT)/ace/Malloc_Base.h \ + $(ACE_ROOT)/ace/Array_Base.inl \ + $(ACE_ROOT)/ace/Array_Base.cpp \ + $(ACE_ROOT)/ace/Unbounded_Set.h \ + $(ACE_ROOT)/ace/Unbounded_Set.inl \ + $(ACE_ROOT)/ace/Unbounded_Set.cpp \ + $(ACE_ROOT)/ace/Log_Msg.h \ + $(ACE_ROOT)/ace/Log_Priority.h \ + $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.h \ + $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.inl \ + $(ACE_ROOT)/ace/Unbounded_Queue.h \ + $(ACE_ROOT)/ace/Unbounded_Queue.inl \ + $(ACE_ROOT)/ace/Unbounded_Queue.cpp \ + $(ACE_ROOT)/ace/Containers_T.i \ + $(ACE_ROOT)/ace/Containers_T.cpp \ + $(ACE_ROOT)/ace/Multihomed_INET_Addr.i \ + $(ACE_ROOT)/ace/SOCK_SEQPACK_Connector.i + .obj/SPIPE_Test.o .obj/SPIPE_Test.so .shobj/SPIPE_Test.o .shobj/SPIPE_Test.so: SPIPE_Test.cpp test_config.h \ $(ACE_ROOT)/ace/pre.h \ $(ACE_ROOT)/ace/post.h \ @@ -13988,7 +14143,41 @@ realclean: clean $(ACE_ROOT)/ace/Node.cpp \ $(ACE_ROOT)/ace/Unbounded_Set_Ex.inl \ $(ACE_ROOT)/ace/Unbounded_Set_Ex.cpp \ - $(ACE_ROOT)/ace/Malloc_Base.h + $(ACE_ROOT)/ace/Malloc_Base.h \ + $(ACE_ROOT)/ace/Auto_Ptr.h \ + $(ACE_ROOT)/ace/Auto_Ptr.i \ + $(ACE_ROOT)/ace/Auto_Ptr.cpp \ + $(ACE_ROOT)/ace/SString.h \ + $(ACE_ROOT)/ace/String_Base.h \ + $(ACE_ROOT)/ace/String_Base_Const.h \ + $(ACE_ROOT)/ace/String_Base.i \ + $(ACE_ROOT)/ace/String_Base.cpp \ + $(ACE_ROOT)/ace/Malloc.h \ + $(ACE_ROOT)/ace/Malloc.i \ + $(ACE_ROOT)/ace/Malloc_T.h \ + $(ACE_ROOT)/ace/Malloc_Allocator.h \ + $(ACE_ROOT)/ace/Malloc_Allocator.i \ + $(ACE_ROOT)/ace/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/Event_Handler.h \ + $(ACE_ROOT)/ace/Event_Handler.i \ + $(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/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/Unbounded_Set.h \ + $(ACE_ROOT)/ace/Unbounded_Set.inl \ + $(ACE_ROOT)/ace/Unbounded_Set.cpp \ + $(ACE_ROOT)/ace/Memory_Pool.i \ + $(ACE_ROOT)/ace/SString.i .obj/Upgradable_RW_Test.o .obj/Upgradable_RW_Test.so .shobj/Upgradable_RW_Test.o .shobj/Upgradable_RW_Test.so: Upgradable_RW_Test.cpp Upgradable_RW_Test.h \ $(ACE_ROOT)/ace/pre.h \ diff --git a/tests/Multihomed_INET_Addr_Test.cpp b/tests/Multihomed_INET_Addr_Test.cpp new file mode 100644 index 00000000000..4950602ca23 --- /dev/null +++ b/tests/Multihomed_INET_Addr_Test.cpp @@ -0,0 +1,469 @@ +// $Id$ + +// ============================================================================ +// +// = LIBRARY +// tests +// +// = FILENAME +// Multihomed_INET_Addr_Test.cpp +// +// = DESCRIPTION +// Performs several tests on the Multihomed_ACE_INET_Addr class. +// It creates several IPv4 addresses and checks that the +// address formed by the class is valid. +// +// = AUTHOR +// Edward Mulholland (emulholl@atl.lmco.com) +// +// ============================================================================ + +#include /**/ "test_config.h" +#include /**/ "ace/OS.h" +#include /**/ "ace/Multihomed_INET_Addr.h" +#include /**/ "ace/Log_Msg.h" + +int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) +{ + ACE_UNUSED_ARG (argc); + ACE_UNUSED_ARG (argv); + + ACE_START_TEST (ACE_TEXT ("Multihomed_INET_Addr_Test")); + + int status = 0; // Innocent until proven guilty + + // loop variables + size_t i, j; + sockaddr_in *pointer; + + // The port will always be this + u_short port = 80; + + // The primary address will always be this + const char *primary_dotted_decimal = "138.38.180.251"; + + // The secondary addresses will always be these... + const char *secondary_dotted_decimals[] = { + "64.219.54.121", + "127.0.0.1", + "21.242.14.51", + "53.141.124.24", + "42.12.44.9" + }; + + // ... and as you can see, there are 5 of them + const size_t num_secondaries = 5; + + // We also need the primary address and the secondary addresses + // in ACE_UINT32 format in host byte order + ACE_UINT32 primary_addr32; + ACE_UINT32 secondary_addr32[5]; + + { + struct in_addr addrv4; + ACE_OS::inet_pton (AF_INET, primary_dotted_decimal, &addrv4); + ACE_OS::memcpy (&primary_addr32, &addrv4, sizeof (primary_addr32)); + primary_addr32 = ACE_NTOHL(primary_addr32); + } + + for (i = 0; i < num_secondaries; ++i) { + struct in_addr addrv4; + ACE_OS::inet_pton (AF_INET, secondary_dotted_decimals[i], &addrv4); + ACE_OS::memcpy (&secondary_addr32[i], &addrv4, sizeof (primary_addr32)); + secondary_addr32[i] = ACE_NTOHL(secondary_addr32[i]); + } + + // Test subject + ACE_Multihomed_INET_Addr addr; + + // Array of ones (used to clear the secondary addresses of the test + // subject) + ACE_UINT32 array_of_threes[5] = { ACE_UINT32 (3), + ACE_UINT32 (3), + ACE_UINT32 (3), + ACE_UINT32 (3), + ACE_UINT32 (3) }; + + // Array of INET_Addrs that will repeatedly be passed into the + // get_secondary_addresses accessor of Multihomed_INET_Addr + ACE_INET_Addr in_out[5]; + + // Array of INET_Addrs against which the above array will be tested. + ACE_INET_Addr stay_out[5]; + + // Array of sockaddrs that will repeatedly be passed into the + // get_addresses accessor of Multihomed_INET_Addr + const size_t num_sockaddrs = 6; + sockaddr_in in_out_sockaddr[num_sockaddrs]; + + // Run the test with a varying number of secondary addresses + for (i = 0; i <= num_secondaries; ++i) { + + + /****** Clear the in_out array and test subject ******/ + + + // Clear the in_out array by setting every port to 0 and every + // address to 1 + for (j = 0; j < num_secondaries; ++j) { + in_out[j].set(0, ACE_UINT32 (1), 1); + } + + // Clear the in_out_sockaddr array by setting every port to 0 and + // every address to 1 + ACE_OS::memset(in_out_sockaddr, 0, num_sockaddrs * sizeof(sockaddr)); + + // Clear the test subject by setting the port to 2 and every + // address (both the primary and the secondaries) to 3 + addr.set (2, ACE_UINT32 (3), 1, array_of_threes, num_secondaries); + + // Check that the port is 2 + if (addr.get_port_number() != 2) { + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("Failed get_port_number check\n") + ACE_TEXT ("%d != %d\n"), + addr.get_port_number(), + 2)); + status = 1; + } + + // Check that the primary address is 3 + if (addr.get_ip_address() != ACE_UINT32 (3)) { + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("Failed get_ip_address check\n") + ACE_TEXT ("0x%x != 0x%x\n"), + addr.get_ip_address(), + ACE_UINT32 (3))); + status = 1; + } + + // Check that the test subject reports the correct number of + // secondary addresses. + size_t returned_num_secondaries = addr.get_num_secondary_addresses(); + if (returned_num_secondaries == num_secondaries) { + + // Set a stay_out element to the state that we expect to see + // from every in_out element after the in_out array is passed to + // the accessor of the test subject. + stay_out[0].set(2, ACE_UINT32 (3), 1); + + // Pass the in_out array to the accessor + addr.get_secondary_addresses(in_out, num_secondaries); + + // Check that the in_out array matches stay_out element + for (j = 0; j < num_secondaries; ++j) { + + if (in_out[j] != stay_out[0]) { + + ACE_TCHAR in_out_string[100]; + ACE_TCHAR stay_out_string[100]; + + in_out[j].addr_to_string(in_out_string, 100); + stay_out[0].addr_to_string(stay_out_string, 100); + + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("Failed get_secondary_addresses check\n") + ACE_TEXT ("%s != %s\n"), + in_out_string, + stay_out_string)); + + status = 1; + } + } + + // Pass the in_out_sockaddr array to the accessor + addr.get_addresses(in_out_sockaddr, num_secondaries + 1); + + // Check that the in_out_sockaddr array matches stay_out element + for (j = 0, pointer = in_out_sockaddr; + j < num_secondaries + 1; + ++j, ++pointer) { + + if (memcmp(pointer, stay_out[0].get_addr(), sizeof(sockaddr))) { + + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("Failed get_addresses check\n"))); + + status = 1; + } + } + + } else { + + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("Failed get_num_secondary_addresses check\n") + ACE_TEXT ("%d != %d\n"), + returned_num_secondaries, + num_secondaries)); + status = 1; + + } + + + /**** Test set (u_short, const char[], int, int, const char *([]), size_t) ****/ + + + addr.set(port, + primary_dotted_decimal, + 1, + AF_INET, + secondary_dotted_decimals, + i); + + // Check the port number + if (addr.get_port_number() != port) { + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("Failed second get_port_number check\n") + ACE_TEXT ("%d != %d\n"), + addr.get_port_number(), + port)); + status = 1; + } + + // Check the primary address + if (0 != ACE_OS::strcmp (addr.get_host_addr(), primary_dotted_decimal)) + { + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("%s failed get_host_addr() check\n") + ACE_TEXT ("%s != %s\n"), + primary_dotted_decimal, + addr.get_host_addr (), + primary_dotted_decimal)); + status = 1; + } + + // Check that the test subject reports the correct number of + // secondary addresses. + returned_num_secondaries = addr.get_num_secondary_addresses(); + if (returned_num_secondaries == i) { + + // Initialize the stay_out array with the secondary addresses + for (j = 0; j < i; ++j) { + stay_out[j].set(port, secondary_dotted_decimals[j]); + } + + // Pass the in_out array to the accessor + addr.get_secondary_addresses(in_out, i); + + // Check that the in_out array matches stay_out array + for (j = 0; j < i; ++j) { + + if (in_out[j] != stay_out[j]) { + + ACE_TCHAR in_out_string[100]; + ACE_TCHAR stay_out_string[100]; + + in_out[j].addr_to_string(in_out_string, 100); + stay_out[j].addr_to_string(stay_out_string, 100); + + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("Failed second get_secondary_addresses check\n") + ACE_TEXT ("%s != %s\n"), + in_out_string, + stay_out_string)); + + status = 1; + } + } + + // Pass the in_out_sockaddr array to the accessor + addr.get_addresses(in_out_sockaddr, i + 1); + + // Check that the primary address in the in_out_sockaddr array + // matches the primary address reported by the superclass + if (memcmp(in_out_sockaddr, addr.get_addr(), sizeof(sockaddr))) { + + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("Failed second get_addresses check ") + ACE_TEXT ("(for primary address)\n"))); + + status = 1; + + } + + // Check that the secondary addresses in the in_out_sockaddr + // array match the stay_out array + for (j = 1, pointer = &in_out_sockaddr[1]; + j < i + 1; + ++j, ++pointer) { + + if (memcmp(pointer, stay_out[j-1].get_addr(), sizeof(sockaddr))) { + + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("Failed second get_addresses check ") + ACE_TEXT ("(for secondary addresses)\n"))); + + status = 1; + } + } + + } else { + + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("Failed second get_num_secondary_addresses check\n") + ACE_TEXT ("%d != %d\n"), + returned_num_secondaries, + i)); + status = 1; + } + + + /****** Clear the in_out array and test subject AGAIN ******/ + + + // Clear the in_out array by setting every port to 0 and every + // address to 1 + for (j = 0; j < num_secondaries; ++j) { + in_out[j].set(0, ACE_UINT32 (1), 1); + } + + // Clear the test subject by setting the port to 2 and every + // address (both the primary and the secondaries) to 3 + addr.set (2, ACE_UINT32 (3), 1, array_of_threes, num_secondaries); + + // Check that the port is 2 + if (addr.get_port_number() != 2) { + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("Failed third get_port_number check\n") + ACE_TEXT ("%d != %d\n"), + addr.get_port_number(), + 2)); + status = 1; + } + + // Check that the primary address is 3 + if (addr.get_ip_address() != ACE_UINT32 (3)) { + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("Failed third get_ip_address check\n") + ACE_TEXT ("0x%x != 0x%x\n"), + addr.get_ip_address(), + ACE_UINT32 (3))); + status = 1; + } + + // Check that the test subject reports the correct number of + // secondary addresses. + returned_num_secondaries = addr.get_num_secondary_addresses(); + if (returned_num_secondaries == num_secondaries) { + + // Set a stay_out element to the state that we expect to see + // from every in_out element after the in_out array is passed to + // the accessor of the test subject. + stay_out[0].set(2, ACE_UINT32 (3), 1); + + // Pass the in_out array to the accessor + addr.get_secondary_addresses(in_out, num_secondaries); + + // Check that the in_out array matches stay_out array + for (j = 0; j < num_secondaries; ++j) { + + if (in_out[j] != stay_out[0]) { + + ACE_TCHAR in_out_string[100]; + ACE_TCHAR stay_out_string[100]; + + in_out[j].addr_to_string(in_out_string, 100); + stay_out[0].addr_to_string(stay_out_string, 100); + + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("Failed third get_secondary_addresses check\n") + ACE_TEXT ("%s != %s\n"), + in_out_string, + stay_out_string)); + + status = 1; + } + } + + } else { + + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("Failed third get_num_secondary_addresses check\n") + ACE_TEXT ("%d != %d\n"), + returned_num_secondaries, + num_secondaries)); + status = 1; + + } + + + /**** Test set (u_short, ACE_UINT32, int, const ACE_UINT32 *, size_t) ****/ + + addr.set(port, + primary_addr32, + 1, + secondary_addr32, + i); + + // Check the port number + if (addr.get_port_number() != port) { + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("Failed forth get_port_number check\n") + ACE_TEXT ("%d != %d\n"), + addr.get_port_number(), + port)); + status = 1; + } + + // Check the primary address + if (0 != ACE_OS::strcmp (addr.get_host_addr(), primary_dotted_decimal)) + { + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("%s failed second get_ip_address() check\n") + ACE_TEXT ("%s != %s\n"), + primary_dotted_decimal, + addr.get_host_addr (), + primary_dotted_decimal)); + status = 1; + } + + // Check that the test subject reports the correct number of + // secondary addresses. + returned_num_secondaries = addr.get_num_secondary_addresses(); + if (returned_num_secondaries == i) { + + // Initialize the stay_out array with the secondary addresses + for (j = 0; j < i; ++j) { + stay_out[j].set(port, secondary_addr32[j]); + } + + // Pass the in_out array to the accessor + addr.get_secondary_addresses(in_out, j); + + // Check that the in_out array matches stay_out array + for (j = 0; j < i; ++j) { + + if (in_out[j] != stay_out[j]) { + + ACE_TCHAR in_out_string[100]; + ACE_TCHAR stay_out_string[100]; + + in_out[j].addr_to_string(in_out_string, 100); + stay_out[j].addr_to_string(stay_out_string, 100); + + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("Failed forth get_secondary_addresses check\n") + ACE_TEXT ("%s != %s\n"), + in_out_string, + stay_out_string)); + + status = 1; + } + } + + } else { + + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("Failed forth get_num_secondary_addresses check\n") + ACE_TEXT ("%d != %d\n"), + returned_num_secondaries, + i)); + status = 1; + } + + } + + ACE_END_TEST; + return status; + +} diff --git a/tests/Multihomed_INET_Addr_Test.dsp b/tests/Multihomed_INET_Addr_Test.dsp new file mode 100644 index 00000000000..165417ab0bc --- /dev/null +++ b/tests/Multihomed_INET_Addr_Test.dsp @@ -0,0 +1,155 @@ +# Microsoft Developer Studio Project File - Name="Multihomed_INET_Addr_Test" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=Multihomed_INET_Addr_Test - Win32 Static Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "Multihomed_INET_Addr_Test.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "Multihomed_INET_Addr_Test.mak" CFG="Multihomed_INET_Addr_Test - Win32 Static Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "Multihomed_INET_Addr_Test - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "Multihomed_INET_Addr_Test - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE "Multihomed_INET_Addr_Test - Win32 Static Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE "Multihomed_INET_Addr_Test - Win32 Static Release" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "Multihomed_INET_Addr_Test - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 ace.lib /nologo /subsystem:console /machine:I386 /libpath:"..\ace"
+
+!ELSEIF "$(CFG)" == "Multihomed_INET_Addr_Test - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\ace"
+
+!ELSEIF "$(CFG)" == "Multihomed_INET_Addr_Test - Win32 Static Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Static Debug"
+# PROP BASE Intermediate_Dir "Static Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Static_Debug"
+# PROP Intermediate_Dir "Static_Debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../" /D "_DEBUG" /D "ACE_AS_STATIC_LIBS" /D "WIN32" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 acesd.lib advapi32.lib user32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\ace"
+
+!ELSEIF "$(CFG)" == "Multihomed_INET_Addr_Test - Win32 Static Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Static Release"
+# PROP BASE Intermediate_Dir "Static Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Static_Release"
+# PROP Intermediate_Dir "Static_Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../" /D "NDEBUG" /D "ACE_AS_STATIC_LIBS" /D "WIN32" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 aces.lib advapi32.lib user32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\ace"
+
+!ENDIF
+
+# Begin Target
+
+# Name "Multihomed_INET_Addr_Test - Win32 Release"
+# Name "Multihomed_INET_Addr_Test - Win32 Debug"
+# Name "Multihomed_INET_Addr_Test - Win32 Static Debug"
+# Name "Multihomed_INET_Addr_Test - Win32 Static Release"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\Multihomed_INET_Addr_Test.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
diff --git a/tests/RMCast/Makefile b/tests/RMCast/Makefile index 3c80cf99a7e..a9a34553363 100644 --- a/tests/RMCast/Makefile +++ b/tests/RMCast/Makefile @@ -49,6 +49,7 @@ endif .obj/RMCast_Fragment_Test.o .obj/RMCast_Fragment_Test.so .shobj/RMCast_Fragment_Test.o .shobj/RMCast_Fragment_Test.so: RMCast_Fragment_Test.cpp ../test_config.h \ + $(ACE_ROOT)/ace/pre.h \ $(ACE_ROOT)/ace/post.h \ $(ACE_ROOT)/ace/ace_wchar.h \ $(ACE_ROOT)/ace/ace_wchar.inl \ @@ -73,9 +74,11 @@ endif $(ACE_ROOT)/ace/Global_Macros.h \ $(ACE_ROOT)/ace/Min_Max.h \ $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Trace.h $(ACE_ROOT)/ace/OS.i \ + $(ACE_ROOT)/ace/Trace.h \ + $(ACE_ROOT)/ace/OS.i \ $(ACE_ROOT)/ace/Singleton.h \ - $(ACE_ROOT)/ace/Synch.h $(ACE_ROOT)/ace/Synch.i \ + $(ACE_ROOT)/ace/Synch.h \ + $(ACE_ROOT)/ace/Synch.i \ $(ACE_ROOT)/ace/Synch_T.h \ $(ACE_ROOT)/ace/Synch_T.i \ $(ACE_ROOT)/ace/Thread.h \ @@ -133,7 +136,8 @@ endif $(ACE_ROOT)/ace/Thread_Control.h \ $(ACE_ROOT)/ace/Thread_Control.inl \ $(ACE_ROOT)/ace/Unbounded_Queue.h \ - $(ACE_ROOT)/ace/Node.h $(ACE_ROOT)/ace/Node.cpp \ + $(ACE_ROOT)/ace/Node.h \ + $(ACE_ROOT)/ace/Node.cpp \ $(ACE_ROOT)/ace/Unbounded_Queue.inl \ $(ACE_ROOT)/ace/Unbounded_Queue.cpp \ $(ACE_ROOT)/ace/Containers.h \ @@ -151,7 +155,8 @@ endif $(ACE_ROOT)/ace/Free_List.i \ $(ACE_ROOT)/ace/Free_List.cpp \ $(ACE_ROOT)/ace/Thread_Manager.i \ - $(ACE_ROOT)/ace/Task.i $(ACE_ROOT)/ace/Task_T.h \ + $(ACE_ROOT)/ace/Task.i \ + $(ACE_ROOT)/ace/Task_T.h \ $(ACE_ROOT)/ace/Message_Queue.h \ $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ $(ACE_ROOT)/ace/Message_Queue_T.h \ @@ -176,6 +181,7 @@ endif $(ACE_ROOT)/ace/RMCast/RMCast_Fragment.i .obj/RMCast_Reassembly_Test.o .obj/RMCast_Reassembly_Test.so .shobj/RMCast_Reassembly_Test.o .shobj/RMCast_Reassembly_Test.so: RMCast_Reassembly_Test.cpp ../test_config.h \ + $(ACE_ROOT)/ace/pre.h \ $(ACE_ROOT)/ace/post.h \ $(ACE_ROOT)/ace/ace_wchar.h \ $(ACE_ROOT)/ace/ace_wchar.inl \ @@ -200,9 +206,11 @@ endif $(ACE_ROOT)/ace/Global_Macros.h \ $(ACE_ROOT)/ace/Min_Max.h \ $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Trace.h $(ACE_ROOT)/ace/OS.i \ + $(ACE_ROOT)/ace/Trace.h \ + $(ACE_ROOT)/ace/OS.i \ $(ACE_ROOT)/ace/Singleton.h \ - $(ACE_ROOT)/ace/Synch.h $(ACE_ROOT)/ace/Synch.i \ + $(ACE_ROOT)/ace/Synch.h \ + $(ACE_ROOT)/ace/Synch.i \ $(ACE_ROOT)/ace/Synch_T.h \ $(ACE_ROOT)/ace/Synch_T.i \ $(ACE_ROOT)/ace/Thread.h \ @@ -254,7 +262,8 @@ endif $(ACE_ROOT)/ace/Thread_Control.h \ $(ACE_ROOT)/ace/Thread_Control.inl \ $(ACE_ROOT)/ace/Unbounded_Queue.h \ - $(ACE_ROOT)/ace/Node.h $(ACE_ROOT)/ace/Node.cpp \ + $(ACE_ROOT)/ace/Node.h \ + $(ACE_ROOT)/ace/Node.cpp \ $(ACE_ROOT)/ace/Unbounded_Queue.inl \ $(ACE_ROOT)/ace/Unbounded_Queue.cpp \ $(ACE_ROOT)/ace/Malloc_Base.h \ @@ -273,7 +282,8 @@ endif $(ACE_ROOT)/ace/Free_List.i \ $(ACE_ROOT)/ace/Free_List.cpp \ $(ACE_ROOT)/ace/Thread_Manager.i \ - $(ACE_ROOT)/ace/Task.i $(ACE_ROOT)/ace/Task_T.h \ + $(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 \ @@ -353,6 +363,7 @@ endif $(ACE_ROOT)/ace/RMCast/RMCast_Reassembly.i .obj/RMCast_UDP_Best_Effort_Test.o .obj/RMCast_UDP_Best_Effort_Test.so .shobj/RMCast_UDP_Best_Effort_Test.o .shobj/RMCast_UDP_Best_Effort_Test.so: RMCast_UDP_Best_Effort_Test.cpp \ + $(ACE_ROOT)/ace/pre.h \ $(ACE_ROOT)/ace/post.h \ $(ACE_ROOT)/ace/ace_wchar.h \ $(ACE_ROOT)/ace/ace_wchar.inl \ @@ -377,9 +388,11 @@ endif $(ACE_ROOT)/ace/Global_Macros.h \ $(ACE_ROOT)/ace/Min_Max.h \ $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Trace.h $(ACE_ROOT)/ace/OS.i \ + $(ACE_ROOT)/ace/Trace.h \ + $(ACE_ROOT)/ace/OS.i \ $(ACE_ROOT)/ace/Singleton.h \ - $(ACE_ROOT)/ace/Synch.h $(ACE_ROOT)/ace/Synch.i \ + $(ACE_ROOT)/ace/Synch.h \ + $(ACE_ROOT)/ace/Synch.i \ $(ACE_ROOT)/ace/Synch_T.h \ $(ACE_ROOT)/ace/Synch_T.i \ $(ACE_ROOT)/ace/Thread.h \ @@ -425,7 +438,8 @@ endif $(ACE_ROOT)/ace/RMCast/RMCast_Module.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/SOCK.h \ + $(ACE_ROOT)/ace/Addr.h \ $(ACE_ROOT)/ace/Addr.i \ $(ACE_ROOT)/ace/IPC_SAP.h \ $(ACE_ROOT)/ace/IPC_SAP.i \ @@ -445,7 +459,8 @@ endif $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \ $(ACE_ROOT)/ace/Service_Config.h \ $(ACE_ROOT)/ace/Unbounded_Queue.h \ - $(ACE_ROOT)/ace/Node.h $(ACE_ROOT)/ace/Node.cpp \ + $(ACE_ROOT)/ace/Node.h \ + $(ACE_ROOT)/ace/Node.cpp \ $(ACE_ROOT)/ace/Unbounded_Queue.inl \ $(ACE_ROOT)/ace/Unbounded_Queue.cpp \ $(ACE_ROOT)/ace/Malloc_Base.h \ @@ -528,7 +543,8 @@ endif $(ACE_ROOT)/ace/Containers_T.i \ $(ACE_ROOT)/ace/Containers_T.cpp \ $(ACE_ROOT)/ace/Thread_Manager.i \ - $(ACE_ROOT)/ace/Task.i $(ACE_ROOT)/ace/Task_T.h \ + $(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 \ @@ -551,6 +567,7 @@ endif $(ACE_ROOT)/ace/Stream_Modules.cpp .obj/RMCast_Membership_Test.o .obj/RMCast_Membership_Test.so .shobj/RMCast_Membership_Test.o .shobj/RMCast_Membership_Test.so: RMCast_Membership_Test.cpp ../test_config.h \ + $(ACE_ROOT)/ace/pre.h \ $(ACE_ROOT)/ace/post.h \ $(ACE_ROOT)/ace/ace_wchar.h \ $(ACE_ROOT)/ace/ace_wchar.inl \ @@ -575,9 +592,11 @@ endif $(ACE_ROOT)/ace/Global_Macros.h \ $(ACE_ROOT)/ace/Min_Max.h \ $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Trace.h $(ACE_ROOT)/ace/OS.i \ + $(ACE_ROOT)/ace/Trace.h \ + $(ACE_ROOT)/ace/OS.i \ $(ACE_ROOT)/ace/Singleton.h \ - $(ACE_ROOT)/ace/Synch.h $(ACE_ROOT)/ace/Synch.i \ + $(ACE_ROOT)/ace/Synch.h \ + $(ACE_ROOT)/ace/Synch.i \ $(ACE_ROOT)/ace/Synch_T.h \ $(ACE_ROOT)/ace/Synch_T.i \ $(ACE_ROOT)/ace/Thread.h \ @@ -626,7 +645,8 @@ endif $(ACE_ROOT)/ace/Containers.h \ $(ACE_ROOT)/ace/Containers.i \ $(ACE_ROOT)/ace/Containers_T.h \ - $(ACE_ROOT)/ace/Node.h $(ACE_ROOT)/ace/Node.cpp \ + $(ACE_ROOT)/ace/Node.h \ + $(ACE_ROOT)/ace/Node.cpp \ $(ACE_ROOT)/ace/Array_Base.h \ $(ACE_ROOT)/ace/Malloc_Base.h \ $(ACE_ROOT)/ace/Array_Base.inl \ @@ -657,7 +677,8 @@ endif $(ACE_ROOT)/ace/Free_List.i \ $(ACE_ROOT)/ace/Free_List.cpp \ $(ACE_ROOT)/ace/Thread_Manager.i \ - $(ACE_ROOT)/ace/Task.i $(ACE_ROOT)/ace/Task_T.h \ + $(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 \ @@ -680,6 +701,7 @@ endif $(ACE_ROOT)/ace/Stream_Modules.cpp .obj/RMCast_Retransmission_Test.o .obj/RMCast_Retransmission_Test.so .shobj/RMCast_Retransmission_Test.o .shobj/RMCast_Retransmission_Test.so: RMCast_Retransmission_Test.cpp \ + $(ACE_ROOT)/ace/pre.h \ $(ACE_ROOT)/ace/post.h \ $(ACE_ROOT)/ace/ace_wchar.h \ $(ACE_ROOT)/ace/ace_wchar.inl \ @@ -704,9 +726,11 @@ endif $(ACE_ROOT)/ace/Global_Macros.h \ $(ACE_ROOT)/ace/Min_Max.h \ $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Trace.h $(ACE_ROOT)/ace/OS.i \ + $(ACE_ROOT)/ace/Trace.h \ + $(ACE_ROOT)/ace/OS.i \ $(ACE_ROOT)/ace/Singleton.h \ - $(ACE_ROOT)/ace/Synch.h $(ACE_ROOT)/ace/Synch.i \ + $(ACE_ROOT)/ace/Synch.h \ + $(ACE_ROOT)/ace/Synch.i \ $(ACE_ROOT)/ace/Synch_T.h \ $(ACE_ROOT)/ace/Synch_T.i \ $(ACE_ROOT)/ace/Thread.h \ @@ -788,7 +812,8 @@ endif $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ $(ACE_ROOT)/ace/Unbounded_Set.h \ - $(ACE_ROOT)/ace/Node.h $(ACE_ROOT)/ace/Node.cpp \ + $(ACE_ROOT)/ace/Node.h \ + $(ACE_ROOT)/ace/Node.cpp \ $(ACE_ROOT)/ace/Unbounded_Set.inl \ $(ACE_ROOT)/ace/Unbounded_Set.cpp \ $(ACE_ROOT)/ace/Memory_Pool.i \ @@ -826,7 +851,8 @@ endif $(ACE_ROOT)/ace/Containers_T.i \ $(ACE_ROOT)/ace/Containers_T.cpp \ $(ACE_ROOT)/ace/Thread_Manager.i \ - $(ACE_ROOT)/ace/Task.i $(ACE_ROOT)/ace/Task_T.h \ + $(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 \ @@ -849,6 +875,7 @@ endif $(ACE_ROOT)/ace/Stream_Modules.cpp .obj/RMCast_Reordering_Test.o .obj/RMCast_Reordering_Test.so .shobj/RMCast_Reordering_Test.o .shobj/RMCast_Reordering_Test.so: RMCast_Reordering_Test.cpp ../test_config.h \ + $(ACE_ROOT)/ace/pre.h \ $(ACE_ROOT)/ace/post.h \ $(ACE_ROOT)/ace/ace_wchar.h \ $(ACE_ROOT)/ace/ace_wchar.inl \ @@ -873,9 +900,11 @@ endif $(ACE_ROOT)/ace/Global_Macros.h \ $(ACE_ROOT)/ace/Min_Max.h \ $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Trace.h $(ACE_ROOT)/ace/OS.i \ + $(ACE_ROOT)/ace/Trace.h \ + $(ACE_ROOT)/ace/OS.i \ $(ACE_ROOT)/ace/Singleton.h \ - $(ACE_ROOT)/ace/Synch.h $(ACE_ROOT)/ace/Synch.i \ + $(ACE_ROOT)/ace/Synch.h \ + $(ACE_ROOT)/ace/Synch.i \ $(ACE_ROOT)/ace/Synch_T.h \ $(ACE_ROOT)/ace/Synch_T.i \ $(ACE_ROOT)/ace/Thread.h \ @@ -951,7 +980,8 @@ endif $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ $(ACE_ROOT)/ace/Unbounded_Set.h \ - $(ACE_ROOT)/ace/Node.h $(ACE_ROOT)/ace/Node.cpp \ + $(ACE_ROOT)/ace/Node.h \ + $(ACE_ROOT)/ace/Node.cpp \ $(ACE_ROOT)/ace/Unbounded_Set.inl \ $(ACE_ROOT)/ace/Unbounded_Set.cpp \ $(ACE_ROOT)/ace/Memory_Pool.i \ @@ -989,7 +1019,8 @@ endif $(ACE_ROOT)/ace/Containers_T.i \ $(ACE_ROOT)/ace/Containers_T.cpp \ $(ACE_ROOT)/ace/Thread_Manager.i \ - $(ACE_ROOT)/ace/Task.i $(ACE_ROOT)/ace/Task_T.h \ + $(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 \ diff --git a/tests/SOCK_SEQPACK_Association_Test.cpp b/tests/SOCK_SEQPACK_Association_Test.cpp new file mode 100644 index 00000000000..d5bc6a3b3ec --- /dev/null +++ b/tests/SOCK_SEQPACK_Association_Test.cpp @@ -0,0 +1,153 @@ +// $Id$ + +// ============================================================================ +// +// = LIBRARY +// tests +// +// = FILENAME +// SOCK_SEQPACK_Association_Test.cpp +// +// = DESCRIPTION +// +// Tests the methods get_local_addrs and get_remote_addrs of class +// ACE_SOCK_SEQPACK_Association. +// +// This is not an automated "one-button" test. Rather, it prints +// some output to a log file, so that an interested human can +// inspect the output and get a vague notion of whether or not +// the methods are working properly. +// +// = AUTHOR +// Edward Mulholland (emulholl@atl.lmco.com) +// +// ============================================================================ + +#include /**/ "ace/OS.h" +#include /**/ "ace/SOCK_SEQPACK_Association.h" +#include /**/ "ace/SOCK_SEQPACK_Connector.h" +#include /**/ "ace/INET_Addr.h" +#include /**/ "ace/Log_Msg.h" + +void dump_names(const ACE_SOCK_SEQPACK_Association& assoc); + +int main (int argc, ACE_TCHAR *argv[]) +{ + int status = 0; // Innocent until proven guilty + + // object that manages the connection to the server + ACE_SOCK_SEQPACK_Connector connector; + + // object that manages the data xfer between the client and server + ACE_SOCK_SEQPACK_Association dataStream; + + // object that represents the server's IP address and port + ACE_INET_Addr serverAddr; + + if (argc < 2) { + + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("Usage: SOCK_SEQPACK_Association_Test hostname:port\n"))); + status = 1; + + } else if (serverAddr.set(argv[1])) { + + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("%p\n"), + ACE_TEXT ("ACE_INET_Addr::set"))); + status = 1; + + } else if (connector.connect (dataStream, serverAddr)) { + + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("%p\n"), + ACE_TEXT ("ACE_SOCK_SEQPACK_Connector::connect"))); + status = 1; + + } else { + + ACE_DEBUG ((LM_DEBUG, + ACE_TEXT ("Connected to server at %s\n"), + argv[1])); + + dump_names(dataStream); + } + + dataStream.close(); + + return status; +} + +void dump_names(const ACE_SOCK_SEQPACK_Association& assoc) +{ + // Pre-declare for-loop index + size_t i = 0; + + size_t in_out_size = 100; + ACE_INET_Addr in_out[100]; + + // Output char buffer + const size_t outbuf_size = 1024; + char outbuf[outbuf_size]; + + // Get local addresses of the association + if (assoc.get_local_addrs(in_out, in_out_size)) { + + ACE_ERROR((LM_ERROR, + "%p\n", + "get_local_addrs")); + return; + } + + ACE_DEBUG((LM_DEBUG, "Called get_local_addrs\n")); + + // Print individual results of get_local_addrs + for (i = 0; i < in_out_size; ++i) { + + if (in_out[i].addr_to_string(outbuf, outbuf_size)) { + + ACE_ERROR((LM_ERROR, + "%p\n", + "addr_to_string")); + return; + } + + ACE_DEBUG((LM_DEBUG, + "get_local_addrs[%i] = %s\n", + i, + outbuf)); + } + + // Reset in_out_size + in_out_size = 100; + + // Get remote addresses of the association + if (assoc.get_remote_addrs(in_out, in_out_size)) { + + ACE_ERROR((LM_ERROR, + "%p\n", + "get_remote_addrs")); + return; + } + + ACE_DEBUG((LM_DEBUG, "Called get_remote_addrs\n")); + + // Print individual results of get_remote_addrs + for (i = 0; i < in_out_size; ++i) { + + if (in_out[i].addr_to_string(outbuf, outbuf_size)) { + + ACE_ERROR((LM_ERROR, + "%p\n", + "addr_to_string")); + return; + } + + ACE_DEBUG((LM_DEBUG, + "get_remote_addrs[%i] = %s\n", + i, + outbuf)); + } +} + + diff --git a/tests/SOCK_SEQPACK_Association_Test.dsp b/tests/SOCK_SEQPACK_Association_Test.dsp new file mode 100644 index 00000000000..5c9e02d00f0 --- /dev/null +++ b/tests/SOCK_SEQPACK_Association_Test.dsp @@ -0,0 +1,155 @@ +# Microsoft Developer Studio Project File - Name="SOCK_SEQPACK_Association_Test" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=SOCK_SEQPACK_Association_Test - Win32 Static Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "SOCK_SEQPACK_Association_Test.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "SOCK_SEQPACK_Association_Test.mak" CFG="SOCK_SEQPACK_Association_Test - Win32 Static Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "SOCK_SEQPACK_Association_Test - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "SOCK_SEQPACK_Association_Test - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE "SOCK_SEQPACK_Association_Test - Win32 Static Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE "SOCK_SEQPACK_Association_Test - Win32 Static Release" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "SOCK_SEQPACK_Association_Test - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 ace.lib /nologo /subsystem:console /machine:I386 /libpath:"..\ace"
+
+!ELSEIF "$(CFG)" == "SOCK_SEQPACK_Association_Test - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\ace"
+
+!ELSEIF "$(CFG)" == "SOCK_SEQPACK_Association_Test - Win32 Static Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Static Debug"
+# PROP BASE Intermediate_Dir "Static Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Static_Debug"
+# PROP Intermediate_Dir "Static_Debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../" /D "_DEBUG" /D "ACE_AS_STATIC_LIBS" /D "WIN32" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 acesd.lib advapi32.lib user32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\ace"
+
+!ELSEIF "$(CFG)" == "SOCK_SEQPACK_Association_Test - Win32 Static Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Static Release"
+# PROP BASE Intermediate_Dir "Static Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Static_Release"
+# PROP Intermediate_Dir "Static_Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../" /D "NDEBUG" /D "ACE_AS_STATIC_LIBS" /D "WIN32" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 aces.lib advapi32.lib user32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\ace"
+
+!ENDIF
+
+# Begin Target
+
+# Name "SOCK_SEQPACK_Association_Test - Win32 Release"
+# Name "SOCK_SEQPACK_Association_Test - Win32 Debug"
+# Name "SOCK_SEQPACK_Association_Test - Win32 Static Debug"
+# Name "SOCK_SEQPACK_Association_Test - Win32 Static Release"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\SOCK_SEQPACK_Association_Test.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
diff --git a/tests/run_test.lst b/tests/run_test.lst index 20a81cb1f3a..73eacad34b7 100644 --- a/tests/run_test.lst +++ b/tests/run_test.lst @@ -72,6 +72,7 @@ MT_Reactor_Upcall_Test: !VxWorks MT_SOCK_Test: !chorus Malloc_Test: !VxWorks Multicast_Test: !ST +Multihomed_INET_Addr_Test Naming_Test: OTHER !chorus !LynxOS !Unicos !VxWorks New_Fail_Test: ALL !DISABLED Notify_Performance_Test diff --git a/tests/run_tests.bat b/tests/run_tests.bat index 6345eb9c583..cf51b2f4389 100644 --- a/tests/run_tests.bat +++ b/tests/run_tests.bat @@ -132,6 +132,7 @@ call %run_cmd% %dopure% %platform% MT_Reactor_Timer_Test call %run_cmd% %dopure% %platform% MT_Reactor_Upcall_Test call %run_cmd% %dopure% %platform% MT_SOCK_Test call %run_cmd% %dopure% %platform% Malloc_Test +call %run_cmd% %dopure% %platform% Multihomed_INET_Addr_Test call %run_cmd% %dopure% %platform% Naming_Test rem call %run_cmd% %dopure% %platform% New_Fail_Test call %run_cmd% %dopure% %platform% Notify_Performance_Test |