<%# LuCI - Lua Configuration Interface Copyright 2008-2009 Steven Barth Copyright 2008-2009 Jo-Philipp Wich Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 $Id: routes.htm 6029 2010-04-05 17:46:20Z jow $ -%> <%- require "bit" require "luci.sys" require "luci.tools.webadmin" require "nixio.fs" local style = true -%> <%+header%>

<%:a_n_routes%>

<%:a_n_routes1%>
<%:a_n_routes_kernel4%>
<% luci.sys.net.routes(function(rt) %> <% style = not style; end) %>
<%:network%> <%:target%> <%:netmask%> <%:gateway%> <%:metric%>
<%=luci.tools.webadmin.iface_get_network(rt.device) or rt.device%> <%=rt.dest:network():string()%> <%=rt.dest:mask():string()%> <%=rt.gateway:string()%> <%=rt.metric%>

<% if nixio.fs.access("/proc/net/ipv6_route") then style = true %>
<%:a_n_routes_kernel6%>
<% luci.sys.net.routes6(function(rt) %> <% style = not style; end) %>
<%:network%> <%:target%> <%:gateway6%> <%:metric%>
<%=luci.tools.webadmin.iface_get_network(rt.device) or '(' .. rt.device .. ')'%> <%=rt.dest:string()%> <%=rt.source:string()%> <%=rt.metric_raw:upper()%>

<% end %>
<%+footer%>