use ieee80211::{elements::VendorSpecificElement, mgmt_frame::BeaconFrame}; use scroll::Pread; #[allow(unused)] pub fn borrow_element(packet: &[u8]) -> Option> { let beacon = packet.pread::(0).unwrap(); if let Some(vendor_specific) = beacon.elements.get_first_element::() { return Some(vendor_specific); } None } #[allow(unused)] pub fn borrow_ssid(packet: &[u8]) -> Option<&str> { let beacon = packet.pread::(0).unwrap(); beacon.ssid() }