summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-mip6.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-mip6.c')
-rw-r--r--epan/dissectors/packet-mip6.c889
1 files changed, 445 insertions, 444 deletions
diff --git a/epan/dissectors/packet-mip6.c b/epan/dissectors/packet-mip6.c
index 9b572207..76767828 100644
--- a/epan/dissectors/packet-mip6.c
+++ b/epan/dissectors/packet-mip6.c
@@ -43,13 +43,14 @@
#include <epan/ipproto.h>
#include <epan/expert.h>
-#include <epan/ip_opts.h>
#include <epan/sminmpec.h>
#include <epan/addr_resolv.h>
+#include <epan/tfs.h>
+#include <epan/unit_strings.h>
+#include <wsutil/array.h>
#include <wsutil/str_util.h>
-#include "packet-ntp.h"
#include "packet-gtpv2.h"
#include "packet-e164.h"
#include "packet-e212.h"
@@ -918,377 +919,377 @@ static const true_false_string mip6_dmnp_v_flag_value = {
static dissector_table_t ip_dissector_table;
/* Initialize the protocol and registered header fields */
-static int proto_mip6 = -1;
-static int proto_nemo = -1;
-static int proto_mip6_option_pad1 = -1;
-static int proto_mip6_option_padn = -1;
-static int proto_mip6_option_bra = -1;
-static int proto_mip6_option_acoa = -1;
-static int proto_mip6_option_ni = -1;
-static int proto_mip6_option_bad_auth = -1;
-static int proto_mip6_option_mnp = -1;
-static int proto_mip6_option_mhlla = -1;
-static int proto_mip6_option_mnid = -1;
-static int proto_mip6_option_auth = -1;
-static int proto_mip6_option_mseg_id = -1;
-static int proto_mip6_option_cgapr = -1;
-static int proto_mip6_option_cgar = -1;
-static int proto_mip6_option_sign = -1;
-static int proto_mip6_option_phkt = -1;
-static int proto_mip6_option_coti = -1;
-static int proto_mip6_option_cot = -1;
-static int proto_mip6_option_dnsu = -1;
-static int proto_mip6_option_em = -1;
-static int proto_mip6_option_vsm = -1;
-static int proto_mip6_option_ssm = -1;
-static int proto_mip6_option_badff = -1;
-static int proto_mip6_option_hnp = -1;
-static int proto_mip6_option_hi = -1;
-static int proto_mip6_option_att = -1;
-static int proto_mip6_option_mnlli = -1;
-static int proto_mip6_option_lla = -1;
-static int proto_mip6_option_ts = -1;
-static int proto_mip6_option_rc = -1;
-static int proto_mip6_option_ipv4ha = -1;
-static int proto_mip6_option_ipv4aa = -1;
-static int proto_mip6_option_natd = -1;
-static int proto_mip6_option_ipv4coa = -1;
-static int proto_mip6_option_grek = -1;
-static int proto_mip6_option_mhipv6ap = -1;
-static int proto_mip6_option_bi = -1;
-static int proto_mip6_option_ipv4hareq = -1;
-static int proto_mip6_option_ipv4harep = -1;
-static int proto_mip6_option_ipv4dra = -1;
-static int proto_mip6_option_ipv4dsm = -1;
-static int proto_mip6_option_cr = -1;
-static int proto_mip6_option_lmaa = -1;
-static int proto_mip6_option_recap = -1;
-static int proto_mip6_option_redir = -1;
-static int proto_mip6_option_load_inf = -1;
-static int proto_mip6_option_alt_ip4 = -1;
-static int proto_mip6_option_mng = -1;
-static int proto_mip6_option_mag_ipv6 = -1;
-static int proto_mip6_option_acc_net_id = -1;
-static int proto_mip6_option_dmnp = -1;
-
-static int hf_mip6_proto = -1;
-static int hf_mip6_hlen = -1;
-static int hf_mip6_mhtype = -1;
-static int hf_mip6_reserved = -1;
-static int hf_mip6_csum = -1;
-
-static int hf_mip6_hoti_cookie = -1;
-
-static int hf_mip6_coti_cookie = -1;
-
-static int hf_mip6_hot_nindex = -1;
-static int hf_mip6_hot_cookie = -1;
-static int hf_mip6_hot_token = -1;
-
-static int hf_mip6_cot_nindex = -1;
-static int hf_mip6_cot_cookie = -1;
-/* static int hf_mip6_cot_token = -1; */
-
-static int hf_mip6_bu_seqnr = -1;
-static int hf_mip6_bu_a_flag = -1;
-static int hf_mip6_bu_h_flag = -1;
-static int hf_mip6_bu_l_flag = -1;
-static int hf_mip6_bu_k_flag = -1;
-static int hf_mip6_bu_m_flag = -1;
-static int hf_mip6_nemo_bu_r_flag = -1;
-static int hf_pmip6_bu_p_flag = -1;
-static int hf_mip6_bu_f_flag = -1;
-static int hf_pmip6_bu_t_flag = -1;
-static int hf_pmip6_bu_b_flag = -1;
-static int hf_mip6_bu_lifetime = -1;
-
-static int hf_mip6_ba_status = -1;
-static int hf_mip6_ba_k_flag = -1;
-static int hf_mip6_nemo_ba_r_flag = -1;
-static int hf_pmip6_ba_p_flag = -1;
-static int hf_pmip6_ba_t_flag = -1;
-static int hf_pmip6_ba_b_flag = -1;
-static int hf_mip6_ba_seqnr = -1;
-static int hf_mip6_ba_lifetime = -1;
-
-static int hf_mip6_be_status = -1;
-static int hf_mip6_be_haddr = -1;
-
-static int hf_fmip6_fbu_seqnr = -1;
-static int hf_fmip6_fbu_a_flag = -1;
-static int hf_fmip6_fbu_h_flag = -1;
-static int hf_fmip6_fbu_l_flag = -1;
-static int hf_fmip6_fbu_k_flag = -1;
-static int hf_fmip6_fbu_lifetime = -1;
-
-static int hf_fmip6_fback_status = -1;
-static int hf_fmip6_fback_k_flag = -1;
-static int hf_fmip6_fback_seqnr = -1;
-static int hf_fmip6_fback_lifetime = -1;
-
-static int hf_mip6_has_num_addrs = -1;
-static int hf_mip6_has_reserved = -1;
-static int hf_mip6_has_address = -1;
-
-static int hf_mip6_hb_u_flag = -1;
-static int hf_mip6_hb_r_flag = -1;
-static int hf_mip6_hb_seqnr = -1;
-
-static int hf_mip6_hi_seqnr = -1;
-static int hf_mip6_hi_s_flag = -1;
-static int hf_mip6_hi_u_flag = -1;
-static int hf_mip6_hi_code = -1;
-
-static int hf_mip6_hack_seqnr = -1;
-static int hf_mip6_hack_code = -1;
-
-static int hf_mip6_opt_3gpp_reserved = -1;
-static int hf_mip6_opt_3gpp_flag_m = -1;
-static int hf_mip6_opt_3gpp_spec_pmipv6_err_code = -1;
-static int hf_mip6_opt_3gpp_pdn_gw_ipv4_addr = -1;
-static int hf_mip6_opt_3gpp_pdn_gw_ipv6_addr = -1;
-static int hf_mip6_opt_3gpp_dhcpv4_addr_all_proc_ind = -1;
-static int hf_mip6_opt_3gpp_pdn_type = -1;
-static int hf_mip6_opt_3gpp_pdn_ind_cause = -1;
-static int hf_mip6_opt_3gpp_chg_id = -1;
-static int hf_mip6_opt_3gpp_charging_characteristic = -1;
-static int hf_mip6_opt_3gpp_mei = -1;
-static int hf_mip6_opt_3gpp_msisdn = -1;
-static int hf_mip6_opt_3gpp_apn_rest = -1;
-static int hf_mip6_opt_3gpp_max_apn_rest = -1;
-static int hf_mip6_opt_3gpp_imsi = -1;
-static int hf_mip6_opt_3gpp_pdn_conn_id = -1;
-static int hf_hf_mip6_opt_3gpp_lapi = -1;
-
-static int hf_mip6_bra_interval = -1;
-
-static int hf_mip6_acoa_acoa = -1;
-static int hf_mip6_nemo_mnp_mnp = -1;
-static int hf_mip6_nemo_mnp_pfl = -1;
-
-static int hf_mip6_ni_hni = -1;
-static int hf_mip6_ni_cni = -1;
-
-static int hf_mip6_bad_auth = -1;
-
-static int hf_fmip6_lla = -1;
-static int hf_fmip6_lla_optcode = -1;
-
-static int hf_mip6_mnid_subtype = -1;
-static int hf_mip6_mnid_identifier = -1;
-static int hf_mip6_vsm_vid = -1;
-static int hf_mip6_vsm_subtype = -1;
-static int hf_mip6_vsm_subtype_3gpp = -1;
-
-static int hf_mip6_opt_ss_identifier = -1;
-
-static int hf_mip6_opt_badff_spi = -1;
-static int hf_mip6_opt_badff_auth = -1;
-
-static int hf_mip6_opt_auth_sub_type = -1;
-static int hf_mip6_opt_auth_mobility_spi = -1;
-static int hf_mip6_opt_auth_auth_data = -1;
-static int hf_mip6_opt_mseg_id_timestamp = -1;
-
-static int hf_mip6_opt_cgar_cga_par = -1;
-static int hf_mip6_opt_sign_sign = -1;
-static int hf_mip6_opt_phkt_phkt = -1;
-static int hf_mip6_opt_mocot_co_keygen_tok = -1;
-
-static int hf_mip6_opt_dnsu_status = -1;
-static int hf_mip6_opt_dnsu_flag_r = -1;
-static int hf_mip6_opt_dnsu_mn_id = -1;
-
-static int hf_mip6_opt_em_data = -1;
-
-static int hf_pmip6_hi_hi = -1;
-static int hf_pmip6_hi_reserved = -1;
-
-static int hf_pmip6_att_reserved = -1;
-static int hf_pmip6_att_att = -1;
-
-static int hf_mip6_opt_mnlli_reserved = -1;
-static int hf_mip6_opt_mnlli_lli = -1;
-
-static int hf_pmip6_timestamp = -1;
-static int hf_pmip6_rc = -1;
-static int hf_mip6_ipv4ha_preflen = -1;
-static int hf_mip6_ipv4ha_p_flag = -1;
-static int hf_mip6_ipv4ha_ha = -1;
-static int hf_mip6_ipv4ha_reserved = -1;
-static int hf_mip6_ipv4aa_status = -1;
-
-static int hf_mip6_opt_natd_f_flag = -1;
-static int hf_mip6_opt_natd_reserved = -1;
-static int hf_mip6_opt_natd_refresh_t = -1;
-
-static int hf_mip6_opt_ipv4coa_reserved = -1;
-static int hf_mip6_opt_ipv4coa_addr = -1;
-
-static int hf_pmip6_gre_key = -1;
-static int hf_mip6_opt_mhipv6ap_opt_code = -1;
-static int hf_mip6_opt_mhipv6ap_prefix_l = -1;
-static int hf_mip6_opt_mhipv6ap_ipv6_address = -1;
-static int hf_mip6_opt_mhipv6ap_ipv6_address_prefix = -1;
-static int hf_mip6_ipv4dra_reserved = -1;
-static int hf_mip6_ipv4dra_dra = -1;
-
-static int hf_mip6_ipv4dsm_reserved = -1;
-static int hf_mip6_ipv4dsm_s_flag = -1;
-static int hf_mip6_cr_reserved = -1;
-static int hf_mip6_cr_req_type = -1;
-static int hf_mip6_cr_req_length = -1;
-
-static int hf_mip6_lmaa_opt_code = -1;
-static int hf_mip6_lmaa_reserved = -1;
-static int hf_mip6_lmaa_ipv4 = -1;
-static int hf_mip6_lmaa_ipv6 = -1;
-
-static int hf_mip6_mobility_opt = -1;
-static int hf_mip6_opt_len = -1;
-
-static int hf_mip6_opt_bi_bid = -1;
-static int hf_mip6_opt_bi_status = -1;
-static int hf_mip6_bi_h_flag = -1;
-static int hf_mip6_bi_coa_ipv4 = -1;
-static int hf_mip6_bi_coa_ipv6 = -1;
-
-static int hf_mip6_binding_refresh_request = -1;
-static int hf_mip6_unknown_type_data = -1;
-static int hf_mip6_fast_neighbor_advertisement = -1;
-static int hf_mip6_vsm_data = -1;
-static int hf_mip6_vsm_req_data = -1;
-static int hf_mip6_opt_padn = -1;
+static int proto_mip6;
+static int proto_nemo;
+static int proto_mip6_option_pad1;
+static int proto_mip6_option_padn;
+static int proto_mip6_option_bra;
+static int proto_mip6_option_acoa;
+static int proto_mip6_option_ni;
+static int proto_mip6_option_bad_auth;
+static int proto_mip6_option_mnp;
+static int proto_mip6_option_mhlla;
+static int proto_mip6_option_mnid;
+static int proto_mip6_option_auth;
+static int proto_mip6_option_mseg_id;
+static int proto_mip6_option_cgapr;
+static int proto_mip6_option_cgar;
+static int proto_mip6_option_sign;
+static int proto_mip6_option_phkt;
+static int proto_mip6_option_coti;
+static int proto_mip6_option_cot;
+static int proto_mip6_option_dnsu;
+static int proto_mip6_option_em;
+static int proto_mip6_option_vsm;
+static int proto_mip6_option_ssm;
+static int proto_mip6_option_badff;
+static int proto_mip6_option_hnp;
+static int proto_mip6_option_hi;
+static int proto_mip6_option_att;
+static int proto_mip6_option_mnlli;
+static int proto_mip6_option_lla;
+static int proto_mip6_option_ts;
+static int proto_mip6_option_rc;
+static int proto_mip6_option_ipv4ha;
+static int proto_mip6_option_ipv4aa;
+static int proto_mip6_option_natd;
+static int proto_mip6_option_ipv4coa;
+static int proto_mip6_option_grek;
+static int proto_mip6_option_mhipv6ap;
+static int proto_mip6_option_bi;
+static int proto_mip6_option_ipv4hareq;
+static int proto_mip6_option_ipv4harep;
+static int proto_mip6_option_ipv4dra;
+static int proto_mip6_option_ipv4dsm;
+static int proto_mip6_option_cr;
+static int proto_mip6_option_lmaa;
+static int proto_mip6_option_recap;
+static int proto_mip6_option_redir;
+static int proto_mip6_option_load_inf;
+static int proto_mip6_option_alt_ip4;
+static int proto_mip6_option_mng;
+static int proto_mip6_option_mag_ipv6;
+static int proto_mip6_option_acc_net_id;
+static int proto_mip6_option_dmnp;
+
+static int hf_mip6_proto;
+static int hf_mip6_hlen;
+static int hf_mip6_mhtype;
+static int hf_mip6_reserved;
+static int hf_mip6_csum;
+
+static int hf_mip6_hoti_cookie;
+
+static int hf_mip6_coti_cookie;
+
+static int hf_mip6_hot_nindex;
+static int hf_mip6_hot_cookie;
+static int hf_mip6_hot_token;
+
+static int hf_mip6_cot_nindex;
+static int hf_mip6_cot_cookie;
+/* static int hf_mip6_cot_token; */
+
+static int hf_mip6_bu_seqnr;
+static int hf_mip6_bu_a_flag;
+static int hf_mip6_bu_h_flag;
+static int hf_mip6_bu_l_flag;
+static int hf_mip6_bu_k_flag;
+static int hf_mip6_bu_m_flag;
+static int hf_mip6_nemo_bu_r_flag;
+static int hf_pmip6_bu_p_flag;
+static int hf_mip6_bu_f_flag;
+static int hf_pmip6_bu_t_flag;
+static int hf_pmip6_bu_b_flag;
+static int hf_mip6_bu_lifetime;
+
+static int hf_mip6_ba_status;
+static int hf_mip6_ba_k_flag;
+static int hf_mip6_nemo_ba_r_flag;
+static int hf_pmip6_ba_p_flag;
+static int hf_pmip6_ba_t_flag;
+static int hf_pmip6_ba_b_flag;
+static int hf_mip6_ba_seqnr;
+static int hf_mip6_ba_lifetime;
+
+static int hf_mip6_be_status;
+static int hf_mip6_be_haddr;
+
+static int hf_fmip6_fbu_seqnr;
+static int hf_fmip6_fbu_a_flag;
+static int hf_fmip6_fbu_h_flag;
+static int hf_fmip6_fbu_l_flag;
+static int hf_fmip6_fbu_k_flag;
+static int hf_fmip6_fbu_lifetime;
+
+static int hf_fmip6_fback_status;
+static int hf_fmip6_fback_k_flag;
+static int hf_fmip6_fback_seqnr;
+static int hf_fmip6_fback_lifetime;
+
+static int hf_mip6_has_num_addrs;
+static int hf_mip6_has_reserved;
+static int hf_mip6_has_address;
+
+static int hf_mip6_hb_u_flag;
+static int hf_mip6_hb_r_flag;
+static int hf_mip6_hb_seqnr;
+
+static int hf_mip6_hi_seqnr;
+static int hf_mip6_hi_s_flag;
+static int hf_mip6_hi_u_flag;
+static int hf_mip6_hi_code;
+
+static int hf_mip6_hack_seqnr;
+static int hf_mip6_hack_code;
+
+static int hf_mip6_opt_3gpp_reserved;
+static int hf_mip6_opt_3gpp_flag_m;
+static int hf_mip6_opt_3gpp_spec_pmipv6_err_code;
+static int hf_mip6_opt_3gpp_pdn_gw_ipv4_addr;
+static int hf_mip6_opt_3gpp_pdn_gw_ipv6_addr;
+static int hf_mip6_opt_3gpp_dhcpv4_addr_all_proc_ind;
+static int hf_mip6_opt_3gpp_pdn_type;
+static int hf_mip6_opt_3gpp_pdn_ind_cause;
+static int hf_mip6_opt_3gpp_chg_id;
+static int hf_mip6_opt_3gpp_charging_characteristic;
+static int hf_mip6_opt_3gpp_mei;
+static int hf_mip6_opt_3gpp_msisdn;
+static int hf_mip6_opt_3gpp_apn_rest;
+static int hf_mip6_opt_3gpp_max_apn_rest;
+static int hf_mip6_opt_3gpp_imsi;
+static int hf_mip6_opt_3gpp_pdn_conn_id;
+static int hf_mip6_opt_3gpp_lapi;
+
+static int hf_mip6_bra_interval;
+
+static int hf_mip6_acoa_acoa;
+static int hf_mip6_nemo_mnp_mnp;
+static int hf_mip6_nemo_mnp_pfl;
+
+static int hf_mip6_ni_hni;
+static int hf_mip6_ni_cni;
+
+static int hf_mip6_bad_auth;
+
+static int hf_fmip6_lla;
+static int hf_fmip6_lla_optcode;
+
+static int hf_mip6_mnid_subtype;
+static int hf_mip6_mnid_identifier;
+static int hf_mip6_vsm_vid;
+static int hf_mip6_vsm_subtype;
+static int hf_mip6_vsm_subtype_3gpp;
+
+static int hf_mip6_opt_ss_identifier;
+
+static int hf_mip6_opt_badff_spi;
+static int hf_mip6_opt_badff_auth;
+
+static int hf_mip6_opt_auth_sub_type;
+static int hf_mip6_opt_auth_mobility_spi;
+static int hf_mip6_opt_auth_auth_data;
+static int hf_mip6_opt_mseg_id_timestamp;
+
+static int hf_mip6_opt_cgar_cga_par;
+static int hf_mip6_opt_sign_sign;
+static int hf_mip6_opt_phkt_phkt;
+static int hf_mip6_opt_mocot_co_keygen_tok;
+
+static int hf_mip6_opt_dnsu_status;
+static int hf_mip6_opt_dnsu_flag_r;
+static int hf_mip6_opt_dnsu_mn_id;
+
+static int hf_mip6_opt_em_data;
+
+static int hf_pmip6_hi_hi;
+static int hf_pmip6_hi_reserved;
+
+static int hf_pmip6_att_reserved;
+static int hf_pmip6_att_att;
+
+static int hf_mip6_opt_mnlli_reserved;
+static int hf_mip6_opt_mnlli_lli;
+
+static int hf_pmip6_timestamp;
+static int hf_pmip6_rc;
+static int hf_mip6_ipv4ha_preflen;
+static int hf_mip6_ipv4ha_p_flag;
+static int hf_mip6_ipv4ha_ha;
+static int hf_mip6_ipv4ha_reserved;
+static int hf_mip6_ipv4aa_status;
+
+static int hf_mip6_opt_natd_f_flag;
+static int hf_mip6_opt_natd_reserved;
+static int hf_mip6_opt_natd_refresh_t;
+
+static int hf_mip6_opt_ipv4coa_reserved;
+static int hf_mip6_opt_ipv4coa_addr;
+
+static int hf_pmip6_gre_key;
+static int hf_mip6_opt_mhipv6ap_opt_code;
+static int hf_mip6_opt_mhipv6ap_prefix_l;
+static int hf_mip6_opt_mhipv6ap_ipv6_address;
+static int hf_mip6_opt_mhipv6ap_ipv6_address_prefix;
+static int hf_mip6_ipv4dra_reserved;
+static int hf_mip6_ipv4dra_dra;
+
+static int hf_mip6_ipv4dsm_reserved;
+static int hf_mip6_ipv4dsm_s_flag;
+static int hf_mip6_cr_reserved;
+static int hf_mip6_cr_req_type;
+static int hf_mip6_cr_req_length;
+
+static int hf_mip6_lmaa_opt_code;
+static int hf_mip6_lmaa_reserved;
+static int hf_mip6_lmaa_ipv4;
+static int hf_mip6_lmaa_ipv6;
+
+static int hf_mip6_mobility_opt;
+static int hf_mip6_opt_len;
+
+static int hf_mip6_opt_bi_bid;
+static int hf_mip6_opt_bi_status;
+static int hf_mip6_bi_h_flag;
+static int hf_mip6_bi_coa_ipv4;
+static int hf_mip6_bi_coa_ipv6;
+
+static int hf_mip6_binding_refresh_request;
+static int hf_mip6_unknown_type_data;
+static int hf_mip6_fast_neighbor_advertisement;
+static int hf_mip6_vsm_data;
+static int hf_mip6_vsm_req_data;
+static int hf_mip6_opt_padn;
/* PMIP BRI */
-static int hf_pmip6_bri_brtype = -1;
-static int hf_pmip6_bri_rtrigger = -1;
-static int hf_pmip6_bri_status = -1;
-static int hf_pmip6_bri_seqnr = -1;
-static int hf_pmip6_bri_ip_flag = -1;
-static int hf_pmip6_bri_ap_flag = -1;
-static int hf_pmip6_bri_iv_flag = -1;
-static int hf_pmip6_bri_av_flag = -1;
-static int hf_pmip6_bri_ig_flag = -1;
-static int hf_pmip6_bri_ag_flag = -1;
-static int hf_pmip6_bri_res = -1;
-
-static int hf_pmip6_lri_sequence = -1;
-static int hf_pmip6_lri_reserved = -1;
-static int hf_pmip6_lri_lifetime = -1;
-
-static int hf_pmip6_lra_sequence = -1;
-static int hf_pmip6_lra_u = -1;
-static int hf_pmip6_lra_reserved = -1;
-static int hf_pmip6_lra_status = -1;
-static int hf_pmip6_lra_lifetime = -1;
-
-static int hf_mip6_opt_recap_reserved = -1;
-static int hf_mip6_opt_redir_k = -1;
-static int hf_mip6_opt_redir_n = -1;
-static int hf_mip6_opt_redir_reserved = -1;
-static int hf_mip6_opt_redir_addr_r2LMA_ipv6 = -1;
-static int hf_mip6_opt_redir_addr_r2LMA_ipv4 = -1;
-static int hf_mip6_opt_load_inf_priority = -1;
-static int hf_mip6_opt_load_inf_sessions_in_use = -1;
-static int hf_mip6_opt_load_inf_maximum_sessions = -1;
-static int hf_mip6_opt_load_inf_used_capacity = -1;
-static int hf_mip6_opt_load_inf_maximum_capacity = -1;
-static int hf_mip6_opt_alt_ip4 = -1;
+static int hf_pmip6_bri_brtype;
+static int hf_pmip6_bri_rtrigger;
+static int hf_pmip6_bri_status;
+static int hf_pmip6_bri_seqnr;
+static int hf_pmip6_bri_ip_flag;
+static int hf_pmip6_bri_ap_flag;
+static int hf_pmip6_bri_iv_flag;
+static int hf_pmip6_bri_av_flag;
+static int hf_pmip6_bri_ig_flag;
+static int hf_pmip6_bri_ag_flag;
+static int hf_pmip6_bri_res;
+
+static int hf_pmip6_lri_sequence;
+static int hf_pmip6_lri_reserved;
+static int hf_pmip6_lri_lifetime;
+
+static int hf_pmip6_lra_sequence;
+static int hf_pmip6_lra_u;
+static int hf_pmip6_lra_reserved;
+static int hf_pmip6_lra_status;
+static int hf_pmip6_lra_lifetime;
+
+static int hf_mip6_opt_recap_reserved;
+static int hf_mip6_opt_redir_k;
+static int hf_mip6_opt_redir_n;
+static int hf_mip6_opt_redir_reserved;
+static int hf_mip6_opt_redir_addr_r2LMA_ipv6;
+static int hf_mip6_opt_redir_addr_r2LMA_ipv4;
+static int hf_mip6_opt_load_inf_priority;
+static int hf_mip6_opt_load_inf_sessions_in_use;
+static int hf_mip6_opt_load_inf_maximum_sessions;
+static int hf_mip6_opt_load_inf_used_capacity;
+static int hf_mip6_opt_load_inf_maximum_capacity;
+static int hf_mip6_opt_alt_ip4;
/* Mobile Node Group Identifier Optionm */
-static int hf_mip6_opt_mng_sub_type = -1;
-static int hf_mip6_opt_mng_reserved = -1;
-static int hf_mip6_opt_mng_mng_id = -1;
-
-static int hf_mip6_opt_mag_ipv6_reserved = -1;
-static int hf_mip6_opt_mag_ipv6_address_length = -1;
-static int hf_mip6_opt_mag_ipv6_address = -1;
-
-static int hf_mip6_opt_acc_net_id_sub = -1;
-static int hf_mip6_opt_acc_net_id_sub_opt = -1;
-static int hf_mip6_opt_acc_net_id_sub_opt_len = -1;
-static int hf_mip6_opt_acc_net_id_sub_opt_e_bit = -1;
-static int hf_mip6_opt_acc_net_id_sub_opt_net_name_len = -1;
-static int hf_mip6_opt_acc_net_id_sub_opt_net_name = -1;
-static int hf_mip6_opt_acc_net_id_sub_opt_net_name_data = -1;
-static int hf_mip6_opt_acc_net_id_sub_opt_ap_name_len = -1;
-static int hf_mip6_opt_acc_net_id_sub_opt_ap_name = -1;
-static int hf_mip6_opt_acc_net_id_sub_opt_geo_latitude_degrees = -1;
-static int hf_mip6_opt_acc_net_id_sub_opt_geo_longitude_degrees = -1;
-static int hf_mip6_opt_acc_net_id_sub_opt_op_id_type = -1;
-static int hf_mip6_opt_acc_net_id_sub_opt_op_id = -1;
-
-static int hf_pmip6_opt_lila_lla = -1;
+static int hf_mip6_opt_mng_sub_type;
+static int hf_mip6_opt_mng_reserved;
+static int hf_mip6_opt_mng_mng_id;
+
+static int hf_mip6_opt_mag_ipv6_reserved;
+static int hf_mip6_opt_mag_ipv6_address_length;
+static int hf_mip6_opt_mag_ipv6_address;
+
+static int hf_mip6_opt_acc_net_id_sub;
+static int hf_mip6_opt_acc_net_id_sub_opt;
+static int hf_mip6_opt_acc_net_id_sub_opt_len;
+static int hf_mip6_opt_acc_net_id_sub_opt_e_bit;
+static int hf_mip6_opt_acc_net_id_sub_opt_net_name_len;
+static int hf_mip6_opt_acc_net_id_sub_opt_net_name;
+static int hf_mip6_opt_acc_net_id_sub_opt_net_name_data;
+static int hf_mip6_opt_acc_net_id_sub_opt_ap_name_len;
+static int hf_mip6_opt_acc_net_id_sub_opt_ap_name;
+static int hf_mip6_opt_acc_net_id_sub_opt_geo_latitude_degrees;
+static int hf_mip6_opt_acc_net_id_sub_opt_geo_longitude_degrees;
+static int hf_mip6_opt_acc_net_id_sub_opt_op_id_type;
+static int hf_mip6_opt_acc_net_id_sub_opt_op_id;
+
+static int hf_pmip6_opt_lila_lla;
/* Delegated Mobile Network Prefix Option */
-static int hf_mip6_opt_dmnp_v_flag = -1;
-static int hf_mip6_opt_dmnp_reserved = -1;
-static int hf_mip6_opt_dmnp_prefix_len = -1;
-static int hf_mip6_opt_dmnp_dmnp_ipv4 = -1;
-static int hf_mip6_opt_dmnp_dmnp_ipv6 = -1;
+static int hf_mip6_opt_dmnp_v_flag;
+static int hf_mip6_opt_dmnp_reserved;
+static int hf_mip6_opt_dmnp_prefix_len;
+static int hf_mip6_opt_dmnp_dmnp_ipv4;
+static int hf_mip6_opt_dmnp_dmnp_ipv6;
/* Initialize the subtree pointers */
-static gint ett_mip6 = -1;
-static gint ett_mip6_opt_pad1 = -1;
-static gint ett_mip6_opt_padn = -1;
-static gint ett_mip6_opts = -1;
-static gint ett_mip6_opt_bra = -1;
-static gint ett_mip6_opt_acoa = -1;
-static gint ett_mip6_opt_ni = -1;
-static gint ett_mip6_opt_bad = -1;
-static gint ett_mip6_nemo_opt_mnp = -1;
-static gint ett_fmip6_opt_lla = -1;
-static gint ett_mip6_opt_mnid = -1;
-static gint ett_mip6_opt_auth = -1;
-static gint ett_mip6_opt_mesgid = -1;
-static gint ett_mip6_opt_cgapr = -1;
-static gint ett_mip6_opt_cgar = -1;
-static gint ett_mip6_opt_sign = -1;
-static gint ett_mip6_opt_phkt = -1;
-static gint ett_mip6_opt_mocoti = -1;
-static gint ett_mip6_opt_mocot = -1;
-static gint ett_mip6_opt_dnsu = -1;
-static gint ett_mip6_opt_em = -1;
-static gint ett_mip6_opt_vsm = -1;
-static gint ett_mip6_opt_ssm = -1;
-static gint ett_mip6_opt_badff = -1;
-static gint ett_mip6_opt_unknown = -1;
-static gint ett_pmip6_opt_hnp = -1;
-static gint ett_pmip6_opt_hi = -1;
-static gint ett_pmip6_opt_att = -1;
-static gint ett_pmip6_opt_mnlli = -1;
-static gint ett_pmip6_opt_lla = -1;
-static gint ett_pmip6_opt_ts = -1;
-static gint ett_pmip6_opt_rc = -1;
-static gint ett_mip6_opt_ipv4ha = -1;
-static gint ett_mip6_opt_ipv4aa = -1;
-static gint ett_mip6_opt_natd = -1;
-static gint ett_mip6_opt_ipv4coa = -1;
-static gint ett_pmip6_opt_grek = -1;
-static gint ett_pmip6_opt_mhipv6ap = -1;
-static gint ett_pmip6_opt_bi = -1;
-static gint ett_mip6_opt_ipv4hareq = -1;
-static gint ett_mip6_opt_ipv4harep = -1;
-static gint ett_mip6_opt_ipv4dra = -1;
-static gint ett_mip6_opt_ipv4dsm = -1;
-static gint ett_mip6_opt_cr = -1;
-static gint ett_mip6_opt_lmaa = -1;
-static gint ett_mip6_opt_recap = -1;
-static gint ett_mip6_opt_redir = -1;
-static gint ett_mip6_opt_load_inf = -1;
-static gint ett_mip6_opt_alt_ip4 = -1;
-static gint ett_mip6_opt_mng = -1;
-static gint ett_mip6_opt_mag_ipv6 = -1;
-static gint ett_mip6_opt_acc_net_id = -1;
-static gint ett_mip6_sub_opt_acc_net_id = -1;
-static gint ett_mip6_opt_dmnp = -1;
-
-static expert_field ei_mip6_ie_not_dissected = EI_INIT;
-static expert_field ei_mip6_ani_type_not_dissected = EI_INIT;
-static expert_field ei_mip6_opt_len_invalid = EI_INIT;
-static expert_field ei_mip6_vsm_data_not_dissected = EI_INIT;
-static expert_field ei_mip6_bogus_header_length = EI_INIT;
+static int ett_mip6;
+static int ett_mip6_opt_pad1;
+static int ett_mip6_opt_padn;
+static int ett_mip6_opts;
+static int ett_mip6_opt_bra;
+static int ett_mip6_opt_acoa;
+static int ett_mip6_opt_ni;
+static int ett_mip6_opt_bad;
+static int ett_mip6_nemo_opt_mnp;
+static int ett_fmip6_opt_lla;
+static int ett_mip6_opt_mnid;
+static int ett_mip6_opt_auth;
+static int ett_mip6_opt_mesgid;
+static int ett_mip6_opt_cgapr;
+static int ett_mip6_opt_cgar;
+static int ett_mip6_opt_sign;
+static int ett_mip6_opt_phkt;
+static int ett_mip6_opt_mocoti;
+static int ett_mip6_opt_mocot;
+static int ett_mip6_opt_dnsu;
+static int ett_mip6_opt_em;
+static int ett_mip6_opt_vsm;
+static int ett_mip6_opt_ssm;
+static int ett_mip6_opt_badff;
+static int ett_mip6_opt_unknown;
+static int ett_pmip6_opt_hnp;
+static int ett_pmip6_opt_hi;
+static int ett_pmip6_opt_att;
+static int ett_pmip6_opt_mnlli;
+static int ett_pmip6_opt_lla;
+static int ett_pmip6_opt_ts;
+static int ett_pmip6_opt_rc;
+static int ett_mip6_opt_ipv4ha;
+static int ett_mip6_opt_ipv4aa;
+static int ett_mip6_opt_natd;
+static int ett_mip6_opt_ipv4coa;
+static int ett_pmip6_opt_grek;
+static int ett_pmip6_opt_mhipv6ap;
+static int ett_pmip6_opt_bi;
+static int ett_mip6_opt_ipv4hareq;
+static int ett_mip6_opt_ipv4harep;
+static int ett_mip6_opt_ipv4dra;
+static int ett_mip6_opt_ipv4dsm;
+static int ett_mip6_opt_cr;
+static int ett_mip6_opt_lmaa;
+static int ett_mip6_opt_recap;
+static int ett_mip6_opt_redir;
+static int ett_mip6_opt_load_inf;
+static int ett_mip6_opt_alt_ip4;
+static int ett_mip6_opt_mng;
+static int ett_mip6_opt_mag_ipv6;
+static int ett_mip6_opt_acc_net_id;
+static int ett_mip6_sub_opt_acc_net_id;
+static int ett_mip6_opt_dmnp;
+
+static expert_field ei_mip6_ie_not_dissected;
+static expert_field ei_mip6_ani_type_not_dissected;
+static expert_field ei_mip6_opt_len_invalid;
+static expert_field ei_mip6_vsm_data_not_dissected;
+static expert_field ei_mip6_bogus_header_length;
static dissector_table_t mip6_option_table;
@@ -1422,7 +1423,7 @@ dissect_mip6_bu(tvbuff_t *tvb, proto_tree *mip6_tree, packet_info *pinfo _U_)
proto_tree_add_item(data_tree, hf_pmip6_bu_b_flag, tvb,
MIP6_BU_FLAGS_OFF, MIP6_BU_FLAGS_LEN, ENC_BIG_ENDIAN);
- if ((tvb_get_guint8(tvb, MIP6_BU_FLAGS_OFF) & 0x0004 ) == 0x0004)
+ if ((tvb_get_uint8(tvb, MIP6_BU_FLAGS_OFF) & 0x0004 ) == 0x0004)
proto_nemo = 1;
lifetime = tvb_get_ntohs(tvb, MIP6_BU_LIFETIME_OFF);
@@ -1458,7 +1459,7 @@ dissect_mip6_ba(tvbuff_t *tvb, proto_tree *mip6_tree, packet_info *pinfo _U_)
MIP6_BA_FLAGS_OFF, MIP6_BA_FLAGS_LEN, ENC_BIG_ENDIAN);
proto_tree_add_item(data_tree, hf_pmip6_ba_b_flag, tvb,
MIP6_BA_FLAGS_OFF, MIP6_BA_FLAGS_LEN, ENC_BIG_ENDIAN);
- if ((tvb_get_guint8(tvb, MIP6_BA_FLAGS_OFF) & 0x0040 ) == 0x0040)
+ if ((tvb_get_uint8(tvb, MIP6_BA_FLAGS_OFF) & 0x0040 ) == 0x0040)
proto_nemo = 1;
proto_tree_add_item(data_tree, hf_mip6_ba_seqnr, tvb,
@@ -1521,15 +1522,15 @@ dissect_mip6_be(tvbuff_t *tvb, proto_tree *mip6_tree, packet_info *pinfo _U_)
static int
dissect_mip6_has(tvbuff_t *tvb, proto_tree *mip6_tree, packet_info *pinfo _U_)
{
- guint num_addrs, len;
+ unsigned num_addrs, len;
- num_addrs = tvb_get_guint8(tvb, MIP6_DATA_OFF);
+ num_addrs = tvb_get_uint8(tvb, MIP6_DATA_OFF);
len = 2 + num_addrs * 16;
if (mip6_tree) {
proto_tree *data_tree;
- gint off;
- guint i;
+ int off;
+ unsigned i;
data_tree = proto_tree_add_subtree(mip6_tree, tvb, MIP6_DATA_OFF,
len, ett_mip6, NULL, "Home Agent Switch");
@@ -1653,9 +1654,9 @@ dissect_mip6_hack(tvbuff_t *tvb, proto_tree *mip6_tree, packet_info *pinfo _U_)
static int
dissect_mip6_unknown(tvbuff_t *tvb, proto_tree *mip6_tree, packet_info *pinfo _U_)
{
- guint hdr_len, data_len;
+ unsigned hdr_len, data_len;
- hdr_len = (tvb_get_guint8(tvb, MIP6_HLEN_OFF) + 1) * 8;
+ hdr_len = (tvb_get_uint8(tvb, MIP6_HLEN_OFF) + 1) * 8;
data_len = hdr_len - MIP6_DATA_OFF;
proto_tree_add_item(mip6_tree, hf_mip6_unknown_type_data, tvb, MIP6_DATA_OFF, data_len, ENC_NA);
@@ -1739,9 +1740,9 @@ dissect_pmip6_bri(tvbuff_t *tvb, proto_tree *mip6_tree, packet_info *pinfo)
#define ACKNOWLEDGE 2
proto_tree *field_tree;
- guint8 br_type;
+ uint8_t br_type;
- br_type = tvb_get_guint8(tvb, PMIP6_BRI_BRTYPE_OFF);
+ br_type = tvb_get_uint8(tvb, PMIP6_BRI_BRTYPE_OFF);
/* Branch between BR Indication and BR Acknowledge */
if ( br_type == INDICATION )
@@ -1830,7 +1831,7 @@ dissect_pmip6_bri(tvbuff_t *tvb, proto_tree *mip6_tree, packet_info *pinfo)
*/
static int
-dissect_pmip6_lri(tvbuff_t *tvb, proto_tree *mip6_tree, packet_info *pinfo _U_, gint offset)
+dissect_pmip6_lri(tvbuff_t *tvb, proto_tree *mip6_tree, packet_info *pinfo _U_, int offset)
{
proto_tree_add_item(mip6_tree, hf_pmip6_lri_sequence, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
@@ -1865,7 +1866,7 @@ dissect_pmip6_lri(tvbuff_t *tvb, proto_tree *mip6_tree, packet_info *pinfo _U_,
*/
static int
-dissect_pmip6_lra(tvbuff_t *tvb, proto_tree *mip6_tree, packet_info *pinfo _U_, gint offset)
+dissect_pmip6_lra(tvbuff_t *tvb, proto_tree *mip6_tree, packet_info *pinfo _U_, int offset)
{
proto_tree_add_item(mip6_tree, hf_pmip6_lra_sequence, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
@@ -1908,19 +1909,19 @@ dissect_mip6_opt_vsm_3gpp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, v
proto_item *hdr_item = tree;
int len = tvb_reported_length(tvb);
int offset = 0;
- guint8 sub_type, m_flag;
+ uint8_t sub_type, m_flag;
tvbuff_t *next_tvb;
- gchar *mei_str;
+ char *mei_str;
char *digit_str;
- gchar *mcc_mnc_str;
- gchar *imsi_str;
+ char *mcc_mnc_str;
+ char *imsi_str;
/* offset points to the sub type */
- sub_type = tvb_get_guint8(tvb,offset);
+ sub_type = tvb_get_uint8(tvb,offset);
proto_tree_add_item(tree, hf_mip6_vsm_subtype_3gpp, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_item_append_text(hdr_item, " %s", val_to_str_ext_const(sub_type, &mip6_vsm_subtype_3gpp_value_ext, "<unknown>"));
offset++;
- m_flag = tvb_get_guint8(tvb,offset) & 0x01;
+ m_flag = tvb_get_uint8(tvb,offset) & 0x01;
proto_tree_add_item(tree, hf_mip6_opt_3gpp_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_mip6_opt_3gpp_flag_m, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
@@ -1998,18 +1999,18 @@ dissect_mip6_opt_vsm_3gpp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, v
break;
/* 11, Mobile Equipment Identity (MEI) */
case 11:
- proto_tree_add_item_ret_display_string(tree, hf_mip6_opt_3gpp_mei, tvb, offset, len, ENC_BCD_DIGITS_0_9, pinfo->pool, &mei_str);
+ proto_tree_add_item_ret_display_string(tree, hf_mip6_opt_3gpp_mei, tvb, offset, len, ENC_BCD_DIGITS_0_9|ENC_LITTLE_ENDIAN, pinfo->pool, &mei_str);
proto_item_append_text(hdr_item, " %s", mei_str);
break;
/* 12, MSISDN */
case 12:
dissect_e164_cc(tvb, tree, offset, E164_ENC_BCD);
- proto_tree_add_item_ret_display_string(tree, hf_mip6_opt_3gpp_msisdn, tvb, offset, len, ENC_BCD_DIGITS_0_9, pinfo->pool, &digit_str);
+ proto_tree_add_item_ret_display_string(tree, hf_mip6_opt_3gpp_msisdn, tvb, offset, len, ENC_BCD_DIGITS_0_9|ENC_LITTLE_ENDIAN, pinfo->pool, &digit_str);
proto_item_append_text(hdr_item, " %s", digit_str);
break;
/* 13, Serving Network */
case 13:
- mcc_mnc_str = dissect_e212_mcc_mnc_wmem_packet_str(tvb, pinfo, tree, offset, E212_NONE, TRUE);
+ mcc_mnc_str = dissect_e212_mcc_mnc_wmem_packet_str(tvb, pinfo, tree, offset, E212_NONE, true);
proto_item_append_text(hdr_item," %s", mcc_mnc_str);
break;
/* 14, APN Restriction */
@@ -2022,7 +2023,7 @@ dissect_mip6_opt_vsm_3gpp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, v
break;
/* 16, Unauthenticated IMSI */
case 16:
- proto_tree_add_item_ret_display_string(tree, hf_mip6_opt_3gpp_imsi, tvb, offset, len, ENC_BCD_DIGITS_0_9, pinfo->pool, &imsi_str);
+ proto_tree_add_item_ret_display_string(tree, hf_mip6_opt_3gpp_imsi, tvb, offset, len, ENC_BCD_DIGITS_0_9|ENC_LITTLE_ENDIAN, pinfo->pool, &imsi_str);
proto_item_append_text(hdr_item," %s", imsi_str);
break;
/* 17, PDN Connection ID */
@@ -2036,7 +2037,7 @@ dissect_mip6_opt_vsm_3gpp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, v
break;
/* 19, Signalling Priority Indication */
case 19:
- proto_tree_add_item(tree, hf_hf_mip6_opt_3gpp_lapi, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_mip6_opt_3gpp_lapi, tvb, offset, 1, ENC_BIG_ENDIAN);
break;
/* 20, Additional Protocol Configuration Options
* 12.1.1.19 Additional Protocol Configuration Options
@@ -2053,7 +2054,7 @@ dissect_mip6_opt_vsm_3gpp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, v
}
static proto_tree*
-mip6_fixed_option_header(proto_tree* tree, packet_info *pinfo, tvbuff_t *tvb, int proto, int ett, proto_item** ti, guint len, guint optlen)
+mip6_fixed_option_header(proto_tree* tree, packet_info *pinfo, tvbuff_t *tvb, int proto, int ett, proto_item** ti, unsigned len, unsigned optlen)
{
proto_tree *field_tree;
proto_item *tf;
@@ -2075,7 +2076,7 @@ mip6_fixed_option_header(proto_tree* tree, packet_info *pinfo, tvbuff_t *tvb, in
}
static proto_tree*
-mip6_var_option_header(proto_tree* tree, packet_info *pinfo, tvbuff_t *tvb, int proto, int ett, proto_item** ti, guint len, guint optlen)
+mip6_var_option_header(proto_tree* tree, packet_info *pinfo, tvbuff_t *tvb, int proto, int ett, proto_item** ti, unsigned len, unsigned optlen)
{
proto_tree *field_tree;
proto_item *tf;
@@ -2191,7 +2192,7 @@ dissect_mip6_network_prefix_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree
proto_item* ti;
int option_len = tvb_reported_length(tvb)-2;
int offset = 3;
- guint32 prefix_len;
+ uint32_t prefix_len;
field_tree = mip6_fixed_option_header(tree, pinfo, tvb, proto, ett, &ti, option_len, optlen);
@@ -2258,7 +2259,7 @@ dissect_mip6_opt_mnid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
proto_item* ti;
int option_len = tvb_reported_length(tvb)-2;
int offset = 2;
- const guint8 *str;
+ const uint8_t *str;
opt_tree = mip6_var_option_header(tree, pinfo, tvb, proto_mip6_option_mnid, ett_mip6_opt_mnid, &ti, option_len, MIP6_MNID_MINLEN);
@@ -2490,7 +2491,7 @@ dissect_mip6_opt_vsm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
int option_len = tvb_reported_length(tvb)-2;
int offset = 2;
tvbuff_t *next_tvb;
- guint32 vendorid;
+ uint32_t vendorid;
opt_tree = mip6_var_option_header(tree, pinfo, tvb, proto_mip6_option_vsm, ett_mip6_opt_vsm, &ti, option_len, MIP6_VSM_MINLEN);
@@ -2522,7 +2523,7 @@ dissect_mip6_opt_ssm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
proto_item* ti;
int option_len = tvb_reported_length(tvb)-2;
int offset = 2;
- guint8 *apn = NULL;
+ uint8_t *apn = NULL;
int name_len;
opt_tree = mip6_var_option_header(tree, pinfo, tvb, proto_mip6_option_ssm, ett_mip6_opt_ssm, &ti, option_len, MIP6_SSM_MINLEN);
@@ -2549,7 +2550,7 @@ dissect_mip6_opt_ssm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
*/
if (option_len > 0) {
- name_len = tvb_get_guint8(tvb, offset);
+ name_len = tvb_get_uint8(tvb, offset);
/* As can be seen above, RFC 5149 "allows" the use of UTF-8 encoded
* strings, but the 3GPP chose to encode as other APN fields,
@@ -2614,7 +2615,7 @@ dissect_pmip6_opt_hi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
proto_item* ti;
int option_len = tvb_reported_length(tvb)-2;
int offset = 2;
- guint32 hi;
+ uint32_t hi;
opt_tree = mip6_fixed_option_header(tree, pinfo, tvb, proto_mip6_option_hi, ett_pmip6_opt_hi, &ti, option_len, PMIP6_HI_LEN);
@@ -2645,14 +2646,14 @@ dissect_pmip6_opt_att(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
proto_item* ti;
int option_len = tvb_reported_length(tvb)-2;
int offset = 2;
- guint32 att;
+ uint32_t att;
opt_tree = mip6_fixed_option_header(tree, pinfo, tvb, proto_mip6_option_att, ett_pmip6_opt_att, &ti, option_len, PMIP6_ATT_LEN);
proto_tree_add_item(opt_tree, hf_pmip6_att_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
- att = tvb_get_guint8(tvb,offset);
+ att = tvb_get_uint8(tvb,offset);
proto_tree_add_item_ret_uint(opt_tree, hf_pmip6_att_att, tvb,
offset, PMIP6_ATT_ATT_LEN, ENC_BIG_ENDIAN, &att);
proto_item_append_text(ti, ": %s", val_to_str_ext_const(att, &pmip6_att_att_value_ext, "<unknown>"));
@@ -2844,7 +2845,7 @@ dissect_pmip6_opt_natd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
int option_len = tvb_reported_length(tvb)-2;
int offset = 2;
proto_item *item;
- guint32 refresh_time;
+ uint32_t refresh_time;
opt_tree = mip6_fixed_option_header(tree, pinfo, tvb, proto_mip6_option_natd, ett_mip6_opt_natd, &ti, option_len, MIP6_NATD_LEN);
@@ -2909,7 +2910,7 @@ dissect_pmip6_opt_grek(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
proto_item* ti;
int option_len = tvb_reported_length(tvb)-2;
int offset = 2;
- guint32 key;
+ uint32_t key;
opt_tree = mip6_var_option_header(tree, pinfo, tvb, proto_mip6_option_grek, ett_pmip6_opt_grek, &ti, option_len, PMIP6_GREK_MIN_LEN);
@@ -2950,14 +2951,14 @@ dissect_pmip6_opt_mhipv6ap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_item* ti;
int option_len = tvb_reported_length(tvb)-2;
int offset = 2;
- guint8 prefix_l;
+ uint8_t prefix_l;
opt_tree = mip6_fixed_option_header(tree, pinfo, tvb, proto_mip6_option_mhipv6ap, ett_pmip6_opt_mhipv6ap, &ti, option_len, MIP6_MHIPV6AP_LEN);
proto_tree_add_item(opt_tree, hf_mip6_opt_mhipv6ap_opt_code, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
- prefix_l = tvb_get_guint8(tvb,offset);
+ prefix_l = tvb_get_uint8(tvb,offset);
proto_tree_add_item(opt_tree, hf_mip6_opt_mhipv6ap_prefix_l, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
@@ -3032,7 +3033,7 @@ dissect_pmip6_opt_ipv4hareq(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
int option_len = tvb_reported_length(tvb)-2;
int offset = 2;
proto_item *item;
- guint32 dword;
+ uint32_t dword;
opt_tree = mip6_fixed_option_header(tree, pinfo, tvb, proto_mip6_option_ipv4hareq, ett_mip6_opt_ipv4hareq, &ti, option_len, MIP6_IPV4HAREQ_LEN);
@@ -3074,7 +3075,7 @@ dissect_pmip6_opt_ipv4harep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_item* ti;
int option_len = tvb_reported_length(tvb)-2;
int offset = 2;
- guint32 status;
+ uint32_t status;
opt_tree = mip6_fixed_option_header(tree, pinfo, tvb, proto_mip6_option_ipv4harep, ett_mip6_opt_ipv4harep, &ti, option_len, MIP6_IPV4HAREP_LEN);
@@ -3177,8 +3178,8 @@ dissect_pmip6_opt_cr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
proto_item* ti;
int option_len = tvb_reported_length(tvb)-2;
int offset = 2;
- guint8 req_type, req_length;
- guint32 vendorid;
+ uint8_t req_type, req_length;
+ uint32_t vendorid;
opt_tree = mip6_var_option_header(tree, pinfo, tvb, proto_mip6_option_cr, ett_mip6_opt_cr, &ti, option_len, MIP6_CR_MIN_LEN);
@@ -3186,11 +3187,11 @@ dissect_pmip6_opt_cr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
offset += 2;
while (offset-2 < option_len) {
- req_type = tvb_get_guint8(tvb,offset);
+ req_type = tvb_get_uint8(tvb,offset);
proto_tree_add_item(opt_tree, hf_mip6_cr_req_type, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
- req_length = tvb_get_guint8(tvb,offset);
+ req_length = tvb_get_uint8(tvb,offset);
proto_tree_add_item(opt_tree, hf_mip6_cr_req_length, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
@@ -3233,11 +3234,11 @@ dissect_pmip6_opt_lmaa(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
proto_item* ti;
int option_len = tvb_reported_length(tvb)-2;
int offset = 2;
- guint8 opt_code;
+ uint8_t opt_code;
opt_tree = mip6_var_option_header(tree, pinfo, tvb, proto_mip6_option_lmaa, ett_mip6_opt_lmaa, &ti, option_len, MIP6_LMAA_MIN_LEN);
- opt_code = tvb_get_guint8(tvb,offset);
+ opt_code = tvb_get_uint8(tvb,offset);
proto_tree_add_item(opt_tree, hf_mip6_lmaa_opt_code, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
@@ -3280,7 +3281,7 @@ dissect_pmip6_opt_redir(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi
proto_item* ti;
int option_len = tvb_reported_length(tvb)-2;
int offset = 2;
- guint16 flag;
+ uint16_t flag;
opt_tree = mip6_var_option_header(tree, pinfo, tvb, proto_mip6_option_redir, ett_mip6_opt_redir, &ti, option_len, MIP6_REDIR_MIN_LEN);
@@ -3361,7 +3362,7 @@ dissect_pmip6_opt_mng(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
int option_len = tvb_reported_length(tvb)-2;
int offset = 2;
proto_item *item;
- guint32 mng_id;
+ uint32_t mng_id;
opt_tree = mip6_fixed_option_header(tree, pinfo, tvb, proto_mip6_option_mng, ett_mip6_opt_mng, &ti, option_len, MIP6_MNG_LEN);
@@ -3475,7 +3476,7 @@ static const value_string mip6_opt_acc_net_id_sub_opt_op_id_type[] = {
};
static float
-degrees_convert_fixed_to_float(guint value)
+degrees_convert_fixed_to_float(unsigned value)
{
if (!value)
return 0;
@@ -3503,11 +3504,11 @@ degrees_convert_fixed_to_float(guint value)
}
/* Cast to a signed value, and divide by 32768; do a floating-point divide */
- return ((float)(gint)value) / 32768.0f;
+ return ((float)(int)value) / 32768.0f;
}
static void
-degrees_base_custom(gchar *str, guint degrees)
+degrees_base_custom(char *str, unsigned degrees)
{
snprintf(str, ITEM_LABEL_LENGTH, "%f", degrees_convert_fixed_to_float(degrees) );
}
@@ -3518,12 +3519,12 @@ dissect_pmip6_opt_acc_net_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
proto_tree* opt_tree;
proto_item *ti;
proto_tree *subopt_tree;
- gint16 sub_opt_len;
- guint8 sub_opt, e_bit, net_name_len, ap_name_len;
- const guint8 *ap_name;
+ int16_t sub_opt_len;
+ uint8_t sub_opt, e_bit, net_name_len, ap_name_len;
+ const uint8_t *ap_name;
int option_len = tvb_reported_length(tvb)-2;
int offset = 2;
- gint offset_end = tvb_reported_length(tvb);
+ int offset_end = tvb_reported_length(tvb);
opt_tree = mip6_var_option_header(tree, pinfo, tvb, proto_mip6_option_acc_net_id, ett_mip6_opt_acc_net_id, &ti, option_len, MIP6_ACC_NET_ID_MIN_LEN);
@@ -3532,11 +3533,11 @@ dissect_pmip6_opt_acc_net_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
subopt_tree = proto_item_add_subtree(ti, ett_mip6_sub_opt_acc_net_id);
proto_tree_add_item(subopt_tree, hf_mip6_opt_acc_net_id_sub_opt, tvb, offset, 1, ENC_BIG_ENDIAN);
- sub_opt = tvb_get_guint8(tvb,offset);
+ sub_opt = tvb_get_uint8(tvb,offset);
offset++;
proto_tree_add_item(subopt_tree, hf_mip6_opt_acc_net_id_sub_opt_len, tvb, offset, 1, ENC_BIG_ENDIAN);
- sub_opt_len = tvb_get_guint8(tvb,offset);
+ sub_opt_len = tvb_get_uint8(tvb,offset);
offset++;
proto_item_append_text(ti, ": %s (t=%d,l=%d)", val_to_str(sub_opt, mmip6_opt_acc_net_id_sub_opt_vals, "Unknown ANI Type (%02d)"), sub_opt, sub_opt_len);
@@ -3555,16 +3556,16 @@ dissect_pmip6_opt_acc_net_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
| AP-Name Len | Access-Point Name ~
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*/
- e_bit = tvb_get_guint8(tvb,offset);
+ e_bit = tvb_get_uint8(tvb,offset);
proto_tree_add_item(subopt_tree, hf_mip6_opt_acc_net_id_sub_opt_e_bit, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
- net_name_len = tvb_get_guint8(tvb,offset);
+ net_name_len = tvb_get_uint8(tvb,offset);
proto_tree_add_item(subopt_tree, hf_mip6_opt_acc_net_id_sub_opt_net_name_len, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
if(e_bit == 0x80){
- const guint8* name;
+ const uint8_t* name;
proto_tree_add_item_ret_string(subopt_tree, hf_mip6_opt_acc_net_id_sub_opt_net_name, tvb, offset, net_name_len, ENC_BIG_ENDIAN|ENC_UTF_8, pinfo->pool, &name);
proto_item_append_text(ti, " Network Name: %s", name);
}else{
@@ -3572,7 +3573,7 @@ dissect_pmip6_opt_acc_net_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
};
offset = offset+net_name_len;
- ap_name_len = tvb_get_guint8(tvb,offset);
+ ap_name_len = tvb_get_uint8(tvb,offset);
proto_tree_add_item(subopt_tree, hf_mip6_opt_acc_net_id_sub_opt_ap_name_len, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
@@ -3651,7 +3652,7 @@ dissect_mip6_opt_dmnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
proto_item* ti;
int option_len = tvb_reported_length(tvb)-2;
int offset = 2;
- guint8 prefix_len;
+ uint8_t prefix_len;
opt_tree = mip6_var_option_header(tree, pinfo, tvb, proto_mip6_option_dmnp, ett_mip6_opt_dmnp, &ti, option_len, MIP6_DMNP_MIN_LEN);
@@ -3663,7 +3664,7 @@ dissect_mip6_opt_dmnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
offset++;
proto_tree_add_item(opt_tree, hf_mip6_opt_dmnp_prefix_len, tvb,
offset, 1, ENC_BIG_ENDIAN);
- prefix_len = tvb_get_guint8(tvb, offset);
+ prefix_len = tvb_get_uint8(tvb, offset);
offset++;
@@ -3698,19 +3699,19 @@ dissect_mip6_opt_dmnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
* however, are passed a length that *does* include them.
*/
static void
-dissect_mipv6_options(tvbuff_t *tvb, int offset, guint length,
+dissect_mipv6_options(tvbuff_t *tvb, int offset, unsigned length,
int eol, packet_info *pinfo, proto_tree *opt_tree)
{
- guchar opt;
+ unsigned char opt;
const char *name;
- guint len;
+ unsigned len;
dissector_handle_t option_dissector;
tvbuff_t *next_tvb;
proto_item *ti;
proto_tree *unknown_tree;
- while ((gint)length > 0) {
- opt = tvb_get_guint8(tvb, offset);
+ while ((int)length > 0) {
+ opt = tvb_get_uint8(tvb, offset);
--length; /* account for type byte */
if (opt == MIP6_PAD1) {
@@ -3738,7 +3739,7 @@ dissect_mipv6_options(tvbuff_t *tvb, int offset, guint length,
return;
}
- len = tvb_get_guint8(tvb, offset + 1); /* Size specified in option */
+ len = tvb_get_uint8(tvb, offset + 1); /* Size specified in option */
--length; /* account for length byte */
if (len > length) {
@@ -3788,8 +3789,8 @@ static int
dissect_mip6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
proto_tree *mip6_tree, *root_tree;
- guint8 type, pproto;
- guint len, offset = 0, start_offset = offset;
+ uint8_t type, pproto;
+ unsigned len, offset = 0, start_offset = offset;
proto_item *ti, *header_item;
tvbuff_t *next_tvb;
@@ -3797,8 +3798,8 @@ dissect_mip6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
col_set_str(pinfo->cinfo, COL_PROTOCOL, "MIPv6");
col_clear(pinfo->cinfo, COL_INFO);
- len = (tvb_get_guint8(tvb, MIP6_HLEN_OFF) + 1) * 8;
- pproto = tvb_get_guint8(tvb, MIP6_PROTO_OFF);
+ len = (tvb_get_uint8(tvb, MIP6_HLEN_OFF) + 1) * 8;
+ pproto = tvb_get_uint8(tvb, MIP6_PROTO_OFF);
root_tree = p_ipv6_pinfo_select_root(pinfo, tree);
p_ipv6_pinfo_add_len(pinfo, len);
@@ -3812,9 +3813,9 @@ dissect_mip6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
header_item = proto_tree_add_uint_format_value(mip6_tree, hf_mip6_hlen, tvb,
MIP6_HLEN_OFF, 1,
- tvb_get_guint8(tvb, MIP6_HLEN_OFF),
+ tvb_get_uint8(tvb, MIP6_HLEN_OFF),
"%u (%u bytes)",
- tvb_get_guint8(tvb, MIP6_HLEN_OFF),
+ tvb_get_uint8(tvb, MIP6_HLEN_OFF),
len);
proto_tree_add_item(mip6_tree, hf_mip6_mhtype, tvb,
@@ -3827,8 +3828,8 @@ dissect_mip6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
-1, NULL, pinfo, 0, ENC_BIG_ENDIAN, PROTO_CHECKSUM_NO_FLAGS);
/* Process mobility header */
- type = tvb_get_guint8(tvb, MIP6_TYPE_OFF);
- col_add_fstr(pinfo->cinfo, COL_INFO, "%s", val_to_str_ext(type, &mip6_mh_types_ext, "Unknown Mobility Header (%u)"));
+ type = tvb_get_uint8(tvb, MIP6_TYPE_OFF);
+ col_add_str(pinfo->cinfo, COL_INFO, val_to_str_ext(type, &mip6_mh_types_ext, "Unknown Mobility Header (%u)"));
switch (type) {
case MIP6_BRR:
/* 0 Binding Refresh Request */
@@ -4331,7 +4332,7 @@ proto_register_mip6(void)
FT_UINT8, BASE_DEC, NULL, 0x0f,
NULL, HFILL }
},
- { &hf_hf_mip6_opt_3gpp_lapi,
+ { &hf_mip6_opt_3gpp_lapi,
{"LAPI (Low Access Priority Indication)", "mip6.3gpp.lapi",
FT_BOOLEAN, 8, NULL, 0x01,
NULL, HFILL}
@@ -4575,7 +4576,7 @@ proto_register_mip6(void)
},
{ &hf_mip6_opt_natd_refresh_t,
{ "Refresh time", "mip6.natd.refresh_t",
- FT_UINT32, BASE_DEC|BASE_UNIT_STRING, &units_seconds, 0x0,
+ FT_UINT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_seconds), 0x0,
NULL, HFILL }
},
{ &hf_mip6_opt_ipv4coa_reserved,
@@ -5059,7 +5060,7 @@ proto_register_mip6(void)
};
/* Setup protocol subtree array */
- static gint *ett[] = {
+ static int *ett[] = {
&ett_mip6,
&ett_mip6_opts,
&ett_mip6_opt_pad1,