diff --git a/src/plugins/input/tcp/src/IpfixDecoder.cpp b/src/plugins/input/tcp/src/IpfixDecoder.cpp index 8ef5094b..934bfa5b 100644 --- a/src/plugins/input/tcp/src/IpfixDecoder.cpp +++ b/src/plugins/input/tcp/src/IpfixDecoder.cpp @@ -24,8 +24,6 @@ namespace tcp_in { -using namespace std; - DecodeBuffer &IpfixDecoder::decode() { while (!m_decoded.enough_data()) { if (!read_header()) { @@ -38,7 +36,7 @@ DecodeBuffer &IpfixDecoder::decode() { } if (m_decoded.is_eof_reached() && m_part_readed.size() != 0) { - throw runtime_error("Received incomplete message."); + throw std::runtime_error("Received incomplete message."); } return m_decoded; diff --git a/src/plugins/input/tcp/src/IpfixDecoder.hpp b/src/plugins/input/tcp/src/IpfixDecoder.hpp index 93fad590..987a8f54 100644 --- a/src/plugins/input/tcp/src/IpfixDecoder.hpp +++ b/src/plugins/input/tcp/src/IpfixDecoder.hpp @@ -19,6 +19,7 @@ namespace tcp_in { +/** Identifies data for which this decoder should be used. */ constexpr uint16_t IPFIX_MAGIC = 10; /** Decoder for basic IPFX data. */ @@ -48,6 +49,7 @@ class IpfixDecoder : public Decoder { DecodeBuffer m_decoded; ByteVector m_part_readed; + /** Final size of the whole IPFIX message. When 0 IPIFX header is not fully read. */ size_t m_msg_size; };