git-svn-id: https://spexeah.com:8443/svn/Asuro@744 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c
This commit is contained in:
1 parent
a7c568b06a
commit
17f41d9794
27 files changed
+54
-49
No files matched your search
Binary file not shown.
@@ -94,3 +94,5 @@ fi
|
||||
echo " "
|
||||
echo "======================="
|
||||
echo " "
|
||||
|
||||
cp Asuro.iso ~/host/Asuro.iso
|
||||
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -102,8 +102,8 @@ type
|
||||
|
||||
PIPV4Header = ^TIPV4Header;
|
||||
TIPV4Header = bitpacked record
|
||||
version : ubit4;
|
||||
header_len : ubit4;
|
||||
version : ubit4;
|
||||
ToS : uint8;
|
||||
total_len_Hi : uint8;
|
||||
total_len_Lo : uint8;
|
||||
|
||||
@@ -70,17 +70,20 @@ var
|
||||
begin
|
||||
dat:= p_data;
|
||||
sum:= 0;
|
||||
l:= p_len div 2;
|
||||
for i:=1 to l do begin
|
||||
sum:= sum + p_data^;
|
||||
inc(p_data);
|
||||
l:= p_len;
|
||||
|
||||
while l > 1 do begin
|
||||
sum:= sum + dat^;
|
||||
inc(dat);
|
||||
l:= l - 2;
|
||||
end;
|
||||
while (sum > $FFFF) do begin
|
||||
carry:= (sum AND $FFFF0000) SHR 16;
|
||||
sum:= (sum AND $FFFF);
|
||||
sum:= sum + carry;
|
||||
if l > 0 then sum:= sum + puint8(dat)^;
|
||||
|
||||
while (sum AND $FFFF0000) > 0 do begin
|
||||
sum:= (sum AND $FFFF) + (sum SHR 16);
|
||||
end;
|
||||
calculateChecksum:= not (sum AND $FFFF);
|
||||
|
||||
calculateChecksum:= not(sum);
|
||||
end;
|
||||
|
||||
function verifyChecksum(p_data : puint16; p_len : uint16) : boolean;
|
||||
|
||||
@@ -83,7 +83,7 @@ end;
|
||||
procedure send(p_data : void; p_len : uint16);
|
||||
begin
|
||||
push_trace('net.send');
|
||||
//writeToLogLn('L1: net.send');
|
||||
writeToLogLn('L1: net.send');
|
||||
if CBSend <> nil then CBSend(p_data, p_len);
|
||||
pop_trace;
|
||||
end;
|
||||
@@ -94,7 +94,7 @@ var
|
||||
|
||||
begin
|
||||
push_trace('net.recv');
|
||||
//writeToLogLn('L1: net.recv');
|
||||
writeToLogLn('L1: net.recv');
|
||||
context:= newPacketContext;
|
||||
if CBNext <> nil then CBNext(p_data, p_len, context);
|
||||
freePacketContext(context);
|
||||
|
||||
Loaded 20 of 27 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user