Re: Ndis Driver problem by hitesh
hitesh
Thu Dec 21 06:23:22 CST 2006
Hello Stephen,
Thanks for reply.
Here is the problem.
I have one machine which is working, and tested "ping" with the other
machine.
now the driver which i have, is running on a windows xp machine.
Ethereal is also running on windows machine.
whenever i am trying to ping ,,,
there are two kind of situation occure.
case1:
ping from my machine.
my machine other m/c
ARP req------------------>
<-------------------- ARP reply.
ICMP request-------------->
<------------------ICMP reply. (message in Ethereal "Echo
ping reply").
i am able to see this in Ethereal in my m/c.
case 2:
Ping from other machine.
My M/c other m/c
<-------------ARP request
ARP reply ------------------>
<---------------ICMP request (message in Ethereal
"Echo ping request").
after this there is no ICMP reply,,,,,,,,,,
my code is like this,
NdisAllocateBuffer(&Status,&Buffer,Adapter->BufferPoolHandle,(PVOID)(VirtAddr),Adapter->RxDataLen);
if(Status != NDIS_STATUS_SUCCESS)
{
PRIN(("In Recv packets: buffer allocation failed\n"));
goto Dots_Recv_Buff_Error;
}
Status = NDIS_GET_PACKET_STATUS(Packet);
if(Status != NDIS_STATUS_SUCCESS)
{
PRIN(("Packet is busy and not free"));
goto Dots_Recv_Pack_Error;
}
NdisChainBufferAtBack(Packet,Buffer);
NDIS_SET_PACKET_STATUS(Packet,NDIS_STATUS_SUCCESS);
NdisMIndicateReceivePacket(Adapter->MiniportAdapterHandle,&Packet,1);
and the data i am copying is full packet,, 14(eth header)+type+other ,,
if i have missed something then please revert back,,
thanks again for help,,
from
Hitesh Ughreja.
Stephan Wolf [MVP] wrote:
> hitesh wrote:
> > i am writting a network driver,and facing problem in ICMP resolve.
>
> *What* is your problem in detail?
>
> > can anybody tell me how to form a proper packet in receive path.?
>
> Sounds like you forgot to add the MAC header, maybe?
>
> Run a network sniffer like Wireshark (aka Ethereal) and see how your
> indicated receive frames look like there.
>
> Stephan