[Xorp-hackers] Counter and version

Pavlin Radoslavov pavlin@icir.org
Sun, 04 Sep 2005 11:14:55 -0700


> 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").

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".

Opening the door for such (mis)interpretations could create more
confusions rather than simplifying things.

Pavlin