1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-28 12:44:25 +01:00

Several classes now use PDUOption::length_field instead of data_size.

This commit is contained in:
Matias Fontanini
2013-04-08 11:58:12 -03:00
parent f7f5a9bc9a
commit 20054e6c73
14 changed files with 70 additions and 83 deletions

View File

@@ -264,7 +264,7 @@ void IPv6::set_last_next_header(uint8_t value) {
uint8_t *IPv6::write_header(const ipv6_ext_header &header, uint8_t *buffer) {
*buffer++ = header.option();
*buffer++ = (header.data_size() > 8) ? (header.data_size() - 8) : 0;
*buffer++ = (header.length_field() > 8) ? (header.length_field() - 8) : 0;
return std::copy(header.data_ptr(), header.data_ptr() + header.data_size(), buffer);
}