Subject: kern/10314: DDB confusion around if_arp.c's symbols, if no ethernets present.
To: None <>
From: None <>
List: netbsd-bugs
Date: 06/07/2000 15:28:11
>Number:         10314
>Category:       kern
>Synopsis:       DDB confusion around if_arp.c's symbols, if no ethernets present.
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jun 07 15:29:00 PDT 2000
>Originator:     Chris Demetriou
>Release:        NetBSD-current as of 20000606
any should work; just configur a kernel with DDB and INET,
and no ethernets.
compile a kernel DDB and INET, but without any ethernet devices.
you get a link error, about 'db_show_arptab' being an undefined

note that DDB (in db_command.c) includes the cmd which shows
the arp table if INET is defined.

However, if_arp.c is included in the kernel only if there are
devices which need 'arp' (#include arp.h ; NARP > 0), or if
netatalk is in the kernel.

see above.

a naive fix would be to #include "arp.h" and change the #ifdef INET
to be #if defined(INET) && (NARP > 0).

However, there's the question of what to do about the netatalk case.
(why include if_arp.c if it's not needed in that case, so, how is it
needed, and if it is needed what is it used for?  and then based
on that, should the arptab display code be included if NETATALK
is defined.)  However, if you look at if_arp.c, if INET isn't
defined, it gets #if'd entirely out!

So, there are multiple levels of lossage here: the incorrect use of
db_show_arptab, and the inclusion of if_arp.c if netatalk.  The
resolution of the latter may impact the fix for the former...