博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
2017-9-6-luci Analysis
阅读量:4981 次
发布时间:2019-06-12

本文共 4893 字,大约阅读时间需要 16 分钟。

2017-9-6-luci Analysis

modules

  • luci.model.uci

  • luci.model.network

  • luci.util

  • luci.cbi

  • luci.template

  • ubus call network.interface.wan status


  1. "up": true

  2. "pending": false

  3. "available": true

  4. "autostart": true

  5. "uptime": 67646

  6. "l3_device": "pppoe-wan"

  7. "proto": "pppoe"

  8. "device": "eth0.2"

  9. "updated": [ 

  10. "addresses"

  11. "routes" 

  12. ], 

  13. "metric": 0

  14. "delegation": true

  15. "ipv4-address": [ 


  16. "address": "10.104.60.163"

  17. "mask": 32 


  18. ], 

  19. "ipv6-address": [ 

  20.  

  21. ], 

  22. "ipv6-prefix": [ 

  23.  

  24. ], 

  25. "ipv6-prefix-assignment": [ 

  26.  

  27. ], 

  28. "route": [ 


  29. "target": "0.0.0.0"

  30. "mask": 0

  31. "nexthop": "10.104.0.1"

  32. "source": "0.0.0.0\/0" 


  33. ], 

  34. "dns-server": [ 

  35. "211.140.13.188"

  36. "211.140.188.188" 

  37. ], 

  38. "dns-search": [ 

  39.  

  40. ], 

  41. "inactive": { 

  42. "ipv4-address": [ 

  43.  

  44. ], 

  45. "ipv6-address": [ 

  46.  

  47. ], 

  48. "route": [ 

  49.  

  50. ], 

  51. "dns-server": [ 

  52.  

  53. ], 

  54. "dns-search": [ 

  55.  


  56. }, 

  57. "data": { 

  58.  



  59.  

  • ubus call network.device status
  1.  


  2. "br-lan": { 

  3. "external": false

  4. "present": true

  5. "type": "Bridge"

  6. "up": true

  7. "carrier": true

  8. "bridge-members": [ 

  9. "eth0.1"

  10. "ra0" 

  11. ], 

  12. "mtu": 1500

  13. "macaddr": "54:36:9b:1c:27:47"

  14. "txqueuelen": 0

  15. "ipv6": true

  16. "statistics": { 

  17. "collisions": 0

  18. "rx_frame_errors": 0

  19. "tx_compressed": 0

  20. "multicast": 0

  21. "rx_length_errors": 0

  22. "tx_dropped": 0

  23. "rx_bytes": 479772195

  24. "rx_missed_errors": 0

  25. "tx_errors": 0

  26. "rx_compressed": 0

  27. "rx_over_errors": 0

  28. "tx_fifo_errors": 0

  29. "rx_crc_errors": 0

  30. "rx_packets": 1481931

  31. "tx_heartbeat_errors": 0

  32. "rx_dropped": 0

  33. "tx_aborted_errors": 0

  34. "tx_packets": 1976848

  35. "rx_errors": 0

  36. "tx_bytes": 2241546625

  37. "tx_window_errors": 0

  38. "rx_fifo_errors": 0

  39. "tx_carrier_errors": 0 


  40. }, 

  41. "eth0": { 

  42. "external": false

  43. "present": true

  44. "type": "Network device"

  45. "up": true

  46. "carrier": true

  47. "mtu": 1500

  48. "macaddr": "54:36:9b:1c:27:47"

  49. "txqueuelen": 1000

  50. "ipv6": true

  51. "statistics": { 

  52. "collisions": 0

  53. "rx_frame_errors": 0

  54. "tx_compressed": 0

  55. "multicast": 0

  56. "rx_length_errors": 0

  57. "tx_dropped": 0

  58. "rx_bytes": 2598313278

  59. "rx_missed_errors": 0

  60. "tx_errors": 0

  61. "rx_compressed": 0

  62. "rx_over_errors": 0

  63. "tx_fifo_errors": 0

  64. "rx_crc_errors": 0

  65. "rx_packets": 2998486

  66. "tx_heartbeat_errors": 0

  67. "rx_dropped": 0

  68. "tx_aborted_errors": 0

  69. "tx_packets": 2593532

  70. "rx_errors": 0

  71. "tx_bytes": 1846900606

  72. "tx_window_errors": 0

  73. "rx_fifo_errors": 0

  74. "tx_carrier_errors": 0 


  75. }, 

  76. "lo": { 

  77. "external": false

  78. "present": true

  79. "type": "Network device"

  80. "up": true

  81. "carrier": true

  82. "mtu": 65536

  83. "macaddr": "00:00:00:00:00:00"

  84. "txqueuelen": 0

  85. "ipv6": true

  86. "statistics": { 

  87. "collisions": 0

  88. "rx_frame_errors": 0

  89. "tx_compressed": 0

  90. "multicast": 0

  91. "rx_length_errors": 0

  92. "tx_dropped": 0

  93. "rx_bytes": 8805399

  94. "rx_missed_errors": 0

  95. "tx_errors": 0

  96. "rx_compressed": 0

  97. "rx_over_errors": 0

  98. "tx_fifo_errors": 0

  99. "rx_crc_errors": 0

  100. "rx_packets": 165986

  101. "tx_heartbeat_errors": 0

  102. "rx_dropped": 0

  103. "tx_aborted_errors": 0

  104. "tx_packets": 165986

  105. "rx_errors": 0

  106. "tx_bytes": 8805399

  107. "tx_window_errors": 0

  108. "rx_fifo_errors": 0

  109. "tx_carrier_errors": 0 


  110. }, 

  111. "pppoe-wan": { 

  112. "external": true

  113. "present": true

  114. "type": "Network device"

  115. "up": true

  116. "carrier": true

  117. "statistics": { 

  118. "collisions": 0

  119. "rx_frame_errors": 0

  120. "tx_compressed": 0

  121. "multicast": 0

  122. "rx_length_errors": 0

  123. "tx_dropped": 0

  124. "rx_bytes": 2209323454

  125. "rx_missed_errors": 0

  126. "tx_errors": 0

  127. "rx_compressed": 0

  128. "rx_over_errors": 0

  129. "tx_fifo_errors": 0

  130. "rx_crc_errors": 0

  131. "rx_packets": 1986151

  132. "tx_heartbeat_errors": 0

  133. "rx_dropped": 0

  134. "tx_aborted_errors": 0

  135. "tx_packets": 1557905

  136. "rx_errors": 0

  137. "tx_bytes": 477192652

  138. "tx_window_errors": 0

  139. "rx_fifo_errors": 0

  140. "tx_carrier_errors": 0 


  141. }, 

  142. "ra0": { 

  143. "external": true

  144. "present": true

  145. "type": "Network device"

  146. "up": true

  147. "carrier": true

  148. "ipv6": false

  149. "statistics": { 

  150. "collisions": 0

  151. "rx_frame_errors": 0

  152. "tx_compressed": 0

  153. "multicast": 5429

  154. "rx_length_errors": 0

  155. "tx_dropped": 0

  156. "rx_bytes": 222510556

  157. "rx_missed_errors": 0

  158. "tx_errors": 0

  159. "rx_compressed": 0

  160. "rx_over_errors": 0

  161. "tx_fifo_errors": 0

  162. "rx_crc_errors": 0

  163. "rx_packets": 1075574

  164. "tx_heartbeat_errors": 0

  165. "rx_dropped": 0

  166. "tx_aborted_errors": 0

  167. "tx_packets": 994141

  168. "rx_errors": 6

  169. "tx_bytes": 903091445

  170. "tx_window_errors": 0

  171. "rx_fifo_errors": 0

  172. "tx_carrier_errors": 0 




  173.  

luci.cbi

widget

  • SimpleForm
  • ListValue
  • Value and Value.widget = “radio”, Value.template=“cbi/network_ifacelist”
  • Value and Value.widget = “checkbox”, Value.templae=
  • DummyValue
964632-20170916112442953-306289920.png

luci.model.network

API

964632-20170916112444985-146226319.png
964632-20170916112445453-539295837.png
964632-20170916112445719-1655926547.png
  1. "network": { 

  2. "wan": { 

  3. "ifname": "eth0.4090"

  4. "proto": "static" 

  5. "ipaddr": "192.168.2.1" 

  6. "netmask": "255.255.255.0" 

  7. "gateway": "192.168.254.254" 

  8. "username": "oakridge" 

  9. "password": "oakridge" 

  10. }, 

  11. "lan4092": { 

  12. "ifname": "eth0.4092"

  13. "protocol": "static" 

  14. }, 

  15. "lan4093": { 

  16. "ifname": "eth0.4093"

  17. "protocol": "static" 

  18. }, 

  19. "lan4094": { 

  20. "ifname": "eth0.4094"

  21. "protocol": "static" 

  22. }, 

  23. "wan4090": { 

  24. "ifname": "eth1"

  25. "protocol": "none" 

  26. }, 

  27. "wan": { 

  28. "ifname": "eth0.4090"

  29. "protocol": "dhcp"

  30. "macaddr": "f0:9f:c2:6d:24:7f" 



WebUI Process

964632-20170916112446328-448745544.png

2017-9-6

转载于:https://www.cnblogs.com/nicephil/p/7530676.html

你可能感兴趣的文章
查找算法总结
查看>>
10-4. 字符串循环左移(20)
查看>>
一个js验证类
查看>>
CListUI控件的认识
查看>>
通过单元测试理解spring容器以及dubbo+zookeeper单元测试异常处理
查看>>
接口测试自动化框架搭建
查看>>
IDEA如何打包可运行jar的一个问题
查看>>
单例模式的八种写法比较
查看>>
Gatling的进阶三
查看>>
js --基本语法3 函数,数组,堆棧
查看>>
protobuf 测试 & Makefile example
查看>>
理解Linux系统负荷
查看>>
angular 初学(二)ng-class ng-disabled
查看>>
android 检查网络连接状态实现步骤
查看>>
网上商城(OnlineMall)用户模块
查看>>
安装opencv 在ubuntu
查看>>
《信息安全技术》实验三 数字证书应用
查看>>
Leetcode: Search in Rotated Sorted Array
查看>>
对象如何实现排序
查看>>
高性能NIO框架Netty-对象传输
查看>>