1 /* packet-aim-directory.c
2 * Routines for AIM Instant Messenger (OSCAR) dissection, SNAC Directory
3 * Copyright 2004, Jelmer Vernooij <jelmer@samba.org>
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1998 Gerald Combs
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
30 #include <epan/packet.h>
31 #include <epan/strutil.h>
33 #include "packet-aim.h"
35 void proto_register_aim_directory(void);
36 void proto_reg_handoff_aim_directory(void);
38 #define FAMILY_DIRECTORY 0x000F
40 static int proto_aim_directory
= -1;
41 static int ett_aim_directory
= -1;
43 static int dissect_aim_directory_user_repl(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
)
46 while (tvb_length_remaining(tvb
, offset
) > 0) {
47 offset
= dissect_aim_tlv(tvb
, pinfo
, offset
, tree
, aim_client_tlvs
);
52 static const aim_subtype aim_fnac_family_directory
[] = {
53 { 0x0001, "Error", dissect_aim_snac_error
},
54 { 0x0002, "Client search for user request", NULL
},
55 { 0x0003, "Server reply for search request (found users)", dissect_aim_directory_user_repl
},
56 { 0x0004, "Request interests list from server", NULL
},
57 { 0x0005, "Interests list", NULL
},
62 /* Register the protocol with Wireshark */
64 proto_register_aim_directory(void)
67 /* Setup list of header fields */
69 static hf_register_info hf[] = {
72 /* Setup protocol subtree array */
73 static gint
*ett
[] = {
76 /* Register the protocol name and description */
77 proto_aim_directory
= proto_register_protocol("AIM Directory Search", "AIM Directory", "aim_dir");
79 /* Required function calls to register the header fields and subtrees used */
81 proto_register_field_array(proto_aim_directory, hf, array_length(hf));*/
82 proto_register_subtree_array(ett
, array_length(ett
));
86 proto_reg_handoff_aim_directory(void)
88 aim_init_family(proto_aim_directory
, ett_aim_directory
, FAMILY_DIRECTORY
, aim_fnac_family_directory
);