1 /* 2 * Copyright 2006, Haiku, Inc. All Rights Reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef NET_R5_COMPATIBILITY_H 6 #define NET_R5_COMPATIBILITY_H 7 8 9 #include <SupportDefs.h> 10 11 12 #define R5_SOCK_DGRAM 1 13 #define R5_SOCK_STREAM 2 14 15 #define R5_AF_INET 1 16 17 #define R5_IPPROTO_UDP 1 18 #define R5_IPPROTO_TCP 2 19 #define R5_IPPROTO_ICMP 3 20 21 // setsockopt() defines 22 23 #define R5_SOL_SOCKET 1 24 25 #define R5_SO_DEBUG 1 26 #define R5_SO_REUSEADDR 2 27 #define R5_SO_NONBLOCK 3 28 #define R5_SO_REUSEPORT 4 29 #define R5_SO_FIONREAD 5 30 31 #define R5_MSG_OOB 0x01 32 33 34 struct r5_sockaddr_in { 35 uint16 sin_family; 36 uint16 sin_port; 37 uint32 sin_addr; 38 char sin_zero[4]; 39 }; 40 41 extern bool __gR5Compatibility; 42 extern addr_t __gNetworkStart; 43 extern addr_t __gNetworkEnd; 44 45 #endif // NET_R5_COMPATIBILITY_H 46