aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-aoe.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2011-09-26 05:52:58 +0000
committerAnders Broman <anders.broman@ericsson.com>2011-09-26 05:52:58 +0000
commitfc63c358435bc4bf771a0c15943a1aee890a2787 (patch)
tree8a9fc1879cbb0c4b9c4823078293dc5e8959b883 /epan/dissectors/packet-aoe.c
parent69bfd68ac490f8d831614f4f1643265ef27a9bb4 (diff)
Get rid of check_col() and use ENC_BIG_ENDIAN.
svn path=/trunk/; revision=39144
Diffstat (limited to 'epan/dissectors/packet-aoe.c')
-rw-r--r--epan/dissectors/packet-aoe.c49
1 files changed, 21 insertions, 28 deletions
diff --git a/epan/dissectors/packet-aoe.c b/epan/dissectors/packet-aoe.c
index a71ef0e919..89636f8247 100644
--- a/epan/dissectors/packet-aoe.c
+++ b/epan/dissectors/packet-aoe.c
@@ -279,39 +279,35 @@ dissect_ata_pdu(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset,
/* aflags */
aflags=tvb_get_guint8(tvb, offset);
- proto_tree_add_item(tree, hf_aoe_aflags_e, tvb, offset, 1, FALSE);
+ proto_tree_add_item(tree, hf_aoe_aflags_e, tvb, offset, 1, ENC_BIG_ENDIAN);
if(aflags&AOE_AFLAGS_E){
- proto_tree_add_item(tree, hf_aoe_aflags_d, tvb, offset, 1, FALSE);
+ proto_tree_add_item(tree, hf_aoe_aflags_d, tvb, offset, 1, ENC_BIG_ENDIAN);
}
if(aflags&AOE_AFLAGS_W){
- proto_tree_add_item(tree, hf_aoe_aflags_a, tvb, offset, 1, FALSE);
+ proto_tree_add_item(tree, hf_aoe_aflags_a, tvb, offset, 1, ENC_BIG_ENDIAN);
}
- proto_tree_add_item(tree, hf_aoe_aflags_w, tvb, offset, 1, FALSE);
+ proto_tree_add_item(tree, hf_aoe_aflags_w, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
/* err/feature */
- proto_tree_add_item(tree, hf_aoe_err_feature, tvb, offset, 1, FALSE);
+ proto_tree_add_item(tree, hf_aoe_err_feature, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
/* sector count */
- proto_tree_add_item(tree, hf_aoe_sector_count, tvb, offset, 1, FALSE);
+ proto_tree_add_item(tree, hf_aoe_sector_count, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
/* ata command/status */
if(!response){
- proto_tree_add_item(tree, hf_aoe_acmd, tvb, offset, 1, FALSE);
- if (check_col(pinfo->cinfo, COL_INFO)) {
- col_append_fstr(pinfo->cinfo, COL_INFO, " ATA:%s", val_to_str(tvb_get_guint8(tvb, offset), ata_cmd_vals, " Unknown ATA<0x%02x>"));
- }
+ proto_tree_add_item(tree, hf_aoe_acmd, tvb, offset, 1, ENC_BIG_ENDIAN);
+ col_append_fstr(pinfo->cinfo, COL_INFO, " ATA:%s", val_to_str(tvb_get_guint8(tvb, offset), ata_cmd_vals, " Unknown ATA<0x%02x>"));
} else {
- proto_tree_add_item(tree, hf_aoe_astatus, tvb, offset, 1, FALSE);
+ proto_tree_add_item(tree, hf_aoe_astatus, tvb, offset, 1, ENC_BIG_ENDIAN);
if(ata_info != NULL && ata_info->request_frame){
/* we dont know what command it was unless we saw the request_frame */
tmp_item=proto_tree_add_uint(tree, hf_aoe_acmd, tvb, 0, 0, ata_info->cmd);
PROTO_ITEM_SET_GENERATED(tmp_item);
- if (check_col(pinfo->cinfo, COL_INFO)) {
- col_append_fstr(pinfo->cinfo, COL_INFO, " ATA:%s", val_to_str(ata_info->cmd, ata_cmd_vals, " Unknown ATA<0x%02x>"));
- }
+ col_append_fstr(pinfo->cinfo, COL_INFO, " ATA:%s", val_to_str(ata_info->cmd, ata_cmd_vals, " Unknown ATA<0x%02x>"));
}
}
offset++;
@@ -338,8 +334,8 @@ dissect_aoe_v1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
flags_item=proto_tree_add_text(tree, tvb, 0, 1, "Flags:");
flags_tree=proto_item_add_subtree(flags_item, ett_aoe_flags);
}
- proto_tree_add_item(flags_tree, hf_aoe_flags_response, tvb, 0, 1, FALSE);
- proto_tree_add_item(flags_tree, hf_aoe_flags_error, tvb, 0, 1, FALSE);
+ proto_tree_add_item(flags_tree, hf_aoe_flags_response, tvb, 0, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(flags_tree, hf_aoe_flags_error, tvb, 0, 1, ENC_BIG_ENDIAN);
if(flags_item){
proto_item_append_text(flags_item,(flags&AOE_FLAGS_RESPONSE)?" Response":" Request");
if(flags&AOE_FLAGS_ERROR){
@@ -350,26 +346,23 @@ dissect_aoe_v1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* error */
if(flags&AOE_FLAGS_ERROR){
- proto_tree_add_item(tree, hf_aoe_error, tvb, 1, 1, FALSE);
- if (check_col(pinfo->cinfo, COL_INFO)) {
- col_append_fstr(pinfo->cinfo, COL_INFO, "Error:%s ", val_to_str(tvb_get_guint8(tvb, 1), error_vals, "Unknown error<%d>"));
- }
+ proto_tree_add_item(tree, hf_aoe_error, tvb, 1, 1, ENC_BIG_ENDIAN);
+ col_append_fstr(pinfo->cinfo, COL_INFO, "Error:%s ", val_to_str(tvb_get_guint8(tvb, 1), error_vals, "Unknown error<%d>"));
}
/* major/minor address */
- proto_tree_add_item(tree, hf_aoe_major, tvb, 2, 2, FALSE);
- proto_tree_add_item(tree, hf_aoe_minor, tvb, 4, 1, FALSE);
+ proto_tree_add_item(tree, hf_aoe_major, tvb, 2, 2, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_aoe_minor, tvb, 4, 1, ENC_BIG_ENDIAN);
/* command */
cmd=tvb_get_guint8(tvb, 5);
- proto_tree_add_item(tree, hf_aoe_cmd, tvb, 5, 1, FALSE);
- if (check_col(pinfo->cinfo, COL_INFO)) {
- col_append_fstr(pinfo->cinfo, COL_INFO, "%s %s", val_to_str(cmd, cmd_vals, "Unknown command<%d>"), (flags&AOE_FLAGS_RESPONSE)?"Response":"Request");
- }
+ proto_tree_add_item(tree, hf_aoe_cmd, tvb, 5, 1, ENC_BIG_ENDIAN);
+ col_append_fstr(pinfo->cinfo, COL_INFO, "%s %s", val_to_str(cmd, cmd_vals, "Unknown command<%d>"), (flags&AOE_FLAGS_RESPONSE)?"Response":"Request");
+
/* tag */
tag=tvb_get_letohl(tvb, 6);
- proto_tree_add_item(tree, hf_aoe_tag, tvb, 6, 4, FALSE);
+ proto_tree_add_item(tree, hf_aoe_tag, tvb, 6, 4, ENC_BIG_ENDIAN);
switch(cmd){
@@ -393,7 +386,7 @@ dissect_aoe(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
col_clear(pinfo->cinfo, COL_INFO);
if (parent_tree) {
- item = proto_tree_add_item(parent_tree, proto_aoe, tvb, 0, -1, FALSE);
+ item = proto_tree_add_item(parent_tree, proto_aoe, tvb, 0, -1, ENC_BIG_ENDIAN);
tree = proto_item_add_subtree(item, ett_aoe);
}