Project

General

Profile

Download (3.07 KB) Statistics
| Branch: | Tag: | Revision:
1 4d875b4f Scott Ullrich
<?php
2 b46bfcf5 Bill Marquette
/* $Id$ */
3 5b237745 Scott Ullrich
/*
4
	diag_logs_dhcp.php
5 4d875b4f Scott Ullrich
	Copyright (C) 2004 Scott Ullrich
6
	All rights reserved.
7
8
	originially part of m0n0wall (http://m0n0.ch/wall)
9 5b237745 Scott Ullrich
	Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
10
	All rights reserved.
11 4d875b4f Scott Ullrich
12 5b237745 Scott Ullrich
	Redistribution and use in source and binary forms, with or without
13
	modification, are permitted provided that the following conditions are met:
14 4d875b4f Scott Ullrich
15 5b237745 Scott Ullrich
	1. Redistributions of source code must retain the above copyright notice,
16
	   this list of conditions and the following disclaimer.
17 4d875b4f Scott Ullrich
18 5b237745 Scott Ullrich
	2. Redistributions in binary form must reproduce the above copyright
19
	   notice, this list of conditions and the following disclaimer in the
20
	   documentation and/or other materials provided with the distribution.
21 4d875b4f Scott Ullrich
22 5b237745 Scott Ullrich
	THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
23
	INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
24
	AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25
	AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
26
	OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27
	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28
	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29
	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30
	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31
	POSSIBILITY OF SUCH DAMAGE.
32
*/
33
34
require("guiconfig.inc");
35
36 963d5343 Bill Marquette
$dhcpd_logfile = "{$g['varlog_path']}/dhcpd.log";
37
38 5b237745 Scott Ullrich
$nentries = $config['syslog']['nentries'];
39
if (!$nentries)
40
	$nentries = 50;
41
42
if ($_POST['clear']) {
43 963d5343 Bill Marquette
	exec("/usr/sbin/clog -i -s 262144 {$dhcpd_logfile}");
44 5b237745 Scott Ullrich
}
45
46 d88c6a9f Scott Ullrich
$pgtitle = array("Status","System logs","DHCP");
47 b63695db Scott Ullrich
include("head.inc");
48
49 5b237745 Scott Ullrich
?>
50
51
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
52
<?php include("fbegin.inc"); ?>
53
<table width="100%" border="0" cellpadding="0" cellspacing="0">
54
  <tr><td>
55 b63695db Scott Ullrich
<?php
56
	$tab_array = array();
57 9972f533 Bill Marquette
	$tab_array[] = array("System", false, "diag_logs.php");
58
	$tab_array[] = array("Firewall", false, "diag_logs_filter.php");
59
	$tab_array[] = array("DHCP", true, "diag_logs_dhcp.php");
60
	$tab_array[] = array("Portal Auth", false, "diag_logs_auth.php");
61 0f266b2e Chris Buechler
	$tab_array[] = array("IPsec VPN", false, "diag_logs_ipsec.php");
62 9972f533 Bill Marquette
	$tab_array[] = array("PPTP VPN", false, "diag_logs_vpn.php");
63 ba0a9384 Scott Ullrich
	$tab_array[] = array("Load Balancer", false, "diag_logs_slbd.php");
64 03491df0 Scott Ullrich
	$tab_array[] = array("OpenVPN", false, "diag_logs_openvpn.php");
65 18330d38 Scott Ullrich
	$tab_array[] = array("OpenNTPD", false, "diag_logs_ntpd.php");
66 9972f533 Bill Marquette
	$tab_array[] = array("Settings", false, "diag_logs_settings.php");
67 b63695db Scott Ullrich
	display_top_tabs($tab_array);
68
?>
69 5b237745 Scott Ullrich
  </td></tr>
70 4d875b4f Scott Ullrich
  <tr>
71 0f10aee4 Bill Marquette
    <td>
72
	<div id="mainarea">
73
		<table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0">
74 4d875b4f Scott Ullrich
		  <tr>
75
			<td colspan="2" class="listtopic">
76 5b237745 Scott Ullrich
			  Last <?=$nentries;?> DHCP service log entries</td>
77
		  </tr>
78 963d5343 Bill Marquette
		  <?php dump_clog($dhcpd_logfile, $nentries); ?>
79 0f10aee4 Bill Marquette
		<tr><td><br><form action="diag_logs_dhcp.php" method="post">
80
<input name="clear" type="submit" class="formbtn" value="Clear log"></td></tr>
81 5b237745 Scott Ullrich
		</table>
82 0f10aee4 Bill Marquette
	</div>
83 5b237745 Scott Ullrich
</form>
84
	</td>
85
  </tr>
86
</table>
87
<?php include("fend.inc"); ?>
88
</body>
89
</html>