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

This commit is contained in:
kieron committed 2018-05-22 03:33:51 +00:00
1 parent 4a1d7a942d
commit 8066634367
97 files changed
+422 -123

No files matched your search

+16 -12
View File
@@ -22,6 +22,7 @@ function MACToIIPv4(mac : puint8) : puint8;
procedure sendGratuitous;
procedure sendRequest(ip : puint8);
procedure send(hType : uint16; pType : uint16; op : uint16; p_context : PPacketContext);
function resolveIP(ip : puint8) : puint8;
implementation
@@ -67,18 +68,6 @@ begin
end;
end;
function findCacheRecord(ip : puint8) : PARPCacheRecord;
var
CacheRecord : PARPCacheRecord;
begin
CacheRecord:= findCacheRecordByIP(ip);
if CacheRecord = nil then begin
end;
findCacheRecord:= CacheRecord;
end;
procedure send(hType : uint16; pType : uint16; op : uint16; p_context : PPacketContext);
var
buf : void;
@@ -171,6 +160,21 @@ begin
sendRequestGateway(ip);
end;
function resolveIP(ip : puint8) : puint8;
var
CacheRecord : PARPCacheRecord;
begin
CacheRecord:= findCacheRecordByIP(ip);
resolveIP:= nil;
if CacheRecord = nil then begin
sendRequest(ip);
sendRequestGateway(ip);
end else begin
resolveIP:= @CacheRecord^.MAC[0];
end;
end;
procedure recv(p_data : void; p_len : uint16; p_context : PPacketContext);
var
Header : PARPHeader;
File diff suppressed because it is too large. Load diff