1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-29 13:04:28 +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

@@ -35,6 +35,7 @@
#include <string>
#include "bootp.h"
#include "pdu_option.h"
#include "cxxstd.h"
namespace Tins {
/**
@@ -171,6 +172,17 @@ namespace Tins {
* \param option The option to be added.
*/
void add_option(const dhcp_option &option);
#if TINS_IS_CXX11
/**
* \brief Adds a new option to this DHCP PDU.
*
* The option is move-constructed.
*
* \param option The option to be added.
*/
void add_option(dhcp_option &&option);
#endif
/**
* \brief Searchs for an option that matchs the given flag.
@@ -409,6 +421,7 @@ namespace Tins {
throw option_not_found();
}
void internal_add_option(const dhcp_option &option);
std::list<ipaddress_type> generic_search(Options opt, type2type<std::list<ipaddress_type> >) const;
std::string generic_search(Options opt, type2type<std::string>) const;
ipaddress_type generic_search(Options opt, type2type<ipaddress_type>) const;