Dot11AssocRequest::Dot11AssocRequest(const uint8_t* buffer, uint32_t total_sz) : Dot11ManagementFrame(buffer, total_sz) { InputMemoryStream stream(buffer, total_sz); stream.skip(management_frame_size()); stream.read(body_); parse_tagged_parameters(stream); }
Dot11ProbeRequest::Dot11ProbeRequest(const uint8_t *buffer, uint32_t total_sz) : Dot11ManagementFrame(buffer, total_sz) { uint32_t sz = management_frame_size(); buffer += sz; total_sz -= sz; parse_tagged_parameters(buffer, total_sz); }
Dot11Disassoc::Dot11Disassoc(const uint8_t *buffer, uint32_t total_sz) : Dot11ManagementFrame(buffer, total_sz) { uint32_t sz = management_frame_size(); buffer += sz; total_sz -= sz; if(total_sz < sizeof(_body)) throw malformed_packet(); memcpy(&_body, buffer, sizeof(_body)); buffer += sizeof(_body); total_sz -= sizeof(_body); parse_tagged_parameters(buffer, total_sz); }