I’m writing an IM driver and I’ve the following probelm.
I query the packet using the NDIS_OOB_DATA_FROM_PACKET macro to get the
header size. When a packet is received the header size if 14 bytes (an
Ethernet header) while when the packet is sent the header is 0 bytes.
However, I noticed that, even when the header size is 0, the IP header
starts 14 bytes ahead. is this normal or am I missing something.
Other info, where can I retrieve the media dependent header size when a
packet is sent over the network ?
Thanks
Matteo
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
It looks to me that the documentation for NDIS_GET_PACKET_HEADER_SIZE is
trying to tell us that the information is only there in your
ProtocolReceivePacket handler. No, it’s not perfectly clear, but here’s the
key phrase:
“A NIC driver sets this value with NDIS_SET_PACKET_HEADER_SIZE in the
out-of-band data block for the receive packets it will indicate with
NdisMIndicateReceivePacket. Typically, a miniport driver sets the HeaderSize
once in each packet descriptor it allocates with NdisAllocatePacket for
subsequent receive indications, and the value it sets depends on the medium
it selected during initialization.”
Nowhere does it mention that a higher-level protocol driver would set the
value prior to calling NdisSendPackets, etc.
FWIW,
Thomas F. Divine
PCAUSA - Toolkits & Resources For Network Software Developers
NDIS Protocol - NDIS Intermediate - TDI Client/Filter
http: - http:
“Matteo Pelati” wrote in message news:xxxxx@ntdev…
>
>
> I’m writing an IM driver and I’ve the following probelm.
>
> I query the packet using the NDIS_OOB_DATA_FROM_PACKET macro to get the
> header size. When a packet is received the header size if 14 bytes (an
> Ethernet header) while when the packet is sent the header is 0 bytes.
> However, I noticed that, even when the header size is 0, the IP header
> starts 14 bytes ahead. is this normal or am I missing something.
>
> Other info, where can I retrieve the media dependent header size when a
> packet is sent over the network ?
>
> Thanks
> Matteo
>
>
> —
> You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
> To unsubscribe send a blank email to
leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
>
—
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com</http:></http:>