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; ?>

intval($ids[$i])); } if (isset($arr) && is_array($arr) && count($arr) > 0) $res = pfSense_get_pf_states($arr); else $res = pfSense_get_pf_states(); $states = 0; if ($res != NULL && is_array($res)) $states = count($res); /* XXX - limit to 10.000 states. */ if ($states > 10000) $states = 10000; for ($i = 0; $i < $states; $i++) { if ($res[$i]['direction'] === "out") { $info = $res[$i]['src']; if ($res[$i]['src-orig']) $info .= " (" . $res[$i]['src-orig'] . ")"; $info .= " -> "; $info .= $res[$i]['dst']; if ($res[$i]['dst-orig']) $info .= " (" . $res[$i]['dst-orig'] . ")"; $srcip = get_ip($res[$i]['src']); $dstip = get_ip($res[$i]['dst']); } else { $info = $res[$i]['dst']; if ($res[$i]['dst-orig']) $info .= " (" . $res[$i]['dst-orig'] . ")"; $info .= " -> "; $info .= $res[$i]['src']; if ($res[$i]['src-orig']) $info .= " (" . $res[$i]['src-orig'] . ")"; $srcip = get_ip($res[$i]['dst']); $dstip = get_ip($res[$i]['src']); } ?>
Router -> Destination")?>
/ /
' . $errmsg . '

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