[quagga-dev 3888] Re: tiny zserv problem on solaris

Andrew J. Schorr aschorr at telemetry-investments.com
Thu Dec 8 14:22:19 GMT 2005


On Thu, Dec 08, 2005 at 01:10:57PM +0000, Paul Jakma wrote:
> We could abstract all the flags, but then we probably have to export 
> /both/ the abstracted zebra flags and the raw kernel flags. If we 
> don't export the kernel flags across zserv, then obviously clients 
> which are interested in kernel flags which zebra has not yet 
> abstracted are inconvenienced.

I guess I don't understand how that could happen (that a client could
be interested in a flag that has not yet been abstracted).  By construction,
the clients will have access only to abstracted flags.

Taking a look at the actual code, we really don't use so many flags at
the moment:

find . -name "*.c" -print | xargs grep IFF_ |\
egrep -v 'IFF_OUT_LOG|IFF_OUT_VTY' |\
gawk '{s = $0; while (match(s,/IFF_[A-Z0-9_]*/) > 0) {found[substr(s,RSTART,RLENGTH)] = ""; s = substr(s,RSTART+RLENGTH)}} END {for (flag in found) print flag}'

gives:

IFF_MULTICAST
IFF_LOOPBACK
IFF_ALLMULTI  /* used only in zebra/irdp_interface.c:irdp_if_start */
IFF_RUNNING
IFF_WHATEVER   /* this is just a comment */
IFF_IPV4   /* used only in zebra/if_ioctl_solaris.c & zebra/ioctl_solaris.c */
IFF_IPV6   /* used only in zebra/if_ioctl_solaris.c & zebra/ioctl_solaris.c */
IFF_NOXMIT  /* used only in lib/if.c:if_is_loopback */
IFF_UP
IFF_VIRTUAL  /* used only in lib/if.c:if_is_loopback */
IFF_POINTOPOINT
IFF_BROADCAST

So I would contend that we're dealing with a very finite set of flags here,
and that it would not be so hard to define IFZ_* flags and move forward.

Given that the IFF_IPV4 and IFF_IPV6 flags are used only inside the zebra
daemon in solaris-specific code, this suggests another alternative: inside the
zebra daemon code, carry around 2 sets of flags (kernel flags and abstracted
zebra flags), but do not disseminate the kernel flags to the client daemons
(i.e. the client daemons receive only the abstracted flags and must rely only
upon them).

So basically, the major flags we care about are: loopback, multicast,
running, up, pointopoint, and broadcast.  Am I missing anything?

Regards,
Andy



More information about the Quagga-dev mailing list