git-svn-id: https://spexeah.com:8443/svn/Asuro@693 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c

This commit is contained in:
kieron 2018-05-10 12:39:29 +00:00
parent 35edc9e455
commit f0b548c0b7
16 changed files with 6 additions and 6 deletions

BIN
Asuro.iso

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.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -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));

View File

@ -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;

View File

@ -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