Browse Source

Added a place for example mac80211_hwsim test cases

The tests directory and its subdirectories contain a set of configuration
files that can be used to exercise various mac80211, hostapd, and
wpa_supplicant features. The test.txt file in each test directory describes
the particular test and includes the commands needed to run the test.
Jouni Malinen 16 years ago
parent
commit
b3f240bc0e

+ 11 - 0
mac80211_hwsim/tests/0001-wpa2-psk/hostapd.conf

@@ -0,0 +1,11 @@
+interface=wlan0
+driver=nl80211
+
+hw_mode=g
+channel=1
+ssid=mac80211 test
+
+wpa=2
+wpa_key_mgmt=WPA-PSK
+wpa_pairwise=CCMP
+wpa_passphrase=12345678

+ 7 - 0
mac80211_hwsim/tests/0001-wpa2-psk/test.txt

@@ -0,0 +1,7 @@
+# WPA2-Personal (PSK) with CCMP, AP and single client
+
+modprobe mac80211_hwsim
+
+hostapd hostapd.conf
+
+wpa_supplicant -Dwext -iwlan1 -c wpa_supplicant.conf

+ 10 - 0
mac80211_hwsim/tests/0001-wpa2-psk/wpa_supplicant.conf

@@ -0,0 +1,10 @@
+ctrl_interface=/var/run/wpa_supplicant
+
+network={
+	ssid="mac80211 test"
+	psk="12345678"
+	key_mgmt=WPA-PSK
+	proto=WPA2
+	pairwise=CCMP
+	group=CCMP
+}

+ 2 - 0
mac80211_hwsim/tests/0002-vlan/hostapd.accept

@@ -0,0 +1,2 @@
+02:00:00:00:01:00	1
+02:00:00:00:02:00	2

+ 12 - 0
mac80211_hwsim/tests/0002-vlan/hostapd.conf

@@ -0,0 +1,12 @@
+interface=wlan0
+driver=nl80211
+
+hw_mode=g
+channel=1
+ssid=mac80211 test
+
+dynamic_vlan=2
+vlan_file=hostapd.vlan
+
+macaddr_acl=0
+accept_mac_file=hostapd.accept

+ 1 - 0
mac80211_hwsim/tests/0002-vlan/hostapd.vlan

@@ -0,0 +1 @@
+*	vlan#

+ 15 - 0
mac80211_hwsim/tests/0002-vlan/test.txt

@@ -0,0 +1,15 @@
+# Plaintext connection, two clients, different VLANs
+
+modprobe mac80211_hwsim radios=3
+
+hostapd hostapd.conf
+
+ifconfig wlan1 up
+iwconfig wlan1 essid "mac80211 test"
+
+ifconfig wlan2 up
+iwconfig wlan2 essid "mac80211 test"
+
+# Expected results:
+# STA1(wlan1) is bound to vlan1
+# STA2(wlan2) is bound to vlan2