2 * Routines for AIM Instant Messenger (OSCAR) dissection
3 * Copyright 2000, Ralf Hoelzer <ralf@well.com>
4 * Copyright 2004, Jelmer Vernooij <jelmer@samba.org>
5 * Copyright 2004, Devin Heitmueller <dheitmueller@netilla.com>
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1998 Gerald Combs
11 * SPDX-License-Identifier: GPL-2.0-or-later
17 #include <epan/packet.h>
18 #include <epan/strutil.h>
19 #include <epan/to_str.h>
22 #include "packet-tcp.h"
23 #include "packet-tls.h"
24 #include <epan/prefs.h>
25 #include <epan/expert.h>
27 void proto_register_aim(void);
28 void proto_reg_handoff_aim(void);
30 #define TCP_PORTS_AIM_DEFAULT "5190"
35 #define FAMILY_GENERIC 0x0001
36 #define FAMILY_LOCATION 0x0002
37 #define FAMILY_BUDDYLIST 0x0003
38 #define FAMILY_MESSAGING 0x0004
39 #define FAMILY_ADVERTS 0x0005
40 #define FAMILY_INVITATION 0x0006
41 #define FAMILY_ADMIN 0x0007
42 #define FAMILY_POPUP 0x0008
43 #define FAMILY_BOS 0x0009
44 #define FAMILY_USERLOOKUP 0x000A
45 #define FAMILY_STATS 0x000B
46 #define FAMILY_TRANSLATE 0x000C
47 #define FAMILY_CHAT_NAV 0x000D
48 #define FAMILY_CHAT 0x000E
49 #define FAMILY_DIRECTORY 0x000F
50 #define FAMILY_SST 0x0010
51 #define FAMILY_SSI 0x0013
52 #define FAMILY_ICQ 0x0015
53 #define FAMILY_SIGNON 0x0017
54 #define FAMILY_EMAIL 0x0018
55 #define FAMILY_OFT 0xfffe
58 #define CHANNEL_NEW_CONN 0x01
59 #define CHANNEL_SNAC_DATA 0x02
60 #define CHANNEL_FLAP_ERR 0x03
61 #define CHANNEL_CLOSE_CONN 0x04
62 #define CHANNEL_KEEP_ALIVE 0x05
64 #define FAMILY_ALL_ERROR_INVALID_HEADER 0x0001
65 #define FAMILY_ALL_ERROR_SERVER_RATE_LIMIT_EXCEEDED 0x0002
66 #define FAMILY_ALL_ERROR_CLIENT_RATE_LIMIT_EXCEEDED 0x0003
67 #define FAMILY_ALL_ERROR_RECIPIENT_NOT_LOGGED_IN 0x0004
68 #define FAMILY_ALL_ERROR_REQUESTED_SERVICE_UNAVAILABLE 0x0005
69 #define FAMILY_ALL_ERROR_REQUESTED_SERVICE_NOT_DEFINED 0x0006
70 #define FAMILY_ALL_ERROR_OBSOLETE_SNAC 0x0007
71 #define FAMILY_ALL_ERROR_NOT_SUPPORTED_BY_SERVER 0x0008
72 #define FAMILY_ALL_ERROR_NOT_SUPPORTED_BY_CLIENT 0x0009
73 #define FAMILY_ALL_ERROR_REFUSED_BY_CLIENT 0x000a
74 #define FAMILY_ALL_ERROR_REPLY_TOO_BIG 0x000b
75 #define FAMILY_ALL_ERROR_RESPONSES_LOST 0x000c
76 #define FAMILY_ALL_ERROR_REQUEST_DENIED 0x000d
77 #define FAMILY_ALL_ERROR_INCORRECT_SNAC_FORMAT 0x000e
78 #define FAMILY_ALL_ERROR_INSUFFICIENT_RIGHTS 0x000f
79 #define FAMILY_ALL_ERROR_RECIPIENT_BLOCKED 0x0010
80 #define FAMILY_ALL_ERROR_SENDER_TOO_EVIL 0x0011
81 #define FAMILY_ALL_ERROR_RECEIVER_TOO_EVIL 0x0012
82 #define FAMILY_ALL_ERROR_USER_TEMP_UNAVAILABLE 0x0013
83 #define FAMILY_ALL_ERROR_NO_MATCH 0x0014
84 #define FAMILY_ALL_ERROR_LIST_OVERFLOW 0x0015
85 #define FAMILY_ALL_ERROR_REQUEST_AMBIGUOUS 0x0016
86 #define FAMILY_ALL_ERROR_SERVER_QUEUE_FULL 0x0017
87 #define FAMILY_ALL_ERROR_NOT_WHILE_ON_AOL 0x0018
89 static const value_string aim_flap_channels
[] = {
90 { CHANNEL_NEW_CONN
, "New Connection" },
91 { CHANNEL_SNAC_DATA
, "SNAC Data" },
92 { CHANNEL_FLAP_ERR
, "FLAP-Level Error" },
93 { CHANNEL_CLOSE_CONN
, "Close Connection" },
94 { CHANNEL_KEEP_ALIVE
, "Keep Alive" },
98 static const value_string aim_snac_errors
[] = {
99 { FAMILY_ALL_ERROR_INVALID_HEADER
, "Invalid SNAC Header" },
100 { FAMILY_ALL_ERROR_SERVER_RATE_LIMIT_EXCEEDED
, "Server rate limit exceeded" },
101 { FAMILY_ALL_ERROR_CLIENT_RATE_LIMIT_EXCEEDED
, "Client rate limit exceeded" },
102 { FAMILY_ALL_ERROR_RECIPIENT_NOT_LOGGED_IN
, "Recipient not logged in" },
103 { FAMILY_ALL_ERROR_REQUESTED_SERVICE_UNAVAILABLE
, "Requested service unavailable" },
104 { FAMILY_ALL_ERROR_REQUESTED_SERVICE_NOT_DEFINED
, "Requested service not defined" },
105 { FAMILY_ALL_ERROR_OBSOLETE_SNAC
, "Obsolete SNAC issued" },
106 { FAMILY_ALL_ERROR_NOT_SUPPORTED_BY_SERVER
, "Not supported by server" },
107 { FAMILY_ALL_ERROR_NOT_SUPPORTED_BY_CLIENT
, "Not supported by client" },
108 { FAMILY_ALL_ERROR_REFUSED_BY_CLIENT
, "Refused by client" },
109 { FAMILY_ALL_ERROR_REPLY_TOO_BIG
, "Reply too big" },
110 { FAMILY_ALL_ERROR_RESPONSES_LOST
, "Responses lost" },
111 { FAMILY_ALL_ERROR_REQUEST_DENIED
, "Request denied" },
112 { FAMILY_ALL_ERROR_INCORRECT_SNAC_FORMAT
, "Incorrect SNAC format" },
113 { FAMILY_ALL_ERROR_INSUFFICIENT_RIGHTS
, "Insufficient rights" },
114 { FAMILY_ALL_ERROR_RECIPIENT_BLOCKED
, "Recipient blocked" },
115 { FAMILY_ALL_ERROR_SENDER_TOO_EVIL
, "Sender too evil" },
116 { FAMILY_ALL_ERROR_RECEIVER_TOO_EVIL
, "Receiver too evil" },
117 { FAMILY_ALL_ERROR_USER_TEMP_UNAVAILABLE
, "User temporarily unavailable" },
118 { FAMILY_ALL_ERROR_NO_MATCH
, "No match" },
119 { FAMILY_ALL_ERROR_LIST_OVERFLOW
, "List overflow" },
120 { FAMILY_ALL_ERROR_REQUEST_AMBIGUOUS
, "Request ambiguous" },
121 { FAMILY_ALL_ERROR_SERVER_QUEUE_FULL
, "Server queue full" },
122 { FAMILY_ALL_ERROR_NOT_WHILE_ON_AOL
, "Not while on AOL" },
126 static int dissect_aim_tlv_value_userstatus(proto_item
*ti
, uint16_t valueid _U_
, tvbuff_t
*tvb
, packet_info
*pinfo _U_
);
127 static int dissect_aim_tlv_value_dcinfo(proto_item
*ti
, uint16_t valueid _U_
, tvbuff_t
*tvb
, packet_info
*pinfo _U_
);
128 static int dissect_aim_tlv_value_client_short_capabilities(proto_item
*ti
, uint16_t, tvbuff_t
*, packet_info
*);
131 #define DC_DISABLED 0x0000
132 #define DC_HTTPS 0x0001
133 #define DC_SOCKS 0x0002
134 #define DC_NORMAL 0x0003
135 #define DC_IMPOSSIBLE 0x0004
137 static const value_string dc_types
[] = {
138 { DC_DISABLED
, "DC disabled" },
139 { DC_HTTPS
, "DC thru firewall or HTTPS proxy" },
140 { DC_SOCKS
, "DC thru SOCKS proxy" },
141 { DC_NORMAL
, "Regular connection" },
142 { DC_IMPOSSIBLE
, "DC not possible " },
146 #define PROTO_VERSION_ICQ98 0x0004
147 #define PROTO_VERSION_ICQ99 0x0006
148 #define PROTO_VERSION_ICQ2K 0x0007
149 #define PROTO_VERSION_ICQ2K1 0x0008
150 #define PROTO_VERSION_ICQLITE 0x0009
151 #define PROTO_VERSION_ICQ2K3B 0x000A
153 static const value_string protocol_versions
[] = {
154 { PROTO_VERSION_ICQ98
, "ICQ '98" },
155 { PROTO_VERSION_ICQ99
, "ICQ '99" },
156 { PROTO_VERSION_ICQ2K
, "ICQ 2000" },
157 { PROTO_VERSION_ICQ2K1
, "ICQ 2001" },
158 { PROTO_VERSION_ICQLITE
, "ICQ Lite" },
159 { PROTO_VERSION_ICQ2K3B
, "ICQ 2003B" },
163 #define CONFIRM_STATUS_EMAIL_SENT 0x00
164 #define CONFIRM_STATUS_ALREADY_CONFIRMED 0x1E
165 #define CONFIRM_STATUS_SERVER_ERROR 0x23
167 static const value_string confirm_statusses
[] = {
168 { CONFIRM_STATUS_EMAIL_SENT
, "A confirmation email has been sent" },
169 { CONFIRM_STATUS_ALREADY_CONFIRMED
, "Account was already confirmed" },
170 { CONFIRM_STATUS_SERVER_ERROR
, "Server couldn't start confirmation process" },
174 #define CLASS_UNCONFIRMED 0x00000001
175 #define CLASS_ADMINISTRATOR 0x00000002
176 #define CLASS_AOL 0x00000004
177 #define CLASS_COMMERCIAL 0x00000008
178 #define CLASS_AIM 0x00000010
179 #define CLASS_AWAY 0x00000020
180 #define CLASS_ICQ 0x00000040
181 #define CLASS_WIRELESS 0x00000080
182 #define CLASS_UNKNOWN100 0x00000100
183 #define CLASS_IMF 0x00000200
184 #define CLASS_BOT 0x00000400
185 #define CLASS_UNKNOWN800 0x00000800
186 #define CLASS_ONE_WAY_WIRELESS 0x00001000
187 #define CLASS_UNKNOWN2000 0x00002000
188 #define CLASS_UNKNOWN4000 0x00004000
189 #define CLASS_UNKNOWN8000 0x00008000
190 #define CLASS_UNKNOWN10000 0x00010000
191 #define CLASS_UNKNOWN20000 0x00020000
192 #define CLASS_NO_KNOCK_KNOCK 0x00040000
193 #define CLASS_FORWARD_MOBILE 0x00080000
195 #define FNAC_FLAG_NEXT_IS_RELATED 0x0001
196 #define FNAC_FLAG_CONTAINS_VERSION 0x8000
199 #define SSI_OP_RESULT_SUCCESS 0
200 #define SSI_OP_RESULT_DB_ERROR 1
201 #define SSI_OP_RESULT_NOT_FOUND 2
202 #define SSI_OP_RESULT_ALREADY_EXISTS 3
203 #define SSI_OP_RESULT_UNAVAILABLE 5
204 #define SSI_OP_RESULT_BAD_REQUEST 10
205 #define SSI_OP_RESULT_DB_TIME_OUT 11
206 #define SSI_OP_RESULT_OVER_ROW_LIMIT 12
207 #define SSI_OP_RESULT_NOT_EXECUTED 13
208 #define SSI_OP_RESULT_AUTH_REQUIRED 14
209 #define SSI_OP_RESULT_BAD_LOGINID 16
210 #define SSI_OP_RESULT_OVER_BUDDY_LIMIT 17
211 #define SSI_OP_RESULT_INSERT_SMART_GROUP 20
212 #define SSI_OP_RESULT_TIMEOUT 26
214 static const value_string aim_ssi_result_codes
[] = {
215 { SSI_OP_RESULT_SUCCESS
, "Success" },
216 { SSI_OP_RESULT_DB_ERROR
, "Some kind of database error" },
217 { SSI_OP_RESULT_NOT_FOUND
, "Item was not found for an update or delete" },
218 { SSI_OP_RESULT_ALREADY_EXISTS
, "Item already exists for an insert" },
219 { SSI_OP_RESULT_UNAVAILABLE
, "Server or database is not available" },
220 { SSI_OP_RESULT_BAD_REQUEST
, "Request was not formed well" },
221 { SSI_OP_RESULT_DB_TIME_OUT
, "Database timed out" },
222 { SSI_OP_RESULT_OVER_ROW_LIMIT
, "Too many items of this class for an insert" },
223 { SSI_OP_RESULT_NOT_EXECUTED
, "Not executed due to other error in same request" },
224 { SSI_OP_RESULT_AUTH_REQUIRED
, "Buddy List authorization required" },
225 { SSI_OP_RESULT_BAD_LOGINID
, "Bad loginId" },
226 { SSI_OP_RESULT_OVER_BUDDY_LIMIT
, "Too many buddies" },
227 { SSI_OP_RESULT_INSERT_SMART_GROUP
, "Attempt to added a Buddy to a smart group" },
228 { SSI_OP_RESULT_TIMEOUT
, "General timeout" },
232 #define FAMILY_SSI_TYPE_BUDDY 0x0000
233 #define FAMILY_SSI_TYPE_GROUP 0x0001
234 #define FAMILY_SSI_TYPE_PERMIT 0x0002
235 #define FAMILY_SSI_TYPE_DENY 0x0003
236 #define FAMILY_SSI_TYPE_PDINFO 0x0004
237 #define FAMILY_SSI_TYPE_PRESENCEPREFS 0x0005
238 #define FAMILY_SSI_TYPE_ICONINFO 0x0014
240 static const value_string aim_fnac_family_ssi_types
[] = {
241 { FAMILY_SSI_TYPE_BUDDY
, "Buddy" },
242 { FAMILY_SSI_TYPE_GROUP
, "Group" },
243 { FAMILY_SSI_TYPE_PERMIT
, "Permit" },
244 { FAMILY_SSI_TYPE_DENY
, "Deny" },
245 { FAMILY_SSI_TYPE_PDINFO
, "PDINFO" },
246 { FAMILY_SSI_TYPE_PRESENCEPREFS
, "Presence Preferences" },
247 { FAMILY_SSI_TYPE_ICONINFO
, "Icon Info" },
251 typedef struct _aim_tlv
{
254 int (*dissector
) (proto_item
*ti
, uint16_t value_id
, tvbuff_t
*tvb
, packet_info
*);
257 typedef struct _aim_subtype
{
260 int (*dissector
) (tvbuff_t
*, packet_info
*, proto_tree
*);
263 typedef struct _aim_family
{
269 const aim_subtype
*subtypes
;
272 static int dissect_aim_tlv(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, int offset
, proto_tree
*tree
, const aim_tlv
*);
274 static int dissect_aim_tlv_value_uint16(proto_item
*ti
, uint16_t, tvbuff_t
*, packet_info
*);
277 static int proto_aim
;
278 static int proto_aim_admin
;
279 static int proto_aim_adverts
;
280 static int proto_aim_bos
;
281 static int proto_aim_buddylist
;
282 static int proto_aim_chat
;
283 static int proto_aim_chatnav
;
284 static int proto_aim_directory
;
285 static int proto_aim_email
;
286 static int proto_aim_generic
;
287 static int proto_aim_icq
;
288 static int proto_aim_invitation
;
289 static int proto_aim_location
;
290 static int proto_aim_messaging
;
291 static int proto_aim_popup
;
292 static int proto_aim_signon
;
293 static int proto_aim_ssi
;
294 static int proto_aim_sst
;
295 static int proto_aim_stats
;
296 static int proto_aim_translate
;
297 static int proto_aim_userlookup
;
300 static int hf_aim_cmd_start
;
301 static int hf_aim_channel
;
302 static int hf_aim_seqno
;
303 static int hf_aim_data
;
304 static int hf_aim_data_len
;
305 static int hf_aim_tlv_length
;
306 static int hf_aim_tlv_value_id
;
307 static int hf_aim_fnac_family
;
308 static int hf_aim_fnac_subtype
;
309 static int hf_aim_fnac_flags
;
310 static int hf_aim_fnac_flag_next_is_related
;
311 static int hf_aim_fnac_flag_contains_version
;
312 static int hf_aim_fnac_id
;
313 static int hf_aim_buddyname_len
;
314 static int hf_aim_buddyname
;
315 static int hf_aim_userinfo_warninglevel
;
316 static int hf_aim_snac_error
;
317 static int hf_aim_ssi_result_code
;
318 static int hf_aim_tlvcount
;
319 static int hf_aim_version
;
320 static int hf_aim_userclass_unconfirmed
;
321 static int hf_aim_userclass_administrator
;
322 static int hf_aim_userclass_aol
;
323 static int hf_aim_userclass_commercial
;
324 static int hf_aim_userclass_aim
;
325 static int hf_aim_userclass_away
;
326 static int hf_aim_userclass_icq
;
327 static int hf_aim_userclass_wireless
;
328 static int hf_aim_userclass_unknown100
;
329 static int hf_aim_userclass_imf
;
330 static int hf_aim_userclass_bot
;
331 static int hf_aim_userclass_unknown800
;
332 static int hf_aim_userclass_one_way_wireless
;
333 static int hf_aim_userclass_unknown2000
;
334 static int hf_aim_userclass_unknown4000
;
335 static int hf_aim_userclass_unknown8000
;
336 static int hf_aim_userclass_unknown10000
;
337 static int hf_aim_userclass_unknown20000
;
338 static int hf_aim_userclass_no_knock_knock
;
339 static int hf_aim_userclass_forward_mobile
;
340 static int hf_aim_nickinfo_caps
;
341 static int hf_aim_nickinfo_short_caps
;
342 static int hf_aim_messageblock_featuresdes
;
343 static int hf_aim_messageblock_featureslen
;
344 static int hf_aim_messageblock_features
;
345 static int hf_aim_messageblock_info
;
346 static int hf_aim_messageblock_len
;
347 static int hf_aim_messageblock_charset
;
348 static int hf_aim_messageblock_charsubset
;
349 static int hf_aim_messageblock_message
;
351 static int hf_aim_dcinfo_ip
;
352 static int hf_aim_dcinfo_tcpport
;
353 static int hf_aim_dcinfo_type
;
354 static int hf_aim_dcinfo_proto_version
;
355 static int hf_aim_dcinfo_auth_cookie
;
356 static int hf_aim_dcinfo_webport
;
357 static int hf_aim_dcinfo_client_future
;
358 static int hf_aim_dcinfo_last_info_update
;
359 static int hf_aim_dcinfo_last_ext_info_update
;
360 static int hf_aim_dcinfo_last_ext_status_update
;
361 static int hf_aim_dcinfo_unknown
;
362 static int hf_aim_string08
;
364 static int hf_admin_acctinfo_code
;
365 static int hf_admin_acctinfo_unknown
;
366 static int hf_admin_acctinfo_permissions
;
367 static int hf_admin_confirm_status
;
369 /* static int hf_aim_bos_data; */
370 static int hf_aim_bos_class
;
372 static int hf_aim_buddylist_userinfo_warninglevel
;
374 static int hf_aim_chat_screen_name
;
376 static int hf_generic_motd_motdtype
;
377 static int hf_generic_family
;
378 static int hf_generic_version
;
379 static int hf_generic_dll_version
;
380 static int hf_generic_servicereq_service
;
381 static int hf_generic_rateinfo_numclasses
;
382 static int hf_generic_rateinfo_windowsize
;
383 static int hf_generic_rateinfo_clearlevel
;
384 static int hf_generic_rateinfo_alertlevel
;
385 static int hf_generic_rateinfo_limitlevel
;
386 static int hf_generic_rateinfo_disconnectlevel
;
387 static int hf_generic_rateinfo_currentlevel
;
388 static int hf_generic_rateinfo_maxlevel
;
389 static int hf_generic_rateinfo_lasttime
;
390 static int hf_generic_rateinfo_curstate
;
391 static int hf_generic_rateinfo_classid
;
392 static int hf_generic_rateinfo_numpairs
;
393 static int hf_generic_rateinfoack_group
;
394 static int hf_generic_ratechange_msg
;
395 static int hf_generic_migration_numfams
;
396 static int hf_generic_priv_flags
;
397 static int hf_generic_allow_idle_see
;
398 static int hf_generic_allow_member_see
;
399 static int hf_generic_selfinfo_warninglevel
;
400 static int hf_generic_evil_new_warn_level
;
401 static int hf_generic_idle_time
;
402 static int hf_generic_client_ver_req_offset
;
403 static int hf_generic_client_ver_req_length
;
404 static int hf_generic_client_ver_req_hash
;
405 static int hf_generic_ext_status_type
;
406 static int hf_generic_ext_status_length
;
407 static int hf_generic_ext_status_flags
;
408 static int hf_generic_ext_status_data
;
410 static int hf_icq_tlv_data_chunk_size
;
411 static int hf_icq_tlv_request_owner_uid
;
412 static int hf_icq_tlv_request_type
;
413 static int hf_icq_meta_subtype
;
414 static int hf_icq_tlv_request_seq_num
;
415 static int hf_icq_dropped_msg_flag
;
417 static int hf_aim_snac_location_request_user_info_infotype
;
418 static int hf_aim_location_userinfo_warninglevel
;
419 static int hf_aim_location_buddyname_len
;
420 static int hf_aim_location_buddyname
;
422 static int hf_aim_icbm_channel
;
423 static int hf_aim_icbm_cookie
;
424 static int hf_aim_icbm_msg_flags
;
425 static int hf_aim_icbm_max_sender_warnlevel
;
426 static int hf_aim_icbm_max_receiver_warnlevel
;
427 static int hf_aim_icbm_max_snac_size
;
428 static int hf_aim_icbm_min_msg_interval
;
429 static int hf_aim_icbm_notification_cookie
;
430 static int hf_aim_icbm_notification_channel
;
431 static int hf_aim_icbm_notification_type
;
432 static int hf_aim_icbm_rendezvous_nak
;
433 static int hf_aim_icbm_rendezvous_nak_length
;
434 static int hf_aim_message_channel_id
;
435 static int hf_aim_icbm_evil
;
436 static int hf_aim_evil_warn_level
;
437 static int hf_aim_evil_new_warn_level
;
438 static int hf_aim_rendezvous_msg_type
;
439 static int hf_aim_icbm_client_err_reason
;
440 static int hf_aim_icbm_client_err_protocol_version
;
441 static int hf_aim_icbm_client_err_client_caps_flags
;
442 static int hf_aim_rendezvous_extended_data_message_type
;
443 static int hf_aim_rendezvous_extended_data_message_flags
;
444 static int hf_aim_rendezvous_extended_data_message_flags_normal
;
445 static int hf_aim_rendezvous_extended_data_message_flags_auto
;
446 static int hf_aim_rendezvous_extended_data_message_flags_multi
;
447 static int hf_aim_rendezvous_extended_data_message_status_code
;
448 static int hf_aim_rendezvous_extended_data_message_priority_code
;
449 static int hf_aim_rendezvous_extended_data_message_text_length
;
450 static int hf_aim_rendezvous_extended_data_message_text
;
452 static int hf_aim_messaging_plugin
;
453 static int hf_aim_icbm_client_err_length
;
454 static int hf_aim_messaging_unknown_uint8
;
455 static int hf_aim_messaging_unknown_uint16
;
456 static int hf_aim_icbm_client_err_downcounter
;
457 static int hf_aim_messaging_unknown_data
;
458 static int hf_aim_messaging_plugin_specific_data
;
460 static int hf_aim_infotype
;
461 static int hf_aim_signon_challenge_len
;
462 static int hf_aim_signon_challenge
;
464 static int hf_aim_fnac_subtype_ssi_version
;
465 static int hf_aim_fnac_subtype_ssi_numitems
;
466 static int hf_aim_fnac_subtype_ssi_last_change_time
;
467 static int hf_aim_fnac_subtype_ssi_buddyname_len
;
468 static int hf_aim_fnac_subtype_ssi_buddyname_len8
;
469 static int hf_aim_fnac_subtype_ssi_buddyname
;
470 static int hf_aim_fnac_subtype_ssi_gid
;
471 static int hf_aim_fnac_subtype_ssi_bid
;
472 static int hf_aim_fnac_subtype_ssi_type
;
473 static int hf_aim_fnac_subtype_ssi_tlvlen
;
474 /* static int hf_aim_fnac_subtype_ssi_data; */
475 static int hf_aim_fnac_subtype_ssi_reason_str_len
;
476 static int hf_aim_fnac_subtype_ssi_reason_str
;
477 static int hf_aim_fnac_subtype_ssi_grant_auth_unkn
;
478 static int hf_aim_fnac_subtype_ssi_allow_auth
;
480 static int hf_aim_sst_unknown
;
481 static int hf_aim_sst_md5_hash
;
482 static int hf_aim_sst_md5_hash_size
;
483 static int hf_aim_sst_ref_num
;
484 static int hf_aim_sst_icon_size
;
485 static int hf_aim_sst_icon
;
487 static int hf_aim_userlookup_email
;
489 /* Initialize the subtree pointers */
491 static int ett_aim_dcinfo
;
492 static int ett_aim_buddyname
;
493 static int ett_aim_fnac
;
494 static int ett_aim_fnac_flags
;
495 static int ett_aim_tlv
;
496 static int ett_aim_tlv_value
;
497 static int ett_aim_userclass
;
498 static int ett_aim_messageblock
;
499 static int ett_aim_nickinfo_caps
;
500 static int ett_aim_nickinfo_short_caps
;
501 static int ett_aim_string08_array
;
503 static int ett_aim_admin
;
504 static int ett_aim_adverts
;
505 static int ett_aim_bos
;
506 static int ett_aim_buddylist
;
507 static int ett_aim_chat
;
508 static int ett_aim_chatnav
;
509 static int ett_aim_directory
;
510 static int ett_aim_email
;
512 static int ett_generic_clientready
;
513 static int ett_generic_migratefamilies
;
514 static int ett_generic_clientready_item
;
515 static int ett_generic_serverready
;
516 static int ett_generic
;
517 static int ett_generic_priv_flags
;
518 static int ett_generic_rateinfo_class
;
519 static int ett_generic_rateinfo_classes
;
520 static int ett_generic_rateinfo_groups
;
521 static int ett_generic_rateinfo_group
;
523 static int ett_aim_invitation
;
524 static int ett_aim_icq
;
525 static int ett_aim_icq_tlv
;
526 static int ett_aim_location
;
527 static int ett_aim_messaging
;
528 static int ett_aim_rendezvous_data
;
529 static int ett_aim_extended_data
;
530 static int ett_aim_extended_data_message_flags
;
531 static int ett_aim_popup
;
532 static int ett_aim_signon
;
533 static int ett_aim_ssi
;
535 static int ett_aim_sst
;
536 static int ett_aim_stats
;
537 static int ett_aim_translate
;
538 static int ett_aim_userlookup
;
540 static expert_field ei_aim_messageblock_len
;
542 /* desegmentation of AIM over TCP */
543 static bool aim_desegment
= true;
545 static dissector_handle_t aim_handle
;
547 static GList
*families
;
549 static const aim_subtype
550 *aim_get_subtype( uint16_t famnum
, uint16_t subtype
)
552 GList
*gl
= families
;
554 aim_family
*fam
= (aim_family
*)gl
->data
;
555 if(fam
->family
== famnum
) {
557 for(i
= 0; fam
->subtypes
[i
].name
; i
++) {
558 if(fam
->subtypes
[i
].id
== subtype
) return &(fam
->subtypes
[i
]);
568 static const aim_family
569 *aim_get_family( uint16_t famnum
)
571 GList
*gl
= families
;
573 aim_family
*fam
= (aim_family
*)gl
->data
;
574 if(fam
->family
== famnum
) return fam
;
582 aim_get_buddyname(wmem_allocator_t
*pool
, uint8_t **name
, tvbuff_t
*tvb
, int offset
)
584 uint8_t buddyname_length
;
586 buddyname_length
= tvb_get_uint8(tvb
, offset
);
588 *name
= tvb_get_string_enc(pool
, tvb
, offset
+ 1, buddyname_length
, ENC_UTF_8
|ENC_NA
);
590 return buddyname_length
;
595 aim_get_message( unsigned char *msg
, tvbuff_t
*tvb
, int msg_offset
, int msg_length
)
598 bool bracket
= false;
599 int max
, tagchars
= 0;
600 int new_offset
= msg_offset
;
601 int new_length
= msg_length
;
604 /* make sure nothing bigger than 1000 bytes is printed */
605 if( msg_length
> 999 ) return;
607 memset( msg
, '\0', 1000);
611 /* loop until HTML tag is reached - quick&dirty way to find start of message
612 * (it is nearly impossible to find the correct start offset for all client versions) */
613 while( (tagchars
< 6) && (new_length
> 5) )
615 j
= tvb_get_uint8(tvb
, new_offset
);
616 if( ( (j
== '<') && (tagchars
== 0) ) ||
617 ( (j
== 'h') && (tagchars
== 1) ) ||
618 ( (j
== 'H') && (tagchars
== 1) ) ||
619 ( (j
== 't') && (tagchars
== 2) ) ||
620 ( (j
== 'T') && (tagchars
== 2) ) ||
621 ( (j
== 'm') && (tagchars
== 3) ) ||
622 ( (j
== 'M') && (tagchars
== 3) ) ||
623 ( (j
== 'l') && (tagchars
== 4) ) ||
624 ( (j
== 'L') && (tagchars
== 4) ) ||
625 ( (j
== '>') && (tagchars
== 5) ) ) tagchars
++;
630 /* set offset and length of message to after the first HTML tag */
631 msg_offset
= new_offset
;
632 msg_length
= new_length
;
633 max
= msg_length
- 1;
636 /* find the rest of the message until either a </html> is reached or the end of the frame.
637 * All other HTML tags are stripped to display only the raw message (printable characters) */
638 while( (c
< max
) && (tagchars
< 7) )
640 j
= tvb_get_uint8(tvb
, msg_offset
+c
);
643 /* make sure this is an HTML tag by checking the order of the chars */
644 if( ( (j
== '<') && (tagchars
== 0) ) ||
645 ( (j
== '/') && (tagchars
== 1) ) ||
646 ( (j
== 'h') && (tagchars
== 2) ) ||
647 ( (j
== 'H') && (tagchars
== 2) ) ||
648 ( (j
== 't') && (tagchars
== 3) ) ||
649 ( (j
== 'T') && (tagchars
== 3) ) ||
650 ( (j
== 'm') && (tagchars
== 4) ) ||
651 ( (j
== 'M') && (tagchars
== 4) ) ||
652 ( (j
== 'l') && (tagchars
== 5) ) ||
653 ( (j
== 'L') && (tagchars
== 5) ) ||
654 ( (j
== '>') && (tagchars
== 6) ) ) tagchars
++;
657 if( j
== '<' ) bracket
= true;
658 if( j
== '>' ) bracket
= false;
659 if( (g_ascii_isprint(j
) ) && (bracket
== false) && (j
!= '>'))
661 if( g_ascii_isprint(j
) )
672 aim_init_family(int proto
, int ett
, uint16_t family
, const aim_subtype
*subtypes
)
674 aim_family
*fam
= g_new(aim_family
, 1);
675 fam
->proto
= find_protocol_by_id(proto
);
676 fam
->name
= proto_get_protocol_short_name(fam
->proto
);
677 fam
->family
= family
;
678 fam
->subtypes
= subtypes
;
679 families
= g_list_append(families
, fam
);
681 fam
->proto_id
= proto
;
686 dissect_aim_ssi_result(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*aim_tree
)
688 col_add_str(pinfo
->cinfo
, COL_INFO
,
689 val_to_str(tvb_get_ntohs(tvb
, 0), aim_ssi_result_codes
, "Unknown SSI result code 0x%02x"));
691 proto_tree_add_item (aim_tree
, hf_aim_ssi_result_code
, tvb
, 0, 2, ENC_BIG_ENDIAN
);
696 #define FNAC_TLV_FAMILY_VERSION 0x0001
698 static const aim_tlv aim_fnac_tlvs
[] = {
699 { FNAC_TLV_FAMILY_VERSION
, "SNAC Family Version", dissect_aim_tlv_value_uint16
},
704 dissect_aim_snac(tvbuff_t
*tvb
, packet_info
*pinfo
, int offset
,
705 proto_tree
*aim_tree
, proto_tree
*root_tree
)
711 proto_tree
*aim_tree_fnac
= NULL
;
714 const aim_subtype
*subtype
;
715 proto_tree
*family_tree
= NULL
;
716 const aim_family
*family
;
718 orig_offset
= offset
;
719 family_id
= tvb_get_ntohs(tvb
, offset
);
720 family
= aim_get_family(family_id
);
722 subtype_id
= tvb_get_ntohs(tvb
, offset
);
723 subtype
= aim_get_subtype(family_id
, subtype_id
);
725 flags
= tvb_get_ntohs(tvb
, offset
);
727 id
= tvb_get_ntohl(tvb
, offset
);
730 if( aim_tree
&& subtype
!= NULL
)
732 static int * const fnac_flags
[] = {
733 &hf_aim_fnac_flag_next_is_related
,
734 &hf_aim_fnac_flag_contains_version
,
738 offset
= orig_offset
;
739 aim_tree_fnac
= proto_tree_add_subtree_format(aim_tree
, tvb
, 6, 10, ett_aim_fnac
, NULL
,
740 "FNAC: Family: %s (0x%04x), Subtype: %s (0x%04x)",
741 family
? family
->name
: "Unknown", family_id
,
742 (subtype
&& subtype
->name
) ? subtype
->name
: "Unknown", subtype_id
);
744 proto_tree_add_uint_format_value (aim_tree_fnac
, hf_aim_fnac_family
,
745 tvb
, offset
, 2, family_id
, "%s (0x%04x)",
746 family
? family
->name
: "Unknown", family_id
);
749 proto_tree_add_uint_format_value (aim_tree_fnac
, hf_aim_fnac_subtype
,
750 tvb
, offset
, 2, subtype_id
, "%s (0x%04x)",
751 (subtype
&& subtype
->name
) ? subtype
->name
: "Unknown", subtype_id
);
755 proto_tree_add_bitmask(aim_tree_fnac
, tvb
, offset
, hf_aim_fnac_flags
,
756 ett_aim_fnac_flags
, fnac_flags
, ENC_BIG_ENDIAN
);
759 proto_tree_add_uint(aim_tree_fnac
, hf_aim_fnac_id
, tvb
, offset
,
764 if(flags
& FNAC_FLAG_CONTAINS_VERSION
)
766 uint16_t len
= tvb_get_ntohs(tvb
, offset
);
771 while(offset
< oldoffset
+ len
) {
772 offset
= dissect_aim_tlv(tvb
, pinfo
, offset
, aim_tree
, aim_fnac_tlvs
);
776 subtvb
= tvb_new_subset_remaining(tvb
, offset
);
779 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, family
->name
);
781 if(subtype
!= NULL
&& family
!= NULL
)
783 col_set_str(pinfo
->cinfo
, COL_INFO
, family
->name
);
784 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", %s", subtype
->name
);
786 col_set_str(pinfo
->cinfo
, COL_INFO
, "SNAC data");
789 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", %s", family
->name
);
791 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", Family: 0x%04x", family_id
);
793 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ", Subtype: 0x%04x", subtype_id
);
796 if(aim_tree
&& family
!= NULL
)
798 proto_item
*ti
= proto_tree_add_item(root_tree
, family
->proto_id
, subtvb
, 0, -1, ENC_NA
);
799 family_tree
= proto_item_add_subtree(ti
, family
->ett
);
801 proto_item_append_text(ti
, ", %s", subtype
->name
);
804 if((tvb_reported_length_remaining(tvb
, offset
) > 0) && (subtype
!= NULL
) && subtype
->dissector
)
806 subtype
->dissector(subtvb
, pinfo
, family_tree
);
811 dissect_aim_flap_err(tvbuff_t
*tvb
, packet_info
*pinfo
, int offset
,
814 col_set_str(pinfo
->cinfo
, COL_INFO
, "FLAP error");
816 /* Show the undissected payload */
817 if (tvb_reported_length_remaining(tvb
, offset
) > 0)
818 proto_tree_add_item(tree
, hf_aim_data
, tvb
, offset
, -1, ENC_NA
);
822 dissect_aim_keep_alive(tvbuff_t
*tvb
, packet_info
*pinfo
, int offset
,
825 col_set_str(pinfo
->cinfo
, COL_INFO
, "Keep Alive");
827 /* Show the undissected payload */
828 if (tvb_reported_length_remaining(tvb
, offset
) > 0)
829 proto_tree_add_item(tree
, hf_aim_data
, tvb
, offset
, -1, ENC_NA
);
833 dissect_aim_unknown_channel(tvbuff_t
*tvb
, packet_info
*pinfo
, int offset
,
836 col_set_str(pinfo
->cinfo
, COL_INFO
, "Unknown Channel");
838 /* Show the undissected payload */
839 if (tvb_reported_length_remaining(tvb
, offset
) > 0)
840 proto_tree_add_item(tree
, hf_aim_data
, tvb
, offset
, -1, ENC_NA
);
844 dissect_aim_buddyname(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, int offset
,
847 uint8_t buddyname_length
= 0;
848 proto_tree
*buddy_tree
;
850 buddyname_length
= tvb_get_uint8(tvb
, offset
);
855 buddy_tree
= proto_tree_add_subtree_format(tree
, tvb
, offset
-1, 1+buddyname_length
,
856 ett_aim_buddyname
, NULL
, "Buddy: %s",
857 tvb_format_text(pinfo
->pool
, tvb
, offset
, buddyname_length
));
858 proto_tree_add_item(buddy_tree
, hf_aim_buddyname_len
, tvb
, offset
-1, 1, ENC_BIG_ENDIAN
);
859 proto_tree_add_item(buddy_tree
, hf_aim_buddyname
, tvb
, offset
, buddyname_length
, ENC_UTF_8
);
862 return offset
+buddyname_length
;
865 typedef struct _aim_client_capability
869 } aim_client_capability
;
871 static const aim_client_capability known_client_caps
[] = {
873 {0x09461343, 0x4c7f, 0x11d1,
874 { 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}},
877 { 0x09461348, 0x4c7f, 0x11d1,
878 { 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}},
881 {0x09460000, 0x4c7f, 0x11d1,
882 { 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}},
885 {0x09460001, 0x4c7f, 0x11d1,
886 { 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}},
889 {0x09460002, 0x4c7f, 0x11d1,
890 { 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}},
893 {0x09460100, 0x4c7f, 0x11d1,
894 { 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}},
897 {0x09460101, 0x4c7f, 0x11d1,
898 { 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}},
901 {0x09460102, 0x4c7f, 0x11d1,
902 { 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}},
905 {0x09460103, 0x4c7f, 0x11d1,
906 { 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}},
909 {0x09460104, 0x4c7f, 0x11d1,
910 { 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}},
913 {0x09460105, 0x4c7f, 0x11d1,
914 { 0x82, 0x22, 0x44, 0x45, 0x45, 0x53, 0x54, 0x00}}},
916 { "Host Status Text Aware",
917 {0x0946010A, 0x4c7f, 0x11d1,
918 { 0x82, 0x22, 0x44, 0x45, 0x45, 0x53, 0x54, 0x00}}},
921 {0x0946010B, 0x4c7f, 0x11d1,
922 { 0x82, 0x22, 0x44, 0x45, 0x45, 0x53, 0x54, 0x00}}},
925 {0x094601FF, 0x4c7f, 0x11d1,
926 { 0x82, 0x22, 0x44, 0x45, 0x45, 0x53, 0x54, 0x00}}},
929 {0x09461323, 0x4c7f, 0x11d1,
930 { 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}},
933 {0x09461341, 0x4c7f, 0x11d1,
934 { 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}},
937 {0x09461343, 0x4c7f, 0x11d1,
938 {0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}},
940 { "Direct ICQ Communication",
941 {0x09461344, 0x4c7f, 0x11d1,
942 {0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}},
945 {0x09461345, 0x4c7f, 0x11d1,
946 {0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}},
949 {0x09461346, 0x4c7f, 0x11d1,
950 {0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}},
953 {0x09461347, 0x4c7f, 0x11d1,
954 {0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}},
957 {0x09461348, 0x4c7f, 0x11d1,
958 {0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}},
960 { "ICQ Server Relaying",
961 {0x09461349, 0x4c7f, 0x11d1,
962 {0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}},
965 {0x0946134a, 0x4c7f, 0x11d1,
966 {0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}},
969 {0x0946134a, 0x4c7f, 0x11d1,
970 {0x22, 0x82, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}},
973 {0x0946134b, 0x4c7f, 0x11d1,
974 {0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}},
976 { "AIM/ICQ Interoperability",
977 {0x0946134d, 0x4c7f, 0x11d1,
978 {0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}},
980 { "ICQ UTF8 Support",
981 {0x0946134e, 0x4c7f, 0x11d1,
982 {0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}},
984 { "Old ICQ UTF8 Support",
985 {0x2e7a6475, 0xfadf, 0x4dc8,
986 {0x88, 0x6f, 0xea, 0x35, 0x95, 0xfd, 0xb6, 0xdf}}},
989 {0x748f2420, 0x6287, 0x11d1,
990 {0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}},
992 { "ICQ Rich Text Format Messages",
993 {0x97b12751, 0x243c, 0x4334,
994 {0xad, 0x22, 0xd6, 0xab, 0xf7, 0x3f, 0x14, 0x92}}},
997 {0xaa4a32b5, 0xf884, 0x48c6,
998 {0xa3, 0xd7, 0x8c, 0x50, 0x97, 0x19, 0xfd, 0x5b}}},
1000 { "Trillian Encryption",
1001 {0xf2e7c7f4, 0xfead, 0x4dfb,
1002 {0xb2, 0x35, 0x36, 0x79, 0x8b, 0xdf, 0x00, 0x00}}},
1004 { NULL
, {0x0, 0x0, 0x0, { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 } } }
1007 static const aim_client_capability
*
1008 aim_find_capability (e_guid_t clsid
)
1012 for(i
= 0; known_client_caps
[i
].name
; i
++)
1014 const aim_client_capability
*caps
= &(known_client_caps
[i
]);
1016 if(memcmp(&(caps
->clsid
), &clsid
, sizeof(e_guid_t
)) == 0)
1023 static const aim_client_capability
*
1024 aim_find_short_capability(uint16_t shortid
)
1026 e_guid_t clsid
= {0x09460000, 0x4c7f, 0x11d1, {0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}};
1027 clsid
.data1
|= shortid
;
1029 return aim_find_capability(clsid
);
1033 dissect_aim_capability(proto_tree
*entry
, tvbuff_t
*tvb
, int offset
)
1035 const aim_client_capability
*caps
;
1038 tvb_get_ntohguid(tvb
, offset
, &clsid
);
1039 caps
= aim_find_capability(clsid
);
1041 proto_tree_add_guid_format(entry
, hf_aim_nickinfo_caps
, tvb
, offset
, 16,
1043 "%s {%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
1044 caps
?caps
->name
:"Unknown", clsid
.data1
, clsid
.data2
,
1045 clsid
.data3
, clsid
.data4
[0], clsid
.data4
[1], clsid
.data4
[2],
1046 clsid
.data4
[3], clsid
.data4
[4], clsid
.data4
[5], clsid
.data4
[6],
1054 dissect_aim_short_capability(proto_tree
*entry
, tvbuff_t
*tvb
, int offset
)
1056 const aim_client_capability
*caps
;
1059 shortid
= tvb_get_ntohs(tvb
, offset
);
1060 caps
= aim_find_short_capability(shortid
);
1062 proto_tree_add_uint_format(entry
, hf_aim_nickinfo_short_caps
, tvb
, offset
, 2,
1065 caps
?caps
->name
:"Unknown", shortid
1072 dissect_aim_tlv_value_client_capabilities(proto_item
*ti
, uint16_t valueid _U_
, tvbuff_t
*tvb
, packet_info
*pinfo _U_
)
1077 proto_item_set_text(ti
, "Client Capabilities List");
1079 entry
= proto_item_add_subtree(ti
, ett_aim_nickinfo_caps
);
1081 while (tvb_reported_length_remaining(tvb
, offset
) > 0) {
1082 offset
= dissect_aim_capability(entry
, tvb
, offset
);
1085 return tvb_reported_length(tvb
);
1089 dissect_aim_tlv_value_client_short_capabilities(proto_item
*ti
, uint16_t valueid _U_
, tvbuff_t
*tvb
, packet_info
*pinfo _U_
)
1094 proto_item_set_text(ti
, "Short Client Capabilities List");
1096 entry
= proto_item_add_subtree(ti
, ett_aim_nickinfo_short_caps
);
1098 while (tvb_reported_length_remaining(tvb
, offset
) > 0) {
1099 offset
= dissect_aim_short_capability(entry
, tvb
, offset
);
1102 return tvb_reported_length(tvb
);
1106 dissect_aim_tlv_value_time(proto_item
*ti _U_
, uint16_t valueid _U_
, tvbuff_t
*tvb
, packet_info
*pinfo _U_
)
1109 return tvb_reported_length(tvb
);
1113 dissect_aim_userclass(tvbuff_t
*tvb
, int offset
, int len
, proto_item
*ti
, uint32_t value
)
1116 static int * const flags
[] = {
1117 &hf_aim_userclass_unconfirmed
,
1118 &hf_aim_userclass_administrator
,
1119 &hf_aim_userclass_aol
,
1120 &hf_aim_userclass_commercial
,
1121 &hf_aim_userclass_aim
,
1122 &hf_aim_userclass_away
,
1123 &hf_aim_userclass_icq
,
1124 &hf_aim_userclass_wireless
,
1125 &hf_aim_userclass_unknown100
,
1126 &hf_aim_userclass_imf
,
1127 &hf_aim_userclass_bot
,
1128 &hf_aim_userclass_unknown800
,
1129 &hf_aim_userclass_one_way_wireless
,
1130 &hf_aim_userclass_unknown2000
,
1131 &hf_aim_userclass_unknown4000
,
1132 &hf_aim_userclass_unknown8000
,
1133 &hf_aim_userclass_unknown10000
,
1134 &hf_aim_userclass_unknown20000
,
1135 &hf_aim_userclass_no_knock_knock
,
1136 &hf_aim_userclass_forward_mobile
,
1140 entry
= proto_item_add_subtree(ti
, ett_aim_userclass
);
1141 proto_tree_add_bitmask_list_value(entry
, tvb
, offset
, len
, flags
, value
);
1147 dissect_aim_tlv_value_userclass(proto_item
*ti
, uint16_t valueid _U_
, tvbuff_t
*tvb
, packet_info
*pinfo _U_
)
1149 uint16_t value16
= tvb_get_ntohs(tvb
, 0);
1150 proto_item_set_text(ti
, "Value: 0x%04x", value16
);
1151 return dissect_aim_userclass(tvb
, 0, 2, ti
, value16
);
1155 dissect_aim_tlv_value_userstatus(proto_item
*ti _U_
, uint16_t valueid _U_
, tvbuff_t
*tvb
, packet_info
*pinfo _U_
)
1158 return tvb_reported_length(tvb
);
1162 dissect_aim_tlv_value_dcinfo(proto_item
*ti
, uint16_t valueid _U_
, tvbuff_t
*tvb
, packet_info
*pinfo _U_
)
1166 proto_tree
*dctree
= proto_item_add_subtree(ti
, ett_aim_dcinfo
);
1168 proto_tree_add_item(dctree
, hf_aim_dcinfo_ip
, tvb
, offset
, 4, ENC_BIG_ENDIAN
); offset
+=4;
1169 proto_tree_add_item(dctree
, hf_aim_dcinfo_tcpport
, tvb
, offset
, 4, ENC_BIG_ENDIAN
); offset
+=4;
1170 proto_tree_add_item(dctree
, hf_aim_dcinfo_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
); offset
+=1;
1171 proto_tree_add_item(dctree
, hf_aim_dcinfo_proto_version
, tvb
, offset
, 2, ENC_BIG_ENDIAN
); offset
+=2;
1172 proto_tree_add_item(dctree
, hf_aim_dcinfo_auth_cookie
, tvb
, offset
, 4, ENC_NA
); offset
+=2;
1173 proto_tree_add_item(dctree
, hf_aim_dcinfo_webport
, tvb
, offset
, 4, ENC_BIG_ENDIAN
); offset
+=4;
1174 proto_tree_add_item(dctree
, hf_aim_dcinfo_client_future
, tvb
, offset
, 4, ENC_BIG_ENDIAN
); offset
+=4;
1175 proto_tree_add_item(dctree
, hf_aim_dcinfo_last_info_update
, tvb
, offset
, 4, ENC_BIG_ENDIAN
); offset
+=4;
1176 proto_tree_add_item(dctree
, hf_aim_dcinfo_last_ext_info_update
, tvb
, offset
, 4, ENC_BIG_ENDIAN
); offset
+=4;
1177 proto_tree_add_item(dctree
, hf_aim_dcinfo_last_ext_status_update
, tvb
, offset
, 4, ENC_BIG_ENDIAN
); offset
+=4;
1178 proto_tree_add_item(dctree
, hf_aim_dcinfo_unknown
, tvb
, offset
, 2, ENC_BIG_ENDIAN
); offset
+=2;
1184 dissect_aim_tlv_value_string (proto_item
*ti
, uint16_t valueid _U_
, tvbuff_t
*tvb
, packet_info
*pinfo
)
1189 string_len
= tvb_reported_length(tvb
);
1190 buf
= tvb_get_string_enc(pinfo
->pool
, tvb
, 0, string_len
, ENC_UTF_8
|ENC_NA
);
1191 proto_item_set_text(ti
, "Value: %s", format_text(pinfo
->pool
, buf
, string_len
));
1197 dissect_aim_tlv_value_string08_array (proto_item
*ti
, uint16_t valueid _U_
, tvbuff_t
*tvb
, packet_info
*pinfo _U_
)
1202 entry
= proto_item_add_subtree(ti
, ett_aim_string08_array
);
1204 while (tvb_reported_length_remaining(tvb
, offset
) > 1)
1206 uint8_t string_len
= tvb_get_uint8(tvb
, offset
);
1207 proto_tree_add_item(entry
, hf_aim_string08
, tvb
, offset
, 1, ENC_UTF_8
|ENC_NA
);
1208 offset
+= (string_len
+1);
1215 dissect_aim_tlv_value_bytes (proto_item
*ti _U_
, uint16_t valueid _U_
, tvbuff_t
*tvb
, packet_info
*pinfo _U_
)
1217 return tvb_reported_length(tvb
);
1221 dissect_aim_tlv_value_uint8 (proto_item
*ti
, uint16_t valueid _U_
, tvbuff_t
*tvb
, packet_info
*pinfo _U_
)
1223 uint8_t value8
= tvb_get_uint8(tvb
, 0);
1224 proto_item_set_text(ti
, "Value: %d", value8
);
1229 dissect_aim_tlv_value_uint16 (proto_item
*ti
, uint16_t valueid _U_
, tvbuff_t
*tvb
, packet_info
*pinfo _U_
)
1231 uint16_t value16
= tvb_get_ntohs(tvb
, 0);
1232 proto_item_set_text(ti
, "Value: %d", value16
);
1237 dissect_aim_tlv_value_ipv4 (proto_item
*ti
, uint16_t valueid _U_
, tvbuff_t
*tvb
, packet_info
*pinfo _U_
)
1239 proto_item_set_text(ti
, "Value: %s", tvb_ip_to_str(pinfo
->pool
, tvb
, 0));
1244 dissect_aim_tlv_value_uint32 (proto_item
*ti
, uint16_t valueid _U_
, tvbuff_t
*tvb
, packet_info
*pinfo _U_
)
1246 uint32_t value32
= tvb_get_ntohl(tvb
, 0);
1247 proto_item_set_text(ti
, "Value: %d", value32
);
1252 dissect_aim_tlv_value_messageblock (proto_item
*ti
, uint16_t valueid _U_
, tvbuff_t
*tvb
, packet_info
*pinfo
)
1256 uint16_t featurelen
;
1258 proto_item
* len_item
;
1261 /* Setup a new subtree */
1262 entry
= proto_item_add_subtree(ti
, ett_aim_messageblock
);
1264 /* Features descriptor */
1265 proto_tree_add_item(entry
, hf_aim_messageblock_featuresdes
, tvb
, offset
,
1269 /* Features Length */
1270 featurelen
= tvb_get_ntohs(tvb
, offset
);
1271 proto_tree_add_item(entry
, hf_aim_messageblock_featureslen
, tvb
, offset
,
1275 /* Features (should be expanded further @@@@@@@ ) */
1276 proto_tree_add_item(entry
, hf_aim_messageblock_features
, tvb
, offset
,
1277 featurelen
, ENC_NA
);
1278 offset
+= featurelen
;
1280 /* There can be multiple messages in this message block */
1281 while (tvb_reported_length_remaining(tvb
, offset
) > 0) {
1283 proto_tree_add_item(entry
, hf_aim_messageblock_info
, tvb
,
1284 offset
, 2, ENC_BIG_ENDIAN
);
1287 /* Block length (includes charset and charsubset) */
1288 len_item
= proto_tree_add_item_ret_uint(entry
, hf_aim_messageblock_len
, tvb
, offset
,
1289 2, ENC_BIG_ENDIAN
, &blocklen
);
1292 expert_add_info(pinfo
, len_item
, &ei_aim_messageblock_len
);
1298 proto_tree_add_item(entry
, hf_aim_messageblock_charset
, tvb
,
1299 offset
, 2, ENC_BIG_ENDIAN
);
1302 /* Character subset */
1303 proto_tree_add_item(entry
, hf_aim_messageblock_charsubset
, tvb
,
1304 offset
, 2, ENC_BIG_ENDIAN
);
1307 /* The actual message */
1308 buf
= tvb_get_string_enc(pinfo
->pool
, tvb
, offset
, blocklen
- 4, ENC_ASCII
|ENC_NA
);
1309 proto_item_append_text(ti
, "Message: %s ",
1310 format_text(pinfo
->pool
, buf
, blocklen
- 4));
1311 proto_tree_add_item(entry
, hf_aim_messageblock_message
, tvb
,
1312 offset
, blocklen
-4, ENC_ASCII
);
1314 offset
+= blocklen
-4;
1320 /* Dissect a TLV value */
1322 dissect_aim_tlv(tvbuff_t
*tvb
, packet_info
*pinfo
, int offset
,
1323 proto_tree
*tree
, const aim_tlv
*tlv
)
1331 proto_tree
*tlv_tree
;
1333 /* Get the value ID */
1334 valueid
= tvb_get_ntohs(tvb
, offset
);
1336 /* Figure out which entry applies from the tlv list */
1338 while (tmp
[i
].valueid
) {
1339 if (tmp
[i
].valueid
== valueid
) {
1340 /* We found a match */
1346 /* At this point, we are either pointing at the correct record, or
1347 we didn't find the record, and are pointing at the last item in the
1350 length
= tvb_get_ntohs(tvb
, offset
+2);
1352 if (tmp
[i
].desc
!= NULL
)
1357 tlv_tree
= proto_tree_add_subtree_format(tree
, tvb
, offset
, length
+ 4,
1358 ett_aim_tlv
, NULL
, "TLV: %s", desc
);
1360 proto_tree_add_uint_format_value(tlv_tree
, hf_aim_tlv_value_id
, tvb
, offset
, 2,
1361 valueid
, "%s (0x%04x)", desc
, valueid
);
1364 proto_tree_add_uint(tlv_tree
, hf_aim_tlv_length
, tvb
, offset
, 2, length
);
1367 proto_tree_add_subtree(tlv_tree
, tvb
, offset
, length
, ett_aim_tlv_value
, &ti1
, "Value");
1369 if (tmp
[i
].dissector
) {
1370 tmp
[i
].dissector(ti1
, valueid
, tvb_new_subset_length(tvb
, offset
, length
), pinfo
);
1375 /* Return the new length */
1380 dissect_aim_tlv_sequence(tvbuff_t
*tvb
, packet_info
*pinfo
, int offset
,
1381 proto_tree
*tree
, const aim_tlv
*tlv_table
)
1383 while (tvb_reported_length_remaining(tvb
, offset
) > 0) {
1384 offset
= dissect_aim_tlv(tvb
, pinfo
, offset
, tree
, tlv_table
);
1391 dissect_aim_tlv_list(tvbuff_t
*tvb
, packet_info
*pinfo
, int offset
,
1392 proto_tree
*tree
, const aim_tlv
*tlv_table
)
1394 uint16_t i
, tlv_count
= tvb_get_ntohs(tvb
, offset
);
1396 proto_tree_add_item(tree
, hf_aim_tlvcount
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1399 for(i
= 0; i
< tlv_count
; i
++) {
1400 offset
= dissect_aim_tlv(tvb
, pinfo
, offset
, tree
, tlv_table
);
1406 #define AIM_CLIENT_TLV_SCREEN_NAME 0x0001
1407 #define AIM_CLIENT_TLV_NEW_ROASTED_PASSWORD 0x0002
1408 #define AIM_CLIENT_TLV_CLIENT_ID_STRING 0x0003
1409 #define AIM_CLIENT_TLV_ERRORURL 0x0004
1410 #define AIM_CLIENT_TLV_BOS_SERVER_STRING 0x0005
1411 #define AIM_CLIENT_TLV_AUTH_COOKIE 0x0006
1412 #define AIM_CLIENT_TLV_ERRORCODE 0x0008
1413 #define AIM_CLIENT_TLV_DISCONNECT_REASON 0x0009
1414 #define AIM_CLIENT_TLV_RECONNECT_HOST 0x000a
1415 #define AIM_CLIENT_TLV_URL 0x000b
1416 #define AIM_CLIENT_TLV_DEBUG_DATA 0x000c
1417 #define AIM_CLIENT_TLV_FAMILY_ID 0x000d
1418 #define AIM_CLIENT_TLV_CLIENT_COUNTRY 0x000e
1419 #define AIM_CLIENT_TLV_CLIENT_LANGUAGE 0x000f
1420 #define AIM_CLIENT_TLV_EMAILADDR 0x0011
1421 #define AIM_CLIENT_TLV_OLD_ROASTED_PASSWORD 0x0012
1422 #define AIM_CLIENT_TLV_REGSTATUS 0x0013
1423 #define AIM_CLIENT_TLV_CLIENT_DISTRIBUTION_NUM 0x0014
1424 #define AIM_CLIENT_TLV_INVITEMESSAGE 0x0015
1425 #define AIM_CLIENT_TLV_CLIENT_ID 0x0016
1426 #define AIM_CLIENT_TLV_CLIENT_MAJOR_VERSION 0x0017
1427 #define AIM_CLIENT_TLV_CLIENT_MINOR_VERSION 0x0018
1428 #define AIM_CLIENT_TLV_CLIENT_LESSER_VERSION 0x0019
1429 #define AIM_CLIENT_TLV_CLIENT_BUILD_NUMBER 0x001a
1430 #define AIM_CLIENT_TLV_PASSWORD_MD5 0x0025
1431 #define AIM_CLIENT_TLV_LATESTBETABUILD 0x0040
1432 #define AIM_CLIENT_TLV_LATESTBETAURL 0x0041
1433 #define AIM_CLIENT_TLV_LATESTBETAINFO 0x0042
1434 #define AIM_CLIENT_TLV_LATESTBETANAME 0x0043
1435 #define AIM_CLIENT_TLV_LATESTRELEASEBUILD 0x0044
1436 #define AIM_CLIENT_TLV_LATESTRELEASEURL 0x0045
1437 #define AIM_CLIENT_TLV_LATESTRELEASEINFO 0x0046
1438 #define AIM_CLIENT_TLV_LATESTRELEASENAME 0x0047
1439 #define AIM_CLIENT_TLV_BETA_DIGEST_SIG 0x0048
1440 #define AIM_CLIENT_TLV_RELEASE_DIGEST_SIG 0x0049
1441 #define AIM_CLIENT_TLV_CLIENTUSESSI 0x004a
1442 #define AIM_CLIENT_TLV_CHANGE_PASSWORD_URL 0x0054
1443 #define AIM_CLIENT_TLV_AWAITING_AUTH 0x0066
1444 #define AIM_CLIENT_TLV_MEMBERS 0x00c8
1445 #define AIM_CLIENT_TLV_VISIBILITY_BITS 0x00c9
1446 #define AIM_CLIENT_TLV_PRIVACY 0x00ca
1447 #define AIM_CLIENT_TLV_VISIBLE_CLASS 0x00cb
1448 #define AIM_CLIENT_TLV_VISIBLE_MISC 0x00cc
1449 #define AIM_CLIENT_TLV_ICQ2K_SHORTCUT 0x00cd
1450 #define AIM_CLIENT_TLV_FIRST_LOADED_TIME 0x00d4
1451 #define AIM_CLIENT_TLV_BUDDY_ICON_MD5SUM 0x00d5
1452 #define AIM_CLIENT_TLV_GIVEN_NAME 0x0131
1453 #define AIM_CLIENT_TLV_LOCAL_EMAIL 0x0137
1454 #define AIM_CLIENT_TLV_LOCAL_SMS 0x013a
1455 #define AIM_CLIENT_TLV_LOCAL_COMMENT 0x013c
1456 #define AIM_CLIENT_TLV_LOCAL_PERSONAL_ALERT 0x013d
1457 #define AIM_CLIENT_TLV_LOCAL_PERSONAL_SOUND 0x013e
1458 #define AIM_CLIENT_TLV_FIRST_MESSAGE_SENT 0x0145
1460 static const aim_tlv aim_client_tlvs
[] = {
1461 { AIM_CLIENT_TLV_SCREEN_NAME
, "Screen name", dissect_aim_tlv_value_string
},
1462 { AIM_CLIENT_TLV_NEW_ROASTED_PASSWORD
, "Roasted password array", dissect_aim_tlv_value_bytes
},
1463 { AIM_CLIENT_TLV_OLD_ROASTED_PASSWORD
, "Old roasted password array", dissect_aim_tlv_value_bytes
},
1464 { AIM_CLIENT_TLV_CLIENT_ID_STRING
, "Client id string (name, version)", dissect_aim_tlv_value_string
},
1465 { AIM_CLIENT_TLV_CLIENT_ID
, "Client id number", dissect_aim_tlv_value_uint16
},
1466 { AIM_CLIENT_TLV_CLIENT_MAJOR_VERSION
, "Client major version", dissect_aim_tlv_value_uint16
},
1467 { AIM_CLIENT_TLV_CLIENT_MINOR_VERSION
, "Client minor version", dissect_aim_tlv_value_uint16
},
1468 { AIM_CLIENT_TLV_CLIENT_LESSER_VERSION
, "Client lesser version", dissect_aim_tlv_value_uint16
},
1469 { AIM_CLIENT_TLV_CLIENT_BUILD_NUMBER
, "Client build number", dissect_aim_tlv_value_uint16
},
1470 { AIM_CLIENT_TLV_PASSWORD_MD5
, "Password Hash (MD5)", dissect_aim_tlv_value_bytes
},
1471 { AIM_CLIENT_TLV_CLIENT_DISTRIBUTION_NUM
, "Client distribution number", dissect_aim_tlv_value_uint32
},
1472 { AIM_CLIENT_TLV_CLIENT_LANGUAGE
, "Client language", dissect_aim_tlv_value_string
},
1473 { AIM_CLIENT_TLV_CLIENT_COUNTRY
, "Client country", dissect_aim_tlv_value_string
},
1474 { AIM_CLIENT_TLV_BOS_SERVER_STRING
, "BOS server string", dissect_aim_tlv_value_string
},
1475 { AIM_CLIENT_TLV_AUTH_COOKIE
, "Authorization cookie", dissect_aim_tlv_value_bytes
},
1476 { AIM_CLIENT_TLV_ERRORURL
, "Error URL", dissect_aim_tlv_value_string
},
1477 { AIM_CLIENT_TLV_ERRORCODE
, "Error Code", dissect_aim_tlv_value_uint16
},
1478 { AIM_CLIENT_TLV_DISCONNECT_REASON
, "Disconnect Reason", dissect_aim_tlv_value_uint16
},
1479 { AIM_CLIENT_TLV_RECONNECT_HOST
, "Reconnect Hostname", dissect_aim_tlv_value_string
},
1480 { AIM_CLIENT_TLV_URL
, "URL", dissect_aim_tlv_value_string
},
1481 { AIM_CLIENT_TLV_DEBUG_DATA
, "Debug Data", dissect_aim_tlv_value_uint16
},
1482 { AIM_CLIENT_TLV_EMAILADDR
, "Account Email address", dissect_aim_tlv_value_string
},
1483 { AIM_CLIENT_TLV_REGSTATUS
, "Registration Status", dissect_aim_tlv_value_uint16
},
1484 { AIM_CLIENT_TLV_LATESTBETABUILD
, "Latest Beta Build", dissect_aim_tlv_value_uint32
},
1485 { AIM_CLIENT_TLV_LATESTBETAURL
, "Latest Beta URL", dissect_aim_tlv_value_string
},
1486 { AIM_CLIENT_TLV_LATESTBETAINFO
, "Latest Beta Info", dissect_aim_tlv_value_string
},
1487 { AIM_CLIENT_TLV_LATESTBETANAME
, "Latest Beta Name", dissect_aim_tlv_value_string
},
1488 { AIM_CLIENT_TLV_LATESTRELEASEBUILD
, "Latest Release Build", dissect_aim_tlv_value_uint32
},
1489 { AIM_CLIENT_TLV_LATESTRELEASEURL
, "Latest Release URL", dissect_aim_tlv_value_string
},
1490 { AIM_CLIENT_TLV_LATESTRELEASEINFO
, "Latest Release Info", dissect_aim_tlv_value_string
},
1491 { AIM_CLIENT_TLV_LATESTRELEASENAME
, "Latest Release Name", dissect_aim_tlv_value_string
},
1492 { AIM_CLIENT_TLV_BETA_DIGEST_SIG
, "Beta Digest Signature (MD5)" , dissect_aim_tlv_value_bytes
},
1493 { AIM_CLIENT_TLV_RELEASE_DIGEST_SIG
, "Release Digest Signature (MD5)", dissect_aim_tlv_value_bytes
},
1494 { AIM_CLIENT_TLV_CLIENTUSESSI
, "Use SSI", dissect_aim_tlv_value_uint8
},
1495 { AIM_CLIENT_TLV_FAMILY_ID
, "Service (SNAC Family) ID", dissect_aim_tlv_value_uint16
},
1496 { AIM_CLIENT_TLV_CHANGE_PASSWORD_URL
, "Change password url", dissect_aim_tlv_value_string
},
1497 { AIM_CLIENT_TLV_AWAITING_AUTH
, "Awaiting Authorization", dissect_aim_tlv_value_bytes
},
1498 { AIM_CLIENT_TLV_MEMBERS
, "Members of this Group", dissect_aim_tlv_value_bytes
},
1499 { AIM_CLIENT_TLV_VISIBILITY_BITS
, "Bitfield", dissect_aim_tlv_value_bytes
},
1500 { AIM_CLIENT_TLV_PRIVACY
, "Privacy Settings" , dissect_aim_tlv_value_uint8
},
1501 { AIM_CLIENT_TLV_VISIBLE_CLASS
, "Visible To Classes", dissect_aim_tlv_value_userclass
},
1502 { AIM_CLIENT_TLV_VISIBLE_MISC
, "Allow Others to See Data", dissect_aim_tlv_value_bytes
},
1503 { AIM_CLIENT_TLV_ICQ2K_SHORTCUT
, "ICQ2K Shortcut List", dissect_aim_tlv_value_string
},
1504 { AIM_CLIENT_TLV_FIRST_LOADED_TIME
, "First Time Buddy Was Added (Unix Timestamp)" , dissect_aim_tlv_value_uint32
},
1505 { AIM_CLIENT_TLV_BUDDY_ICON_MD5SUM
, "MD5SUM of Current Buddy Icon", dissect_aim_tlv_value_bytes
},
1506 { AIM_CLIENT_TLV_GIVEN_NAME
, "Locally Specified Buddy Name", dissect_aim_tlv_value_string
},
1507 { AIM_CLIENT_TLV_LOCAL_EMAIL
, "Locally Specified Buddy Email", dissect_aim_tlv_value_string
},
1508 { AIM_CLIENT_TLV_LOCAL_SMS
, "Locally Specified Buddy SMS", dissect_aim_tlv_value_string
},
1509 { AIM_CLIENT_TLV_LOCAL_COMMENT
, "Locally Specified Buddy Comment", dissect_aim_tlv_value_string
},
1510 { AIM_CLIENT_TLV_LOCAL_PERSONAL_ALERT
, "Personal Alert for Buddy", dissect_aim_tlv_value_uint16
},
1511 { AIM_CLIENT_TLV_LOCAL_PERSONAL_SOUND
, "Personal Sound for Buddy", dissect_aim_tlv_value_string
},
1512 { AIM_CLIENT_TLV_FIRST_MESSAGE_SENT
, "First Time Message Sent to Buddy (Unix Timestamp)", dissect_aim_tlv_value_uint32
},
1517 dissect_aim_close_conn(tvbuff_t
*tvb
, packet_info
*pinfo
, int offset
,
1520 col_set_str(pinfo
->cinfo
, COL_INFO
, "Close Connection");
1522 dissect_aim_tlv_sequence(tvb
, pinfo
, offset
, tree
, aim_client_tlvs
);
1526 dissect_aim_newconn(tvbuff_t
*tvb
, packet_info
*pinfo
, int offset
,
1529 col_set_str(pinfo
->cinfo
, COL_INFO
, "New Connection");
1531 if (tvb_reported_length_remaining(tvb
, offset
) > 0) {
1532 proto_tree_add_item(tree
, hf_aim_version
, tvb
, offset
, 4, ENC_NA
);
1534 offset
= dissect_aim_tlv_sequence(tvb
, pinfo
, offset
, tree
, aim_client_tlvs
);
1537 if (tvb_reported_length_remaining(tvb
, offset
) > 0)
1538 proto_tree_add_item(tree
, hf_aim_data
, tvb
, offset
, -1, ENC_NA
);
1543 dissect_aim_snac_error(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*aim_tree
)
1545 col_add_str(pinfo
->cinfo
, COL_INFO
,
1546 val_to_str(tvb_get_ntohs(tvb
, 0), aim_snac_errors
, "Unknown SNAC error 0x%02x"));
1548 proto_tree_add_item (aim_tree
, hf_aim_snac_error
, tvb
, 0, 2, ENC_BIG_ENDIAN
);
1550 return dissect_aim_tlv_sequence(tvb
, pinfo
, 2, aim_tree
, aim_client_tlvs
);
1554 get_aim_pdu_len(packet_info
*pinfo _U_
, tvbuff_t
*tvb
, int offset
, void *data _U_
)
1559 * Get the length of the AIM packet.
1561 plen
= tvb_get_ntohs(tvb
, offset
+ 4);
1564 * That length doesn't include the length of the header itself; add that in.
1570 dissect_aim_pdu(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data _U_
)
1573 unsigned char hdr_channel
; /* channel ID */
1574 unsigned short hdr_sequence_no
; /* Internal frame sequence number, not needed */
1575 unsigned short hdr_data_field_length
; /* length of data within frame */
1579 /* Set up structures we will need to add the protocol subtree and manage it */
1581 proto_tree
*aim_tree
= NULL
;
1583 /* Make entries in Protocol column and Info column on summary display */
1584 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "AIM");
1586 col_set_str(pinfo
->cinfo
, COL_INFO
, "AOL Instant Messenger");
1588 /* get relevant header information */
1589 offset
+= 1; /* XXX - put the identifier into the tree? */
1590 hdr_channel
= tvb_get_uint8(tvb
, offset
);
1592 hdr_sequence_no
= tvb_get_ntohs(tvb
, offset
);
1594 hdr_data_field_length
= tvb_get_ntohs(tvb
, offset
);
1597 /* In the interest of speed, if "tree" is NULL, don't do any work not
1598 necessary to generate protocol tree items. */
1600 ti
= proto_tree_add_item(tree
, proto_aim
, tvb
, 0, -1, ENC_NA
);
1601 aim_tree
= proto_item_add_subtree(ti
, ett_aim
);
1602 proto_tree_add_uint(aim_tree
, hf_aim_cmd_start
, tvb
, 0, 1, '*');
1603 proto_tree_add_item(aim_tree
, hf_aim_channel
, tvb
, 1, 1, ENC_BIG_ENDIAN
);
1604 proto_tree_add_uint(aim_tree
, hf_aim_seqno
, tvb
, 2, 2, hdr_sequence_no
);
1605 proto_tree_add_uint(aim_tree
, hf_aim_data_len
, tvb
, 4, 2, hdr_data_field_length
);
1611 case CHANNEL_NEW_CONN
:
1612 dissect_aim_newconn(tvb
, pinfo
, offset
, aim_tree
);
1614 case CHANNEL_SNAC_DATA
:
1615 dissect_aim_snac(tvb
, pinfo
, offset
, aim_tree
, tree
);
1617 case CHANNEL_FLAP_ERR
:
1618 dissect_aim_flap_err(tvb
, pinfo
, offset
, aim_tree
);
1620 case CHANNEL_CLOSE_CONN
:
1621 dissect_aim_close_conn(tvb
, pinfo
, offset
, aim_tree
);
1623 case CHANNEL_KEEP_ALIVE
:
1624 dissect_aim_keep_alive(tvb
, pinfo
, offset
, aim_tree
);
1627 dissect_aim_unknown_channel(tvb
, pinfo
, offset
, aim_tree
);
1631 return tvb_reported_length(tvb
);
1634 /* Code to actually dissect the packets */
1636 dissect_aim(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data
)
1638 /* check, if this is really an AIM packet, they start with 0x2a */
1639 /* XXX - I've seen some stuff starting with 0x5a followed by 0x2a */
1641 if(tvb_reported_length(tvb
) >= 1 && tvb_get_uint8(tvb
, 0) != 0x2a)
1643 /* Not an instant messenger packet, just happened to use the
1646 * XXX - if desegmentation disabled, this might be a continuation
1647 * packet, not a non-AIM packet
1652 tcp_dissect_pdus(tvb
, pinfo
, tree
, aim_desegment
, 6, get_aim_pdu_len
,
1653 dissect_aim_pdu
, data
);
1654 return tvb_reported_length(tvb
);
1658 dissect_aim_ssl_heur(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data
)
1660 struct tlsinfo
*tlsinfo
= (struct tlsinfo
*) data
;
1661 /* XXX improve heuristics */
1662 if (tvb_reported_length(tvb
) < 1 || tvb_get_uint8(tvb
, 0) != 0x2a) {
1665 dissect_aim(tvb
, pinfo
, tree
, NULL
);
1666 *(tlsinfo
->app_handle
) = aim_handle
;
1670 /***********************************************************************************************************
1672 ***********************************************************************************************************/
1673 static int dissect_aim_admin_accnt_info_req(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*admin_tree
)
1675 proto_tree_add_item(admin_tree
, hf_admin_acctinfo_code
, tvb
, 0, 2, ENC_BIG_ENDIAN
);
1676 proto_tree_add_item(admin_tree
, hf_admin_acctinfo_unknown
, tvb
, 2, 2, ENC_BIG_ENDIAN
);
1680 static int dissect_aim_admin_accnt_info_repl(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*admin_tree
)
1683 proto_tree_add_item(admin_tree
, hf_admin_acctinfo_permissions
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1685 return dissect_aim_tlv_list(tvb
, pinfo
, offset
, admin_tree
, aim_client_tlvs
);
1688 static int dissect_aim_admin_info_change_req(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*admin_tree
)
1690 return dissect_aim_tlv_sequence(tvb
, pinfo
, 0, admin_tree
, aim_client_tlvs
);
1693 static int dissect_aim_admin_cfrm_repl(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*admin_tree
)
1696 proto_tree_add_item(admin_tree
, hf_admin_confirm_status
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1698 return dissect_aim_tlv_sequence(tvb
, pinfo
, offset
, admin_tree
, aim_client_tlvs
);
1701 static const aim_subtype aim_fnac_family_admin
[] = {
1702 { 0x0001, "Error", dissect_aim_snac_error
},
1703 { 0x0002, "Request Account Information", dissect_aim_admin_accnt_info_req
},
1704 { 0x0003, "Requested Account Information", dissect_aim_admin_accnt_info_repl
},
1705 { 0x0004, "Infochange Request", dissect_aim_admin_info_change_req
},
1706 { 0x0005, "Infochange Reply", dissect_aim_admin_accnt_info_repl
},
1707 { 0x0006, "Account Confirm Request", NULL
},
1708 { 0x0007, "Account Confirm Reply", dissect_aim_admin_cfrm_repl
},
1712 /***********************************************************************************************************
1714 ***********************************************************************************************************/
1715 static const aim_subtype aim_fnac_family_adverts
[] = {
1716 { 0x0001, "Error", dissect_aim_snac_error
},
1717 { 0x0002, "Request", NULL
},
1719 /* From other sources, I understand this response contains
1720 * a GIF file, haven't actually seen one though. And this
1721 * family appears to be deprecated, so we might never find out.. */
1722 { 0x0003, "Data (GIF)", NULL
},
1727 /***********************************************************************************************************
1729 ***********************************************************************************************************/
1731 /* Family BOS (Misc) */
1733 #define AIM_PRIVACY_TLV_MAX_VISIB_LIST_SIZE 0x001
1734 #define AIM_PRIVACY_TLV_MAX_INVISIB_LIST_SIZE 0x002
1736 static const aim_tlv aim_privacy_tlvs
[] = {
1737 { AIM_PRIVACY_TLV_MAX_VISIB_LIST_SIZE
, "Max visible list size", dissect_aim_tlv_value_uint16
},
1738 { AIM_PRIVACY_TLV_MAX_INVISIB_LIST_SIZE
, "Max invisible list size", dissect_aim_tlv_value_uint16
},
1742 static int dissect_aim_bos_set_group_perm(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*bos_tree
)
1745 uint32_t userclass
= tvb_get_ntohl(tvb
, offset
);
1746 proto_item
*ti
= proto_tree_add_uint(bos_tree
, hf_aim_bos_class
, tvb
, offset
, 4, userclass
);
1747 return dissect_aim_userclass(tvb
, offset
, 4, ti
, userclass
);
1750 static int dissect_aim_bos_rights(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*bos_tree
)
1752 return dissect_aim_tlv_sequence(tvb
, pinfo
, 0, bos_tree
, aim_privacy_tlvs
);
1755 static int dissect_aim_bos_buddyname(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*bos_tree
)
1758 while(tvb_reported_length_remaining(tvb
, offset
) > 0) {
1759 offset
= dissect_aim_buddyname(tvb
, pinfo
, offset
, bos_tree
);
1764 static const aim_subtype aim_fnac_family_bos
[] = {
1765 { 0x0001, "Error", dissect_aim_snac_error
},
1766 { 0x0002, "Rights Query", NULL
},
1767 { 0x0003, "Rights" , dissect_aim_bos_rights
},
1768 { 0x0004, "Set Group Permissions Mask", dissect_aim_bos_set_group_perm
},
1769 { 0x0005, "Add To Visible List", dissect_aim_bos_buddyname
},
1770 { 0x0006, "Delete From Visible List", dissect_aim_bos_buddyname
},
1771 { 0x0007, "Add To Invisible List", dissect_aim_bos_buddyname
},
1772 { 0x0008, "Delete From Invisible List", dissect_aim_bos_buddyname
},
1777 /***********************************************************************************************************
1779 ***********************************************************************************************************/
1780 #define AIM_ONLINEBUDDY_USERCLASS 0x0001
1781 #define AIM_ONLINEBUDDY_ONSINCE 0x0003
1782 #define AIM_ONLINEBUDDY_IDLETIME 0x0004
1783 #define AIM_ONLINEBUDDY_MEMBERSINCE 0x0005
1784 #define AIM_ONLINEBUDDY_STATUS 0x0006
1785 #define AIM_ONLINEBUDDY_IPADDR 0x000a
1786 #define AIM_ONLINEBUDDY_DCINFO 0x000c
1787 #define AIM_ONLINEBUDDY_CAPINFO 0x000d
1788 #define AIM_ONLINEBUDDY_SESSIONLEN 0x000f
1789 #define AIM_ONLINEBUDDY_ICQSESSIONLEN 0x0010
1790 #define AIM_ONLINEBUDDY_TIMEUPDATE 0x0011
1791 #define AIM_ONLINEBUDDY_MYINSTANCENUM 0x0014
1792 #define AIM_ONLINEBUDDY_SHORTCAPS 0x0019
1793 #define AIM_ONLINEBUDDY_BARTINFO 0x001d
1794 #define AIM_ONLINEBUDDY_NICKFLAGS2 0x001f
1795 #define AIM_ONLINEBUDDY_BUDDYFEEDTIME 0x0023
1796 #define AIM_ONLINEBUDDY_SIGTIME 0x0026
1797 #define AIM_ONLINEBUDDY_AWAYTIME 0x0027
1798 #define AIM_ONLINEBUDDY_GEOCOUNTRY 0x002a
1800 static const aim_tlv aim_onlinebuddy_tlvs
[] = {
1801 { AIM_ONLINEBUDDY_USERCLASS
, "User class", dissect_aim_tlv_value_userclass
},
1802 { AIM_ONLINEBUDDY_ONSINCE
, "Online since", dissect_aim_tlv_value_uint32
},
1803 { AIM_ONLINEBUDDY_IDLETIME
, "Idle time (sec)", dissect_aim_tlv_value_uint16
},
1804 { AIM_ONLINEBUDDY_MEMBERSINCE
, "Member since", dissect_aim_tlv_value_time
},
1805 { AIM_ONLINEBUDDY_STATUS
, "Online status", dissect_aim_tlv_value_userstatus
},
1806 { AIM_ONLINEBUDDY_IPADDR
, "User IP Address", dissect_aim_tlv_value_ipv4
},
1807 { AIM_ONLINEBUDDY_DCINFO
, "DC Info", dissect_aim_tlv_value_dcinfo
},
1808 { AIM_ONLINEBUDDY_CAPINFO
, "Capability Info", dissect_aim_tlv_value_client_capabilities
},
1809 { AIM_ONLINEBUDDY_TIMEUPDATE
, "Time update", dissect_aim_tlv_value_bytes
},
1810 { AIM_ONLINEBUDDY_SESSIONLEN
, "Session Length (sec)", dissect_aim_tlv_value_uint32
},
1811 { AIM_ONLINEBUDDY_ICQSESSIONLEN
, "ICQ Session Length (sec)", dissect_aim_tlv_value_uint32
},
1812 { AIM_ONLINEBUDDY_MYINSTANCENUM
, "Client instance number", dissect_aim_tlv_value_uint8
},
1813 { AIM_ONLINEBUDDY_SHORTCAPS
, "Short Capabilities", dissect_aim_tlv_value_client_short_capabilities
},
1814 { AIM_ONLINEBUDDY_BARTINFO
, "BART Info", dissect_aim_tlv_value_bytes
},
1815 { AIM_ONLINEBUDDY_NICKFLAGS2
, "Upper bytes of Nick Flags", dissect_aim_tlv_value_bytes
},
1816 { AIM_ONLINEBUDDY_BUDDYFEEDTIME
, "Last Buddy Feed update", dissect_aim_tlv_value_time
},
1817 { AIM_ONLINEBUDDY_SIGTIME
, "Profile set time", dissect_aim_tlv_value_time
},
1818 { AIM_ONLINEBUDDY_AWAYTIME
, "Away set time", dissect_aim_tlv_value_time
},
1819 { AIM_ONLINEBUDDY_GEOCOUNTRY
, "Country code", dissect_aim_tlv_value_string
},
1823 #define AIM_BUDDYLIST_TLV_MAX_CONTACT_ENTRIES 0x0001
1824 #define AIM_BUDDYLIST_TLV_MAX_WATCHER_ENTRIES 0x0002
1825 #define AIM_BUDDYLIST_TLV_MAX_ONLINE_NOTIFICATIONS 0x0003
1827 static const aim_tlv aim_buddylist_tlvs
[] = {
1828 { AIM_BUDDYLIST_TLV_MAX_CONTACT_ENTRIES
, "Max number of contact list entries", dissect_aim_tlv_value_uint16
},
1829 { AIM_BUDDYLIST_TLV_MAX_WATCHER_ENTRIES
, "Max number of watcher list entries", dissect_aim_tlv_value_uint16
},
1830 { AIM_BUDDYLIST_TLV_MAX_ONLINE_NOTIFICATIONS
, "Max online notifications", dissect_aim_tlv_value_uint16
},
1835 dissect_aim_userinfo(tvbuff_t
*tvb
, packet_info
*pinfo
,
1836 int offset
, proto_tree
*tree
)
1838 offset
= dissect_aim_buddyname(tvb
, pinfo
, offset
, tree
);
1840 proto_tree_add_item(tree
, hf_aim_userinfo_warninglevel
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
1843 return dissect_aim_tlv_list(tvb
, pinfo
, offset
, tree
, aim_onlinebuddy_tlvs
);
1846 /* Initialize the protocol and registered fields */
1848 static int dissect_aim_buddylist_buddylist(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*buddy_tree
)
1851 while (tvb_reported_length_remaining(tvb
, offset
) > 0) {
1852 offset
= dissect_aim_buddyname( tvb
, pinfo
, offset
, buddy_tree
);
1857 static int dissect_aim_buddylist_rights_repl(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*buddy_tree
)
1859 return dissect_aim_tlv_sequence(tvb
, pinfo
, 0, buddy_tree
, aim_buddylist_tlvs
);
1862 static int dissect_aim_buddylist_reject(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*buddy_tree
)
1864 return dissect_aim_buddyname(tvb
, pinfo
, 0, buddy_tree
);
1867 static int dissect_aim_buddylist_oncoming(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*buddy_tree
)
1871 int buddyname_length
= aim_get_buddyname( pinfo
->pool
, &buddyname
, tvb
, offset
);
1873 col_set_str(pinfo
->cinfo
, COL_INFO
, "Oncoming Buddy");
1874 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ": %s",
1875 format_text(pinfo
->pool
, buddyname
, buddyname_length
));
1877 offset
+= dissect_aim_buddyname(tvb
, pinfo
, offset
, buddy_tree
);
1880 proto_tree_add_item(buddy_tree
, hf_aim_buddylist_userinfo_warninglevel
, tvb
, offset
,
1884 offset
= dissect_aim_tlv_list(tvb
, pinfo
, offset
, buddy_tree
, aim_onlinebuddy_tlvs
);
1889 static int dissect_aim_buddylist_offgoing(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*buddy_tree
)
1894 int buddyname_length
= aim_get_buddyname( pinfo
->pool
, &buddyname
, tvb
, offset
);
1896 col_set_str(pinfo
->cinfo
, COL_INFO
, "Offgoing Buddy");
1897 col_append_fstr(pinfo
->cinfo
, COL_INFO
, ": %s",
1898 format_text(pinfo
->pool
, buddyname
, buddyname_length
));
1900 offset
+= dissect_aim_buddyname(tvb
, pinfo
, offset
, buddy_tree
);
1903 proto_tree_add_item(buddy_tree
, hf_aim_buddylist_userinfo_warninglevel
, tvb
, offset
,
1907 return dissect_aim_tlv_list(tvb
, pinfo
, offset
, buddy_tree
, aim_onlinebuddy_tlvs
);
1910 static const aim_subtype aim_fnac_family_buddylist
[] = {
1911 { 0x0001, "Error", dissect_aim_snac_error
},
1912 { 0x0002, "Rights Request", NULL
},
1913 { 0x0003, "Rights Reply", dissect_aim_buddylist_rights_repl
},
1914 { 0x0004, "Add Buddy", dissect_aim_buddylist_buddylist
},
1915 { 0x0005, "Remove Buddy", dissect_aim_buddylist_buddylist
},
1916 { 0x0006, "Watchers List Request", NULL
},
1917 { 0x0007, "Watchers List Reply", dissect_aim_buddylist_buddylist
},
1918 { 0x000a, "Reject Buddy", dissect_aim_buddylist_reject
},
1919 { 0x000b, "Oncoming Buddy", dissect_aim_buddylist_oncoming
},
1920 { 0x000c, "Offgoing Buddy", dissect_aim_buddylist_offgoing
},
1925 /***********************************************************************************************************
1927 ***********************************************************************************************************/
1931 #define AIM_CHAT_TLV_BROWSABLE_TREE 0x001
1932 #define AIM_CHAT_TLV_CLASS_EXCLUSIVE 0x002
1933 #define AIM_CHAT_TLV_MAX_CONCURRENT_ROOMS 0x003
1934 #define AIM_CHAT_TLV_MAX_ROOM_NAME_LEN 0x004
1935 #define AIM_CHAT_TLV_ROOT_ROOMS 0x005
1936 #define AIM_CHAT_TLV_SEARCH_TAGS 0x006
1937 #define AIM_CHAT_TLV_CHILD_ROOMS 0x065
1938 #define AIM_CHAT_TLV_CONTAINS_USER_CLASS 0x066
1939 #define AIM_CHAT_TLV_CONTAINS_USER_ARRAY 0x067
1942 static const aim_tlv aim_chat_tlvs
[] _U_
= {
1943 { AIM_CHAT_TLV_BROWSABLE_TREE
, "Browsable tree", dissect_aim_tlv_value_bytes
},
1944 { AIM_CHAT_TLV_CLASS_EXCLUSIVE
, "Exclusively for class", dissect_aim_tlv_value_userclass
},
1945 { AIM_CHAT_TLV_MAX_CONCURRENT_ROOMS
, "Max. number of concurrent rooms", dissect_aim_tlv_value_uint8
},
1946 { AIM_CHAT_TLV_MAX_ROOM_NAME_LEN
, "Max. length of room name", dissect_aim_tlv_value_uint8
},
1947 { AIM_CHAT_TLV_ROOT_ROOMS
, "Root Rooms", dissect_aim_tlv_value_bytes
},
1948 { AIM_CHAT_TLV_SEARCH_TAGS
, "Search Tags", dissect_aim_tlv_value_bytes
},
1949 { AIM_CHAT_TLV_CHILD_ROOMS
, "Child Rooms", dissect_aim_tlv_value_bytes
},
1950 { AIM_CHAT_TLV_CONTAINS_USER_CLASS
, "Contains User Class", dissect_aim_tlv_value_bytes
},
1951 { AIM_CHAT_TLV_CONTAINS_USER_ARRAY
, "Contains User Array", dissect_aim_tlv_value_bytes
},
1957 static int dissect_aim_chat_userinfo_list(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*chat_tree
)
1960 while(tvb_reported_length_remaining(tvb
, offset
) > 0) {
1961 offset
= dissect_aim_userinfo(tvb
, pinfo
, offset
, chat_tree
);
1966 static int dissect_aim_chat_outgoing_msg(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*chat_tree _U_
)
1970 int buddyname_length
;
1972 msg
=(unsigned char *)wmem_alloc(pinfo
->pool
, 1000);
1973 buddyname_length
= aim_get_buddyname( pinfo
->pool
, &buddyname
, tvb
, 30 );
1975 /* channel message from client */
1976 aim_get_message( msg
, tvb
, 40 + buddyname_length
, tvb_reported_length(tvb
)
1977 - 40 - buddyname_length
);
1979 col_append_fstr(pinfo
->cinfo
, COL_INFO
, " -> %s", msg
);
1981 return tvb_reported_length(tvb
);
1985 static int dissect_aim_chat_incoming_msg(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*chat_tree
)
1989 /* channel message to client */
1990 int buddyname_length
;
1992 msg
=(unsigned char *)wmem_alloc(pinfo
->pool
, 1000);
1993 buddyname_length
= aim_get_buddyname( pinfo
->pool
, &buddyname
, tvb
, 30 );
1995 aim_get_message( msg
, tvb
, 36 + buddyname_length
, tvb_reported_length(tvb
)
1996 - 36 - buddyname_length
);
1998 col_append_fstr(pinfo
->cinfo
, COL_INFO
, "from: %s", buddyname
);
1999 col_append_fstr(pinfo
->cinfo
, COL_INFO
, " -> %s", msg
);
2001 proto_tree_add_string(chat_tree
, hf_aim_chat_screen_name
, tvb
, 31, buddyname_length
, buddyname
);
2003 return tvb_reported_length(tvb
);
2006 static const aim_subtype aim_fnac_family_chat
[] = {
2007 { 0x0001, "Error", dissect_aim_snac_error
},
2008 { 0x0002, "Room Info Update", NULL
},
2009 { 0x0003, "User Join", dissect_aim_chat_userinfo_list
},
2010 { 0x0004, "User Leave", dissect_aim_chat_userinfo_list
},
2011 { 0x0005, "Outgoing Message", dissect_aim_chat_outgoing_msg
},
2012 { 0x0006, "Incoming Message", dissect_aim_chat_incoming_msg
},
2013 { 0x0007, "Evil Request", NULL
},
2014 { 0x0008, "Evil Reply", NULL
},
2018 /***********************************************************************************************************
2020 ***********************************************************************************************************/
2022 static const aim_subtype aim_fnac_family_chatnav
[] = {
2023 { 0x0001, "Error", dissect_aim_snac_error
},
2024 { 0x0002, "Request Limits", NULL
},
2025 { 0x0003, "Request Exchange", NULL
},
2026 { 0x0004, "Request Room Information", NULL
},
2027 { 0x0005, "Request Extended Room Information", NULL
},
2028 { 0x0006, "Request Member List", NULL
},
2029 { 0x0007, "Search Room", NULL
},
2030 { 0x0008, "Create", NULL
},
2031 { 0x0009, "Info", NULL
},
2036 /***********************************************************************************************************
2038 ***********************************************************************************************************/
2039 static int dissect_aim_directory_user_repl(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
)
2042 while (tvb_reported_length_remaining(tvb
, offset
) > 0) {
2043 offset
= dissect_aim_tlv(tvb
, pinfo
, offset
, tree
, aim_client_tlvs
);
2048 static const aim_subtype aim_fnac_family_directory
[] = {
2049 { 0x0001, "Error", dissect_aim_snac_error
},
2050 { 0x0002, "Client search for user request", NULL
},
2051 { 0x0003, "Server reply for search request (found users)", dissect_aim_directory_user_repl
},
2052 { 0x0004, "Request interests list from server", NULL
},
2053 { 0x0005, "Interests list", NULL
},
2058 /***********************************************************************************************************
2060 ***********************************************************************************************************/
2061 static const aim_subtype aim_fnac_family_email
[] = {
2062 { 0x0006, "Email Status Request", NULL
},
2063 { 0x0007, "Email Status Reply", NULL
},
2064 { 0x0016, "Activate Email", NULL
},
2068 /***********************************************************************************************************
2070 ***********************************************************************************************************/
2071 #define STRIP_TAGS 1
2075 #define FAMILY_GENERIC_MOTD_MOTDTYPE_MDT_UPGRADE 0x0001
2076 #define FAMILY_GENERIC_MOTD_MOTDTYPE_ADV_UPGRADE 0x0002
2077 #define FAMILY_GENERIC_MOTD_MOTDTYPE_SYS_BULLETIN 0x0003
2078 #define FAMILY_GENERIC_MOTD_MOTDTYPE_NORMAL 0x0004
2079 #define FAMILY_GENERIC_MOTD_MOTDTYPE_NEWS 0x0006
2081 static const value_string aim_snac_generic_motd_motdtypes
[] = {
2082 { FAMILY_GENERIC_MOTD_MOTDTYPE_MDT_UPGRADE
, "Mandatory Upgrade Needed Notice" },
2083 { FAMILY_GENERIC_MOTD_MOTDTYPE_ADV_UPGRADE
, "Advisable Upgrade Notice" },
2084 { FAMILY_GENERIC_MOTD_MOTDTYPE_SYS_BULLETIN
, "AIM/ICQ Service System Announcements" },
2085 { FAMILY_GENERIC_MOTD_MOTDTYPE_NORMAL
, "Standard Notice" },
2086 { FAMILY_GENERIC_MOTD_MOTDTYPE_NEWS
, "News from AOL service" },
2090 #define RATEINFO_STATE_LIMITED 0x01
2091 #define RATEINFO_STATE_ALERT 0x02
2092 #define RATEINFO_STATE_CLEAR 0x03
2094 static const value_string rateinfo_states
[] = {
2095 { RATEINFO_STATE_LIMITED
, "Limited" },
2096 { RATEINFO_STATE_ALERT
, "Alert" },
2097 { RATEINFO_STATE_CLEAR
, "Clear" },
2101 #define RATECHANGE_MSG_LIMIT_PARAMS_CHANGED 0x0001
2102 #define RATECHANGE_MSG_LIMIT_WARN 0x0002
2103 #define RATECHANGE_MSG_LIMIT_HIT 0x0003
2104 #define RATECHANGE_MSG_LIMIT_CLEAR 0x0004
2106 static const value_string ratechange_msgs
[] = {
2107 { RATECHANGE_MSG_LIMIT_PARAMS_CHANGED
, "Rate limits parameters changed" },
2108 { RATECHANGE_MSG_LIMIT_WARN
, "Rate limits warning (current level < alert level)" },
2109 { RATECHANGE_MSG_LIMIT_HIT
, "Rate limit hit (current level < limit level)" },
2110 { RATECHANGE_MSG_LIMIT_CLEAR
, "Rate limit clear (current level now > clear level)" },
2114 #define EXT_STATUS_TYPE_BUDDY_ICON_0 0
2115 #define EXT_STATUS_TYPE_BUDDY_ICON_1 1
2116 #define EXT_STATUS_TYPE_AVAIL_MSG 2
2117 #define EXT_STATUS_TYPE_UNKNOWN 6
2119 static const value_string ext_status_types
[] = {
2120 { EXT_STATUS_TYPE_BUDDY_ICON_0
, "Request to send buddy icon" },
2121 { EXT_STATUS_TYPE_BUDDY_ICON_1
, "Request to send buddy icon" },
2122 { EXT_STATUS_TYPE_AVAIL_MSG
, "Extended Status Update" },
2126 #define EXT_STATUS_FLAG_INITIAL_SEND 0x41
2127 #define EXT_STATUS_FLAG_RESEND 0x81
2129 static const value_string ext_status_flags
[] = {
2130 { EXT_STATUS_FLAG_INITIAL_SEND
, "First Send Request" },
2131 { EXT_STATUS_FLAG_RESEND
, "Request To Re-Send" },
2135 static int dissect_rate_class(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, int offset
, proto_tree
*class_tree
)
2137 proto_tree_add_item(class_tree
, hf_generic_rateinfo_classid
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);offset
+=2;
2138 proto_tree_add_item(class_tree
, hf_generic_rateinfo_windowsize
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);offset
+=4;
2139 proto_tree_add_item(class_tree
, hf_generic_rateinfo_clearlevel
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);offset
+=4;
2140 proto_tree_add_item(class_tree
, hf_generic_rateinfo_alertlevel
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);offset
+=4;
2141 proto_tree_add_item(class_tree
, hf_generic_rateinfo_limitlevel
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);offset
+=4;
2142 proto_tree_add_item(class_tree
, hf_generic_rateinfo_disconnectlevel
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);offset
+=4;
2143 proto_tree_add_item(class_tree
, hf_generic_rateinfo_currentlevel
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);offset
+=4;
2144 proto_tree_add_item(class_tree
, hf_generic_rateinfo_maxlevel
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);offset
+=4;
2145 proto_tree_add_item(class_tree
, hf_generic_rateinfo_lasttime
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);offset
+=4;
2146 proto_tree_add_item(class_tree
, hf_generic_rateinfo_curstate
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);offset
+=1;
2150 static int dissect_generic_rateinfo(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
)
2154 uint16_t numclasses
= tvb_get_ntohs(tvb
, 0);
2155 proto_tree
*classes_tree
= NULL
, *groups_tree
, *group_tree
;
2156 proto_tree_add_uint(tree
, hf_generic_rateinfo_numclasses
, tvb
, 0, 2, numclasses
);
2160 /* sizeof(rate_class_struct) = 35 ! */
2161 classes_tree
= proto_tree_add_subtree(tree
, tvb
, offset
, 35 * numclasses
,
2162 ett_generic_rateinfo_classes
, NULL
, "Available Rate Classes");
2165 for(i
= 0; i
< numclasses
; i
++) {
2166 uint16_t myid
= tvb_get_ntohs(tvb
, offset
);
2167 proto_tree
*class_tree
= proto_tree_add_subtree_format(classes_tree
, tvb
, offset
, 35,
2168 ett_generic_rateinfo_class
, NULL
, "Rate Class 0x%02x", myid
);
2169 offset
= dissect_rate_class(tvb
, pinfo
, offset
, class_tree
);
2172 groups_tree
= proto_tree_add_subtree(tree
, tvb
, offset
, -1, ett_generic_rateinfo_groups
, NULL
, "Rate Groups");
2174 for(i
= 0; i
< numclasses
; i
++) {
2176 uint16_t myid
= tvb_get_ntohs(tvb
, offset
);
2177 uint16_t numpairs
= tvb_get_ntohs(tvb
, offset
+ 2);
2179 * sizeof(rate_group) = sizeof(class_id) + sizeof(numpairs) + numpairs * 2 * sizeof(uint16_t)
2180 * = 2 + 2 + numpairs * 4
2182 group_tree
= proto_tree_add_subtree_format(groups_tree
, tvb
, offset
, 4 + 4 * numpairs
,
2183 ett_generic_rateinfo_group
, NULL
, "Rate Group 0x%02x", myid
);
2184 proto_tree_add_uint(group_tree
, hf_generic_rateinfo_classid
, tvb
, offset
, 2, myid
);offset
+=2;
2185 proto_tree_add_uint(group_tree
, hf_generic_rateinfo_numpairs
, tvb
, offset
, 2, numpairs
); offset
+=2;
2186 for(j
= 0; j
< numpairs
; j
++) {
2188 uint16_t subtype_id
;
2189 const aim_family
*family
;
2190 const aim_subtype
*subtype
;
2191 family_id
= tvb_get_ntohs(tvb
, offset
);
2192 subtype_id
= tvb_get_ntohs(tvb
, offset
+2);
2194 family
= aim_get_family(family_id
);
2195 subtype
= aim_get_subtype(family_id
, subtype_id
);
2197 proto_tree_add_uint_format_value(group_tree
, hf_generic_family
, tvb
, offset
, 4, family_id
,
2198 "%s (0x%04x), Subtype: %s (0x%04x)", family
?family
->name
:"Unknown", family_id
, subtype
?subtype
->name
:"Unknown", subtype_id
);
2206 static int dissect_aim_generic_clientready(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*gen_tree
)
2209 proto_tree
*entry
= proto_tree_add_subtree(gen_tree
, tvb
, 0, -1, ett_generic_clientready
, NULL
, "Supported services");
2211 while(tvb_reported_length_remaining(tvb
, offset
) > 0) {
2213 proto_tree
*subtree
;
2215 ti
= proto_tree_add_item(entry
, hf_generic_family
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2216 subtree
= proto_item_add_subtree(ti
, ett_generic_clientready_item
);
2219 proto_tree_add_item(subtree
, hf_generic_version
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2221 proto_tree_add_item(subtree
, hf_generic_dll_version
, tvb
, offset
, 3, ENC_BIG_ENDIAN
);
2224 proto_item_set_len(ti
, 8);
2230 static int dissect_aim_generic_serverready(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*gen_tree
)
2233 proto_tree
*entry
= proto_tree_add_subtree(gen_tree
, tvb
, offset
, -1, ett_generic_clientready
, NULL
, "Supported services");
2235 while(tvb_reported_length_remaining(tvb
, offset
) > 0) {
2236 proto_tree_add_item(entry
, hf_generic_family
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2243 static int dissect_aim_generic_service_req(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*gen_tree
)
2246 const aim_family
*family
= aim_get_family( tvb_get_ntohs(tvb
, offset
) );
2248 proto_tree_add_uint_format(gen_tree
, hf_generic_servicereq_service
, tvb
, offset
, 2, tvb_get_ntohs(tvb
, offset
), "%s (0x%04x)", family
?family
->name
:"Unknown", tvb_get_ntohs(tvb
, offset
) );
2253 static int dissect_aim_generic_redirect(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*gen_tree
)
2255 return dissect_aim_tlv_sequence(tvb
, pinfo
, 0, gen_tree
, aim_client_tlvs
);
2258 static int dissect_aim_generic_capabilities(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*gen_tree
)
2261 proto_tree
*entry
= proto_tree_add_subtree(gen_tree
, tvb
, offset
, -1, ett_generic_clientready
, NULL
, "Requested services");
2263 while(tvb_reported_length_remaining(tvb
, offset
) > 0) {
2264 proto_tree_add_item(entry
, hf_generic_family
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2266 proto_tree_add_item(entry
, hf_generic_version
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2272 static int dissect_aim_generic_capack(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*gen_tree
)
2275 proto_tree
*entry
= proto_tree_add_subtree(gen_tree
, tvb
, offset
, -1, ett_generic_clientready
, NULL
, "Accepted requested services");
2277 while(tvb_reported_length_remaining(tvb
, offset
) > 0) {
2278 proto_tree_add_item(entry
, hf_generic_family
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2280 proto_tree_add_item(entry
, hf_generic_version
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2286 #define AIM_MOTD_TLV_MOTD 0x000B
2288 static const aim_tlv aim_motd_tlvs
[] = {
2289 { AIM_MOTD_TLV_MOTD
, "Message of the day message", dissect_aim_tlv_value_string
},
2293 static int dissect_aim_generic_motd(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*gen_tree
)
2296 proto_tree_add_item(gen_tree
, hf_generic_motd_motdtype
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2298 return dissect_aim_tlv_sequence(tvb
, pinfo
, offset
, gen_tree
, aim_motd_tlvs
);
2301 static int dissect_aim_generic_rateinfoack(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*gen_tree
)
2304 while(tvb_reported_length_remaining(tvb
, offset
) > 0) {
2305 proto_tree_add_item(gen_tree
, hf_generic_rateinfoack_group
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2311 static int dissect_aim_generic_ratechange(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*gen_tree
)
2314 proto_tree_add_item(gen_tree
, hf_generic_ratechange_msg
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2316 offset
= dissect_rate_class(tvb
, pinfo
, offset
, gen_tree
);
2321 static int dissect_aim_generic_clientpauseack(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*gen_tree
)
2324 while(tvb_reported_length_remaining(tvb
, offset
) > 0) {
2325 proto_tree_add_item(gen_tree
, hf_generic_family
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2331 static int dissect_aim_generic_migration_req(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*gen_tree
)
2337 n
= tvb_get_ntohs(tvb
, offset
);offset
+=2;
2338 proto_tree_add_uint(gen_tree
, hf_generic_migration_numfams
, tvb
, offset
, 2, n
);
2339 entry
= proto_tree_add_subtree(gen_tree
, tvb
, offset
, 2 * n
,
2340 ett_generic_migratefamilies
, NULL
, "Families to migrate");
2341 for(i
= 0; i
< n
; i
++) {
2342 proto_tree_add_item(entry
, hf_generic_family
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2346 return dissect_aim_tlv_sequence(tvb
, pinfo
, offset
, gen_tree
, aim_client_tlvs
);
2349 static int dissect_aim_generic_setprivflags(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*gen_tree
)
2351 static int * const flags
[] = {
2352 &hf_generic_allow_idle_see
,
2353 &hf_generic_allow_member_see
,
2357 proto_tree_add_bitmask(gen_tree
, tvb
, 0, hf_generic_priv_flags
, ett_generic_priv_flags
, flags
, ENC_BIG_ENDIAN
);
2361 static int dissect_aim_generic_selfinfo_repl(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*gen_tree
)
2363 int offset
= dissect_aim_buddyname(tvb
, pinfo
, 0, gen_tree
);
2364 proto_tree_add_item(gen_tree
, hf_generic_selfinfo_warninglevel
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2366 return dissect_aim_tlv_list(tvb
, pinfo
, offset
, gen_tree
, aim_onlinebuddy_tlvs
);
2369 static int dissect_aim_generic_evil(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*gen_tree
)
2372 proto_tree_add_item(gen_tree
, hf_generic_evil_new_warn_level
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2373 while(tvb_reported_length_remaining(tvb
, offset
) > 0) {
2374 offset
= dissect_aim_userinfo(tvb
, pinfo
, offset
, gen_tree
);
2379 static int dissect_aim_generic_setidle(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*gen_tree
)
2381 proto_tree_add_item(gen_tree
, hf_generic_idle_time
, tvb
, 0, 2, ENC_BIG_ENDIAN
);
2385 static int dissect_aim_generic_ext_status_req(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*gen_tree
)
2387 return dissect_aim_tlv_sequence(tvb
, pinfo
, 0, gen_tree
, aim_onlinebuddy_tlvs
);
2390 static int dissect_aim_generic_clientver_req(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*gen_tree
)
2393 proto_tree_add_item(gen_tree
, hf_generic_client_ver_req_offset
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
2395 proto_tree_add_item(gen_tree
, hf_generic_client_ver_req_length
, tvb
, offset
, 4, ENC_BIG_ENDIAN
);
2399 static int dissect_aim_generic_clientver_repl(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*gen_tree
)
2401 proto_tree_add_item(gen_tree
, hf_generic_client_ver_req_hash
, tvb
, 0, 16, ENC_NA
);
2405 static int dissect_aim_generic_ext_status_repl(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*gen_tree
)
2409 proto_tree_add_item(gen_tree
, hf_generic_ext_status_type
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2411 proto_tree_add_item(gen_tree
, hf_generic_ext_status_flags
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2413 proto_tree_add_item(gen_tree
, hf_generic_ext_status_length
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2414 length
= tvb_get_uint8(tvb
, offset
);
2416 proto_tree_add_item(gen_tree
, hf_generic_ext_status_data
, tvb
, offset
, length
, ENC_NA
);
2422 aim_generic_family( char *result
, uint32_t famnum
)
2424 const aim_family
*family
= aim_get_family(famnum
);
2426 snprintf( result
, ITEM_LABEL_LENGTH
, "%s (0x%x)", family
?family
->name
:"Unknown", famnum
);
2429 static const aim_subtype aim_fnac_family_generic
[] = {
2430 { 0x0001, "Error", dissect_aim_snac_error
},
2431 { 0x0002, "Client Ready", dissect_aim_generic_clientready
},
2432 { 0x0003, "Server Ready", dissect_aim_generic_serverready
},
2433 { 0x0004, "Service Request", dissect_aim_generic_service_req
},
2434 { 0x0005, "Redirect", dissect_aim_generic_redirect
},
2435 { 0x0006, "Rate Info Request", NULL
},
2436 { 0x0007, "Rate Info", dissect_generic_rateinfo
},
2437 { 0x0008, "Rate Info Ack", dissect_aim_generic_rateinfoack
},
2438 { 0x000a, "Rate Change", dissect_aim_generic_ratechange
},
2439 { 0x000b, "Server Pause", NULL
},
2440 { 0x000c, "Client Pause Ack", dissect_aim_generic_clientpauseack
},
2441 { 0x000d, "Server Resume", NULL
},
2442 { 0x000e, "Self Info Request", NULL
},
2443 { 0x000f, "Self Info Reply", dissect_aim_generic_selfinfo_repl
},
2444 { 0x0010, "Evil", dissect_aim_generic_evil
},
2445 { 0x0011, "Set Idle", dissect_aim_generic_setidle
},
2446 { 0x0012, "Migration Request", dissect_aim_generic_migration_req
},
2447 { 0x0013, "Message Of The Day", dissect_aim_generic_motd
},
2448 { 0x0014, "Set Privilege Flags", dissect_aim_generic_setprivflags
},
2449 { 0x0015, "Well Known URL", NULL
}, /* FIXME */
2450 { 0x0016, "noop", NULL
},
2451 { 0x0017, "Capabilities", dissect_aim_generic_capabilities
},
2452 { 0x0018, "Capabilities Ack", dissect_aim_generic_capack
},
2453 { 0x001e, "Set Extended Status Request", dissect_aim_generic_ext_status_req
},
2454 { 0x001f, "Client Verification Request", dissect_aim_generic_clientver_req
},
2455 { 0x0020, "Client Verification Reply", dissect_aim_generic_clientver_repl
},
2456 { 0x0021, "Set Extended Status Reply", dissect_aim_generic_ext_status_repl
},
2460 /***********************************************************************************************************
2462 ***********************************************************************************************************/
2463 #define ICQ_CLI_OFFLINE_MESSAGE_REQ 0x003c
2464 #define ICQ_CLI_DELETE_OFFLINE_MSGS 0x003e
2465 #define ICQ_SRV_OFFLINE_MSGS 0x0041
2466 #define ICQ_SRV_END_OF_OFFLINE_MSGS 0x0042
2467 #define ICQ_CLI_META_INFO_REQ 0x07d0
2468 #define ICQ_SRV_META_INFO_REPL 0x07da
2470 static const value_string aim_icq_data_types
[] = {
2471 { ICQ_CLI_OFFLINE_MESSAGE_REQ
, "Offline Message Request" },
2472 { ICQ_SRV_OFFLINE_MSGS
, "Offline Messages Reply" },
2473 { ICQ_SRV_END_OF_OFFLINE_MSGS
, "End Of Offline Messages Reply" },
2474 { ICQ_CLI_DELETE_OFFLINE_MSGS
, "Delete Offline Messages Request" },
2475 { ICQ_CLI_META_INFO_REQ
, "Metainfo Request" },
2476 { ICQ_SRV_META_INFO_REPL
, "Metainfo Reply" },
2481 static int dissect_aim_tlv_value_icq(proto_item
*ti
, uint16_t subtype
, tvbuff_t
*tvb
, packet_info
*pinfo
);
2483 #define TLV_ICQ_META_DATA 0x0001
2485 static const aim_tlv icq_tlv
[] = {
2486 { TLV_ICQ_META_DATA
, "Encapsulated ICQ Meta Data", dissect_aim_tlv_value_icq
},
2495 int (*dissector
) (tvbuff_t
*, packet_info
*, proto_tree
*);
2497 { 0x0001, "Server Error Reply", NULL
},
2498 { 0x0064, "Set User Home Info Reply", NULL
},
2499 { 0x006e, "Set User Work Info Reply", NULL
},
2500 { 0x0078, "Set User More Info Reply", NULL
},
2501 { 0x0082, "Set User Notes Info Reply", NULL
},
2502 { 0x0087, "Set User Email Info Reply", NULL
},
2503 { 0x008c, "Set User Interests Info Reply", NULL
},
2504 { 0x0096, "Set User Affiliations Info Reply", NULL
},
2505 { 0x00a0, "Set User Permissions Reply", NULL
},
2506 { 0x00aa, "Set User Password Reply", NULL
},
2507 { 0x00b4, "Unregister Account Reply", NULL
},
2508 { 0x00be, "Set User Homepage Category Reply", NULL
},
2509 { 0x00c8, "User Basic Info Reply", NULL
},
2510 { 0x00d2, "User Work Info Reply", NULL
},
2511 { 0x00dc, "User More Info Reply", NULL
},
2512 { 0x00e6, "User Notes Info Reply", NULL
},
2513 { 0x00eb, "User Extended Email Reply", NULL
},
2514 { 0x00f0, "User Interests Info Reply", NULL
},
2515 { 0x00fa, "User Affiliations Info Reply", NULL
},
2516 { 0x0104, "Short User Info Reply", NULL
},
2517 { 0x010e, "User Homepage Category Reply", NULL
},
2518 { 0x01a4, "Search: User found", NULL
},
2519 { 0x0302, "Registration Stats Reply", NULL
},
2520 { 0x0366, "Random Search Server Reply", NULL
},
2521 { 0x03ea, "Set User Home Info Request", NULL
},
2522 { 0x03f3, "Set User Work Info Request", NULL
},
2523 { 0x03fd, "Set User More Info Request", NULL
},
2524 { 0x0406, "Set User Notes Request", NULL
},
2525 { 0x040b, "Set User Extended Email Info Request", NULL
},
2526 { 0x0410, "Set User Interests Info Request", NULL
},
2527 { 0x041a, "Set User Affiliations Info Request", NULL
},
2528 { 0x0424, "Set User Permissions Info Request", NULL
},
2529 { 0x042e, "Change User Password Request", NULL
},
2530 { 0x0442, "Set User Homepage Category Request", NULL
},
2531 { 0x04b2, "Fullinfo Request", NULL
},
2532 { 0x04ba, "Short User Info Request", NULL
},
2533 { 0x04c4, "Unregister User Request", NULL
},
2534 { 0x0515, "Search By Details Request", NULL
},
2535 { 0x0569, "Search By UIN Request", NULL
},
2536 { 0x055f, "Whitepages Search Request", NULL
},
2537 { 0x0573, "Search By Email Request", NULL
},
2538 { 0x074e, "Random Chat User Search Request", NULL
},
2539 { 0x0898, "Server Variable Request (XML)", NULL
},
2540 { 0x0aa5, "Registration Report Request", NULL
},
2541 { 0x0aaf, "Shortcut Bar Stats Report Request", NULL
},
2542 { 0x0c3a, "Save Info Request", NULL
},
2543 { 0x1482, "Send SMS Request", NULL
},
2544 { 0x2008, "Spam Report Request", NULL
},
2545 { 0x08a2, "Server Variable Reply (XML)", NULL
},
2546 { 0x0c3f, "Set Fullinfo Reply", NULL
},
2547 { 0x2012, "User Spam Report Reply", NULL
},
2552 static int dissect_aim_tlv_value_icq(proto_item
*ti
, uint16_t subtype _U_
, tvbuff_t
*tvb
, packet_info
*pinfo
)
2556 proto_item
*subtype_item
;
2557 uint16_t req_type
, req_subtype
;
2558 proto_tree
*t
= proto_item_add_subtree(ti
, ett_aim_icq_tlv
);
2560 proto_tree_add_item(t
, hf_icq_tlv_data_chunk_size
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2563 proto_tree_add_item(t
, hf_icq_tlv_request_owner_uid
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2566 proto_tree_add_item(t
, hf_icq_tlv_request_type
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2567 req_type
= tvb_get_letohs(tvb
, offset
);
2570 proto_tree_add_item(t
, hf_icq_tlv_request_seq_num
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2574 case ICQ_CLI_OFFLINE_MESSAGE_REQ
: return offset
;
2575 case ICQ_CLI_DELETE_OFFLINE_MSGS
: return offset
;
2576 case ICQ_SRV_OFFLINE_MSGS
:
2579 case ICQ_SRV_END_OF_OFFLINE_MSGS
:
2580 proto_tree_add_item(t
, hf_icq_dropped_msg_flag
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2582 case ICQ_CLI_META_INFO_REQ
:
2583 case ICQ_SRV_META_INFO_REPL
:
2584 req_subtype
= tvb_get_letohs(tvb
, offset
);
2585 subtype_item
= proto_tree_add_item(t
, hf_icq_meta_subtype
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
); offset
+=2;
2587 for (i
= 0; icq_calls
[i
].name
; i
++) {
2588 if (icq_calls
[i
].subtype
== req_subtype
) break;
2591 col_set_str(pinfo
->cinfo
, COL_INFO
, icq_calls
[i
].name
?icq_calls
[i
].name
:"Unknown ICQ Meta Call");
2593 proto_item_append_text(subtype_item
, " (%s)", icq_calls
[i
].name
?icq_calls
[i
].name
:"Unknown");
2595 if (icq_calls
[i
].dissector
)
2596 return icq_calls
[i
].dissector(tvb_new_subset_remaining(tvb
, offset
), pinfo
, t
);
2605 static int dissect_aim_icq_tlv(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
)
2607 return dissect_aim_tlv(tvb
, pinfo
, 0, tree
, icq_tlv
);
2610 static const aim_subtype aim_fnac_family_icq
[] = {
2611 { 0x0001, "Error", dissect_aim_snac_error
},
2612 { 0x0002, "ICQ Request", dissect_aim_icq_tlv
},
2613 { 0x0003, "ICQ Response", dissect_aim_icq_tlv
},
2614 { 0x0006, "Auth Request", NULL
},
2615 { 0x0007, "Auth Response", NULL
},
2619 /***********************************************************************************************************
2621 ***********************************************************************************************************/
2622 static int dissect_aim_invitation_req(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*invite_tree
)
2624 return dissect_aim_tlv_sequence(tvb
, pinfo
, 0, invite_tree
, aim_onlinebuddy_tlvs
);
2627 static const aim_subtype aim_fnac_family_invitation
[] = {
2628 { 0x0001, "Error", dissect_aim_snac_error
},
2629 { 0x0002, "Invite a friend to join AIM", dissect_aim_invitation_req
},
2630 { 0x0003, "Invitation Ack", NULL
},
2635 /***********************************************************************************************************
2637 ***********************************************************************************************************/
2638 #define AIM_LOCATION_RIGHTS_TLV_MAX_PROFILE_LENGTH 0x0001
2639 #define AIM_LOCATION_RIGHTS_TLV_MAX_CAPABILITIES 0x0002
2641 static const aim_tlv aim_location_rights_tlvs
[] = {
2642 { AIM_LOCATION_RIGHTS_TLV_MAX_PROFILE_LENGTH
, "Max Profile Length", dissect_aim_tlv_value_uint16
},
2643 { AIM_LOCATION_RIGHTS_TLV_MAX_CAPABILITIES
, "Max capabilities", dissect_aim_tlv_value_uint16
},
2647 #define AIM_LOCATE_TAG_TLV_SIG_TYPE 0x0001
2648 #define AIM_LOCATE_TAG_TLV_SIG_DATA 0x0002
2649 #define AIM_LOCATE_TAG_TLV_UNAVAILABLE_TYPE 0x0003
2650 #define AIM_LOCATE_TAG_TLV_UNAVAILABLE_DATA 0x0004
2651 #define AIM_LOCATE_TAG_TLV_CAPABILITIES 0x0005
2652 #define AIM_LOCATE_TAG_TLV_SIG_TIME 0x000A
2653 #define AIM_LOCATE_TAG_TLV_UNAVAILABLE_TIME 0x000B
2654 #define AIM_LOCATE_TAG_TLV_SUPPORT_HOST_SIG 0x000C
2655 #define AIM_LOCATE_TAG_TLV_HTML_INFO_TYPE 0x000D
2656 #define AIM_LOCATE_TAG_TLV_HTML_INFO_DATA 0x000E
2658 static const aim_tlv aim_locate_tags_tlvs
[] = {
2659 { AIM_LOCATE_TAG_TLV_SIG_TYPE
, "Signature MIME Type" , dissect_aim_tlv_value_string
},
2660 { AIM_LOCATE_TAG_TLV_SIG_DATA
, "Signature Data" , dissect_aim_tlv_value_string
},
2661 { AIM_LOCATE_TAG_TLV_UNAVAILABLE_TYPE
, "Away Message MIME Type" , dissect_aim_tlv_value_string
},
2662 { AIM_LOCATE_TAG_TLV_UNAVAILABLE_DATA
, "Away Message Data" , dissect_aim_tlv_value_string
},
2663 { AIM_LOCATE_TAG_TLV_CAPABILITIES
, "Client Capabilities" , dissect_aim_tlv_value_client_capabilities
},
2664 { AIM_LOCATE_TAG_TLV_SIG_TIME
, "Signature Time" , dissect_aim_tlv_value_time
},
2665 { AIM_LOCATE_TAG_TLV_UNAVAILABLE_TIME
, "Away Message Time" , dissect_aim_tlv_value_time
},
2666 { AIM_LOCATE_TAG_TLV_SUPPORT_HOST_SIG
, "Enable Server Based Profiles" , dissect_aim_tlv_value_uint8
},
2667 { AIM_LOCATE_TAG_TLV_HTML_INFO_TYPE
, "Host Based Buddy MIME Type" , dissect_aim_tlv_value_string
},
2668 { AIM_LOCATE_TAG_TLV_HTML_INFO_DATA
, "Host Bases Buddy Data" , dissect_aim_tlv_value_string
},
2672 #define FAMILY_LOCATION_USERINFO_INFOTYPE_GENERALINFO 0x0001
2673 #define FAMILY_LOCATION_USERINFO_INFOTYPE_AWAYMSG 0x0003
2674 #define FAMILY_LOCATION_USERINFO_INFOTYPE_CAPS 0x0005
2676 static const value_string aim_snac_location_request_user_info_infotypes
[] = {
2677 { FAMILY_LOCATION_USERINFO_INFOTYPE_GENERALINFO
, "Request General Info" },
2678 { FAMILY_LOCATION_USERINFO_INFOTYPE_AWAYMSG
, "Request Away Message" },
2679 { FAMILY_LOCATION_USERINFO_INFOTYPE_CAPS
, "Request Capabilities" },
2683 static int dissect_aim_location_rightsinfo(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*loc_tree
)
2685 return dissect_aim_tlv_sequence(tvb
, pinfo
, 0, loc_tree
, aim_location_rights_tlvs
);
2688 static int dissect_aim_location_setuserinfo(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*loc_tree
)
2690 return dissect_aim_tlv_sequence(tvb
, pinfo
, 0, loc_tree
, aim_locate_tags_tlvs
);
2693 static int dissect_aim_location_watcher_notification(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*loc_tree
)
2696 while (tvb_reported_length_remaining(tvb
, offset
) > 0) {
2697 offset
= dissect_aim_buddyname(tvb
, pinfo
, offset
, loc_tree
);
2702 static int dissect_aim_location_user_info_query(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*loc_tree
)
2704 return dissect_aim_buddyname(tvb
, pinfo
, 4, loc_tree
);
2707 static int dissect_aim_snac_location_request_user_information(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
2710 uint8_t buddyname_length
= 0;
2713 proto_tree_add_item(tree
, hf_aim_snac_location_request_user_info_infotype
,
2714 tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2717 /* Buddy Name length */
2718 buddyname_length
= tvb_get_uint8(tvb
, offset
);
2719 proto_tree_add_item(tree
, hf_aim_location_buddyname_len
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2723 proto_tree_add_item(tree
, hf_aim_location_buddyname
, tvb
, offset
, buddyname_length
, ENC_UTF_8
);
2724 offset
+= buddyname_length
;
2729 static int dissect_aim_snac_location_user_information(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
)
2732 uint8_t buddyname_length
= 0;
2734 /* Buddy Name length */
2735 buddyname_length
= tvb_get_uint8(tvb
, offset
);
2736 proto_tree_add_item(tree
, hf_aim_location_buddyname_len
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
2740 proto_tree_add_item(tree
, hf_aim_location_buddyname
, tvb
, offset
, buddyname_length
, ENC_UTF_8
);
2741 offset
+= buddyname_length
;
2744 proto_tree_add_item(tree
, hf_aim_location_userinfo_warninglevel
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2747 offset
= dissect_aim_tlv_list(tvb
, pinfo
, offset
, tree
, aim_onlinebuddy_tlvs
);
2749 return dissect_aim_tlv_sequence(tvb
, pinfo
, offset
, tree
, aim_locate_tags_tlvs
);
2752 static const aim_subtype aim_fnac_family_location
[] = {
2753 { 0x0001, "Error" , dissect_aim_snac_error
},
2754 { 0x0002, "Request Rights" , NULL
},
2755 { 0x0003, "Rights Info" , dissect_aim_location_rightsinfo
},
2756 { 0x0004, "Set User Info" , dissect_aim_location_setuserinfo
},
2757 { 0x0005, "Request User Info" , dissect_aim_snac_location_request_user_information
},
2758 { 0x0006, "User Info" , dissect_aim_snac_location_user_information
},
2759 { 0x0007, "Watcher Subrequest" , NULL
},
2760 { 0x0008, "Watcher Notification" , dissect_aim_location_watcher_notification
},
2761 { 0x0015, "User Info Query" , dissect_aim_location_user_info_query
},
2766 /***********************************************************************************************************
2768 ***********************************************************************************************************/
2771 #define INCOMING_CH1_MESSAGE_BLOCK 0x0002
2772 #define INCOMING_CH1_SERVER_ACK_REQ 0x0003
2773 #define INCOMING_CH1_MESSAGE_AUTH_RESP 0x0004
2774 #define INCOMING_CH1_MESSAGE_OFFLINE 0x0006
2775 #define INCOMING_CH1_ICON_PRESENT 0x0008
2776 #define INCOMING_CH1_BUDDY_REQ 0x0009
2777 #define INCOMING_CH1_TYPING 0x000b
2779 static const aim_tlv aim_messaging_incoming_ch1_tlvs
[] = {
2780 { INCOMING_CH1_MESSAGE_BLOCK
, "Message Block", dissect_aim_tlv_value_messageblock
},
2781 { INCOMING_CH1_SERVER_ACK_REQ
, "Server Ack Requested", dissect_aim_tlv_value_bytes
},
2782 { INCOMING_CH1_MESSAGE_AUTH_RESP
, "Message is Auto Response", dissect_aim_tlv_value_bytes
},
2783 { INCOMING_CH1_MESSAGE_OFFLINE
, "Message was received offline", dissect_aim_tlv_value_bytes
},
2784 { INCOMING_CH1_ICON_PRESENT
, "Icon present", dissect_aim_tlv_value_bytes
},
2785 { INCOMING_CH1_BUDDY_REQ
, "Buddy Req", dissect_aim_tlv_value_bytes
},
2786 { INCOMING_CH1_TYPING
, "Non-direct connect typing notification", dissect_aim_tlv_value_bytes
},
2790 static int dissect_aim_tlv_value_rendezvous(proto_item
*ti
, uint16_t valueid _U_
, tvbuff_t
*tvb
, packet_info
*pinfo
);
2792 #define ICBM_CHANNEL_IM 0x0001
2793 #define ICBM_CHANNEL_RENDEZVOUS 0x0002
2795 static const value_string icbm_channel_types
[] = {
2796 { ICBM_CHANNEL_IM
, "IM" },
2797 { ICBM_CHANNEL_RENDEZVOUS
, "Rendezvous" },
2801 #define INCOMING_CH2_SERVER_ACK_REQ 0x0003
2802 #define INCOMING_CH2_RENDEZVOUS_DATA 0x0005
2804 static const aim_tlv aim_messaging_incoming_ch2_tlvs
[] = {
2805 { INCOMING_CH2_SERVER_ACK_REQ
, "Server Ack Requested", dissect_aim_tlv_value_bytes
},
2806 { INCOMING_CH2_RENDEZVOUS_DATA
, "Rendez Vous Data", dissect_aim_tlv_value_rendezvous
},
2810 #define RENDEZVOUS_TLV_CHANNEL 0x0001
2811 #define RENDEZVOUS_TLV_IP_ADDR 0x0002
2812 #define RENDEZVOUS_TLV_INT_IP 0x0003
2813 #define RENDEZVOUS_TLV_EXT_IP 0x0004
2814 #define RENDEZVOUS_TLV_EXT_PORT 0x0005
2815 #define RENDEZVOUS_TLV_DOWNLOAD_URL 0x0006
2816 #define RENDEZVOUS_TLV_VERIFIED_DOWNLOAD_URL 0x0008
2817 #define RENDEZVOUS_TLV_SEQ_NUM 0x000A
2818 #define RENDEZVOUS_TLV_CANCEL_REASON 0x000B
2819 #define RENDEZVOUS_TLV_INVITATION 0x000C
2820 #define RENDEZVOUS_TLV_INVITE_MIME_CHARSET 0x000D
2821 #define RENDEZVOUS_TLV_INVITE_MIME_LANG 0x000E
2822 #define RENDEZVOUS_TLV_REQ_HOST_CHECK 0x000F
2823 #define RENDEZVOUS_TLV_REQ_USE_ARS 0x0010
2824 #define RENDEZVOUS_TLV_REQ_SECURE 0x0011
2825 #define RENDEZVOUS_TLV_MAX_PROTOCOL_VER 0x0012
2826 #define RENDEZVOUS_TLV_MIN_PROTOCOL_VER 0x0013
2827 #define RENDEZVOUS_TLV_COUNTER_REASON 0x0014
2828 #define RENDEZVOUS_TLV_INVITE_MIME_TYPE 0x0015
2829 #define RENDEZVOUS_TLV_IP_ADDR_XOR 0x0016
2830 #define RENDEZVOUS_TLV_PORT_XOR 0x0017
2831 #define RENDEZVOUS_TLV_ADDR_LIST 0x0018
2832 #define RENDEZVOUS_TLV_SESSION_ID 0x0019
2833 #define RENDEZVOUS_TLV_ROLLOVER_ID 0x001A
2834 #define RENDEZVOUS_TLV_EXTENDED_DATA 0x2711
2835 #define RENDEZVOUS_TLV_ICHAT_INVITEES_DATA 0x277E
2837 static const aim_tlv aim_rendezvous_tlvs
[] = {
2838 { RENDEZVOUS_TLV_CHANNEL
, "Rendezvous ICBM Channel", dissect_aim_tlv_value_uint16
},
2839 { RENDEZVOUS_TLV_IP_ADDR
, "Rendezvous IP", dissect_aim_tlv_value_ipv4
},
2840 { RENDEZVOUS_TLV_INT_IP
, "Internal IP", dissect_aim_tlv_value_ipv4
},
2841 { RENDEZVOUS_TLV_EXT_IP
, "External IP", dissect_aim_tlv_value_ipv4
},
2842 { RENDEZVOUS_TLV_EXT_PORT
, "External Port", dissect_aim_tlv_value_uint16
},
2843 { RENDEZVOUS_TLV_DOWNLOAD_URL
, "Service Support Download URL", dissect_aim_tlv_value_string
},
2844 { RENDEZVOUS_TLV_VERIFIED_DOWNLOAD_URL
, "Verified Service Support Download URL", dissect_aim_tlv_value_string
},
2845 { RENDEZVOUS_TLV_SEQ_NUM
, "Sequence Number", dissect_aim_tlv_value_uint16
},
2846 { RENDEZVOUS_TLV_CANCEL_REASON
, "Cancel Reason", dissect_aim_tlv_value_uint16
},
2847 { RENDEZVOUS_TLV_INVITATION
, "Invitation Text", dissect_aim_tlv_value_string
},
2848 { RENDEZVOUS_TLV_INVITE_MIME_CHARSET
, "Data MIME Type", dissect_aim_tlv_value_string
},
2849 { RENDEZVOUS_TLV_INVITE_MIME_LANG
, "Data Language", dissect_aim_tlv_value_string
},
2850 { RENDEZVOUS_TLV_REQ_HOST_CHECK
, "Request Host Check", NULL
},
2851 { RENDEZVOUS_TLV_REQ_USE_ARS
, "Request Data via Rendezvous Server", NULL
},
2852 { RENDEZVOUS_TLV_REQ_SECURE
, "Request SSL Connection", NULL
},
2853 { RENDEZVOUS_TLV_MAX_PROTOCOL_VER
, "Maximum Protocol Version", dissect_aim_tlv_value_uint16
},
2854 { RENDEZVOUS_TLV_MIN_PROTOCOL_VER
, "Minimum Protocol Version", dissect_aim_tlv_value_uint16
},
2855 { RENDEZVOUS_TLV_COUNTER_REASON
, "Counter Proposal Reason", dissect_aim_tlv_value_uint16
},
2856 { RENDEZVOUS_TLV_INVITE_MIME_TYPE
, "Data MIME Type", dissect_aim_tlv_value_string
},
2857 { RENDEZVOUS_TLV_IP_ADDR_XOR
, "XORed Rendezvous IP", dissect_aim_tlv_value_ipv4
},
2858 { RENDEZVOUS_TLV_PORT_XOR
, "XORed Port", dissect_aim_tlv_value_uint16
},
2859 { RENDEZVOUS_TLV_ADDR_LIST
, "Address/Port List", dissect_aim_tlv_value_string08_array
},
2860 { RENDEZVOUS_TLV_SESSION_ID
, "Session ID", dissect_aim_tlv_value_string
},
2861 { RENDEZVOUS_TLV_ROLLOVER_ID
, "Rollover ID", dissect_aim_tlv_value_string
},
2863 The dissect_aim_tlv_value_extended_data function does not work for iChat generated rendezvous data
2864 { RENDEZVOUS_TLV_EXTENDED_DATA, "Extended Data", dissect_aim_tlv_value_extended_data },
2866 { RENDEZVOUS_TLV_EXTENDED_DATA
, "Extended Data", NULL
},
2867 { RENDEZVOUS_TLV_ICHAT_INVITEES_DATA
, "iChat Invitees Data", NULL
},
2871 #define MINITYPING_FINISHED_SIGN 0x0000
2872 #define MINITYPING_TEXT_TYPED_SIGN 0x0001
2873 #define MINITYPING_BEGUN_SIGN 0x0002
2875 static const value_string minityping_type
[] _U_
= {
2876 {MINITYPING_FINISHED_SIGN
, "Typing finished sign" },
2877 {MINITYPING_TEXT_TYPED_SIGN
, "Text typed sign" },
2878 {MINITYPING_BEGUN_SIGN
, "Typing begun sign" },
2882 #define RENDEZVOUS_MSG_REQUEST 0
2883 #define RENDEZVOUS_MSG_CANCEL 1
2884 #define RENDEZVOUS_MSG_ACCEPT 2
2886 static const value_string rendezvous_msg_types
[] = {
2887 { RENDEZVOUS_MSG_REQUEST
, "Request" },
2888 { RENDEZVOUS_MSG_CANCEL
, "Cancel" },
2889 { RENDEZVOUS_MSG_ACCEPT
, "Accept" },
2893 #define CLIENT_ERR__REASON_UNSUPPORTED_CHANNEL 1
2894 #define CLIENT_ERR__REASON_BUSTED_PAYLOAD 2
2895 #define CLIENT_ERR__REASON_CHANNEL_SPECIFIC 3
2897 static const value_string client_err_reason_types
[] = {
2898 { CLIENT_ERR__REASON_UNSUPPORTED_CHANNEL
, "Unsupported Channel" },
2899 { CLIENT_ERR__REASON_BUSTED_PAYLOAD
, "Busted Payload" },
2900 { CLIENT_ERR__REASON_CHANNEL_SPECIFIC
, "Channel Specific Error" },
2904 #define RENDEZVOUS_NAK_PROPOSAL_UNSUPPORTED 0
2905 #define RENDEZVOUS_NAK_PROPOSAL_DENIED 1
2906 #define RENDEZVOUS_NAK_PROPOSAL_IGNORED 2
2907 #define RENDEZVOUS_NAK_BUSTED_PARAMETERS 3
2908 #define RENDEZVOUS_NAK_PROPOSAL_TIMED_OUT 4
2909 #define RENDEZVOUS_NAK_ONLINE_BUT_NOT_AVAILABLE 5
2910 #define RENDEZVOUS_NAK_INSUFFICIENT_RESOURCES 6
2911 #define RENDEZVOUS_NAK_RATE_LIMITED 7
2912 #define RENDEZVOUS_NAK_NO_DATA 8
2913 #define RENDEZVOUS_NAK_VERSION_MISMATCH 9
2914 #define RENDEZVOUS_NAK_SECURITY_MISMATCH 10
2915 #define RENDEZVOUS_NAK_SERVICE_SPECIFIC_REASON 15
2917 static const value_string rendezvous_nak_reason_types
[] = {
2918 { RENDEZVOUS_NAK_PROPOSAL_UNSUPPORTED
, "Proposal UUID not supported" },
2919 { RENDEZVOUS_NAK_PROPOSAL_DENIED
, "Not authorized, or user declined" },
2920 { RENDEZVOUS_NAK_PROPOSAL_IGNORED
, "Proposal ignored" },
2921 { RENDEZVOUS_NAK_BUSTED_PARAMETERS
, "Proposal malformed" },
2922 { RENDEZVOUS_NAK_PROPOSAL_TIMED_OUT
, "Attempt to act on proposal (e.g. connect) timed out" },
2923 { RENDEZVOUS_NAK_ONLINE_BUT_NOT_AVAILABLE
, "Recipient away or busy" },
2924 { RENDEZVOUS_NAK_INSUFFICIENT_RESOURCES
, "Recipient had internal error" },
2925 { RENDEZVOUS_NAK_RATE_LIMITED
, "Recipient was ratelimited" },
2926 { RENDEZVOUS_NAK_NO_DATA
, "Recipient had nothing to send" },
2927 { RENDEZVOUS_NAK_VERSION_MISMATCH
, "Incompatible versions" },
2928 { RENDEZVOUS_NAK_SECURITY_MISMATCH
, "Incompatible security settings" },
2929 { RENDEZVOUS_NAK_SERVICE_SPECIFIC_REASON
, "Service-specific reject defined by client" },
2933 #define EXTENDED_DATA_MTYPE_PLAIN 0x01
2934 #define EXTENDED_DATA_MTYPE_CHAT 0x02
2935 #define EXTENDED_DATA_MTYPE_FILEREQ 0x03
2936 #define EXTENDED_DATA_MTYPE_URL 0x04
2937 #define EXTENDED_DATA_MTYPE_AUTHREQ 0x06
2938 #define EXTENDED_DATA_MTYPE_AUTHDENY 0x07
2939 #define EXTENDED_DATA_MTYPE_AUTHOK 0x08
2940 #define EXTENDED_DATA_MTYPE_SERVER 0x09
2941 #define EXTENDED_DATA_MTYPE_ADDED 0x0C
2942 #define EXTENDED_DATA_MTYPE_WWP 0x0D
2943 #define EXTENDED_DATA_MTYPE_EEXPRESS 0x0E
2944 #define EXTENDED_DATA_MTYPE_CONTACTS 0x13
2945 #define EXTENDED_DATA_MTYPE_PLUGIN 0x1A
2946 #define EXTENDED_DATA_MTYPE_AUTOAWAY 0xE8
2947 #define EXTENDED_DATA_MTYPE_AUTOBUSY 0xE9
2948 #define EXTENDED_DATA_MTYPE_AUTONA 0xEA
2949 #define EXTENDED_DATA_MTYPE_AUTODND 0xEB
2950 #define EXTENDED_DATA_MTYPE_AUTOFFC 0xEC
2952 static const value_string extended_data_message_types
[] = {
2953 {EXTENDED_DATA_MTYPE_PLAIN
, "Plain text (simple) message"},
2954 {EXTENDED_DATA_MTYPE_CHAT
, "Chat request message"},
2955 {EXTENDED_DATA_MTYPE_FILEREQ
, "File request / file ok message"},
2956 {EXTENDED_DATA_MTYPE_URL
, "URL message (0xFE formatted)"},
2957 {EXTENDED_DATA_MTYPE_AUTHREQ
, "Authorization request message (0xFE formatted)"},
2958 {EXTENDED_DATA_MTYPE_AUTHDENY
, "Authorization denied message (0xFE formatted)"},
2959 {EXTENDED_DATA_MTYPE_AUTHOK
, "Authorization given message (empty)"},
2960 {EXTENDED_DATA_MTYPE_SERVER
, "Message from OSCAR server (0xFE formatted)"},
2961 {EXTENDED_DATA_MTYPE_ADDED
, "\"You-were-added\" message (0xFE formatted)"},
2962 {EXTENDED_DATA_MTYPE_WWP
, "Web pager message (0xFE formatted)"},
2963 {EXTENDED_DATA_MTYPE_EEXPRESS
, "Email express message (0xFE formatted)"},
2964 {EXTENDED_DATA_MTYPE_CONTACTS
, "Contact list message"},
2965 {EXTENDED_DATA_MTYPE_PLUGIN
, "Plugin message described by text string"},
2966 {EXTENDED_DATA_MTYPE_AUTOAWAY
, "Auto away message"},
2967 {EXTENDED_DATA_MTYPE_AUTOBUSY
, "Auto occupied message"},
2968 {EXTENDED_DATA_MTYPE_AUTONA
, "Auto not available message"},
2969 {EXTENDED_DATA_MTYPE_AUTODND
, "Auto do not disturb message"},
2970 {EXTENDED_DATA_MTYPE_AUTOFFC
, "Auto free for chat message"},
2974 #define EXTENDED_DATA_MFLAG_NORMAL 0x01
2975 #define EXTENDED_DATA_MFLAG_AUTO 0x02
2976 #define EXTENDED_DATA_MFLAG_MULTI 0x80
2978 #define EVIL_ORIGIN_ANONYMOUS 1
2979 #define EVIL_ORIGIN_NONANONYMOUS 2
2981 static const value_string evil_origins
[] = {
2982 {EVIL_ORIGIN_ANONYMOUS
, "Anonymous"},
2983 {EVIL_ORIGIN_NONANONYMOUS
, "Non-Anonymous"},
2987 /* Initialize the protocol and registered fields */
2990 dissect_aim_tlv_value_rendezvous(proto_item
*ti
, uint16_t valueid _U_
, tvbuff_t
*tvb
, packet_info
*pinfo
)
2993 proto_tree
*entry
= proto_item_add_subtree(ti
, ett_aim_rendezvous_data
);
2994 proto_tree_add_item(entry
, hf_aim_rendezvous_msg_type
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
2997 proto_tree_add_item(entry
, hf_aim_icbm_cookie
, tvb
, offset
, 8, ENC_NA
);
3000 offset
= dissect_aim_capability(entry
, tvb
, offset
);
3002 return dissect_aim_tlv_sequence(tvb
, pinfo
, offset
, entry
,
3003 aim_rendezvous_tlvs
);
3007 dissect_aim_msg_outgoing(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*msg_tree
)
3010 const aim_tlv
*aim_ch_tlvs
= NULL
;
3011 uint16_t channel_id
;
3013 int buddyname_length
;
3016 proto_tree_add_item(msg_tree
, hf_aim_icbm_cookie
, tvb
, offset
, 8, ENC_NA
);
3019 /* Message Channel ID */
3020 channel_id
= tvb_get_ntohs(tvb
, offset
);
3021 proto_tree_add_item(msg_tree
, hf_aim_message_channel_id
, tvb
, offset
, 2,
3025 /* Add the outgoing username to the info column */
3026 buddyname_length
= aim_get_buddyname(pinfo
->pool
, &buddyname
, tvb
, offset
);
3027 col_append_fstr(pinfo
->cinfo
, COL_INFO
, " to: %s",
3028 format_text(pinfo
->pool
, buddyname
, buddyname_length
));
3030 offset
= dissect_aim_buddyname(tvb
, pinfo
, offset
, msg_tree
);
3032 switch(channel_id
) {
3033 case ICBM_CHANNEL_IM
: aim_ch_tlvs
= aim_messaging_incoming_ch1_tlvs
; break;
3034 case ICBM_CHANNEL_RENDEZVOUS
: aim_ch_tlvs
= aim_messaging_incoming_ch2_tlvs
; break;
3035 default: return offset
;
3038 return dissect_aim_tlv_sequence(tvb
, pinfo
, offset
, msg_tree
, aim_ch_tlvs
);
3043 dissect_aim_msg_incoming(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*msg_tree
)
3046 const aim_tlv
*aim_ch_tlvs
;
3047 uint16_t channel_id
;
3050 proto_tree_add_item(msg_tree
, hf_aim_icbm_cookie
, tvb
, offset
, 8, ENC_NA
);
3053 /* Message Channel ID */
3054 proto_tree_add_item(msg_tree
, hf_aim_message_channel_id
, tvb
, offset
, 2,
3056 channel_id
= tvb_get_ntohs(tvb
, offset
);
3059 offset
= dissect_aim_userinfo(tvb
, pinfo
, offset
, msg_tree
);
3061 switch(channel_id
) {
3062 case ICBM_CHANNEL_IM
: aim_ch_tlvs
= aim_messaging_incoming_ch1_tlvs
; break;
3063 case ICBM_CHANNEL_RENDEZVOUS
: aim_ch_tlvs
= aim_messaging_incoming_ch2_tlvs
; break;
3064 default: return offset
;
3067 return dissect_aim_tlv_sequence(tvb
, pinfo
, offset
, msg_tree
, aim_ch_tlvs
);
3071 dissect_aim_msg_params(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*msg_tree
)
3074 proto_tree_add_item(msg_tree
, hf_aim_icbm_channel
, tvb
, offset
, 2, ENC_BIG_ENDIAN
); offset
+=2;
3075 proto_tree_add_item(msg_tree
, hf_aim_icbm_msg_flags
, tvb
, offset
, 4, ENC_BIG_ENDIAN
); offset
+=4;
3076 proto_tree_add_item(msg_tree
, hf_aim_icbm_max_snac_size
, tvb
, offset
, 2, ENC_BIG_ENDIAN
); offset
+=2;
3077 proto_tree_add_item(msg_tree
, hf_aim_icbm_max_sender_warnlevel
, tvb
, offset
, 2, ENC_BIG_ENDIAN
); offset
+=2;
3078 proto_tree_add_item(msg_tree
, hf_aim_icbm_max_receiver_warnlevel
, tvb
, offset
, 2, ENC_BIG_ENDIAN
); offset
+=2;
3079 proto_tree_add_item(msg_tree
, hf_aim_icbm_min_msg_interval
, tvb
, offset
, 4, ENC_BIG_ENDIAN
); offset
+=4;
3084 dissect_aim_msg_evil_req(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*msg_tree
)
3087 proto_tree_add_item(msg_tree
, hf_aim_icbm_evil
, tvb
, offset
, 2, ENC_BIG_ENDIAN
); offset
+=2;
3088 return dissect_aim_buddyname(tvb
, pinfo
, offset
, msg_tree
);
3093 dissect_aim_msg_evil_repl(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*msg_tree
)
3096 proto_tree_add_item(msg_tree
, hf_aim_evil_warn_level
, tvb
, offset
, 2, ENC_BIG_ENDIAN
); offset
+=2;
3097 proto_tree_add_item(msg_tree
, hf_aim_evil_new_warn_level
, tvb
, offset
, 2, ENC_BIG_ENDIAN
); offset
+=2;
3102 dissect_aim_msg_minityping(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*msg_tree
)
3105 proto_tree_add_item(msg_tree
,hf_aim_icbm_notification_cookie
, tvb
, offset
, 8, ENC_NA
); offset
+=8;
3106 proto_tree_add_item(msg_tree
,hf_aim_icbm_notification_channel
, tvb
, offset
, 2, ENC_BIG_ENDIAN
); offset
+=2;
3107 offset
= dissect_aim_buddyname(tvb
, pinfo
, offset
, msg_tree
);
3108 proto_tree_add_item(msg_tree
,hf_aim_icbm_notification_type
, tvb
, offset
, 2, ENC_BIG_ENDIAN
); offset
+=2;
3112 typedef struct _aim_client_plugin
3116 } aim_client_plugin
;
3118 static const aim_client_plugin known_client_plugins
[] = {
3121 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}},
3124 {0xD140CF10, 0xE94F, 0x11D3,
3125 {0xBC, 0xD2, 0x00, 0x04, 0xAC, 0x96, 0xDD, 0x96}}},
3127 { NULL
, {0x0, 0x0, 0x0, { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 } } }
3131 aim_client_plugin
*aim_find_plugin ( e_guid_t uuid
)
3135 for(i
= 0; known_client_plugins
[i
].name
; i
++)
3137 const aim_client_plugin
*plugin
= &(known_client_plugins
[i
]);
3139 if(memcmp(&(plugin
->uuid
), &uuid
, sizeof(e_guid_t
)) == 0)
3147 dissect_aim_plugin(proto_tree
*entry
, tvbuff_t
*tvb
, int offset
, e_guid_t
* out_plugin_uuid
)
3149 const aim_client_plugin
*plugin
= NULL
;
3153 uuid
.data1
= tvb_get_ntohl(tvb
, offset
);
3154 uuid
.data2
= tvb_get_ntohs(tvb
, offset
+4);
3155 uuid
.data3
= tvb_get_ntohs(tvb
, offset
+6);
3156 tvb_memcpy(tvb
, uuid
.data4
, offset
+8, 8);
3157 if (out_plugin_uuid
)
3158 *out_plugin_uuid
= uuid
;
3160 plugin
= aim_find_plugin(uuid
);
3162 ti
= proto_tree_add_item(entry
, hf_aim_messaging_plugin
, tvb
, offset
, 16, ENC_NA
);
3163 proto_item_append_text(ti
, " (%s)", plugin
? plugin
->name
:"Unknown");
3169 dissect_aim_rendezvous_extended_message(tvbuff_t
*tvb
, proto_tree
*msg_tree
)
3172 uint32_t text_length
;
3173 static int * const flags
[] = {
3174 &hf_aim_rendezvous_extended_data_message_flags_normal
,
3175 &hf_aim_rendezvous_extended_data_message_flags_auto
,
3176 &hf_aim_rendezvous_extended_data_message_flags_multi
,
3180 proto_tree_add_item(msg_tree
, hf_aim_rendezvous_extended_data_message_type
, tvb
, offset
, 1, ENC_BIG_ENDIAN
); offset
+=1;
3181 proto_tree_add_bitmask(msg_tree
, tvb
, offset
, hf_aim_rendezvous_extended_data_message_flags
,
3182 ett_aim_extended_data_message_flags
, flags
, ENC_NA
);
3184 proto_tree_add_item(msg_tree
, hf_aim_rendezvous_extended_data_message_status_code
, tvb
, offset
, 2, ENC_BIG_ENDIAN
); offset
+=2;
3185 proto_tree_add_item(msg_tree
, hf_aim_rendezvous_extended_data_message_priority_code
, tvb
, offset
, 2, ENC_BIG_ENDIAN
); offset
+=2;
3186 text_length
= tvb_get_letohs(tvb
, offset
);
3187 proto_tree_add_item_ret_uint(msg_tree
, hf_aim_rendezvous_extended_data_message_text_length
, tvb
, offset
, 2, ENC_BIG_ENDIAN
, &text_length
); offset
+=2;
3188 proto_tree_add_item(msg_tree
, hf_aim_rendezvous_extended_data_message_text
, tvb
, offset
, text_length
, ENC_ASCII
); /* offset+=text_length; */
3190 offset
= tvb_reported_length(tvb
);
3196 is_uuid_null(e_guid_t uuid
)
3198 return (uuid
.data1
== 0) &&
3199 (uuid
.data2
== 0) &&
3200 (uuid
.data3
== 0) &&
3201 (uuid
.data4
[0] == 0) &&
3202 (uuid
.data4
[1] == 0) &&
3203 (uuid
.data4
[2] == 0) &&
3204 (uuid
.data4
[3] == 0) &&
3205 (uuid
.data4
[4] == 0) &&
3206 (uuid
.data4
[5] == 0) &&
3207 (uuid
.data4
[6] == 0) &&
3208 (uuid
.data4
[7] == 0);
3212 dissect_aim_tlv_value_extended_data(proto_tree
*entry
, uint16_t valueid _U_
, tvbuff_t
*tvb
, packet_info
*pinfo _U_
)
3215 uint16_t length
/*, protocol_version*/;
3217 e_guid_t plugin_uuid
;
3219 length
= tvb_get_letohs(tvb
, offset
);
3220 proto_tree_add_item(entry
, hf_aim_icbm_client_err_length
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
); offset
+=2;
3221 start_offset
= offset
;
3223 proto_tree_add_item(entry
, hf_aim_icbm_client_err_protocol_version
, tvb
, offset
, 2, ENC_BIG_ENDIAN
); offset
+=2;
3225 offset
= dissect_aim_plugin(entry
, tvb
, offset
, &plugin_uuid
);
3226 proto_tree_add_item(entry
, hf_aim_messaging_unknown_uint16
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
); offset
+= 2;
3227 proto_tree_add_item(entry
, hf_aim_icbm_client_err_client_caps_flags
, tvb
, offset
, 4, ENC_BIG_ENDIAN
); offset
+=4;
3228 proto_tree_add_item(entry
, hf_aim_messaging_unknown_uint8
, tvb
, offset
, 1, ENC_NA
); offset
+= 1;
3229 proto_tree_add_item(entry
, hf_aim_icbm_client_err_downcounter
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
); /* offset += 2;*/
3231 offset
= start_offset
+ length
;
3233 length
= tvb_get_letohs(tvb
, offset
);
3234 proto_tree_add_item(entry
, hf_aim_icbm_client_err_length
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
); offset
+=2;
3235 start_offset
= offset
;
3236 proto_tree_add_item(entry
, hf_aim_icbm_client_err_downcounter
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
); offset
+= 2;
3237 proto_tree_add_item(entry
, hf_aim_messaging_unknown_data
, tvb
, offset
, length
-2, ENC_NA
);
3238 offset
= start_offset
+ length
;
3240 if (is_uuid_null(plugin_uuid
))
3242 /* a message follows */
3243 tvbuff_t
*subtvb
= tvb_new_subset_remaining(tvb
, offset
);
3244 /* offset += */ dissect_aim_rendezvous_extended_message(subtvb
, entry
);
3248 /* plugin-specific data follows */
3249 proto_tree_add_item(entry
, hf_aim_messaging_plugin_specific_data
, tvb
, offset
, -1, ENC_NA
);
3251 offset
= tvb_reported_length(tvb
);
3257 dissect_aim_msg_ack(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*msg_tree
)
3261 proto_tree_add_item(msg_tree
,hf_aim_icbm_cookie
, tvb
, offset
, 8, ENC_NA
); offset
+=8;
3263 proto_tree_add_item(msg_tree
, hf_aim_message_channel_id
, tvb
, offset
, 2,
3264 ENC_BIG_ENDIAN
); offset
+= 2;
3266 offset
= dissect_aim_buddyname(tvb
, pinfo
, offset
, msg_tree
);
3272 dissect_aim_msg_client_err(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*msg_tree
)
3275 uint16_t channel
, reason
;
3277 proto_tree_add_item(msg_tree
,hf_aim_icbm_cookie
, tvb
, offset
, 8, ENC_NA
); offset
+=8;
3278 channel
= tvb_get_ntohs(tvb
, offset
);
3279 proto_tree_add_item(msg_tree
,hf_aim_icbm_channel
, tvb
, offset
, 2, ENC_BIG_ENDIAN
); offset
+=2;
3280 offset
= dissect_aim_buddyname(tvb
, pinfo
, offset
, msg_tree
);
3281 reason
= tvb_get_ntohs(tvb
, offset
);
3282 proto_tree_add_item(msg_tree
, hf_aim_icbm_client_err_reason
, tvb
, offset
, 2, ENC_BIG_ENDIAN
); offset
+=2;
3284 if (reason
== CLIENT_ERR__REASON_CHANNEL_SPECIFIC
&& tvb_reported_length_remaining(tvb
, offset
) > 0)
3288 case ICBM_CHANNEL_RENDEZVOUS
:
3289 proto_tree_add_item(msg_tree
, hf_aim_icbm_rendezvous_nak_length
, tvb
, offset
, 2, ENC_BIG_ENDIAN
); offset
+=2;
3290 proto_tree_add_item(msg_tree
, hf_aim_icbm_rendezvous_nak
, tvb
, offset
, 2, ENC_BIG_ENDIAN
); offset
+=2;
3295 tvbuff_t
*subtvb
= tvb_new_subset_remaining(tvb
, offset
);
3296 proto_tree
*extended_tree
= proto_tree_add_subtree(msg_tree
, tvb
, offset
, -1, ett_aim_extended_data
, NULL
, "Extended Data");
3297 dissect_aim_tlv_value_extended_data(extended_tree
, 0, subtvb
, pinfo
);
3306 static const aim_subtype aim_fnac_family_messaging
[] = {
3307 { 0x0001, "Error", dissect_aim_snac_error
},
3308 { 0x0002, "Set ICBM Parameter", dissect_aim_msg_params
},
3309 { 0x0003, "Reset ICBM Parameter", NULL
},
3310 { 0x0004, "Request Parameter Info", NULL
},
3311 { 0x0005, "Parameter Info", dissect_aim_msg_params
},
3312 { 0x0006, "Outgoing", dissect_aim_msg_outgoing
},
3313 { 0x0007, "Incoming", dissect_aim_msg_incoming
},
3314 { 0x0008, "Evil Request", dissect_aim_msg_evil_req
},
3315 { 0x0009, "Evil Response", dissect_aim_msg_evil_repl
},
3316 { 0x000a, "Missed Call", NULL
},
3317 { 0x000b, "Client Error", dissect_aim_msg_client_err
},
3318 { 0x000c, "Acknowledge", dissect_aim_msg_ack
},
3319 { 0x0014, "Mini Typing Notifications (MTN)", dissect_aim_msg_minityping
},
3325 /***********************************************************************************************************
3327 ***********************************************************************************************************/
3330 #define AIM_POPUP_TLV_MESSAGE_TEXT 0x001
3331 #define AIM_POPUP_TLV_URL_STRING 0x002
3332 #define AIM_POPUP_TLV_WINDOW_WIDTH 0x003
3333 #define AIM_POPUP_TLV_WINDOW_HEIGHT 0x004
3334 #define AIM_POPUP_TLV_AUTOHIDE_DELAY 0x005
3336 static const aim_tlv aim_popup_tlvs
[] = {
3337 { AIM_POPUP_TLV_MESSAGE_TEXT
, "Message text (html)", dissect_aim_tlv_value_string
},
3338 { AIM_POPUP_TLV_URL_STRING
, "URL string", dissect_aim_tlv_value_string
},
3339 { AIM_POPUP_TLV_WINDOW_WIDTH
, "Window Width (pixels)", dissect_aim_tlv_value_uint16
},
3340 { AIM_POPUP_TLV_WINDOW_HEIGHT
, "Window Height (pixels)", dissect_aim_tlv_value_uint16
},
3341 { AIM_POPUP_TLV_AUTOHIDE_DELAY
, "Autohide delay (seconds)", dissect_aim_tlv_value_uint16
},
3345 static int dissect_aim_popup(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*popup_tree
)
3347 return dissect_aim_tlv(tvb
, pinfo
, 0, popup_tree
, aim_popup_tlvs
);
3350 static const aim_subtype aim_fnac_family_popup
[] = {
3351 { 0x0001, "Error", dissect_aim_snac_error
},
3352 { 0x0002, "Display Popup Message Server Command" , dissect_aim_popup
},
3356 /***********************************************************************************************************
3358 ***********************************************************************************************************/
3360 static int dissect_aim_snac_signon_logon(tvbuff_t
*tvb
, packet_info
*pinfo
,
3364 while (tvb_reported_length_remaining(tvb
, offset
) > 0) {
3365 offset
= dissect_aim_tlv(tvb
, pinfo
, offset
, tree
, aim_client_tlvs
);
3370 static int dissect_aim_snac_signon_logon_reply(tvbuff_t
*tvb
,
3375 while (tvb_reported_length_remaining(tvb
, offset
) > 0) {
3376 offset
= dissect_aim_tlv(tvb
, pinfo
, offset
, tree
, aim_client_tlvs
);
3381 static int dissect_aim_snac_signon_signon(tvbuff_t
*tvb
, packet_info
*pinfo
,
3384 uint8_t buddyname_length
= 0;
3389 proto_tree_add_item(tree
, hf_aim_infotype
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3396 buddyname_length
= aim_get_buddyname( pinfo
->pool
, &buddyname
, tvb
, offset
);
3398 col_append_fstr(pinfo
->cinfo
, COL_INFO
, " Username: %s",
3399 format_text(pinfo
->pool
, buddyname
, buddyname_length
));
3402 offset
+=dissect_aim_buddyname(tvb
, pinfo
, offset
, tree
);
3408 static int dissect_aim_snac_signon_signon_reply(tvbuff_t
*tvb
,
3409 packet_info
*pinfo _U_
,
3413 uint16_t challenge_length
= 0;
3415 /* Logon Challenge Length */
3416 challenge_length
= tvb_get_ntohs(tvb
, offset
);
3417 proto_tree_add_item(tree
, hf_aim_signon_challenge_len
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3421 proto_tree_add_item(tree
, hf_aim_signon_challenge
, tvb
, offset
, challenge_length
, ENC_UTF_8
);
3422 offset
+= challenge_length
;
3426 static int dissect_aim_tlv_value_registration(proto_item
*ti _U_
, uint16_t value_id _U_
, tvbuff_t
*tvb _U_
, packet_info
*pinfo _U_
)
3432 #define REG_TLV_REGISTRATION_INFO 0x0001
3434 static const aim_tlv aim_registration_tlvs
[] = {
3435 { REG_TLV_REGISTRATION_INFO
, "Registration Info", dissect_aim_tlv_value_registration
},
3439 static int dissect_aim_snac_register (tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
)
3441 return dissect_aim_tlv(tvb
, pinfo
, 0, tree
, aim_registration_tlvs
);
3444 static const aim_subtype aim_fnac_family_signon
[] = {
3445 { 0x0001, "Error", dissect_aim_snac_error
},
3446 { 0x0002, "Logon", dissect_aim_snac_signon_logon
},
3447 { 0x0003, "Logon Reply", dissect_aim_snac_signon_logon_reply
},
3448 { 0x0004, "Request UIN", dissect_aim_snac_register
},
3449 { 0x0005, "New UIN response", dissect_aim_snac_register
},
3450 { 0x0006, "Sign-on", dissect_aim_snac_signon_signon
},
3451 { 0x0007, "Sign-on Reply", dissect_aim_snac_signon_signon_reply
},
3452 { 0x000a, "Server SecureID Request", NULL
},
3453 { 0x000b, "Client SecureID Reply", NULL
},
3457 /***********************************************************************************************************
3459 ***********************************************************************************************************/
3460 #define SSI_RIGHTSINFO_TLV_MAX_ITEMS 0x0004
3462 static const aim_tlv aim_ssi_rightsinfo_tlvs
[] = {
3463 { SSI_RIGHTSINFO_TLV_MAX_ITEMS
, "Maximums For Items", dissect_aim_tlv_value_bytes
},
3467 /* Initialize the protocol and registered fields */
3469 /** Calculate size of SSI entry
3470 * Size of SSI entry can be calculated as:
3471 * sizeof(buddy name length field) = sizeof(uint16_t) = 2
3472 * + sizeof(buddy name string) = buddy name length field = N
3473 * + sizeof(group ID) = sizeof(uint16_t) = 2
3474 * + sizeof(buddy ID) = sizeof(uint16_t) = 2
3475 * + sizeof(buddy type) = sizeof(uint16_t) = 2
3476 * + sizeof(TLV length) = sizeof(uint16_t) = 2
3477 * + sizeof(TLVs) = TLV length = M
3478 * = 2 + N + 2 * 4 + M
3480 static int calc_ssi_entry_size(tvbuff_t
*tvb
, int offset
)
3482 int ssi_entry_size
= 2 + tvb_get_ntohs(tvb
, offset
) + 2 * 3;
3483 ssi_entry_size
+= tvb_get_ntohs(tvb
, offset
+ ssi_entry_size
) + 2;
3484 return ssi_entry_size
;
3487 static int dissect_ssi_item(tvbuff_t
*tvb
, packet_info
*pinfo
, int offset
, proto_tree
*ssi_entry
)
3489 uint16_t buddyname_length
= 0;
3491 uint16_t tlv_len
= 0;
3493 /* Buddy Name Length */
3494 buddyname_length
= tvb_get_ntohs(tvb
, offset
);
3495 proto_tree_add_item(ssi_entry
, hf_aim_fnac_subtype_ssi_buddyname_len
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3499 if (buddyname_length
> 0) {
3500 proto_tree_add_item(ssi_entry
, hf_aim_fnac_subtype_ssi_buddyname
, tvb
, offset
, buddyname_length
, ENC_UTF_8
);
3501 offset
+= buddyname_length
;
3504 /* Buddy group ID */
3505 proto_tree_add_item(ssi_entry
, hf_aim_fnac_subtype_ssi_gid
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3509 proto_tree_add_item(ssi_entry
, hf_aim_fnac_subtype_ssi_bid
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3513 proto_tree_add_item(ssi_entry
, hf_aim_fnac_subtype_ssi_type
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3516 /* Size of the following TLV in bytes (as opposed to the number of
3517 TLV objects in the chain) */
3518 tlv_len
= tvb_get_ntohs(tvb
, offset
);
3519 proto_tree_add_item(ssi_entry
, hf_aim_fnac_subtype_ssi_tlvlen
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3523 /* For now, we just dump the TLV contents as-is, since there is not a
3524 TLV dissection utility that works based on total chain length */
3525 while(endoffset
< offset
+tlv_len
) {
3526 endoffset
= dissect_aim_tlv(tvb
, pinfo
, endoffset
, ssi_entry
, aim_client_tlvs
);
3531 static int dissect_ssi_ssi_item(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*ssi_entry
)
3533 return dissect_ssi_item(tvb
, pinfo
, 0, ssi_entry
);
3536 static int dissect_ssi_ssi_items(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
)
3540 proto_tree
*ssi_entry
= NULL
;
3541 int size
= tvb_reported_length(tvb
);
3542 while (size
> offset
)
3544 ssi_entry_size
= calc_ssi_entry_size(tvb
, offset
);
3545 ssi_entry
= proto_tree_add_subtree(tree
, tvb
, offset
, ssi_entry_size
, ett_aim_ssi
, NULL
, "SSI Entry");
3546 offset
= dissect_ssi_item(tvb
, pinfo
, offset
, ssi_entry
);
3551 static int dissect_aim_ssi_rightsinfo(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*ssi_tree
)
3553 return dissect_aim_tlv_sequence(tvb
, pinfo
, 0, ssi_tree
, aim_ssi_rightsinfo_tlvs
);
3556 static int dissect_aim_ssi_was_added(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*ssi_tree
)
3558 return dissect_aim_buddyname(tvb
, pinfo
, 0, ssi_tree
);
3561 static int dissect_aim_snac_ssi_time_and_items_num(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
3566 proto_tree_add_item(tree
, hf_aim_fnac_subtype_ssi_last_change_time
, tvb
, offset
, 4, ENC_TIME_SECS
|ENC_BIG_ENDIAN
);
3569 /* get number of SSI items */
3570 proto_tree_add_item(tree
, hf_aim_fnac_subtype_ssi_numitems
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3576 static int dissect_aim_snac_ssi_list(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
)
3579 proto_tree
*ssi_entry
= NULL
;
3580 uint16_t num_items
, i
;
3584 proto_tree_add_item(tree
, hf_aim_fnac_subtype_ssi_version
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3587 /* Number of items */
3588 proto_tree_add_item(tree
, hf_aim_fnac_subtype_ssi_numitems
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3589 num_items
= tvb_get_ntohs(tvb
, offset
);
3592 for(i
= 0; i
< num_items
; i
++) {
3593 ssi_entry_size
= calc_ssi_entry_size(tvb
, offset
);
3594 ssi_entry
= proto_tree_add_subtree_format(tree
, tvb
, offset
, ssi_entry_size
,
3595 ett_aim_ssi
, NULL
, "SSI Entry %u", i
);
3596 offset
= dissect_ssi_item(tvb
, pinfo
, offset
, ssi_entry
);
3598 proto_tree_add_item(tree
, hf_aim_fnac_subtype_ssi_last_change_time
, tvb
, offset
, 4, ENC_TIME_SECS
|ENC_BIG_ENDIAN
);
3603 static int dissect_aim_snac_ssi_auth_request(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
3606 uint16_t reason_length
;
3607 /*uint16_t unknown;*/
3609 /* get buddy length (1 byte) */
3610 uint8_t buddyname_length
= tvb_get_uint8(tvb
, offset
);
3611 proto_tree_add_item(tree
, hf_aim_fnac_subtype_ssi_buddyname_len8
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3614 /* show buddy name */
3615 if (buddyname_length
> 0) {
3616 proto_tree_add_item(tree
, hf_aim_fnac_subtype_ssi_buddyname
, tvb
, offset
, buddyname_length
, ENC_UTF_8
);
3617 offset
+= buddyname_length
;
3619 /* get reason message length (2 bytes) */
3620 reason_length
= tvb_get_ntohs(tvb
, offset
);
3621 proto_tree_add_item(tree
, hf_aim_fnac_subtype_ssi_reason_str_len
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3624 /* show reason message if present */
3625 if (reason_length
> 0) {
3626 proto_tree_add_item(tree
, hf_aim_fnac_subtype_ssi_reason_str
, tvb
, offset
, reason_length
, ENC_UTF_8
);
3627 offset
+= reason_length
;
3630 /* unknown (always 0x0000 ???) */
3631 /*unknown = tvb_get_ntohs(tvb, offset);*/
3632 proto_tree_add_item(tree
, hf_aim_fnac_subtype_ssi_grant_auth_unkn
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3638 static int dissect_aim_snac_ssi_auth_reply(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
3641 uint16_t reason_length
;
3643 /* get buddy length (1 byte) */
3644 uint8_t buddyname_length
= tvb_get_uint8(tvb
, offset
);
3645 proto_tree_add_item(tree
, hf_aim_fnac_subtype_ssi_buddyname_len8
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3648 /* show buddy name */
3649 if (buddyname_length
> 0) {
3650 proto_tree_add_item(tree
, hf_aim_fnac_subtype_ssi_buddyname
, tvb
, offset
, buddyname_length
, ENC_UTF_8
);
3651 offset
+= buddyname_length
;
3654 /* accept/reject authorization flag */
3655 proto_tree_add_item(tree
, hf_aim_fnac_subtype_ssi_allow_auth
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3658 /* get reason message length (2 bytes) */
3659 reason_length
= tvb_get_ntohs(tvb
, offset
);
3660 proto_tree_add_item(tree
, hf_aim_fnac_subtype_ssi_reason_str_len
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3663 /* show reason message if present */
3664 if (reason_length
> 0) {
3665 proto_tree_add_item(tree
, hf_aim_fnac_subtype_ssi_reason_str
, tvb
, offset
, reason_length
, ENC_UTF_8
);
3666 offset
+= reason_length
;
3672 static const aim_subtype aim_fnac_family_ssi
[] = {
3673 { 0x0001, "Error", dissect_aim_snac_error
},
3674 { 0x0002, "Request Rights", NULL
},
3675 { 0x0003, "Rights Info", dissect_aim_ssi_rightsinfo
},
3676 { 0x0004, "Request List (first time)", NULL
},
3677 { 0x0005, "Request List", dissect_aim_snac_ssi_time_and_items_num
},
3678 { 0x0006, "List", dissect_aim_snac_ssi_list
},
3679 { 0x0007, "Activate", NULL
},
3680 { 0x0008, "Add Buddy", dissect_ssi_ssi_item
},
3681 { 0x0009, "Modify Buddy", dissect_ssi_ssi_items
},
3682 { 0x000a, "Delete Buddy", dissect_ssi_ssi_item
},
3683 { 0x000e, "Server Ack", dissect_aim_ssi_result
},
3684 { 0x000f, "No List", dissect_aim_snac_ssi_time_and_items_num
},
3685 { 0x0011, "Edit Start", NULL
},
3686 { 0x0012, "Edit Stop", NULL
},
3687 { 0x0014, "Grant Future Authorization to Buddy", dissect_aim_snac_ssi_auth_request
},
3688 { 0x0015, "Future Authorization Granted", dissect_aim_snac_ssi_auth_request
},
3689 { 0x0018, "Send Authentication Request", dissect_aim_snac_ssi_auth_request
},
3690 { 0x0019, "Authentication Request", dissect_aim_snac_ssi_auth_request
},
3691 { 0x001a, "Send Authentication Reply", dissect_aim_snac_ssi_auth_reply
},
3692 { 0x001b, "Authentication Reply", dissect_aim_snac_ssi_auth_reply
},
3693 { 0x001c, "Remote User Added Client To List", dissect_aim_ssi_was_added
},
3697 /***********************************************************************************************************
3699 ***********************************************************************************************************/
3700 static int dissect_aim_sst_buddy_down_req (tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
)
3702 int offset
= dissect_aim_buddyname(tvb
, pinfo
, 0, tree
);
3705 proto_tree_add_item(tree
, hf_aim_sst_unknown
, tvb
, offset
, 4, ENC_NA
);
3708 proto_tree_add_item(tree
, hf_aim_sst_md5_hash_size
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3709 md5_size
= tvb_get_uint8(tvb
, offset
);
3712 proto_tree_add_item(tree
, hf_aim_sst_md5_hash
, tvb
, offset
, md5_size
, ENC_NA
);
3718 static int dissect_aim_sst_buddy_down_repl (tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
)
3720 int offset
= dissect_aim_buddyname(tvb
, pinfo
, 0, tree
);
3724 proto_tree_add_item(tree
, hf_aim_sst_unknown
, tvb
, offset
, 3, ENC_NA
);
3727 proto_tree_add_item(tree
, hf_aim_sst_md5_hash_size
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3728 md5_size
= tvb_get_uint8(tvb
, offset
);
3731 proto_tree_add_item(tree
, hf_aim_sst_md5_hash
, tvb
, offset
, md5_size
, ENC_NA
);
3735 proto_tree_add_item(tree
, hf_aim_sst_icon_size
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3736 icon_size
= tvb_get_ntohs(tvb
, offset
);
3741 proto_tree_add_item(tree
, hf_aim_sst_icon
, tvb
, offset
, icon_size
, ENC_NA
);
3749 static int dissect_aim_sst_buddy_up_repl (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
3754 proto_tree_add_item(tree
, hf_aim_sst_unknown
, tvb
, offset
, 4, ENC_NA
);
3757 proto_tree_add_item(tree
, hf_aim_sst_md5_hash_size
, tvb
, offset
, 1, ENC_BIG_ENDIAN
);
3758 md5_size
= tvb_get_uint8(tvb
, offset
);
3761 proto_tree_add_item(tree
, hf_aim_sst_md5_hash
, tvb
, offset
, md5_size
, ENC_NA
);
3767 static int dissect_aim_sst_buddy_up_req (tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
3772 proto_tree_add_item(tree
, hf_aim_sst_ref_num
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3775 proto_tree_add_item(tree
, hf_aim_sst_icon_size
, tvb
, offset
, 2, ENC_BIG_ENDIAN
);
3776 icon_size
= tvb_get_ntohs(tvb
, offset
);
3781 proto_tree_add_item(tree
, hf_aim_sst_icon
, tvb
, offset
, icon_size
, ENC_NA
);
3788 static const aim_subtype aim_fnac_family_sst
[] = {
3789 { 0x0001, "Error", dissect_aim_snac_error
},
3790 { 0x0002, "Upload Buddy Icon Request", dissect_aim_sst_buddy_up_req
},
3791 { 0x0003, "Upload Buddy Icon Reply", dissect_aim_sst_buddy_up_repl
},
3792 { 0x0004, "Download Buddy Icon Request", dissect_aim_sst_buddy_down_req
},
3793 { 0x0005, "Download Buddy Icon Reply", dissect_aim_sst_buddy_down_repl
},
3797 static const aim_subtype aim_fnac_family_stats
[] = {
3798 { 0x0001, "Error", dissect_aim_snac_error
},
3799 { 0x0002, "Set Report Interval", NULL
},
3800 { 0x0003, "Report Request", NULL
},
3801 { 0x0004, "Report Ack", NULL
},
3805 static const aim_subtype aim_fnac_family_translate
[] = {
3806 { 0x0001, "Error", dissect_aim_snac_error
},
3807 { 0x0002, "Translate Request", NULL
},
3808 { 0x0003, "Translate Reply", NULL
},
3812 /***********************************************************************************************************
3814 ***********************************************************************************************************/
3815 static int dissect_aim_userlookup_search(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*lookup_tree
)
3817 proto_tree_add_item(lookup_tree
, hf_aim_userlookup_email
, tvb
, 0, tvb_reported_length(tvb
), ENC_UTF_8
);
3818 return tvb_reported_length(tvb
);
3822 static int dissect_aim_userlookup_result(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*lookup_tree
)
3824 return dissect_aim_tlv_sequence(tvb
, pinfo
, 0, lookup_tree
, aim_client_tlvs
);
3827 static const aim_subtype aim_fnac_family_userlookup
[] = {
3828 { 0x0001, "Error", dissect_aim_snac_error
},
3829 { 0x0002, "Search for user by email address", dissect_aim_userlookup_search
},
3830 { 0x0003, "Search results", dissect_aim_userlookup_result
},
3835 family_free(void *p
, void *user_data _U_
)
3843 g_list_foreach(families
, family_free
, NULL
);
3844 g_list_free(families
);
3848 proto_register_aim(void)
3851 /* Setup list of header fields */
3852 static hf_register_info hf
[] = {
3853 { &hf_aim_cmd_start
,
3854 { "Command Start", "aim.cmd_start", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}
3857 { "Channel ID", "aim.channel", FT_UINT8
, BASE_HEX
, VALS(aim_flap_channels
), 0x0, NULL
, HFILL
}
3860 { "Sequence Number", "aim.seqno", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
3863 { "Protocol Version", "aim.version", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
},
3866 { "Data Field Length", "aim.datalen", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
3868 { &hf_aim_tlv_length
,
3869 { "Length", "aim.tlv.length", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
3871 { &hf_aim_tlv_value_id
,
3872 { "Value ID", "aim.tlv.value_id", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
3875 { "Data", "aim.data", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
3877 { &hf_aim_fnac_family
,
3878 { "FNAC Family ID", "aim.fnac.family", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}
3880 { &hf_aim_fnac_subtype
,
3881 { "FNAC Subtype ID", "aim.fnac.subtype", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}
3883 { &hf_aim_fnac_flags
,
3884 { "FNAC Flags", "aim.fnac.flags", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}
3887 { "FNAC ID", "aim.fnac.id", FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}
3889 { &hf_aim_buddyname_len
,
3890 { "Buddyname len", "aim.buddynamelen", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
3892 { &hf_aim_buddyname
,
3893 { "Buddy Name", "aim.buddyname", FT_STRING
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
3896 { "TLV Count", "aim.tlvcount", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
},
3898 { &hf_aim_snac_error
,
3899 { "SNAC Error", "aim.snac.error", FT_UINT16
, BASE_HEX
, VALS(aim_snac_errors
), 0x0, NULL
, HFILL
},
3901 { &hf_aim_userclass_unconfirmed
,
3902 { "AOL Unconfirmed account flag", "aim.userclass.unconfirmed", FT_BOOLEAN
, 32, TFS(&tfs_set_notset
), CLASS_UNCONFIRMED
, NULL
, HFILL
},
3904 { &hf_aim_userclass_administrator
,
3905 { "AOL Administrator flag", "aim.userclass.administrator", FT_BOOLEAN
, 32, TFS(&tfs_set_notset
), CLASS_ADMINISTRATOR
, NULL
, HFILL
},
3907 { &hf_aim_userclass_aol
,
3908 { "AOL Staff User Flag", "aim.userclass.staff", FT_BOOLEAN
, 32, TFS(&tfs_set_notset
), CLASS_AOL
, NULL
, HFILL
},
3910 { &hf_aim_userclass_commercial
,
3911 { "AOL commercial account flag", "aim.userclass.commercial", FT_BOOLEAN
, 32, TFS(&tfs_set_notset
), CLASS_COMMERCIAL
, NULL
, HFILL
},
3913 { &hf_aim_userclass_aim
,
3914 { "AIM user flag", "aim.userclass.free", FT_BOOLEAN
, 32, TFS(&tfs_set_notset
), CLASS_AIM
, NULL
, HFILL
},
3916 { &hf_aim_userclass_away
,
3917 { "AOL away status flag", "aim.userclass.away", FT_BOOLEAN
, 32, TFS(&tfs_set_notset
), CLASS_AWAY
, NULL
, HFILL
},
3919 { &hf_aim_userclass_icq
,
3920 { "ICQ user sign", "aim.userclass.icq", FT_BOOLEAN
, 32, TFS(&tfs_set_notset
), CLASS_ICQ
, NULL
, HFILL
},
3922 { &hf_aim_userclass_wireless
,
3923 { "AOL wireless user", "aim.userclass.wireless", FT_BOOLEAN
, 32, TFS(&tfs_set_notset
), CLASS_WIRELESS
, NULL
, HFILL
},
3925 { &hf_aim_userclass_unknown100
,
3926 { "Unknown bit", "aim.userclass.unknown100", FT_BOOLEAN
, 32, TFS(&tfs_set_notset
), CLASS_UNKNOWN100
, NULL
, HFILL
},
3928 { &hf_aim_userclass_imf
,
3929 { "Using IM Forwarding", "aim.userclass.imf", FT_BOOLEAN
, 32, TFS(&tfs_set_notset
), CLASS_IMF
, NULL
, HFILL
},
3931 { &hf_aim_userclass_bot
,
3932 { "Bot User", "aim.userclass.bot", FT_BOOLEAN
, 32, TFS(&tfs_set_notset
), CLASS_BOT
, NULL
, HFILL
},
3934 { &hf_aim_userclass_unknown800
,
3935 { "Unknown bit", "aim.userclass.unknown800", FT_BOOLEAN
, 32, TFS(&tfs_set_notset
), CLASS_UNKNOWN800
, NULL
, HFILL
},
3937 { &hf_aim_userclass_one_way_wireless
,
3938 { "One Way Wireless Device", "aim.userclass.one_way_wireless", FT_BOOLEAN
, 32, TFS(&tfs_set_notset
), CLASS_ONE_WAY_WIRELESS
, NULL
, HFILL
},
3940 { &hf_aim_userclass_unknown2000
,
3941 { "Unknown bit", "aim.userclass.unknown2000", FT_BOOLEAN
, 32, TFS(&tfs_set_notset
), CLASS_UNKNOWN2000
, NULL
, HFILL
},
3943 { &hf_aim_userclass_unknown4000
,
3944 { "Unknown bit", "aim.userclass.unknown4000", FT_BOOLEAN
, 32, TFS(&tfs_set_notset
), CLASS_UNKNOWN4000
, NULL
, HFILL
},
3946 { &hf_aim_userclass_unknown8000
,
3947 { "Unknown bit", "aim.userclass.unknown8000", FT_BOOLEAN
, 32, TFS(&tfs_set_notset
), CLASS_UNKNOWN8000
, NULL
, HFILL
},
3949 { &hf_aim_userclass_unknown10000
,
3950 { "Unknown bit", "aim.userclass.unknown10000", FT_BOOLEAN
, 32, TFS(&tfs_set_notset
), CLASS_UNKNOWN10000
, NULL
, HFILL
},
3952 { &hf_aim_userclass_unknown20000
,
3953 { "Unknown bit", "aim.userclass.unknown20000", FT_BOOLEAN
, 32, TFS(&tfs_set_notset
), CLASS_UNKNOWN20000
, NULL
, HFILL
},
3955 { &hf_aim_userclass_no_knock_knock
,
3956 { "Do not display the 'not on Buddy List' knock-knock", "aim.userclass.no_knock_knock", FT_BOOLEAN
, 32, TFS(&tfs_set_notset
), CLASS_NO_KNOCK_KNOCK
, NULL
, HFILL
},
3958 { &hf_aim_userclass_forward_mobile
,
3959 { "Forward to mobile if not active", "aim.userclass.forward_mobile", FT_BOOLEAN
, 32, TFS(&tfs_set_notset
), CLASS_FORWARD_MOBILE
, NULL
, HFILL
},
3961 { &hf_aim_nickinfo_caps
,
3962 { "Client capabilities", "aim.nickinfo.caps", FT_GUID
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
},
3964 { &hf_aim_nickinfo_short_caps
,
3965 { "Short client capabilities", "aim.nickinfo.short_caps", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
},
3967 { &hf_aim_fnac_flag_next_is_related
,
3968 { "Followed By SNAC with related information", "aim.fnac.flags.next_is_related", FT_BOOLEAN
, 16, TFS(&tfs_set_notset
), FNAC_FLAG_NEXT_IS_RELATED
, NULL
, HFILL
},
3970 { &hf_aim_fnac_flag_contains_version
,
3971 { "Contains Version of Family this SNAC is in", "aim.fnac.flags.contains_version", FT_BOOLEAN
, 16, TFS(&tfs_set_notset
), FNAC_FLAG_CONTAINS_VERSION
, NULL
, HFILL
},
3973 { &hf_aim_userinfo_warninglevel
,
3974 { "Warning Level", "aim.userinfo.warninglevel", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
},
3976 { &hf_aim_messageblock_featuresdes
,
3977 { "Features", "aim.messageblock.featuresdes", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
},
3979 { &hf_aim_messageblock_featureslen
,
3980 { "Features Length", "aim.messageblock.featureslen", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
},
3982 { &hf_aim_messageblock_features
,
3983 { "Features", "aim.messageblock.features", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
},
3985 { &hf_aim_messageblock_info
,
3986 { "Block info", "aim.messageblock.info", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
},
3988 { &hf_aim_messageblock_len
,
3989 { "Block length", "aim.messageblock.length", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
},
3991 { &hf_aim_messageblock_charset
,
3992 { "Block Character set", "aim.messageblock.charset", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
},
3994 { &hf_aim_messageblock_charsubset
,
3995 { "Block Character subset", "aim.messageblock.charsubset", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
},
3997 { &hf_aim_messageblock_message
,
3998 { "Message", "aim.messageblock.message", FT_STRING
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
},
4000 { &hf_aim_dcinfo_ip
,
4001 { "Internal IP address", "aim.dcinfo.addr", FT_IPv4
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
},
4003 { &hf_aim_dcinfo_tcpport
,
4004 { "TCP Port", "aim.dcinfo.tcpport", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
},
4006 { &hf_aim_dcinfo_type
,
4007 { "Type", "aim.dcinfo.type", FT_UINT8
, BASE_HEX
, VALS(dc_types
), 0x0, NULL
, HFILL
},
4009 { &hf_aim_dcinfo_proto_version
,
4010 { "Protocol Version", "aim.dcinfo.proto_version", FT_UINT16
, BASE_DEC
, VALS(protocol_versions
), 0x0, NULL
, HFILL
},
4012 { &hf_aim_dcinfo_auth_cookie
,
4013 { "Authorization Cookie", "aim.dcinfo.auth_cookie", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
},
4015 { &hf_aim_dcinfo_webport
,
4016 { "Web Front Port", "aim.dcinfo.webport", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
},
4018 { &hf_aim_dcinfo_client_future
,
4019 { "Client Futures", "aim.dcinfo.client_futures", FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
},
4021 { &hf_aim_dcinfo_last_info_update
,
4022 { "Last Info Update", "aim.dcinfo.last_info_update", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
},
4024 { &hf_aim_dcinfo_last_ext_info_update
,
4025 { "Last Extended Info Update", "aim.dcinfo.last_ext_info_update", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
},
4027 { &hf_aim_dcinfo_last_ext_status_update
,
4028 { "Last Extended Status Update", "aim.dcinfo.last_ext_status_update", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
},
4030 { &hf_aim_dcinfo_unknown
,
4031 { "Unknown", "aim.dcinfo.unknown", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
},
4033 { &hf_aim_ssi_result_code
,
4034 { "Last SSI operation result code", "aim.ssi.code", FT_UINT16
, BASE_HEX
, VALS(aim_ssi_result_codes
), 0x0, NULL
, HFILL
},
4037 { "Address/Port List", "aim.string08", FT_UINT_STRING
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
},
4041 static hf_register_info hf_admin
[] = {
4042 { &hf_admin_acctinfo_code
,
4043 { "Account Information Request Code", "aim_admin.acctinfo.code", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
},
4045 { &hf_admin_acctinfo_unknown
,
4046 { "Unknown", "aim_admin.acctinfo.unknown", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
},
4048 { &hf_admin_acctinfo_permissions
,
4049 { "Account Permissions", "aim_admin.acctinfo.permissions", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
},
4051 { &hf_admin_confirm_status
,
4052 { "Confirmation status", "aim_admin.confirm_status", FT_UINT16
, BASE_HEX
, VALS(confirm_statusses
), 0x0, NULL
, HFILL
},
4056 static hf_register_info hf_bos
[] = {
4059 { "Data", "aim_bos.data", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
4062 { &hf_aim_bos_class
,
4063 { "User class", "aim_bos.userclass", FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
},
4067 static hf_register_info hf_buddylist
[] = {
4068 { &hf_aim_buddylist_userinfo_warninglevel
,
4069 { "Warning Level", "aim_buddylist.userinfo.warninglevel", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
},
4073 static hf_register_info hf_chat
[] = {
4074 { &hf_aim_chat_screen_name
,
4075 { "Screen Name", "aim_chat.screen_name", FT_STRING
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
},
4079 static hf_register_info hf_generic
[] = {
4080 { &hf_generic_servicereq_service
,
4081 { "Requested Service", "aim_generic.servicereq.service", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
},
4083 { &hf_generic_motd_motdtype
,
4084 { "MOTD Type", "aim_generic.motd.motdtype", FT_UINT16
, BASE_HEX
, VALS(aim_snac_generic_motd_motdtypes
), 0x0, NULL
, HFILL
},
4086 { &hf_generic_family
,
4087 { "Family", "aim_generic.family", FT_UINT16
, BASE_CUSTOM
, CF_FUNC(aim_generic_family
), 0x0, NULL
, HFILL
},
4089 { &hf_generic_version
,
4090 { "Version", "aim_generic.version", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
},
4092 { &hf_generic_dll_version
,
4093 { "DLL Version", "aim_generic.dll_version", FT_UINT24
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
},
4095 { &hf_generic_rateinfo_numclasses
,
4096 { "Number of Rateinfo Classes", "aim_generic.rateinfo.numclasses", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
},
4098 { &hf_generic_rateinfo_windowsize
,
4099 { "Window Size", "aim_generic.rateinfo.class.window_size", FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
},
4101 { &hf_generic_rateinfo_clearlevel
,
4102 { "Clear Level", "aim_generic.rateinfo.class.clearlevel", FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
},
4104 { &hf_generic_rateinfo_alertlevel
,
4105 { "Alert Level", "aim_generic.rateinfo.class.alertlevel", FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
},
4107 { &hf_generic_rateinfo_limitlevel
,
4108 { "Limit Level", "aim_generic.rateinfo.class.limitlevel", FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
},
4110 { &hf_generic_rateinfo_disconnectlevel
,
4111 { "Disconnect Level", "aim_generic.rateinfo.class.disconnectlevel", FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
},
4113 { &hf_generic_rateinfo_currentlevel
,
4114 { "Current Level", "aim_generic.rateinfo.class.currentlevel", FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
},
4116 { &hf_generic_rateinfo_maxlevel
,
4117 { "Max Level", "aim_generic.rateinfo.class.maxlevel", FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
},
4119 { &hf_generic_rateinfo_lasttime
,
4120 { "Last Time", "aim_generic.rateinfo.class.lasttime", FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
},
4122 { &hf_generic_rateinfo_curstate
,
4123 { "Current State", "aim_generic.rateinfo.class.curstate", FT_UINT8
, BASE_HEX
, VALS(rateinfo_states
), 0x0, NULL
, HFILL
},
4125 { &hf_generic_rateinfo_classid
,
4126 { "Class ID", "aim_generic.rateinfo.class.id", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
},
4128 { &hf_generic_rateinfo_numpairs
,
4129 { "Number of Family/Subtype pairs", "aim_generic.rateinfo.class.numpairs", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
},
4131 { &hf_generic_rateinfoack_group
,
4132 { "Acknowledged Rate Class", "aim_generic.rateinfoack.class", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
},
4134 { &hf_generic_ratechange_msg
,
4135 { "Rate Change Message", "aim_generic.ratechange.msg", FT_UINT16
, BASE_HEX
, VALS(ratechange_msgs
), 0x0, NULL
, HFILL
},
4137 { &hf_generic_migration_numfams
,
4138 { "Number of families to migrate", "aim_generic.migrate.numfams", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
},
4140 { &hf_generic_priv_flags
,
4141 { "Privilege flags", "aim_generic.privilege_flags", FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
},
4143 { &hf_generic_allow_idle_see
,
4144 { "Allow other users to see idle time", "aim_generic.privilege_flags.allow_idle", FT_BOOLEAN
, 32, TFS(&tfs_set_notset
), 0x00000001, NULL
, HFILL
},
4146 { &hf_generic_allow_member_see
,
4147 { "Allow other users to see how long account has been a member", "aim_generic.privilege_flags.allow_member", FT_BOOLEAN
, 32, TFS(&tfs_set_notset
), 0x00000002, NULL
, HFILL
},
4149 { &hf_generic_selfinfo_warninglevel
,
4150 { "Warning level", "aim_generic.selfinfo.warn_level", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
},
4152 { &hf_generic_evil_new_warn_level
,
4153 { "New warning level", "aim_generic.evil.new_warn_level", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
},
4155 { &hf_generic_idle_time
,
4156 { "Idle time (seconds)", "aim_generic.idle_time", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
},
4158 { &hf_generic_client_ver_req_offset
,
4159 { "Client Verification Request Offset", "aim_generic.client_verification.offset", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
},
4161 { &hf_generic_client_ver_req_length
,
4162 { "Client Verification Request Length", "aim_generic.client_verification.length", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
},
4164 { &hf_generic_client_ver_req_hash
,
4165 { "Client Verification MD5 Hash", "aim_generic.client_verification.hash", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
},
4167 { &hf_generic_ext_status_type
,
4168 { "Extended Status Type", "aim_generic.ext_status.type", FT_UINT16
, BASE_DEC
, VALS(ext_status_types
), 0x0, NULL
, HFILL
},
4170 { &hf_generic_ext_status_flags
,
4171 { "Extended Status Flags", "aim_generic.ext_status.flags", FT_UINT8
, BASE_HEX
, VALS(ext_status_flags
), 0x0, NULL
, HFILL
},
4173 { &hf_generic_ext_status_length
,
4174 { "Extended Status Length", "aim_generic.ext_status.length", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
},
4176 { &hf_generic_ext_status_data
,
4177 { "Extended Status Data", "aim_generic.ext_status.data", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
},
4181 static hf_register_info hf_icq
[] = {
4182 { &hf_icq_tlv_data_chunk_size
,
4183 { "Data chunk size", "aim_icq.chunk_size", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
},
4185 { &hf_icq_tlv_request_owner_uid
,
4186 { "Owner UID", "aim_icq.owner_uid", FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
},
4188 { &hf_icq_tlv_request_type
,
4189 {"Request Type", "aim_icq.request_type", FT_UINT16
, BASE_DEC
, VALS(aim_icq_data_types
), 0x0, NULL
, HFILL
},
4191 { &hf_icq_tlv_request_seq_num
,
4192 {"Request Sequence Number", "aim_icq.request_seq_number", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
},
4194 { &hf_icq_dropped_msg_flag
,
4195 {"Dropped messages flag", "aim_icq.offline_msgs.dropped_flag", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
},
4197 { &hf_icq_meta_subtype
,
4198 {"Meta Request Subtype", "aim_icq.subtype", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
},
4202 static hf_register_info hf_location
[] = {
4203 { &hf_aim_location_buddyname_len
,
4204 { "Buddyname len", "aim_location.buddynamelen", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
4206 { &hf_aim_location_buddyname
,
4207 { "Buddy Name", "aim_location.buddyname", FT_STRING
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
4209 { &hf_aim_location_userinfo_warninglevel
,
4210 { "Warning Level", "aim_location.userinfo.warninglevel", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
},
4212 { &hf_aim_snac_location_request_user_info_infotype
,
4213 { "Infotype", "aim_location.snac.request_user_info.infotype", FT_UINT16
, BASE_HEX
, VALS(aim_snac_location_request_user_info_infotypes
), 0x0, NULL
, HFILL
}
4217 static hf_register_info hf_messaging
[] = {
4218 { &hf_aim_icbm_channel
,
4219 { "Channel", "aim_messaging.icbm.channel",
4220 FT_UINT16
, BASE_HEX
, VALS(icbm_channel_types
), 0x0, NULL
, HFILL
}
4222 { &hf_aim_icbm_msg_flags
,
4223 { "Message Flags", "aim_messaging.icbm.flags",
4224 FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}
4226 { &hf_aim_icbm_max_snac_size
,
4227 { "Max SNAC Size", "aim_messaging.icbm.max_snac",
4228 FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}
4230 { &hf_aim_icbm_max_sender_warnlevel
,
4231 { "Max sender warn level", "aim_messaging.icbm.max_sender_warn-level",
4232 FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}
4234 { &hf_aim_icbm_max_receiver_warnlevel
,
4235 { "max receiver warn level", "aim_messaging.icbm.max_receiver_warnlevel",
4236 FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}
4238 { &hf_aim_icbm_min_msg_interval
,
4239 { "Minimum message interval (milliseconds)", "aim_messaging.icbm.min_msg_interval",
4240 FT_UINT32
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
4242 { &hf_aim_icbm_cookie
,
4243 { "ICBM Cookie", "aim_messaging.icbmcookie",
4244 FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
4246 { &hf_aim_message_channel_id
,
4247 { "Message Channel ID", "aim_messaging.channelid",
4248 FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}
4250 { &hf_aim_icbm_evil
,
4251 { "Send Evil Bit As", "aim_messaging.evilreq.origin",
4252 FT_UINT16
, BASE_DEC
, VALS(evil_origins
), 0x0, NULL
, HFILL
}
4254 { &hf_aim_evil_warn_level
,
4255 { "Old warning level", "aim_messaging.evil.warn_level",
4256 FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
4258 { &hf_aim_evil_new_warn_level
,
4259 { "New warning level", "aim_messaging.evil.new_warn_level",
4260 FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
4262 { &hf_aim_icbm_notification_cookie
,
4263 { "Notification Cookie", "aim_messaging.notification.cookie",
4264 FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
4266 { &hf_aim_icbm_notification_channel
,
4267 { "Notification Channel", "aim_messaging.notification.channel",
4268 FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
4270 { &hf_aim_icbm_notification_type
,
4271 { "Notification Type", "aim_messaging.notification.type",
4272 FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
4274 { &hf_aim_icbm_rendezvous_nak
,
4275 { "Rendezvous NAK reason", "aim_messaging.rendezvous_nak",
4276 FT_UINT16
, BASE_HEX
, VALS(rendezvous_nak_reason_types
), 0x0, NULL
, HFILL
}
4278 { &hf_aim_icbm_rendezvous_nak_length
,
4279 { "Rendezvous NAK reason length", "aim_messaging.rendezvous_nak_length",
4280 FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}
4282 { &hf_aim_rendezvous_msg_type
,
4283 { "Message Type", "aim_messaging.rendezvous.msg_type",
4284 FT_UINT16
, BASE_HEX
, VALS(rendezvous_msg_types
), 0x0, NULL
, HFILL
}
4286 { &hf_aim_icbm_client_err_reason
,
4287 { "Reason", "aim_messaging.clienterr.reason",
4288 FT_UINT16
, BASE_DEC
, VALS(client_err_reason_types
), 0x0, NULL
, HFILL
}
4290 { &hf_aim_icbm_client_err_protocol_version
,
4291 { "Version", "aim_messaging.clienterr.protocol_version",
4292 FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
4294 { &hf_aim_icbm_client_err_client_caps_flags
,
4295 { "Client Capabilities Flags", "aim_messaging.clienterr.client_caps_flags",
4296 FT_UINT32
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}
4298 { &hf_aim_rendezvous_extended_data_message_type
,
4299 { "Message Type", "aim_messaging.icbm.extended_data.message.type",
4300 FT_UINT8
, BASE_HEX
, VALS(extended_data_message_types
), 0x0, NULL
, HFILL
}
4302 { &hf_aim_rendezvous_extended_data_message_flags
,
4303 { "Message Flags", "aim_messaging.icbm.extended_data.message.flags",
4304 FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}
4306 { &hf_aim_rendezvous_extended_data_message_flags_normal
,
4307 { "Normal Message", "aim_messaging.icbm.extended_data.message.flags.normal",
4308 FT_BOOLEAN
, 16, TFS(&tfs_set_notset
), EXTENDED_DATA_MFLAG_NORMAL
, NULL
, HFILL
}
4310 { &hf_aim_rendezvous_extended_data_message_flags_auto
,
4311 { "Auto Message", "aim_messaging.icbm.extended_data.message.flags.auto",
4312 FT_BOOLEAN
, 16, TFS(&tfs_set_notset
), EXTENDED_DATA_MFLAG_AUTO
, NULL
, HFILL
}
4314 { &hf_aim_rendezvous_extended_data_message_flags_multi
,
4315 { "Multiple Recipients Message", "aim_messaging.icbm.rendezvous.extended_data.message.flags.multi",
4316 FT_BOOLEAN
, 16, TFS(&tfs_set_notset
), EXTENDED_DATA_MFLAG_MULTI
, NULL
, HFILL
}
4318 { &hf_aim_rendezvous_extended_data_message_status_code
,
4319 { "Status Code", "aim_messaging.icbm.extended_data.message.status_code",
4320 FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
4322 { &hf_aim_rendezvous_extended_data_message_priority_code
,
4323 { "Priority Code", "aim_messaging.icbm.extended_data.message.priority_code",
4324 FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
4326 { &hf_aim_rendezvous_extended_data_message_text_length
,
4327 { "Text Length", "aim_messaging.icbm.extended_data.message.text_length",
4328 FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
4330 { &hf_aim_rendezvous_extended_data_message_text
,
4331 { "Text", "aim_messaging.icbm.extended_data.message.text",
4332 FT_STRING
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
4334 /* Generated from convert_proto_tree_add_text.pl */
4335 { &hf_aim_messaging_plugin
, { "Plugin", "aim_messaging.plugin", FT_GUID
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
4336 { &hf_aim_icbm_client_err_length
, { "Length", "aim_messaging.clienterr.length", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
4337 { &hf_aim_messaging_unknown_uint8
, { "Unknown", "aim_messaging.unknown_uint8", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
4338 { &hf_aim_messaging_unknown_uint16
, { "Unknown", "aim_messaging.unknown_uint16", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
4339 { &hf_aim_icbm_client_err_downcounter
, { "Downcounter?", "aim_messaging.clienterr.downcounter", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}},
4340 { &hf_aim_messaging_unknown_data
, { "Unknown", "aim_messaging.unknown_bytes", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
4341 { &hf_aim_messaging_plugin_specific_data
, { "Plugin-specific data", "aim_messaging.plugin_specific_data", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}},
4344 static hf_register_info hf_signon
[] = {
4346 { "Infotype", "aim_signon.infotype", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}
4348 { &hf_aim_signon_challenge_len
,
4349 { "Signon challenge length", "aim_signon.challengelen", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
}
4351 { &hf_aim_signon_challenge
,
4352 { "Signon challenge", "aim_signon.challenge", FT_STRING
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
4356 static hf_register_info hf_ssi
[] = {
4357 { &hf_aim_fnac_subtype_ssi_version
,
4358 { "SSI Version", "aim_ssi.fnac.version", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}
4360 { &hf_aim_fnac_subtype_ssi_numitems
,
4361 { "SSI Object count", "aim_ssi.fnac.numitems", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}
4363 { &hf_aim_fnac_subtype_ssi_last_change_time
,
4364 { "SSI Last Change Time", "aim_ssi.fnac.last_change_time", FT_ABSOLUTE_TIME
, ABSOLUTE_TIME_LOCAL
, NULL
, 0x0, NULL
, HFILL
}
4366 { &hf_aim_fnac_subtype_ssi_buddyname_len
,
4367 { "SSI Buddy Name length", "aim_ssi.fnac.buddyname_len", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}
4369 { &hf_aim_fnac_subtype_ssi_buddyname
,
4370 { "Buddy Name", "aim_ssi.fnac.buddyname", FT_STRING
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
4372 { &hf_aim_fnac_subtype_ssi_gid
,
4373 { "SSI Buddy Group ID", "aim_ssi.fnac.gid", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}
4375 { &hf_aim_fnac_subtype_ssi_bid
,
4376 { "SSI Buddy ID", "aim_ssi.fnac.bid", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}
4378 { &hf_aim_fnac_subtype_ssi_type
,
4379 { "SSI Buddy type", "aim_ssi.fnac.type", FT_UINT16
, BASE_HEX
, VALS(aim_fnac_family_ssi_types
), 0x0, NULL
, HFILL
}
4381 { &hf_aim_fnac_subtype_ssi_tlvlen
,
4382 { "SSI TLV Len", "aim_ssi.fnac.tlvlen", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}
4385 { &hf_aim_fnac_subtype_ssi_data
,
4386 { "SSI Buddy Data", "aim_ssi.fnac.data", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}
4389 { &hf_aim_fnac_subtype_ssi_buddyname_len8
,
4390 { "SSI Buddy Name length", "aim_ssi.fnac.buddyname_len8", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}
4392 { &hf_aim_fnac_subtype_ssi_reason_str_len
,
4393 { "Reason Message length", "aim_ssi.fnac.reason_len", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}
4395 { &hf_aim_fnac_subtype_ssi_reason_str
,
4396 { "Reason Message", "aim_ssi.fnac.reason", FT_STRING
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
}
4398 { &hf_aim_fnac_subtype_ssi_grant_auth_unkn
,
4399 { "Unknown", "aim_ssi.fnac.auth_unkn", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}
4401 { &hf_aim_fnac_subtype_ssi_allow_auth
,
4402 { "Allow flag", "aim_ssi.fnac.allow_auth_flag", FT_UINT8
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
}
4406 static hf_register_info hf_sst
[] = {
4407 { &hf_aim_sst_md5_hash
,
4408 { "MD5 Hash", "aim_sst.md5", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
},
4410 { &hf_aim_sst_md5_hash_size
,
4411 { "MD5 Hash Size", "aim_sst.md5.size", FT_UINT8
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
},
4413 { &hf_aim_sst_unknown
,
4414 { "Unknown Data", "aim_sst.unknown", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
},
4416 { &hf_aim_sst_ref_num
,
4417 { "Reference Number", "aim_sst.ref_num", FT_UINT16
, BASE_DEC
, NULL
, 0x0, NULL
, HFILL
},
4419 { &hf_aim_sst_icon_size
,
4420 { "Icon Size", "aim_sst.icon_size", FT_UINT16
, BASE_HEX
, NULL
, 0x0, NULL
, HFILL
},
4423 { "Icon", "aim_sst.icon", FT_BYTES
, BASE_NONE
, NULL
, 0x0, NULL
, HFILL
},
4427 static hf_register_info hf_userlookup
[] = {
4428 { &hf_aim_userlookup_email
,
4429 { "Email address looked for", "aim_lookup.email", FT_STRING
, BASE_NONE
, NULL
, 0, NULL
, HFILL
}
4433 /* Setup protocol subtree array */
4434 static int *ett
[] = {
4438 &ett_aim_fnac_flags
,
4443 &ett_aim_messageblock
,
4444 &ett_aim_nickinfo_caps
,
4445 &ett_aim_nickinfo_short_caps
,
4446 &ett_aim_string08_array
,
4457 &ett_generic_clientready
,
4458 &ett_generic_migratefamilies
,
4459 &ett_generic_clientready_item
,
4460 &ett_generic_serverready
,
4462 &ett_generic_priv_flags
,
4463 &ett_generic_rateinfo_class
,
4464 &ett_generic_rateinfo_classes
,
4465 &ett_generic_rateinfo_groups
,
4466 &ett_generic_rateinfo_group
,
4470 &ett_aim_invitation
,
4473 &ett_aim_rendezvous_data
,
4474 &ett_aim_extended_data
,
4475 &ett_aim_extended_data_message_flags
,
4483 &ett_aim_userlookup
,
4487 static ei_register_info ei
[] = {
4488 { &ei_aim_messageblock_len
, { "aim.messageblock.length.invalid", PI_PROTOCOL
, PI_WARN
, "Invalid block length", EXPFILL
}},
4491 module_t
*aim_module
;
4492 expert_module_t
*expert_aim
;
4494 /* Register the protocol name and description */
4495 proto_aim
= proto_register_protocol("AOL Instant Messenger", "AIM", "aim");
4496 proto_aim_admin
= proto_register_protocol("AIM Administrative", "AIM Administration", "aim_admin");
4497 proto_aim_adverts
= proto_register_protocol("AIM Advertisements", "AIM Advertisements", "aim_adverts");
4498 proto_aim_bos
= proto_register_protocol("AIM Privacy Management Service", "AIM BOS", "aim_bos");
4499 proto_aim_buddylist
= proto_register_protocol("AIM Buddylist Service", "AIM Buddylist", "aim_buddylist");
4500 proto_aim_chat
= proto_register_protocol("AIM Chat Service", "AIM Chat", "aim_chat");
4501 proto_aim_chatnav
= proto_register_protocol("AIM Chat Navigation", "AIM ChatNav", "aim_chatnav");
4502 proto_aim_directory
= proto_register_protocol("AIM Directory Search", "AIM Directory", "aim_dir");
4503 proto_aim_email
= proto_register_protocol("AIM E-mail", "AIM Email", "aim_email");
4504 proto_aim_generic
= proto_register_protocol("AIM Generic Service", "AIM Generic", "aim_generic");
4505 proto_aim_icq
= proto_register_protocol("AIM ICQ", "AIM ICQ", "aim_icq");
4506 proto_aim_invitation
= proto_register_protocol("AIM Invitation Service", "AIM Invitation", "aim_invitation");
4507 proto_aim_location
= proto_register_protocol("AIM Location", "AIM Location", "aim_location");
4508 proto_aim_messaging
= proto_register_protocol("AIM Messaging", "AIM Messaging", "aim_messaging");
4509 proto_aim_popup
= proto_register_protocol("AIM Popup", "AIM Popup", "aim_popup");
4510 proto_aim_signon
= proto_register_protocol("AIM Signon", "AIM Signon", "aim_signon");
4511 proto_aim_ssi
= proto_register_protocol("AIM Server Side Info", "AIM SSI", "aim_ssi");
4512 proto_aim_sst
= proto_register_protocol("AIM Server Side Themes", "AIM SST", "aim_sst");
4513 proto_aim_stats
= proto_register_protocol("AIM Statistics", "AIM Stats", "aim_stats");
4514 proto_aim_translate
= proto_register_protocol("AIM Translate", "AIM Translate", "aim_translate");
4515 proto_aim_userlookup
= proto_register_protocol("AIM User Lookup", "AIM User Lookup", "aim_lookup");
4517 proto_register_field_array(proto_aim
, hf
, array_length(hf
));
4518 proto_register_field_array(proto_aim_admin
, hf_admin
, array_length(hf_admin
));
4519 proto_register_field_array(proto_aim_bos
, hf_bos
, array_length(hf_bos
));
4520 proto_register_field_array(proto_aim_buddylist
, hf_buddylist
, array_length(hf_buddylist
));
4521 proto_register_field_array(proto_aim_chat
, hf_chat
, array_length(hf_chat
));
4522 proto_register_field_array(proto_aim_generic
, hf_generic
, array_length(hf_generic
));
4523 proto_register_field_array(proto_aim_icq
, hf_icq
, array_length(hf_icq
));
4524 proto_register_field_array(proto_aim_location
, hf_location
, array_length(hf_location
));
4525 proto_register_field_array(proto_aim_messaging
, hf_messaging
, array_length(hf_messaging
));
4526 proto_register_field_array(proto_aim_signon
, hf_signon
, array_length(hf_signon
));
4527 proto_register_field_array(proto_aim_ssi
, hf_ssi
, array_length(hf_ssi
));
4528 proto_register_field_array(proto_aim_sst
, hf_sst
, array_length(hf_sst
));
4529 proto_register_field_array(proto_aim_userlookup
, hf_userlookup
, array_length(hf_userlookup
));
4531 proto_register_subtree_array(ett
, array_length(ett
));
4533 expert_aim
= expert_register_protocol(proto_aim
);
4534 expert_register_field_array(expert_aim
, ei
, array_length(ei
));
4536 aim_handle
= register_dissector("aim", dissect_aim
, proto_aim
);
4538 aim_module
= prefs_register_protocol(proto_aim
, NULL
);
4541 prefs_register_bool_preference(aim_module
, "desegment",
4542 "Reassemble AIM messages spanning multiple TCP segments",
4543 "Whether the AIM dissector should reassemble messages spanning multiple TCP segments."
4544 " To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.",
4547 register_shutdown_routine(aim_shutdown
);
4551 proto_reg_handoff_aim(void)
4553 /* TCP ports preference */
4554 dissector_add_uint_range_with_preference("tcp.port", TCP_PORTS_AIM_DEFAULT
, aim_handle
);
4556 ssl_dissector_add(0, aim_handle
);
4557 /* Heuristics disabled by default, it is really weak... */
4558 heur_dissector_add("tls", dissect_aim_ssl_heur
, "AIM over TLS", "aim_tls", proto_aim
, HEURISTIC_DISABLE
);
4561 aim_init_family(proto_aim_admin
, ett_aim_admin
, FAMILY_ADMIN
, aim_fnac_family_admin
);
4562 aim_init_family(proto_aim_adverts
, ett_aim_adverts
, FAMILY_ADVERTS
, aim_fnac_family_adverts
);
4563 aim_init_family(proto_aim_bos
, ett_aim_bos
, FAMILY_BOS
, aim_fnac_family_bos
);
4564 aim_init_family(proto_aim_buddylist
, ett_aim_buddylist
, FAMILY_BUDDYLIST
, aim_fnac_family_buddylist
);
4565 aim_init_family(proto_aim_chat
, ett_aim_chat
, FAMILY_CHAT
, aim_fnac_family_chat
);
4566 aim_init_family(proto_aim_chatnav
, ett_aim_chatnav
, FAMILY_CHAT_NAV
, aim_fnac_family_chatnav
);
4567 aim_init_family(proto_aim_directory
, ett_aim_directory
, FAMILY_DIRECTORY
, aim_fnac_family_directory
);
4568 aim_init_family(proto_aim_email
, ett_aim_email
, FAMILY_EMAIL
, aim_fnac_family_email
);
4569 aim_init_family(proto_aim_generic
, ett_generic
, FAMILY_GENERIC
, aim_fnac_family_generic
);
4570 aim_init_family(proto_aim_icq
, ett_aim_icq
, FAMILY_ICQ
, aim_fnac_family_icq
);
4571 aim_init_family(proto_aim_invitation
, ett_aim_invitation
, FAMILY_INVITATION
, aim_fnac_family_invitation
);
4572 aim_init_family(proto_aim_location
, ett_aim_location
, FAMILY_LOCATION
, aim_fnac_family_location
);
4573 aim_init_family(proto_aim_messaging
, ett_aim_messaging
, FAMILY_MESSAGING
, aim_fnac_family_messaging
);
4574 aim_init_family(proto_aim_popup
, ett_aim_popup
, FAMILY_POPUP
, aim_fnac_family_popup
);
4575 aim_init_family(proto_aim_signon
, ett_aim_signon
, FAMILY_SIGNON
, aim_fnac_family_signon
);
4576 aim_init_family(proto_aim_ssi
, ett_aim_ssi
, FAMILY_SSI
, aim_fnac_family_ssi
);
4577 aim_init_family(proto_aim_sst
, ett_aim_sst
, FAMILY_SST
, aim_fnac_family_sst
);
4578 aim_init_family(proto_aim_stats
, ett_aim_stats
, FAMILY_STATS
, aim_fnac_family_stats
);
4579 aim_init_family(proto_aim_translate
, ett_aim_translate
, FAMILY_TRANSLATE
, aim_fnac_family_translate
);
4580 aim_init_family(proto_aim_userlookup
, ett_aim_userlookup
, FAMILY_USERLOOKUP
, aim_fnac_family_userlookup
);
4585 * Editor modelines - https://www.wireshark.org/tools/modelines.html
4590 * indent-tabs-mode: t
4593 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
4594 * :indentSize=8:tabSize=8:noTabs=false: