1 of 26

wtap(4) improvement

Speaker: EN-WEI WU

2 of 26

Who am I

  • A senior college student in NCKU (Taiwan)
  • Google Summer of Code 2022
  • Intern of FreeBSD Foundation for improving wireless infrastructure
  • Enthusiastic in OS and 802.11

3 of 26

Outline

  • Background
  • How wtap works
  • Our enhancement
  • Testing environment
  • Future work (discussion)

4 of 26

Background

5 of 26

What is wtap

  • Wireless simulator in FreeBSD
  • Originally written by Monthadar Al Jaberi, TerraNet AB
  • Originally supports only mesh mode (802.11s)

6 of 26

wtap in birds-eye view

7 of 26

Why wtap

  • Testing net80211 and user-space tool without hardware
    • No unpredictable hardware
    • Easy to use
    • All in software, bugs can’t hide!

8 of 26

Our enhancements

  • Support Adhoc mode
  • Support HostAP/STA modes
  • wpa_supplicant (8)/hostapd (8) on the wtap (4)
  • Radiotap header
  • wtapctl (8)

9 of 26

Ability of wtap

  • Originally:
    • Testing net80211 (mostly mesh mode)
  • Our enhancement:
    • Testing net80211 (Adhoc, HostAP, STA, key mgmt)
    • Testing wpa_supplicant and hostapd

​

10 of 26

Who use wtap?

11 of 26

Terminology

12 of 26

Parent device and vap

  • Parent device: per-NIC structure (underlying device)
    • rtwn(4), ath(4), iwm(4), etc.
  • vap: cloned from the parent device
    • Network interface: wlan0, wlan1…
    • Multiple concurrent vaps on top of a parent device

can be supported by driver

13 of 26

Infrastructure BSS

  • AP is the master node
  • STAs must communicate to each other through AP
  • BSSID equals to AP’s MAC address

14 of 26

How wtap works

15 of 26

16 of 26

17 of 26

18 of 26

Our enhancement

19 of 26

Our enhancement

  • Simulate TSF (for every op. modes except STA)
  • Beacon TX adjustment (for every op. modes except STA)
  • IBSS merge (for IBSS mode)
  • Supporting TX/RX radiotap (for every op. modes)
  • User-space tool : wtapctl(8)

​

​

20 of 26

Patches have been merged (main)

21 of 26

Patches are being reviewed

22 of 26

Testing environment

23 of 26

Testing Environment

24 of 26

Future works (discussion)

25 of 26

If we want to

  • Test compatibility between old and new net80211
  • Test Wi-Fi on different operating system

26 of 26