Lines Matching +full:cfg +full:- +full:space
40 local ifn cfg
42 cfg=1
44 [ -z "$ifn" ] && err 1 "ifn_start called without an interface"
46 ifscript_up ${ifn} && cfg=0
47 ifconfig_up ${ifn} && cfg=0
49 afexists inet6 && ipv6_up ${ifn} && cfg=0
50 afexists inet && ipv4_up ${ifn} && cfg=0
52 childif_create ${ifn} && cfg=0
54 return $cfg
58 # Shutdown and de-configure an interface. If action is taken,
63 local ifn cfg
65 cfg=1
67 [ -z "$ifn" ] && err 1 "ifn_stop called without an interface"
70 afexists inet && ipv4_down ${ifn} && cfg=0
71 afexists inet6 && ipv6_down ${ifn} && cfg=0
73 ifconfig_down ${ifn} && cfg=0
74 ifscript_down ${ifn} && cfg=0
75 childif_destroy ${ifn} && cfg=0
77 return $cfg
95 ifn_vnet0 $1 -vnet
135 _ipv6_opts="-ifdisabled"
142 bridge[0-9]*)
158 _ipv6_opts="${_ipv6_opts} -no_radr accept_rtadv"
162 if [ -n "${_ipv6_opts}" ]; then
169 if [ -n "${ifconfig_args}" ]; then
178 if [ -n "${ifconfig_args}" ]; then
181 :*|[0-9a-fA-F]*:*)
187 ${IFCONFIG_CMD} $1 inet6 -ifdisabled
195 if [ -n "${ifconfig_args}" ]; then
196 ${IFCONFIG_CMD} $1 inet6 -ifdisabled
202 if [ -n "${ifconfig_args}" ]; then
205 ${IFCONFIG_CMD} $1 inet6 -ifdisabled
215 if [ -n "${_ifconfig_descr}" ]; then
225 elif [ ${_cfg} -eq 0 ]; then
234 if [ $_cfg -ne 0 ] ; then
275 # Return the value of the pseudo-hash corresponding to $if where
276 # $var is a string containg the sub-string "IF" which will be
284 if [ $# -ne 2 -a $# -ne 3 ]; then
289 _punct=".-/+"
296 eval echo \${${prefix}${_if}${suffix}-${_default}}
309 if [ -z "$_ifn" ]; then
323 if [ $? -eq 1 ]; then
375 lo[0-9]*|\
376 stf[0-9]*|\
377 lp[0-9]*|\
378 sl[0-9]*)
513 pflog[0-9]*|\
514 pfsync[0-9]*|\
515 usbus[0-9]*|\
516 an[0-9]*|\
517 ath[0-9]*|\
518 ipw[0-9]*|\
519 ipfw[0-9]*|\
520 iwi[0-9]*|\
521 iwn[0-9]*|\
522 ral[0-9]*|\
523 wi[0-9]*|\
524 wl[0-9]*|\
525 wpi[0-9]*)
545 # lo0 is always IPv6-enabled
556 if [ -n "${_tmpargs}" ]; then
562 if [ -n "${_tmpargs}" ]; then
568 if [ -n "${_tmpargs}" ]; then
586 lo[0-9]*|\
587 stf[0-9]*|\
588 lp[0-9]*|\
589 sl[0-9]*)
603 if [ -n "${_tmpargs}" ]; then
613 bridge[0-9]*)
652 [ -z "$1" ] && return 1
653 ${IFCONFIG_CMD} -n $1 > /dev/null 2>&1
664 [ -z "$1" ] && return 2
667 set -- $(${IFCONFIG_CMD} -n ${_if} 2>/dev/null)
687 if [ -z "${ifconfig_args}" ]; then
723 ifalias ${_if} inet -alias && _ret=0
732 inet[[:space:]]*) ;;
736 _inet=`expr "$_inet" : '.*\(inet \([0-9]\{1,3\}\.\)\{3\}[0-9]\{1,3\}\).*'`
762 ipv6_prefix_hostid_addr_common ${_if} -alias && _ret=0
763 ifalias ${_if} inet6 -alias && _ret=0
772 inet6[[:space:]]*) ;;
776 _inet6=`expr "$_inet6" : '.*\(inet6 \([0-9a-f:]*\)\).*'`
779 ${IFCONFIG_CMD} ${_if} ${_inet6} -alias
810 # Expand address range ("N-M") specification in addr.
811 # "addr" must not include an address-family keyword.
812 # The results will include an address-family keyword.
841 *:*--*) return ;; # invalid
842 tmp:*[0-9]-[0-9]*:*) # to be expanded
845 *:*[0-9]-[0-9]*:*) # to be expanded
848 echo ${_arg%/[0-9]*} $_exargs && return
854 echo inet ${_arg%/[0-9]*} $_exargs && return
870 IFS=. set -- $_ipaddr
876 :[0-9]*-[0-9]*)
888 _iplow=${_range%-*}
889 _iphigh=${_range#*-}
892 if [ "$_action" = "-alias" ]; then
897 while [ "$_ipcount" -le "$_iphigh" ]; do
899 if [ $_ipcount -gt $(($_iplow + $netif_ipexpand_max)) ]; then
900 …tail:+.}${_iptail}-${_iphead}${_iphead:+.}${_iphigh}${_iptail:+.}${_iptail}). ${_iphead}${_iphead…
931 *:*--*:*) return ;; # invalid
932 tmp:*[0-9a-zA-Z]-[0-9a-zA-Z]*:*)# to be expanded
935 *:*[0-9a-zA-Z]-[0-9a-zA-Z]*:*) # to be expanded
938 echo ${_arg%/[0-9]*} $_exargs && return
944 echo inet6 ${_arg%/[0-9]*} $_exargs && return
956 -alias:*:*) unset _plen ;;
967 _ipleft=${_ipaddr%-*}
968 _ipright=${_ipaddr#*-}
980 if [ -n "$_iplow" -a -n "$_iphigh" ]; then
984 while [ $_ipcount -le $_iphigh ]; do
989 if [ $_ipcount -gt $(($_iplow + $netif_ipexpand_max)) ]
991 …oo large $(printf '(%s:%x%s-%s:%x%s)' "$_ipleft" "$_iplow" "$_ipright" "$_ipleft" "$_iphigh" "$_ip…
1012 *) _plen=$(($_plen - 96)) ;;
1039 ${_af}[[:space:]]*) ;;
1045 link:-alias|ether:-alias) return ;;
1053 ${_af}[[:space:]]*[0-9a-fA-F]-*)
1055 `ifalias_expand_addr $_af $_action ${_tmpargs#${_af}[[:space:]]}`
1057 ${_af}[[:space:]]*)
1069 if [ -n "${_tmpargs}" ]; then
1071 ${_af}[[:space:]]pass[[:space:]]*)
1074 ${_af}[[:space:]]*[0-9a-fA-F]-*)
1076 `ifalias_expand_addr $_af $_action ${_tmpargs#${_af}[[:space:]]}`
1078 ${_af}[[:space:]]*)
1093 local _vif _punct=".-/+"
1105 for alias in `list_vars ifconfig_${_vif}_alias[0-9]\* |
1106 sort_lite -nk1.$((9+${#_vif}+7))`
1111 inet[[:space:]]*) _iaf=inet ;;
1112 inet6[[:space:]]*) _iaf=inet6 ;;
1113 link[[:space:]]*) _iaf=link ;;
1114 ether[[:space:]]*) _iaf=ether ;;
1134 for alias in `list_vars ipv6_ifconfig_${_vif}_alias[0-9]\* |
1135 sort_lite -nk1.$((14+${#_vif}+7))`
1162 ${_af}[[:space:]]*)
1174 ${_af}[[:space:]]*)
1192 if [ -n "${prefix}" ]; then
1224 if [ -x /sbin/rtsol ]; then
1237 ${IFCONFIG_CMD} $1 inet6 -accept_rtadv
1248 if [ -r /etc/start_if.$1 ]; then
1263 if [ -r /etc/stop_if.$1 ]; then
1281 for parent in `set | sed -nE 's/wlans_([a-z]+[a-z0-9]+[0-9]+)=.*/\1/p'`; do
1287 ""|$child|$child[[:space:]]*|*[[:space:]]$child[[:space:]]*|*[[:space:]]$child) ;;
1294 if expr $child : 'wlan[0-9][0-9]*$' >/dev/null 2>&1; then
1295 ${IFCONFIG_CMD} $child create ${create_args} && cfg=0
1297 ${IFCONFIG_CMD} wlan create ${create_args} name $child && cfg=0
1299 if [ $? -eq 0 ]; then
1302 if [ -n "${debug_flags}" ]; then
1303 wlandebug -i $child ${debug_flags}
1307 if [ -n "${_list# }" ]; then
1323 for parent in `set | sed -nE 's/wlans_([a-z]+[a-z0-9]+[0-9]+)=.*/\1/p'`; do
1327 ""|$child|$child[[:space:]]*|*[[:space:]]$child[[:space:]]*|*[[:space:]]$child) ;;
1334 ${IFCONFIG_CMD} -n ${child} destroy
1335 if [ $? -eq 0 ]; then
1340 if [ -n "${_list# }" ]; then
1358 OIFS=$IFS; IFS=:; set -- $ifn; ifn=$1; ifopt=$2; IFS=$OIFS
1360 ""|$ifn|$ifn[[:space:]]*|*[[:space:]]$ifn[[:space:]]*|*[[:space:]]$ifn) ;;
1364 epair[0-9]*)
1365 # epair(4) uses epair[0-9] for creation and
1366 # epair[0-9][ab] for configuration.
1376 if [ $? -eq 0 ]; then
1387 if [ $? -eq 0 ]; then
1394 OIFS=$IFS; IFS=:; set -- $ifn; ifn=$1; ifopt=$2; IFS=$OIFS
1396 ""|$ifn|$ifn[[:space:]]*|*[[:space:]]$ifn[[:space:]]*|*[[:space:]]$ifn) ;;
1404 gif[0-9]*)
1412 if [ $? -eq 0 ]; then
1419 inet6[[:space:]]*)
1430 if [ -n "${_list# }" ]; then
1454 OIFS=$IFS; IFS=:; set -- $ifn; ifn=$1; ifopt=$2; IFS=$OIFS
1461 ""|$ifn|$ifn[[:space:]]*|*[[:space:]]$ifn[[:space:]]*|*[[:space:]]$ifn) ;;
1465 epair[0-9]*)
1466 # Note: epair(4) uses epair[0-9] for removal and
1467 # epair[0-9][ab] for configuration.
1477 ${IFCONFIG_CMD} -n $_difn destroy
1478 if [ $? -eq 0 ]; then
1487 ${IFCONFIG_CMD} -n ${ifn} destroy
1488 if [ $? -eq 0 ]; then
1494 if [ -n "${_list# }" ]; then
1506 local cfg child child_vlans create_args debug_flags ifn i
1507 cfg=1
1513 if [ -n "${child_vlans}" ]; then
1518 if expr $child : '[1-9][0-9]*$' >/dev/null 2>&1; then
1521 ${IFCONFIG_CMD} $child create ${create_args} && cfg=0
1524 if expr $child : 'vlan[0-9][0-9]*$' >/dev/null 2>&1; then
1525 ${IFCONFIG_CMD} $child create ${create_args} && cfg=0
1528 ${IFCONFIG_CMD} $i name $child && cfg=0
1536 return ${cfg}
1544 local cfg child child_vlans ifn
1545 cfg=1
1549 if expr $child : '[1-9][0-9]*$' >/dev/null 2>&1; then
1555 ${IFCONFIG_CMD} -n $child destroy && cfg=0
1558 return ${cfg}
1566 ngctl -f - 2> /dev/null <<EOF
1580 t=`expr "${line}" : '.* name="\([a-z]*[0-9]*\)" .*'`
1581 if [ -n "${t}" ]; then
1596 for _if in ${*:-$(${IFCONFIG_CMD} -l)}; do
1598 if [ ! -z "$_ifname" ]; then
1610 # nodhcp - all interfaces, excluding DHCP configured interfaces
1611 # dhcp - list only DHCP configured interfaces
1612 # noautoconf - all interfaces, excluding IPv6 Stateless
1614 # autoconf - list only IPv6 Stateless Address Autoconf
1631 _autolist="`${IFCONFIG_CMD} -l`"
1646 # epair(4) uses epair[0-9] for creation and
1647 # epair[0-9][ab] for configuration.
1649 epair[0-9]*)
1658 # lo0 is effectively mandatory, so help prevent foot-shooting
1677 [ -n "`_ifconfig_getargs $_if`" ]; then
1692 [ -n "`_ifconfig_getargs $_if ipv6`" ]; then
1714 # get_default_if -address_family
1716 # The -address_family argument must be suitable passing to route(8).
1725 for line in `route -n get $1 default 2>/dev/null`; do
1763 # Echo link-local address from $if if any.