config root man

Current Path : /usr/src/tools/tools/net80211/scripts/

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/net80211/scripts/setup.wpa1.aes

#! /bin/sh
#
# Script for testing WPA1 w/ AES.
#
# $FreeBSD: release/9.1.0/tools/tools/net80211/scripts/setup.wpa1.aes 178361 2008-04-20 20:43:42Z sam $
#
PATH=.:$PATH
. config

BRIDGE=bridge0
WLAN=wlan0
SSID=$SSID-wpa
CONF=$TMPDIR/bsd-$WLAN.conf

makeconf()
{
	conf=$1
	rm -f $conf
	cat >$1 <<EOF
interface=$WLAN
ctrl_interface=$HOSTAPD_CTRL_INTERFACE
logger_syslog=-1
logger_syslog_level=0
logger_stdout=-1
logger_stdout_level=0
debug=4
wpa=1
wpa_key_mgmt=WPA-PSK
wpa_passphrase=$WPA_PASSPHRASE
wpa_pairwise=CCMP
EOF
}

trap "ifconfig $BRIDGE destroy; ifconfig $WLAN destroy; \
	rm -f $CONF" 2

ifconfig $WLAN create wlandev $WIRELESS wlanmode hostap
#wlandebug -i $WLAN assoc+crypto
wlandebug -i $WLAN assoc
ifconfig $WLAN ssid $SSID
ifconfig $WLAN channel $CHANNEL
ifconfig $WLAN mtu 1500		# NB: if_bridge requires matching mtu's

ifconfig $BRIDGE create
ifconfig $BRIDGE addm $WIRED addm $WLAN up
ifconfig $WLAN up
ifconfig $WIRED up

ifconfig

makeconf $CONF
#mwldebug -i $WIRELESS keycache
start_hostapd -K $CONF

Man Man