NDIS_PACKET question

Hi,

I’ve read the NDIS_PACKET article at www.ndis.com
(http://www.ndis.com/papers/ndispacket/ndispacket1.htm), and I have a
question about it.

“It should start to become apparent that there are no safe assumptions
on how a NDIS_PACKET will be constructed. The actual construction is at
the sole discretion of the software that built the packet in the first
place.”

I’d like to know, what is the software that constructs NDIS_PACKETs in
the first place?
The NDIS Wrapper, a protocol (TCP/IP), an application or something else?

Thanks in advance.

Baki

P.S. I hope BOB doesn’t come tonight.

Packets being sent are initially built by a top-level NDIS protocol driver
(sometimes called a :transport driver). Examples include the MS TCP/IP and
TCP/IP V6 drivers. Depending on what networking software you have installed
there may be other top-level NDIS protocol drivers as well.

Packets being received are initially constructed by the adapter’s miniport
driver.

Along the way packets may be modified by installed NDIS Intermediate filter
drivers.

Good luck,

Thomas F. Divine, Windows DDK MVP
http://www.rawether.net

“Bakonyi Gabor” wrote in message news:xxxxx@ntdev…
> Hi,
>
> I’ve read the NDIS_PACKET article at www.ndis.com
> (http://www.ndis.com/papers/ndispacket/ndispacket1.htm), and I have a
> question about it.
>
> “It should start to become apparent that there are no safe assumptions on
> how a NDIS_PACKET will be constructed. The actual construction is at the
> sole discretion of the software that built the packet in the first place.”
>
> I’d like to know, what is the software that constructs NDIS_PACKETs in the
> first place?
> The NDIS Wrapper, a protocol (TCP/IP), an application or something else?
>
> Thanks in advance.
>
> Baki
>
> P.S. I hope BOB doesn’t come tonight.
>
>

> I’d like to know, what is the software that constructs NDIS_PACKETs in

the first place?
The NDIS Wrapper, a protocol (TCP/IP), an application or something else?

For sends - the protocol constructs them.

For receive - it depends on the decision on the NIC driver. If the driver wants
to be responsible for memory allocation for received data (most DMA drivers do
want) - then it allocated NDIS_PACKET itself and thus is responsible for it.

Otherwise, it uses the indication path which uses no NDIS_PACKET, unless the
protocol will call NdisTransferData. In this latter case, the protocol needs to
allocate the memory for data and also allocate NDIS_PACKET. Protocol is
responsible for it in this case.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com