diff options
author | Guy Harris <guy@alum.mit.edu> | 2002-08-13 03:32:57 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2002-08-13 03:32:57 +0000 |
commit | 77bb2477bad88420fecc15e3a65e5efee066f582 (patch) | |
tree | e42b3732ecc66a68f55ce4fffdc3707519c4bcb4 /wiretap/netmon.c | |
parent | 8616a33765b7c90c36833f32a2a436252af80564 (diff) | |
download | wireshark-77bb2477bad88420fecc15e3a65e5efee066f582.tar.gz wireshark-77bb2477bad88420fecc15e3a65e5efee066f582.tar.bz2 wireshark-77bb2477bad88420fecc15e3a65e5efee066f582.zip |
Get rid of the "vpi" and "vci" arguments to "atm_guess_traffic_type()",
have it get that information from the pseudo-header instead, and set the
VPI and VCI fields in the pseudo-header before calling it.
Don't call it for non-ATM NetMon captures.
svn path=/trunk/; revision=5982
Diffstat (limited to 'wiretap/netmon.c')
-rw-r--r-- | wiretap/netmon.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/wiretap/netmon.c b/wiretap/netmon.c index 02dc9a7d96..406f1625dc 100644 --- a/wiretap/netmon.c +++ b/wiretap/netmon.c @@ -1,6 +1,6 @@ /* netmon.c * - * $Id: netmon.c,v 1.59 2002/08/13 03:26:30 guy Exp $ + * $Id: netmon.c,v 1.60 2002/08/13 03:32:57 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu> @@ -445,8 +445,10 @@ static gboolean netmon_read(wtap *wth, int *err, long *data_offset) * Attempt to guess from the packet data, the VPI, and the VCI * information about the type of traffic. */ - atm_guess_traffic_type(data_ptr, packet_size, wth->pseudo_header.atm.vpi, - wth->pseudo_header.atm.vci, &wth->pseudo_header); + if (wth->file_encap == WTAP_ENCAP_ATM_SNIFFER) { + atm_guess_traffic_type(data_ptr, packet_size, + &wth->pseudo_header); + } return TRUE; } @@ -476,8 +478,9 @@ netmon_seek_read(wtap *wth, long seek_off, * Attempt to guess from the packet data, the VPI, and the VCI * information about the type of traffic. */ - atm_guess_traffic_type(pd, length, pseudo_header->atm.vpi, - pseudo_header->atm.vci, pseudo_header); + if (wth->file_encap == WTAP_ENCAP_ATM_SNIFFER) + atm_guess_traffic_type(pd, length, pseudo_header); + return TRUE; } |