git-svn-id: https://spexeah.com:8443/svn/Asuro@738 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c
This commit is contained in:
1 parent
b372e85e16
commit
12b28f41c7
12 files changed
+41
-45
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.
+39
-43
@@ -197,55 +197,51 @@ begin
|
|||||||
copyIPv4(@Header^.Destination_Protocol[0], @AHeader.Destination_Protocol[0]);
|
copyIPv4(@Header^.Destination_Protocol[0], @AHeader.Destination_Protocol[0]);
|
||||||
|
|
||||||
{ Process ARP Packet }
|
{ Process ARP Packet }
|
||||||
Merge:= false;
|
|
||||||
CacheElement:= findCacheRecordByIP(@AHeader.Source_Protocol[0]);
|
CacheElement:= findCacheRecordByIP(@AHeader.Source_Protocol[0]);
|
||||||
if CacheElement = nil then CacheElement:= findCacheRecordByMAC(@AHeader.Source_Hardware[0]);
|
if CacheElement = nil then CacheElement:= findCacheRecordByMAC(@AHeader.Source_Hardware[0]);
|
||||||
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]);
|
||||||
copyIPv4(@AHeader.Source_Protocol[0], @CacheElement^.IP[0]);
|
copyIPv4(@AHeader.Source_Protocol[0], @CacheElement^.IP[0]);
|
||||||
Merge:= true;
|
|
||||||
end else begin
|
end else begin
|
||||||
if not Merge then begin
|
CacheElement:= PARPCacheRecord(LL_Add(Cache));
|
||||||
CacheElement:= PARPCacheRecord(LL_Add(Cache));
|
CopyMAC(@AHeader.Source_Hardware[0], @CacheElement^.MAC[0]);
|
||||||
CopyMAC(@AHeader.Source_Hardware[0], @CacheElement^.MAC[0]);
|
copyIPv4(@AHeader.Source_Protocol[0], @CacheElement^.IP[0]);
|
||||||
copyIPv4(@AHeader.Source_Protocol[0], @CacheElement^.IP[0]);
|
end;
|
||||||
end;
|
if IPEqual(@AHeader.Destination_Protocol[0], @getIPv4Config^.Address[0]) then begin
|
||||||
if IPEqual(@AHeader.Destination_Protocol[0], @getIPv4Config^.Address[0]) then begin
|
case AHeader.Operation of
|
||||||
case AHeader.Operation of
|
$1:begin { ARP Request }
|
||||||
$1:begin { ARP Request }
|
writeToLogLn(' arp.recv.arp.req');
|
||||||
writeToLogLn(' arp.recv.arp.req');
|
context:= newPacketContext;
|
||||||
context:= newPacketContext;
|
copyMAC(@AHeader.Source_Hardware[0], @context^.MAC.Destination[0]);
|
||||||
copyMAC(@AHeader.Source_Hardware[0], @context^.MAC.Destination[0]);
|
copyIPv4(@AHeader.Source_Protocol[0], @context^.IP.Destination[0]);
|
||||||
copyIPv4(@AHeader.Source_Protocol[0], @context^.IP.Destination[0]);
|
copyMAC(getMAC, @context^.MAC.Source[0]);
|
||||||
copyMAC(getMAC, @context^.MAC.Source[0]);
|
copyIPv4(@getIPv4Config^.Address[0], @context^.IP.Source[0]);
|
||||||
copyIPv4(@getIPv4Config^.Address[0], @context^.IP.Source[0]);
|
send($1, $0800, $2, context);
|
||||||
send($1, $0800, $2, context);
|
freePacketContext(context);
|
||||||
freePacketContext(context);
|
end;
|
||||||
end;
|
$2:begin { ARP Reply }
|
||||||
$2:begin { ARP Reply }
|
writeToLogLn(' arp.recv.arp.rep');
|
||||||
writeToLogLn(' arp.recv.arp.rep');
|
end;
|
||||||
end;
|
$3:begin { RARP Request }
|
||||||
$3:begin { RARP Request }
|
writeToLogLn(' arp.recv.rarp.req');
|
||||||
writeToLogLn(' arp.recv.rarp.req');
|
end;
|
||||||
end;
|
$4:begin { RARP Reply }
|
||||||
$4:begin { RARP Reply }
|
writeToLogLn(' arp.recv.rarp.rep');
|
||||||
writeToLogLn(' arp.recv.rarp.rep');
|
end;
|
||||||
end;
|
$5:begin { DRARP Request }
|
||||||
$5:begin { DRARP Request }
|
writeToLogLn(' arp.recv.drarp.req');
|
||||||
writeToLogLn(' arp.recv.drarp.req');
|
end;
|
||||||
end;
|
$6:begin { DRARP Reply }
|
||||||
$6:begin { DRARP Reply }
|
writeToLogLn(' arp.recv.drarp.rep');
|
||||||
writeToLogLn(' arp.recv.drarp.rep');
|
end;
|
||||||
end;
|
$7:begin { DRARP Error }
|
||||||
$7:begin { DRARP Error }
|
writeToLogLn(' arp.recv.drarp.err');
|
||||||
writeToLogLn(' arp.recv.drarp.err');
|
end;
|
||||||
end;
|
$8:begin { InARP Request }
|
||||||
$8:begin { InARP Request }
|
writeToLogLn(' arp.recv.inarp.req');
|
||||||
writeToLogLn(' arp.recv.inarp.req');
|
end;
|
||||||
end;
|
$9:begin { InARP Reply }
|
||||||
$9:begin { InARP Reply }
|
writeToLogLn(' arp.recv.inarp.rep');
|
||||||
writeToLogLn(' arp.recv.inarp.rep');
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|||||||
@@ -9,14 +9,14 @@ const
|
|||||||
VERSION_SUB = '1';
|
VERSION_SUB = '1';
|
||||||
REVISION = '728';
|
REVISION = '728';
|
||||||
RELEASE = 'ia';
|
RELEASE = 'ia';
|
||||||
LINE_COUNT = 28529;
|
LINE_COUNT = 28525;
|
||||||
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 = '13/05/18';
|
COMPILE_DATE = '13/05/18';
|
||||||
COMPILE_TIME = '12:06:37';
|
COMPILE_TIME = '12:08:40';
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user