From: siddu on
I am writing the ndis 6.0 filter driver. This is my sample code for receive...

PUCHAR data,info;
CurrNbl = NetBufferLists;
ULONG len,i,offset=0;

while (CurrNbl)
{
Currbuff=NET_BUFFER_LIST_FIRST_NB(CurrNbl);

while(Currbuff)
{
offset = NET_BUFFER_DATA_OFFSET(Currbuff);
mdl = NET_BUFFER_FIRST_MDL(Currbuff);

while(mdl)
{
data = MmGetMdlVirtualAddress(mdl);
info = data + offset;
for(i=0;i<15;i++)
KdPrint(("info = %x\n",info[i]));
mdl= mdl->Next;
}

Currbuff = NET_BUFFER_NEXT_NB(Currbuff);
}

CurrNbl = NET_BUFFER_LIST_NEXT_NBL(CurrNbl);
}

"NetBufferList" i got from the lower driver. Here info[i] first 6 bytes
specify destination mac address and 13 and 14 bytes specify the packet type.

My question is that is there any other way to get the destination mac
address and also ethernet packet type(ARP (OR) IP)?
 | 
Pages: 1
Prev: Winusb c#
Next: DTM common scenario stress w IO