forked from osmocom/wireshark
Remove some check_col() calls.
svn path=/trunk/; revision=28974
This commit is contained in:
parent
23b068e307
commit
d00c2baf5c
|
@ -25,10 +25,9 @@ CompressedData B "1.3.26.0.4406.0.4.2" "cdt"
|
|||
val_to_str (value, cdt_AlgorithmID_ShortForm_vals,
|
||||
"unknown"));
|
||||
|
||||
if (check_col (actx->pinfo->cinfo, COL_INFO))
|
||||
col_append_fstr (actx->pinfo->cinfo, COL_INFO, "%%s ",
|
||||
val_to_str (value, cdt_AlgorithmID_ShortForm_vals,
|
||||
"unknown"));
|
||||
col_append_fstr (actx->pinfo->cinfo, COL_INFO, "%%s ",
|
||||
val_to_str (value, cdt_AlgorithmID_ShortForm_vals,
|
||||
"unknown"));
|
||||
|
||||
#.FN_PARS ContentType-ShortForm
|
||||
VAL_PTR = &content_type
|
||||
|
@ -40,10 +39,9 @@ CompressedData B "1.3.26.0.4406.0.4.2" "cdt"
|
|||
val_to_str (content_type, cdt_ContentType_ShortForm_vals,
|
||||
"unknown"));
|
||||
|
||||
if (check_col (actx->pinfo->cinfo, COL_INFO))
|
||||
col_append_fstr (actx->pinfo->cinfo, COL_INFO, "%%s ",
|
||||
val_to_str (content_type, cdt_ContentType_ShortForm_vals,
|
||||
"unknown"));
|
||||
col_append_fstr (actx->pinfo->cinfo, COL_INFO, "%%s ",
|
||||
val_to_str (content_type, cdt_ContentType_ShortForm_vals,
|
||||
"unknown"));
|
||||
|
||||
#.FN_PARS CompressedContentInfo/contentType/contentType-OID
|
||||
FN_VARIANT = _str VAL_PTR = &obj_id
|
||||
|
@ -61,8 +59,7 @@ CompressedData B "1.3.26.0.4406.0.4.2" "cdt"
|
|||
|
||||
proto_item_append_text (cdt_item, ", %%s", name);
|
||||
|
||||
if (check_col (actx->pinfo->cinfo, COL_INFO))
|
||||
col_append_fstr (actx->pinfo->cinfo, COL_INFO, "%%s ", name);
|
||||
col_append_fstr (actx->pinfo->cinfo, COL_INFO, "%%s ", name);
|
||||
}
|
||||
|
||||
#.FN_PARS CompressedContent
|
||||
|
@ -79,9 +76,8 @@ CompressedData B "1.3.26.0.4406.0.4.2" "cdt"
|
|||
"[Error: Unable to get compressed content]");
|
||||
expert_add_info_format (actx->pinfo, tf, PI_UNDECODED, PI_ERROR,
|
||||
"Unable to get compressed content");
|
||||
if (check_col (actx->pinfo->cinfo, COL_INFO))
|
||||
col_append_str (actx->pinfo->cinfo, COL_INFO,
|
||||
"[Error: Unable to get compressed content]");
|
||||
col_append_str (actx->pinfo->cinfo, COL_INFO,
|
||||
"[Error: Unable to get compressed content]");
|
||||
return offset;
|
||||
}
|
||||
|
||||
|
@ -92,9 +88,8 @@ CompressedData B "1.3.26.0.4406.0.4.2" "cdt"
|
|||
"[Error: Unable to uncompress content]");
|
||||
expert_add_info_format (actx->pinfo, tf, PI_UNDECODED, PI_ERROR,
|
||||
"Unable to uncompress content");
|
||||
if (check_col (actx->pinfo->cinfo, COL_INFO))
|
||||
col_append_str (actx->pinfo->cinfo, COL_INFO,
|
||||
"[Error: Unable to uncompress content]");
|
||||
col_append_str (actx->pinfo->cinfo, COL_INFO,
|
||||
"[Error: Unable to uncompress content]");
|
||||
return offset;
|
||||
}
|
||||
|
||||
|
|
|
@ -85,10 +85,8 @@ void dissect_cdt (tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
|
|||
tree = proto_item_add_subtree (cdt_item, ett_cdt_CompressedData);
|
||||
}
|
||||
|
||||
if (check_col (pinfo->cinfo, COL_PROTOCOL))
|
||||
col_set_str (pinfo->cinfo, COL_PROTOCOL, "CDT");
|
||||
if (check_col (pinfo->cinfo, COL_INFO))
|
||||
col_clear (pinfo->cinfo, COL_INFO);
|
||||
col_set_str (pinfo->cinfo, COL_PROTOCOL, "CDT");
|
||||
col_clear (pinfo->cinfo, COL_INFO);
|
||||
|
||||
dissect_CompressedData_PDU (tvb, pinfo, tree);
|
||||
}
|
||||
|
|
|
@ -94,11 +94,8 @@ static void dissect_bjnp (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
guint8 dev_type, cmd_code;
|
||||
gchar *info;
|
||||
|
||||
if (check_col (pinfo->cinfo, COL_PROTOCOL))
|
||||
col_set_str (pinfo->cinfo, COL_PROTOCOL, PSNAME);
|
||||
|
||||
if (check_col (pinfo->cinfo, COL_INFO))
|
||||
col_clear (pinfo->cinfo, COL_INFO);
|
||||
col_set_str (pinfo->cinfo, COL_PROTOCOL, PSNAME);
|
||||
col_clear (pinfo->cinfo, COL_INFO);
|
||||
|
||||
ti = proto_tree_add_item (tree, proto_bjnp, tvb, offset, -1, FALSE);
|
||||
bjnp_tree = proto_item_add_subtree (ti, ett_bjnp);
|
||||
|
@ -118,9 +115,7 @@ static void dissect_bjnp (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
val_to_str (cmd_code, cmd_code_vals, "Unknown code (%d)"));
|
||||
|
||||
proto_item_append_text (ti, ", %s", info);
|
||||
|
||||
if (check_col (pinfo->cinfo, COL_INFO))
|
||||
col_set_str (pinfo->cinfo, COL_INFO, info);
|
||||
col_set_str (pinfo->cinfo, COL_INFO, info);
|
||||
|
||||
g_free (info);
|
||||
|
||||
|
|
|
@ -118,10 +118,9 @@ dissect_cdt_AlgorithmID_ShortForm(gboolean implicit_tag _U_, tvbuff_t *tvb _U_,
|
|||
val_to_str (value, cdt_AlgorithmID_ShortForm_vals,
|
||||
"unknown"));
|
||||
|
||||
if (check_col (actx->pinfo->cinfo, COL_INFO))
|
||||
col_append_fstr (actx->pinfo->cinfo, COL_INFO, "%s ",
|
||||
val_to_str (value, cdt_AlgorithmID_ShortForm_vals,
|
||||
"unknown"));
|
||||
col_append_fstr (actx->pinfo->cinfo, COL_INFO, "%s ",
|
||||
val_to_str (value, cdt_AlgorithmID_ShortForm_vals,
|
||||
"unknown"));
|
||||
|
||||
|
||||
|
||||
|
@ -172,7 +171,7 @@ static const value_string cdt_ContentType_ShortForm_vals[] = {
|
|||
|
||||
static int
|
||||
dissect_cdt_ContentType_ShortForm(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 37 "cdt.cnf"
|
||||
#line 36 "cdt.cnf"
|
||||
|
||||
offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
|
||||
&content_type);
|
||||
|
@ -181,10 +180,9 @@ dissect_cdt_ContentType_ShortForm(gboolean implicit_tag _U_, tvbuff_t *tvb _U_,
|
|||
val_to_str (content_type, cdt_ContentType_ShortForm_vals,
|
||||
"unknown"));
|
||||
|
||||
if (check_col (actx->pinfo->cinfo, COL_INFO))
|
||||
col_append_fstr (actx->pinfo->cinfo, COL_INFO, "%s ",
|
||||
val_to_str (content_type, cdt_ContentType_ShortForm_vals,
|
||||
"unknown"));
|
||||
col_append_fstr (actx->pinfo->cinfo, COL_INFO, "%s ",
|
||||
val_to_str (content_type, cdt_ContentType_ShortForm_vals,
|
||||
"unknown"));
|
||||
|
||||
|
||||
|
||||
|
@ -195,7 +193,7 @@ dissect_cdt_ContentType_ShortForm(gboolean implicit_tag _U_, tvbuff_t *tvb _U_,
|
|||
|
||||
static int
|
||||
dissect_cdt_T_contentType_OID(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 52 "cdt.cnf"
|
||||
#line 50 "cdt.cnf"
|
||||
const char *obj_id = NULL;
|
||||
|
||||
offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_index, &obj_id);
|
||||
|
@ -209,8 +207,7 @@ dissect_cdt_T_contentType_OID(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int
|
|||
|
||||
proto_item_append_text (cdt_item, ", %s", name);
|
||||
|
||||
if (check_col (actx->pinfo->cinfo, COL_INFO))
|
||||
col_append_fstr (actx->pinfo->cinfo, COL_INFO, "%s ", name);
|
||||
col_append_fstr (actx->pinfo->cinfo, COL_INFO, "%s ", name);
|
||||
}
|
||||
|
||||
|
||||
|
@ -244,7 +241,7 @@ dissect_cdt_T_contentType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offs
|
|||
|
||||
static int
|
||||
dissect_cdt_CompressedContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 72 "cdt.cnf"
|
||||
#line 69 "cdt.cnf"
|
||||
tvbuff_t *next_tvb = NULL, *compr_tvb = NULL;
|
||||
proto_item *tf = NULL;
|
||||
int save_offset = offset;
|
||||
|
@ -257,9 +254,8 @@ dissect_cdt_CompressedContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int
|
|||
"[Error: Unable to get compressed content]");
|
||||
expert_add_info_format (actx->pinfo, tf, PI_UNDECODED, PI_ERROR,
|
||||
"Unable to get compressed content");
|
||||
if (check_col (actx->pinfo->cinfo, COL_INFO))
|
||||
col_append_str (actx->pinfo->cinfo, COL_INFO,
|
||||
"[Error: Unable to get compressed content]");
|
||||
col_append_str (actx->pinfo->cinfo, COL_INFO,
|
||||
"[Error: Unable to get compressed content]");
|
||||
return offset;
|
||||
}
|
||||
|
||||
|
@ -270,9 +266,8 @@ dissect_cdt_CompressedContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int
|
|||
"[Error: Unable to uncompress content]");
|
||||
expert_add_info_format (actx->pinfo, tf, PI_UNDECODED, PI_ERROR,
|
||||
"Unable to uncompress content");
|
||||
if (check_col (actx->pinfo->cinfo, COL_INFO))
|
||||
col_append_str (actx->pinfo->cinfo, COL_INFO,
|
||||
"[Error: Unable to uncompress content]");
|
||||
col_append_str (actx->pinfo->cinfo, COL_INFO,
|
||||
"[Error: Unable to uncompress content]");
|
||||
return offset;
|
||||
}
|
||||
|
||||
|
@ -364,10 +359,8 @@ void dissect_cdt (tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
|
|||
tree = proto_item_add_subtree (cdt_item, ett_cdt_CompressedData);
|
||||
}
|
||||
|
||||
if (check_col (pinfo->cinfo, COL_PROTOCOL))
|
||||
col_set_str (pinfo->cinfo, COL_PROTOCOL, "CDT");
|
||||
if (check_col (pinfo->cinfo, COL_INFO))
|
||||
col_clear (pinfo->cinfo, COL_INFO);
|
||||
col_set_str (pinfo->cinfo, COL_PROTOCOL, "CDT");
|
||||
col_clear (pinfo->cinfo, COL_INFO);
|
||||
|
||||
dissect_CompressedData_PDU (tvb, pinfo, tree);
|
||||
}
|
||||
|
@ -417,7 +410,7 @@ void proto_register_cdt (void) {
|
|||
"cdt.CompressedContent", HFILL }},
|
||||
|
||||
/*--- End of included file: packet-cdt-hfarr.c ---*/
|
||||
#line 101 "packet-cdt-template.c"
|
||||
#line 99 "packet-cdt-template.c"
|
||||
};
|
||||
|
||||
/* List of subtrees */
|
||||
|
@ -431,7 +424,7 @@ void proto_register_cdt (void) {
|
|||
&ett_cdt_T_contentType,
|
||||
|
||||
/*--- End of included file: packet-cdt-ettarr.c ---*/
|
||||
#line 106 "packet-cdt-template.c"
|
||||
#line 104 "packet-cdt-template.c"
|
||||
};
|
||||
|
||||
/* Register protocol */
|
||||
|
@ -453,7 +446,7 @@ void proto_reg_handoff_cdt (void) {
|
|||
|
||||
|
||||
/*--- End of included file: packet-cdt-dis-tab.c ---*/
|
||||
#line 121 "packet-cdt-template.c"
|
||||
#line 119 "packet-cdt-template.c"
|
||||
|
||||
data_handle = find_dissector ("data");
|
||||
}
|
||||
|
|
|
@ -3452,11 +3452,8 @@ static void dissect_dmp (tvbuff_t *tvb, packet_info *pinfo,
|
|||
gint length, offset = 0;
|
||||
gboolean retrans_or_dup_ack = FALSE;
|
||||
|
||||
if (check_col (pinfo->cinfo, COL_PROTOCOL))
|
||||
col_set_str (pinfo->cinfo, COL_PROTOCOL, "DMP");
|
||||
|
||||
if (check_col (pinfo->cinfo, COL_INFO))
|
||||
col_clear (pinfo->cinfo, COL_INFO);
|
||||
col_set_str (pinfo->cinfo, COL_PROTOCOL, "DMP");
|
||||
col_clear (pinfo->cinfo, COL_INFO);
|
||||
|
||||
/* Initialize global data structure */
|
||||
memset (&dmp, 0, sizeof (dmp));
|
||||
|
@ -3470,10 +3467,7 @@ static void dissect_dmp (tvbuff_t *tvb, packet_info *pinfo,
|
|||
|
||||
if (dmp.version > DMP_VERSION) {
|
||||
/* Unsupported DMP Version, no point to continue */
|
||||
if (check_col (pinfo->cinfo, COL_INFO)) {
|
||||
col_add_fstr (pinfo->cinfo, COL_INFO, "Unsupported Version: %d",
|
||||
dmp.version);
|
||||
}
|
||||
col_add_fstr (pinfo->cinfo, COL_INFO, "Unsupported Version: %d", dmp.version);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -91,11 +91,8 @@ static void dissect_nat_pmp (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
|
|||
gint offset = 0;
|
||||
guint8 opcode;
|
||||
|
||||
if (check_col (pinfo->cinfo, COL_PROTOCOL))
|
||||
col_set_str (pinfo->cinfo, COL_PROTOCOL, PSNAME);
|
||||
|
||||
if (check_col (pinfo->cinfo, COL_INFO))
|
||||
col_clear (pinfo->cinfo, COL_INFO);
|
||||
col_set_str (pinfo->cinfo, COL_PROTOCOL, PSNAME);
|
||||
col_clear (pinfo->cinfo, COL_INFO);
|
||||
|
||||
ti = proto_tree_add_item (tree, proto_nat_pmp, tvb, offset, -1, FALSE);
|
||||
nat_pmp_tree = proto_item_add_subtree (ti, ett_nat_pmp);
|
||||
|
@ -108,8 +105,7 @@ static void dissect_nat_pmp (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
|
|||
op_ti = proto_tree_add_item (nat_pmp_tree, hf_opcode, tvb, offset, 1, FALSE);
|
||||
offset++;
|
||||
|
||||
if (check_col (pinfo->cinfo, COL_INFO))
|
||||
col_set_str (pinfo->cinfo, COL_INFO, val_to_str (opcode, opcode_vals, "Unknown opcode: %d"));
|
||||
col_set_str (pinfo->cinfo, COL_INFO, val_to_str (opcode, opcode_vals, "Unknown opcode: %d"));
|
||||
|
||||
switch (opcode) {
|
||||
|
||||
|
|
|
@ -643,10 +643,8 @@ static void add_ack_analysis (tvbuff_t *tvb, packet_info *pinfo, proto_tree *p_m
|
|||
tvb, 0, 0, ack_data->ack_id);
|
||||
PROTO_ITEM_SET_GENERATED (en);
|
||||
|
||||
if (check_col (pinfo->cinfo, COL_INFO)) {
|
||||
col_append_fstr (pinfo->cinfo, COL_INFO, "[Dup ACK %d#%d] ",
|
||||
ack_data->ack_id, ack_data->ack_resend_count);
|
||||
}
|
||||
col_append_fstr (pinfo->cinfo, COL_INFO, "[Dup ACK %d#%d] ",
|
||||
ack_data->ack_id, ack_data->ack_resend_count);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -754,10 +752,8 @@ static p_mul_seq_val *add_seq_analysis (tvbuff_t *tvb, packet_info *pinfo,
|
|||
}
|
||||
item_added = TRUE;
|
||||
|
||||
if (check_col (pinfo->cinfo, COL_INFO)) {
|
||||
col_append_fstr (pinfo->cinfo, COL_INFO, "[Retrans %d#%d] ",
|
||||
pkg_data->pdu_id, pkg_data->msg_resend_count);
|
||||
}
|
||||
col_append_fstr (pinfo->cinfo, COL_INFO, "[Retrans %d#%d] ",
|
||||
pkg_data->pdu_id, pkg_data->msg_resend_count);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -804,11 +800,8 @@ static void dissect_p_mul (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
GString *message_id_list = NULL;
|
||||
nstime_t ts;
|
||||
|
||||
if (check_col (pinfo->cinfo, COL_PROTOCOL))
|
||||
col_set_str (pinfo->cinfo, COL_PROTOCOL, "P_MUL");
|
||||
|
||||
if (check_col (pinfo->cinfo, COL_INFO))
|
||||
col_clear (pinfo->cinfo, COL_INFO);
|
||||
col_set_str (pinfo->cinfo, COL_PROTOCOL, "P_MUL");
|
||||
col_clear (pinfo->cinfo, COL_INFO);
|
||||
|
||||
/* First fetch PDU Type */
|
||||
pdu_type = tvb_get_guint8 (tvb, offset + 3) & 0x3F;
|
||||
|
@ -1302,7 +1295,7 @@ static void dissect_p_mul (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
"Reassembled Data", frag_msg,
|
||||
&p_mul_frag_items, NULL, tree);
|
||||
|
||||
if (check_col (pinfo->cinfo, COL_INFO) && frag_msg)
|
||||
if (frag_msg)
|
||||
col_append_str (pinfo->cinfo, COL_INFO, " (Message Reassembled)");
|
||||
|
||||
if (new_tvb) {
|
||||
|
|
Loading…
Reference in New Issue