diff --git a/docs/develop/net/r5_compatibility.html b/docs/develop/net/r5_compatibility.html new file mode 100644 index 0000000000..db3fd70758 --- /dev/null +++ b/docs/develop/net/r5_compatibility.html @@ -0,0 +1,98 @@ + + + +
+Unfortunatly, R5 and sooner (net_server based) network stack development header file (/develop/headers/be/net/socket.h) definition of
+network structures and constantes are not BSD standard ones.
+BONE, otherwise, try to follow at best these standards definitions which,
+in turn, break binary compatibility with R5 network apps compiled for R5 network stack.
+Hence why you needs to link against libsocket.so, libbind.so and libbnetapi.so BONE apps instead of
+R5 libnet.so and libnetapi.so libraries...
+
So, here we are. By design, we must: +
Network definitions differences: +
+| Item | R5 stack | BONE stack | OpenBeOS stack + + |
|---|---|---|---|
| socket.h header file + | be/net/socket.h + | be/bone/sys/socket.h + | posix/sys/socket.h + + |
| SOCK_DGRAM | 1 | 2 | idem as BONE + |
| SOCK_STREAM | 2 | 1 | idem as BONE + |
| SOCK_RAW | not defined | 3 | idem as BONE + |
| SOCK_MISC | not defined | 255 | idem as BONE + + |
| SOL_SOCKET | 1 | 0xffffffff | idem as BONE + |
| SO_DEBUG | 1 | 0x00000004 | idem as BONE + |
| SO_REUSEADDR | 2 | 0x00000040 | idem as BONE + |
| SO_NONBLOCK | 3 | SO_NONBLOCK | idem as BONE + + |
| sockaddr + | struct sockaddr { + unsigned short sa_family; + char sa_data[10]; +}; + | struct sockaddr { + uint8 sa_len; + uint8 sa_family; + uint8 sa_data[30]; +}; + | idem as BONE + + |
| shutdown() + | not defined | defined | idem as BONE + + + |
| in.h header file + | be/net/netinet/in.h, which in turn include +be/net/socket.h + | be/bone/netinet/in.h + | posix/netinet/in.h + + |