Hi folks,
I've been playing with this idea for quite a while now, here's
a quick proposal for an XML configuration file (/etc/ax25/ax25config.xml).
What do you think?
<?xml version="1.0" standalone="no" encoding="iso-8859-15">
<!DOCTYPE ax25config SYSTEM "file:///usr/share/ax25/ax25config-0.0.dtd">
<ax25config>
<!-- Please note that many parameters will be optional -- the ones
that are not is up to discussion. This is just an outline for
the general idea.
This file is supposed to be read by:
- a startup-script at system boot, I guess perl or python
is needed, I haven't seen an XML parser for bash yet.
- ax25-lib
- authoring tools
It substitutes /etc/ax25/{ax,nr,rs}ports and hopefully makes it
easier to maintain the parameter settings and routing tables for
the various protocols. Extensions can be easily added to the
(to be written) DTD. The XML parser should barf, but not bail-out,
when it encounters unknown tags. It should (at least) complain
loudly about otherwise malformed data.
I haven't thought too long about the "attributes" vs. "elements"
question.
Joerg Reuter DL1BKE <[EMAIL PROTECTED]>
2000-04-26
-->
<!-- every interface has exactly one "port" section -->
<port device="ax0">
<!-- we can still have symbolic names if we want to -->
<name>1k2</name>
<!-- callsign for this interface -->
<callsign>dl1bke-10</callsign>
<!-- description for this interface -->
<description>1200 baud AFSK TNC</description>
<!-- driver specific information -->
<driver name="kiss">
<tty-device>/dev/ttyS0</tty-device>
<tty-speed>38400</tty-speed>
</driver>
<!-- MODEM specific information -->
<modem>
<rxspeed>1200</rxspeed>
<txspeed>1200</txspeed>
<hdlc-mode>nrzi</hdlc-mode>
<txdelay>160</txdelay>
<txtail>20</txtail>
</modem>
<!-- Media Access Control parameter -->
<mac>
<mode>dama-slave</mode>
<p-persistence>40</p-persistence>
<slottime>100</slottime>
<dama-timeout>600</dama-timeout>
</mac>
<!-- AX.25 parameter -->
<ax25>
<max-paclen>256</max-paclen>
<max-window>2</max-window>
<t1>30</t1>
<t2>200</t2>
<t3>300</t3>
<idle>900</idle>
<max-retry-count>15</max-retry-count>
<!-- etc -->
</ax25>
<!-- IP parameter -->
<ip>
<address>44.130.20.106</address>
<netmask>255.255.255.0</netmask>
<broadcast>44.130.20.255</broadcast>
<default-mode>vc</default-mode>
<!-- etc -->
<routes>
<arp ip="44.130.20.50">
<callsign>db0pra-10</callsign>
<mode>vc</mode>
</arp>
<arp ip="44.130.20.78">
<callsign>db0bm-8</callsign>
<mode>vc</mode>
</arp>
<routes>
</ip>
<!-- NET/ROM on this port -->
<netrom device="nr0">
<name>netrom</name>
<alias>#TEST</alias>
<max-paclen>236</max-paclen>
<description>NET/ROM port on LAP</description>
<default-quality>200</default-quality>
<ip>
<!-- see above -->
</ip>
<routes>
<quality neighbour="db0ii">150</quality>
<quality neighbour="db0eam">60</quality>
</routes>
</netrom>
<!-- Rose, too -->
<rose device="rs0">
<name>rose</name>
<address>...</address>
<description>Rose Port</rose>
<ip><!-- see above --></ip>
<routes>
<!-- ?? -->
</routes>
</rose>
<!-- vanilla AX.25 -->
<textmode>
<connect-mode>...</connect-mode>
<user-policy>restricted</user-policy>
<user-list>
<user name="dl1bke">
<!-- I know, currently: one user, one callsign -->
<callsign>dl1bke-1</callsign>
<callsign>dl1bke-5</callsign>
<callsign>dl0tha</callsign>
</user>
</user-list>
</textmode>
<!-- AX.25 targets -->
<routes>
<path>db0ach-10</path>
<path>db0bm-8 db0ach</path>
<path>db0pra-10 db0ach</path>
</routes>
</port>
<!-- we can have many ports... -->
<port>...</port>
<!-- what will the startup script run? -->
<start-ax25paramd/>
<start-ax25routed/>
<start-netromd/>
<start-ax25d/>
</ax25config>
Joerg Reuter http://poboxes.com/jreuter/
And I make my way to where the warm scent of soil fills the evening air.
Everything is waiting quietly out there.... (Anne Clark)
PGP signature