summaryrefslogtreecommitdiff
path: root/ui/qt/rpc_service_response_time_dialog.h
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2015-08-11 11:48:07 -0700
committerGerald Combs <gerald@wireshark.org>2015-08-12 20:17:35 +0000
commit5c80f08648ed14ecc03c20d8c52f25d71b03dd26 (patch)
treef931bbc8b684f15b692aa1fd009324310dd058df /ui/qt/rpc_service_response_time_dialog.h
parent412f5b3716bce91d1b26a82012e5c28a611d91da (diff)
downloadwireshark-5c80f08648ed14ecc03c20d8c52f25d71b03dd26.tar.gz
Add DCE-RPC and ONC-RPC service response time dialogs.
Add RpcServiceResponseTimeDialog, which handles DCE-RPC and ONC-RPC service response time statistics. Try to make it as lightweight as possible, since we might want to pull this into the RPC dissectors similar to the other SRT statistics. Allow program names on the command line in place of numbers or UUIDs. Make matches case-insensitive. E.g. the following are equivalent: -z rpc,srt,100003,3 -z rpc,srt,nfs,3 -z rpc,srt,NFS,3 as are the following: -z dcerpc,srt,f5cc5a18-4264-101a-8c59-08002b2f8426,56 -z dcerpc,srt,nspi,56 -z dcerpc,srt,NSPI,56 Change-Id: Ie451c64bf6fbc776f27d81e3bc248435c5cbc9e4 Reviewed-on: https://code.wireshark.org/review/9981 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui/qt/rpc_service_response_time_dialog.h')
-rw-r--r--ui/qt/rpc_service_response_time_dialog.h96
1 files changed, 96 insertions, 0 deletions
diff --git a/ui/qt/rpc_service_response_time_dialog.h b/ui/qt/rpc_service_response_time_dialog.h
new file mode 100644
index 0000000000..0814bd68c9
--- /dev/null
+++ b/ui/qt/rpc_service_response_time_dialog.h
@@ -0,0 +1,96 @@
+/* rpc_service_response_time_dialog.h
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1998 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef __RPC_SERVICE_RESPONSE_TIME_DIALOG_H__
+#define __RPC_SERVICE_RESPONSE_TIME_DIALOG_H__
+
+#include "service_response_time_dialog.h"
+
+class QComboBox;
+
+struct _dcerpc_uuid_key;
+struct _dcerpc_uuid_value;
+struct _e_guid_t;
+struct _rpc_prog_info_value;
+
+class RpcServiceResponseTimeDialog : public ServiceResponseTimeDialog
+{
+ Q_OBJECT
+
+public:
+ enum RpcFamily {
+ DceRpc,
+ OncRpc
+ };
+
+ RpcServiceResponseTimeDialog(QWidget &parent, CaptureFile &cf, struct register_srt *srt, RpcFamily dlg_type, const QString filter);
+ static TapParameterDialog *createDceRpcSrtDialog(QWidget &parent, const QString, const QString opt_arg, CaptureFile &cf);
+ static TapParameterDialog *createOncRpcSrtDialog(QWidget &parent, const QString, const QString opt_arg, CaptureFile &cf);
+
+ void addDceRpcProgram(_dcerpc_uuid_key *key, struct _dcerpc_uuid_value *value);
+ void addDceRpcProgramVersion(_dcerpc_uuid_key *key);
+ void addOncRpcProgram(guint32 program, struct _rpc_prog_info_value *value);
+ void addOncRpcProgramVersion(guint32 program, guint32 version);
+ void updateOncRpcProcedureCount(guint32 program, guint32 version, int procedure);
+
+ void setDceRpcUuidAndVersion(struct _e_guid_t *uuid, int version);
+ void setOncRpcProgramAndVersion(int program, int version);
+ void setRpcNameAndVersion(const QString &program_name, int version);
+
+public slots:
+ void dceRpcProgramChanged(const QString &program_name);
+ void oncRpcProgramChanged(const QString &program_name);
+
+protected:
+ virtual void fillTree();
+
+private:
+ RpcFamily dlg_type_;
+ QComboBox *program_combo_;
+ QComboBox *version_combo_;
+ QList<unsigned> versions_;
+
+ // DCE-RPC
+ QMap<QString, struct _dcerpc_uuid_key *> dce_name_to_uuid_key_;
+
+ // ONC-RPC
+ QMap<QString, guint32> onc_name_to_program_;
+ int onc_rpc_num_procedures_;
+
+ void clearVersionCombo();
+ void fillVersionCombo();
+
+};
+
+#endif // __RPC_SERVICE_RESPONSE_TIME_DIALOG_H__
+
+/*
+ * Editor modelines
+ *
+ * Local Variables:
+ * c-basic-offset: 4
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * ex: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
+ */