[quagga-dev 4138] Re: example libzebra zclient utility

Paul Jakma paul at clubi.ie
Sun May 14 15:15:47 BST 2006


On Sun, 14 May 2006, Andrew J. Schorr wrote:

> That's pretty neat.

Tis. I want to add 'add a static route' and 'add an IP address' too. 
And maybe use getsubopt for the interface name, maybe allow regexes 
or globs.

  -i foo0,!vni*

type of thing (???).

It's for someone who asked for example code, with the possible 
intention of implementing a ifplugd-alike for Quagga. (Which 
hopefully they'll get somewhere with. :) ).

> But I'm afraid I can't think of a better name.

My limited imagination:

  quagga
  quaggacmd
  quaggatool
  qtool (too vague i think)

Any others? (Or pick one)

Also, I'd like to add a completion message to zserv, something like:

  ZEBRA_COMMAND_COMPLETE
  <command which completed>
  <optional command specific completion data>

so that I can get rid of the timer in quagga.c, thoughts/objections?

> But regarding the str2route_type function: that kind of logic seems 
> to appear in a number of places.  Wouldn't it be good to have a 
> single library function (perhaps expanding on the infrastructure I 
> created in lib/log.c:zroute_lookup()) that provides a canonical way 
> to do this?

Ah, yes.

> Also, for the purpose of entering those DEFUN command definitions,
> shouldn't we define a header string:
>
> #define QUAGGA_ROUTE_TYPES	\
> 	"bgp|connected|isis|kernel|ospf6|ripng|static"
>
> to avoid duplicating this text in every command definition (and 
> having to patch each command every time a new routing protocol is 
> added)?

Ah, yes, indeed. E.g. see:

   http://do.bundessicherheitsministerium.de/quagga-20060423-olsr.diff

regards,
-- 
Paul Jakma	paul at clubi.ie	paul at jakma.org	Key ID: 64A2FF6A
Fortune:
World War Three can be averted by adherence to a strictly enforced dress code!



More information about the Quagga-dev mailing list