aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-aim-stats.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2004-09-21 08:01:29 +0000
committerGuy Harris <guy@alum.mit.edu>2004-09-21 08:01:29 +0000
commit94e550fe69ae9f2c1a33be6a98d6a99ff0fa4208 (patch)
treeb1fa0013f96edec2436ff6962ce8eef4053910b5 /epan/dissectors/packet-aim-stats.c
parentecd078e68ac5ee6e93e66c4ff2157b3141844f19 (diff)
From Jelmer Vernooij:
Remove some code duplication from the Oscar dissector (reduces the number of lines by 500) by providing a custom registration function for oscar families (aim_init_family). This also fixes a number of issues with column names. Add minor updates such as adding support for the Capability Info TLV on users. svn path=/trunk/; revision=12060
Diffstat (limited to 'epan/dissectors/packet-aim-stats.c')
-rw-r--r--epan/dissectors/packet-aim-stats.c30
1 files changed, 10 insertions, 20 deletions
diff --git a/epan/dissectors/packet-aim-stats.c b/epan/dissectors/packet-aim-stats.c
index 2a5da29b2d..9758cea575 100644
--- a/epan/dissectors/packet-aim-stats.c
+++ b/epan/dissectors/packet-aim-stats.c
@@ -41,28 +41,21 @@
#define FAMILY_STATS 0x000B
-/* Family User Stats */
-#define FAMILY_STATS_ERROR 0x0001
-#define FAMILY_STATS_SETREPORTINTERVAL 0x0002
-#define FAMILY_STATS_REPORTREQ 0x0003
-#define FAMILY_STATS_REPORTACK 0x0004
-#define FAMILY_STATS_DEFAULT 0xffff
-
-static const value_string aim_fnac_family_stats[] = {
- { FAMILY_STATS_ERROR, "Error" },
- { FAMILY_STATS_SETREPORTINTERVAL, "Set Report Interval" },
- { FAMILY_STATS_REPORTREQ, "Report Request" },
- { FAMILY_STATS_REPORTACK, "Report Ack" },
- { FAMILY_STATS_DEFAULT, "Stats Default" },
- { 0, NULL }
-};
-
/* Initialize the protocol and registered fields */
static int proto_aim_stats = -1;
/* Initialize the subtree pointers */
static gint ett_aim_stats = -1;
+static const aim_subtype aim_fnac_family_stats[] = {
+ { 0x0001, "Error", dissect_aim_snac_error },
+ { 0x0002, "Set Report Interval", NULL },
+ { 0x0003, "Report Request", NULL },
+ { 0x0004, "Report Ack", NULL },
+ { 0, NULL, NULL }
+};
+
+
/* Register the protocol with Ethereal */
void
proto_register_aim_stats(void)
@@ -90,8 +83,5 @@ proto_register_aim_stats(void)
void
proto_reg_handoff_aim_stats(void)
{
- /*dissector_handle_t aim_handle;*/
-/*FIXME: aim_handle = new_create_dissector_handle(dissect_aim_snac_stats, proto_aim_stats);
- dissector_add("aim.family", FAMILY_STATS, aim_handle);*/
- aim_init_family(FAMILY_STATS, "Statistic", aim_fnac_family_stats);
+ aim_init_family(proto_aim_stats, ett_aim_stats, FAMILY_STATS, aim_fnac_family_stats);
}