# Allowed modes of the spanning tree protocol.
STP_ALLOWED_MODES="rstp stp"
-function stp_enable() {
+stp_enable() {
local bridge=${1}
assert isset bridge
print 1 > ${SYS_CLASS_NET}/${bridge}/bridge/stp_state
}
-function stp_disable() {
+stp_disable() {
local bridge=${1}
assert isset bridge
print 0 > ${SYS_CLASS_NET}/${bridge}/bridge/stp_state
}
-function stp_is_enabled() {
+stp_is_enabled() {
local bridge=${1}
assert isset bridge
esac
}
-function stp_is_userspace() {
+stp_is_userspace() {
local bridge=${1}
assert isset bridge
esac
}
-function stp_get_name() {
+stp_get_name() {
local proto=${1}
case "${proto}" in
return ${EXIT_OK}
}
-function stp_bridge_set_protocol() {
+stp_bridge_set_protocol() {
local bridge=${1}
assert isset bridge
assert [ $? -eq 0 ]
}
-function stp_bridge_get_protocol() {
+stp_bridge_get_protocol() {
local bridge=${1}
assert isset bridge
return ${EXIT_OK}
}
-function stp_bridge_get_id() {
+stp_bridge_get_id() {
local bridge=${1}
assert isset bridge
return $?
}
-function stp_bridge_get_forward_delay() {
+stp_bridge_get_forward_delay() {
local bridge=${1}
assert isset bridge
return ${EXIT_OK}
}
-function stp_bridge_set_forward_delay() {
+stp_bridge_set_forward_delay() {
local bridge=${1}
assert isset bridge
return ${EXIT_OK}
}
-function stp_bridge_get_hello_time() {
+stp_bridge_get_hello_time() {
local bridge=${1}
assert isset bridge
return ${EXIT_OK}
}
-function stp_bridge_set_hello_time() {
+stp_bridge_set_hello_time() {
local bridge=${1}
assert isset bridge
return ${EXIT_OK}
}
-function stp_bridge_get_max_age() {
+stp_bridge_get_max_age() {
local bridge=${1}
assert isset bridge
return ${EXIT_OK}
}
-function stp_bridge_set_max_age() {
+stp_bridge_set_max_age() {
local bridge=${1}
assert isset bridge
return ${EXIT_OK}
}
-function stp_bridge_get_priority() {
+stp_bridge_get_priority() {
local bridge=${1}
assert isset bridge
return ${EXIT_OK}
}
-function stp_bridge_set_priority() {
+stp_bridge_set_priority() {
local bridge=${1}
assert isset bridge
return ${EXIT_OK}
}
-function stp_bridge_get_designated_root() {
+stp_bridge_get_designated_root() {
local bridge=${1}
assert isset bridge
fi
}
-function stp_bridge_get_root_path_cost() {
+stp_bridge_get_root_path_cost() {
local bridge=${1}
assert isset bridge
return ${EXIT_OK}
}
-function stp_bridge_get_root_port_id() {
+stp_bridge_get_root_port_id() {
local bridge=${1}
assert isset bridge
return ${EXIT_OK}
}
-function stp_bridge_get_root_port() {
+stp_bridge_get_root_port() {
local bridge=${1}
assert isset bridge
return ${EXIT_ERROR}
}
-function stp_bridge_is_root() {
+stp_bridge_is_root() {
local bridge=${1}
assert isset bridge
return ${EXIT_FALSE}
}
-function stp_bridge_get_topology_change_count() {
+stp_bridge_get_topology_change_count() {
local bridge=${1}
assert isset bridge
return ${EXIT_OK}
}
-function stp_bridge_get_topology_change_timer() {
+stp_bridge_get_topology_change_timer() {
local bridge=${1}
assert isset bridge
return ${EXIT_OK}
}
-function stp_bridge_get_topology_change_detected() {
+stp_bridge_get_topology_change_detected() {
local bridge=${1}
assert isset bridge
fi
}
-function stp_port_get_state() {
+stp_port_get_state() {
local bridge=${1}
assert isset bridge
return ${EXIT_OK}
}
-function stp_port_get_id() {
+stp_port_get_id() {
local bridge=${1}
assert isset bridge
return ${EXIT_OK}
}
-function stp_port_get_cost() {
+stp_port_get_cost() {
local bridge=${1}
assert isset bridge
return ${EXIT_ERROR}
}
-function stp_port_set_cost() {
+stp_port_set_cost() {
assert [ $# -eq 3 ]
local bridge="${1}"
fi
}
-function stp_port_get_designated_root() {
+stp_port_get_designated_root() {
local bridge=${1}
assert isset bridge
return ${EXIT_ERROR}
}
-function __stp_div_100() {
+__stp_div_100() {
local val=${1}
local split=$((${#val} - 2))