#include <pshpack1.h>
#include <poppack.h>
Go to the source code of this file.
|
NTSTATUS | DispEchoRequest (PDEVICE_OBJECT DeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp) |
|
NTSTATUS | ICMPSendDatagram (PADDRESS_FILE AddrFile, PTDI_CONNECTION_INFORMATION ConnInfo, PCHAR BufferData, ULONG DataSize, PULONG DataUsed) |
|
NTSTATUS | ICMPStartup (VOID) |
|
NTSTATUS | ICMPShutdown (VOID) |
|
VOID | ICMPReceive (PIP_INTERFACE Interface, PIP_PACKET IPPacket) |
|
VOID | ICMPReply (PIP_INTERFACE Interface, PIP_PACKET IPPacket, UCHAR Type, UCHAR Code) |
|
◆ ICMP_CODE_DU_FRAG_DF_SET
#define ICMP_CODE_DU_FRAG_DF_SET 4 /* Fragmentation needed and DF set */ |
◆ ICMP_CODE_DU_HOST_UNREACH
#define ICMP_CODE_DU_HOST_UNREACH 1 /* Host unreachable */ |
◆ ICMP_CODE_DU_NET_UNREACH
◆ ICMP_CODE_DU_PORT_UNREACH
#define ICMP_CODE_DU_PORT_UNREACH 3 /* Port unreachable */ |
◆ ICMP_CODE_DU_PROTOCOL_UNREACH
◆ ICMP_CODE_DU_SOURCE_ROUTE_FAILED
#define ICMP_CODE_DU_SOURCE_ROUTE_FAILED 5 /* Source route failed */ |
◆ ICMP_CODE_RD_HOST
#define ICMP_CODE_RD_HOST 1 /* Redirect datagrams for the host */ |
◆ ICMP_CODE_RD_NET
◆ ICMP_CODE_RD_TOS_HOST
◆ ICMP_CODE_RD_TOS_NET
◆ ICMP_CODE_TE_REASSEMBLY
#define ICMP_CODE_TE_REASSEMBLY 1 /* Fragment reassembly time exceeded */ |
◆ ICMP_CODE_TE_TTL
#define ICMP_CODE_TE_TTL 0 /* Time to live exceeded in transit */ |
◆ ICMP_CODE_TP_POINTER
#define ICMP_CODE_TP_POINTER 1 /* Pointer indicates the error */ |
◆ ICMP_TYPE_DEST_UNREACH
◆ ICMP_TYPE_ECHO_REPLY
◆ ICMP_TYPE_ECHO_REQUEST
◆ ICMP_TYPE_INFO_REPLY
◆ ICMP_TYPE_INFO_REQUEST
◆ ICMP_TYPE_PARAMETER
◆ ICMP_TYPE_REDIRECT
#define ICMP_TYPE_REDIRECT 5 /* Redirect */ |
◆ ICMP_TYPE_SOURCE_QUENCH
◆ ICMP_TYPE_TIME_EXCEEDED
#define ICMP_TYPE_TIME_EXCEEDED 11 /* Time exceeded */ |
◆ ICMP_TYPE_TIMESTAMP_REPLY
#define ICMP_TYPE_TIMESTAMP_REPLY 14 /* Timestamp reply */ |
◆ ICMP_TYPE_TIMESTAMP_REQUEST
◆ ICMP_HEADER
◆ PICMP_HEADER
◆ DispEchoRequest()
◆ ICMPReceive()
Definition at line 53 of file icmp.c.
62{
65
66 TI_DbgPrint(
DEBUG_ICMP, (
"ICMPReceive: Size (%d) HeaderSize (%d) Type (%d) Code (%d) Checksum (0x%x)\n",
68
69
71 {
73 return;
74 }
75
76
78 {
80 return;
81 }
82
84
86 {
88 }
89}
#define IPv4CorrectChecksum(Data, Count)
#define TI_DbgPrint(_t_, _x_)
VOID ICMPReply(PIP_INTERFACE Interface, PIP_PACKET IPPacket, UCHAR Type, UCHAR Code)
#define ICMP_TYPE_ECHO_REPLY
#define ICMP_TYPE_ECHO_REQUEST
struct ICMP_HEADER * PICMP_HEADER
_In_ NDIS_STATUS _In_ ULONG _In_ USHORT _In_opt_ PVOID _In_ ULONG DataSize
VOID RawIpReceive(PIP_INTERFACE Interface, PIP_PACKET IPPacket)
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE Interface
Referenced by ICMPStartup().
◆ ICMPReply()
Definition at line 91 of file icmp.c.
109{
114
116
118
119
121 if (!NCE)
122 {
123 return;
124 }
125
126
128 FakeAddrFile.
TTL = 128;
129
132 {
133 return;
134 }
135
140
142}
#define IPv4Checksum(Data, Count, Seed)
#define NT_SUCCESS(StatCode)
PNEIGHBOR_CACHE_ENTRY RouteGetRouteToDestination(PIP_ADDRESS Destination)
NTSTATUS BuildRawIpPacket(PADDRESS_FILE AddrFile, PIP_PACKET Packet, PIP_ADDRESS RemoteAddress, USHORT RemotePort, PIP_ADDRESS LocalAddress, USHORT LocalPort, PCHAR DataBuffer, UINT DataLen)
NTSTATUS IPSendDatagram(PIP_PACKET IPPacket, PNEIGHBOR_CACHE_ENTRY NCE)
_In_ UCHAR _In_ UCHAR _In_ ULONG Code
Referenced by ICMPReceive().
◆ ICMPSendDatagram()
Definition at line 29 of file icmp.c.
45{
47
48
50}
NTSTATUS RawIPSendDatagram(PADDRESS_FILE AddrFile, PTDI_CONNECTION_INFORMATION ConnInfo, PCHAR Buffer, ULONG DataSize, PULONG DataUsed)
Referenced by FileOpenAddress().
◆ ICMPShutdown()
◆ ICMPStartup()