From Tobias Witek:

This patch extends the ATM parser so as to allow GPRS NS traffic encapsulated
in ATM AAL5.

Additionally, added support for this into the 'Meta' dissector.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6447

svn path=/trunk/; revision=39394
This commit is contained in:
Anders Broman 2011-10-12 18:57:50 +00:00
parent 92e7adcfc9
commit 62ba07a8fc
3 changed files with 20 additions and 6 deletions

View File

@ -74,6 +74,7 @@ static dissector_handle_t ppp_handle;
static dissector_handle_t eth_handle;
static dissector_handle_t ip_handle;
static dissector_handle_t data_handle;
static dissector_handle_t gprs_ns_handle;
static gboolean dissect_lanesscop = FALSE;
@ -726,6 +727,7 @@ static const value_string aal5_hltype_vals[] = {
{ TRAF_FR, "Frame Relay" },
{ TRAF_SPANS, "FORE SPANS" },
{ TRAF_IPSILON, "Ipsilon" },
{ TRAF_GPRS_NS, "GPRS NS" },
{ 0, NULL }
};
@ -1110,6 +1112,10 @@ dissect_reassembled_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
call_dissector(ilmi_handle, next_tvb, pinfo, tree);
break;
case TRAF_GPRS_NS:
call_dissector(gprs_ns_handle, next_tvb, pinfo, tree);
break;
default:
{
gboolean decoded = FALSE;
@ -2007,6 +2013,7 @@ proto_reg_handoff_atm(void)
ip_handle = find_dissector("ip");
data_handle = find_dissector("data");
fp_handle = find_dissector("fp");
gprs_ns_handle = find_dissector("gprs_ns");
atm_handle = create_dissector_handle(dissect_atm, proto_atm);
dissector_add_uint("wtap_encap", WTAP_ENCAP_ATM_PDUS, atm_handle);

View File

@ -139,12 +139,14 @@ static const value_string meta_id_vals[] = {
};
#define META_AAL5PROTO_MTP3 2
#define META_AAL5PROTO_NS 3
#define META_AAL5PROTO_ALCAP 5
#define META_AAL5PROTO_NBAP 6
static const value_string meta_aal5proto_vals[] = {
{ META_AAL5PROTO_MTP3, "SSCOP MTP3" },
{ META_AAL5PROTO_ALCAP, "SSCOP ALCAP" },
{ META_AAL5PROTO_NBAP, "SSCOP NBAP" },
{ META_AAL5PROTO_NS, "GPRS NS" },
{ 0, NULL }
};
@ -330,6 +332,11 @@ static guint16 evaluate_meta_item_dxt(proto_tree *meta_tree, tvbuff_t *tvb, pack
case META_AAL5PROTO_NBAP:
p_sscop_info->subdissector = nbap_handle;
break;
case META_AAL5PROTO_NS:
/* hint for ATM dissector that this frame contains GPRS NS */
memset(&pinfo->pseudo_header->atm, 0, sizeof(pinfo->pseudo_header->atm));
pinfo->pseudo_header->atm.type = TRAF_GPRS_NS;
break;
/* TODO: check for additional protos on Iu 802 LLC/SNAP ... */
default:
/* TODO: add warning */
@ -491,12 +498,11 @@ dissect_meta(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
next_dissector = atm_untrunc_handle;
break;
case META_PROTO_DXT_ERF_AAL5:
/* fake erf pseudo header */
memset(&pinfo->pseudo_header->erf, 0, sizeof(pinfo->pseudo_header->erf));
pinfo->pseudo_header->erf.phdr.type = ERF_TYPE_AAL5;
/* store p2p direction in ERF flags */
pinfo->pseudo_header->erf.phdr.flags |= pinfo->p2p_dir;
next_dissector = erf_handle;
atm_hdr = tvb_get_ntohl(tvb, item_len + META_HEADER_SIZE); item_len += 4;
pinfo->pseudo_header->atm.vpi = ((atm_hdr & 0x0ff00000) >> 20);
pinfo->pseudo_header->atm.vci = ((atm_hdr & 0x000ffff0) >> 4);
pinfo->pseudo_header->atm.aal = AAL_5;
next_dissector = atm_untrunc_handle;
break;
}
}

View File

@ -395,6 +395,7 @@ struct isdn_phdr {
#define TRAF_SPANS 6 /* FORE SPANS */
#define TRAF_IPSILON 7 /* Ipsilon */
#define TRAF_UMTS_FP 8 /* UMTS Frame Protocol */
#define TRAF_GPRS_NS 9 /* GPRS Network Services */
/*
* Traffic subtypes.