<%:Type%> 
		    
			
			    <%:Normal%> 
			     selected="selected"<% end %>><%:MacVLAN%> 
			     selected="selected"<% end %>><%:Bridge%> 
			 
			
			
			    <%:Choose MacVLAN if you want to create a virtual interface based on a physical interface.%>
			
		     
		 
		
		    <%:Physical interface%> 
		    
			    
			<%
			    for _, ifacea in ipairs(ifaces) do
				if not (ifacea == "lo" or ifacea == "6in4-omr6in4" or ifacea:match("^ifb.*") or ifacea:match("^sit.*") or ifacea:match("^gre.*") or ifacea:match("^ip6.*") or ifacea:match("^teql.*") or ifacea:match("^erspan.*") or ifacea:match("^tun.*")) then
			%>
			 selected="selected"<% end %>><%=ifacea%> 
			<%
				end
			    end
			%>
			     
			
			
			    <%:Choose physical interface.%>
			
		     
		 
		
		    <%:Protocol%> 
		    
			<% findproto = 0 %>
			
			     selected="selected"<% end %>><%:Static address%> 
			     selected="selected"<% end %>><%:DHCP%> 
			     selected="selected"<% end %>><%:ModemManager%> 
			     selected="selected"<% end %>><%:NCM%> 
			     selected="selected"<% end %>><%:PPPoE%> 
			     selected="selected"<% end %>><%:QMI%> 
			     selected="selected"<% end %>><%:Other%> 
			 
			
			
			    <%:You can use DHCP if you have multiple real ethernet ports. Select other if you want to use another protocol available in Network Interfaces page.%>
			
		     
		 
		
		    <%:Physical interface%> 
		    
			    
			<%
			    iffind=0
			    for _, ifacea in ipairs(ifaces) do
				if not (ifacea == "lo" or ifacea == "6in4-omr6in4" or ifacea == "mlvpn0" or ifacea:match("^ifb.*") or ifacea:match("^sit.*") or ifacea:match("^gre.*") or ifacea:match("^ip6.*") or ifacea:match("^teql.*") or ifacea:match("^erspan.*") or ifacea:match("^tun.*")) and device_notvirtual(ifacea) then
			%>
			 selected="selected"<% end %>><%=ifacea%> 
			<%
				end
			    end
			    if iffind == 0 and uci:get("network",ifname,"ifname") ~= nil then
			%>
				" selected="selected"><%=uci:get("network",ifname,"ifname")%> 
			<%
			    end
			%>
			     
			
			
			    <%:Choose physical interface.%>
			
		     
		 
		
		
		
		
		    <%:Device%> 
		    
			    
			<%
			    iffind=0
			    iftty = nixio.fs.glob("/dev/ttyUSB*")
			    for tty in iftty do
			%>
			 selected="selected"<% end %>><%=tty%> 
			<%
			    end
			    iftty = nixio.fs.glob("/dev/cdc-wdm*")
			    for tty in iftty do
			%>
			 selected="selected"<% end %>><%=tty%> 
			<%
			    end
			    if iffind == 0 and uci:get("network",ifname,"device") ~= nil then
			%>
				" selected="selected"><%=uci:get("network",ifname,"device")%> 
			<%
			    end
			%>
			     
		    
		 
		
		    <%:Device%> 
		    
			    
			<%
			    iffind=0
			    iftty = nixio.fs.glob("/dev/cdc-wdm*")
			    for tty in iftty do
			%>
			 selected="selected"<% end %>><%=tty%> 
			<%
			    end
			    if iffind == 0 and uci:get("network",ifname,"device") ~= nil then
			%>
				" selected="selected"><%=uci:get("network",ifname,"device")%> 
			<%
			    end
			%>
			     
		    
		 
		
		    <%:Device%> 
		    
			    
			<%
			    iffind=0
			    iftty = luci.sys.exec("/usr/bin/mmcli -L")
			    for listtty in iftty:gmatch("([^\r\n]*)[\r\n]") do
				modemid = luci.util.trim(luci.sys.exec("echo '" .. listtty .. "' | awk -F' ' '{print $1}' | awk -F/ '{print $6}'"))
				if modemid ~= '' then
				    modeminfo = luci.sys.exec("/usr/bin/mmcli -m " .. modemid .. " --output-keyvalue")
				    tty = luci.util.trim(luci.sys.exec("echo '" .. modeminfo .. "' | grep 'modem.generic.device ' | awk -F': ' '{print $2}'"))
			%>
			 selected="selected"<% end %>><%=tty%> 
			<%
				end
			    end
			    if iffind == 0 and uci:get("network",ifname,"device") ~= nil then
			%>
				" selected="selected"><%=uci:get("network",ifname,"device")%> 
			<%
			    end
			%>
			     
		    
		 
		
		
		
		    <%:Service Type%> 
		    
		    	
			     selected="selected"<% end %>><%:Modem default%> 
			     selected="selected"<% end %>><%:Prefer LTE%> 
			     selected="selected"<% end %>><%:Prefer UMTS%> 
			     selected="selected"<% end %>><%:LTE%> 
			     selected="selected"<% end %>><%:UMTS/GPRS%> 
			     selected="selected"<% end %>><%:GPRS only%> 
			     selected="selected"<% end %>><%:auto%> 
		    	 
		    
		 
		
		    <%:Authentication Type%> 
		    
		    	
			     selected="selected"<% end %>><%:NONE%> 
			     selected="selected"<% end %>><%:PAP%> 
			     selected="selected"<% end %>><%:CHAP%> 
			     selected="selected"<% end %>><%:PAP/CHAP%> 
		    	 
		    
		 
		
		
		
		<%
		    if uci:get("openmptcprouter",ifname,"multipathvpn") == "1" then
		%>
		
		    <%:Multipath TCP%> 
		    
		    	
			     selected="selected"<% end %>><%:Enabled%> 
			     selected="selected"<% end %>><%:Disabled%> 
			     selected="selected"<% end %>><%:Master%> 
			     selected="selected"<% end %>><%:Backup%> 
		    	 
		    
		 
		<% else %>
		
		    <%:Multipath TCP%> 
		    
		    	
			     selected="selected"<% end %>><%:Enabled%> 
			     selected="selected"<% end %>><%:Disabled%> 
			     selected="selected"<% end %>><%:Master%> 
			     selected="selected"<% end %>><%:Backup%> 
		    	 
		    
		 
		<%
		    end
		%>
		<%
			local download = "0"
			local upload = "0"
			download = uci:get("network",ifname,"downloadspeed") or "0"
			upload = uci:get("network",ifname,"uploadspeed") or "0"
			if download == "0" or upload == "0" then
				if nixio.fs.access("/etc/init.d/sqm") then
					download = uci:get("sqm",ifname,"download")
					upload = uci:get("sqm",ifname,"upload")
				else
					download = uci:get("qos",ifname,"download")
					upload = uci:get("qos",ifname,"upload")
				end
			end
		%>
		
		
		
		    <%:Download speed (Kb/s)%> 
		    
		 
		
	     
<%
	end
    end
%>