git-svn-id: https://spexeah.com:8443/svn/Asuro@699 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c
This commit is contained in:
parent
8385a5fcec
commit
22751a384d
BIN
bin/kernel.bin
BIN
bin/kernel.bin
Binary file not shown.
Binary file not shown.
BIN
lib/E1000.ppu
BIN
lib/E1000.ppu
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/netutils.ppu
BIN
lib/netutils.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.
@ -11,6 +11,8 @@ function stringToMAC(str : pchar) : puint8;
|
|||||||
function stringToIPv4(str : pchar) : puint8;
|
function stringToIPv4(str : pchar) : puint8;
|
||||||
procedure writeMACAddress(mac : puint8; WND : HWND);
|
procedure writeMACAddress(mac : puint8; WND : HWND);
|
||||||
procedure writeIPv4Address(ip : puint8; WND : HWND);
|
procedure writeIPv4Address(ip : puint8; WND : HWND);
|
||||||
|
procedure writeMACAddressEx(mac : puint8; WND : HWND);
|
||||||
|
procedure writeIPv4AddressEx(ip : puint8; WND : HWND);
|
||||||
function MACEqual(mac1 : puint8; mac2 : puint8) : boolean;
|
function MACEqual(mac1 : puint8; mac2 : puint8) : boolean;
|
||||||
function IPEqual(ip1 : puint8; ip2 : puint8) : boolean;
|
function IPEqual(ip1 : puint8; ip2 : puint8) : boolean;
|
||||||
function newPacketContext : PPacketContext;
|
function newPacketContext : PPacketContext;
|
||||||
@ -80,6 +82,32 @@ begin
|
|||||||
pop_trace;
|
pop_trace;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure writeIPv4AddressEx(ip : puint8; WND : HWND);
|
||||||
|
var
|
||||||
|
i : integer;
|
||||||
|
|
||||||
|
begin
|
||||||
|
push_trace('netutils.writeIPv4Address');
|
||||||
|
console.writeintWND(ip[0], WND);
|
||||||
|
for i:=1 to 3 do begin
|
||||||
|
console.writestringWND('.', WND);
|
||||||
|
console.writeintWND(ip[i], WND);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure writeMACAddressEx(mac : puint8; WND : HWND);
|
||||||
|
var
|
||||||
|
i : integer;
|
||||||
|
|
||||||
|
begin
|
||||||
|
push_trace('netutils.writeMACAddress');
|
||||||
|
console.writehexpairWND(mac[0], WND);
|
||||||
|
for i:=1 to 5 do begin
|
||||||
|
console.writestringWND(':', WND);
|
||||||
|
console.writehexpairWND(mac[i], WND);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure writeIPv4Address(ip : puint8; WND : HWND);
|
procedure writeIPv4Address(ip : puint8; WND : HWND);
|
||||||
var
|
var
|
||||||
i : integer;
|
i : integer;
|
||||||
|
@ -4,7 +4,7 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
tracer, lmemorymanager,
|
tracer, lmemorymanager,
|
||||||
util, lists, console,
|
util, lists, console, terminal,
|
||||||
net, nettypes, netutils,
|
net, nettypes, netutils,
|
||||||
netlog,
|
netlog,
|
||||||
eth2, ipv4;
|
eth2, ipv4;
|
||||||
@ -189,12 +189,33 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure terminal_command_arp(Params : PParamList);
|
||||||
|
var
|
||||||
|
i : uint32;
|
||||||
|
elm : PARPCacheRecord;
|
||||||
|
|
||||||
|
begin
|
||||||
|
if LL_Size(Cache) > 0 then begin
|
||||||
|
writestringlnWND('MAC IPv4', getTerminalHWND);
|
||||||
|
For i:=0 to LL_Size(Cache)-1 do begin
|
||||||
|
elm:= PARPCacheRecord(LL_Get(Cache, i));
|
||||||
|
writeMACAddressEx(@elm^.MAC[0], getTerminalHWND);
|
||||||
|
writestringWND(' ', getTerminalHWND);
|
||||||
|
writeIPv4AddressEx(@elm^.IP[0], getTerminalHWND);
|
||||||
|
writestringlnWND(' ', getTerminalHWND);
|
||||||
|
end;
|
||||||
|
end else begin
|
||||||
|
writestringlnWND('No entries in ARP table.', getTerminalHWND);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure register;
|
procedure register;
|
||||||
begin
|
begin
|
||||||
push_trace('arp.register');
|
push_trace('arp.register');
|
||||||
if not Registered then begin
|
if not Registered then begin
|
||||||
Cache:= LL_New(sizeof(TARPCacheRecord));
|
Cache:= LL_New(sizeof(TARPCacheRecord));
|
||||||
eth2.registerType($0806, @recv);
|
eth2.registerType($0806, @recv);
|
||||||
|
terminal.registerCommand('ARP', @terminal_command_arp, 'Get ARP Table.');
|
||||||
Registered:= true;
|
Registered:= true;
|
||||||
end;
|
end;
|
||||||
pop_trace;
|
pop_trace;
|
||||||
|
@ -9,14 +9,14 @@ const
|
|||||||
VERSION_SUB = '1';
|
VERSION_SUB = '1';
|
||||||
REVISION = '677';
|
REVISION = '677';
|
||||||
RELEASE = 'ia';
|
RELEASE = 'ia';
|
||||||
LINE_COUNT = 27855;
|
LINE_COUNT = 27904;
|
||||||
FILE_COUNT = 89;
|
FILE_COUNT = 89;
|
||||||
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 = '14:03:49';
|
COMPILE_TIME = '14:21:06';
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user