This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: FW: ECOS: Free BSD - Default gateway entry , duplicate ARP//llinfo entries -
- From: Jürgen Lambrecht <J dot Lambrecht at televic dot com>
- To: Alok Singh <aloks at broadcom dot com>
- Cc: Gary Thomas <gary at mlbassoc dot com>, ecos-discuss at ecos dot sourceware dot org
- Date: Fri, 14 Sep 2007 14:54:07 +0200
- Subject: Re: [ECOS] FW: [ECOS] ECOS: Free BSD - Default gateway entry , duplicate ARP//llinfo entries -
- References: <OBEELMDOHGDFDEMJCJCJKEPCMAAA.laurie.gellatly@netic.com> <FE7FB54DCB7C6949A1D3F9FF22DA6C137239F8@lvl7in-mail01.lvl7.com> <46AF506A.1020803@mlbassoc.com> <FE7FB54DCB7C6949A1D3F9FF22DA6C13723A1B@lvl7in-mail01.lvl7.com> <46AF7786.50508@mlbassoc.com> <FE7FB54DCB7C6949A1D3F9FF22DA6C13723A1C@lvl7in-mail01.lvl7.com> <46AF7A13.7080109@mlbassoc.com> <FE7FB54DCB7C6949A1D3F9FF22DA6C13847D74@lvl7in-mail01.lvl7.com>
Hello Alok,
I tried your code, but at link time, the compiler gives an error because the function rn_walktree is unknown.
You use rn_walktree in support.c::db_show_arptab().
Indeed, in bsd_tcpip/../src/sys/net/radix.c, rn_walktree is a static function. In the OpenBSD code, it is not static.
I just removed the 'static' from the code (as in the OpenBSD code) to solve this, and moved the declaration from the .c to the .h file. And now it compiles and works.
The output of db_show_arptab() is a bit messy (I expected something like when doing 'arp -a'), but usefull. Thanks.
Gary, here a diff of my radix.h/c files to the latest ones in cvs:
diff -r1.2 radix.c
75c75
< static int rn_walktree __P((struct radix_node_head *, walktree_f_t *, void *));
---
> //moved to .h for AS static int rn_walktree __P((struct radix_node_head *, walktree_f_t *, void *));
995c995
< static int
---
> int
diff -r1.1 radix.h
176a177,179
> int rn_walktree __P((struct radix_node_head *, walktree_f_t *, void *));//AS
Jürgen Lambrecht
R&D Engineer
Televic Transport Systems
http://www.televic.com
Televic NV / SA (main office)
Leo Bekaertlaan 1
B-8870 Izegem
Tel: +32 (0)51 303045
Fax: +32 (0)51 310670
Alok Singh wrote:
Gary,
We had some communication regarding an issue I raised some time back.
The issue was resolved then. But you asked for a patch(that I was using)
to dump the ARP table on FreeBSD stack. I'm sending this now. I
understand that we have sysctl hooks in current code to dump the
routing/arp table, but in case one is new to stack, this primitive ARP
table dump utility will prove useful. Have a look.
Can these be integrated to ecos FreeBSD stack?
Package - packages/net/bsd_tcpip/current
regards,
Alok
-----Original Message-----
From: Gary Thomas [mailto:gary@mlbassoc.com]
Sent: Tuesday, July 31, 2007 11:36 PM
To: Alok Singh
Cc: ecos-discuss@ecos.sourceware.org
Subject: Re: [ECOS] FW: [ECOS] ECOS: Free BSD - Default gateway entry ,
duplicate ARP//llinfo entries -
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Alok Singh wrote:
I ported it to FreeBSD( just copied actually ) from OpenBSD for
debugging purposes.
If you send a patch, I'll try it; I don't have time to mess with
porting old code...
<snip>
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss