2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS TCP/IP protocol driver
5 * PURPOSE: Internet Control Message Protocol definitions
11 typedef struct ICMP_HEADER
{
12 UINT8 Type
; /* ICMP message type */
13 UINT8 Code
; /* ICMP message code */
14 UINT16 Checksum
; /* ICMP message checksum */
15 UINT16 Identifier
; /* ICMP Echo message identifier */
16 UINT16 Seq
; /* ICMP Echo message sequence num */
17 } ICMP_HEADER
, *PICMP_HEADER
;
20 /* ICMP message types */
21 #define ICMP_TYPE_ECHO_REPLY 0 /* Echo reply */
22 #define ICMP_TYPE_DEST_UNREACH 3 /* Destination unreachable */
23 #define ICMP_TYPE_SOURCE_QUENCH 4 /* Source quench */
24 #define ICMP_TYPE_REDIRECT 5 /* Redirect */
25 #define ICMP_TYPE_ECHO_REQUEST 8 /* Echo request */
26 #define ICMP_TYPE_TIME_EXCEEDED 11 /* Time exceeded */
27 #define ICMP_TYPE_PARAMETER 12 /* Parameter problem */
28 #define ICMP_TYPE_TIMESTAMP_REQUEST 13 /* Timestamp request */
29 #define ICMP_TYPE_TIMESTAMP_REPLY 14 /* Timestamp reply */
30 #define ICMP_TYPE_INFO_REQUEST 15 /* Information request */
31 #define ICMP_TYPE_INFO_REPLY 16 /* Information reply */
33 /* ICMP codes for ICMP_TYPE_DEST_UNREACH */
34 #define ICMP_CODE_DU_NET_UNREACH 0 /* Network unreachable */
35 #define ICMP_CODE_DU_HOST_UNREACH 1 /* Host unreachable */
36 #define ICMP_CODE_DU_PROTOCOL_UNREACH 2 /* Protocol unreachable */
37 #define ICMP_CODE_DU_PORT_UNREACH 3 /* Port unreachable */
38 #define ICMP_CODE_DU_FRAG_DF_SET 4 /* Fragmentation needed and DF set */
39 #define ICMP_CODE_DU_SOURCE_ROUTE_FAILED 5 /* Source route failed */
41 /* ICMP codes for ICMP_TYPE_REDIRECT */
42 #define ICMP_CODE_RD_NET 0 /* Redirect datagrams for the network */
43 #define ICMP_CODE_RD_HOST 1 /* Redirect datagrams for the host */
44 #define ICMP_CODE_RD_TOS_NET 2 /* Redirect datagrams for the Type of Service and network */
45 #define ICMP_CODE_RD_TOS_HOST 3 /* Redirect datagrams for the Type of Service and host */
47 /* ICMP codes for ICMP_TYPE_TIME_EXCEEDED */
48 #define ICMP_CODE_TE_TTL 0 /* Time to live exceeded in transit */
49 #define ICMP_CODE_TE_REASSEMBLY 1 /* Fragment reassembly time exceeded */
51 /* ICMP codes for ICMP_TYPE_PARAMETER */
52 #define ICMP_CODE_TP_POINTER 1 /* Pointer indicates the error */
56 PDEVICE_OBJECT DeviceObject
,
58 PIO_STACK_LOCATION IrpSp
);
60 NTSTATUS
ICMPSendDatagram(
61 PADDRESS_FILE AddrFile
,
62 PTDI_CONNECTION_INFORMATION ConnInfo
,
67 NTSTATUS
ICMPStartup(VOID
);
69 NTSTATUS
ICMPShutdown(VOID
);
72 PIP_INTERFACE Interface
,
76 PIP_INTERFACE Interface
,