aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-dmp.c')
-rw-r--r--epan/dissectors/packet-dmp.c738
1 files changed, 371 insertions, 367 deletions
diff --git a/epan/dissectors/packet-dmp.c b/epan/dissectors/packet-dmp.c
index 970d36bf60..0302ee47b9 100644
--- a/epan/dissectors/packet-dmp.c
+++ b/epan/dissectors/packet-dmp.c
@@ -145,329 +145,329 @@ void proto_reg_handoff_dmp(void);
/* Maximum lengths */
#define MAX_SIC_LEN 30
-static int proto_dmp = -1;
-
-static int hf_dmp_id = -1;
-static int hf_mts_id = -1;
-static int hf_ipm_id = -1;
-
-static int hf_envelope = -1;
-static int hf_envelope_protocol_id = -1;
-static int hf_envelope_version = -1;
-static int hf_envelope_version_value = -1;
-static int hf_envelope_hop_count = -1;
-static int hf_envelope_hop_count_value = -1;
-static int hf_envelope_rec_present = -1;
-static int hf_envelope_addr_enc = -1;
-static int hf_envelope_checksum = -1;
-static int hf_envelope_extensions = -1;
-static int hf_envelope_msg_id_type = -1;
-static int hf_envelope_msg_id_length = -1;
-static int hf_envelope_mts_id_length = -1;
-static int hf_envelope_ipm_id_modifier = -1;
-static int hf_envelope_ipm_id_length = -1;
-static int hf_envelope_mts_id = -1;
-static int hf_envelope_ipm_id = -1;
-static int hf_envelope_type = -1;
-static int hf_envelope_msg_id = -1;
-static int hf_envelope_msg_id_12bit = -1;
-static int hf_envelope_subm_time = -1;
-static int hf_envelope_subm_time_value = -1;
-static int hf_envelope_time_diff_present = -1;
-static int hf_envelope_time_diff = -1;
-static int hf_envelope_time_diff_value = -1;
-static int hf_envelope_flags = -1;
-static int hf_envelope_content_id_discarded = -1;
-static int hf_envelope_recip_reassign_prohib = -1;
-static int hf_envelope_dl_expansion_prohib = -1;
-static int hf_envelope_recipients = -1;
-static int hf_envelope_ext_recipients = -1;
-
-static int hf_thales_ipm_id_modifier = -1;
-
-static int hf_extensions = -1;
-static int hf_extension = -1;
-static int hf_extension_header = -1;
-static int hf_extension_more = -1;
-static int hf_extension_length = -1;
-static int hf_extension_data = -1;
-
-static int hf_message_content = -1;
-static int hf_report_content = -1;
-static int hf_notif_content = -1;
-
-static int hf_addr_recipient = -1;
-static int hf_addr_originator = -1;
-static int hf_addr_reporting_name = -1;
-static int hf_addr_dl_expanded = -1;
-static int hf_addr_int_rec = -1;
-static int hf_addr_dir_addr_ext = -1;
-static int hf_addr_dir_rec_no = -1;
-static int hf_addr_dir_rec_no1 = -1;
-static int hf_addr_dir_rec_no2 = -1;
-static int hf_addr_dir_rec_no3 = -1;
-static int hf_addr_dir_rec_no_generated = -1;
-static int hf_addr_dir_rep_req1 = -1;
-static int hf_addr_dir_rep_req2 = -1;
-static int hf_addr_dir_rep_req3 = -1;
-static int hf_addr_dir_not_req1 = -1;
-static int hf_addr_dir_not_req2 = -1;
-static int hf_addr_dir_not_req3 = -1;
-static int hf_addr_dir_action = -1;
-static int hf_addr_dir_address = -1;
-static int hf_addr_dir_address1 = -1;
-static int hf_addr_dir_address2 = -1;
-static int hf_addr_dir_address3 = -1;
-static int hf_addr_dir_address_generated = -1;
-
-static int hf_addr_ext_form = -1;
-static int hf_addr_ext_form_orig_v1 = -1;
-static int hf_addr_ext_form_orig = -1;
-static int hf_addr_ext_action = -1;
-static int hf_addr_ext_rep_req = -1;
-static int hf_addr_ext_not_req = -1;
-static int hf_addr_ext_rec_ext = -1;
-static int hf_addr_ext_rec_no = -1;
-static int hf_addr_ext_rec_no1 = -1;
-static int hf_addr_ext_rec_no2 = -1;
-static int hf_addr_ext_rec_no_generated = -1;
-static int hf_addr_ext_address = -1;
-static int hf_addr_ext_type = -1;
-static int hf_addr_ext_type_ext = -1;
-static int hf_addr_ext_length = -1;
-static int hf_addr_ext_length1 = -1;
-static int hf_addr_ext_length2 = -1;
-static int hf_addr_ext_length_generated = -1;
-static int hf_addr_ext_asn1_ber = -1;
-static int hf_addr_ext_asn1_per = -1;
-static int hf_addr_ext_unknown = -1;
-
-static int hf_message_body = -1;
-static int hf_message_st_type = -1;
-static int hf_message_precedence = -1;
-static int hf_message_importance = -1;
-static int hf_message_body_format = -1;
-static int hf_message_sec_class_val = -1;
-static int hf_message_sec_pol = -1;
-static int hf_message_heading_flags = -1;
-static int hf_message_auth_users = -1;
-static int hf_message_subject_disc = -1;
-static int hf_message_national_policy_id = -1;
-static int hf_message_mission_policy_id = -1;
-static int hf_message_sec_label = -1;
-static int hf_message_sec_cat_nat = -1;
-static int hf_message_sec_cat_val = -1;
-static int hf_message_sec_cat_cl = -1;
-static int hf_message_sec_cat_cs = -1;
-static int hf_message_sec_cat_ex = -1;
-static int hf_message_sec_cat_ne = -1;
-static int hf_message_sec_cat_permissive = -1;
-static int hf_message_sec_cat_country_code = -1;
-static int hf_message_sec_cat_restrictive = -1;
-static int hf_message_sec_cat_extended = -1;
-static int hf_message_sec_cat_bit0 = -1;
-static int hf_message_sec_cat_bit1 = -1;
-static int hf_message_sec_cat_bit2 = -1;
-static int hf_message_sec_cat_bit3 = -1;
-static int hf_message_sec_cat_bit4 = -1;
-static int hf_message_sec_cat_bit5 = -1;
-static int hf_message_sec_cat_bit6 = -1;
-static int hf_message_sec_cat_bit7 = -1;
-static int hf_message_exp_time = -1;
-static int hf_message_exp_time_val = -1;
-static int hf_message_dtg = -1;
-static int hf_message_dtg_sign = -1;
-static int hf_message_dtg_val = -1;
-static int hf_message_sic = -1;
-static int hf_message_sic_key = -1;
-static int hf_message_sic_key_values = -1;
-static int hf_message_sic_key_type = -1;
-static int hf_message_sic_key_chars = -1;
-static int hf_message_sic_key_num = -1;
-static int hf_message_sic_bitmap = -1;
-static int hf_message_sic_bits = -1;
-static int hf_message_sic_bits_any = -1;
-static int hf_message_subj_id = -1;
-static int hf_message_subj_mts_id = -1;
-static int hf_message_subj_ipm_id = -1;
-
-static int hf_message_subject = -1;
-static int hf_message_eit = -1;
-static int hf_message_compr = -1;
-static int hf_message_body_data = -1;
-static int hf_message_body_compressed = -1;
-static int hf_message_body_plain = -1;
-static int hf_message_body_structured = -1;
-
-static int hf_delivery_report = -1;
-static int hf_non_delivery_report = -1;
-static int hf_report_type = -1;
-static int hf_report_info_present_dr = -1;
-static int hf_report_addr_enc_dr = -1;
-static int hf_report_del_time = -1;
-static int hf_report_del_time_val = -1;
-static int hf_report_addr_enc_ndr = -1;
-static int hf_report_reason = -1;
-static int hf_report_info_present_ndr = -1;
-static int hf_report_diagn = -1;
-static int hf_report_suppl_info_len = -1;
-static int hf_report_suppl_info = -1;
-
-static int hf_receipt_notif = -1;
-static int hf_non_receipt_notif = -1;
-static int hf_other_notif = -1;
-static int hf_notif_type = -1;
-static int hf_notif_rec_time = -1;
-static int hf_notif_rec_time_val = -1;
-static int hf_notif_suppl_info_len = -1;
-static int hf_notif_suppl_info = -1;
-static int hf_notif_non_rec_reason = -1;
-static int hf_notif_discard_reason = -1;
-static int hf_notif_on_type = -1;
-static int hf_notif_acp127 = -1;
-static int hf_notif_acp127recip = -1;
-
-static int hf_ack = -1;
-static int hf_ack_reason = -1;
-static int hf_ack_diagnostic = -1;
-static int hf_ack_recips = -1;
-
-static int hf_checksum = -1;
-static int hf_checksum_status = -1;
-
-static int hf_analysis_ack_time = -1;
-static int hf_analysis_total_time = -1;
-static int hf_analysis_retrans_time = -1;
-static int hf_analysis_total_retrans_time = -1;
-static int hf_analysis_msg_num = -1;
-static int hf_analysis_acks_msg_num = -1;
-static int hf_analysis_retrans_no = -1;
-static int hf_analysis_ack_num = -1;
-static int hf_analysis_ack_missing = -1;
-static int hf_analysis_ack_dup_no = -1;
-/* static int hf_analysis_rep_num = -1; */
-static int hf_analysis_acks_rep_num = -1;
-static int hf_analysis_rep_time = -1;
-/* static int hf_analysis_not_num = -1; */
-static int hf_analysis_acks_not_num = -1;
-static int hf_analysis_not_time = -1;
-static int hf_analysis_msg_resend_from = -1;
-static int hf_analysis_rep_resend_from = -1;
-static int hf_analysis_not_resend_from = -1;
-static int hf_analysis_ack_resend_from = -1;
-
-static int hf_reserved_0x01 = -1;
-static int hf_reserved_0x02 = -1;
-static int hf_reserved_0x04 = -1;
-static int hf_reserved_0x07 = -1;
-static int hf_reserved_0x08 = -1;
-static int hf_reserved_0x0F = -1;
-static int hf_reserved_0x1F = -1;
-static int hf_reserved_0x20 = -1;
-static int hf_reserved_0x40 = -1;
-static int hf_reserved_0xC0 = -1;
-static int hf_reserved_0xE0 = -1;
-static int hf_reserved_0x8000 = -1;
-
-static gint ett_dmp = -1;
-static gint ett_envelope = -1;
-static gint ett_envelope_version = -1;
-static gint ett_envelope_hop_count = -1;
-static gint ett_envelope_rec_present = -1;
-static gint ett_envelope_addr_enc = -1;
-static gint ett_envelope_checksum = -1;
-static gint ett_envelope_extensions = -1;
-static gint ett_envelope_msg_id_type = -1;
-static gint ett_envelope_msg_id = -1;
-static gint ett_envelope_mts_id_length = -1;
-static gint ett_envelope_ipm_id_length = -1;
-static gint ett_envelope_cont_type = -1;
-static gint ett_envelope_subm_time = -1;
-static gint ett_envelope_time_diff = -1;
-static gint ett_envelope_flags = -1;
-static gint ett_envelope_recipients = -1;
-static gint ett_envelope_ext_recipients = -1;
-static gint ett_envelope_addresses = -1;
-
-static gint ett_address = -1;
-static gint ett_address_direct = -1;
-static gint ett_address_rec_no = -1;
-static gint ett_address_extended = -1;
-static gint ett_address_ext_form = -1;
-static gint ett_address_ext_rec_no = -1;
-static gint ett_address_ext_action = -1;
-static gint ett_address_ext_rep_req = -1;
-static gint ett_address_ext_not_req = -1;
-static gint ett_address_ext_type = -1;
-static gint ett_address_ext_length = -1;
-
-static gint ett_extensions = -1;
-static gint ett_extension = -1;
-static gint ett_extension_header = -1;
-
-static gint ett_content = -1;
-
-static gint ett_message = -1;
-static gint ett_message_st_type = -1;
-static gint ett_message_reserved = -1;
-static gint ett_message_precedence = -1;
-static gint ett_message_importance = -1;
-static gint ett_message_body_format = -1;
-static gint ett_message_sec_class = -1;
-static gint ett_message_sec_pol = -1;
-static gint ett_message_sec_cat = -1;
-static gint ett_message_heading_flags = -1;
-static gint ett_message_exp_time = -1;
-static gint ett_message_dtg = -1;
-static gint ett_message_sic = -1;
-static gint ett_message_sic_key = -1;
-static gint ett_message_sic_bitmap = -1;
-static gint ett_message_sic_bits = -1;
-static gint ett_message_eit = -1;
-static gint ett_message_compr = -1;
-static gint ett_message_body_reserved = -1;
-static gint ett_message_body = -1;
-
-static gint ett_report = -1;
-static gint ett_report_type = -1;
-static gint ett_report_info_present_dr = -1;
-static gint ett_report_info_present_ndr = -1;
-static gint ett_report_addr_enc_dr = -1;
-static gint ett_report_addr_enc_ndr = -1;
-static gint ett_report_reserved = -1;
-static gint ett_report_del_time = -1;
-static gint ett_report_reason = -1;
-static gint ett_report_suppl_info = -1;
-static gint ett_report_diagn = -1;
-
-static gint ett_notif = -1;
-static gint ett_notif_type = -1;
-static gint ett_notif_rec_time = -1;
-static gint ett_notif_suppl_info = -1;
-static gint ett_notif_acp127recip = -1;
-
-static gint ett_ack = -1;
-static gint ett_ack_recips = -1;
-
-static gint ett_analysis = -1;
-
-static expert_field ei_reserved_value = EI_INIT;
-static expert_field ei_message_sic_illegal = EI_INIT;
-static expert_field ei_envelope_version_value = EI_INIT;
-static expert_field ei_message_compr = EI_INIT;
-static expert_field ei_ack_reason = EI_INIT;
-static expert_field ei_addr_dir_rec_no_generated = EI_INIT;
-static expert_field ei_checksum_bad = EI_INIT;
-static expert_field ei_message_body_uncompress = EI_INIT;
-static expert_field ei_addr_ext_rec_no_generated = EI_INIT;
-static expert_field ei_envelope_msg_id = EI_INIT;
-static expert_field ei_7bit_string_unused_bits = EI_INIT;
-static expert_field ei_analysis_ack_missing = EI_INIT;
-static expert_field ei_analysis_ack_dup_no = EI_INIT;
-static expert_field ei_analysis_ack_unexpected = EI_INIT;
-static expert_field ei_analysis_msg_missing = EI_INIT;
-static expert_field ei_analysis_retrans_no = EI_INIT;
-static expert_field ei_too_many_sec_cat = EI_INIT;
+static int proto_dmp;
+
+static int hf_dmp_id;
+static int hf_mts_id;
+static int hf_ipm_id;
+
+static int hf_envelope;
+static int hf_envelope_protocol_id;
+static int hf_envelope_version;
+static int hf_envelope_version_value;
+static int hf_envelope_hop_count;
+static int hf_envelope_hop_count_value;
+static int hf_envelope_rec_present;
+static int hf_envelope_addr_enc;
+static int hf_envelope_checksum;
+static int hf_envelope_extensions;
+static int hf_envelope_msg_id_type;
+static int hf_envelope_msg_id_length;
+static int hf_envelope_mts_id_length;
+static int hf_envelope_ipm_id_modifier;
+static int hf_envelope_ipm_id_length;
+static int hf_envelope_mts_id;
+static int hf_envelope_ipm_id;
+static int hf_envelope_type;
+static int hf_envelope_msg_id;
+static int hf_envelope_msg_id_12bit;
+static int hf_envelope_subm_time;
+static int hf_envelope_subm_time_value;
+static int hf_envelope_time_diff_present;
+static int hf_envelope_time_diff;
+static int hf_envelope_time_diff_value;
+static int hf_envelope_flags;
+static int hf_envelope_content_id_discarded;
+static int hf_envelope_recip_reassign_prohib;
+static int hf_envelope_dl_expansion_prohib;
+static int hf_envelope_recipients;
+static int hf_envelope_ext_recipients;
+
+static int hf_thales_ipm_id_modifier;
+
+static int hf_extensions;
+static int hf_extension;
+static int hf_extension_header;
+static int hf_extension_more;
+static int hf_extension_length;
+static int hf_extension_data;
+
+static int hf_message_content;
+static int hf_report_content;
+static int hf_notif_content;
+
+static int hf_addr_recipient;
+static int hf_addr_originator;
+static int hf_addr_reporting_name;
+static int hf_addr_dl_expanded;
+static int hf_addr_int_rec;
+static int hf_addr_dir_addr_ext;
+static int hf_addr_dir_rec_no;
+static int hf_addr_dir_rec_no1;
+static int hf_addr_dir_rec_no2;
+static int hf_addr_dir_rec_no3;
+static int hf_addr_dir_rec_no_generated;
+static int hf_addr_dir_rep_req1;
+static int hf_addr_dir_rep_req2;
+static int hf_addr_dir_rep_req3;
+static int hf_addr_dir_not_req1;
+static int hf_addr_dir_not_req2;
+static int hf_addr_dir_not_req3;
+static int hf_addr_dir_action;
+static int hf_addr_dir_address;
+static int hf_addr_dir_address1;
+static int hf_addr_dir_address2;
+static int hf_addr_dir_address3;
+static int hf_addr_dir_address_generated;
+
+static int hf_addr_ext_form;
+static int hf_addr_ext_form_orig_v1;
+static int hf_addr_ext_form_orig;
+static int hf_addr_ext_action;
+static int hf_addr_ext_rep_req;
+static int hf_addr_ext_not_req;
+static int hf_addr_ext_rec_ext;
+static int hf_addr_ext_rec_no;
+static int hf_addr_ext_rec_no1;
+static int hf_addr_ext_rec_no2;
+static int hf_addr_ext_rec_no_generated;
+static int hf_addr_ext_address;
+static int hf_addr_ext_type;
+static int hf_addr_ext_type_ext;
+static int hf_addr_ext_length;
+static int hf_addr_ext_length1;
+static int hf_addr_ext_length2;
+static int hf_addr_ext_length_generated;
+static int hf_addr_ext_asn1_ber;
+static int hf_addr_ext_asn1_per;
+static int hf_addr_ext_unknown;
+
+static int hf_message_body;
+static int hf_message_st_type;
+static int hf_message_precedence;
+static int hf_message_importance;
+static int hf_message_body_format;
+static int hf_message_sec_class_val;
+static int hf_message_sec_pol;
+static int hf_message_heading_flags;
+static int hf_message_auth_users;
+static int hf_message_subject_disc;
+static int hf_message_national_policy_id;
+static int hf_message_mission_policy_id;
+static int hf_message_sec_label;
+static int hf_message_sec_cat_nat;
+static int hf_message_sec_cat_val;
+static int hf_message_sec_cat_cl;
+static int hf_message_sec_cat_cs;
+static int hf_message_sec_cat_ex;
+static int hf_message_sec_cat_ne;
+static int hf_message_sec_cat_permissive;
+static int hf_message_sec_cat_country_code;
+static int hf_message_sec_cat_restrictive;
+static int hf_message_sec_cat_extended;
+static int hf_message_sec_cat_bit0;
+static int hf_message_sec_cat_bit1;
+static int hf_message_sec_cat_bit2;
+static int hf_message_sec_cat_bit3;
+static int hf_message_sec_cat_bit4;
+static int hf_message_sec_cat_bit5;
+static int hf_message_sec_cat_bit6;
+static int hf_message_sec_cat_bit7;
+static int hf_message_exp_time;
+static int hf_message_exp_time_val;
+static int hf_message_dtg;
+static int hf_message_dtg_sign;
+static int hf_message_dtg_val;
+static int hf_message_sic;
+static int hf_message_sic_key;
+static int hf_message_sic_key_values;
+static int hf_message_sic_key_type;
+static int hf_message_sic_key_chars;
+static int hf_message_sic_key_num;
+static int hf_message_sic_bitmap;
+static int hf_message_sic_bits;
+static int hf_message_sic_bits_any;
+static int hf_message_subj_id;
+static int hf_message_subj_mts_id;
+static int hf_message_subj_ipm_id;
+
+static int hf_message_subject;
+static int hf_message_eit;
+static int hf_message_compr;
+static int hf_message_body_data;
+static int hf_message_body_compressed;
+static int hf_message_body_plain;
+static int hf_message_body_structured;
+
+static int hf_delivery_report;
+static int hf_non_delivery_report;
+static int hf_report_type;
+static int hf_report_info_present_dr;
+static int hf_report_addr_enc_dr;
+static int hf_report_del_time;
+static int hf_report_del_time_val;
+static int hf_report_addr_enc_ndr;
+static int hf_report_reason;
+static int hf_report_info_present_ndr;
+static int hf_report_diagn;
+static int hf_report_suppl_info_len;
+static int hf_report_suppl_info;
+
+static int hf_receipt_notif;
+static int hf_non_receipt_notif;
+static int hf_other_notif;
+static int hf_notif_type;
+static int hf_notif_rec_time;
+static int hf_notif_rec_time_val;
+static int hf_notif_suppl_info_len;
+static int hf_notif_suppl_info;
+static int hf_notif_non_rec_reason;
+static int hf_notif_discard_reason;
+static int hf_notif_on_type;
+static int hf_notif_acp127;
+static int hf_notif_acp127recip;
+
+static int hf_ack;
+static int hf_ack_reason;
+static int hf_ack_diagnostic;
+static int hf_ack_recips;
+
+static int hf_checksum;
+static int hf_checksum_status;
+
+static int hf_analysis_ack_time;
+static int hf_analysis_total_time;
+static int hf_analysis_retrans_time;
+static int hf_analysis_total_retrans_time;
+static int hf_analysis_msg_num;
+static int hf_analysis_acks_msg_num;
+static int hf_analysis_retrans_no;
+static int hf_analysis_ack_num;
+static int hf_analysis_ack_missing;
+static int hf_analysis_ack_dup_no;
+/* static int hf_analysis_rep_num; */
+static int hf_analysis_acks_rep_num;
+static int hf_analysis_rep_time;
+/* static int hf_analysis_not_num; */
+static int hf_analysis_acks_not_num;
+static int hf_analysis_not_time;
+static int hf_analysis_msg_resend_from;
+static int hf_analysis_rep_resend_from;
+static int hf_analysis_not_resend_from;
+static int hf_analysis_ack_resend_from;
+
+static int hf_reserved_0x01;
+static int hf_reserved_0x02;
+static int hf_reserved_0x04;
+static int hf_reserved_0x07;
+static int hf_reserved_0x08;
+static int hf_reserved_0x0F;
+static int hf_reserved_0x1F;
+static int hf_reserved_0x20;
+static int hf_reserved_0x40;
+static int hf_reserved_0xC0;
+static int hf_reserved_0xE0;
+static int hf_reserved_0x8000;
+
+static gint ett_dmp;
+static gint ett_envelope;
+static gint ett_envelope_version;
+static gint ett_envelope_hop_count;
+static gint ett_envelope_rec_present;
+static gint ett_envelope_addr_enc;
+static gint ett_envelope_checksum;
+static gint ett_envelope_extensions;
+static gint ett_envelope_msg_id_type;
+static gint ett_envelope_msg_id;
+static gint ett_envelope_mts_id_length;
+static gint ett_envelope_ipm_id_length;
+static gint ett_envelope_cont_type;
+static gint ett_envelope_subm_time;
+static gint ett_envelope_time_diff;
+static gint ett_envelope_flags;
+static gint ett_envelope_recipients;
+static gint ett_envelope_ext_recipients;
+static gint ett_envelope_addresses;
+
+static gint ett_address;
+static gint ett_address_direct;
+static gint ett_address_rec_no;
+static gint ett_address_extended;
+static gint ett_address_ext_form;
+static gint ett_address_ext_rec_no;
+static gint ett_address_ext_action;
+static gint ett_address_ext_rep_req;
+static gint ett_address_ext_not_req;
+static gint ett_address_ext_type;
+static gint ett_address_ext_length;
+
+static gint ett_extensions;
+static gint ett_extension;
+static gint ett_extension_header;
+
+static gint ett_content;
+
+static gint ett_message;
+static gint ett_message_st_type;
+static gint ett_message_reserved;
+static gint ett_message_precedence;
+static gint ett_message_importance;
+static gint ett_message_body_format;
+static gint ett_message_sec_class;
+static gint ett_message_sec_pol;
+static gint ett_message_sec_cat;
+static gint ett_message_heading_flags;
+static gint ett_message_exp_time;
+static gint ett_message_dtg;
+static gint ett_message_sic;
+static gint ett_message_sic_key;
+static gint ett_message_sic_bitmap;
+static gint ett_message_sic_bits;
+static gint ett_message_eit;
+static gint ett_message_compr;
+static gint ett_message_body_reserved;
+static gint ett_message_body;
+
+static gint ett_report;
+static gint ett_report_type;
+static gint ett_report_info_present_dr;
+static gint ett_report_info_present_ndr;
+static gint ett_report_addr_enc_dr;
+static gint ett_report_addr_enc_ndr;
+static gint ett_report_reserved;
+static gint ett_report_del_time;
+static gint ett_report_reason;
+static gint ett_report_suppl_info;
+static gint ett_report_diagn;
+
+static gint ett_notif;
+static gint ett_notif_type;
+static gint ett_notif_rec_time;
+static gint ett_notif_suppl_info;
+static gint ett_notif_acp127recip;
+
+static gint ett_ack;
+static gint ett_ack_recips;
+
+static gint ett_analysis;
+
+static expert_field ei_reserved_value;
+static expert_field ei_message_sic_illegal;
+static expert_field ei_envelope_version_value;
+static expert_field ei_message_compr;
+static expert_field ei_ack_reason;
+static expert_field ei_addr_dir_rec_no_generated;
+static expert_field ei_checksum_bad;
+static expert_field ei_message_body_uncompress;
+static expert_field ei_addr_ext_rec_no_generated;
+static expert_field ei_envelope_msg_id;
+static expert_field ei_7bit_string_unused_bits;
+static expert_field ei_analysis_ack_missing;
+static expert_field ei_analysis_ack_dup_no;
+static expert_field ei_analysis_ack_unexpected;
+static expert_field ei_analysis_msg_missing;
+static expert_field ei_analysis_retrans_no;
+static expert_field ei_too_many_sec_cat;
static dissector_handle_t dmp_handle;
@@ -1265,7 +1265,7 @@ static gboolean dmp_dec_xbyte_sic (guint64 bin, gchar *sic,
if (no_char >= MAX_SIC_LEN) {
/* Illegal length */
- g_snprintf (sic, MAX_SIC_LEN, "Illegal length: %d", no_char);
+ snprintf (sic, MAX_SIC_LEN, "Illegal length: %d", no_char);
return TRUE;
}
@@ -1317,6 +1317,10 @@ static gboolean dmp_dec_xbyte_sic (guint64 bin, gchar *sic,
sic[i] = '*';
failure = TRUE;
}
+ if (!g_ascii_isprint(sic[i])) {
+ sic[i] = '*';
+ failure = TRUE;
+ }
}
sic[i] = '\0';
@@ -1692,7 +1696,7 @@ static gint dissect_dmp_sic (tvbuff_t *tvb, packet_info *pinfo,
gchar *sic = NULL;
key = tvb_get_guint8 (tvb, offset);
- sic = (gchar *)wmem_alloc (wmem_packet_scope(), MAX_SIC_LEN);
+ sic = (gchar *)wmem_alloc (pinfo->pool, MAX_SIC_LEN);
if (key <= 0xB6) {
/* 2 bytes, single 3-character SIC, characters [A-Z0-9] only */
@@ -1725,7 +1729,7 @@ static gint dissect_dmp_sic (tvbuff_t *tvb, packet_info *pinfo,
} else if (key <= 0xBF) {
/* Reserved (not used) */
- g_snprintf (sic, MAX_SIC_LEN, "Reserved");
+ snprintf (sic, MAX_SIC_LEN, "Reserved");
no_sic = TRUE;
} else if (key <= 0xCF) {
@@ -1860,7 +1864,7 @@ static gint dissect_dmp_sic (tvbuff_t *tvb, packet_info *pinfo,
failure = dmp_dec_xbyte_sic (value, sic, length, any);
bf = proto_tree_add_string_format (sic_tree, hf_message_sic, tvb,
offset, bytes, sic,
- "SIC %d: %s (%d bytes: %" G_GINT64_MODIFIER "x)%s",
+ "SIC %d: %s (%d bytes: %" PRIx64 ")%s",
i + 1, sic, bytes, value,
failure ? " (invalid)": "");
if (bitmap & (1 << (7 - i))) {
@@ -1882,12 +1886,12 @@ static gint dissect_dmp_sic (tvbuff_t *tvb, packet_info *pinfo,
} else if (key == 0xFE) {
/* No SIC */
- g_snprintf (sic, MAX_SIC_LEN, "Not present");
+ snprintf (sic, MAX_SIC_LEN, "Not present");
no_sic = TRUE;
} else {
/* Resered (not used) */
- g_snprintf (sic, MAX_SIC_LEN, "Reserved");
+ snprintf (sic, MAX_SIC_LEN, "Reserved");
no_sic = TRUE;
}
@@ -2658,10 +2662,10 @@ static gint dissect_mts_identifier (tvbuff_t *tvb, packet_info *pinfo, proto_tre
} else if (dmp_nat_decode == NAT_DECODE_THALES) {
mts_id = dissect_thales_mts_id (tvb, offset, dmp.mts_id_length, &byte_rest);
} else {
- mts_id = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, dmp.mts_id_length);
+ mts_id = tvb_bytes_to_str(pinfo->pool, tvb, offset, dmp.mts_id_length);
}
proto_item_append_text (dmp.mts_id_item, " (%zu bytes decompressed)", strlen(mts_id));
- mts_id = format_text(wmem_packet_scope(), mts_id, strlen(mts_id));
+ mts_id = format_text(pinfo->pool, mts_id, strlen(mts_id));
if (subject) {
ti = proto_tree_add_string (tree, hf_message_subj_mts_id, tvb, offset, dmp.mts_id_length, mts_id);
hidden_item = proto_tree_add_string (tree, hf_mts_id, tvb, offset, dmp.mts_id_length, mts_id);
@@ -2714,10 +2718,10 @@ static gint dissect_ipm_identifier (tvbuff_t *tvb, packet_info *pinfo, proto_tre
} else if (dmp_nat_decode == NAT_DECODE_THALES) {
ipm_id = dissect_thales_ipm_id (tvb, offset, ipm_id_length, modifier, &byte_rest);
} else {
- ipm_id = tvb_bytes_to_str(wmem_packet_scope(), tvb, offset, ipm_id_length);
+ ipm_id = tvb_bytes_to_str(pinfo->pool, tvb, offset, ipm_id_length);
}
proto_item_append_text (tf, " (%zu bytes decompressed)", strlen(ipm_id));
- ipm_id = format_text(wmem_packet_scope(), ipm_id, strlen(ipm_id));
+ ipm_id = format_text(pinfo->pool, ipm_id, strlen(ipm_id));
if (subject) {
ti = proto_tree_add_string (tree, hf_message_subj_ipm_id, tvb, offset, ipm_id_length, ipm_id);
hidden_item = proto_tree_add_string (tree, hf_ipm_id, tvb, offset, ipm_id_length, ipm_id);
@@ -2933,7 +2937,7 @@ static gint dissect_dmp_envelope (tvbuff_t *tvb, packet_info *pinfo,
"Submission time: %s",
(subm_time & 0x7FFF) >= 0x7FF8 ?
"Reserved" :
- abs_time_secs_to_str (wmem_packet_scope(), dmp.subm_time, ABSOLUTE_TIME_LOCAL, TRUE));
+ abs_time_secs_to_str (pinfo->pool, dmp.subm_time, ABSOLUTE_TIME_LOCAL, TRUE));
field_tree = proto_item_add_subtree (tf, ett_envelope_subm_time);
proto_tree_add_item (field_tree, hf_envelope_time_diff_present, tvb, offset, 2, ENC_BIG_ENDIAN);
proto_tree_add_item (field_tree, hf_envelope_subm_time_value, tvb, offset, 2, ENC_BIG_ENDIAN);
@@ -2951,7 +2955,7 @@ static gint dissect_dmp_envelope (tvbuff_t *tvb, packet_info *pinfo,
if (secs == DMP_TIME_RESERVED) {
proto_item_append_text (tf, "Reserved (0x%2.2x)", time_diff);
} else {
- proto_item_append_text (tf, "%s", signed_time_secs_to_str(wmem_packet_scope(), secs));
+ proto_item_append_text (tf, "%s", signed_time_secs_to_str(pinfo->pool, secs));
}
offset += 1;
}
@@ -2968,7 +2972,7 @@ static gint dissect_dmp_envelope (tvbuff_t *tvb, packet_info *pinfo,
proto_tree_add_item (field_tree, hf_envelope_dl_expansion_prohib, tvb, offset, 1, ENC_BIG_ENDIAN);
if (envelope & 0xE0) {
- env_flags = wmem_strdup_printf (wmem_packet_scope(), "%s%s%s",
+ env_flags = wmem_strdup_printf (pinfo->pool, "%s%s%s",
(envelope & 0x80) ? ", ContId discarded" : "",
(envelope & 0x40) ? ", Reass prohibited" : "",
(envelope & 0x20) ? ", DLE prohibited" : "");
@@ -3049,7 +3053,7 @@ static gint dissect_dmp_message (tvbuff_t *tvb, packet_info *pinfo,
if (dmp.body_format == FREE_TEXT_SUBJECT) {
len = tvb_strsize (tvb, offset);
- proto_tree_add_item (message_tree, hf_message_subject, tvb, offset, len, ENC_ASCII|ENC_NA);
+ proto_tree_add_item (message_tree, hf_message_subject, tvb, offset, len, ENC_ASCII);
offset += len;
}
@@ -3134,7 +3138,7 @@ static gint dissect_dmp_message (tvbuff_t *tvb, packet_info *pinfo,
if (eit != EIT_BILATERAL && body_len > 0) {
field_tree = proto_item_add_subtree (tf, ett_message_body);
proto_tree_add_item (field_tree, hf_message_body_plain, body_tvb,
- body_offset, body_len, ENC_ASCII|ENC_NA);
+ body_offset, body_len, ENC_ASCII);
}
}
offset += len;
@@ -3221,9 +3225,9 @@ static gint dissect_dmp_report (tvbuff_t *tvb, packet_info *pinfo,
proto_item_append_text (tf, "Reserved (0x%2.2x)", report);
proto_item_append_text (ei, " (Reserved)");
} else {
- proto_item_append_text (tf, "%s (%s)", signed_time_secs_to_str(wmem_packet_scope(), secs),
- abs_time_secs_to_str (wmem_packet_scope(), dmp.subm_time - secs, ABSOLUTE_TIME_LOCAL, TRUE));
- proto_item_append_text (ei, " (%s from submission time)", signed_time_secs_to_str(wmem_packet_scope(), secs));
+ proto_item_append_text (tf, "%s (%s)", signed_time_secs_to_str(pinfo->pool, secs),
+ abs_time_secs_to_str (pinfo->pool, dmp.subm_time - secs, ABSOLUTE_TIME_LOCAL, TRUE));
+ proto_item_append_text (ei, " (%s from submission time)", signed_time_secs_to_str(pinfo->pool, secs));
}
} else {
dmp.ndr = TRUE;
@@ -3285,7 +3289,7 @@ static gint dissect_dmp_report (tvbuff_t *tvb, packet_info *pinfo,
128 - (offset - boffset));
}
field_tree = proto_item_add_subtree (tf, ett_report_suppl_info);
- proto_tree_add_item (field_tree, hf_report_suppl_info, tvb, offset, len, ENC_ASCII|ENC_NA);
+ proto_tree_add_item (field_tree, hf_report_suppl_info, tvb, offset, len, ENC_ASCII);
}
offset += len;
}
@@ -3296,7 +3300,7 @@ static gint dissect_dmp_report (tvbuff_t *tvb, packet_info *pinfo,
}
/* Ref chapter 6.3.10.1 Notification structure */
-static gint dissect_dmp_notification (tvbuff_t *tvb, packet_info *pinfo _U_,
+static gint dissect_dmp_notification (tvbuff_t *tvb, packet_info *pinfo,
proto_tree *dmp_tree, gint offset)
{
proto_tree *notif_tree = NULL;
@@ -3333,9 +3337,9 @@ static gint dissect_dmp_notification (tvbuff_t *tvb, packet_info *pinfo _U_,
proto_item_append_text (tf, "Reserved (0x%2.2x)", rec_time);
proto_item_append_text (ei, " (Reserved)");
} else {
- proto_item_append_text (tf, "%s (%s)", signed_time_secs_to_str(wmem_packet_scope(), secs),
- abs_time_secs_to_str (wmem_packet_scope(), dmp.subm_time - secs, ABSOLUTE_TIME_LOCAL, TRUE));
- proto_item_append_text (ei, " (%s from submission time)", signed_time_secs_to_str(wmem_packet_scope(), secs));
+ proto_item_append_text (tf, "%s (%s)", signed_time_secs_to_str(pinfo->pool, secs),
+ abs_time_secs_to_str (pinfo->pool, dmp.subm_time - secs, ABSOLUTE_TIME_LOCAL, TRUE));
+ proto_item_append_text (ei, " (%s from submission time)", signed_time_secs_to_str(pinfo->pool, secs));
}
offset += 1;
@@ -3358,7 +3362,7 @@ static gint dissect_dmp_notification (tvbuff_t *tvb, packet_info *pinfo _U_,
128 - (offset - boffset));
}
field_tree = proto_item_add_subtree (tf, ett_notif_suppl_info);
- proto_tree_add_item (field_tree, hf_notif_suppl_info, tvb, offset, len, ENC_ASCII|ENC_NA);
+ proto_tree_add_item (field_tree, hf_notif_suppl_info, tvb, offset, len, ENC_ASCII);
}
offset += len;
@@ -3374,7 +3378,7 @@ static gint dissect_dmp_notification (tvbuff_t *tvb, packet_info *pinfo _U_,
proto_item_append_text (tf, " (incorrect, must be less than 64)");
}
field_tree = proto_item_add_subtree (tf, ett_notif_acp127recip);
- proto_tree_add_item (field_tree, hf_notif_acp127recip, tvb, offset, len, ENC_ASCII|ENC_NA);
+ proto_tree_add_item (field_tree, hf_notif_acp127recip, tvb, offset, len, ENC_ASCII);
}
offset += len;
}
@@ -3438,13 +3442,13 @@ static gint dissect_dmp_security_category (tvbuff_t *tvb, packet_info *pinfo,
}
if (message & 0xF0) {
- sec_cat = wmem_strdup_printf (wmem_packet_scope(), "%s%s%s%s",
+ sec_cat = wmem_strdup_printf (pinfo->pool, "%s%s%s%s",
(message & 0x80) ? ",cl" : "",
(message & 0x40) ? ",cs" : "",
(message & 0x20) ? ",ex" : "",
(message & 0x10) ? ",ne" : "");
proto_item_append_text (tf, ": %s", &sec_cat[1]);
- *label_string = wmem_strconcat(wmem_packet_scope(), *label_string, sec_cat, NULL);
+ *label_string = wmem_strconcat(pinfo->pool, *label_string, sec_cat, NULL);
}
break;
@@ -3457,7 +3461,7 @@ static gint dissect_dmp_security_category (tvbuff_t *tvb, packet_info *pinfo,
} else {
tr = proto_tree_add_item (field_tree, hf_message_sec_cat_permissive, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_item_append_text (tf, ": rel-to-%s", get_nat_pol_id_short (message >> 2));
- *label_string = wmem_strdup_printf(wmem_packet_scope(), "%s,rel-to-%s", *label_string, get_nat_pol_id_short (message >> 2));
+ *label_string = wmem_strdup_printf(pinfo->pool, "%s,rel-to-%s", *label_string, get_nat_pol_id_short (message >> 2));
if ((message >> 2) == 0) {
expert_add_info(pinfo, tr, &ei_reserved_value);
}
@@ -3520,7 +3524,7 @@ static gint dissect_dmp_content (tvbuff_t *tvb, packet_info *pinfo,
proto_tree *field_tree = NULL;
proto_item *en = NULL, *ei = NULL, *tf = NULL;
proto_item *hidden_item;
- const char *label_string = wmem_strdup (wmem_packet_scope(), "");
+ const char *label_string = wmem_strdup (pinfo->pool, "");
const gchar *class_name = NULL;
guint8 message, dmp_sec_pol, dmp_sec_class, dmp_nation = 0, exp_time, dtg;
gint32 secs = 0;
@@ -3639,7 +3643,7 @@ static gint dissect_dmp_content (tvbuff_t *tvb, packet_info *pinfo,
tf = proto_tree_add_item (field_tree, hf_message_sec_class_val, tvb, offset, 1, ENC_BIG_ENDIAN);
if (class_name) {
proto_item_append_text (tf, " (%s)", class_name);
- label_string = wmem_strconcat(wmem_packet_scope(), label_string, class_name, NULL);
+ label_string = wmem_strconcat(pinfo->pool, label_string, class_name, NULL);
}
/* Security Policy */
@@ -3755,9 +3759,9 @@ static gint dissect_dmp_content (tvbuff_t *tvb, packet_info *pinfo,
proto_item_append_text (tf, "Reserved (0x%2.2x)", exp_time);
proto_item_append_text (ei, " (Reserved)");
} else {
- proto_item_append_text (tf, "%s (%s)", signed_time_secs_to_str(wmem_packet_scope(), secs),
- abs_time_secs_to_str (wmem_packet_scope(), dmp.subm_time + secs, ABSOLUTE_TIME_LOCAL, TRUE));
- proto_item_append_text (ei, " (%s from submission time)", signed_time_secs_to_str(wmem_packet_scope(), secs));
+ proto_item_append_text (tf, "%s (%s)", signed_time_secs_to_str(pinfo->pool, secs),
+ abs_time_secs_to_str (pinfo->pool, dmp.subm_time + secs, ABSOLUTE_TIME_LOCAL, TRUE));
+ proto_item_append_text (ei, " (%s from submission time)", signed_time_secs_to_str(pinfo->pool, secs));
}
offset += 1;
}
@@ -3776,12 +3780,12 @@ static gint dissect_dmp_content (tvbuff_t *tvb, packet_info *pinfo,
} else if (secs == 0) {
proto_item_append_text (tf, "0 minutes in the %s (%s)",
tfs_get_string(dtg & 0x80, &dtg_sign),
- abs_time_secs_to_str (wmem_packet_scope(), dmp.subm_time, ABSOLUTE_TIME_LOCAL, TRUE));
+ abs_time_secs_to_str (pinfo->pool, dmp.subm_time, ABSOLUTE_TIME_LOCAL, TRUE));
} else {
- proto_item_append_text (tf, "%s in the %s (%s)", signed_time_secs_to_str(wmem_packet_scope(), secs),
+ proto_item_append_text (tf, "%s in the %s (%s)", signed_time_secs_to_str(pinfo->pool, secs),
tfs_get_string(dtg & 0x80, &dtg_sign), (dtg & 0x80) ?
- abs_time_secs_to_str (wmem_packet_scope(), dmp.subm_time + secs, ABSOLUTE_TIME_LOCAL, TRUE) :
- abs_time_secs_to_str (wmem_packet_scope(), dmp.subm_time - secs, ABSOLUTE_TIME_LOCAL, TRUE));
+ abs_time_secs_to_str (pinfo->pool, dmp.subm_time + secs, ABSOLUTE_TIME_LOCAL, TRUE) :
+ abs_time_secs_to_str (pinfo->pool, dmp.subm_time - secs, ABSOLUTE_TIME_LOCAL, TRUE));
}
offset += 1;
}
@@ -4126,10 +4130,10 @@ void proto_register_dmp (void)
BASE_HEX, NULL, 0x7FFF, NULL, HFILL } },
{ &hf_envelope_time_diff,
{ "Time Difference", "dmp.time_diff", FT_UINT8, BASE_HEX,
- NULL, 0xFF, NULL, HFILL } },
+ NULL, 0x0, NULL, HFILL } },
{ &hf_envelope_time_diff_value,
{ "Time Difference Value", "dmp.time_diff_value", FT_UINT8,
- BASE_HEX, NULL, 0xFF, NULL, HFILL } },
+ BASE_HEX, NULL, 0x0, NULL, HFILL } },
/* Envelope flags */
{ &hf_envelope_flags,
@@ -4268,7 +4272,7 @@ void proto_register_dmp (void)
BASE_DEC, NULL, 0x7F, "Recipient Number (bits 6-0) Offset", HFILL } },
{ &hf_addr_ext_rec_no2,
{ "Recipient Number (bits 14-7)", "dmp.rec_no_offset2", FT_UINT8,
- BASE_DEC, NULL, 0xFF, "Recipient Number (bits 14-7) Offset", HFILL } },
+ BASE_DEC, NULL, 0x0, "Recipient Number (bits 14-7) Offset", HFILL } },
{ &hf_addr_ext_address,
{ "Extended Address", "dmp.addr_form_ext", FT_NONE, BASE_NONE,
NULL, 0x0, NULL, HFILL } },
@@ -4422,12 +4426,12 @@ void proto_register_dmp (void)
NULL, 0x0, NULL, HFILL } },
{ &hf_message_exp_time_val,
{ "Expiry Time Value", "dmp.expiry_time_val", FT_UINT8, BASE_HEX,
- NULL, 0xFF, NULL, HFILL } },
+ NULL, 0x0, NULL, HFILL } },
/* DTG */
{ &hf_message_dtg,
{ "DTG", "dmp.dtg", FT_UINT8, BASE_HEX,
- NULL, 0xFF, NULL, HFILL } },
+ NULL, 0x0, NULL, HFILL } },
{ &hf_message_dtg_sign,
{ "DTG in the", "dmp.dtg.sign", FT_BOOLEAN, 8, TFS (&dtg_sign),
0x80, "Sign", HFILL } },
@@ -4539,7 +4543,7 @@ void proto_register_dmp (void)
NULL, 0x0, NULL, HFILL } },
{ &hf_report_del_time_val,
{ "Delivery Time Value", "dmp.delivery_time_val", FT_UINT8,
- BASE_HEX, NULL, 0xFF, NULL, HFILL } },
+ BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_report_addr_enc_ndr,
{ "Address Encoding", "dmp.addr_encoding", FT_BOOLEAN, 8,
TFS (&addr_enc), 0x40, NULL, HFILL } },
@@ -4582,7 +4586,7 @@ void proto_register_dmp (void)
NULL, 0x0, NULL, HFILL } },
{ &hf_notif_rec_time_val,
{ "Receipt Time Value", "dmp.receipt_time_val", FT_UINT8,
- BASE_HEX, NULL, 0xFF, NULL, HFILL } },
+ BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_notif_suppl_info_len,
{ "Supplementary Information", "dmp.suppl_info_len",
FT_UINT8, BASE_DEC, NULL, 0x0, "Supplementary Information Length",