FYI ---------- Forwarded message --------- From: Anupam Kapoor <anupam.kapoor@gmail.com> Date: Tue, 29 Nov 2016 at 1:25 PM Subject: Re: Question about arp caches To: Shawn Peng <yisupeng@gmail.com> On Tue, Nov 29, 2016 at 12:49 PM, Shawn Peng <yisupeng@gmail.com> wrote: I find a lot references of the function neigh_release(), can you direct me to the one that releases a staled arp entry? neigh_destroy(...) is probably what you are looking for. -- kind regards anupam -- In the beginning was the lambda, and the lambda was with Emacs, and Emacs was the lambda.
Sorry, seems I didn't make question clear. Maybe let me ask another question to help with this. So, how is the kernel check those staled arp entries? Or, what is the mechanism that the kernel uses to find the out of date entries? Thanks, Yisu On 11/30/2016 1:41 AM, Anupam Kapoor wrote:
FYI
---------- Forwarded message --------- From: Anupam Kapoor <anupam.kapoor@gmail.com <mailto:anupam.kapoor@gmail.com>> Date: Tue, 29 Nov 2016 at 1:25 PM Subject: Re: Question about arp caches To: Shawn Peng <yisupeng@gmail.com <mailto:yisupeng@gmail.com>>
On Tue, Nov 29, 2016 at 12:49 PM, Shawn Peng <yisupeng@gmail.com <mailto:yisupeng@gmail.com>>wrote:
I find a lot references of the function neigh_release(), can you direct me to the one that releases a staled arp entry?
neigh_destroy(...) is probably what you are looking for.
-- kind regards anupam
-- In the beginning was the lambda, and the lambda was with Emacs, and Emacs was the lambda.
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
On Wed, Nov 30, 2016 at 1:46 PM, Yisu Peng <yisupeng@gmail.com> wrote:
So, how is the kernel check those staled arp entries? Or, what is the mechanism that the kernel uses to find the out of date entries?
ok sure, well, each neighbor entry (struct neighbour) has a 'timer' (which is created during neighbor creation i.e. during neigh_alloc(...)). this timer gets 'serviced' by 'neigh_timer_handler(...)', which is the per neighbor garbage collector handler. when the state of the neighbor becomes NUD_FAILED, the neighbor is collected via invokation of 'neigh_release(...)' as indicated earlier. -- kind regards anupam In the beginning was the lambda, and the lambda was with Emacs, and Emacs was the lambda.
Oh, I see. Thanks. Appreciate that. On 11/30/2016 3:42 AM, Anupam Kapoor wrote:
On Wed, Nov 30, 2016 at 1:46 PM, Yisu Peng <yisupeng@gmail.com <mailto:yisupeng@gmail.com>> wrote:
So, how is the kernel check those staled arp entries? Or, what is the mechanism that the kernel uses to find the out of date entries?
ok sure, well, each neighbor entry (struct neighbour) has a 'timer' (which is created during neighbor creation i.e. during neigh_alloc(...)). this timer gets 'serviced' by 'neigh_timer_handler(...)', which is the per neighbor garbage collector handler.
when the state of the neighbor becomes NUD_FAILED, the neighbor is collected via invokation of 'neigh_release(...)' as indicated earlier.
-- kind regards anupam
In the beginning was the lambda, and the lambda was with Emacs, and Emacs was the lambda.
participants (2)
-
Anupam Kapoor -
Yisu Peng