Re: [RESOLVED] ICMP Router Discovery
Re: [RESOLVED] ICMP Router Discovery
- Subject: Re: [RESOLVED] ICMP Router Discovery
- From: "Justin C. Walker" <email@hidden>
- Date: Wed, 29 Jun 2005 22:23:36 -0700
On Jun 29, 2005, at 18:39 , Peter Bierman wrote:
At 5:16 PM -0700 6/29/05, Justin C. Walker wrote:
On Jun 29, 2005, at 15:56 , Andre Smith wrote:
The routing tables that exist on a workstation or even a server
will usually only contain the route for a default router; this
could also obtained using a DCHP server.
If you want to discover routes advertised by routers, you
probably need to implement BGP, etc. There are numerous routing
protocols described in detail by RFCs, just do a google search,
and you should be well on your way.
Be forewarned, it will take a lot more code than a simple ping to
obtain advertised routes from internet routers. Good Luck.
I think, now that the dust has cleared, that Chase just wants to
"know the routers that the workstation knows" (whatever that may
mean). On Mac OS X, it means
- querying the SystemConfiguration database
- finding router addresses when those are manually configured
- querying BootP/DHCP/... when they are not (depending on
what's recorded for each 'location').
If that is indeed what he wants, I still don't understand why it's
that complicated.
Chase may want to clarify this, but I believe the issue is that a
given workstation will have a specific set of routers that it
"should" talk with; these are configured either manually or via DHCP/
BootP. A given subnet may have many routers, but only a few are
important to the workstation, and it may not be, a priori, clear how
to identify them.
On Mac OS X, this is handled for all possible interfaces, in the
SystemConfiguration database; for other systems, it's handled in some
other way, if at all. And, at any given time, there may be only a
partial set of those routers that the workstation could use
identified by netstat. In the case of Mac OS X, if there are two
ethernet adapters in the mix, the routers identified by netstat will
be *only* those associated to the 'primary' interface of the moment.
Netstat won't be aware of the router that will be identified as the
default in case the current primary gets its plug pulled.
Netstat can clearly identify which routes are gateways. The system
has to be able to do that.
'router' == 'gateway'; I'm not sure what you mean here (and I'm not
sure that it's important, either :-})
The issues you mention are all important, but they may not have an
impact on what Chase is trying to do. It's been kind of hard to tell
exactly what his goal is, but that's my reading.
Cheers,
Justin
--
Justin C. Walker, Curmudgeon-At-Large
Institute for General Semantics
--------
Some people have a mental horizon of radius zero, and
call it their point of view.
-- David Hilbert
--------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden