[olsr-dev] New config file format

Andreas Tønnesen (spam-protected)
Sun Oct 10 18:07:40 CEST 2004


Ok ok - this was merely a suggestion from my part :-)
The reason I wanted to go for XML was the availablillity of already 
implemented parsers as a new configfile format should be more oriented 
towards per-NIC configuration. And BTW the expat code would be _part_ of 
the olsrd binary not dynamically linked(adds about 60Kb to a stripped 
binary) - that was also a requirement of mine since I like to keep olsrd 
dependent of as few external libs as possible.
But since the general answers seem to conclude that the only good thing 
about using XML for this task is the buzzword-effect, I'll move away 
from the idea and implement a new configparser one of the days with 
25-hours ;-)

Thanks for your feedback both on and off list all! (Especially for your 
thorough reply Bernard).

- Andreas


Andreas Tønnesen wrote:
> Hi all,
> 
> I have planned to rewrite the config file parser/format for olsrd for 
> some time. A new format should include the possibility to set parameters 
>  like emission intervals per network interface.
> I think I will go for a solution using XML. This should give a lot of 
> flexibility - as an example it should be a lot easier writing 
> applications that parses and changes the config file since all elements 
> should contain a textual description.
> For parsing I think I will include code from the expat(expat.sf.net) 
> project.
> However, I am not very much into XML and its design principals. I have 
> included a preliminary config file and would appreciate feedback on 
> things that could be done better.
> 
> - Andreas
> 
> 
> ------------------------------------------------------------------------
> 
> <?xml version="1.0" encoding="ISO-8859-1"?>
> 
> <olsrd-config>
> 
> <description>
> ################################################ 
> # UniK OLSR daemon config file                 #
> #                                              #
> # This file was shipped with olsrd 0.4.8       #
> ################################################
> </description>
> 
> 
> <debuglevel>
> <description>
> Debug level(0-9)
> If set to 0 the daemon runs in the background 
> </description>
> <value>1</value>
> </debuglevel>
> 
> <ipversion>
> <description>
> IP version to use (4 or 6)
> </description>
> <value>4</value>
> </ipversion>
> 
> <pollrate>
> <description>
> Polling rate in seconds(float). 
> Auto uses default value 0.1 sec
> </description>
> auto
> </pollrate>
> 
> <hna4>
> <description>
> HNA IPv4 routes
> </description>
> <entry net="0.0.0.0" netmask="0.0.0.0" />
> <entry net="15.15.0.0" netmask="255.255.255.0" />
> </hna4>
> 
> <hna6>
> <description>
> HNA IPv6 routes
> </description>
> <entry net="::" prefix-len="0" />
> <entry net="fec0:2200:106::" prefix-len="48" />
> </hna6>
> 
> <halt-on-no-ifs>
> <description>
> Should olsrd keep on running even if there are
> no interfaces available? This is a good idea
> for a PCMCIA/USB hotswap environment.
> "yes" OR "no"
> </description>
> <value>no</value>
> </halt-on-no-ifs>
> 
> <plugins>
> <description>
> Olsrd plugins to load
> name must either be the absolute path to the file
> or the loader will use the following scheme:
> - Try the paths in the LD_LIBRARY_PATH 
>   environment variable.
> - The list of libraries cached in /etc/ld.so.cache
> - /lib, followed by /usr/lib
> </description>
> <plugin name="olsrd_secure.so.0.3" />
> <plugin name="olsrd_dyn_gw.so.0.1" />
> <plugin name="olsrd_power.so.0.1" />
> </plugins>
> 
> <tosvalue>
> <description>
> TOS(type of service) value for
> the IP header of control traffic.
> auto is 16
> </description>
> <value>auto</value>
> </tosvalue>
> 
> 
> <willingness>
> <description>
> The fixed willingness to use(0-7)
> or "auto" to set willingness dynammically
> based on battery/power status
> </description>
> <value>auto</value>
> </willingness>
> 
> 
> <ipc-connect>
> <description>
> Allow processes like the GUI front-end
> to connect to the daemon. 'yes' or 'no'
> </description>
> <value>no</value>
> </ipc-connect>
> 
> 
> <hysteresis enabled="yes">
> <description>
> Hysteresis adds more robustness to the
> link sensing but delays neighbor registration.
> Used by default. 'yes' or 'no'
> 
> Do not alter these settings unless you know 
> what you are doing!
> </description>
> 
> <scaling>
> <description>
> </description>
> <value>auto</value>
> </scaling>
> <threshold-high>
> <description>
> Must be higher than threshold low!
> </description>
> <value>auto</value>
> </threshold-high>
> <threshold-low>
> <description>
> Must be lower than threshold high!
> </description>
> <value>auto</value>
> </threshold-low>
> </hysteresis>
> 
> 
> <tc-redundancy>
> <description>
> TC redundancy
> Specifies how much neighbor info should
> be sent in TC messages
> Possible values are:
> 0 - only send MPR selectors
> 1 - send MPR selectors and MPRs
> 2 - send all neighbors
> auto - defaults to 0
> </description>
> <value>auto</value>
> </tc-redundancy>
> 
> <mpr-coverage>
> <description>
> MPR redundancy
> Specifies how many MPRs a node should
> try select to reach every 2 hop neighbor
> Can be set to any integer >0
> auto - defaults to 1
> </description>
> <value>auto</value>
> </mpr-coverage>
> 
> 
> 
> <network-interfaces>
> 
> <description>
> This section contains settings for the network interfaces
> olsrd is to run on.
> </description>
> 
> <interface name="eth0">
> 
> <ipv4-broadcast>
> <description>
> IPv4 broadcast address to use. The
> one usefull example would be 255.255.255.255
> 'auto' uses the broadcastaddress
> the NIC is configured with
> </description>
> <value>auto</value>
> </ipv4-broadcast>
> 
> <ipv6-addrtype>
> <description>
> IPv6 address scope to use.
> Must be 'site-local' or 'global'
> </description>
> <value>site-local</value>
> </ipv6-addrtype>
> 
> <ipv6-site-local-multicast>
> <description>
> IPv6 multicast address to use when
> using site-local addresses.
> 'auto' uses the default ff05::15
> </description>
> <value>auto</value>
> </ipv6-site-local-multicast>
> 
> <ipv6-global-multicast>
> <description>
> IPv6 multicast address to use when
> using global addresses
> 'auto' uses the default ff0e::1
> </description>
> <value>auto</value>
> </ipv6-global-multicast>
> 
> <messages>
> <description>
> Message emission and validity time definitions
> for this interface. Every standard message type
> is set up with a emission interval - and a validity
> time which is a multiplier of the emission interval.
> If setting interval to 2.0 and ultiplier to 3 the
> announced validity time will be 6.0 (3 * 2.0)
> </description>
> 
> <hello>
> <description>
> HELLO messages are used for neighbor/link sensing,
> MPR calculation and more.
> </description>
> <interval>
> <description>
> </description>
> <value>auto</value>
> </interval>
> <multi>
> <description>
> </description>
> <value>auto</value>
> </multi>
> </hello>
> 
> <tc>
> <description>
> TC messages are the link-state information each
> MPR selected node floods throughout the network.
> </description>
> <interval>
> <description>
> </description>
> <value>auto</value>
> </interval>
> <multi>
> <description>
> </description>
> <value>auto</value>
> </multi>
> </tc>
> 
> <!--
> TO BE REMOVED
> 
> # HELLO interval for sending
> # interval/holding time for wired
> # links. This is a multiplier of
> # the HELLOINT value. Auto is 2
> 
> NWHELLOINT	auto
> 
> # HELLO hold time for wired links,
> # as a multiplier of the NWHELLOINT. 
> # Auto is NWHELLOINT * 3.
> 
> NWHELLOMULTI	auto
> -->
> 
> <mid>
> <description>
> MID messages announces multi-homed nodes.
> </description>
> <interval>
> <description>
> </description>
> <value>auto</value>
> </interval>
> <multi>
> <description>
> </description>
> <value>auto</value>
> </multi>
> </mid>
> 
> <hna>
> <description>
> HNA messages announces nodes that can act like
> gateways to other networks.
> </description>
> <interval>
> <description>
> </description>
> <value>auto</value>
> </interval>
> <multi>
> <description>
> </description>
> <value>auto</value>
> </multi>
> </hna>
> 
> </messages>
> 
> </interface>
> 
> </network-interfaces>
> 
> </olsrd-config>
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> olsr-dev mailing list
> (spam-protected)
> https://www.olsr.org/mailman/listinfo/olsr-dev

-- 
Andreas Tønnesen
http://www.olsr.org



More information about the Olsr-dev mailing list