aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-aim-bos.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2014-10-05 15:57:05 -0400
committerBill Meier <wmeier@newsguy.com>2014-10-05 20:19:02 +0000
commit0b18d6cb77022494a875e6e0d9d2ad27fb6ac6d9 (patch)
tree8cb06839ae3a921f3238c5979da986e4c0358638 /epan/dissectors/packet-aim-bos.c
parente2bdfa101b4a60318c9d7ba3dc3487418b5951b6 (diff)
Add editor modelines; Adjust whitespace as needed.
Change-Id: I6e70c933ae61a97377235d67b2f6a1b3d67dc155 Reviewed-on: https://code.wireshark.org/review/4484 Reviewed-by: Bill Meier <wmeier@newsguy.com>
Diffstat (limited to 'epan/dissectors/packet-aim-bos.c')
-rw-r--r--epan/dissectors/packet-aim-bos.c131
1 files changed, 72 insertions, 59 deletions
diff --git a/epan/dissectors/packet-aim-bos.c b/epan/dissectors/packet-aim-bos.c
index 69fe798562..b99d12ef92 100644
--- a/epan/dissectors/packet-aim-bos.c
+++ b/epan/dissectors/packet-aim-bos.c
@@ -36,26 +36,26 @@ void proto_reg_handoff_aim_bos(void);
/* Family BOS (Misc) */
-#define CLASS_UNCONFIRMED 0x0001
-#define CLASS_ADMINISTRATOR 0x0002
-#define CLASS_AOL 0x0004
-#define CLASS_COMMERCIAL 0x0008
-#define CLASS_FREE 0x0010
-#define CLASS_AWAY 0x0020
-#define CLASS_ICQ 0x0040
-#define CLASS_WIRELESS 0x0080
-#define CLASS_UNKNOWN100 0x0100
-#define CLASS_UNKNOWN200 0x0200
-#define CLASS_UNKNOWN400 0x0400
-#define CLASS_UNKNOWN800 0x0800
-
-#define AIM_PRIVACY_TLV_MAX_VISIB_LIST_SIZE 0x001
-#define AIM_PRIVACY_TLV_MAX_INVISIB_LIST_SIZE 0x002
+#define CLASS_UNCONFIRMED 0x0001
+#define CLASS_ADMINISTRATOR 0x0002
+#define CLASS_AOL 0x0004
+#define CLASS_COMMERCIAL 0x0008
+#define CLASS_FREE 0x0010
+#define CLASS_AWAY 0x0020
+#define CLASS_ICQ 0x0040
+#define CLASS_WIRELESS 0x0080
+#define CLASS_UNKNOWN100 0x0100
+#define CLASS_UNKNOWN200 0x0200
+#define CLASS_UNKNOWN400 0x0400
+#define CLASS_UNKNOWN800 0x0800
+
+#define AIM_PRIVACY_TLV_MAX_VISIB_LIST_SIZE 0x001
+#define AIM_PRIVACY_TLV_MAX_INVISIB_LIST_SIZE 0x002
static const aim_tlv aim_privacy_tlvs[] = {
- { AIM_PRIVACY_TLV_MAX_VISIB_LIST_SIZE, "Max visible list size", dissect_aim_tlv_value_uint16 },
- { AIM_PRIVACY_TLV_MAX_INVISIB_LIST_SIZE, "Max invisible list size", dissect_aim_tlv_value_uint16 },
- { 0, NULL, NULL },
+ { AIM_PRIVACY_TLV_MAX_VISIB_LIST_SIZE, "Max visible list size", dissect_aim_tlv_value_uint16 },
+ { AIM_PRIVACY_TLV_MAX_INVISIB_LIST_SIZE, "Max invisible list size", dissect_aim_tlv_value_uint16 },
+ { 0, NULL, NULL },
};
/* Initialize the protocol and registered fields */
@@ -68,24 +68,24 @@ static gint ett_aim_bos = -1;
static int dissect_aim_bos_set_group_perm(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *bos_tree)
{
- int offset = 0;
- guint32 userclass = tvb_get_ntohl(tvb, offset);
- proto_item *ti = proto_tree_add_uint(bos_tree, hf_aim_bos_class, tvb, offset, 4, userclass);
- return dissect_aim_userclass(tvb, offset, 4, ti, userclass);
+ int offset = 0;
+ guint32 userclass = tvb_get_ntohl(tvb, offset);
+ proto_item *ti = proto_tree_add_uint(bos_tree, hf_aim_bos_class, tvb, offset, 4, userclass);
+ return dissect_aim_userclass(tvb, offset, 4, ti, userclass);
}
static int dissect_aim_bos_rights(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bos_tree)
{
- return dissect_aim_tlv_sequence(tvb, pinfo, 0, bos_tree, aim_privacy_tlvs);
+ return dissect_aim_tlv_sequence(tvb, pinfo, 0, bos_tree, aim_privacy_tlvs);
}
static int dissect_aim_bos_buddyname(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bos_tree)
{
- int offset = 0;
- while(tvb_reported_length_remaining(tvb, offset) > 0) {
- offset = dissect_aim_buddyname(tvb, pinfo, offset, bos_tree);
- }
- return offset;
+ int offset = 0;
+ while(tvb_reported_length_remaining(tvb, offset) > 0) {
+ offset = dissect_aim_buddyname(tvb, pinfo, offset, bos_tree);
+ }
+ return offset;
}
/* Register the protocol with Wireshark */
@@ -93,45 +93,58 @@ void
proto_register_aim_bos(void)
{
- /* Setup list of header fields */
- static hf_register_info hf[] = {
+ /* Setup list of header fields */
+ static hf_register_info hf[] = {
#if 0
- { &hf_aim_bos_data,
- { "Data", "aim_bos.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
- },
+ { &hf_aim_bos_data,
+ { "Data", "aim_bos.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }
+ },
#endif
- { &hf_aim_bos_class,
- { "User class", "aim_bos.userclass", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL },
- },
- };
-
- /* Setup protocol subtree array */
- static gint *ett[] = {
- &ett_aim_bos,
- };
-
- /* Register the protocol name and description */
- proto_aim_bos = proto_register_protocol("AIM Privacy Management Service", "AIM BOS", "aim_bos");
-
- /* Required function calls to register the header fields and subtrees used */
- proto_register_field_array(proto_aim_bos, hf, array_length(hf));
- proto_register_subtree_array(ett, array_length(ett));
+ { &hf_aim_bos_class,
+ { "User class", "aim_bos.userclass", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL },
+ },
+ };
+
+ /* Setup protocol subtree array */
+ static gint *ett[] = {
+ &ett_aim_bos,
+ };
+
+ /* Register the protocol name and description */
+ proto_aim_bos = proto_register_protocol("AIM Privacy Management Service", "AIM BOS", "aim_bos");
+
+ /* Required function calls to register the header fields and subtrees used */
+ proto_register_field_array(proto_aim_bos, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
}
static const aim_subtype aim_fnac_family_bos[] = {
- { 0x0001, "Error", dissect_aim_snac_error },
- { 0x0002, "Rights Query", NULL },
- { 0x0003, "Rights" , dissect_aim_bos_rights },
- { 0x0004, "Set Group Permissions Mask", dissect_aim_bos_set_group_perm },
- { 0x0005, "Add To Visible List", dissect_aim_bos_buddyname },
- { 0x0006, "Delete From Visible List", dissect_aim_bos_buddyname },
- { 0x0007, "Add To Invisible List", dissect_aim_bos_buddyname },
- { 0x0008, "Delete From Invisible List", dissect_aim_bos_buddyname },
- { 0, NULL, NULL }
+ { 0x0001, "Error", dissect_aim_snac_error },
+ { 0x0002, "Rights Query", NULL },
+ { 0x0003, "Rights" , dissect_aim_bos_rights },
+ { 0x0004, "Set Group Permissions Mask", dissect_aim_bos_set_group_perm },
+ { 0x0005, "Add To Visible List", dissect_aim_bos_buddyname },
+ { 0x0006, "Delete From Visible List", dissect_aim_bos_buddyname },
+ { 0x0007, "Add To Invisible List", dissect_aim_bos_buddyname },
+ { 0x0008, "Delete From Invisible List", dissect_aim_bos_buddyname },
+ { 0, NULL, NULL }
};
void
proto_reg_handoff_aim_bos(void)
{
- aim_init_family(proto_aim_bos, ett_aim_bos, FAMILY_BOS, aim_fnac_family_bos);
+ aim_init_family(proto_aim_bos, ett_aim_bos, FAMILY_BOS, aim_fnac_family_bos);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 4
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
+ */