[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [lwip-devel] Suggestion re ARP
From: |
Zschocke, Florian |
Subject: |
RE: [lwip-devel] Suggestion re ARP |
Date: |
Wed, 28 Apr 2004 13:15:46 +0200 |
Mountifield, Tony wrote on Wednesday, April 28, 2004 12:54 PM:
> My suggestion is to have a #if option to control whether or
> not LWIP updates its ARP table from 3rd-party requests it sees.
> Comments?
This is the algorithm as laid out in RFC 826
(ftp://ftp.rfc-editor.org/in-notes/std/std37.txt):
-----------------------------------------
?Do I have the hardware type in ar$hrd?
Yes: (almost definitely)
[optionally check the hardware length ar$hln]
?Do I speak the protocol in ar$pro?
Yes:
[optionally check the protocol length ar$pln]
Merge_flag := false
If the pair <protocol type, sender protocol address> is
already in my translation table, update the sender
hardware address field of the entry with the new
information in the packet and set Merge_flag to true.
?Am I the target protocol address?
Yes:
If Merge_flag is false, add the triplet <protocol type,
sender protocol address, sender hardware address> to
the translation table.
?Is the opcode ares_op$REQUEST? (NOW look at the opcode!!)
Yes:
Swap hardware and protocol fields, putting the local
hardware and protocol addresses in the sender fields.
Set the ar$op field to ares_op$REPLY
Send the packet to the (new) target hardware address on
the same hardware on which the request was received.
------------------------------------------
As you can see, updates for existing entries are done for any ARP packet
received but new entries are only merged into the table when addressing the
host itself.
Florian
- [lwip-devel] Suggestion re ARP, Mountifield, Tony, 2004/04/28
- RE: [lwip-devel] Suggestion re ARP,
Zschocke, Florian <=
- RE: [lwip-devel] Suggestion re ARP, Mountifield, Tony, 2004/04/28
- RE: [lwip-devel] Suggestion re ARP, Zschocke, Florian, 2004/04/29
- RE: [lwip-devel] Suggestion re ARP, Zschocke, Florian, 2004/04/29