Lines Matching refs:ifn
34 # ifn_start ifn
40 local ifn cfg
41 ifn="$1"
44 [ -z "$ifn" ] && err 1 "ifn_start called without an interface"
46 ifscript_up ${ifn} && cfg=0
47 ifconfig_up ${ifn} && cfg=0
48 if ! noafif $ifn; then
49 afexists inet6 && ipv6_up ${ifn} && cfg=0
50 afexists inet && ipv4_up ${ifn} && cfg=0
52 childif_create ${ifn} && cfg=0
57 # ifn_stop ifn
63 local ifn cfg
64 ifn="$1"
67 [ -z "$ifn" ] && err 1 "ifn_stop called without an interface"
69 if ! noafif $ifn; then
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
80 # ifn_vnetup ifn
81 # Move ifn to the specified vnet jail.
89 # ifn_vnetdown ifn
90 # Reclaim ifn from the specified vnet jail.
98 # ifn_vnet0 ifn action
1331 local _list ifn ifopt _iflist _inet6 _n tmpargs
1336 for ifn in ${cloned_interfaces}; do
1337 # Parse ifn:ifopt.
1338 OIFS=$IFS; IFS=:; set -- $ifn; ifn=$1; ifopt=$2; IFS=$OIFS
1340 ""|$ifn|$ifn[[:space:]]*|*[[:space:]]$ifn[[:space:]]*|*[[:space:]]$ifn) ;;
1343 case $ifn in
1348 # Skip if ${ifn}a or ${ifn}b already exist.
1349 if ${IFCONFIG_CMD} ${ifn}a > /dev/null 2>&1; then
1351 elif ${IFCONFIG_CMD} ${ifn}b > /dev/null 2>&1; then
1354 ${IFCONFIG_CMD} ${ifn} create \
1355 `get_if_var ${ifn} create_args_IF`
1357 _list="$_list ${ifn}a ${ifn}b"
1361 # Skip if ${ifn} already exists.
1362 if ${IFCONFIG_CMD} $ifn > /dev/null 2>&1; then
1365 ${IFCONFIG_CMD} ${ifn} create \
1366 `get_if_var ${ifn} create_args_IF`
1368 _list="$_list $ifn"
1372 for ifn in ${gif_interfaces}; do
1373 # Parse ifn:ifopt.
1374 OIFS=$IFS; IFS=:; set -- $ifn; ifn=$1; ifopt=$2; IFS=$OIFS
1376 ""|$ifn|$ifn[[:space:]]*|*[[:space:]]$ifn[[:space:]]*|*[[:space:]]$ifn) ;;
1379 # Skip if ifn already exists.
1380 if ${IFCONFIG_CMD} $ifn > /dev/null 2>&1; then
1383 case $ifn in
1385 ${IFCONFIG_CMD} $ifn create
1389 ${IFCONFIG_CMD} $_n name $ifn
1393 _list="$_list $ifn"
1394 tmpargs=$(get_if_var $ifn gifconfig_IF)
1405 ${IFCONFIG_CMD} $ifn $_inet6 tunnel $tmpargs
1422 local _list ifn _difn ifopt _iflist _sticky
1432 for ifn in ${cloned_interfaces} ${gif_interfaces}; do
1433 # Parse ifn:ifopt.
1434 OIFS=$IFS; IFS=:; set -- $ifn; ifn=$1; ifopt=$2; IFS=$OIFS
1441 ""|$ifn|$ifn[[:space:]]*|*[[:space:]]$ifn[[:space:]]*|*[[:space:]]$ifn) ;;
1444 case $ifn in
1449 # Skip if both of ${ifn}a and ${ifn}b do not exist.
1450 if ${IFCONFIG_CMD} ${ifn}a > /dev/null 2>&1; then
1451 _difn=${ifn}a
1452 elif ${IFCONFIG_CMD} ${ifn}b > /dev/null 2>&1; then
1453 _difn=${ifn}b
1459 _list="$_list ${ifn}a ${ifn}b"
1463 # Skip if ifn does not exist.
1464 if ! ${IFCONFIG_CMD} $ifn > /dev/null 2>&1; then
1467 ${IFCONFIG_CMD} -n ${ifn} destroy
1469 _list="$_list $ifn"
1486 local cfg child child_vlans create_args debug_flags ifn i
1488 ifn=$1
1491 child_vlans=`get_if_var $ifn vlans_IF`
1499 child="${ifn}.${child}"
1503 create_args="vlandev $ifn `get_if_var $child create_args_IF`"
1524 local cfg child child_vlans ifn
1527 child_vlans=`get_if_var $ifn vlans_IF`
1530 child="${ifn}.${child}"