Subject: Re: your recent ARP changes...
To: Fred L. Templin <templin@nas.nasa.gov>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: tech-net
Date: 04/18/1997 15:41:36
Fred,
it looks to me like a substantial chunk of the problemsa you describe
would be subsumed by
#include <net/if_ether.h>
#define ac_if ec_if
What happens when you try creating a <netinet/if_ether.h> containing
the above?
>And, in all of these supported OS's (except the Microsoft OS's, that is),
>the "if_ether.h" module is included as "<netinet/if_ether.h>" and the
>"arpcom" structure is used as the handle by which the driver finds the
>"ifnet" struct. For me to change that for the NetBSD port now would cause
>me to add hundreds of lines of the form:
>
> #if defined(__NetBSD__)
> struct ifnet *ifp = (struct ifnet *)&(sc->is_ec.ec_if);
> #else /* defined(__NetBSD__) */
> struct ifnet *ifp = (struct ifnet *)&(sc->is_ac.ac_if);
> #endif /* defined(__NetBSD__) */
>
>in the kernel code. This isn't as bad as the fact that a large number
The recent ARP changes included non-backwards-compatbile changes
to:
(i) signatures of support functions (ether_ifattach)
(ii) structure names/macros (ac_if vs. ec_if)
(iii) source file locations
One good reason to do this is to make sure that all old code *did*
break, to make sure it was caught and fixed.
But now the changes are done, I for one agree that better backwards
compatibility with both NetBSD 1.2 and with other 4.4BSD-based systems
is a good idea, and something NetBSD should at least aim for. If
people have gone to the effort of porting third-party drivers to
NetBSD, the least we can do is ease the pain of supporting both 1.2
and current in such drivers.