summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md5
-rw-r--r--auth/authentication.php2
-rw-r--r--config.php.example24
-rw-r--r--docs/configuration.md7
-rw-r--r--docs/index.md5
-rw-r--r--libs/phpseclib-1.0.7/Crypt/AES.php (renamed from libs/phpseclib-1.0.6/Crypt/AES.php)0
-rw-r--r--libs/phpseclib-1.0.7/Crypt/Base.php (renamed from libs/phpseclib-1.0.6/Crypt/Base.php)0
-rw-r--r--libs/phpseclib-1.0.7/Crypt/Blowfish.php (renamed from libs/phpseclib-1.0.6/Crypt/Blowfish.php)3
-rw-r--r--libs/phpseclib-1.0.7/Crypt/DES.php (renamed from libs/phpseclib-1.0.6/Crypt/DES.php)0
-rw-r--r--libs/phpseclib-1.0.7/Crypt/Hash.php (renamed from libs/phpseclib-1.0.6/Crypt/Hash.php)0
-rw-r--r--libs/phpseclib-1.0.7/Crypt/RC2.php (renamed from libs/phpseclib-1.0.6/Crypt/RC2.php)0
-rw-r--r--libs/phpseclib-1.0.7/Crypt/RC4.php (renamed from libs/phpseclib-1.0.6/Crypt/RC4.php)18
-rw-r--r--libs/phpseclib-1.0.7/Crypt/RSA.php (renamed from libs/phpseclib-1.0.6/Crypt/RSA.php)9
-rw-r--r--libs/phpseclib-1.0.7/Crypt/Random.php (renamed from libs/phpseclib-1.0.6/Crypt/Random.php)4
-rw-r--r--libs/phpseclib-1.0.7/Crypt/Rijndael.php (renamed from libs/phpseclib-1.0.6/Crypt/Rijndael.php)0
-rw-r--r--libs/phpseclib-1.0.7/Crypt/TripleDES.php (renamed from libs/phpseclib-1.0.6/Crypt/TripleDES.php)0
-rw-r--r--libs/phpseclib-1.0.7/Crypt/Twofish.php (renamed from libs/phpseclib-1.0.6/Crypt/Twofish.php)0
-rw-r--r--libs/phpseclib-1.0.7/File/ANSI.php (renamed from libs/phpseclib-1.0.6/File/ANSI.php)0
-rw-r--r--libs/phpseclib-1.0.7/File/ASN1.php (renamed from libs/phpseclib-1.0.6/File/ASN1.php)0
-rw-r--r--libs/phpseclib-1.0.7/File/X509.php (renamed from libs/phpseclib-1.0.6/File/X509.php)2
-rw-r--r--libs/phpseclib-1.0.7/Math/BigInteger.php (renamed from libs/phpseclib-1.0.6/Math/BigInteger.php)0
-rw-r--r--libs/phpseclib-1.0.7/Net/SCP.php (renamed from libs/phpseclib-1.0.6/Net/SCP.php)0
-rw-r--r--libs/phpseclib-1.0.7/Net/SFTP.php (renamed from libs/phpseclib-1.0.6/Net/SFTP.php)0
-rw-r--r--libs/phpseclib-1.0.7/Net/SFTP/Stream.php (renamed from libs/phpseclib-1.0.6/Net/SFTP/Stream.php)0
-rw-r--r--libs/phpseclib-1.0.7/Net/SSH1.php (renamed from libs/phpseclib-1.0.6/Net/SSH1.php)0
-rw-r--r--libs/phpseclib-1.0.7/Net/SSH2.php (renamed from libs/phpseclib-1.0.6/Net/SSH2.php)0
-rw-r--r--libs/phpseclib-1.0.7/System/SSH/Agent.php (renamed from libs/phpseclib-1.0.6/System/SSH/Agent.php)0
-rw-r--r--libs/phpseclib-1.0.7/System/SSH_Agent.php (renamed from libs/phpseclib-1.0.6/System/SSH_Agent.php)0
-rw-r--r--libs/phpseclib-1.0.7/bootstrap.php (renamed from libs/phpseclib-1.0.6/bootstrap.php)0
-rw-r--r--libs/phpseclib-1.0.7/openssl.cnf (renamed from libs/phpseclib-1.0.6/openssl.cnf)0
-rw-r--r--routers/openbgpd.php151
-rw-r--r--routers/router.php4
32 files changed, 222 insertions, 12 deletions
diff --git a/README.md b/README.md
index 1d26005..7c373f1 100644
--- a/README.md
+++ b/README.md
@@ -19,9 +19,10 @@ execute some commands on routers. The output is sent back to the user.
For now this looking glass is quite simple. Here you have some features:
* Interface using Javascript and AJAX calls (needs a decent browser)
- * Support of BIRD, Cisco (IOS and IOS-XR), Juniper and Quagga routers
+ * Support of BIRD, Cisco (IOS and IOS-XR), Juniper, OpenBGPd and Quagga
+ routers
* Support of Telnet and SSH connection to routers using password
- authentication and SSH keys.
+ authentication and SSH keys
* Configurable list of routers
* Tweakable interface (title, logo, footer, elements order)
* Log all commands in a file
diff --git a/auth/authentication.php b/auth/authentication.php
index e460724..ed8e8d4 100644
--- a/auth/authentication.php
+++ b/auth/authentication.php
@@ -19,7 +19,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-ini_set('include_path', ini_get('include_path').':./libs/phpseclib-1.0.6');
+ini_set('include_path', ini_get('include_path').':./libs/phpseclib-1.0.7');
require_once('ssh.php');
require_once('telnet.php');
diff --git a/config.php.example b/config.php.example
index 107ff1d..dd514f0 100644
--- a/config.php.example
+++ b/config.php.example
@@ -77,4 +77,28 @@ $config['routers']['router3']['source-interface-id'] = '192.168.1.1';
// The router description to be displayed in the router list
$config['routers']['router3']['desc'] = 'Example\'s Router 3';
+// Router based on OpenBGPd
+// The hostname or the IP address
+$config['routers']['router4']['host'] = 'r4.example.net';
+// The user to use to connect to the router
+$config['routers']['router4']['user'] = 'openbgpduser';
+// The password of the given user
+$config['routers']['router4']['pass'] = 'openbgpduserpassword';
+// The authentication mecanism to use (can be ssh-password or ssh-key)
+$config['routers']['router4']['auth'] = 'ssh-password';
+// The router type (can only be openbgpd)
+$config['routers']['router4']['type'] = 'openbgpd';
+// The router source address to be used
+$config['routers']['router4']['source-interface-id'] = '192.168.1.1';
+// The router description to be displayed in the router list
+$config['routers']['router4']['desc'] = 'OpenBGPd Router';
+
+// If running on *BSD, disable '-A' which is non-existent
+$config['tools']['ping_options'] = '-c 5';
+// If running on *BSD, disable '-N' which is non-existent
+$config['tools']['traceroute_options'] = '-A -q1 -w2 -m15';
+// If running on *BSD, there is no '-4' or '-6'
+$config['tools']['traceroute6'] = 'traceroute6';
+$config['tools']['traceroute4'] = 'traceroute';
+
// End of config.php
diff --git a/docs/configuration.md b/docs/configuration.md
index 7b7a543..4840ade 100644
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@ -117,15 +117,16 @@ interact with it.
```php
$config['routers']['router1']['type'] = 'juniper';
```
-The router type can be Juniper, Cisco (IOS or IOS-XR), Quagga or BIRD. You can
-take a look at the specific documentation for your router. Possible values
-are:
+The router type can be Juniper, Cisco (IOS or IOS-XR), Quagga, BIRD or
+OpenBGPd. You can take a look at the specific documentation for your router.
+Possible values are:
* juniper **or** junos
* cisco **or** ios
* ios-xr **or** iosxr
* bird
* quagga **or** zebra
+ * openbgpd
It is also highly recommended to specify a source interface ID to be used by
the router when it will try to ping or traceroute a destination. This is done
diff --git a/docs/index.md b/docs/index.md
index 1d26005..7c373f1 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -19,9 +19,10 @@ execute some commands on routers. The output is sent back to the user.
For now this looking glass is quite simple. Here you have some features:
* Interface using Javascript and AJAX calls (needs a decent browser)
- * Support of BIRD, Cisco (IOS and IOS-XR), Juniper and Quagga routers
+ * Support of BIRD, Cisco (IOS and IOS-XR), Juniper, OpenBGPd and Quagga
+ routers
* Support of Telnet and SSH connection to routers using password
- authentication and SSH keys.
+ authentication and SSH keys
* Configurable list of routers
* Tweakable interface (title, logo, footer, elements order)
* Log all commands in a file
diff --git a/libs/phpseclib-1.0.6/Crypt/AES.php b/libs/phpseclib-1.0.7/Crypt/AES.php
index 594011e..594011e 100644
--- a/libs/phpseclib-1.0.6/Crypt/AES.php
+++ b/libs/phpseclib-1.0.7/Crypt/AES.php
diff --git a/libs/phpseclib-1.0.6/Crypt/Base.php b/libs/phpseclib-1.0.7/Crypt/Base.php
index 91ebe59..91ebe59 100644
--- a/libs/phpseclib-1.0.6/Crypt/Base.php
+++ b/libs/phpseclib-1.0.7/Crypt/Base.php
diff --git a/libs/phpseclib-1.0.6/Crypt/Blowfish.php b/libs/phpseclib-1.0.7/Crypt/Blowfish.php
index 5be5ce3..17c8e7e 100644
--- a/libs/phpseclib-1.0.6/Crypt/Blowfish.php
+++ b/libs/phpseclib-1.0.7/Crypt/Blowfish.php
@@ -390,6 +390,9 @@ class Crypt_Blowfish extends Crypt_Base
function isValidEngine($engine)
{
if ($engine == CRYPT_ENGINE_OPENSSL) {
+ if (version_compare(PHP_VERSION, '5.3.7') < 0 && $this->key_length != 16) {
+ return false;
+ }
if ($this->key_length < 16) {
return false;
}
diff --git a/libs/phpseclib-1.0.6/Crypt/DES.php b/libs/phpseclib-1.0.7/Crypt/DES.php
index 4c57401..4c57401 100644
--- a/libs/phpseclib-1.0.6/Crypt/DES.php
+++ b/libs/phpseclib-1.0.7/Crypt/DES.php
diff --git a/libs/phpseclib-1.0.6/Crypt/Hash.php b/libs/phpseclib-1.0.7/Crypt/Hash.php
index faa17c5..faa17c5 100644
--- a/libs/phpseclib-1.0.6/Crypt/Hash.php
+++ b/libs/phpseclib-1.0.7/Crypt/Hash.php
diff --git a/libs/phpseclib-1.0.6/Crypt/RC2.php b/libs/phpseclib-1.0.7/Crypt/RC2.php
index 97b4550..97b4550 100644
--- a/libs/phpseclib-1.0.6/Crypt/RC2.php
+++ b/libs/phpseclib-1.0.7/Crypt/RC2.php
diff --git a/libs/phpseclib-1.0.6/Crypt/RC4.php b/libs/phpseclib-1.0.7/Crypt/RC4.php
index 6214554..7cec2e7 100644
--- a/libs/phpseclib-1.0.6/Crypt/RC4.php
+++ b/libs/phpseclib-1.0.7/Crypt/RC4.php
@@ -190,7 +190,23 @@ class Crypt_RC4 extends Crypt_Base
function isValidEngine($engine)
{
if ($engine == CRYPT_ENGINE_OPENSSL) {
- $this->cipher_name_openssl = 'rc4-40';
+ if (version_compare(PHP_VERSION, '5.3.7') >= 0) {
+ $this->cipher_name_openssl = 'rc4-40';
+ } else {
+ switch (strlen($this->key)) {
+ case 5:
+ $this->cipher_name_openssl = 'rc4-40';
+ break;
+ case 8:
+ $this->cipher_name_openssl = 'rc4-64';
+ break;
+ case 16:
+ $this->cipher_name_openssl = 'rc4';
+ break;
+ default:
+ return false;
+ }
+ }
}
return parent::isValidEngine($engine);
diff --git a/libs/phpseclib-1.0.6/Crypt/RSA.php b/libs/phpseclib-1.0.7/Crypt/RSA.php
index 3eacfe1..b734c9f 100644
--- a/libs/phpseclib-1.0.6/Crypt/RSA.php
+++ b/libs/phpseclib-1.0.7/Crypt/RSA.php
@@ -1661,6 +1661,15 @@ class Crypt_RSA
}
if ($components === false) {
+ $this->comment = null;
+ $this->modulus = null;
+ $this->k = null;
+ $this->exponent = null;
+ $this->primes = null;
+ $this->exponents = null;
+ $this->coefficients = null;
+ $this->publicExponent = null;
+
return false;
}
diff --git a/libs/phpseclib-1.0.6/Crypt/Random.php b/libs/phpseclib-1.0.7/Crypt/Random.php
index 472d47c..1803421 100644
--- a/libs/phpseclib-1.0.6/Crypt/Random.php
+++ b/libs/phpseclib-1.0.7/Crypt/Random.php
@@ -70,7 +70,7 @@ if (!function_exists('crypt_random_string')) {
if (CRYPT_RANDOM_IS_WINDOWS) {
// method 1. prior to PHP 5.3, mcrypt_create_iv() would call rand() on windows
if (extension_loaded('mcrypt') && version_compare(PHP_VERSION, '5.3.0', '>=')) {
- return mcrypt_create_iv($length);
+ return @mcrypt_create_iv($length);
}
// method 2. openssl_random_pseudo_bytes was introduced in PHP 5.3.0 but prior to PHP 5.3.4 there was,
// to quote <http://php.net/ChangeLog-5.php#5.3.4>, "possible blocking behavior". as of 5.3.4
@@ -109,7 +109,7 @@ if (!function_exists('crypt_random_string')) {
// not doing. regardless, this'll only be called if this PHP script couldn't open /dev/urandom due to open_basedir
// restrictions or some such
if (extension_loaded('mcrypt')) {
- return mcrypt_create_iv($length, MCRYPT_DEV_URANDOM);
+ return @mcrypt_create_iv($length, MCRYPT_DEV_URANDOM);
}
}
// at this point we have no choice but to use a pure-PHP CSPRNG
diff --git a/libs/phpseclib-1.0.6/Crypt/Rijndael.php b/libs/phpseclib-1.0.7/Crypt/Rijndael.php
index 56bc4e9..56bc4e9 100644
--- a/libs/phpseclib-1.0.6/Crypt/Rijndael.php
+++ b/libs/phpseclib-1.0.7/Crypt/Rijndael.php
diff --git a/libs/phpseclib-1.0.6/Crypt/TripleDES.php b/libs/phpseclib-1.0.7/Crypt/TripleDES.php
index 4c0b677..4c0b677 100644
--- a/libs/phpseclib-1.0.6/Crypt/TripleDES.php
+++ b/libs/phpseclib-1.0.7/Crypt/TripleDES.php
diff --git a/libs/phpseclib-1.0.6/Crypt/Twofish.php b/libs/phpseclib-1.0.7/Crypt/Twofish.php
index 7125f6a..7125f6a 100644
--- a/libs/phpseclib-1.0.6/Crypt/Twofish.php
+++ b/libs/phpseclib-1.0.7/Crypt/Twofish.php
diff --git a/libs/phpseclib-1.0.6/File/ANSI.php b/libs/phpseclib-1.0.7/File/ANSI.php
index 989537b..989537b 100644
--- a/libs/phpseclib-1.0.6/File/ANSI.php
+++ b/libs/phpseclib-1.0.7/File/ANSI.php
diff --git a/libs/phpseclib-1.0.6/File/ASN1.php b/libs/phpseclib-1.0.7/File/ASN1.php
index 7ce28bd..7ce28bd 100644
--- a/libs/phpseclib-1.0.6/File/ASN1.php
+++ b/libs/phpseclib-1.0.7/File/ASN1.php
diff --git a/libs/phpseclib-1.0.6/File/X509.php b/libs/phpseclib-1.0.7/File/X509.php
index 932262a..e6c8443 100644
--- a/libs/phpseclib-1.0.6/File/X509.php
+++ b/libs/phpseclib-1.0.7/File/X509.php
@@ -3518,7 +3518,7 @@ class File_X509
$altName = array();
- if (isset($subject->domains) && count($subject->domains) > 1) {
+ if (isset($subject->domains) && count($subject->domains)) {
$altName = array_map(array('File_X509', '_dnsName'), $subject->domains);
}
diff --git a/libs/phpseclib-1.0.6/Math/BigInteger.php b/libs/phpseclib-1.0.7/Math/BigInteger.php
index 192ce82..192ce82 100644
--- a/libs/phpseclib-1.0.6/Math/BigInteger.php
+++ b/libs/phpseclib-1.0.7/Math/BigInteger.php
diff --git a/libs/phpseclib-1.0.6/Net/SCP.php b/libs/phpseclib-1.0.7/Net/SCP.php
index 354acea..354acea 100644
--- a/libs/phpseclib-1.0.6/Net/SCP.php
+++ b/libs/phpseclib-1.0.7/Net/SCP.php
diff --git a/libs/phpseclib-1.0.6/Net/SFTP.php b/libs/phpseclib-1.0.7/Net/SFTP.php
index 40c97da..40c97da 100644
--- a/libs/phpseclib-1.0.6/Net/SFTP.php
+++ b/libs/phpseclib-1.0.7/Net/SFTP.php
diff --git a/libs/phpseclib-1.0.6/Net/SFTP/Stream.php b/libs/phpseclib-1.0.7/Net/SFTP/Stream.php
index a944d7f..a944d7f 100644
--- a/libs/phpseclib-1.0.6/Net/SFTP/Stream.php
+++ b/libs/phpseclib-1.0.7/Net/SFTP/Stream.php
diff --git a/libs/phpseclib-1.0.6/Net/SSH1.php b/libs/phpseclib-1.0.7/Net/SSH1.php
index 55473d0..55473d0 100644
--- a/libs/phpseclib-1.0.6/Net/SSH1.php
+++ b/libs/phpseclib-1.0.7/Net/SSH1.php
diff --git a/libs/phpseclib-1.0.6/Net/SSH2.php b/libs/phpseclib-1.0.7/Net/SSH2.php
index d104b81..d104b81 100644
--- a/libs/phpseclib-1.0.6/Net/SSH2.php
+++ b/libs/phpseclib-1.0.7/Net/SSH2.php
diff --git a/libs/phpseclib-1.0.6/System/SSH/Agent.php b/libs/phpseclib-1.0.7/System/SSH/Agent.php
index 7388cb4..7388cb4 100644
--- a/libs/phpseclib-1.0.6/System/SSH/Agent.php
+++ b/libs/phpseclib-1.0.7/System/SSH/Agent.php
diff --git a/libs/phpseclib-1.0.6/System/SSH_Agent.php b/libs/phpseclib-1.0.7/System/SSH_Agent.php
index ea434b9..ea434b9 100644
--- a/libs/phpseclib-1.0.6/System/SSH_Agent.php
+++ b/libs/phpseclib-1.0.7/System/SSH_Agent.php
diff --git a/libs/phpseclib-1.0.6/bootstrap.php b/libs/phpseclib-1.0.7/bootstrap.php
index 0da0999..0da0999 100644
--- a/libs/phpseclib-1.0.6/bootstrap.php
+++ b/libs/phpseclib-1.0.7/bootstrap.php
diff --git a/libs/phpseclib-1.0.6/openssl.cnf b/libs/phpseclib-1.0.7/openssl.cnf
index 2b8b52f..2b8b52f 100644
--- a/libs/phpseclib-1.0.6/openssl.cnf
+++ b/libs/phpseclib-1.0.7/openssl.cnf
diff --git a/routers/openbgpd.php b/routers/openbgpd.php
new file mode 100644
index 0000000..8b609dc
--- /dev/null
+++ b/routers/openbgpd.php
@@ -0,0 +1,151 @@
+<?php
+
+/*
+ * Looking Glass - An easy to deploy Looking Glass
+ * Copyright (C) 2014-2017 Guillaume Mazoyer <gmazoyer@gravitons.in>
+ * Copyright (C) 2017 Denis Fondras <github@ggl.ledeuns.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+require_once('router.php');
+require_once('includes/utils.php');
+
+final class OpenBGPd extends Router {
+ protected function build_ping($destination) {
+ $ping = null;
+
+ if (match_hostname($destination)) {
+ $hostname = $destination;
+ $destination = hostname_to_ip_address($hostname, $this->config);
+
+ if (!$destination) {
+ throw new Exception('No record found for '.$hostname);
+ }
+ }
+
+ if (match_ipv6($destination)) {
+ $ping = 'ping6 '.$this->global_config['tools']['ping_options'].' '.
+ (isset($hostname) ? $hostname : $destination);
+ } else if (match_ipv4($destination)) {
+ $ping = 'ping '.$this->global_config['tools']['ping_options'].' '.
+ (isset($hostname) ? $hostname : $destination);
+ } else {
+ throw new Exception('The parameter does not resolve to an IP address.');
+ }
+
+ if (($ping != null) && $this->has_source_interface_id()) {
+ if (match_ipv6($destination) &&
+ ($this->get_source_interface_id('ipv6') != null)) {
+ $ping .= ' '.$this->global_config['tools']['ping_source_option'].' '.
+ $this->get_source_interface_id('ipv6');
+ } else if (match_ipv4($destination) &&
+ ($this->get_source_interface_id('ipv4') != null)) {
+ $ping .= ' '.$this->global_config['tools']['ping_source_option'].' '.
+ $this->get_source_interface_id('ipv4');
+ }
+ }
+
+ return $ping;
+ }
+
+ protected function build_traceroute($destination) {
+ $traceroute = null;
+
+ if (match_hostname($destination)) {
+ $hostname = $destination;
+ $destination = hostname_to_ip_address($hostname, $this->config);
+
+ if (!$destination) {
+ throw new Exception('No record found for '.$hostname);
+ }
+ }
+
+ if (match_ipv6($destination)) {
+ $traceroute = $this->global_config['tools']['traceroute6'].' '.
+ $this->global_config['tools']['traceroute_options'].' '.
+ (isset($hostname) ? $hostname : $destination);
+ } else if (match_ipv4($destination)) {
+ $traceroute = $this->global_config['tools']['traceroute4'].' '.
+ $this->global_config['tools']['traceroute_options'].' '.
+ (isset($hostname) ? $hostname : $destination);
+ } else {
+ throw new Exception('The parameter does not resolve to an IP address.');
+ }
+
+ if (($traceroute != null) && $this->has_source_interface_id()) {
+ if (match_ipv6($destination) &&
+ ($this->get_source_interface_id('ipv6') != null)) {
+ $traceroute .= ' '.
+ $this->global_config['tools']['traceroute_source_option'].' '.
+ $this->get_source_interface_id('ipv6');
+ } else if (match_ipv4($destination) &&
+ ($this->get_source_interface_id('ipv4') != null)) {
+ $traceroute .= ' '.
+ $this->global_config['tools']['traceroute_source_option'].' '.
+ $this->get_source_interface_id('ipv4');
+ }
+ }
+
+ return $traceroute;
+ }
+
+ protected function build_commands($command, $parameter) {
+ $commands = array();
+
+ $bgpctl = 'bgpctl ';
+
+ switch ($command) {
+ case 'bgp':
+ if (match_ipv6($parameter, false) or match_ipv4($parameter, false)) {
+ $commands[] = $bgpctl.'show ip bgp '.$parameter;
+ } else {
+ throw new Exception('The parameter is not an IP address.');
+ }
+ break;
+
+ case 'as':
+ if (match_as($parameter)) {
+ $commands[] = $bgpctl.'show ip bgp as '.$parameter;
+ } else {
+ throw new Exception('The parameter is not an AS number.');
+ }
+ break;
+
+ case 'ping':
+ try {
+ $commands[] = $this->build_ping($parameter);
+ } catch (Exception $e) {
+ throw $e;
+ }
+ break;
+
+ case 'traceroute':
+ try {
+ $commands[] = $this->build_traceroute($parameter);
+ } catch (Exception $e) {
+ throw $e;
+ }
+ break;
+
+ default:
+ throw new Exception('Command not supported.');
+ }
+
+ return $commands;
+ }
+}
+
+// End of openbgpd.php
diff --git a/routers/router.php b/routers/router.php
index db3503c..8bdd7c3 100644
--- a/routers/router.php
+++ b/routers/router.php
@@ -25,6 +25,7 @@ require_once('bird.php');
require_once('cisco.php');
require_once('cisco_iosxr.php');
require_once('juniper.php');
+require_once('openbgpd.php');
require_once('quagga.php');
require_once('vyatta.php');
require_once('includes/utils.php');
@@ -180,6 +181,9 @@ abstract class Router {
case 'junos':
return new Juniper($config, $router_config, $id, $requester);
+ case 'openbgpd':
+ return new OpenBGPd($config, $router_config, $id, $requester);
+
case 'quagga':
case 'zebra':
return new Quagga($config, $router_config, $id, $requester);