17 UCHAR LinkAddressLength,
18 UCHAR ProtoAddressLength,
19 PVOID SenderLinkAddress,
20 PVOID SenderProtoAddress,
21 PVOID TargetLinkAddress,
22 PVOID TargetProtoAddress,
50 2 * LinkAddressLength +
51 2 * ProtoAddressLength;
62 Header->HWType = HardwareType;
63 Header->ProtoType = ProtocolType;
64 Header->HWAddrLen = LinkAddressLength;
65 Header->ProtoAddrLen = ProtoAddressLength;
70 RtlCopyMemory(DataBuffer, SenderLinkAddress, LinkAddressLength);
74 RtlCopyMemory(DataBuffer, SenderProtoAddress, ProtoAddressLength);
76 if (TargetLinkAddress) {
79 RtlCopyMemory(DataBuffer, TargetLinkAddress, LinkAddressLength);
83 DataBuffer = (
PVOID)((
ULONG_PTR)DataBuffer + ProtoAddressLength + LinkAddressLength);
86 RtlCopyMemory(DataBuffer, TargetProtoAddress, ProtoAddressLength);
160 if( !NdisPacket )
return FALSE;
188 PCHAR SenderHWAddress, SenderProtoAddress, TargetProtoAddress;
259 SenderHWAddress = (
PVOID)(DataBuffer);
260 SenderProtoAddress = (
PVOID)(SenderHWAddress +
Header->HWAddrLen);
261 TargetProtoAddress = (
PVOID)(SenderProtoAddress +
Header->ProtoAddrLen +
Header->HWAddrLen);
#define AddrInitIPv4(IPAddress, RawAddress)
BOOLEAN AddrIsEqual(PIP_ADDRESS Address1, PIP_ADDRESS Address2)
struct ARP_HEADER * PARP_HEADER
#define ARP_OPCODE_REQUEST
UINT CopyPacketToBuffer(PUCHAR DstData, PNDIS_PACKET SrcPacket, UINT SrcOffset, UINT Length)
#define NT_SUCCESS(StatCode)
#define TI_DbgPrint(_t_, _x_)
#define ASSERT_KM_POINTER(_x)
struct _IP_INTERFACE * PIP_INTERFACE
PNDIS_PACKET PrepareARPPacket(PIP_INTERFACE IF, USHORT HardwareType, USHORT ProtocolType, UCHAR LinkAddressLength, UCHAR ProtoAddressLength, PVOID SenderLinkAddress, PVOID SenderProtoAddress, PVOID TargetLinkAddress, PVOID TargetProtoAddress, USHORT Opcode)
VOID ARPTransmitComplete(PVOID Context, PNDIS_PACKET NdisPacket, NDIS_STATUS NdisStatus)
BOOLEAN ARPTransmit(PIP_ADDRESS Address, PVOID LinkAddress, PIP_INTERFACE Interface)
VOID ARPReceive(PVOID Context, PIP_PACKET Packet)
#define ExAllocatePoolWithTag(hernya, size, tag)
#define ExAllocatePool(type, size)
_In_ PVOID _In_ ULONG Opcode
NTSYSAPI void WINAPI DbgBreakPoint(void)
void GetDataPtr(PNDIS_PACKET Packet, UINT Offset, PCHAR *DataOut, PUINT Size)
#define AllocatePacketWithBuffer(x, y, z)
#define FreeNdisPacket(x)
_In_ NDIS_HANDLE _In_ PNDIS_PACKET Packet
_In_ NDIS_STATUS _In_ ULONG _In_ USHORT _In_opt_ PVOID _In_ ULONG DataSize
_In_ UINT _In_ UINT _In_ PNDIS_PACKET _In_ UINT _Out_ PUINT BytesCopied
PNEIGHBOR_CACHE_ENTRY NBLocateNeighbor(PIP_ADDRESS Address, PIP_INTERFACE Interface)
PNEIGHBOR_CACHE_ENTRY NBAddNeighbor(PIP_INTERFACE Interface, PIP_ADDRESS Address, PVOID LinkAddress, UINT LinkAddressLength, UCHAR Type, UINT EventTimer)
#define ARP_COMPLETE_TIMEOUT
VOID NBUpdateNeighbor(PNEIGHBOR_CACHE_ENTRY NCE, PVOID LinkAddress, UCHAR State)
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE Interface