2017-9-6-luci Analysis
modules
-
luci.model.uci
-
luci.model.network
-
luci.util
-
luci.cbi
-
luci.template
-
ubus call network.interface.wan status
- {
- "up": true,
- "pending": false,
- "available": true,
- "autostart": true,
- "uptime": 67646,
- "l3_device": "pppoe-wan",
- "proto": "pppoe",
- "device": "eth0.2",
- "updated": [
- "addresses",
- "routes"
- ],
- "metric": 0,
- "delegation": true,
- "ipv4-address": [
- {
- "address": "10.104.60.163",
- "mask": 32
- }
- ],
- "ipv6-address": [
-
- ],
- "ipv6-prefix": [
-
- ],
- "ipv6-prefix-assignment": [
-
- ],
- "route": [
- {
- "target": "0.0.0.0",
- "mask": 0,
- "nexthop": "10.104.0.1",
- "source": "0.0.0.0\/0"
- }
- ],
- "dns-server": [
- "211.140.13.188",
- "211.140.188.188"
- ],
- "dns-search": [
-
- ],
- "inactive": {
- "ipv4-address": [
-
- ],
- "ipv6-address": [
-
- ],
- "route": [
-
- ],
- "dns-server": [
-
- ],
- "dns-search": [
-
- ]
- },
- "data": {
-
- }
- }
-
- ubus call network.device status
-
- {
- "br-lan": {
- "external": false,
- "present": true,
- "type": "Bridge",
- "up": true,
- "carrier": true,
- "bridge-members": [
- "eth0.1",
- "ra0"
- ],
- "mtu": 1500,
- "macaddr": "54:36:9b:1c:27:47",
- "txqueuelen": 0,
- "ipv6": true,
- "statistics": {
- "collisions": 0,
- "rx_frame_errors": 0,
- "tx_compressed": 0,
- "multicast": 0,
- "rx_length_errors": 0,
- "tx_dropped": 0,
- "rx_bytes": 479772195,
- "rx_missed_errors": 0,
- "tx_errors": 0,
- "rx_compressed": 0,
- "rx_over_errors": 0,
- "tx_fifo_errors": 0,
- "rx_crc_errors": 0,
- "rx_packets": 1481931,
- "tx_heartbeat_errors": 0,
- "rx_dropped": 0,
- "tx_aborted_errors": 0,
- "tx_packets": 1976848,
- "rx_errors": 0,
- "tx_bytes": 2241546625,
- "tx_window_errors": 0,
- "rx_fifo_errors": 0,
- "tx_carrier_errors": 0
- }
- },
- "eth0": {
- "external": false,
- "present": true,
- "type": "Network device",
- "up": true,
- "carrier": true,
- "mtu": 1500,
- "macaddr": "54:36:9b:1c:27:47",
- "txqueuelen": 1000,
- "ipv6": true,
- "statistics": {
- "collisions": 0,
- "rx_frame_errors": 0,
- "tx_compressed": 0,
- "multicast": 0,
- "rx_length_errors": 0,
- "tx_dropped": 0,
- "rx_bytes": 2598313278,
- "rx_missed_errors": 0,
- "tx_errors": 0,
- "rx_compressed": 0,
- "rx_over_errors": 0,
- "tx_fifo_errors": 0,
- "rx_crc_errors": 0,
- "rx_packets": 2998486,
- "tx_heartbeat_errors": 0,
- "rx_dropped": 0,
- "tx_aborted_errors": 0,
- "tx_packets": 2593532,
- "rx_errors": 0,
- "tx_bytes": 1846900606,
- "tx_window_errors": 0,
- "rx_fifo_errors": 0,
- "tx_carrier_errors": 0
- }
- },
- "lo": {
- "external": false,
- "present": true,
- "type": "Network device",
- "up": true,
- "carrier": true,
- "mtu": 65536,
- "macaddr": "00:00:00:00:00:00",
- "txqueuelen": 0,
- "ipv6": true,
- "statistics": {
- "collisions": 0,
- "rx_frame_errors": 0,
- "tx_compressed": 0,
- "multicast": 0,
- "rx_length_errors": 0,
- "tx_dropped": 0,
- "rx_bytes": 8805399,
- "rx_missed_errors": 0,
- "tx_errors": 0,
- "rx_compressed": 0,
- "rx_over_errors": 0,
- "tx_fifo_errors": 0,
- "rx_crc_errors": 0,
- "rx_packets": 165986,
- "tx_heartbeat_errors": 0,
- "rx_dropped": 0,
- "tx_aborted_errors": 0,
- "tx_packets": 165986,
- "rx_errors": 0,
- "tx_bytes": 8805399,
- "tx_window_errors": 0,
- "rx_fifo_errors": 0,
- "tx_carrier_errors": 0
- }
- },
- "pppoe-wan": {
- "external": true,
- "present": true,
- "type": "Network device",
- "up": true,
- "carrier": true,
- "statistics": {
- "collisions": 0,
- "rx_frame_errors": 0,
- "tx_compressed": 0,
- "multicast": 0,
- "rx_length_errors": 0,
- "tx_dropped": 0,
- "rx_bytes": 2209323454,
- "rx_missed_errors": 0,
- "tx_errors": 0,
- "rx_compressed": 0,
- "rx_over_errors": 0,
- "tx_fifo_errors": 0,
- "rx_crc_errors": 0,
- "rx_packets": 1986151,
- "tx_heartbeat_errors": 0,
- "rx_dropped": 0,
- "tx_aborted_errors": 0,
- "tx_packets": 1557905,
- "rx_errors": 0,
- "tx_bytes": 477192652,
- "tx_window_errors": 0,
- "rx_fifo_errors": 0,
- "tx_carrier_errors": 0
- }
- },
- "ra0": {
- "external": true,
- "present": true,
- "type": "Network device",
- "up": true,
- "carrier": true,
- "ipv6": false,
- "statistics": {
- "collisions": 0,
- "rx_frame_errors": 0,
- "tx_compressed": 0,
- "multicast": 5429,
- "rx_length_errors": 0,
- "tx_dropped": 0,
- "rx_bytes": 222510556,
- "rx_missed_errors": 0,
- "tx_errors": 0,
- "rx_compressed": 0,
- "rx_over_errors": 0,
- "tx_fifo_errors": 0,
- "rx_crc_errors": 0,
- "rx_packets": 1075574,
- "tx_heartbeat_errors": 0,
- "rx_dropped": 0,
- "tx_aborted_errors": 0,
- "tx_packets": 994141,
- "rx_errors": 6,
- "tx_bytes": 903091445,
- "tx_window_errors": 0,
- "rx_fifo_errors": 0,
- "tx_carrier_errors": 0
- }
- }
- }
-
luci.cbi
widget
- SimpleForm
- ListValue
- Value and Value.widget = “radio”, Value.template=“cbi/network_ifacelist”
- Value and Value.widget = “checkbox”, Value.templae=
- DummyValue
luci.model.network
API
- "network": {
- "wan": {
- "ifname": "eth0.4090",
- "proto": "static"
- "ipaddr": "192.168.2.1"
- "netmask": "255.255.255.0"
- "gateway": "192.168.254.254"
- "username": "oakridge"
- "password": "oakridge"
- },
- "lan4092": {
- "ifname": "eth0.4092",
- "protocol": "static"
- },
- "lan4093": {
- "ifname": "eth0.4093",
- "protocol": "static"
- },
- "lan4094": {
- "ifname": "eth0.4094",
- "protocol": "static"
- },
- "wan4090": {
- "ifname": "eth1",
- "protocol": "none"
- },
- "wan": {
- "ifname": "eth0.4090",
- "protocol": "dhcp",
- "macaddr": "f0:9f:c2:6d:24:7f"
- }
- }
WebUI Process
2017-9-6