~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/networking/mac80211_hwsim/mac80211_hwsim.rst

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 :orphan:
  2 
  3 .. SPDX-License-Identifier: GPL-2.0
  4 .. include:: <isonum.txt>
  5 
  6 ===================================================================
  7 mac80211_hwsim - software simulator of 802.11 radio(s) for mac80211
  8 ===================================================================
  9 
 10 :Copyright: |copy| 2008, Jouni Malinen <j@w1.fi>
 11 
 12 This program is free software; you can redistribute it and/or modify
 13 it under the terms of the GNU General Public License version 2 as
 14 published by the Free Software Foundation.
 15 
 16 
 17 Introduction
 18 ============
 19 
 20 mac80211_hwsim is a Linux kernel module that can be used to simulate
 21 arbitrary number of IEEE 802.11 radios for mac80211. It can be used to
 22 test most of the mac80211 functionality and user space tools (e.g.,
 23 hostapd and wpa_supplicant) in a way that matches very closely with
 24 the normal case of using real WLAN hardware. From the mac80211 view
 25 point, mac80211_hwsim is yet another hardware driver, i.e., no changes
 26 to mac80211 are needed to use this testing tool.
 27 
 28 The main goal for mac80211_hwsim is to make it easier for developers
 29 to test their code and work with new features to mac80211, hostapd,
 30 and wpa_supplicant. The simulated radios do not have the limitations
 31 of real hardware, so it is easy to generate an arbitrary test setup
 32 and always reproduce the same setup for future tests. In addition,
 33 since all radio operation is simulated, any channel can be used in
 34 tests regardless of regulatory rules.
 35 
 36 mac80211_hwsim kernel module has a parameter 'radios' that can be used
 37 to select how many radios are simulated (default 2). This allows
 38 configuration of both very simply setups (e.g., just a single access
 39 point and a station) or large scale tests (multiple access points with
 40 hundreds of stations).
 41 
 42 mac80211_hwsim works by tracking the current channel of each virtual
 43 radio and copying all transmitted frames to all other radios that are
 44 currently enabled and on the same channel as the transmitting
 45 radio. Software encryption in mac80211 is used so that the frames are
 46 actually encrypted over the virtual air interface to allow more
 47 complete testing of encryption.
 48 
 49 A global monitoring netdev, hwsim#, is created independent of
 50 mac80211. This interface can be used to monitor all transmitted frames
 51 regardless of channel.
 52 
 53 
 54 Simple example
 55 ==============
 56 
 57 This example shows how to use mac80211_hwsim to simulate two radios:
 58 one to act as an access point and the other as a station that
 59 associates with the AP. hostapd and wpa_supplicant are used to take
 60 care of WPA2-PSK authentication. In addition, hostapd is also
 61 processing access point side of association.
 62 
 63 ::
 64 
 65 
 66     # Build mac80211_hwsim as part of kernel configuration
 67 
 68     # Load the module
 69     modprobe mac80211_hwsim
 70 
 71     # Run hostapd (AP) for wlan0
 72     hostapd hostapd.conf
 73 
 74     # Run wpa_supplicant (station) for wlan1
 75     wpa_supplicant -Dnl80211 -iwlan1 -c wpa_supplicant.conf
 76 
 77 
 78 More test cases are available in hostap.git:
 79 git://w1.fi/srv/git/hostap.git and mac80211_hwsim/tests subdirectory
 80 (http://w1.fi/gitweb/gitweb.cgi?p=hostap.git;a=tree;f=mac80211_hwsim/tests)

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php