summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-mpeg-dsmcc.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:53 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:53 +0000
commita86c5f7cae7ec9a3398300555a0b644689d946a1 (patch)
tree39fe4b107c71174fd1e8a8ceb9a4d2aa14116248 /epan/dissectors/packet-mpeg-dsmcc.c
parentReleasing progress-linux version 4.2.6-1~progress7.99u1. (diff)
downloadwireshark-a86c5f7cae7ec9a3398300555a0b644689d946a1.tar.xz
wireshark-a86c5f7cae7ec9a3398300555a0b644689d946a1.zip
Merging upstream version 4.4.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/dissectors/packet-mpeg-dsmcc.c')
-rw-r--r--epan/dissectors/packet-mpeg-dsmcc.c494
1 files changed, 247 insertions, 247 deletions
diff --git a/epan/dissectors/packet-mpeg-dsmcc.c b/epan/dissectors/packet-mpeg-dsmcc.c
index ca5c412f..bdd8c721 100644
--- a/epan/dissectors/packet-mpeg-dsmcc.c
+++ b/epan/dissectors/packet-mpeg-dsmcc.c
@@ -61,199 +61,199 @@ static dissector_handle_t dsmcc_ts_handle, dsmcc_tcp_handle, dsmcc_udp_handle;
*/
-static int proto_dsmcc = -1;
-static gboolean dsmcc_sect_check_crc = FALSE;
+static int proto_dsmcc;
+static bool dsmcc_sect_check_crc;
/* NOTE: Please add values numerically according to 13818-6 so it is easier to
* keep track of what parameters/tables are associated with each other.
*/
/* table 2-1 dsmccMessageHeader - start */
-static int hf_dsmcc_protocol_discriminator = -1;
-static int hf_dsmcc_type = -1;
-static int hf_dsmcc_message_id = -1;
-static int hf_dsmcc_transaction_id = -1;
-static int hf_dsmcc_header_reserved = -1;
-static int hf_dsmcc_adaptation_length = -1;
-static int hf_dsmcc_message_length = -1;
+static int hf_dsmcc_protocol_discriminator;
+static int hf_dsmcc_type;
+static int hf_dsmcc_message_id;
+static int hf_dsmcc_transaction_id;
+static int hf_dsmcc_header_reserved;
+static int hf_dsmcc_adaptation_length;
+static int hf_dsmcc_message_length;
/* table 2-1 dsmccMessageHeader - end */
/* table 2-3 transactionId - start */
-static int hf_dsmcc_un_sess_flag_transaction_id_originator = -1;
-static int hf_dsmcc_un_sess_flag_transaction_id_number = -1;
+static int hf_dsmcc_un_sess_flag_transaction_id_originator;
+static int hf_dsmcc_un_sess_flag_transaction_id_number;
/* table 2-3 transactionId - end */
/* table 2-4 dsmccAdaptationHeader - start */
-static int hf_dsmcc_adaptation_type = -1;
+static int hf_dsmcc_adaptation_type;
/* table 2-4 dsmccAdaptationHeader - end */
/* table 2-6 dsmccConditionalAccess - start */
-static int hf_dsmcc_adaptation_ca_reserved = -1;
-static int hf_dsmcc_adaptation_ca_system_id = -1;
-static int hf_dsmcc_adaptation_ca_length = -1;
+static int hf_dsmcc_adaptation_ca_reserved;
+static int hf_dsmcc_adaptation_ca_system_id;
+static int hf_dsmcc_adaptation_ca_length;
/* table 2-6 dsmccConditionalAccess - end */
/* table 2-7 dsmccUserId - start */
-static int hf_dsmcc_adaptation_user_id_reserved = -1;
+static int hf_dsmcc_adaptation_user_id_reserved;
/* table 2-7 dsmccUserId - end */
/* table 4-2, 4-3, 4-4 U-N messageDiscriminator - start */
-/*static int hf_dsmcc_un_sess_message_discriminator = -1;*/
-static int hf_dsmcc_un_sess_flag_message_discriminator = -1;
-static int hf_dsmcc_un_sess_flag_message_scenario = -1;
-static int hf_dsmcc_un_sess_flag_message_type = -1;
+/*static int hf_dsmcc_un_sess_message_discriminator;*/
+static int hf_dsmcc_un_sess_flag_message_discriminator;
+static int hf_dsmcc_un_sess_flag_message_scenario;
+static int hf_dsmcc_un_sess_flag_message_type;
/* table 4-2, 4-3, 4-4 U-N messageDiscriminator - end */
/* other tables in section 4.2 - start */
-static int hf_dsmcc_un_sess_response = -1;
-static int hf_dsmcc_un_sess_reason = -1;
-static int hf_dsmcc_un_sess_reserved = -1;
+static int hf_dsmcc_un_sess_response;
+static int hf_dsmcc_un_sess_reason;
+static int hf_dsmcc_un_sess_reserved;
/* other tables in section 4.2 - end */
/* table 4-6 U-N user data format - start */
-static int hf_dsmcc_un_sess_uu_data_len = -1;
-static int hf_dsmcc_un_sess_uu_data = -1;
-static int hf_dsmcc_un_sess_priv_data_len = -1;
-static int hf_dsmcc_un_sess_priv_data = -1;
+static int hf_dsmcc_un_sess_uu_data_len;
+static int hf_dsmcc_un_sess_uu_data;
+static int hf_dsmcc_un_sess_priv_data_len;
+static int hf_dsmcc_un_sess_priv_data;
/* table 4-6 U-N user data format - end */
/* table 4-7 U-N Resources - start */
-static int hf_dsmcc_un_sess_rsrc_desc_count = -1;
+static int hf_dsmcc_un_sess_rsrc_desc_count;
/* table 4-7 U-N Resources - end */
/* table 4-10 U-N Server Session Setup Indication - start */
-static int hf_dsmcc_un_sess_forward_count = -1;
+static int hf_dsmcc_un_sess_forward_count;
/* table 4-10 U-N Server Session Setup Indication - end */
/* 4-26 Server Delete Resource Request - start */
-static int hf_dsmcc_un_sess_resource_count = -1;
-static int hf_dsmcc_un_sess_resource_num = -1;
+static int hf_dsmcc_un_sess_resource_count;
+static int hf_dsmcc_un_sess_resource_num;
/* 4-26 Server Delete Resource Request - end */
/* table 4-30, 4-31, 4-32, 4-33, 4-34, 4-35, 4-36 - start */
-static int hf_dsmcc_un_sess_status_type = -1;
-static int hf_dsmcc_un_sess_status_count = -1;
-static int hf_dsmcc_un_sess_status_byte = -1;
+static int hf_dsmcc_un_sess_status_type;
+static int hf_dsmcc_un_sess_status_count;
+static int hf_dsmcc_un_sess_status_byte;
/* table 4-30, 4-31, 4-32, 4-33, 4-34, 4-35, 4-36 - end */
/* table 4-56 Client Session In Progress - start */
-static int hf_dsmcc_un_sess_session_count = -1;
+static int hf_dsmcc_un_sess_session_count;
/* table 4-56 Client Session In Progress - end */
/* table 4-58 Message Fields data types - start */
-static int hf_dsmcc_un_sess_session_id_device_id = -1;
-static int hf_dsmcc_un_sess_session_id_session_number = -1;
+static int hf_dsmcc_un_sess_session_id_device_id;
+static int hf_dsmcc_un_sess_session_id_session_number;
/* table 4-58 Message Fields data types - end */
/* table 4-63 U-N common descriptor header - start */
-static int hf_dsmcc_un_sess_rsrc_request_id = -1;
-static int hf_dsmcc_un_sess_rsrc_descriptor_type = -1;
-static int hf_dsmcc_un_sess_rsrc_number = -1;
-static int hf_dsmcc_un_sess_rsrc_association_tag = -1;
-static int hf_dsmcc_un_sess_rsrc_flags = -1;
-static int hf_dsmcc_un_sess_rsrc_status = -1;
-static int hf_dsmcc_un_sess_rsrc_desc_data_fields_length = -1;
-static int hf_dsmcc_un_sess_rsrc_data_field_count = -1;
-static int hf_dsmcc_un_sess_rsrc_type_owner_id = -1;
-static int hf_dsmcc_un_sess_rsrc_type_owner_value = -1;
+static int hf_dsmcc_un_sess_rsrc_request_id;
+static int hf_dsmcc_un_sess_rsrc_descriptor_type;
+static int hf_dsmcc_un_sess_rsrc_number;
+static int hf_dsmcc_un_sess_rsrc_association_tag;
+static int hf_dsmcc_un_sess_rsrc_flags;
+static int hf_dsmcc_un_sess_rsrc_status;
+static int hf_dsmcc_un_sess_rsrc_desc_data_fields_length;
+static int hf_dsmcc_un_sess_rsrc_data_field_count;
+static int hf_dsmcc_un_sess_rsrc_type_owner_id;
+static int hf_dsmcc_un_sess_rsrc_type_owner_value;
/* table 4-63 U-N common descriptor header - end */
/* table 4-64 U-N resource number assignor - start */
-static int hf_dsmcc_un_sess_rsrc_flag_num_assignor = -1;
-static int hf_dsmcc_un_sess_rsrc_flag_num_value = -1;
+static int hf_dsmcc_un_sess_rsrc_flag_num_assignor;
+static int hf_dsmcc_un_sess_rsrc_flag_num_value;
/* table 4-64 U-N resource number assignor - end */
/* table 4-65 U-N resource association tag assignor - start */
-static int hf_dsmcc_un_sess_rsrc_flag_association_tag_assignor = -1;
-static int hf_dsmcc_un_sess_rsrc_flag_association_tag_value = -1;
+static int hf_dsmcc_un_sess_rsrc_flag_association_tag_assignor;
+static int hf_dsmcc_un_sess_rsrc_flag_association_tag_value;
/* table 4-65 U-N resource association tag assignor - end */
/* table 4-66 U-N resource allocator - start */
-static int hf_dsmcc_un_sess_rsrc_flag_allocator = -1;
+static int hf_dsmcc_un_sess_rsrc_flag_allocator;
/* table 4-66 U-N resource allocator - end */
/* table 4-67 U-N resource attribute - start */
-static int hf_dsmcc_un_sess_rsrc_flag_attribute = -1;
+static int hf_dsmcc_un_sess_rsrc_flag_attribute;
/* table 4-67 U-N resource attribute - end */
/* table 4-68 U-N resource view - start */
-static int hf_dsmcc_un_sess_rsrc_flag_view = -1;
+static int hf_dsmcc_un_sess_rsrc_flag_view;
/* table 4-68 U-N resource view - end */
/* table 4-71 U-N dsmccResourceDescriptorValue() format - start */
-static int hf_dsmcc_un_sess_rsrc_value_type = -1;
-static int hf_dsmcc_un_sess_rsrc_value_count = -1;
-static int hf_dsmcc_un_sess_rsrc_value_data = -1;
-static int hf_dsmcc_un_sess_rsrc_most_desired = -1;
-static int hf_dsmcc_un_sess_rsrc_least_desired = -1;
+static int hf_dsmcc_un_sess_rsrc_value_type;
+static int hf_dsmcc_un_sess_rsrc_value_count;
+static int hf_dsmcc_un_sess_rsrc_value_data;
+static int hf_dsmcc_un_sess_rsrc_most_desired;
+static int hf_dsmcc_un_sess_rsrc_least_desired;
/* table 4-71 U-N dsmccResourceDescriptorValue() format - end */
/* table 4-74 U-N Continuous Feed Session resource descriptor - start */
-static int hf_dsmcc_un_sess_rsrc_cfs_num_count = -1;
-static int hf_dsmcc_un_sess_rsrc_cfs_num = -1;
+static int hf_dsmcc_un_sess_rsrc_cfs_num_count;
+static int hf_dsmcc_un_sess_rsrc_cfs_num;
/* table 4-74 U-N Continuous Feed Session resource descriptor - end */
/* table 4-75 U-N ATM Connection resource descriptor - start */
-static int hf_dsmcc_un_sess_rsrc_atm_vpi = -1;
-static int hf_dsmcc_un_sess_rsrc_atm_vci = -1;
+static int hf_dsmcc_un_sess_rsrc_atm_vpi;
+static int hf_dsmcc_un_sess_rsrc_atm_vci;
/* table 4-75 U-N ATM Connection resource descriptor - end */
/* table 4-76 MPEG Program - start */
-static int hf_dsmcc_un_sess_rsrc_mpeg_ca_pid = -1;
-static int hf_dsmcc_un_sess_rsrc_mpeg_elem_stream_count = -1;
+static int hf_dsmcc_un_sess_rsrc_mpeg_ca_pid;
+static int hf_dsmcc_un_sess_rsrc_mpeg_elem_stream_count;
/* table 4-76 MPEG Program - end */
/* table 4-77 Physical Channel - start */
-static int hf_dsmcc_un_sess_rsrc_phys_chan_direction = -1;
+static int hf_dsmcc_un_sess_rsrc_phys_chan_direction;
/* table 4-77 Physical Channel - end */
/* table 4-84 IP - start */
-static int hf_dsmcc_un_sess_rsrc_src_ip_addr = -1;
-static int hf_dsmcc_un_sess_rsrc_src_ip_port = -1;
-static int hf_dsmcc_un_sess_rsrc_dst_ip_addr = -1;
-static int hf_dsmcc_un_sess_rsrc_dst_ip_port = -1;
-static int hf_dsmcc_un_sess_rsrc_ip_protocol = -1;
+static int hf_dsmcc_un_sess_rsrc_src_ip_addr;
+static int hf_dsmcc_un_sess_rsrc_src_ip_port;
+static int hf_dsmcc_un_sess_rsrc_dst_ip_addr;
+static int hf_dsmcc_un_sess_rsrc_dst_ip_port;
+static int hf_dsmcc_un_sess_rsrc_ip_protocol;
/* table 4-84 IP - end */
/* table 4-86 PSTN Setup - start */
-static int hf_dsmcc_un_sess_rsrc_pstn_calling_id = -1;
-static int hf_dsmcc_un_sess_rsrc_pstn_called_id = -1;
+static int hf_dsmcc_un_sess_rsrc_pstn_calling_id;
+static int hf_dsmcc_un_sess_rsrc_pstn_called_id;
/* table 4-86 PSTN Setup - end */
/* Table 4-89 Q.922 Connection - start */
-static int hf_dsmcc_un_sess_rsrc_dlci_count = -1;
-static int hf_dsmcc_un_sess_rsrc_dlci = -1;
-static int hf_dsmcc_un_sess_rsrc_dl_association_tag = -1;
+static int hf_dsmcc_un_sess_rsrc_dlci_count;
+static int hf_dsmcc_un_sess_rsrc_dlci;
+static int hf_dsmcc_un_sess_rsrc_dl_association_tag;
/* Table 4-89 Q.922 Connection - end */
/* table 4-90 Shared Resource - start */
-static int hf_dsmcc_un_sess_rsrc_shared_resource_num = -1;
+static int hf_dsmcc_un_sess_rsrc_shared_resource_num;
/* table 4-90 Shared Resource - end */
/* table 4-91 Shared Request ID - start */
-static int hf_dsmcc_un_sess_rsrc_shared_resource_request_id = -1;
+static int hf_dsmcc_un_sess_rsrc_shared_resource_request_id;
/* table 4-91 Shared Request ID - end */
/* table 4-92 Headend List - start */
-static int hf_dsmcc_un_sess_rsrc_headend_count = -1;
-static int hf_dsmcc_un_sess_rsrc_headend_code = -1;
+static int hf_dsmcc_un_sess_rsrc_headend_count;
+static int hf_dsmcc_un_sess_rsrc_headend_code;
/* table 4-92 Headend List - end */
/* table 4-94 SDB Continuous Feed - start */
-static int hf_dsmcc_un_sess_rsrc_sdb_id = -1;
-static int hf_dsmcc_un_sess_rsrc_sdb_program_count = -1;
-static int hf_dsmcc_un_sess_rsrc_sdb_association_tag = -1;
-static int hf_dsmcc_un_sess_rsrc_sdb_broadcast_program_id = -1;
+static int hf_dsmcc_un_sess_rsrc_sdb_id;
+static int hf_dsmcc_un_sess_rsrc_sdb_program_count;
+static int hf_dsmcc_un_sess_rsrc_sdb_association_tag;
+static int hf_dsmcc_un_sess_rsrc_sdb_broadcast_program_id;
/* table 4-94 SDB Continuous Feed - end */
/* table 4-95 SDB Associations - start */
-static int hf_dsmcc_un_sess_rsrc_sdb_control_association_tag = -1;
-static int hf_dsmcc_un_sess_rsrc_sdb_program_association_tag = -1;
+static int hf_dsmcc_un_sess_rsrc_sdb_control_association_tag;
+static int hf_dsmcc_un_sess_rsrc_sdb_program_association_tag;
/* table 4-95 SDB Associations - end */
/* table 4-96 SDB Entitlement - start */
-static int hf_dsmcc_un_sess_rsrc_sdb_exclude_count = -1;
-static int hf_dsmcc_un_sess_rsrc_sdb_include_count = -1;
+static int hf_dsmcc_un_sess_rsrc_sdb_exclude_count;
+static int hf_dsmcc_un_sess_rsrc_sdb_include_count;
/* table 4-96 SDB Entitlement - end */
/* user defined 0xf001-0xf007 - start */
@@ -261,112 +261,112 @@ static int hf_dsmcc_un_sess_rsrc_sdb_include_count = -1;
* Version 2.3, May 19 2003
* These user defined resource descriptors have been implemented in
* VOD BackOffice products by Time Warner, Arris and Ericsson. */
-static int hf_dsmcc_un_sess_rsrc_trans_system = -1;
-static int hf_dsmcc_un_sess_rsrc_inner_coding = -1;
-static int hf_dsmcc_un_sess_rsrc_split_bitstream = -1;
-static int hf_dsmcc_un_sess_rsrc_mod_format = -1;
-static int hf_dsmcc_un_sess_rsrc_symbol_rate = -1;
-static int hf_dsmcc_un_sess_rsrc_reserved = -1;
-static int hf_dsmcc_un_sess_rsrc_interleave_depth = -1;
-static int hf_dsmcc_un_sess_rsrc_modulation_mode = -1;
-static int hf_dsmcc_un_sess_rsrc_fec = -1;
-static int hf_dsmcc_un_sess_rsrc_headend_flag = -1;
-static int hf_dsmcc_un_sess_rsrc_headend_tsid = -1;
-static int hf_dsmcc_un_sess_rsrc_server_ca_copyprotect = -1;
-static int hf_dsmcc_un_sess_rsrc_server_ca_usercount = -1;
-static int hf_dsmcc_un_sess_rsrc_client_ca_info_length = -1;
-static int hf_dsmcc_un_sess_rsrc_client_ca_info_data = -1;
-static int hf_dsmcc_un_sess_rsrc_service_group = -1;
+static int hf_dsmcc_un_sess_rsrc_trans_system;
+static int hf_dsmcc_un_sess_rsrc_inner_coding;
+static int hf_dsmcc_un_sess_rsrc_split_bitstream;
+static int hf_dsmcc_un_sess_rsrc_mod_format;
+static int hf_dsmcc_un_sess_rsrc_symbol_rate;
+static int hf_dsmcc_un_sess_rsrc_reserved;
+static int hf_dsmcc_un_sess_rsrc_interleave_depth;
+static int hf_dsmcc_un_sess_rsrc_modulation_mode;
+static int hf_dsmcc_un_sess_rsrc_fec;
+static int hf_dsmcc_un_sess_rsrc_headend_flag;
+static int hf_dsmcc_un_sess_rsrc_headend_tsid;
+static int hf_dsmcc_un_sess_rsrc_server_ca_copyprotect;
+static int hf_dsmcc_un_sess_rsrc_server_ca_usercount;
+static int hf_dsmcc_un_sess_rsrc_client_ca_info_length;
+static int hf_dsmcc_un_sess_rsrc_client_ca_info_data;
+static int hf_dsmcc_un_sess_rsrc_service_group;
/* user defined 0xf001-0xf007 - end */
-/* table 6-1 compatabilityDescriptor - start */
-static int hf_compat_desc_length = -1;
-static int hf_compat_desc_count = -1;
-static int hf_desc_type = -1;
-static int hf_desc_length = -1;
-static int hf_desc_spec_type = -1;
-static int hf_desc_spec_data = -1;
-static int hf_desc_model = -1;
-static int hf_desc_version = -1;
-static int hf_desc_sub_desc_count = -1;
-static int hf_desc_sub_desc_type = -1;
-static int hf_desc_sub_desc_len = -1;
-/* table 6-1 compatabilityDescriptor - end */
+/* table 6-1 compatibilityDescriptor - start */
+static int hf_compat_desc_length;
+static int hf_compat_desc_count;
+static int hf_desc_type;
+static int hf_desc_length;
+static int hf_desc_spec_type;
+static int hf_desc_spec_data;
+static int hf_desc_model;
+static int hf_desc_version;
+static int hf_desc_sub_desc_count;
+static int hf_desc_sub_desc_type;
+static int hf_desc_sub_desc_len;
+/* table 6-1 compatibilityDescriptor - end */
/* table 7-3 dsmccDownloadDataHeader - start */
-static int hf_dsmcc_dd_download_id = -1;
-static int hf_dsmcc_dd_message_id = -1;
+static int hf_dsmcc_dd_download_id;
+static int hf_dsmcc_dd_message_id;
/* table 7-3 dsmccDownloadDataHeader - end */
/* table 7-6 dsmccDownloadInfoIndication/InfoResponse - start */
-static int hf_dsmcc_dii_download_id = -1;
-static int hf_dsmcc_dii_block_size = -1;
-static int hf_dsmcc_dii_window_size = -1;
-static int hf_dsmcc_dii_ack_period = -1;
-static int hf_dsmcc_dii_t_c_download_window = -1;
-static int hf_dsmcc_dii_t_c_download_scenario = -1;
-static int hf_dsmcc_dii_number_of_modules = -1;
-static int hf_dsmcc_dii_module_id = -1;
-static int hf_dsmcc_dii_module_size = -1;
-static int hf_dsmcc_dii_module_version = -1;
-static int hf_dsmcc_dii_module_info_length = -1;
-static int hf_dsmcc_dii_private_data_length = -1;
+static int hf_dsmcc_dii_download_id;
+static int hf_dsmcc_dii_block_size;
+static int hf_dsmcc_dii_window_size;
+static int hf_dsmcc_dii_ack_period;
+static int hf_dsmcc_dii_t_c_download_window;
+static int hf_dsmcc_dii_t_c_download_scenario;
+static int hf_dsmcc_dii_number_of_modules;
+static int hf_dsmcc_dii_module_id;
+static int hf_dsmcc_dii_module_size;
+static int hf_dsmcc_dii_module_version;
+static int hf_dsmcc_dii_module_info_length;
+static int hf_dsmcc_dii_private_data_length;
/* table 7-6 dsmccDownloadInfoIndication/InfoResponse - end */
/* table 7-7 dsmccDownloadDataBlock - start */
-static int hf_dsmcc_ddb_module_id = -1;
-static int hf_dsmcc_ddb_version = -1;
-static int hf_dsmcc_ddb_reserved = -1;
-static int hf_dsmcc_ddb_block_number = -1;
+static int hf_dsmcc_ddb_module_id;
+static int hf_dsmcc_ddb_version;
+static int hf_dsmcc_ddb_reserved;
+static int hf_dsmcc_ddb_block_number;
/* table 7-7 dsmccDownloadDataBlock - end */
/* table 9-2 dsmccSection - start */
-static int hf_dsmcc_table_id = -1;
-static int hf_dsmcc_section_syntax_indicator = -1;
-static int hf_dsmcc_private_indicator = -1;
-static int hf_dsmcc_reserved = -1;
-static int hf_dsmcc_section_length = -1;
-static int hf_dsmcc_table_id_extension = -1;
-static int hf_dsmcc_reserved2 = -1;
-static int hf_dsmcc_version_number = -1;
-static int hf_dsmcc_current_next_indicator = -1;
-static int hf_dsmcc_section_number = -1;
-static int hf_dsmcc_last_section_number = -1;
-static int hf_dsmcc_crc = -1;
-static int hf_dsmcc_checksum = -1;
+static int hf_dsmcc_table_id;
+static int hf_dsmcc_section_syntax_indicator;
+static int hf_dsmcc_private_indicator;
+static int hf_dsmcc_reserved;
+static int hf_dsmcc_section_length;
+static int hf_dsmcc_table_id_extension;
+static int hf_dsmcc_reserved2;
+static int hf_dsmcc_version_number;
+static int hf_dsmcc_current_next_indicator;
+static int hf_dsmcc_section_number;
+static int hf_dsmcc_last_section_number;
+static int hf_dsmcc_crc;
+static int hf_dsmcc_checksum;
/* table 9-2 dsmccSection - end */
/* table J.3 E-164 NSAP - start */
-static int hf_dsmcc_un_sess_nsap_afi = -1;
-static int hf_dsmcc_un_sess_nsap_idi = -1;
-static int hf_dsmcc_un_sess_nsap_ho_dsp = -1;
-static int hf_dsmcc_un_sess_nsap_esi = -1;
-static int hf_dsmcc_un_sess_nsap_sel = -1;
+static int hf_dsmcc_un_sess_nsap_afi;
+static int hf_dsmcc_un_sess_nsap_idi;
+static int hf_dsmcc_un_sess_nsap_ho_dsp;
+static int hf_dsmcc_un_sess_nsap_esi;
+static int hf_dsmcc_un_sess_nsap_sel;
/* table J.3 E-164 NSAP - end */
/* TODO: this should really live in the ETV dissector, but I'm not sure how
* to make the functionality work exactly right yet. Will work on a patch
* for this next.
*/
-static int hf_etv_module_abs_path = -1;
-static int hf_etv_dii_authority = -1;
-
-static gint ett_dsmcc = -1;
-static gint ett_dsmcc_payload = -1;
-static gint ett_dsmcc_header = -1;
-static gint ett_dsmcc_adaptation_header = -1;
-static gint ett_dsmcc_message_id = -1;
-static gint ett_dsmcc_transaction_id = -1;
-static gint ett_dsmcc_heading = -1;
-static gint ett_dsmcc_rsrc_number = -1;
-static gint ett_dsmcc_rsrc_association_tag = -1;
-static gint ett_dsmcc_rsrc_flags = -1;
-static gint ett_dsmcc_compat = -1;
-static gint ett_dsmcc_compat_sub_desc = -1;
-static gint ett_dsmcc_dii_module = -1;
-
-static expert_field ei_dsmcc_invalid_value = EI_INIT;
-static expert_field ei_dsmcc_crc_invalid = EI_INIT;
+static int hf_etv_module_abs_path;
+static int hf_etv_dii_authority;
+
+static int ett_dsmcc;
+static int ett_dsmcc_payload;
+static int ett_dsmcc_header;
+static int ett_dsmcc_adaptation_header;
+static int ett_dsmcc_message_id;
+static int ett_dsmcc_transaction_id;
+static int ett_dsmcc_heading;
+static int ett_dsmcc_rsrc_number;
+static int ett_dsmcc_rsrc_association_tag;
+static int ett_dsmcc_rsrc_flags;
+static int ett_dsmcc_compat;
+static int ett_dsmcc_compat_sub_desc;
+static int ett_dsmcc_dii_module;
+
+static expert_field ei_dsmcc_invalid_value;
+static expert_field ei_dsmcc_crc_invalid;
#define DSMCC_TCP_PORT 13819
#define DSMCC_UDP_PORT 13819
@@ -947,11 +947,11 @@ static int * const bf_rsrc_flags[] = {
};
/* Table J.3 E.164 NSAP */
-static guint
+static unsigned
dissect_dsmcc_un_session_nsap(
- tvbuff_t *tvb, guint offset, packet_info *pinfo _U_, proto_tree *sub_tree)
+ tvbuff_t *tvb, unsigned offset, packet_info *pinfo _U_, proto_tree *sub_tree)
{
- guint offset_start;
+ unsigned offset_start;
offset_start = offset;
proto_tree_add_item(sub_tree, hf_dsmcc_un_sess_nsap_afi, tvb, offset, 1, ENC_NA);
@@ -969,12 +969,12 @@ dissect_dsmcc_un_session_nsap(
}
/* 4-58 SessionId */
-static guint
+static unsigned
dissect_dsmcc_un_session_id(
- tvbuff_t *tvb, guint offset, packet_info *pinfo _U_, proto_tree *sub_tree)
+ tvbuff_t *tvb, unsigned offset, packet_info *pinfo _U_, proto_tree *sub_tree)
{
proto_tree *sub_sub_tree;
- guint offset_start;
+ unsigned offset_start;
offset_start = offset;
@@ -994,20 +994,20 @@ static void
dissect_dsmcc_adaptation_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
tvbuff_t *sub_tvb;
- guint offset = 0;
+ unsigned offset = 0;
proto_item *pi;
proto_tree *sub_tree;
proto_tree *sub_sub_tree;
- guint8 type, tmp;
- guint16 ca_len;
+ uint8_t type, tmp;
+ uint16_t ca_len;
- type = tvb_get_guint8(tvb, offset);
+ type = tvb_get_uint8(tvb, offset);
if (1 == type) {
sub_tree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_dsmcc_adaptation_header, NULL, "Adaptation Header");
proto_tree_add_item(sub_tree, hf_dsmcc_adaptation_type, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
- tmp = tvb_get_guint8(tvb, offset);
+ tmp = tvb_get_uint8(tvb, offset);
pi = proto_tree_add_item(sub_tree, hf_dsmcc_adaptation_ca_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
if (0xff != tmp) {
expert_add_info_format(pinfo, pi, &ei_dsmcc_invalid_value, "Invalid value - should be 0xff");
@@ -1024,7 +1024,7 @@ dissect_dsmcc_adaptation_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
sub_tree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_dsmcc_adaptation_header, NULL, "Adaptation Header");
proto_tree_add_item(sub_tree, hf_dsmcc_adaptation_type, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
- tmp = tvb_get_guint8(tvb, offset);
+ tmp = tvb_get_uint8(tvb, offset);
pi = proto_tree_add_item(sub_tree, hf_dsmcc_adaptation_user_id_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
if (0xff != tmp) {
expert_add_info_format(pinfo, pi, &ei_dsmcc_invalid_value, "Invalid value - should be 0xff");
@@ -1039,21 +1039,21 @@ dissect_dsmcc_adaptation_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
}
/* Table 2-1 DSM-CC Message Header Format */
-static guint
-dissect_dsmcc_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset, gboolean download_header)
+static unsigned
+dissect_dsmcc_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset, bool download_header)
{
tvbuff_t *sub_tvb;
proto_item *pi;
proto_tree *sub_tree;
- guint8 prot_disc, adaptation_len;
- guint reserved, offset_start;
+ uint8_t prot_disc, adaptation_len;
+ unsigned reserved, offset_start;
int msg_id, tx_id;
offset_start = offset;
- prot_disc = tvb_get_guint8(tvb, offset);
- reserved = tvb_get_guint8(tvb, 8+offset);
- adaptation_len = tvb_get_guint8(tvb, 9+offset);
+ prot_disc = tvb_get_uint8(tvb, offset);
+ reserved = tvb_get_uint8(tvb, 8+offset);
+ adaptation_len = tvb_get_uint8(tvb, 9+offset);
sub_tree = proto_tree_add_subtree(tree, tvb, offset, 12+adaptation_len, ett_dsmcc_header, NULL, "DSM-CC Header");
pi = proto_tree_add_item(sub_tree, hf_dsmcc_protocol_discriminator, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -1063,7 +1063,7 @@ dissect_dsmcc_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
offset += 1;
proto_tree_add_item(sub_tree, hf_dsmcc_type, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
- if (TRUE == download_header) {
+ if (true == download_header) {
msg_id = hf_dsmcc_dd_message_id;
tx_id = hf_dsmcc_dd_download_id;
proto_tree_add_item(sub_tree, msg_id, tvb, offset, 2, ENC_BIG_ENDIAN);
@@ -1099,13 +1099,13 @@ dissect_dsmcc_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
return offset-offset_start;
}
-static guint
+static unsigned
dissect_dsmcc_dii_compat_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
- guint offset)
+ unsigned offset)
{
- gint i, j;
- guint8 sub_count, sub_len;
- guint16 len, count;
+ int i, j;
+ uint8_t sub_count, sub_len;
+ uint16_t len, count;
proto_tree *compat_tree;
proto_tree *desc_sub_tree;
@@ -1133,12 +1133,12 @@ dissect_dsmcc_dii_compat_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
proto_tree_add_item(compat_tree, hf_desc_version, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
- sub_count = tvb_get_guint8(tvb, offset);
+ sub_count = tvb_get_uint8(tvb, offset);
proto_tree_add_item(compat_tree, hf_desc_sub_desc_count, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
for (j = 0; j < sub_count; j++) {
- sub_len = tvb_get_guint8(tvb, offset+1);
+ sub_len = tvb_get_uint8(tvb, offset+1);
desc_sub_tree = proto_tree_add_subtree(compat_tree, tvb, offset, sub_len+2,
ett_dsmcc_compat_sub_desc, NULL, "Sub Descriptor");
@@ -1161,11 +1161,11 @@ dissect_dsmcc_dii_compat_desc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
static void
dissect_dsmcc_dii(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
- guint offset)
+ unsigned offset)
{
- guint16 modules, module_id, private_data_len;
- guint8 module_info_len, module_version;
- guint i, module_size;
+ uint16_t modules, module_id, private_data_len;
+ uint8_t module_info_len, module_version;
+ unsigned i, module_size;
proto_tree *mod_tree;
proto_tree_add_item(tree, hf_dsmcc_dii_download_id, tvb, offset, 4, ENC_BIG_ENDIAN);
@@ -1188,7 +1188,7 @@ dissect_dsmcc_dii(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
for (i = 0; i < modules; i++ ) {
module_id = tvb_get_ntohs(tvb, offset);
module_size = tvb_get_ntohl(tvb, 2+offset);
- module_version = tvb_get_guint8(tvb, 6+offset);
+ module_version = tvb_get_uint8(tvb, 6+offset);
mod_tree = proto_tree_add_subtree_format(tree, tvb, offset, -1,
ett_dsmcc_dii_module, NULL, "Module Id: 0x%x, Version: %u, Size: %u",
@@ -1200,7 +1200,7 @@ dissect_dsmcc_dii(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_tree_add_item(mod_tree, hf_dsmcc_dii_module_version, tvb, offset, 1, ENC_BIG_ENDIAN);
offset +=1;
- module_info_len = tvb_get_guint8(tvb, offset);
+ module_info_len = tvb_get_uint8(tvb, offset);
proto_tree_add_item(mod_tree, hf_dsmcc_dii_module_info_length, tvb, offset, 1, ENC_BIG_ENDIAN);
offset +=1;
if (0 < module_info_len) {
@@ -1224,17 +1224,17 @@ dissect_dsmcc_dii(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
static void
dissect_dsmcc_ddb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
- proto_tree *top_tree, guint offset)
+ proto_tree *top_tree, unsigned offset)
{
tvbuff_t *sub_tvb;
proto_item *pi;
- guint8 reserved;
+ uint8_t reserved;
proto_tree_add_item(tree, hf_dsmcc_ddb_module_id, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
proto_tree_add_item(tree, hf_dsmcc_ddb_version, tvb, offset, 1, ENC_BIG_ENDIAN);
offset +=1;
- reserved = tvb_get_guint8(tvb, offset);
+ reserved = tvb_get_uint8(tvb, offset);
pi = proto_tree_add_item(tree, hf_dsmcc_ddb_reserved, tvb,
offset, 1, ENC_BIG_ENDIAN);
if (0xff != reserved) {
@@ -1254,8 +1254,8 @@ static void
dissect_dsmcc_un_download(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree *top_tree)
{
proto_tree *sub_tree;
- guint16 msg_id;
- guint offset = 0;
+ uint16_t msg_id;
+ unsigned offset = 0;
msg_id = tvb_get_ntohs(tvb, offset+2);
@@ -1265,11 +1265,11 @@ dissect_dsmcc_un_download(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, p
switch (msg_id) {
case 0x1001:
case 0x1002:
- offset += dissect_dsmcc_header(tvb, pinfo, sub_tree, offset, FALSE);
+ offset += dissect_dsmcc_header(tvb, pinfo, sub_tree, offset, false);
dissect_dsmcc_dii(tvb, pinfo, sub_tree, offset);
break;
case 0x1003:
- offset += dissect_dsmcc_header(tvb, pinfo, sub_tree, offset, TRUE);
+ offset += dissect_dsmcc_header(tvb, pinfo, sub_tree, offset, true);
dissect_dsmcc_ddb(tvb, pinfo, sub_tree, top_tree, offset);
break;
case 0x1004:
@@ -1287,12 +1287,12 @@ dissect_dsmcc_un_download(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, p
}
/* table 4-71 dsmccResourceDescriptorValue format*/
-static guint
+static unsigned
dissect_dsmcc_un_session_resource_value(
- tvbuff_t *tvb, guint offset, packet_info *pinfo _U_, proto_tree *sub_tree, guint value_len)
+ tvbuff_t *tvb, unsigned offset, packet_info *pinfo _U_, proto_tree *sub_tree, unsigned value_len)
{
- guint32 i, counter, resource_value_type;
- guint offset_start;
+ uint32_t i, counter, resource_value_type;
+ unsigned offset_start;
offset_start = offset;
@@ -1325,18 +1325,18 @@ dissect_dsmcc_un_session_resource_value(
}
-static guint
+static unsigned
dissect_dsmcc_un_session_resources(
- tvbuff_t *tvb, guint offset, packet_info *pinfo _U_, proto_tree *sub_tree)
+ tvbuff_t *tvb, unsigned offset, packet_info *pinfo _U_, proto_tree *sub_tree)
{
proto_tree *pi;
proto_tree *sub_sub_tree;
proto_tree *sub_sub_sub_tree;
proto_tree *sub_sub_sub_sub_tree;
proto_tree *rsrc_tree;
- guint32 i, j, counter, resource_count;
- guint16 tmp, resource_type, data_fields_length, counter_ca;
- guint offset_start;
+ uint32_t i, j, counter, resource_count;
+ uint16_t tmp, resource_type, data_fields_length, counter_ca;
+ unsigned offset_start;
offset_start = offset;
@@ -1352,7 +1352,7 @@ dissect_dsmcc_un_session_resources(
proto_tree_add_item(sub_sub_sub_tree, hf_dsmcc_un_sess_rsrc_request_id, tvb, offset, 2, ENC_NA);
offset += 2;
proto_tree_add_item(sub_sub_sub_tree, hf_dsmcc_un_sess_rsrc_descriptor_type, tvb, offset, 2, ENC_BIG_ENDIAN);
- resource_type = tvb_get_guint16(tvb, offset, ENC_BIG_ENDIAN);
+ resource_type = tvb_get_uint16(tvb, offset, ENC_BIG_ENDIAN);
offset += 2;
proto_tree_add_bitmask_with_flags(sub_sub_sub_tree, tvb, offset, hf_dsmcc_un_sess_rsrc_number, ett_dsmcc_rsrc_number, bf_rsrc_number, ENC_BIG_ENDIAN, BMT_NO_APPEND);
offset += 2;
@@ -1363,7 +1363,7 @@ dissect_dsmcc_un_session_resources(
proto_tree_add_item(sub_sub_sub_tree, hf_dsmcc_un_sess_rsrc_status, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
proto_tree_add_item(sub_sub_sub_tree, hf_dsmcc_un_sess_rsrc_desc_data_fields_length, tvb, offset, 2, ENC_BIG_ENDIAN);
- data_fields_length = tvb_get_guint16(tvb, offset, ENC_BIG_ENDIAN);
+ data_fields_length = tvb_get_uint16(tvb, offset, ENC_BIG_ENDIAN);
offset += 2;
proto_tree_add_item(sub_sub_sub_tree, hf_dsmcc_un_sess_rsrc_data_field_count, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
@@ -1579,7 +1579,7 @@ dissect_dsmcc_un_session_resources(
break;
/* User Defined - Headend ID */
case RSRC_HEADEND_ID:
- tmp = tvb_get_guint16(tvb, offset, ENC_BIG_ENDIAN);
+ tmp = tvb_get_uint16(tvb, offset, ENC_BIG_ENDIAN);
pi = proto_tree_add_item(sub_sub_sub_tree, hf_dsmcc_un_sess_rsrc_headend_flag, tvb, offset, 2, ENC_BIG_ENDIAN);
if ((tmp == 0) || (tmp > 4)) {
expert_add_info_format(pinfo, pi, &ei_dsmcc_invalid_value, "Invalid value - should be values 1 to 4");
@@ -1609,7 +1609,7 @@ dissect_dsmcc_un_session_resources(
rsrc_tree = proto_tree_add_subtree(sub_sub_sub_tree, tvb, offset, 0, ett_dsmcc_heading, NULL, "Client CA System ID:");
offset += dissect_dsmcc_un_session_resource_value(tvb, offset, pinfo, rsrc_tree, 2);
proto_tree_add_item(sub_sub_sub_tree, hf_dsmcc_un_sess_rsrc_client_ca_info_length, tvb, offset, 2, ENC_BIG_ENDIAN);
- counter_ca = tvb_get_guint16(tvb, offset, ENC_BIG_ENDIAN);
+ counter_ca = tvb_get_uint16(tvb, offset, ENC_BIG_ENDIAN);
offset += 2;
if (counter_ca > 0)
{
@@ -1665,12 +1665,12 @@ dissect_dsmcc_un_session_resources(
}
/* UserData() is vendor proprietary, therefore not dissected. */
-static guint
+static unsigned
dissect_dsmcc_un_session_user_data(
- tvbuff_t *tvb, guint offset, packet_info *pinfo _U_, proto_tree *tree)
+ tvbuff_t *tvb, unsigned offset, packet_info *pinfo _U_, proto_tree *tree)
{
- guint offset_start;
- guint16 uu_len, priv_len;
+ unsigned offset_start;
+ uint16_t uu_len, priv_len;
offset_start = offset;
@@ -1703,9 +1703,9 @@ dissect_dsmcc_un_session(tvbuff_t *tvb, packet_info *pinfo,
proto_item *pi;
proto_tree *sub_tree;
proto_tree *sub_sub_tree;
- guint32 i, counter;
- guint16 msg_id;
- guint offset = 0;
+ uint32_t i, counter;
+ uint16_t msg_id;
+ unsigned offset = 0;
msg_id = tvb_get_ntohs(tvb, offset+2);
@@ -1715,7 +1715,7 @@ dissect_dsmcc_un_session(tvbuff_t *tvb, packet_info *pinfo,
col_append_sep_str(pinfo->cinfo, COL_INFO, NULL,
val_to_str(msg_id, dsmcc_un_sess_message_id_vals, "0x%x"));
- offset += dissect_dsmcc_header(tvb, pinfo, sub_tree, offset, FALSE);
+ offset += dissect_dsmcc_header(tvb, pinfo, sub_tree, offset, false);
switch (msg_id) {
@@ -2204,10 +2204,10 @@ static void
dissect_dsmcc_un(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_tree *top_tree)
{
- guint8 type;
+ uint8_t type;
/* dsmccMessageHeader.dsmccType */
- type = tvb_get_guint8(tvb, 1);
+ type = tvb_get_uint8(tvb, 1);
switch (type) {
case 1: /* user-to-network configuration */
@@ -2236,21 +2236,21 @@ dissect_dsmcc_ts(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree_in, void *d
{
proto_item *pi;
proto_tree *tree;
- guint crc_len;
- guint8 tid;
- guint16 sect_len;
- guint32 crc, calculated_crc;
+ unsigned crc_len;
+ uint8_t tid;
+ uint16_t sect_len;
+ uint32_t crc, calculated_crc;
const char *label;
tvbuff_t *sub_tvb;
- guint16 ssi;
- guint offset = 0;
+ uint16_t ssi;
+ unsigned offset = 0;
pi = proto_tree_add_item(tree_in, proto_dsmcc, tvb, 0, -1, ENC_NA);
tree = proto_item_add_subtree(pi, ett_dsmcc);
col_set_str(pinfo->cinfo, COL_PROTOCOL, "DSM-CC");
- tid = tvb_get_guint8(tvb, offset);
+ tid = tvb_get_uint8(tvb, offset);
proto_tree_add_item(tree, hf_dsmcc_table_id, tvb, offset, 1, ENC_BIG_ENDIAN);
offset +=1;
ssi = tvb_get_ntohs(tvb, offset);
@@ -2333,7 +2333,7 @@ static int dissect_dsmcc_tcp(tvbuff_t *tvb, packet_info *pinfo,
proto_item *pi;
proto_tree *sub_tree;
- if (tvb_get_guint8(tvb, 0) != DSMCC_PROT_DISC)
+ if (tvb_get_uint8(tvb, 0) != DSMCC_PROT_DISC)
return 0;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "DSM-CC");
@@ -2354,7 +2354,7 @@ static int dissect_dsmcc_udp(tvbuff_t *tvb, packet_info *pinfo,
proto_item *pi;
proto_tree *sub_tree;
- if (tvb_get_guint8(tvb, 0) != DSMCC_PROT_DISC)
+ if (tvb_get_uint8(tvb, 0) != DSMCC_PROT_DISC)
return 0;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "DSM-CC");
@@ -2990,7 +2990,7 @@ proto_register_dsmcc(void)
} },
/* User defined 0xf001-0xf007 - end */
- /* table 6-1 compatabilityDescriptor - start */
+ /* table 6-1 compatibilityDescriptor - start */
{ &hf_compat_desc_length, {
"Compatibility Descriptor Length", "mpeg_dsmcc.dii.compat_desc_len",
FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL
@@ -3045,7 +3045,7 @@ proto_register_dsmcc(void)
"Length", "mpeg_dsmcc.dii.compat.sub_len",
FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
} },
- /* table 6-1 compatabilityDescriptor - end */
+ /* table 6-1 compatibilityDescriptor - end */
/* table 7-3 dsmccDownloadDataHeader - start */
{ &hf_dsmcc_dd_download_id, {
@@ -3250,7 +3250,7 @@ proto_register_dsmcc(void)
/* table J.3 NSAP - end */
};
- static gint *ett[] = {
+ static int *ett[] = {
&ett_dsmcc,
&ett_dsmcc_payload,
&ett_dsmcc_adaptation_header,