lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [lwip-devel] Suggestion re ARP


From: Mountifield, Tony
Subject: RE: [lwip-devel] Suggestion re ARP
Date: Wed, 28 Apr 2004 16:34:31 +0100

Thanks for the info. In fact, I should have searched the sources more 
thoroughly before posting, as the option already exists:

#define ETHARP_ALWAYS_INSERT 0  /* update ARP table only for pre-existing 
addresses */
#define ETHARP_ALWAYS_INSERT 1  /* update ARP table from all ARP traffic */

To obey the algorithm as quoted below, use 0.

Cheers,
Tony

> -----Original Message-----
> From: Zschocke, Florian [mailto:address@hidden
> Sent: 28 April 2004 12:16
> To: 'lwip-devel'
> Subject: RE: [lwip-devel] Suggestion re ARP
> 
> 
> 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 mailing list
> address@hidden
> http://mail.nongnu.org/mailman/listinfo/lwip-devel
> 


***********************************************************************************
This email, its content and any attachments is PRIVATE AND
CONFIDENTIAL to TANDBERG Television. If received in error please
notify the sender and destroy the original message and attachments.

www.tandbergtv.com
***********************************************************************************





reply via email to

[Prev in Thread] Current Thread [Next in Thread]