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

This commit is contained in:
kieron 2018-05-10 16:56:26 +00:00
parent c8e275a34d
commit 70002cc772
16 changed files with 18 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

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

View File

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

View File

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