git-svn-id: https://spexeah.com:8443/svn/Asuro@710 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c
This commit is contained in:
parent
c8e275a34d
commit
70002cc772
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.
@ -19,6 +19,7 @@ type
|
|||||||
procedure register;
|
procedure register;
|
||||||
function IPv4ToMAC(ip : puint8) : puint8;
|
function IPv4ToMAC(ip : puint8) : puint8;
|
||||||
function MACToIIPv4(mac : puint8) : puint8;
|
function MACToIIPv4(mac : puint8) : puint8;
|
||||||
|
procedure sendGratuitous;
|
||||||
procedure send(hType : uint16; pType : uint16; op : uint16; p_context : PPacketContext);
|
procedure send(hType : uint16; pType : uint16; op : uint16; p_context : PPacketContext);
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -108,6 +109,20 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure sendGratuitous;
|
||||||
|
var
|
||||||
|
context : PPacketContext;
|
||||||
|
|
||||||
|
begin
|
||||||
|
context:= newPacketContext;
|
||||||
|
CopyIPv4(@getIPv4Config^.Address[0], @context^.IP.Destination[0]);
|
||||||
|
CopyIPv4(@getIPv4Config^.Address[0], @context^.IP.Source[0]);
|
||||||
|
CopyMAC(GetMAC, @context^.MAC.Source[0]);
|
||||||
|
CopyMAC(@BROADCAST_MAC[0], @context^.MAC.Destination[0]);
|
||||||
|
arp.send($1, $0800, $1, context);
|
||||||
|
freePacketContext(context);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure recv(p_data : void; p_len : uint16; p_context : PPacketContext);
|
procedure recv(p_data : void; p_len : uint16; p_context : PPacketContext);
|
||||||
var
|
var
|
||||||
Header : PARPHeader;
|
Header : PARPHeader;
|
||||||
@ -135,11 +150,7 @@ begin
|
|||||||
|
|
||||||
{ Process ARP Packet }
|
{ Process ARP Packet }
|
||||||
Merge:= false;
|
Merge:= false;
|
||||||
writeToLogLn(' L3: arp.findByIP');
|
|
||||||
console.redrawWindows;
|
|
||||||
CacheElement:= findCacheRecordByIP(@AHeader.Source_Protocol[0]);
|
CacheElement:= findCacheRecordByIP(@AHeader.Source_Protocol[0]);
|
||||||
writeToLogLn(' L3: arp.findByIPDone');
|
|
||||||
console.redrawWindows;
|
|
||||||
if CacheElement <> nil then begin
|
if CacheElement <> nil then begin
|
||||||
copyMAC(@AHeader.Source_Hardware[0], @CacheElement^.MAC[0]);
|
copyMAC(@AHeader.Source_Hardware[0], @CacheElement^.MAC[0]);
|
||||||
Merge:= true;
|
Merge:= true;
|
||||||
|
@ -114,6 +114,7 @@ begin
|
|||||||
Config.UP:= false;
|
Config.UP:= false;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
arp.sendGratuitous;
|
||||||
context:= newPacketContext;
|
context:= newPacketContext;
|
||||||
CopyIPv4(@Config.Gateway[0], @context^.IP.Destination[0]);
|
CopyIPv4(@Config.Gateway[0], @context^.IP.Destination[0]);
|
||||||
CopyIPv4(@Config.Address[0], @context^.IP.Source[0]);
|
CopyIPv4(@Config.Address[0], @context^.IP.Source[0]);
|
||||||
|
@ -9,14 +9,14 @@ const
|
|||||||
VERSION_SUB = '1';
|
VERSION_SUB = '1';
|
||||||
REVISION = '677';
|
REVISION = '677';
|
||||||
RELEASE = 'ia';
|
RELEASE = 'ia';
|
||||||
LINE_COUNT = 28002;
|
LINE_COUNT = 28014;
|
||||||
FILE_COUNT = 90;
|
FILE_COUNT = 90;
|
||||||
DRIVER_COUNT = 32;
|
DRIVER_COUNT = 32;
|
||||||
FPC_VERSION = '2.6.4';
|
FPC_VERSION = '2.6.4';
|
||||||
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 = '17:21:45';
|
COMPILE_TIME = '17:56:16';
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user