git-svn-id: https://spexeah.com:8443/svn/Asuro@721 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c
This commit is contained in:
@ -127,13 +127,16 @@ end;
|
||||
procedure sendRequest(ip : puint8);
|
||||
var
|
||||
context : PPacketContext;
|
||||
CacheRecord : PARPCacheRecord;
|
||||
|
||||
begin
|
||||
context:= newPacketContext;
|
||||
CopyIPv4(ip, @context^.IP.Destination[0]);
|
||||
CopyIPv4(@getIPv4Config^.Address[0], @context^.IP.Source[0]);
|
||||
CopyMAC(GetMAC, @context^.MAC.Source[0]);
|
||||
CopyMAC(@NULL_MAC[0], @context^.MAC.Destination[0]);
|
||||
CacheRecord:= findCacheRecordByIP(@getIPv4Config^.Gateway[0]);
|
||||
if CacheRecord <> nil then CopyMAC(@CacheRecord^.MAC[0], @context^.MAC.Destination[0])
|
||||
else CopyMAC(@NULL_MAC[0], @context^.MAC.Destination[0]);
|
||||
arp.send($1, $0800, $1, context);
|
||||
freePacketContext(context);
|
||||
end;
|
||||
|
Reference in New Issue
Block a user