Subject: Re: Send gratuitous ARP... from CARP... using arprequest...
To: Michael Hertrick <email@example.com>
From: Manuel Bouyer <firstname.lastname@example.org>
Date: 11/08/2003 19:21:52
On Fri, Nov 07, 2003 at 01:42:50PM -0500, Michael Hertrick wrote:
> I'm working on runnng CARP with NetBSD-current and I'm hung up on the
> section which sends the gratuitous arp.
> When I compile the kernel, I get the following error on ip_carp.c:
> cc -ffreestanding -O2 -Werror -Wall -Wno-main -Wno-format-zero-length
> -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes
> -Wno-sign-compare -Wno-uninitialized -Di386 -I. -I../../../../arch
> -I../../../.. -nostdinc -DLKM -DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT -c
> ../../../../netinet/ip_carp.c: In function `carp_send_arp':
> ../../../../netinet/ip_carp.c:643: warning: implicit declaration of
> function `arprequest'
> *** Error code 1
> Refer to attached file, ip_carp.c.
> The only place I can find arprequest in -current source is in
> netinet/if_ether.c. I put "void arprequest ((struct ifnet *, u_int32_t
> *, u_int32_t *, u_int8_t *));" in ip_carp.c, and then ip_carp.c compiles
> fine, but towards the end of the kernel compile it reports "undefined
> reference to arprequest" from ip_carp.o. Am I missing something simple
> or am I not even in the ballpark? (I'll put money on the latter)
arprequest() in if_arp.c is declared static, so this symbol isn't usable
outside of if_arp.c
I don't know if it's more appropriate to change the arp interface
to export this function, or to adapt ip_carp.c to use our arp interface
(if it's possible).
> If there is a more appropriate mailing list for this kind of thing,
> please let me know. I figured this one would be appropriate since I'm
> using -current to do the work.
Manuel Bouyer <email@example.com>
NetBSD: 23 ans d'experience feront toujours la difference