Project

General

Profile

Download (17.8 KB) Statistics
| Branch: | Tag: | Revision:
1 5b237745 Scott Ullrich
<?php 
2 b46bfcf5 Bill Marquette
/* $Id$ */
3 5b237745 Scott Ullrich
/*
4
	services_snmp.php
5
	part of m0n0wall (http://m0n0.ch/wall)
6
	
7
	Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
8
	All rights reserved.
9
	
10
	Redistribution and use in source and binary forms, with or without
11
	modification, are permitted provided that the following conditions are met:
12
	
13
	1. Redistributions of source code must retain the above copyright notice,
14
	   this list of conditions and the following disclaimer.
15
	
16
	2. Redistributions in binary form must reproduce the above copyright
17
	   notice, this list of conditions and the following disclaimer in the
18
	   documentation and/or other materials provided with the distribution.
19
	
20
	THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
21
	INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
22
	AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
23
	AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
24
	OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25
	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26
	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27
	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
	POSSIBILITY OF SUCH DAMAGE.
30
*/
31 1d333258 Scott Ullrich
/*
32
	pfSense_MODULE:	snmp
33
*/
34 5b237745 Scott Ullrich
35 6b07c15a Matthew Grooms
##|+PRIV
36
##|*IDENT=page-services-snmp
37
##|*NAME=Services: SNMP page
38
##|*DESCR=Allow access to the 'Services: SNMP' page.
39
##|*MATCH=services_snmp.php*
40
##|-PRIV
41
42 5b237745 Scott Ullrich
require("guiconfig.inc");
43 4e865673 Carlos Eduardo Ramos
require_once("functions.inc");
44 5b237745 Scott Ullrich
45
if (!is_array($config['snmpd'])) {
46
	$config['snmpd'] = array();
47
	$config['snmpd']['rocommunity'] = "public";
48 3805bfdd John Fleming
	$config['snmpd']['pollport'] = "161";
49 5b237745 Scott Ullrich
}
50
51 3805bfdd John Fleming
if (!is_array($config['snmpd']['modules'])) {
52
	$config['snmpd']['modules'] = array();
53
	$config['snmpd']['modules']['mibii'] = true;
54
	$config['snmpd']['modules']['netgraph'] = true;
55
	$config['snmpd']['modules']['pf'] = true;
56 95fb49e8 Seth Mos
	$config['snmpd']['modules']['hostres'] = true;
57
	$config['snmpd']['modules']['bridge'] = true;
58 671914b2 jim-p
	$config['snmpd']['modules']['ucd'] = true;
59
	$config['snmpd']['modules']['regex'] = true;
60 3805bfdd John Fleming
}
61 4f4d63d8 John Fleming
$pconfig['enable'] = isset($config['snmpd']['enable']);
62 3805bfdd John Fleming
$pconfig['pollport'] = $config['snmpd']['pollport'];
63 5b237745 Scott Ullrich
$pconfig['syslocation'] = $config['snmpd']['syslocation'];
64
$pconfig['syscontact'] = $config['snmpd']['syscontact'];
65
$pconfig['rocommunity'] = $config['snmpd']['rocommunity'];
66 4f4d63d8 John Fleming
/* disabled until some docs show up on what this does.
67
$pconfig['rwenable'] = isset($config['snmpd']['rwenable']);
68
$pconfig['rwcommunity'] = $config['snmpd']['rwcommunity'];
69
*/
70
$pconfig['trapenable'] = isset($config['snmpd']['trapenable']);
71
$pconfig['trapserver'] = $config['snmpd']['trapserver'];
72
$pconfig['trapserverport'] = $config['snmpd']['trapserverport'];
73 8c3c9dc2 John Fleming
$pconfig['trapstring'] = $config['snmpd']['trapstring'];
74 5b237745 Scott Ullrich
75 3805bfdd John Fleming
$pconfig['mibii'] = isset($config['snmpd']['modules']['mibii']);
76
$pconfig['netgraph'] = isset($config['snmpd']['modules']['netgraph']);
77
$pconfig['pf'] = isset($config['snmpd']['modules']['pf']);
78 95fb49e8 Seth Mos
$pconfig['hostres'] = isset($config['snmpd']['modules']['hostres']);
79
$pconfig['bridge'] = isset($config['snmpd']['modules']['bridge']);
80 671914b2 jim-p
$pconfig['ucd'] = isset($config['snmpd']['modules']['ucd']);
81
$pconfig['regex'] = isset($config['snmpd']['modules']['regex']);
82 3d594a3f jim-p
$pconfig['bindip'] = $config['snmpd']['bindip'];
83 3805bfdd John Fleming
84 5b237745 Scott Ullrich
if ($_POST) {
85
86
	unset($input_errors);
87
	$pconfig = $_POST;
88
89
	/* input validation */
90
	if ($_POST['enable']) {
91 00686fee pierrepomes
		if (strstr($_POST['syslocation'],"#")) $input_errors[] = gettext("Invalid character '#' in system location");
92
 		if (strstr($_POST['syscontact'],"#")) $input_errors[] = gettext("Invalid character '#' in system contact");
93
		if (strstr($_POST['rocommunity'],"#")) $input_errors[] = gettext("Invalid character '#' in read community string");
94
95 5b237745 Scott Ullrich
		$reqdfields = explode(" ", "rocommunity");
96 3d9bee96 Rafael Lucas
		$reqdfieldsn = array(gettext("Community"));
97 3805bfdd John Fleming
		do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
98
99
		$reqdfields = explode(" ", "pollport");
100 3d9bee96 Rafael Lucas
		$reqdfieldsn = array(gettext("Polling Port"));
101 5b237745 Scott Ullrich
		do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
102 a42bf8cd Scott Ullrich
		
103 72b5583c Scott Ullrich
	
104 5b237745 Scott Ullrich
	}
105
106 4f4d63d8 John Fleming
	if ($_POST['trapenable']) {
107 00686fee pierrepomes
		if (strstr($_POST['trapstring'],"#")) $input_errors[] = gettext("Invalid character '#' in SNMP trap string");
108
109 4f4d63d8 John Fleming
		$reqdfields = explode(" ", "trapserver");
110 3d9bee96 Rafael Lucas
		$reqdfieldsn = array(gettext("Trap server"));
111 4f4d63d8 John Fleming
		do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
112 3805bfdd John Fleming
113 4f4d63d8 John Fleming
		$reqdfields = explode(" ", "trapserverport");
114 3d9bee96 Rafael Lucas
		$reqdfieldsn = array(gettext("Trap server port"));
115 4f4d63d8 John Fleming
		do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
116 3805bfdd John Fleming
117 8c3c9dc2 John Fleming
		$reqdfields = explode(" ", "trapstring");
118 3d9bee96 Rafael Lucas
		$reqdfieldsn = array(gettext("Trap string"));
119 b7e236b9 jim-p
		do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
120 4f4d63d8 John Fleming
	}
121
122 8c3c9dc2 John Fleming
123 4f4d63d8 John Fleming
/* disabled until some docs show up on what this does.
124
	if ($_POST['rwenable']) {
125
               $reqdfields = explode(" ", "rwcommunity");
126
               $reqdfieldsn = explode(",", "Write community string");
127
               do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
128
	}
129
*/
130
131
	
132
133 5b237745 Scott Ullrich
	if (!$input_errors) {
134 4f4d63d8 John Fleming
		$config['snmpd']['enable'] = $_POST['enable'] ? true : false;
135 3805bfdd John Fleming
		$config['snmpd']['pollport'] = $_POST['pollport'];
136 3184f4e7 Scott Ullrich
		$config['snmpd']['syslocation'] = $_POST['syslocation'];	
137 5b237745 Scott Ullrich
		$config['snmpd']['syscontact'] = $_POST['syscontact'];
138
		$config['snmpd']['rocommunity'] = $_POST['rocommunity'];
139 4f4d63d8 John Fleming
		/* disabled until some docs show up on what this does.
140
		$config['snmpd']['rwenable'] = $_POST['rwenable'] ? true : false;
141
		$config['snmpd']['rwcommunity'] = $_POST['rwcommunity'];
142
		*/
143
		$config['snmpd']['trapenable'] = $_POST['trapenable'] ? true : false;
144
		$config['snmpd']['trapserver'] = $_POST['trapserver'];
145
		$config['snmpd']['trapserverport'] = $_POST['trapserverport'];
146 8c3c9dc2 John Fleming
		$config['snmpd']['trapstring'] = $_POST['trapstring'];
147 4f4d63d8 John Fleming
		
148 3805bfdd John Fleming
		$config['snmpd']['modules']['mibii'] = $_POST['mibii'] ? true : false;
149
		$config['snmpd']['modules']['netgraph'] = $_POST['netgraph'] ? true : false;
150
		$config['snmpd']['modules']['pf'] = $_POST['pf'] ? true : false;
151 95fb49e8 Seth Mos
		$config['snmpd']['modules']['hostres'] = $_POST['hostres'] ? true : false;
152
		$config['snmpd']['modules']['bridge'] = $_POST['bridge'] ? true : false;
153 671914b2 jim-p
		$config['snmpd']['modules']['ucd'] = $_POST['ucd'] ? true : false;
154
		$config['snmpd']['modules']['regex'] = $_POST['regex'] ? true : false;
155 c82b2c3f jim-p
		$config['snmpd']['bindip'] = $_POST['bindip'];
156 5b237745 Scott Ullrich
			
157
		write_config();
158
		
159
		$retval = 0;
160 920b3bb0 Scott Ullrich
		$retval = services_snmpd_configure();
161 5b237745 Scott Ullrich
		$savemsg = get_std_save_message($retval);
162
	}
163
}
164 4df96eff Scott Ullrich
165 3d9bee96 Rafael Lucas
$pgtitle = array(gettext("Services"),gettext("SNMP"));
166 d71fc5d3 jim-p
$shortcut_section = "snmp";
167 4df96eff Scott Ullrich
include("head.inc");
168
169 5b237745 Scott Ullrich
?>
170
<script language="JavaScript">
171
<!--
172 7bc5c543 jim-p
function check_deps() {
173 ea1cea05 Vinicius Coque
	if (jQuery('#hostres').prop('checked') == true) {
174
		jQuery('#mibii').prop('checked',true);
175 7bc5c543 jim-p
	}
176
}
177
178 4f4d63d8 John Fleming
function enable_change(whichone) {
179
180
	if( whichone.name == "trapenable" )
181
        {
182
	    if( whichone.checked == true )
183
	    {
184
	        document.iform.trapserver.disabled = false;
185
	        document.iform.trapserverport.disabled = false;
186 8c3c9dc2 John Fleming
	        document.iform.trapstring.disabled = false;
187 4f4d63d8 John Fleming
	    }
188
	    else
189
	    {
190
                document.iform.trapserver.disabled = true;
191
                document.iform.trapserverport.disabled = true;
192 8c3c9dc2 John Fleming
                document.iform.trapstring.disabled = true;
193 4f4d63d8 John Fleming
	    }
194
	}
195
196
	/* disabled until some docs show up on what this does.
197
	if( whichone.name == "rwenable"  )
198
	{
199
	    if( whichone.checked == true )
200
	    {
201
		document.iform.rwcommunity.disabled = false;
202
	    }
203
	    else
204
	    {
205
		document.iform.rwcommunity.disabled = true;
206
	    }
207
	}
208
	*/
209
210
	if( document.iform.enable.checked == true )
211
	{
212 3805bfdd John Fleming
	    document.iform.pollport.disabled = false;
213 4f4d63d8 John Fleming
	    document.iform.syslocation.disabled = false;
214
	    document.iform.syscontact.disabled = false;
215
	    document.iform.rocommunity.disabled = false;
216
	    document.iform.trapenable.disabled = false;
217
	    /* disabled until some docs show up on what this does.
218
	    document.iform.rwenable.disabled = false;
219
	    if( document.iform.rwenable.checked == true )
220
	    {
221
	        document.iform.rwcommunity.disabled = false;
222
	    }
223
	    else
224
	    {
225
		document.iform.rwcommunity.disabled = true;
226
	    }
227
	    */
228
	    if( document.iform.trapenable.checked == true )
229
	    {
230
                document.iform.trapserver.disabled = false;
231
                document.iform.trapserverport.disabled = false;
232 8c3c9dc2 John Fleming
                document.iform.trapstring.disabled = false;
233 4f4d63d8 John Fleming
	    }
234
	    else
235
	    {
236
                document.iform.trapserver.disabled = true;
237 a21b1cad John Fleming
                document.iform.trapserverport.disabled = true;
238 8c3c9dc2 John Fleming
                document.iform.trapstring.disabled = true;
239 4f4d63d8 John Fleming
	    }
240 3805bfdd John Fleming
	    document.iform.mibii.disabled = false;
241
	    document.iform.netgraph.disabled = false;
242
	    document.iform.pf.disabled = false;
243 95fb49e8 Seth Mos
	    document.iform.hostres.disabled = false;
244 671914b2 jim-p
	    document.iform.ucd.disabled = false;
245
	    document.iform.regex.disabled = false;
246 0bbf8900 Ermal
	    //document.iform.bridge.disabled = false;
247 4f4d63d8 John Fleming
	}
248
	else
249
	{
250 3805bfdd John Fleming
            document.iform.pollport.disabled = true;
251 4f4d63d8 John Fleming
            document.iform.syslocation.disabled = true;
252
            document.iform.syscontact.disabled = true;
253
            document.iform.rocommunity.disabled = true;
254
	    /* 
255
            document.iform.rwenable.disabled = true;
256
	    document.iform.rwcommunity.disabled = true;
257
	    */
258
            document.iform.trapenable.disabled = true;
259
            document.iform.trapserver.disabled = true;
260
            document.iform.trapserverport.disabled = true;
261 8c3c9dc2 John Fleming
            document.iform.trapstring.disabled = true;
262 3805bfdd John Fleming
263
            document.iform.mibii.disabled = true;
264
            document.iform.netgraph.disabled = true;
265
            document.iform.pf.disabled = true;
266 95fb49e8 Seth Mos
            document.iform.hostres.disabled = true;
267 671914b2 jim-p
            document.iform.ucd.disabled = true;
268
            document.iform.regex.disabled = true;
269 0bbf8900 Ermal
            //document.iform.bridge.disabled = true;
270 4f4d63d8 John Fleming
	}
271 5b237745 Scott Ullrich
}
272
//-->
273
</script>
274
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
275
<?php include("fbegin.inc"); ?>
276
<?php if ($input_errors) print_input_errors($input_errors); ?>
277
<?php if ($savemsg) print_info_box($savemsg); ?>
278
            <form action="services_snmp.php" method="post" name="iform" id="iform">
279
              <table width="100%" border="0" cellpadding="6" cellspacing="0">
280 4f4d63d8 John Fleming
281 5b237745 Scott Ullrich
                <tr> 
282 4f4d63d8 John Fleming
  		  <td colspan="2" valign="top" class="optsect_t">
283
  			<table border="0" cellspacing="0" cellpadding="0" width="100%">
284 3d9bee96 Rafael Lucas
  			<tr><td class="optsect_s"><strong><?=gettext("SNMP Daemon");?></strong></td>
285 59d0d504 Carlos Eduardo Ramos
					<td align="right" class="optsect_s"><input name="enable" id="enable" type="checkbox" value="yes" <?php if ($pconfig['enable']) echo "checked"; ?> onClick="enable_change(this)"> <strong><?=gettext("Enable");?></strong></td></tr>
286 4f4d63d8 John Fleming
  			</table></td>
287 5b237745 Scott Ullrich
                </tr>
288 3805bfdd John Fleming
289
                <tr>
290 3d9bee96 Rafael Lucas
                  <td width="22%" valign="top" class="vncellreq"><?=gettext("Polling Port ");?></td>
291 3805bfdd John Fleming
                  <td width="78%" class="vtable">
292 dd5bf424 Scott Ullrich
                    <input name="pollport" type="text" class="formfld unknown" id="pollport" size="40" value="<?=htmlspecialchars($pconfig['pollport']) ? htmlspecialchars($pconfig['pollport']) : htmlspecialchars(161);?>">
293 3d9bee96 Rafael Lucas
                    <br><?=gettext("Enter the port to accept polling events on (default 161)");?></br>
294 3805bfdd John Fleming
		  </td>
295
                </tr>
296
297 5b237745 Scott Ullrich
                <tr> 
298 3d9bee96 Rafael Lucas
                  <td width="22%" valign="top" class="vncell"><?=gettext("System location");?></td>
299 5b237745 Scott Ullrich
                  <td width="78%" class="vtable"> 
300 b5c78501 Seth Mos
                    <input name="syslocation" type="text" class="formfld unknown" id="syslocation" size="40" value="<?=htmlspecialchars($pconfig['syslocation']);?>"> 
301 5b237745 Scott Ullrich
                  </td>
302
                </tr>
303 3805bfdd John Fleming
304 5b237745 Scott Ullrich
                <tr> 
305 3d9bee96 Rafael Lucas
                  <td width="22%" valign="top" class="vncell"><?=gettext("System contact");?></td>
306 5b237745 Scott Ullrich
                  <td width="78%" class="vtable"> 
307 b5c78501 Seth Mos
                    <input name="syscontact" type="text" class="formfld unknown" id="syscontact" size="40" value="<?=htmlspecialchars($pconfig['syscontact']);?>"> 
308 5b237745 Scott Ullrich
                  </td>
309
                </tr>
310 3805bfdd John Fleming
311 5b237745 Scott Ullrich
                <tr> 
312 3d9bee96 Rafael Lucas
                  <td width="22%" valign="top" class="vncellreq"><?=gettext("Read Community String");?></td>
313 5b237745 Scott Ullrich
                  <td width="78%" class="vtable"> 
314 b5c78501 Seth Mos
                    <input name="rocommunity" type="text" class="formfld unknown" id="rocommunity" size="40" value="<?=htmlspecialchars($pconfig['rocommunity']);?>"> 
315 4daa45d8 Renato Botelho
		    <br><?=gettext("The community string is like a password, restricting access to querying SNMP to hosts knowing the community string. Use a strong value here to protect from unauthorized information disclosure.");?></br>
316 3805bfdd John Fleming
		  </td>
317 5b237745 Scott Ullrich
                </tr>
318 4f4d63d8 John Fleming
319
<?php 
320
			/* disabled until some docs show up on what this does.
321
                <tr>
322
                  <td width="22%" valign="top" class="vtable">&nbsp;</td>
323
                  <td width="78%" class="vtable">
324 0bbf8900 Ermal
	 	   <input name="rwenable" id="rwenable" type="checkbox" value="yes" <?php if ($pconfig['rwenable']) echo "checked"; ?> onClick="enable_change(this)">
325 3805bfdd John Fleming
                    <strong>Enable Write Community String</strong>
326
		  </td>
327 4f4d63d8 John Fleming
                </tr>
328
329
		<tr>
330
		  <td width="22%" valign="top" class="vncellreq">Write community string</td>
331
          <td width="78%" class="vtable">
332 b5c78501 Seth Mos
                    <input name="rwcommunity" type="text" class="formfld unknown" id="rwcommunity" size="40" value="<?=htmlspecialchars($pconfig['rwcommunity']);?>">
333 3805bfdd John Fleming
		    <br>Please use something other then &quot;private&quot; here</br>
334
		  </td>
335 4f4d63d8 John Fleming
                </tr>
336
		    	*/ 
337
?>
338
339 3184f4e7 Scott Ullrich
		<tr><td>&nbsp;</td></tr>
340
341
                <tr> 
342
  		  <td colspan="2" valign="top" class="optsect_t">
343
  			<table border="0" cellspacing="0" cellpadding="0" width="100%">
344 3d9bee96 Rafael Lucas
  			<tr><td class="optsect_s"><strong><?=gettext("SNMP Traps");?></strong></td>
345 59d0d504 Carlos Eduardo Ramos
			<td align="right" class="optsect_s"><input name="trapenable" id="trapenable" type="checkbox" value="yes" <?php if ($pconfig['trapenable']) echo "checked"; ?> onClick="enable_change(this)"> <strong><?=gettext("Enable");?></strong></td></tr>
346 3184f4e7 Scott Ullrich
  			</table></td>
347
                </tr>
348
349
350 4f4d63d8 John Fleming
                <tr>
351 3d9bee96 Rafael Lucas
                  <td width="22%" valign="top" class="vncellreq"><?=gettext("Trap server");?></td>
352 4f4d63d8 John Fleming
                  <td width="78%" class="vtable">
353 b5c78501 Seth Mos
                    <input name="trapserver" type="text" class="formfld unknown" id="trapserver" size="40" value="<?=htmlspecialchars($pconfig['trapserver']);?>">
354 3d9bee96 Rafael Lucas
                    <br><?=gettext("Enter trap server name");?></br>
355 3805bfdd John Fleming
		  </td>
356 4f4d63d8 John Fleming
                </tr>
357
358
                <tr>
359 3d9bee96 Rafael Lucas
                  <td width="22%" valign="top" class="vncellreq"><?=gettext("Trap server port ");?></td>
360 4f4d63d8 John Fleming
                  <td width="78%" class="vtable">
361 dd5bf424 Scott Ullrich
                    <input name="trapserverport" type="text" class="formfld unknown" id="trapserverport" size="40" value="<?=htmlspecialchars($pconfig['trapserverport']) ? htmlspecialchars($pconfig['trapserverport']) : htmlspecialchars(162);?>">
362 3d9bee96 Rafael Lucas
                    <br><?=gettext("Enter the port to send the traps to (default 162)");?></br>
363 3805bfdd John Fleming
		  </td>
364 4f4d63d8 John Fleming
                </tr>
365 3805bfdd John Fleming
366 8c3c9dc2 John Fleming
                <tr>
367 3d9bee96 Rafael Lucas
                  <td width="22%" valign="top" class="vncellreq"><?=gettext("Enter the SNMP trap string");?></td>
368 8c3c9dc2 John Fleming
                  <td width="78%" class="vtable">
369 b5c78501 Seth Mos
                    <input name="trapstring" type="text" class="formfld unknown" id="trapstring" size="40" value="<?=htmlspecialchars($pconfig['trapstring']);?>">
370 3d9bee96 Rafael Lucas
                    <br><?=gettext("Trap string");?></br>
371 3805bfdd John Fleming
		  </td>
372 8c3c9dc2 John Fleming
                </tr>
373
374 ba73e2a3 Scott Ullrich
		<tr><td>&nbsp;</td></tr>
375
376
                <tr> 
377
  		  <td colspan="2" valign="top" class="optsect_t">
378
  			<table border="0" cellspacing="0" cellpadding="0" width="100%">
379 3d9bee96 Rafael Lucas
  			<tr><td class="optsect_s"><strong><?=gettext("Modules");?></strong></td>
380 ba73e2a3 Scott Ullrich
			<td align="right" class="optsect_s">&nbsp;</td></tr>
381
  			</table></td>
382
                </tr>
383
384 3805bfdd John Fleming
		<tr>
385 3d9bee96 Rafael Lucas
		  <td width="22%" valign="top" class="vncellreq"><?=gettext("SNMP Modules");?></td>
386 3805bfdd John Fleming
		  <td width="78%" class="vtable">
387 7bc5c543 jim-p
		    <input name="mibii" type="checkbox" id="mibii" value="yes" onClick="check_deps()" <?php if ($pconfig['mibii']) echo "checked"; ?> ><?=gettext("MibII"); ?>
388 95fb49e8 Seth Mos
		    <br />
389 59d0d504 Carlos Eduardo Ramos
		    <input name="netgraph" type="checkbox" id="netgraph" value="yes" <?php if ($pconfig['netgraph']) echo "checked"; ?> ><?=gettext("Netgraph"); ?>
390 95fb49e8 Seth Mos
		    <br />
391 59d0d504 Carlos Eduardo Ramos
		    <input name="pf" type="checkbox" id="pf" value="yes" <?php if ($pconfig['pf']) echo "checked"; ?> ><?=gettext("PF"); ?>
392 95fb49e8 Seth Mos
		    <br />
393 7bc5c543 jim-p
		    <input name="hostres" type="checkbox" id="hostres" value="yes" onClick="check_deps()" <?php if ($pconfig['hostres']) echo "checked"; ?> ><?=gettext("Host Resources (Requires MibII)");?>
394 671914b2 jim-p
		    <br />
395
		    <input name="ucd" type="checkbox" id="ucd" value="yes" <?php if ($pconfig['ucd']) echo "checked"; ?> ><?=gettext("UCD"); ?>
396
		    <br />
397
		    <input name="regex" type="checkbox" id="regex" value="yes" <?php if ($pconfig['regex']) echo "checked"; ?> ><?=gettext("Regex"); ?>
398
		    <br />
399 3805bfdd John Fleming
		  </td>
400
		</tr>
401 c82b2c3f jim-p
402
		<tr><td>&nbsp;</td></tr>
403
404
		<tr>
405
			<td colspan="2" valign="top" class="optsect_t">
406
			<table border="0" cellspacing="0" cellpadding="0" width="100%">
407
				<tr><td class="optsect_s"><strong><?=gettext("Interface Binding");?></strong></td>
408
				<td align="right" class="optsect_s">&nbsp;</td></tr>
409
			</table></td>
410
		</tr>
411
		<tr>
412
			<td width="22%" valign="top" class="vncellreq"><?=gettext("Bind Interface"); ?></td>
413
			<td width="78%" class="vtable">
414
				<select name="bindip" class="formselect">
415
					<option value="">All</option>
416
				<?php  $listenips = get_possible_listen_ips();
417
					foreach ($listenips as $lip):
418
						$selected = "";
419
						if ($lip['value'] == $pconfig['bindip'])
420
							$selected = "selected";
421
				?>
422
					<option value="<?=$lip['value'];?>" <?=$selected;?>>
423
						<?=htmlspecialchars($lip['name']);?>
424
					</option>
425
				<?php endforeach; ?>
426
		</tr>
427 612bb4f3 Scott Ullrich
		 <tr> 
428
		   <td width="22%" valign="top">&nbsp;</td>
429
		   <td width="78%"> 
430 3d9bee96 Rafael Lucas
		     <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" onClick="enable_change(true)"> 
431 612bb4f3 Scott Ullrich
		   </td>
432
		 </tr>
433
		</table>
434 5b237745 Scott Ullrich
</form>
435
<script language="JavaScript">
436
<!--
437 4f4d63d8 John Fleming
enable_change(this);
438 5b237745 Scott Ullrich
//-->
439
</script>
440
<?php include("fend.inc"); ?>
441
</body>
442
</html>