diff --git a/packet-atm.c b/packet-atm.c index a037ffd47d..36329559cd 100644 --- a/packet-atm.c +++ b/packet-atm.c @@ -1,7 +1,7 @@ /* packet-atm.c * 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 * By Gerald Combs @@ -1139,20 +1139,20 @@ dissect_atm_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, switch (pinfo->pseudo_header->atm.channel) { 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. */ if (check_col(pinfo->cinfo, COL_RES_DL_DST)) col_set_str(pinfo->cinfo, COL_RES_DL_DST, "DCE"); if (check_col(pinfo->cinfo, COL_RES_DL_SRC)) col_set_str(pinfo->cinfo, COL_RES_DL_SRC, "DTE"); 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)) { @@ -1174,13 +1174,13 @@ dissect_atm_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, switch (pinfo->pseudo_header->atm.channel) { case 0: - /* Traffic from DCE to DTE. */ - proto_tree_add_text(atm_tree, tvb, 0, 0, "Channel: DCE->DTE"); + /* Traffic from DTE to DCE. */ + proto_tree_add_text(atm_tree, tvb, 0, 0, "Channel: DTE->DCE"); break; case 1: - /* Traffic from DTE to DCE. */ - proto_tree_add_text(atm_tree, tvb, 0, 0, "Channel: DTE->DCE"); + /* Traffic from DCE to DTE. */ + proto_tree_add_text(atm_tree, tvb, 0, 0, "Channel: DCE->DTE"); break; default: diff --git a/wiretap/libpcap.c b/wiretap/libpcap.c index 086550a930..59054904fc 100644 --- a/wiretap/libpcap.c +++ b/wiretap/libpcap.c @@ -1,6 +1,6 @@ /* 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 * Copyright (c) 1998 by Gilbert Ramirez @@ -1158,7 +1158,7 @@ libpcap_get_atm_pseudoheader(const struct sunatm_hdr *atm_phdr, pseudo_header->atm.vpi = vpi; 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 */ pseudo_header->atm.cells = 0; @@ -1476,7 +1476,7 @@ static gboolean libpcap_dump(wtap_dumper *wdh, * Write the ATM header. */ atm_hdr.flags = - (pseudo_header->atm.channel != 0) ? 0x80 : 0x00; + (pseudo_header->atm.channel == 0) ? 0x80 : 0x00; switch (pseudo_header->atm.aal) { case AAL_SIGNALLING: diff --git a/wiretap/netxray.c b/wiretap/netxray.c index b00d9468cb..3ee0267dc8 100644 --- a/wiretap/netxray.c +++ b/wiretap/netxray.c @@ -1,6 +1,6 @@ /* 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 * Copyright (c) 1998 by Gilbert Ramirez @@ -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.vci = pletohs(&hdr->hdr_2_x.xxx[12]); 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; switch (hdr->hdr_2_x.xxx[0] & 0xF0) { diff --git a/wiretap/snoop.c b/wiretap/snoop.c index 709ab99355..cac30feba5 100644 --- a/wiretap/snoop.c +++ b/wiretap/snoop.c @@ -1,6 +1,6 @@ /* 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 * Copyright (c) 1998 by Gilbert Ramirez @@ -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.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 */ pseudo_header->atm.cells = 0; @@ -729,7 +729,7 @@ static gboolean snoop_dump(wtap_dumper *wdh, * Write the ATM header. */ atm_hdr.flags = - (pseudo_header->atm.channel != 0) ? 0x80 : 0x00; + (pseudo_header->atm.channel == 0) ? 0x80 : 0x00; switch (pseudo_header->atm.aal) { case AAL_SIGNALLING: diff --git a/wiretap/wtap.h b/wiretap/wtap.h index 5c1a1c0ec6..8aea9d0e68 100644 --- a/wiretap/wtap.h +++ b/wiretap/wtap.h @@ -1,6 +1,6 @@ /* 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 * Copyright (c) 1998 by Gilbert Ramirez @@ -274,7 +274,7 @@ struct atm_phdr { guint8 subtype; /* traffic subtype */ guint16 vpi; /* virtual path 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 aal5t_u2u; /* user-to-user indicator */ guint16 aal5t_len; /* length of the packet */