3 * - By John Hodge (thePowersGang)
6 * - POSIX Sockets translation/emulation
9 #include <sys/socket.h>
15 const char *ListenFile;
16 const char *ConnectFile;
17 char RemoteAddr[16]; // If != 0, bind to a remote addr
18 } gaSockInfo[MAX_SOCKS]
21 int socket(int domain, int type, int protocol)
24 const char *listenFile, *connectFile;
32 if(addrType == 0) addrType = AF_INET6;
53 fd = open("/Devices/null", 0);
58 if( fd >= MAX_SOCKS ) {
64 gaSockInfo[fd].AddrType = 0;
65 gaSockInfo[fd].ListenFile = listenFile;
66 gaSockInfo[fd].ConnectFile = connectFile;
67 memset( gaSockInfo[fd].RemoteAddr, 0, sizeof(gaSockInfo[fd].RemoteAddr) );