aboutsummaryrefslogtreecommitdiffstats
path: root/ui/follow.h
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2013-09-09 19:30:30 +0000
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2013-09-09 19:30:30 +0000
commit80f9326b2fbf8857f221b6ee6d44c3982cdcbff9 (patch)
treed5dd5ce48d3da0595cc10da6319c729604511c23 /ui/follow.h
parent41174fa490f141aaf1fdddfcb4f445ecd95888f7 (diff)
From Thomas ERSFELD (GSoC13)
Add TCP/UDP/SSL Follow feature to QtShark Known issue : * Duplicate code with GTK (function need follow_info_t struct but in GTK there is some GWidget variable in struct) * Sometimes TCP Follow fail... svn path=/trunk/; revision=51883
Diffstat (limited to 'ui/follow.h')
-rw-r--r--ui/follow.h128
1 files changed, 128 insertions, 0 deletions
diff --git a/ui/follow.h b/ui/follow.h
new file mode 100644
index 0000000000..ec026f900e
--- /dev/null
+++ b/ui/follow.h
@@ -0,0 +1,128 @@
+/* follow.h
+ * Common routines for following data streams (qt/gtk)
+ *
+ * $Id$
+ *
+ * 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 __FOLLOW__H__
+#define __FOLLOW__H__
+
+#include "glib.h"
+
+#include <epan/follow.h>
+#include <epan/dissectors/packet-ipv6.h>
+#include <epan/prefs.h>
+#include <epan/addr_resolv.h>
+#include <epan/charsets.h>
+#include <epan/epan_dissect.h>
+#include <epan/filesystem.h>
+#include <epan/ipproto.h>
+#include <epan/charsets.h>
+
+#include "config.h"
+#include "globals.h"
+#include "file.h"
+
+#include "version_info.h"
+
+#ifdef HAVE_LIBZ
+#include <zlib.h>
+#endif
+
+#ifdef SSL_PLUGIN
+#include "packet-ssl-utils.h"
+#else
+#include <epan/dissectors/packet-ssl-utils.h>
+#endif
+
+#ifndef QT_CORE_LIB
+#include <gtk/gtk.h>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+typedef struct {
+ gboolean is_from_server;
+ StringInfo data;
+} SslDecryptedRecord;
+
+/* Type of follow we are doing */
+typedef enum {
+ FOLLOW_TCP,
+ FOLLOW_SSL,
+ FOLLOW_UDP
+} follow_type_t;
+
+/* Show Stream */
+typedef enum {
+ FROM_CLIENT,
+ FROM_SERVER,
+ BOTH_HOSTS
+} show_stream_t;
+
+/* Show Type */
+typedef enum {
+ SHOW_ASCII,
+ SHOW_EBCDIC,
+ SHOW_HEXDUMP,
+ SHOW_CARRAY,
+ SHOW_RAW
+} show_type_t;
+
+typedef enum {
+ FRS_OK,
+ FRS_OPEN_ERROR,
+ FRS_READ_ERROR,
+ FRS_PRINT_ERROR
+} frs_return_t;
+
+typedef struct {
+ gboolean is_server;
+ GByteArray *data;
+} follow_record_t;
+
+char *
+sgetline(char *str, int *next);
+
+gboolean
+parse_http_header(char *data, size_t len, size_t *content_start);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+/*
+ * 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:
+ */