Merge remote-tracking branch 'origin/topic/timw/override'

* origin/topic/timw/override:
  Mark input/output message classes as final, since nothing should be inheriting from them
  Add missing override specifier to a number of methods, remove virtual from some as well
  Add override specifier to Configure() method in almost all of the internal plugins
This commit is contained in:
Johanna Amann 2020-03-31 08:48:10 -07:00
commit d18f2f8f76
76 changed files with 142 additions and 139 deletions

View file

@ -1,4 +1,12 @@
3.2.0-dev.329 | 2020-03-31 08:48:10 -0700
* Mark input/output message classes as final, since nothing should be inheriting from them (Tim Wojtulewicz, Corelight)
* Add missing override specifier to a number of methods, remove virtual from some as well (Tim Wojtulewicz, Corelight)
* Add override specifier to Configure() method in almost all of the internal plugins (Tim Wojtulewicz, Corelight)
3.2.0-dev.325 | 2020-03-31 07:04:59 +0000 3.2.0-dev.325 | 2020-03-31 07:04:59 +0000
* Fix bug in intel framework letting deletes of mixed-cased entries * Fix bug in intel framework letting deletes of mixed-cased entries

View file

@ -1 +1 @@
3.2.0-dev.325 3.2.0-dev.329

View file

@ -421,8 +421,8 @@ public:
OuterIDBindingFinder(Scope* s) OuterIDBindingFinder(Scope* s)
: scope(s) { } : scope(s) { }
virtual TraversalCode PreExpr(const Expr*); TraversalCode PreExpr(const Expr*) override;
virtual TraversalCode PostExpr(const Expr*); TraversalCode PostExpr(const Expr*) override;
Scope* scope; Scope* scope;
vector<const NameExpr*> outer_id_references; vector<const NameExpr*> outer_id_references;

View file

@ -8,7 +8,7 @@ namespace Zeek_ARP {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
plugin::Configuration config; plugin::Configuration config;
config.name = "Zeek::ARP"; config.name = "Zeek::ARP";

View file

@ -9,7 +9,7 @@ namespace Zeek_AYIYA {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("AYIYA", ::analyzer::ayiya::AYIYA_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("AYIYA", ::analyzer::ayiya::AYIYA_Analyzer::Instantiate));

View file

@ -10,7 +10,7 @@ namespace Zeek_BitTorrent {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("BitTorrent", ::analyzer::bittorrent::BitTorrent_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("BitTorrent", ::analyzer::bittorrent::BitTorrent_Analyzer::Instantiate));
AddComponent(new ::analyzer::Component("BitTorrentTracker", ::analyzer::bittorrent::BitTorrentTracker_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("BitTorrentTracker", ::analyzer::bittorrent::BitTorrentTracker_Analyzer::Instantiate));

View file

@ -9,7 +9,7 @@ namespace Zeek_ConnSize {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("ConnSize", ::analyzer::conn_size::ConnSize_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("ConnSize", ::analyzer::conn_size::ConnSize_Analyzer::Instantiate));

View file

@ -10,7 +10,7 @@ namespace Zeek_DCE_RPC {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("DCE_RPC", ::analyzer::dce_rpc::DCE_RPC_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("DCE_RPC", ::analyzer::dce_rpc::DCE_RPC_Analyzer::Instantiate));

View file

@ -9,7 +9,7 @@ namespace Zeek_DHCP {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("DHCP", ::analyzer::dhcp::DHCP_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("DHCP", ::analyzer::dhcp::DHCP_Analyzer::Instantiate));

View file

@ -9,7 +9,7 @@ namespace Zeek_DNP3 {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("DNP3_TCP", ::analyzer::dnp3::DNP3_TCP_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("DNP3_TCP", ::analyzer::dnp3::DNP3_TCP_Analyzer::Instantiate));
AddComponent(new ::analyzer::Component("DNP3_UDP", ::analyzer::dnp3::DNP3_UDP_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("DNP3_UDP", ::analyzer::dnp3::DNP3_UDP_Analyzer::Instantiate));

View file

@ -9,7 +9,7 @@ namespace Zeek_DNS {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("DNS", ::analyzer::dns::DNS_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("DNS", ::analyzer::dns::DNS_Analyzer::Instantiate));
AddComponent(new ::analyzer::Component("Contents_DNS", 0)); AddComponent(new ::analyzer::Component("Contents_DNS", 0));

View file

@ -9,7 +9,7 @@ namespace Zeek_File {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("FTP_Data", ::analyzer::file::FTP_Data::Instantiate)); AddComponent(new ::analyzer::Component("FTP_Data", ::analyzer::file::FTP_Data::Instantiate));
AddComponent(new ::analyzer::Component("IRC_Data", ::analyzer::file::IRC_Data::Instantiate)); AddComponent(new ::analyzer::Component("IRC_Data", ::analyzer::file::IRC_Data::Instantiate));

View file

@ -9,7 +9,7 @@ namespace Zeek_Finger {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("Finger", ::analyzer::finger::Finger_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("Finger", ::analyzer::finger::Finger_Analyzer::Instantiate));

View file

@ -9,7 +9,7 @@ namespace Zeek_FTP {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("FTP", ::analyzer::ftp::FTP_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("FTP", ::analyzer::ftp::FTP_Analyzer::Instantiate));
AddComponent(new ::analyzer::Component("FTP_ADAT", 0)); AddComponent(new ::analyzer::Component("FTP_ADAT", 0));

View file

@ -9,7 +9,7 @@ namespace Zeek_Gnutella {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("Gnutella", ::analyzer::gnutella::Gnutella_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("Gnutella", ::analyzer::gnutella::Gnutella_Analyzer::Instantiate));

View file

@ -9,7 +9,7 @@ namespace Zeek_GSSAPI {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("GSSAPI", ::analyzer::gssapi::GSSAPI_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("GSSAPI", ::analyzer::gssapi::GSSAPI_Analyzer::Instantiate));

View file

@ -9,7 +9,7 @@ namespace Zeek_GTPv1 {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("GTPv1", ::analyzer::gtpv1::GTPv1_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("GTPv1", ::analyzer::gtpv1::GTPv1_Analyzer::Instantiate));

View file

@ -176,7 +176,7 @@ void HTTP_Entity::Deliver(int len, const char* data, bool trailing_CRLF)
class HTTP_Entity::UncompressedOutput : public analyzer::OutputHandler { class HTTP_Entity::UncompressedOutput : public analyzer::OutputHandler {
public: public:
UncompressedOutput(HTTP_Entity* e) { entity = e; } UncompressedOutput(HTTP_Entity* e) { entity = e; }
virtual void DeliverStream(int len, const u_char* data, bool orig) void DeliverStream(int len, const u_char* data, bool orig) override
{ {
entity->DeliverBodyClear(len, (char*) data, false); entity->DeliverBodyClear(len, (char*) data, false);
} }

View file

@ -9,7 +9,7 @@ namespace Zeek_HTTP {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("HTTP", ::analyzer::http::HTTP_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("HTTP", ::analyzer::http::HTTP_Analyzer::Instantiate));

View file

@ -9,7 +9,7 @@ namespace Zeek_ICMP {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("ICMP", ::analyzer::icmp::ICMP_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("ICMP", ::analyzer::icmp::ICMP_Analyzer::Instantiate));

View file

@ -9,7 +9,7 @@ namespace Zeek_Ident {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("Ident", ::analyzer::ident::Ident_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("Ident", ::analyzer::ident::Ident_Analyzer::Instantiate));

View file

@ -9,7 +9,7 @@ namespace Zeek_IMAP {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("IMAP", ::analyzer::imap::IMAP_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("IMAP", ::analyzer::imap::IMAP_Analyzer::Instantiate));

View file

@ -9,7 +9,7 @@ namespace Zeek_IRC {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("IRC", ::analyzer::irc::IRC_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("IRC", ::analyzer::irc::IRC_Analyzer::Instantiate));

View file

@ -9,7 +9,7 @@ namespace plugin {
namespace Zeek_KRB { namespace Zeek_KRB {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("KRB", ::analyzer::krb::KRB_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("KRB", ::analyzer::krb::KRB_Analyzer::Instantiate));
AddComponent(new ::analyzer::Component("KRB_TCP", ::analyzer::krb_tcp::KRB_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("KRB_TCP", ::analyzer::krb_tcp::KRB_Analyzer::Instantiate));

View file

@ -12,7 +12,7 @@ namespace Zeek_Login {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("Telnet", ::analyzer::login::Telnet_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("Telnet", ::analyzer::login::Telnet_Analyzer::Instantiate));
AddComponent(new ::analyzer::Component("Rsh", ::analyzer::login::Rsh_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("Rsh", ::analyzer::login::Rsh_Analyzer::Instantiate));

View file

@ -8,7 +8,7 @@ namespace Zeek_MIME {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
plugin::Configuration config; plugin::Configuration config;
config.name = "Zeek::MIME"; config.name = "Zeek::MIME";

View file

@ -9,7 +9,7 @@ namespace Zeek_Modbus {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("MODBUS", ::analyzer::modbus::ModbusTCP_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("MODBUS", ::analyzer::modbus::ModbusTCP_Analyzer::Instantiate));

View file

@ -9,7 +9,7 @@ namespace Zeek_MQTT {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("MQTT", AddComponent(new ::analyzer::Component("MQTT",
::analyzer::MQTT::MQTT_Analyzer::InstantiateAnalyzer)); ::analyzer::MQTT::MQTT_Analyzer::InstantiateAnalyzer));

View file

@ -8,7 +8,7 @@ namespace plugin {
namespace Zeek_MySQL { namespace Zeek_MySQL {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("MySQL", ::analyzer::MySQL::MySQL_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("MySQL", ::analyzer::MySQL::MySQL_Analyzer::Instantiate));
plugin::Configuration config; plugin::Configuration config;

View file

@ -9,7 +9,7 @@ namespace Zeek_NCP {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("NCP", ::analyzer::ncp::NCP_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("NCP", ::analyzer::ncp::NCP_Analyzer::Instantiate));
AddComponent(new ::analyzer::Component("Contents_NCP", 0)); AddComponent(new ::analyzer::Component("Contents_NCP", 0));

View file

@ -9,7 +9,7 @@ namespace Zeek_NetBIOS {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("NetbiosSSN", ::analyzer::netbios_ssn::NetbiosSSN_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("NetbiosSSN", ::analyzer::netbios_ssn::NetbiosSSN_Analyzer::Instantiate));
AddComponent(new ::analyzer::Component("Contents_NetbiosSSN", 0)); AddComponent(new ::analyzer::Component("Contents_NetbiosSSN", 0));

View file

@ -9,7 +9,7 @@ namespace Zeek_NTLM {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("NTLM", ::analyzer::ntlm::NTLM_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("NTLM", ::analyzer::ntlm::NTLM_Analyzer::Instantiate));

View file

@ -9,7 +9,7 @@ namespace Zeek_NTP {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("NTP", ::analyzer::NTP::NTP_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("NTP", ::analyzer::NTP::NTP_Analyzer::Instantiate));

View file

@ -9,7 +9,7 @@ namespace Zeek_PIA {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("PIA_TCP", ::analyzer::pia::PIA_TCP::Instantiate)); AddComponent(new ::analyzer::Component("PIA_TCP", ::analyzer::pia::PIA_TCP::Instantiate));
AddComponent(new ::analyzer::Component("PIA_UDP", ::analyzer::pia::PIA_UDP::Instantiate)); AddComponent(new ::analyzer::Component("PIA_UDP", ::analyzer::pia::PIA_UDP::Instantiate));

View file

@ -9,7 +9,7 @@ namespace Zeek_POP3 {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("POP3", ::analyzer::pop3::POP3_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("POP3", ::analyzer::pop3::POP3_Analyzer::Instantiate));

View file

@ -9,7 +9,7 @@ namespace Zeek_RADIUS {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("RADIUS", ::analyzer::RADIUS::RADIUS_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("RADIUS", ::analyzer::RADIUS::RADIUS_Analyzer::Instantiate));

View file

@ -7,7 +7,7 @@ namespace Zeek_RDP {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("RDP", ::analyzer::rdp::RDP_Analyzer::InstantiateAnalyzer)); AddComponent(new ::analyzer::Component("RDP", ::analyzer::rdp::RDP_Analyzer::InstantiateAnalyzer));

View file

@ -7,7 +7,7 @@ namespace Zeek_RFB {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("RFB", AddComponent(new ::analyzer::Component("RFB",
::analyzer::rfb::RFB_Analyzer::InstantiateAnalyzer)); ::analyzer::rfb::RFB_Analyzer::InstantiateAnalyzer));

View file

@ -12,7 +12,7 @@ namespace Zeek_RPC {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("NFS", ::analyzer::rpc::NFS_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("NFS", ::analyzer::rpc::NFS_Analyzer::Instantiate));
AddComponent(new ::analyzer::Component("MOUNT", ::analyzer::rpc::MOUNT_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("MOUNT", ::analyzer::rpc::MOUNT_Analyzer::Instantiate));

View file

@ -10,7 +10,7 @@ namespace Zeek_SIP {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("SIP", ::analyzer::SIP::SIP_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("SIP", ::analyzer::SIP::SIP_Analyzer::Instantiate));

View file

@ -9,7 +9,7 @@ namespace Zeek_SMB {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("SMB", ::analyzer::smb::SMB_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("SMB", ::analyzer::smb::SMB_Analyzer::Instantiate));
AddComponent(new ::analyzer::Component("Contents_SMB", 0)); AddComponent(new ::analyzer::Component("Contents_SMB", 0));

View file

@ -9,7 +9,7 @@ namespace Zeek_SMTP {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("SMTP", ::analyzer::smtp::SMTP_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("SMTP", ::analyzer::smtp::SMTP_Analyzer::Instantiate));

View file

@ -9,7 +9,7 @@ namespace Zeek_SNMP {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("SNMP", ::analyzer::snmp::SNMP_Analyzer::InstantiateAnalyzer)); AddComponent(new ::analyzer::Component("SNMP", ::analyzer::snmp::SNMP_Analyzer::InstantiateAnalyzer));

View file

@ -9,7 +9,7 @@ namespace Zeek_SOCKS {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("SOCKS", ::analyzer::socks::SOCKS_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("SOCKS", ::analyzer::socks::SOCKS_Analyzer::Instantiate));

View file

@ -9,7 +9,7 @@ namespace plugin {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("SSH", ::analyzer::SSH::SSH_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("SSH", ::analyzer::SSH::SSH_Analyzer::Instantiate));
@ -22,4 +22,3 @@ namespace plugin {
} }
} }

View file

@ -10,7 +10,7 @@ namespace Zeek_SSL {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("SSL", ::analyzer::ssl::SSL_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("SSL", ::analyzer::ssl::SSL_Analyzer::Instantiate));
AddComponent(new ::analyzer::Component("DTLS", ::analyzer::dtls::DTLS_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("DTLS", ::analyzer::dtls::DTLS_Analyzer::Instantiate));
@ -24,4 +24,3 @@ public:
} }
} }

View file

@ -9,7 +9,7 @@ namespace Zeek_SteppingStone {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("SteppingStone", ::analyzer::stepping_stone::SteppingStone_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("SteppingStone", ::analyzer::stepping_stone::SteppingStone_Analyzer::Instantiate));

View file

@ -9,7 +9,7 @@ namespace Zeek_Syslog {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("Syslog", ::analyzer::syslog::Syslog_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("Syslog", ::analyzer::syslog::Syslog_Analyzer::Instantiate));

View file

@ -9,7 +9,7 @@ namespace Zeek_TCP {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("TCP", ::analyzer::tcp::TCP_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("TCP", ::analyzer::tcp::TCP_Analyzer::Instantiate));
AddComponent(new ::analyzer::Component("TCPStats", ::analyzer::tcp::TCPStats_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("TCPStats", ::analyzer::tcp::TCPStats_Analyzer::Instantiate));

View file

@ -9,7 +9,7 @@ namespace Zeek_Teredo {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("Teredo", ::analyzer::teredo::Teredo_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("Teredo", ::analyzer::teredo::Teredo_Analyzer::Instantiate));

View file

@ -9,7 +9,7 @@ namespace Zeek_UDP {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("UDP", ::analyzer::udp::UDP_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("UDP", ::analyzer::udp::UDP_Analyzer::Instantiate));

View file

@ -9,7 +9,7 @@ namespace Zeek_VXLAN {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("VXLAN", ::analyzer::vxlan::VXLAN_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("VXLAN", ::analyzer::vxlan::VXLAN_Analyzer::Instantiate));

View file

@ -9,7 +9,7 @@ namespace Zeek_XMPP {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("XMPP", ::analyzer::xmpp::XMPP_Analyzer::Instantiate)); AddComponent(new ::analyzer::Component("XMPP", ::analyzer::xmpp::XMPP_Analyzer::Instantiate));

View file

@ -9,7 +9,7 @@ namespace Zeek_ZIP {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::analyzer::Component("ZIP", 0)); AddComponent(new ::analyzer::Component("ZIP", 0));

View file

@ -9,7 +9,7 @@ namespace Zeek_FileDataEvent {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::file_analysis::Component("DATA_EVENT", ::file_analysis::DataEvent::Instantiate)); AddComponent(new ::file_analysis::Component("DATA_EVENT", ::file_analysis::DataEvent::Instantiate));

View file

@ -9,7 +9,7 @@ namespace Zeek_FileEntropy {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::file_analysis::Component("ENTROPY", ::file_analysis::Entropy::Instantiate)); AddComponent(new ::file_analysis::Component("ENTROPY", ::file_analysis::Entropy::Instantiate));

View file

@ -9,7 +9,7 @@ namespace Zeek_FileExtract {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::file_analysis::Component("EXTRACT", ::file_analysis::Extract::Instantiate)); AddComponent(new ::file_analysis::Component("EXTRACT", ::file_analysis::Extract::Instantiate));

View file

@ -9,7 +9,7 @@ namespace Zeek_FileHash {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::file_analysis::Component("MD5", ::file_analysis::MD5::Instantiate)); AddComponent(new ::file_analysis::Component("MD5", ::file_analysis::MD5::Instantiate));
AddComponent(new ::file_analysis::Component("SHA1", ::file_analysis::SHA1::Instantiate)); AddComponent(new ::file_analysis::Component("SHA1", ::file_analysis::SHA1::Instantiate));

View file

@ -9,7 +9,7 @@ namespace Zeek_PE {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::file_analysis::Component("PE", ::file_analysis::PE::Instantiate)); AddComponent(new ::file_analysis::Component("PE", ::file_analysis::PE::Instantiate));

View file

@ -11,7 +11,7 @@ namespace Zeek_Unified2 {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::file_analysis::Component("UNIFIED2", ::file_analysis::Unified2::Instantiate)); AddComponent(new ::file_analysis::Component("UNIFIED2", ::file_analysis::Unified2::Instantiate));

View file

@ -113,7 +113,7 @@ public:
EventHandlerPtr event; EventHandlerPtr event;
TableStream(); TableStream();
~TableStream(); ~TableStream() override;
}; };
class Manager::EventStream: public Manager::Stream { class Manager::EventStream: public Manager::Stream {
@ -125,7 +125,7 @@ public:
bool want_record; bool want_record;
EventStream(); EventStream();
~EventStream(); ~EventStream() override;
}; };
class Manager::AnalysisStream: public Manager::Stream { class Manager::AnalysisStream: public Manager::Stream {
@ -133,7 +133,7 @@ public:
string file_id; string file_id;
AnalysisStream(); AnalysisStream();
~AnalysisStream(); ~AnalysisStream() override;
}; };
Manager::TableStream::TableStream() Manager::TableStream::TableStream()

View file

@ -9,13 +9,13 @@ using threading::Field;
namespace input { namespace input {
class PutMessage : public threading::OutputMessage<ReaderFrontend> { class PutMessage final : public threading::OutputMessage<ReaderFrontend> {
public: public:
PutMessage(ReaderFrontend* reader, Value* *val) PutMessage(ReaderFrontend* reader, Value* *val)
: threading::OutputMessage<ReaderFrontend>("Put", reader), : threading::OutputMessage<ReaderFrontend>("Put", reader),
val(val) {} val(val) {}
virtual bool Process() bool Process() override
{ {
input_mgr->Put(Object(), val); input_mgr->Put(Object(), val);
return true; return true;
@ -25,13 +25,13 @@ private:
Value* *val; Value* *val;
}; };
class DeleteMessage : public threading::OutputMessage<ReaderFrontend> { class DeleteMessage final : public threading::OutputMessage<ReaderFrontend> {
public: public:
DeleteMessage(ReaderFrontend* reader, Value* *val) DeleteMessage(ReaderFrontend* reader, Value* *val)
: threading::OutputMessage<ReaderFrontend>("Delete", reader), : threading::OutputMessage<ReaderFrontend>("Delete", reader),
val(val) {} val(val) {}
virtual bool Process() bool Process() override
{ {
return input_mgr->Delete(Object(), val); return input_mgr->Delete(Object(), val);
} }
@ -40,12 +40,12 @@ private:
Value* *val; Value* *val;
}; };
class ClearMessage : public threading::OutputMessage<ReaderFrontend> { class ClearMessage final : public threading::OutputMessage<ReaderFrontend> {
public: public:
ClearMessage(ReaderFrontend* reader) ClearMessage(ReaderFrontend* reader)
: threading::OutputMessage<ReaderFrontend>("Clear", reader) {} : threading::OutputMessage<ReaderFrontend>("Clear", reader) {}
virtual bool Process() bool Process() override
{ {
input_mgr->Clear(Object()); input_mgr->Clear(Object());
return true; return true;
@ -54,15 +54,15 @@ public:
private: private:
}; };
class SendEventMessage : public threading::OutputMessage<ReaderFrontend> { class SendEventMessage final : public threading::OutputMessage<ReaderFrontend> {
public: public:
SendEventMessage(ReaderFrontend* reader, const char* name, const int num_vals, Value* *val) SendEventMessage(ReaderFrontend* reader, const char* name, const int num_vals, Value* *val)
: threading::OutputMessage<ReaderFrontend>("SendEvent", reader), : threading::OutputMessage<ReaderFrontend>("SendEvent", reader),
name(copy_string(name)), num_vals(num_vals), val(val) {} name(copy_string(name)), num_vals(num_vals), val(val) {}
virtual ~SendEventMessage() { delete [] name; } ~SendEventMessage() override { delete [] name; }
virtual bool Process() bool Process() override
{ {
bool success = input_mgr->SendEvent(Object(), name, num_vals, val); bool success = input_mgr->SendEvent(Object(), name, num_vals, val);
@ -78,7 +78,7 @@ private:
Value* *val; Value* *val;
}; };
class ReaderErrorMessage : public threading::OutputMessage<ReaderFrontend> class ReaderErrorMessage final : public threading::OutputMessage<ReaderFrontend>
{ {
public: public:
enum Type { enum Type {
@ -89,22 +89,22 @@ public:
: threading::OutputMessage<ReaderFrontend>("ReaderErrorMessage", reader) : threading::OutputMessage<ReaderFrontend>("ReaderErrorMessage", reader)
{ type = arg_type; msg = copy_string(arg_msg); } { type = arg_type; msg = copy_string(arg_msg); }
virtual ~ReaderErrorMessage() { delete [] msg; } ~ReaderErrorMessage() override { delete [] msg; }
virtual bool Process(); bool Process() override;
private: private:
const char* msg; const char* msg;
Type type; Type type;
}; };
class SendEntryMessage : public threading::OutputMessage<ReaderFrontend> { class SendEntryMessage final : public threading::OutputMessage<ReaderFrontend> {
public: public:
SendEntryMessage(ReaderFrontend* reader, Value* *val) SendEntryMessage(ReaderFrontend* reader, Value* *val)
: threading::OutputMessage<ReaderFrontend>("SendEntry", reader), : threading::OutputMessage<ReaderFrontend>("SendEntry", reader),
val(val) { } val(val) { }
virtual bool Process() bool Process() override
{ {
input_mgr->SendEntry(Object(), val); input_mgr->SendEntry(Object(), val);
return true; return true;
@ -114,12 +114,12 @@ private:
Value* *val; Value* *val;
}; };
class EndCurrentSendMessage : public threading::OutputMessage<ReaderFrontend> { class EndCurrentSendMessage final : public threading::OutputMessage<ReaderFrontend> {
public: public:
EndCurrentSendMessage(ReaderFrontend* reader) EndCurrentSendMessage(ReaderFrontend* reader)
: threading::OutputMessage<ReaderFrontend>("EndCurrentSend", reader) {} : threading::OutputMessage<ReaderFrontend>("EndCurrentSend", reader) {}
virtual bool Process() bool Process() override
{ {
input_mgr->EndCurrentSend(Object()); input_mgr->EndCurrentSend(Object());
return true; return true;
@ -128,12 +128,12 @@ public:
private: private:
}; };
class EndOfDataMessage : public threading::OutputMessage<ReaderFrontend> { class EndOfDataMessage final : public threading::OutputMessage<ReaderFrontend> {
public: public:
EndOfDataMessage(ReaderFrontend* reader) EndOfDataMessage(ReaderFrontend* reader)
: threading::OutputMessage<ReaderFrontend>("EndOfData", reader) {} : threading::OutputMessage<ReaderFrontend>("EndOfData", reader) {}
virtual bool Process() bool Process() override
{ {
input_mgr->SendEndOfData(Object()); input_mgr->SendEndOfData(Object());
return true; return true;
@ -142,12 +142,12 @@ public:
private: private:
}; };
class ReaderClosedMessage : public threading::OutputMessage<ReaderFrontend> { class ReaderClosedMessage final : public threading::OutputMessage<ReaderFrontend> {
public: public:
ReaderClosedMessage(ReaderFrontend* reader) ReaderClosedMessage(ReaderFrontend* reader)
: threading::OutputMessage<ReaderFrontend>("ReaderClosed", reader) {} : threading::OutputMessage<ReaderFrontend>("ReaderClosed", reader) {}
virtual bool Process() bool Process() override
{ {
Object()->SetDisable(); Object()->SetDisable();
return input_mgr->RemoveStreamContinuation(Object()); return input_mgr->RemoveStreamContinuation(Object());
@ -156,13 +156,13 @@ public:
private: private:
}; };
class DisableMessage : public threading::OutputMessage<ReaderFrontend> class DisableMessage final : public threading::OutputMessage<ReaderFrontend>
{ {
public: public:
DisableMessage(ReaderFrontend* writer) DisableMessage(ReaderFrontend* writer)
: threading::OutputMessage<ReaderFrontend>("Disable", writer) {} : threading::OutputMessage<ReaderFrontend>("Disable", writer) {}
virtual bool Process() bool Process() override
{ {
Object()->SetDisable(); Object()->SetDisable();
// And - because we do not need disabled objects any more - // And - because we do not need disabled objects any more -

View file

@ -6,7 +6,7 @@
namespace input { namespace input {
class InitMessage : public threading::InputMessage<ReaderBackend> class InitMessage final : public threading::InputMessage<ReaderBackend>
{ {
public: public:
InitMessage(ReaderBackend* backend, InitMessage(ReaderBackend* backend,
@ -14,7 +14,7 @@ public:
: threading::InputMessage<ReaderBackend>("Init", backend), : threading::InputMessage<ReaderBackend>("Init", backend),
num_fields(num_fields), fields(fields) { } num_fields(num_fields), fields(fields) { }
virtual bool Process() bool Process() override
{ {
return Object()->Init(num_fields, fields); return Object()->Init(num_fields, fields);
} }
@ -24,14 +24,14 @@ private:
const threading::Field* const* fields; const threading::Field* const* fields;
}; };
class UpdateMessage : public threading::InputMessage<ReaderBackend> class UpdateMessage final : public threading::InputMessage<ReaderBackend>
{ {
public: public:
UpdateMessage(ReaderBackend* backend) UpdateMessage(ReaderBackend* backend)
: threading::InputMessage<ReaderBackend>("Update", backend) : threading::InputMessage<ReaderBackend>("Update", backend)
{ } { }
virtual bool Process() { return Object()->Update(); } bool Process() override { return Object()->Update(); }
}; };
ReaderFrontend::ReaderFrontend(const ReaderBackend::ReaderInfo& arg_info, EnumVal* type) ReaderFrontend::ReaderFrontend(const ReaderBackend::ReaderInfo& arg_info, EnumVal* type)
@ -98,4 +98,3 @@ const char* ReaderFrontend::Name() const
} }
} }

View file

@ -9,7 +9,7 @@ namespace Zeek_AsciiReader {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::input::Component("Ascii", ::input::reader::Ascii::Instantiate)); AddComponent(new ::input::Component("Ascii", ::input::reader::Ascii::Instantiate));

View file

@ -9,7 +9,7 @@ namespace Zeek_BenchmarkReader {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::input::Component("Benchmark", ::input::reader::Benchmark::Instantiate)); AddComponent(new ::input::Component("Benchmark", ::input::reader::Benchmark::Instantiate));

View file

@ -9,7 +9,7 @@ namespace Zeek_BinaryReader {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::input::Component("Binary", ::input::reader::Binary::Instantiate)); AddComponent(new ::input::Component("Binary", ::input::reader::Binary::Instantiate));

View file

@ -9,7 +9,7 @@ namespace Zeek_ConfigReader {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::input::Component("Config", ::input::reader::Config::Instantiate)); AddComponent(new ::input::Component("Config", ::input::reader::Config::Instantiate));

View file

@ -32,4 +32,3 @@ std::unique_lock<std::mutex> Plugin::ForkMutex()
{ {
return std::unique_lock<std::mutex>(fork_mutex, std::defer_lock); return std::unique_lock<std::mutex>(fork_mutex, std::defer_lock);
} }

View file

@ -9,7 +9,7 @@ namespace Zeek_SQLiteReader {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::input::Component("SQLite", ::input::reader::SQLite::Instantiate)); AddComponent(new ::input::Component("SQLite", ::input::reader::SQLite::Instantiate));

View file

@ -10,7 +10,7 @@ namespace Zeek_Pcap {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::iosource::PktSrcComponent("PcapReader", "pcap", ::iosource::PktSrcComponent::BOTH, ::iosource::pcap::PcapSource::Instantiate)); AddComponent(new ::iosource::PktSrcComponent("PcapReader", "pcap", ::iosource::PktSrcComponent::BOTH, ::iosource::pcap::PcapSource::Instantiate));
AddComponent(new ::iosource::PktDumperComponent("PcapWriter", "pcap", ::iosource::pcap::PcapDumper::Instantiate)); AddComponent(new ::iosource::PktDumperComponent("PcapWriter", "pcap", ::iosource::pcap::PcapDumper::Instantiate));
@ -24,4 +24,3 @@ public:
} }
} }

View file

@ -1399,7 +1399,7 @@ public:
rotate = arg_rotate; rotate = arg_rotate;
} }
~RotationTimer(); ~RotationTimer() override;
void Dispatch(double t, bool is_expire) override; void Dispatch(double t, bool is_expire) override;

View file

@ -16,7 +16,7 @@ using threading::Field;
namespace logging { namespace logging {
class RotationFinishedMessage : public threading::OutputMessage<WriterFrontend> class RotationFinishedMessage final : public threading::OutputMessage<WriterFrontend>
{ {
public: public:
RotationFinishedMessage(WriterFrontend* writer, const char* new_name, const char* old_name, RotationFinishedMessage(WriterFrontend* writer, const char* new_name, const char* old_name,
@ -25,13 +25,13 @@ public:
new_name(copy_string(new_name)), old_name(copy_string(old_name)), open(open), new_name(copy_string(new_name)), old_name(copy_string(old_name)), open(open),
close(close), success(success), terminating(terminating) { } close(close), success(success), terminating(terminating) { }
virtual ~RotationFinishedMessage() ~RotationFinishedMessage() override
{ {
delete [] new_name; delete [] new_name;
delete [] old_name; delete [] old_name;
} }
virtual bool Process() bool Process() override
{ {
return log_mgr->FinishedRotation(Object(), new_name, old_name, open, close, success, terminating); return log_mgr->FinishedRotation(Object(), new_name, old_name, open, close, success, terminating);
} }
@ -45,22 +45,22 @@ private:
bool terminating; bool terminating;
}; };
class FlushWriteBufferMessage : public threading::OutputMessage<WriterFrontend> class FlushWriteBufferMessage final : public threading::OutputMessage<WriterFrontend>
{ {
public: public:
FlushWriteBufferMessage(WriterFrontend* writer) FlushWriteBufferMessage(WriterFrontend* writer)
: threading::OutputMessage<WriterFrontend>("FlushWriteBuffer", writer) {} : threading::OutputMessage<WriterFrontend>("FlushWriteBuffer", writer) {}
virtual bool Process() { Object()->FlushWriteBuffer(); return true; } bool Process() override { Object()->FlushWriteBuffer(); return true; }
}; };
class DisableMessage : public threading::OutputMessage<WriterFrontend> class DisableMessage final : public threading::OutputMessage<WriterFrontend>
{ {
public: public:
DisableMessage(WriterFrontend* writer) DisableMessage(WriterFrontend* writer)
: threading::OutputMessage<WriterFrontend>("Disable", writer) {} : threading::OutputMessage<WriterFrontend>("Disable", writer) {}
virtual bool Process() { Object()->SetDisable(); return true; } bool Process() override { Object()->SetDisable(); return true; }
}; };
} }

View file

@ -14,7 +14,7 @@ namespace logging {
// Messages sent from frontend to backend (i.e., "InputMessages"). // Messages sent from frontend to backend (i.e., "InputMessages").
class InitMessage : public threading::InputMessage<WriterBackend> class InitMessage final : public threading::InputMessage<WriterBackend>
{ {
public: public:
InitMessage(WriterBackend* backend, const int num_fields, const Field* const* fields) InitMessage(WriterBackend* backend, const int num_fields, const Field* const* fields)
@ -23,14 +23,14 @@ public:
{} {}
virtual bool Process() { return Object()->Init(num_fields, fields); } bool Process() override { return Object()->Init(num_fields, fields); }
private: private:
const int num_fields; const int num_fields;
const Field * const* fields; const Field * const* fields;
}; };
class RotateMessage : public threading::InputMessage<WriterBackend> class RotateMessage final : public threading::InputMessage<WriterBackend>
{ {
public: public:
RotateMessage(WriterBackend* backend, WriterFrontend* frontend, const char* rotated_path, const double open, RotateMessage(WriterBackend* backend, WriterFrontend* frontend, const char* rotated_path, const double open,
@ -42,7 +42,7 @@ public:
virtual ~RotateMessage() { delete [] rotated_path; } virtual ~RotateMessage() { delete [] rotated_path; }
virtual bool Process() { return Object()->Rotate(rotated_path, open, close, terminating); } bool Process() override { return Object()->Rotate(rotated_path, open, close, terminating); }
private: private:
WriterFrontend* frontend; WriterFrontend* frontend;
@ -52,14 +52,14 @@ private:
const bool terminating; const bool terminating;
}; };
class WriteMessage : public threading::InputMessage<WriterBackend> class WriteMessage final : public threading::InputMessage<WriterBackend>
{ {
public: public:
WriteMessage(WriterBackend* backend, int num_fields, int num_writes, Value*** vals) WriteMessage(WriterBackend* backend, int num_fields, int num_writes, Value*** vals)
: threading::InputMessage<WriterBackend>("Write", backend), : threading::InputMessage<WriterBackend>("Write", backend),
num_fields(num_fields), num_writes(num_writes), vals(vals) {} num_fields(num_fields), num_writes(num_writes), vals(vals) {}
virtual bool Process() { return Object()->Write(num_fields, num_writes, vals); } bool Process() override { return Object()->Write(num_fields, num_writes, vals); }
private: private:
int num_fields; int num_fields;
@ -67,27 +67,27 @@ private:
Value ***vals; Value ***vals;
}; };
class SetBufMessage : public threading::InputMessage<WriterBackend> class SetBufMessage final : public threading::InputMessage<WriterBackend>
{ {
public: public:
SetBufMessage(WriterBackend* backend, const bool enabled) SetBufMessage(WriterBackend* backend, const bool enabled)
: threading::InputMessage<WriterBackend>("SetBuf", backend), : threading::InputMessage<WriterBackend>("SetBuf", backend),
enabled(enabled) { } enabled(enabled) { }
virtual bool Process() { return Object()->SetBuf(enabled); } bool Process() override { return Object()->SetBuf(enabled); }
private: private:
const bool enabled; const bool enabled;
}; };
class FlushMessage : public threading::InputMessage<WriterBackend> class FlushMessage final : public threading::InputMessage<WriterBackend>
{ {
public: public:
FlushMessage(WriterBackend* backend, double network_time) FlushMessage(WriterBackend* backend, double network_time)
: threading::InputMessage<WriterBackend>("Flush", backend), : threading::InputMessage<WriterBackend>("Flush", backend),
network_time(network_time) {} network_time(network_time) {}
virtual bool Process() { return Object()->Flush(network_time); } bool Process() override { return Object()->Flush(network_time); }
private: private:
double network_time; double network_time;
}; };

View file

@ -10,7 +10,7 @@ namespace Zeek_AsciiWriter {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::logging::Component("Ascii", ::logging::writer::Ascii::Instantiate)); AddComponent(new ::logging::Component("Ascii", ::logging::writer::Ascii::Instantiate));

View file

@ -10,7 +10,7 @@ namespace Zeek_NoneWriter {
class Plugin : public plugin::Plugin { class Plugin : public plugin::Plugin {
public: public:
plugin::Configuration Configure() plugin::Configuration Configure() override
{ {
AddComponent(new ::logging::Component("None", ::logging::writer::None::Instantiate)); AddComponent(new ::logging::Component("None", ::logging::writer::None::Instantiate));

View file

@ -15,13 +15,13 @@ namespace threading {
////// Messages. ////// Messages.
// Signals child thread to shutdown operation. // Signals child thread to shutdown operation.
class FinishMessage : public InputMessage<MsgThread> class FinishMessage final : public InputMessage<MsgThread>
{ {
public: public:
FinishMessage(MsgThread* thread, double network_time) : InputMessage<MsgThread>("Finish", thread), FinishMessage(MsgThread* thread, double network_time) : InputMessage<MsgThread>("Finish", thread),
network_time(network_time) { } network_time(network_time) { }
virtual bool Process() { bool Process() override {
if ( Object()->child_finished ) if ( Object()->child_finished )
return true; return true;
bool result = Object()->OnFinish(network_time); bool result = Object()->OnFinish(network_time);
@ -34,28 +34,28 @@ private:
}; };
// Signals main thread that operations shut down. // Signals main thread that operations shut down.
class FinishedMessage : public OutputMessage<MsgThread> class FinishedMessage final : public OutputMessage<MsgThread>
{ {
public: public:
FinishedMessage(MsgThread* thread) FinishedMessage(MsgThread* thread)
: OutputMessage<MsgThread>("FinishedMessage", thread) : OutputMessage<MsgThread>("FinishedMessage", thread)
{ } { }
virtual bool Process() { bool Process() override {
Object()->main_finished = true; Object()->main_finished = true;
return true; return true;
} }
}; };
/// Sends a heartbeat to the child thread. /// Sends a heartbeat to the child thread.
class HeartbeatMessage : public InputMessage<MsgThread> class HeartbeatMessage final : public InputMessage<MsgThread>
{ {
public: public:
HeartbeatMessage(MsgThread* thread, double arg_network_time, double arg_current_time) HeartbeatMessage(MsgThread* thread, double arg_network_time, double arg_current_time)
: InputMessage<MsgThread>("Heartbeat", thread) : InputMessage<MsgThread>("Heartbeat", thread)
{ network_time = arg_network_time; current_time = arg_current_time; } { network_time = arg_network_time; current_time = arg_current_time; }
virtual bool Process() { bool Process() override {
return Object()->OnHeartbeat(network_time, current_time); return Object()->OnHeartbeat(network_time, current_time);
} }
@ -65,7 +65,7 @@ private:
}; };
// A message from the child to be passed on to the Reporter. // A message from the child to be passed on to the Reporter.
class ReporterMessage : public OutputMessage<MsgThread> class ReporterMessage final : public OutputMessage<MsgThread>
{ {
public: public:
enum Type { enum Type {
@ -77,9 +77,9 @@ public:
: OutputMessage<MsgThread>("ReporterMessage", thread) : OutputMessage<MsgThread>("ReporterMessage", thread)
{ type = arg_type; msg = copy_string(arg_msg); } { type = arg_type; msg = copy_string(arg_msg); }
~ReporterMessage() { delete [] msg; } ~ReporterMessage() override { delete [] msg; }
virtual bool Process(); bool Process() override;
private: private:
const char* msg; const char* msg;
@ -87,13 +87,13 @@ private:
}; };
// A message from the the child to the main process, requesting suicide. // A message from the the child to the main process, requesting suicide.
class KillMeMessage : public OutputMessage<MsgThread> class KillMeMessage final : public OutputMessage<MsgThread>
{ {
public: public:
KillMeMessage(MsgThread* thread) KillMeMessage(MsgThread* thread)
: OutputMessage<MsgThread>("ReporterMessage", thread) {} : OutputMessage<MsgThread>("ReporterMessage", thread) {}
virtual bool Process() bool Process() override
{ {
Object()->SignalStop(); Object()->SignalStop();
Object()->WaitForStop(); Object()->WaitForStop();
@ -104,16 +104,16 @@ public:
#ifdef DEBUG #ifdef DEBUG
// A debug message from the child to be passed on to the DebugLogger. // A debug message from the child to be passed on to the DebugLogger.
class DebugMessage : public OutputMessage<MsgThread> class DebugMessage final : public OutputMessage<MsgThread>
{ {
public: public:
DebugMessage(DebugStream arg_stream, MsgThread* thread, const char* arg_msg) DebugMessage(DebugStream arg_stream, MsgThread* thread, const char* arg_msg)
: OutputMessage<MsgThread>("DebugMessage", thread) : OutputMessage<MsgThread>("DebugMessage", thread)
{ stream = arg_stream; msg = copy_string(arg_msg); } { stream = arg_stream; msg = copy_string(arg_msg); }
virtual ~DebugMessage() { delete [] msg; } ~DebugMessage() override { delete [] msg; }
virtual bool Process() bool Process() override
{ {
debug_logger.Log(stream, "%s: %s", Object()->Name(), msg); debug_logger.Log(stream, "%s: %s", Object()->Name(), msg);
return true; return true;