1,16 → 1,6 |
#include <menuet/net.h> |
|
|
unsigned long inet_addr(char *cp) |
{ |
// Adapted from here http://stackoverflow.com/a/1684635 |
unsigned long __ret; |
unsigned int c1,c2,c3,c4; |
sscanf(cp, "%d.%d.%d.%d", &c1,&c2,&c3,&c4); |
__ret = (unsigned long)c4+c3*256+c2*256*256+c1*256*256*256; |
return htonl(__ret); |
} |
|
int socket(int domain, int type, int protocol) |
{ |
int __ret; |
47,6 → 37,10 |
return __ret; |
} |
|
|
|
|
|
// -------------------------------------------------------------- |
|
__u32 __menuet__open_UDP_socket(__u32 local_port,__u32 remote_port,__u32 remote_ip) |