diff options
author | Guy Harris <guy@alum.mit.edu> | 1999-02-09 00:35:38 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 1999-02-09 00:35:38 +0000 |
commit | 75305346b532da113629c21311817099305762f3 (patch) | |
tree | 80d9f3e8a36588385000c9c9e0ffd34ab77c7629 /packet-raw.c | |
parent | facb50396007c70e5616ff61a4aa22ff43e44001 (diff) | |
download | wireshark-75305346b532da113629c21311817099305762f3.tar.gz wireshark-75305346b532da113629c21311817099305762f3.tar.bz2 wireshark-75305346b532da113629c21311817099305762f3.zip |
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.
svn path=/trunk/; revision=184
Diffstat (limited to 'packet-raw.c')
-rw-r--r-- | packet-raw.c | 21 |
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); } - + |