void RC4EAPOL::write_body(OutputMemoryStream& stream) { if (key_.size()) { header_.key_length = Endian::host_to_be(static_cast<uint16_t>(key_.size())); } stream.write(header_); stream.write(key_.begin(), key_.end()); }
void RSNEAPOL::write_body(OutputMemoryStream& stream) { if (key_.size()) { if (!header_.key_t && header_.install) { header_.key_length = Endian::host_to_be<uint16_t>(32); wpa_length(static_cast<uint16_t>(key_.size())); } else if (key_.size()) { wpa_length(static_cast<uint16_t>(key_.size())); } } stream.write(header_); stream.write(key_.begin(), key_.end()); }
void Dot11AssocRequest::write_fixed_parameters(OutputMemoryStream& stream) { stream.write(body_); }
void Dot11Disassoc::write_fixed_parameters(OutputMemoryStream& stream) { stream.write(body_); }
void Dot11ReAssocResponse::write_fixed_parameters(OutputMemoryStream& stream) { stream.write(body_); }
void Dot11Authentication::write_fixed_parameters(OutputMemoryStream& stream) { stream.write(body_); }
void IPv6::write_header(const ext_header& header, OutputMemoryStream& stream) { const uint8_t length = header.length_field() / 8; stream.write(header.option()); stream.write(length); stream.write(header.data_ptr(), header.data_size()); }