1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 // This is a convenience header to pull in the platform-specific 6 // headers that define functions for byte-order conversion, 7 // particularly: ntohs(), htons(), ntohl(), htonl(). Prefer including 8 // this file instead of directly writing the #if / #else, since it 9 // avoids duplicating the platform-specific selections. 10 11 #ifndef NET_BASE_SYS_BYTEORDER_H_ 12 #define NET_BASE_SYS_BYTEORDER_H_ 13 14 #include "build/build_config.h" 15 16 #if defined(OS_WIN) 17 #include <winsock2.h> 18 #else 19 #include <arpa/inet.h> 20 #endif 21 22 #endif // NET_BASE_SYS_BYTEORDER_H_ 23