Commit edf3e434 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

Added ICMP DLL implementation.

parent 1ce88e95
......@@ -38,6 +38,7 @@ LIBSUBDIRS = \
dlls/dciman32 \
dlls/dplayx \
dlls/dsound \
dlls/icmp \
dlls/imagehlp \
dlls/imm32 \
dlls/lzexpand \
......@@ -143,6 +144,7 @@ LIBOBJS = \
dlls/commdlg/commdlg.o \
dlls/crtdll/crtdll.o \
dlls/dciman32/dciman32.o \
dlls/icmp/icmp.o \
dlls/dplayx/dplayx.o \
dlls/dsound/dsound.o \
dlls/imagehlp/imagehlp.o \
......
......@@ -5643,6 +5643,7 @@ dlls/crtdll/Makefile
dlls/dciman32/Makefile
dlls/dplayx/Makefile
dlls/dsound/Makefile
dlls/icmp/Makefile
dlls/imagehlp/Makefile
dlls/imm32/Makefile
dlls/lzexpand/Makefile
......@@ -5846,6 +5847,7 @@ dlls/crtdll/Makefile
dlls/dciman32/Makefile
dlls/dplayx/Makefile
dlls/dsound/Makefile
dlls/icmp/Makefile
dlls/imagehlp/Makefile
dlls/imm32/Makefile
dlls/lzexpand/Makefile
......
......@@ -850,6 +850,7 @@ dlls/crtdll/Makefile
dlls/dciman32/Makefile
dlls/dplayx/Makefile
dlls/dsound/Makefile
dlls/icmp/Makefile
dlls/imagehlp/Makefile
dlls/imm32/Makefile
dlls/lzexpand/Makefile
......
......@@ -7,6 +7,7 @@ SUBDIRS = \
dciman32 \
dplayx \
dsound \
icmp \
imagehlp \
imm32 \
lzexpand \
......
Makefile
icmp.spec.c
DEFS = @DLLFLAGS@ -D__WINE__
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = icmp
SPEC_SRCS = icmp.spec
C_SRCS = icmp_main.c
all: $(MODULE).o
@MAKE_RULES@
### Dependencies:
name icmp
type win32
1 stdcall IcmpCloseHandle(ptr) IcmpCloseHandle
2 stdcall IcmpCreateFile() IcmpCreateFile
3 stub IcmpParseReplies
4 stub IcmpSendEcho2
5 stdcall IcmpSendEcho(ptr long ptr long ptr ptr long long) IcmpSendEcho
6 stub do_echo_rep
7 stub do_echo_req
8 stub register_icmp
......@@ -59,114 +59,115 @@ const int dbch_header = 47;
const int dbch_heap = 48;
const int dbch_hook = 49;
const int dbch_hotkey = 50;
const int dbch_icon = 51;
const int dbch_imagehlp = 52;
const int dbch_imagelist = 53;
const int dbch_imm = 54;
const int dbch_int = 55;
const int dbch_int10 = 56;
const int dbch_int16 = 57;
const int dbch_int17 = 58;
const int dbch_int19 = 59;
const int dbch_int21 = 60;
const int dbch_int31 = 61;
const int dbch_io = 62;
const int dbch_ipaddress = 63;
const int dbch_key = 64;
const int dbch_keyboard = 65;
const int dbch_ldt = 66;
const int dbch_listbox = 67;
const int dbch_listview = 68;
const int dbch_local = 69;
const int dbch_mci = 70;
const int dbch_mcianim = 71;
const int dbch_mciavi = 72;
const int dbch_mcimidi = 73;
const int dbch_mciwave = 74;
const int dbch_mdi = 75;
const int dbch_menu = 76;
const int dbch_message = 77;
const int dbch_metafile = 78;
const int dbch_midi = 79;
const int dbch_mmaux = 80;
const int dbch_mmio = 81;
const int dbch_mmsys = 82;
const int dbch_mmtime = 83;
const int dbch_module = 84;
const int dbch_monthcal = 85;
const int dbch_mpr = 86;
const int dbch_msacm = 87;
const int dbch_msg = 88;
const int dbch_msvideo = 89;
const int dbch_nativefont = 90;
const int dbch_nonclient = 91;
const int dbch_ntdll = 92;
const int dbch_ole = 93;
const int dbch_pager = 94;
const int dbch_palette = 95;
const int dbch_pidl = 96;
const int dbch_print = 97;
const int dbch_process = 98;
const int dbch_profile = 99;
const int dbch_progress = 100;
const int dbch_prop = 101;
const int dbch_propsheet = 102;
const int dbch_psapi = 103;
const int dbch_psdrv = 104;
const int dbch_ras = 105;
const int dbch_rebar = 106;
const int dbch_reg = 107;
const int dbch_region = 108;
const int dbch_relay = 109;
const int dbch_resource = 110;
const int dbch_scroll = 111;
const int dbch_security = 112;
const int dbch_segment = 113;
const int dbch_seh = 114;
const int dbch_selector = 115;
const int dbch_sendmsg = 116;
const int dbch_server = 117;
const int dbch_shell = 118;
const int dbch_snoop = 119;
const int dbch_sound = 120;
const int dbch_static = 121;
const int dbch_statusbar = 122;
const int dbch_storage = 123;
const int dbch_stress = 124;
const int dbch_string = 125;
const int dbch_syscolor = 126;
const int dbch_system = 127;
const int dbch_tab = 128;
const int dbch_tapi = 129;
const int dbch_task = 130;
const int dbch_text = 131;
const int dbch_thread = 132;
const int dbch_thunk = 133;
const int dbch_timer = 134;
const int dbch_toolbar = 135;
const int dbch_toolhelp = 136;
const int dbch_tooltips = 137;
const int dbch_trackbar = 138;
const int dbch_treeview = 139;
const int dbch_ttydrv = 140;
const int dbch_tweak = 141;
const int dbch_typelib = 142;
const int dbch_updown = 143;
const int dbch_ver = 144;
const int dbch_virtual = 145;
const int dbch_vxd = 146;
const int dbch_wave = 147;
const int dbch_win = 148;
const int dbch_win16drv = 149;
const int dbch_win32 = 150;
const int dbch_wing = 151;
const int dbch_winsock = 152;
const int dbch_winspool = 153;
const int dbch_wnet = 154;
const int dbch_x11 = 155;
const int dbch_x11drv = 156;
const int dbch_icmp = 51;
const int dbch_icon = 52;
const int dbch_imagehlp = 53;
const int dbch_imagelist = 54;
const int dbch_imm = 55;
const int dbch_int = 56;
const int dbch_int10 = 57;
const int dbch_int16 = 58;
const int dbch_int17 = 59;
const int dbch_int19 = 60;
const int dbch_int21 = 61;
const int dbch_int31 = 62;
const int dbch_io = 63;
const int dbch_ipaddress = 64;
const int dbch_key = 65;
const int dbch_keyboard = 66;
const int dbch_ldt = 67;
const int dbch_listbox = 68;
const int dbch_listview = 69;
const int dbch_local = 70;
const int dbch_mci = 71;
const int dbch_mcianim = 72;
const int dbch_mciavi = 73;
const int dbch_mcimidi = 74;
const int dbch_mciwave = 75;
const int dbch_mdi = 76;
const int dbch_menu = 77;
const int dbch_message = 78;
const int dbch_metafile = 79;
const int dbch_midi = 80;
const int dbch_mmaux = 81;
const int dbch_mmio = 82;
const int dbch_mmsys = 83;
const int dbch_mmtime = 84;
const int dbch_module = 85;
const int dbch_monthcal = 86;
const int dbch_mpr = 87;
const int dbch_msacm = 88;
const int dbch_msg = 89;
const int dbch_msvideo = 90;
const int dbch_nativefont = 91;
const int dbch_nonclient = 92;
const int dbch_ntdll = 93;
const int dbch_ole = 94;
const int dbch_pager = 95;
const int dbch_palette = 96;
const int dbch_pidl = 97;
const int dbch_print = 98;
const int dbch_process = 99;
const int dbch_profile = 100;
const int dbch_progress = 101;
const int dbch_prop = 102;
const int dbch_propsheet = 103;
const int dbch_psapi = 104;
const int dbch_psdrv = 105;
const int dbch_ras = 106;
const int dbch_rebar = 107;
const int dbch_reg = 108;
const int dbch_region = 109;
const int dbch_relay = 110;
const int dbch_resource = 111;
const int dbch_scroll = 112;
const int dbch_security = 113;
const int dbch_segment = 114;
const int dbch_seh = 115;
const int dbch_selector = 116;
const int dbch_sendmsg = 117;
const int dbch_server = 118;
const int dbch_shell = 119;
const int dbch_snoop = 120;
const int dbch_sound = 121;
const int dbch_static = 122;
const int dbch_statusbar = 123;
const int dbch_storage = 124;
const int dbch_stress = 125;
const int dbch_string = 126;
const int dbch_syscolor = 127;
const int dbch_system = 128;
const int dbch_tab = 129;
const int dbch_tapi = 130;
const int dbch_task = 131;
const int dbch_text = 132;
const int dbch_thread = 133;
const int dbch_thunk = 134;
const int dbch_timer = 135;
const int dbch_toolbar = 136;
const int dbch_toolhelp = 137;
const int dbch_tooltips = 138;
const int dbch_trackbar = 139;
const int dbch_treeview = 140;
const int dbch_ttydrv = 141;
const int dbch_tweak = 142;
const int dbch_typelib = 143;
const int dbch_updown = 144;
const int dbch_ver = 145;
const int dbch_virtual = 146;
const int dbch_vxd = 147;
const int dbch_wave = 148;
const int dbch_win = 149;
const int dbch_win16drv = 150;
const int dbch_win32 = 151;
const int dbch_wing = 152;
const int dbch_winsock = 153;
const int dbch_winspool = 154;
const int dbch_wnet = 155;
const int dbch_x11 = 156;
const int dbch_x11drv = 157;
#define DEBUG_CHANNEL_COUNT 157
#define DEBUG_CHANNEL_COUNT 158
char __debug_msg_enabled[DEBUG_CHANNEL_COUNT][DEBUG_CLASS_COUNT] = {
{1, 1, 0, 0},
......@@ -325,6 +326,7 @@ char __debug_msg_enabled[DEBUG_CHANNEL_COUNT][DEBUG_CLASS_COUNT] = {
{1, 1, 0, 0},
{1, 1, 0, 0},
{1, 1, 0, 0},
{1, 1, 0, 0},
{1, 1, 0, 0}
};
......@@ -380,6 +382,7 @@ const char * const debug_ch_name[DEBUG_CHANNEL_COUNT] = {
"heap",
"hook",
"hotkey",
"icmp",
"icon",
"imagehlp",
"imagelist",
......
/*
* Interface to the ICMP functions.
*
* This header is not part of the standard headers, it is usually
* delivered separately and this is why it is not directly in 'include'.
*
* Depends on ipexport.h (there is no include directive in the original)
*/
#ifndef __WINE_ICMPAPI_H
#define __WINE_ICMPAPI_H
HANDLE WINAPI IcmpCreateFile(
VOID
);
BOOL WINAPI IcmpCloseHandle(
HANDLE IcmpHandle
);
DWORD WINAPI IcmpSendEcho(
HANDLE IcmpHandle,
IPAddr DestinationAddress,
LPVOID RequestData,
WORD RequestSize,
PIP_OPTION_INFORMATION RequestOptions,
LPVOID ReplyBuffer,
DWORD ReplySize,
DWORD Timeout
);
#endif /* __WINE_ICMPAPI_H */
/*
* Defines the types and macros used by the ICMP API, see icmpapi.h.
*
* This header is not part of the standard headers, it is usually
* delivered separately and this is why it is not directly in 'include'.
*/
#ifndef __WINE_IPEXPORT_H
#define __WINE_IPEXPORT_H
typedef unsigned long IPAddr;
typedef unsigned long IPMask;
typedef unsigned long IP_STATUS;
struct ip_option_information
{
unsigned char Ttl;
unsigned char Tos;
unsigned char Flags;
unsigned char OptionsSize;
unsigned char* OptionsData;
};
#define IP_FLAG_DF 0x2
#define IP_OPT_EOL 0
#define IP_OPT_NOP 1
#define IP_OPT_SECURITY 0x82
#define IP_OPT_LSRR 0x83
#define IP_OPT_SSRR 0x89
#define IP_OPT_RR 0x7
#define IP_OPT_TS 0x44
#define IP_OPT_SID 0x88
#define MAX_OPT_SIZE 40
struct icmp_echo_reply
{
IPAddr Address;
unsigned long Status;
unsigned long RoundTripTime;
unsigned short DataSize;
unsigned short Reserved;
void* Data;
struct ip_option_information Options;
};
typedef struct ip_option_information IP_OPTION_INFORMATION, *PIP_OPTION_INFORMATION;
typedef struct icmp_echo_reply ICMP_ECHO_REPLY, *PICMP_ECHO_REPLY;
#define IP_STATUS_BASE 11000
#define IP_SUCCESS 0
#define IP_BUF_TOO_SMALL (IP_STATUS_BASE + 1)
#define IP_DEST_NET_UNREACHABLE (IP_STATUS_BASE + 2)
#define IP_DEST_HOST_UNREACHABLE (IP_STATUS_BASE + 3)
#define IP_DEST_PROT_UNREACHABLE (IP_STATUS_BASE + 4)
#define IP_DEST_PORT_UNREACHABLE (IP_STATUS_BASE + 5)
#define IP_NO_RESOURCES (IP_STATUS_BASE + 6)
#define IP_BAD_OPTION (IP_STATUS_BASE + 7)
#define IP_HW_ERROR (IP_STATUS_BASE + 8)
#define IP_PACKET_TOO_BIG (IP_STATUS_BASE + 9)
#define IP_REQ_TIMED_OUT (IP_STATUS_BASE + 10)
#define IP_BAD_REQ (IP_STATUS_BASE + 11)
#define IP_BAD_ROUTE (IP_STATUS_BASE + 12)
#define IP_TTL_EXPIRED_TRANSIT (IP_STATUS_BASE + 13)
#define IP_TTL_EXPIRED_REASSEM (IP_STATUS_BASE + 14)
#define IP_PARAM_PROBLEM (IP_STATUS_BASE + 15)
#define IP_SOURCE_QUENCH (IP_STATUS_BASE + 16)
#define IP_OPTION_TOO_BIG (IP_STATUS_BASE + 17)
#define IP_BAD_DESTINATION (IP_STATUS_BASE + 18)
#define IP_ADDR_DELETED (IP_STATUS_BASE + 19)
#define IP_SPEC_MTU_CHANGE (IP_STATUS_BASE + 20)
#define IP_MTU_CHANGE (IP_STATUS_BASE + 21)
#define IP_UNLOAD (IP_STATUS_BASE + 22)
#define IP_GENERAL_FAILURE (IP_STATUS_BASE + 50)
#define MAX_IP_STATUS IP_GENERAL_FAILURE
#define IP_PENDING (IP_STATUS_BASE + 255)
#endif /* __WINE_IPEXPORT_H */
......@@ -56,6 +56,7 @@ static struct tagDllOverride {
{"wnaspi32,wow32", "builtin"},
{"system,display,wprocs ", "builtin"},
{"wineps", "builtin"},
{"icmp", "builtin"},
/* we have to use libglide2x.so instead of glide2x.dll ... */
{"glide2x", "so,native"},
{NULL,NULL},
......
......@@ -60,6 +60,7 @@ extern const BUILTIN32_DESCRIPTOR DPLAY_Descriptor;
extern const BUILTIN32_DESCRIPTOR DPLAYX_Descriptor;
extern const BUILTIN32_DESCRIPTOR DSOUND_Descriptor;
extern const BUILTIN32_DESCRIPTOR GDI32_Descriptor;
extern const BUILTIN32_DESCRIPTOR ICMP_Descriptor;
extern const BUILTIN32_DESCRIPTOR IMAGEHLP_Descriptor;
extern const BUILTIN32_DESCRIPTOR IMM32_Descriptor;
extern const BUILTIN32_DESCRIPTOR KERNEL32_Descriptor;
......@@ -116,6 +117,7 @@ static BUILTIN32_DLL BuiltinDLLs[] =
{ &DPLAYX_Descriptor, 0, 0, NULL },
{ &DSOUND_Descriptor, 0, 0, NULL },
{ &GDI32_Descriptor, 0, 0, NULL },
{ &ICMP_Descriptor, 0, 0, NULL },
{ &IMAGEHLP_Descriptor, BI32_DANGER, 0, NULL },
{ &IMM32_Descriptor, 0, 0, NULL },
{ &KERNEL32_Descriptor, 0, 0, NULL },
......
......@@ -61,7 +61,7 @@ EXTRA_LD_LIBRARY_PATH=${HOME}/wine/cvs/lib
DefaultLoadOrder = native, elfdll, so, builtin
[DllPairs]
kernel = kernel32
krnl386 = kernel32
gdi = gdi32
user = user32
commdlg = comdlg32
......@@ -96,6 +96,7 @@ w32skrnl = builtin
wnaspi32, wow32 = builtin
system, display, wprocs = builtin
wineps = builtin
icmp = builtin
[options]
AllocSystemColors=100
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment