mirror of
https://github.com/mfontanini/libtins
synced 2026-01-29 21:14:28 +01:00
Port Dot11 classes to use OutputMemoryStream
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
#include "memory_helpers.h"
|
||||
|
||||
using Tins::Memory::InputMemoryStream;
|
||||
using Tins::Memory::OutputMemoryStream;
|
||||
|
||||
namespace Tins {
|
||||
/* Dot11Beacon */
|
||||
@@ -68,13 +69,8 @@ uint32_t Dot11Beacon::header_size() const {
|
||||
return Dot11ManagementFrame::header_size() + sizeof(_body);
|
||||
}
|
||||
|
||||
uint32_t Dot11Beacon::write_fixed_parameters(uint8_t *buffer, uint32_t total_sz) {
|
||||
uint32_t sz = sizeof(_body);
|
||||
#ifdef TINS_DEBUG
|
||||
assert(sz <= total_sz);
|
||||
#endif
|
||||
std::memcpy(buffer, &this->_body, sz);
|
||||
return sz;
|
||||
void Dot11Beacon::write_fixed_parameters(OutputMemoryStream& stream) {
|
||||
stream.write(_body);
|
||||
}
|
||||
} // namespace Tins
|
||||
|
||||
|
||||
Reference in New Issue
Block a user