Пример #1
0
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());
}
Пример #2
0
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());
}
Пример #3
0
void Dot11AssocRequest::write_fixed_parameters(OutputMemoryStream& stream) {
    stream.write(body_);
}
Пример #4
0
void Dot11Disassoc::write_fixed_parameters(OutputMemoryStream& stream) {
    stream.write(body_);
}
Пример #5
0
void Dot11ReAssocResponse::write_fixed_parameters(OutputMemoryStream& stream) {
    stream.write(body_);
}
Пример #6
0
void Dot11Authentication::write_fixed_parameters(OutputMemoryStream& stream) {
    stream.write(body_);
}
Пример #7
0
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());
}