From fc447d3377db6a9a8e2cc519087f8054e85c143c Mon Sep 17 00:00:00 2001 From: Anders Broman Date: Mon, 26 Sep 2011 09:01:17 +0000 Subject: Get rid of check_col, while at it set ENC. svn path=/trunk/; revision=39147 --- epan/dissectors/packet-cnip.c | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) (limited to 'epan/dissectors/packet-cnip.c') diff --git a/epan/dissectors/packet-cnip.c b/epan/dissectors/packet-cnip.c index befc7a919c..8b7729decc 100644 --- a/epan/dissectors/packet-cnip.c +++ b/epan/dissectors/packet-cnip.c @@ -89,12 +89,9 @@ static void dissect_cnip (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_clear(pinfo->cinfo, COL_INFO); type = tvb_get_guint8(tvb, 3); - if (check_col(pinfo->cinfo, COL_INFO)) - { - col_add_fstr(pinfo->cinfo, COL_INFO,"Priority: %s Type: %s", - (pinfo->destport == 1629 )? "urgent":"normal", - val_to_str_const(type, type_tuple, "Unknown")); - } + col_add_fstr(pinfo->cinfo, COL_INFO,"Priority: %s Type: %s", + (pinfo->destport == 1629 )? "urgent":"normal", + val_to_str_const(type, type_tuple, "Unknown")); exth_len = tvb_get_guint8(tvb, 4); pf_pcode = tvb_get_guint8(tvb, 5) & 0x1F; @@ -103,19 +100,19 @@ static void dissect_cnip (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset = 0; /* Take whole packet for now, we'll adjust it later */ - ti = proto_tree_add_item(tree, proto_cnip, tvb, offset, -1, FALSE); + ti = proto_tree_add_item(tree, proto_cnip, tvb, offset, -1, ENC_BIG_ENDIAN); cnip_tree = proto_item_add_subtree(ti, ett_cnip); - proto_tree_add_item(cnip_tree, hf_cnip_len, tvb, offset, 2, FALSE); + proto_tree_add_item(cnip_tree, hf_cnip_len, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; - proto_tree_add_item(cnip_tree, hf_cnip_ver, tvb, offset, 1, FALSE); + proto_tree_add_item(cnip_tree, hf_cnip_ver, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(cnip_tree, hf_cnip_type, tvb, offset, 1, FALSE); + proto_tree_add_item(cnip_tree, hf_cnip_type, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(cnip_tree, hf_cnip_exth, tvb, offset, 1, FALSE); + proto_tree_add_item(cnip_tree, hf_cnip_exth, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; { @@ -125,20 +122,20 @@ static void dissect_cnip (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) NULL }; proto_tree_add_bitmask(cnip_tree, tvb, offset, hf_cnip_pf, - ett_pf, pf_fields, FALSE); + ett_pf, pf_fields, ENC_BIG_ENDIAN); } offset += 1; - proto_tree_add_item(cnip_tree, hf_cnip_vcode, tvb, offset, 2, FALSE); + proto_tree_add_item(cnip_tree, hf_cnip_vcode, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; - proto_tree_add_item(cnip_tree, hf_cnip_sessid, tvb, offset, 4, FALSE); + proto_tree_add_item(cnip_tree, hf_cnip_sessid, tvb, offset, 4, ENC_BIG_ENDIAN); offset += 4; - proto_tree_add_item(cnip_tree, hf_cnip_seqno, tvb, offset, 4, FALSE); + proto_tree_add_item(cnip_tree, hf_cnip_seqno, tvb, offset, 4, ENC_BIG_ENDIAN); offset += 4; - proto_tree_add_item(cnip_tree, hf_cnip_tstamp, tvb, offset, 4, FALSE); + proto_tree_add_item(cnip_tree, hf_cnip_tstamp, tvb, offset, 4, ENC_BIG_ENDIAN); offset += 4; /* Jump over any unknown header extensions */ -- cgit v1.2.3