config root man

Current Path : /usr/src/tools/tools/ath/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //usr/src/tools/tools/ath/athctrl.sh

#! /bin/sh
#
# Set the IFS parameters for an interface configured for
# point-to-point use at a specific distance.  Based on a
# program by Gunter Burchardt.
#
# $FreeBSD: release/9.1.0/tools/tools/ath/athctrl.sh 149629 2005-08-30 16:03:15Z sam $
#
DEV=ath0
d=0

usage()
{
	echo "Usage: $0 [-i athX] [-d meters]"
	exit 2
}

args=`getopt d:i: $*`
test $? -ne 0 && usage

set -- $args
for i; do
	case "$i" in
	-i)	DEV="$2"; shift; shift;;
	-d)	d="$2"; shift; shift;;
	--)	shift; break;
	esac
done

test $d -eq 0 && usage

slottime=`expr 9 + \( $d / 300 \)`
if expr \( $d % 300 \) != 0 >/dev/null 2>&1; then
	slottime=`expr $slottime + 1`
fi
timeout=`expr $slottime \* 2 + 3`

printf "Setup IFS parameters on interface ${DEV} for %i meter p-2-p link\n" $d
ATHN=`echo $DEV | sed 's/ath//'`
sysctl dev.ath.$ATHN.slottime=$slottime
sysctl dev.ath.$ATHN.acktimeout=$timeout
sysctl dev.ath.$ATHN.ctstimeout=$timeout

Man Man