summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ldp.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-ldp.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-ldp.c')
-rw-r--r--epan/dissectors/packet-ldp.c814
1 files changed, 407 insertions, 407 deletions
diff --git a/epan/dissectors/packet-ldp.c b/epan/dissectors/packet-ldp.c
index 25daf89d..dc32170a 100644
--- a/epan/dissectors/packet-ldp.c
+++ b/epan/dissectors/packet-ldp.c
@@ -47,298 +47,298 @@ void proto_reg_handoff_ldp(void);
static dissector_handle_t ldp_tcp_handle, ldp_handle;
-static int proto_ldp = -1;
+static int proto_ldp;
/* Delete the following if you do not use it, or add to it if you need */
-/* static int hf_ldp_req = -1; */
-/* static int hf_ldp_rsp = -1; */
-static int hf_ldp_version = -1;
-static int hf_ldp_pdu_len = -1;
-static int hf_ldp_lsr = -1;
-static int hf_ldp_ls_id = -1;
-static int hf_ldp_msg_ubit = -1;
-static int hf_ldp_msg_type = -1;
-static int hf_ldp_msg_len = -1;
-static int hf_ldp_msg_id = -1;
-static int hf_ldp_msg_vendor_id = -1;
-static int hf_ldp_msg_experiment_id = -1;
-static int hf_ldp_tlv_value = -1;
-static int hf_ldp_tlv_type = -1;
-static int hf_ldp_tlv_unknown = -1;
-static int hf_ldp_tlv_len = -1;
-static int hf_ldp_tlv_val_hold = -1;
-static int hf_ldp_tlv_val_target = -1;
-static int hf_ldp_tlv_val_request = -1;
-static int hf_ldp_tlv_val_res = -1;
-static int hf_ldp_tlv_val_gtsm_flag = -1;
-static int hf_ldp_tlv_ipv4_taddr = -1;
-static int hf_ldp_tlv_config_seqno = -1;
-static int hf_ldp_tlv_ipv6_taddr = -1;
-static int hf_ldp_tlv_fec_wc = -1;
-static int hf_ldp_tlv_fec_af = -1;
-static int hf_ldp_tlv_fec_len = -1;
-static int hf_ldp_tlv_fec_pfval = -1;
-static int hf_ldp_tlv_fec_hoval = -1;
-static int hf_ldp_tlv_addrl_addr_family = -1;
-static int hf_ldp_tlv_addrl_addr = -1;
-static int hf_ldp_tlv_hc_value = -1;
-static int hf_ldp_tlv_pv_lsrid = -1;
-static int hf_ldp_tlv_generic_label = -1;
-static int hf_ldp_tlv_atm_label_vbits = -1;
-static int hf_ldp_tlv_atm_label_vpi = -1;
-static int hf_ldp_tlv_atm_label_vci = -1;
-static int hf_ldp_tlv_fr_label_len = -1;
-static int hf_ldp_tlv_fr_label_dlci = -1;
-static int hf_ldp_tlv_ft_protect_sequence_num = -1;
-static int hf_ldp_tlv_status_ebit = -1;
-static int hf_ldp_tlv_status_fbit = -1;
-static int hf_ldp_tlv_status_data = -1;
-static int hf_ldp_tlv_status_msg_id = -1;
-static int hf_ldp_tlv_status_msg_type = -1;
-static int hf_ldp_tlv_extstatus_data = -1;
-static int hf_ldp_tlv_returned_version = -1;
-static int hf_ldp_tlv_returned_pdu_len = -1;
-static int hf_ldp_tlv_returned_lsr = -1;
-static int hf_ldp_tlv_returned_ls_id = -1;
-static int hf_ldp_tlv_returned_msg_ubit = -1;
-static int hf_ldp_tlv_returned_msg_type = -1;
-static int hf_ldp_tlv_returned_msg_len = -1;
-static int hf_ldp_tlv_returned_msg_id = -1;
-static int hf_ldp_tlv_mac = -1;
-static int hf_ldp_tlv_sess_ver = -1;
-static int hf_ldp_tlv_sess_ka = -1;
-static int hf_ldp_tlv_sess_advbit = -1;
-static int hf_ldp_tlv_sess_ldetbit = -1;
-static int hf_ldp_tlv_sess_pvlim = -1;
-static int hf_ldp_tlv_sess_mxpdu = -1;
-static int hf_ldp_tlv_sess_rxlsr = -1;
-static int hf_ldp_tlv_sess_rxls = -1;
-static int hf_ldp_tlv_sess_atm_merge = -1;
-static int hf_ldp_tlv_sess_atm_lr = -1;
-static int hf_ldp_tlv_sess_atm_dir = -1;
-static int hf_ldp_tlv_sess_atm_minvpi = -1;
-static int hf_ldp_tlv_sess_atm_maxvpi = -1;
-static int hf_ldp_tlv_sess_atm_minvci = -1;
-static int hf_ldp_tlv_sess_atm_maxvci = -1;
-static int hf_ldp_tlv_sess_fr_merge = -1;
-static int hf_ldp_tlv_sess_fr_lr = -1;
-static int hf_ldp_tlv_sess_fr_dir = -1;
-static int hf_ldp_tlv_sess_fr_len = -1;
-static int hf_ldp_tlv_sess_fr_mindlci = -1;
-static int hf_ldp_tlv_sess_fr_maxdlci = -1;
-static int hf_ldp_tlv_ft_sess_flags = -1;
-static int hf_ldp_tlv_ft_sess_flag_r = -1;
-static int hf_ldp_tlv_ft_sess_flag_res = -1;
-static int hf_ldp_tlv_ft_sess_flag_s = -1;
-static int hf_ldp_tlv_ft_sess_flag_a = -1;
-static int hf_ldp_tlv_ft_sess_flag_c = -1;
-static int hf_ldp_tlv_ft_sess_flag_l = -1;
-static int hf_ldp_tlv_ft_sess_res = -1;
-static int hf_ldp_tlv_ft_sess_reconn_to = -1;
-static int hf_ldp_tlv_ft_sess_recovery_time = -1;
-static int hf_ldp_tlv_ft_ack_sequence_num = -1;
-static int hf_ldp_tlv_lbl_req_msg_id = -1;
-static int hf_ldp_tlv_vendor_id = -1;
-static int hf_ldp_tlv_experiment_id = -1;
-static int hf_ldp_tlv_fec_vc_controlword = -1;
-static int hf_ldp_tlv_fec_vc_vctype = -1;
-static int hf_ldp_tlv_fec_vc_infolength = -1;
-static int hf_ldp_tlv_fec_vc_groupid = -1;
-static int hf_ldp_tlv_fec_vc_vcid = -1;
-static int hf_ldp_tlv_fec_vc_intparam_length = -1;
-static int hf_ldp_tlv_fec_vc_intparam_mtu = -1;
-static int hf_ldp_tlv_fec_vc_intparam_tdmbps = -1;
-static int hf_ldp_tlv_fec_vc_intparam_id = -1;
-static int hf_ldp_tlv_fec_vc_intparam_maxcatmcells = -1;
-static int hf_ldp_tlv_fec_vc_intparam_desc = -1;
-static int hf_ldp_tlv_fec_vc_intparam_cepbytes = -1;
-static int hf_ldp_tlv_fec_vc_intparam_cepopt_ais = -1;
-static int hf_ldp_tlv_fec_vc_intparam_cepopt_une = -1;
-static int hf_ldp_tlv_fec_vc_intparam_cepopt_rtp = -1;
-static int hf_ldp_tlv_fec_vc_intparam_cepopt_ebm = -1;
-static int hf_ldp_tlv_fec_vc_intparam_cepopt_mah = -1;
-static int hf_ldp_tlv_fec_vc_intparam_cepopt_res = -1;
-static int hf_ldp_tlv_fec_vc_intparam_cepopt_ceptype = -1;
-static int hf_ldp_tlv_fec_vc_intparam_cepopt_t3 = -1;
-static int hf_ldp_tlv_fec_vc_intparam_cepopt_e3 = -1;
-static int hf_ldp_tlv_fec_vc_intparam_vlanid = -1;
-static int hf_ldp_tlv_fec_vc_intparam_dlcilen = -1;
-static int hf_ldp_tlv_fec_vc_intparam_fcslen = -1;
-static int hf_ldp_tlv_fec_vc_intparam_tdmopt_r = -1;
-static int hf_ldp_tlv_fec_vc_intparam_tdmopt_d = -1;
-static int hf_ldp_tlv_fec_vc_intparam_tdmopt_f = -1;
-static int hf_ldp_tlv_fec_vc_intparam_tdmopt_res1 = -1;
-static int hf_ldp_tlv_fec_vc_intparam_tdmopt_pt = -1;
-static int hf_ldp_tlv_fec_vc_intparam_tdmopt_res2 = -1;
-static int hf_ldp_tlv_fec_vc_intparam_tdmopt_freq = -1;
-static int hf_ldp_tlv_fec_vc_intparam_tdmopt_ssrc = -1;
-static int hf_ldp_tlv_fec_vc_intparam_vccv_cctype_cw = -1;
-static int hf_ldp_tlv_fec_vc_intparam_vccv_cctype_mplsra = -1;
-static int hf_ldp_tlv_fec_vc_intparam_vccv_cctype_ttl1 = -1;
-static int hf_ldp_tlv_fec_vc_intparam_vccv_cvtype_icmpping = -1;
-static int hf_ldp_tlv_fec_vc_intparam_vccv_cvtype_lspping = -1;
-static int hf_ldp_tlv_fec_vc_intparam_vccv_cvtype_bfd1 = -1;
-static int hf_ldp_tlv_fec_vc_intparam_vccv_cvtype_bfd2 = -1;
-static int hf_ldp_tlv_fec_vc_intparam_vccv_cvtype_bfd3 = -1;
-static int hf_ldp_tlv_fec_vc_intparam_vccv_cvtype_bfd4 = -1;
-static int hf_ldp_tlv_fec_vc_intparam_flowlabel_t = -1; /* Flow label interface parameter RFC6391 */
-static int hf_ldp_tlv_fec_vc_intparam_flowlabel_r = -1; /* Flow label interface parameter RFC6391 */
-static int hf_ldp_tlv_fec_vc_intparam_flowlabel_res = -1; /* Flow label interface parameter RFC6391 */
-static int hf_ldp_tlv_lspid_act_flg = -1;
-static int hf_ldp_tlv_lspid_cr_lsp = -1;
-static int hf_ldp_tlv_lspid_ldpid = -1;
-static int hf_ldp_tlv_er_hop_loose = -1;
-static int hf_ldp_tlv_er_hop_prelen = -1;
-static int hf_ldp_tlv_er_hop_prefix4 = -1;
-static int hf_ldp_tlv_er_hop_prefix6 = -1;
-static int hf_ldp_tlv_er_hop_as = -1;
-static int hf_ldp_tlv_er_hop_cr_lsp = -1;
-static int hf_ldp_tlv_er_hop_ldpid = -1;
-static int hf_ldp_tlv_flags_reserv = -1;
-static int hf_ldp_tlv_flags_weight = -1;
-static int hf_ldp_tlv_flags_ebs = -1;
-static int hf_ldp_tlv_flags_cbs = -1;
-static int hf_ldp_tlv_flags_cdr = -1;
-static int hf_ldp_tlv_flags_pbs = -1;
-static int hf_ldp_tlv_flags_pdr = -1;
-static int hf_ldp_tlv_frequency = -1;
-static int hf_ldp_tlv_pdr = -1;
-static int hf_ldp_tlv_pbs = -1;
-static int hf_ldp_tlv_cdr = -1;
-static int hf_ldp_tlv_cbs = -1;
-static int hf_ldp_tlv_ebs = -1;
-static int hf_ldp_tlv_weight = -1;
-static int hf_ldp_tlv_set_prio = -1;
-static int hf_ldp_tlv_hold_prio = -1;
-static int hf_ldp_tlv_route_pinning = -1;
-static int hf_ldp_tlv_resource_class = -1;
-/* static int hf_ldp_tlv_diffserv = -1; */
-static int hf_ldp_tlv_diffserv_type = -1;
-static int hf_ldp_tlv_diffserv_mapnb = -1;
-static int hf_ldp_tlv_diffserv_map = -1;
-static int hf_ldp_tlv_diffserv_map_exp = -1;
-static int hf_ldp_tlv_diffserv_phbid = -1;
-static int hf_ldp_tlv_diffserv_phbid_dscp = -1;
-static int hf_ldp_tlv_diffserv_phbid_code = -1;
-static int hf_ldp_tlv_diffserv_phbid_bit14 = -1;
-static int hf_ldp_tlv_diffserv_phbid_bit15 = -1;
-static int hf_ldp_tlv_fec_gen_agi_type = -1;
-static int hf_ldp_tlv_fec_gen_agi_length = -1;
-static int hf_ldp_tlv_fec_gen_agi_value = -1;
-static int hf_ldp_tlv_fec_gen_saii_type = -1;
-static int hf_ldp_tlv_fec_gen_saii_length = -1;
-static int hf_ldp_tlv_fec_gen_saii_value = -1;
-static int hf_ldp_tlv_fec_gen_taii_type = -1;
-static int hf_ldp_tlv_fec_gen_taii_length = -1;
-static int hf_ldp_tlv_fec_gen_taii_value = -1;
-static int hf_ldp_tlv_fec_gen_aai_globalid = -1;
-static int hf_ldp_tlv_fec_gen_aai_prefix = -1;
-static int hf_ldp_tlv_fec_gen_aai_ac_id = -1;
-static int hf_ldp_tlv_fec_pw_controlword = -1;
-static int hf_ldp_tlv_fec_pw_pwtype = -1;
-static int hf_ldp_tlv_fec_pw_infolength = -1;
-static int hf_ldp_tlv_fec_pw_groupid = -1;
-static int hf_ldp_tlv_fec_pw_pwid = -1;
-static int hf_ldp_tlv_pw_status_data = -1;
-static int hf_ldp_tlv_pw_not_forwarding = -1;
-static int hf_ldp_tlv_pw_lac_ingress_recv_fault = -1;
-static int hf_ldp_tlv_pw_lac_egress_recv_fault = -1;
-static int hf_ldp_tlv_pw_psn_pw_ingress_recv_fault = -1;
-static int hf_ldp_tlv_pw_psn_pw_egress_recv_fault = -1;
-static int hf_ldp_tlv_pw_grouping_value = -1;
-static int hf_ldp_tlv_intparam_length = -1;
-static int hf_ldp_tlv_intparam_mtu = -1;
-static int hf_ldp_tlv_intparam_tdmbps = -1;
-static int hf_ldp_tlv_intparam_id = -1;
-static int hf_ldp_tlv_intparam_maxcatmcells = -1;
-static int hf_ldp_tlv_intparam_desc = -1;
-static int hf_ldp_tlv_intparam_cepbytes = -1;
-static int hf_ldp_tlv_intparam_cepopt_ais = -1;
-static int hf_ldp_tlv_intparam_cepopt_une = -1;
-static int hf_ldp_tlv_intparam_cepopt_rtp = -1;
-static int hf_ldp_tlv_intparam_cepopt_ebm = -1;
-static int hf_ldp_tlv_intparam_cepopt_mah = -1;
-static int hf_ldp_tlv_intparam_cepopt_res = -1;
-static int hf_ldp_tlv_intparam_cepopt_ceptype = -1;
-static int hf_ldp_tlv_intparam_cepopt_t3 = -1;
-static int hf_ldp_tlv_intparam_cepopt_e3 = -1;
-static int hf_ldp_tlv_intparam_vlanid = -1;
-static int hf_ldp_tlv_intparam_dlcilen = -1;
-static int hf_ldp_tlv_intparam_fcslen = -1;
-static int hf_ldp_tlv_intparam_tdmopt_r = -1;
-static int hf_ldp_tlv_intparam_tdmopt_d = -1;
-static int hf_ldp_tlv_intparam_tdmopt_f = -1;
-static int hf_ldp_tlv_intparam_tdmopt_res1 = -1;
-static int hf_ldp_tlv_intparam_tdmopt_pt = -1;
-static int hf_ldp_tlv_intparam_tdmopt_res2 = -1;
-static int hf_ldp_tlv_intparam_tdmopt_freq = -1;
-static int hf_ldp_tlv_intparam_tdmopt_ssrc = -1;
-static int hf_ldp_tlv_intparam_vccv_cctype_cw = -1;
-static int hf_ldp_tlv_intparam_vccv_cctype_mplsra = -1;
-static int hf_ldp_tlv_intparam_vccv_cctype_ttl1 = -1;
-static int hf_ldp_tlv_intparam_vccv_cvtype_icmpping = -1;
-static int hf_ldp_tlv_intparam_vccv_cvtype_lspping = -1;
-static int hf_ldp_tlv_intparam_vccv_cvtype_bfd = -1;
-static int hf_ldp_tlv_upstr_sbit = -1;
-static int hf_ldp_tlv_upstr_lbl_req_resvbit = -1;
-static int hf_ldp_tlv_upstr_ass_lbl = -1;
-static int hf_ldp_tlv_upstr_lbl_resvbit = -1;
-static int hf_ldp_tlv_ipv4_intID_hop_addr = -1;
-static int hf_ldp_tlv_logical_intID = -1;
-static int hf_ldp_tlv_ip_multicast_srcaddr = -1;
-static int hf_ldp_tlv_ip_multicast_mltcstaddr = -1;
-static int hf_ldp_tlv_ldp_p2mp_lsptype = -1;
-static int hf_ldp_tlv_ip_mpls_context_srcaddr = -1;
-static int hf_ldp_tlv_ldp_p2mp_addrfam = -1;
-static int hf_ldp_tlv_ldp_p2mp_addrlen = -1;
-static int hf_ldp_tlv_ldp_p2mp_rtnodeaddr = -1;
-static int hf_ldp_tlv_ldp_p2mp_oplength = -1;
-static int hf_ldp_tlv_ldp_p2mp_opvalue = -1;
-static int hf_ldp_tlv_rsvp_te_p2mp_id = -1;
-static int hf_ldp_tlv_must_be_zero = -1;
-static int hf_ldp_tlv_tunnel_id = -1;
-static int hf_ldp_tlv_ext_tunnel_id = -1;
-static int hf_ldp_tlv_inv_length = -1;
-static int hf_ldp_returned_pdu_data = -1;
-static int hf_ldp_returned_message_parameters = -1;
-static int hf_ldp_data = -1;
-static int hf_ldp_unknown_data = -1;
-
-
-static int ett_ldp = -1;
-static int ett_ldp_header = -1;
-static int ett_ldp_ldpid = -1;
-static int ett_ldp_message = -1;
-static int ett_ldp_tlv = -1;
-static int ett_ldp_tlv_val = -1;
-static int ett_ldp_tlv_ft_flags = -1;
-static int ett_ldp_fec = -1;
-static int ett_ldp_fec_vc_interfaceparam = -1;
-static int ett_ldp_fec_vc_interfaceparam_cepopt = -1;
-static int ett_ldp_fec_vc_interfaceparam_vccvtype = -1;
-static int ett_ldp_diffserv_map = -1;
-static int ett_ldp_diffserv_map_phbid = -1;
-static int ett_ldp_gen_agi = -1;
-static int ett_ldp_gen_saii = -1;
-static int ett_ldp_gen_taii = -1;
-static int ett_ldp_gen_aai_type2 = -1;
-static int ett_ldp_sub_tlv = -1;
-
-static expert_field ei_ldp_dtsm_and_target = EI_INIT;
-static expert_field ei_ldp_gtsm_supported = EI_INIT;
-static expert_field ei_ldp_gtsm_not_supported_basic_discovery = EI_INIT;
-static expert_field ei_ldp_gtsm_not_supported = EI_INIT;
-static expert_field ei_ldp_inv_length = EI_INIT;
-static expert_field ei_ldp_tlv_fec_vc_infolength = EI_INIT;
-static expert_field ei_ldp_tlv_fec_type = EI_INIT;
-static expert_field ei_ldp_tlv_fec_len = EI_INIT;
-static expert_field ei_ldp_malformed_data = EI_INIT;
-static expert_field ei_ldp_address_family_not_implemented = EI_INIT;
-static expert_field ei_ldp_malformed_interface_parameter = EI_INIT;
-static expert_field ei_ldp_tlv_fec = EI_INIT;
+/* static int hf_ldp_req; */
+/* static int hf_ldp_rsp; */
+static int hf_ldp_version;
+static int hf_ldp_pdu_len;
+static int hf_ldp_lsr;
+static int hf_ldp_ls_id;
+static int hf_ldp_msg_ubit;
+static int hf_ldp_msg_type;
+static int hf_ldp_msg_len;
+static int hf_ldp_msg_id;
+static int hf_ldp_msg_vendor_id;
+static int hf_ldp_msg_experiment_id;
+static int hf_ldp_tlv_value;
+static int hf_ldp_tlv_type;
+static int hf_ldp_tlv_unknown;
+static int hf_ldp_tlv_len;
+static int hf_ldp_tlv_val_hold;
+static int hf_ldp_tlv_val_target;
+static int hf_ldp_tlv_val_request;
+static int hf_ldp_tlv_val_res;
+static int hf_ldp_tlv_val_gtsm_flag;
+static int hf_ldp_tlv_ipv4_taddr;
+static int hf_ldp_tlv_config_seqno;
+static int hf_ldp_tlv_ipv6_taddr;
+static int hf_ldp_tlv_fec_wc;
+static int hf_ldp_tlv_fec_af;
+static int hf_ldp_tlv_fec_len;
+static int hf_ldp_tlv_fec_pfval;
+static int hf_ldp_tlv_fec_hoval;
+static int hf_ldp_tlv_addrl_addr_family;
+static int hf_ldp_tlv_addrl_addr;
+static int hf_ldp_tlv_hc_value;
+static int hf_ldp_tlv_pv_lsrid;
+static int hf_ldp_tlv_generic_label;
+static int hf_ldp_tlv_atm_label_vbits;
+static int hf_ldp_tlv_atm_label_vpi;
+static int hf_ldp_tlv_atm_label_vci;
+static int hf_ldp_tlv_fr_label_len;
+static int hf_ldp_tlv_fr_label_dlci;
+static int hf_ldp_tlv_ft_protect_sequence_num;
+static int hf_ldp_tlv_status_ebit;
+static int hf_ldp_tlv_status_fbit;
+static int hf_ldp_tlv_status_data;
+static int hf_ldp_tlv_status_msg_id;
+static int hf_ldp_tlv_status_msg_type;
+static int hf_ldp_tlv_extstatus_data;
+static int hf_ldp_tlv_returned_version;
+static int hf_ldp_tlv_returned_pdu_len;
+static int hf_ldp_tlv_returned_lsr;
+static int hf_ldp_tlv_returned_ls_id;
+static int hf_ldp_tlv_returned_msg_ubit;
+static int hf_ldp_tlv_returned_msg_type;
+static int hf_ldp_tlv_returned_msg_len;
+static int hf_ldp_tlv_returned_msg_id;
+static int hf_ldp_tlv_mac;
+static int hf_ldp_tlv_sess_ver;
+static int hf_ldp_tlv_sess_ka;
+static int hf_ldp_tlv_sess_advbit;
+static int hf_ldp_tlv_sess_ldetbit;
+static int hf_ldp_tlv_sess_pvlim;
+static int hf_ldp_tlv_sess_mxpdu;
+static int hf_ldp_tlv_sess_rxlsr;
+static int hf_ldp_tlv_sess_rxls;
+static int hf_ldp_tlv_sess_atm_merge;
+static int hf_ldp_tlv_sess_atm_lr;
+static int hf_ldp_tlv_sess_atm_dir;
+static int hf_ldp_tlv_sess_atm_minvpi;
+static int hf_ldp_tlv_sess_atm_maxvpi;
+static int hf_ldp_tlv_sess_atm_minvci;
+static int hf_ldp_tlv_sess_atm_maxvci;
+static int hf_ldp_tlv_sess_fr_merge;
+static int hf_ldp_tlv_sess_fr_lr;
+static int hf_ldp_tlv_sess_fr_dir;
+static int hf_ldp_tlv_sess_fr_len;
+static int hf_ldp_tlv_sess_fr_mindlci;
+static int hf_ldp_tlv_sess_fr_maxdlci;
+static int hf_ldp_tlv_ft_sess_flags;
+static int hf_ldp_tlv_ft_sess_flag_r;
+static int hf_ldp_tlv_ft_sess_flag_res;
+static int hf_ldp_tlv_ft_sess_flag_s;
+static int hf_ldp_tlv_ft_sess_flag_a;
+static int hf_ldp_tlv_ft_sess_flag_c;
+static int hf_ldp_tlv_ft_sess_flag_l;
+static int hf_ldp_tlv_ft_sess_res;
+static int hf_ldp_tlv_ft_sess_reconn_to;
+static int hf_ldp_tlv_ft_sess_recovery_time;
+static int hf_ldp_tlv_ft_ack_sequence_num;
+static int hf_ldp_tlv_lbl_req_msg_id;
+static int hf_ldp_tlv_vendor_id;
+static int hf_ldp_tlv_experiment_id;
+static int hf_ldp_tlv_fec_vc_controlword;
+static int hf_ldp_tlv_fec_vc_vctype;
+static int hf_ldp_tlv_fec_vc_infolength;
+static int hf_ldp_tlv_fec_vc_groupid;
+static int hf_ldp_tlv_fec_vc_vcid;
+static int hf_ldp_tlv_fec_vc_intparam_length;
+static int hf_ldp_tlv_fec_vc_intparam_mtu;
+static int hf_ldp_tlv_fec_vc_intparam_tdmbps;
+static int hf_ldp_tlv_fec_vc_intparam_id;
+static int hf_ldp_tlv_fec_vc_intparam_maxcatmcells;
+static int hf_ldp_tlv_fec_vc_intparam_desc;
+static int hf_ldp_tlv_fec_vc_intparam_cepbytes;
+static int hf_ldp_tlv_fec_vc_intparam_cepopt_ais;
+static int hf_ldp_tlv_fec_vc_intparam_cepopt_une;
+static int hf_ldp_tlv_fec_vc_intparam_cepopt_rtp;
+static int hf_ldp_tlv_fec_vc_intparam_cepopt_ebm;
+static int hf_ldp_tlv_fec_vc_intparam_cepopt_mah;
+static int hf_ldp_tlv_fec_vc_intparam_cepopt_res;
+static int hf_ldp_tlv_fec_vc_intparam_cepopt_ceptype;
+static int hf_ldp_tlv_fec_vc_intparam_cepopt_t3;
+static int hf_ldp_tlv_fec_vc_intparam_cepopt_e3;
+static int hf_ldp_tlv_fec_vc_intparam_vlanid;
+static int hf_ldp_tlv_fec_vc_intparam_dlcilen;
+static int hf_ldp_tlv_fec_vc_intparam_fcslen;
+static int hf_ldp_tlv_fec_vc_intparam_tdmopt_r;
+static int hf_ldp_tlv_fec_vc_intparam_tdmopt_d;
+static int hf_ldp_tlv_fec_vc_intparam_tdmopt_f;
+static int hf_ldp_tlv_fec_vc_intparam_tdmopt_res1;
+static int hf_ldp_tlv_fec_vc_intparam_tdmopt_pt;
+static int hf_ldp_tlv_fec_vc_intparam_tdmopt_res2;
+static int hf_ldp_tlv_fec_vc_intparam_tdmopt_freq;
+static int hf_ldp_tlv_fec_vc_intparam_tdmopt_ssrc;
+static int hf_ldp_tlv_fec_vc_intparam_vccv_cctype_cw;
+static int hf_ldp_tlv_fec_vc_intparam_vccv_cctype_mplsra;
+static int hf_ldp_tlv_fec_vc_intparam_vccv_cctype_ttl1;
+static int hf_ldp_tlv_fec_vc_intparam_vccv_cvtype_icmpping;
+static int hf_ldp_tlv_fec_vc_intparam_vccv_cvtype_lspping;
+static int hf_ldp_tlv_fec_vc_intparam_vccv_cvtype_bfd1;
+static int hf_ldp_tlv_fec_vc_intparam_vccv_cvtype_bfd2;
+static int hf_ldp_tlv_fec_vc_intparam_vccv_cvtype_bfd3;
+static int hf_ldp_tlv_fec_vc_intparam_vccv_cvtype_bfd4;
+static int hf_ldp_tlv_fec_vc_intparam_flowlabel_t; /* Flow label interface parameter RFC6391 */
+static int hf_ldp_tlv_fec_vc_intparam_flowlabel_r; /* Flow label interface parameter RFC6391 */
+static int hf_ldp_tlv_fec_vc_intparam_flowlabel_res; /* Flow label interface parameter RFC6391 */
+static int hf_ldp_tlv_lspid_act_flg;
+static int hf_ldp_tlv_lspid_cr_lsp;
+static int hf_ldp_tlv_lspid_ldpid;
+static int hf_ldp_tlv_er_hop_loose;
+static int hf_ldp_tlv_er_hop_prelen;
+static int hf_ldp_tlv_er_hop_prefix4;
+static int hf_ldp_tlv_er_hop_prefix6;
+static int hf_ldp_tlv_er_hop_as;
+static int hf_ldp_tlv_er_hop_cr_lsp;
+static int hf_ldp_tlv_er_hop_ldpid;
+static int hf_ldp_tlv_flags_reserv;
+static int hf_ldp_tlv_flags_weight;
+static int hf_ldp_tlv_flags_ebs;
+static int hf_ldp_tlv_flags_cbs;
+static int hf_ldp_tlv_flags_cdr;
+static int hf_ldp_tlv_flags_pbs;
+static int hf_ldp_tlv_flags_pdr;
+static int hf_ldp_tlv_frequency;
+static int hf_ldp_tlv_pdr;
+static int hf_ldp_tlv_pbs;
+static int hf_ldp_tlv_cdr;
+static int hf_ldp_tlv_cbs;
+static int hf_ldp_tlv_ebs;
+static int hf_ldp_tlv_weight;
+static int hf_ldp_tlv_set_prio;
+static int hf_ldp_tlv_hold_prio;
+static int hf_ldp_tlv_route_pinning;
+static int hf_ldp_tlv_resource_class;
+/* static int hf_ldp_tlv_diffserv; */
+static int hf_ldp_tlv_diffserv_type;
+static int hf_ldp_tlv_diffserv_mapnb;
+static int hf_ldp_tlv_diffserv_map;
+static int hf_ldp_tlv_diffserv_map_exp;
+static int hf_ldp_tlv_diffserv_phbid;
+static int hf_ldp_tlv_diffserv_phbid_dscp;
+static int hf_ldp_tlv_diffserv_phbid_code;
+static int hf_ldp_tlv_diffserv_phbid_bit14;
+static int hf_ldp_tlv_diffserv_phbid_bit15;
+static int hf_ldp_tlv_fec_gen_agi_type;
+static int hf_ldp_tlv_fec_gen_agi_length;
+static int hf_ldp_tlv_fec_gen_agi_value;
+static int hf_ldp_tlv_fec_gen_saii_type;
+static int hf_ldp_tlv_fec_gen_saii_length;
+static int hf_ldp_tlv_fec_gen_saii_value;
+static int hf_ldp_tlv_fec_gen_taii_type;
+static int hf_ldp_tlv_fec_gen_taii_length;
+static int hf_ldp_tlv_fec_gen_taii_value;
+static int hf_ldp_tlv_fec_gen_aai_globalid;
+static int hf_ldp_tlv_fec_gen_aai_prefix;
+static int hf_ldp_tlv_fec_gen_aai_ac_id;
+static int hf_ldp_tlv_fec_pw_controlword;
+static int hf_ldp_tlv_fec_pw_pwtype;
+static int hf_ldp_tlv_fec_pw_infolength;
+static int hf_ldp_tlv_fec_pw_groupid;
+static int hf_ldp_tlv_fec_pw_pwid;
+static int hf_ldp_tlv_pw_status_data;
+static int hf_ldp_tlv_pw_not_forwarding;
+static int hf_ldp_tlv_pw_lac_ingress_recv_fault;
+static int hf_ldp_tlv_pw_lac_egress_recv_fault;
+static int hf_ldp_tlv_pw_psn_pw_ingress_recv_fault;
+static int hf_ldp_tlv_pw_psn_pw_egress_recv_fault;
+static int hf_ldp_tlv_pw_grouping_value;
+static int hf_ldp_tlv_intparam_length;
+static int hf_ldp_tlv_intparam_mtu;
+static int hf_ldp_tlv_intparam_tdmbps;
+static int hf_ldp_tlv_intparam_id;
+static int hf_ldp_tlv_intparam_maxcatmcells;
+static int hf_ldp_tlv_intparam_desc;
+static int hf_ldp_tlv_intparam_cepbytes;
+static int hf_ldp_tlv_intparam_cepopt_ais;
+static int hf_ldp_tlv_intparam_cepopt_une;
+static int hf_ldp_tlv_intparam_cepopt_rtp;
+static int hf_ldp_tlv_intparam_cepopt_ebm;
+static int hf_ldp_tlv_intparam_cepopt_mah;
+static int hf_ldp_tlv_intparam_cepopt_res;
+static int hf_ldp_tlv_intparam_cepopt_ceptype;
+static int hf_ldp_tlv_intparam_cepopt_t3;
+static int hf_ldp_tlv_intparam_cepopt_e3;
+static int hf_ldp_tlv_intparam_vlanid;
+static int hf_ldp_tlv_intparam_dlcilen;
+static int hf_ldp_tlv_intparam_fcslen;
+static int hf_ldp_tlv_intparam_tdmopt_r;
+static int hf_ldp_tlv_intparam_tdmopt_d;
+static int hf_ldp_tlv_intparam_tdmopt_f;
+static int hf_ldp_tlv_intparam_tdmopt_res1;
+static int hf_ldp_tlv_intparam_tdmopt_pt;
+static int hf_ldp_tlv_intparam_tdmopt_res2;
+static int hf_ldp_tlv_intparam_tdmopt_freq;
+static int hf_ldp_tlv_intparam_tdmopt_ssrc;
+static int hf_ldp_tlv_intparam_vccv_cctype_cw;
+static int hf_ldp_tlv_intparam_vccv_cctype_mplsra;
+static int hf_ldp_tlv_intparam_vccv_cctype_ttl1;
+static int hf_ldp_tlv_intparam_vccv_cvtype_icmpping;
+static int hf_ldp_tlv_intparam_vccv_cvtype_lspping;
+static int hf_ldp_tlv_intparam_vccv_cvtype_bfd;
+static int hf_ldp_tlv_upstr_sbit;
+static int hf_ldp_tlv_upstr_lbl_req_resvbit;
+static int hf_ldp_tlv_upstr_ass_lbl;
+static int hf_ldp_tlv_upstr_lbl_resvbit;
+static int hf_ldp_tlv_ipv4_intID_hop_addr;
+static int hf_ldp_tlv_logical_intID;
+static int hf_ldp_tlv_ip_multicast_srcaddr;
+static int hf_ldp_tlv_ip_multicast_mltcstaddr;
+static int hf_ldp_tlv_ldp_p2mp_lsptype;
+static int hf_ldp_tlv_ip_mpls_context_srcaddr;
+static int hf_ldp_tlv_ldp_p2mp_addrfam;
+static int hf_ldp_tlv_ldp_p2mp_addrlen;
+static int hf_ldp_tlv_ldp_p2mp_rtnodeaddr;
+static int hf_ldp_tlv_ldp_p2mp_oplength;
+static int hf_ldp_tlv_ldp_p2mp_opvalue;
+static int hf_ldp_tlv_rsvp_te_p2mp_id;
+static int hf_ldp_tlv_must_be_zero;
+static int hf_ldp_tlv_tunnel_id;
+static int hf_ldp_tlv_ext_tunnel_id;
+static int hf_ldp_tlv_inv_length;
+static int hf_ldp_returned_pdu_data;
+static int hf_ldp_returned_message_parameters;
+static int hf_ldp_data;
+static int hf_ldp_unknown_data;
+
+
+static int ett_ldp;
+static int ett_ldp_header;
+static int ett_ldp_ldpid;
+static int ett_ldp_message;
+static int ett_ldp_tlv;
+static int ett_ldp_tlv_val;
+static int ett_ldp_tlv_ft_flags;
+static int ett_ldp_fec;
+static int ett_ldp_fec_vc_interfaceparam;
+static int ett_ldp_fec_vc_interfaceparam_cepopt;
+static int ett_ldp_fec_vc_interfaceparam_vccvtype;
+static int ett_ldp_diffserv_map;
+static int ett_ldp_diffserv_map_phbid;
+static int ett_ldp_gen_agi;
+static int ett_ldp_gen_saii;
+static int ett_ldp_gen_taii;
+static int ett_ldp_gen_aai_type2;
+static int ett_ldp_sub_tlv;
+
+static expert_field ei_ldp_dtsm_and_target;
+static expert_field ei_ldp_gtsm_supported;
+static expert_field ei_ldp_gtsm_not_supported_basic_discovery;
+static expert_field ei_ldp_gtsm_not_supported;
+static expert_field ei_ldp_inv_length;
+static expert_field ei_ldp_tlv_fec_vc_infolength;
+static expert_field ei_ldp_tlv_fec_type;
+static expert_field ei_ldp_tlv_fec_len;
+static expert_field ei_ldp_malformed_data;
+static expert_field ei_ldp_address_family_not_implemented;
+static expert_field ei_ldp_malformed_interface_parameter;
+static expert_field ei_ldp_tlv_fec;
/* desegmentation of LDP over TCP */
-static gboolean ldp_desegment = TRUE;
+static bool ldp_desegment = true;
/*
* The following define all the TLV types I know about
@@ -1073,15 +1073,15 @@ static const true_false_string tlv_upstr_sbit_vals = {
#define PW_PSN_PW_EGRESS_TRANS_FAULT 0x00000010
static void
-dissect_subtlv_interface_parameters(tvbuff_t *tvb, guint offset, proto_tree *tree, int rem, int *interface_parameters_hf[]);
+dissect_subtlv_interface_parameters(tvbuff_t *tvb, unsigned offset, proto_tree *tree, int rem, int *interface_parameters_hf[]);
static void
-dissect_genpwid_fec_aai_type2_parameter(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tree, int rem);
+dissect_genpwid_fec_aai_type2_parameter(tvbuff_t *tvb, packet_info *pinfo, unsigned offset, proto_tree *tree, int rem);
/* Dissect FEC TLV */
static void
-dissect_tlv_fec(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tree, int rem)
+dissect_tlv_fec(tvbuff_t *tvb, packet_info *pinfo, unsigned offset, proto_tree *tree, int rem)
{
static int *interface_params_header_fields[] = {
&hf_ldp_tlv_fec_vc_intparam_length ,
@@ -1127,20 +1127,20 @@ dissect_tlv_fec(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tre
proto_tree *ti, *ti2, *val_tree, *fec_tree=NULL;
proto_tree *agi_tree=NULL, *saii_tree=NULL, *taii_tree=NULL;
- guint16 family, ix=1, ax;
- guint16 op_length = tvb_get_bits16(tvb, ((offset+8)*8), 16, ENC_BIG_ENDIAN);
- guint8 addr_size=0, *addr, implemented, prefix_len_octets, prefix_len, host_len, vc_len;
- guint8 intparam_len, aai_type = 0;
- guint32 pwid_len, agi_aii_len;
+ uint16_t family, ix=1, ax;
+ uint16_t op_length = tvb_get_bits16(tvb, ((offset+8)*8), 16, ENC_BIG_ENDIAN);
+ uint8_t addr_size=0, *addr, implemented, prefix_len_octets, prefix_len, host_len, vc_len;
+ uint8_t intparam_len, aai_type = 0;
+ uint32_t pwid_len, agi_aii_len;
const char *str;
- guint8 gen_fec_id_len = 0;
+ uint8_t gen_fec_id_len = 0;
address_type addr_type;
address addr_str;
val_tree=proto_tree_add_subtree(tree, tvb, offset, rem, ett_ldp_tlv_val, NULL, "FEC Elements");
while (rem > 0){
- switch (tvb_get_guint8(tvb, offset)) {
+ switch (tvb_get_uint8(tvb, offset)) {
case WILDCARD_FEC:
case CRLSP_FEC:
fec_tree = proto_tree_add_subtree_format(val_tree, tvb, offset, 1,
@@ -1156,7 +1156,7 @@ dissect_tlv_fec(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tre
return;
}
family=tvb_get_ntohs(tvb, offset+1);
- prefix_len=tvb_get_guint8(tvb, offset+3);
+ prefix_len=tvb_get_uint8(tvb, offset+3);
prefix_len_octets=(prefix_len+7)/8;
implemented=1;
@@ -1175,7 +1175,7 @@ dissect_tlv_fec(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tre
}
if ( !implemented ) {
- guint16 noctets;
+ uint16_t noctets;
noctets= rem>4+prefix_len_octets?4+prefix_len_octets:rem;
proto_tree_add_expert(val_tree, pinfo, &ei_ldp_address_family_not_implemented, tvb, offset, noctets);
@@ -1211,10 +1211,10 @@ dissect_tlv_fec(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tre
break;
}
- addr=(guint8 *)wmem_alloc0(pinfo->pool, addr_size);
+ addr=(uint8_t *)wmem_alloc0(pinfo->pool, addr_size);
for(ax=0; ax+1 <= prefix_len_octets; ax++)
- addr[ax]=tvb_get_guint8(tvb, offset+ax);
+ addr[ax]=tvb_get_uint8(tvb, offset+ax);
if ( prefix_len % 8 )
addr[ax-1] = addr[ax-1]&(0xFF<<(8-prefix_len%8));
@@ -1233,7 +1233,7 @@ dissect_tlv_fec(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tre
return;
}
family=tvb_get_ntohs(tvb, offset+1);
- host_len=tvb_get_guint8(tvb, offset+3);
+ host_len=tvb_get_uint8(tvb, offset+3);
implemented=1;
switch(family) {
@@ -1251,7 +1251,7 @@ dissect_tlv_fec(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tre
}
if ( !implemented ) {
- guint16 noctets;
+ uint16_t noctets;
noctets= rem>4+host_len?4+host_len:rem;
proto_tree_add_expert(val_tree, pinfo, &ei_ldp_address_family_not_implemented, tvb, offset, noctets);
@@ -1286,10 +1286,10 @@ dissect_tlv_fec(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tre
break;
}
- addr=(guint8 *)wmem_alloc0(pinfo->pool, addr_size);
+ addr=(uint8_t *)wmem_alloc0(pinfo->pool, addr_size);
for(ax=0; ax+1 <= host_len; ax++)
- addr[ax]=tvb_get_guint8(tvb, offset+ax);
+ addr[ax]=tvb_get_uint8(tvb, offset+ax);
set_address(&addr_str, addr_type, addr_size, addr);
str = address_to_str(pinfo->pool, &addr_str);
@@ -1305,7 +1305,7 @@ dissect_tlv_fec(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tre
proto_tree_add_expert_format(val_tree, pinfo, &ei_ldp_tlv_fec, tvb, offset, rem, "Error in FEC Element %u", ix);
return;
}
- vc_len = tvb_get_guint8 (tvb, offset+3);
+ vc_len = tvb_get_uint8 (tvb, offset+3);
fec_tree = proto_tree_add_subtree_format(val_tree, tvb, offset, 8+vc_len, ett_ldp_fec, &ti, "FEC Element %u", ix);
@@ -1330,7 +1330,7 @@ dissect_tlv_fec(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tre
offset += 4;
while ( (vc_len > 1) && (rem > 1) ) { /* enough to include id and length */
- intparam_len = tvb_get_guint8(tvb, offset+1);
+ intparam_len = tvb_get_uint8(tvb, offset+1);
if (intparam_len < 2){ /* At least Type and Len, protect against len = 0 */
proto_tree_add_expert(fec_tree, pinfo, &ei_ldp_malformed_interface_parameter, tvb, offset +1, 1);
return;
@@ -1355,7 +1355,7 @@ dissect_tlv_fec(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tre
proto_tree_add_expert_format(val_tree, pinfo, &ei_ldp_tlv_fec, tvb, offset, rem, "Error in FEC Element %u", ix);
return;
}
- vc_len = tvb_get_guint8 (tvb, offset+3);
+ vc_len = tvb_get_uint8 (tvb, offset+3);
/* Add the FEC to the tree */
fec_tree = proto_tree_add_subtree_format(val_tree, tvb, offset, 8+vc_len, ett_ldp_fec, NULL, "FEC Element %u", ix);
@@ -1367,7 +1367,7 @@ dissect_tlv_fec(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tre
offset += 4;
if ( (vc_len > 1) && ( rem > 1 ) ) { /* there is enough room for AGI */
- gen_fec_id_len = tvb_get_guint8 (tvb, offset+1);
+ gen_fec_id_len = tvb_get_uint8 (tvb, offset+1);
/* Add AGI to the tree */
agi_tree = proto_tree_add_subtree_format(fec_tree, tvb, offset, 2 + gen_fec_id_len, ett_ldp_gen_agi, NULL, "AGI");
proto_tree_add_item(agi_tree, hf_ldp_tlv_fec_gen_agi_type,tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -1386,9 +1386,9 @@ dissect_tlv_fec(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tre
}
if ( (vc_len > 1) && ( rem > 1 ) ) { /* there is enough room for SAII */
- gen_fec_id_len = tvb_get_guint8 (tvb, offset+1);
+ gen_fec_id_len = tvb_get_uint8 (tvb, offset+1);
/* Add SAII to the tree */
- aai_type = tvb_get_guint8(tvb, offset);
+ aai_type = tvb_get_uint8(tvb, offset);
if ( aai_type == 2 && gen_fec_id_len != 12)
{
/* According to RFC 5003, for Type 2 AAI, the length should be 12 bytes */
@@ -1441,9 +1441,9 @@ dissect_tlv_fec(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tre
}
if ( (vc_len > 1) && ( rem > 1 ) ) { /* there is enough room for TAII */
- gen_fec_id_len = tvb_get_guint8 (tvb, offset+1);
+ gen_fec_id_len = tvb_get_uint8 (tvb, offset+1);
/* Add TAII to the tree */
- aai_type = tvb_get_guint8(tvb, offset);
+ aai_type = tvb_get_uint8(tvb, offset);
if ( aai_type == 2 && gen_fec_id_len != 12)
{
/* According to RFC 5003, for Type 2 AAI, the length should be 12 bytes */
@@ -1506,7 +1506,7 @@ dissect_tlv_fec(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tre
return;
}
- fec_tree = proto_tree_add_subtree_format(val_tree, tvb, offset, 4+tvb_get_guint8 (tvb, offset+1),
+ fec_tree = proto_tree_add_subtree_format(val_tree, tvb, offset, 4+tvb_get_uint8 (tvb, offset+1),
ett_ldp_fec, NULL, "FEC Element %u", ix);
proto_tree_add_item(fec_tree, hf_ldp_tlv_fec_wc, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
@@ -1535,7 +1535,7 @@ dissect_tlv_fec(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tre
return;
}
- fec_tree = proto_tree_add_subtree_format(val_tree, tvb, offset, 8+tvb_get_guint8 (tvb, offset+3),
+ fec_tree = proto_tree_add_subtree_format(val_tree, tvb, offset, 8+tvb_get_uint8 (tvb, offset+3),
ett_ldp_fec, NULL, "FEC Element %u", ix);
proto_tree_add_item(fec_tree, hf_ldp_tlv_fec_wc, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(fec_tree, hf_ldp_tlv_fec_pw_controlword, tvb, offset+1, 1, ENC_BIG_ENDIAN);
@@ -1553,14 +1553,14 @@ dissect_tlv_fec(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tre
}
while ( (pwid_len > 1) && (rem > 1) ) { /* enough to include id and length */
- intparam_len = tvb_get_guint8(tvb, offset+1);
+ intparam_len = tvb_get_uint8(tvb, offset+1);
if (intparam_len < 2){ /* At least Type and Len, protect against len = 0 */
proto_tree_add_expert(fec_tree, pinfo, &ei_ldp_malformed_interface_parameter, tvb, offset +1, 1);
return;
}
- if ( ((guint32)intparam_len > pwid_len) && (rem -intparam_len) <0 ) { /* error condition */
- proto_tree_add_expert(fec_tree, pinfo, &ei_ldp_malformed_data, tvb, offset +2, MIN(pwid_len,(guint32)rem));
+ if ( ((uint32_t)intparam_len > pwid_len) && (rem -intparam_len) <0 ) { /* error condition */
+ proto_tree_add_expert(fec_tree, pinfo, &ei_ldp_malformed_data, tvb, offset +2, MIN(pwid_len,(uint32_t)rem));
return;
}
dissect_subtlv_interface_parameters(tvb, offset, fec_tree, intparam_len, interface_params_header_fields);
@@ -1582,7 +1582,7 @@ dissect_tlv_fec(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tre
return;
}
- fec_tree = proto_tree_add_subtree_format(val_tree, tvb, offset, 4+tvb_get_guint8 (tvb, offset+3),
+ fec_tree = proto_tree_add_subtree_format(val_tree, tvb, offset, 4+tvb_get_uint8 (tvb, offset+3),
ett_ldp_fec, NULL, "FEC Element %u", ix);
proto_tree_add_item(fec_tree, hf_ldp_tlv_fec_wc, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(fec_tree, hf_ldp_tlv_fec_pw_controlword, tvb, offset+1, 1, ENC_BIG_ENDIAN);
@@ -1646,11 +1646,11 @@ dissect_tlv_fec(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tre
/* Dissect Address List TLV */
static void
-dissect_tlv_address_list(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tree, int rem)
+dissect_tlv_address_list(tvbuff_t *tvb, packet_info *pinfo, unsigned offset, proto_tree *tree, int rem)
{
proto_tree *val_tree;
- guint16 family, ix;
- guint8 addr_size, *addr;
+ uint16_t family, ix;
+ uint8_t addr_size, *addr;
const char *str;
address_type addr_type;
address addr_str;
@@ -1682,7 +1682,7 @@ dissect_tlv_address_list(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_
offset+=2; rem-=2;
val_tree=proto_tree_add_subtree(tree, tvb, offset, rem, ett_ldp_tlv_val, NULL, "Addresses");
- addr=(guint8 *)wmem_alloc(pinfo->pool, addr_size);
+ addr=(uint8_t *)wmem_alloc(pinfo->pool, addr_size);
for(ix=1; rem >= addr_size; ix++, offset += addr_size,
rem -= addr_size) {
@@ -1703,11 +1703,11 @@ dissect_tlv_address_list(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_
/* Dissect Path Vector TLV */
static void
-dissect_tlv_path_vector(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tree, int rem)
+dissect_tlv_path_vector(tvbuff_t *tvb, packet_info *pinfo, unsigned offset, proto_tree *tree, int rem)
{
proto_tree *val_tree;
- guint8 ix;
- guint32 addr;
+ uint8_t ix;
+ uint32_t addr;
val_tree=proto_tree_add_subtree(tree, tvb, offset, rem, ett_ldp_tlv_val, NULL, "LSR IDs");
@@ -1725,7 +1725,7 @@ dissect_tlv_path_vector(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_t
/* Dissect ATM Label TLV */
static void
-dissect_tlv_atm_label(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tree, int rem)
+dissect_tlv_atm_label(tvbuff_t *tvb, packet_info *pinfo, unsigned offset, proto_tree *tree, int rem)
{
proto_tree *val_tree;
@@ -1745,10 +1745,10 @@ dissect_tlv_atm_label(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tre
/* Dissect FRAME RELAY Label TLV */
static void
-dissect_tlv_frame_label(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tree, int rem)
+dissect_tlv_frame_label(tvbuff_t *tvb, packet_info *pinfo, unsigned offset, proto_tree *tree, int rem)
{
proto_tree *val_tree;
- guint8 len;
+ uint8_t len;
if (rem != 4){
proto_tree_add_expert_format(tree, pinfo, &ei_ldp_tlv_fec_len, tvb, offset, rem,
@@ -1758,7 +1758,7 @@ dissect_tlv_frame_label(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_t
}
val_tree=proto_tree_add_subtree(tree, tvb, offset, rem, ett_ldp_tlv_val, NULL, "Frame Relay Label");
- len=(guint8)(tvb_get_ntohs(tvb, offset)>>7) & 0x03;
+ len=(uint8_t)(tvb_get_ntohs(tvb, offset)>>7) & 0x03;
proto_tree_add_uint_format_value(val_tree, hf_ldp_tlv_fr_label_len, tvb, offset, 2, len,
"%s (%u)", val_to_str_const(len, tlv_fr_len_vals, "Unknown Length"), len);
@@ -1769,10 +1769,10 @@ dissect_tlv_frame_label(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_t
/* Dissect STATUS TLV */
static void
-dissect_tlv_status(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tree, int rem)
+dissect_tlv_status(tvbuff_t *tvb, packet_info *pinfo, unsigned offset, proto_tree *tree, int rem)
{
proto_tree *val_tree;
- guint32 data;
+ uint32_t data;
if (rem != 10){
proto_tree_add_expert_format(tree, pinfo, &ei_ldp_tlv_fec_len, tvb, offset, rem,
@@ -1797,7 +1797,7 @@ dissect_tlv_status(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *
/* Dissect Returned PDU TLV */
static void
-dissect_tlv_returned_pdu(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tree, int rem)
+dissect_tlv_returned_pdu(tvbuff_t *tvb, packet_info *pinfo, unsigned offset, proto_tree *tree, int rem)
{
proto_tree *val_tree;
@@ -1825,10 +1825,10 @@ dissect_tlv_returned_pdu(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_
/* Dissect Returned MESSAGE TLV */
static void
-dissect_tlv_returned_message(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tree, int rem)
+dissect_tlv_returned_message(tvbuff_t *tvb, packet_info *pinfo, unsigned offset, proto_tree *tree, int rem)
{
proto_tree *val_tree;
- guint16 type;
+ uint16_t type;
if (rem < 4) {
proto_tree_add_expert_format(tree, pinfo, &ei_ldp_tlv_fec_len, tvb, offset, rem,
@@ -1874,9 +1874,9 @@ dissect_tlv_returned_message(tvbuff_t *tvb, packet_info *pinfo, guint offset, pr
static void
#if 0
-dissect_tlv_common_hello_parms(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tree, int rem)
+dissect_tlv_common_hello_parms(tvbuff_t *tvb, packet_info *pinfo, unsigned offset, proto_tree *tree, int rem)
#else
-dissect_tlv_common_hello_parms(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tree)
+dissect_tlv_common_hello_parms(tvbuff_t *tvb, packet_info *pinfo, unsigned offset, proto_tree *tree)
#endif
{
#if 0
@@ -1884,7 +1884,7 @@ dissect_tlv_common_hello_parms(tvbuff_t *tvb, packet_info *pinfo, guint offset,
#endif
proto_tree *val_tree;
proto_item *gtsm_flag_item;
- guint16 gtsm_flag_buffer;
+ uint16_t gtsm_flag_buffer;
#if 0
ti = proto_tree_add_item(tree, hf_ldp_tlv_value, tvb, offset, rem, ENC_NA);
val_tree = proto_item_add_subtree(ti, ett_ldp_tlv_val);
@@ -1918,7 +1918,7 @@ dissect_tlv_common_hello_parms(tvbuff_t *tvb, packet_info *pinfo, guint offset,
/* Dissect MAC TLV */
static void
-dissect_tlv_mac(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tree, int rem)
+dissect_tlv_mac(tvbuff_t *tvb, packet_info *pinfo, unsigned offset, proto_tree *tree, int rem)
{
proto_tree *val_tree;
@@ -1936,7 +1936,7 @@ dissect_tlv_mac(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tre
/* Dissect the common session params */
static void
-dissect_tlv_common_session_parms(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tree, int rem)
+dissect_tlv_common_session_parms(tvbuff_t *tvb, packet_info *pinfo, unsigned offset, proto_tree *tree, int rem)
{
proto_tree *val_tree;
@@ -1974,10 +1974,10 @@ dissect_tlv_common_session_parms(tvbuff_t *tvb, packet_info *pinfo, guint offset
/* Dissect the atm session params */
static void
-dissect_tlv_atm_session_parms(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tree, int rem)
+dissect_tlv_atm_session_parms(tvbuff_t *tvb, packet_info *pinfo, unsigned offset, proto_tree *tree, int rem)
{
proto_tree *val_tree, *lbl_tree;
- guint8 numlr, ix;
+ uint8_t numlr, ix;
if (rem < 4) {
proto_tree_add_expert_format(tree, pinfo, &ei_ldp_tlv_fec_len, tvb, offset, rem,
@@ -1991,7 +1991,7 @@ dissect_tlv_atm_session_parms(tvbuff_t *tvb, packet_info *pinfo, guint offset, p
proto_tree_add_item(val_tree, hf_ldp_tlv_sess_atm_merge,tvb, offset, 1, ENC_BIG_ENDIAN);
/*get the number of label ranges*/
- numlr=(tvb_get_guint8(tvb, offset)>>2) & 0x0F;
+ numlr=(tvb_get_uint8(tvb, offset)>>2) & 0x0F;
proto_tree_add_uint_format(val_tree, hf_ldp_tlv_sess_atm_lr,
tvb, offset, 1, numlr, "Number of Label Range components: %u",
numlr);
@@ -2033,10 +2033,10 @@ dissect_tlv_atm_session_parms(tvbuff_t *tvb, packet_info *pinfo, guint offset, p
/* Dissect the frame relay session params */
static void
-dissect_tlv_frame_relay_session_parms(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tree, int rem)
+dissect_tlv_frame_relay_session_parms(tvbuff_t *tvb, packet_info *pinfo, unsigned offset, proto_tree *tree, int rem)
{
proto_tree *val_tree, *lbl_tree;
- guint8 numlr, ix, len;
+ uint8_t numlr, ix, len;
if(rem < 4) {
proto_tree_add_expert_format(tree, pinfo, &ei_ldp_tlv_fec_len, tvb, offset, rem,
@@ -2051,7 +2051,7 @@ dissect_tlv_frame_relay_session_parms(tvbuff_t *tvb, packet_info *pinfo, guint o
tvb, offset, 1, ENC_BIG_ENDIAN);
/*get the number of label ranges*/
- numlr=(tvb_get_guint8(tvb, offset)>>2) & 0x0F;
+ numlr=(tvb_get_uint8(tvb, offset)>>2) & 0x0F;
proto_tree_add_uint_format(val_tree, hf_ldp_tlv_sess_fr_lr,
tvb, offset, 1, numlr, "Number of Label Range components: %u",
numlr);
@@ -2070,7 +2070,7 @@ dissect_tlv_frame_relay_session_parms(tvbuff_t *tvb, packet_info *pinfo, guint o
lbl_tree=proto_tree_add_subtree_format(val_tree, tvb, offset, 8,
ett_ldp_tlv_val, NULL, "Frame Relay Label Range Component %u", ix);
- len=(guint8)(tvb_get_ntohs(tvb, offset)>>7) & 0x03;
+ len=(uint8_t)(tvb_get_ntohs(tvb, offset)>>7) & 0x03;
proto_tree_add_uint_format_value(lbl_tree, hf_ldp_tlv_sess_fr_len, tvb, offset, 2, len,
"%s (%u)", val_to_str_const(len, tlv_fr_len_vals, "Unknown Length"), len);
@@ -2088,10 +2088,10 @@ dissect_tlv_frame_relay_session_parms(tvbuff_t *tvb, packet_info *pinfo, guint o
/* Dissect the Fault Tolerant (FT) Session TLV */
static void
-dissect_tlv_ft_session(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tree, int rem)
+dissect_tlv_ft_session(tvbuff_t *tvb, packet_info *pinfo, unsigned offset, proto_tree *tree, int rem)
{
proto_tree *ti, *val_tree, *flags_tree;
- guint16 flags;
+ uint16_t flags;
if(rem != 12){
/* error, length must be 12 bytes */
@@ -2130,7 +2130,7 @@ dissect_tlv_ft_session(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tr
}
static void
-dissect_tlv_lspid(tvbuff_t *tvb, packet_info *pinfo, guint offset,proto_tree *tree, int rem)
+dissect_tlv_lspid(tvbuff_t *tvb, packet_info *pinfo, unsigned offset,proto_tree *tree, int rem)
{
proto_tree *val_tree;
@@ -2154,7 +2154,7 @@ dissect_tlv_lspid(tvbuff_t *tvb, packet_info *pinfo, guint offset,proto_tree *tr
}
static void
-dissect_tlv_er_hop_ipv4(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tree, int rem)
+dissect_tlv_er_hop_ipv4(tvbuff_t *tvb, packet_info *pinfo, unsigned offset, proto_tree *tree, int rem)
{
proto_tree *val_tree;
@@ -2179,7 +2179,7 @@ dissect_tlv_er_hop_ipv4(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_t
}
static void
-dissect_tlv_er_hop_ipv6(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tree, int rem)
+dissect_tlv_er_hop_ipv6(tvbuff_t *tvb, packet_info *pinfo, unsigned offset, proto_tree *tree, int rem)
{
proto_tree *val_tree;
@@ -2204,7 +2204,7 @@ dissect_tlv_er_hop_ipv6(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_t
}
static void
-dissect_tlv_er_hop_as(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tree, int rem)
+dissect_tlv_er_hop_as(tvbuff_t *tvb, packet_info *pinfo, unsigned offset, proto_tree *tree, int rem)
{
proto_tree *val_tree;
@@ -2226,7 +2226,7 @@ dissect_tlv_er_hop_as(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tre
}
static void
-dissect_tlv_er_hop_lspid(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tree, int rem)
+dissect_tlv_er_hop_lspid(tvbuff_t *tvb, packet_info *pinfo, unsigned offset, proto_tree *tree, int rem)
{
proto_tree *val_tree;
@@ -2251,10 +2251,10 @@ dissect_tlv_er_hop_lspid(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_
}
static void
-dissect_tlv_traffic(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tree, int rem)
+dissect_tlv_traffic(tvbuff_t *tvb, packet_info *pinfo, unsigned offset, proto_tree *tree, int rem)
{
proto_tree *val_tree;
- guint8 val_8;
+ uint8_t val_8;
float val_f;
proto_item *pi;
@@ -2286,7 +2286,7 @@ dissect_tlv_traffic(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree
/* weight */
pi = proto_tree_add_item(val_tree, hf_ldp_tlv_weight, tvb, offset, 1, ENC_BIG_ENDIAN);
- val_8 = tvb_get_guint8(tvb, offset);
+ val_8 = tvb_get_uint8(tvb, offset);
if (val_8 == 0)
proto_item_set_text(pi, "Weight: Not applicable");
offset ++;
@@ -2323,7 +2323,7 @@ dissect_tlv_traffic(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree
}
static void
-dissect_tlv_route_pinning(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tree, int rem)
+dissect_tlv_route_pinning(tvbuff_t *tvb, packet_info *pinfo, unsigned offset, proto_tree *tree, int rem)
{
proto_tree *val_tree;
@@ -2343,7 +2343,7 @@ dissect_tlv_route_pinning(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto
static void
-dissect_tlv_resource_class(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tree, int rem)
+dissect_tlv_resource_class(tvbuff_t *tvb, packet_info *pinfo, unsigned offset, proto_tree *tree, int rem)
{
proto_tree *val_tree;
@@ -2363,7 +2363,7 @@ dissect_tlv_resource_class(tvbuff_t *tvb, packet_info *pinfo, guint offset, prot
static void
-dissect_tlv_preemption(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tree, int rem)
+dissect_tlv_preemption(tvbuff_t *tvb, packet_info *pinfo, unsigned offset, proto_tree *tree, int rem)
{
proto_tree *val_tree;
@@ -2386,7 +2386,7 @@ dissect_tlv_preemption(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tr
static void
-dissect_tlv_diffserv(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tree, int rem)
+dissect_tlv_diffserv(tvbuff_t *tvb, packet_info *pinfo, unsigned offset, proto_tree *tree, int rem)
{
static int *hfindexes[] = {
&hf_ldp_tlv_diffserv_map,
@@ -2397,7 +2397,7 @@ dissect_tlv_diffserv(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree
&hf_ldp_tlv_diffserv_phbid_bit14,
&hf_ldp_tlv_diffserv_phbid_bit15
};
- static gint *etts[] = {
+ static int *etts[] = {
&ett_ldp_diffserv_map,
&ett_ldp_diffserv_map_phbid
};
@@ -2409,13 +2409,13 @@ dissect_tlv_diffserv(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree
return;
}
proto_tree_add_uint(tree, hf_ldp_tlv_diffserv_type, tvb, offset, 1,
- type = tvb_get_guint8(tvb, offset));
+ type = tvb_get_uint8(tvb, offset));
type = (type >> 7) + 1;
if (type == 1) {
/* E-LSP */
offset += 3;
proto_tree_add_uint(tree, hf_ldp_tlv_diffserv_mapnb, tvb, offset,
- 1, mapnb = tvb_get_guint8(tvb, offset) & 15);
+ 1, mapnb = tvb_get_uint8(tvb, offset) & 15);
offset += 1;
for (count = 0; count < mapnb; count++) {
dissect_diffserv_mpls_common(tvb, tree, type, offset, hfindexes, etts);
@@ -2430,11 +2430,11 @@ dissect_tlv_diffserv(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree
static int
-dissect_tlv(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tree, int rem);
+dissect_tlv(tvbuff_t *tvb, packet_info *pinfo, unsigned offset, proto_tree *tree, int rem);
static void
// NOLINTNEXTLINE(misc-no-recursion)
-dissect_tlv_er(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tree, int rem)
+dissect_tlv_er(tvbuff_t *tvb, packet_info *pinfo, unsigned offset, proto_tree *tree, int rem)
{
proto_tree *val_tree;
int len;
@@ -2452,14 +2452,14 @@ dissect_tlv_er(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tree
static void
-dissect_tlv_pw_status(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tree, int rem);
+dissect_tlv_pw_status(tvbuff_t *tvb, packet_info *pinfo, unsigned offset, proto_tree *tree, int rem);
static void
-dissect_tlv_pw_grouping(tvbuff_t *tvb, guint offset, proto_tree *tree, int rem);
+dissect_tlv_pw_grouping(tvbuff_t *tvb, unsigned offset, proto_tree *tree, int rem);
/* Dissect Upstream Label Assignment Capability TLV */
static void
-dissect_tlv_upstrm_lbl_ass_cap(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tree, int rem)
+dissect_tlv_upstrm_lbl_ass_cap(tvbuff_t *tvb, packet_info *pinfo, unsigned offset, proto_tree *tree, int rem)
{
proto_tree *val_tree;
@@ -2477,7 +2477,7 @@ dissect_tlv_upstrm_lbl_ass_cap(tvbuff_t *tvb, packet_info *pinfo, guint offset,
}
/*Dissect Upstream Assigned Label Request TLV*/
static void
-dissect_tlv_upstrm_ass_lbl_req(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tree, int rem)
+dissect_tlv_upstrm_ass_lbl_req(tvbuff_t *tvb, packet_info *pinfo, unsigned offset, proto_tree *tree, int rem)
{
if ( rem != 4)
{
@@ -2493,7 +2493,7 @@ dissect_tlv_upstrm_ass_lbl_req(tvbuff_t *tvb, packet_info *pinfo, guint offset,
/*Dissect Upstream Assigned Label TLV*/
static void
-dissect_tlv_upstrm_ass_lbl(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tree, int rem)
+dissect_tlv_upstrm_ass_lbl(tvbuff_t *tvb, packet_info *pinfo, unsigned offset, proto_tree *tree, int rem)
{
proto_tree *val_tree;
@@ -2516,7 +2516,7 @@ dissect_tlv_upstrm_ass_lbl(tvbuff_t *tvb, packet_info *pinfo, guint offset, prot
/*Dissect IPv4 Interface ID TLV*/
static void
// NOLINTNEXTLINE(misc-no-recursion)
-dissect_tlv_ipv4_interface_id(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tree, int rem)
+dissect_tlv_ipv4_interface_id(tvbuff_t *tvb, packet_info *pinfo, unsigned offset, proto_tree *tree, int rem)
{
proto_tree *val_tree, *sub_tree;
@@ -2549,7 +2549,7 @@ dissect_tlv_ipv4_interface_id(tvbuff_t *tvb, packet_info *pinfo, guint offset, p
}
/*Dissect IP Multicast Tunnel TLV*/
static void
-dissect_tlv_ip_multicast_tunnel(tvbuff_t *tvb, guint offset, proto_tree *tree, int rem)
+dissect_tlv_ip_multicast_tunnel(tvbuff_t *tvb, unsigned offset, proto_tree *tree, int rem)
{
proto_tree *val_tree;
@@ -2561,7 +2561,7 @@ dissect_tlv_ip_multicast_tunnel(tvbuff_t *tvb, guint offset, proto_tree *tree, i
static void
// NOLINTNEXTLINE(misc-no-recursion)
-dissect_tlv_mpls_context_lbl(tvbuff_t *tvb,packet_info *pinfo, guint offset, proto_tree *tree, int rem)
+dissect_tlv_mpls_context_lbl(tvbuff_t *tvb,packet_info *pinfo, unsigned offset, proto_tree *tree, int rem)
{
proto_tree *val_tree;
@@ -2571,10 +2571,10 @@ dissect_tlv_mpls_context_lbl(tvbuff_t *tvb,packet_info *pinfo, guint offset, pro
}
static void
-dissect_tlv_ldp_p2mp_lsp(tvbuff_t *tvb, guint offset, proto_tree *tree)
+dissect_tlv_ldp_p2mp_lsp(tvbuff_t *tvb, unsigned offset, proto_tree *tree)
{
- guint16 addr_length = tvb_get_bits16(tvb, ((offset+3)*8), 8, ENC_BIG_ENDIAN);
- guint16 opcode_length = tvb_get_bits16(tvb, ((offset + 4 + addr_length)*8), 16, ENC_BIG_ENDIAN);
+ uint16_t addr_length = tvb_get_bits16(tvb, ((offset+3)*8), 8, ENC_BIG_ENDIAN);
+ uint16_t opcode_length = tvb_get_bits16(tvb, ((offset + 4 + addr_length)*8), 16, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_ldp_tlv_ldp_p2mp_lsptype, tvb,offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_ldp_tlv_ldp_p2mp_addrfam, tvb,offset + 1, 2, ENC_BIG_ENDIAN);
@@ -2585,7 +2585,7 @@ dissect_tlv_ldp_p2mp_lsp(tvbuff_t *tvb, guint offset, proto_tree *tree)
}
static void
-dissect_tlv_rsvp_te_p2mp_lsp(tvbuff_t *tvb, guint offset, proto_tree *tree)
+dissect_tlv_rsvp_te_p2mp_lsp(tvbuff_t *tvb, unsigned offset, proto_tree *tree)
{
proto_tree_add_item(tree, hf_ldp_tlv_rsvp_te_p2mp_id, tvb,offset, 4, ENC_BIG_ENDIAN);
@@ -2598,9 +2598,9 @@ dissect_tlv_rsvp_te_p2mp_lsp(tvbuff_t *tvb, guint offset, proto_tree *tree)
static int
// NOLINTNEXTLINE(misc-no-recursion)
-dissect_tlv(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tree, int rem)
+dissect_tlv(tvbuff_t *tvb, packet_info *pinfo, unsigned offset, proto_tree *tree, int rem)
{
- guint16 type, typebak;
+ uint16_t type, typebak;
int length;
length=tvb_reported_length_remaining(tvb, offset);
@@ -2687,7 +2687,7 @@ dissect_tlv(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tree, i
"Error processing Generic Label TLV: length is %d, should be 4",
length);
else {
- guint32 label=tvb_get_ntohl(tvb, offset+4) & 0x000FFFFF;
+ uint32_t label=tvb_get_ntohl(tvb, offset+4) & 0x000FFFFF;
proto_tree_add_uint(tlv_tree, hf_ldp_tlv_generic_label,
tvb, offset+4, length, label);
@@ -2724,7 +2724,7 @@ dissect_tlv(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tree, i
break;
case TLV_EXTENDED_STATUS:
- if( length != 4 ) /*error, need only status_code(guint32)*/
+ if( length != 4 ) /*error, need only status_code(uint32_t)*/
proto_tree_add_expert_format(tlv_tree, pinfo, &ei_ldp_tlv_fec_len, tvb, offset + 4, length,
"Error processing Extended Status TLV: length is %d, should be 4",
length);
@@ -2760,7 +2760,7 @@ dissect_tlv(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tree, i
break;
case TLV_CONFIGURATION_SEQUENCE_NUMBER:
- if( length != 4 ) /*error, need only seq_num(guint32)*/
+ if( length != 4 ) /*error, need only seq_num(uint32_t)*/
proto_tree_add_expert_format(tlv_tree, pinfo, &ei_ldp_tlv_fec_len, tvb, offset + 4, length,
"Error processing Configuration Sequence Number TLV: length is %d, should be 4",
length);
@@ -2951,7 +2951,7 @@ dissect_tlv(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tree, i
int vc_len = length;
offset += 4;
while ( (vc_len > 1) && (rem > 1) ) { /* enough to include id and length */
- int intparam_len = tvb_get_guint8(tvb, offset+1);
+ int intparam_len = tvb_get_uint8(tvb, offset+1);
if (intparam_len < 2){ /* At least Type and Len, protect against len = 0 */
proto_tree_add_expert(tlv_tree, pinfo, &ei_ldp_malformed_interface_parameter, tvb, offset +1, 1);
break;
@@ -3014,10 +3014,10 @@ dissect_tlv(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tree, i
/* Dissect a Message and return the number of bytes consumed ... */
static int
-dissect_msg(tvbuff_t *tvb, guint offset, packet_info *pinfo, proto_tree *tree)
+dissect_msg(tvbuff_t *tvb, unsigned offset, packet_info *pinfo, proto_tree *tree)
{
- guint16 type, typebak;
- guint8 extra=0;
+ uint16_t type, typebak;
+ uint8_t extra=0;
int length, rem, ao=0, co;
proto_tree *msg_tree = NULL;
@@ -3193,7 +3193,7 @@ dissect_ldp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
}
static void
-dissect_tlv_pw_status(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tree, int rem)
+dissect_tlv_pw_status(tvbuff_t *tvb, packet_info *pinfo, unsigned offset, proto_tree *tree, int rem)
{
proto_tree *ti, *val_tree;
@@ -3216,13 +3216,13 @@ dissect_tlv_pw_status(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tre
}
static void
-dissect_tlv_pw_grouping(tvbuff_t *tvb, guint offset, proto_tree *tree, int rem _U_)
+dissect_tlv_pw_grouping(tvbuff_t *tvb, unsigned offset, proto_tree *tree, int rem _U_)
{
proto_tree_add_item(tree,hf_ldp_tlv_pw_grouping_value,tvb,offset,4,ENC_BIG_ENDIAN);
}
static void
-dissect_subtlv_interface_parameters(tvbuff_t *tvb, guint offset, proto_tree *tree, int rem, int *interface_parameters_hf[])
+dissect_subtlv_interface_parameters(tvbuff_t *tvb, unsigned offset, proto_tree *tree, int rem, int *interface_parameters_hf[])
{
#if 0
static int interface_parameters_hf[] = {
@@ -3271,11 +3271,11 @@ dissect_subtlv_interface_parameters(tvbuff_t *tvb, guint offset, proto_tree *tre
proto_tree *cepopt_tree=NULL, *vccvtype_tree=NULL;
proto_tree *vcintparam_tree = proto_tree_add_subtree(tree, tvb, offset, rem, ett_ldp_fec_vc_interfaceparam, &ti, "Interface Parameter");
- guint8 intparam_len = rem;
+ uint8_t intparam_len = rem;
proto_tree_add_item(vcintparam_tree,*interface_parameters_hf[3],tvb,offset,1,ENC_BIG_ENDIAN);
proto_tree_add_item(vcintparam_tree,*interface_parameters_hf[0],tvb, offset+1, 1, ENC_BIG_ENDIAN);
- switch (tvb_get_guint8(tvb, offset)) {
+ switch (tvb_get_uint8(tvb, offset)) {
case FEC_VC_INTERFACEPARAM_MTU:
proto_item_append_text(ti,": MTU %u", tvb_get_ntohs(tvb,offset+2));
proto_tree_add_item(vcintparam_tree,*interface_parameters_hf[1],tvb, offset+2, 2, ENC_BIG_ENDIAN);
@@ -3371,7 +3371,7 @@ dissect_subtlv_interface_parameters(tvbuff_t *tvb, guint offset, proto_tree *tre
}
static void
-dissect_genpwid_fec_aai_type2_parameter(tvbuff_t *tvb, packet_info *pinfo, guint offset, proto_tree *tree, int rem)
+dissect_genpwid_fec_aai_type2_parameter(tvbuff_t *tvb, packet_info *pinfo, unsigned offset, proto_tree *tree, int rem)
{
proto_tree *aai_param_tree = proto_tree_add_subtree(tree, tvb, offset, rem, ett_ldp_gen_aai_type2, NULL, "AAI");
/* check if the remaining length is 12 bytes or not... */
@@ -3392,10 +3392,10 @@ dissect_genpwid_fec_aai_type2_parameter(tvbuff_t *tvb, packet_info *pinfo, guint
static int
dissect_ldp_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
{
- volatile gboolean first = TRUE;
+ volatile bool first = true;
volatile int offset = 0;
int length_remaining;
- guint16 plen;
+ uint16_t plen;
int length;
tvbuff_t *volatile next_tvb;
while (tvb_reported_length_remaining(tvb, offset) != 0) {
@@ -3426,7 +3426,7 @@ dissect_ldp_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
*/
return 0;
}
- first = FALSE;
+ first = false;
}
/*
@@ -3447,7 +3447,7 @@ dissect_ldp_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
*/
pinfo->desegment_offset = offset;
pinfo->desegment_len = DESEGMENT_ONE_MORE_SEGMENT;
- return -((gint32) pinfo->desegment_len);
+ return -((int32_t) pinfo->desegment_len);
}
}
@@ -3474,7 +3474,7 @@ dissect_ldp_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
*/
pinfo->desegment_offset = offset;
pinfo->desegment_len = (plen + 4) - length_remaining;
- return -((gint32) pinfo->desegment_len);
+ return -((int32_t) pinfo->desegment_len);
}
}
@@ -3665,7 +3665,7 @@ proto_register_ldp(void)
{ &hf_ldp_tlv_hc_value,
{ "Hop Count Value", "ldp.msg.tlv.hc.value", FT_UINT8, BASE_DEC,
- NULL, 0x0, "Hop Count", HFILL }},
+ NULL, 0x0, NULL, HFILL }},
{ &hf_ldp_tlv_pv_lsrid,
{ "LSR Id", "ldp.msg.tlv.pv.lsrid", FT_IPv4, BASE_NONE,
@@ -3709,7 +3709,7 @@ proto_register_ldp(void)
{ &hf_ldp_tlv_sess_atm_lr,
{ "Number of ATM Label Ranges", "ldp.msg.tlv.sess.atm.lr", FT_UINT8, BASE_DEC,
- NULL, 0x3C, "Number of Label Ranges", HFILL }},
+ NULL, 0x3C, NULL, HFILL }},
{ &hf_ldp_tlv_sess_atm_dir,
{ "Directionality", "ldp.msg.tlv.sess.atm.dir", FT_BOOLEAN, 8,
@@ -3737,7 +3737,7 @@ proto_register_ldp(void)
{ &hf_ldp_tlv_sess_fr_lr,
{ "Number of Frame Relay Label Ranges", "ldp.msg.tlv.sess.fr.lr", FT_UINT8, BASE_DEC,
- NULL, 0x3C, "Number of Label Ranges", HFILL }},
+ NULL, 0x3C, NULL, HFILL }},
{ &hf_ldp_tlv_sess_fr_dir,
{ "Directionality", "ldp.msg.tlv.sess.fr.dir", FT_BOOLEAN, 8,
@@ -3745,7 +3745,7 @@ proto_register_ldp(void)
{ &hf_ldp_tlv_sess_fr_len,
{ "Number of DLCI bits", "ldp.msg.tlv.sess.fr.len", FT_UINT16, BASE_DEC,
- VALS(tlv_fr_len_vals), 0x0180, "DLCI Number of bits", HFILL }},
+ VALS(tlv_fr_len_vals), 0x0180, NULL, HFILL }},
{ &hf_ldp_tlv_sess_fr_mindlci,
{ "Minimum DLCI", "ldp.msg.tlv.sess.fr.mindlci", FT_UINT24, BASE_DEC,
@@ -3777,7 +3777,7 @@ proto_register_ldp(void)
{ &hf_ldp_tlv_ft_sess_flag_c,
{ "C bit", "ldp.msg.tlv.ft_sess.flag_c", FT_BOOLEAN, 16,
- TFS(&tlv_ft_c), 0x2, "Check-Pointint Flag", HFILL }},
+ TFS(&tlv_ft_c), 0x2, "Check-Pointing Flag", HFILL }},
{ &hf_ldp_tlv_ft_sess_flag_l,
{ "L bit", "ldp.msg.tlv.ft_sess.flag_l", FT_BOOLEAN, 16,
@@ -3829,7 +3829,7 @@ proto_register_ldp(void)
{ &hf_ldp_tlv_fr_label_len,
{ "Number of DLCI bits", "ldp.msg.tlv.fr.label.len", FT_UINT16, BASE_DEC,
- VALS(tlv_fr_len_vals), 0x0180, "DLCI Number of bits", HFILL }},
+ VALS(tlv_fr_len_vals), 0x0180, NULL, HFILL }},
{ &hf_ldp_tlv_fr_label_dlci,
{ "DLCI", "ldp.msg.tlv.fr.label.dlci", FT_UINT24, BASE_DEC,
@@ -3881,7 +3881,7 @@ proto_register_ldp(void)
{ &hf_ldp_tlv_returned_msg_ubit,
{ "Returned Message Unknown bit", "ldp.msg.tlv.returned.msg.ubit", FT_BOOLEAN, 8,
- TFS(&ldp_message_ubit), 0x80, "Message Unknown bit", HFILL }},
+ TFS(&ldp_message_ubit), 0x80, NULL, HFILL }},
{ &hf_ldp_tlv_returned_msg_type,
{ "Returned Message Type", "ldp.msg.tlv.returned.msg.type", FT_UINT16, BASE_HEX,
@@ -4552,7 +4552,7 @@ proto_register_ldp(void)
NULL, 0x0, NULL, HFILL }},
};
- static gint *ett[] = {
+ static int *ett[] = {
&ett_ldp,
&ett_ldp_header,
&ett_ldp_ldpid,