device_is_promisc ${device} &>/dev/null
cli_print_fmt1 1 "Promisc" "$(cli_print_bool $?)"
+
+ # Supports multiqueue?
+ if device_supports_multiqueue ${device}; then
+ cli_print_fmt 1 "Multiqueue" "Supported"
+ fi
cli_space
+ cli_device_show_queues 2 ${device}
+
# Print all vlan devices.
local vlans=$(device_get_vlans ${device})
if [ -n "${vlans}" ]; then
edit|create|remove|up|down|status|identify)
port_${action} "${port}" $@
;;
+ color)
+ color_cli "port" "${port}" $@
+ ;;
+ description)
+ description_cli "port" "${port}" $@
+ ;;
*)
error "Unrecognized argument: ${action}"
exit ${EXIT_ERROR}
local action
local zone
- if zone_name_is_valid ${1}; then
+ if zone_exists ${1}; then
zone=${1}
action=${2}
shift 2
config|disable|down|edit|enable|identify|status|up)
zone_${action} ${zone} $@
;;
+ color)
+ color_cli "zone" "${zone}" $@
+ ;;
+ description)
+ description_cli "zone" ${zone} $@
+ ;;
*)
error "Unrecognized argument: ${action}"
cli_show_man network-zone
done | sort -u
}
-cli_route() {
- if cli_help_requested $@; then
- cli_show_man network-route
- exit ${EXIT_OK}
- fi
-
- local action=${1}
- shift
-
- case "${action}" in
- static)
- cli_route_static $@
- ;;
- *)
- error "Unrecognized action: ${action}"
- cli_run_help network route
-
- exit ${EXIT_ERROR}
- ;;
- esac
-
- exit ${EXIT_OK}
-
-
-}
-
-cli_route_static() {
- if cli_help_requested $@; then
- cli_show_man network-route-static
- exit ${EXIT_OK}
- fi
-
- local action=${1}
- shift
-
- case "${action}" in
- # Add a new route.
- add)
- route_add $@
- ;;
- # Remove an existing route.
- remove)
- route_remove $@
- ;;
- # List all routes.
- list)
- route_list $@
- return ${EXIT_OK}
- ;;
- # Reload all routes.
- reload)
- route_apply $@
- ;;
- *)
- error "Unrecognized action: ${action}"
- cli_run_help network route
-
- exit ${EXIT_ERROR}
- ;;
- esac
-
- # Applying all routes.
- route_apply
-
- exit ${EXIT_OK}
-}
-
cli_dhcpd() {
local proto=${1}
shift
;;
start)
dhcpd_start ${proto}
+
+ # Make this permanent
+ dhcpd_enable ${proto}
;;
stop)
dhcpd_stop ${proto}
+
+ # Make this permanent
+ dhcpd_disable ${proto}
;;
restart|reload)
dhcpd_reload ${proto}
fi
warning_log "Will reset the whole network configuration!!!"
-
# Force mode is disabled by default
local force=0
list-zones)
zones_get_all
;;
+ list-next-free-zones)
+ zones_get_next_free
+ ;;
+ list-zone-config-ids)
+ zone_config_list_ids $@
+ ;;
+ list-zone-config-hids)
+ zone_config_list_hids $@
+ ;;
+ zone-name-is-valid)
+ zone_name_is_valid $@
+ ;;
+ zone-config-id-is-valid)
+ zone_config_id_is_valid $@
+ ;;
+ zone-config-hid-is-valid)
+ zone_config_hid_is_valid $@
+ ;;
*)
error "No such command: ${cmd}"
exit ${EXIT_ERROR}
init_run
;;
- settings|hostname|port|device|zone|start|stop|restart|status|reset|route)
+ settings|hostname|port|device|zone|start|stop|restart|status|reset|route|vpn)
cli_${action} $@
;;