diff --git a/include/ip.h b/include/ip.h index ef3d903..64bc8ee 100644 --- a/include/ip.h +++ b/include/ip.h @@ -260,8 +260,8 @@ namespace Tins { * \return The total length of this IP PDU. */ uint16_t tot_len() const { - // BSD wants this in host byte order............ - #ifdef BSD + // FreeBSD wants this in host byte order............ + #ifdef __FreeBSD__ return _ip.tot_len; #else return Endian::be_to_host(_ip.tot_len); diff --git a/src/ip.cpp b/src/ip.cpp index f7590eb..c95a2be 100644 --- a/src/ip.cpp +++ b/src/ip.cpp @@ -170,8 +170,8 @@ void IP::tos(uint8_t new_tos) { } void IP::tot_len(uint16_t new_tot_len) { - // BSD wants this in host byte order............ - #ifdef BSD + // FreeBSD wants this in host byte order............ + #ifdef __FreeBSD__ _ip.tot_len = new_tot_len; #else _ip.tot_len = Endian::host_to_be(new_tot_len);