From ab8cad28160cef32889abdc498f9c657bb31024f Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Sat, 22 Nov 2014 11:54:54 -0500 Subject: Remove sccp_info member from packet_info structure. sccp_msg_info_t* is now passed from SCCP dissector to its subdissectors through dissector data parameter. Change-Id: Iab4aae58f8995e844f72e02e9f2de36e83589fc0 Reviewed-on: https://code.wireshark.org/review/5442 Reviewed-by: Anders Broman --- epan/dissectors/packet-bssap.c | 179 ++++++++++++++++----------------- epan/dissectors/packet-gsm_a_bssmap.c | 15 ++- epan/dissectors/packet-gsm_a_common.c | 1 - epan/dissectors/packet-gsm_a_common.h | 5 - epan/dissectors/packet-gsm_a_dtap.c | 19 ++-- epan/dissectors/packet-gsm_bssmap_le.c | 16 +-- epan/dissectors/packet-gsm_map.c | 152 ++++++++++++++++++---------- epan/dissectors/packet-ranap.c | 60 ++++++----- epan/dissectors/packet-sccp.c | 18 ++-- epan/dissectors/packet-sua.c | 27 +++-- 10 files changed, 267 insertions(+), 225 deletions(-) (limited to 'epan/dissectors') diff --git a/epan/dissectors/packet-bssap.c b/epan/dissectors/packet-bssap.c index a5961c016b..63dcec5c49 100644 --- a/epan/dissectors/packet-bssap.c +++ b/epan/dissectors/packet-bssap.c @@ -362,7 +362,8 @@ static dissector_handle_t rrlp_handle; static dissector_table_t bssap_dissector_table; static dissector_table_t bsap_dissector_table; -static dissector_handle_t bsap_dissector_handle; +static dissector_handle_t gsm_bssmap_le_dissector_handle; +static dissector_handle_t gsm_a_bssmap_dissector_handle; /* * Keep track of pdu_type so we can call appropriate sub-dissector @@ -375,7 +376,7 @@ static gint gsm_or_lb_interface_global = GSM_OR_LB_INTERFACE_DEFAULT; static void dissect_bssap_data_param(tvbuff_t *tvb, packet_info *pinfo, - proto_tree *bssap_tree, proto_tree *tree) + proto_tree *bssap_tree, proto_tree *tree, struct _sccp_msg_info_t* sccp_info) { if ((pdu_type <= 0x01)) { @@ -384,33 +385,25 @@ dissect_bssap_data_param(tvbuff_t *tvb, packet_info *pinfo, /* BSSAP */ if((gsm_or_lb_interface_global == LB_INTERFACE) && (pdu_type == BSSAP_PDU_TYPE_BSSMAP)) { - bsap_dissector_handle = find_dissector("gsm_bssmap_le"); - - if(bsap_dissector_handle == NULL) return; - - call_dissector(bsap_dissector_handle, tvb, pinfo, tree); + call_dissector_with_data(gsm_bssmap_le_dissector_handle, tvb, pinfo, tree, sccp_info); return; } else if((gsm_or_lb_interface_global == GSM_INTERFACE) && (pdu_type == BSSAP_PDU_TYPE_BSSMAP)) { - bsap_dissector_handle = find_dissector("gsm_a_bssmap"); - - if(bsap_dissector_handle == NULL) return; - - call_dissector(bsap_dissector_handle, tvb, pinfo, tree); + call_dissector_with_data(gsm_a_bssmap_dissector_handle, tvb, pinfo, tree, sccp_info); return; } else { - if (dissector_try_uint(bssap_dissector_table, pdu_type, tvb, pinfo, tree)) return; + if (dissector_try_uint_new(bssap_dissector_table, pdu_type, tvb, pinfo, tree, TRUE, sccp_info)) return; } } else { /* BSAP */ - if (dissector_try_uint(bsap_dissector_table, pdu_type, tvb, pinfo, tree)) + if (dissector_try_uint_new(bsap_dissector_table, pdu_type, tvb, pinfo, tree, TRUE, sccp_info)) return; } } @@ -460,7 +453,7 @@ dissect_bssap_length_param(tvbuff_t *tvb, proto_tree *tree, guint16 length) static guint16 dissect_bssap_parameter(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bssap_tree, proto_tree *tree, guint8 parameter_type, gint offset, - guint16 parameter_length) + guint16 parameter_length, struct _sccp_msg_info_t* sccp_info) { tvbuff_t *parameter_tvb; @@ -477,7 +470,7 @@ dissect_bssap_parameter(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bssap_tre break; case PARAMETER_DATA: - dissect_bssap_data_param(parameter_tvb, pinfo, bssap_tree, tree); + dissect_bssap_data_param(parameter_tvb, pinfo, bssap_tree, tree, sccp_info); break; default: @@ -492,7 +485,7 @@ dissect_bssap_parameter(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bssap_tre static guint16 dissect_bssap_var_parameter(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bssap_tree, proto_tree *tree, - guint8 parameter_type, gint offset) + guint8 parameter_type, gint offset, struct _sccp_msg_info_t* sccp_info) { guint16 parameter_length; guint8 length_length; @@ -503,14 +496,14 @@ dissect_bssap_var_parameter(tvbuff_t *tvb, packet_info *pinfo, offset += length_length; dissect_bssap_parameter(tvb, pinfo, bssap_tree, tree, parameter_type, - offset, parameter_length); + offset, parameter_length, sccp_info); return(parameter_length + length_length); } static int dissect_bssap_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bssap_tree, - proto_tree *tree) + proto_tree *tree, struct _sccp_msg_info_t* sccp_info) { gint offset; proto_item* type_item; @@ -535,22 +528,22 @@ dissect_bssap_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bssap_tree, case BSSAP_PDU_TYPE_BSSMAP: offset += dissect_bssap_parameter(tvb, pinfo, bssap_tree, tree, PARAMETER_LENGTH, offset, - LENGTH_LENGTH); + LENGTH_LENGTH, sccp_info); offset += dissect_bssap_var_parameter(tvb, pinfo, bssap_tree, tree, PARAMETER_DATA, - (offset - LENGTH_LENGTH)); + (offset - LENGTH_LENGTH), sccp_info); break; case BSSAP_PDU_TYPE_DTAP: offset += dissect_bssap_parameter(tvb, pinfo, bssap_tree, tree, PARAMETER_DLCI, - offset, DLCI_LENGTH); + offset, DLCI_LENGTH, sccp_info); offset += dissect_bssap_parameter(tvb, pinfo, bssap_tree, tree, PARAMETER_LENGTH, offset, - LENGTH_LENGTH); + LENGTH_LENGTH, sccp_info); offset += dissect_bssap_var_parameter(tvb, pinfo, bssap_tree, tree, PARAMETER_DATA, - (offset - LENGTH_LENGTH)); + (offset - LENGTH_LENGTH), sccp_info); break; default: @@ -573,19 +566,20 @@ dissect_bssap_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bssap_tree, return offset; } -static void -dissect_bssap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_bssap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) { proto_item *bssap_item; proto_tree *bssap_tree; + struct _sccp_msg_info_t* sccp_info = (struct _sccp_msg_info_t*)data; /* * Make entry in the Protocol column on summary display */ col_set_str(pinfo->cinfo, COL_PROTOCOL, ((bssap_or_bsap_global == BSSAP) ? "BSSAP" : "BSAP")); - if (pinfo->sccp_info && pinfo->sccp_info->data.co.assoc ) - pinfo->sccp_info->data.co.assoc->payload = SCCP_PLOAD_BSSAP; + if (sccp_info && sccp_info->data.co.assoc ) + sccp_info->data.co.assoc->payload = SCCP_PLOAD_BSSAP; /* * create the bssap protocol tree @@ -596,7 +590,7 @@ dissect_bssap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* dissect the message */ - dissect_bssap_message(tvb, pinfo, bssap_tree, tree); + return dissect_bssap_message(tvb, pinfo, bssap_tree, tree, sccp_info); } @@ -1568,20 +1562,21 @@ dissect_bssap_global_cn_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, } -static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) { proto_item *bssap_item; proto_tree *bssap_tree; guint8 message_type; int offset = 0; + struct _sccp_msg_info_t* sccp_info = (struct _sccp_msg_info_t*)data; /* * Make entry in the Protocol column on summary display */ col_set_str(pinfo->cinfo, COL_PROTOCOL, "BSSAP+"); - if (pinfo->sccp_info && pinfo->sccp_info->data.co.assoc) - pinfo->sccp_info->data.co.assoc->payload = SCCP_PLOAD_BSSAP; + if (sccp_info && sccp_info->data.co.assoc) + sccp_info->data.co.assoc->payload = SCCP_PLOAD_BSSAP; /* create the BSSAP+ protocol tree */ bssap_item = proto_tree_add_item(tree, proto_bssap, tvb, 0, -1, ENC_NA); @@ -1605,37 +1600,37 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr /* End of mandatory elements */ if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); /* TMSI TMSI 18.4.23 O TLV 6 */ if (check_optional_ie(tvb, offset, BSSAP_TMSI)) offset = dissect_bssap_tmsi(tvb, bssap_tree, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); /* Location area identifier Location area identifier 18.4.14 O TLV 7 */ if (check_optional_ie(tvb, offset, BSSAP_LOC_AREA_ID)) offset = dissect_bssap_loc_area_id(tvb, bssap_tree, pinfo, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); /* Channel needed Channel needed 18.4.2 O TLV 3 */ if (check_optional_ie(tvb, offset, BSSAP_CHANNEL_NEEDED)) offset = dissect_bssap_channel_needed(tvb, bssap_tree, pinfo, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); /* eMLPP Priority eMLPP Priority 18.4.4 O TLV 3 */ if (check_optional_ie(tvb, offset, BSSAP_EMLPP_PRIORITY)) offset = dissect_bssap_emlpp_priority(tvb, bssap_tree, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); /* Global CN-Id Global CN-Id 18.4.27 O TLV 7 */ if (check_optional_ie(tvb, offset, BSSAP_GLOBAL_CN_ID)) offset = dissect_bssap_global_cn_id(tvb, pinfo, bssap_tree, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA); break; @@ -1648,7 +1643,7 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr offset = dissect_bssap_Gs_cause(tvb, bssap_tree, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA); break; case BSSAP_DOWNLINK_TUNNEL_REQUEST: /* 17.1.4 */ @@ -1665,7 +1660,7 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr offset = dissect_bssap_dlink_tunnel_payload_control_and_info(tvb, pinfo, bssap_tree, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA); break; case BSSAP_UPLINK_TUNNEL_REQUEST: /* 17.1.23 */ @@ -1678,7 +1673,7 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr offset = dissect_bssap_ulink_tunnel_payload_control_and_info(tvb, pinfo, bssap_tree, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA); break; case BSSAP_LOCATION_UPDATE_REQUEST: /* 17.1.11 BSSAP+-LOCATION-UPDATE-REQUEST */ @@ -1702,31 +1697,31 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr if (check_ie(tvb, pinfo, tree, &offset, BSSAP_MOBILE_STN_CLS_MRK1)) offset = dissect_bssap_mobile_stn_cls_mrk1(tvb, bssap_tree, pinfo, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); /* Old location area identifier Location area identifier 18.4.14 O TLV 7 */ if (check_optional_ie(tvb, offset, BSSAP_LOC_AREA_ID)) offset = dissect_bssap_loc_area_id(tvb, bssap_tree, pinfo, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); /* TMSI status TMSI status 18.4.24 O TLV 3 */ if (check_optional_ie(tvb, offset, BSSAP_TMSI_STATUS)) offset = dissect_bssap_tmsi_status(tvb, bssap_tree, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); /* New service area identification Service area identification 18.4.21b O TLV 9 */ if (check_optional_ie(tvb, offset, BSSAP_SERVICE_AREA_ID)) offset = dissect_bssap_service_area_id(tvb, bssap_tree, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); /* IMEISV IMEISV 18.4.9 O TLV 10 */ if (check_optional_ie(tvb, offset, BSSAP_IMEISV)) offset = dissect_bssap_imesiv(tvb, bssap_tree, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA); break; case BSSAP_LOCATION_UPDATE_ACCEPT: /* 17.1.9 */ @@ -1739,13 +1734,13 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr offset = dissect_bssap_loc_area_id(tvb, bssap_tree, pinfo, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); /* New TMSI, or IMSI Mobile identity 18.4.17 O TLV 6-10 */ if (check_optional_ie(tvb, offset, BSSAP_MOBILE_ID)) offset = dissect_bssap_mobile_id(tvb, bssap_tree, pinfo, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA); break; case BSSAP_LOCATION_UPDATE_REJECT: /* 17.1.10 */ @@ -1756,7 +1751,7 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr if (check_ie(tvb, pinfo, tree, &offset, BSSAP_REJECT_CAUSE)) offset = dissect_bssap_reject_cause(tvb, bssap_tree, pinfo, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA); break; case BSSAP_TMSI_REALLOCATION_COMPLETE: /* 17.1.22 */ @@ -1765,20 +1760,20 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr offset = dissect_bssap_imsi(tvb, bssap_tree, pinfo, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); /* Cell global identity Cell global identity 18.4.1 O TLV 10 */ if (check_optional_ie(tvb, offset, BSSAP_CELL_GBL_ID)) offset = dissect_bssap_cell_global_id(tvb, bssap_tree, pinfo, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); /* Service area identification Service area identification 18.4.21b O TLV 9 */ if (check_optional_ie(tvb, offset, BSSAP_SERVICE_AREA_ID)) offset = dissect_bssap_service_area_id(tvb, bssap_tree, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA); break; case BSSAP_ALERT_REQUEST: /* 17.1.3 */ @@ -1787,7 +1782,7 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr offset = dissect_bssap_imsi(tvb, bssap_tree, pinfo, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA); break; case BSSAP_ALERT_ACK: /* 17.1.1 */ @@ -1796,7 +1791,7 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr offset = dissect_bssap_imsi(tvb, bssap_tree, pinfo, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA); break; case BSSAP_ALERT_REJECT: /* 17.1.2 */ @@ -1809,7 +1804,7 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr offset = dissect_bssap_Gs_cause(tvb, bssap_tree, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA); break; case BSSAP_MS_ACTIVITY_INDICATION: /* 17.1.14 */ @@ -1818,20 +1813,20 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr offset = dissect_bssap_imsi(tvb, bssap_tree, pinfo, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); /* Cell global identity Cell global identity 18.4.1 O TLV 10 */ if (check_optional_ie(tvb, offset, BSSAP_CELL_GBL_ID)) offset = dissect_bssap_cell_global_id(tvb, bssap_tree, pinfo, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); /* Service area identification Service area identification 18.4.21b O TLV 9 */ if (check_optional_ie(tvb, offset, BSSAP_SERVICE_AREA_ID)) offset = dissect_bssap_service_area_id(tvb, bssap_tree, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA); break; case BSSAP_GPRS_DETACH_INDICATION: /* 17.1.6 */ @@ -1848,20 +1843,20 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr offset = dissect_bssap_imsi_det_from_gprs_serv_type(tvb, bssap_tree, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); /* Cell global identity Cell global identity 18.4.1 O TLV 10 */ if (check_optional_ie(tvb, offset, BSSAP_CELL_GBL_ID)) offset = dissect_bssap_cell_global_id(tvb, bssap_tree, pinfo, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); /* Service area identification Service area identification 18.4.21b O TLV 9 */ if (check_optional_ie(tvb, offset, BSSAP_SERVICE_AREA_ID)) offset = dissect_bssap_service_area_id(tvb, bssap_tree, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA); break; case BSSAP_GPRS_DETACH_ACK: /* 17.1.5 */ @@ -1870,7 +1865,7 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr offset = dissect_bssap_imsi(tvb, bssap_tree, pinfo, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA); break; case BSSAP_IMSI_DETACH_INDICATION: /* 17.1.8 */ @@ -1887,27 +1882,27 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr offset = dissect_bssap_imsi_det_from_non_gprs_serv_type(tvb, bssap_tree, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); /* Cell global identity Cell global identity 18.4.1 O TLV 10 */ if (check_optional_ie(tvb, offset, BSSAP_CELL_GBL_ID)) offset = dissect_bssap_cell_global_id(tvb, bssap_tree, pinfo, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); /* Location information age Location information age 18.4.14 O TLV 4 */ if (check_optional_ie(tvb, offset, BSSAP_LOC_INF_AGE)) offset = dissect_bssap_location_information_age(tvb, bssap_tree, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); /* Service area identification Service area identification 18.4.21b O TLV 9 */ if (check_optional_ie(tvb, offset, BSSAP_SERVICE_AREA_ID)) offset = dissect_bssap_service_area_id(tvb, bssap_tree, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA); break; case BSSAP_IMSI_DETACH_ACK: /* 17.1.7 */ @@ -1916,7 +1911,7 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr offset = dissect_bssap_imsi(tvb, bssap_tree, pinfo, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA); break; case BSSAP_RESET_INDICATION: /* 17.1.21 */ @@ -1925,14 +1920,14 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr if (check_optional_ie(tvb, offset, BSSAP_SGSN_NUMBER)) { offset = dissect_bssap_sgsn_number(tvb, bssap_tree, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA); }else{ /* VLR number VLR number 18.4.26 C TLV 5-11 */ if (check_optional_ie(tvb, offset, BSSAP_VLR_NUMBER)) { offset = dissect_bssap_vlr_number(tvb, bssap_tree, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA); } } @@ -1944,14 +1939,14 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr if (check_optional_ie(tvb, offset, BSSAP_SGSN_NUMBER)) { offset = dissect_bssap_sgsn_number(tvb, bssap_tree, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA); }else{ /* VLR number VLR number 18.4.26 C TLV 5-11 */ if (check_optional_ie(tvb, offset, BSSAP_VLR_NUMBER)) { offset = dissect_bssap_vlr_number(tvb, bssap_tree, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA); } } @@ -1967,7 +1962,7 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr offset = dissect_bssap_info_req(tvb, bssap_tree, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA); break; @@ -1976,56 +1971,56 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr if (check_ie(tvb, pinfo, tree, &offset, BSSAP_IMSI)) offset = dissect_bssap_imsi(tvb, bssap_tree, pinfo, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); /* TMSI TMSI 18.4.23 O TLV 6 */ if (check_optional_ie(tvb, offset, BSSAP_TMSI)) offset = dissect_bssap_tmsi(tvb, bssap_tree, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); /* PTMSI PTMSI 18.4.20 O TLV 6 BSSAP_PTMSI*/ if (check_optional_ie(tvb, offset, BSSAP_PTMSI)) offset = dissect_bssap_ptmsi(tvb, bssap_tree, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); /* IMEI IMEI 18.4.8 O TLV 10 */ if (check_optional_ie(tvb, offset, BSSAP_IMEI)) offset = dissect_bssap_imei(tvb, bssap_tree, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); /* IMEISV IMEISV 18.4.9 O TLV 10 BSSAP_IMEISV*/ if (check_optional_ie(tvb, offset, BSSAP_IMEISV)) offset = dissect_bssap_imesiv(tvb, bssap_tree, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); /* Cell global identity Cell global identity 18.4.1 O TLV 10 */ if (check_optional_ie(tvb, offset, BSSAP_CELL_GBL_ID)) offset = dissect_bssap_cell_global_id(tvb, bssap_tree, pinfo, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); /* Location information age Location information age 18.4.15 O TLV 4 */ if (check_optional_ie(tvb, offset, BSSAP_LOC_INF_AGE)) offset = dissect_bssap_location_information_age(tvb, bssap_tree, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); /* Mobile station state Mobile station state 18.4.19 O TLV 3 */ if (check_optional_ie(tvb, offset, BSSAP_MOBILE_STN_STATE)) offset = dissect_bssap_mobile_station_state(tvb, bssap_tree, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); /* Service area identification Service area identification 18.4.21b O TLV 9 */ if (check_optional_ie(tvb, offset, BSSAP_SERVICE_AREA_ID)) offset = dissect_bssap_service_area_id(tvb, bssap_tree, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA); break; case BSSAP_MM_INFORMATION_REQUEST: /* 17.1.12 */ @@ -2034,12 +2029,12 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr offset = dissect_bssap_imsi(tvb, bssap_tree, pinfo, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); /* MM information MM information 18.4.16 O TLV 3-n */ if (check_optional_ie(tvb, offset, BSSAP_MM_INFORMATION)) offset = dissect_bssap_MM_information(tvb, bssap_tree, pinfo, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA); break; case BSSAP_MOBILE_STATUS: /* 17.1.13 */ @@ -2055,7 +2050,7 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr offset = dissect_bssap_gprs_erroneous_msg(tvb, bssap_tree, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA); break; case BSSAP_MS_UNREACHABLE: /* 17.1.17 */ @@ -2068,16 +2063,18 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr offset = dissect_bssap_Gs_cause(tvb, bssap_tree, offset); if (tvb_reported_length_remaining(tvb, offset) <= 0) - return; + return tvb_reported_length(tvb); proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA); break; default: break; } + + return tvb_reported_length(tvb); } static gboolean -dissect_bssap_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) +dissect_bssap_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) { /* Is it a BSSAP/BSAP packet? * If octet_1 == 0x00 and octet_2 == length(tvb) - 2 @@ -2108,7 +2105,7 @@ dissect_bssap_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da return(FALSE); } - dissect_bssap(tvb, pinfo, tree); + dissect_bssap(tvb, pinfo, tree, data); return(TRUE); } @@ -2520,8 +2517,8 @@ proto_register_bssap(void) proto_bssap = proto_register_protocol("BSSAP/BSAP", "BSSAP", "bssap"); proto_bssap_plus = proto_register_protocol("BSSAP2", "BSSAP2", "bssap_plus"); - register_dissector("bssap", dissect_bssap, proto_bssap); - register_dissector("bssap_plus", dissect_bssap_plus, proto_bssap_plus); + new_register_dissector("bssap", dissect_bssap, proto_bssap); + new_register_dissector("bssap_plus", dissect_bssap_plus, proto_bssap_plus); /* Required function calls to register the header fields and subtrees used */ proto_register_field_array(proto_bssap, hf, array_length(hf)); @@ -2568,10 +2565,12 @@ proto_reg_handoff_bssap(void) heur_dissector_add("sccp", dissect_bssap_heur, proto_bssap); heur_dissector_add("sua", dissect_bssap_heur, proto_bssap); /* BSSAP+ */ - bssap_plus_handle = create_dissector_handle(dissect_bssap_plus, proto_bssap); + bssap_plus_handle = new_create_dissector_handle(dissect_bssap_plus, proto_bssap); data_handle = find_dissector("data"); rrlp_handle = find_dissector("rrlp"); + gsm_bssmap_le_dissector_handle = find_dissector("gsm_bssmap_le"); + gsm_a_bssmap_dissector_handle = find_dissector("gsm_a_bssmap"); initialized = TRUE; } else { dissector_delete_uint("sccp.ssn", old_bssap_ssn, bssap_plus_handle); diff --git a/epan/dissectors/packet-gsm_a_bssmap.c b/epan/dissectors/packet-gsm_a_bssmap.c index ed38b95df3..f2d3397b4e 100644 --- a/epan/dissectors/packet-gsm_a_bssmap.c +++ b/epan/dissectors/packet-gsm_a_bssmap.c @@ -7056,8 +7056,8 @@ static void (*bssmap_msg_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pi }; #define NUM_BSSMAP_MSG_FCNS (int)(sizeof(bssmap_msg_fcn)/sizeof(bssmap_msg_fcn[0])) -void -dissect_bssmap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +int +dissect_bssmap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) { static gsm_a_tap_rec_t tap_rec[4]; static gsm_a_tap_rec_t *tap_p; @@ -7069,9 +7069,7 @@ dissect_bssmap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_item *bssmap_item = NULL; proto_tree *bssmap_tree = NULL; const gchar *str; - sccp_msg_info_t* sccp_msg_p; - - sccp_msg_p = pinfo->sccp_info; + sccp_msg_info_t* sccp_msg_p = (sccp_msg_info_t*)data; if (!(sccp_msg_p && sccp_msg_p->data.co.assoc)) { sccp_msg_p = NULL; @@ -7150,9 +7148,9 @@ dissect_bssmap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tap_queue_packet(gsm_a_tap, pinfo, tap_p); - if (str == NULL) return; + if (str == NULL) return len; - if ((len - offset) <= 0) return; + if ((len - offset) <= 0) return len; /* * decode elements @@ -7172,6 +7170,7 @@ dissect_bssmap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } } g_tree = NULL; + return len; } /* Register the protocol with Wireshark */ @@ -7989,7 +7988,7 @@ proto_register_gsm_a_bssmap(void) expert_gsm_a_bssmap = expert_register_protocol(proto_a_bssmap); expert_register_field_array(expert_gsm_a_bssmap, ei, array_length(ei)); - register_dissector("gsm_a_bssmap", dissect_bssmap, proto_a_bssmap); + new_register_dissector("gsm_a_bssmap", dissect_bssmap, proto_a_bssmap); } diff --git a/epan/dissectors/packet-gsm_a_common.c b/epan/dissectors/packet-gsm_a_common.c index ff8ece0aad..d73720d2cc 100644 --- a/epan/dissectors/packet-gsm_a_common.c +++ b/epan/dissectors/packet-gsm_a_common.c @@ -737,7 +737,6 @@ static expert_field ei_gsm_a_unknown_element = EI_INIT; static char a_bigbuf[1024]; -sccp_msg_info_t* sccp_msg; sccp_assoc_info_t* sccp_assoc; #define NUM_GSM_COMMON_ELEM (sizeof(gsm_common_elem_strings)/sizeof(value_string)) diff --git a/epan/dissectors/packet-gsm_a_common.h b/epan/dissectors/packet-gsm_a_common.h index d320f5246c..42a62a8e9c 100644 --- a/epan/dissectors/packet-gsm_a_common.h +++ b/epan/dissectors/packet-gsm_a_common.h @@ -151,7 +151,6 @@ extern value_string_ext gmr1_ie_rr_strings_ext; extern elem_fcn gmr1_ie_rr_func[]; extern gint ett_gmr1_ie_rr[]; -extern sccp_msg_info_t* sccp_msg; extern sccp_assoc_info_t* sccp_assoc; extern int gsm_a_tap; @@ -635,10 +634,6 @@ typedef struct _gsm_a_tap_rec_t { gsm_a_pd_str_e protocol_disc; } gsm_a_tap_rec_t; -void dissect_bssmap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); - -void dissect_bssmap_le(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); - void bssmap_old_bss_to_new_bss_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo); void bssmap_new_bss_to_old_bss_info(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo); diff --git a/epan/dissectors/packet-gsm_a_dtap.c b/epan/dissectors/packet-gsm_a_dtap.c index 93ded877ca..91861a4a0f 100644 --- a/epan/dissectors/packet-gsm_a_dtap.c +++ b/epan/dissectors/packet-gsm_a_dtap.c @@ -5805,8 +5805,8 @@ static void (*dtap_msg_tp_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *p /* GENERIC DISSECTOR FUNCTIONS */ -static void -dissect_dtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_dtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) { static gsm_a_tap_rec_t tap_rec[4]; static gsm_a_tap_rec_t *tap_p; @@ -5829,6 +5829,7 @@ dissect_dtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) gint ti; int hf_idx; gboolean nsd; + sccp_msg_info_t* sccp_msg = (sccp_msg_info_t*)data; len = tvb_reported_length(tvb); @@ -5839,7 +5840,7 @@ dissect_dtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) * too short to be DTAP */ call_dissector(data_handle, tvb, pinfo, tree); - return; + return len; } col_append_str(pinfo->cinfo, COL_INFO, "(DTAP) "); @@ -5964,11 +5965,9 @@ dissect_dtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) default: /* XXX - hf_idx is still -1! this is a bug in the implementation, and I don't know how to fix it so simple return here */ - return; + return len; } - sccp_msg = pinfo->sccp_info; - if (sccp_msg && sccp_msg->data.co.assoc) { sccp_assoc = sccp_msg->data.co.assoc; } @@ -6077,9 +6076,9 @@ dissect_dtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tap_queue_packet(gsm_a_tap, pinfo, tap_p); - if (msg_str == NULL) return; + if (msg_str == NULL) return len; - if (offset >= len) return; + if (offset >= len) return len; /* * decode elements @@ -6094,6 +6093,8 @@ dissect_dtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { (*dtap_msg_fcn)(tvb, dtap_tree, pinfo, offset, len - offset); } + + return len; } @@ -7141,7 +7142,7 @@ proto_register_gsm_a_dtap(void) /* subdissector code */ - register_dissector("gsm_a_dtap", dissect_dtap, proto_a_dtap); + new_register_dissector("gsm_a_dtap", dissect_dtap, proto_a_dtap); } void diff --git a/epan/dissectors/packet-gsm_bssmap_le.c b/epan/dissectors/packet-gsm_bssmap_le.c index 81b5cdd612..23db7d1918 100644 --- a/epan/dissectors/packet-gsm_bssmap_le.c +++ b/epan/dissectors/packet-gsm_bssmap_le.c @@ -905,8 +905,8 @@ static void (*bssmap_le_msg_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info NULL, /* NONE */ }; -void -dissect_bssmap_le(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +int +dissect_bssmap_le(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) { static gsm_a_tap_rec_t tap_rec[4]; static gsm_a_tap_rec_t *tap_p; @@ -918,9 +918,7 @@ dissect_bssmap_le(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_item *bssmap_le_item = NULL; proto_tree *bssmap_le_tree = NULL; const gchar *str; - sccp_msg_info_t *sccp_msg_p; - - sccp_msg_p = pinfo->sccp_info; + sccp_msg_info_t *sccp_msg_p = (sccp_msg_info_t *)data; if (!(sccp_msg_p && sccp_msg_p->data.co.assoc)) { sccp_msg_p = NULL; @@ -994,9 +992,9 @@ dissect_bssmap_le(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tap_queue_packet(gsm_a_tap, pinfo, tap_p); - if (str == NULL) return; + if (str == NULL) return len; - if (offset >= len) return; + if (offset >= len) return len; /* * decode elements @@ -1009,6 +1007,8 @@ dissect_bssmap_le(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { (*bssmap_le_msg_fcn[idx])(tvb, bssmap_le_tree, pinfo, offset, len - offset); } + + return len; } /* Register the protocol with Wireshark */ @@ -1214,7 +1214,7 @@ proto_register_gsm_bssmap_le(void) expert_gsm_a_bssmap_le = expert_register_protocol(proto_bssmap_le); expert_register_field_array(expert_gsm_a_bssmap_le, ei, array_length(ei)); - register_dissector("gsm_bssmap_le", dissect_bssmap_le, proto_bssmap_le); + new_register_dissector("gsm_bssmap_le", dissect_bssmap_le, proto_bssmap_le); } void diff --git a/epan/dissectors/packet-gsm_map.c b/epan/dissectors/packet-gsm_map.c index 97e8fa8a7e..cfbb5a230b 100644 --- a/epan/dissectors/packet-gsm_map.c +++ b/epan/dissectors/packet-gsm_map.c @@ -2613,6 +2613,7 @@ static dissector_handle_t data_handle; static dissector_handle_t ranap_handle; static dissector_handle_t dtap_handle; static dissector_handle_t map_handle; +static dissector_handle_t bssap_handle; static dissector_table_t map_prop_arg_opcode_table; /* prorietary operation codes */ static dissector_table_t map_prop_res_opcode_table; /* prorietary operation codes */ static dissector_table_t map_prop_err_opcode_table; /* prorietary operation codes */ @@ -3546,7 +3547,7 @@ dissect_gsm_map_ProtocolId(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int off static int dissect_gsm_map_SignalInfo(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 377 "../../asn1/gsm_map/gsm_map.cnf" +#line 378 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, @@ -3570,7 +3571,7 @@ static const ber_sequence_t gsm_map_ExternalSignalInfo_sequence[] = { int dissect_gsm_map_ExternalSignalInfo(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 801 "../../asn1/gsm_map/gsm_map.cnf" +#line 804 "../../asn1/gsm_map/gsm_map.cnf" /* -- Information about the internal structure is given in -- clause 7.6.9. @@ -3625,7 +3626,8 @@ if (!actx->value_ptr) /* Strip off discrimination and length */ proto_tree_add_item(subtree, hf_gsm_map_len, (tvbuff_t*)actx->value_ptr, 1,1,ENC_BIG_ENDIAN); next_tvb = tvb_new_subset_remaining((tvbuff_t*)actx->value_ptr, 2); - dissect_bssmap(next_tvb, actx->pinfo, subtree); + call_dissector_with_data(bssap_handle, next_tvb, actx->pinfo, subtree, + p_get_proto_data(actx->pinfo->pool, actx->pinfo, proto_gsm_map, actx->pinfo->curr_layer_num)); }else if(octet==1){ proto_tree_add_item(subtree, hf_gsm_map_dlci, (tvbuff_t*)actx->value_ptr, 1,1,ENC_BIG_ENDIAN); proto_tree_add_item(subtree, hf_gsm_map_len, (tvbuff_t*)actx->value_ptr, 2,1,ENC_BIG_ENDIAN); @@ -3638,7 +3640,8 @@ if (!actx->value_ptr) octet = tvb_get_guint8((tvbuff_t*)actx->value_ptr,0); if ( octet == 0) {/* DISCRIMINATION TS 48 006 */ next_tvb = tvb_new_subset_remaining((tvbuff_t*)actx->value_ptr, 2); - dissect_bssmap(next_tvb, actx->pinfo, subtree); + call_dissector_with_data(bssap_handle, next_tvb, actx->pinfo, subtree, + p_get_proto_data(actx->pinfo->pool, actx->pinfo, proto_gsm_map, actx->pinfo->curr_layer_num)); } break; /* ets-300102-1 (~Q.931 ) */ @@ -3735,7 +3738,8 @@ dissect_gsm_map_LongSignalInfo(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int /* Strip off discrimination and length */ proto_tree_add_item(subtree, hf_gsm_map_len, parameter_tvb, 1,1,ENC_BIG_ENDIAN); next_tvb = tvb_new_subset_remaining(parameter_tvb, 2); - dissect_bssmap(next_tvb, actx->pinfo, subtree); + call_dissector_with_data(bssap_handle, next_tvb, actx->pinfo, subtree, + p_get_proto_data(actx->pinfo->pool, actx->pinfo, proto_gsm_map, actx->pinfo->curr_layer_num)); }else if(octet==1){ proto_tree_add_item(subtree, hf_gsm_map_dlci, parameter_tvb, 1,1,ENC_BIG_ENDIAN); proto_tree_add_item(subtree, hf_gsm_map_len, parameter_tvb, 2,1,ENC_BIG_ENDIAN); @@ -3786,7 +3790,7 @@ dissect_gsm_map_AlertingPattern(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, in int dissect_gsm_map_GSN_Address(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 626 "../../asn1/gsm_map/gsm_map.cnf" +#line 627 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; guint8 octet; @@ -3952,7 +3956,7 @@ dissect_gsm_map_HLR_List(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offse int dissect_gsm_map_GlobalCellId(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 881 "../../asn1/gsm_map/gsm_map.cnf" +#line 886 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; proto_tree *subtree; @@ -4229,7 +4233,7 @@ dissect_gsm_map_TA_Id(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _ int dissect_gsm_map_RAIdentity(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 650 "../../asn1/gsm_map/gsm_map.cnf" +#line 651 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; proto_tree *subtree; @@ -4277,7 +4281,7 @@ dissect_gsm_map_CellGlobalIdOrServiceAreaIdFixedLength(gboolean implicit_tag _U_ int dissect_gsm_map_LAIFixedLength(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 662 "../../asn1/gsm_map/gsm_map.cnf" +#line 663 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; proto_tree *subtree; @@ -4403,7 +4407,7 @@ dissect_gsm_map_EMLPP_Info(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int off static int dissect_gsm_map_Ext_SS_Status(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 504 "../../asn1/gsm_map/gsm_map.cnf" +#line 505 "../../asn1/gsm_map/gsm_map.cnf" /* Note Ext-SS-Status can have more than one byte */ tvbuff_t *parameter_tvb; @@ -4536,7 +4540,7 @@ dissect_gsm_map_ss_RegisterSS_Arg(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int dissect_gsm_map_ss_SS_Status(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 484 "../../asn1/gsm_map/gsm_map.cnf" +#line 485 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; guint8 octet; @@ -4570,7 +4574,7 @@ dissect_gsm_map_ss_ForwardingOptions(gboolean implicit_tag _U_, tvbuff_t *tvb _U offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, NULL); -#line 569 "../../asn1/gsm_map/gsm_map.cnf" +#line 570 "../../asn1/gsm_map/gsm_map.cnf" proto_tree_add_item(tree, hf_gsm_map_notification_to_forwarding_party, tvb, 0,1,ENC_BIG_ENDIAN); proto_tree_add_item(tree, hf_gsm_map_redirecting_presentation, tvb, 0,1,ENC_BIG_ENDIAN); @@ -4889,7 +4893,7 @@ dissect_gsm_map_ss_InterrogateSS_Res(gboolean implicit_tag _U_, tvbuff_t *tvb _U int dissect_gsm_map_ss_USSD_DataCodingScheme(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 527 "../../asn1/gsm_map/gsm_map.cnf" +#line 528 "../../asn1/gsm_map/gsm_map.cnf" /*The structure of the USSD-DataCodingScheme is defined by * the Cell Broadcast Data Coding Scheme as described in * TS 3GPP TS 23.038 @@ -4915,7 +4919,7 @@ dissect_gsm_map_ss_USSD_DataCodingScheme(gboolean implicit_tag _U_, tvbuff_t *tv int dissect_gsm_map_ss_USSD_String(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 542 "../../asn1/gsm_map/gsm_map.cnf" +#line 543 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; guint length; @@ -5364,7 +5368,7 @@ static const ber_sequence_t gsm_map_er_SM_DeliveryFailureCause_sequence[] = { static int dissect_gsm_map_er_SM_DeliveryFailureCause(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 384 "../../asn1/gsm_map/gsm_map.cnf" +#line 385 "../../asn1/gsm_map/gsm_map.cnf" /* dissect_gsm_map_SignalInfo will return parameter_tvb in actx */ guint8 oct; offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, @@ -6295,7 +6299,7 @@ dissect_gsm_map_sm_RoutingInfoForSM_Res(gboolean implicit_tag _U_, tvbuff_t *tvb static int dissect_gsm_map_sm_T_imsi(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 353 "../../asn1/gsm_map/gsm_map.cnf" +#line 354 "../../asn1/gsm_map/gsm_map.cnf" actx->pinfo->p2p_dir = P2P_DIR_SENT; offset = dissect_gsm_map_IMSI(implicit_tag, tvb, offset, actx, tree, hf_index); @@ -6309,7 +6313,7 @@ dissect_gsm_map_sm_T_imsi(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offs static int dissect_gsm_map_sm_T_lmsi(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 357 "../../asn1/gsm_map/gsm_map.cnf" +#line 358 "../../asn1/gsm_map/gsm_map.cnf" actx->pinfo->p2p_dir = P2P_DIR_SENT; offset = dissect_gsm_map_LMSI(implicit_tag, tvb, offset, actx, tree, hf_index); @@ -6323,7 +6327,7 @@ dissect_gsm_map_sm_T_lmsi(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offs static int dissect_gsm_map_sm_T_serviceCentreAddressDA(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 373 "../../asn1/gsm_map/gsm_map.cnf" +#line 374 "../../asn1/gsm_map/gsm_map.cnf" actx->pinfo->p2p_dir = P2P_DIR_RECV; offset = dissect_gsm_map_AddressString(implicit_tag, tvb, offset, actx, tree, hf_index); @@ -6363,7 +6367,7 @@ dissect_gsm_map_sm_SM_RP_DA(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int of static int dissect_gsm_map_sm_T_msisdn(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 365 "../../asn1/gsm_map/gsm_map.cnf" +#line 366 "../../asn1/gsm_map/gsm_map.cnf" actx->pinfo->p2p_dir = P2P_DIR_RECV; offset = dissect_gsm_map_ISDN_AddressString(implicit_tag, tvb, offset, actx, tree, hf_index); @@ -6377,7 +6381,7 @@ actx->pinfo->p2p_dir = P2P_DIR_RECV; static int dissect_gsm_map_sm_T_serviceCentreAddressOA(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 341 "../../asn1/gsm_map/gsm_map.cnf" +#line 342 "../../asn1/gsm_map/gsm_map.cnf" actx->pinfo->p2p_dir = P2P_DIR_SENT; offset = dissect_gsm_map_AddressString(implicit_tag, tvb, offset, actx, tree, hf_index); @@ -6442,7 +6446,7 @@ static const ber_sequence_t gsm_map_sm_MO_ForwardSM_Arg_sequence[] = { static int dissect_gsm_map_sm_MO_ForwardSM_Arg(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 412 "../../asn1/gsm_map/gsm_map.cnf" +#line 413 "../../asn1/gsm_map/gsm_map.cnf" /* dissect_gsm_map_SignalInfo will return parameter_tvb in actx */ offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, @@ -6470,7 +6474,7 @@ static const ber_sequence_t gsm_map_sm_MO_ForwardSM_Res_sequence[] = { static int dissect_gsm_map_sm_MO_ForwardSM_Res(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 424 "../../asn1/gsm_map/gsm_map.cnf" +#line 425 "../../asn1/gsm_map/gsm_map.cnf" /* dissect_gsm_map_SignalInfo will return parameter_tvb in actx */ offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, @@ -6505,7 +6509,7 @@ static const ber_sequence_t gsm_map_sm_MT_ForwardSM_Arg_sequence[] = { static int dissect_gsm_map_sm_MT_ForwardSM_Arg(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 436 "../../asn1/gsm_map/gsm_map.cnf" +#line 437 "../../asn1/gsm_map/gsm_map.cnf" /* dissect_gsm_map_SignalInfo will return parameter_tvb in actx */ offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, @@ -6533,7 +6537,7 @@ static const ber_sequence_t gsm_map_sm_MT_ForwardSM_Res_sequence[] = { static int dissect_gsm_map_sm_MT_ForwardSM_Res(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 448 "../../asn1/gsm_map/gsm_map.cnf" +#line 449 "../../asn1/gsm_map/gsm_map.cnf" /* dissect_gsm_map_SignalInfo will return parameter_tvb in actx */ offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, @@ -6707,7 +6711,7 @@ static const ber_sequence_t gsm_map_sm_MT_ForwardSM_VGCS_Arg_sequence[] = { static int dissect_gsm_map_sm_MT_ForwardSM_VGCS_Arg(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 460 "../../asn1/gsm_map/gsm_map.cnf" +#line 461 "../../asn1/gsm_map/gsm_map.cnf" /* dissect_gsm_map_SignalInfo will return parameter_tvb in actx */ offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, @@ -6764,7 +6768,7 @@ static const ber_sequence_t gsm_map_sm_MT_ForwardSM_VGCS_Res_sequence[] = { static int dissect_gsm_map_sm_MT_ForwardSM_VGCS_Res(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 472 "../../asn1/gsm_map/gsm_map.cnf" +#line 473 "../../asn1/gsm_map/gsm_map.cnf" /* dissect_gsm_map_SignalInfo will return parameter_tvb in actx */ offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, @@ -8143,7 +8147,7 @@ dissect_gsm_map_ms_GeographicalInformation(gboolean implicit_tag _U_, tvbuff_t * static int dissect_gsm_map_ms_LocationNumber(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 942 "../../asn1/gsm_map/gsm_map.cnf" +#line 947 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; proto_tree *subtree; const char *digit_str; @@ -8827,7 +8831,7 @@ dissect_gsm_map_ms_SGSN_Capability(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, static int dissect_gsm_map_ms_APN(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 915 "../../asn1/gsm_map/gsm_map.cnf" +#line 920 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; proto_tree *subtree; int length, name_len, tmp; @@ -9078,7 +9082,7 @@ dissect_gsm_map_ms_UpdateGprsLocationRes(gboolean implicit_tag _U_, tvbuff_t *tv static int dissect_gsm_map_ms_IntegrityProtectionInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 698 "../../asn1/gsm_map/gsm_map.cnf" +#line 699 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; asn1_ctx_t asn1_ctx; @@ -9101,7 +9105,7 @@ dissect_gsm_map_ms_IntegrityProtectionInformation(gboolean implicit_tag _U_, tvb static int dissect_gsm_map_ms_EncryptionInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 710 "../../asn1/gsm_map/gsm_map.cnf" +#line 711 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; asn1_ctx_t asn1_ctx; @@ -9186,7 +9190,7 @@ dissect_gsm_map_ms_AllowedUMTS_Algorithms(gboolean implicit_tag _U_, tvbuff_t *t static int dissect_gsm_map_ms_RadioResourceInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 674 "../../asn1/gsm_map/gsm_map.cnf" +#line 675 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; proto_tree *subtree; @@ -9257,7 +9261,7 @@ dissect_gsm_map_ms_BSSMAP_ServiceHandover(gboolean implicit_tag _U_, tvbuff_t *t static int dissect_gsm_map_ms_RANAP_ServiceHandover(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 686 "../../asn1/gsm_map/gsm_map.cnf" +#line 687 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; asn1_ctx_t asn1_ctx; @@ -10192,7 +10196,7 @@ static int dissect_gsm_map_ms_T_forwardingOptions(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_gsm_map_ms_Ext_ForwOptions(implicit_tag, tvb, offset, actx, tree, hf_index); -#line 575 "../../asn1/gsm_map/gsm_map.cnf" +#line 576 "../../asn1/gsm_map/gsm_map.cnf" proto_tree_add_item(tree, hf_gsm_map_notification_to_forwarding_party, tvb, 0,1,ENC_BIG_ENDIAN); proto_tree_add_item(tree, hf_gsm_map_redirecting_presentation, tvb, 0,1,ENC_BIG_ENDIAN); @@ -11355,7 +11359,7 @@ dissect_gsm_map_ms_VlrCamelSubscriptionInfo(gboolean implicit_tag _U_, tvbuff_t static int dissect_gsm_map_ms_PDP_Type(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 583 "../../asn1/gsm_map/gsm_map.cnf" +#line 584 "../../asn1/gsm_map/gsm_map.cnf" guint8 pdp_type_org; tvbuff_t *parameter_tvb; @@ -11388,7 +11392,7 @@ dissect_gsm_map_ms_PDP_Type(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int of int dissect_gsm_map_ms_QoS_Subscribed(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 605 "../../asn1/gsm_map/gsm_map.cnf" +#line 606 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; @@ -11410,7 +11414,7 @@ dissect_gsm_map_ms_QoS_Subscribed(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int dissect_gsm_map_ms_Ext_QoS_Subscribed(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 616 "../../asn1/gsm_map/gsm_map.cnf" +#line 617 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; @@ -15605,7 +15609,7 @@ dissect_gsm_map_lcs_ProvideSubscriberLocation_Arg(gboolean implicit_tag _U_, tvb int dissect_gsm_map_lcs_Ext_GeographicalInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 893 "../../asn1/gsm_map/gsm_map.cnf" +#line 898 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; proto_tree *subtree; @@ -17036,7 +17040,7 @@ static const ber_sequence_t gsm_old_Bss_APDU_sequence[] = { static int dissect_gsm_old_Bss_APDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 723 "../../asn1/gsm_map/gsm_map.cnf" +#line 724 "../../asn1/gsm_map/gsm_map.cnf" guint8 octet; guint8 length; tvbuff_t *next_tvb; @@ -17089,7 +17093,8 @@ if (!actx->value_ptr) /* Strip off discrimination and length */ proto_tree_add_item(subtree, hf_gsm_map_len, (tvbuff_t*)actx->value_ptr, 1,1,ENC_BIG_ENDIAN); next_tvb = tvb_new_subset_remaining((tvbuff_t*)actx->value_ptr, 2); - dissect_bssmap(next_tvb, actx->pinfo, subtree); + call_dissector_with_data(bssap_handle, next_tvb, actx->pinfo, subtree, + p_get_proto_data(actx->pinfo->pool, actx->pinfo, proto_gsm_map, actx->pinfo->curr_layer_num)); }else if(octet==1){ proto_tree_add_item(subtree, hf_gsm_map_dlci, (tvbuff_t*)actx->value_ptr, 1,1,ENC_BIG_ENDIAN); proto_tree_add_item(subtree, hf_gsm_map_len, (tvbuff_t*)actx->value_ptr, 2,1,ENC_BIG_ENDIAN); @@ -17102,7 +17107,8 @@ if (!actx->value_ptr) octet = tvb_get_guint8((tvbuff_t*)actx->value_ptr,0); if ( octet == 0) {/* DISCRIMINATION TS 48 006 */ next_tvb = tvb_new_subset_remaining((tvbuff_t*)actx->value_ptr, 2); - dissect_bssmap(next_tvb, actx->pinfo, subtree); + call_dissector_with_data(bssap_handle, next_tvb, actx->pinfo, subtree, + p_get_proto_data(actx->pinfo->pool, actx->pinfo, proto_gsm_map, actx->pinfo->curr_layer_num)); } break; /* ets-300102-1 (~Q.931 ) */ @@ -17619,7 +17625,7 @@ dissect_gsm_old_PlmnContainer(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int static int dissect_gsm_old_T_imsi(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 345 "../../asn1/gsm_map/gsm_map.cnf" +#line 346 "../../asn1/gsm_map/gsm_map.cnf" actx->pinfo->p2p_dir = P2P_DIR_SENT; offset = dissect_gsm_map_IMSI(implicit_tag, tvb, offset, actx, tree, hf_index); @@ -17633,7 +17639,7 @@ dissect_gsm_old_T_imsi(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset static int dissect_gsm_old_T_lmsi(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 349 "../../asn1/gsm_map/gsm_map.cnf" +#line 350 "../../asn1/gsm_map/gsm_map.cnf" actx->pinfo->p2p_dir = P2P_DIR_SENT; offset = dissect_gsm_map_LMSI(implicit_tag, tvb, offset, actx, tree, hf_index); @@ -17647,7 +17653,7 @@ dissect_gsm_old_T_lmsi(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset static int dissect_gsm_old_T_serviceCentreAddressDA(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 369 "../../asn1/gsm_map/gsm_map.cnf" +#line 370 "../../asn1/gsm_map/gsm_map.cnf" actx->pinfo->p2p_dir = P2P_DIR_RECV; offset = dissect_gsm_map_AddressString(implicit_tag, tvb, offset, actx, tree, hf_index); @@ -17687,7 +17693,7 @@ dissect_gsm_old_SM_RP_DAold(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int of static int dissect_gsm_old_T_msisdn(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 361 "../../asn1/gsm_map/gsm_map.cnf" +#line 362 "../../asn1/gsm_map/gsm_map.cnf" actx->pinfo->p2p_dir = P2P_DIR_RECV; offset = dissect_gsm_map_ISDN_AddressString(implicit_tag, tvb, offset, actx, tree, hf_index); @@ -17701,7 +17707,7 @@ actx->pinfo->p2p_dir = P2P_DIR_RECV; static int dissect_gsm_old_T_serviceCentreAddressOA(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 337 "../../asn1/gsm_map/gsm_map.cnf" +#line 338 "../../asn1/gsm_map/gsm_map.cnf" actx->pinfo->p2p_dir = P2P_DIR_SENT; offset = dissect_gsm_map_AddressString(implicit_tag, tvb, offset, actx, tree, hf_index); @@ -17746,7 +17752,7 @@ static const ber_sequence_t gsm_old_ForwardSM_Arg_sequence[] = { static int dissect_gsm_old_ForwardSM_Arg(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 396 "../../asn1/gsm_map/gsm_map.cnf" +#line 397 "../../asn1/gsm_map/gsm_map.cnf" /* dissect_gsm_map_SignalInfo will return parameter_tvb in actx */ offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset, @@ -18617,7 +18623,7 @@ dissect_gsm_ss_LCS_PeriodicLocationCancellationArg(gboolean implicit_tag _U_, tv static int dissect_gsm_map_ericsson_T_locationInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 971 "../../asn1/gsm_map/gsm_map.cnf" +#line 976 "../../asn1/gsm_map/gsm_map.cnf" tvbuff_t *parameter_tvb; proto_tree *subtree; guint8 rat; @@ -20266,7 +20272,7 @@ dissect_NokiaMAP_Extensions_AllowedServiceData(gboolean implicit_tag _U_, tvbuff /*--- End of included file: packet-gsm_map-fn.c ---*/ -#line 829 "../../asn1/gsm_map/packet-gsm_map-template.c" +#line 830 "../../asn1/gsm_map/packet-gsm_map-template.c" /* Specific translation for MAP V3 */ const value_string gsm_map_V1V2_opr_code_strings[] = { @@ -20488,7 +20494,7 @@ const value_string gsm_map_opr_code_strings[] = { /* Unknown or empty loop list OPERATION */ /*--- End of included file: packet-gsm_map-table.c ---*/ -#line 840 "../../asn1/gsm_map/packet-gsm_map-template.c" +#line 841 "../../asn1/gsm_map/packet-gsm_map-template.c" { 0, NULL } }; @@ -20705,7 +20711,7 @@ static const value_string gsm_map_err_code_string_vals[] = { /* Unknown or empty loop list OPERATION */ /*--- End of included file: packet-gsm_map-table.c ---*/ -#line 846 "../../asn1/gsm_map/packet-gsm_map-template.c" +#line 847 "../../asn1/gsm_map/packet-gsm_map-template.c" { 0, NULL } }; #endif @@ -22016,6 +22022,44 @@ dissect_gsm_map(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void return tvb_captured_length(tvb); } +static int +dissect_gsm_map_sccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* data) +{ + proto_item *item=NULL; + proto_tree *tree=NULL; + /* Used for gsm_map TAP */ + static gsm_map_tap_rec_t tap_rec; + gint op_idx; + asn1_ctx_t asn1_ctx; + + asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); + + col_set_str(pinfo->cinfo, COL_PROTOCOL, "GSM MAP"); + + top_tree = parent_tree; + + /* create display subtree for the protocol */ + item = proto_tree_add_item(parent_tree, proto_gsm_map, tvb, 0, -1, ENC_NA); + tree = proto_item_add_subtree(item, ett_gsm_map); + + /* Save the sccp_msg_info_t data (if present) because it can't be passed + through function calls */ + p_add_proto_data(pinfo->pool, pinfo, proto_gsm_map, pinfo->curr_layer_num, data); + + dissect_gsm_map_GSMMAPPDU(FALSE, tvb, 0, &asn1_ctx, tree, -1, NULL); + try_val_to_str_idx(opcode, gsm_map_opr_code_strings, &op_idx); + + if (op_idx != -1) { + tap_rec.invoke = (gsmmap_pdu_type == 1) ? TRUE : FALSE; + tap_rec.opr_code_idx = op_idx; + tap_rec.size = gsm_map_pdu_size; + + tap_queue_packet(gsm_map_tap, pinfo, &tap_rec); + } + + return tvb_captured_length(tvb); +} + const value_string ssCode_vals[] = { { 0x00, "allSS - all SS" }, { 0x10 ,"allLineIdentificationSS - all line identification SS" }, @@ -22308,6 +22352,7 @@ void proto_reg_handoff_gsm_map(void) { ranap_handle = find_dissector("ranap"); dtap_handle = find_dissector("gsm_a_dtap"); gsm_sms_handle = find_dissector("gsm_sms"); + bssap_handle = find_dissector("gsm_a_bssmap"); map_handle = find_dissector("gsm_map"); oid_add_from_string("itu(0) administration(2) japan(440)","0.2.440" ); @@ -29490,7 +29535,7 @@ void proto_register_gsm_map(void) { NULL, HFILL }}, /*--- End of included file: packet-gsm_map-hfarr.c ---*/ -#line 2861 "../../asn1/gsm_map/packet-gsm_map-template.c" +#line 2901 "../../asn1/gsm_map/packet-gsm_map-template.c" }; /* List of subtrees */ @@ -30199,7 +30244,7 @@ void proto_register_gsm_map(void) { &ett_NokiaMAP_Extensions_AllowedServiceData, /*--- End of included file: packet-gsm_map-ettarr.c ---*/ -#line 2893 "../../asn1/gsm_map/packet-gsm_map-template.c" +#line 2933 "../../asn1/gsm_map/packet-gsm_map-template.c" }; static ei_register_info ei[] = { @@ -30223,6 +30268,7 @@ void proto_register_gsm_map(void) { proto_gsm_map_dialogue =proto_gsm_map = proto_register_protocol(PNAME, PSNAME, PFNAME); new_register_dissector("gsm_map", dissect_gsm_map, proto_gsm_map); + new_register_dissector("gsm_map_sccp", dissect_gsm_map_sccp, proto_gsm_map); /* Register fields and subtrees */ proto_register_field_array(proto_gsm_map, hf, array_length(hf)); @@ -30302,7 +30348,7 @@ void proto_register_gsm_map(void) { /*--- End of included file: packet-gsm_map-dis-tab.c ---*/ -#line 2930 "../../asn1/gsm_map/packet-gsm_map-template.c" +#line 2971 "../../asn1/gsm_map/packet-gsm_map-template.c" oid_add_from_string("ericsson-gsm-Map-Ext","1.2.826.0.1249.58.1.0" ); oid_add_from_string("accessTypeNotAllowed-id","1.3.12.2.1107.3.66.1.2"); /*oid_add_from_string("map-ac networkLocUp(1) version3(3)","0.4.0.0.1.0.1.3" ); diff --git a/epan/dissectors/packet-ranap.c b/epan/dissectors/packet-ranap.c index f7fec7e0b5..4a3b2c0323 100644 --- a/epan/dissectors/packet-ranap.c +++ b/epan/dissectors/packet-ranap.c @@ -2660,7 +2660,7 @@ dissect_ranap_APN(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto static int dissect_ranap_PLMNidentity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 279 "../../asn1/ranap/ranap.cnf" +#line 281 "../../asn1/ranap/ranap.cnf" tvbuff_t *parameter_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -4578,7 +4578,7 @@ dissect_ranap_GlobalRNC_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _ static int dissect_ranap_GTP_TEI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 330 "../../asn1/ranap/ranap.cnf" +#line 332 "../../asn1/ranap/ranap.cnf" tvbuff_t *parameter_tvb=NULL; int saved_hf; @@ -4764,7 +4764,7 @@ dissect_ranap_IMSI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, prot #line 189 "../../asn1/ranap/ranap.cnf" tvbuff_t* imsi_tvb; const char *digit_str; - + sccp_msg_info_t *sccp_info; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, 3, 8, FALSE, &imsi_tvb); @@ -4774,11 +4774,13 @@ dissect_ranap_IMSI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, prot PROTO_ITEM_SET_HIDDEN(actx->created_item); digit_str = dissect_e212_imsi(imsi_tvb, actx->pinfo, tree, 0, tvb_reported_length(imsi_tvb), FALSE); - if ( actx->pinfo->sccp_info - && actx->pinfo->sccp_info->data.co.assoc - && ! actx->pinfo->sccp_info->data.co.assoc->calling_party ) { + sccp_info = (sccp_msg_info_t *)p_get_proto_data(actx->pinfo->pool, actx->pinfo, proto_ranap, 0); + + if ( sccp_info + && sccp_info->data.co.assoc + && ! sccp_info->data.co.assoc->calling_party ) { - actx->pinfo->sccp_info->data.co.assoc->calling_party = + sccp_info->data.co.assoc->calling_party = wmem_strdup_printf(wmem_file_scope(), "IMSI: %s", digit_str ); } @@ -5610,7 +5612,7 @@ dissect_ranap_LocationReportingTransferInformation(tvbuff_t *tvb _U_, int offset static int dissect_ranap_L3_Information(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 267 "../../asn1/ranap/ranap.cnf" +#line 269 "../../asn1/ranap/ranap.cnf" tvbuff_t *l3_info_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -6030,7 +6032,7 @@ dissect_ranap_MSISDN(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, pr static int dissect_ranap_NAS_PDU(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 212 "../../asn1/ranap/ranap.cnf" +#line 214 "../../asn1/ranap/ranap.cnf" tvbuff_t *nas_pdu_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -6068,7 +6070,7 @@ dissect_ranap_NAS_SynchronisationIndicator(tvbuff_t *tvb _U_, int offset _U_, as static int dissect_ranap_NewBSS_To_OldBSS_Information(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 259 "../../asn1/ranap/ranap.cnf" +#line 261 "../../asn1/ranap/ranap.cnf" tvbuff_t *bss_info_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -6157,7 +6159,7 @@ dissect_ranap_Offload_RAB_Parameters(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx static int dissect_ranap_OldBSS_ToNewBSS_Information(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 251 "../../asn1/ranap/ranap.cnf" +#line 253 "../../asn1/ranap/ranap.cnf" tvbuff_t *bss_info_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -7323,7 +7325,7 @@ dissect_ranap_RNSAPRelocationParameters(tvbuff_t *tvb _U_, int offset _U_, asn1_ static int dissect_ranap_RRC_Container(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 221 "../../asn1/ranap/ranap.cnf" +#line 223 "../../asn1/ranap/ranap.cnf" tvbuff_t *rrc_message_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -7435,7 +7437,7 @@ dissect_ranap_Service_Handover(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *ac static int dissect_ranap_Source_ToTarget_TransparentContainer(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 356 "../../asn1/ranap/ranap.cnf" +#line 358 "../../asn1/ranap/ranap.cnf" dissect_ranap_SourceRNC_ToTargetRNC_TransparentContainer(tvb , offset, actx ,tree , hf_ranap_ranap_SourceRNC_ToTargetRNC_TransparentContainer_PDU ); @@ -7512,7 +7514,7 @@ static const per_sequence_t SourceRNC_ToTargetRNC_TransparentContainer_sequence[ static int dissect_ranap_SourceRNC_ToTargetRNC_TransparentContainer(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 342 "../../asn1/ranap/ranap.cnf" +#line 344 "../../asn1/ranap/ranap.cnf" /* If SourceRNC-ToTargetRNC-TransparentContainer is called trough dissect_ranap_SourceRNC_ToTargetRNC_TransparentContainer_PDU ProtocolIE_ID may be unset @@ -7751,7 +7753,7 @@ dissect_ranap_SRVCC_Operation_Possible(tvbuff_t *tvb _U_, int offset _U_, asn1_c static int dissect_ranap_Target_ToSource_TransparentContainer(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 366 "../../asn1/ranap/ranap.cnf" +#line 368 "../../asn1/ranap/ranap.cnf" dissect_ranap_TargetRNC_ToSourceRNC_TransparentContainer(tvb , offset, actx ,tree , hf_ranap_ranap_TargetRNC_ToSourceRNC_TransparentContainer_PDU ); @@ -7882,7 +7884,7 @@ dissect_ranap_TraceType(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, static int dissect_ranap_TransportLayerAddress(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 302 "../../asn1/ranap/ranap.cnf" +#line 304 "../../asn1/ranap/ranap.cnf" tvbuff_t *parameter_tvb=NULL; proto_item *item; proto_tree *subtree, *nsap_tree; @@ -13150,11 +13152,12 @@ dissect_OutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void * return (dissector_try_uint_new(ranap_proc_out_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0; } -static void -dissect_ranap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_ranap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) { proto_item *ranap_item = NULL; proto_tree *ranap_tree = NULL; + sccp_msg_info_t *sccp_msg_lcl = (sccp_msg_info_t *)data; pdu_type = 0; ProtocolIE_ID = 0; @@ -13166,9 +13169,12 @@ dissect_ranap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) ranap_item = proto_tree_add_item(tree, proto_ranap, tvb, 0, -1, ENC_NA); ranap_tree = proto_item_add_subtree(ranap_item, ett_ranap); + /* Save the sccp_msg_info_t data (if present) because it can't be passed + through function calls */ + p_add_proto_data(pinfo->pool, pinfo, proto_ranap, 0, data); + dissect_RANAP_PDU_PDU(tvb, pinfo, ranap_tree, NULL); - if (pinfo->sccp_info) { - sccp_msg_info_t* sccp_msg_lcl = pinfo->sccp_info; + if (sccp_msg_lcl) { if (sccp_msg_lcl->data.co.assoc) sccp_msg_lcl->data.co.assoc->payload = SCCP_PLOAD_RANAP; @@ -13178,11 +13184,13 @@ dissect_ranap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) sccp_msg_lcl->data.co.label = wmem_strdup(wmem_file_scope(), str); } } + + return tvb_reported_length(tvb); } #define RANAP_MSG_MIN_LENGTH 7 static gboolean -dissect_sccp_ranap_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) +dissect_sccp_ranap_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) { guint8 temp; guint16 word; @@ -13219,7 +13227,7 @@ dissect_sccp_ranap_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi if(word > 0x1ff){ return FALSE; } - dissect_ranap(tvb, pinfo, tree); + dissect_ranap(tvb, pinfo, tree, data); return TRUE; } @@ -16114,7 +16122,7 @@ void proto_register_ranap(void) { NULL, HFILL }}, /*--- End of included file: packet-ranap-hfarr.c ---*/ -#line 320 "../../asn1/ranap/packet-ranap-template.c" +#line 326 "../../asn1/ranap/packet-ranap-template.c" }; /* List of subtrees */ @@ -16451,7 +16459,7 @@ void proto_register_ranap(void) { &ett_ranap_Outcome, /*--- End of included file: packet-ranap-ettarr.c ---*/ -#line 328 "../../asn1/ranap/packet-ranap-template.c" +#line 334 "../../asn1/ranap/packet-ranap-template.c" }; @@ -16462,7 +16470,7 @@ void proto_register_ranap(void) { proto_register_subtree_array(ett, array_length(ett)); /* Register dissector */ - register_dissector("ranap", dissect_ranap, proto_ranap); + new_register_dissector("ranap", dissect_ranap, proto_ranap); /* Register dissector tables */ ranap_ies_dissector_table = register_dissector_table("ranap.ies", "RANAP-PROTOCOL-IES", FT_UINT32, BASE_DEC); @@ -16834,7 +16842,7 @@ proto_reg_handoff_ranap(void) /*--- End of included file: packet-ranap-dis-tab.c ---*/ -#line 378 "../../asn1/ranap/packet-ranap-template.c" +#line 384 "../../asn1/ranap/packet-ranap-template.c" } else { dissector_delete_uint("sccp.ssn", local_ranap_sccp_ssn, ranap_handle); } diff --git a/epan/dissectors/packet-sccp.c b/epan/dissectors/packet-sccp.c index c93e28dbde..7345027ac3 100644 --- a/epan/dissectors/packet-sccp.c +++ b/epan/dissectors/packet-sccp.c @@ -2290,9 +2290,7 @@ dissect_sccp_data_param(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, scc struct _sccp_msg_info_t* sccp_info = NULL; if ((trace_sccp) && (assoc && assoc != &no_assoc)) { - pinfo->sccp_info = sccp_info = assoc->curr_msg; - } else { - pinfo->sccp_info = NULL; + sccp_info = assoc->curr_msg; } if (assoc) { @@ -2938,7 +2936,7 @@ dissect_sccp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree, break; case SCCP_MSG_TYPE_UDT: - pinfo->sccp_info = sccp_info.sccp_msg = new_ud_msg(pinfo, sccp_info.message_type); + sccp_info.sccp_msg = new_ud_msg(pinfo, sccp_info.message_type); offset += dissect_sccp_parameter(tvb, pinfo, sccp_tree, tree, PARAMETER_CLASS, offset, @@ -2965,7 +2963,7 @@ dissect_sccp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree, gboolean save_in_error_pkt = pinfo->flags.in_error_pkt; pinfo->flags.in_error_pkt = TRUE; - pinfo->sccp_info = sccp_info.sccp_msg = new_ud_msg(pinfo, sccp_info.message_type); + sccp_info.sccp_msg = new_ud_msg(pinfo, sccp_info.message_type); offset += dissect_sccp_parameter(tvb, pinfo, sccp_tree, tree, PARAMETER_RETURN_CAUSE, offset, @@ -3069,7 +3067,7 @@ dissect_sccp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree, break; case SCCP_MSG_TYPE_XUDT: - pinfo->sccp_info = sccp_info.sccp_msg = new_ud_msg(pinfo, sccp_info.message_type); + sccp_info.sccp_msg = new_ud_msg(pinfo, sccp_info.message_type); offset += dissect_sccp_parameter(tvb, pinfo, sccp_tree, tree, PARAMETER_CLASS, offset, PROTOCOL_CLASS_LENGTH, &sccp_info); @@ -3161,7 +3159,7 @@ dissect_sccp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree, gboolean save_in_error_pkt = pinfo->flags.in_error_pkt; pinfo->flags.in_error_pkt = TRUE; - pinfo->sccp_info = sccp_info.sccp_msg = new_ud_msg(pinfo, sccp_info.message_type); + sccp_info.sccp_msg = new_ud_msg(pinfo, sccp_info.message_type); offset += dissect_sccp_parameter(tvb, pinfo, sccp_tree, tree, PARAMETER_RETURN_CAUSE, offset, RETURN_CAUSE_LENGTH, &sccp_info); @@ -3247,7 +3245,7 @@ dissect_sccp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree, break; } case SCCP_MSG_TYPE_LUDT: - pinfo->sccp_info = sccp_info.sccp_msg = new_ud_msg(pinfo, sccp_info.message_type); + sccp_info.sccp_msg = new_ud_msg(pinfo, sccp_info.message_type); offset += dissect_sccp_parameter(tvb, pinfo, sccp_tree, tree, PARAMETER_CLASS, offset, @@ -3274,7 +3272,7 @@ dissect_sccp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree, break; case SCCP_MSG_TYPE_LUDTS: - pinfo->sccp_info = sccp_info.sccp_msg = new_ud_msg(pinfo, sccp_info.message_type); + sccp_info.sccp_msg = new_ud_msg(pinfo, sccp_info.message_type); offset += dissect_sccp_parameter(tvb, pinfo, sccp_tree, tree, PARAMETER_RETURN_CAUSE, offset, RETURN_CAUSE_LENGTH, &sccp_info); @@ -4156,7 +4154,7 @@ proto_reg_handoff_sccp(void) tcap_handle = find_dissector("tcap"); ranap_handle = find_dissector("ranap"); bssap_handle = find_dissector("bssap"); - gsmmap_handle = find_dissector("gsm_map"); + gsmmap_handle = find_dissector("gsm_map_sccp"); camel_handle = find_dissector("camel"); inap_handle = find_dissector("inap"); diff --git a/epan/dissectors/packet-sua.c b/epan/dissectors/packet-sua.c index 12ef1741bd..951be87667 100644 --- a/epan/dissectors/packet-sua.c +++ b/epan/dissectors/packet-sua.c @@ -2145,6 +2145,7 @@ dissect_sua_message(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *sua_t guint8 source_ssn = INVALID_SSN; guint8 dest_ssn = INVALID_SSN; proto_item *assoc_item; + struct _sccp_msg_info_t* sccp_info = NULL; message_class = 0; message_type = 0; @@ -2177,7 +2178,7 @@ dissect_sua_message(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *sua_t * or with "load sharing"? */ sccp_assoc_info_t* sccp_assoc; - sccp_decode_context_t sccp_info; + sccp_decode_context_t sccp_decode; /* sua assoc */ switch (message_type) { @@ -2227,21 +2228,17 @@ dissect_sua_message(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *sua_t #endif /* 0 */ } - sccp_info.message_type = message_type; - sccp_info.dlr = drn; - sccp_info.slr = srn; - sccp_info.assoc = NULL; - sccp_info.sccp_msg = NULL; /* Unused, but initialized */ + sccp_decode.message_type = message_type; + sccp_decode.dlr = drn; + sccp_decode.slr = srn; + sccp_decode.assoc = NULL; + sccp_decode.sccp_msg = NULL; /* Unused, but initialized */ - sccp_assoc = get_sccp_assoc(pinfo, tvb_offset_from_real_beginning(message_tvb), &sccp_info); + sccp_assoc = get_sccp_assoc(pinfo, tvb_offset_from_real_beginning(message_tvb), &sccp_decode); if (sccp_assoc && sccp_assoc->curr_msg) { - pinfo->sccp_info = sccp_assoc->curr_msg; + sccp_info = sccp_assoc->curr_msg; tap_queue_packet(sua_tap,pinfo,sccp_assoc->curr_msg); - } else { - pinfo->sccp_info = NULL; } - } else { - pinfo->sccp_info = NULL; } if (set_addresses) { @@ -2261,12 +2258,12 @@ dissect_sua_message(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *sua_t { /* Try subdissectors (if we found a valid SSN on the current message) */ if ((dest_ssn == INVALID_SSN || - !dissector_try_uint(sccp_ssn_dissector_table, dest_ssn, data_tvb, pinfo, tree)) + !dissector_try_uint_new(sccp_ssn_dissector_table, dest_ssn, data_tvb, pinfo, tree, TRUE, sccp_info)) && (source_ssn == INVALID_SSN || - !dissector_try_uint(sccp_ssn_dissector_table, source_ssn, data_tvb, pinfo, tree))) + !dissector_try_uint_new(sccp_ssn_dissector_table, source_ssn, data_tvb, pinfo, tree, TRUE, sccp_info))) { /* try heuristic subdissector list to see if there are any takers */ - if (dissector_try_heuristic(heur_subdissector_list, data_tvb, pinfo, tree, &hdtbl_entry, NULL)) { + if (dissector_try_heuristic(heur_subdissector_list, data_tvb, pinfo, tree, &hdtbl_entry, sccp_info)) { return; } /* No sub-dissection occurred, treat it as raw data */ -- cgit v1.2.3