[Xorp-hackers] Counter and version
Kristian Larsson
kristian@juniks.net
Sun, 4 Sep 2005 22:15:30 +0200
On Sun, Sep 04, 2005 at 11:14:55AM -0700, Pavlin Radoslavov wrote:
> > I would like to know if the version of
> > XORP is defined anywhere in the source
> > code?
>
> Yes. It is defined inside "config.h":
>
> /* Version number of package */
> #define VERSION "1.1"
>
> Also, file "VERSION" in the top-level XORP directory contains the
> string with the version.
>
> > And is there some builtin clock in XORP?
> > I would need a "cron" like function so that
> > functions could be scheduled within the
> > rtrmgr.
>
> Class EventLoop (libxorp/eventloop.hh) contains a number of methods
> for creating one-time and periodic timers. In the callback for each
> timer you can specify the function or method to be called.
>
> > BTW, I just saw a bug report regarding
> > set/create/edit (#172) and would once again
> > like bring up the discussion. Is it really
> > necessary to have the create command?
> > IMHO create just complicates things as it's
> > functionality could as well be integrated
> > into the 'set' command.
> > Why not merge the two?
>
> The purpose of "create" is to create parts of the configuration that
> don't exist (e.g., "create protocols bgp"), while the purpose of
> "set" it to assign values to (leaf) nodes that are suppose to
> contain values (e.g., "set protocols bgp local-as 1234").
yupp.
>
> Strictly speaking, it is possible to merge the functionality of
> "create" into the "set" command, but by doing so we are going to
> overload the "set" command itself. Then it could be argued that such
> overload complicates things by merging two different functionalities
> into a single command. Furthermore, for someone who is not familiar
> with the exact internal structure of the configuration tree a
> command like "set protocols bgp" could mean:
> Set the value of node "protocols" to "bgp".
The reason I'm asking for this functionality is
that I don't want to bother whether a node is
created or not. Perhaps this is because I've
worked with Juniper before and they lack the
create command, perhaps it is just pure laziness.
I actually just read through the discussion last
time we had it, and you (Pavlin) suggested that
the create functionality could be incorporated
into the set command but keep the create command
as to avoid confusion.
"On the other hand, if we keep "create" as is and
we change the behavior of "set" so it also creates
the intermediate nodes, is this an acceptable
solution for you?"
- Yes, indeed.
> Opening the door for such (mis)interpretations could create more
> confusions rather than simplifying things.
Confusion is good. If everybody understood Cisco I
wouldn't have a job ;)
Seriously though, presumably most people using
XORP are not "amatuers" but proffesionals who work
with routing in their day-to-day job.
Given the choice I beleive most would take the
"shortcut" by using just the set command as this
speeds up things and by keeping the create command
as you suggested we keep it simple for our current
userbase as well as users new to XORP.
Regards,
Kristian