1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-23 02:35:57 +01:00

Added an overload of add_option that takes an rvalue-ref in IP, TCP, DHCP, ICMPv6 and Dot11.

This commit is contained in:
Matias Fontanini
2013-03-24 00:08:53 -03:00
parent 584fe81f04
commit d7dd1e131f
12 changed files with 386 additions and 113 deletions

View File

@@ -40,6 +40,7 @@
#include "small_uint.h"
#include "hw_address.h"
#include "small_uint.h"
#include "cxxstd.h"
namespace Tins {
/**
@@ -737,6 +738,17 @@ public:
* \param option The option to be added
*/
void add_option(const icmpv6_option &option);
#if TINS_IS_CXX11
/**
* \brief Adds an ICMPv6 option.
*
* The option is move-constructed.
*
* \param option The option to be added.
*/
void add_option(icmpv6_option &&option);
#endif
/**
* \brief Returns the header size.
@@ -1181,6 +1193,7 @@ private:
};
} TINS_END_PACK;
void internal_add_option(const icmpv6_option &option);
void write_serialization(uint8_t *buffer, uint32_t total_sz, const PDU *parent);
bool has_options() const;
uint8_t *write_option(const icmpv6_option &opt, uint8_t *buffer);