git-svn-id: https://spexeah.com:8443/svn/Asuro@703 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c
This commit is contained in:
parent
88e5f04c74
commit
63c2b15181
BIN
bin/kernel.bin
BIN
bin/kernel.bin
Binary file not shown.
Binary file not shown.
BIN
lib/arp.ppu
BIN
lib/arp.ppu
Binary file not shown.
BIN
lib/asuro.ppu
BIN
lib/asuro.ppu
Binary file not shown.
BIN
lib/eth2.ppu
BIN
lib/eth2.ppu
Binary file not shown.
BIN
lib/ipv4.ppu
BIN
lib/ipv4.ppu
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
lib/libpsystem.a
BIN
lib/libpsystem.a
Binary file not shown.
BIN
lib/net.ppu
BIN
lib/net.ppu
Binary file not shown.
BIN
lib/shell.ppu
BIN
lib/shell.ppu
Binary file not shown.
BIN
lib/terminal.ppu
BIN
lib/terminal.ppu
Binary file not shown.
@ -8,7 +8,8 @@ uses
|
||||
nettypes, netutils,
|
||||
net,
|
||||
netlog,
|
||||
console;
|
||||
console,
|
||||
crc;
|
||||
|
||||
procedure send(p_data : void; p_len : uint16; eth_type : uint16; p_context : PPacketContext);
|
||||
procedure registerType(eType : uint16; RecvCB : TRecvCallback);
|
||||
@ -38,6 +39,7 @@ var
|
||||
hdr : TEthernetHeader;
|
||||
pad : sint32;
|
||||
size : uint32;
|
||||
FCS : puint32;
|
||||
|
||||
begin
|
||||
pad:= 46 - p_len;
|
||||
@ -45,7 +47,7 @@ begin
|
||||
push_trace('eth2.send');
|
||||
writeToLogLn(' L2: eth2.send');
|
||||
if p_context <> nil then begin
|
||||
size:= pad + p_len + sizeof(TEthernetHeader);
|
||||
size:= sizeof(TEthernetHeader) + p_len + pad + 4;
|
||||
buffer:= kalloc(size);
|
||||
copyMAC(@p_context^.MAC.Source[0], @hdr.src[0]);
|
||||
copyMAC(@p_context^.MAC.Destination[0], @hdr.dst[0]);
|
||||
@ -53,6 +55,8 @@ begin
|
||||
hdr.EthTypeLo:= eth_type AND $FF;
|
||||
memcpy(uint32(@hdr), uint32(buffer), sizeof(TEthernetHeader));
|
||||
memcpy(uint32(p_data), uint32(buffer)+sizeof(TEthernetHeader), p_len);
|
||||
FCS:= puint32((uint32(buffer) + size) - 4);
|
||||
FCS^:= crc32(puint8(buffer), size - 4);
|
||||
net.send(buffer, size);
|
||||
kfree(buffer);
|
||||
end;
|
||||
|
@ -9,14 +9,14 @@ const
|
||||
VERSION_SUB = '1';
|
||||
REVISION = '677';
|
||||
RELEASE = 'ia';
|
||||
LINE_COUNT = 27909;
|
||||
FILE_COUNT = 89;
|
||||
LINE_COUNT = 28004;
|
||||
FILE_COUNT = 90;
|
||||
DRIVER_COUNT = 32;
|
||||
FPC_VERSION = '2.6.4';
|
||||
NASM_VERSION = '2.10.09';
|
||||
MAKE_VERSION = '3.81';
|
||||
COMPILE_DATE = '10/05/18';
|
||||
COMPILE_TIME = '15:00:26';
|
||||
COMPILE_TIME = '15:27:24';
|
||||
|
||||
implementation
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user