Skip to content

Commit

Permalink
Format management frame test
Browse files Browse the repository at this point in the history
  • Loading branch information
Nukesor committed Apr 23, 2021
1 parent 5243259 commit 0cbfb73
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
5 changes: 3 additions & 2 deletions tests/data_frames.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,14 @@ fn test_null_data() {
}

#[test]
fn test_qos_null_data() {
fn test_qos_null() {
let _payload = [
200, 1, // FrameControl
58, 1, // Duration id
248, 50, 228, 173, 71, 184, // First Address
192, 238, 251, 75, 207, 58, // Second Address
248, 50, 228, 173, 71, 184, // Third Address
80, 106, 0, 0,
80, 106, // Sequence Control
0, 0, // QoS Header
];
}
26 changes: 17 additions & 9 deletions tests/management_frames.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,23 @@ fn test_beacon() {
17, 4, // capability
0, 15, 77, 121, 32, 102, 97, 99, 101, 32, 119, 104, 101, 110, 32, 73, 80, // SSID
1, 8, 130, 132, 139, 150, 36, 48, 72, 108, // Supported rates
3, 1, 9, 5, 4, 0, 3, 1, 0, 42, 1, 4, 47, 1, 4, 48, 20, 1, 0, 0, 15, 172, 4, 1, 0, 0, 15,
172, 4, 1, 0, 0, 15, 172, 2, 12, 0, 50, 4, 12, 18, 24, 96, 45, 26, 189, 25, 23, 255, 255,
255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 61, 22, 9, 8, 4, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 74, 14, 20, 0, 10, 0, 44, 1, 200, 0, 20, 0,
5, 0, 25, 0, 127, 8, 1, 0, 0, 0, 0, 0, 0, 64, 221, 49, 0, 80, 242, 4, 16, 74, 0, 1, 16, 16,
68, 0, 1, 2, 16, 71, 0, 16, 190, 15, 245, 213, 137, 177, 64, 140, 203, 243, 77, 29, 90,
130, 118, 247, 16, 60, 0, 1, 3, 16, 73, 0, 6, 0, 55, 42, 0, 1, 32, 221, 9, 0, 16, 24, 2, 5,
0, 28, 0, 0, 221, 24, 0, 80, 242, 2, 1, 1, 132, 0, 3, 164, 0, 0, 39, 164, 0, 0, 66, 67, 94,
0, 98, 50, 47, 0,
3, 1, 9, //
5, 4, 0, 3, 1, 0, //
42, 1, 4, //
47, 1, 4, //
48, 20, 1, 0, 0, 15, 172, 4, 1, 0, 0, 15, 172, 4, 1, 0, 0, 15, 172, 2, 12, 0, 50, 4, 12,
18, 24, 96, //
45, 26, 189, 25, 23, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, //
61, 22, 9, 8, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //
74, 14, 20, 0, 10, 0, 44, 1, 200, 0, 20, 0, 5, 0, 25, 0, //
127, 8, 1, 0, 0, 0, 0, 0, 0, 64, //
221, 49, 0, 80, 242, 4, 16, 74, 0, 1, 16, 16, 68, 0, 1, 2, 16, 71, 0, 16, 190, 15, 245,
213, 137, 177, 64, 140, 203, 243, 77, 29, 90, 130, 118, 247, 16, 60, 0, 1, 3, 16, 73, 0, 6,
0, 55, 42, 0, 1, 32, //
221, 9, 0, 16, 24, 2, 5, 0, 28, 0, 0, //
221, 24, 0, 80, 242, 2, 1, 1, 132, 0, 3, 164, 0, 0, 39, 164, 0, 0, 66, 67, 94, 0, 98, 50,
47, 0,
];

let frame = parse_frame(&payload).expect("Payload should be valid");
Expand Down

0 comments on commit 0cbfb73

Please sign in to comment.