mirror of
https://github.com/mfontanini/libtins
synced 2026-01-23 02:35:57 +01:00
Move is_dot3 into details/pdu_helpers.h
This commit is contained in:
@@ -56,6 +56,10 @@ PDU::PDUType ether_type_to_pdu_flag(Constants::Ethernet::e flag);
|
|||||||
Constants::IP::e pdu_flag_to_ip_type(PDU::PDUType flag);
|
Constants::IP::e pdu_flag_to_ip_type(PDU::PDUType flag);
|
||||||
PDU::PDUType ip_type_to_pdu_flag(Constants::IP::e flag);
|
PDU::PDUType ip_type_to_pdu_flag(Constants::IP::e flag);
|
||||||
|
|
||||||
|
inline bool is_dot3(const uint8_t* ptr, size_t sz) {
|
||||||
|
return (sz >= 13 && ptr[12] < 8);
|
||||||
|
}
|
||||||
|
|
||||||
} // Internals
|
} // Internals
|
||||||
} // Tins
|
} // Tins
|
||||||
|
|
||||||
|
|||||||
@@ -46,10 +46,6 @@ namespace Internals {
|
|||||||
// Compares sequence numbers as defined by RFC 1982.
|
// Compares sequence numbers as defined by RFC 1982.
|
||||||
int seq_compare(uint32_t seq1, uint32_t seq2);
|
int seq_compare(uint32_t seq1, uint32_t seq2);
|
||||||
|
|
||||||
inline bool is_dot3(const uint8_t* ptr, size_t sz) {
|
|
||||||
return (sz >= 13 && ptr[12] < 8);
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace Internals
|
} // namespace Internals
|
||||||
} // namespace Tins
|
} // namespace Tins
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -48,7 +48,6 @@
|
|||||||
#include "ipv6.h"
|
#include "ipv6.h"
|
||||||
#include "arp.h"
|
#include "arp.h"
|
||||||
#include "constants.h"
|
#include "constants.h"
|
||||||
#include "internals.h"
|
|
||||||
#include "exceptions.h"
|
#include "exceptions.h"
|
||||||
#include "memory_helpers.h"
|
#include "memory_helpers.h"
|
||||||
#include "detail/pdu_helpers.h"
|
#include "detail/pdu_helpers.h"
|
||||||
|
|||||||
@@ -64,8 +64,8 @@
|
|||||||
#include "dot11/dot11_base.h"
|
#include "dot11/dot11_base.h"
|
||||||
#include "radiotap.h"
|
#include "radiotap.h"
|
||||||
#include "ieee802_3.h"
|
#include "ieee802_3.h"
|
||||||
#include "internals.h"
|
|
||||||
#include "cxxstd.h"
|
#include "cxxstd.h"
|
||||||
|
#include "detail/pdu_helpers.h"
|
||||||
#if TINS_IS_CXX11
|
#if TINS_IS_CXX11
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#endif // TINS_IS_CXX11
|
#endif // TINS_IS_CXX11
|
||||||
|
|||||||
@@ -37,9 +37,9 @@
|
|||||||
#include "loopback.h"
|
#include "loopback.h"
|
||||||
#include "sll.h"
|
#include "sll.h"
|
||||||
#include "ppi.h"
|
#include "ppi.h"
|
||||||
#include "internals.h"
|
|
||||||
#include "exceptions.h"
|
#include "exceptions.h"
|
||||||
#include "memory_helpers.h"
|
#include "memory_helpers.h"
|
||||||
|
#include "detail/pdu_helpers.h"
|
||||||
|
|
||||||
using Tins::Memory::InputMemoryStream;
|
using Tins::Memory::InputMemoryStream;
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
#include "pktap.h"
|
#include "pktap.h"
|
||||||
#include "sll.h"
|
#include "sll.h"
|
||||||
#include "ppi.h"
|
#include "ppi.h"
|
||||||
#include "internals.h"
|
#include "detail/pdu_helpers.h"
|
||||||
|
|
||||||
using std::string;
|
using std::string;
|
||||||
using std::runtime_error;
|
using std::runtime_error;
|
||||||
|
|||||||
Reference in New Issue
Block a user