Re: NDIS ntohs/htons
- From: "Peter" <ImInSoquel@xxxxxxxxxxxxx>
- Date: Mon, 18 Aug 2008 23:12:56 -0700
Yes, the MAC header and PDU that's delivered to your MiniportSendPackets
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.
(for NDIS 5.1) or MiniportSendNetBufferLists (for NDIS 6.0) will be in
network byte order.
Just for my education, is this behavior documented somewhere?It's most likely in the WDK documentation. But just doing some debugging on
the payload itself would tell you what you need to know.
So would my check look something likeI believe you want to check for 0x0800 (for IPV4) and not 0x0600 (for Xerox
if( ntohs(nEthtypeLength) >= 0x0600 )
{
// DIX
}
else
{
// 802.3
}
NS IDP).
"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.
.
- Follow-Ups:
- Re: NDIS ntohs/htons
- From: Gammaraman
- Re: NDIS ntohs/htons
- References:
- NDIS ntohs/htons
- From: Gammaraman
- Re: NDIS ntohs/htons
- From: Peter
- Re: NDIS ntohs/htons
- From: Gammaraman
- NDIS ntohs/htons
- Prev by Date: Re: OverlappedIO - Q126282: is this applies to New windows OS also
- Next by Date: Re: Get Resources ?
- Previous by thread: Re: NDIS ntohs/htons
- Next by thread: Re: NDIS ntohs/htons
- Index(es):
Relevant Pages
|