Re: NDIS ntohs/htons

Tech-Archive recommends: Fix windows errors by optimizing your registry



Thanks, Peter.

Just to clarify, the MAC header and payload is already in network byte order
in the call to MiniportSendPackets/MiniportSend. I am sure over the air it
will be in network byte order just wasn't sure about at the Miniport send
interface.

Just for my education, is this behavior documented somewhere?

So would my check look something like

if( ntohs(nEthtypeLength) >= 0x0600 )
{
// DIX

}
else
{
// 802.3

}

"Peter" wrote:

The data of the MAC header and packet payload in the egress packet is in
network byte order.

"Gammaraman" <Gammaraman@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:20EE665F-6471-4894-8251-6C0A64F2C431@xxxxxxxxxxxxxxxx
Hi,

I am trying to inspect the Ethertype/length field in the Ethernet header
of
an egress NDIS packet handed to the miniport by a protocol driver. What
byte-order does NDIS use for the header and payload? Do I need to put the
Ethertype/length value through a call to ntohs() or htons() or just use
the
value as is?

I am assuming for an ingress NDIS packet, the byte order is network byte
order so I would need to use ntohs() to inpect a short. Is this correct?

Thanks.



.



Relevant Pages

  • Re: NDIS ntohs/htons
    ... the MAC header and payload is already in network byte ... the MAC header and PDU that's delivered to your MiniportSendPackets ... an egress NDIS packet handed to the miniport by a protocol driver. ...
    (microsoft.public.development.device.drivers)
  • Re: why did spamassassin block this ?
    ... This is an example of info in the header. ... the pre-AWL score and the historical average for that sender / network). ... if the AWL brought the average score to ...
    (comp.mail.misc)
  • Re: NDIS ntohs/htons
    ... DIX or 802.3 and then look at the EtherType, ... miniport be prepared to handle this case also to be robust ... the MAC header and payload is already in network byte ... I am trying to inspect the Ethertype/length field in the Ethernet ...
    (microsoft.public.development.device.drivers)
  • Re: Streaming Live AVI
    ... it over a network for similiar results... ... You simply need to write your own muxer because the stock ... then seek back to the beginning to fix the header, ... the parser on the receiving side also needs to be ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Wireless settings
    ... LPARAM lParam) ... NMHDR* header = NULL; ... // See what type of network connectivity the user ...
    (microsoft.public.windowsce.embedded.vc)