addInput(new Form_Input( 'filter', 'Filter expression', 'text', $_POST['filter'], ['placeholder' => 'Simple filter such as 192.168, v6, icmp or ESTABLISHED'] )); $filterbtn = new Form_Button('filterbtn', 'Filter', null); $filterbtn->removeClass('btn-primary')->addClass('btn-default btn-sm'); $section->addInput(new Form_StaticText( '', $filterbtn )); if (isset($_POST['filter']) && (is_ipaddr($_POST['filter']) || is_subnet($_POST['filter']))) { $killbtn = new Form_Button('killfilter', 'Kill States'); $killbtn->removeClass('btn-primary')->addClass('btn-danger btn-sm'); $section->addInput(new Form_StaticText( 'Kill filtered states', $killbtn ))->setHelp('Remove all states to and from the filtered address'); } $form->add($section); print $form; ?> = 10000) break; $line_split = preg_split("/\s+/", $line); $iface = array_shift($line_split); $proto = array_shift($line_split); $state = array_pop($line_split); $info = implode(" ", $line_split); // We may want to make this optional, with a large state table, this could get to be expensive. $iface = convert_real_interface_to_friendly_descr($iface); /* break up info and extract $srcip and $dstip */ $ends = preg_split("/\?/", $info); $parts = explode(":", $ends[0]); $srcip = trim($parts[0]); $parts = explode(":", $ends[count($ends) - 1]); $dstip = trim($parts[0]); ?>
Router -> Destination")?>
' . $errmsg . '

'); } include("foot.inc");