diff --git a/include/tins/radiotap.h b/include/tins/radiotap.h index 778f0d6..caf9ccd 100644 --- a/include/tins/radiotap.h +++ b/include/tins/radiotap.h @@ -45,7 +45,7 @@ namespace Tins { * By default, RadioTap PDUs set the necesary fields to send an 802.11 * PDU as its inner pdu, avoiding packet drops. As a consequence, * the FCS-at-end flag is on, the channel is set to 1, TSFT is set to 0, - * dbm_signal is set to 0xce, and the rx_flag and antenna fields to 0. + * dbm_signal is set to -50, and the rx_flag and antenna fields to 0. */ class RadioTap : public PDU { public: diff --git a/src/dhcpv6.cpp b/src/dhcpv6.cpp index 3a2dda8..e45d7ac 100644 --- a/src/dhcpv6.cpp +++ b/src/dhcpv6.cpp @@ -201,7 +201,7 @@ DHCPv6::status_code_type DHCPv6::status_code() const { } bool DHCPv6::has_rapid_commit() const { - return static_cast(search_option(RAPID_COMMIT)); + return search_option(RAPID_COMMIT) != NULL; } DHCPv6::user_class_type DHCPv6::user_class() const { @@ -225,7 +225,7 @@ uint8_t DHCPv6::reconfigure_msg() const { } bool DHCPv6::has_reconfigure_accept() const { - return static_cast(search_option(RECONF_ACCEPT)); + return search_option(RECONF_ACCEPT) != NULL; } DHCPv6::duid_type DHCPv6::client_id() const { diff --git a/src/radiotap.cpp b/src/radiotap.cpp index 29e010e..f7210ed 100644 --- a/src/radiotap.cpp +++ b/src/radiotap.cpp @@ -178,7 +178,7 @@ void RadioTap::init() { channel(Utils::channel_to_mhz(1), 0xa0); flags(FCS); tsft(0); - dbm_signal(static_cast(0xce)); + dbm_signal(-50); rx_flags(0); antenna(0); } diff --git a/src/tcp.cpp b/src/tcp.cpp index 49dba48..d3a50a9 100644 --- a/src/tcp.cpp +++ b/src/tcp.cpp @@ -147,7 +147,7 @@ void TCP::sack_permitted() { } bool TCP::has_sack_permitted() const { - return static_cast(search_option(SACK_OK)); + return search_option(SACK_OK) != NULL; } void TCP::sack(const sack_type &edges) {