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

Ported almost everything to BSD. Utils::route_entries and sending link layer PDUs still don't work.

This commit is contained in:
Matias Fontanini
2012-11-28 00:11:42 -03:00
parent e6e3e8453b
commit 6696c1b284
23 changed files with 486 additions and 227 deletions

View File

@@ -36,6 +36,7 @@
#include "endianness.h"
#include "ip_address.h"
#include "pdu_option.h"
#include "arch.h"
namespace Tins {
@@ -257,7 +258,14 @@ namespace Tins {
*
* \return The total length of this IP PDU.
*/
uint16_t tot_len() const { return Endian::be_to_host(_ip.tot_len); }
uint16_t tot_len() const {
// BSD wants this in host byte order............
#ifdef BSD
return _ip.tot_len;
#else
return Endian::be_to_host(_ip.tot_len);
#endif
}
/**
* \brief Getter for the id field.