On Wed, May 27, 2015 at 09:56:03AM +0300, Timo Teras wrote: > On Wed, 27 May 2015 08:49:02 +0200 > David Lamparter <da...@opensourcerouting.org> wrote: > > > On Tue, May 26, 2015 at 10:27:54PM +0100, Paul Jakma wrote: > > > On Tue, 26 May 2015, David Lamparter wrote: > > > > The simple choice is using it as-is :) > > > > > > It's not that hard, I'll send something tomorrow. > > > > What'd really help is a if_gethwaddr() function in lib/if.c, because > > in isisd/isis_circuit.c:602, zebra/interface.c:757, zebra/rtadv.c:318 > > we each have pretty similar code... > > Well, why it should be a function? We should have struct interface > contain always the same datatypes (regardless of OS / configure > checks). Now it is not so with the hw addr. That way all those places > can just memcpy(). Of course adding functions makes sense if we want to > make the core structs opaque. Is that something we want to do also?
Hm, I was under the misconception that isis_dlpi.c uses if->sdl. I just checked and it doesn't. (Had there been a need to push sdl over zserv, I would've preferred not pushing different instances of the same information; that only leads to confusion and bug opportunities. Thus the if_gethwaddr() function. But we don't seem to need if->sdl outside zebra.) The only place that reads if->sdl seems to be zebra/kernel_socket.c; the problem this boils down to is that struct interface is the same whether we're in zebra, or some daemon. Seems we just need to remove the #else and declare hw_* to be the hw-agnostic fields (with some enum for hw_type - I assume that's what Paul is planning to send). -David _______________________________________________ Quagga-dev mailing list Quagga-dev@lists.quagga.net https://lists.quagga.net/mailman/listinfo/quagga-dev