It appears that a channel number of 0 means DTE->DCE, and a channel

number of 1 means DCE->DTE, in DOS Sniffer ATM captures.

svn path=/trunk/; revision=6881
This commit is contained in:
Guy Harris 2003-01-09 01:55:13 +00:00
parent 2b5eab973e
commit a0c5cac89d
5 changed files with 23 additions and 23 deletions

View File

@ -1,7 +1,7 @@
/* packet-atm.c /* packet-atm.c
* Routines for ATM packet disassembly * Routines for ATM packet disassembly
* *
* $Id: packet-atm.c,v 1.52 2003/01/08 23:07:44 guy Exp $ * $Id: packet-atm.c,v 1.53 2003/01/09 01:55:11 guy Exp $
* *
* Ethereal - Network traffic analyzer * Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com> * By Gerald Combs <gerald@ethereal.com>
@ -1139,20 +1139,20 @@ dissect_atm_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
switch (pinfo->pseudo_header->atm.channel) { switch (pinfo->pseudo_header->atm.channel) {
case 0: case 0:
/* Traffic from DCE to DTE. */
if (check_col(pinfo->cinfo, COL_RES_DL_DST))
col_set_str(pinfo->cinfo, COL_RES_DL_DST, "DTE");
if (check_col(pinfo->cinfo, COL_RES_DL_SRC))
col_set_str(pinfo->cinfo, COL_RES_DL_SRC, "DCE");
break;
case 1:
/* Traffic from DTE to DCE. */ /* Traffic from DTE to DCE. */
if (check_col(pinfo->cinfo, COL_RES_DL_DST)) if (check_col(pinfo->cinfo, COL_RES_DL_DST))
col_set_str(pinfo->cinfo, COL_RES_DL_DST, "DCE"); col_set_str(pinfo->cinfo, COL_RES_DL_DST, "DCE");
if (check_col(pinfo->cinfo, COL_RES_DL_SRC)) if (check_col(pinfo->cinfo, COL_RES_DL_SRC))
col_set_str(pinfo->cinfo, COL_RES_DL_SRC, "DTE"); col_set_str(pinfo->cinfo, COL_RES_DL_SRC, "DTE");
break; break;
case 1:
/* Traffic from DCE to DTE. */
if (check_col(pinfo->cinfo, COL_RES_DL_DST))
col_set_str(pinfo->cinfo, COL_RES_DL_DST, "DTE");
if (check_col(pinfo->cinfo, COL_RES_DL_SRC))
col_set_str(pinfo->cinfo, COL_RES_DL_SRC, "DCE");
break;
} }
if (check_col(pinfo->cinfo, COL_INFO)) { if (check_col(pinfo->cinfo, COL_INFO)) {
@ -1174,13 +1174,13 @@ dissect_atm_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
switch (pinfo->pseudo_header->atm.channel) { switch (pinfo->pseudo_header->atm.channel) {
case 0: case 0:
/* Traffic from DCE to DTE. */ /* Traffic from DTE to DCE. */
proto_tree_add_text(atm_tree, tvb, 0, 0, "Channel: DCE->DTE"); proto_tree_add_text(atm_tree, tvb, 0, 0, "Channel: DTE->DCE");
break; break;
case 1: case 1:
/* Traffic from DTE to DCE. */ /* Traffic from DCE to DTE. */
proto_tree_add_text(atm_tree, tvb, 0, 0, "Channel: DTE->DCE"); proto_tree_add_text(atm_tree, tvb, 0, 0, "Channel: DCE->DTE");
break; break;
default: default:

View File

@ -1,6 +1,6 @@
/* libpcap.c /* libpcap.c
* *
* $Id: libpcap.c,v 1.88 2003/01/08 05:03:54 guy Exp $ * $Id: libpcap.c,v 1.89 2003/01/09 01:55:12 guy Exp $
* *
* Wiretap Library * Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu> * Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
@ -1158,7 +1158,7 @@ libpcap_get_atm_pseudoheader(const struct sunatm_hdr *atm_phdr,
pseudo_header->atm.vpi = vpi; pseudo_header->atm.vpi = vpi;
pseudo_header->atm.vci = vci; pseudo_header->atm.vci = vci;
pseudo_header->atm.channel = (atm_phdr->flags & 0x80) ? 1 : 0; pseudo_header->atm.channel = (atm_phdr->flags & 0x80) ? 0 : 1;
/* We don't have this information */ /* We don't have this information */
pseudo_header->atm.cells = 0; pseudo_header->atm.cells = 0;
@ -1476,7 +1476,7 @@ static gboolean libpcap_dump(wtap_dumper *wdh,
* Write the ATM header. * Write the ATM header.
*/ */
atm_hdr.flags = atm_hdr.flags =
(pseudo_header->atm.channel != 0) ? 0x80 : 0x00; (pseudo_header->atm.channel == 0) ? 0x80 : 0x00;
switch (pseudo_header->atm.aal) { switch (pseudo_header->atm.aal) {
case AAL_SIGNALLING: case AAL_SIGNALLING:

View File

@ -1,6 +1,6 @@
/* netxray.c /* netxray.c
* *
* $Id: netxray.c,v 1.72 2003/01/07 07:16:24 guy Exp $ * $Id: netxray.c,v 1.73 2003/01/09 01:55:12 guy Exp $
* *
* Wiretap Library * Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu> * Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
@ -648,7 +648,7 @@ netxray_set_pseudo_header(wtap *wth, const guint8 *pd, int len,
pseudo_header->atm.vpi = hdr->hdr_2_x.xxx[11]; pseudo_header->atm.vpi = hdr->hdr_2_x.xxx[11];
pseudo_header->atm.vci = pletohs(&hdr->hdr_2_x.xxx[12]); pseudo_header->atm.vci = pletohs(&hdr->hdr_2_x.xxx[12]);
pseudo_header->atm.channel = pseudo_header->atm.channel =
(hdr->hdr_2_x.xxx[15] & 0x10)? 0 : 1; (hdr->hdr_2_x.xxx[15] & 0x10)? 1 : 0;
pseudo_header->atm.cells = 0; pseudo_header->atm.cells = 0;
switch (hdr->hdr_2_x.xxx[0] & 0xF0) { switch (hdr->hdr_2_x.xxx[0] & 0xF0) {

View File

@ -1,6 +1,6 @@
/* snoop.c /* snoop.c
* *
* $Id: snoop.c,v 1.59 2003/01/03 06:45:45 guy Exp $ * $Id: snoop.c,v 1.60 2003/01/09 01:55:12 guy Exp $
* *
* Wiretap Library * Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu> * Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
@ -586,7 +586,7 @@ snoop_read_atm_pseudoheader(FILE_T fh, union wtap_pseudo_header *pseudo_header,
pseudo_header->atm.vpi = vpi; pseudo_header->atm.vpi = vpi;
pseudo_header->atm.vci = vci; pseudo_header->atm.vci = vci;
pseudo_header->atm.channel = (atm_phdr.flags & 0x80) ? 1 : 0; pseudo_header->atm.channel = (atm_phdr.flags & 0x80) ? 0 : 1;
/* We don't have this information */ /* We don't have this information */
pseudo_header->atm.cells = 0; pseudo_header->atm.cells = 0;
@ -729,7 +729,7 @@ static gboolean snoop_dump(wtap_dumper *wdh,
* Write the ATM header. * Write the ATM header.
*/ */
atm_hdr.flags = atm_hdr.flags =
(pseudo_header->atm.channel != 0) ? 0x80 : 0x00; (pseudo_header->atm.channel == 0) ? 0x80 : 0x00;
switch (pseudo_header->atm.aal) { switch (pseudo_header->atm.aal) {
case AAL_SIGNALLING: case AAL_SIGNALLING:

View File

@ -1,6 +1,6 @@
/* wtap.h /* wtap.h
* *
* $Id: wtap.h,v 1.130 2003/01/08 05:03:54 guy Exp $ * $Id: wtap.h,v 1.131 2003/01/09 01:55:13 guy Exp $
* *
* Wiretap Library * Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu> * Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
@ -274,7 +274,7 @@ struct atm_phdr {
guint8 subtype; /* traffic subtype */ guint8 subtype; /* traffic subtype */
guint16 vpi; /* virtual path identifier */ guint16 vpi; /* virtual path identifier */
guint16 vci; /* virtual circuit identifier */ guint16 vci; /* virtual circuit identifier */
guint16 channel; /* link: 0 for DCE, 1 for DTE */ guint16 channel; /* link: 0 for DTE->DCE, 1 for DCE->DTE */
guint16 cells; /* number of cells */ guint16 cells; /* number of cells */
guint16 aal5t_u2u; /* user-to-user indicator */ guint16 aal5t_u2u; /* user-to-user indicator */
guint16 aal5t_len; /* length of the packet */ guint16 aal5t_len; /* length of the packet */