* Added a link from libnet.so to libnetwork.so for R5 compatibility.

* Fixed R5 socket definitions to match their actual definitions.
* libnetwork.so now detects at runtime wether or not R5 compatibility should be
  enabled or not.
* All socket functions should now be R5 net_server compatible.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19012 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2006-10-06 13:07:05 +00:00
parent 3cf73255de
commit 153b2845d2
5 changed files with 297 additions and 20 deletions
+34 -6
View File
@@ -5,11 +5,39 @@
#ifndef NET_R5_COMPATIBILITY_H
#define NET_R5_COMPATIBILITY_H
// TODO: judging from R5 headers, this is all wrong, though (this has been taken from
// our old socket header) - we'll need to test this later on!
// Also, more problematic is that IPPROTO_* constants also don't seem to be compatible, too
#define R5_SOCK_DGRAM 10
#define R5_SOCK_STREAM 11
#define R5_SOCK_RAW 12
#include <SupportDefs.h>
#define R5_SOCK_DGRAM 1
#define R5_SOCK_STREAM 2
#define R5_AF_INET 1
#define R5_IPPROTO_UDP 1
#define R5_IPPROTO_TCP 2
#define R5_IPPROTO_ICMP 3
// setsockopt() defines
#define R5_SOL_SOCKET 1
#define R5_SO_DEBUG 1
#define R5_SO_REUSEADDR 2
#define R5_SO_NONBLOCK 3
#define R5_SO_REUSEPORT 4
#define R5_SO_FIONREAD 5
#define R5_MSG_OOB 0x01
struct r5_sockaddr_in {
uint16 sin_family;
uint16 sin_port;
uint32 sin_addr;
char sin_zero[4];
};
extern bool __gR5Compatibility;
#endif // NET_R5_COMPATIBILITY_H