Crates.io | awdl-frame-parser |
lib.rs | awdl-frame-parser |
version | 0.3.8 |
source | src |
created_at | 2023-04-23 01:32:07.802596 |
updated_at | 2024-02-20 09:41:50.154008 |
description | A parser for AWDL data and action frames. |
homepage | |
repository | https://github.com/Frostie314159/awdl-frame-parser |
max_upload_size | |
id | 846289 |
size | 155,695 |
AWDL(Apple Wireless Direct Link) is a protocol, for wireless P2P communication. AWDL is designed to be low latency and high bandwidth, while requiring only one chip for AWDL and "normal" WiFi. This parser can read and write the network frames used by this protocol. For further information see this stackoverflow post.
The parser was designed to be able to run in low flash environments(i.e. ESP32, wasm). The listed time complexity refers to, if the parser runtime rises with input length. So O(1) means go ahead and O(n) means think before you parse. O(1) parsers are not benchmarked.
TLV | feature | Worst case time complexity |
---|---|---|
Arpa | dns_sd_tlvs | O(n) |
Service Parameters | dns_sd_tlvs | O(n) |
Service Respone | dns_sd_tlvs | min. O(n) |
Channel Sequence | sync_elect_tlvs | O(2n) |
ElectionParameters[V2] | sync_elect_tlvs | O(1) |
Synchronization Parameters | sync_elect_tlvs | O(1) |
Synchronization Tree | sync_elect_tlvs | O(n) |
HTCapabilities | data_tlvs | O(1) |
IEEE80211 Container | data_tlvs | O(n) |
Data Path State | data_tlvs | O(n) |
Version | version_tlv | O(1) |
Do note please, that although the parsers are not yet present, the features are. Also some parsers were bundled into one feature. (For more information on this refer to Milan Stute's dissertation.)
The library doesn't require any allocations, due to the author sacrificing parts of his sanity, to use Iterators everywhere. Allocations are only used for testing, to verify that the reported sizes match reality.
Although the actual parser was written by me, the reverse engineering of the AWDL protocol was conducted by Milan Stute and SeeMoo-Lab. So kudos to them...