1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-30 13:34:27 +01:00

RAII'd some code. Everything(hopefully) uses IPv4Address now.

This commit is contained in:
Matias Fontanini
2012-08-27 00:16:56 -03:00
parent 1b08d1af71
commit da8c77c77e
20 changed files with 206 additions and 267 deletions

View File

@@ -213,11 +213,6 @@ namespace Tins {
*/
Dot11(const uint8_t *buffer, uint32_t total_sz);
/**
* \brief Copy assignment operator.
*/
Dot11 &operator= (const Dot11 &other);
/**
* \brief Getter for the protocol version.
*
@@ -448,11 +443,17 @@ namespace Tins {
/**
* \brief Allocates an Dot11 PDU from a buffer.
*
* This can be used somehow as a "virtual constructor". This
* method instantiates a subclass of Dot11 from the given buffer.
* The allocated class' type will be figured out from the
* information provided in the buffer.
*
* \param buffer The buffer from which to take the PDU data.
* \param total_sz The total size of the buffer.
* \return The allocated PDU.
* \return The allocated Dot11 PDU.
*/
static PDU *from_bytes(const uint8_t *buffer, uint32_t total_sz);
static Dot11 *from_bytes(const uint8_t *buffer, uint32_t total_sz);
protected:
virtual uint32_t write_ext_header(uint8_t *buffer, uint32_t total_sz) { return 0; }
virtual uint32_t write_fixed_parameters(uint8_t *buffer, uint32_t total_sz) { return 0; }