diff --git a/Asuro.iso b/Asuro.iso index d4bc2723..e79af80b 100644 Binary files a/Asuro.iso and b/Asuro.iso differ diff --git a/bin/kernel.bin b/bin/kernel.bin index 3003d484..50a34a52 100755 Binary files a/bin/kernel.bin and b/bin/kernel.bin differ diff --git a/iso/boot/asuro.bin b/iso/boot/asuro.bin index 3003d484..50a34a52 100755 Binary files a/iso/boot/asuro.bin and b/iso/boot/asuro.bin differ diff --git a/lib/E1000.ppu b/lib/E1000.ppu index c11fc23b..daafdd7f 100644 Binary files a/lib/E1000.ppu and b/lib/E1000.ppu differ diff --git a/lib/IDE.ppu b/lib/IDE.ppu index f1bb7571..51aef25f 100644 Binary files a/lib/IDE.ppu and b/lib/IDE.ppu differ diff --git a/lib/RTC.ppu b/lib/RTC.ppu index 14581810..690a930e 100644 Binary files a/lib/RTC.ppu and b/lib/RTC.ppu differ diff --git a/lib/arp.ppu b/lib/arp.ppu index 48d01727..dc773fc4 100644 Binary files a/lib/arp.ppu and b/lib/arp.ppu differ diff --git a/lib/asuro.ppu b/lib/asuro.ppu index 015aebbf..f5c8b388 100644 Binary files a/lib/asuro.ppu and b/lib/asuro.ppu differ diff --git a/lib/eth2.ppu b/lib/eth2.ppu index 805b9168..184f6b93 100644 Binary files a/lib/eth2.ppu and b/lib/eth2.ppu differ diff --git a/lib/fat32.ppu b/lib/fat32.ppu index 87f73036..f451d48b 100644 Binary files a/lib/fat32.ppu and b/lib/fat32.ppu differ diff --git a/lib/ipv4.ppu b/lib/ipv4.ppu index e65e3d4b..22b8dead 100644 Binary files a/lib/ipv4.ppu and b/lib/ipv4.ppu differ diff --git a/lib/kernel.ppu b/lib/kernel.ppu index 7cdf3de0..ca40488f 100644 Binary files a/lib/kernel.ppu and b/lib/kernel.ppu differ diff --git a/lib/libpconsole.a b/lib/libpconsole.a index 4c95f4ca..2b577fa4 100644 Binary files a/lib/libpconsole.a and b/lib/libpconsole.a differ diff --git a/lib/libpmultiboot.a b/lib/libpmultiboot.a index fdb50a24..ab3cd2db 100644 Binary files a/lib/libpmultiboot.a and b/lib/libpmultiboot.a differ diff --git a/lib/libpsystem.a b/lib/libpsystem.a index 808a7433..40f7a5bd 100644 Binary files a/lib/libpsystem.a and b/lib/libpsystem.a differ diff --git a/lib/net.ppu b/lib/net.ppu index 18a81631..ca1afe1e 100644 Binary files a/lib/net.ppu and b/lib/net.ppu differ diff --git a/lib/netlog.ppu b/lib/netlog.ppu index 1931ec23..9d768634 100644 Binary files a/lib/netlog.ppu and b/lib/netlog.ppu differ diff --git a/lib/shell.ppu b/lib/shell.ppu index fef636d2..a3fa80a0 100644 Binary files a/lib/shell.ppu and b/lib/shell.ppu differ diff --git a/lib/storagemanagement.ppu b/lib/storagemanagement.ppu index df79ab90..ff784c57 100644 Binary files a/lib/storagemanagement.ppu and b/lib/storagemanagement.ppu differ diff --git a/lib/terminal.ppu b/lib/terminal.ppu index 8535b750..9bd36925 100644 Binary files a/lib/terminal.ppu and b/lib/terminal.ppu differ diff --git a/src/driver/net/l1/net.pas b/src/driver/net/l1/net.pas index 3017d578..f3ab4130 100644 --- a/src/driver/net/l1/net.pas +++ b/src/driver/net/l1/net.pas @@ -6,7 +6,8 @@ uses tracer, console, nettypes, netutils, - netlog; + netlog, + RTC; procedure init; procedure registerNetworkCard(SendCallback : TNetSendCallback; _MAC : puint8); @@ -14,6 +15,8 @@ procedure registerNextLayer(RecvCallback : TRecvCallback); procedure send(p_data : void; p_len : uint16); procedure recv(p_data : void; p_len : uint16); function getMAC : puint8; +procedure writeToLog(str : pchar); +procedure writeToLogLn(str : pchar); implementation @@ -25,6 +28,39 @@ var CBNext : TRecvCallback = nil; MAC : puint8 = nil; +procedure writeToLog(str : pchar); +var + DateTime : TDateTime; + +begin + if getNetlogHWND <> 0 then begin + DateTime:= getDateTime; + writeStringWND('[', getNetlogHWND); + + if DateTime.Hours < 10 then writeIntWND(0, getNetlogHWND); + writeIntWND(DateTime.Hours, getNetlogHWND); + writeStringWND(':', getNetlogHWND); + + if DateTime.Minutes < 10 then writeIntWND(0, getNetlogHWND); + writeIntWND(DateTime.Minutes, getNetlogHWND); + writeStringWND(':', getNetlogHWND); + + if DateTime.Seconds < 10 then writeIntWND(0, getNetlogHWND); + writeIntWND(DateTime.Seconds, getNetlogHWND); + writeStringWND('] ', getNetlogHWND); + + writeStringWND(str, getNetlogHWND); + end; +end; + +procedure writeToLogLn(str : pchar); +begin + writeToLog(str); + if getNetlogHWND <> 0 then begin + writestringlnWND(' ', getNetlogHWND); + end; +end; + procedure registerNetworkCard(SendCallback : TNetSendCallback; _MAC : puint8); begin push_trace('net.registerNetworkCard'); @@ -47,7 +83,7 @@ end; procedure send(p_data : void; p_len : uint16); begin push_trace('net.send'); - if getNetlogHWND <> 0 then writestringlnWND('net.send', getNetlogHWND); + writeToLogLn('net.send'); if CBSend <> nil then CBSend(p_data, p_len); pop_trace; end; @@ -58,7 +94,7 @@ var begin push_trace('net.recv'); - if getNetlogHWND <> 0 then writestringlnWND('net.recv', getNetlogHWND); + writeToLogLn('net.recv'); context:= newPacketContext; if CBNext <> nil then CBNext(p_data, p_len, context); freePacketContext(context); diff --git a/src/driver/net/l3/arp.pas b/src/driver/net/l3/arp.pas index 1d6237b9..c5cee7ce 100644 --- a/src/driver/net/l3/arp.pas +++ b/src/driver/net/l3/arp.pas @@ -22,6 +22,9 @@ function MACToIIPv4(mac : puint8) : puint8; implementation +uses + net; + var Registered : Boolean = false; Cache : PLinkedListBase; @@ -70,7 +73,7 @@ var begin push_trace('arp.recv'); - if getNetlogHWND <> 0 then writestringlnWND('arp.recv', getNetlogHWND); + writeToLogLn('arp.recv'); { Get our converted Header } Header:= PARPHeader(p_data); AHeader.Hardware_Type:= (Header^.Hardware_Type_Hi SHL 8) + Header^.Hardware_Type_Lo; @@ -84,31 +87,31 @@ begin copyIPv4(@Header^.Destination_Protocol[0], @AHeader.Destination_Protocol[0]); case AHeader.Operation of $1:begin { ARP Request } - if getNetlogHWND <> 0 then writestringlnWND('arp.recv.arp.req', getNetlogHWND); + writeToLogLn('arp.recv.arp.req'); end; $2:begin { ARP Reply } - if getNetlogHWND <> 0 then writestringlnWND('arp.recv.arp.rep', getNetlogHWND); + writeToLogLn('arp.recv.arp.rep'); end; $3:begin { RARP Request } - if getNetlogHWND <> 0 then writestringlnWND('arp.recv.rarp.req', getNetlogHWND); + writeToLogLn('arp.recv.rarp.req'); end; $4:begin { RARP Reply } - if getNetlogHWND <> 0 then writestringlnWND('arp.recv.rarp.rep', getNetlogHWND); + writeToLogLn('arp.recv.rarp.rep'); end; $5:begin { DRARP Request } - if getNetlogHWND <> 0 then writestringlnWND('arp.recv.drarp.req', getNetlogHWND); + writeToLogLn('arp.recv.drarp.req'); end; $6:begin { DRARP Reply } - if getNetlogHWND <> 0 then writestringlnWND('arp.recv.drarp.rep', getNetlogHWND); + writeToLogLn('arp.recv.drarp.rep'); end; $7:begin { DRARP Error } - if getNetlogHWND <> 0 then writestringlnWND('arp.recv.drarp.err', getNetlogHWND); + writeToLogLn('arp.recv.drarp.err'); end; $8:begin { InARP Request } - if getNetlogHWND <> 0 then writestringlnWND('arp.recv.inarp.req', getNetlogHWND); + writeToLogLn('arp.recv.inarp.req'); end; $9:begin { InARP Reply } - if getNetlogHWND <> 0 then writestringlnWND('arp.recv.inarp.rep', getNetlogHWND); + writeToLogLn('arp.recv.inarp.rep'); end; end; pop_trace; diff --git a/src/driver/net/l3/ipv4.pas b/src/driver/net/l3/ipv4.pas index af73ff78..fa4ab7cd 100644 --- a/src/driver/net/l3/ipv4.pas +++ b/src/driver/net/l3/ipv4.pas @@ -29,7 +29,7 @@ var begin push_trace('ipv4.recv'); - if getNetlogHWND <> 0 then writestringlnWND('ipv4.recv', getNetlogHWND); + writeToLogLn('ipv4.recv'); Header:= PIPV4Header(p_data); AHeader.version:= Header^.version; AHeader.header_len:= Header^.header_len; diff --git a/src/include/asuro.pas b/src/include/asuro.pas index 4f8d24b8..c85e9878 100644 --- a/src/include/asuro.pas +++ b/src/include/asuro.pas @@ -3,20 +3,20 @@ unit asuro; interface const - VERSION = '1.0.1-674ia'; + VERSION = '1.0.1-677ia'; VERSION_MAJOR = '1'; VERSION_MINOR = '0'; VERSION_SUB = '1'; - REVISION = '674'; + REVISION = '677'; RELEASE = 'ia'; - LINE_COUNT = 27628; + LINE_COUNT = 27664; FILE_COUNT = 89; DRIVER_COUNT = 32; FPC_VERSION = '2.6.4'; NASM_VERSION = '2.10.09'; MAKE_VERSION = '3.81'; COMPILE_DATE = '10/05/18'; - COMPILE_TIME = '08:36:31'; + COMPILE_TIME = '08:56:35'; implementation