From d6ffd48f3b7a8fbcabea27812001acf33f7c3dc8 Mon Sep 17 00:00:00 2001 From: doktornotor Date: Thu, 30 Jul 2015 01:29:42 +0200 Subject: mtr-nox11 - multiple improvements plus code style fixes --- config/mtr-nox11/mtr-nox11.xml | 185 ++++++++++++++++++++++++++--------------- 1 file changed, 117 insertions(+), 68 deletions(-) (limited to 'config/mtr-nox11') diff --git a/config/mtr-nox11/mtr-nox11.xml b/config/mtr-nox11/mtr-nox11.xml index e0125333..61a7f4f8 100644 --- a/config/mtr-nox11/mtr-nox11.xml +++ b/config/mtr-nox11/mtr-nox11.xml @@ -2,54 +2,53 @@ - - + . - All rights reserved. - */ -/* ========================================================================== */ + mtr-nox11.xml + part of pfSense (http://www.pfSense.com) + Copyright (C) 2014-2015 ESF, LLC + All rights reserved. +*/ +/* ====================================================================================== */ /* - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: + 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. - 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. - 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. - */ -/* ========================================================================== */ - ]]> - - Describe your package here - Describe your package requirements here - Currently there are no FAQ items provided. + 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. +*/ +/* ====================================================================================== */ + ]]> + + Describe your package here + Describe your package requirements here + Currently there are no FAQ items provided. mtr - 0.65_2 + 0.85_3 Diagnostics: mtr - mtr + Run mtr yes + true @@ -58,36 +57,86 @@
Diagnostics
mtr-nox11.xml
- - IP or Hostname - hostname - Enter the IP address or hostname that you would like to traceroute to. - input + IP or Hostname + hostname + Enter the IP address or hostname that you would like to traceroute to. + input + true + + + Count + count + This is the number of pings to send, each one takes 1 second. + input + (Defaults to 10) + + + No DNS Lookup + nodns + Use this option to force mtr to display numeric IP numbers and not try to resolve the host names. + checkbox + + + Show IPs + showips + Use this option to tell mtr to display both the host names and numeric IP numbers. + checkbox - - Count - count - This is the number of pings to send, each one takes 1 second - input - Defaults to 10 - - - No DNS Lookup - nodns - Use this option to force mtr to display numeric IP numbers and not try to resolve the host names - checkbox - - - - $mtr_options = " -r"; - if($_POST['count']) $mtr_options .= " -c " . $_POST['count']; - if($_POST['nodns']) $mtr_options .= " -n"; - $mtr_options .= " " . $_POST['hostname']; - system("/usr/local/sbin/mtr" . $mtr_options); - - - + + Raw Output Format + raw + Use this option to tell mtr to use the raw output format. + checkbox + + + Interval + interval + Use this option to specify the positive number of seconds between ICMP ECHO requests. + input + (Default is 1 second.) + + + Use IPv4 only + ipv4only + Use this option to use IPv4 only. + checkbox + + + + ERROR: No valid IP or Hostname given. Fix this and try again!"; + echo "\n"; + die(); + } + + /* Set up the configured options */ + /* Use wide report mode to not cut hostnames in the report */ + $mtr_options = " -w"; + $mtr_options .= " -c " . $int_count; + if ($_POST['nodns']) { + $mtr_options .= " -n"; + } + if ($_POST['showips']) { + $mtr_options .= " -b"; + } + if ($_POST['raw']) { + $mtr_options .= " -l"; + } + $mtr_options .= " -i " . $int_interval; + if ($_POST['ipv4only']) { + $mtr_options .= " -4"; + } + $mtr_options .= " " . $_POST['hostname']; + echo "Running mtr $mtr_options:\n\n"; + system("/usr/local/sbin/mtr" . $mtr_options); + echo "\n"; + ]]> +
-- cgit v1.2.3