Hi.

I am trying to write an NDIS driver. I have followed the NDIS sample from
%_WINCEROOT%\Public\Common\Oak\Drivers\Netcard\NE2000.

I manage to receive packets in MiniportSend, but I only receive a packet
with one buffer, no matter the size of the data I am sending (I am sending an
UDP packet). The packet received contains the source ip address and
destination ip address (and a few more things), but I can't find the data I
am sending, the length of the buffer is always 0x2a. Is this normal, is the
data stored somewhere else?

Here is the data I am receiving.
0003EF80 FF FF FF FF FF FF 00 00
0003EF88 AC 10 5A 97 08 06 00 01
0003EF90 08 00 06 04 00 01 00 00
0003EF98 AC 10 5A 97 AC 10 5A 97
0003EFA0 00 00 00 00 00 00 AC 10
0003EFA8 65 2C

Source IP â?? AC 10 5A 97
Destination IP - AC 10 65 2C

Thanks in advanced.

Re: NDIS driver MiniportSend doubt by Remi

Remi
Fri Aug 25 03:37:03 CDT 2006

Hi,

The packet you want to send is an ARP request, not an UDP packet with
associated data:

FF FF FF FF FF FF Destination MAC address (broadcast)
00 00 AC 10 5A 97 Source MAC address (Conware adapter)
08 06 Ether Type = ARP

00 01 Hardware Type
08 00 Protocol Type (IP)
06 Hardware address length
04 Protocol address length
00 01 Operation (ARP request)
00 00 AC 10 5A 97 Sender Hardware Address
AC 10 5A 97 Sender Protocol Address (172.16.90.151)
00 00 00 00 00 00 Target Hardware Address (to be discovered)
AC 10 65 2C Target Protocol Address (172.16.101.44)

Before it can send data to another IP address, the IP stack has to discover
the Ethernet (MAC or Physical) address that matches the IP (Protocol)
address on the physical network; it uses the ARP (Address Resolution
Protocol) to do that.

Note that the overall length of this chunck of data is not big enough to
fulfill the Ethernet requirements of 64 bytes. You migth consider adding a
few padding bytes to reach this size.

Next action will be to receive the ARP answer

Is it normal that your IP addresses are equivalent to your MAC addresses
(i.e. AC 10 xx xx)?

Typically, when it will come to send data, you will receive from upper
layers a packet made of more than one buffer.

HTH
Remi



Re: NDIS driver MiniportSend doubt by JDuarte

JDuarte
Fri Aug 25 04:01:01 CDT 2006

Thanks a lot!

"Remi de Gravelaine" wrote:

> Hi,
>
> The packet you want to send is an ARP request, not an UDP packet with
> associated data:
>
> FF FF FF FF FF FF Destination MAC address (broadcast)
> 00 00 AC 10 5A 97 Source MAC address (Conware adapter)
> 08 06 Ether Type = ARP
>
> 00 01 Hardware Type
> 08 00 Protocol Type (IP)
> 06 Hardware address length
> 04 Protocol address length
> 00 01 Operation (ARP request)
> 00 00 AC 10 5A 97 Sender Hardware Address
> AC 10 5A 97 Sender Protocol Address (172.16.90.151)
> 00 00 00 00 00 00 Target Hardware Address (to be discovered)
> AC 10 65 2C Target Protocol Address (172.16.101.44)
>
> Before it can send data to another IP address, the IP stack has to discover
> the Ethernet (MAC or Physical) address that matches the IP (Protocol)
> address on the physical network; it uses the ARP (Address Resolution
> Protocol) to do that.
>
> Note that the overall length of this chunck of data is not big enough to
> fulfill the Ethernet requirements of 64 bytes. You migth consider adding a
> few padding bytes to reach this size.
>
> Next action will be to receive the ARP answer
>
> Is it normal that your IP addresses are equivalent to your MAC addresses
> (i.e. AC 10 xx xx)?
>
> Typically, when it will come to send data, you will receive from upper
> layers a packet made of more than one buffer.
>
> HTH
> Remi
>
>
>