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

@@ -37,6 +37,7 @@
#include "ip_address.h"
#include "pdu_option.h"
#include "macros.h"
#include "cxxstd.h"
namespace Tins {
@@ -417,6 +418,17 @@ namespace Tins {
* \param option The option to be added
*/
void add_option(const ip_option &option);
#if TINS_IS_CXX11
/**
* \brief Adds an IP option.
*
* The option is move-constructed.
*
* \param option The option to be added.
*/
void add_option(ip_option &&option);
#endif
/**
* \brief Searchs for an option that matchs the given flag.
@@ -620,6 +632,7 @@ namespace Tins {
/*The options start here. */
} TINS_END_PACK;
void internal_add_option(const ip_option &option);
void init_ip_fields();
void write_serialization(uint8_t *buffer, uint32_t total_sz, const PDU *parent);
uint8_t* write_option(const ip_option &opt, uint8_t* buffer);