aboutsummaryrefslogtreecommitdiffstats
path: root/packet-raw.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>1999-02-09 00:35:38 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>1999-02-09 00:35:38 +0000
commitbe67db1249ee6fe49ed4943d44a07d0908575482 (patch)
tree80d9f3e8a36588385000c9c9e0ffd34ab77c7629 /packet-raw.c
parentb8bd93114db6cebc2ad487fb4d8fad73f26b5500 (diff)
When doing a capture, decode enough of the incoming packets to correctly
update the packet counts and percentages in the dialog box popped up during a capture, even for non-Ethernet captures. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@184 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-raw.c')
-rw-r--r--packet-raw.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/packet-raw.c b/packet-raw.c
index 9836df75ae..455a72ec48 100644
--- a/packet-raw.c
+++ b/packet-raw.c
@@ -1,7 +1,7 @@
/* packet-raw.c
* Routines for raw packet disassembly
*
- * $Id: packet-raw.c,v 1.7 1998/11/17 04:29:04 gerald Exp $
+ * $Id: packet-raw.c,v 1.8 1999/02/09 00:35:38 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -39,6 +39,23 @@
#include "packet.h"
void
+capture_raw( const u_char *pd, guint32 cap_len, packet_counts *ld ) {
+
+ /* So far, the only time we get raw connection types are with Linux and
+ * Irix PPP connections. We can't tell what type of data is coming down
+ * the line, so our safest bet is IP. - GCC
+ */
+
+ /* Currently, the Linux 2.1.xxx PPP driver passes back some of the header
+ * sometimes. This check should be removed when 2.2 is out.
+ */
+ if (pd[0] == 0xff && pd[1] == 0x03)
+ capture_ip(pd, 4, cap_len, ld);
+ else
+ capture_ip(pd, 0, cap_len, ld);
+}
+
+void
dissect_raw( const u_char *pd, frame_data *fd, GtkTree *tree ) {
GtkWidget *ti, *fh_tree;
@@ -76,4 +93,4 @@ dissect_raw( const u_char *pd, frame_data *fd, GtkTree *tree ) {
else
dissect_ip(pd, 0, fd, tree);
}
-
+