mirror of
https://github.com/reactos/reactos.git
synced 2024-09-28 21:44:31 +00:00
[IPHLPAPI] Make icmp functions use IOCTL_ICMP_ECHO_REQUEST from tcpip.sys
This adds missing features like using events and APCs within IcmpSendEcho2 functions and others. CORE-10742 CORE-14411 Co-authored-by: Tim Crawford <crawfxrd@gmail.com>
This commit is contained in:
parent
cf3ab9d15a
commit
dd2ff41dfc
File diff suppressed because it is too large
Load diff
|
@ -80,11 +80,11 @@
|
||||||
@ stub GetUdpTableFromStack
|
@ stub GetUdpTableFromStack
|
||||||
@ stdcall GetUniDirectionalAdapterInfo( ptr ptr )
|
@ stdcall GetUniDirectionalAdapterInfo( ptr ptr )
|
||||||
@ stdcall Icmp6CreateFile()
|
@ stdcall Icmp6CreateFile()
|
||||||
@ stdcall -stub Icmp6ParseReplies(ptr long)
|
@ stdcall Icmp6ParseReplies(ptr long)
|
||||||
@ stdcall Icmp6SendEcho2(ptr ptr ptr ptr ptr ptr ptr long ptr ptr long long)
|
@ stdcall Icmp6SendEcho2(ptr ptr ptr ptr ptr ptr ptr long ptr ptr long long)
|
||||||
@ stdcall IcmpCloseHandle(ptr)
|
@ stdcall IcmpCloseHandle(ptr)
|
||||||
@ stdcall IcmpCreateFile()
|
@ stdcall IcmpCreateFile()
|
||||||
@ stdcall -stub IcmpParseReplies(ptr long)
|
@ stdcall IcmpParseReplies(ptr long)
|
||||||
@ stdcall IcmpSendEcho2(ptr ptr ptr ptr long ptr long ptr ptr long long)
|
@ stdcall IcmpSendEcho2(ptr ptr ptr ptr long ptr long ptr ptr long long)
|
||||||
@ stdcall IcmpSendEcho(ptr long ptr long ptr ptr long long)
|
@ stdcall IcmpSendEcho(ptr long ptr long ptr ptr long long)
|
||||||
@ stub InternalCreateIpForwardEntry
|
@ stub InternalCreateIpForwardEntry
|
||||||
|
|
|
@ -28,14 +28,14 @@ typedef ULONG IPAddr;
|
||||||
typedef ULONG IPMask;
|
typedef ULONG IPMask;
|
||||||
typedef ULONG IP_STATUS;
|
typedef ULONG IP_STATUS;
|
||||||
|
|
||||||
struct ip_option_information
|
typedef struct ip_option_information
|
||||||
{
|
{
|
||||||
unsigned char Ttl;
|
unsigned char Ttl;
|
||||||
unsigned char Tos;
|
unsigned char Tos;
|
||||||
unsigned char Flags;
|
unsigned char Flags;
|
||||||
unsigned char OptionsSize;
|
unsigned char OptionsSize;
|
||||||
unsigned char* OptionsData;
|
unsigned char* OptionsData;
|
||||||
};
|
} IP_OPTION_INFORMATION, *PIP_OPTION_INFORMATION;
|
||||||
|
|
||||||
#if defined(_WIN64)
|
#if defined(_WIN64)
|
||||||
|
|
||||||
|
@ -64,20 +64,31 @@ struct ip_option_information32
|
||||||
#define MAX_OPT_SIZE 40
|
#define MAX_OPT_SIZE 40
|
||||||
|
|
||||||
|
|
||||||
struct icmp_echo_reply
|
typedef struct icmp_echo_request
|
||||||
{
|
{
|
||||||
IPAddr Address;
|
IPAddr Address;
|
||||||
ULONG Status;
|
UINT32 Timeout;
|
||||||
ULONG RoundTripTime;
|
UINT16 DataOffset;
|
||||||
unsigned short DataSize;
|
UINT16 DataSize;
|
||||||
unsigned short Reserved;
|
UINT8 HasOptions;
|
||||||
void* Data;
|
UINT8 Ttl;
|
||||||
struct ip_option_information Options;
|
UINT8 Tos;
|
||||||
};
|
UINT8 Flags;
|
||||||
|
UINT16 OptionsOffset;
|
||||||
|
UINT8 OptionsSize;
|
||||||
|
UINT8 Padding;
|
||||||
|
} ICMP_ECHO_REQUEST, *PICMP_ECHO_REQUEST;
|
||||||
|
|
||||||
typedef struct ip_option_information IP_OPTION_INFORMATION, *PIP_OPTION_INFORMATION;
|
typedef struct icmp_echo_reply
|
||||||
|
{
|
||||||
typedef struct icmp_echo_reply ICMP_ECHO_REPLY, *PICMP_ECHO_REPLY;
|
IPAddr Address;
|
||||||
|
UINT32 Status;
|
||||||
|
UINT32 RoundTripTime;
|
||||||
|
UINT16 DataSize;
|
||||||
|
UINT16 Reserved;
|
||||||
|
PVOID Data;
|
||||||
|
IP_OPTION_INFORMATION Options;
|
||||||
|
} ICMP_ECHO_REPLY, *PICMP_ECHO_REPLY;
|
||||||
|
|
||||||
#ifdef _WIN64
|
#ifdef _WIN64
|
||||||
struct icmp_echo_reply32
|
struct icmp_echo_reply32
|
||||||
|
@ -164,6 +175,16 @@ typedef struct _IPV6_ADDRESS_EX {
|
||||||
} IPV6_ADDRESS_EX, *PIPV6_ADDRESS_EX;
|
} IPV6_ADDRESS_EX, *PIPV6_ADDRESS_EX;
|
||||||
#include <poppack.h>
|
#include <poppack.h>
|
||||||
|
|
||||||
|
typedef struct _ICMPV6_ECHO_REQUEST
|
||||||
|
{
|
||||||
|
IPV6_ADDRESS_EX DestinationAddress;
|
||||||
|
IPV6_ADDRESS_EX SourceAddress;
|
||||||
|
UINT32 Timeout;
|
||||||
|
UINT16 Unknown1;
|
||||||
|
UINT16 Ttl; // XXX: These seem unnecessarily large.
|
||||||
|
UINT32 Flags; // Is something else in the struct?
|
||||||
|
} ICMPV6_ECHO_REQUEST, *PICMPV6_ECHO_REQUEST;
|
||||||
|
|
||||||
typedef struct icmpv6_echo_reply_lh {
|
typedef struct icmpv6_echo_reply_lh {
|
||||||
IPV6_ADDRESS_EX Address;
|
IPV6_ADDRESS_EX Address;
|
||||||
ULONG Status;
|
ULONG Status;
|
||||||
|
|
|
@ -46,6 +46,9 @@
|
||||||
#define IOCTL_DELETE_IP_ADDRESS \
|
#define IOCTL_DELETE_IP_ADDRESS \
|
||||||
_TCP_CTL_CODE(16, METHOD_BUFFERED, FILE_WRITE_ACCESS)
|
_TCP_CTL_CODE(16, METHOD_BUFFERED, FILE_WRITE_ACCESS)
|
||||||
|
|
||||||
|
#define IOCTL_ICMP_ECHO_REQUEST \
|
||||||
|
_TCP_CTL_CODE(0, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
||||||
|
|
||||||
#define IF_MIB_STATS_ID 1
|
#define IF_MIB_STATS_ID 1
|
||||||
#define IP_MIB_STATS_ID 1
|
#define IP_MIB_STATS_ID 1
|
||||||
#define IP_MIB_ARPTABLE_ENTRY_ID 0x101
|
#define IP_MIB_ARPTABLE_ENTRY_ID 0x101
|
||||||
|
|
Loading…
Reference in a new issue