Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
7eafc714
Commit
7eafc714
authored
Nov 23, 2020
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Dec 03, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iphlpapi: Implement IcmpSendEcho and IcmpSendEcho2 via IcmpSendEcho2Ex.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b23039fa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
64 additions
and
77 deletions
+64
-77
icmp.c
dlls/iphlpapi/icmp.c
+64
-77
No files found.
dlls/iphlpapi/icmp.c
View file @
7eafc714
...
@@ -443,6 +443,50 @@ DWORD WINAPI IcmpSendEcho(
...
@@ -443,6 +443,50 @@ DWORD WINAPI IcmpSendEcho(
DWORD
Timeout
DWORD
Timeout
)
)
{
{
return
IcmpSendEcho2Ex
(
IcmpHandle
,
NULL
,
NULL
,
NULL
,
0
,
DestinationAddress
,
RequestData
,
RequestSize
,
RequestOptions
,
ReplyBuffer
,
ReplySize
,
Timeout
);
}
/***********************************************************************
* IcmpSendEcho2 (IPHLPAPI.@)
*/
DWORD
WINAPI
IcmpSendEcho2
(
HANDLE
IcmpHandle
,
HANDLE
Event
,
PIO_APC_ROUTINE
ApcRoutine
,
PVOID
ApcContext
,
IPAddr
DestinationAddress
,
LPVOID
RequestData
,
WORD
RequestSize
,
PIP_OPTION_INFORMATION
RequestOptions
,
LPVOID
ReplyBuffer
,
DWORD
ReplySize
,
DWORD
Timeout
)
{
return
IcmpSendEcho2Ex
(
IcmpHandle
,
Event
,
ApcRoutine
,
ApcContext
,
0
,
DestinationAddress
,
RequestData
,
RequestSize
,
RequestOptions
,
ReplyBuffer
,
ReplySize
,
Timeout
);
}
/***********************************************************************
* IcmpSendEcho2Ex (IPHLPAPI.@)
*/
DWORD
WINAPI
IcmpSendEcho2Ex
(
HANDLE
IcmpHandle
,
HANDLE
Event
,
PIO_APC_ROUTINE
ApcRoutine
,
PVOID
ApcContext
,
IPAddr
SourceAddress
,
IPAddr
DestinationAddress
,
LPVOID
RequestData
,
WORD
RequestSize
,
PIP_OPTION_INFORMATION
RequestOptions
,
LPVOID
ReplyBuffer
,
DWORD
ReplySize
,
DWORD
Timeout
)
{
icmp_t
*
icp
=
(
icmp_t
*
)
IcmpHandle
;
icmp_t
*
icp
=
(
icmp_t
*
)
IcmpHandle
;
struct
icmp
*
icmp_header
;
struct
icmp
*
icmp_header
;
struct
sockaddr_in
addr
;
struct
sockaddr_in
addr
;
...
@@ -451,6 +495,10 @@ DWORD WINAPI IcmpSendEcho(
...
@@ -451,6 +495,10 @@ DWORD WINAPI IcmpSendEcho(
int
reqsize
,
repsize
;
int
reqsize
,
repsize
;
DWORD
send_time
;
DWORD
send_time
;
TRACE
(
"(%p, %p, %p, %p, %08x, %08x, %p, %d, %p, %p, %d, %d)
\n
"
,
IcmpHandle
,
Event
,
ApcRoutine
,
ApcContext
,
SourceAddress
,
DestinationAddress
,
RequestData
,
RequestSize
,
RequestOptions
,
ReplyBuffer
,
ReplySize
,
Timeout
);
if
(
IcmpHandle
==
INVALID_HANDLE_VALUE
)
{
if
(
IcmpHandle
==
INVALID_HANDLE_VALUE
)
{
/* FIXME: in fact win98 seems to ignore the handle value !!! */
/* FIXME: in fact win98 seems to ignore the handle value !!! */
SetLastError
(
ERROR_INVALID_PARAMETER
);
SetLastError
(
ERROR_INVALID_PARAMETER
);
...
@@ -473,6 +521,22 @@ DWORD WINAPI IcmpSendEcho(
...
@@ -473,6 +521,22 @@ DWORD WINAPI IcmpSendEcho(
return
0
;
return
0
;
}
}
if
(
Event
)
{
FIXME
(
"unsupported for events
\n
"
);
return
0
;
}
if
(
ApcRoutine
)
{
FIXME
(
"unsupported for APCs
\n
"
);
return
0
;
}
if
(
SourceAddress
)
{
FIXME
(
"unsupported for source addresses
\n
"
);
return
0
;
}
/* Prepare the request */
/* Prepare the request */
id
=
getpid
()
&
0xFFFF
;
id
=
getpid
()
&
0xFFFF
;
seq
=
InterlockedIncrement
(
&
icmp_sequence
)
&
0xFFFF
;
seq
=
InterlockedIncrement
(
&
icmp_sequence
)
&
0xFFFF
;
...
@@ -571,83 +635,6 @@ DWORD WINAPI IcmpSendEcho(
...
@@ -571,83 +635,6 @@ DWORD WINAPI IcmpSendEcho(
return
icmp_get_reply
(
icp
->
sid
,
buffer
,
send_time
,
ReplyBuffer
,
ReplySize
,
Timeout
);
return
icmp_get_reply
(
icp
->
sid
,
buffer
,
send_time
,
ReplyBuffer
,
ReplySize
,
Timeout
);
}
}
/***********************************************************************
* IcmpSendEcho2 (IPHLPAPI.@)
*/
DWORD
WINAPI
IcmpSendEcho2
(
HANDLE
IcmpHandle
,
HANDLE
Event
,
PIO_APC_ROUTINE
ApcRoutine
,
PVOID
ApcContext
,
IPAddr
DestinationAddress
,
LPVOID
RequestData
,
WORD
RequestSize
,
PIP_OPTION_INFORMATION
RequestOptions
,
LPVOID
ReplyBuffer
,
DWORD
ReplySize
,
DWORD
Timeout
)
{
TRACE
(
"(%p, %p, %p, %p, %08x, %p, %d, %p, %p, %d, %d): stub
\n
"
,
IcmpHandle
,
Event
,
ApcRoutine
,
ApcContext
,
DestinationAddress
,
RequestData
,
RequestSize
,
RequestOptions
,
ReplyBuffer
,
ReplySize
,
Timeout
);
if
(
Event
)
{
FIXME
(
"unsupported for events
\n
"
);
return
0
;
}
if
(
ApcRoutine
)
{
FIXME
(
"unsupported for APCs
\n
"
);
return
0
;
}
return
IcmpSendEcho
(
IcmpHandle
,
DestinationAddress
,
RequestData
,
RequestSize
,
RequestOptions
,
ReplyBuffer
,
ReplySize
,
Timeout
);
}
/***********************************************************************
* IcmpSendEcho2Ex (IPHLPAPI.@)
*/
DWORD
WINAPI
IcmpSendEcho2Ex
(
HANDLE
IcmpHandle
,
HANDLE
Event
,
PIO_APC_ROUTINE
ApcRoutine
,
PVOID
ApcContext
,
IPAddr
SourceAddress
,
IPAddr
DestinationAddress
,
LPVOID
RequestData
,
WORD
RequestSize
,
PIP_OPTION_INFORMATION
RequestOptions
,
LPVOID
ReplyBuffer
,
DWORD
ReplySize
,
DWORD
Timeout
)
{
TRACE
(
"(%p, %p, %p, %p, %08x, %08x, %p, %d, %p, %p, %d, %d): stub
\n
"
,
IcmpHandle
,
Event
,
ApcRoutine
,
ApcContext
,
SourceAddress
,
DestinationAddress
,
RequestData
,
RequestSize
,
RequestOptions
,
ReplyBuffer
,
ReplySize
,
Timeout
);
if
(
Event
)
{
FIXME
(
"unsupported for events
\n
"
);
return
0
;
}
if
(
ApcRoutine
)
{
FIXME
(
"unsupported for APCs
\n
"
);
return
0
;
}
if
(
SourceAddress
)
{
FIXME
(
"unsupported for source addresses
\n
"
);
return
0
;
}
return
IcmpSendEcho
(
IcmpHandle
,
DestinationAddress
,
RequestData
,
RequestSize
,
RequestOptions
,
ReplyBuffer
,
ReplySize
,
Timeout
);
}
/*
/*
* Copyright (c) 1989 The Regents of the University of California.
* Copyright (c) 1989 The Regents of the University of California.
* All rights reserved.
* All rights reserved.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment