Added support for network.obj library

git-svn-id: svn://kolibrios.org@4282 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
esevece
2013-11-22 18:41:04 +00:00
parent f34b044d15
commit ed1000aa19
3 changed files with 28 additions and 29 deletions

View File

@@ -1,6 +1,6 @@
THIS_SRCS = backgr.c bar.c button.c clock.c date.c delay.c dga.c \
event.c exit.c file.c image.c ipc.c irq.c keyb.c line.c \
mpu401.c param.c pixel.c process.c screen.c sound.c systree.c \
mpu401.c network.c param.c pixel.c process.c screen.c sound.c systree.c \
text.c thread.c window.c pci.c alloca.s cofflib.c debug.c
include $(MENUET_LIBC_TOPDIR)/Make.rules

View File

@@ -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 @@ int recv(int sockfd, void *buf, int len, int flags)
return __ret;
}
// --------------------------------------------------------------
__u32 __menuet__open_UDP_socket(__u32 local_port,__u32 remote_port,__u32 remote_ip)