Hello All,
I am writing a NDIS miniport driver .
-> I need to attach a predefined header to the buffer that I retrieve from NDIS packet and send it down. Can I in some way inform NDIS to leave a predefined size in the NDIS packet buffer (i.e ask it to start the buffer after a particular offset ) ? If not can you suggest some other way in which this can be done ?
TIA,
dnvbhat
A miniport reports its maximum frame and total size to the upper layers. You
can report lengths that are smaller by the size of your predefined header.
That way the higher-level protocols should send packets with maximum size
small enough to allow you to add your header.
I believe that the MUX samples illustrate adding a small header for VLan ID.
Good luck!
Thomas F. Divine
From:
Sent: Wednesday, November 24, 2010 9:29 AM
To: “Windows System Software Devs Interest List”
Subject: [ntdev] Query about NDIS_PACKET
> Hello All,
> I am writing a NDIS miniport driver .
>
> -> I need to attach a predefined header to the buffer that I retrieve from
> NDIS packet and send it down. Can I in some way inform NDIS to leave a
> predefined size in the NDIS packet buffer (i.e ask it to start the buffer
> after a particular offset ) ? If not can you suggest some other way in
> which this can be done ?
>
> TIA,
> dnvbhat
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
> Can I in some way inform NDIS to leave a predefined
size in the NDIS packet buffer (i.e ask it to start the buffer after a
particular offset )
No you cannot, because these packets are built by other components that don’t know about you.
If not can you suggest some other way in which this can
be done ?
Since this is a miniport, no other layers below you understand NDIS packets anyway;
so just feel free to arrange the data as you want, when copying it to the shared RAM or hardware.
If it sits on top of USB, maybe you can send your header first in a separate URB, then the data.
–pa