Is there a way to access ROUTE NET TABLE and ROUTE HOST TABLE
The only documentation I could find was
besides routeShow() and netShow() which don't seems to be
programming
interfaces
Regards
-Dinesh Makhija
Therefore this work around is to get access to the current contents of the
tables so you can read the entries and make decisions:
Redirect the output of the system command to a file. Then open and
parse the contents.
Sorry if that sounds hokey, but OTOH, might be what you need.
Depends on your requirements. In my case, I needed to detect an error
condition and modify certain route table entries on a once per 7 second
period. Worked fine for me.
You might check out ifLib -- ifRouteDelete().
HTH,
Dan Wong
Dinesh Makhija wrote:
--
Daniel Wong Principal System Engineer
Lockheed Martin Ocean Radar and Sensor Systems
Electronics Park EP7-333 Syracuse, NY 13090
(315)456-2162 [FAX (315)456-1430]
------------------------------------------------------------------------
Blessed is the man who always fears the Lord,
but he who hardens his heart falls into trouble. -- Proverbs 28:14
Here are two ways to get to the IP route tables.
1. vxWorks supports IP by porting BSD UNIX. Look in
$WIND_BASE/target/h/net/radix.h. Try rn_walktree
for a function that came from Berkely.
By the way, if you want the source code to vxWorks'
IP stack, you can get a very close approximation by
downloading FreeBSD from http://www.freebsd.org
2. m2IpRouteTblEntryGet() is a WRS function that provides
a better API, but I have seen it return routes that
are of type RTF_LLINFO, and thus won't show up in
the display provided by routeShow() or mRouteShow().
The IP route table lives here: rt_tables[AF_INET].
Vic Sperry
Member Technical Staff
Paradyne Corp