aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/netscreen.h
diff options
context:
space:
mode:
authorSake Blok <sake@euronet.nl>2007-08-17 08:03:32 +0000
committerSake Blok <sake@euronet.nl>2007-08-17 08:03:32 +0000
commit47ec0bead948443f243c38fa83bbed335189b81a (patch)
tree4b8b90c91f6734cf3856cb4407509687de834280 /wiretap/netscreen.h
parent2efdf99f2861f02af97a3eabd2c5253c1625102e (diff)
(http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1717)
This patch adds support for the Juniper NetScreen snoop output format. It takes a text-dump op the captured packets and parses the headers and hex-data. Since the snoop files on a Junpiper NetScreen can be saved to a tftp-server, this patch makes it quite easy to use the snoop function of the Juniper NetScreen firewalls. /* XXX TODO: * * o Create a wiki-page with instruction on how to make tracefiles * on Juniper NetScreen devices. Also put a few examples up * on the wiki (Done: wiki-page added 2007-08-03) * * o Use the interface names to properly detect the encapsulation * type (ie adsl packets are now not properly dissected) * (Done: adsl packets are now correctly seen as PPP, 2007-08-03) * * o Pass the interface names and the traffic direction to either * the frame-structure, a pseudo-header or use PPI. This needs * to be discussed on the dev-list first * (Posted a message to wireshark-dev abou this 2007-08-03) * */ svn path=/trunk/; revision=22533
Diffstat (limited to 'wiretap/netscreen.h')
-rw-r--r--wiretap/netscreen.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/wiretap/netscreen.h b/wiretap/netscreen.h
new file mode 100644
index 0000000000..983e1373f3
--- /dev/null
+++ b/wiretap/netscreen.h
@@ -0,0 +1,51 @@
+/* netscreen.h
+ *
+ * Juniper NetScreen snoop output parser
+ * Created by re-using a lot of code from cosine.c
+ * Copyright (c) 2007 by Sake Blok <sake@euronet.nl>
+ *
+ * Wiretap Library
+ * Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
+ *
+ * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+#ifndef __W_NETSCREEN_H__
+#define __W_NETSCREEN_H__
+
+/* Magic text to check for NetScreen snoop output */
+#define NETSCREEN_HDR_MAGIC_STR1 "(i) len="
+#define NETSCREEN_HDR_MAGIC_STR2 "(o) len="
+
+/* Magic text for start of packet */
+#define NETSCREEN_REC_MAGIC_STR1 NETSCREEN_HDR_MAGIC_STR1
+#define NETSCREEN_REC_MAGIC_STR2 NETSCREEN_HDR_MAGIC_STR2
+
+#define NETSCREEN_LINE_LENGTH 128
+#define NETSCREEN_HEADER_LINES_TO_CHECK 32
+#define NETSCREEN_MAX_INFOLINES 8
+#define NETSCREEN_SPACES_ON_INFO_LINE 14
+#define NETSCREEN_MAX_INT_NAME_LENGTH 16
+
+#define NETSCREEN_INGRESS FALSE
+#define NETSCREEN_EGRESS TRUE
+
+
+#define NETSCREEN_MAX_PACKET_LEN 65536
+
+int netscreen_open(wtap *wth, int *err, gchar **err_info);
+
+#endif