+++ /dev/null
-/*++\r
-\r
-Copyright (c) 2006, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution. The full text of the license may be found at \r
-http://opensource.org/licenses/bsd-license.php \r
- \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
-\r
-Module name:\r
- hton.h\r
-\r
-Abstract:\r
- Byte swapping macros.\r
-\r
---*/\r
-\r
-#ifndef _HTON_H_\r
-#define _HTON_H_\r
-\r
-//\r
-// Only Intel order functions are defined at this time.\r
-//\r
-#define HTONS(v) (UINT16) ((((v) << 8) & 0xff00) + (((v) >> 8) & 0x00ff))\r
-\r
-#define HTONL(v) \\r
- (UINT32) ((((v) << 24) & 0xff000000) + (((v) << 8) & 0x00ff0000) + (((v) >> 8) & 0x0000ff00) + (((v) >> 24) & 0x000000ff))\r
-\r
-#define HTONLL(v) swap64 (v)\r
-\r
-#define U8PTR(na) ((UINT8 *) &(na))\r
-\r
-#define NTOHS(ns) ((UINT16) (((*U8PTR (ns)) << 8) +*(U8PTR (ns) + 1)))\r
-\r
-#define NTOHL(ns) \\r
- ((UINT32) (((*U8PTR (ns)) << 24) + ((*(U8PTR (ns) + 1)) << 16) + ((*(U8PTR (ns) + 2)) << 8) +*(U8PTR (ns) + 3)))\r
-\r
-#endif /* _HTON_H_ */\r
-\r
-/* EOF - hton.h */\r