aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/snoop.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-05-23 08:17:31 +0000
committerGuy Harris <guy@alum.mit.edu>2002-05-23 08:17:31 +0000
commit85c7401856f07c2c460a9a4e3c4549f12549ff36 (patch)
treeba8e50fa6a424847c597301414596fb2284c0cfa /wiretap/snoop.c
parent15fe575899cfc302565b3a420692c4e7fac84b74 (diff)
Set the LANE subtype in the "seek and read" routine.
svn path=/trunk/; revision=5529
Diffstat (limited to 'wiretap/snoop.c')
-rw-r--r--wiretap/snoop.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/wiretap/snoop.c b/wiretap/snoop.c
index 12f12727a1..5c989cad37 100644
--- a/wiretap/snoop.c
+++ b/wiretap/snoop.c
@@ -1,6 +1,6 @@
/* snoop.c
*
- * $Id: snoop.c,v 1.49 2002/05/07 06:25:30 guy Exp $
+ * $Id: snoop.c,v 1.50 2002/05/23 08:17:31 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
@@ -427,6 +427,8 @@ static gboolean
snoop_seek_read(wtap *wth, long seek_off,
union wtap_pseudo_header *pseudo_header, u_char *pd, int length, int *err)
{
+ gboolean ret;
+
if (file_seek(wth->random_fh, seek_off, SEEK_SET) == -1) {
*err = file_error(wth->random_fh);
return FALSE;
@@ -443,7 +445,17 @@ snoop_seek_read(wtap *wth, long seek_off,
/*
* Read the packet data.
*/
- return snoop_read_rec_data(wth->random_fh, pd, length, err);
+ if (!snoop_read_rec_data(wth->random_fh, pd, length, err))
+ return FALSE; /* failed */
+
+ /*
+ * If this is ATM LANE traffic, try to guess what type of LANE
+ * traffic it is based on the packet contents.
+ */
+ if (wth->file_encap == WTAP_ENCAP_ATM_SNIFFER &&
+ pseudo_header->atm.type == TRAF_LANE)
+ atm_guess_lane_type(pd, length, pseudo_header);
+ return TRUE;
}
static gboolean