diff --git a/src/AYIYA.h b/src/AYIYA.h index f6025b709f..563cf86613 100644 --- a/src/AYIYA.h +++ b/src/AYIYA.h @@ -15,10 +15,6 @@ public: static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn) { return new AYIYA_Analyzer(conn); } - static bool Available() - { return BifConst::Tunnel::enable_ayiya && - BifConst::Tunnel::max_depth > 0; } - protected: friend class AnalyzerTimer; void ExpireTimer(double t); diff --git a/src/BackDoor.h b/src/BackDoor.h index 2286138239..d3687bad0b 100644 --- a/src/BackDoor.h +++ b/src/BackDoor.h @@ -74,15 +74,6 @@ public: static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn) { return new BackDoor_Analyzer(conn); } - static bool Available() - { - return backdoor_stats || rlogin_signature_found || - telnet_signature_found || ssh_signature_found || - root_backdoor_signature_found || ftp_signature_found || - napster_signature_found || kazaa_signature_found || - http_signature_found || http_proxy_signature_found; - } - protected: // We support both packet and stream input, and can be instantiated // even if the TCP analyzer is not yet reassembling. diff --git a/src/BitTorrent.h b/src/BitTorrent.h index eb2aeb422e..6c1ef677e1 100644 --- a/src/BitTorrent.h +++ b/src/BitTorrent.h @@ -20,9 +20,6 @@ public: static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn) { return new BitTorrent_Analyzer(conn); } - static bool Available() - { return bittorrent_peer_handshake || bittorrent_peer_piece; } - protected: void DeliverWeird(const char* msg, bool orig); diff --git a/src/BitTorrentTracker.h b/src/BitTorrentTracker.h index cc17d98af3..41a902befa 100644 --- a/src/BitTorrentTracker.h +++ b/src/BitTorrentTracker.h @@ -53,9 +53,6 @@ public: static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn) { return new BitTorrentTracker_Analyzer(conn); } - static bool Available() - { return bt_tracker_request || bt_tracker_response; } - protected: void ClientRequest(int len, const u_char* data); void ServerReply(int len, const u_char* data); diff --git a/src/ConnSizeAnalyzer.h b/src/ConnSizeAnalyzer.h index 23f7975617..6eac519c88 100644 --- a/src/ConnSizeAnalyzer.h +++ b/src/ConnSizeAnalyzer.h @@ -23,8 +23,6 @@ public: static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn) { return new ConnSize_Analyzer(conn); } - static bool Available() { return BifConst::use_conn_size_analyzer ; } - protected: virtual void DeliverPacket(int len, const u_char* data, bool is_orig, int seq, const IP_Hdr* ip, int caplen); diff --git a/src/DCE_RPC.h b/src/DCE_RPC.h index cfffc73c4e..61de358dbd 100644 --- a/src/DCE_RPC.h +++ b/src/DCE_RPC.h @@ -177,9 +177,6 @@ public: static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn) { return new DCE_RPC_Analyzer(conn); } - static bool Available() - { return DCE_RPC_Session::any_dce_rpc_event(); } - protected: DCE_RPC_Session* session; bool speculative; diff --git a/src/DHCP-binpac.h b/src/DHCP-binpac.h index df47ec7765..4b59ac15b2 100644 --- a/src/DHCP-binpac.h +++ b/src/DHCP-binpac.h @@ -18,9 +18,6 @@ public: static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn) { return new DHCP_Analyzer_binpac(conn); } - static bool Available() - { return dhcp_request; } - protected: binpac::DHCP::DHCP_Conn* interp; }; diff --git a/src/DNS.h b/src/DNS.h index 569af906bf..7a342dc757 100644 --- a/src/DNS.h +++ b/src/DNS.h @@ -269,11 +269,6 @@ public: static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn) { return new DNS_Analyzer(conn); } - static bool Available() - { - return (dns_request || dns_full_request); - } - protected: DNS_Interpreter* interp; Contents_DNS* contents_dns_orig; diff --git a/src/FTP.h b/src/FTP.h index 849b18f50b..19393fc5aa 100644 --- a/src/FTP.h +++ b/src/FTP.h @@ -18,9 +18,6 @@ public: return new FTP_Analyzer(conn); } - static bool Available() { return ftp_request || ftp_reply; } - - protected: NVT_Analyzer* nvt_orig; NVT_Analyzer* nvt_resp; diff --git a/src/FileAnalyzer.h b/src/FileAnalyzer.h index 6edda1646f..1d2a956ef2 100644 --- a/src/FileAnalyzer.h +++ b/src/FileAnalyzer.h @@ -18,8 +18,6 @@ public: static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn) { return new File_Analyzer(conn); } - static bool Available() { return file_transferred; } - protected: void Identify(); diff --git a/src/Finger.h b/src/Finger.h index 5de0086dbc..0be0c0eb19 100644 --- a/src/Finger.h +++ b/src/Finger.h @@ -19,8 +19,6 @@ public: static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn) { return new Finger_Analyzer(conn); } - static bool Available() { return finger_request || finger_reply; } - protected: ContentLine_Analyzer* content_line_orig; ContentLine_Analyzer* content_line_resp; diff --git a/src/GTPv1.h b/src/GTPv1.h index e6c2066df0..89befa04bf 100644 --- a/src/GTPv1.h +++ b/src/GTPv1.h @@ -15,10 +15,6 @@ public: static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn) { return new GTPv1_Analyzer(conn); } - static bool Available() - { return BifConst::Tunnel::enable_gtpv1 && - BifConst::Tunnel::max_depth > 0; } - protected: friend class AnalyzerTimer; void ExpireTimer(double t); diff --git a/src/Gnutella.h b/src/Gnutella.h index 88a8bcb4c7..2dd2a2ad12 100644 --- a/src/Gnutella.h +++ b/src/Gnutella.h @@ -43,13 +43,6 @@ public: static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn) { return new Gnutella_Analyzer(conn); } - static bool Available() - { - return gnutella_text_msg || gnutella_binary_msg || - gnutella_partial_binary_msg || gnutella_establish || - gnutella_not_establish || gnutella_http_notify; - } - private: int NextLine(const u_char* data, int len); diff --git a/src/ICMP.h b/src/ICMP.h index fbf61f7993..e798bd2c9b 100644 --- a/src/ICMP.h +++ b/src/ICMP.h @@ -22,8 +22,6 @@ public: static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn) { return new ICMP_Analyzer(conn); } - static bool Available() { return true; } - protected: ICMP_Analyzer(analyzer::Tag tag, Connection* conn); diff --git a/src/IRC.cc b/src/IRC.cc index 35156ccb40..e778023553 100644 --- a/src/IRC.cc +++ b/src/IRC.cc @@ -22,38 +22,6 @@ IRC_Analyzer::IRC_Analyzer(Connection* conn) AddSupportAnalyzer(new ContentLine_Analyzer(conn, false)); } -bool IRC_Analyzer::Available() - { - static bool did_avail = false; - static bool avail = false; - - if ( ! did_avail ) - { - // It's a lot of events, but for consistency with other - // analyzers we need to check for all of them. - avail = irc_request || irc_reply || - irc_message || irc_quit_message || - irc_privmsg_message || irc_notice_message || - irc_squery_message || irc_join_message || - irc_part_message || irc_nick_message || - irc_invalid_nick || irc_network_info || - irc_server_info || irc_channel_info || irc_who_line || - irc_who_message || irc_whois_message || - irc_whois_user_line || irc_whois_operator_line || - irc_whois_channel_line || irc_oper_message || - irc_oper_response || irc_kick_message || - irc_error_message || irc_invite_message || - irc_mode_message || irc_squit_message || - irc_names_info || irc_dcc_message || - irc_global_users || irc_user_message || - irc_channel_topic || irc_password_message; - - did_avail = true; - } - - return avail; - } - void IRC_Analyzer::Done() { TCP_ApplicationAnalyzer::Done(); diff --git a/src/IRC.h b/src/IRC.h index 657532f5f1..6a78bad025 100644 --- a/src/IRC.h +++ b/src/IRC.h @@ -35,8 +35,6 @@ public: return new IRC_Analyzer(conn); } - static bool Available(); - protected: int orig_status; int orig_zip_status; diff --git a/src/Ident.h b/src/Ident.h index e0cf44f5a4..ffc927a73c 100644 --- a/src/Ident.h +++ b/src/Ident.h @@ -16,9 +16,6 @@ public: static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn) { return new Ident_Analyzer(conn); } - static bool Available() - { return ident_request || ident_reply || ident_error; } - protected: const char* ParsePair(const char* line, const char* end_of_line, int& p1, int &p2); diff --git a/src/InterConn.h b/src/InterConn.h index 1abec4058b..741bea45ba 100644 --- a/src/InterConn.h +++ b/src/InterConn.h @@ -50,8 +50,6 @@ public: static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn) { return new InterConn_Analyzer(conn); } - static bool Available() { return interconn_stats; } - protected: // We support both packet and stream input and can be put in place even // if the TCP analyzer is not yet reassembling. diff --git a/src/Modbus.h b/src/Modbus.h index 84389b0554..b00a074ada 100644 --- a/src/Modbus.h +++ b/src/Modbus.h @@ -18,39 +18,6 @@ public: static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn) { return new ModbusTCP_Analyzer(conn); } - // Put event names in this function - static bool Available() - { - return modbus_message - | modbus_exception - | modbus_read_coils_request - | modbus_read_coils_response - | modbus_read_discrete_inputs_request - | modbus_read_discrete_inputs_response - | modbus_read_holding_registers_request - | modbus_read_holding_registers_response - | modbus_read_input_registers_request - | modbus_read_input_registers_response - | modbus_write_single_coil_request - | modbus_write_single_coil_response - | modbus_write_single_register_request - | modbus_write_single_register_response - | modbus_write_multiple_coils_request - | modbus_write_multiple_coils_response - | modbus_write_multiple_registers_request - | modbus_write_multiple_registers_response - | modbus_read_file_record_request - | modbus_read_file_record_response - | modbus_write_file_record_request - | modbus_write_file_record_response - | modbus_mask_write_register_request - | modbus_mask_write_register_response - | modbus_read_write_multiple_registers_request - | modbus_read_write_multiple_registers_response - | modbus_read_fifo_queue_request - | modbus_read_fifo_queue_response; - } - protected: binpac::ModbusTCP::ModbusTCP_Conn* interp; }; diff --git a/src/NCP.h b/src/NCP.h index 833d030394..4fcddfca39 100644 --- a/src/NCP.h +++ b/src/NCP.h @@ -105,8 +105,6 @@ public: static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn) { return new NCP_Analyzer(conn); } - static bool Available() { return NCP_Session::any_ncp_event(); } - protected: NCP_Session* session; diff --git a/src/NFS.h b/src/NFS.h index ecb89ff7bf..18acff4b37 100644 --- a/src/NFS.h +++ b/src/NFS.h @@ -77,16 +77,6 @@ public: static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn) { return new NFS_Analyzer(conn); } - - static bool Available() - { - return ( nfs_proc_null || nfs_proc_not_implemented || nfs_proc_getattr || - nfs_proc_lookup || nfs_proc_read || nfs_proc_readlink || - nfs_proc_write || nfs_proc_create || nfs_proc_mkdir || - nfs_proc_remove || nfs_proc_rmdir || nfs_proc_readdir || - nfs_reply_status || - rpc_dialogue || rpc_call || rpc_reply ); - } }; diff --git a/src/NTP.h b/src/NTP.h index 3ae44d4cf7..9dc5dc6af9 100644 --- a/src/NTP.h +++ b/src/NTP.h @@ -42,8 +42,6 @@ public: static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn) { return new NTP_Analyzer(conn); } - static bool Available() { return ntp_message; } - protected: virtual void Done(); virtual void DeliverPacket(int len, const u_char* data, bool orig, diff --git a/src/NetbiosSSN.h b/src/NetbiosSSN.h index c3851516a0..8d2cc92089 100644 --- a/src/NetbiosSSN.h +++ b/src/NetbiosSSN.h @@ -160,13 +160,6 @@ public: static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn) { return new NetbiosSSN_Analyzer(conn); } - static bool Available() - { - return NetbiosSSN_Interpreter::any_netbios_ssn_event() || - SMB_Session::any_smb_event() || - DCE_RPC_Session::any_dce_rpc_event(); - } - protected: virtual void ConnectionClosed(TCP_Endpoint* endpoint, TCP_Endpoint* peer, int gen_event); diff --git a/src/PIA.h b/src/PIA.h index d0521a6885..920bd9c976 100644 --- a/src/PIA.h +++ b/src/PIA.h @@ -37,8 +37,6 @@ public: // as pointer to an Analyzer. analyzer::Analyzer* AsAnalyzer() { return as_analyzer; } - static bool Available() { return true; } - protected: void PIA_Done(); void PIA_DeliverPacket(int len, const u_char* data, bool is_orig, diff --git a/src/POP3.h b/src/POP3.h index bab2737fca..5c10865ba3 100644 --- a/src/POP3.h +++ b/src/POP3.h @@ -73,11 +73,6 @@ public: return new POP3_Analyzer(conn); } - static bool Available() - { - return pop3_request || pop3_reply || pop3_data || pop3_unexpected; - } - protected: int masterState; int subState; diff --git a/src/Portmap.h b/src/Portmap.h index 1a98537153..bf7ab30891 100644 --- a/src/Portmap.h +++ b/src/Portmap.h @@ -31,9 +31,6 @@ public: static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn) { return new Portmapper_Analyzer(conn); } - - static bool Available() - { return pm_request || rpc_call; } }; #endif diff --git a/src/RSH.h b/src/RSH.h index 31e5fe683f..c4eb8fb689 100644 --- a/src/RSH.h +++ b/src/RSH.h @@ -50,9 +50,6 @@ public: static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn) { return new Rsh_Analyzer(conn); } - static bool Available() - { return login_failure || login_success || login_input_line || login_output_line; } - Contents_Rsh_Analyzer* contents_orig; Contents_Rsh_Analyzer* contents_resp; }; diff --git a/src/Rlogin.h b/src/Rlogin.h index 04486e4262..5fcd209896 100644 --- a/src/Rlogin.h +++ b/src/Rlogin.h @@ -62,12 +62,6 @@ public: static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn) { return new Rlogin_Analyzer(conn); } - - static bool Available() - { - return login_failure || login_success || - login_input_line || login_output_line; - } }; #endif diff --git a/src/SMB.h b/src/SMB.h index 23af04720e..7e7f1cea1d 100644 --- a/src/SMB.h +++ b/src/SMB.h @@ -198,12 +198,6 @@ public: static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn) { return new SMB_Analyzer(conn); } - static bool Available() - { - return SMB_Session::any_smb_event() || - DCE_RPC_Session::any_dce_rpc_event(); - } - protected: SMB_Session* smb_session; Contents_SMB* o_smb; diff --git a/src/SMTP.h b/src/SMTP.h index 563b99cc32..d4b7dd63a6 100644 --- a/src/SMTP.h +++ b/src/SMTP.h @@ -52,12 +52,6 @@ public: return new SMTP_Analyzer(conn); } - static bool Available() - { - return smtp_request || smtp_reply || - smtp_data || smtp_unexpected; - } - protected: void ProcessLine(int length, const char* line, bool orig); diff --git a/src/SOCKS.h b/src/SOCKS.h index 9557dc761d..767d0a1eb7 100644 --- a/src/SOCKS.h +++ b/src/SOCKS.h @@ -28,11 +28,6 @@ public: static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn) { return new SOCKS_Analyzer(conn); } - static bool Available() - { - return socks_request || socks_reply; - } - protected: bool orig_done; diff --git a/src/SSH.h b/src/SSH.h index 0d3fa4d6e6..a6a2f4e154 100644 --- a/src/SSH.h +++ b/src/SSH.h @@ -15,9 +15,6 @@ public: static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn) { return new SSH_Analyzer(conn); } - static bool Available() - { return ssh_client_version || ssh_server_version; } - private: ContentLine_Analyzer* orig; ContentLine_Analyzer* resp; diff --git a/src/SteppingStone.h b/src/SteppingStone.h index aab411a46d..4ec4dbc2e1 100644 --- a/src/SteppingStone.h +++ b/src/SteppingStone.h @@ -54,8 +54,6 @@ public: static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn) { return new SteppingStone_Analyzer(conn); } - static bool Available() { return stp_correlate_pair; } - protected: // We support both packet and stream input and can be put in place even // if the TCP analyzer is not yet reassebmling. diff --git a/src/Syslog-binpac.h b/src/Syslog-binpac.h index 88b64c5f70..e6d05df356 100644 --- a/src/Syslog-binpac.h +++ b/src/Syslog-binpac.h @@ -18,9 +18,6 @@ public: static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn) { return new Syslog_Analyzer_binpac(conn); } - static bool Available() - { return syslog_message; } - protected: friend class AnalyzerTimer; void ExpireTimer(double t); @@ -45,9 +42,6 @@ protected: // static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn) // { return new Syslog_TCP_Analyzer_binpac(conn); } // -// static bool Available() -// { return (Syslog_request || Syslog_full_request); } -// //protected: // binpac::Syslog_on_TCP::Syslog_TCP_Conn* interp; //}; diff --git a/src/TCP.h b/src/TCP.h index 93c008af58..61bcd7ef7c 100644 --- a/src/TCP.h +++ b/src/TCP.h @@ -91,8 +91,6 @@ public: static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn) { return new TCP_Analyzer(conn); } - static bool Available() { return true; } - protected: friend class TCP_ApplicationAnalyzer; friend class TCP_Reassembler; @@ -365,8 +363,6 @@ public: static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn) { return new TCPStats_Analyzer(conn); } - static bool Available() { return conn_stats || tcp_rexmit; } - protected: virtual void DeliverPacket(int len, const u_char* data, bool is_orig, int seq, const IP_Hdr* ip, int caplen); diff --git a/src/Telnet.h b/src/Telnet.h index 6e1695be9c..290382846b 100644 --- a/src/Telnet.h +++ b/src/Telnet.h @@ -12,12 +12,6 @@ public: static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn) { return new Telnet_Analyzer(conn); } - - static bool Available() - { - return login_failure || login_success || - login_input_line || login_output_line; - } }; #endif diff --git a/src/Teredo.h b/src/Teredo.h index d3e3336f9b..4f38b29947 100644 --- a/src/Teredo.h +++ b/src/Teredo.h @@ -22,10 +22,6 @@ public: static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn) { return new Teredo_Analyzer(conn); } - static bool Available() - { return BifConst::Tunnel::enable_teredo && - BifConst::Tunnel::max_depth > 0; } - /** * Emits a weird only if the analyzer has previously been able to * decapsulate a Teredo packet in both directions or if *force* param is diff --git a/src/UDP.h b/src/UDP.h index 36a9b84dcd..67048781a7 100644 --- a/src/UDP.h +++ b/src/UDP.h @@ -23,8 +23,6 @@ public: static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn) { return new UDP_Analyzer(conn); } - static bool Available() { return true; } - protected: virtual void Done(); virtual void DeliverPacket(int len, const u_char* data, bool orig,