1 |
8cccee1c
|
Scott Ullrich
|
<?php
|
2 |
2bdf4a03
|
Scott Ullrich
|
/* $Id$ */
|
3 |
5b237745
|
Scott Ullrich
|
/*
|
4 |
|
|
status_interfaces.php
|
5 |
0d7b21de
|
sullrich
|
part of pfSense
|
6 |
|
|
Copyright (C) 2009 Scott Ullrich <sullrich@gmail.com>.
|
7 |
8c3e8725
|
Scott Ullrich
|
All rights reserved.
|
8 |
8cccee1c
|
Scott Ullrich
|
|
9 |
8c3e8725
|
Scott Ullrich
|
originally part of m0n0wall (http://m0n0.ch/wall)
|
10 |
c26e2cf0
|
Scott Ullrich
|
Copyright (C) 2003-2005 Manuel Kasper <mk@neon1.net>.
|
11 |
5b237745
|
Scott Ullrich
|
All rights reserved.
|
12 |
8cccee1c
|
Scott Ullrich
|
|
13 |
5b237745
|
Scott Ullrich
|
Redistribution and use in source and binary forms, with or without
|
14 |
|
|
modification, are permitted provided that the following conditions are met:
|
15 |
8cccee1c
|
Scott Ullrich
|
|
16 |
5b237745
|
Scott Ullrich
|
1. Redistributions of source code must retain the above copyright notice,
|
17 |
|
|
this list of conditions and the following disclaimer.
|
18 |
8cccee1c
|
Scott Ullrich
|
|
19 |
5b237745
|
Scott Ullrich
|
2. Redistributions in binary form must reproduce the above copyright
|
20 |
|
|
notice, this list of conditions and the following disclaimer in the
|
21 |
|
|
documentation and/or other materials provided with the distribution.
|
22 |
8cccee1c
|
Scott Ullrich
|
|
23 |
5b237745
|
Scott Ullrich
|
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
24 |
|
|
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
25 |
|
|
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
26 |
|
|
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
27 |
|
|
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
28 |
|
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
29 |
|
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
30 |
|
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
31 |
|
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
32 |
|
|
POSSIBILITY OF SUCH DAMAGE.
|
33 |
|
|
*/
|
34 |
1d333258
|
Scott Ullrich
|
/*
|
35 |
|
|
pfSense_MODULE: interfaces
|
36 |
|
|
*/
|
37 |
5b237745
|
Scott Ullrich
|
|
38 |
6b07c15a
|
Matthew Grooms
|
##|+PRIV
|
39 |
|
|
##|*IDENT=page-status-interfaces
|
40 |
|
|
##|*NAME=Status: Interfaces page
|
41 |
|
|
##|*DESCR=Allow access to the 'Status: Interfaces' page.
|
42 |
|
|
##|*MATCH=status_interfaces.php*
|
43 |
|
|
##|-PRIV
|
44 |
|
|
|
45 |
51caa77a
|
Scott Ullrich
|
require_once("guiconfig.inc");
|
46 |
e8f35171
|
Ermal
|
require_once("shaper.inc");
|
47 |
c9a98f18
|
Phil Davis
|
require_once("filter.inc");
|
48 |
5b237745
|
Scott Ullrich
|
|
49 |
07c17911
|
Ermal Luçi
|
if ($_GET['if']) {
|
50 |
|
|
$interface = $_GET['if'];
|
51 |
|
|
if ($_GET['action'] == "Disconnect" || $_GET['action'] == "Release") {
|
52 |
80bf3f4a
|
Ermal Luçi
|
interface_bring_down($interface);
|
53 |
07c17911
|
Ermal Luçi
|
} else if ($_GET['action'] == "Connect" || $_GET['action'] == "Renew") {
|
54 |
80bf3f4a
|
Ermal Luçi
|
interface_configure($interface);
|
55 |
c26e2cf0
|
Scott Ullrich
|
}
|
56 |
56e1d16e
|
Ermal Lu?i
|
header("Location: status_interfaces.php");
|
57 |
|
|
exit;
|
58 |
c26e2cf0
|
Scott Ullrich
|
}
|
59 |
|
|
|
60 |
ee644822
|
Carlos Eduardo Ramos
|
$pgtitle = array(gettext("Status"),gettext("Interfaces"));
|
61 |
b32dd0a6
|
jim-p
|
$shortcut_section = "interfaces";
|
62 |
4df96eff
|
Scott Ullrich
|
include("head.inc");
|
63 |
|
|
|
64 |
5b237745
|
Scott Ullrich
|
?>
|
65 |
8cccee1c
|
Scott Ullrich
|
|
66 |
|
|
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
|
67 |
5b237745
|
Scott Ullrich
|
<?php include("fbegin.inc"); ?>
|
68 |
319f65ec
|
Colin Fleming
|
<table width="100%" border="0" cellspacing="0" cellpadding="0" summary="status interfaces">
|
69 |
0d7b21de
|
sullrich
|
<?php
|
70 |
|
|
$i = 0;
|
71 |
|
|
$ifdescrs = get_configured_interface_with_descr(false, true);
|
72 |
|
|
foreach ($ifdescrs as $ifdescr => $ifname):
|
73 |
|
|
$ifinfo = get_interface_info($ifdescr);
|
74 |
57f2840e
|
Evgeny
|
// Load MAC-Manufacturer table
|
75 |
|
|
$mac_man = load_mac_manufacturer_table();
|
76 |
0d7b21de
|
sullrich
|
?>
|
77 |
|
|
<?php if ($i): ?>
|
78 |
|
|
<tr>
|
79 |
|
|
<td colspan="8" class="list" height="12"></td>
|
80 |
|
|
</tr>
|
81 |
|
|
<?php endif; ?>
|
82 |
|
|
<tr>
|
83 |
|
|
<td colspan="2" class="listtopic">
|
84 |
e2ddbda7
|
Phil Davis
|
<?=htmlspecialchars($ifname);?> <?=gettext("interface"); ?> (<?=htmlspecialchars($ifdescr);?>, <?=htmlspecialchars($ifinfo['hwif']);?>)
|
85 |
0d7b21de
|
sullrich
|
</td>
|
86 |
|
|
</tr>
|
87 |
|
|
<tr>
|
88 |
ee644822
|
Carlos Eduardo Ramos
|
<td width="22%" class="vncellt"><?=gettext("Status"); ?></td>
|
89 |
0d7b21de
|
sullrich
|
<td width="78%" class="listr">
|
90 |
|
|
<?=htmlspecialchars($ifinfo['status']);?>
|
91 |
|
|
</td>
|
92 |
|
|
</tr>
|
93 |
|
|
<?php if ($ifinfo['dhcplink']): ?>
|
94 |
|
|
<tr>
|
95 |
|
|
<td width="22%" class="vncellt">
|
96 |
|
|
DHCP
|
97 |
|
|
</td>
|
98 |
|
|
<td width="78%" class="listr">
|
99 |
|
|
<?=htmlspecialchars($ifinfo['dhcplink']);?>
|
100 |
|
|
<?php if ($ifinfo['dhcplink'] == "up"): ?>
|
101 |
319f65ec
|
Colin Fleming
|
<a href="status_interfaces.php?action=Release&if=<?php echo $ifdescr; ?>">
|
102 |
|
|
<input type="button" name="<?php echo $ifdescr; ?>" value="<?=gettext("Release");?>" class="formbtns" />
|
103 |
0d7b21de
|
sullrich
|
<?php else: ?>
|
104 |
319f65ec
|
Colin Fleming
|
<a href="status_interfaces.php?action=Renew&if=<?php echo $ifdescr; ?>">
|
105 |
|
|
<input type="button" name="<?php echo $ifdescr; ?>" value="<?=gettext("Renew");?>" class="formbtns" />
|
106 |
0d7b21de
|
sullrich
|
<?php endif; ?>
|
107 |
|
|
</a>
|
108 |
|
|
</td>
|
109 |
|
|
</tr>
|
110 |
1132ff35
|
smos
|
<?php endif;
|
111 |
|
|
if ($ifinfo['dhcp6link']): ?>
|
112 |
|
|
<tr>
|
113 |
|
|
<td width="22%" class="vncellt">
|
114 |
|
|
DHCP6
|
115 |
|
|
</td>
|
116 |
|
|
<td width="78%" class="listr">
|
117 |
|
|
<?=htmlspecialchars($ifinfo['dhcp6link']);?>
|
118 |
|
|
<?php if ($ifinfo['dhcp6link'] == "up"): ?>
|
119 |
319f65ec
|
Colin Fleming
|
<a href="status_interfaces.php?action=Release&if=<?php echo $ifdescr; ?>">
|
120 |
|
|
<input type="button" name="<?php echo $ifdescr; ?>" value="<?=gettext("Release");?>" class="formbtns" />
|
121 |
1132ff35
|
smos
|
<?php else: ?>
|
122 |
319f65ec
|
Colin Fleming
|
<a href="status_interfaces.php?action=Renew&if=<?php echo $ifdescr; ?>">
|
123 |
|
|
<input type="button" name="<?php echo $ifdescr; ?>" value="<?=gettext("Renew");?>" class="formbtns" />
|
124 |
1132ff35
|
smos
|
<?php endif; ?>
|
125 |
|
|
</a>
|
126 |
|
|
</td>
|
127 |
|
|
</tr>
|
128 |
0d7b21de
|
sullrich
|
<?php endif; if ($ifinfo['pppoelink']): ?>
|
129 |
|
|
<tr>
|
130 |
ee644822
|
Carlos Eduardo Ramos
|
<td width="22%" class="vncellt"><?=gettext("PPPoE"); ?></td>
|
131 |
0d7b21de
|
sullrich
|
<td width="78%" class="listr">
|
132 |
|
|
<?=htmlspecialchars($ifinfo['pppoelink']);?>
|
133 |
|
|
<?php if ($ifinfo['pppoelink'] == "up"): ?>
|
134 |
319f65ec
|
Colin Fleming
|
<a href="status_interfaces.php?action=Disconnect&if=<?php echo $ifdescr; ?>">
|
135 |
|
|
<input type="button" name="<?php echo $ifdescr; ?>" value="<?=gettext("Disconnect");?>" class="formbtns" />
|
136 |
0d7b21de
|
sullrich
|
<?php else: ?>
|
137 |
319f65ec
|
Colin Fleming
|
<a href="status_interfaces.php?action=Connect&if=<?php echo $ifdescr; ?>">
|
138 |
|
|
<input type="button" name="<?php echo $ifdescr; ?>" value="<?=gettext("Connect");?>" class="formbtns" />
|
139 |
0d7b21de
|
sullrich
|
<?php endif; ?>
|
140 |
|
|
</a>
|
141 |
|
|
</td>
|
142 |
|
|
</tr>
|
143 |
|
|
<?php endif; if ($ifinfo['pptplink']): ?>
|
144 |
|
|
<tr>
|
145 |
ee644822
|
Carlos Eduardo Ramos
|
<td width="22%" class="vncellt"><?=gettext("PPTP"); ?></td>
|
146 |
0d7b21de
|
sullrich
|
<td width="78%" class="listr">
|
147 |
|
|
<?=htmlspecialchars($ifinfo['pptplink']);?>
|
148 |
|
|
<?php if ($ifinfo['pptplink'] == "up"): ?>
|
149 |
319f65ec
|
Colin Fleming
|
<a href="status_interfaces.php?action=Disconnect&if=<?php echo $ifdescr; ?>">
|
150 |
|
|
<input type="button" name="<?php echo $ifdescr; ?>" value="<?=gettext("Disconnect");?>" class="formbtns" />
|
151 |
0d7b21de
|
sullrich
|
<?php else: ?>
|
152 |
319f65ec
|
Colin Fleming
|
<a href="status_interfaces.php?action=Connect&if=<?php echo $ifdescr; ?>">
|
153 |
|
|
<input type="button" name="<?php echo $ifdescr; ?>" value="<?=gettext("Connect");?>" class="formbtns" />
|
154 |
0d7b21de
|
sullrich
|
<?php endif; ?>
|
155 |
|
|
</a>
|
156 |
|
|
</td>
|
157 |
|
|
</tr>
|
158 |
633de329
|
gnhb
|
<?php endif; if ($ifinfo['l2tplink']): ?>
|
159 |
|
|
<tr>
|
160 |
|
|
<td width="22%" class="vncellt"><?=gettext("L2TP"); ?></td>
|
161 |
|
|
<td width="78%" class="listr">
|
162 |
|
|
<?=htmlspecialchars($ifinfo['l2tplink']);?>
|
163 |
|
|
<?php if ($ifinfo['l2tplink'] == "up"): ?>
|
164 |
319f65ec
|
Colin Fleming
|
<a href="status_interfaces.php?action=Disconnect&if=<?php echo $ifdescr; ?>">
|
165 |
|
|
<input type="button" name="<?php echo $ifdescr; ?>" value="<?=gettext("Disconnect");?>" class="formbtns" />
|
166 |
633de329
|
gnhb
|
<?php else: ?>
|
167 |
319f65ec
|
Colin Fleming
|
<a href="status_interfaces.php?action=Connect&if=<?php echo $ifdescr; ?>">
|
168 |
|
|
<input type="button" name="<?php echo $ifdescr; ?>" value="<?=gettext("Connect");?>" class="formbtns" />
|
169 |
0d7b21de
|
sullrich
|
<?php endif; ?>
|
170 |
|
|
</a>
|
171 |
|
|
</td>
|
172 |
|
|
</tr>
|
173 |
|
|
<?php endif; if ($ifinfo['ppplink']): ?>
|
174 |
|
|
<tr>
|
175 |
ee644822
|
Carlos Eduardo Ramos
|
<td width="22%" class="vncellt"><?=gettext("PPP"); ?></td>
|
176 |
0d7b21de
|
sullrich
|
<td width="78%" class="listr">
|
177 |
c90f2471
|
gnhb
|
<?=htmlspecialchars($ifinfo['pppinfo']);?>
|
178 |
|
|
<?php if ($ifinfo['ppplink'] == "up"): ?>
|
179 |
319f65ec
|
Colin Fleming
|
<a href="status_interfaces.php?action=Disconnect&if=<?php echo $ifdescr; ?>">
|
180 |
|
|
<input type="button" name="<?php echo $ifdescr; ?>" value="<?=gettext("Disconnect");?>" class="formbtns" />
|
181 |
0d7b21de
|
sullrich
|
<?php else: ?>
|
182 |
c90f2471
|
gnhb
|
<?php if (!$ifinfo['nodevice']): ?>
|
183 |
319f65ec
|
Colin Fleming
|
<a href="status_interfaces.php?action=Connect&if=<?php echo $ifdescr; ?>">
|
184 |
|
|
<input type="button" name="<?php echo $ifdescr; ?>" value="<?=gettext("Connect");?>" class="formbtns" />
|
185 |
9ebe7028
|
gnhb
|
<?php endif; ?>
|
186 |
0d7b21de
|
sullrich
|
<?php endif; ?>
|
187 |
|
|
</a>
|
188 |
|
|
</td>
|
189 |
|
|
</tr>
|
190 |
8eb2f33a
|
Scott Ullrich
|
<?php endif; if ($ifinfo['ppp_uptime'] || $ifinfo['ppp_uptime_accumulated']): ?>
|
191 |
|
|
<tr>
|
192 |
c8927bfb
|
Rafael Lucas
|
<td width="22%" class="vncellt"><?=gettext("Uptime ");?><?php if ($ifinfo['ppp_uptime_accumulated']) echo "(historical)"; ?></td>
|
193 |
59db783a
|
gnhb
|
<td width="78%" class="listr">
|
194 |
|
|
<?=htmlspecialchars($ifinfo['ppp_uptime']);?> <?=htmlspecialchars($ifinfo['ppp_uptime_accumulated']);?>
|
195 |
|
|
</td>
|
196 |
8eb2f33a
|
Scott Ullrich
|
</tr>
|
197 |
5e589685
|
smos
|
<?php endif; if ($ifinfo['cell_rssi']): ?>
|
198 |
|
|
<tr>
|
199 |
|
|
<td width="22%" class="vncellt"><?=gettext("Cell Signal (RSSI)");?></td>
|
200 |
|
|
<td width="78%" class="listr">
|
201 |
d23e157a
|
smos
|
<?=htmlspecialchars($ifinfo['cell_rssi']);?>
|
202 |
5e589685
|
smos
|
</td>
|
203 |
|
|
</tr>
|
204 |
99f95f7d
|
smos
|
<?php endif; if ($ifinfo['cell_mode']): ?>
|
205 |
|
|
<tr>
|
206 |
|
|
<td width="22%" class="vncellt"><?=gettext("Cell Mode");?></td>
|
207 |
|
|
<td width="78%" class="listr">
|
208 |
|
|
<?=htmlspecialchars($ifinfo['cell_mode']);?>
|
209 |
|
|
</td>
|
210 |
|
|
</tr>
|
211 |
d23e157a
|
smos
|
<?php endif; if ($ifinfo['cell_simstate']): ?>
|
212 |
|
|
<tr>
|
213 |
|
|
<td width="22%" class="vncellt"><?=gettext("Cell SIM State");?></td>
|
214 |
|
|
<td width="78%" class="listr">
|
215 |
|
|
<?=htmlspecialchars($ifinfo['cell_simstate']);?>
|
216 |
|
|
</td>
|
217 |
|
|
</tr>
|
218 |
|
|
<?php endif; if ($ifinfo['cell_service']): ?>
|
219 |
|
|
<tr>
|
220 |
|
|
<td width="22%" class="vncellt"><?=gettext("Cell Service");?></td>
|
221 |
|
|
<td width="78%" class="listr">
|
222 |
|
|
<?=htmlspecialchars($ifinfo['cell_service']);?>
|
223 |
|
|
</td>
|
224 |
|
|
</tr>
|
225 |
|
|
<?php endif; if ($ifinfo['cell_bwupstream']): ?>
|
226 |
5e589685
|
smos
|
<tr>
|
227 |
|
|
<td width="22%" class="vncellt"><?=gettext("Cell Upstream");?></td>
|
228 |
d23e157a
|
smos
|
<td width="78%" class="listr">
|
229 |
|
|
<?=htmlspecialchars($ifinfo['cell_bwupstream']);?> kbit/s
|
230 |
|
|
</td>
|
231 |
|
|
</tr>
|
232 |
|
|
<?php endif; if ($ifinfo['cell_bwdownstream']): ?>
|
233 |
|
|
<tr>
|
234 |
|
|
<td width="22%" class="vncellt"><?=gettext("Cell Downstream");?></td>
|
235 |
|
|
<td width="78%" class="listr">
|
236 |
|
|
<?=htmlspecialchars($ifinfo['cell_bwdownstream']);?> kbit/s
|
237 |
|
|
</td>
|
238 |
|
|
</tr>
|
239 |
|
|
<?php endif; if ($ifinfo['cell_upstream']): ?>
|
240 |
|
|
<tr>
|
241 |
|
|
<td width="22%" class="vncellt"><?=gettext("Cell Current Up");?></td>
|
242 |
5e589685
|
smos
|
<td width="78%" class="listr">
|
243 |
|
|
<?=htmlspecialchars($ifinfo['cell_upstream']);?> kbit/s
|
244 |
|
|
</td>
|
245 |
|
|
</tr>
|
246 |
|
|
<?php endif; if ($ifinfo['cell_downstream']): ?>
|
247 |
|
|
<tr>
|
248 |
d23e157a
|
smos
|
<td width="22%" class="vncellt"><?=gettext("Cell Current Down");?></td>
|
249 |
5e589685
|
smos
|
<td width="78%" class="listr">
|
250 |
|
|
<?=htmlspecialchars($ifinfo['cell_downstream']);?> kbit/s
|
251 |
|
|
</td>
|
252 |
|
|
</tr>
|
253 |
0d7b21de
|
sullrich
|
<?php endif; if ($ifinfo['macaddr']): ?>
|
254 |
|
|
<tr>
|
255 |
c8927bfb
|
Rafael Lucas
|
<td width="22%" class="vncellt"><?=gettext("MAC address");?></td>
|
256 |
0d7b21de
|
sullrich
|
<td width="78%" class="listr">
|
257 |
57f2840e
|
Evgeny
|
<?php
|
258 |
|
|
$mac=$ifinfo['macaddr'];
|
259 |
|
|
$mac_hi = strtoupper($mac[0] . $mac[1] . $mac[3] . $mac[4] . $mac[6] . $mac[7]);
|
260 |
81debd44
|
Chris Buechler
|
if(isset($mac_man[$mac_hi])){ print "<span>" . $mac . " - " . htmlspecialchars($mac_man[$mac_hi]); print "</span>"; }
|
261 |
57f2840e
|
Evgeny
|
else {print htmlspecialchars($mac);}
|
262 |
|
|
?>
|
263 |
0d7b21de
|
sullrich
|
</td>
|
264 |
|
|
</tr>
|
265 |
|
|
<?php endif; if ($ifinfo['status'] != "down"): ?>
|
266 |
|
|
<?php if ($ifinfo['dhcplink'] != "down" && $ifinfo['pppoelink'] != "down" && $ifinfo['pptplink'] != "down"): ?>
|
267 |
|
|
<?php if ($ifinfo['ipaddr']): ?>
|
268 |
|
|
<tr>
|
269 |
bbcc0f9c
|
Seth Mos
|
<td width="22%" class="vncellt"><?=gettext("IPv4 address");?></td>
|
270 |
0d7b21de
|
sullrich
|
<td width="78%" class="listr">
|
271 |
|
|
<?=htmlspecialchars($ifinfo['ipaddr']);?>
|
272 |
|
|
|
273 |
|
|
</td>
|
274 |
|
|
</tr>
|
275 |
|
|
<?php endif; ?><?php if ($ifinfo['subnet']): ?>
|
276 |
|
|
<tr>
|
277 |
bbcc0f9c
|
Seth Mos
|
<td width="22%" class="vncellt"><?=gettext("Subnet mask IPv4");?></td>
|
278 |
0d7b21de
|
sullrich
|
<td width="78%" class="listr">
|
279 |
|
|
<?=htmlspecialchars($ifinfo['subnet']);?>
|
280 |
|
|
</td>
|
281 |
|
|
</tr>
|
282 |
|
|
<?php endif; ?><?php if ($ifinfo['gateway']): ?>
|
283 |
|
|
<tr>
|
284 |
bbcc0f9c
|
Seth Mos
|
<td width="22%" class="vncellt"><?=gettext("Gateway IPv4");?></td>
|
285 |
0d7b21de
|
sullrich
|
<td width="78%" class="listr">
|
286 |
dde9a4fc
|
Seth Mos
|
<?=htmlspecialchars($config['interfaces'][$ifdescr]['gateway']);?>
|
287 |
|
|
<?=htmlspecialchars($ifinfo['gateway']);?>
|
288 |
0d7b21de
|
sullrich
|
</td>
|
289 |
|
|
</tr>
|
290 |
58418355
|
smos
|
<?php endif; ?><?php if ($ifinfo['linklocal']): ?>
|
291 |
|
|
<tr>
|
292 |
|
|
<td width="22%" class="vncellt"><?=gettext("IPv6 Link Local");?></td>
|
293 |
|
|
<td width="78%" class="listr">
|
294 |
|
|
<?=htmlspecialchars($ifinfo['linklocal']);?>
|
295 |
|
|
|
296 |
|
|
</td>
|
297 |
|
|
</tr>
|
298 |
|
|
<?php endif; ?><?php if ($ifinfo['ipaddrv6']): ?>
|
299 |
bbcc0f9c
|
Seth Mos
|
<tr>
|
300 |
|
|
<td width="22%" class="vncellt"><?=gettext("IPv6 address");?></td>
|
301 |
|
|
<td width="78%" class="listr">
|
302 |
|
|
<?=htmlspecialchars($ifinfo['ipaddrv6']);?>
|
303 |
|
|
|
304 |
|
|
</td>
|
305 |
|
|
</tr>
|
306 |
|
|
<?php endif; ?><?php if ($ifinfo['subnetv6']): ?>
|
307 |
|
|
<tr>
|
308 |
|
|
<td width="22%" class="vncellt"><?=gettext("Subnet mask IPv6");?></td>
|
309 |
|
|
<td width="78%" class="listr">
|
310 |
|
|
<?=htmlspecialchars($ifinfo['subnetv6']);?>
|
311 |
|
|
</td>
|
312 |
|
|
</tr>
|
313 |
|
|
<?php endif; ?><?php if ($ifinfo['gatewayv6']): ?>
|
314 |
|
|
<tr>
|
315 |
|
|
<td width="22%" class="vncellt"><?=gettext("Gateway IPv6");?></td>
|
316 |
|
|
<td width="78%" class="listr">
|
317 |
|
|
<?=htmlspecialchars($config['interfaces'][$ifdescr]['gatewayv6']);?>
|
318 |
|
|
<?=htmlspecialchars($ifinfo['gatewayv6']);?>
|
319 |
|
|
</td>
|
320 |
|
|
</tr>
|
321 |
0d7b21de
|
sullrich
|
<?php endif; if ($ifdescr == "wan" && file_exists("{$g['varetc_path']}/resolv.conf")): ?>
|
322 |
|
|
<tr>
|
323 |
c8927bfb
|
Rafael Lucas
|
<td width="22%" class="vncellt"><?=gettext("ISP DNS servers");?></td>
|
324 |
0d7b21de
|
sullrich
|
<td width="78%" class="listr">
|
325 |
6205a304
|
Scott Ullrich
|
<?php
|
326 |
|
|
$dns_servers = get_dns_servers();
|
327 |
|
|
foreach($dns_servers as $dns) {
|
328 |
319f65ec
|
Colin Fleming
|
echo "{$dns}<br/>";
|
329 |
f559eaf6
|
Scott Ullrich
|
}
|
330 |
6205a304
|
Scott Ullrich
|
?>
|
331 |
|
|
</td>
|
332 |
0d7b21de
|
sullrich
|
</tr>
|
333 |
|
|
<?php endif; endif; if ($ifinfo['media']): ?>
|
334 |
|
|
<tr>
|
335 |
c8927bfb
|
Rafael Lucas
|
<td width="22%" class="vncellt"><?=gettext("Media");?></td>
|
336 |
0d7b21de
|
sullrich
|
<td width="78%" class="listr">
|
337 |
|
|
<?=htmlspecialchars($ifinfo['media']);?>
|
338 |
|
|
</td>
|
339 |
|
|
</tr>
|
340 |
0b29093b
|
jim-p
|
<?php endif; if ($ifinfo['laggproto']): ?>
|
341 |
|
|
<tr>
|
342 |
|
|
<td width="22%" class="vncellt"><?=gettext("LAGG Protocol");?></td>
|
343 |
|
|
<td width="78%" class="listr">
|
344 |
|
|
<?=htmlspecialchars($ifinfo['laggproto']);?>
|
345 |
|
|
</td>
|
346 |
|
|
</tr>
|
347 |
|
|
<?php endif; if (is_array($ifinfo['laggport'])): ?>
|
348 |
|
|
<tr>
|
349 |
|
|
<td width="22%" class="vncellt"><?=gettext("LAGG Ports");?></td>
|
350 |
|
|
<td width="78%" class="listr">
|
351 |
|
|
<?php foreach ($ifinfo['laggport'] as $laggport) { ?>
|
352 |
|
|
<?php echo htmlspecialchars($laggport); ?><br/>
|
353 |
|
|
<?php } ?>
|
354 |
|
|
</td>
|
355 |
|
|
</tr>
|
356 |
0d7b21de
|
sullrich
|
<?php endif; ?><?php if ($ifinfo['channel']): ?>
|
357 |
|
|
<tr>
|
358 |
c8927bfb
|
Rafael Lucas
|
<td width="22%" class="vncellt"><?=gettext("Channel");?></td>
|
359 |
0d7b21de
|
sullrich
|
<td width="78%" class="listr">
|
360 |
|
|
<?=htmlspecialchars($ifinfo['channel']);?>
|
361 |
|
|
</td>
|
362 |
|
|
</tr>
|
363 |
|
|
<?php endif; ?><?php if ($ifinfo['ssid']): ?>
|
364 |
|
|
<tr>
|
365 |
c8927bfb
|
Rafael Lucas
|
<td width="22%" class="vncellt"><?=gettext("SSID");?></td>
|
366 |
0d7b21de
|
sullrich
|
<td width="78%" class="listr">
|
367 |
|
|
<?=htmlspecialchars($ifinfo['ssid']);?>
|
368 |
|
|
</td>
|
369 |
|
|
</tr>
|
370 |
|
|
<?php endif; ?><?php if ($ifinfo['bssid']): ?>
|
371 |
|
|
<tr>
|
372 |
c8927bfb
|
Rafael Lucas
|
<td width="22%" class="vncellt"><?=gettext("BSSID");?></td>
|
373 |
0d7b21de
|
sullrich
|
<td width="78%" class="listr">
|
374 |
|
|
<?=htmlspecialchars($ifinfo['bssid']);?>
|
375 |
|
|
</td>
|
376 |
|
|
</tr>
|
377 |
|
|
<?php endif; ?><?php if ($ifinfo['rate']): ?>
|
378 |
|
|
<tr>
|
379 |
c8927bfb
|
Rafael Lucas
|
<td width="22%" class="vncellt"><?=gettext("Rate");?></td>
|
380 |
0d7b21de
|
sullrich
|
<td width="78%" class="listr">
|
381 |
|
|
<?=htmlspecialchars($ifinfo['rate']);?>
|
382 |
|
|
</td>
|
383 |
|
|
</tr>
|
384 |
|
|
<?php endif; ?><?php if ($ifinfo['rssi']): ?>
|
385 |
|
|
<tr>
|
386 |
c8927bfb
|
Rafael Lucas
|
<td width="22%" class="vncellt"><?=gettext("RSSI");?></td>
|
387 |
0d7b21de
|
sullrich
|
<td width="78%" class="listr">
|
388 |
|
|
<?=htmlspecialchars($ifinfo['rssi']);?>
|
389 |
|
|
</td>
|
390 |
|
|
</tr>
|
391 |
|
|
<?php endif; ?>
|
392 |
|
|
<tr>
|
393 |
c8927bfb
|
Rafael Lucas
|
<td width="22%" class="vncellt"><?=gettext("In/out packets");?></td>
|
394 |
0d7b21de
|
sullrich
|
<td width="78%" class="listr">
|
395 |
|
|
<?php
|
396 |
|
|
echo htmlspecialchars($ifinfo['inpkts'] . "/" . $ifinfo['outpkts'] . " (");
|
397 |
|
|
echo htmlspecialchars(format_bytes($ifinfo['inbytes']) . "/" . format_bytes($ifinfo['outbytes']) . ")");
|
398 |
|
|
?>
|
399 |
|
|
</td>
|
400 |
|
|
</tr>
|
401 |
|
|
<tr>
|
402 |
c8927bfb
|
Rafael Lucas
|
<td width="22%" class="vncellt"><?=gettext("In/out packets (pass)");?></td>
|
403 |
0d7b21de
|
sullrich
|
<td width="78%" class="listr">
|
404 |
|
|
<?php
|
405 |
|
|
echo htmlspecialchars($ifinfo['inpktspass'] . "/" . $ifinfo['outpktspass'] . " (");
|
406 |
|
|
echo htmlspecialchars(format_bytes($ifinfo['inbytespass']) . "/" . format_bytes($ifinfo['outbytespass']) . ")");
|
407 |
|
|
?>
|
408 |
|
|
</td>
|
409 |
|
|
</tr>
|
410 |
|
|
<tr>
|
411 |
c8927bfb
|
Rafael Lucas
|
<td width="22%" class="vncellt"><?=gettext("In/out packets (block)");?></td>
|
412 |
0d7b21de
|
sullrich
|
<td width="78%" class="listr">
|
413 |
|
|
<?php
|
414 |
|
|
echo htmlspecialchars($ifinfo['inpktsblock'] . "/" . $ifinfo['outpktsblock'] . " (");
|
415 |
|
|
echo htmlspecialchars(format_bytes($ifinfo['inbytesblock']) . "/" . format_bytes($ifinfo['outbytesblock']) . ")");
|
416 |
|
|
?>
|
417 |
|
|
</td>
|
418 |
|
|
</tr>
|
419 |
|
|
<?php if (isset($ifinfo['inerrs'])): ?>
|
420 |
|
|
<tr>
|
421 |
c8927bfb
|
Rafael Lucas
|
<td width="22%" class="vncellt"><?=gettext("In/out errors");?></td>
|
422 |
0d7b21de
|
sullrich
|
<td width="78%" class="listr">
|
423 |
|
|
<?=htmlspecialchars($ifinfo['inerrs'] . "/" . $ifinfo['outerrs']);?>
|
424 |
|
|
</td>
|
425 |
|
|
</tr>
|
426 |
|
|
<?php endif; ?>
|
427 |
|
|
<?php if (isset($ifinfo['collisions'])): ?>
|
428 |
|
|
<tr>
|
429 |
c8927bfb
|
Rafael Lucas
|
<td width="22%" class="vncellt"><?=gettext("Collisions");?></td>
|
430 |
0d7b21de
|
sullrich
|
<td width="78%" class="listr">
|
431 |
|
|
<?=htmlspecialchars($ifinfo['collisions']);?>
|
432 |
|
|
</td>
|
433 |
|
|
</tr>
|
434 |
|
|
<?php endif; ?>
|
435 |
|
|
<?php endif; ?>
|
436 |
|
|
<?php if ($ifinfo['bridge']): ?>
|
437 |
|
|
<tr>
|
438 |
c8927bfb
|
Rafael Lucas
|
<td width="22%" class="vncellt"><?php printf(gettext("Bridge (%s)"),$ifinfo['bridgeint']);?></td>
|
439 |
0d7b21de
|
sullrich
|
<td width="78%" class="listr">
|
440 |
|
|
<?=$ifinfo['bridge'];?>
|
441 |
|
|
</td>
|
442 |
|
|
</tr>
|
443 |
|
|
<?php endif; ?>
|
444 |
|
|
<?php if(file_exists("/usr/bin/vmstat")): ?>
|
445 |
|
|
<?php
|
446 |
|
|
$real_interface = "";
|
447 |
|
|
$interrupt_total = "";
|
448 |
|
|
$interrupt_sec = "";
|
449 |
|
|
$real_interface = $ifinfo['hwif'];
|
450 |
|
|
$interrupt_total = `vmstat -i | grep $real_interface | awk '{ print $3 }'`;
|
451 |
|
|
$interrupt_sec = `vmstat -i | grep $real_interface | awk '{ print $4 }'`;
|
452 |
|
|
if(strstr($interrupt_total, "hci")) {
|
453 |
|
|
$interrupt_total = `vmstat -i | grep $real_interface | awk '{ print $4 }'`;
|
454 |
|
|
$interrupt_sec = `vmstat -i | grep $real_interface | awk '{ print $5 }'`;
|
455 |
|
|
}
|
456 |
|
|
unset($interrupt_total); // XXX: FIX ME! Need a regex and parse correct data 100% of the time.
|
457 |
|
|
?>
|
458 |
|
|
<?php if($interrupt_total): ?>
|
459 |
|
|
<tr>
|
460 |
c8927bfb
|
Rafael Lucas
|
<td width="22%" class="vncellt"><?=gettext("Interrupts/Second");?></td>
|
461 |
0d7b21de
|
sullrich
|
<td width="78%" class="listr">
|
462 |
|
|
<?php
|
463 |
ee644822
|
Carlos Eduardo Ramos
|
echo $interrupt_total . " " . gettext("total");
|
464 |
0d7b21de
|
sullrich
|
echo "<br/>";
|
465 |
ee644822
|
Carlos Eduardo Ramos
|
echo $interrupt_sec . " " . gettext("rate");
|
466 |
0d7b21de
|
sullrich
|
?>
|
467 |
|
|
</td>
|
468 |
|
|
</tr>
|
469 |
|
|
<?php endif; ?>
|
470 |
|
|
<?php endif; ?>
|
471 |
|
|
<?php $i++; endforeach; ?>
|
472 |
|
|
</table>
|
473 |
29ed06c9
|
Scott Ullrich
|
|
474 |
d290167c
|
Seth Mos
|
<br/>
|
475 |
0d7b21de
|
sullrich
|
|
476 |
319f65ec
|
Colin Fleming
|
<?php printf(gettext("Using dial-on-demand will bring the connection up again if any packet ".
|
477 |
c8927bfb
|
Rafael Lucas
|
"triggers it. To substantiate this point: disconnecting manually ".
|
478 |
|
|
"will %snot%s prevent dial-on-demand from making connections ".
|
479 |
|
|
"to the outside! Don't use dial-on-demand if you want to make sure that the line ".
|
480 |
|
|
"is kept disconnected."),'<strong>','</strong>')?>
|
481 |
71d9cd3d
|
Scott Ullrich
|
|
482 |
5b237745
|
Scott Ullrich
|
<?php include("fend.inc"); ?>
|
483 |
319f65ec
|
Colin Fleming
|
</body>
|
484 |
|
|
</html>
|