Re: ARP cache entry for router
Re: ARP cache entry for router
- Subject: Re: ARP cache entry for router
- From: "Justin C. Walker" <email@hidden>
- Date: Thu, 6 Nov 2003 09:21:19 -0800
On Thursday, November 6, 2003, at 08:44 AM, Duane Murphy wrote:
--- At Wed, 5 Nov 2003 18:44:03 -0800, Ryan McGann wrote:
Short question: When we receive a notification from
SystemConfiguration
that the default route has changed, I want to get the link layer
information for the router if applicable. From what I can tell, an ARP
entry always exists for the router, and I'm assuming it's added by the
kernel when the route is added. But can there be a case when this will
not be true? In other words, should I go to the trouble of crafting an
ARP packet and waiting for the reply, or is it a "99% safe" assumption
that the ARP entry will exist (assuming the router information is
correct
in the user's settings)?
I cant tell you if the router will always be in the arp table. It kind
of
makes sense to me, but there may be other cases.
No, the router's ARP entry will not always be in the ARP cache. The
cache gets cleaned out at intervals, so unless you are constantly
sending to the router or through it, there will be times when the entry
is not there.
What I can tell you is that listenting for ARP packets is not obvious.
You cannot just use a raw ethernet socket. You have to use a bpf filter
in order to listen for ARP.
You can look at a program called 'arpwatch' to see how it's done.
Google for it, or maybe check the FreeBSD ports page.
Regards,
Justin
--
Justin C. Walker, Curmudgeon-At-Large *
Institute for General Semantics | If you're not confused,
| You're not paying attention
*--------------------------------------*-------------------------------*
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.