Created
March 18, 2021 14:53
-
-
Save Grommish/f175922f5e2216a0f4407e39ce20d83a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@OpenWrt:~# ubus call service list '{ "name": "network", "verbose": true }' | |
{ | |
"network": { | |
"instances": { | |
"instance1": { | |
"running": true, | |
"pid": 14129, | |
"command": [ | |
"/sbin/netifd" | |
], | |
"term_timeout": 5, | |
"limits": { | |
"core": "unlimited" | |
}, | |
"respawn": { | |
"threshold": 3600, | |
"timeout": 5, | |
"retry": 5 | |
} | |
} | |
}, | |
"triggers": [ | |
[ | |
"config.change", | |
[ | |
"if", | |
[ | |
"eq", | |
"package", | |
"network" | |
], | |
[ | |
"run_script", | |
"/etc/init.d/network", | |
"reload" | |
] | |
], | |
1000 | |
], | |
[ | |
"config.change", | |
[ | |
"if", | |
[ | |
"eq", | |
"package", | |
"wireless" | |
], | |
[ | |
"run_script", | |
"/etc/init.d/network", | |
"reload" | |
] | |
], | |
1000 | |
] | |
], | |
"validate": [ | |
{ | |
"package": "network", | |
"type": "switch_vlan", | |
"rules": { | |
"device": "string", | |
"ports": "list(ports)", | |
"vlan": "uinteger" | |
} | |
}, | |
{ | |
"package": "network", | |
"type": "switch", | |
"rules": { | |
"ar8xxx_mib_poll_interval": "uinteger", | |
"ar8xxx_mib_type": "range(0,1)", | |
"enable": "bool", | |
"enable_vlan": "bool", | |
"name": "string", | |
"reset": "bool" | |
} | |
}, | |
{ | |
"package": "network", | |
"type": "rule6", | |
"rules": { | |
"action": "or(prohibit, unreachable, blackhole, throw)", | |
"dest": "cidr6", | |
"goto": "range(0,65535)", | |
"in": "string", | |
"invert": "bool", | |
"lookup": "or(range(0,65535),string)", | |
"mark": "string", | |
"out": "string", | |
"src": "cidr6", | |
"tos": "range(0,31)" | |
} | |
}, | |
{ | |
"package": "network", | |
"type": "rule", | |
"rules": { | |
"action": "or(prohibit, unreachable, blackhole, throw)", | |
"dest": "cidr4", | |
"goto": "range(0,65535)", | |
"in": "string", | |
"invert": "bool", | |
"lookup": "or(range(0,65535),string)", | |
"mark": "string", | |
"out": "string", | |
"src": "cidr4", | |
"tos": "range(0,31)" | |
} | |
}, | |
{ | |
"package": "network", | |
"type": "route6", | |
"rules": { | |
"gateway": "ip6addr", | |
"interface": "string", | |
"metric": "uinteger", | |
"mtu": "uinteger", | |
"table": "or(range(0,65535),string)", | |
"target": "cidr6" | |
} | |
}, | |
{ | |
"package": "network", | |
"type": "route", | |
"rules": { | |
"gateway": "ip4addr", | |
"interface": "string", | |
"metric": "uinteger", | |
"mtu": "uinteger", | |
"netmask": "netmask4", | |
"table": "or(range(0,65535),string)", | |
"target": "cidr4" | |
} | |
}, | |
{ | |
"package": "network", | |
"type": "atm-bridge", | |
"rules": { | |
"atmdev": "uinteger", | |
"encaps": "or(llc, vc)", | |
"payload": "or(bridged, routed)", | |
"unit": "uinteger", | |
"vci": "range(32, 65535)", | |
"vpi": "range(0, 255)" | |
} | |
} | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment