diff options
author | Dario Lombardo <lomato@gmail.com> | 2014-06-17 17:45:00 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2014-06-18 14:14:58 +0000 |
commit | 246fe2ca4c67d8c98caa84e2f57694f6322e2f96 (patch) | |
tree | 5f8651517a3423cce11c50e18371d8a73c3c7665 /epan/dissectors/packet-snmp.c | |
parent | 971ffd683ea23362bd8009567ff7860371e6e2cc (diff) |
Fixup: tvb_* -> tvb_captured
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f
Reviewed-on: https://code.wireshark.org/review/2377
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-snmp.c')
-rw-r--r-- | epan/dissectors/packet-snmp.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/epan/dissectors/packet-snmp.c b/epan/dissectors/packet-snmp.c index d8f6f14f77..8b2d6bc2c1 100644 --- a/epan/dissectors/packet-snmp.c +++ b/epan/dissectors/packet-snmp.c @@ -459,7 +459,7 @@ dissect_snmp_variable_string(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree * proto_tree_add_item(tree, hf_snmp_var_bind_str, tvb, 0, -1, ENC_ASCII|ENC_NA); - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* @@ -1614,8 +1614,8 @@ get_user_assoc(tvbuff_t* engine_tvb, tvbuff_t* user_tvb) if (! ( user_tvb && engine_tvb ) ) return NULL; - given_username_len = tvb_length(user_tvb); - given_engine_len = tvb_length(engine_tvb); + given_username_len = tvb_captured_length(user_tvb); + given_engine_len = tvb_captured_length(engine_tvb); if (! ( given_engine_len && given_username_len ) ) return NULL; given_username = (guint8*)tvb_memdup(wmem_packet_scope(),user_tvb,0,-1); given_engine = (guint8*)tvb_memdup(wmem_packet_scope(),engine_tvb,0,-1); @@ -1665,14 +1665,14 @@ snmp_usm_auth_md5(snmp_usm_params_t* p, guint8** calc_auth_p, guint* calc_auth_l } - auth_len = tvb_length_remaining(p->auth_tvb,0); + auth_len = tvb_captured_length_remaining(p->auth_tvb,0); if (auth_len != 12) { *error = "Authenticator length wrong"; return FALSE; } - msg_len = tvb_length_remaining(p->msg_tvb,0); + msg_len = tvb_captured_length_remaining(p->msg_tvb,0); if (msg_len <= 0) { *error = "Not enough data remaining"; return FALSE; @@ -1729,7 +1729,7 @@ snmp_usm_auth_sha1(snmp_usm_params_t* p _U_, guint8** calc_auth_p, guint* calc_a } - auth_len = tvb_length_remaining(p->auth_tvb,0); + auth_len = tvb_captured_length_remaining(p->auth_tvb,0); if (auth_len != 12) { @@ -1737,7 +1737,7 @@ snmp_usm_auth_sha1(snmp_usm_params_t* p _U_, guint8** calc_auth_p, guint* calc_a return FALSE; } - msg_len = tvb_length_remaining(p->msg_tvb,0); + msg_len = tvb_captured_length_remaining(p->msg_tvb,0); if (msg_len <= 0) { *error = "Not enough data remaining"; return FALSE; @@ -1783,7 +1783,7 @@ snmp_usm_priv_des(snmp_usm_params_t* p _U_, tvbuff_t* encryptedData _U_, gchar c guint i; - salt_len = tvb_length_remaining(p->priv_tvb,0); + salt_len = tvb_captured_length_remaining(p->priv_tvb,0); if (salt_len != 8) { *error = "decryptionError: msgPrivacyParameters length != 8"; @@ -1799,7 +1799,7 @@ snmp_usm_priv_des(snmp_usm_params_t* p _U_, tvbuff_t* encryptedData _U_, gchar c iv[i] = pre_iv[i] ^ salt[i]; } - cryptgrm_len = tvb_length_remaining(encryptedData,0); + cryptgrm_len = tvb_captured_length_remaining(encryptedData,0); if ((cryptgrm_len <= 0) || (cryptgrm_len % 8)) { *error = "decryptionError: the length of the encrypted data is not a mutiple of 8 octets"; @@ -1856,7 +1856,7 @@ snmp_usm_priv_aes_common(snmp_usm_params_t* p, tvbuff_t* encryptedData, gchar co guint8* cryptgrm; tvbuff_t* clear_tvb; - priv_len = tvb_length_remaining(p->priv_tvb,0); + priv_len = tvb_captured_length_remaining(p->priv_tvb,0); if (priv_len != 8) { *error = "decryptionError: msgPrivacyParameters length != 8"; @@ -1873,7 +1873,7 @@ snmp_usm_priv_aes_common(snmp_usm_params_t* p, tvbuff_t* encryptedData, gchar co iv[7] = (p->time & 0x000000ff); tvb_memcpy(p->priv_tvb,&(iv[8]),0,8); - cryptgrm_len = tvb_length_remaining(encryptedData,0); + cryptgrm_len = tvb_captured_length_remaining(encryptedData,0); if (cryptgrm_len <= 0) { *error = "Not enough data remaining"; return NULL; @@ -2483,7 +2483,7 @@ dissect_snmp_SnmpEngineID(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offs ¶m_tvb); if (param_tvb) { proto_tree* engine_tree = proto_item_add_subtree(actx->created_item,ett_engineid); - dissect_snmp_engineid(engine_tree, param_tvb, 0, tvb_length_remaining(param_tvb,0)); + dissect_snmp_engineid(engine_tree, param_tvb, 0, tvb_captured_length_remaining(param_tvb,0)); } @@ -2501,7 +2501,7 @@ dissect_snmp_T_msgAuthoritativeEngineID(gboolean implicit_tag _U_, tvbuff_t *tvb &usm_p.engine_tvb); if (usm_p.engine_tvb) { proto_tree* engine_tree = proto_item_add_subtree(actx->created_item,ett_engineid); - dissect_snmp_engineid(engine_tree, usm_p.engine_tvb, 0, tvb_length_remaining(usm_p.engine_tvb,0)); + dissect_snmp_engineid(engine_tree, usm_p.engine_tvb, 0, tvb_captured_length_remaining(usm_p.engine_tvb,0)); } |