diff --git a/Kernel/Makefile.BuildNum b/Kernel/Makefile.BuildNum index 62bf93257564d725e1b456b51f80d2f114d19bee..be8bd603a1d8548624da36001b4ad9b86d57f225 100644 --- a/Kernel/Makefile.BuildNum +++ b/Kernel/Makefile.BuildNum @@ -1 +1 @@ -BUILD_NUM = 1422 +BUILD_NUM = 1423 diff --git a/Makefile b/Makefile index 56878c1f73aff5dd5904721acb78aafbb4044aed..ae98e80b54ea3a15fdb2f182fb60ced757ab5aa7 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ SUBMAKE = $(MAKE) --no-print-directory MODULES += $(DYNMODS) -USRLIBS = ld-acess.so libacess.so libgcc.so libc.so +USRLIBS = crt0.o ld-acess.so libacess.so libgcc.so libc.so USRAPPS = init login CLIShell cat ls mount ifconfig ALL_MODULES = $(addprefix all-,$(MODULES)) diff --git a/Modules/IPStack/icmp.c b/Modules/IPStack/icmp.c index 90ef7cbf3009e2786605fa36c90729e24e7766f0..34e6eda4f5f145df7523d1e5a23a7dcedd936f80 100644 --- a/Modules/IPStack/icmp.c +++ b/Modules/IPStack/icmp.c @@ -52,7 +52,7 @@ void ICMP_GetPacket(tInterface *Interface, void *Address, int Length, void *Buff Warning("[ICMP ] Code == %i for ICMP Echo Reply, should be 0", hdr->Code); return ; } - if(hdr->ID != ~hdr->Sequence) { + if(hdr->ID != (Uint16)~hdr->Sequence) { Warning("[ICMP ] ID and Sequence values do not match"); return ; } @@ -82,7 +82,8 @@ void ICMP_GetPacket(tInterface *Interface, void *Address, int Length, void *Buff */ int ICMP_Ping(tInterface *Interface, tIPv4 Addr) { - //Sint64 ts; + Sint64 ts; + Sint64 end; char buf[32] = "\x8\0\0\0\0\0\0\0Acess2 I" "P/TCP Stack 1.0\0"; tICMPHeader *hdr = (void*)buf; @@ -104,5 +105,13 @@ int ICMP_Ping(tInterface *Interface, tIPv4 Addr) hdr->Checksum = htons( IPv4_Checksum(hdr, sizeof(buf)) ); IPv4_SendPacket(Interface, Addr, 1, i, sizeof(buf), buf); - return -1; + ts = now(); + end = ts + Interface->TimeoutDelay; + while( !gICMP_PingSlots[i].bArrived && now() < end) Threads_Yield(); + + ts = now() - ts; + if(ts > Interface->TimeoutDelay) + return -1; + + return (int)ts; } diff --git a/README b/README index 4fb8be16fe9f4f46d02667bdd2f6c56bfed5fe31..5680779d8e86fcc7be7d69e4b79e6604ad9907cf 100644 --- a/README +++ b/README @@ -29,6 +29,7 @@ The /Kernel tree contains the kernel sources. /Usermode/include - Required include files for the shared libraries. === Building === +Required Tools: GNU Toolchain (GCC,Gas,binutils), NASM, mtools, GNU calc Compiling Acess is relatively simple (at the moment) First edit /Makefile.cfg and set the build programs (making sure they match the architecture you are building for).