diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-10-16 22:24:48 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-10-16 22:24:48 +0000 |
commit | 2f3dfc19e6add0df7e92d3e9a2f1bbd3fd3ba725 (patch) | |
tree | 859cdb3a9cbbd7c646347daf41e4f1b21297fd07 /packages/openbgpd/openbgpd_neighbors.xml | |
parent | 9df6fa122363498a3200f33981ad6e075107a940 (diff) | |
download | pfsense-packages-2f3dfc19e6add0df7e92d3e9a2f1bbd3fd3ba725.tar.gz pfsense-packages-2f3dfc19e6add0df7e92d3e9a2f1bbd3fd3ba725.tar.bz2 pfsense-packages-2f3dfc19e6add0df7e92d3e9a2f1bbd3fd3ba725.zip |
Adding OpenBGPD package
TODO: Grey out neighbor parameters for certain fields
TODO: Do not allow a group to be deleted when being referenced by a neighbor
Diffstat (limited to 'packages/openbgpd/openbgpd_neighbors.xml')
-rw-r--r-- | packages/openbgpd/openbgpd_neighbors.xml | 163 |
1 files changed, 163 insertions, 0 deletions
diff --git a/packages/openbgpd/openbgpd_neighbors.xml b/packages/openbgpd/openbgpd_neighbors.xml new file mode 100644 index 00000000..d9653d57 --- /dev/null +++ b/packages/openbgpd/openbgpd_neighbors.xml @@ -0,0 +1,163 @@ +<?xml version="1.0" encoding="utf-8" ?> +<!DOCTYPE packagegui SYSTEM "../schema/packages.dtd"> +<?xml-stylesheet type="text/xsl" href="../xsl/package.xsl"?> +<packagegui> + <copyright> + <![CDATA[ +/* $Id$ */ +/* ========================================================================== */ +/* + openbgpd_neighbors.xml + part of pfSense (http://www.pfSense.com) + Copyright (C) 2007 Scott Ullrich (sullrich@gmail.com) + All rights reserved. + */ +/* ========================================================================== */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + */ +/* ========================================================================== */ + ]]> + </copyright> + <description>Describe your package here</description> + <requirements>Describe your package requirements here</requirements> + <faq>Currently there are no FAQ items provided.</faq> + <name>OpenBGPDNeighbors</name> + <version>1</version> + <title>Services: OpenBGPD Neighbors</title> + <include_file>/usr/local/pkg/openbgpd.inc</include_file> + <tabs> + <tab> + <text>Settings</text> + <url>/pkg_edit.php?xml=openbgpd.xml&id=0</url> + </tab> + <tab> + <text>Neighbors</text> + <url>/pkg.php?xml=openbgpd_neighbors.xml</url> + <active/> + </tab> + <tab> + <text>Groups</text> + <url>/pkg.php?xml=openbgpd_groups.xml</url> + </tab> + <tab> + <text>Status</text> + <url>/openbgpd_status.php</url> + </tab> + </tabs> + <adddeleteeditpagefields> + <columnitem> + <fielddescr>Description</fielddescr> + <fieldname>descr</fieldname> + </columnitem> + <columnitem> + <fielddescr>Neighbor</fielddescr> + <fieldname>neighbor</fieldname> + </columnitem> + </adddeleteeditpagefields> + <fields> + <field> + <fielddescr>Description</fielddescr> + <fieldname>descr</fieldname> + <description></description> + <type>input</type> + <size>80</size> + </field> + <field> + <fielddescr>Neighbor</fielddescr> + <fieldname>neighbor</fieldname> + <description>Neighbor IP address</description> + <type>input</type> + <size>25</size> + </field> + <field> + <fielddescr>Group</fielddescr> + <fieldname>groupname</fieldname> + <description>Add neighbor to BGP group.</description> + <type>select</type> + <options> + <option> + <name>NAME</name> + <value>VALUE</value> + </option> + </options> + </field> + <field> + <fielddescr>none</fielddescr> + <fieldname>none</fieldname> + <type>rowhelper</type> + <rowhelper> + <rowhelperfield> + <fielddescr>Paramaters</fielddescr> + <fieldname>paramaters</fieldname> + <description>Neighbor settings</description> + <type>select</type> + <options> + <option><name>Announce all</name><value>announce all</value></option> + <option><name>Announce none</name><value>announce none</value></option> + <option><name>Announce self</name><value>announce self</value></option> + <option><name>Announce default-route</name><value>announce default-route</value></option> + <option><name>Metric</name><value>set metric</value></option> + <option><name>Softreconfig in yes</name><value>softreconfig in yes</value></option> + </options> + </rowhelperfield> + <rowhelperfield> + <fielddescr>Value</fielddescr> + <fieldname>parmvalue</fieldname> + <description>When the WAN MS ping time is surpassed, item will failover to next host</description> + <type>input</type> + <size>15</size> + </rowhelperfield> + </rowhelper> + </field> + + </fields> + <custom_php_command_before_form> + $newoptions = array(); + $new_groups = array(); + foreach($config['installedpackages']['openbgpdgroups']['config'] as $item) + $new_groups[] = $item['name']; + $counter = 0; + foreach($new_groups as $group) { + $newoptions['option'][$counter]['name'] = $group; + $newoptions['option'][$counter]['value'] = $group; + $counter++; + } + $newoptions['option'][$counter]['name'] = ""; + $newoptions['option'][$counter]['value'] = ""; + $pkg['fields']['field'][2]['options'] = $newoptions; + $counter = 0; + foreach($pkg['fields']['field'] as $field) { + if($field['name'] == "group") { + $foundgroupid = $counter; + echo "found it: $counter"; + } + $counter++; + } + + </custom_php_command_before_form> + <custom_php_deinstall_command> + </custom_php_deinstall_command> + <custom_php_resync_config_command> + openbgpd_install_conf(); + </custom_php_resync_config_command> +</packagegui> |