[ICMP][IPHLPAPI] Move the icmp functions to iphlpapi where they belong. Brought to...
authorAmine Khaldi <amine.khaldi@reactos.org>
Fri, 4 Dec 2015 10:57:44 +0000 (10:57 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Fri, 4 Dec 2015 10:57:44 +0000 (10:57 +0000)
svn path=/trunk/; revision=70262

reactos/dll/win32/icmp/CMakeLists.txt
reactos/dll/win32/icmp/icmp.rc
reactos/dll/win32/icmp/icmp.spec
reactos/dll/win32/iphlpapi/CMakeLists.txt
reactos/dll/win32/iphlpapi/icmp.c [moved from reactos/dll/win32/icmp/icmp_main.c with 98% similarity]
reactos/dll/win32/iphlpapi/ip.h [moved from reactos/dll/win32/icmp/ip.h with 100% similarity]
reactos/dll/win32/iphlpapi/ip_icmp.h [moved from reactos/dll/win32/icmp/ip_icmp.h with 100% similarity]
reactos/dll/win32/iphlpapi/iphlpapi.spec
reactos/dll/win32/iphlpapi/iphlpapi_main.c
reactos/media/doc/README.WINE

index d231d3a..d36a089 100644 (file)
@@ -1,15 +1,12 @@
 
-include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
-spec2def(icmp.dll icmp.spec ADD_IMPORTLIB)
+spec2def(icmp.dll icmp.spec)
 
 list(APPEND SOURCE
-    icmp_main.c
     icmp.rc
     ${CMAKE_CURRENT_BINARY_DIR}/icmp_stubs.c
     ${CMAKE_CURRENT_BINARY_DIR}/icmp.def)
 
 add_library(icmp SHARED ${SOURCE})
 set_module_type(icmp win32dll)
-target_link_libraries(icmp wine)
-add_importlibs(icmp ws2_32 msvcrt kernel32 ntdll)
+add_importlibs(icmp iphlpapi msvcrt kernel32 ntdll)
 add_cd_file(TARGET icmp DESTINATION reactos/system32 FOR all)
index 5ea55de..18f062a 100644 (file)
@@ -1 +1,5 @@
-#include <wine/wine_common_ver.rc>
+#define REACTOS_VERSION_DLL
+#define REACTOS_STR_FILE_DESCRIPTION "ICMP DLL"
+#define REACTOS_STR_INTERNAL_NAME "icmp.dll"
+#define REACTOS_STR_ORIGINAL_FILENAME "icmp.dll"
+#include <reactos/version.rc>
index 93d5b27..61f91f7 100644 (file)
@@ -1,8 +1,9 @@
-@ stdcall IcmpCloseHandle(ptr)
-@ stdcall IcmpCreateFile()
-@ stub  IcmpParseReplies
-@ stub  IcmpSendEcho2
-@ stdcall IcmpSendEcho(ptr long ptr long ptr ptr long long)
-@ stub  do_echo_rep
-@ stub  do_echo_req
-@ stub  register_icmp
+
+1 stdcall IcmpCloseHandle(ptr) iphlpapi.IcmpCloseHandle
+2 stdcall IcmpCreateFile() iphlpapi.IcmpCreateFile
+3 stdcall IcmpParseReplies(ptr long) iphlpapi.IcmpParseReplies
+4 stdcall IcmpSendEcho2(ptr ptr ptr ptr long ptr long ptr ptr long long) iphlpapi.IcmpSendEcho2
+5 stdcall IcmpSendEcho(ptr long ptr long ptr ptr long long) iphlpapi.IcmpSendEcho
+6 stub do_echo_rep
+7 stub do_echo_req
+8 stub register_icmp
index 11cc683..32ad970 100644 (file)
@@ -10,6 +10,7 @@ add_definitions(-DGetAdaptersAddressesV2)
 list(APPEND SOURCE
     address.c
     dhcp_reactos.c
+    icmp.c
     ifenum_reactos.c
     ipstats_reactos.c
     iphlpapi_reactos.c
@@ -28,6 +29,6 @@ add_library(iphlpapi SHARED
 
 set_module_type(iphlpapi win32dll UNICODE)
 target_link_libraries(iphlpapi wine tdilib)
-add_importlibs(iphlpapi icmp dhcpcsvc advapi32 ws2_32 msvcrt kernel32 ntdll)
+add_importlibs(iphlpapi dhcpcsvc advapi32 ws2_32 msvcrt kernel32 ntdll)
 add_pch(iphlpapi iphlpapi_private.h SOURCE)
 add_cd_file(TARGET iphlpapi DESTINATION reactos/system32 FOR all)
similarity index 98%
rename from reactos/dll/win32/icmp/icmp_main.c
rename to reactos/dll/win32/iphlpapi/icmp.c
index 187b310..7f9894e 100644 (file)
@@ -147,22 +147,6 @@ static int in_cksum(u_short *addr, int len)
  * Exported Routines.
  */
 
-BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
-{
-  WSADATA wsaData;
-
-  switch (fdwReason) {
-    case DLL_PROCESS_ATTACH:
-      WSAStartup(MAKEWORD(2, 2), &wsaData);
-      break;
-
-    case DLL_PROCESS_DETACH:
-      WSACleanup();
-      break;
-  }
-  return TRUE;
-}
-
 /***********************************************************************
  *             IcmpCreateFile (ICMP.@)
  */
index eadbfb1..fd31021 100644 (file)
 @ stub Icmp6CreateFile
 @ stub Icmp6ParseReplies
 @ stub Icmp6SendEcho2
-@ stdcall IcmpCloseHandle(ptr) icmp.IcmpCloseHandle
-@ stdcall IcmpCreateFile() icmp.IcmpCreateFile
-@ stdcall IcmpParseReplies(ptr long) icmp.IcmpParseReplies
-@ stdcall IcmpSendEcho(ptr long ptr long ptr ptr long long) icmp.IcmpSendEcho
-@ stdcall IcmpSendEcho2(ptr ptr ptr ptr long ptr long ptr ptr long long) icmp.IcmpSendEcho2
+@ stdcall IcmpCloseHandle(ptr)
+@ stdcall IcmpCreateFile()
+@ stdcall -stub IcmpParseReplies(ptr long)
+@ stdcall -stub IcmpSendEcho2(ptr ptr ptr ptr long ptr long ptr ptr long long)
+@ stdcall IcmpSendEcho(ptr long ptr long ptr ptr long long)
 @ stub InternalCreateIpForwardEntry
 @ stub InternalCreateIpNetEntry
 @ stub InternalDeleteIpForwardEntry
index babb458..b407158 100644 (file)
@@ -35,13 +35,17 @@ typedef struct _NAME_SERVER_LIST_CONTEXT {
 
 BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
 {
+  WSADATA wsaData;
+
   switch (fdwReason) {
     case DLL_PROCESS_ATTACH:
       DisableThreadLibraryCalls( hinstDLL );
       interfaceMapInit();
+      WSAStartup(MAKEWORD(2, 2), &wsaData);
       break;
 
     case DLL_PROCESS_DETACH:
+      WSACleanup();
       interfaceMapFree();
       break;
   }
index 12aa704..617e305 100644 (file)
@@ -74,7 +74,6 @@ reactos/dll/win32/hlink               # Synced to WineStaging-1.7.55
 reactos/dll/win32/hnetcfg             # Synced to WineStaging-1.7.55
 reactos/dll/win32/httpapi             # Synced to WineStaging-1.7.55
 reactos/dll/win32/iccvid              # Synced to WineStaging-1.7.55
-reactos/dll/win32/icmp                # Out of sync
 reactos/dll/win32/ieframe             # Synced to WineStaging-1.7.55
 reactos/dll/win32/imaadp32.acm        # Synced to WineStaging-1.7.55
 reactos/dll/win32/imagehlp            # Synced to WineStaging-1.7.55
@@ -267,6 +266,9 @@ advapi32 -
 gdi32 -
   reactos/dll/win32/gdi32/objects/linedda.c     # Synced at 20090410
 
+iphlpapi -
+  reactos/dll/win32/iphlpapi/icmp.c # Out of Sync
+
 kernel32 -
   reactos/dll/win32/kernel32/wine/actctx.c               # Partly synced with Wine 1.7.55
   reactos/dll/win32/kernel32/wine/comm.c                 # Synced in r52754