Lines Matching +full:num +full:- +full:ss +full:- +full:bits
2 #-
48 # # NB: Below 2-lines required
60 # # NB: Below 2-lines required
130 # handle most setups, minus some which considered exotic or purpose-built.
183 n) __mac_num=${OPTARG%%[^0-9]*} ;;
186 shift $(( $OPTIND - 1 ))
189 eval __mac_num=\${_${iface}_num:--1}
199 # The formula I'm using is ``NP:SS:SS:II:II:II'' where:
200 # + N denotes 4 bits used as a counter to support branching
206 # + S denotes 16 bits, the sum(1) value of the jail name.
207 # + I denotes bits that are inherited from parent interface.
209 # The S bits are a CRC-16 checksum of NAME, allowing the jail
222 # => :SS:SS:II:II:II
223 __num=$( set -- `echo -n "$__name" | sum` && echo $1 )
226 # => P:SS:SS:II:II:II
232 # => NP:SS:SS:II:II:II
240 if [ "$__var_to_set" -a "$__var_to_set_b" ]; then
257 if [ "$( id -u )" -ne 0 ]; then
263 jng_bridge_usage="bridge [-b BRIDGE_NAME] NAME [!|=]iface0 [[!|=]iface1 ...]"
275 shift $(( $OPTIND - 1 ))
278 [ "${name:-x}" = "${name#*[!0-9a-zA-Z_]}" -a $# -gt 1 ] ||
285 local new clone_mac no_derive num quad i=0
321 num=2
322 while ngctl msg ${iface}bridge: getstats $num \
325 num=$(( $num + 1 ))
327 ngctl mkpeer $iface:lower bridge link$num link1 ||
329 ngctl name ${iface}bridge:link$num "$iface$bridge" ||
334 num=2
335 while ngctl msg "$iface$bridge:" getstats $num > /dev/null 2>&1
337 num=$(( $num + 1 ))
339 ngctl mkpeer "$iface$bridge:" eiface link$num ether || return
342 while [ ${#eiface} -gt 15 ]; do # OS limitation
345 new=$( set -- `ngctl show -n "$iface$bridge:link$num"` &&
347 ngctl name "$iface$bridge:link$num" $eiface || return
369 jng_graph_usage="graph [-f] [-T type] [-o output]"
383 shift $(( $OPTIND - 1 ))
384 [ $# -eq 0 -a "$output" ] || action_usage graph # NOTREACHED
386 if [ -e "$output" -a ! "$force" ]; then
387 echo "$output: Already exists (use \`-f' to overwrite)" >&2
392 valid=$( dot -Txxx 2>&1 )
399 ngctl dot | dot ${output_type:+-T "$output_type"} -o "$output"
415 shift $(( $OPTIND - 1 ))
417 if [ $# -eq 0 ]; then
419 xargs -rn1 -Ibridge ngctl show bridge: |
421 sort -u
424 ngctl ls | awk -v name="$1" '
441 shift $(( $OPTIND -1 ))
443 [ "${name:-x}" = "${name#*[!0-9a-zA-Z_]}" -a $# -eq 1 ] ||
446 jng_show "$name" | xargs -rn1 -I eiface ngctl shutdown eiface:
459 shift $(( $OPTIND -1 ))
461 [ "${name:-x}" = "${name#*[!0-9a-zA-Z_]}" -a $# -eq 1 ] ||
475 substr($0, 0, fl-1),
478 ' # END-QUOTE
485 # Command-line arguments
494 type="$( type -t "jng_$action" )" || usage # NOTREACHED