forked from osmocom/wireshark
Fix some gcc -Wshadow warnings ....
svn path=/trunk/; revision=31559
This commit is contained in:
parent
f1d4716d18
commit
c5614625ee
|
@ -596,17 +596,17 @@ fpdu_pad_length(guint16 ulpdu_length)
|
|||
|
||||
/* returns offset for PAD */
|
||||
guint32
|
||||
pad_offset(struct tcpinfo *tcpinfo, guint32 fpdu_total_length,
|
||||
guint8 pad_length)
|
||||
pad_offset(struct tcpinfo *tcpinfo, guint32 fpdu_total_len,
|
||||
guint8 pad_len)
|
||||
{
|
||||
if ((tcpinfo->nxtseq - MPA_CRC_LEN - MPA_MARKER_LEN) % MPA_MARKER_INTERVAL
|
||||
== 0) {
|
||||
/* covers the case where a Marker resides between the padding
|
||||
* and CRC.
|
||||
*/
|
||||
return fpdu_total_length - MPA_CRC_LEN - MPA_MARKER_LEN - pad_length;
|
||||
return fpdu_total_len - MPA_CRC_LEN - MPA_MARKER_LEN - pad_len;
|
||||
} else {
|
||||
return fpdu_total_length - MPA_CRC_LEN - pad_length;
|
||||
return fpdu_total_len - MPA_CRC_LEN - pad_len;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -355,7 +355,7 @@ guint32 krb5_errorcode;
|
|||
|
||||
static dissector_handle_t krb4_handle=NULL;
|
||||
|
||||
static gboolean do_col_info;
|
||||
static gboolean gbl_do_col_info;
|
||||
|
||||
|
||||
static void
|
||||
|
@ -1907,12 +1907,12 @@ dissect_krb5_msg_type(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *a
|
|||
|
||||
offset=dissect_ber_integer(FALSE, actx, tree, tvb, offset, hf_krb_msg_type, &msgtype);
|
||||
|
||||
if (do_col_info & check_col(actx->pinfo->cinfo, COL_INFO)) {
|
||||
if (gbl_do_col_info & check_col(actx->pinfo->cinfo, COL_INFO)) {
|
||||
col_add_str(actx->pinfo->cinfo, COL_INFO,
|
||||
val_to_str(msgtype, krb5_msg_types,
|
||||
"Unknown msg type %#x"));
|
||||
}
|
||||
do_col_info=FALSE;
|
||||
gbl_do_col_info=FALSE;
|
||||
|
||||
/* append the application type to the subtree */
|
||||
proto_item_append_text(tree, " %s", val_to_str(msgtype, krb5_msg_types, "Unknown:0x%x"));
|
||||
|
@ -3696,16 +3696,16 @@ dissect_krb5_decrypt_EncKrbCredPart (proto_tree *tree, tvbuff_t *tvb, int offset
|
|||
}
|
||||
|
||||
if(plaintext){
|
||||
tvbuff_t *next_tvb;
|
||||
next_tvb = tvb_new_child_real_data(tvb, plaintext,
|
||||
tvbuff_t *child_tvb;
|
||||
child_tvb = tvb_new_child_real_data(tvb, plaintext,
|
||||
length,
|
||||
length);
|
||||
tvb_set_free_cb(next_tvb, g_free);
|
||||
tvb_set_free_cb(child_tvb, g_free);
|
||||
|
||||
/* Add the decrypted data to the data source list. */
|
||||
add_new_data_source(actx->pinfo, next_tvb, "EncKrbCredPart");
|
||||
add_new_data_source(actx->pinfo, child_tvb, "EncKrbCredPart");
|
||||
|
||||
offset=dissect_ber_old_choice(actx, tree, next_tvb, 0, kerberos_applications_choice, -1, -1, NULL);
|
||||
offset=dissect_ber_old_choice(actx, tree, child_tvb, 0, kerberos_applications_choice, -1, -1, NULL);
|
||||
}
|
||||
return offset;
|
||||
}
|
||||
|
@ -3857,17 +3857,17 @@ dissect_krb5_decrypt_enc_authorization_data(proto_tree *tree, tvbuff_t *tvb, int
|
|||
}
|
||||
|
||||
if(plaintext){
|
||||
tvbuff_t *next_tvb;
|
||||
next_tvb = tvb_new_child_real_data(tvb, plaintext,
|
||||
tvbuff_t *child_tvb;
|
||||
child_tvb = tvb_new_child_real_data(tvb, plaintext,
|
||||
length,
|
||||
length);
|
||||
tvb_set_free_cb(next_tvb, g_free);
|
||||
tvb_set_free_cb(child_tvb, g_free);
|
||||
|
||||
/* Add the decrypted data to the data source list. */
|
||||
add_new_data_source(actx->pinfo, next_tvb, "Decrypted Krb5");
|
||||
add_new_data_source(actx->pinfo, child_tvb, "Decrypted Krb5");
|
||||
|
||||
|
||||
proto_tree_add_text(tree, next_tvb, 0, length, "AtuhorizationData for TGS_REQ not implemented yet");
|
||||
proto_tree_add_text(tree, child_tvb, 0, length, "AtuhorizationData for TGS_REQ not implemented yet");
|
||||
|
||||
}
|
||||
return offset;
|
||||
|
@ -4053,17 +4053,17 @@ dissect_krb5_decrypt_authenticator_data (proto_tree *tree, tvbuff_t *tvb, int of
|
|||
}
|
||||
|
||||
if(plaintext){
|
||||
tvbuff_t *next_tvb;
|
||||
next_tvb = tvb_new_child_real_data(tvb, plaintext,
|
||||
tvbuff_t *child_tvb;
|
||||
child_tvb = tvb_new_child_real_data(tvb, plaintext,
|
||||
length,
|
||||
length);
|
||||
tvb_set_free_cb(next_tvb, g_free);
|
||||
tvb_set_free_cb(child_tvb, g_free);
|
||||
|
||||
/* Add the decrypted data to the data source list. */
|
||||
add_new_data_source(actx->pinfo, next_tvb, "Decrypted Krb5");
|
||||
add_new_data_source(actx->pinfo, child_tvb, "Decrypted Krb5");
|
||||
|
||||
|
||||
offset=dissect_ber_old_choice(actx, tree, next_tvb, 0, kerberos_applications_choice, -1, -1, NULL);
|
||||
offset=dissect_ber_old_choice(actx, tree, child_tvb, 0, kerberos_applications_choice, -1, -1, NULL);
|
||||
|
||||
}
|
||||
return offset;
|
||||
|
@ -4133,17 +4133,17 @@ dissect_krb5_decrypt_Ticket_data (proto_tree *tree, tvbuff_t *tvb, int offset, a
|
|||
* All Ticket encrypted parts use usage == 2
|
||||
*/
|
||||
if( (plaintext=decrypt_krb5_data(tree, actx->pinfo, 2, next_tvb, Ticket_etype, NULL)) ){
|
||||
tvbuff_t *next_tvb;
|
||||
next_tvb = tvb_new_child_real_data(tvb, plaintext,
|
||||
tvbuff_t *child_tvb;
|
||||
child_tvb = tvb_new_child_real_data(tvb, plaintext,
|
||||
length,
|
||||
length);
|
||||
tvb_set_free_cb(next_tvb, g_free);
|
||||
tvb_set_free_cb(child_tvb, g_free);
|
||||
|
||||
/* Add the decrypted data to the data source list. */
|
||||
add_new_data_source(actx->pinfo, next_tvb, "Decrypted Krb5");
|
||||
add_new_data_source(actx->pinfo, child_tvb, "Decrypted Krb5");
|
||||
|
||||
|
||||
offset=dissect_ber_old_choice(actx, tree, next_tvb, 0, kerberos_applications_choice, -1, -1, NULL);
|
||||
offset=dissect_ber_old_choice(actx, tree, child_tvb, 0, kerberos_applications_choice, -1, -1, NULL);
|
||||
|
||||
}
|
||||
return offset;
|
||||
|
@ -4386,17 +4386,17 @@ dissect_krb5_decrypt_KDC_REP_data (proto_tree *tree, tvbuff_t *tvb, int offset,
|
|||
}
|
||||
|
||||
if(plaintext){
|
||||
tvbuff_t *next_tvb;
|
||||
next_tvb = tvb_new_child_real_data(tvb, plaintext,
|
||||
tvbuff_t *child_tvb;
|
||||
child_tvb = tvb_new_child_real_data(tvb, plaintext,
|
||||
length,
|
||||
length);
|
||||
tvb_set_free_cb(next_tvb, g_free);
|
||||
tvb_set_free_cb(child_tvb, g_free);
|
||||
|
||||
/* Add the decrypted data to the data source list. */
|
||||
add_new_data_source(actx->pinfo, next_tvb, "Decrypted Krb5");
|
||||
add_new_data_source(actx->pinfo, child_tvb, "Decrypted Krb5");
|
||||
|
||||
|
||||
offset=dissect_ber_old_choice(actx, tree, next_tvb, 0, kerberos_applications_choice, -1, -1, NULL);
|
||||
offset=dissect_ber_old_choice(actx, tree, child_tvb, 0, kerberos_applications_choice, -1, -1, NULL);
|
||||
|
||||
}
|
||||
return offset;
|
||||
|
@ -4710,7 +4710,7 @@ dissect_kerberos_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
|
||||
saved_private_data=pinfo->private_data;
|
||||
pinfo->private_data=cb;
|
||||
do_col_info=dci;
|
||||
gbl_do_col_info=dci;
|
||||
|
||||
if (have_rm) {
|
||||
krb_rm = tvb_get_ntohl(tvb, offset);
|
||||
|
@ -4773,7 +4773,7 @@ dissect_kerberos_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
if (do_col_protocol) {
|
||||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "KRB5");
|
||||
}
|
||||
if (do_col_info) {
|
||||
if (gbl_do_col_info) {
|
||||
col_clear(pinfo->cinfo, COL_INFO);
|
||||
}
|
||||
if (tree) {
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -387,7 +387,7 @@ dissect_lapd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
int direction;
|
||||
guint16 control, checksum, checksum_calculated;
|
||||
int lapd_header_len, checksum_offset;
|
||||
guint16 address, cr, sapi, tei;
|
||||
guint16 addr, cr, sapi, tei;
|
||||
gboolean is_response = 0;
|
||||
tvbuff_t *next_tvb;
|
||||
const char *srcname = "?";
|
||||
|
@ -396,11 +396,11 @@ dissect_lapd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "LAPD");
|
||||
col_clear(pinfo->cinfo, COL_INFO);
|
||||
|
||||
address = tvb_get_ntohs(tvb, 0);
|
||||
cr = address & LAPD_CR;
|
||||
tei = (address & LAPD_TEI) >> LAPD_TEI_SHIFT;
|
||||
sapi = (address & LAPD_SAPI) >> LAPD_SAPI_SHIFT;
|
||||
lapd_header_len = 2; /* address */
|
||||
addr = tvb_get_ntohs(tvb, 0);
|
||||
cr = addr & LAPD_CR;
|
||||
tei = (addr & LAPD_TEI) >> LAPD_TEI_SHIFT;
|
||||
sapi = (addr & LAPD_SAPI) >> LAPD_SAPI_SHIFT;
|
||||
lapd_header_len = 2; /* addr */
|
||||
|
||||
if (check_col(pinfo->cinfo, COL_TEI))
|
||||
col_add_fstr(pinfo->cinfo, COL_TEI, "%u", tei);
|
||||
|
@ -475,18 +475,18 @@ dissect_lapd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
}
|
||||
|
||||
addr_ti = proto_tree_add_uint(lapd_tree, hf_lapd_address, tvb,
|
||||
0, 2, address);
|
||||
0, 2, addr);
|
||||
addr_tree = proto_item_add_subtree(addr_ti, ett_lapd_address);
|
||||
|
||||
if(global_lapd_gsm_sapis){
|
||||
proto_tree_add_uint(addr_tree, hf_lapd_gsm_sapi,tvb, 0, 1, address);
|
||||
proto_tree_add_uint(addr_tree, hf_lapd_gsm_sapi,tvb, 0, 1, addr);
|
||||
}else{
|
||||
proto_tree_add_uint(addr_tree, hf_lapd_sapi,tvb, 0, 1, address);
|
||||
proto_tree_add_uint(addr_tree, hf_lapd_sapi,tvb, 0, 1, addr);
|
||||
}
|
||||
proto_tree_add_uint(addr_tree, hf_lapd_cr, tvb, 0, 1, address);
|
||||
proto_tree_add_uint(addr_tree, hf_lapd_ea1, tvb, 0, 1, address);
|
||||
proto_tree_add_uint(addr_tree, hf_lapd_tei, tvb, 1, 1, address);
|
||||
proto_tree_add_uint(addr_tree, hf_lapd_ea2, tvb, 1, 1, address);
|
||||
proto_tree_add_uint(addr_tree, hf_lapd_cr, tvb, 0, 1, addr);
|
||||
proto_tree_add_uint(addr_tree, hf_lapd_ea1, tvb, 0, 1, addr);
|
||||
proto_tree_add_uint(addr_tree, hf_lapd_tei, tvb, 1, 1, addr);
|
||||
proto_tree_add_uint(addr_tree, hf_lapd_ea2, tvb, 1, 1, addr);
|
||||
}
|
||||
else {
|
||||
lapd_ti = NULL;
|
||||
|
|
|
@ -212,7 +212,7 @@ dissect_lapdm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
{
|
||||
proto_tree *lapdm_tree, *addr_tree, *length_tree;
|
||||
proto_item *lapdm_ti, *addr_ti, *length_ti;
|
||||
guint8 address, length, cr, sapi, len, n_s;
|
||||
guint8 addr, length, cr, sapi, len, n_s;
|
||||
int control;
|
||||
gboolean m;
|
||||
tvbuff_t *payload;
|
||||
|
@ -225,10 +225,10 @@ dissect_lapdm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "LAPDm");
|
||||
|
||||
address = tvb_get_guint8(tvb, 0);
|
||||
addr = tvb_get_guint8(tvb, 0);
|
||||
length = tvb_get_guint8(tvb, 2);
|
||||
|
||||
cr = address & LAPDM_CR;
|
||||
cr = addr & LAPDM_CR;
|
||||
if (pinfo->p2p_dir == P2P_DIR_RECV) {
|
||||
is_response = cr ? FALSE : TRUE;
|
||||
}
|
||||
|
@ -240,13 +240,13 @@ dissect_lapdm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
lapdm_ti = proto_tree_add_item(tree, proto_lapdm, tvb, 0, LAPDM_HEADER_LEN, FALSE);
|
||||
lapdm_tree = proto_item_add_subtree(lapdm_ti, ett_lapdm);
|
||||
|
||||
addr_ti = proto_tree_add_uint(lapdm_tree, hf_lapdm_address, tvb, 0, 1, address);
|
||||
addr_ti = proto_tree_add_uint(lapdm_tree, hf_lapdm_address, tvb, 0, 1, addr);
|
||||
addr_tree = proto_item_add_subtree(addr_ti, ett_lapdm_address);
|
||||
|
||||
proto_tree_add_uint(addr_tree, hf_lapdm_lpd, tvb, 0, 1, address);
|
||||
proto_tree_add_uint(addr_tree, hf_lapdm_sapi, tvb, 0, 1, address);
|
||||
proto_tree_add_uint(addr_tree, hf_lapdm_cr, tvb, 0, 1, address);
|
||||
proto_tree_add_uint(addr_tree, hf_lapdm_ea, tvb, 0, 1, address);
|
||||
proto_tree_add_uint(addr_tree, hf_lapdm_lpd, tvb, 0, 1, addr);
|
||||
proto_tree_add_uint(addr_tree, hf_lapdm_sapi, tvb, 0, 1, addr);
|
||||
proto_tree_add_uint(addr_tree, hf_lapdm_cr, tvb, 0, 1, addr);
|
||||
proto_tree_add_uint(addr_tree, hf_lapdm_ea, tvb, 0, 1, addr);
|
||||
}
|
||||
else {
|
||||
lapdm_ti = NULL;
|
||||
|
@ -267,7 +267,7 @@ dissect_lapdm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
proto_tree_add_uint(length_tree, hf_lapdm_el, tvb, 2, 1, length);
|
||||
}
|
||||
|
||||
sapi = (address & LAPDM_SAPI) >> LAPDM_SAPI_SHIFT;
|
||||
sapi = (addr & LAPDM_SAPI) >> LAPDM_SAPI_SHIFT;
|
||||
len = (length & LAPDM_LEN) >> LAPDM_LEN_SHIFT;
|
||||
n_s = (control & XDLC_N_S_MASK) >> XDLC_N_S_SHIFT;
|
||||
m = (length & LAPDM_M) >> LAPDM_M_SHIFT;
|
||||
|
|
|
@ -614,15 +614,15 @@ dissect_ldss_transfer (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
g_byte_array_free(digest_bytes, TRUE);
|
||||
}
|
||||
if (tree) {
|
||||
proto_item *ti = NULL;
|
||||
proto_item *tii = NULL;
|
||||
|
||||
ti = proto_tree_add_uint(line_tree, hf_ldss_digest_type,
|
||||
tii = proto_tree_add_uint(line_tree, hf_ldss_digest_type,
|
||||
tvb, offset, digest_type_len, transfer_info->file->digest_type);
|
||||
PROTO_ITEM_SET_GENERATED(ti);
|
||||
ti = proto_tree_add_bytes(line_tree, hf_ldss_digest,
|
||||
PROTO_ITEM_SET_GENERATED(tii);
|
||||
tii = proto_tree_add_bytes(line_tree, hf_ldss_digest,
|
||||
tvb, offset+digest_type_len, linelen-digest_type_len,
|
||||
transfer_info->file->digest);
|
||||
PROTO_ITEM_SET_GENERATED(ti);
|
||||
PROTO_ITEM_SET_GENERATED(tii);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -935,14 +935,14 @@ static void dissect_rar(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pro
|
|||
/* Backoff Indicator (BI) case */
|
||||
|
||||
guint8 reserved;
|
||||
proto_item *ti;
|
||||
proto_item *tii;
|
||||
proto_item *bi_ti;
|
||||
|
||||
/* 2 Reserved bits */
|
||||
reserved = (tvb_get_guint8(tvb, offset) & 0x30) >> 4;
|
||||
ti = proto_tree_add_item(rar_header_tree, hf_mac_lte_rar_reserved, tvb, offset, 1, FALSE);
|
||||
tii = proto_tree_add_item(rar_header_tree, hf_mac_lte_rar_reserved, tvb, offset, 1, FALSE);
|
||||
if (reserved != 0) {
|
||||
expert_add_info_format(pinfo, ti, PI_MALFORMED, PI_ERROR,
|
||||
expert_add_info_format(pinfo, tii, PI_MALFORMED, PI_ERROR,
|
||||
"RAR header Reserved bits not zero (found 0x%x)", reserved);
|
||||
}
|
||||
|
||||
|
@ -2405,10 +2405,10 @@ void dissect_mac_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
/* Can't dissect anything without it... */
|
||||
if (p_mac_lte_info == NULL) {
|
||||
proto_item *ti =
|
||||
proto_item *tii =
|
||||
proto_tree_add_text(mac_lte_tree, tvb, offset, -1,
|
||||
"Can't dissect LTE MAC frame because no per-frame info was attached!");
|
||||
PROTO_ITEM_SET_GENERATED(ti);
|
||||
PROTO_ITEM_SET_GENERATED(tii);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -390,9 +390,9 @@ static int dissect_mgcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
if (mgcp_tree)
|
||||
{
|
||||
proto_item *ti = proto_tree_add_uint(mgcp_tree, hf_mgcp_messagecount, tvb,
|
||||
proto_item *tii = proto_tree_add_uint(mgcp_tree, hf_mgcp_messagecount, tvb,
|
||||
0 ,0 , num_messages);
|
||||
PROTO_ITEM_SET_HIDDEN(ti);
|
||||
PROTO_ITEM_SET_HIDDEN(tii);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1165,7 +1165,7 @@ dissect_mmse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint8 pdut,
|
|||
if (tree) {
|
||||
guint32 fwd_count, count1, count2;
|
||||
proto_tree *subtree = NULL;
|
||||
proto_item *ti = NULL;
|
||||
proto_item *tii = NULL;
|
||||
/* 1. Forwarded-count-value := Integer-value */
|
||||
fwd_count = get_integer_value(tvb, offset + count,
|
||||
&count1);
|
||||
|
@ -1173,13 +1173,13 @@ dissect_mmse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint8 pdut,
|
|||
count2 = get_encoded_strval(tvb,
|
||||
offset + count + count1, &strval);
|
||||
/* Now render the fields */
|
||||
ti = proto_tree_add_string_format(mmse_tree,
|
||||
tii = proto_tree_add_string_format(mmse_tree,
|
||||
hf_mmse_prev_sent_by,
|
||||
tvb, offset - 1, 1 + count + length,
|
||||
strval, "%s (Forwarded-count=%u)",
|
||||
format_text(strval, strlen(strval)),
|
||||
fwd_count);
|
||||
subtree = proto_item_add_subtree(ti,
|
||||
subtree = proto_item_add_subtree(tii,
|
||||
ett_mmse_hdr_details);
|
||||
proto_tree_add_uint(subtree,
|
||||
hf_mmse_prev_sent_by_fwd_count,
|
||||
|
@ -1198,7 +1198,7 @@ dissect_mmse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint8 pdut,
|
|||
guint tval;
|
||||
nstime_t tmptime;
|
||||
proto_tree *subtree = NULL;
|
||||
proto_item *ti = NULL;
|
||||
proto_item *tii = NULL;
|
||||
/* 1. Forwarded-count-value := Integer-value */
|
||||
fwd_count = get_integer_value(tvb, offset + count,
|
||||
&count1);
|
||||
|
@ -1210,13 +1210,13 @@ dissect_mmse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint8 pdut,
|
|||
strval = abs_time_to_str(&tmptime, FALSE);
|
||||
/* Now render the fields */
|
||||
tvb_ensure_bytes_exist(tvb, offset - 1, length + count + 1);
|
||||
ti = proto_tree_add_string_format(mmse_tree,
|
||||
tii = proto_tree_add_string_format(mmse_tree,
|
||||
hf_mmse_prev_sent_date,
|
||||
tvb, offset - 1, 1 + count + length,
|
||||
strval, "%s (Forwarded-count=%u)",
|
||||
format_text(strval, strlen(strval)),
|
||||
fwd_count);
|
||||
subtree = proto_item_add_subtree(ti,
|
||||
subtree = proto_item_add_subtree(tii,
|
||||
ett_mmse_hdr_details);
|
||||
proto_tree_add_uint(subtree,
|
||||
hf_mmse_prev_sent_date_fwd_count,
|
||||
|
|
|
@ -581,26 +581,26 @@ get_mp2t_conversation_data(conversation_t *conv)
|
|||
static frame_analysis_data_t *
|
||||
init_frame_analysis_data(mp2t_analysis_data_t *mp2t_data, packet_info *pinfo)
|
||||
{
|
||||
frame_analysis_data_t *frame_data = NULL;
|
||||
frame_analysis_data_t *frame_analysis_data_p = NULL;
|
||||
|
||||
frame_data = se_alloc0(sizeof(struct frame_analysis_data));
|
||||
frame_data->ts_table =
|
||||
frame_analysis_data_p = se_alloc0(sizeof(struct frame_analysis_data));
|
||||
frame_analysis_data_p->ts_table =
|
||||
se_tree_create_non_persistent(EMEM_TREE_TYPE_RED_BLACK,
|
||||
"mp2t_frame_pid_table");
|
||||
/* Insert into mp2t tree */
|
||||
se_tree_insert32(mp2t_data->frame_table, pinfo->fd->num,
|
||||
(void *)frame_data);
|
||||
(void *)frame_analysis_data_p);
|
||||
|
||||
return frame_data;
|
||||
return frame_analysis_data_p;
|
||||
}
|
||||
|
||||
|
||||
static frame_analysis_data_t *
|
||||
get_frame_analysis_data(mp2t_analysis_data_t *mp2t_data, packet_info *pinfo)
|
||||
{
|
||||
frame_analysis_data_t *frame_data = NULL;
|
||||
frame_data = se_tree_lookup32(mp2t_data->frame_table, pinfo->fd->num);
|
||||
return frame_data;
|
||||
frame_analysis_data_t *frame_analysis_data_p = NULL;
|
||||
frame_analysis_data_p = se_tree_lookup32(mp2t_data->frame_table, pinfo->fd->num);
|
||||
return frame_analysis_data_p;
|
||||
}
|
||||
|
||||
static pid_analysis_data_t *
|
||||
|
@ -655,10 +655,10 @@ detect_cc_drops(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
|
|||
guint32 pid, gint32 cc_curr, conversation_t *conv)
|
||||
{
|
||||
gint32 cc_prev = -1;
|
||||
pid_analysis_data_t *pid_data = NULL;
|
||||
ts_analysis_data_t *ts_data = NULL;
|
||||
mp2t_analysis_data_t *mp2t_data = NULL;
|
||||
frame_analysis_data_t *frame_data = NULL;
|
||||
pid_analysis_data_t *pid_data = NULL;
|
||||
ts_analysis_data_t *ts_data = NULL;
|
||||
mp2t_analysis_data_t *mp2t_data = NULL;
|
||||
frame_analysis_data_t *frame_analysis_data_p = NULL;
|
||||
proto_item *flags_item;
|
||||
|
||||
guint32 detected_drop = 0;
|
||||
|
@ -703,9 +703,9 @@ detect_cc_drops(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
|
|||
if (detected_drop && !pinfo->fd->flags.visited) {
|
||||
|
||||
/* Lookup frame data, contains TS pid data objects */
|
||||
frame_data = get_frame_analysis_data(mp2t_data, pinfo);
|
||||
if (!frame_data)
|
||||
frame_data = init_frame_analysis_data(mp2t_data, pinfo);
|
||||
frame_analysis_data_p = get_frame_analysis_data(mp2t_data, pinfo);
|
||||
if (!frame_analysis_data_p)
|
||||
frame_analysis_data_p = init_frame_analysis_data(mp2t_data, pinfo);
|
||||
|
||||
/* Create and store a new TS frame pid_data object.
|
||||
This indicate that we have a drop
|
||||
|
@ -714,7 +714,7 @@ detect_cc_drops(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
|
|||
ts_data->cc_prev = cc_prev;
|
||||
ts_data->pid = pid;
|
||||
ts_data->skips = skips;
|
||||
se_tree_insert32(frame_data->ts_table, KEY(pid, cc_curr),
|
||||
se_tree_insert32(frame_analysis_data_p->ts_table, KEY(pid, cc_curr),
|
||||
(void *)ts_data);
|
||||
}
|
||||
|
||||
|
@ -722,11 +722,11 @@ detect_cc_drops(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
|
|||
if (pinfo->fd->flags.visited) {
|
||||
|
||||
/* Lookup frame data, contains TS pid data objects */
|
||||
frame_data = get_frame_analysis_data(mp2t_data, pinfo);
|
||||
if (!frame_data)
|
||||
frame_analysis_data_p = get_frame_analysis_data(mp2t_data, pinfo);
|
||||
if (!frame_analysis_data_p)
|
||||
return 0; /* No stored frame data -> no drops*/
|
||||
else {
|
||||
ts_data = se_tree_lookup32(frame_data->ts_table,
|
||||
ts_data = se_tree_lookup32(frame_analysis_data_p->ts_table,
|
||||
KEY(pid, cc_curr));
|
||||
|
||||
if (ts_data) {
|
||||
|
|
|
@ -311,7 +311,7 @@ dissect_mpls_echo_tlv_fec(tvbuff_t *tvb, guint offset, proto_tree *tree, int rem
|
|||
{
|
||||
proto_tree *ti = NULL, *tlv_fec_tree = NULL;
|
||||
proto_item *hidden_item;
|
||||
guint16 index = 1, nil_index = 1, type, saved_type;
|
||||
guint16 idx = 1, nil_idx = 1, type, saved_type;
|
||||
int length, nil_length, pad;
|
||||
guint32 label;
|
||||
guint8 exp, bos, ttl;
|
||||
|
@ -326,7 +326,7 @@ dissect_mpls_echo_tlv_fec(tvbuff_t *tvb, guint offset, proto_tree *tree, int rem
|
|||
|
||||
length = tvb_get_ntohs(tvb, offset + 2);
|
||||
ti = proto_tree_add_text(tree, tvb, offset, length + 4, "FEC Element %u: %s",
|
||||
index, val_to_str(type, mpls_echo_tlv_fec_names,
|
||||
idx, val_to_str(type, mpls_echo_tlv_fec_names,
|
||||
"Unknown FEC type (0x%04X)"));
|
||||
tlv_fec_tree = proto_item_add_subtree(ti, ett_mpls_echo_tlv_fec);
|
||||
if(tlv_fec_tree == NULL) return;
|
||||
|
@ -486,15 +486,15 @@ dissect_mpls_echo_tlv_fec(tvbuff_t *tvb, guint offset, proto_tree *tree, int rem
|
|||
decode_mpls_label(tvb, offset + 4, &label, &exp, &bos, &ttl);
|
||||
if (label <= LABEL_MAX_RESERVED){
|
||||
proto_tree_add_uint_format(tlv_fec_tree, hf_mpls_echo_tlv_fec_nil_label,
|
||||
tvb, offset + 4, 3, label, "Label %u: %u (%s)", nil_index, label,
|
||||
tvb, offset + 4, 3, label, "Label %u: %u (%s)", nil_idx, label,
|
||||
val_to_str(label, special_labels, "Reserved - Unknown"));
|
||||
} else {
|
||||
proto_tree_add_uint_format(tlv_fec_tree, hf_mpls_echo_tlv_fec_nil_label,
|
||||
tvb, offset + 4, 3, label, "Label %u: %u", nil_index, label);
|
||||
tvb, offset + 4, 3, label, "Label %u: %u", nil_idx, label);
|
||||
}
|
||||
nil_length -= 4;
|
||||
offset += 4;
|
||||
nil_index++;
|
||||
nil_idx++;
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -528,7 +528,7 @@ dissect_mpls_echo_tlv_fec(tvbuff_t *tvb, guint offset, proto_tree *tree, int rem
|
|||
|
||||
rem -= 4 + length;
|
||||
offset += 4 + length;
|
||||
index++;
|
||||
idx++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -540,7 +540,7 @@ static void
|
|||
dissect_mpls_echo_tlv_ds_map(tvbuff_t *tvb, guint offset, proto_tree *tree, int rem)
|
||||
{
|
||||
proto_tree *ti = NULL, *tlv_ds_map_tree = NULL;
|
||||
guint16 mplen, index = 1;
|
||||
guint16 mplen, idx = 1;
|
||||
guint32 label;
|
||||
guint8 exp, bos, proto;
|
||||
guint8 hash_type, addr_type;
|
||||
|
@ -671,7 +671,7 @@ dissect_mpls_echo_tlv_ds_map(tvbuff_t *tvb, guint offset, proto_tree *tree, int
|
|||
while (rem >= 4){
|
||||
decode_mpls_label(tvb, offset, &label, &exp, &bos, &proto);
|
||||
ti = proto_tree_add_text(tree, tvb, offset, 4, "Downstream Label Element %u",
|
||||
index);
|
||||
idx);
|
||||
tlv_ds_map_tree = proto_item_add_subtree(ti, ett_mpls_echo_tlv_ds_map);
|
||||
proto_item_append_text(ti, ", Label: %u", label);
|
||||
if (label <= LABEL_MAX_RESERVED){
|
||||
|
@ -695,7 +695,7 @@ dissect_mpls_echo_tlv_ds_map(tvbuff_t *tvb, guint offset, proto_tree *tree, int
|
|||
mpls_echo_tlv_ds_map_mp_proto, "Unknown"));
|
||||
rem -= 4;
|
||||
offset += 4;
|
||||
index++;
|
||||
idx++;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -707,7 +707,7 @@ dissect_mpls_echo_tlv_ilso(tvbuff_t *tvb, guint offset, proto_tree *tree, int re
|
|||
{
|
||||
proto_tree *ti = NULL, *tlv_ilso = NULL;
|
||||
guint8 type;
|
||||
guint16 index = 1;
|
||||
guint16 idx = 1;
|
||||
guint32 label;
|
||||
guint8 exp, bos, ttl;
|
||||
|
||||
|
@ -762,7 +762,7 @@ dissect_mpls_echo_tlv_ilso(tvbuff_t *tvb, guint offset, proto_tree *tree, int re
|
|||
while (rem >= 4){
|
||||
decode_mpls_label(tvb, offset, &label, &exp, &bos, &ttl);
|
||||
ti = proto_tree_add_text(tree, tvb, offset, 4, "Label Stack Element %u",
|
||||
index);
|
||||
idx);
|
||||
tlv_ilso = proto_item_add_subtree(ti, ett_mpls_echo_tlv_ilso);
|
||||
proto_item_append_text(ti, ", Label: %u", label);
|
||||
if (label <= LABEL_MAX_RESERVED){
|
||||
|
@ -785,7 +785,7 @@ dissect_mpls_echo_tlv_ilso(tvbuff_t *tvb, guint offset, proto_tree *tree, int re
|
|||
tvb, offset + 3, 1, FALSE);
|
||||
rem -= 4;
|
||||
offset += 4;
|
||||
index++;
|
||||
idx++;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1237,7 +1237,7 @@ dissect_mq_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
guint8 opcode;
|
||||
guint32 iSegmentLength = 0;
|
||||
guint32 iSizePayload = 0;
|
||||
gint iSizeMD = 0;
|
||||
gint iSizeMD_gbl = 0;
|
||||
gboolean bLittleEndian = FALSE;
|
||||
gboolean bPayload = FALSE;
|
||||
gboolean bEBCDIC = FALSE;
|
||||
|
@ -2006,11 +2006,11 @@ dissect_mq_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
offset += 4;
|
||||
structId = (tvb_length_remaining(tvb, offset) >= 4) ? tvb_get_ntohl(tvb, offset) : MQ_STRUCTID_NULL;
|
||||
}
|
||||
if ((iSizeMD = dissect_mq_md(tvb, mqroot_tree, bLittleEndian, offset, &tMsgProps)) != 0)
|
||||
if ((iSizeMD_gbl = dissect_mq_md(tvb, mqroot_tree, bLittleEndian, offset, &tMsgProps)) != 0)
|
||||
{
|
||||
gint iSizeGMO = 0;
|
||||
gint iSizePMO = 0;
|
||||
offset += iSizeMD;
|
||||
offset += iSizeMD_gbl;
|
||||
|
||||
if ((iSizeGMO = dissect_mq_gmo(tvb, pinfo, mqroot_tree, bLittleEndian, offset)) != 0)
|
||||
{
|
||||
|
|
|
@ -543,9 +543,8 @@ static gint
|
|||
process_preamble(proto_tree *tree, tvbuff_t *tvb, const guint8 *boundary,
|
||||
gint boundary_len, gboolean *last_boundary)
|
||||
{
|
||||
gint boundary_start, boundary_line_len, body_part_start;
|
||||
gint boundary_start, boundary_line_len;
|
||||
|
||||
body_part_start = 0;
|
||||
boundary_start = find_first_boundary(tvb, 0, boundary, boundary_len,
|
||||
&boundary_line_len, last_boundary);
|
||||
if (boundary_start == 0) {
|
||||
|
|
|
@ -1141,7 +1141,7 @@ dissect_mysql_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
guint64 generation;
|
||||
proto_item *pi;
|
||||
#endif
|
||||
struct mysql_frame_data *frame_data;
|
||||
struct mysql_frame_data *mysql_frame_data_p;
|
||||
|
||||
/* get conversation, create if neccessary*/
|
||||
conversation= find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst,
|
||||
|
@ -1169,22 +1169,22 @@ dissect_mysql_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
conversation_add_proto_data(conversation, proto_mysql, conn_data);
|
||||
}
|
||||
|
||||
frame_data = p_get_proto_data(pinfo->fd, proto_mysql);
|
||||
if (!frame_data) {
|
||||
mysql_frame_data_p = p_get_proto_data(pinfo->fd, proto_mysql);
|
||||
if (!mysql_frame_data_p) {
|
||||
/* We haven't seen this frame before. Store the state of the
|
||||
* conversation now so if/when we dissect the frame again
|
||||
* we'll start with the same state.
|
||||
*/
|
||||
frame_data = se_alloc(sizeof(struct mysql_frame_data));
|
||||
frame_data->state = conn_data->state;
|
||||
p_add_proto_data(pinfo->fd, proto_mysql, frame_data);
|
||||
mysql_frame_data_p = se_alloc(sizeof(struct mysql_frame_data));
|
||||
mysql_frame_data_p->state = conn_data->state;
|
||||
p_add_proto_data(pinfo->fd, proto_mysql, mysql_frame_data_p);
|
||||
} else {
|
||||
/* We have seen this frame before. Set the connection state
|
||||
* to whatever state it had the first time we saw this frame
|
||||
* (e.g., based on whatever frames came before it).
|
||||
* The state may change as we dissect this packet.
|
||||
*/
|
||||
conn_data->state= frame_data->state;
|
||||
conn_data->state= mysql_frame_data_p->state;
|
||||
}
|
||||
|
||||
if (tree) {
|
||||
|
@ -1210,7 +1210,7 @@ dissect_mysql_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
#ifdef CTDEBUG
|
||||
conn_state_in= conn_data->state;
|
||||
frame_state = frame_data->state;
|
||||
frame_state = mysql_frame_data_p->state;
|
||||
generation= conn_data->generation;
|
||||
if (tree) {
|
||||
pi= proto_tree_add_text(mysql_tree, tvb, offset, 0, "conversation: %p", conversation);
|
||||
|
@ -1581,13 +1581,13 @@ mysql_dissect_request(tvbuff_t *tvb,packet_info *pinfo, int offset,
|
|||
|
||||
case MYSQL_REFRESH:
|
||||
{
|
||||
proto_item *tf;
|
||||
proto_item *tff;
|
||||
proto_item *rfsh_tree;
|
||||
gint refresh= tvb_get_guint8(tvb, offset);
|
||||
|
||||
if (req_tree) {
|
||||
tf= proto_tree_add_uint_format(req_tree, hf_mysql_refresh, tvb, offset, 1, refresh, "Refresh Bitmap: 0x%02X ", refresh);
|
||||
rfsh_tree= proto_item_add_subtree(tf, ett_refresh);
|
||||
tff= proto_tree_add_uint_format(req_tree, hf_mysql_refresh, tvb, offset, 1, refresh, "Refresh Bitmap: 0x%02X ", refresh);
|
||||
rfsh_tree= proto_item_add_subtree(tff, ett_refresh);
|
||||
proto_tree_add_boolean(rfsh_tree, hf_mysql_rfsh_grants, tvb, offset, 1, refresh);
|
||||
proto_tree_add_boolean(rfsh_tree, hf_mysql_rfsh_log, tvb, offset, 1, refresh);
|
||||
proto_tree_add_boolean(rfsh_tree, hf_mysql_rfsh_tables, tvb, offset, 1, refresh);
|
||||
|
|
|
@ -3765,14 +3765,14 @@ static void (*nas_msg_esm_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset
|
|||
NULL, /* NONE */
|
||||
};
|
||||
|
||||
void get_nas_esm_msg_params(guint8 oct, const gchar **msg_str, int *ett_tree, int *hf_idx, msg_fcn *msg_fcn)
|
||||
void get_nas_esm_msg_params(guint8 oct, const gchar **msg_str, int *ett_tree, int *hf_idx, msg_fcn *msg_fcn_p)
|
||||
{
|
||||
gint idx;
|
||||
|
||||
*msg_str = match_strval_idx((guint32) (oct & 0xff), nas_msg_esm_strings, &idx);
|
||||
*ett_tree = ett_nas_msg_esm[idx];
|
||||
*hf_idx = hf_nas_eps_msg_esm_type;
|
||||
*msg_fcn = nas_msg_esm_fcn[idx];
|
||||
*msg_fcn_p = nas_msg_esm_fcn[idx];
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -3818,14 +3818,14 @@ static void (*nas_msg_emm_fcn[])(tvbuff_t *tvb, proto_tree *tree, guint32 offset
|
|||
|
||||
};
|
||||
|
||||
void get_nas_emm_msg_params(guint8 oct, const gchar **msg_str, int *ett_tree, int *hf_idx, msg_fcn *msg_fcn)
|
||||
void get_nas_emm_msg_params(guint8 oct, const gchar **msg_str, int *ett_tree, int *hf_idx, msg_fcn *msg_fcn_p)
|
||||
{
|
||||
gint idx;
|
||||
|
||||
*msg_str = match_strval_idx((guint32) (oct & 0xff), nas_msg_emm_strings, &idx);
|
||||
*ett_tree = ett_nas_msg_emm[idx];
|
||||
*hf_idx = hf_nas_eps_msg_emm_type;
|
||||
*msg_fcn = nas_msg_emm_fcn[idx];
|
||||
*msg_fcn_p = nas_msg_emm_fcn[idx];
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -3841,7 +3841,7 @@ disect_nas_eps_esm_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int
|
|||
guint32 len;
|
||||
gint ett_tree;
|
||||
int hf_idx;
|
||||
void (*msg_fcn)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len);
|
||||
void (*msg_fcn_p)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len);
|
||||
guint8 oct;
|
||||
|
||||
len = tvb_length(tvb);
|
||||
|
@ -3861,12 +3861,12 @@ disect_nas_eps_esm_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int
|
|||
|
||||
/*messge type IE*/
|
||||
oct = tvb_get_guint8(tvb,offset);
|
||||
msg_fcn = NULL;
|
||||
msg_fcn_p = NULL;
|
||||
ett_tree = -1;
|
||||
hf_idx = -1;
|
||||
msg_str = NULL;
|
||||
|
||||
get_nas_esm_msg_params(oct, &msg_str, &ett_tree, &hf_idx, &msg_fcn);
|
||||
get_nas_esm_msg_params(oct, &msg_str, &ett_tree, &hf_idx, &msg_fcn_p);
|
||||
|
||||
if(msg_str){
|
||||
if (check_col(pinfo->cinfo, COL_INFO)){
|
||||
|
@ -3887,7 +3887,7 @@ disect_nas_eps_esm_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int
|
|||
/*
|
||||
* decode elements
|
||||
*/
|
||||
if (msg_fcn == NULL)
|
||||
if (msg_fcn_p == NULL)
|
||||
{
|
||||
proto_tree_add_text(tree, tvb, offset, len - offset,
|
||||
"Message Elements");
|
||||
|
@ -3896,7 +3896,7 @@ disect_nas_eps_esm_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int
|
|||
{
|
||||
/* If calling any "gsm" ie dissectors needing pinfo */
|
||||
gsm_a_dtap_pinfo = pinfo;
|
||||
(*msg_fcn)(tvb, tree, offset, len - offset);
|
||||
(*msg_fcn_p)(tvb, tree, offset, len - offset);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -3910,7 +3910,7 @@ dissect_nas_eps_emm_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int
|
|||
guint32 len;
|
||||
gint ett_tree;
|
||||
int hf_idx;
|
||||
void (*msg_fcn)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len);
|
||||
void (*msg_fcn_p)(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len);
|
||||
guint8 security_header_type, oct;
|
||||
|
||||
len = tvb_length(tvb);
|
||||
|
@ -3938,12 +3938,12 @@ dissect_nas_eps_emm_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int
|
|||
}
|
||||
/* Messge type IE*/
|
||||
oct = tvb_get_guint8(tvb,offset);
|
||||
msg_fcn = NULL;
|
||||
msg_fcn_p = NULL;
|
||||
ett_tree = -1;
|
||||
hf_idx = -1;
|
||||
msg_str = NULL;
|
||||
|
||||
get_nas_emm_msg_params(oct, &msg_str, &ett_tree, &hf_idx, &msg_fcn);
|
||||
get_nas_emm_msg_params(oct, &msg_str, &ett_tree, &hf_idx, &msg_fcn_p);
|
||||
|
||||
if(msg_str){
|
||||
if (check_col(pinfo->cinfo, COL_INFO)){
|
||||
|
@ -3964,7 +3964,7 @@ dissect_nas_eps_emm_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int
|
|||
/*
|
||||
* decode elements
|
||||
*/
|
||||
if (msg_fcn == NULL)
|
||||
if (msg_fcn_p == NULL)
|
||||
{
|
||||
proto_tree_add_text(tree, tvb, offset, len - offset,
|
||||
"Message Elements");
|
||||
|
@ -3973,7 +3973,7 @@ dissect_nas_eps_emm_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int
|
|||
{
|
||||
/* If calling any "gsm" ie dissectors needing pinfo */
|
||||
gsm_a_dtap_pinfo = pinfo;
|
||||
(*msg_fcn)(tvb, tree, offset, len - offset);
|
||||
(*msg_fcn_p)(tvb, tree, offset, len - offset);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -273,11 +273,11 @@ stock(tvbuff_t *tvb, packet_info *pinfo, proto_tree *nasdaq_itch_tree, int offse
|
|||
{
|
||||
gint col_info = PINFO_COL(pinfo);
|
||||
if (nasdaq_itch_tree || col_info) {
|
||||
char *stock = tvb_get_ephemeral_string(tvb, offset, 6);
|
||||
char *stock_p = tvb_get_ephemeral_string(tvb, offset, 6);
|
||||
|
||||
proto_tree_add_item(nasdaq_itch_tree, hf_nasdaq_itch_stock, tvb, offset, 6, FALSE);
|
||||
if (col_info) {
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, "<%s> ", stock);
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, "<%s> ", stock_p);
|
||||
}
|
||||
}
|
||||
return offset+6;
|
||||
|
|
|
@ -285,7 +285,7 @@ get_nbns_name(tvbuff_t *tvb, int offset, int nbns_data_offset,
|
|||
char cname, cnbname;
|
||||
int name_type;
|
||||
char *pname_ret;
|
||||
size_t index = 0;
|
||||
size_t idx = 0;
|
||||
|
||||
nbname_buf=ep_alloc(NBNAME_BUF_LEN);
|
||||
nbname = nbname_buf;
|
||||
|
@ -330,17 +330,17 @@ get_nbns_name(tvbuff_t *tvb, int offset, int nbns_data_offset,
|
|||
pname++;
|
||||
|
||||
/* Do we have room to store the character? */
|
||||
if (index < NETBIOS_NAME_LEN) {
|
||||
if (idx < NETBIOS_NAME_LEN) {
|
||||
/* Yes - store the character. */
|
||||
nbname_buf[index++] = cnbname;
|
||||
nbname_buf[idx++] = cnbname;
|
||||
}
|
||||
}
|
||||
|
||||
/* NetBIOS names are supposed to be exactly 16 bytes long. */
|
||||
if (index != NETBIOS_NAME_LEN) {
|
||||
if (idx != NETBIOS_NAME_LEN) {
|
||||
/* It's not. */
|
||||
g_snprintf(nbname_buf, NBNAME_BUF_LEN, "Illegal NetBIOS name (%lu bytes long)",
|
||||
(unsigned long)index);
|
||||
(unsigned long)idx);
|
||||
goto bad;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue