Summary
Add WiFi scanning to hostd on macOS using CoreWLAN bindings. macOS cannot do monitor mode without kext hacks, but CWInterface.scanForNetworks returns BSSID, SSID, RSSI, and channel — enough for most WiFi signatures.
Context
Phase 1 of hostd (BLE scanning) is implemented. This adds macOS WiFi scanning as a complement to the Linux pcap approach (#102).
Implementation
- New
hostd/src/wifi_macos.rs module (#[cfg(target_os = "macos")])
- Use
objc2 / objc2-core-wlan bindings to call CWInterface.scanForNetworks(withSSID:includeHidden:)
- Map scan results to
WiFiEvent with FrameType::Beacon (no raw frame subtypes available)
- Periodic polling (e.g., every 2s) since CoreWLAN doesn't stream
- Location Services permission required on macOS 14+
Known Limitations
- No raw 802.11 frames — only beacon-equivalent data (SSID, BSSID, RSSI, channel)
- Cannot capture probe requests, deauths, or other management frames
wifi_frame_content signatures won't fire
- Requires Location Services authorization
Dependencies
objc2 + objc2-core-wlan (or core-foundation + raw ObjC FFI)
Related
Summary
Add WiFi scanning to
hostdon macOS using CoreWLAN bindings. macOS cannot do monitor mode without kext hacks, butCWInterface.scanForNetworksreturns BSSID, SSID, RSSI, and channel — enough for most WiFi signatures.Context
Phase 1 of hostd (BLE scanning) is implemented. This adds macOS WiFi scanning as a complement to the Linux pcap approach (#102).
Implementation
hostd/src/wifi_macos.rsmodule (#[cfg(target_os = "macos")])objc2/objc2-core-wlanbindings to callCWInterface.scanForNetworks(withSSID:includeHidden:)WiFiEventwithFrameType::Beacon(no raw frame subtypes available)Known Limitations
wifi_frame_contentsignatures won't fireDependencies
objc2+objc2-core-wlan(orcore-foundation+ raw ObjC FFI)Related