Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Accessing IP forwarding Table in VxWorks

770 views
Skip to first unread message

Dinesh Makhija

unread,
Nov 25, 1998, 3:00:00 AM11/25/98
to
Hello !

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


Daniel Wong

unread,
Nov 30, 1998, 3:00:00 AM11/30/98
to
I assume you know about routeAdd(), routeDelete(), and routeNetAdd() since
you know about routeShow().
Your problem is that there doesn't seem to be a function that returns a
pointer to the table structures. Show functions are all void.

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

Victor Sperry

unread,
Dec 1, 1998, 3:00:00 AM12/1/98
to

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

0 new messages