Byte-Ordering in a Data Packet Under NDIS

Last reviewed: January 26, 1996
Article ID: Q89374
The information in this article applies to:
  • Microsoft Win32 Software Development Kit (SDK) for Windows NT, versions 3.1, 3.5, and 3.51

SUMMARY

There may be a difference in the byte order in which 16-bit words are stored in memory versus the order in which the two bytes must be transmitted onto the network as part of a data packet. This difference will depend on the processor involved and which part of the data packet the information falls under.

The information is this article is consistent with the Network Device Interface Specification (NDIS) version 3.0.

MORE INFORMATION

Consider that the data will consist of header(s), the application data, and a trailer(s).

      -------------------------------
      |    |    |                |    |------- Trailer
      -------------------------------
        |    |          |____ Application data
        |    |
        |    |____ Header
        |
        |____ Header

When a protocol driver or an NDIS driver sends information, it does not modify the application data, nor does it modify the ordering of bytes in integer fields.

The ordering of bytes in integer fields within the application data is the responsibility of the Remote Procedure Call (RPC) facility or another mechanism. However, the driver should be concerned with how the information in the header(s)/trailer(s) is stored. For example, the driver may be required to put a 16-bit checksum in a header. To put that integer value into the header in the format required by the network specification, the driver may need to know the type of processor that it is running on and will in any case need to follow the network standard for storing the information in the header.


Additional reference words: 3.10 3.50
KBCategory: kbprg
KBSubcategory:


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 26, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.