mirror of
https://github.com/zeek/zeek.git
synced 2025-10-17 05:58:20 +00:00
Remove deprecations tagged for v8.1
This commit is contained in:
parent
e4dab3dded
commit
d95affde4d
108 changed files with 113 additions and 2230 deletions
|
@ -171,11 +171,6 @@ public:
|
|||
return pkt_filter;
|
||||
}
|
||||
|
||||
[[deprecated("Remove in v8.1: Use PacketsUnprocessed() instead.")]]
|
||||
uint64_t GetUnprocessedCount() const {
|
||||
return PacketsUnprocessed();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the total number of packets received that weren't considered
|
||||
* processed by some analyzer.
|
||||
|
|
|
@ -31,13 +31,9 @@ private:
|
|||
|
||||
enum class ParseResult : int8_t {
|
||||
CAPLEN_TOO_SMALL = -1,
|
||||
CaplenTooSmall [[deprecated("Remove in v8.1, use ParseResult::CAPLEN_TOO_SMALL.")]] = CAPLEN_TOO_SMALL,
|
||||
BAD_PROTOCOL = -2,
|
||||
BadProtocol [[deprecated("Remove in v8.1, use ParseResult::BAD_PROTOCOL.")]] = BAD_PROTOCOL,
|
||||
OK = 0,
|
||||
Ok [[deprecated("Remove in v8.1, use ParseResult::OK.")]] = OK,
|
||||
CAPLEN_TOO_LARGE = 1,
|
||||
CaplenTooLarge [[deprecated("Remove in v8.1, use ParseResult::CAPLEN_TOO_LARGE.")]] = CAPLEN_TOO_LARGE,
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -36,17 +36,8 @@ bool IPBasedAnalyzer::AnalyzePacket(size_t len, const uint8_t* data, Packet* pkt
|
|||
key = IPBasedConnKeyPtr(static_cast<IPBasedConnKey*>(ck.release()));
|
||||
}
|
||||
|
||||
// Deprecated: remove ConnTuple use in 8.1 and only use InitConnKey().
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
ConnTuple tuple;
|
||||
if ( BuildConnTuple(len, data, pkt, tuple) ) {
|
||||
key->InitTuple(tuple.src_addr, tuple.src_port, tuple.dst_addr, tuple.dst_port, pkt->proto);
|
||||
#pragma GCC diagnostic pop
|
||||
}
|
||||
else if ( ! InitConnKey(len, data, pkt, *key) ) {
|
||||
if ( ! InitConnKey(len, data, pkt, *key) )
|
||||
return false;
|
||||
}
|
||||
|
||||
key->Init(*pkt);
|
||||
|
||||
|
|
|
@ -109,18 +109,7 @@ protected:
|
|||
* @return True if initialization succeeded, false otherwise (e.g. because
|
||||
* there wasn't enough data available).
|
||||
*/
|
||||
virtual bool InitConnKey(size_t len, const uint8_t* data, Packet* packet, IPBasedConnKey& key) {
|
||||
// Given deprecation of BuildConnTuple below, make this pure virtual in 8.1.
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse the header from the packet into a ConnTuple object.
|
||||
*/
|
||||
[[deprecated("Remove in v8.1. Switch to InitConnKey() and key-only initialization.")]]
|
||||
virtual bool BuildConnTuple(size_t len, const uint8_t* data, Packet* packet, ConnTuple& tuple) {
|
||||
return false;
|
||||
}
|
||||
virtual bool InitConnKey(size_t len, const uint8_t* data, Packet* packet, IPBasedConnKey& key) = 0;
|
||||
|
||||
/**
|
||||
* Continues process of packet after the connection has been inserted into the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue