Remove check_col()

svn path=/trunk/; revision=34426
This commit is contained in:
Jeff Morriss 2010-10-08 01:50:50 +00:00
parent d4c3cbea6d
commit fae45ea6a1
3 changed files with 69 additions and 99 deletions

View File

@ -1972,11 +1972,9 @@ dissect_rpc_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
"Program: %s (%u)", progname, prog);
}
if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
/* Set the protocol name to the underlying
program name. */
col_set_str(pinfo->cinfo, COL_PROTOCOL, progname);
}
vers = tvb_get_ntohl(tvb, offset+8);
if (rpc_tree) {
@ -2063,22 +2061,17 @@ dissect_rpc_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
}
/* Print the program version, procedure name, and message type (call or reply). */
if (check_col(pinfo->cinfo, COL_INFO)) {
if (first_pdu)
col_clear(pinfo->cinfo, COL_INFO);
else
col_append_str(pinfo->cinfo, COL_INFO, " ; ");
/* Special case for NFSv4 - if the type is COMPOUND, do not print the procedure name */
if (vers==4 && prog==NFS_PROGRAM && !strcmp(procname, "COMPOUND"))
col_append_fstr(pinfo->cinfo, COL_INFO,"V%u %s",
vers,
col_append_fstr(pinfo->cinfo, COL_INFO,"V%u %s", vers,
msg_type_name);
else
col_append_fstr(pinfo->cinfo, COL_INFO,"V%u %s %s",
vers,
procname,
msg_type_name);
}
vers, procname, msg_type_name);
/* Keep track of the address whence the call came, and the
port to which the call is being sent, so that we can
@ -2157,20 +2150,17 @@ dissect_rpc_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if (pinfo->fd->num != rpc_call->req_num) {
/* No, so it's a duplicate request.
Mark it as such. */
if (check_col(pinfo->cinfo, COL_INFO)) {
col_prepend_fstr(pinfo->cinfo, COL_INFO,
"[RPC retransmission of #%d]", rpc_call->req_num);
}
proto_tree_add_item(rpc_tree,
hf_rpc_dup, tvb, 0,0, TRUE);
proto_tree_add_uint(rpc_tree,
hf_rpc_call_dup, tvb, 0,0, rpc_call->req_num);
"[RPC retransmission of #%d]",
rpc_call->req_num);
proto_tree_add_item(rpc_tree, hf_rpc_dup, tvb,
0, 0, TRUE);
proto_tree_add_uint(rpc_tree, hf_rpc_call_dup,
tvb, 0,0, rpc_call->req_num);
}
if(rpc_call->rep_num){
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_fstr(pinfo->cinfo, COL_INFO," (Reply In %d)", rpc_call->rep_num);
}
}
} else {
/* Prepare the value data.
"req_num" and "rep_num" are frame numbers;
@ -2268,15 +2258,12 @@ dissect_rpc_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
ett = rpc_prog->ett;
progname = rpc_prog->progname;
if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
/* Set the protocol name to the underlying
program name. */
col_set_str(pinfo->cinfo, COL_PROTOCOL, progname);
}
}
/* Print the program version, procedure name, and message type (call or reply). */
if (check_col(pinfo->cinfo, COL_INFO)) {
if (first_pdu)
col_clear(pinfo->cinfo, COL_INFO);
else
@ -2284,14 +2271,10 @@ dissect_rpc_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* Special case for NFSv4 - if the type is COMPOUND, do not print the procedure name */
if (vers==4 && prog==NFS_PROGRAM && !strcmp(procname, "COMPOUND"))
col_append_fstr(pinfo->cinfo, COL_INFO,"V%u %s",
vers,
msg_type_name);
vers, msg_type_name);
else
col_append_fstr(pinfo->cinfo, COL_INFO,"V%u %s %s",
vers,
procname,
msg_type_name);
}
vers, procname, msg_type_name);
if (rpc_tree) {
proto_item *tmp_item;
@ -2330,10 +2313,8 @@ dissect_rpc_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
&ns);
PROTO_ITEM_SET_GENERATED(tmp_item);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_fstr(pinfo->cinfo, COL_INFO," (Call In %d)", rpc_call->req_num);
}
}
if ((!rpc_call) || (rpc_call->rep_num == 0)) {
@ -2349,10 +2330,8 @@ dissect_rpc_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* No, so it's a duplicate reply.
Mark it as such. */
if (check_col(pinfo->cinfo, COL_INFO)) {
col_prepend_fstr(pinfo->cinfo, COL_INFO,
"[RPC duplicate of #%d]", rpc_call->rep_num);
}
tmp_item=proto_tree_add_item(rpc_tree,
hf_rpc_dup, tvb, 0,0, TRUE);
PROTO_ITEM_SET_GENERATED(tmp_item);
@ -2624,13 +2603,11 @@ dissect_rpc_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
* an RPC auth level message, then process the args.
*/
col_set_str(pinfo->cinfo, COL_PROTOCOL, "RPC");
if (check_col(pinfo->cinfo, COL_INFO)) {
col_clear(pinfo->cinfo, COL_INFO);
col_append_fstr(pinfo->cinfo, COL_INFO,
"%s %s XID 0x%x",
val_to_str(gss_proc, rpc_authgssapi_proc, "Unknown (%d)"),
msg_type_name, xid);
}
switch (gss_proc) {

View File

@ -1002,7 +1002,6 @@ dissect_spdu(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
session.rtse_reassemble = FALSE;
if(connectionless) {
if (check_col(pinfo->cinfo, COL_INFO))
col_add_str(pinfo->cinfo, COL_INFO,
val_to_str(type, ses_vals, "Unknown SPDU type (0x%02x)"));
if (tree) {
@ -1015,7 +1014,6 @@ dissect_spdu(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
has_user_information = TRUE;
}
else if (tokens) {
if (check_col(pinfo->cinfo, COL_INFO))
col_add_str(pinfo->cinfo, COL_INFO,
val_to_str(type, ses_category0_vals, "Unknown SPDU type (0x%02x)"));
if (tree) {
@ -1026,7 +1024,6 @@ dissect_spdu(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree,
offset, 1, type);
}
} else {
if (check_col(pinfo->cinfo, COL_INFO))
col_add_str(pinfo->cinfo, COL_INFO,
val_to_str(type, ses_vals, "Unknown SPDU type (0x%02x)"));
if (tree) {

View File

@ -104,13 +104,9 @@ dissect_vlan(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
tci = tvb_get_ntohs( tvb, 0 );
if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_fstr(pinfo->cinfo, COL_INFO, "PRI: %u CFI: %u ID: %u",
(tci >> 13), ((tci >> 12) & 1), (tci & 0xFFF));
}
if ( check_col(pinfo->cinfo, COL_8021Q_VLAN_ID)) {
col_add_fstr(pinfo->cinfo, COL_8021Q_VLAN_ID, "%u", (tci & 0xFFF));
}
vlan_tree = NULL;