Denis Kenzior
023ba1ea32
mpdu: Fix error
...
src/mpdu.c: In function ‘mpdu_validate’:
src/mpdu.c:180:9: error: ‘mmpdu’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
mmpdu = (const struct mmpdu_header *) mmpdu;
^
2017-08-31 18:23:47 -05:00
Andrew Zaborowski
303683c89f
mpdu: Refactor mpdu structs
...
Refactor management frame structures to take into account optional
presence of some parts of the header:
* drop the single structure for management header and body since
the body offset is variable.
* add mmpdu_get_body to locate the start of frame body.
* drop the union of different management frame type bodies.
* prefix names specific to management frames with "mmpdu" instead
of "mpdu" including any enums based on 802.11-2012 section 8.4.
* move the FC field to the mmpdu_header structure.
2017-08-31 15:11:30 -05:00
Denis Kenzior
5247695d56
mpdu: fix transaction_sequence byte-ordering
...
transaction_sequence was not being considered in host CPU byte order
2015-01-22 12:41:10 -06:00
Denis Kenzior
e60b814dc8
mpdu: algorithm was not swapped to host byte-order
2015-01-22 12:41:10 -06:00
Tomasz Bursztyka
e02f02fa69
mpdu: Change the validation function signature
...
What comes in is a frame, and let's set it to uint8_t pointer, which is
semantically better than unsigned char.
Also, returning the cast pointer instead of a boolean is easier to
use as there won't be any need to perform the cast ourselves afterward
2015-01-22 12:14:47 -06:00
Tomasz Bursztyka
3d5fe2fddd
mpdu: Validate beacon mpdu subtype
...
We do not currently validate the IEs that are following until the end
of the frame
2015-01-21 14:31:26 -06:00
Tomasz Bursztyka
9ce1745ede
mpdu: Validate timing advertisement mpdu subtype
...
We do not currently validate the IEs that are following until the end
of the frame
2015-01-21 14:30:51 -06:00
Tomasz Bursztyka
8078f18c35
mpdu: Validate probe response mpdu subtype
...
We do not currently validate the IEs that are following until the end
of the frame
2015-01-21 14:30:12 -06:00
Tomasz Bursztyka
cc1cc64843
mpdu: Validate probe request mpdu subtype
...
We do not currently validate the IEs that are following until the end
of the frame
2015-01-21 14:29:39 -06:00
Tomasz Bursztyka
142a6a8a0c
mpdu: Validate reassociation response mpdu subtype
...
We do not currently validate the IEs that are following until the end
of the frame
2015-01-21 14:29:05 -06:00
Tomasz Bursztyka
efcaefc5dd
mpdu: Validate reassociation request mpdu subtype
...
We do not currently validate the IEs that are following until the end
of the frame.
2015-01-21 14:28:21 -06:00
Tomasz Bursztyka
8353ac445d
mpdu: Validate association response mpdu subtype
...
We do not currently validate the IEs that are following until the end
of the frame.
2015-01-21 14:28:14 -06:00
Tomasz Bursztyka
5c9f1db01f
mpdu: Validate association request mpdu subtype
...
We do not currently validate the IEs that are following until the end
of the frame.
2015-01-21 14:28:07 -06:00
Tomasz Bursztyka
d1c29daa24
mpdu: Validate disassociation mpdu subtype
...
These own a reason code which is currently the only interesting
information to handle. Let's skip the vendor specific ones for now.
2015-01-21 14:27:59 -06:00
Tomasz Bursztyka
e106033fce
mpdu: Validate ATIM mpdu subtype
...
ATIM management frames have an empty body.
2015-01-21 14:27:38 -06:00
Denis Kenzior
c3aef948db
mpdu: Update offset for authentication frames
...
Offset was not updated properly when validating authentication frames
2015-01-21 14:25:07 -06:00
Denis Kenzior
b22f93203c
mpdu: Rework to a zero-copy based framework
2014-12-17 17:44:44 -06:00
Denis Kenzior
d7b6a36db8
mpdu: Rework structure definitions
...
The current setup was not endian safe
2014-12-17 16:22:06 -06:00
Denis Kenzior
3ef0ff1e1a
mpdu: Fix invalid read
...
The cast was being done incorrectly resulting in invalid values being
obtained
2014-12-17 16:21:05 -06:00
Denis Kenzior
ca742bb95d
mpdu: Fix style
2014-12-16 16:57:30 -06:00
Denis Kenzior
b0af0177ac
mpdu: Replace for loop with memcpy
2014-12-16 14:26:33 -06:00
Denis Kenzior
61a44dd485
mpdu: Fix style
2014-12-16 14:23:36 -06:00
Denis Kenzior
6a011f0d92
mpdu: Simplify checks
2014-12-16 14:22:13 -06:00
Tomasz Bursztyka
805619fc9d
core: Add the preliminary logic to parse 802.11 MPDUs
...
It currently focuses on parsing management frames, and specifically its
authentication and deauthentication frames.
2014-12-16 10:53:20 -06:00