git-svn-id: https://spexeah.com:8443/svn/Asuro@693 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c
This commit is contained in:
parent
35edc9e455
commit
f0b548c0b7
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.
@ -10,7 +10,7 @@ uses
|
|||||||
netlog,
|
netlog,
|
||||||
console;
|
console;
|
||||||
|
|
||||||
procedure send(p_data : void; p_len : uint16; p_context : PPacketContext);
|
procedure send(p_data : void; p_len : uint16; eth_type : uint16; p_context : PPacketContext);
|
||||||
procedure registerType(eType : uint16; RecvCB : TRecvCallback);
|
procedure registerType(eType : uint16; RecvCB : TRecvCallback);
|
||||||
procedure register;
|
procedure register;
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ begin
|
|||||||
pop_trace;
|
pop_trace;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure send(p_data : void; p_len : uint16; p_context : PPacketContext);
|
procedure send(p_data : void; p_len : uint16; eth_type : uint16; p_context : PPacketContext);
|
||||||
var
|
var
|
||||||
buffer : void;
|
buffer : void;
|
||||||
hdr : TEthernetHeader;
|
hdr : TEthernetHeader;
|
||||||
@ -44,8 +44,8 @@ begin
|
|||||||
buffer:= kalloc(p_len + sizeof(TEthernetHeader));
|
buffer:= kalloc(p_len + sizeof(TEthernetHeader));
|
||||||
copyMAC(@p_context^.MAC.Source[0], @hdr.src[0]);
|
copyMAC(@p_context^.MAC.Source[0], @hdr.src[0]);
|
||||||
copyMAC(@p_context^.MAC.Destination[0], @hdr.dst[0]);
|
copyMAC(@p_context^.MAC.Destination[0], @hdr.dst[0]);
|
||||||
hdr.EthTypeHi:= 0;
|
hdr.EthTypeHi:= eth_type SHR 8;
|
||||||
hdr.EthTypeLo:= 1;
|
hdr.EthTypeLo:= eth_type AND $FF;
|
||||||
memcpy(uint32(@hdr), uint32(buffer), sizeof(TEthernetHeader));
|
memcpy(uint32(@hdr), uint32(buffer), sizeof(TEthernetHeader));
|
||||||
memcpy(uint32(p_data), uint32(buffer+sizeof(TEthernetHeader)), p_len);
|
memcpy(uint32(p_data), uint32(buffer+sizeof(TEthernetHeader)), p_len);
|
||||||
net.send(buffer, p_len + sizeof(TEthernetHeader));
|
net.send(buffer, p_len + sizeof(TEthernetHeader));
|
||||||
|
@ -101,7 +101,7 @@ begin
|
|||||||
if MACEqual(@p_context^.MAC.Destination[0], @NULL_MAC[0]) then begin
|
if MACEqual(@p_context^.MAC.Destination[0], @NULL_MAC[0]) then begin
|
||||||
CopyMAC(@BROADCAST_MAC[0], @p_context^.MAC.Destination[0]);
|
CopyMAC(@BROADCAST_MAC[0], @p_context^.MAC.Destination[0]);
|
||||||
end;
|
end;
|
||||||
eth2.send(buf, sizeof(TARPHeader), p_context);
|
eth2.send(buf, sizeof(TARPHeader), $0806, p_context);
|
||||||
end;
|
end;
|
||||||
kfree(buf);
|
kfree(buf);
|
||||||
end;
|
end;
|
||||||
|
@ -16,7 +16,7 @@ const
|
|||||||
NASM_VERSION = '2.10.09';
|
NASM_VERSION = '2.10.09';
|
||||||
MAKE_VERSION = '3.81';
|
MAKE_VERSION = '3.81';
|
||||||
COMPILE_DATE = '10/05/18';
|
COMPILE_DATE = '10/05/18';
|
||||||
COMPILE_TIME = '13:17:01';
|
COMPILE_TIME = '13:39:16';
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user