git-svn-id: https://spexeah.com:8443/svn/Asuro@713 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c
This commit is contained in:
1 parent
47f6c2325b
commit
cbb37f4e5a
16 files changed
+34
-10
No files matched your search
Binary file not shown.
Binary file not shown.
BIN
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.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -20,6 +20,7 @@ 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 sendGratuitous;
|
||||||
|
procedure sendRequest(ip : puint8);
|
||||||
procedure send(hType : uint16; pType : uint16; op : uint16; p_context : PPacketContext);
|
procedure send(hType : uint16; pType : uint16; op : uint16; p_context : PPacketContext);
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@@ -123,6 +124,20 @@ begin
|
|||||||
freePacketContext(context);
|
freePacketContext(context);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure sendRequest(ip : puint8);
|
||||||
|
var
|
||||||
|
context : PPacketContext;
|
||||||
|
|
||||||
|
begin
|
||||||
|
context:= newPacketContext;
|
||||||
|
CopyIPv4(ip, @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;
|
||||||
|
|||||||
@@ -81,7 +81,9 @@ procedure terminal_command_ifconfig(params : PParamList);
|
|||||||
var
|
var
|
||||||
Command, Sub, Address, Gateway, Netmask : pchar;
|
Command, Sub, Address, Gateway, Netmask : pchar;
|
||||||
_Address, _Gateway, _Netmask : puint8;
|
_Address, _Gateway, _Netmask : puint8;
|
||||||
|
Target : TIPv4Address;
|
||||||
context : PPacketContext;
|
context : PPacketContext;
|
||||||
|
i : uint32;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
push_trace('ipv4.terminal_command_ifconfig');
|
push_trace('ipv4.terminal_command_ifconfig');
|
||||||
@@ -115,14 +117,21 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
arp.sendGratuitous;
|
arp.sendGratuitous;
|
||||||
context:= newPacketContext;
|
|
||||||
CopyIPv4(@Config.Gateway[0], @context^.IP.Destination[0]);
|
CopyIPv4(@Config.Address[0], @Target[0]);
|
||||||
CopyIPv4(@Config.Address[0], @context^.IP.Source[0]);
|
for i:=1 to 255 do begin
|
||||||
CopyMAC(GetMAC, @context^.MAC.Source[0]);
|
Target[3]:= i;
|
||||||
//copyMAC(@FORCE_MAC[0], @context^.MAC.Source[0]);
|
arp.sendRequest(@Target[0]);
|
||||||
CopyMAC(@BROADCAST_MAC[0], @context^.MAC.Destination[0]);
|
end;
|
||||||
arp.send($1, $0800, $1, context);
|
|
||||||
freePacketContext(context);
|
// context:= newPacketContext;
|
||||||
|
// CopyIPv4(@Config.Gateway[0], @context^.IP.Destination[0]);
|
||||||
|
// CopyIPv4(@Config.Address[0], @context^.IP.Source[0]);
|
||||||
|
// CopyMAC(GetMAC, @context^.MAC.Source[0]);
|
||||||
|
// //copyMAC(@FORCE_MAC[0], @context^.MAC.Source[0]);
|
||||||
|
// CopyMAC(@BROADCAST_MAC[0], @context^.MAC.Destination[0]);
|
||||||
|
// arp.send($1, $0800, $1, context);
|
||||||
|
// freePacketContext(context);
|
||||||
end else begin
|
end else begin
|
||||||
writestringWND(' MAC: ', getTerminalHWND);
|
writestringWND(' MAC: ', getTerminalHWND);
|
||||||
writeMACAddress(net.GetMAC, getTerminalHWND);
|
writeMACAddress(net.GetMAC, getTerminalHWND);
|
||||||
|
|||||||
@@ -9,14 +9,14 @@ const
|
|||||||
VERSION_SUB = '1';
|
VERSION_SUB = '1';
|
||||||
REVISION = '677';
|
REVISION = '677';
|
||||||
RELEASE = 'ia';
|
RELEASE = 'ia';
|
||||||
LINE_COUNT = 28014;
|
LINE_COUNT = 28038;
|
||||||
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 = '18:05:58';
|
COMPILE_TIME = '18:17:20';
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user