/* atm.c
*
- * $Id: atm.c,v 1.1 2002/04/30 18:58:15 guy Exp $
+ * $Id: atm.c,v 1.2 2002/08/13 03:32:56 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
void
atm_guess_traffic_type(const guint8 *pd, guint32 len,
- guint16 vpi, guint16 vci, union wtap_pseudo_header *pseudo_header)
+ union wtap_pseudo_header *pseudo_header)
{
/*
* Start out assuming nothing other than that it's AAL5.
pseudo_header->atm.type = TRAF_UNKNOWN;
pseudo_header->atm.subtype = TRAF_ST_UNKNOWN;
- if (vpi == 0) {
+ if (pseudo_header->atm.vpi == 0) {
/*
* Traffic on some PVCs with a VPI of 0 and certain
* VCIs is of particular types.
*/
- switch (vci) {
+ switch (pseudo_header->atm.vci) {
case 5:
/*
/* atm.h
*
- * $Id: atm.h,v 1.1 2002/04/30 18:58:15 guy Exp $
+ * $Id: atm.h,v 1.2 2002/08/13 03:32:56 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
extern void
atm_guess_traffic_type(const guint8 *pd, guint32 len,
- guint16 vpi, guint16 vci, union wtap_pseudo_header *pseudo_header);
+ union wtap_pseudo_header *pseudo_header);
extern void
atm_guess_lane_type(const guint8 *pd, guint32 len,
/* iptrace.c
*
- * $Id: iptrace.c,v 1.42 2002/07/29 06:09:58 guy Exp $
+ * $Id: iptrace.c,v 1.43 2002/08/13 03:32:56 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
Vci = strtoul(decimal, NULL, 10);
}
- /*
- * Attempt to guess from the packet data, the VPI, and the VCI
- * information about the type of traffic.
- */
- atm_guess_traffic_type(pd, len, Vpi, Vci, pseudo_header);
-
/*
* OK, which value means "DTE->DCE" and which value means
* "DCE->DTE"?
pseudo_header->atm.vpi = Vpi;
pseudo_header->atm.vci = Vci;
+ /*
+ * Attempt to guess from the packet data, the VPI, and the VCI
+ * information about the type of traffic.
+ */
+ atm_guess_traffic_type(pd, len, pseudo_header);
+
/* We don't have this information */
pseudo_header->atm.cells = 0;
pseudo_header->atm.aal5t_u2u = 0;
/* 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>
* 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;
}
* 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;
}