3 [ -n "$INCLUDE_ONLY" ] ||
{
9 proto_batadv_hardif_init_config
() {
10 proto_config_add_int
'elp_interval'
11 proto_config_add_int
'hop_penalty'
12 proto_config_add_string
"master"
13 proto_config_add_string
'throughput_override'
16 proto_batadv_hardif_setup
() {
23 local throughput_override
25 json_get_vars elp_interval
26 json_get_vars hop_penalty
28 json_get_vars throughput_override
30 ( proto_add_host_dependency
"$config" '' "$master" )
32 batctl meshif
"$master" interface
-M add
"$iface"
34 [ -n "$elp_interval" ] && batctl hardif
"$iface" elp_interval
"$elp_interval"
35 [ -n "$hop_penalty" ] && batctl hardif
"$iface" hop_penalty
"$hop_penalty"
36 [ -n "$throughput_override" ] && batctl hardif
"$iface" throughput_override
"$throughput_override"
38 proto_init_update
"$iface" 1
39 proto_send_update
"$config"
42 proto_batadv_hardif_teardown
() {
50 batctl meshif
"$master" interface
-M del
"$iface" || true
53 add_protocol batadv_hardif