diff options
author | Gerald Combs <gerald@wireshark.org> | 1999-09-11 04:50:44 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 1999-09-11 04:50:44 +0000 |
commit | 9386f23feeb16591875734ba98c32604c9f44441 (patch) | |
tree | 6334aee6608029bfc8008d31a2e3647ce14e81bc /file.c | |
parent | 078f9a67b9d92e080282a2d7743bbfd2e0145698 (diff) | |
download | wireshark-9386f23feeb16591875734ba98c32604c9f44441.tar.gz wireshark-9386f23feeb16591875734ba98c32604c9f44441.tar.bz2 wireshark-9386f23feeb16591875734ba98c32604c9f44441.zip |
Added support for Lucent/Ascend packet traces. The MAX and Pipeline router
family has a set of debug commands that allow you to log the traffic on a
WAN or dialup connection as text, e.g.
RECV-iguana:241:(task: B04E12C0, time: 1975358.50) 15 octets @ 8003D634
[0000]: FF 03 00 3D C0 06 C9 96 2D 04 C1 72 00 05 B8
Created wtap_seek_read() which parses the textual data for and Ascend
trace, and does a normal fseek() and fread() for any other file type.
The fseek()/fread() pairs in file.c were replaced with the new function.
svn path=/trunk/; revision=652
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 11 |
1 files changed, 4 insertions, 7 deletions
@@ -1,7 +1,7 @@ /* file.c * File I/O routines * - * $Id: file.c,v 1.87 1999/09/09 02:42:24 gram Exp $ + * $Id: file.c,v 1.88 1999/09/11 04:50:34 gerald Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -708,8 +708,7 @@ filter_packets(capture_file *cf) cf->count++; - fseek(cf->fh, fd->file_off, SEEK_SET); - fread(cf->pd, sizeof(guint8), fd->cap_len, cf->fh); + wtap_seek_read (cf-> cd_t, cf->fh, fd->file_off, cf->pd, fd->cap_len); add_packet_to_packet_list(fd, cf, cf->pd); } @@ -754,8 +753,7 @@ print_packets(capture_file *cf, int to_file, const char *dest) for (fd = cf->plist; fd != NULL; fd = fd->next) { cf->count++; - fseek(cf->fh, fd->file_off, SEEK_SET); - fread(cf->pd, sizeof(guint8), fd->cap_len, cf->fh); + wtap_seek_read (cf-> cd_t, cf->fh, fd->file_off, cf->pd, fd->cap_len); /* create the logical protocol tree */ protocol_tree = proto_tree_create_root(); @@ -896,8 +894,7 @@ select_packet(capture_file *cf, int row) cf->selected_packet = i; /* Get the data in that frame. */ - fseek(cf->fh, cf->fd->file_off, SEEK_SET); - fread(cf->pd, sizeof(guint8), cf->fd->cap_len, cf->fh); + wtap_seek_read (cf-> cd_t, cf->fh, fd->file_off, cf->pd, fd->cap_len); /* Create the logical protocol tree. */ if (cf->protocol_tree) |