Project

General

Profile

Download (18.1 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 1e9b4611 Renato Botelho
		do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
98 3805bfdd John Fleming
99
		$reqdfields = explode(" ", "pollport");
100 3d9bee96 Rafael Lucas
		$reqdfieldsn = array(gettext("Polling Port"));
101 1e9b4611 Renato Botelho
		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 1e9b4611 Renato Botelho
		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 1e9b4611 Renato Botelho
		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 1e9b4611 Renato Botelho
		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 1e9b4611 Renato Botelho
               do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
128 4f4d63d8 John Fleming
	}
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 a50337c3 Colin Fleming
$closehead = false;
166 3d9bee96 Rafael Lucas
$pgtitle = array(gettext("Services"),gettext("SNMP"));
167 d71fc5d3 jim-p
$shortcut_section = "snmp";
168 4df96eff Scott Ullrich
include("head.inc");
169
170 5b237745 Scott Ullrich
?>
171 91f026b0 ayvis
<script type="text/javascript">
172 a50337c3 Colin Fleming
//<![CDATA[
173 7bc5c543 jim-p
function check_deps() {
174 ea1cea05 Vinicius Coque
	if (jQuery('#hostres').prop('checked') == true) {
175
		jQuery('#mibii').prop('checked',true);
176 7bc5c543 jim-p
	}
177
}
178
179 4f4d63d8 John Fleming
function enable_change(whichone) {
180
181
	if( whichone.name == "trapenable" )
182
        {
183
	    if( whichone.checked == true )
184
	    {
185
	        document.iform.trapserver.disabled = false;
186
	        document.iform.trapserverport.disabled = false;
187 8c3c9dc2 John Fleming
	        document.iform.trapstring.disabled = false;
188 4f4d63d8 John Fleming
	    }
189
	    else
190
	    {
191
                document.iform.trapserver.disabled = true;
192
                document.iform.trapserverport.disabled = true;
193 8c3c9dc2 John Fleming
                document.iform.trapstring.disabled = true;
194 4f4d63d8 John Fleming
	    }
195
	}
196
197
	/* disabled until some docs show up on what this does.
198
	if( whichone.name == "rwenable"  )
199
	{
200
	    if( whichone.checked == true )
201
	    {
202
		document.iform.rwcommunity.disabled = false;
203
	    }
204
	    else
205
	    {
206
		document.iform.rwcommunity.disabled = true;
207
	    }
208
	}
209
	*/
210
211
	if( document.iform.enable.checked == true )
212
	{
213 3805bfdd John Fleming
	    document.iform.pollport.disabled = false;
214 4f4d63d8 John Fleming
	    document.iform.syslocation.disabled = false;
215
	    document.iform.syscontact.disabled = false;
216
	    document.iform.rocommunity.disabled = false;
217
	    document.iform.trapenable.disabled = false;
218
	    /* disabled until some docs show up on what this does.
219
	    document.iform.rwenable.disabled = false;
220
	    if( document.iform.rwenable.checked == true )
221
	    {
222
	        document.iform.rwcommunity.disabled = false;
223
	    }
224
	    else
225
	    {
226
		document.iform.rwcommunity.disabled = true;
227
	    }
228
	    */
229
	    if( document.iform.trapenable.checked == true )
230
	    {
231
                document.iform.trapserver.disabled = false;
232
                document.iform.trapserverport.disabled = false;
233 8c3c9dc2 John Fleming
                document.iform.trapstring.disabled = false;
234 4f4d63d8 John Fleming
	    }
235
	    else
236
	    {
237
                document.iform.trapserver.disabled = true;
238 a21b1cad John Fleming
                document.iform.trapserverport.disabled = true;
239 8c3c9dc2 John Fleming
                document.iform.trapstring.disabled = true;
240 4f4d63d8 John Fleming
	    }
241 3805bfdd John Fleming
	    document.iform.mibii.disabled = false;
242
	    document.iform.netgraph.disabled = false;
243
	    document.iform.pf.disabled = false;
244 95fb49e8 Seth Mos
	    document.iform.hostres.disabled = false;
245 671914b2 jim-p
	    document.iform.ucd.disabled = false;
246
	    document.iform.regex.disabled = false;
247 0bbf8900 Ermal
	    //document.iform.bridge.disabled = false;
248 4f4d63d8 John Fleming
	}
249
	else
250
	{
251 3805bfdd John Fleming
            document.iform.pollport.disabled = true;
252 4f4d63d8 John Fleming
            document.iform.syslocation.disabled = true;
253
            document.iform.syscontact.disabled = true;
254
            document.iform.rocommunity.disabled = true;
255
	    /* 
256
            document.iform.rwenable.disabled = true;
257
	    document.iform.rwcommunity.disabled = true;
258
	    */
259
            document.iform.trapenable.disabled = true;
260
            document.iform.trapserver.disabled = true;
261
            document.iform.trapserverport.disabled = true;
262 8c3c9dc2 John Fleming
            document.iform.trapstring.disabled = true;
263 3805bfdd John Fleming
264
            document.iform.mibii.disabled = true;
265
            document.iform.netgraph.disabled = true;
266
            document.iform.pf.disabled = true;
267 95fb49e8 Seth Mos
            document.iform.hostres.disabled = true;
268 671914b2 jim-p
            document.iform.ucd.disabled = true;
269
            document.iform.regex.disabled = true;
270 0bbf8900 Ermal
            //document.iform.bridge.disabled = true;
271 4f4d63d8 John Fleming
	}
272 5b237745 Scott Ullrich
}
273 a50337c3 Colin Fleming
//]]>
274 5b237745 Scott Ullrich
</script>
275 a50337c3 Colin Fleming
</head>
276 5b237745 Scott Ullrich
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
277
<?php include("fbegin.inc"); ?>
278
<?php if ($input_errors) print_input_errors($input_errors); ?>
279
<?php if ($savemsg) print_info_box($savemsg); ?>
280
            <form action="services_snmp.php" method="post" name="iform" id="iform">
281 a50337c3 Colin Fleming
              <table width="100%" border="0" cellpadding="6" cellspacing="0" summary="snmp">
282 4f4d63d8 John Fleming
283 5b237745 Scott Ullrich
                <tr> 
284 4f4d63d8 John Fleming
  		  <td colspan="2" valign="top" class="optsect_t">
285 a50337c3 Colin Fleming
  			<table border="0" cellspacing="0" cellpadding="0" width="100%" summary="enable">
286 3d9bee96 Rafael Lucas
  			<tr><td class="optsect_s"><strong><?=gettext("SNMP Daemon");?></strong></td>
287 a50337c3 Colin Fleming
					<td align="right" class="optsect_s"><input name="enable" id="enable" type="checkbox" value="yes" <?php if ($pconfig['enable']) echo "checked=\"checked\""; ?> onclick="enable_change(this)" /> <strong><?=gettext("Enable");?></strong></td></tr>
288 4f4d63d8 John Fleming
  			</table></td>
289 5b237745 Scott Ullrich
                </tr>
290 3805bfdd John Fleming
291
                <tr>
292 3d9bee96 Rafael Lucas
                  <td width="22%" valign="top" class="vncellreq"><?=gettext("Polling Port ");?></td>
293 3805bfdd John Fleming
                  <td width="78%" class="vtable">
294 a50337c3 Colin Fleming
                    <input name="pollport" type="text" class="formfld unknown" id="pollport" size="40" value="<?=htmlspecialchars($pconfig['pollport']) ? htmlspecialchars($pconfig['pollport']) : htmlspecialchars(161);?>" />
295 8cd558b6 ayvis
                    <br /><?=gettext("Enter the port to accept polling events on (default 161)");?><br />
296 3805bfdd John Fleming
		  </td>
297
                </tr>
298
299 5b237745 Scott Ullrich
                <tr> 
300 3d9bee96 Rafael Lucas
                  <td width="22%" valign="top" class="vncell"><?=gettext("System location");?></td>
301 5b237745 Scott Ullrich
                  <td width="78%" class="vtable"> 
302 a50337c3 Colin Fleming
                    <input name="syslocation" type="text" class="formfld unknown" id="syslocation" size="40" value="<?=htmlspecialchars($pconfig['syslocation']);?>" />
303 5b237745 Scott Ullrich
                  </td>
304
                </tr>
305 3805bfdd John Fleming
306 5b237745 Scott Ullrich
                <tr> 
307 3d9bee96 Rafael Lucas
                  <td width="22%" valign="top" class="vncell"><?=gettext("System contact");?></td>
308 5b237745 Scott Ullrich
                  <td width="78%" class="vtable"> 
309 a50337c3 Colin Fleming
                    <input name="syscontact" type="text" class="formfld unknown" id="syscontact" size="40" value="<?=htmlspecialchars($pconfig['syscontact']);?>" />
310 5b237745 Scott Ullrich
                  </td>
311
                </tr>
312 3805bfdd John Fleming
313 5b237745 Scott Ullrich
                <tr> 
314 3d9bee96 Rafael Lucas
                  <td width="22%" valign="top" class="vncellreq"><?=gettext("Read Community String");?></td>
315 5b237745 Scott Ullrich
                  <td width="78%" class="vtable"> 
316 a50337c3 Colin Fleming
                    <input name="rocommunity" type="text" class="formfld unknown" id="rocommunity" size="40" value="<?=htmlspecialchars($pconfig['rocommunity']);?>" />
317 8cd558b6 ayvis
		    <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 />
318 3805bfdd John Fleming
		  </td>
319 5b237745 Scott Ullrich
                </tr>
320 4f4d63d8 John Fleming
321
<?php 
322
			/* disabled until some docs show up on what this does.
323
                <tr>
324
                  <td width="22%" valign="top" class="vtable">&nbsp;</td>
325
                  <td width="78%" class="vtable">
326 a50337c3 Colin Fleming
	 	   <input name="rwenable" id="rwenable" type="checkbox" value="yes" <?php if ($pconfig['rwenable']) echo "checked=\"checked\""; ?> onclick="enable_change(this)" />
327 3805bfdd John Fleming
                    <strong>Enable Write Community String</strong>
328
		  </td>
329 4f4d63d8 John Fleming
                </tr>
330
331
		<tr>
332
		  <td width="22%" valign="top" class="vncellreq">Write community string</td>
333
          <td width="78%" class="vtable">
334 a50337c3 Colin Fleming
                    <input name="rwcommunity" type="text" class="formfld unknown" id="rwcommunity" size="40" value="<?=htmlspecialchars($pconfig['rwcommunity']);?>" />
335 8cd558b6 ayvis
		    <br />Please use something other then &quot;private&quot; here<br />
336 3805bfdd John Fleming
		  </td>
337 4f4d63d8 John Fleming
                </tr>
338
		    	*/ 
339
?>
340
341 3184f4e7 Scott Ullrich
		<tr><td>&nbsp;</td></tr>
342
343
                <tr> 
344
  		  <td colspan="2" valign="top" class="optsect_t">
345 a50337c3 Colin Fleming
  			<table border="0" cellspacing="0" cellpadding="0" width="100%" summary="enable">
346 3d9bee96 Rafael Lucas
  			<tr><td class="optsect_s"><strong><?=gettext("SNMP Traps");?></strong></td>
347 a50337c3 Colin Fleming
			<td align="right" class="optsect_s"><input name="trapenable" id="trapenable" type="checkbox" value="yes" <?php if ($pconfig['trapenable']) echo "checked=\"checked\""; ?> onclick="enable_change(this)" /> <strong><?=gettext("Enable");?></strong></td></tr>
348 3184f4e7 Scott Ullrich
  			</table></td>
349
                </tr>
350
351
352 4f4d63d8 John Fleming
                <tr>
353 3d9bee96 Rafael Lucas
                  <td width="22%" valign="top" class="vncellreq"><?=gettext("Trap server");?></td>
354 4f4d63d8 John Fleming
                  <td width="78%" class="vtable">
355 a50337c3 Colin Fleming
                    <input name="trapserver" type="text" class="formfld unknown" id="trapserver" size="40" value="<?=htmlspecialchars($pconfig['trapserver']);?>" />
356 8cd558b6 ayvis
                    <br /><?=gettext("Enter trap server name");?><br />
357 3805bfdd John Fleming
		  </td>
358 4f4d63d8 John Fleming
                </tr>
359
360
                <tr>
361 3d9bee96 Rafael Lucas
                  <td width="22%" valign="top" class="vncellreq"><?=gettext("Trap server port ");?></td>
362 4f4d63d8 John Fleming
                  <td width="78%" class="vtable">
363 a50337c3 Colin Fleming
                    <input name="trapserverport" type="text" class="formfld unknown" id="trapserverport" size="40" value="<?=htmlspecialchars($pconfig['trapserverport']) ? htmlspecialchars($pconfig['trapserverport']) : htmlspecialchars(162);?>" />
364 8cd558b6 ayvis
                    <br /><?=gettext("Enter the port to send the traps to (default 162)");?><br />
365 3805bfdd John Fleming
		  </td>
366 4f4d63d8 John Fleming
                </tr>
367 3805bfdd John Fleming
368 8c3c9dc2 John Fleming
                <tr>
369 3d9bee96 Rafael Lucas
                  <td width="22%" valign="top" class="vncellreq"><?=gettext("Enter the SNMP trap string");?></td>
370 8c3c9dc2 John Fleming
                  <td width="78%" class="vtable">
371 a50337c3 Colin Fleming
                    <input name="trapstring" type="text" class="formfld unknown" id="trapstring" size="40" value="<?=htmlspecialchars($pconfig['trapstring']);?>" />
372 8cd558b6 ayvis
                    <br /><?=gettext("Trap string");?><br />
373 3805bfdd John Fleming
		  </td>
374 8c3c9dc2 John Fleming
                </tr>
375
376 ba73e2a3 Scott Ullrich
		<tr><td>&nbsp;</td></tr>
377
378
                <tr> 
379
  		  <td colspan="2" valign="top" class="optsect_t">
380 a50337c3 Colin Fleming
  			<table border="0" cellspacing="0" cellpadding="0" width="100%" summary="modules">
381 3d9bee96 Rafael Lucas
  			<tr><td class="optsect_s"><strong><?=gettext("Modules");?></strong></td>
382 ba73e2a3 Scott Ullrich
			<td align="right" class="optsect_s">&nbsp;</td></tr>
383
  			</table></td>
384
                </tr>
385
386 3805bfdd John Fleming
		<tr>
387 3d9bee96 Rafael Lucas
		  <td width="22%" valign="top" class="vncellreq"><?=gettext("SNMP Modules");?></td>
388 3805bfdd John Fleming
		  <td width="78%" class="vtable">
389 a50337c3 Colin Fleming
		    <input name="mibii" type="checkbox" id="mibii" value="yes" onclick="check_deps()" <?php if ($pconfig['mibii']) echo "checked=\"checked\""; ?> /><?=gettext("MibII"); ?>
390 95fb49e8 Seth Mos
		    <br />
391 a50337c3 Colin Fleming
		    <input name="netgraph" type="checkbox" id="netgraph" value="yes" <?php if ($pconfig['netgraph']) echo "checked=\"checked\""; ?> /><?=gettext("Netgraph"); ?>
392 95fb49e8 Seth Mos
		    <br />
393 a50337c3 Colin Fleming
		    <input name="pf" type="checkbox" id="pf" value="yes" <?php if ($pconfig['pf']) echo "checked=\"checked\""; ?> /><?=gettext("PF"); ?>
394 95fb49e8 Seth Mos
		    <br />
395 a50337c3 Colin Fleming
		    <input name="hostres" type="checkbox" id="hostres" value="yes" onclick="check_deps()" <?php if ($pconfig['hostres']) echo "checked=\"checked\""; ?> /><?=gettext("Host Resources (Requires MibII)");?>
396 671914b2 jim-p
		    <br />
397 a50337c3 Colin Fleming
		    <input name="ucd" type="checkbox" id="ucd" value="yes" <?php if ($pconfig['ucd']) echo "checked=\"checked\""; ?> /><?=gettext("UCD"); ?>
398 671914b2 jim-p
		    <br />
399 a50337c3 Colin Fleming
		    <input name="regex" type="checkbox" id="regex" value="yes" <?php if ($pconfig['regex']) echo "checked=\"checked\""; ?> /><?=gettext("Regex"); ?>
400 671914b2 jim-p
		    <br />
401 3805bfdd John Fleming
		  </td>
402
		</tr>
403 c82b2c3f jim-p
404
		<tr><td>&nbsp;</td></tr>
405
406
		<tr>
407
			<td colspan="2" valign="top" class="optsect_t">
408 a50337c3 Colin Fleming
			<table border="0" cellspacing="0" cellpadding="0" width="100%" summary="interface">
409 c82b2c3f jim-p
				<tr><td class="optsect_s"><strong><?=gettext("Interface Binding");?></strong></td>
410
				<td align="right" class="optsect_s">&nbsp;</td></tr>
411
			</table></td>
412
		</tr>
413
		<tr>
414
			<td width="22%" valign="top" class="vncellreq"><?=gettext("Bind Interface"); ?></td>
415
			<td width="78%" class="vtable">
416
				<select name="bindip" class="formselect">
417
					<option value="">All</option>
418
				<?php  $listenips = get_possible_listen_ips();
419
					foreach ($listenips as $lip):
420
						$selected = "";
421
						if ($lip['value'] == $pconfig['bindip'])
422 a50337c3 Colin Fleming
							$selected = "selected=\"selected\"";
423 c82b2c3f jim-p
				?>
424
					<option value="<?=$lip['value'];?>" <?=$selected;?>>
425
						<?=htmlspecialchars($lip['name']);?>
426
					</option>
427
				<?php endforeach; ?>
428 a50337c3 Colin Fleming
				</select>
429
			</td>
430 c82b2c3f jim-p
		</tr>
431 612bb4f3 Scott Ullrich
		 <tr> 
432
		   <td width="22%" valign="top">&nbsp;</td>
433
		   <td width="78%"> 
434 a50337c3 Colin Fleming
		     <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" onclick="enable_change(true)" />
435 612bb4f3 Scott Ullrich
		   </td>
436
		 </tr>
437
		</table>
438 5b237745 Scott Ullrich
</form>
439 91f026b0 ayvis
<script type="text/javascript">
440 a50337c3 Colin Fleming
//<![CDATA[
441 4f4d63d8 John Fleming
enable_change(this);
442 a50337c3 Colin Fleming
//]]>
443 5b237745 Scott Ullrich
</script>
444
<?php include("fend.inc"); ?>
445
</body>
446
</html>