aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-aim-location.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2013-10-13 18:14:59 +0000
committerBill Meier <wmeier@newsguy.com>2013-10-13 18:14:59 +0000
commit76d4b43a292ec42aeb91e7c81169ef1d017c6b17 (patch)
tree835719465e739bdd8c2d5b96ab0589513200b054 /epan/dissectors/packet-aim-location.c
parentee6916b838f68b21c762293ad46390b5a137c964 (diff)
Minor whitespace, formatting & etc changes.
svn path=/trunk/; revision=52588
Diffstat (limited to 'epan/dissectors/packet-aim-location.c')
-rw-r--r--epan/dissectors/packet-aim-location.c76
1 files changed, 36 insertions, 40 deletions
diff --git a/epan/dissectors/packet-aim-location.c b/epan/dissectors/packet-aim-location.c
index 227a850551..a64c86b1c8 100644
--- a/epan/dissectors/packet-aim-location.c
+++ b/epan/dissectors/packet-aim-location.c
@@ -43,9 +43,9 @@ void proto_reg_handoff_aim_location(void);
#define AIM_LOCATION_RIGHTS_TLV_MAX_CAPABILITIES 0x0002
static const aim_tlv aim_location_rights_tlvs[] = {
- { AIM_LOCATION_RIGHTS_TLV_MAX_PROFILE_LENGTH, "Max Profile Length", dissect_aim_tlv_value_uint16 },
- { AIM_LOCATION_RIGHTS_TLV_MAX_CAPABILITIES, "Max capabilities", dissect_aim_tlv_value_uint16 },
- { 0, NULL, NULL }
+ { AIM_LOCATION_RIGHTS_TLV_MAX_PROFILE_LENGTH, "Max Profile Length", dissect_aim_tlv_value_uint16 },
+ { AIM_LOCATION_RIGHTS_TLV_MAX_CAPABILITIES, "Max capabilities", dissect_aim_tlv_value_uint16 },
+ { 0, NULL, NULL }
};
#define AIM_LOCATE_TAG_TLV_SIG_TYPE 0x0001
@@ -60,16 +60,16 @@ static const aim_tlv aim_location_rights_tlvs[] = {
#define AIM_LOCATE_TAG_TLV_HTML_INFO_DATA 0x000E
static const aim_tlv aim_locate_tags_tlvs[] = {
- { AIM_LOCATE_TAG_TLV_SIG_TYPE, "Signature MIME Type", dissect_aim_tlv_value_string },
- { AIM_LOCATE_TAG_TLV_SIG_DATA, "Signature Data", dissect_aim_tlv_value_string },
- { AIM_LOCATE_TAG_TLV_UNAVAILABLE_TYPE, "Away Message MIME Type", dissect_aim_tlv_value_string },
- { AIM_LOCATE_TAG_TLV_UNAVAILABLE_DATA, "Away Message Data", dissect_aim_tlv_value_string },
- { AIM_LOCATE_TAG_TLV_CAPABILITIES, "Client Capabilities", dissect_aim_tlv_value_client_capabilities },
- { AIM_LOCATE_TAG_TLV_SIG_TIME, "Signature Time", dissect_aim_tlv_value_time },
- { AIM_LOCATE_TAG_TLV_UNAVAILABLE_TIME, "Away Message Time", dissect_aim_tlv_value_time },
- { AIM_LOCATE_TAG_TLV_SUPPORT_HOST_SIG, "Enable Server Based Profiles", dissect_aim_tlv_value_uint8 },
- { AIM_LOCATE_TAG_TLV_HTML_INFO_TYPE, "Host Based Buddy MIME Type", dissect_aim_tlv_value_string },
- { AIM_LOCATE_TAG_TLV_HTML_INFO_DATA, "Host Bases Buddy Data", dissect_aim_tlv_value_string },
+ { AIM_LOCATE_TAG_TLV_SIG_TYPE, "Signature MIME Type" , dissect_aim_tlv_value_string },
+ { AIM_LOCATE_TAG_TLV_SIG_DATA, "Signature Data" , dissect_aim_tlv_value_string },
+ { AIM_LOCATE_TAG_TLV_UNAVAILABLE_TYPE, "Away Message MIME Type" , dissect_aim_tlv_value_string },
+ { AIM_LOCATE_TAG_TLV_UNAVAILABLE_DATA, "Away Message Data" , dissect_aim_tlv_value_string },
+ { AIM_LOCATE_TAG_TLV_CAPABILITIES, "Client Capabilities" , dissect_aim_tlv_value_client_capabilities },
+ { AIM_LOCATE_TAG_TLV_SIG_TIME, "Signature Time" , dissect_aim_tlv_value_time },
+ { AIM_LOCATE_TAG_TLV_UNAVAILABLE_TIME, "Away Message Time" , dissect_aim_tlv_value_time },
+ { AIM_LOCATE_TAG_TLV_SUPPORT_HOST_SIG, "Enable Server Based Profiles" , dissect_aim_tlv_value_uint8 },
+ { AIM_LOCATE_TAG_TLV_HTML_INFO_TYPE, "Host Based Buddy MIME Type" , dissect_aim_tlv_value_string },
+ { AIM_LOCATE_TAG_TLV_HTML_INFO_DATA, "Host Bases Buddy Data" , dissect_aim_tlv_value_string },
{ 0, NULL, NULL }
};
@@ -78,10 +78,10 @@ static const aim_tlv aim_locate_tags_tlvs[] = {
#define FAMILY_LOCATION_USERINFO_INFOTYPE_CAPS 0x0005
static const value_string aim_snac_location_request_user_info_infotypes[] = {
- { FAMILY_LOCATION_USERINFO_INFOTYPE_GENERALINFO, "Request General Info" },
- { FAMILY_LOCATION_USERINFO_INFOTYPE_AWAYMSG, "Request Away Message" },
- { FAMILY_LOCATION_USERINFO_INFOTYPE_CAPS, "Request Capabilities" },
- { 0, NULL }
+ { FAMILY_LOCATION_USERINFO_INFOTYPE_GENERALINFO, "Request General Info" },
+ { FAMILY_LOCATION_USERINFO_INFOTYPE_AWAYMSG, "Request Away Message" },
+ { FAMILY_LOCATION_USERINFO_INFOTYPE_CAPS, "Request Capabilities" },
+ { 0, NULL }
};
/* Initialize the protocol and registered fields */
@@ -107,7 +107,7 @@ static int dissect_aim_location_setuserinfo(tvbuff_t *tvb, packet_info *pinfo, p
static int dissect_aim_location_watcher_notification(tvbuff_t *tvb, packet_info *pinfo, proto_tree *loc_tree)
{
int offset = 0;
- while(tvb_length_remaining(tvb, offset) > 0) {
+ while (tvb_length_remaining(tvb, offset) > 0) {
offset = dissect_aim_buddyname(tvb, pinfo, offset, loc_tree);
}
return offset;
@@ -118,15 +118,13 @@ static int dissect_aim_location_user_info_query(tvbuff_t *tvb, packet_info *pinf
return dissect_aim_buddyname(tvb, pinfo, 4, loc_tree);
}
-static int dissect_aim_snac_location_request_user_information(tvbuff_t *tvb,
- packet_info *pinfo _U_,
- proto_tree *tree)
+static int dissect_aim_snac_location_request_user_information(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
{
- int offset = 0;
+ int offset = 0;
guint8 buddyname_length = 0;
/* Info Type */
- proto_tree_add_item(tree, hf_aim_snac_location_request_user_info_infotype,
+ proto_tree_add_item(tree, hf_aim_snac_location_request_user_info_infotype,
tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
@@ -142,11 +140,9 @@ static int dissect_aim_snac_location_request_user_information(tvbuff_t *tvb,
return offset;
}
-static int dissect_aim_snac_location_user_information(tvbuff_t *tvb,
- packet_info *pinfo _U_,
- proto_tree *tree)
+static int dissect_aim_snac_location_user_information(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
{
- int offset = 0;
+ int offset = 0;
guint8 buddyname_length = 0;
/* Buddy Name length */
@@ -168,15 +164,15 @@ static int dissect_aim_snac_location_user_information(tvbuff_t *tvb,
}
static const aim_subtype aim_fnac_family_location[] = {
- { 0x0001, "Error", dissect_aim_snac_error },
- { 0x0002, "Request Rights", NULL },
- { 0x0003, "Rights Info", dissect_aim_location_rightsinfo },
- { 0x0004, "Set User Info", dissect_aim_location_setuserinfo },
- { 0x0005, "Request User Info", dissect_aim_snac_location_request_user_information },
- { 0x0006, "User Info", dissect_aim_snac_location_user_information },
- { 0x0007, "Watcher Subrequest", NULL },
- { 0x0008, "Watcher Notification", dissect_aim_location_watcher_notification },
- { 0x0015, "User Info Query", dissect_aim_location_user_info_query },
+ { 0x0001, "Error" , dissect_aim_snac_error },
+ { 0x0002, "Request Rights" , NULL },
+ { 0x0003, "Rights Info" , dissect_aim_location_rightsinfo },
+ { 0x0004, "Set User Info" , dissect_aim_location_setuserinfo },
+ { 0x0005, "Request User Info" , dissect_aim_snac_location_request_user_information },
+ { 0x0006, "User Info" , dissect_aim_snac_location_user_information },
+ { 0x0007, "Watcher Subrequest" , NULL },
+ { 0x0008, "Watcher Notification" , dissect_aim_location_watcher_notification },
+ { 0x0015, "User Info Query" , dissect_aim_location_user_info_query },
{ 0, NULL, NULL }
};
@@ -189,16 +185,16 @@ proto_register_aim_location(void)
/* Setup list of header fields */
static hf_register_info hf[] = {
{ &hf_aim_buddyname_len,
- { "Buddyname len", "aim_location.buddynamelen", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
+ { "Buddyname len", "aim_location.buddynamelen", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }
},
{ &hf_aim_buddyname,
- { "Buddy Name", "aim_location.buddyname", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }
+ { "Buddy Name", "aim_location.buddyname", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }
},
{ &hf_aim_userinfo_warninglevel,
- { "Warning Level", "aim_location.userinfo.warninglevel", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL },
+ { "Warning Level", "aim_location.userinfo.warninglevel", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL },
},
{ &hf_aim_snac_location_request_user_info_infotype,
- { "Infotype", "aim_location.snac.request_user_info.infotype", FT_UINT16, BASE_HEX, VALS(aim_snac_location_request_user_info_infotypes), 0x0,
+ { "Infotype", "aim_location.snac.request_user_info.infotype", FT_UINT16, BASE_HEX, VALS(aim_snac_location_request_user_info_infotypes), 0x0,
NULL, HFILL }
},
};