[ECOS] FW: [ECOS] ECOS: Free BSD - Default gateway entry , duplicate ARP//llinfo entries -

Jürgen Lambrecht J.Lambrecht@televic.com
Fri Sep 14 12:54:00 GMT 2007


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



More information about the Ecos-discuss mailing list