. 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. */ ##|+PRIV ##|*IDENT=page-diagnostics-traceroute ##|*NAME=Diagnostics: Traceroute page ##|*DESCR=Allow access to the 'Diagnostics: Traceroute' page. ##|*MATCH=diag_traceroute.php* ##|-PRIV require("guiconfig.inc"); $pgtitle = array("Diagnostics","Traceroute"); include("head.inc"); ?> MAX_TTL)) { $input_errors[] = "Maximum number of hops must be between 1 and {MAX_TTL}"; } if (!$input_errors) { $do_traceroute = true; $host = $_POST['host']; $ttl = $_POST['ttl']; } } if (!isset($do_traceroute)) { $do_traceroute = false; $host = ''; $ttl = DEFAULT_TTL; } ?>
Traceroute
Host
Maximum number of hops
Use ICMP >
 

Note: Traceroute may take a while to complete. You may hit the Stop button on your browser at any time to see the progress of failed traceroutes.

"; echo("
Traceroute output:
"); echo('

');
					ob_end_flush();
					if($_POST['useicmp'])
						$useicmp = "-I";
					else
						$useicmp = "";
					system("/usr/sbin/traceroute $useicmp -w 2 -m " . escapeshellarg($ttl) . " " . escapeshellarg($host));
					echo('
'); } ?>
  Note: Multi-wan is not supported from this utility currently.