diff options
Diffstat (limited to 'epan/dissectors/packet-sccp.c')
-rw-r--r-- | epan/dissectors/packet-sccp.c | 415 |
1 files changed, 224 insertions, 191 deletions
diff --git a/epan/dissectors/packet-sccp.c b/epan/dissectors/packet-sccp.c index fb89333e37..a25a6c9376 100644 --- a/epan/dissectors/packet-sccp.c +++ b/epan/dissectors/packet-sccp.c @@ -567,145 +567,146 @@ static const value_string sccp_isni_ti_values [] = { { 0, NULL } }; /* Laded from e212 hf*/ -static int hf_assoc_imsi = -1; +static int hf_assoc_imsi; /* Initialize the protocol and registered fields */ -static int proto_sccp = -1; -static int hf_sccp_message_type = -1; -static int hf_sccp_variable_pointer1 = -1; -static int hf_sccp_variable_pointer2 = -1; -static int hf_sccp_variable_pointer3 = -1; -static int hf_sccp_optional_pointer = -1; -static int hf_sccp_param_length = -1; -static int hf_sccp_ssn = -1; -static int hf_sccp_gt_digits = -1; +static int proto_sccp; +static int hf_sccp_message_type; +static int hf_sccp_variable_pointer1; +static int hf_sccp_variable_pointer2; +static int hf_sccp_variable_pointer3; +static int hf_sccp_optional_pointer; +static int hf_sccp_param_length; +static int hf_sccp_ssn; +static int hf_sccp_gt_digits; /* Called Party address */ -static int hf_sccp_called_ansi_national_indicator = -1; -static int hf_sccp_called_itu_natl_use_bit = -1; -static int hf_sccp_called_routing_indicator = -1; -static int hf_sccp_called_itu_global_title_indicator = -1; -static int hf_sccp_called_ansi_global_title_indicator = -1; -static int hf_sccp_called_itu_ssn_indicator = -1; -static int hf_sccp_called_itu_point_code_indicator = -1; -static int hf_sccp_called_ansi_ssn_indicator = -1; -static int hf_sccp_called_ansi_point_code_indicator = -1; -static int hf_sccp_called_ssn = -1; -static int hf_sccp_called_pc_member = -1; -static int hf_sccp_called_pc_cluster = -1; -static int hf_sccp_called_pc_network = -1; -static int hf_sccp_called_ansi_pc = -1; -static int hf_sccp_called_chinese_pc = -1; -static int hf_sccp_called_itu_pc = -1; -static int hf_sccp_called_japan_pc = -1; -static int hf_sccp_called_gt_nai = -1; -static int hf_sccp_called_gt_oe = -1; -static int hf_sccp_called_gt_tt = -1; -static int hf_sccp_called_gt_np = -1; -static int hf_sccp_called_gt_es = -1; -static int hf_sccp_called_gt_digits = -1; -static int hf_sccp_called_gt_digits_length = -1; +static int hf_sccp_called_ansi_national_indicator; +static int hf_sccp_called_itu_natl_use_bit; +static int hf_sccp_called_routing_indicator; +static int hf_sccp_called_itu_global_title_indicator; +static int hf_sccp_called_ansi_global_title_indicator; +static int hf_sccp_called_itu_ssn_indicator; +static int hf_sccp_called_itu_point_code_indicator; +static int hf_sccp_called_ansi_ssn_indicator; +static int hf_sccp_called_ansi_point_code_indicator; +static int hf_sccp_called_ssn; +static int hf_sccp_called_pc_member; +static int hf_sccp_called_pc_cluster; +static int hf_sccp_called_pc_network; +static int hf_sccp_called_ansi_pc; +static int hf_sccp_called_chinese_pc; +static int hf_sccp_called_itu_pc; +static int hf_sccp_called_japan_pc; +static int hf_sccp_called_gt_nai; +static int hf_sccp_called_gt_oe; +static int hf_sccp_called_gt_tt; +static int hf_sccp_called_gt_np; +static int hf_sccp_called_gt_es; +static int hf_sccp_called_gt_digits; +static int hf_sccp_called_gt_digits_length; /* Calling party address */ -static int hf_sccp_calling_ansi_national_indicator = -1; -static int hf_sccp_calling_itu_natl_use_bit = -1; -static int hf_sccp_calling_routing_indicator = -1; -static int hf_sccp_calling_itu_global_title_indicator = -1; -static int hf_sccp_calling_ansi_global_title_indicator = -1; -static int hf_sccp_calling_itu_ssn_indicator = -1; -static int hf_sccp_calling_itu_point_code_indicator = -1; -static int hf_sccp_calling_ansi_ssn_indicator = -1; -static int hf_sccp_calling_ansi_point_code_indicator = -1; -static int hf_sccp_calling_ssn = -1; -static int hf_sccp_calling_pc_member = -1; -static int hf_sccp_calling_pc_cluster = -1; -static int hf_sccp_calling_pc_network = -1; -static int hf_sccp_calling_ansi_pc = -1; -static int hf_sccp_calling_chinese_pc = -1; -static int hf_sccp_calling_itu_pc = -1; -static int hf_sccp_calling_japan_pc = -1; -static int hf_sccp_calling_gt_nai = -1; -static int hf_sccp_calling_gt_oe = -1; -static int hf_sccp_calling_gt_tt = -1; -static int hf_sccp_calling_gt_np = -1; -static int hf_sccp_calling_gt_es = -1; -static int hf_sccp_calling_gt_digits = -1; -static int hf_sccp_calling_gt_digits_length = -1; +static int hf_sccp_calling_ansi_national_indicator; +static int hf_sccp_calling_itu_natl_use_bit; +static int hf_sccp_calling_routing_indicator; +static int hf_sccp_calling_itu_global_title_indicator; +static int hf_sccp_calling_ansi_global_title_indicator; +static int hf_sccp_calling_itu_ssn_indicator; +static int hf_sccp_calling_itu_point_code_indicator; +static int hf_sccp_calling_ansi_ssn_indicator; +static int hf_sccp_calling_ansi_point_code_indicator; +static int hf_sccp_calling_ssn; +static int hf_sccp_calling_pc_member; +static int hf_sccp_calling_pc_cluster; +static int hf_sccp_calling_pc_network; +static int hf_sccp_calling_ansi_pc; +static int hf_sccp_calling_chinese_pc; +static int hf_sccp_calling_itu_pc; +static int hf_sccp_calling_japan_pc; +static int hf_sccp_calling_gt_nai; +static int hf_sccp_calling_gt_oe; +static int hf_sccp_calling_gt_tt; +static int hf_sccp_calling_gt_np; +static int hf_sccp_calling_gt_es; +static int hf_sccp_calling_gt_digits; +static int hf_sccp_calling_gt_digits_length; /* Other parameter values */ -static int hf_sccp_dlr = -1; -static int hf_sccp_slr = -1; -static int hf_sccp_lr = -1; -static int hf_sccp_class = -1; -static int hf_sccp_handling = -1; -static int hf_sccp_more = -1; -static int hf_sccp_rsn = -1; -static int hf_sccp_sequencing_segmenting_ssn = -1; -static int hf_sccp_sequencing_segmenting_rsn = -1; -static int hf_sccp_sequencing_segmenting_more = -1; -static int hf_sccp_credit = -1; -static int hf_sccp_release_cause = -1; -static int hf_sccp_return_cause = -1; -static int hf_sccp_reset_cause = -1; -static int hf_sccp_error_cause = -1; -static int hf_sccp_refusal_cause = -1; -static int hf_sccp_segmentation_first = -1; -static int hf_sccp_segmentation_class = -1; -static int hf_sccp_segmentation_remaining = -1; -static int hf_sccp_segmentation_slr = -1; -static int hf_sccp_hop_counter = -1; -static int hf_sccp_importance = -1; -static int hf_sccp_ansi_isni_mi = -1; -static int hf_sccp_ansi_isni_iri = -1; -static int hf_sccp_ansi_isni_ti = -1; -static int hf_sccp_ansi_isni_netspec = -1; -static int hf_sccp_ansi_isni_counter = -1; -static int hf_sccp_ansi_isni_network = -1; -static int hf_sccp_ansi_isni_cluster = -1; -static int hf_sccp_xudt_msg_fragments = -1; -static int hf_sccp_xudt_msg_fragment = -1; -static int hf_sccp_xudt_msg_fragment_overlap = -1; -static int hf_sccp_xudt_msg_fragment_overlap_conflicts = -1; -static int hf_sccp_xudt_msg_fragment_multiple_tails = -1; -static int hf_sccp_xudt_msg_fragment_too_long_fragment = -1; -static int hf_sccp_xudt_msg_fragment_error = -1; -static int hf_sccp_xudt_msg_fragment_count = -1; -static int hf_sccp_xudt_msg_reassembled_in = -1; -static int hf_sccp_xudt_msg_reassembled_length = -1; -static int hf_sccp_assoc_msg = -1; -static int hf_sccp_assoc_id = -1; -static int hf_sccp_segmented_data = -1; -static int hf_sccp_linked_dissector = -1; -static int hf_sccp_end_optional_param = -1; -static int hf_sccp_unknown_message = -1; -static int hf_sccp_unknown_parameter = -1; +static int hf_sccp_dlr; +static int hf_sccp_slr; +static int hf_sccp_lr; +static int hf_sccp_class; +static int hf_sccp_handling; +static int hf_sccp_more; +static int hf_sccp_rsn; +static int hf_sccp_sequencing_segmenting_ssn; +static int hf_sccp_sequencing_segmenting_rsn; +static int hf_sccp_sequencing_segmenting_more; +static int hf_sccp_credit; +static int hf_sccp_release_cause; +static int hf_sccp_return_cause; +static int hf_sccp_reset_cause; +static int hf_sccp_error_cause; +static int hf_sccp_refusal_cause; +static int hf_sccp_segmentation_first; +static int hf_sccp_segmentation_class; +static int hf_sccp_segmentation_remaining; +static int hf_sccp_segmentation_slr; +static int hf_sccp_hop_counter; +static int hf_sccp_importance; +static int hf_sccp_ansi_isni_mi; +static int hf_sccp_ansi_isni_iri; +static int hf_sccp_ansi_isni_ti; +static int hf_sccp_ansi_isni_netspec; +static int hf_sccp_ansi_isni_counter; +static int hf_sccp_ansi_isni_network; +static int hf_sccp_ansi_isni_cluster; +static int hf_sccp_xudt_msg_fragments; +static int hf_sccp_xudt_msg_fragment; +static int hf_sccp_xudt_msg_fragment_overlap; +static int hf_sccp_xudt_msg_fragment_overlap_conflicts; +static int hf_sccp_xudt_msg_fragment_multiple_tails; +static int hf_sccp_xudt_msg_fragment_too_long_fragment; +static int hf_sccp_xudt_msg_fragment_error; +static int hf_sccp_xudt_msg_fragment_count; +static int hf_sccp_xudt_msg_reassembled_in; +static int hf_sccp_xudt_msg_reassembled_length; +static int hf_sccp_assoc_msg; +static int hf_sccp_assoc_id; +static int hf_sccp_segmented_data; +static int hf_sccp_linked_dissector; +static int hf_sccp_end_optional_param; +static int hf_sccp_unknown_message; +static int hf_sccp_unknown_parameter; /* Initialize the subtree pointers */ -static gint ett_sccp = -1; -static gint ett_sccp_called = -1; -static gint ett_sccp_called_ai = -1; -static gint ett_sccp_called_pc = -1; -static gint ett_sccp_called_gt = -1; -static gint ett_sccp_called_gt_digits = -1; -static gint ett_sccp_calling = -1; -static gint ett_sccp_calling_ai = -1; -static gint ett_sccp_calling_pc = -1; -static gint ett_sccp_calling_gt = -1; -static gint ett_sccp_calling_gt_digits = -1; -static gint ett_sccp_sequencing_segmenting = -1; -static gint ett_sccp_segmentation = -1; -static gint ett_sccp_ansi_isni_routing_control = -1; -static gint ett_sccp_xudt_msg_fragment = -1; -static gint ett_sccp_xudt_msg_fragments = -1; -static gint ett_sccp_assoc = -1; - -static expert_field ei_sccp_wrong_length = EI_INIT; -static expert_field ei_sccp_international_standard_address = EI_INIT; -static expert_field ei_sccp_no_ssn_present = EI_INIT; -static expert_field ei_sccp_ssn_zero = EI_INIT; -static expert_field ei_sccp_class_unexpected = EI_INIT; -static expert_field ei_sccp_handling_invalid = EI_INIT; -static expert_field ei_sccp_gt_digits_missing = EI_INIT; +static gint ett_sccp; +static gint ett_sccp_called; +static gint ett_sccp_called_ai; +static gint ett_sccp_called_pc; +static gint ett_sccp_called_gt; +static gint ett_sccp_called_gt_digits; +static gint ett_sccp_calling; +static gint ett_sccp_calling_ai; +static gint ett_sccp_calling_pc; +static gint ett_sccp_calling_gt; +static gint ett_sccp_calling_gt_digits; +static gint ett_sccp_sequencing_segmenting; +static gint ett_sccp_segmentation; +static gint ett_sccp_ansi_isni_routing_control; +static gint ett_sccp_xudt_msg_fragment; +static gint ett_sccp_xudt_msg_fragments; +static gint ett_sccp_assoc; + +static expert_field ei_sccp_wrong_length; +static expert_field ei_sccp_international_standard_address; +static expert_field ei_sccp_no_ssn_present; +static expert_field ei_sccp_ssn_zero; +static expert_field ei_sccp_class_unexpected; +static expert_field ei_sccp_handling_invalid; +static expert_field ei_sccp_gt_digits_missing; +static expert_field ei_sccp_externally_reassembled; static gboolean sccp_reassemble = TRUE; @@ -715,7 +716,7 @@ static gboolean dt1_ignore_length = FALSE; static int ss7pc_address_type = -1; -static int sccp_tap = -1; +static int sccp_tap; static const fragment_items sccp_xudt_msg_frag_items = { @@ -744,13 +745,16 @@ static const fragment_items sccp_xudt_msg_frag_items = { static reassembly_table sccp_xudt_msg_reassembly_table; -#define SCCP_USER_DATA 0 -#define SCCP_USER_TCAP 1 -#define SCCP_USER_RANAP 2 -#define SCCP_USER_BSSAP 3 -#define SCCP_USER_GSMMAP 4 -#define SCCP_USER_CAMEL 5 -#define SCCP_USER_INAP 6 +#define SCCP_USER_DATA 0 +#define SCCP_USER_TCAP 1 +#define SCCP_USER_RANAP 2 +#define SCCP_USER_BSSAP 3 +#define SCCP_USER_GSMMAP 4 +#define SCCP_USER_CAMEL 5 +#define SCCP_USER_INAP 6 +#define SCCP_USER_BSAP 7 +#define SCCP_USER_BSSAP_LE 8 +#define SCCP_USER_BSSAP_PLUS 9 typedef struct _sccp_user_t { guint ni; @@ -772,18 +776,24 @@ static dissector_handle_t bssap_handle; static dissector_handle_t gsmmap_handle; static dissector_handle_t camel_handle; static dissector_handle_t inap_handle; +static dissector_handle_t bsap_handle; +static dissector_handle_t bssap_le_handle; +static dissector_handle_t bssap_plus_handle; static dissector_handle_t default_handle; static const char *default_payload = NULL; static const value_string sccp_users_vals[] = { - { SCCP_USER_DATA, "Data"}, - { SCCP_USER_TCAP, "TCAP"}, - { SCCP_USER_RANAP, "RANAP"}, - { SCCP_USER_BSSAP, "BSSAP"}, - { SCCP_USER_GSMMAP, "GSM MAP"}, - { SCCP_USER_CAMEL, "CAMEL"}, - { SCCP_USER_INAP, "INAP"}, + { SCCP_USER_DATA, "Data"}, + { SCCP_USER_TCAP, "TCAP"}, + { SCCP_USER_RANAP, "RANAP"}, + { SCCP_USER_BSSAP, "BSSAP"}, + { SCCP_USER_GSMMAP, "GSM MAP"}, + { SCCP_USER_CAMEL, "CAMEL"}, + { SCCP_USER_INAP, "INAP"}, + { SCCP_USER_BSAP, "BSAP"}, + { SCCP_USER_BSSAP_LE, "BSSAP-LE"}, + { SCCP_USER_BSSAP_PLUS, "BSSAP+"}, { 0, NULL } }; @@ -941,7 +951,7 @@ sccp_reassemble_fragments(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, static void sccp_prompt(packet_info *pinfo _U_, gchar* result) { - g_snprintf(result, MAX_DECODE_AS_PROMPT_LEN, "Dissect SSN %d as", + snprintf(result, MAX_DECODE_AS_PROMPT_LEN, "Dissect SSN %d as", GPOINTER_TO_UINT(p_get_proto_data(pinfo->pool, pinfo, proto_sccp, 0))); } @@ -1960,8 +1970,8 @@ dissect_sccp_called_calling_param(tvbuff_t *tvb, proto_tree *tree, packet_info * guint8 national = 0xFFU, routing_ind, gti, pci, ssni, ssn; tvbuff_t *gt_tvb; dissector_handle_t ssn_dissector = NULL, tcap_ssn_dissector = NULL; - const char *ssn_dissector_short_name = NULL; - const char *tcap_ssn_dissector_short_name = NULL; + const char *ssn_dissector_description = NULL; + const char *tcap_ssn_dissector_description = NULL; call_tree = proto_tree_add_subtree_format(tree, tvb, 0, length, called ? ett_sccp_called : ett_sccp_calling, NULL, @@ -2092,19 +2102,19 @@ dissect_sccp_called_calling_param(tvbuff_t *tvb, proto_tree *tree, packet_info * ssn_dissector = dissector_get_uint_handle(sccp_ssn_dissector_table, ssn); if (ssn_dissector) { - ssn_dissector_short_name = dissector_handle_get_short_name(ssn_dissector); + ssn_dissector_description = dissector_handle_get_description(ssn_dissector); - if (ssn_dissector_short_name) { + if (ssn_dissector_description) { item = proto_tree_add_string_format(call_tree, hf_sccp_linked_dissector, tvb, offset - 1, ADDRESS_SSN_LENGTH, - ssn_dissector_short_name, "Linked to %s", ssn_dissector_short_name); + ssn_dissector_description, "Linked to %s", ssn_dissector_description); proto_item_set_generated(item); - if (g_ascii_strncasecmp("TCAP", ssn_dissector_short_name, 4)== 0) { + if (g_ascii_strncasecmp("TCAP", ssn_dissector_description, 4)== 0) { tcap_ssn_dissector = get_itu_tcap_subdissector(ssn); if (tcap_ssn_dissector) { - tcap_ssn_dissector_short_name = dissector_handle_get_short_name(tcap_ssn_dissector); - proto_item_append_text(item,", TCAP SSN linked to %s", tcap_ssn_dissector_short_name); + tcap_ssn_dissector_description = dissector_handle_get_description(tcap_ssn_dissector); + proto_item_append_text(item,", TCAP SSN linked to %s", tcap_ssn_dissector_description); } } } /* short name */ @@ -2283,36 +2293,29 @@ dissect_sccp_segmenting_reassembling_param(tvbuff_t *tvb, packet_info *pinfo, pr static void dissect_sccp_receive_sequence_number_param(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint length) { - guint8 rsn; - if (length != 1) { proto_tree_add_expert_format(tree, pinfo, &ei_sccp_wrong_length, tvb, 0, length, "Wrong length indicated. Expected 1, got %u", length); return; } - rsn = tvb_get_guint8(tvb, 0) >> 1; - proto_tree_add_uint(tree, hf_sccp_rsn, tvb, 0, length, rsn); + proto_tree_add_item(tree, hf_sccp_rsn, tvb, 0, length, ENC_NA); } static void dissect_sccp_sequencing_segmenting_param(tvbuff_t *tvb, proto_tree *tree, guint length) { - guint8 rsn, ssn; proto_tree *param_tree; - ssn = tvb_get_guint8(tvb, 0) >> 1; - rsn = tvb_get_guint8(tvb, SEQUENCING_SEGMENTING_SSN_LENGTH) >> 1; - param_tree = proto_tree_add_subtree(tree, tvb, 0, length, ett_sccp_sequencing_segmenting, NULL, val_to_str(PARAMETER_SEQUENCING_SEGMENTING, sccp_parameter_values, "Unknown: %d")); - proto_tree_add_uint(param_tree, hf_sccp_sequencing_segmenting_ssn, tvb, 0, - SEQUENCING_SEGMENTING_SSN_LENGTH, ssn); - proto_tree_add_uint(param_tree, hf_sccp_sequencing_segmenting_rsn, tvb, + proto_tree_add_item(param_tree, hf_sccp_sequencing_segmenting_ssn, tvb, 0, + SEQUENCING_SEGMENTING_SSN_LENGTH, ENC_NA); + proto_tree_add_item(param_tree, hf_sccp_sequencing_segmenting_rsn, tvb, SEQUENCING_SEGMENTING_SSN_LENGTH, - SEQUENCING_SEGMENTING_RSN_LENGTH, rsn); + SEQUENCING_SEGMENTING_RSN_LENGTH, ENC_NA); proto_tree_add_item(param_tree, hf_sccp_sequencing_segmenting_more, tvb, SEQUENCING_SEGMENTING_SSN_LENGTH, SEQUENCING_SEGMENTING_RSN_LENGTH, ENC_NA); @@ -2752,6 +2755,7 @@ dissect_sccp_variable_parameter(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree, proto_tree *tree, guint8 parameter_type, int offset, sccp_decode_context_t* sccp_info) { + gint remaining_length; guint16 parameter_length; guint8 length_length; proto_item *pi; @@ -2770,8 +2774,15 @@ dissect_sccp_variable_parameter(tvbuff_t *tvb, packet_info *pinfo, val_to_str(parameter_type, sccp_parameter_values, "Unknown: %d"), parameter_length); - if (!sccp_show_length) { + remaining_length = tvb_reported_length_remaining(tvb, offset + length_length); + if (parameter_type == PARAMETER_DATA && remaining_length > 255 && parameter_length == 255) { + expert_add_info_format(pinfo, pi, &ei_sccp_externally_reassembled, "Possibly externally reassembled (remaining length %u > %u), check SCCP preferences", remaining_length, parameter_length); + if (dt1_ignore_length) { + parameter_length = remaining_length; + } + } else if (!sccp_show_length) { /* The user doesn't want to see it... */ + /* Show the length anyway, though, if there was an error. */ proto_item_set_hidden(pi); } @@ -2859,7 +2870,8 @@ dissect_xudt_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree, guint16 *optional_pointer_p, guint16 *orig_opt_ptr_p) { guint16 variable_pointer1 = 0, variable_pointer2 = 0, variable_pointer3 = 0; - guint16 optional_pointer = 0, orig_opt_ptr = 0; + guint16 optional_pointer = 0, orig_opt_ptr = 0, optional_pointer1 = 0; + guint8 optional_param_type = 0; tvbuff_t *new_tvb = NULL; guint32 source_local_ref = 0; guint msg_offset = tvb_offset_from_real_beginning(tvb); @@ -2915,7 +2927,16 @@ dissect_xudt_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree, PARAMETER_CALLING_PARTY_ADDRESS, variable_pointer2, sccp_info); - if (tvb_get_guint8(tvb, optional_pointer) == PARAMETER_SEGMENTATION) { + + optional_pointer1 = optional_pointer; + while((optional_param_type = tvb_get_guint8(tvb, optional_pointer1)) != PARAMETER_END_OF_OPTIONAL_PARAMETERS) { + if (optional_param_type == PARAMETER_SEGMENTATION) + break; + optional_pointer1 += PARAMETER_TYPE_LENGTH; + optional_pointer1 += tvb_get_guint8(tvb, optional_pointer1) + PARAMETER_LENGTH_LENGTH; + } + + if (tvb_get_guint8(tvb, optional_pointer1) == PARAMETER_SEGMENTATION) { if (!sccp_reassemble) { proto_tree_add_item(sccp_tree, hf_sccp_segmented_data, tvb, variable_pointer3, tvb_get_guint8(tvb, variable_pointer3)+1, ENC_NA); } else { @@ -2932,8 +2953,8 @@ dissect_xudt_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree, * The values 0000 to 1111 are possible; the value 0000 indicates * the last segment. */ - octet = tvb_get_guint8(tvb, optional_pointer+2); - source_local_ref = tvb_get_letoh24(tvb, optional_pointer+3); + octet = tvb_get_guint8(tvb, optional_pointer1+2); + source_local_ref = tvb_get_letoh24(tvb, optional_pointer1+3); if ((octet & 0x0f) == 0) more_frag = FALSE; @@ -3146,6 +3167,11 @@ dissect_sccp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccp_tree, offset += dissect_sccp_parameter(tvb, pinfo, sccp_tree, tree, PARAMETER_SEQUENCING_SEGMENTING, offset, SEQUENCING_SEGMENTING_LENGTH, &sccp_info); + VARIABLE_POINTER(variable_pointer1, hf_sccp_variable_pointer1, POINTER_LENGTH); + + dissect_sccp_variable_parameter(tvb, pinfo, sccp_tree, tree, + PARAMETER_DATA, variable_pointer1, &sccp_info); + break; case SCCP_MSG_TYPE_AK: @@ -3486,17 +3512,20 @@ static struct _sccp_ul { dissector_handle_t *handlep; } user_list[] = { - {SCCP_USER_DATA, FALSE, &data_handle}, - {SCCP_USER_TCAP, FALSE, &tcap_handle}, - {SCCP_USER_RANAP, FALSE, &ranap_handle}, - {SCCP_USER_BSSAP, FALSE, &bssap_handle}, - {SCCP_USER_GSMMAP, TRUE, &gsmmap_handle}, - {SCCP_USER_CAMEL, TRUE, &camel_handle}, - {SCCP_USER_INAP, TRUE, &inap_handle}, + {SCCP_USER_DATA, FALSE, &data_handle}, + {SCCP_USER_TCAP, FALSE, &tcap_handle}, + {SCCP_USER_RANAP, FALSE, &ranap_handle}, + {SCCP_USER_BSSAP, FALSE, &bssap_handle}, + {SCCP_USER_GSMMAP, TRUE, &gsmmap_handle}, + {SCCP_USER_CAMEL, TRUE, &camel_handle}, + {SCCP_USER_INAP, TRUE, &inap_handle}, + {SCCP_USER_BSAP, FALSE, &bsap_handle}, + {SCCP_USER_BSSAP_LE, FALSE, &bssap_le_handle}, + {SCCP_USER_BSSAP_PLUS, FALSE, &bssap_plus_handle}, {0, FALSE, NULL} }; -static gboolean +static bool sccp_users_update_cb(void *r, char **err) { sccp_user_t *u = (sccp_user_t *)r; @@ -4122,6 +4151,7 @@ proto_register_sccp(void) { &ei_sccp_class_unexpected, { "sccp.class_unexpected", PI_MALFORMED, PI_ERROR, "Unexpected message class for this message type", EXPFILL }}, { &ei_sccp_handling_invalid, { "sccp.handling_invalid", PI_MALFORMED, PI_ERROR, "Invalid message handling", EXPFILL }}, { &ei_sccp_gt_digits_missing, { "sccp.gt_digits_missing", PI_MALFORMED, PI_ERROR, "Address digits missing", EXPFILL }}, + { &ei_sccp_externally_reassembled, { "sccp.externally_reassembled", PI_ASSUMPTION, PI_NOTE, "Possibly externally reassembled (remaining length > 255 bytes), enable in SCCP preferences", EXPFILL }}, }; /* Decode As handling */ @@ -4162,7 +4192,7 @@ proto_register_sccp(void) sccp_ssn_dissector_table = register_dissector_table("sccp.ssn", "SCCP SSN", proto_sccp, FT_UINT8, BASE_DEC); - heur_subdissector_list = register_heur_dissector_list("sccp", proto_sccp); + heur_subdissector_list = register_heur_dissector_list_with_description("sccp", "SCCP Data fallback", proto_sccp); sccp_module = prefs_register_protocol(proto_sccp, proto_reg_handoff_sccp); @@ -4201,13 +4231,13 @@ proto_register_sccp(void) " This may affect TCAP's ability to recognize which messages belong to which TCAP session.", &set_addresses); - prefs_register_string_preference(sccp_module, "default_payload", "Default Payload", - "The protocol which should be used to dissect the payload if nothing else has claimed it", + prefs_register_dissector_preference(sccp_module, "default_payload", "Default Payload", + "The dissector which should be used to dissect the payload if nothing else has claimed it", &default_payload); - prefs_register_bool_preference(sccp_module, "dt1_ignore_length", "Ignore length in DT1", - "Use all bytes for data payload. Overcome 255 bytes limit of SCCP stadard." - " (Some tracing tool save information without DT1 segmentation of 255 bytes)", + prefs_register_bool_preference(sccp_module, "dt1_ignore_length", "Dissect data past 255 byte limit", + "Use all bytes for data payload. Overcome 255 bytes limit of SCCP standard." + " (Some tracing tools externally reassemble segmented data.)", &dt1_ignore_length); register_init_routine(&init_sccp); @@ -4235,13 +4265,16 @@ proto_reg_handoff_sccp(void) dissector_add_uint("mtp3.service_indicator", MTP_SI_SCCP, sccp_handle); dissector_add_string("tali.opcode", "sccp", sccp_handle); - data_handle = find_dissector("data"); - tcap_handle = find_dissector_add_dependency("tcap", proto_sccp); - ranap_handle = find_dissector_add_dependency("ranap", proto_sccp); - bssap_handle = find_dissector_add_dependency("bssap", proto_sccp); - gsmmap_handle = find_dissector_add_dependency("gsm_map_sccp", proto_sccp); - camel_handle = find_dissector_add_dependency("camel", proto_sccp); - inap_handle = find_dissector_add_dependency("inap", proto_sccp); + data_handle = find_dissector("data"); + tcap_handle = find_dissector_add_dependency("tcap", proto_sccp); + ranap_handle = find_dissector_add_dependency("ranap", proto_sccp); + bssap_handle = find_dissector_add_dependency("bssap", proto_sccp); + gsmmap_handle = find_dissector_add_dependency("gsm_map_sccp", proto_sccp); + camel_handle = find_dissector_add_dependency("camel", proto_sccp); + inap_handle = find_dissector_add_dependency("inap", proto_sccp); + bsap_handle = find_dissector_add_dependency("bsap", proto_sccp); + bssap_le_handle = find_dissector_add_dependency("bssap_le", proto_sccp); + bssap_plus_handle = find_dissector_add_dependency("bssap_plus", proto_sccp); ss7pc_address_type = address_type_get_by_name("AT_SS7PC"); |