diff options
author | Guy Harris <guy@alum.mit.edu> | 2011-09-22 03:10:30 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2011-09-22 03:10:30 +0000 |
commit | fd2f8183537eb146960d864bf6b890b2dbc01a10 (patch) | |
tree | 65569699040f312fa6b9083fa6336dfc9c23faea /epan/dissectors/packet-aim-ssi.c | |
parent | ad1efb6b9c4c2c50289d7264d6ae79afcb1ae7b4 (diff) |
Use ENC_ values in proto_tree_add_item() calls.
In the AgentX dissector, make the "flags" arguments guint8, to match
what's passed in.
In the AIM dissector, use val_to_str() in col_add_str() calls - it gives
the same result if there's a match, and puts a note in the Info column
if there isn't, and is less complicated.
In the AJP13 dissector:
update the URL for the protocol documentation;
add #defines for message types, and use them;
for "enumerated data type" fields, make the fields numerical
rather than strings and give them the value_string tables;
get rid of col_check() calls;
make a Boolean item an FT_BOOLEAN.
svn path=/trunk/; revision=39085
Diffstat (limited to 'epan/dissectors/packet-aim-ssi.c')
-rw-r--r-- | epan/dissectors/packet-aim-ssi.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/epan/dissectors/packet-aim-ssi.c b/epan/dissectors/packet-aim-ssi.c index fcb6829efa..490726efe3 100644 --- a/epan/dissectors/packet-aim-ssi.c +++ b/epan/dissectors/packet-aim-ssi.c @@ -112,31 +112,31 @@ static int dissect_ssi_item(tvbuff_t *tvb, packet_info *pinfo _U_, int offset, p /* Buddy Name Length */ buddyname_length = tvb_get_ntohs(tvb, offset); - proto_tree_add_item(ssi_entry, hf_aim_fnac_subtype_ssi_buddyname_len, tvb, offset, 2, FALSE); + proto_tree_add_item(ssi_entry, hf_aim_fnac_subtype_ssi_buddyname_len, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; /* Buddy Name */ if (buddyname_length > 0) { - proto_tree_add_item(ssi_entry, hf_aim_fnac_subtype_ssi_buddyname, tvb, offset, buddyname_length, FALSE); + proto_tree_add_item(ssi_entry, hf_aim_fnac_subtype_ssi_buddyname, tvb, offset, buddyname_length, ENC_ASCII|ENC_BIG_ENDIAN); offset += buddyname_length; } /* Buddy group ID */ - proto_tree_add_item(ssi_entry, hf_aim_fnac_subtype_ssi_gid, tvb, offset, 2, FALSE); + proto_tree_add_item(ssi_entry, hf_aim_fnac_subtype_ssi_gid, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; /* Buddy ID */ - proto_tree_add_item(ssi_entry, hf_aim_fnac_subtype_ssi_bid, tvb, offset, 2, FALSE); + proto_tree_add_item(ssi_entry, hf_aim_fnac_subtype_ssi_bid, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; /* Buddy Type */ - proto_tree_add_item(ssi_entry, hf_aim_fnac_subtype_ssi_type, tvb, offset, 2, FALSE); + proto_tree_add_item(ssi_entry, hf_aim_fnac_subtype_ssi_type, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; /* Size of the following TLV in bytes (as opposed to the number of TLV objects in the chain) */ tlv_len = tvb_get_ntohs(tvb, offset); - proto_tree_add_item(ssi_entry, hf_aim_fnac_subtype_ssi_tlvlen, tvb, offset, 2, FALSE); + proto_tree_add_item(ssi_entry, hf_aim_fnac_subtype_ssi_tlvlen, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; endoffset = offset; @@ -192,7 +192,7 @@ static int dissect_aim_snac_ssi_time_and_items_num(tvbuff_t *tvb, packet_info *p offset += 4; /* get number of SSI items */ - proto_tree_add_item(tree, hf_aim_fnac_subtype_ssi_numitems, tvb, offset, 2, FALSE); + proto_tree_add_item(tree, hf_aim_fnac_subtype_ssi_numitems, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; return offset; @@ -208,11 +208,11 @@ static int dissect_aim_snac_ssi_list(tvbuff_t *tvb, packet_info *pinfo _U_, prot gint ssi_entry_size; /* SSI Version */ - proto_tree_add_item(tree, hf_aim_fnac_subtype_ssi_version, tvb, offset, 1, FALSE); + proto_tree_add_item(tree, hf_aim_fnac_subtype_ssi_version, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; /* Number of items */ - proto_tree_add_item(tree, hf_aim_fnac_subtype_ssi_numitems, tvb, offset, 2, FALSE); + proto_tree_add_item(tree, hf_aim_fnac_subtype_ssi_numitems, tvb, offset, 2, ENC_BIG_ENDIAN); num_items = tvb_get_ntohs(tvb, offset); offset += 2; @@ -237,28 +237,28 @@ static int dissect_aim_snac_ssi_auth_request(tvbuff_t *tvb, packet_info *pinfo _ /* get buddy length (1 byte) */ guint8 buddyname_length = tvb_get_guint8(tvb, offset); - proto_tree_add_item(tree, hf_aim_fnac_subtype_ssi_buddyname_len8, tvb, offset, 1, FALSE); + proto_tree_add_item(tree, hf_aim_fnac_subtype_ssi_buddyname_len8, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; /* show buddy name */ if (buddyname_length > 0) { - proto_tree_add_item(tree, hf_aim_fnac_subtype_ssi_buddyname, tvb, offset, buddyname_length, FALSE); + proto_tree_add_item(tree, hf_aim_fnac_subtype_ssi_buddyname, tvb, offset, buddyname_length, ENC_ASCII|ENC_BIG_ENDIAN); offset += buddyname_length; } /* get reason message length (2 bytes) */ reason_length = tvb_get_ntohs(tvb, offset); - proto_tree_add_item(tree, hf_aim_fnac_subtype_ssi_reason_str_len, tvb, offset, 2, FALSE); + proto_tree_add_item(tree, hf_aim_fnac_subtype_ssi_reason_str_len, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; /* show reason message if present */ if (reason_length > 0) { - proto_tree_add_item(tree, hf_aim_fnac_subtype_ssi_reason_str, tvb, offset, reason_length, FALSE); + proto_tree_add_item(tree, hf_aim_fnac_subtype_ssi_reason_str, tvb, offset, reason_length, ENC_ASCII|ENC_BIG_ENDIAN); offset += reason_length; } /* unknown (always 0x0000 ???) */ /*unknown = tvb_get_ntohs(tvb, offset);*/ - proto_tree_add_item(tree, hf_aim_fnac_subtype_ssi_grant_auth_unkn, tvb, offset, 2, FALSE); + proto_tree_add_item(tree, hf_aim_fnac_subtype_ssi_grant_auth_unkn, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; return offset; @@ -271,27 +271,27 @@ static int dissect_aim_snac_ssi_auth_reply(tvbuff_t *tvb, packet_info *pinfo _U_ /* get buddy length (1 byte) */ guint8 buddyname_length = tvb_get_guint8(tvb, offset); - proto_tree_add_item(tree, hf_aim_fnac_subtype_ssi_buddyname_len8, tvb, offset, 1, FALSE); + proto_tree_add_item(tree, hf_aim_fnac_subtype_ssi_buddyname_len8, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; /* show buddy name */ if (buddyname_length > 0) { - proto_tree_add_item(tree, hf_aim_fnac_subtype_ssi_buddyname, tvb, offset, buddyname_length, FALSE); + proto_tree_add_item(tree, hf_aim_fnac_subtype_ssi_buddyname, tvb, offset, buddyname_length, ENC_ASCII|ENC_BIG_ENDIAN); offset += buddyname_length; } /* accept/reject authorization flag */ - proto_tree_add_item(tree, hf_aim_fnac_subtype_ssi_allow_auth, tvb, offset, 1, FALSE); + proto_tree_add_item(tree, hf_aim_fnac_subtype_ssi_allow_auth, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; /* get reason message length (2 bytes) */ reason_length = tvb_get_ntohs(tvb, offset); - proto_tree_add_item(tree, hf_aim_fnac_subtype_ssi_reason_str_len, tvb, offset, 2, FALSE); + proto_tree_add_item(tree, hf_aim_fnac_subtype_ssi_reason_str_len, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; /* show reason message if present */ if (reason_length > 0) { - proto_tree_add_item(tree, hf_aim_fnac_subtype_ssi_reason_str, tvb, offset, reason_length, FALSE); + proto_tree_add_item(tree, hf_aim_fnac_subtype_ssi_reason_str, tvb, offset, reason_length, ENC_ASCII|ENC_BIG_ENDIAN); offset += reason_length; } |