1 .
/usr
/share
/libubox
/jshn.sh
3 proto_config_add_generic
() {
5 json_add_string
"" "$1"
10 proto_config_add_int
() {
11 proto_config_add_generic
"$1" 5
14 proto_config_add_string
() {
15 proto_config_add_generic
"$1" 3
18 proto_config_add_boolean
() {
19 proto_config_add_generic
"$1" 7
22 add_default_handler
() {
23 case "$(type $1 2>/dev/null)" in
25 *) eval "$1() { return; }"
41 add_default_handler
"$1_init_config"
44 json_add_string
"name" "$1"
46 json_add_boolean no-device
"$no_device"
47 json_add_boolean available
"$available"
48 json_add_array
"config"
56 [[ "$proto" == "$1" ]] ||
return 0
59 setup
) eval "$1_setup \"\$interface\" \"\$data\" \"\$ifname\"" ;;
60 teardown
) eval "$1_teardown \"\$interface\" \"\$data\" \"\$ifname\"" ;;