Re: packet does not get to tcp ip
- From: "miki" <michael.waksman@xxxxxxxxx>
- Date: 21 Aug 2006 12:00:45 -0700
After further investigation I think that I know the cause of the
problem:
I used NdisMIndicateReceivePacket with a packet that is composed from
several buffers.
So I think that the TCP/IP protocol ReceivePacketHandler could not
handle this while the sniffer could.
The reason the packet is composed from several buffers is because the
driver does not drive a real ethernet NIC but only present itself to
NDIS like an ethernet driver. So when I get a buffer to indicate to
NDIS I build a packet which is composed from the buffer I got and
another buffer which contain a fix ethernet header.
According to msdn on NdisMIndicateReceivePacket:
"The first buffer in the packet must contain the amount of data
specified by the lookahead setting plus the data size of the MAC
header"
Now this raise a problem for me:
If I get multi buffers (whose total length is less than the ethernet
MTU)
I have several possibilities as I see it:
1. Indicate each buffer to NDIS in its own packet containing only one
buffer - this seems to me inefficient
2. Copy all the buffers to a single buffer and indicate the new buffer
to ndis in a single packet - this seems to me even less efficient
3. Override the lookahead setting to be 0 so the first buffer will
contain only the ethernet header - I am not sure that the overriding is
allowed, actually I am not sure what is the meaning of the lookahead
buffer (OID_GEN_RECEIVE_BLOCK_SIZE) is it enough that I only answer 0
for this oid query?
Can anyone suggest me what is the preffered way?
Thanks
Miki
miki wrote:
Hi,
I have this strange problem:
I am trying to do a ping through the NIC connected to my ethernet
miniport driver.
With a sniffer (ethereal) on the NIC I can see the icmp request and
also the icmp reply packets both seems correct as far as I can see, yet
the ping application failed with timeout.
This happen also when I try tcp application like ftp.
It seems like the packets the driver indicate to NDIS does not reach
the tcp ip protocol driver (or maybe they do and the protocol driver
drop them for some reason) so the the application at the end point does
not receives them.
The firewall rule on the interface are permit all.
Where should I look for the trouble?
How can I gather more information - for example how can I know if the
tcp ip gets the packet after I indicate it to ndis? how can I know if
it drop it?
Thanks
Miki
.
- Follow-Ups:
- Re: packet does not get to tcp ip
- From: Maxim S. Shatskih
- Re: packet does not get to tcp ip
- From: miki
- Re: packet does not get to tcp ip
- References:
- packet does not get to tcp ip
- From: miki
- packet does not get to tcp ip
- Prev by Date: Re: Can TerminateThread() kill a thread that has entered the kernel?
- Next by Date: Re: packet does not get to tcp ip
- Previous by thread: packet does not get to tcp ip
- Next by thread: Re: packet does not get to tcp ip
- Index(es):
Relevant Pages
|