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

Add remove_option member to IP, TCP, Dot11, ICMPv6, DHCP and DHCPv6

This commit is contained in:
Matias Fontanini
2015-08-17 15:19:03 -07:00
parent ab61907a06
commit 6dec68128d
19 changed files with 386 additions and 59 deletions

View File

@@ -81,7 +81,7 @@ namespace Tins {
END = 0,
NOOP = 1,
SEC = 2,
LSSR = 3,
LSRR = 3,
TIMESTAMP = 4,
EXTSEC = 5,
RR = 7,
@@ -443,6 +443,17 @@ namespace Tins {
}
#endif
/**
* \brief Removes an IP option.
*
* If there are multiple options of the given type, only the first one
* will be removed.
*
* \param type The type of the option to be removed.
* \return true if the option was removed, false otherwise.
*/
bool remove_option(option_identifier id);
/**
* \brief Searchs for an option that matchs the given flag.
*
@@ -653,11 +664,15 @@ namespace Tins {
void add_route_option(option_identifier id, const generic_route_option_type &data);
generic_route_option_type search_route_option(option_identifier id) const;
void checksum(uint16_t new_check);
options_type::const_iterator search_option_iterator(option_identifier id) const;
options_type::iterator search_option_iterator(option_identifier id);
void update_padded_options_size();
iphdr _ip;
uint16_t _options_size, _padded_options_size;
options_type _ip_options;
};
}
} // Tins
#endif // TINS_IP_H