diff options
Diffstat (limited to 'epan/dissectors/packet-uftp5.c')
-rw-r--r-- | epan/dissectors/packet-uftp5.c | 858 |
1 files changed, 429 insertions, 429 deletions
diff --git a/epan/dissectors/packet-uftp5.c b/epan/dissectors/packet-uftp5.c index 9a495237..b09cf0c9 100644 --- a/epan/dissectors/packet-uftp5.c +++ b/epan/dissectors/packet-uftp5.c @@ -208,329 +208,329 @@ void proto_register_uftp5(void); -static int proto_uftp = -1; +static int proto_uftp; /* main header and common fields */ -static int hf_uftp_version = -1; -static int hf_uftp_func = -1; -static int hf_uftp_seq = -1; -static int hf_uftp_src_id = -1; -static int hf_uftp_group_id = -1; -static int hf_uftp_group_inst = -1; -static int hf_uftp_grtt = -1; -static int hf_uftp_gsize = -1; -static int hf_uftp_reserved = -1; - -static int hf_uftp_destlist = -1; -static int hf_uftp_dest = -1; +static int hf_uftp_version; +static int hf_uftp_func; +static int hf_uftp_seq; +static int hf_uftp_src_id; +static int hf_uftp_group_id; +static int hf_uftp_group_inst; +static int hf_uftp_grtt; +static int hf_uftp_gsize; +static int hf_uftp_reserved; + +static int hf_uftp_destlist; +static int hf_uftp_dest; /* ANNOUNCE fields */ -static int hf_uftp_announce = -1; -static int hf_uftp_announce_func = -1; -static int hf_uftp_announce_hlen = -1; -static int hf_uftp_announce_flags = -1; -static int hf_uftp_announce_flags_sync = -1; -static int hf_uftp_announce_flags_syncpreview = -1; -static int hf_uftp_announce_flags_ipv6 = -1; -static int hf_uftp_announce_flags_reserved = -1; -static int hf_uftp_announce_robust = -1; -static int hf_uftp_announce_cc_type = -1; -static int hf_uftp_announce_reserved = -1; -static int hf_uftp_announce_blocksize = -1; -static int hf_uftp_announce_tstamp = -1; -static int hf_uftp_announce_publicmcast_ipv4 = -1; -static int hf_uftp_announce_publicmcast_ipv6 = -1; -static int hf_uftp_announce_privatemcast_ipv4 = -1; -static int hf_uftp_announce_privatemcast_ipv6 = -1; +static int hf_uftp_announce; +static int hf_uftp_announce_func; +static int hf_uftp_announce_hlen; +static int hf_uftp_announce_flags; +static int hf_uftp_announce_flags_sync; +static int hf_uftp_announce_flags_syncpreview; +static int hf_uftp_announce_flags_ipv6; +static int hf_uftp_announce_flags_reserved; +static int hf_uftp_announce_robust; +static int hf_uftp_announce_cc_type; +static int hf_uftp_announce_reserved; +static int hf_uftp_announce_blocksize; +static int hf_uftp_announce_tstamp; +static int hf_uftp_announce_publicmcast_ipv4; +static int hf_uftp_announce_publicmcast_ipv6; +static int hf_uftp_announce_privatemcast_ipv4; +static int hf_uftp_announce_privatemcast_ipv6; /* EXT_ENC_INFO fields */ -static int hf_uftp_encinfo = -1; -static int hf_uftp_encinfo_exttype = -1; -static int hf_uftp_encinfo_extlen = -1; -static int hf_uftp_encinfo_flags = -1; -static int hf_uftp_encinfo_flags_client_auth = -1; -static int hf_uftp_encinfo_flags_reserved = -1; -static int hf_uftp_encinfo_reserved = -1; -static int hf_uftp_encinfo_keytype = -1; -static int hf_uftp_encinfo_hashtype = -1; -static int hf_uftp_encinfo_keylen = -1; -static int hf_uftp_encinfo_dhlen = -1; -static int hf_uftp_encinfo_siglen = -1; -static int hf_uftp_encinfo_rand1 = -1; -static int hf_uftp_encinfo_keyblob = -1; -static int hf_uftp_encinfo_dhblob = -1; -static int hf_uftp_encinfo_sig = -1; +static int hf_uftp_encinfo; +static int hf_uftp_encinfo_exttype; +static int hf_uftp_encinfo_extlen; +static int hf_uftp_encinfo_flags; +static int hf_uftp_encinfo_flags_client_auth; +static int hf_uftp_encinfo_flags_reserved; +static int hf_uftp_encinfo_reserved; +static int hf_uftp_encinfo_keytype; +static int hf_uftp_encinfo_hashtype; +static int hf_uftp_encinfo_keylen; +static int hf_uftp_encinfo_dhlen; +static int hf_uftp_encinfo_siglen; +static int hf_uftp_encinfo_rand1; +static int hf_uftp_encinfo_keyblob; +static int hf_uftp_encinfo_dhblob; +static int hf_uftp_encinfo_sig; /* rsa_blob_t fields */ -static int hf_uftp_rsablob_blobtype = -1; -static int hf_uftp_rsablob_reserved = -1; -static int hf_uftp_rsablob_modlen = -1; -static int hf_uftp_rsablob_exponent = -1; -static int hf_uftp_rsablob_modulus = -1; +static int hf_uftp_rsablob_blobtype; +static int hf_uftp_rsablob_reserved; +static int hf_uftp_rsablob_modlen; +static int hf_uftp_rsablob_exponent; +static int hf_uftp_rsablob_modulus; /* ec_blob_t fields */ -static int hf_uftp_ecblob_blobtype = -1; -static int hf_uftp_ecblob_curve = -1; -static int hf_uftp_ecblob_keylen = -1; -static int hf_uftp_ecblob_key = -1; +static int hf_uftp_ecblob_blobtype; +static int hf_uftp_ecblob_curve; +static int hf_uftp_ecblob_keylen; +static int hf_uftp_ecblob_key; /* REGISTER fields */ -static int hf_uftp_register = -1; -static int hf_uftp_register_func = -1; -static int hf_uftp_register_hlen = -1; -static int hf_uftp_register_dhlen = -1; -static int hf_uftp_register_tstamp = -1; -static int hf_uftp_register_rand2 = -1; -static int hf_uftp_register_dhkey = -1; +static int hf_uftp_register; +static int hf_uftp_register_func; +static int hf_uftp_register_hlen; +static int hf_uftp_register_dhlen; +static int hf_uftp_register_tstamp; +static int hf_uftp_register_rand2; +static int hf_uftp_register_dhkey; /* CLIENT_KEY fields */ -static int hf_uftp_clientkey = -1; -static int hf_uftp_clientkey_func = -1; -static int hf_uftp_clientkey_hlen = -1; -static int hf_uftp_clientkey_reserved = -1; -static int hf_uftp_clientkey_bloblen = -1; -static int hf_uftp_clientkey_siglen = -1; -static int hf_uftp_clientkey_keyblob = -1; -static int hf_uftp_clientkey_verify = -1; +static int hf_uftp_clientkey; +static int hf_uftp_clientkey_func; +static int hf_uftp_clientkey_hlen; +static int hf_uftp_clientkey_reserved; +static int hf_uftp_clientkey_bloblen; +static int hf_uftp_clientkey_siglen; +static int hf_uftp_clientkey_keyblob; +static int hf_uftp_clientkey_verify; /* REG_CONF fields */ -static int hf_uftp_regconf = -1; -static int hf_uftp_regconf_func = -1; -static int hf_uftp_regconf_hlen = -1; -static int hf_uftp_regconf_reserved = -1; +static int hf_uftp_regconf; +static int hf_uftp_regconf_func; +static int hf_uftp_regconf_hlen; +static int hf_uftp_regconf_reserved; /* KEYINFO fields */ -static int hf_uftp_keyinfo = -1; -static int hf_uftp_keyinfo_func = -1; -static int hf_uftp_keyinfo_hlen = -1; -static int hf_uftp_keyinfo_siglen = -1; -static int hf_uftp_keyinfo_ivctr = -1; -static int hf_uftp_keyinfo_sig = -1; -static int hf_uftp_keyinfo_destkey = -1; -static int hf_uftp_keyinfo_destid = -1; -static int hf_uftp_keyinfo_groupmaster = -1; +static int hf_uftp_keyinfo; +static int hf_uftp_keyinfo_func; +static int hf_uftp_keyinfo_hlen; +static int hf_uftp_keyinfo_siglen; +static int hf_uftp_keyinfo_ivctr; +static int hf_uftp_keyinfo_sig; +static int hf_uftp_keyinfo_destkey; +static int hf_uftp_keyinfo_destid; +static int hf_uftp_keyinfo_groupmaster; /* KEYINFO_ACK fields */ -static int hf_uftp_keyinfoack = -1; -static int hf_uftp_keyinfoack_func = -1; -static int hf_uftp_keyinfoack_hlen = -1; -static int hf_uftp_keyinfoack_verify_len = -1; -static int hf_uftp_keyinfoack_verify_data = -1; +static int hf_uftp_keyinfoack; +static int hf_uftp_keyinfoack_func; +static int hf_uftp_keyinfoack_hlen; +static int hf_uftp_keyinfoack_verify_len; +static int hf_uftp_keyinfoack_verify_data; /* FILEINFO fields */ -static int hf_uftp_fileinfo = -1; -static int hf_uftp_fileinfo_func = -1; -static int hf_uftp_fileinfo_hlen = -1; -static int hf_uftp_fileinfo_file_id = -1; -static int hf_uftp_fileinfo_ftype = -1; -static int hf_uftp_fileinfo_reserved = -1; -static int hf_uftp_fileinfo_ftstamp_hi = -1; -static int hf_uftp_fileinfo_namelen = -1; -static int hf_uftp_fileinfo_linklen = -1; -static int hf_uftp_fileinfo_fsize = -1; -static int hf_uftp_fileinfo_ftstamp = -1; -static int hf_uftp_fileinfo_tstamp = -1; -static int hf_uftp_fileinfo_name = -1; -static int hf_uftp_fileinfo_link = -1; +static int hf_uftp_fileinfo; +static int hf_uftp_fileinfo_func; +static int hf_uftp_fileinfo_hlen; +static int hf_uftp_fileinfo_file_id; +static int hf_uftp_fileinfo_ftype; +static int hf_uftp_fileinfo_reserved; +static int hf_uftp_fileinfo_ftstamp_hi; +static int hf_uftp_fileinfo_namelen; +static int hf_uftp_fileinfo_linklen; +static int hf_uftp_fileinfo_fsize; +static int hf_uftp_fileinfo_ftstamp; +static int hf_uftp_fileinfo_tstamp; +static int hf_uftp_fileinfo_name; +static int hf_uftp_fileinfo_link; /* FILEINFO_ACK fields */ -static int hf_uftp_fileinfoack = -1; -static int hf_uftp_fileinfoack_func = -1; -static int hf_uftp_fileinfoack_hlen = -1; -static int hf_uftp_fileinfoack_file_id = -1; -static int hf_uftp_fileinfoack_flags = -1; -static int hf_uftp_fileinfoack_flags_partial = -1; -static int hf_uftp_fileinfoack_flags_reserved = -1; -static int hf_uftp_fileinfoack_reserved = -1; -static int hf_uftp_fileinfoack_tstamp = -1; +static int hf_uftp_fileinfoack; +static int hf_uftp_fileinfoack_func; +static int hf_uftp_fileinfoack_hlen; +static int hf_uftp_fileinfoack_file_id; +static int hf_uftp_fileinfoack_flags; +static int hf_uftp_fileinfoack_flags_partial; +static int hf_uftp_fileinfoack_flags_reserved; +static int hf_uftp_fileinfoack_reserved; +static int hf_uftp_fileinfoack_tstamp; /* FILESEG fields */ -static int hf_uftp_fileseg = -1; -static int hf_uftp_fileseg_func = -1; -static int hf_uftp_fileseg_hlen = -1; -static int hf_uftp_fileseg_file_id = -1; -static int hf_uftp_fileseg_section = -1; -static int hf_uftp_fileseg_sec_block = -1; -static int hf_uftp_fileseg_data = -1; +static int hf_uftp_fileseg; +static int hf_uftp_fileseg_func; +static int hf_uftp_fileseg_hlen; +static int hf_uftp_fileseg_file_id; +static int hf_uftp_fileseg_section; +static int hf_uftp_fileseg_sec_block; +static int hf_uftp_fileseg_data; /* EXT_TFMCC_DATA_INFO fields */ -static int hf_uftp_tfmccdata = -1; -static int hf_uftp_tfmccdata_exttype = -1; -static int hf_uftp_tfmccdata_extlen = -1; -static int hf_uftp_tfmccdata_send_rate = -1; -static int hf_uftp_tfmccdata_cc_seq = -1; -static int hf_uftp_tfmccdata_cc_rate = -1; +static int hf_uftp_tfmccdata; +static int hf_uftp_tfmccdata_exttype; +static int hf_uftp_tfmccdata_extlen; +static int hf_uftp_tfmccdata_send_rate; +static int hf_uftp_tfmccdata_cc_seq; +static int hf_uftp_tfmccdata_cc_rate; /* DONE fields */ -static int hf_uftp_done = -1; -static int hf_uftp_done_func = -1; -static int hf_uftp_done_hlen = -1; -static int hf_uftp_done_file_id = -1; -static int hf_uftp_done_section = -1; -static int hf_uftp_done_reserved = -1; +static int hf_uftp_done; +static int hf_uftp_done_func; +static int hf_uftp_done_hlen; +static int hf_uftp_done_file_id; +static int hf_uftp_done_section; +static int hf_uftp_done_reserved; /* STATUS fields */ -static int hf_uftp_status = -1; -static int hf_uftp_status_func = -1; -static int hf_uftp_status_hlen = -1; -static int hf_uftp_status_file_id = -1; -static int hf_uftp_status_section = -1; -static int hf_uftp_status_reserved = -1; -static int hf_uftp_status_naks = -1; +static int hf_uftp_status; +static int hf_uftp_status_func; +static int hf_uftp_status_hlen; +static int hf_uftp_status_file_id; +static int hf_uftp_status_section; +static int hf_uftp_status_reserved; +static int hf_uftp_status_naks; /* COMPLETE fields */ -static int hf_uftp_complete = -1; -static int hf_uftp_complete_func = -1; -static int hf_uftp_complete_hlen = -1; -static int hf_uftp_complete_file_id = -1; -static int hf_uftp_complete_status = -1; -static int hf_uftp_complete_reserved = -1; +static int hf_uftp_complete; +static int hf_uftp_complete_func; +static int hf_uftp_complete_hlen; +static int hf_uftp_complete_file_id; +static int hf_uftp_complete_status; +static int hf_uftp_complete_reserved; /* EXT_FREESPACE_INFO fields */ -static int hf_uftp_freespace = -1; -static int hf_uftp_freespace_exttype = -1; -static int hf_uftp_freespace_extlen = -1; -static int hf_uftp_freespace_reserved = -1; -static int hf_uftp_freespace_freespace = -1; +static int hf_uftp_freespace; +static int hf_uftp_freespace_exttype; +static int hf_uftp_freespace_extlen; +static int hf_uftp_freespace_reserved; +static int hf_uftp_freespace_freespace; /* DONE_CONF fields */ -static int hf_uftp_doneconf = -1; -static int hf_uftp_doneconf_func = -1; -static int hf_uftp_doneconf_hlen = -1; -static int hf_uftp_doneconf_reserved = -1; +static int hf_uftp_doneconf; +static int hf_uftp_doneconf_func; +static int hf_uftp_doneconf_hlen; +static int hf_uftp_doneconf_reserved; /* HB_REQ fields */ -static int hf_uftp_hbreq = -1; -static int hf_uftp_hbreq_func = -1; -static int hf_uftp_hbreq_hlen = -1; -static int hf_uftp_hbreq_reserved = -1; -static int hf_uftp_hbreq_bloblen = -1; -static int hf_uftp_hbreq_siglen = -1; -static int hf_uftp_hbreq_nonce = -1; -static int hf_uftp_hbreq_keyblob = -1; -static int hf_uftp_hbreq_verify = -1; +static int hf_uftp_hbreq; +static int hf_uftp_hbreq_func; +static int hf_uftp_hbreq_hlen; +static int hf_uftp_hbreq_reserved; +static int hf_uftp_hbreq_bloblen; +static int hf_uftp_hbreq_siglen; +static int hf_uftp_hbreq_nonce; +static int hf_uftp_hbreq_keyblob; +static int hf_uftp_hbreq_verify; /* HB_RESP fields */ -static int hf_uftp_hbresp = -1; -static int hf_uftp_hbresp_func = -1; -static int hf_uftp_hbresp_hlen = -1; -static int hf_uftp_hbresp_authenticated = -1; -static int hf_uftp_hbresp_reserved = -1; -static int hf_uftp_hbresp_nonce = -1; +static int hf_uftp_hbresp; +static int hf_uftp_hbresp_func; +static int hf_uftp_hbresp_hlen; +static int hf_uftp_hbresp_authenticated; +static int hf_uftp_hbresp_reserved; +static int hf_uftp_hbresp_nonce; /* PROXY_KEY fields */ -static int hf_uftp_proxykey = -1; -static int hf_uftp_proxykey_func = -1; -static int hf_uftp_proxykey_hlen = -1; -static int hf_uftp_proxykey_bloblen = -1; -static int hf_uftp_proxykey_dhlen = -1; -static int hf_uftp_proxykey_siglen = -1; -static int hf_uftp_proxykey_keyblob = -1; -static int hf_uftp_proxykey_dhblob = -1; -static int hf_uftp_proxykey_sig = -1; +static int hf_uftp_proxykey; +static int hf_uftp_proxykey_func; +static int hf_uftp_proxykey_hlen; +static int hf_uftp_proxykey_bloblen; +static int hf_uftp_proxykey_dhlen; +static int hf_uftp_proxykey_siglen; +static int hf_uftp_proxykey_keyblob; +static int hf_uftp_proxykey_dhblob; +static int hf_uftp_proxykey_sig; /* CONG_CTRL fields */ -static int hf_uftp_congctrl = -1; -static int hf_uftp_congctrl_func = -1; -static int hf_uftp_congctrl_hlen = -1; -static int hf_uftp_congctrl_reserved = -1; -static int hf_uftp_congctrl_cc_seq = -1; -static int hf_uftp_congctrl_cc_rate = -1; -static int hf_uftp_congctrl_tstamp = -1; -static int hf_uftp_congctrl_cclist = -1; -static int hf_uftp_congctrl_item = -1; -static int hf_uftp_congctrl_item_destid = -1; -static int hf_uftp_congctrl_item_flags = -1; -static int hf_uftp_congctrl_item_flags_clr = -1; -static int hf_uftp_congctrl_item_flags_rtt = -1; -static int hf_uftp_congctrl_item_flags_start = -1; -static int hf_uftp_congctrl_item_flags_leave = -1; -static int hf_uftp_congctrl_item_flags_reserved = -1; -static int hf_uftp_congctrl_item_rtt = -1; -static int hf_uftp_congctrl_item_rate = -1; +static int hf_uftp_congctrl; +static int hf_uftp_congctrl_func; +static int hf_uftp_congctrl_hlen; +static int hf_uftp_congctrl_reserved; +static int hf_uftp_congctrl_cc_seq; +static int hf_uftp_congctrl_cc_rate; +static int hf_uftp_congctrl_tstamp; +static int hf_uftp_congctrl_cclist; +static int hf_uftp_congctrl_item; +static int hf_uftp_congctrl_item_destid; +static int hf_uftp_congctrl_item_flags; +static int hf_uftp_congctrl_item_flags_clr; +static int hf_uftp_congctrl_item_flags_rtt; +static int hf_uftp_congctrl_item_flags_start; +static int hf_uftp_congctrl_item_flags_leave; +static int hf_uftp_congctrl_item_flags_reserved; +static int hf_uftp_congctrl_item_rtt; +static int hf_uftp_congctrl_item_rate; /* CC_ACK fields */ -static int hf_uftp_ccack = -1; -static int hf_uftp_ccack_func = -1; -static int hf_uftp_ccack_hlen = -1; -static int hf_uftp_ccack_reserved = -1; +static int hf_uftp_ccack; +static int hf_uftp_ccack_func; +static int hf_uftp_ccack_hlen; +static int hf_uftp_ccack_reserved; /* EXT_TFMCC_ACK_INFO fields */ -static int hf_uftp_tfmccack = -1; -static int hf_uftp_tfmccack_exttype = -1; -static int hf_uftp_tfmccack_extlen = -1; -static int hf_uftp_tfmccack_flags = -1; -static int hf_uftp_tfmccack_flags_clr = -1; -static int hf_uftp_tfmccack_flags_rtt = -1; -static int hf_uftp_tfmccack_flags_start = -1; -static int hf_uftp_tfmccack_flags_leave = -1; -static int hf_uftp_tfmccack_flags_reserved = -1; -static int hf_uftp_tfmccack_reserved = -1; -static int hf_uftp_tfmccack_cc_seq = -1; -static int hf_uftp_tfmccack_cc_rate = -1; -static int hf_uftp_tfmccack_client_id = -1; -static int hf_uftp_tfmccack_tstamp = -1; +static int hf_uftp_tfmccack; +static int hf_uftp_tfmccack_exttype; +static int hf_uftp_tfmccack_extlen; +static int hf_uftp_tfmccack_flags; +static int hf_uftp_tfmccack_flags_clr; +static int hf_uftp_tfmccack_flags_rtt; +static int hf_uftp_tfmccack_flags_start; +static int hf_uftp_tfmccack_flags_leave; +static int hf_uftp_tfmccack_flags_reserved; +static int hf_uftp_tfmccack_reserved; +static int hf_uftp_tfmccack_cc_seq; +static int hf_uftp_tfmccack_cc_rate; +static int hf_uftp_tfmccack_client_id; +static int hf_uftp_tfmccack_tstamp; /* ENCRYPTED fields */ -static int hf_uftp_encrypted = -1; -static int hf_uftp_encrypted_ivctr = -1; -static int hf_uftp_encrypted_reserved = -1; -static int hf_uftp_encrypted_payload_len = -1; -static int hf_uftp_encrypted_payload = -1; +static int hf_uftp_encrypted; +static int hf_uftp_encrypted_ivctr; +static int hf_uftp_encrypted_reserved; +static int hf_uftp_encrypted_payload_len; +static int hf_uftp_encrypted_payload; /* ABORT fields */ -static int hf_uftp_abort = -1; -static int hf_uftp_abort_func = -1; -static int hf_uftp_abort_hlen = -1; -static int hf_uftp_abort_flags = -1; -static int hf_uftp_abort_flags_curfile = -1; -static int hf_uftp_abort_flags_reserved = -1; -static int hf_uftp_abort_reserved = -1; -static int hf_uftp_abort_clientid = -1; -static int hf_uftp_abort_message = -1; - -static gint ett_uftp = -1; -static gint ett_uftp_announce = -1; -static gint ett_uftp_register = -1; -static gint ett_uftp_clientkey = -1; -static gint ett_uftp_regconf = -1; -static gint ett_uftp_keyinfo = -1; -static gint ett_uftp_keyinfoack = -1; -static gint ett_uftp_fileinfo = -1; -static gint ett_uftp_fileinfoack = -1; -static gint ett_uftp_fileseg = -1; -static gint ett_uftp_done = -1; -static gint ett_uftp_status = -1; -static gint ett_uftp_complete = -1; -static gint ett_uftp_doneconf = -1; -static gint ett_uftp_hbreq = -1; -static gint ett_uftp_hbresp = -1; -static gint ett_uftp_proxykey = -1; -static gint ett_uftp_congctrl = -1; -static gint ett_uftp_ccack = -1; -static gint ett_uftp_encrypted = -1; -static gint ett_uftp_abort = -1; - -static gint ett_uftp_announce_flags = -1; -static gint ett_uftp_encinfo = -1; -static gint ett_uftp_encinfo_flags = -1; -static gint ett_uftp_keyinfo_destkey = -1; -static gint ett_uftp_fileinfoack_flags = -1; -static gint ett_uftp_congctrl_cclist = -1; -static gint ett_uftp_congctrl_item = -1; -static gint ett_uftp_congctrl_item_flags = -1; -static gint ett_uftp_tfmccdata = -1; -static gint ett_uftp_tfmccack = -1; -static gint ett_uftp_tfmccack_flags = -1; -static gint ett_uftp_freespace = -1; -static gint ett_uftp_abort_flags = -1; - -static gint ett_uftp_destlist = -1; -static gint ett_uftp_rsablob = -1; -static gint ett_uftp_ecblob = -1; - -static expert_field ei_uftp_length_invalid = EI_INIT; -static expert_field ei_uftp_func_unknown = EI_INIT; +static int hf_uftp_abort; +static int hf_uftp_abort_func; +static int hf_uftp_abort_hlen; +static int hf_uftp_abort_flags; +static int hf_uftp_abort_flags_curfile; +static int hf_uftp_abort_flags_reserved; +static int hf_uftp_abort_reserved; +static int hf_uftp_abort_clientid; +static int hf_uftp_abort_message; + +static int ett_uftp; +static int ett_uftp_announce; +static int ett_uftp_register; +static int ett_uftp_clientkey; +static int ett_uftp_regconf; +static int ett_uftp_keyinfo; +static int ett_uftp_keyinfoack; +static int ett_uftp_fileinfo; +static int ett_uftp_fileinfoack; +static int ett_uftp_fileseg; +static int ett_uftp_done; +static int ett_uftp_status; +static int ett_uftp_complete; +static int ett_uftp_doneconf; +static int ett_uftp_hbreq; +static int ett_uftp_hbresp; +static int ett_uftp_proxykey; +static int ett_uftp_congctrl; +static int ett_uftp_ccack; +static int ett_uftp_encrypted; +static int ett_uftp_abort; + +static int ett_uftp_announce_flags; +static int ett_uftp_encinfo; +static int ett_uftp_encinfo_flags; +static int ett_uftp_keyinfo_destkey; +static int ett_uftp_fileinfoack_flags; +static int ett_uftp_congctrl_cclist; +static int ett_uftp_congctrl_item; +static int ett_uftp_congctrl_item_flags; +static int ett_uftp_tfmccdata; +static int ett_uftp_tfmccack; +static int ett_uftp_tfmccack_flags; +static int ett_uftp_freespace; +static int ett_uftp_abort_flags; + +static int ett_uftp_destlist; +static int ett_uftp_rsablob; +static int ett_uftp_ecblob; + +static expert_field ei_uftp_length_invalid; +static expert_field ei_uftp_func_unknown; static const value_string messages[] = { { ANNOUNCE, "ANNOUNCE" }, @@ -705,16 +705,16 @@ static const value_string comp_status[] = { #define RTT_MIN 1.0e-6 #define RTT_MAX 1000.0 -static double unquantize_grtt(guint8 rtt) +static double unquantize_grtt(uint8_t rtt) { return ((rtt <= 31) ? (((double)(rtt + 1)) * (double)RTT_MIN) : (RTT_MAX / exp(((double)(255 - rtt)) / (double)13.0))); } -static guint unquantize_gsize(guint8 size) +static unsigned unquantize_gsize(uint8_t size) { - gint E, i; + int E, i; double rval; E = size & 0x7; @@ -723,12 +723,12 @@ static guint unquantize_gsize(guint8 size) rval *= 10; } - return (guint)(rval + 0.5); + return (unsigned)(rval + 0.5); } -static guint unquantize_rate(guint16 rate) +static unsigned unquantize_rate(uint16_t rate) { - gint E, i; + int E, i; double rval; E = rate & 0xF; @@ -737,10 +737,10 @@ static guint unquantize_rate(guint16 rate) rval *= 10; } - return (guint)rval; + return (unsigned)rval; } -static nstime_t usec_to_nstime(guint64 t) +static nstime_t usec_to_nstime(uint64_t t) { nstime_t result; result.secs = t / 1000000; @@ -752,7 +752,7 @@ static int dissect_uftp_rsablob(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre { proto_item *ti = NULL; proto_tree *rsablob_tree = NULL; - gint offset = 0, modlen; + int offset = 0, modlen; if (tvb_reported_length(tvb) < RSA_BLOB_LEN) { proto_tree_add_expert_format(tree, pinfo, &ei_uftp_length_invalid, tvb, offset, -1, @@ -760,8 +760,8 @@ static int dissect_uftp_rsablob(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre return 0; } - modlen = (gint)tvb_get_ntohs(tvb, 2); - if ((gint)tvb_reported_length(tvb) < modlen + RSA_BLOB_LEN) { + modlen = (int)tvb_get_ntohs(tvb, 2); + if ((int)tvb_reported_length(tvb) < modlen + RSA_BLOB_LEN) { proto_tree_add_expert_format(tree, pinfo, &ei_uftp_length_invalid, tvb, offset, -1, "Invalid length, len = %d", tvb_reported_length(tvb)); return 0; @@ -786,7 +786,7 @@ static int dissect_uftp_ecblob(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree { proto_item *ti = NULL; proto_tree *ecblob_tree = NULL; - gint offset = 0, keylen; + int offset = 0, keylen; if (tvb_reported_length(tvb) < EC_BLOB_LEN) { proto_tree_add_expert_format(tree, pinfo, &ei_uftp_length_invalid, tvb, offset, -1, @@ -794,8 +794,8 @@ static int dissect_uftp_ecblob(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree return 0; } - keylen = (gint)tvb_get_ntohs(tvb, 2); - if ((gint)tvb_reported_length(tvb) < keylen + EC_BLOB_LEN) { + keylen = (int)tvb_get_ntohs(tvb, 2); + if ((int)tvb_reported_length(tvb) < keylen + EC_BLOB_LEN) { proto_tree_add_expert_format(tree, pinfo, &ei_uftp_length_invalid, tvb, offset, -1, "Invalid length, len = %d", tvb_reported_length(tvb)); return 0; @@ -814,12 +814,12 @@ static int dissect_uftp_ecblob(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree return EC_BLOB_LEN + keylen; } -static gint dissect_uftp_encinfo(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) +static int dissect_uftp_encinfo(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) { proto_item *ti = NULL; proto_tree *encinfo_tree = NULL; - gint offset = 0, hlen, keylen, dhlen, siglen; - gint8 blobtype; + int offset = 0, hlen, keylen, dhlen, siglen; + int8_t blobtype; tvbuff_t *next_tvb; if (tvb_reported_length(tvb) < ENC_INFO_LEN) { @@ -828,11 +828,11 @@ static gint dissect_uftp_encinfo(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tr return 0; } - hlen = (gint)tvb_get_guint8(tvb, 1) * 4; - keylen = (gint)tvb_get_ntohs(tvb, 6); - dhlen = (gint)tvb_get_ntohs(tvb, 8); - siglen = (gint)tvb_get_ntohs(tvb, 10); - if (((gint)tvb_reported_length(tvb) < hlen) || + hlen = (int)tvb_get_uint8(tvb, 1) * 4; + keylen = (int)tvb_get_ntohs(tvb, 6); + dhlen = (int)tvb_get_ntohs(tvb, 8); + siglen = (int)tvb_get_ntohs(tvb, 10); + if (((int)tvb_reported_length(tvb) < hlen) || (hlen < ENC_INFO_LEN + keylen + dhlen + siglen)) { proto_tree_add_expert_format(tree, pinfo, &ei_uftp_length_invalid, tvb, offset, -1, "Invalid length, len = %d, hlen = %d, " @@ -864,10 +864,10 @@ static gint dissect_uftp_encinfo(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tr proto_tree_add_item(encinfo_tree, hf_uftp_encinfo_rand1, tvb, offset, RAND_LEN, ENC_NA); offset += RAND_LEN; if (keylen > 0) { - gint parsed = 0; + int parsed = 0; next_tvb = tvb_new_subset_length(tvb, offset, keylen); - blobtype = tvb_get_guint8(tvb, offset); + blobtype = tvb_get_uint8(tvb, offset); switch (blobtype) { case KEYBLOB_RSA: parsed = dissect_uftp_rsablob(next_tvb, pinfo, encinfo_tree, hf_uftp_encinfo_keyblob); @@ -879,10 +879,10 @@ static gint dissect_uftp_encinfo(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tr offset += parsed; } if (dhlen > 0) { - gint parsed = 0; + int parsed = 0; next_tvb = tvb_new_subset_length(tvb, offset, dhlen); - blobtype = tvb_get_guint8(tvb, offset); + blobtype = tvb_get_uint8(tvb, offset); switch (blobtype) { case KEYBLOB_RSA: parsed = dissect_uftp_rsablob(next_tvb, pinfo, encinfo_tree, hf_uftp_encinfo_dhblob); @@ -906,9 +906,9 @@ static void dissect_uftp_announce(tvbuff_t *tvb, packet_info *pinfo _U_, proto_t proto_item *destlist = NULL; proto_tree *announce_tree = NULL; proto_tree *destlist_tree = NULL; - gint offset = 0; - gint hlen, iplen, destcount, idx, extlen_total; - guint8 flags, ext_type; + int offset = 0; + int hlen, iplen, destcount, idx, extlen_total; + uint8_t flags, ext_type; nstime_t tstamp; tvbuff_t *next_tvb; @@ -918,15 +918,15 @@ static void dissect_uftp_announce(tvbuff_t *tvb, packet_info *pinfo _U_, proto_t return; } - hlen = (gint)tvb_get_guint8(tvb, 1) * 4; - if ((gint)tvb_reported_length(tvb) < hlen) { + hlen = (int)tvb_get_uint8(tvb, 1) * 4; + if ((int)tvb_reported_length(tvb) < hlen) { proto_tree_add_expert_format(tree, pinfo, &ei_uftp_length_invalid, tvb, offset, -1, "Invalid length, len = %d, hlen = %d", tvb_reported_length(tvb), hlen); return; } - flags = tvb_get_guint8(tvb, 2); + flags = tvb_get_uint8(tvb, 2); ti = proto_tree_add_item(tree, hf_uftp_announce, tvb, offset, -1, ENC_NA); announce_tree = proto_item_add_subtree(ti, ett_uftp_announce); @@ -963,10 +963,10 @@ static void dissect_uftp_announce(tvbuff_t *tvb, packet_info *pinfo _U_, proto_t extlen_total = hlen - (ANNOUNCE_LEN + ( 2 * iplen)); while (extlen_total > 0) { - gint parsed = 0; + int parsed = 0; next_tvb = tvb_new_subset_length(tvb, offset, extlen_total); - ext_type = tvb_get_guint8(tvb, offset); + ext_type = tvb_get_uint8(tvb, offset); switch (ext_type) { case EXT_ENC_INFO: parsed = dissect_uftp_encinfo(next_tvb, pinfo, announce_tree); @@ -995,8 +995,8 @@ static void dissect_uftp_register(tvbuff_t *tvb, packet_info *pinfo _U_, proto_t proto_item *destlist = NULL; proto_tree *register_tree = NULL; proto_tree *destlist_tree = NULL; - gint offset = 0, hlen; - guint16 destcount, keylen, idx; + int offset = 0, hlen; + uint16_t destcount, keylen, idx; nstime_t tstamp; if (tvb_reported_length(tvb) < REGISTER_LEN) { @@ -1005,9 +1005,9 @@ static void dissect_uftp_register(tvbuff_t *tvb, packet_info *pinfo _U_, proto_t return; } - hlen = (gint)tvb_get_guint8(tvb, 1) * 4; + hlen = (int)tvb_get_uint8(tvb, 1) * 4; keylen = tvb_get_ntohs(tvb, 2); - if (((gint)tvb_reported_length(tvb) < hlen) || (hlen < REGISTER_LEN + keylen)) { + if (((int)tvb_reported_length(tvb) < hlen) || (hlen < REGISTER_LEN + keylen)) { proto_tree_add_expert_format(tree, pinfo, &ei_uftp_length_invalid, tvb, offset, -1, "Invalid length, len = %d, hlen = %d, keylen = %d", tvb_reported_length(tvb), hlen, keylen); @@ -1047,9 +1047,9 @@ static void dissect_uftp_clientkey(tvbuff_t *tvb, packet_info *pinfo _U_, proto_ { proto_item *ti = NULL; proto_tree *clientkey_tree = NULL; - gint offset = 0, hlen; - guint16 keylen, verifylen; - gint8 blobtype; + int offset = 0, hlen; + uint16_t keylen, verifylen; + int8_t blobtype; tvbuff_t *next_tvb; if (tvb_reported_length(tvb) < CLIENT_KEY_LEN) { @@ -1058,10 +1058,10 @@ static void dissect_uftp_clientkey(tvbuff_t *tvb, packet_info *pinfo _U_, proto_ return; } - hlen = (gint)tvb_get_guint8(tvb, 1) * 4; + hlen = (int)tvb_get_uint8(tvb, 1) * 4; keylen = tvb_get_ntohs(tvb, 4); verifylen = tvb_get_ntohs(tvb, 6); - if (((gint)tvb_reported_length(tvb) < hlen) || (hlen < CLIENT_KEY_LEN + keylen + verifylen)) { + if (((int)tvb_reported_length(tvb) < hlen) || (hlen < CLIENT_KEY_LEN + keylen + verifylen)) { proto_tree_add_expert_format(tree, pinfo, &ei_uftp_length_invalid, tvb, offset, -1, "Invalid length, len = %d, hlen = %d, keylen = %d verifylen = %d", tvb_reported_length(tvb), hlen, keylen, verifylen); @@ -1081,10 +1081,10 @@ static void dissect_uftp_clientkey(tvbuff_t *tvb, packet_info *pinfo _U_, proto_ proto_tree_add_item(clientkey_tree, hf_uftp_clientkey_siglen, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; if (keylen > 0) { - gint parsed = 0; + int parsed = 0; next_tvb = tvb_new_subset_length(tvb, offset, keylen); - blobtype = tvb_get_guint8(tvb, offset); + blobtype = tvb_get_uint8(tvb, offset); switch (blobtype) { case KEYBLOB_RSA: parsed = dissect_uftp_rsablob(next_tvb, pinfo, clientkey_tree, hf_uftp_clientkey_keyblob); @@ -1106,8 +1106,8 @@ static void dissect_uftp_regconf(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tr proto_item *destlist = NULL; proto_tree *regconf_tree = NULL; proto_tree *destlist_tree = NULL; - gint offset = 0, hlen; - guint16 destcount, idx; + int offset = 0, hlen; + uint16_t destcount, idx; if (tvb_reported_length(tvb) < REG_CONF_LEN) { proto_tree_add_expert_format(tree, pinfo, &ei_uftp_length_invalid, tvb, offset, -1, @@ -1115,8 +1115,8 @@ static void dissect_uftp_regconf(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tr return; } - hlen = (gint)tvb_get_guint8(tvb, 1) * 4; - if (((gint)tvb_reported_length(tvb) < hlen) || (hlen < REG_CONF_LEN)) { + hlen = (int)tvb_get_uint8(tvb, 1) * 4; + if (((int)tvb_reported_length(tvb) < hlen) || (hlen < REG_CONF_LEN)) { proto_tree_add_expert_format(tree, pinfo, &ei_uftp_length_invalid, tvb, offset, -1, "Invalid length, len = %d, hlen = %d", tvb_reported_length(tvb), hlen); @@ -1151,8 +1151,8 @@ static void dissect_uftp_keyinfo(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tr proto_tree *keyinfo_tree = NULL; proto_tree *destlist_tree = NULL; proto_tree *destkey_tree = NULL; - gint offset = 0, hlen, siglen; - guint8 destcount, idx; + int offset = 0, hlen, siglen; + uint8_t destcount, idx; if (tvb_reported_length(tvb) < KEYINFO_LEN) { proto_tree_add_expert_format(tree, pinfo, &ei_uftp_length_invalid, tvb, offset, -1, @@ -1160,9 +1160,9 @@ static void dissect_uftp_keyinfo(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tr return; } - hlen = (gint)tvb_get_guint8(tvb, 1) * 4; - siglen = (gint)tvb_get_ntohs(tvb, 2); - if (((gint)tvb_reported_length(tvb) < hlen) || (hlen < KEYINFO_LEN + siglen)) { + hlen = (int)tvb_get_uint8(tvb, 1) * 4; + siglen = (int)tvb_get_ntohs(tvb, 2); + if (((int)tvb_reported_length(tvb) < hlen) || (hlen < KEYINFO_LEN + siglen)) { proto_tree_add_expert_format(tree, pinfo, &ei_uftp_length_invalid, tvb, offset, -1, "Invalid length, len = %d, hlen = %d, siglen = %d", tvb_reported_length(tvb), hlen, siglen); @@ -1201,7 +1201,7 @@ static void dissect_uftp_keyinfoack(tvbuff_t *tvb, packet_info *pinfo _U_, proto { proto_item *ti = NULL; proto_tree *keyinfoack_tree = NULL; - gint offset = 0, hlen, verifylen; + int offset = 0, hlen, verifylen; if (tvb_reported_length(tvb) < KEYINFO_ACK_LEN) { proto_tree_add_expert_format(tree, pinfo, &ei_uftp_length_invalid, tvb, offset, -1, @@ -1209,9 +1209,9 @@ static void dissect_uftp_keyinfoack(tvbuff_t *tvb, packet_info *pinfo _U_, proto return; } - hlen = (gint)tvb_get_guint8(tvb, 1) * 4; - verifylen = (gint)tvb_get_guint8(tvb, 2); - if (((gint)tvb_reported_length(tvb) < hlen) || (hlen < KEYINFO_ACK_LEN + verifylen)) { + hlen = (int)tvb_get_uint8(tvb, 1) * 4; + verifylen = (int)tvb_get_uint8(tvb, 2); + if (((int)tvb_reported_length(tvb) < hlen) || (hlen < KEYINFO_ACK_LEN + verifylen)) { proto_tree_add_expert_format(tree, pinfo, &ei_uftp_length_invalid, tvb, offset, -1, "Invalid length, len = %d, hlen = %d", tvb_reported_length(tvb), hlen); @@ -1235,8 +1235,8 @@ static void dissect_uftp_fileinfo(tvbuff_t *tvb, packet_info *pinfo, proto_tree proto_item *destlist = NULL; proto_tree *fileinfo_tree = NULL; proto_tree *destlist_tree = NULL; - gint offset = 0, hlen; - guint16 file_id, destcount, idx, namelen, linklen; + int offset = 0, hlen; + uint16_t file_id, destcount, idx, namelen, linklen; nstime_t ftstamp, tstamp; if (tvb_reported_length(tvb) < FILEINFO_LEN) { @@ -1245,10 +1245,10 @@ static void dissect_uftp_fileinfo(tvbuff_t *tvb, packet_info *pinfo, proto_tree return; } - hlen = (gint)tvb_get_guint8(tvb, 1) * 4; - namelen = tvb_get_guint8(tvb, 8) * 4; - linklen = tvb_get_guint8(tvb, 9) * 4; - if (((gint)tvb_reported_length(tvb) < hlen) || (hlen < FILEINFO_LEN + namelen + linklen)) { + hlen = (int)tvb_get_uint8(tvb, 1) * 4; + namelen = tvb_get_uint8(tvb, 8) * 4; + linklen = tvb_get_uint8(tvb, 9) * 4; + if (((int)tvb_reported_length(tvb) < hlen) || (hlen < FILEINFO_LEN + namelen + linklen)) { proto_tree_add_expert_format(tree, pinfo, &ei_uftp_length_invalid, tvb, offset, -1, "Invalid length, len = %d, hlen = %d, namelen = %d, linklen = %d", tvb_reported_length(tvb), hlen, namelen, linklen); @@ -1271,7 +1271,7 @@ static void dissect_uftp_fileinfo(tvbuff_t *tvb, packet_info *pinfo, proto_tree proto_tree_add_item(fileinfo_tree, hf_uftp_fileinfo_reserved, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; // high bytes of file timestamp - ftstamp.secs = (gint64)tvb_get_ntohs(tvb, offset) << 16; + ftstamp.secs = (int64_t)tvb_get_ntohs(tvb, offset) << 16; proto_tree_add_item(fileinfo_tree, hf_uftp_fileinfo_ftstamp_hi, tvb, offset, 2, ENC_BIG_ENDIAN); offset +=2; proto_tree_add_item(fileinfo_tree, hf_uftp_fileinfo_namelen, tvb, offset, 1, ENC_BIG_ENDIAN); @@ -1312,8 +1312,8 @@ static void dissect_uftp_fileinfoack(tvbuff_t *tvb, packet_info *pinfo, proto_tr proto_item *destlist = NULL; proto_tree *fileinfoack_tree = NULL; proto_tree *destlist_tree = NULL; - gint offset = 0, hlen; - guint16 file_id, destcount, idx; + int offset = 0, hlen; + uint16_t file_id, destcount, idx; nstime_t tstamp; if (tvb_reported_length(tvb) < FILEINFO_ACK_LEN) { @@ -1322,8 +1322,8 @@ static void dissect_uftp_fileinfoack(tvbuff_t *tvb, packet_info *pinfo, proto_tr return; } - hlen = (gint)tvb_get_guint8(tvb, 1) * 4; - if (((gint)tvb_reported_length(tvb) < hlen) || (hlen < FILEINFO_ACK_LEN)) { + hlen = (int)tvb_get_uint8(tvb, 1) * 4; + if (((int)tvb_reported_length(tvb) < hlen) || (hlen < FILEINFO_ACK_LEN)) { proto_tree_add_expert_format(tree, pinfo, &ei_uftp_length_invalid, tvb, offset, -1, "Invalid length, len = %d, hlen = %d", tvb_reported_length(tvb), hlen); @@ -1362,12 +1362,12 @@ static void dissect_uftp_fileinfoack(tvbuff_t *tvb, packet_info *pinfo, proto_tr } } -static gint dissect_uftp_tfmccdata(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) +static int dissect_uftp_tfmccdata(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) { proto_item *ti = NULL; proto_tree *tfmccdata_tree = NULL; - gint offset = 0, hlen; - guint rate, srate; + int offset = 0, hlen; + unsigned rate, srate; if (tvb_reported_length(tvb) < TFMCC_DATA_LEN) { proto_tree_add_expert_format(tree, pinfo, &ei_uftp_length_invalid, tvb, offset, -1, @@ -1375,8 +1375,8 @@ static gint dissect_uftp_tfmccdata(tvbuff_t *tvb, packet_info *pinfo _U_, proto_ return 0; } - hlen = (gint)tvb_get_guint8(tvb, 1) * 4; - if (((gint)tvb_reported_length(tvb) < hlen) || (hlen < TFMCC_DATA_LEN)) { + hlen = (int)tvb_get_uint8(tvb, 1) * 4; + if (((int)tvb_reported_length(tvb) < hlen) || (hlen < TFMCC_DATA_LEN)) { proto_tree_add_expert_format(tree, pinfo, &ei_uftp_length_invalid, tvb, offset, -1, "Invalid length, len = %d, hlen = %d", tvb_reported_length(tvb), hlen); @@ -1405,9 +1405,9 @@ static void dissect_uftp_fileseg(tvbuff_t *tvb, packet_info *pinfo, proto_tree * { proto_item *ti = NULL; proto_tree *fileseg_tree = NULL; - gint offset = 0, hlen, extlen_total; - guint16 file_id, section, sec_block; - guint8 ext_type; + int offset = 0, hlen, extlen_total; + uint16_t file_id, section, sec_block; + uint8_t ext_type; tvbuff_t *next_tvb; if (tvb_reported_length(tvb) < FILESEG_LEN) { @@ -1416,8 +1416,8 @@ static void dissect_uftp_fileseg(tvbuff_t *tvb, packet_info *pinfo, proto_tree * return; } - hlen = (gint)tvb_get_guint8(tvb, 1) * 4; - if (((gint)tvb_reported_length(tvb) < hlen) || (hlen < FILESEG_LEN)) { + hlen = (int)tvb_get_uint8(tvb, 1) * 4; + if (((int)tvb_reported_length(tvb) < hlen) || (hlen < FILESEG_LEN)) { proto_tree_add_expert_format(tree, pinfo, &ei_uftp_length_invalid, tvb, offset, -1, "Invalid length, len = %d, hlen = %d", tvb_reported_length(tvb), hlen); @@ -1445,10 +1445,10 @@ static void dissect_uftp_fileseg(tvbuff_t *tvb, packet_info *pinfo, proto_tree * extlen_total = hlen - FILESEG_LEN; while (extlen_total > 0) { - gint parsed = 0; + int parsed = 0; next_tvb = tvb_new_subset_length(tvb, offset, extlen_total); - ext_type = tvb_get_guint8(tvb, offset); + ext_type = tvb_get_uint8(tvb, offset); switch (ext_type) { case EXT_TFMCC_DATA_INFO: parsed = dissect_uftp_tfmccdata(next_tvb, pinfo, fileseg_tree); @@ -1469,8 +1469,8 @@ static void dissect_uftp_done(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre proto_item *destlist = NULL; proto_tree *done_tree = NULL; proto_tree *destlist_tree = NULL; - gint offset = 0, hlen; - guint16 file_id, section, destcount, idx; + int offset = 0, hlen; + uint16_t file_id, section, destcount, idx; if (tvb_reported_length(tvb) < DONE_LEN) { proto_tree_add_expert_format(tree, pinfo, &ei_uftp_length_invalid, tvb, offset, -1, @@ -1478,8 +1478,8 @@ static void dissect_uftp_done(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre return; } - hlen = (gint)tvb_get_guint8(tvb, 1) * 4; - if (((gint)tvb_reported_length(tvb) < hlen) || (hlen < DONE_LEN)) { + hlen = (int)tvb_get_uint8(tvb, 1) * 4; + if (((int)tvb_reported_length(tvb) < hlen) || (hlen < DONE_LEN)) { proto_tree_add_expert_format(tree, pinfo, &ei_uftp_length_invalid, tvb, offset, -1, "Invalid length, len = %d, hlen = %d", tvb_reported_length(tvb), hlen); @@ -1517,12 +1517,12 @@ static void dissect_uftp_done(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre } } -static gint dissect_uftp_tfmccack(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) +static int dissect_uftp_tfmccack(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) { proto_item *ti = NULL; proto_tree *tfmccack_tree = NULL; - gint offset = 0, hlen; - guint rate; + int offset = 0, hlen; + unsigned rate; nstime_t tstamp; if (tvb_reported_length(tvb) < TFMCC_ACK_LEN) { @@ -1531,8 +1531,8 @@ static gint dissect_uftp_tfmccack(tvbuff_t *tvb, packet_info *pinfo _U_, proto_t return 0; } - hlen = (gint)tvb_get_guint8(tvb, 1) * 4; - if (((gint)tvb_reported_length(tvb) < hlen) || (hlen < TFMCC_ACK_LEN)) { + hlen = (int)tvb_get_uint8(tvb, 1) * 4; + if (((int)tvb_reported_length(tvb) < hlen) || (hlen < TFMCC_ACK_LEN)) { proto_tree_add_expert_format(tree, pinfo, &ei_uftp_length_invalid, tvb, offset, -1, "Invalid length, len = %d, hlen = %d", tvb_reported_length(tvb), hlen); @@ -1567,9 +1567,9 @@ static void dissect_uftp_status(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t { proto_item *ti = NULL; proto_tree *status_tree = NULL; - gint offset = 0, hlen, extlen_total; - guint16 file_id, section; - guint8 ext_type; + int offset = 0, hlen, extlen_total; + uint16_t file_id, section; + uint8_t ext_type; tvbuff_t *next_tvb; if (tvb_reported_length(tvb) < STATUS_LEN) { @@ -1578,8 +1578,8 @@ static void dissect_uftp_status(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t return; } - hlen = (gint)tvb_get_guint8(tvb, 1) * 4; - if (((gint)tvb_reported_length(tvb) < hlen) || (hlen < STATUS_LEN)) { + hlen = (int)tvb_get_uint8(tvb, 1) * 4; + if (((int)tvb_reported_length(tvb) < hlen) || (hlen < STATUS_LEN)) { proto_tree_add_expert_format(tree, pinfo, &ei_uftp_length_invalid, tvb, offset, -1, "Invalid length, len = %d, hlen = %d", tvb_reported_length(tvb), hlen); @@ -1606,10 +1606,10 @@ static void dissect_uftp_status(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t extlen_total = hlen - STATUS_LEN; while (extlen_total > 0) { - gint parsed = 0; + int parsed = 0; next_tvb = tvb_new_subset_length(tvb, offset, extlen_total); - ext_type = tvb_get_guint8(tvb, offset); + ext_type = tvb_get_uint8(tvb, offset); switch (ext_type) { case EXT_TFMCC_ACK_INFO: parsed = dissect_uftp_tfmccack(next_tvb, pinfo, status_tree); @@ -1624,11 +1624,11 @@ static void dissect_uftp_status(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t proto_tree_add_item(status_tree, hf_uftp_status_naks, tvb, offset, -1, ENC_NA); } -static gint dissect_uftp_freespace(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) +static int dissect_uftp_freespace(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) { proto_item *ti = NULL; proto_tree *freespace_tree = NULL; - gint offset = 0, hlen; + int offset = 0, hlen; if (tvb_reported_length(tvb) < FREESPACE_LEN) { proto_tree_add_expert_format(tree, pinfo, &ei_uftp_length_invalid, tvb, offset, -1, @@ -1636,8 +1636,8 @@ static gint dissect_uftp_freespace(tvbuff_t *tvb, packet_info *pinfo _U_, proto_ return 0; } - hlen = (gint)tvb_get_guint8(tvb, 1) * 4; - if (((gint)tvb_reported_length(tvb) < hlen) || (hlen < FREESPACE_LEN)) { + hlen = (int)tvb_get_uint8(tvb, 1) * 4; + if (((int)tvb_reported_length(tvb) < hlen) || (hlen < FREESPACE_LEN)) { proto_tree_add_expert_format(tree, pinfo, &ei_uftp_length_invalid, tvb, offset, -1, "Invalid length, len = %d, hlen = %d", tvb_reported_length(tvb), hlen); @@ -1663,9 +1663,9 @@ static void dissect_uftp_complete(tvbuff_t *tvb, packet_info *pinfo, proto_tree proto_item *destlist = NULL; proto_tree *complete_tree = NULL; proto_tree *destlist_tree = NULL; - gint offset = 0, hlen, extlen_total; - guint16 file_id, destcount, idx; - guint8 ext_type; + int offset = 0, hlen, extlen_total; + uint16_t file_id, destcount, idx; + uint8_t ext_type; tvbuff_t *next_tvb; if (tvb_reported_length(tvb) < COMPLETE_LEN) { @@ -1674,8 +1674,8 @@ static void dissect_uftp_complete(tvbuff_t *tvb, packet_info *pinfo, proto_tree return; } - hlen = (gint)tvb_get_guint8(tvb, 1) * 4; - if (((gint)tvb_reported_length(tvb) < hlen) || (hlen < COMPLETE_LEN)) { + hlen = (int)tvb_get_uint8(tvb, 1) * 4; + if (((int)tvb_reported_length(tvb) < hlen) || (hlen < COMPLETE_LEN)) { proto_tree_add_expert_format(tree, pinfo, &ei_uftp_length_invalid, tvb, offset, -1, "Invalid length, len = %d, hlen = %d", tvb_reported_length(tvb), hlen); @@ -1702,10 +1702,10 @@ static void dissect_uftp_complete(tvbuff_t *tvb, packet_info *pinfo, proto_tree extlen_total = hlen - COMPLETE_LEN; while (extlen_total > 0) { - gint parsed = 0; + int parsed = 0; next_tvb = tvb_new_subset_length(tvb, offset, extlen_total); - ext_type = tvb_get_guint8(tvb, offset); + ext_type = tvb_get_uint8(tvb, offset); switch (ext_type) { case EXT_FREESPACE_INFO: parsed = dissect_uftp_freespace(next_tvb, pinfo, complete_tree); @@ -1734,8 +1734,8 @@ static void dissect_uftp_doneconf(tvbuff_t *tvb, packet_info *pinfo _U_, proto_t proto_item *destlist = NULL; proto_tree *doneconf_tree = NULL; proto_tree *destlist_tree = NULL; - gint offset = 0, hlen; - guint16 destcount, idx; + int offset = 0, hlen; + uint16_t destcount, idx; if (tvb_reported_length(tvb) < DONE_CONF_LEN) { proto_tree_add_expert_format(tree, pinfo, &ei_uftp_length_invalid, tvb, offset, -1, @@ -1743,8 +1743,8 @@ static void dissect_uftp_doneconf(tvbuff_t *tvb, packet_info *pinfo _U_, proto_t return; } - hlen = (gint)tvb_get_guint8(tvb, 1) * 4; - if (((gint)tvb_reported_length(tvb) < hlen) || (hlen < DONE_CONF_LEN)) { + hlen = (int)tvb_get_uint8(tvb, 1) * 4; + if (((int)tvb_reported_length(tvb) < hlen) || (hlen < DONE_CONF_LEN)) { proto_tree_add_expert_format(tree, pinfo, &ei_uftp_length_invalid, tvb, offset, -1, "Invalid length, len = %d, hlen = %d", tvb_reported_length(tvb), hlen); @@ -1775,9 +1775,9 @@ static void dissect_uftp_hbreq(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree { proto_item *ti = NULL; proto_tree *hbreq_tree = NULL; - gint offset = 0, hlen; - guint16 keylen, siglen; - gint8 blobtype; + int offset = 0, hlen; + uint16_t keylen, siglen; + int8_t blobtype; tvbuff_t *next_tvb; if (tvb_reported_length(tvb) < HB_REQ_LEN) { @@ -1786,10 +1786,10 @@ static void dissect_uftp_hbreq(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree return; } - hlen = (gint)tvb_get_guint8(tvb, 1) * 4; + hlen = (int)tvb_get_uint8(tvb, 1) * 4; keylen = tvb_get_ntohs(tvb, 4); siglen = tvb_get_ntohs(tvb, 6); - if (((gint)tvb_reported_length(tvb) < hlen) || (hlen < HB_REQ_LEN + keylen + siglen)) { + if (((int)tvb_reported_length(tvb) < hlen) || (hlen < HB_REQ_LEN + keylen + siglen)) { proto_tree_add_expert_format(tree, pinfo, &ei_uftp_length_invalid, tvb, offset, -1, "Invalid length, len = %d, hlen = %d, keylen=%d siglen=%d", tvb_reported_length(tvb), hlen, keylen, siglen); @@ -1811,10 +1811,10 @@ static void dissect_uftp_hbreq(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree proto_tree_add_item(hbreq_tree, hf_uftp_hbreq_nonce, tvb, offset, 4, ENC_BIG_ENDIAN); offset += 4; if (keylen > 0) { - gint parsed = 0; + int parsed = 0; next_tvb = tvb_new_subset_length(tvb, offset, keylen); - blobtype = tvb_get_guint8(tvb, offset); + blobtype = tvb_get_uint8(tvb, offset); switch (blobtype) { case KEYBLOB_RSA: parsed = dissect_uftp_rsablob(next_tvb, pinfo, hbreq_tree, hf_uftp_hbreq_keyblob); @@ -1834,7 +1834,7 @@ static void dissect_uftp_hbresp(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre { proto_item *ti = NULL; proto_tree *hbresp_tree = NULL; - gint offset = 0, hlen; + int offset = 0, hlen; if (tvb_reported_length(tvb) < HB_RESP_LEN) { proto_tree_add_expert_format(tree, pinfo, &ei_uftp_length_invalid, tvb, offset, -1, @@ -1842,8 +1842,8 @@ static void dissect_uftp_hbresp(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre return; } - hlen = (gint)tvb_get_guint8(tvb, 1) * 4; - if (((gint)tvb_reported_length(tvb) < hlen) || (hlen < HB_RESP_LEN)) { + hlen = (int)tvb_get_uint8(tvb, 1) * 4; + if (((int)tvb_reported_length(tvb) < hlen) || (hlen < HB_RESP_LEN)) { proto_tree_add_expert_format(tree, pinfo, &ei_uftp_length_invalid, tvb, offset, -1, "Invalid length, len = %d, hlen = %d", tvb_reported_length(tvb), hlen); @@ -1867,9 +1867,9 @@ static void dissect_uftp_proxykey(tvbuff_t *tvb, packet_info *pinfo _U_, proto_t { proto_item *ti = NULL; proto_tree *proxykey_tree = NULL; - gint offset = 0, hlen; - guint16 keylen, dhlen, siglen; - gint8 blobtype; + int offset = 0, hlen; + uint16_t keylen, dhlen, siglen; + int8_t blobtype; tvbuff_t *next_tvb; if (tvb_reported_length(tvb) < PROXY_KEY_LEN) { @@ -1878,11 +1878,11 @@ static void dissect_uftp_proxykey(tvbuff_t *tvb, packet_info *pinfo _U_, proto_t return; } - hlen = (gint)tvb_get_guint8(tvb, 1) * 4; + hlen = (int)tvb_get_uint8(tvb, 1) * 4; keylen = tvb_get_ntohs(tvb, 2); dhlen = tvb_get_ntohs(tvb, 4); siglen = tvb_get_ntohs(tvb, 6); - if (((gint)tvb_reported_length(tvb) < hlen) || + if (((int)tvb_reported_length(tvb) < hlen) || (hlen < PROXY_KEY_LEN + keylen + dhlen + siglen)) { proto_tree_add_expert_format(tree, pinfo, &ei_uftp_length_invalid, tvb, offset, -1, "Invalid length, len = %d, hlen = %d, keylen=%d, dhlen=%d, siglen=%d", @@ -1903,10 +1903,10 @@ static void dissect_uftp_proxykey(tvbuff_t *tvb, packet_info *pinfo _U_, proto_t proto_tree_add_item(proxykey_tree, hf_uftp_proxykey_siglen, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; if (keylen > 0) { - gint parsed = 0; + int parsed = 0; next_tvb = tvb_new_subset_length(tvb, offset, keylen); - blobtype = tvb_get_guint8(tvb, offset); + blobtype = tvb_get_uint8(tvb, offset); switch (blobtype) { case KEYBLOB_RSA: parsed = dissect_uftp_rsablob(next_tvb, pinfo, proxykey_tree, hf_uftp_proxykey_keyblob); @@ -1918,10 +1918,10 @@ static void dissect_uftp_proxykey(tvbuff_t *tvb, packet_info *pinfo _U_, proto_t offset += parsed; } if (dhlen > 0) { - gint parsed = 0; + int parsed = 0; next_tvb = tvb_new_subset_length(tvb, offset, dhlen); - blobtype = tvb_get_guint8(tvb, offset); + blobtype = tvb_get_uint8(tvb, offset); switch (blobtype) { case KEYBLOB_RSA: parsed = dissect_uftp_rsablob(next_tvb, pinfo, proxykey_tree, hf_uftp_proxykey_dhblob); @@ -1945,9 +1945,9 @@ static void dissect_uftp_congctrl(tvbuff_t *tvb, packet_info *pinfo _U_, proto_t proto_tree *congctrl_tree = NULL; proto_tree *cclist_tree = NULL; proto_tree *ccitem_tree = NULL; - gint offset = 0, hlen; - guint rate; - guint8 itemcount, idx; + int offset = 0, hlen; + unsigned rate; + uint8_t itemcount, idx; nstime_t tstamp; if (tvb_reported_length(tvb) < CONG_CTRL_LEN) { @@ -1956,8 +1956,8 @@ static void dissect_uftp_congctrl(tvbuff_t *tvb, packet_info *pinfo _U_, proto_t return; } - hlen = (gint)tvb_get_guint8(tvb, 1) * 4; - if (((gint)tvb_reported_length(tvb) < hlen) || (hlen < CONG_CTRL_LEN)) { + hlen = (int)tvb_get_uint8(tvb, 1) * 4; + if (((int)tvb_reported_length(tvb) < hlen) || (hlen < CONG_CTRL_LEN)) { proto_tree_add_expert_format(tree, pinfo, &ei_uftp_length_invalid, tvb, offset, -1, "Invalid length, len = %d, hlen = %d", tvb_reported_length(tvb), hlen); @@ -1988,9 +1988,9 @@ static void dissect_uftp_congctrl(tvbuff_t *tvb, packet_info *pinfo _U_, proto_t cclist_tree = proto_item_add_subtree(cclist, ett_uftp_congctrl_cclist); } for (idx = 0; idx < itemcount; idx++) { - guint itemrate; + unsigned itemrate; double itemrtt; - itemrtt = unquantize_grtt(tvb_get_guint8(tvb, offset + 5)); + itemrtt = unquantize_grtt(tvb_get_uint8(tvb, offset + 5)); itemrate = unquantize_rate(tvb_get_ntohs(tvb, offset + 6)); ccitem = proto_tree_add_item(cclist_tree, hf_uftp_congctrl_item, tvb, offset, CC_ITEM_LEN, ENC_NA); @@ -2010,8 +2010,8 @@ static void dissect_uftp_ccack(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree { proto_item *ti = NULL; proto_tree *ccack_tree = NULL; - gint offset = 0, hlen, extlen_total; - guint8 ext_type; + int offset = 0, hlen, extlen_total; + uint8_t ext_type; tvbuff_t *next_tvb; if (tvb_reported_length(tvb) < CC_ACK_LEN) { @@ -2020,8 +2020,8 @@ static void dissect_uftp_ccack(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree return; } - hlen = (gint)tvb_get_guint8(tvb, 1) * 4; - if (((gint)tvb_reported_length(tvb) < hlen) || (hlen < CC_ACK_LEN)) { + hlen = (int)tvb_get_uint8(tvb, 1) * 4; + if (((int)tvb_reported_length(tvb) < hlen) || (hlen < CC_ACK_LEN)) { proto_tree_add_expert_format(tree, pinfo, &ei_uftp_length_invalid, tvb, offset, -1, "Invalid length, len = %d, hlen = %d", tvb_reported_length(tvb), hlen); @@ -2039,10 +2039,10 @@ static void dissect_uftp_ccack(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree extlen_total = hlen - CC_ACK_LEN; while (extlen_total > 0) { - gint parsed = 0; + int parsed = 0; next_tvb = tvb_new_subset_length(tvb, offset, extlen_total); - ext_type = tvb_get_guint8(tvb, offset); + ext_type = tvb_get_uint8(tvb, offset); switch (ext_type) { case EXT_TFMCC_ACK_INFO: parsed = dissect_uftp_tfmccack(next_tvb, pinfo, ccack_tree); @@ -2058,8 +2058,8 @@ static void dissect_uftp_encrypted(tvbuff_t *tvb, packet_info *pinfo _U_, proto_ { proto_item *ti = NULL; proto_tree *encrypted_tree = NULL; - gint offset = 0; - guint16 payload_len; + int offset = 0; + uint16_t payload_len; if (tvb_reported_length(tvb) < ENCRYPTED_LEN) { proto_tree_add_expert_format(tree, pinfo, &ei_uftp_length_invalid, tvb, offset, -1, @@ -2068,7 +2068,7 @@ static void dissect_uftp_encrypted(tvbuff_t *tvb, packet_info *pinfo _U_, proto_ } payload_len = tvb_get_ntohs(tvb, 10); - if ((gint)tvb_reported_length(tvb) < ENCRYPTED_LEN + payload_len) { + if ((int)tvb_reported_length(tvb) < ENCRYPTED_LEN + payload_len) { proto_tree_add_expert_format(tree, pinfo, &ei_uftp_length_invalid, tvb, offset, -1, "Invalid length, len = %d, payload=%d", tvb_reported_length(tvb), payload_len); @@ -2090,7 +2090,7 @@ static void dissect_uftp_abort(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree { proto_item *ti = NULL; proto_tree *abort_tree = NULL; - gint offset = 0, hlen; + int offset = 0, hlen; if (tvb_reported_length(tvb) < ABORT_LEN) { proto_tree_add_expert_format(tree, pinfo, &ei_uftp_length_invalid, tvb, offset, -1, @@ -2098,8 +2098,8 @@ static void dissect_uftp_abort(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree return; } - hlen = (gint)tvb_get_guint8(tvb, 1) * 4; - if (((gint)tvb_reported_length(tvb) < hlen) || (hlen < ABORT_LEN)) { + hlen = (int)tvb_get_uint8(tvb, 1) * 4; + if (((int)tvb_reported_length(tvb) < hlen) || (hlen < ABORT_LEN)) { proto_tree_add_expert_format(tree, pinfo, &ei_uftp_length_invalid, tvb, offset, -1, "Invalid length, len = %d, hlen = %d", tvb_reported_length(tvb), hlen); @@ -2123,22 +2123,22 @@ static void dissect_uftp_abort(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree static int dissect_uftp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { - guint8 version; - guint8 mes_type; - guint32 group_id; + uint8_t version; + uint8_t mes_type; + uint32_t group_id; tvbuff_t *next_tvb; proto_item *ti = NULL; proto_tree *uftp_tree = NULL; - gint offset = 0; - guint l_gsize; + int offset = 0; + unsigned l_gsize; double grtt; if (tvb_reported_length(tvb) < UFTP_LEN + 4) { return 0; } - version = tvb_get_guint8(tvb, 0); - mes_type = tvb_get_guint8(tvb, 1); + version = tvb_get_uint8(tvb, 0); + mes_type = tvb_get_uint8(tvb, 1); group_id = tvb_get_ntohl(tvb, 8); if (version != UFTP_VER_NUM) { @@ -2154,8 +2154,8 @@ static int dissect_uftp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi col_append_fstr(pinfo->cinfo, COL_INFO, " ID=%08X", group_id); } - grtt = unquantize_grtt(tvb_get_guint8(tvb, 13)); - l_gsize = unquantize_gsize(tvb_get_guint8(tvb, 14)); + grtt = unquantize_grtt(tvb_get_uint8(tvb, 13)); + l_gsize = unquantize_gsize(tvb_get_uint8(tvb, 14)); ti = proto_tree_add_item(tree, proto_uftp, tvb, 0, -1, ENC_NA); uftp_tree = proto_item_add_subtree(ti, ett_uftp); @@ -3152,7 +3152,7 @@ void proto_register_uftp5(void) }; /* Setup protocol subtree array */ - static gint *ett[] = { + static int *ett[] = { &ett_uftp, &ett_uftp_announce, &ett_uftp_encinfo, |