2 * Copyright 2004, Jelmer Vernooij <jelmer@samba.org>
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25 #ifndef __PACKET_AIM_H__
26 #define __PACKET_AIM_H__
29 #include "packet-dcerpc.h"
31 #define MAX_BUDDYNAME_LENGTH 30
33 typedef struct _aim_tlv {
36 int (*dissector) (proto_item *ti, guint16 value_id, tvbuff_t *tvb, packet_info *);
42 struct tcpinfo *tcpinfo;
45 typedef struct _aim_subtype {
48 int (*dissector) (tvbuff_t *, packet_info *, proto_tree *);
51 typedef struct _aim_family {
57 const aim_subtype *subtypes;
60 void aim_init_family(int proto, int ett, guint16 family, const aim_subtype *subtypes);
62 int dissect_aim_buddyname(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tree);
63 void aim_get_message( guchar *msg, tvbuff_t *tvb, int msg_offset, int msg_length);
64 int aim_get_buddyname( guchar *name, tvbuff_t *tvb, int len_offset, int name_offset);
65 int dissect_aim_userinfo(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tree);
67 int dissect_aim_snac_error(tvbuff_t *tvb, packet_info *pinfo, proto_tree *aim_tree);
69 int dissect_aim_ssi_result(tvbuff_t *tvb, packet_info *pinfo, proto_tree *aim_tree);
71 int dissect_aim_tlv(tvbuff_t *tvb, packet_info *pinfo _U_, int offset, proto_tree *tree, const aim_tlv *);
72 int dissect_aim_tlv_list(tvbuff_t *tvb, packet_info *pinfo _U_, int offset, proto_tree *tree, const aim_tlv *);
73 int dissect_aim_tlv_sequence(tvbuff_t *tvb, packet_info *pinfo _U_, int offset, proto_tree *tree, const aim_tlv *);
75 const aim_family *aim_get_family( guint16 family );
76 const aim_subtype *aim_get_subtype( guint16 family, guint16 subtype);
78 int dissect_aim_tlv_value_string(proto_item *ti, guint16, tvbuff_t *, packet_info *);
79 int dissect_aim_tlv_value_string08_array(proto_item *ti, guint16, tvbuff_t *, packet_info *);
80 int dissect_aim_tlv_value_uint8(proto_item *ti, guint16, tvbuff_t *, packet_info *);
81 int dissect_aim_tlv_value_uint16(proto_item *ti, guint16, tvbuff_t *, packet_info *);
82 int dissect_aim_tlv_value_uint32(proto_item *ti, guint16, tvbuff_t *, packet_info *);
83 int dissect_aim_tlv_value_bytes(proto_item *ti, guint16, tvbuff_t *, packet_info *);
84 int dissect_aim_tlv_value_ipv4(proto_item *ti, guint16, tvbuff_t *, packet_info *);
85 int dissect_aim_tlv_value_time(proto_item *ti, guint16, tvbuff_t *, packet_info *);
86 int dissect_aim_tlv_value_client_capabilities(proto_item *ti, guint16, tvbuff_t *, packet_info *);
87 int dissect_aim_capability(proto_tree *entry, tvbuff_t *tvb, int offset);
88 int dissect_aim_userclass(tvbuff_t *tvb, int offset, int len, proto_item *ti, guint32 flags);
89 int dissect_aim_tlv_value_userclass(proto_item *ti, guint16, tvbuff_t *, packet_info *);
90 int dissect_aim_tlv_value_messageblock (proto_item *ti, guint16 valueid _U_, tvbuff_t *tvb, packet_info *);
92 extern const aim_tlv aim_client_tlvs[];
93 extern const aim_tlv aim_onlinebuddy_tlvs[];
94 extern const aim_tlv aim_motd_tlvs[];