Upstream vwifi v7.0 (Raizo62/vwifi @ 4a9842e)

Unmodified upstream source from https://github.com/Raizo62/vwifi
Commit: 4a9842e "CMakeLists.txt : VERSION = 7.0"

Simulator of WiFi (802.11) interfaces to communicate between
several Virtual Machines via mac80211_hwsim + TCP relay.

License: Apache-2.0
This commit is contained in:
Guy Resheff
2026-03-08 08:19:45 -07:00
commit 92df7a383a
75 changed files with 8628 additions and 0 deletions
+83
View File
@@ -0,0 +1,83 @@
#!/bin/bash
MODE="d" # dhcp , s : static
INET="wlan1"
CONN="o" # wpa : w , open : o
WPA_CONF_FILE_PATH="tests/wpa_supplicant.conf"
IP="10.0.0.2/8"
help(){
echo "Help : $0 -m s|d -c o|w interface IP_STATIC/MASQUE"
echo " -m : IP Configuration mode"
echo " d : dhcp "
echo " s : static"
echo " -c : Connection mode"
echo " o : open "
echo " w : wpa"
}
if (( $# == 0 ))
then
help
exit 1
fi
while getopts "m:c:" option ; do
case $option in
m) MODE="${OPTARG}"
;;
c) CONN="${OPTARG}"
;;
*) help
;;
esac
done
shift $(($OPTIND - 1))
INET=$1
IP="$2"
#######################
if [ $CONN == "w" ] ; then
wpa_supplicant -Dnl80211 -i ${INET} -c ${WPA_CONF_FILE_PATH} &
else
ip link set up ${INET}
iw dev ${INET} connect mac80211_open
fi
sleep 3
if [ ${MODE} == "s" ] ; then
ip a a ${IP} dev wlan0
else
dhclient -v -i ${INET}
fi