<packagegui>
	<name>OSPFd</name>
	<version>0.1</version>
	<title>Services: OSPFd</title>
	<include_file>/usr/local/pkg/openospfd.inc</include_file>
	<aftersaveredirect>pkg_edit.php?xml=openospfd.xml&amp;id=0</aftersaveredirect>
	<additional_files_needed>
                <prefix>/usr/local/pkg/</prefix>
                <chmod>077</chmod>
                <item>http://www.pfsense.com/packages/config/openospfd/openospfd.inc</item>
        </additional_files_needed>
	<menu>
		<name>OSPFd</name>
		<tooltiptext>Modify ospfd settings.</tooltiptext>
		<section>Services</section>
		<configfile>openospfd.xml</configfile>
		<url>/pkg_edit.php?xml=openospfd.xml&amp;id=0</url>
	</menu>
	<service>
		<name>ospfd</name>
		<rcfile>ospfd.sh</rcfile>
		<executable>ospfd</executable>
	</service>
	<fields>
		<field>
			<fielddescr>Router ID</fielddescr>
			<fieldname>routerid</fieldname>
			<description>Specify the Router ID.</description>
			<type>input</type>
		</field>
		<field>
			<fielddescr>Area</fielddescr>
			<fieldname>area</fieldname>
			<description>OSPF area for this instance of OSPFd.</description>
			<type>input</type>
			<required/>
		</field>
                <field>
                        <fielddescr>Update FIB (Routing table)</fielddescr>
                        <fieldname>updatefib</fieldname>
                        <description>Enables the updating of the host routing table</description>
                        <type>checkbox</type>
                </field>
                <field>
                        <fielddescr>Listening Interface</fielddescr>
                        <fieldname>interface</fieldname>
                        <description>Enter the desired participating interface here.</description>
                        <type>interfaces_selection</type>
			<required/>
                </field>
		<field>
			<fielddescr>Metric</fielddescr>
			<fieldname>metric</fieldname>
			<description>Metric for this OSPF interface (leave blank for default).</description>
			<type>input</type>
                </field>
                <field>
                        <fielddescr>Enable MD5 password for this OSPFd interface (default no)</fielddescr>
                        <fieldname>md5password</fieldname>
                        <description>Enables the use of an MD5 password to on this instance</description>
                        <type>checkbox</type>
                </field>
		<field>
			<fielddescr>Password</fielddescr>
			<fieldname>password</fieldname>
			<description>Password for this OSPF interface.</description>
			<type>input</type>
                </field>
                <field>
                        <fielddescr>Redistribute connected subnets</fielddescr>
                        <fieldname>redistributeconnectedsubnets</fieldname>
                        <description>Enables the redistribution of connected networks (Default no)</description>
                        <type>checkbox</type>
                </field>
                <field>
                        <fielddescr>Redistribute default route</fielddescr>
                        <fieldname>redistributedefaultroute</fieldname>
                        <description>Enables the redistribution of a default route to this device (Default no)</description>
                        <type>checkbox</type>
                </field>
		<field>
			<fielddescr>Router Priority</fielddescr>
			<fieldname>routerpriorityelections</fieldname>
			<description>Router priority when participating in elections for DR (Default 1) Valid range is 0-255.  0 will cause the router to not participate in election.</description>
			<type>input</type>
                </field>
		<field>
			<fielddescr>Hello Interval</fielddescr>
			<fieldname>hellointervalinseconds</fieldname>
			<description>Hello Interval this OSPF interface in seconds (Default 10).</description>
			<type>input</type>
                </field>
		<field>
			<fielddescr>Retransmit Interval</fielddescr>
			<fieldname>retransmitinterval</fieldname>
			<description>Retransmit Interval this OSPF interface in seconds (Default 5).</description>
			<type>input</type>
                </field>
		<field>
			<fielddescr>Dead Timer</fielddescr>
			<fieldname>deadtimer</fieldname>
			<description>Dead Timer for this OSPF interface in seconds (Default 40).</description>
			<type>input</type>
                </field>
                <field>
                        <fielddescr>Redistribute static</fielddescr>
                        <fieldname>resdistributestatic</fieldname>
                        <description>Enables the redistribution of static routes</description>
                        <type>checkbox</type>
                </field>
	</fields>
	<custom_php_resync_config_command>
                ospfd_install_conf();
        </custom_php_resync_config_command>
	<custom_php_validation_command>
		ospfd_validate_input();
	</custom_php_validation_command>
</packagegui>