diff options
Diffstat (limited to 'epan/dissectors/packet-aim.c')
-rw-r--r-- | epan/dissectors/packet-aim.c | 3368 |
1 files changed, 3100 insertions, 268 deletions
diff --git a/epan/dissectors/packet-aim.c b/epan/dissectors/packet-aim.c index ada3b719a5..967f551f5f 100644 --- a/epan/dissectors/packet-aim.c +++ b/epan/dissectors/packet-aim.c @@ -31,7 +31,6 @@ #include <epan/to_str.h> #include "packet-tcp.h" -#include "packet-aim.h" #include "packet-ssl.h" #include <epan/prefs.h> #include <epan/expert.h> @@ -43,6 +42,29 @@ void proto_reg_handoff_aim(void); #define STRIP_TAGS 1 +/* SNAC families */ +#define FAMILY_GENERIC 0x0001 +#define FAMILY_LOCATION 0x0002 +#define FAMILY_BUDDYLIST 0x0003 +#define FAMILY_MESSAGING 0x0004 +#define FAMILY_ADVERTS 0x0005 +#define FAMILY_INVITATION 0x0006 +#define FAMILY_ADMIN 0x0007 +#define FAMILY_POPUP 0x0008 +#define FAMILY_BOS 0x0009 +#define FAMILY_USERLOOKUP 0x000A +#define FAMILY_STATS 0x000B +#define FAMILY_TRANSLATE 0x000C +#define FAMILY_CHAT_NAV 0x000D +#define FAMILY_CHAT 0x000E +#define FAMILY_DIRECTORY 0x000F +#define FAMILY_SST 0x0010 +#define FAMILY_SSI 0x0013 +#define FAMILY_ICQ 0x0015 +#define FAMILY_SIGNON 0x0017 +#define FAMILY_EMAIL 0x0018 +#define FAMILY_OFT 0xfffe + /* channels */ #define CHANNEL_NEW_CONN 0x01 #define CHANNEL_SNAC_DATA 0x02 @@ -112,163 +134,10 @@ static const value_string aim_snac_errors[] = { { 0, NULL } }; -#define AIM_CLIENT_TLV_SCREEN_NAME 0x0001 -#define AIM_CLIENT_TLV_NEW_ROASTED_PASSWORD 0x0002 -#define AIM_CLIENT_TLV_CLIENT_ID_STRING 0x0003 -#define AIM_CLIENT_TLV_ERRORURL 0x0004 -#define AIM_CLIENT_TLV_BOS_SERVER_STRING 0x0005 -#define AIM_CLIENT_TLV_AUTH_COOKIE 0x0006 -#define AIM_CLIENT_TLV_ERRORCODE 0x0008 -#define AIM_CLIENT_TLV_DISCONNECT_REASON 0x0009 -#define AIM_CLIENT_TLV_RECONNECT_HOST 0x000a -#define AIM_CLIENT_TLV_URL 0x000b -#define AIM_CLIENT_TLV_DEBUG_DATA 0x000c -#define AIM_CLIENT_TLV_FAMILY_ID 0x000d -#define AIM_CLIENT_TLV_CLIENT_COUNTRY 0x000e -#define AIM_CLIENT_TLV_CLIENT_LANGUAGE 0x000f -#define AIM_CLIENT_TLV_EMAILADDR 0x0011 -#define AIM_CLIENT_TLV_OLD_ROASTED_PASSWORD 0x0012 -#define AIM_CLIENT_TLV_REGSTATUS 0x0013 -#define AIM_CLIENT_TLV_CLIENT_DISTRIBUTION_NUM 0x0014 -#define AIM_CLIENT_TLV_INVITEMESSAGE 0x0015 -#define AIM_CLIENT_TLV_CLIENT_ID 0x0016 -#define AIM_CLIENT_TLV_CLIENT_MAJOR_VERSION 0x0017 -#define AIM_CLIENT_TLV_CLIENT_MINOR_VERSION 0x0018 -#define AIM_CLIENT_TLV_CLIENT_LESSER_VERSION 0x0019 -#define AIM_CLIENT_TLV_CLIENT_BUILD_NUMBER 0x001a -#define AIM_CLIENT_TLV_PASSWORD_MD5 0x0025 -#define AIM_CLIENT_TLV_LATESTBETABUILD 0x0040 -#define AIM_CLIENT_TLV_LATESTBETAURL 0x0041 -#define AIM_CLIENT_TLV_LATESTBETAINFO 0x0042 -#define AIM_CLIENT_TLV_LATESTBETANAME 0x0043 -#define AIM_CLIENT_TLV_LATESTRELEASEBUILD 0x0044 -#define AIM_CLIENT_TLV_LATESTRELEASEURL 0x0045 -#define AIM_CLIENT_TLV_LATESTRELEASEINFO 0x0046 -#define AIM_CLIENT_TLV_LATESTRELEASENAME 0x0047 -#define AIM_CLIENT_TLV_BETA_DIGEST_SIG 0x0048 -#define AIM_CLIENT_TLV_RELEASE_DIGEST_SIG 0x0049 -#define AIM_CLIENT_TLV_CLIENTUSESSI 0x004a -#define AIM_CLIENT_TLV_CHANGE_PASSWORD_URL 0x0054 -#define AIM_CLIENT_TLV_AWAITING_AUTH 0x0066 -#define AIM_CLIENT_TLV_MEMBERS 0x00c8 -#define AIM_CLIENT_TLV_VISIBILITY_BITS 0x00c9 -#define AIM_CLIENT_TLV_PRIVACY 0x00ca -#define AIM_CLIENT_TLV_VISIBLE_CLASS 0x00cb -#define AIM_CLIENT_TLV_VISIBLE_MISC 0x00cc -#define AIM_CLIENT_TLV_ICQ2K_SHORTCUT 0x00cd -#define AIM_CLIENT_TLV_FIRST_LOADED_TIME 0x00d4 -#define AIM_CLIENT_TLV_BUDDY_ICON_MD5SUM 0x00d5 -#define AIM_CLIENT_TLV_GIVEN_NAME 0x0131 -#define AIM_CLIENT_TLV_LOCAL_EMAIL 0x0137 -#define AIM_CLIENT_TLV_LOCAL_SMS 0x013a -#define AIM_CLIENT_TLV_LOCAL_COMMENT 0x013c -#define AIM_CLIENT_TLV_LOCAL_PERSONAL_ALERT 0x013d -#define AIM_CLIENT_TLV_LOCAL_PERSONAL_SOUND 0x013e -#define AIM_CLIENT_TLV_FIRST_MESSAGE_SENT 0x0145 - -const aim_tlv aim_client_tlvs[] = { - { AIM_CLIENT_TLV_SCREEN_NAME, "Screen name", dissect_aim_tlv_value_string }, - { AIM_CLIENT_TLV_NEW_ROASTED_PASSWORD, "Roasted password array", dissect_aim_tlv_value_bytes }, - { AIM_CLIENT_TLV_OLD_ROASTED_PASSWORD, "Old roasted password array", dissect_aim_tlv_value_bytes }, - { AIM_CLIENT_TLV_CLIENT_ID_STRING, "Client id string (name, version)", dissect_aim_tlv_value_string }, - { AIM_CLIENT_TLV_CLIENT_ID, "Client id number", dissect_aim_tlv_value_uint16 }, - { AIM_CLIENT_TLV_CLIENT_MAJOR_VERSION, "Client major version", dissect_aim_tlv_value_uint16 }, - { AIM_CLIENT_TLV_CLIENT_MINOR_VERSION, "Client minor version", dissect_aim_tlv_value_uint16 }, - { AIM_CLIENT_TLV_CLIENT_LESSER_VERSION, "Client lesser version", dissect_aim_tlv_value_uint16 }, - { AIM_CLIENT_TLV_CLIENT_BUILD_NUMBER, "Client build number", dissect_aim_tlv_value_uint16 }, - { AIM_CLIENT_TLV_PASSWORD_MD5, "Password Hash (MD5)", dissect_aim_tlv_value_bytes }, - { AIM_CLIENT_TLV_CLIENT_DISTRIBUTION_NUM, "Client distribution number", dissect_aim_tlv_value_uint32 }, - { AIM_CLIENT_TLV_CLIENT_LANGUAGE, "Client language", dissect_aim_tlv_value_string }, - { AIM_CLIENT_TLV_CLIENT_COUNTRY, "Client country", dissect_aim_tlv_value_string }, - { AIM_CLIENT_TLV_BOS_SERVER_STRING, "BOS server string", dissect_aim_tlv_value_string }, - { AIM_CLIENT_TLV_AUTH_COOKIE, "Authorization cookie", dissect_aim_tlv_value_bytes }, - { AIM_CLIENT_TLV_ERRORURL, "Error URL", dissect_aim_tlv_value_string }, - { AIM_CLIENT_TLV_ERRORCODE, "Error Code", dissect_aim_tlv_value_uint16 }, - { AIM_CLIENT_TLV_DISCONNECT_REASON, "Disconnect Reason", dissect_aim_tlv_value_uint16 }, - { AIM_CLIENT_TLV_RECONNECT_HOST, "Reconnect Hostname", dissect_aim_tlv_value_string }, - { AIM_CLIENT_TLV_URL, "URL", dissect_aim_tlv_value_string }, - { AIM_CLIENT_TLV_DEBUG_DATA, "Debug Data", dissect_aim_tlv_value_uint16 }, - { AIM_CLIENT_TLV_EMAILADDR, "Account Email address", dissect_aim_tlv_value_string }, - { AIM_CLIENT_TLV_REGSTATUS, "Registration Status", dissect_aim_tlv_value_uint16 }, - { AIM_CLIENT_TLV_LATESTBETABUILD, "Latest Beta Build", dissect_aim_tlv_value_uint32 }, - { AIM_CLIENT_TLV_LATESTBETAURL, "Latest Beta URL", dissect_aim_tlv_value_string }, - { AIM_CLIENT_TLV_LATESTBETAINFO, "Latest Beta Info", dissect_aim_tlv_value_string }, - { AIM_CLIENT_TLV_LATESTBETANAME, "Latest Beta Name", dissect_aim_tlv_value_string }, - { AIM_CLIENT_TLV_LATESTRELEASEBUILD, "Latest Release Build", dissect_aim_tlv_value_uint32 }, - { AIM_CLIENT_TLV_LATESTRELEASEURL, "Latest Release URL", dissect_aim_tlv_value_string }, - { AIM_CLIENT_TLV_LATESTRELEASEINFO, "Latest Release Info", dissect_aim_tlv_value_string }, - { AIM_CLIENT_TLV_LATESTRELEASENAME, "Latest Release Name", dissect_aim_tlv_value_string }, - { AIM_CLIENT_TLV_BETA_DIGEST_SIG, "Beta Digest Signature (MD5)" , dissect_aim_tlv_value_bytes }, - { AIM_CLIENT_TLV_RELEASE_DIGEST_SIG, "Release Digest Signature (MD5)", dissect_aim_tlv_value_bytes }, - { AIM_CLIENT_TLV_CLIENTUSESSI, "Use SSI", dissect_aim_tlv_value_uint8 }, - { AIM_CLIENT_TLV_FAMILY_ID, "Service (SNAC Family) ID", dissect_aim_tlv_value_uint16 }, - { AIM_CLIENT_TLV_CHANGE_PASSWORD_URL, "Change password url", dissect_aim_tlv_value_string }, - { AIM_CLIENT_TLV_AWAITING_AUTH, "Awaiting Authorization", dissect_aim_tlv_value_bytes }, - { AIM_CLIENT_TLV_MEMBERS, "Members of this Group", dissect_aim_tlv_value_bytes }, - { AIM_CLIENT_TLV_VISIBILITY_BITS, "Bitfield", dissect_aim_tlv_value_bytes }, - { AIM_CLIENT_TLV_PRIVACY, "Privacy Settings" , dissect_aim_tlv_value_uint8 }, - { AIM_CLIENT_TLV_VISIBLE_CLASS, "Visible To Classes", dissect_aim_tlv_value_userclass }, - { AIM_CLIENT_TLV_VISIBLE_MISC, "Allow Others to See Data", dissect_aim_tlv_value_bytes }, - { AIM_CLIENT_TLV_ICQ2K_SHORTCUT, "ICQ2K Shortcut List", dissect_aim_tlv_value_string }, - { AIM_CLIENT_TLV_FIRST_LOADED_TIME, "First Time Buddy Was Added (Unix Timestamp)" , dissect_aim_tlv_value_uint32 }, - { AIM_CLIENT_TLV_BUDDY_ICON_MD5SUM, "MD5SUM of Current Buddy Icon", dissect_aim_tlv_value_bytes }, - { AIM_CLIENT_TLV_GIVEN_NAME, "Locally Specified Buddy Name", dissect_aim_tlv_value_string }, - { AIM_CLIENT_TLV_LOCAL_EMAIL, "Locally Specified Buddy Email", dissect_aim_tlv_value_string }, - { AIM_CLIENT_TLV_LOCAL_SMS, "Locally Specified Buddy SMS", dissect_aim_tlv_value_string }, - { AIM_CLIENT_TLV_LOCAL_COMMENT, "Locally Specified Buddy Comment", dissect_aim_tlv_value_string }, - { AIM_CLIENT_TLV_LOCAL_PERSONAL_ALERT, "Personal Alert for Buddy", dissect_aim_tlv_value_uint16 }, - { AIM_CLIENT_TLV_LOCAL_PERSONAL_SOUND, "Personal Sound for Buddy", dissect_aim_tlv_value_string }, - { AIM_CLIENT_TLV_FIRST_MESSAGE_SENT, "First Time Message Sent to Buddy (Unix Timestamp)", dissect_aim_tlv_value_uint32 }, - { 0, NULL, NULL } -}; - - static int dissect_aim_tlv_value_userstatus(proto_item *ti, guint16 valueid _U_, tvbuff_t *tvb, packet_info *pinfo _U_); static int dissect_aim_tlv_value_dcinfo(proto_item *ti, guint16 valueid _U_, tvbuff_t *tvb, packet_info *pinfo _U_); static int dissect_aim_tlv_value_client_short_capabilities(proto_item *ti, guint16, tvbuff_t *, packet_info *); -#define AIM_ONLINEBUDDY_USERCLASS 0x0001 -#define AIM_ONLINEBUDDY_ONSINCE 0x0003 -#define AIM_ONLINEBUDDY_IDLETIME 0x0004 -#define AIM_ONLINEBUDDY_MEMBERSINCE 0x0005 -#define AIM_ONLINEBUDDY_STATUS 0x0006 -#define AIM_ONLINEBUDDY_IPADDR 0x000a -#define AIM_ONLINEBUDDY_DCINFO 0x000c -#define AIM_ONLINEBUDDY_CAPINFO 0x000d -#define AIM_ONLINEBUDDY_SESSIONLEN 0x000f -#define AIM_ONLINEBUDDY_ICQSESSIONLEN 0x0010 -#define AIM_ONLINEBUDDY_TIMEUPDATE 0x0011 -#define AIM_ONLINEBUDDY_MYINSTANCENUM 0x0014 -#define AIM_ONLINEBUDDY_SHORTCAPS 0x0019 -#define AIM_ONLINEBUDDY_BARTINFO 0x001d -#define AIM_ONLINEBUDDY_NICKFLAGS2 0x001f -#define AIM_ONLINEBUDDY_BUDDYFEEDTIME 0x0023 -#define AIM_ONLINEBUDDY_SIGTIME 0x0026 -#define AIM_ONLINEBUDDY_AWAYTIME 0x0027 -#define AIM_ONLINEBUDDY_GEOCOUNTRY 0x002a - -const aim_tlv aim_onlinebuddy_tlvs[] = { - { AIM_ONLINEBUDDY_USERCLASS, "User class", dissect_aim_tlv_value_userclass }, - { AIM_ONLINEBUDDY_ONSINCE, "Online since", dissect_aim_tlv_value_uint32 }, - { AIM_ONLINEBUDDY_IDLETIME, "Idle time (sec)", dissect_aim_tlv_value_uint16 }, - { AIM_ONLINEBUDDY_MEMBERSINCE, "Member since", dissect_aim_tlv_value_time }, - { AIM_ONLINEBUDDY_STATUS, "Online status", dissect_aim_tlv_value_userstatus }, - { AIM_ONLINEBUDDY_IPADDR, "User IP Address", dissect_aim_tlv_value_ipv4 }, - { AIM_ONLINEBUDDY_DCINFO, "DC Info", dissect_aim_tlv_value_dcinfo}, - { AIM_ONLINEBUDDY_CAPINFO, "Capability Info", dissect_aim_tlv_value_client_capabilities }, - { AIM_ONLINEBUDDY_TIMEUPDATE, "Time update", dissect_aim_tlv_value_bytes }, - { AIM_ONLINEBUDDY_SESSIONLEN, "Session Length (sec)", dissect_aim_tlv_value_uint32 }, - { AIM_ONLINEBUDDY_ICQSESSIONLEN, "ICQ Session Length (sec)", dissect_aim_tlv_value_uint32 }, - { AIM_ONLINEBUDDY_MYINSTANCENUM, "Client instance number", dissect_aim_tlv_value_uint8 }, - { AIM_ONLINEBUDDY_SHORTCAPS, "Short Capabilities", dissect_aim_tlv_value_client_short_capabilities }, - { AIM_ONLINEBUDDY_BARTINFO, "BART Info", dissect_aim_tlv_value_bytes }, - { AIM_ONLINEBUDDY_NICKFLAGS2, "Upper bytes of Nick Flags", dissect_aim_tlv_value_bytes }, - { AIM_ONLINEBUDDY_BUDDYFEEDTIME, "Last Buddy Feed update", dissect_aim_tlv_value_time }, - { AIM_ONLINEBUDDY_SIGTIME, "Profile set time", dissect_aim_tlv_value_time }, - { AIM_ONLINEBUDDY_AWAYTIME, "Away set time", dissect_aim_tlv_value_time }, - { AIM_ONLINEBUDDY_GEOCOUNTRY, "Country code", dissect_aim_tlv_value_string }, - { 0, NULL, NULL } -}; #define DC_DISABLED 0x0000 #define DC_HTTPS 0x0001 @@ -302,13 +171,15 @@ static const value_string protocol_versions[] = { { 0, NULL }, }; -static GList *families = NULL; +#define CONFIRM_STATUS_EMAIL_SENT 0x00 +#define CONFIRM_STATUS_ALREADY_CONFIRMED 0x1E +#define CONFIRM_STATUS_SERVER_ERROR 0x23 -#define AIM_MOTD_TLV_MOTD 0x000B - -const aim_tlv aim_motd_tlvs[] = { - { AIM_MOTD_TLV_MOTD, "Message of the day message", dissect_aim_tlv_value_string }, - { 0, NULL, NULL } +static const value_string confirm_statusses[] = { + { CONFIRM_STATUS_EMAIL_SENT, "A confirmation email has been sent" }, + { CONFIRM_STATUS_ALREADY_CONFIRMED, "Account was already confirmed" }, + { CONFIRM_STATUS_SERVER_ERROR, "Server couldn't start confirmation process" }, + { 0, NULL } }; #define CLASS_UNCONFIRMED 0x00000001 @@ -335,12 +206,6 @@ const aim_tlv aim_motd_tlvs[] = { #define FNAC_FLAG_NEXT_IS_RELATED 0x0001 #define FNAC_FLAG_CONTAINS_VERSION 0x8000 -#define FNAC_TLV_FAMILY_VERSION 0x0001 - -static const aim_tlv aim_fnac_tlvs[] = { - { FNAC_TLV_FAMILY_VERSION, "SNAC Family Version", dissect_aim_tlv_value_uint16 }, - { 0, NULL, NULL } -}; #define SSI_OP_RESULT_SUCCESS 0 #define SSI_OP_RESULT_DB_ERROR 1 @@ -375,8 +240,74 @@ static const value_string aim_ssi_result_codes[] = { { 0, NULL } }; -/* Initialize the protocol and registered fields */ +#define FAMILY_SSI_TYPE_BUDDY 0x0000 +#define FAMILY_SSI_TYPE_GROUP 0x0001 +#define FAMILY_SSI_TYPE_PERMIT 0x0002 +#define FAMILY_SSI_TYPE_DENY 0x0003 +#define FAMILY_SSI_TYPE_PDINFO 0x0004 +#define FAMILY_SSI_TYPE_PRESENCEPREFS 0x0005 +#define FAMILY_SSI_TYPE_ICONINFO 0x0014 + +static const value_string aim_fnac_family_ssi_types[] = { + { FAMILY_SSI_TYPE_BUDDY, "Buddy" }, + { FAMILY_SSI_TYPE_GROUP, "Group" }, + { FAMILY_SSI_TYPE_PERMIT, "Permit" }, + { FAMILY_SSI_TYPE_DENY, "Deny" }, + { FAMILY_SSI_TYPE_PDINFO, "PDINFO" }, + { FAMILY_SSI_TYPE_PRESENCEPREFS, "Presence Preferences" }, + { FAMILY_SSI_TYPE_ICONINFO, "Icon Info" }, + { 0, NULL } +}; + +typedef struct _aim_tlv { + guint16 valueid; + const char *desc; + int (*dissector) (proto_item *ti, guint16 value_id, tvbuff_t *tvb, packet_info *); +} aim_tlv; + +typedef struct _aim_subtype { + guint16 id; + const char *name; + int (*dissector) (tvbuff_t *, packet_info *, proto_tree *); +} aim_subtype; + +typedef struct _aim_family { + int ett; + int proto_id; + protocol_t *proto; + guint16 family; + const char *name; + const aim_subtype *subtypes; +} aim_family; + +static int dissect_aim_tlv(tvbuff_t *tvb, packet_info *pinfo _U_, int offset, proto_tree *tree, const aim_tlv *); + +static int dissect_aim_tlv_value_uint16(proto_item *ti, guint16, tvbuff_t *, packet_info *); + + static int proto_aim = -1; +static int proto_aim_admin = -1; +static int proto_aim_adverts = -1; +static int proto_aim_bos = -1; +static int proto_aim_buddylist = -1; +static int proto_aim_chat = -1; +static int proto_aim_chatnav = -1; +static int proto_aim_directory = -1; +static int proto_aim_email = -1; +static int proto_aim_generic = -1; +static int proto_aim_icq = -1; +static int proto_aim_invitation = -1; +static int proto_aim_location = -1; +static int proto_aim_messaging = -1; +static int proto_aim_popup = -1; +static int proto_aim_signon = -1; +static int proto_aim_ssi = -1; +static int proto_aim_sst = -1; +static int proto_aim_stats = -1; +static int proto_aim_translate = -1; +static int proto_aim_userlookup = -1; + + static int hf_aim_cmd_start = -1; static int hf_aim_channel = -1; static int hf_aim_seqno = -1; @@ -384,15 +315,12 @@ static int hf_aim_data = -1; static int hf_aim_data_len = -1; static int hf_aim_tlv_length = -1; static int hf_aim_tlv_value_id = -1; -/* static int hf_aim_signon_challenge_len = -1; */ -/* static int hf_aim_signon_challenge = -1; */ static int hf_aim_fnac_family = -1; static int hf_aim_fnac_subtype = -1; static int hf_aim_fnac_flags = -1; static int hf_aim_fnac_flag_next_is_related = -1; static int hf_aim_fnac_flag_contains_version = -1; static int hf_aim_fnac_id = -1; -/* static int hf_aim_infotype = -1; */ static int hf_aim_buddyname_len = -1; static int hf_aim_buddyname = -1; static int hf_aim_userinfo_warninglevel = -1; @@ -444,19 +372,180 @@ static int hf_aim_dcinfo_last_ext_status_update = -1; static int hf_aim_dcinfo_unknown = -1; static int hf_aim_string08 = -1; +static int hf_admin_acctinfo_code = -1; +static int hf_admin_acctinfo_unknown = -1; +static int hf_admin_acctinfo_permissions = -1; +static int hf_admin_confirm_status = -1; + +/* static int hf_aim_bos_data = -1; */ +static int hf_aim_bos_class = -1; + +static int hf_aim_buddylist_userinfo_warninglevel = -1; + +static int hf_aim_chat_screen_name = -1; + +static int hf_generic_motd_motdtype = -1; +static int hf_generic_family = -1; +static int hf_generic_version = -1; +static int hf_generic_dll_version = -1; +static int hf_generic_servicereq_service = -1; +static int hf_generic_rateinfo_numclasses = -1; +static int hf_generic_rateinfo_windowsize = -1; +static int hf_generic_rateinfo_clearlevel = -1; +static int hf_generic_rateinfo_alertlevel = -1; +static int hf_generic_rateinfo_limitlevel = -1; +static int hf_generic_rateinfo_disconnectlevel = -1; +static int hf_generic_rateinfo_currentlevel = -1; +static int hf_generic_rateinfo_maxlevel = -1; +static int hf_generic_rateinfo_lasttime = -1; +static int hf_generic_rateinfo_curstate = -1; +static int hf_generic_rateinfo_classid = -1; +static int hf_generic_rateinfo_numpairs = -1; +static int hf_generic_rateinfoack_group = -1; +static int hf_generic_ratechange_msg = -1; +static int hf_generic_migration_numfams = -1; +static int hf_generic_priv_flags = -1; +static int hf_generic_allow_idle_see = -1; +static int hf_generic_allow_member_see = -1; +static int hf_generic_selfinfo_warninglevel = -1; +static int hf_generic_evil_new_warn_level = -1; +static int hf_generic_idle_time = -1; +static int hf_generic_client_ver_req_offset = -1; +static int hf_generic_client_ver_req_length = -1; +static int hf_generic_client_ver_req_hash = -1; +static int hf_generic_ext_status_type = -1; +static int hf_generic_ext_status_length = -1; +static int hf_generic_ext_status_flags = -1; +static int hf_generic_ext_status_data = -1; + +static int hf_icq_tlv_data_chunk_size = -1; +static int hf_icq_tlv_request_owner_uid = -1; +static int hf_icq_tlv_request_type = -1; +static int hf_icq_meta_subtype = -1; +static int hf_icq_tlv_request_seq_num = -1; +static int hf_icq_dropped_msg_flag = -1; + +static int hf_aim_snac_location_request_user_info_infotype = -1; +static int hf_aim_location_userinfo_warninglevel = -1; +static int hf_aim_location_buddyname_len = -1; +static int hf_aim_location_buddyname = -1; + +static int hf_aim_icbm_channel = -1; +static int hf_aim_icbm_cookie = -1; +static int hf_aim_icbm_msg_flags = -1; +static int hf_aim_icbm_max_sender_warnlevel = -1; +static int hf_aim_icbm_max_receiver_warnlevel = -1; +static int hf_aim_icbm_max_snac_size = -1; +static int hf_aim_icbm_min_msg_interval = -1; +static int hf_aim_icbm_notification_cookie = -1; +static int hf_aim_icbm_notification_channel = -1; +static int hf_aim_icbm_notification_type = -1; +static int hf_aim_icbm_rendezvous_nak = -1; +static int hf_aim_icbm_rendezvous_nak_length = -1; +static int hf_aim_message_channel_id = -1; +static int hf_aim_icbm_evil = -1; +static int hf_aim_evil_warn_level = -1; +static int hf_aim_evil_new_warn_level = -1; +static int hf_aim_rendezvous_msg_type = -1; +static int hf_aim_icbm_client_err_reason = -1; +static int hf_aim_icbm_client_err_protocol_version = -1; +static int hf_aim_icbm_client_err_client_caps_flags = -1; +static int hf_aim_rendezvous_extended_data_message_type = -1; +static int hf_aim_rendezvous_extended_data_message_flags = -1; +static int hf_aim_rendezvous_extended_data_message_flags_normal = -1; +static int hf_aim_rendezvous_extended_data_message_flags_auto = -1; +static int hf_aim_rendezvous_extended_data_message_flags_multi = -1; +static int hf_aim_rendezvous_extended_data_message_status_code = -1; +static int hf_aim_rendezvous_extended_data_message_priority_code = -1; +static int hf_aim_rendezvous_extended_data_message_text_length = -1; +static int hf_aim_rendezvous_extended_data_message_text = -1; + +static int hf_aim_messaging_plugin = -1; +static int hf_aim_icbm_client_err_length = -1; +static int hf_aim_messaging_unknown = -1; +static int hf_aim_icbm_client_err_downcounter = -1; +static int hf_aim_messaging_unknown_data = -1; +static int hf_aim_messaging_plugin_specific_data = -1; + +static int hf_aim_infotype = -1; +static int hf_aim_signon_challenge_len = -1; +static int hf_aim_signon_challenge = -1; + +static int hf_aim_fnac_subtype_ssi_version = -1; +static int hf_aim_fnac_subtype_ssi_numitems = -1; +static int hf_aim_fnac_subtype_ssi_last_change_time = -1; +static int hf_aim_fnac_subtype_ssi_buddyname_len = -1; +static int hf_aim_fnac_subtype_ssi_buddyname_len8 = -1; +static int hf_aim_fnac_subtype_ssi_buddyname = -1; +static int hf_aim_fnac_subtype_ssi_gid = -1; +static int hf_aim_fnac_subtype_ssi_bid = -1; +static int hf_aim_fnac_subtype_ssi_type = -1; +static int hf_aim_fnac_subtype_ssi_tlvlen = -1; +/* static int hf_aim_fnac_subtype_ssi_data = -1; */ +static int hf_aim_fnac_subtype_ssi_reason_str_len = -1; +static int hf_aim_fnac_subtype_ssi_reason_str = -1; +static int hf_aim_fnac_subtype_ssi_grant_auth_unkn = -1; +static int hf_aim_fnac_subtype_ssi_allow_auth = -1; + +static int hf_aim_sst_unknown = -1; +static int hf_aim_sst_md5_hash = -1; +static int hf_aim_sst_md5_hash_size = -1; +static int hf_aim_sst_ref_num = -1; +static int hf_aim_sst_icon_size = -1; +static int hf_aim_sst_icon = -1; + +static int hf_aim_userlookup_email = -1; + /* Initialize the subtree pointers */ -static gint ett_aim = -1; -static gint ett_aim_dcinfo = -1; -static gint ett_aim_buddyname= -1; -static gint ett_aim_fnac = -1; -static gint ett_aim_fnac_flags = -1; -static gint ett_aim_tlv = -1; -static gint ett_aim_tlv_value = -1; -static gint ett_aim_userclass = -1; -static gint ett_aim_messageblock = -1; -static gint ett_aim_nickinfo_caps = -1; +static gint ett_aim = -1; +static gint ett_aim_dcinfo = -1; +static gint ett_aim_buddyname = -1; +static gint ett_aim_fnac = -1; +static gint ett_aim_fnac_flags = -1; +static gint ett_aim_tlv = -1; +static gint ett_aim_tlv_value = -1; +static gint ett_aim_userclass = -1; +static gint ett_aim_messageblock = -1; +static gint ett_aim_nickinfo_caps = -1; static gint ett_aim_nickinfo_short_caps = -1; -static gint ett_aim_string08_array = -1; +static gint ett_aim_string08_array = -1; + +static gint ett_aim_admin = -1; +static gint ett_aim_adverts = -1; +static gint ett_aim_bos = -1; +static gint ett_aim_buddylist = -1; +static gint ett_aim_chat = -1; +static gint ett_aim_chatnav = -1; +static gint ett_aim_directory = -1; +static gint ett_aim_email = -1; + +static gint ett_generic_clientready = -1; +static gint ett_generic_migratefamilies = -1; +static gint ett_generic_clientready_item= -1; +static gint ett_generic_serverready = -1; +static gint ett_generic = -1; +static gint ett_generic_priv_flags = -1; +static gint ett_generic_rateinfo_class = -1; +static gint ett_generic_rateinfo_classes= -1; +static gint ett_generic_rateinfo_groups = -1; +static gint ett_generic_rateinfo_group = -1; + +static gint ett_aim_invitation = -1; +static gint ett_aim_icq = -1; +static gint ett_aim_icq_tlv = -1; +static gint ett_aim_location = -1; +static gint ett_aim_messaging = -1; +static gint ett_aim_rendezvous_data = -1; +static gint ett_aim_extended_data = -1; +static gint ett_aim_extended_data_message_flags = -1; +static gint ett_aim_popup = -1; +static gint ett_aim_signon = -1; +static gint ett_aim_ssi = -1; +static gint ett_ssi = -1; +static gint ett_aim_sst = -1; +static gint ett_aim_stats = -1; +static gint ett_aim_translate = -1; +static gint ett_aim_userlookup = -1; static expert_field ei_aim_messageblock_len = EI_INIT; @@ -465,8 +554,9 @@ static gboolean aim_desegment = TRUE; static dissector_handle_t aim_handle; +static GList *families = NULL; -const aim_subtype +static const aim_subtype *aim_get_subtype( guint16 famnum, guint16 subtype ) { GList *gl = families; @@ -485,7 +575,7 @@ const aim_subtype } -const aim_family +static const aim_family *aim_get_family( guint16 famnum ) { GList *gl = families; @@ -498,7 +588,7 @@ const aim_family return NULL; } -int +static int aim_get_buddyname( guint8 **name, tvbuff_t *tvb, int offset) { guint8 buddyname_length; @@ -511,7 +601,7 @@ aim_get_buddyname( guint8 **name, tvbuff_t *tvb, int offset) } -void +static void aim_get_message( guchar *msg, tvbuff_t *tvb, int msg_offset, int msg_length) { int i,j,c; @@ -588,7 +678,7 @@ aim_get_message( guchar *msg, tvbuff_t *tvb, int msg_offset, int msg_length) } } -void +static void aim_init_family(int proto, int ett, guint16 family, const aim_subtype *subtypes) { aim_family *fam = g_new(aim_family, 1); @@ -602,35 +692,7 @@ aim_init_family(int proto, int ett, guint16 family, const aim_subtype *subtypes) fam->ett = ett; } -static void -dissect_aim_newconn(tvbuff_t *tvb, packet_info *pinfo, int offset, - proto_tree *tree) -{ - col_set_str(pinfo->cinfo, COL_INFO, "New Connection"); - - if (tvb_reported_length_remaining(tvb, offset) > 0) { - proto_tree_add_item(tree, hf_aim_version, tvb, offset, 4, ENC_NA); - offset+=4; - offset = dissect_aim_tlv_sequence(tvb, pinfo, offset, tree, aim_client_tlvs); - } - - if (tvb_reported_length_remaining(tvb, offset) > 0) - proto_tree_add_item(tree, hf_aim_data, tvb, offset, -1, ENC_NA); -} - - -int -dissect_aim_snac_error(tvbuff_t *tvb, packet_info *pinfo, proto_tree *aim_tree) -{ - col_add_str(pinfo->cinfo, COL_INFO, - val_to_str(tvb_get_ntohs(tvb, 0), aim_snac_errors, "Unknown SNAC error 0x%02x")); - - proto_tree_add_item (aim_tree, hf_aim_snac_error, tvb, 0, 2, ENC_BIG_ENDIAN); - - return dissect_aim_tlv_sequence(tvb, pinfo, 2, aim_tree, aim_client_tlvs); -} - -int +static int dissect_aim_ssi_result(tvbuff_t *tvb, packet_info *pinfo, proto_tree *aim_tree) { col_add_str(pinfo->cinfo, COL_INFO, @@ -641,17 +703,12 @@ dissect_aim_ssi_result(tvbuff_t *tvb, packet_info *pinfo, proto_tree *aim_tree) return 2; } -int -dissect_aim_userinfo(tvbuff_t *tvb, packet_info *pinfo, - int offset, proto_tree *tree) -{ - offset = dissect_aim_buddyname(tvb, pinfo, offset, tree); - - proto_tree_add_item(tree, hf_aim_userinfo_warninglevel, tvb, offset, 2, ENC_BIG_ENDIAN); - offset += 2; +#define FNAC_TLV_FAMILY_VERSION 0x0001 - return dissect_aim_tlv_list(tvb, pinfo, offset, tree, aim_onlinebuddy_tlvs); -} +static const aim_tlv aim_fnac_tlvs[] = { + { FNAC_TLV_FAMILY_VERSION, "SNAC Family Version", dissect_aim_tlv_value_uint16 }, + { 0, NULL, NULL } +}; static void dissect_aim_snac(tvbuff_t *tvb, packet_info *pinfo, int offset, @@ -783,15 +840,6 @@ dissect_aim_keep_alive(tvbuff_t *tvb, packet_info *pinfo, int offset, } static void -dissect_aim_close_conn(tvbuff_t *tvb, packet_info *pinfo, int offset, - proto_tree *tree) -{ - col_set_str(pinfo->cinfo, COL_INFO, "Close Connection"); - - dissect_aim_tlv_sequence(tvb, pinfo, offset, tree, aim_client_tlvs); -} - -static void dissect_aim_unknown_channel(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tree) { @@ -802,7 +850,7 @@ dissect_aim_unknown_channel(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree_add_item(tree, hf_aim_data, tvb, offset, -1, ENC_NA); } -int +static int dissect_aim_buddyname(tvbuff_t *tvb, packet_info *pinfo _U_, int offset, proto_tree *tree) { @@ -991,7 +1039,7 @@ aim_find_short_capability(guint16 shortid) return aim_find_capability(clsid); } -int +static int dissect_aim_capability(proto_tree *entry, tvbuff_t *tvb, int offset) { const aim_client_capability *caps; @@ -1030,7 +1078,7 @@ dissect_aim_short_capability(proto_tree *entry, tvbuff_t *tvb, int offset) return offset+2; } -int +static int dissect_aim_tlv_value_client_capabilities(proto_item *ti, guint16 valueid _U_, tvbuff_t *tvb, packet_info *pinfo _U_) { int offset = 0; @@ -1064,14 +1112,14 @@ dissect_aim_tlv_value_client_short_capabilities(proto_item *ti, guint16 valueid return tvb_reported_length(tvb); } -int +static int dissect_aim_tlv_value_time(proto_item *ti _U_, guint16 valueid _U_, tvbuff_t *tvb, packet_info *pinfo _U_) { /* FIXME */ return tvb_reported_length(tvb); } -int +static int dissect_aim_userclass(tvbuff_t *tvb, int offset, int len, proto_item *ti, guint32 value) { proto_tree *entry; @@ -1105,7 +1153,7 @@ dissect_aim_userclass(tvbuff_t *tvb, int offset, int len, proto_item *ti, guint3 return offset+len; } -int +static int dissect_aim_tlv_value_userclass(proto_item *ti, guint16 valueid _U_, tvbuff_t *tvb, packet_info *pinfo _U_) { guint16 value16 = tvb_get_ntohs(tvb, 0); @@ -1142,7 +1190,7 @@ dissect_aim_tlv_value_dcinfo(proto_item *ti, guint16 valueid _U_, tvbuff_t *tvb, return offset; } -int +static int dissect_aim_tlv_value_string (proto_item *ti, guint16 valueid _U_, tvbuff_t *tvb, packet_info *pinfo _U_) { guint8 *buf; @@ -1155,7 +1203,7 @@ dissect_aim_tlv_value_string (proto_item *ti, guint16 valueid _U_, tvbuff_t *tvb return string_len; } -int +static int dissect_aim_tlv_value_string08_array (proto_item *ti, guint16 valueid _U_, tvbuff_t *tvb, packet_info *pinfo _U_) { proto_tree *entry; @@ -1173,13 +1221,13 @@ dissect_aim_tlv_value_string08_array (proto_item *ti, guint16 valueid _U_, tvbuf return offset; } -int +static int dissect_aim_tlv_value_bytes (proto_item *ti _U_, guint16 valueid _U_, tvbuff_t *tvb, packet_info *pinfo _U_) { return tvb_reported_length(tvb); } -int +static int dissect_aim_tlv_value_uint8 (proto_item *ti, guint16 valueid _U_, tvbuff_t *tvb, packet_info *pinfo _U_) { guint8 value8 = tvb_get_guint8(tvb, 0); @@ -1187,7 +1235,7 @@ dissect_aim_tlv_value_uint8 (proto_item *ti, guint16 valueid _U_, tvbuff_t *tvb, return 1; } -int +static int dissect_aim_tlv_value_uint16 (proto_item *ti, guint16 valueid _U_, tvbuff_t *tvb, packet_info *pinfo _U_) { guint16 value16 = tvb_get_ntohs(tvb, 0); @@ -1195,14 +1243,14 @@ dissect_aim_tlv_value_uint16 (proto_item *ti, guint16 valueid _U_, tvbuff_t *tvb return 2; } -int +static int dissect_aim_tlv_value_ipv4 (proto_item *ti, guint16 valueid _U_, tvbuff_t *tvb, packet_info *pinfo _U_) { proto_item_set_text(ti, "Value: %s", tvb_ip_to_str(tvb, 0)); return 4; } -int +static int dissect_aim_tlv_value_uint32 (proto_item *ti, guint16 valueid _U_, tvbuff_t *tvb, packet_info *pinfo _U_) { guint32 value32 = tvb_get_ntohl(tvb, 0); @@ -1210,7 +1258,7 @@ dissect_aim_tlv_value_uint32 (proto_item *ti, guint16 valueid _U_, tvbuff_t *tvb return 4; } -int +static int dissect_aim_tlv_value_messageblock (proto_item *ti, guint16 valueid _U_, tvbuff_t *tvb, packet_info *pinfo) { proto_tree *entry; @@ -1280,7 +1328,7 @@ dissect_aim_tlv_value_messageblock (proto_item *ti, guint16 valueid _U_, tvbuff_ } /* Dissect a TLV value */ -int +static int dissect_aim_tlv(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tree, const aim_tlv *tlv) { @@ -1338,7 +1386,7 @@ dissect_aim_tlv(tvbuff_t *tvb, packet_info *pinfo, int offset, return offset; } -int +static int dissect_aim_tlv_sequence(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tree, const aim_tlv *tlv_table) { @@ -1349,7 +1397,7 @@ dissect_aim_tlv_sequence(tvbuff_t *tvb, packet_info *pinfo, int offset, return offset; } -int +static int dissect_aim_tlv_list(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *tree, const aim_tlv *tlv_table) { @@ -1365,6 +1413,153 @@ dissect_aim_tlv_list(tvbuff_t *tvb, packet_info *pinfo, int offset, return offset; } +#define AIM_CLIENT_TLV_SCREEN_NAME 0x0001 +#define AIM_CLIENT_TLV_NEW_ROASTED_PASSWORD 0x0002 +#define AIM_CLIENT_TLV_CLIENT_ID_STRING 0x0003 +#define AIM_CLIENT_TLV_ERRORURL 0x0004 +#define AIM_CLIENT_TLV_BOS_SERVER_STRING 0x0005 +#define AIM_CLIENT_TLV_AUTH_COOKIE 0x0006 +#define AIM_CLIENT_TLV_ERRORCODE 0x0008 +#define AIM_CLIENT_TLV_DISCONNECT_REASON 0x0009 +#define AIM_CLIENT_TLV_RECONNECT_HOST 0x000a +#define AIM_CLIENT_TLV_URL 0x000b +#define AIM_CLIENT_TLV_DEBUG_DATA 0x000c +#define AIM_CLIENT_TLV_FAMILY_ID 0x000d +#define AIM_CLIENT_TLV_CLIENT_COUNTRY 0x000e +#define AIM_CLIENT_TLV_CLIENT_LANGUAGE 0x000f +#define AIM_CLIENT_TLV_EMAILADDR 0x0011 +#define AIM_CLIENT_TLV_OLD_ROASTED_PASSWORD 0x0012 +#define AIM_CLIENT_TLV_REGSTATUS 0x0013 +#define AIM_CLIENT_TLV_CLIENT_DISTRIBUTION_NUM 0x0014 +#define AIM_CLIENT_TLV_INVITEMESSAGE 0x0015 +#define AIM_CLIENT_TLV_CLIENT_ID 0x0016 +#define AIM_CLIENT_TLV_CLIENT_MAJOR_VERSION 0x0017 +#define AIM_CLIENT_TLV_CLIENT_MINOR_VERSION 0x0018 +#define AIM_CLIENT_TLV_CLIENT_LESSER_VERSION 0x0019 +#define AIM_CLIENT_TLV_CLIENT_BUILD_NUMBER 0x001a +#define AIM_CLIENT_TLV_PASSWORD_MD5 0x0025 +#define AIM_CLIENT_TLV_LATESTBETABUILD 0x0040 +#define AIM_CLIENT_TLV_LATESTBETAURL 0x0041 +#define AIM_CLIENT_TLV_LATESTBETAINFO 0x0042 +#define AIM_CLIENT_TLV_LATESTBETANAME 0x0043 +#define AIM_CLIENT_TLV_LATESTRELEASEBUILD 0x0044 +#define AIM_CLIENT_TLV_LATESTRELEASEURL 0x0045 +#define AIM_CLIENT_TLV_LATESTRELEASEINFO 0x0046 +#define AIM_CLIENT_TLV_LATESTRELEASENAME 0x0047 +#define AIM_CLIENT_TLV_BETA_DIGEST_SIG 0x0048 +#define AIM_CLIENT_TLV_RELEASE_DIGEST_SIG 0x0049 +#define AIM_CLIENT_TLV_CLIENTUSESSI 0x004a +#define AIM_CLIENT_TLV_CHANGE_PASSWORD_URL 0x0054 +#define AIM_CLIENT_TLV_AWAITING_AUTH 0x0066 +#define AIM_CLIENT_TLV_MEMBERS 0x00c8 +#define AIM_CLIENT_TLV_VISIBILITY_BITS 0x00c9 +#define AIM_CLIENT_TLV_PRIVACY 0x00ca +#define AIM_CLIENT_TLV_VISIBLE_CLASS 0x00cb +#define AIM_CLIENT_TLV_VISIBLE_MISC 0x00cc +#define AIM_CLIENT_TLV_ICQ2K_SHORTCUT 0x00cd +#define AIM_CLIENT_TLV_FIRST_LOADED_TIME 0x00d4 +#define AIM_CLIENT_TLV_BUDDY_ICON_MD5SUM 0x00d5 +#define AIM_CLIENT_TLV_GIVEN_NAME 0x0131 +#define AIM_CLIENT_TLV_LOCAL_EMAIL 0x0137 +#define AIM_CLIENT_TLV_LOCAL_SMS 0x013a +#define AIM_CLIENT_TLV_LOCAL_COMMENT 0x013c +#define AIM_CLIENT_TLV_LOCAL_PERSONAL_ALERT 0x013d +#define AIM_CLIENT_TLV_LOCAL_PERSONAL_SOUND 0x013e +#define AIM_CLIENT_TLV_FIRST_MESSAGE_SENT 0x0145 + +static const aim_tlv aim_client_tlvs[] = { + { AIM_CLIENT_TLV_SCREEN_NAME, "Screen name", dissect_aim_tlv_value_string }, + { AIM_CLIENT_TLV_NEW_ROASTED_PASSWORD, "Roasted password array", dissect_aim_tlv_value_bytes }, + { AIM_CLIENT_TLV_OLD_ROASTED_PASSWORD, "Old roasted password array", dissect_aim_tlv_value_bytes }, + { AIM_CLIENT_TLV_CLIENT_ID_STRING, "Client id string (name, version)", dissect_aim_tlv_value_string }, + { AIM_CLIENT_TLV_CLIENT_ID, "Client id number", dissect_aim_tlv_value_uint16 }, + { AIM_CLIENT_TLV_CLIENT_MAJOR_VERSION, "Client major version", dissect_aim_tlv_value_uint16 }, + { AIM_CLIENT_TLV_CLIENT_MINOR_VERSION, "Client minor version", dissect_aim_tlv_value_uint16 }, + { AIM_CLIENT_TLV_CLIENT_LESSER_VERSION, "Client lesser version", dissect_aim_tlv_value_uint16 }, + { AIM_CLIENT_TLV_CLIENT_BUILD_NUMBER, "Client build number", dissect_aim_tlv_value_uint16 }, + { AIM_CLIENT_TLV_PASSWORD_MD5, "Password Hash (MD5)", dissect_aim_tlv_value_bytes }, + { AIM_CLIENT_TLV_CLIENT_DISTRIBUTION_NUM, "Client distribution number", dissect_aim_tlv_value_uint32 }, + { AIM_CLIENT_TLV_CLIENT_LANGUAGE, "Client language", dissect_aim_tlv_value_string }, + { AIM_CLIENT_TLV_CLIENT_COUNTRY, "Client country", dissect_aim_tlv_value_string }, + { AIM_CLIENT_TLV_BOS_SERVER_STRING, "BOS server string", dissect_aim_tlv_value_string }, + { AIM_CLIENT_TLV_AUTH_COOKIE, "Authorization cookie", dissect_aim_tlv_value_bytes }, + { AIM_CLIENT_TLV_ERRORURL, "Error URL", dissect_aim_tlv_value_string }, + { AIM_CLIENT_TLV_ERRORCODE, "Error Code", dissect_aim_tlv_value_uint16 }, + { AIM_CLIENT_TLV_DISCONNECT_REASON, "Disconnect Reason", dissect_aim_tlv_value_uint16 }, + { AIM_CLIENT_TLV_RECONNECT_HOST, "Reconnect Hostname", dissect_aim_tlv_value_string }, + { AIM_CLIENT_TLV_URL, "URL", dissect_aim_tlv_value_string }, + { AIM_CLIENT_TLV_DEBUG_DATA, "Debug Data", dissect_aim_tlv_value_uint16 }, + { AIM_CLIENT_TLV_EMAILADDR, "Account Email address", dissect_aim_tlv_value_string }, + { AIM_CLIENT_TLV_REGSTATUS, "Registration Status", dissect_aim_tlv_value_uint16 }, + { AIM_CLIENT_TLV_LATESTBETABUILD, "Latest Beta Build", dissect_aim_tlv_value_uint32 }, + { AIM_CLIENT_TLV_LATESTBETAURL, "Latest Beta URL", dissect_aim_tlv_value_string }, + { AIM_CLIENT_TLV_LATESTBETAINFO, "Latest Beta Info", dissect_aim_tlv_value_string }, + { AIM_CLIENT_TLV_LATESTBETANAME, "Latest Beta Name", dissect_aim_tlv_value_string }, + { AIM_CLIENT_TLV_LATESTRELEASEBUILD, "Latest Release Build", dissect_aim_tlv_value_uint32 }, + { AIM_CLIENT_TLV_LATESTRELEASEURL, "Latest Release URL", dissect_aim_tlv_value_string }, + { AIM_CLIENT_TLV_LATESTRELEASEINFO, "Latest Release Info", dissect_aim_tlv_value_string }, + { AIM_CLIENT_TLV_LATESTRELEASENAME, "Latest Release Name", dissect_aim_tlv_value_string }, + { AIM_CLIENT_TLV_BETA_DIGEST_SIG, "Beta Digest Signature (MD5)" , dissect_aim_tlv_value_bytes }, + { AIM_CLIENT_TLV_RELEASE_DIGEST_SIG, "Release Digest Signature (MD5)", dissect_aim_tlv_value_bytes }, + { AIM_CLIENT_TLV_CLIENTUSESSI, "Use SSI", dissect_aim_tlv_value_uint8 }, + { AIM_CLIENT_TLV_FAMILY_ID, "Service (SNAC Family) ID", dissect_aim_tlv_value_uint16 }, + { AIM_CLIENT_TLV_CHANGE_PASSWORD_URL, "Change password url", dissect_aim_tlv_value_string }, + { AIM_CLIENT_TLV_AWAITING_AUTH, "Awaiting Authorization", dissect_aim_tlv_value_bytes }, + { AIM_CLIENT_TLV_MEMBERS, "Members of this Group", dissect_aim_tlv_value_bytes }, + { AIM_CLIENT_TLV_VISIBILITY_BITS, "Bitfield", dissect_aim_tlv_value_bytes }, + { AIM_CLIENT_TLV_PRIVACY, "Privacy Settings" , dissect_aim_tlv_value_uint8 }, + { AIM_CLIENT_TLV_VISIBLE_CLASS, "Visible To Classes", dissect_aim_tlv_value_userclass }, + { AIM_CLIENT_TLV_VISIBLE_MISC, "Allow Others to See Data", dissect_aim_tlv_value_bytes }, + { AIM_CLIENT_TLV_ICQ2K_SHORTCUT, "ICQ2K Shortcut List", dissect_aim_tlv_value_string }, + { AIM_CLIENT_TLV_FIRST_LOADED_TIME, "First Time Buddy Was Added (Unix Timestamp)" , dissect_aim_tlv_value_uint32 }, + { AIM_CLIENT_TLV_BUDDY_ICON_MD5SUM, "MD5SUM of Current Buddy Icon", dissect_aim_tlv_value_bytes }, + { AIM_CLIENT_TLV_GIVEN_NAME, "Locally Specified Buddy Name", dissect_aim_tlv_value_string }, + { AIM_CLIENT_TLV_LOCAL_EMAIL, "Locally Specified Buddy Email", dissect_aim_tlv_value_string }, + { AIM_CLIENT_TLV_LOCAL_SMS, "Locally Specified Buddy SMS", dissect_aim_tlv_value_string }, + { AIM_CLIENT_TLV_LOCAL_COMMENT, "Locally Specified Buddy Comment", dissect_aim_tlv_value_string }, + { AIM_CLIENT_TLV_LOCAL_PERSONAL_ALERT, "Personal Alert for Buddy", dissect_aim_tlv_value_uint16 }, + { AIM_CLIENT_TLV_LOCAL_PERSONAL_SOUND, "Personal Sound for Buddy", dissect_aim_tlv_value_string }, + { AIM_CLIENT_TLV_FIRST_MESSAGE_SENT, "First Time Message Sent to Buddy (Unix Timestamp)", dissect_aim_tlv_value_uint32 }, + { 0, NULL, NULL } +}; + +static void +dissect_aim_close_conn(tvbuff_t *tvb, packet_info *pinfo, int offset, + proto_tree *tree) +{ + col_set_str(pinfo->cinfo, COL_INFO, "Close Connection"); + + dissect_aim_tlv_sequence(tvb, pinfo, offset, tree, aim_client_tlvs); +} + +static void +dissect_aim_newconn(tvbuff_t *tvb, packet_info *pinfo, int offset, + proto_tree *tree) +{ + col_set_str(pinfo->cinfo, COL_INFO, "New Connection"); + + if (tvb_reported_length_remaining(tvb, offset) > 0) { + proto_tree_add_item(tree, hf_aim_version, tvb, offset, 4, ENC_NA); + offset+=4; + offset = dissect_aim_tlv_sequence(tvb, pinfo, offset, tree, aim_client_tlvs); + } + + if (tvb_reported_length_remaining(tvb, offset) > 0) + proto_tree_add_item(tree, hf_aim_data, tvb, offset, -1, ENC_NA); +} + + +static int +dissect_aim_snac_error(tvbuff_t *tvb, packet_info *pinfo, proto_tree *aim_tree) +{ + col_add_str(pinfo->cinfo, COL_INFO, + val_to_str(tvb_get_ntohs(tvb, 0), aim_snac_errors, "Unknown SNAC error 0x%02x")); + + proto_tree_add_item (aim_tree, hf_aim_snac_error, tvb, 0, 2, ENC_BIG_ENDIAN); + + return dissect_aim_tlv_sequence(tvb, pinfo, 2, aim_tree, aim_client_tlvs); +} + static guint get_aim_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset, void *data _U_) { @@ -1482,8 +1677,2172 @@ dissect_aim_ssl_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void * return TRUE; } +/*********************************************************************************************************** + * AIM ADMIN + ***********************************************************************************************************/ +static int dissect_aim_admin_accnt_info_req(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *admin_tree) +{ + proto_tree_add_item(admin_tree, hf_admin_acctinfo_code, tvb, 0, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(admin_tree, hf_admin_acctinfo_unknown, tvb, 2, 2, ENC_BIG_ENDIAN); + return 4; +} + +static int dissect_aim_admin_accnt_info_repl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *admin_tree) +{ + int offset = 0; + proto_tree_add_item(admin_tree, hf_admin_acctinfo_permissions, tvb, offset, 2, ENC_BIG_ENDIAN); + offset+=2; + return dissect_aim_tlv_list(tvb, pinfo, offset, admin_tree, aim_client_tlvs); +} + +static int dissect_aim_admin_info_change_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *admin_tree) +{ + return dissect_aim_tlv_sequence(tvb, pinfo, 0, admin_tree, aim_client_tlvs); +} + +static int dissect_aim_admin_cfrm_repl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *admin_tree) +{ + int offset = 0; + proto_tree_add_item(admin_tree, hf_admin_confirm_status, tvb, offset, 2, ENC_BIG_ENDIAN); + offset+=2; + return dissect_aim_tlv_sequence(tvb, pinfo, offset, admin_tree, aim_client_tlvs); +} + +static const aim_subtype aim_fnac_family_admin[] = { + { 0x0001, "Error", dissect_aim_snac_error }, + { 0x0002, "Request Account Information", dissect_aim_admin_accnt_info_req }, + { 0x0003, "Requested Account Information", dissect_aim_admin_accnt_info_repl }, + { 0x0004, "Infochange Request", dissect_aim_admin_info_change_req }, + { 0x0005, "Infochange Reply", dissect_aim_admin_accnt_info_repl }, + { 0x0006, "Account Confirm Request", NULL }, + { 0x0007, "Account Confirm Reply", dissect_aim_admin_cfrm_repl}, + { 0, NULL, NULL } +}; + +/*********************************************************************************************************** + * AIM ADVERTS + ***********************************************************************************************************/ +static const aim_subtype aim_fnac_family_adverts[] = { + { 0x0001, "Error", dissect_aim_snac_error }, + { 0x0002, "Request", NULL }, + /* FIXME: */ + /* From other sources, I understand this response contains + * a GIF file, haven't actually seen one though. And this + * family appears to be deprecated, so we might never find out.. */ + { 0x0003, "Data (GIF)", NULL }, + { 0, NULL, NULL } +}; + + +/*********************************************************************************************************** + * AIM BOS + ***********************************************************************************************************/ + +/* Family BOS (Misc) */ + +#define AIM_PRIVACY_TLV_MAX_VISIB_LIST_SIZE 0x001 +#define AIM_PRIVACY_TLV_MAX_INVISIB_LIST_SIZE 0x002 + +static const aim_tlv aim_privacy_tlvs[] = { + { AIM_PRIVACY_TLV_MAX_VISIB_LIST_SIZE, "Max visible list size", dissect_aim_tlv_value_uint16 }, + { AIM_PRIVACY_TLV_MAX_INVISIB_LIST_SIZE, "Max invisible list size", dissect_aim_tlv_value_uint16 }, + { 0, NULL, NULL }, +}; + +static int dissect_aim_bos_set_group_perm(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *bos_tree) +{ + int offset = 0; + guint32 userclass = tvb_get_ntohl(tvb, offset); + proto_item *ti = proto_tree_add_uint(bos_tree, hf_aim_bos_class, tvb, offset, 4, userclass); + return dissect_aim_userclass(tvb, offset, 4, ti, userclass); +} + +static int dissect_aim_bos_rights(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bos_tree) +{ + return dissect_aim_tlv_sequence(tvb, pinfo, 0, bos_tree, aim_privacy_tlvs); +} + +static int dissect_aim_bos_buddyname(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bos_tree) +{ + int offset = 0; + while(tvb_reported_length_remaining(tvb, offset) > 0) { + offset = dissect_aim_buddyname(tvb, pinfo, offset, bos_tree); + } + return offset; +} + +static const aim_subtype aim_fnac_family_bos[] = { + { 0x0001, "Error", dissect_aim_snac_error }, + { 0x0002, "Rights Query", NULL }, + { 0x0003, "Rights" , dissect_aim_bos_rights }, + { 0x0004, "Set Group Permissions Mask", dissect_aim_bos_set_group_perm }, + { 0x0005, "Add To Visible List", dissect_aim_bos_buddyname }, + { 0x0006, "Delete From Visible List", dissect_aim_bos_buddyname }, + { 0x0007, "Add To Invisible List", dissect_aim_bos_buddyname }, + { 0x0008, "Delete From Invisible List", dissect_aim_bos_buddyname }, + { 0, NULL, NULL } +}; + + +/*********************************************************************************************************** + * AIM BUDDYLIST + ***********************************************************************************************************/ +#define AIM_ONLINEBUDDY_USERCLASS 0x0001 +#define AIM_ONLINEBUDDY_ONSINCE 0x0003 +#define AIM_ONLINEBUDDY_IDLETIME 0x0004 +#define AIM_ONLINEBUDDY_MEMBERSINCE 0x0005 +#define AIM_ONLINEBUDDY_STATUS 0x0006 +#define AIM_ONLINEBUDDY_IPADDR 0x000a +#define AIM_ONLINEBUDDY_DCINFO 0x000c +#define AIM_ONLINEBUDDY_CAPINFO 0x000d +#define AIM_ONLINEBUDDY_SESSIONLEN 0x000f +#define AIM_ONLINEBUDDY_ICQSESSIONLEN 0x0010 +#define AIM_ONLINEBUDDY_TIMEUPDATE 0x0011 +#define AIM_ONLINEBUDDY_MYINSTANCENUM 0x0014 +#define AIM_ONLINEBUDDY_SHORTCAPS 0x0019 +#define AIM_ONLINEBUDDY_BARTINFO 0x001d +#define AIM_ONLINEBUDDY_NICKFLAGS2 0x001f +#define AIM_ONLINEBUDDY_BUDDYFEEDTIME 0x0023 +#define AIM_ONLINEBUDDY_SIGTIME 0x0026 +#define AIM_ONLINEBUDDY_AWAYTIME 0x0027 +#define AIM_ONLINEBUDDY_GEOCOUNTRY 0x002a + +static const aim_tlv aim_onlinebuddy_tlvs[] = { + { AIM_ONLINEBUDDY_USERCLASS, "User class", dissect_aim_tlv_value_userclass }, + { AIM_ONLINEBUDDY_ONSINCE, "Online since", dissect_aim_tlv_value_uint32 }, + { AIM_ONLINEBUDDY_IDLETIME, "Idle time (sec)", dissect_aim_tlv_value_uint16 }, + { AIM_ONLINEBUDDY_MEMBERSINCE, "Member since", dissect_aim_tlv_value_time }, + { AIM_ONLINEBUDDY_STATUS, "Online status", dissect_aim_tlv_value_userstatus }, + { AIM_ONLINEBUDDY_IPADDR, "User IP Address", dissect_aim_tlv_value_ipv4 }, + { AIM_ONLINEBUDDY_DCINFO, "DC Info", dissect_aim_tlv_value_dcinfo}, + { AIM_ONLINEBUDDY_CAPINFO, "Capability Info", dissect_aim_tlv_value_client_capabilities }, + { AIM_ONLINEBUDDY_TIMEUPDATE, "Time update", dissect_aim_tlv_value_bytes }, + { AIM_ONLINEBUDDY_SESSIONLEN, "Session Length (sec)", dissect_aim_tlv_value_uint32 }, + { AIM_ONLINEBUDDY_ICQSESSIONLEN, "ICQ Session Length (sec)", dissect_aim_tlv_value_uint32 }, + { AIM_ONLINEBUDDY_MYINSTANCENUM, "Client instance number", dissect_aim_tlv_value_uint8 }, + { AIM_ONLINEBUDDY_SHORTCAPS, "Short Capabilities", dissect_aim_tlv_value_client_short_capabilities }, + { AIM_ONLINEBUDDY_BARTINFO, "BART Info", dissect_aim_tlv_value_bytes }, + { AIM_ONLINEBUDDY_NICKFLAGS2, "Upper bytes of Nick Flags", dissect_aim_tlv_value_bytes }, + { AIM_ONLINEBUDDY_BUDDYFEEDTIME, "Last Buddy Feed update", dissect_aim_tlv_value_time }, + { AIM_ONLINEBUDDY_SIGTIME, "Profile set time", dissect_aim_tlv_value_time }, + { AIM_ONLINEBUDDY_AWAYTIME, "Away set time", dissect_aim_tlv_value_time }, + { AIM_ONLINEBUDDY_GEOCOUNTRY, "Country code", dissect_aim_tlv_value_string }, + { 0, NULL, NULL } +}; + +#define AIM_BUDDYLIST_TLV_MAX_CONTACT_ENTRIES 0x0001 +#define AIM_BUDDYLIST_TLV_MAX_WATCHER_ENTRIES 0x0002 +#define AIM_BUDDYLIST_TLV_MAX_ONLINE_NOTIFICATIONS 0x0003 + +static const aim_tlv aim_buddylist_tlvs[] = { + { AIM_BUDDYLIST_TLV_MAX_CONTACT_ENTRIES, "Max number of contact list entries", dissect_aim_tlv_value_uint16 }, + { AIM_BUDDYLIST_TLV_MAX_WATCHER_ENTRIES, "Max number of watcher list entries", dissect_aim_tlv_value_uint16 }, + { AIM_BUDDYLIST_TLV_MAX_ONLINE_NOTIFICATIONS, "Max online notifications", dissect_aim_tlv_value_uint16 }, + {0, NULL, NULL } +}; + +static int +dissect_aim_userinfo(tvbuff_t *tvb, packet_info *pinfo, + int offset, proto_tree *tree) +{ + offset = dissect_aim_buddyname(tvb, pinfo, offset, tree); + + proto_tree_add_item(tree, hf_aim_userinfo_warninglevel, tvb, offset, 2, ENC_BIG_ENDIAN); + offset += 2; + + return dissect_aim_tlv_list(tvb, pinfo, offset, tree, aim_onlinebuddy_tlvs); +} + +/* Initialize the protocol and registered fields */ + +static int dissect_aim_buddylist_buddylist(tvbuff_t *tvb, packet_info *pinfo, proto_tree *buddy_tree) +{ + int offset = 0; + while (tvb_reported_length_remaining(tvb, offset) > 0) { + offset = dissect_aim_buddyname( tvb, pinfo, offset, buddy_tree); + } + return offset; +} + +static int dissect_aim_buddylist_rights_repl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *buddy_tree) +{ + return dissect_aim_tlv_sequence(tvb, pinfo, 0, buddy_tree, aim_buddylist_tlvs); +} + +static int dissect_aim_buddylist_reject(tvbuff_t *tvb, packet_info *pinfo, proto_tree *buddy_tree) +{ + return dissect_aim_buddyname(tvb, pinfo, 0, buddy_tree); +} + +static int dissect_aim_buddylist_oncoming(tvbuff_t *tvb, packet_info *pinfo, proto_tree *buddy_tree) +{ + guint8 *buddyname; + int offset = 0; + int buddyname_length = aim_get_buddyname( &buddyname, tvb, offset ); + + col_set_str(pinfo->cinfo, COL_INFO, "Oncoming Buddy"); + col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", + format_text(buddyname, buddyname_length)); + + offset += dissect_aim_buddyname(tvb, pinfo, offset, buddy_tree); + + /* Warning level */ + proto_tree_add_item(buddy_tree, hf_aim_buddylist_userinfo_warninglevel, tvb, offset, + 2, ENC_BIG_ENDIAN); + offset += 2; + + offset = dissect_aim_tlv_list(tvb, pinfo, offset, buddy_tree, aim_onlinebuddy_tlvs); + + return offset; +} + +static int dissect_aim_buddylist_offgoing(tvbuff_t *tvb, packet_info *pinfo, proto_tree *buddy_tree) +{ + + guint8 *buddyname; + int offset = 0; + int buddyname_length = aim_get_buddyname( &buddyname, tvb, offset ); + + col_set_str(pinfo->cinfo, COL_INFO, "Offgoing Buddy"); + col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", + format_text(buddyname, buddyname_length)); + + offset += dissect_aim_buddyname(tvb, pinfo, offset, buddy_tree); + + /* Warning level */ + proto_tree_add_item(buddy_tree, hf_aim_buddylist_userinfo_warninglevel, tvb, offset, + 2, ENC_BIG_ENDIAN); + offset += 2; + + return dissect_aim_tlv_list(tvb, pinfo, offset, buddy_tree, aim_onlinebuddy_tlvs); +} + +static const aim_subtype aim_fnac_family_buddylist[] = { + { 0x0001, "Error", dissect_aim_snac_error }, + { 0x0002, "Rights Request", NULL }, + { 0x0003, "Rights Reply", dissect_aim_buddylist_rights_repl }, + { 0x0004, "Add Buddy", dissect_aim_buddylist_buddylist }, + { 0x0005, "Remove Buddy", dissect_aim_buddylist_buddylist }, + { 0x0006, "Watchers List Request", NULL }, + { 0x0007, "Watchers List Reply", dissect_aim_buddylist_buddylist }, + { 0x000a, "Reject Buddy", dissect_aim_buddylist_reject }, + { 0x000b, "Oncoming Buddy", dissect_aim_buddylist_oncoming }, + { 0x000c, "Offgoing Buddy", dissect_aim_buddylist_offgoing }, + { 0, NULL, NULL } +}; + + +/*********************************************************************************************************** + * AIM CHAT + ***********************************************************************************************************/ + +/* SNAC families */ + +#define AIM_CHAT_TLV_BROWSABLE_TREE 0x001 +#define AIM_CHAT_TLV_CLASS_EXCLUSIVE 0x002 +#define AIM_CHAT_TLV_MAX_CONCURRENT_ROOMS 0x003 +#define AIM_CHAT_TLV_MAX_ROOM_NAME_LEN 0x004 +#define AIM_CHAT_TLV_ROOT_ROOMS 0x005 +#define AIM_CHAT_TLV_SEARCH_TAGS 0x006 +#define AIM_CHAT_TLV_CHILD_ROOMS 0x065 +#define AIM_CHAT_TLV_CONTAINS_USER_CLASS 0x066 +#define AIM_CHAT_TLV_CONTAINS_USER_ARRAY 0x067 + +#if 0 +static const aim_tlv aim_chat_tlvs[] _U_ = { + { AIM_CHAT_TLV_BROWSABLE_TREE, "Browsable tree", dissect_aim_tlv_value_bytes }, + { AIM_CHAT_TLV_CLASS_EXCLUSIVE, "Exclusively for class", dissect_aim_tlv_value_userclass }, + { AIM_CHAT_TLV_MAX_CONCURRENT_ROOMS, "Max. number of concurrent rooms", dissect_aim_tlv_value_uint8 }, + { AIM_CHAT_TLV_MAX_ROOM_NAME_LEN, "Max. length of room name", dissect_aim_tlv_value_uint8 }, + { AIM_CHAT_TLV_ROOT_ROOMS, "Root Rooms", dissect_aim_tlv_value_bytes }, + { AIM_CHAT_TLV_SEARCH_TAGS, "Search Tags", dissect_aim_tlv_value_bytes }, + { AIM_CHAT_TLV_CHILD_ROOMS, "Child Rooms", dissect_aim_tlv_value_bytes }, + { AIM_CHAT_TLV_CONTAINS_USER_CLASS, "Contains User Class", dissect_aim_tlv_value_bytes }, + { AIM_CHAT_TLV_CONTAINS_USER_ARRAY, "Contains User Array", dissect_aim_tlv_value_bytes }, + { 0, NULL, NULL } +}; +#endif + + +static int dissect_aim_chat_userinfo_list(tvbuff_t *tvb, packet_info *pinfo, proto_tree *chat_tree) +{ + int offset = 0; + while(tvb_reported_length_remaining(tvb, offset) > 0) { + offset = dissect_aim_userinfo(tvb, pinfo, offset, chat_tree); + } + return offset; +} + +static int dissect_aim_chat_outgoing_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *chat_tree _U_) +{ + guint8 *buddyname; + guchar *msg; + int buddyname_length; + + msg=(guchar *)wmem_alloc(wmem_packet_scope(), 1000); + buddyname_length = aim_get_buddyname( &buddyname, tvb, 30 ); + + /* channel message from client */ + aim_get_message( msg, tvb, 40 + buddyname_length, tvb_reported_length(tvb) + - 40 - buddyname_length ); + + col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", msg); + + return tvb_reported_length(tvb); +} + + +static int dissect_aim_chat_incoming_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *chat_tree) +{ + guint8 *buddyname; + guchar *msg; + /* channel message to client */ + int buddyname_length; + + msg=(guchar *)wmem_alloc(wmem_packet_scope(), 1000); + buddyname_length = aim_get_buddyname( &buddyname, tvb, 30 ); + + aim_get_message( msg, tvb, 36 + buddyname_length, tvb_reported_length(tvb) + - 36 - buddyname_length ); + + col_append_fstr(pinfo->cinfo, COL_INFO, "from: %s", buddyname); + col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", msg); + + proto_tree_add_string(chat_tree, hf_aim_chat_screen_name, tvb, 31, buddyname_length, buddyname); + + return tvb_reported_length(tvb); +} + +static const aim_subtype aim_fnac_family_chat[] = { + { 0x0001, "Error", dissect_aim_snac_error }, + { 0x0002, "Room Info Update", NULL }, + { 0x0003, "User Join", dissect_aim_chat_userinfo_list }, + { 0x0004, "User Leave", dissect_aim_chat_userinfo_list }, + { 0x0005, "Outgoing Message", dissect_aim_chat_outgoing_msg }, + { 0x0006, "Incoming Message", dissect_aim_chat_incoming_msg }, + { 0x0007, "Evil Request", NULL }, + { 0x0008, "Evil Reply", NULL }, + { 0, NULL, NULL } +}; + +/*********************************************************************************************************** + * AIM CHATNAV + ***********************************************************************************************************/ + +static const aim_subtype aim_fnac_family_chatnav[] = { + { 0x0001, "Error", dissect_aim_snac_error }, + { 0x0002, "Request Limits", NULL }, + { 0x0003, "Request Exchange", NULL }, + { 0x0004, "Request Room Information", NULL }, + { 0x0005, "Request Extended Room Information", NULL }, + { 0x0006, "Request Member List", NULL }, + { 0x0007, "Search Room", NULL }, + { 0x0008, "Create", NULL }, + { 0x0009, "Info", NULL }, + { 0, NULL, NULL } +}; + + +/*********************************************************************************************************** + * AIM DIRECTORY + ***********************************************************************************************************/ +static int dissect_aim_directory_user_repl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +{ + int offset = 0; + while (tvb_reported_length_remaining(tvb, offset) > 0) { + offset = dissect_aim_tlv(tvb, pinfo, offset, tree, aim_client_tlvs); + } + return offset; +} + +static const aim_subtype aim_fnac_family_directory[] = { + { 0x0001, "Error", dissect_aim_snac_error }, + { 0x0002, "Client search for user request", NULL }, + { 0x0003, "Server reply for search request (found users)", dissect_aim_directory_user_repl }, + { 0x0004, "Request interests list from server", NULL }, + { 0x0005, "Interests list", NULL }, + { 0, NULL, NULL }, +}; + + +/*********************************************************************************************************** + * AIM EMAIL + ***********************************************************************************************************/ +static const aim_subtype aim_fnac_family_email[] = { + { 0x0006, "Email Status Request", NULL }, + { 0x0007, "Email Status Reply", NULL }, + { 0x0016, "Activate Email", NULL }, + { 0, NULL, NULL } +}; + +/*********************************************************************************************************** + * AIM GENERIC + ***********************************************************************************************************/ +#define STRIP_TAGS 1 + + + +#define FAMILY_GENERIC_MOTD_MOTDTYPE_MDT_UPGRADE 0x0001 +#define FAMILY_GENERIC_MOTD_MOTDTYPE_ADV_UPGRADE 0x0002 +#define FAMILY_GENERIC_MOTD_MOTDTYPE_SYS_BULLETIN 0x0003 +#define FAMILY_GENERIC_MOTD_MOTDTYPE_NORMAL 0x0004 +#define FAMILY_GENERIC_MOTD_MOTDTYPE_NEWS 0x0006 + +static const value_string aim_snac_generic_motd_motdtypes[] = { + { FAMILY_GENERIC_MOTD_MOTDTYPE_MDT_UPGRADE, "Mandatory Upgrade Needed Notice" }, + { FAMILY_GENERIC_MOTD_MOTDTYPE_ADV_UPGRADE, "Advisable Upgrade Notice" }, + { FAMILY_GENERIC_MOTD_MOTDTYPE_SYS_BULLETIN, "AIM/ICQ Service System Announcements" }, + { FAMILY_GENERIC_MOTD_MOTDTYPE_NORMAL, "Standard Notice" }, + { FAMILY_GENERIC_MOTD_MOTDTYPE_NEWS, "News from AOL service" }, + { 0, NULL } +}; + +#define RATEINFO_STATE_LIMITED 0x01 +#define RATEINFO_STATE_ALERT 0x02 +#define RATEINFO_STATE_CLEAR 0x03 + +static const value_string rateinfo_states[] = { + { RATEINFO_STATE_LIMITED, "Limited" }, + { RATEINFO_STATE_ALERT, "Alert" }, + { RATEINFO_STATE_CLEAR, "Clear" }, + { 0, NULL } +}; + +#define RATECHANGE_MSG_LIMIT_PARAMS_CHANGED 0x0001 +#define RATECHANGE_MSG_LIMIT_WARN 0x0002 +#define RATECHANGE_MSG_LIMIT_HIT 0x0003 +#define RATECHANGE_MSG_LIMIT_CLEAR 0x0004 + +static const value_string ratechange_msgs[] = { + { RATECHANGE_MSG_LIMIT_PARAMS_CHANGED, "Rate limits parameters changed" }, + { RATECHANGE_MSG_LIMIT_WARN, "Rate limits warning (current level < alert level)" }, + { RATECHANGE_MSG_LIMIT_HIT, "Rate limit hit (current level < limit level)" }, + { RATECHANGE_MSG_LIMIT_CLEAR, "Rate limit clear (current level now > clear level)" }, + { 0, NULL }, +}; + +#define EXT_STATUS_TYPE_BUDDY_ICON_0 0 +#define EXT_STATUS_TYPE_BUDDY_ICON_1 1 +#define EXT_STATUS_TYPE_AVAIL_MSG 2 +#define EXT_STATUS_TYPE_UNKNOWN 6 + +static const value_string ext_status_types[] = { + { EXT_STATUS_TYPE_BUDDY_ICON_0, "Request to send buddy icon" }, + { EXT_STATUS_TYPE_BUDDY_ICON_1, "Request to send buddy icon" }, + { EXT_STATUS_TYPE_AVAIL_MSG, "Extended Status Update" }, + { 0, NULL }, +}; + +#define EXT_STATUS_FLAG_INITIAL_SEND 0x41 +#define EXT_STATUS_FLAG_RESEND 0x81 + +static const value_string ext_status_flags[] = { + { EXT_STATUS_FLAG_INITIAL_SEND, "First Send Request" }, + { EXT_STATUS_FLAG_RESEND, "Request To Re-Send" }, + { 0, NULL }, +}; + +static int dissect_rate_class(tvbuff_t *tvb, packet_info *pinfo _U_, int offset, proto_tree *class_tree) +{ + proto_tree_add_item(class_tree, hf_generic_rateinfo_classid, tvb, offset, 2, ENC_BIG_ENDIAN);offset+=2; + proto_tree_add_item(class_tree, hf_generic_rateinfo_windowsize, tvb, offset, 4, ENC_BIG_ENDIAN);offset+=4; + proto_tree_add_item(class_tree, hf_generic_rateinfo_clearlevel, tvb, offset, 4, ENC_BIG_ENDIAN);offset+=4; + proto_tree_add_item(class_tree, hf_generic_rateinfo_alertlevel, tvb, offset, 4, ENC_BIG_ENDIAN);offset+=4; + proto_tree_add_item(class_tree, hf_generic_rateinfo_limitlevel, tvb, offset, 4, ENC_BIG_ENDIAN);offset+=4; + proto_tree_add_item(class_tree, hf_generic_rateinfo_disconnectlevel, tvb, offset, 4, ENC_BIG_ENDIAN);offset+=4; + proto_tree_add_item(class_tree, hf_generic_rateinfo_currentlevel, tvb, offset, 4, ENC_BIG_ENDIAN);offset+=4; + proto_tree_add_item(class_tree, hf_generic_rateinfo_maxlevel, tvb, offset, 4, ENC_BIG_ENDIAN);offset+=4; + proto_tree_add_item(class_tree, hf_generic_rateinfo_lasttime, tvb, offset, 4, ENC_BIG_ENDIAN);offset+=4; + proto_tree_add_item(class_tree, hf_generic_rateinfo_curstate, tvb, offset, 1, ENC_BIG_ENDIAN);offset+=1; + return offset; +} + +static int dissect_generic_rateinfo(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +{ + int offset = 0; + guint16 i; + guint16 numclasses = tvb_get_ntohs(tvb, 0); + proto_tree *classes_tree = NULL, *groups_tree, *group_tree; + proto_tree_add_uint(tree, hf_generic_rateinfo_numclasses, tvb, 0, 2, numclasses ); + offset+=2; + + if(tree) { + /* sizeof(rate_class_struct) = 35 ! */ + classes_tree = proto_tree_add_subtree(tree, tvb, offset, 35 * numclasses, + ett_generic_rateinfo_classes, NULL, "Available Rate Classes"); + } + + for(i = 0; i < numclasses; i++) { + guint16 myid = tvb_get_ntohs(tvb, offset); + proto_tree *class_tree = proto_tree_add_subtree_format(classes_tree, tvb, offset, 35, + ett_generic_rateinfo_class, NULL, "Rate Class 0x%02x", myid); + offset = dissect_rate_class(tvb, pinfo, offset, class_tree); + } + + groups_tree = proto_tree_add_subtree(tree, tvb, offset, -1, ett_generic_rateinfo_groups, NULL, "Rate Groups"); + + for(i = 0; i < numclasses; i++) { + guint16 j; + guint16 myid = tvb_get_ntohs(tvb, offset); + guint16 numpairs = tvb_get_ntohs(tvb, offset + 2); + /* + * sizeof(rate_group) = sizeof(class_id) + sizeof(numpairs) + numpairs * 2 * sizeof(uint16_t) + * = 2 + 2 + numpairs * 4 + */ + group_tree = proto_tree_add_subtree_format(groups_tree, tvb, offset, 4 + 4 * numpairs, + ett_generic_rateinfo_group, NULL, "Rate Group 0x%02x", myid); + proto_tree_add_uint(group_tree, hf_generic_rateinfo_classid, tvb, offset, 2, myid);offset+=2; + proto_tree_add_uint(group_tree, hf_generic_rateinfo_numpairs, tvb, offset, 2, numpairs); offset+=2; + for(j = 0; j < numpairs; j++) { + guint16 family_id; + guint16 subtype_id; + const aim_family *family; + const aim_subtype *subtype; + family_id = tvb_get_ntohs(tvb, offset); + subtype_id = tvb_get_ntohs(tvb, offset+2); + + family = aim_get_family(family_id); + subtype = aim_get_subtype(family_id, subtype_id); + + proto_tree_add_uint_format_value(group_tree, hf_generic_family, tvb, offset, 4, family_id, + "%s (0x%04x), Subtype: %s (0x%04x)", family?family->name:"Unknown", family_id, subtype?subtype->name:"Unknown", subtype_id); + offset+=4; + } + } + + return offset; +} + +static int dissect_aim_generic_clientready(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *gen_tree) +{ + int offset = 0; + proto_tree *entry = proto_tree_add_subtree(gen_tree, tvb, 0, -1, ett_generic_clientready, NULL, "Supported services"); + + while(tvb_reported_length_remaining(tvb, offset) > 0) { + proto_item *ti; + proto_tree *subtree; + + ti = proto_tree_add_item(entry, hf_generic_family, tvb, offset, 2, ENC_BIG_ENDIAN); + subtree = proto_item_add_subtree(ti, ett_generic_clientready_item); + offset+=2; + + proto_tree_add_item(subtree, hf_generic_version, tvb, offset, 2, ENC_BIG_ENDIAN); + offset += 2; + proto_tree_add_item(subtree, hf_generic_dll_version, tvb, offset, 3, ENC_BIG_ENDIAN); + /* Padding byte? */ + offset += 4; + proto_item_set_len(ti, 8); + } + return offset; +} + + +static int dissect_aim_generic_serverready(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *gen_tree) +{ + int offset = 0; + proto_tree *entry = proto_tree_add_subtree(gen_tree, tvb, offset, -1, ett_generic_clientready, NULL, "Supported services"); + + while(tvb_reported_length_remaining(tvb, offset) > 0) { + proto_tree_add_item(entry, hf_generic_family, tvb, offset, 2, ENC_BIG_ENDIAN); + offset+=2; + } + return offset; +} + + +static int dissect_aim_generic_service_req(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *gen_tree) +{ + int offset = 0; + const aim_family *family = aim_get_family( tvb_get_ntohs(tvb, offset) ); + + 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) ); + offset+=2; + return offset; +} + +static int dissect_aim_generic_redirect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *gen_tree) +{ + return dissect_aim_tlv_sequence(tvb, pinfo, 0, gen_tree, aim_client_tlvs); +} + +static int dissect_aim_generic_capabilities(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *gen_tree) +{ + int offset = 0; + proto_tree *entry = proto_tree_add_subtree(gen_tree, tvb, offset, -1, ett_generic_clientready, NULL, "Requested services"); + + while(tvb_reported_length_remaining(tvb, offset) > 0) { + proto_tree_add_item(entry, hf_generic_family, tvb, offset, 2, ENC_BIG_ENDIAN); + offset+=2; + proto_tree_add_item(entry, hf_generic_version, tvb, offset, 2, ENC_BIG_ENDIAN); + offset+=2; + } + return offset; +} + +static int dissect_aim_generic_capack(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *gen_tree) +{ + int offset = 0; + proto_tree *entry = proto_tree_add_subtree(gen_tree, tvb, offset, -1, ett_generic_clientready, NULL, "Accepted requested services"); + + while(tvb_reported_length_remaining(tvb, offset) > 0) { + proto_tree_add_item(entry, hf_generic_family, tvb, offset, 2, ENC_BIG_ENDIAN); + offset+=2; + proto_tree_add_item(entry, hf_generic_version, tvb, offset, 2, ENC_BIG_ENDIAN); + offset+=2; + } + return offset; +} + +#define AIM_MOTD_TLV_MOTD 0x000B + +static const aim_tlv aim_motd_tlvs[] = { + { AIM_MOTD_TLV_MOTD, "Message of the day message", dissect_aim_tlv_value_string }, + { 0, NULL, NULL } +}; + +static int dissect_aim_generic_motd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *gen_tree) +{ + int offset = 0; + proto_tree_add_item(gen_tree, hf_generic_motd_motdtype, tvb, offset, + 2, tvb_get_ntohs(tvb, offset)); + offset+=2; + return dissect_aim_tlv_sequence(tvb, pinfo, offset, gen_tree, aim_motd_tlvs); +} + +static int dissect_aim_generic_rateinfoack(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *gen_tree) +{ + int offset = 0; + while(tvb_reported_length_remaining(tvb, offset) > 0) { + proto_tree_add_uint(gen_tree, hf_generic_rateinfoack_group, tvb, offset, 2, tvb_get_ntohs(tvb, offset)); + offset+=2; + } + return offset; +} + +static int dissect_aim_generic_ratechange(tvbuff_t *tvb, packet_info *pinfo, proto_tree *gen_tree) +{ + int offset = 0; + proto_tree_add_uint(gen_tree, hf_generic_ratechange_msg, tvb, offset, 2, tvb_get_ntohs(tvb, offset)); + offset+=2; + offset = dissect_rate_class(tvb, pinfo, offset, gen_tree); + return offset; +} + + +static int dissect_aim_generic_clientpauseack(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *gen_tree) +{ + int offset = 0; + while(tvb_reported_length_remaining(tvb, offset) > 0) { + proto_tree_add_item(gen_tree, hf_generic_family, tvb, offset, 2, ENC_BIG_ENDIAN); + offset += 2; + } + return offset; +} + +static int dissect_aim_generic_migration_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *gen_tree) +{ + int offset = 0; + guint32 n, i; + proto_tree *entry; + + n = tvb_get_ntohs(tvb, offset);offset+=2; + proto_tree_add_uint(gen_tree, hf_generic_migration_numfams, tvb, offset, 2, n); + entry = proto_tree_add_subtree(gen_tree, tvb, offset, 2 * n, + ett_generic_migratefamilies, NULL, "Families to migrate"); + for(i = 0; i < n; i++) { + proto_tree_add_item(entry, hf_generic_family, tvb, offset, 2, ENC_BIG_ENDIAN); + offset += 2; + } + + return dissect_aim_tlv_sequence(tvb, pinfo, offset, gen_tree, aim_client_tlvs); +} + +static int dissect_aim_generic_setprivflags(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *gen_tree) +{ + static const int * flags[] = { + &hf_generic_allow_idle_see, + &hf_generic_allow_member_see, + NULL + }; + + proto_tree_add_bitmask(gen_tree, tvb, 0, hf_generic_priv_flags, ett_generic_priv_flags, flags, ENC_BIG_ENDIAN); + return 4; +} + +static int dissect_aim_generic_selfinfo_repl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *gen_tree) +{ + int offset = dissect_aim_buddyname(tvb, pinfo, 0, gen_tree); + proto_tree_add_item(gen_tree, hf_generic_selfinfo_warninglevel, tvb, offset, 2, ENC_BIG_ENDIAN); + offset += 2; + return dissect_aim_tlv_list(tvb, pinfo, offset, gen_tree, aim_onlinebuddy_tlvs); +} + +static int dissect_aim_generic_evil(tvbuff_t *tvb, packet_info *pinfo, proto_tree *gen_tree) +{ + int offset = 0; + proto_tree_add_item(gen_tree, hf_generic_evil_new_warn_level, tvb, offset, 2, ENC_BIG_ENDIAN); + while(tvb_reported_length_remaining(tvb, offset) > 0) { + offset = dissect_aim_userinfo(tvb, pinfo, offset, gen_tree); + } + return offset; +} + +static int dissect_aim_generic_setidle(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *gen_tree) +{ + proto_tree_add_item(gen_tree, hf_generic_idle_time, tvb, 0, 2, ENC_BIG_ENDIAN); + return 2; +} + +static int dissect_aim_generic_ext_status_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *gen_tree) +{ + return dissect_aim_tlv_sequence(tvb, pinfo, 0, gen_tree, aim_onlinebuddy_tlvs); +} + +static int dissect_aim_generic_clientver_req(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *gen_tree) +{ + int offset = 0; + proto_tree_add_item(gen_tree, hf_generic_client_ver_req_offset, tvb, offset, 4, ENC_BIG_ENDIAN); + offset+=4; + proto_tree_add_item(gen_tree, hf_generic_client_ver_req_length, tvb, offset, 4, ENC_BIG_ENDIAN); + return offset+4; +} + +static int dissect_aim_generic_clientver_repl(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *gen_tree) +{ + proto_tree_add_item(gen_tree, hf_generic_client_ver_req_hash, tvb, 0, 16, ENC_NA); + return 16; +} + +static int dissect_aim_generic_ext_status_repl(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *gen_tree) +{ + guint8 length; + int offset = 0; + proto_tree_add_item(gen_tree, hf_generic_ext_status_type, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; + proto_tree_add_item(gen_tree, hf_generic_ext_status_flags, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; + proto_tree_add_item(gen_tree, hf_generic_ext_status_length, tvb, offset, 1, ENC_BIG_ENDIAN); length = tvb_get_guint8(tvb, offset); offset += 1; + proto_tree_add_item(gen_tree, hf_generic_ext_status_data, tvb, offset, length, ENC_NA); offset += 1; + return offset; +} + +static void +aim_generic_family( gchar *result, guint32 famnum ) +{ + const aim_family *family = aim_get_family(famnum); + + g_snprintf( result, ITEM_LABEL_LENGTH, "%s (0x%x)", family?family->name:"Unknown", famnum); +} + +static const aim_subtype aim_fnac_family_generic[] = { + { 0x0001, "Error", dissect_aim_snac_error }, + { 0x0002, "Client Ready", dissect_aim_generic_clientready }, + { 0x0003, "Server Ready", dissect_aim_generic_serverready }, + { 0x0004, "Service Request", dissect_aim_generic_service_req }, + { 0x0005, "Redirect", dissect_aim_generic_redirect }, + { 0x0006, "Rate Info Request", NULL}, + { 0x0007, "Rate Info", dissect_generic_rateinfo }, + { 0x0008, "Rate Info Ack", dissect_aim_generic_rateinfoack }, + { 0x000a, "Rate Change", dissect_aim_generic_ratechange }, + { 0x000b, "Server Pause", NULL }, + { 0x000c, "Client Pause Ack", dissect_aim_generic_clientpauseack }, + { 0x000d, "Server Resume", NULL }, + { 0x000e, "Self Info Request", NULL }, + { 0x000f, "Self Info Reply", dissect_aim_generic_selfinfo_repl }, + { 0x0010, "Evil", dissect_aim_generic_evil }, + { 0x0011, "Set Idle", dissect_aim_generic_setidle }, + { 0x0012, "Migration Request", dissect_aim_generic_migration_req }, + { 0x0013, "Message Of The Day", dissect_aim_generic_motd }, + { 0x0014, "Set Privilege Flags", dissect_aim_generic_setprivflags }, + { 0x0015, "Well Known URL", NULL }, /* FIXME */ + { 0x0016, "noop", NULL }, + { 0x0017, "Capabilities", dissect_aim_generic_capabilities }, + { 0x0018, "Capabilities Ack", dissect_aim_generic_capack }, + { 0x001e, "Set Extended Status Request", dissect_aim_generic_ext_status_req }, + { 0x001f, "Client Verification Request", dissect_aim_generic_clientver_req }, + { 0x0020, "Client Verification Reply", dissect_aim_generic_clientver_repl }, + { 0x0021, "Set Extended Status Reply", dissect_aim_generic_ext_status_repl }, + { 0, NULL, NULL } +}; + +/*********************************************************************************************************** + * AIM ICQ + ***********************************************************************************************************/ +#define ICQ_CLI_OFFLINE_MESSAGE_REQ 0x003c +#define ICQ_CLI_DELETE_OFFLINE_MSGS 0x003e +#define ICQ_SRV_OFFLINE_MSGS 0x0041 +#define ICQ_SRV_END_OF_OFFLINE_MSGS 0x0042 +#define ICQ_CLI_META_INFO_REQ 0x07d0 +#define ICQ_SRV_META_INFO_REPL 0x07da + +static const value_string aim_icq_data_types[] = { + { ICQ_CLI_OFFLINE_MESSAGE_REQ, "Offline Message Request" }, + { ICQ_SRV_OFFLINE_MSGS, "Offline Messages Reply" }, + { ICQ_SRV_END_OF_OFFLINE_MSGS, "End Of Offline Messages Reply" }, + { ICQ_CLI_DELETE_OFFLINE_MSGS, "Delete Offline Messages Request" }, + { ICQ_CLI_META_INFO_REQ, "Metainfo Request" }, + { ICQ_SRV_META_INFO_REPL, "Metainfo Reply" }, + { 0, NULL } +}; + + +static int dissect_aim_tlv_value_icq(proto_item *ti, guint16 subtype, tvbuff_t *tvb, packet_info *pinfo _U_); + +#define TLV_ICQ_META_DATA 0x0001 + +static const aim_tlv icq_tlv[] = { + { TLV_ICQ_META_DATA, "Encapsulated ICQ Meta Data", dissect_aim_tlv_value_icq }, + { 0, NULL, NULL }, +}; + + +static struct +{ + guint16 subtype; + const char *name; + int (*dissector) (tvbuff_t *, packet_info *, proto_tree *); +} icq_calls [] = { + { 0x0001, "Server Error Reply", NULL }, + { 0x0064, "Set User Home Info Reply", NULL }, + { 0x006e, "Set User Work Info Reply", NULL }, + { 0x0078, "Set User More Info Reply", NULL }, + { 0x0082, "Set User Notes Info Reply", NULL }, + { 0x0087, "Set User Email Info Reply", NULL }, + { 0x008c, "Set User Interests Info Reply", NULL }, + { 0x0096, "Set User Affiliations Info Reply", NULL }, + { 0x00a0, "Set User Permissions Reply", NULL }, + { 0x00aa, "Set User Password Reply", NULL }, + { 0x00b4, "Unregister Account Reply", NULL }, + { 0x00be, "Set User Homepage Category Reply", NULL }, + { 0x00c8, "User Basic Info Reply", NULL }, + { 0x00d2, "User Work Info Reply", NULL }, + { 0x00dc, "User More Info Reply", NULL }, + { 0x00e6, "User Notes Info Reply", NULL }, + { 0x00eb, "User Extended Email Reply", NULL }, + { 0x00f0, "User Interests Info Reply", NULL }, + { 0x00fa, "User Affiliations Info Reply", NULL }, + { 0x0104, "Short User Info Reply", NULL }, + { 0x010e, "User Homepage Category Reply", NULL }, + { 0x01a4, "Search: User found", NULL }, + { 0x0302, "Registration Stats Reply", NULL }, + { 0x0366, "Random Search Server Reply", NULL }, + { 0x03ea, "Set User Home Info Request", NULL }, + { 0x03f3, "Set User Work Info Request", NULL }, + { 0x03fd, "Set User More Info Request", NULL }, + { 0x0406, "Set User Notes Request", NULL }, + { 0x040b, "Set User Extended Email Info Request", NULL }, + { 0x0410, "Set User Interests Info Request", NULL }, + { 0x041a, "Set User Affiliations Info Request", NULL }, + { 0x0424, "Set User Permissions Info Request", NULL }, + { 0x042e, "Change User Password Request", NULL }, + { 0x0442, "Set User Homepage Category Request", NULL }, + { 0x04b2, "Fullinfo Request", NULL }, + { 0x04ba, "Short User Info Request", NULL }, + { 0x04c4, "Unregister User Request", NULL }, + { 0x0515, "Search By Details Request", NULL }, + { 0x0569, "Search By UIN Request", NULL }, + { 0x055f, "Whitepages Search Request", NULL }, + { 0x0573, "Search By Email Request", NULL }, + { 0x074e, "Random Chat User Search Request", NULL }, + { 0x0898, "Server Variable Request (XML)", NULL }, + { 0x0aa5, "Registration Report Request", NULL }, + { 0x0aaf, "Shortcut Bar Stats Report Request", NULL }, + { 0x0c3a, "Save Info Request", NULL }, + { 0x1482, "Send SMS Request", NULL }, + { 0x2008, "Spam Report Request", NULL }, + { 0x08a2, "Server Variable Reply (XML)", NULL }, + { 0x0c3f, "Set Fullinfo Reply", NULL }, + { 0x2012, "User Spam Report Reply", NULL }, + { 0, NULL, NULL }, +}; + + +static int dissect_aim_tlv_value_icq(proto_item *ti, guint16 subtype _U_, tvbuff_t *tvb, packet_info *pinfo) +{ + int offset = 0; + int i; + proto_item *subtype_item; + guint16 req_type, req_subtype; + proto_tree *t = proto_item_add_subtree(ti, ett_aim_icq_tlv); + + proto_tree_add_item(t, hf_icq_tlv_data_chunk_size, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + + proto_tree_add_item(t, hf_icq_tlv_request_owner_uid, tvb, offset, 4, ENC_LITTLE_ENDIAN); + offset += 4; + + proto_tree_add_item(t, hf_icq_tlv_request_type, tvb, offset, 2, ENC_LITTLE_ENDIAN); + req_type = tvb_get_letohs(tvb, offset); + offset += 2; + + proto_tree_add_item(t, hf_icq_tlv_request_seq_num, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + + switch (req_type) { + case ICQ_CLI_OFFLINE_MESSAGE_REQ: return offset; + case ICQ_CLI_DELETE_OFFLINE_MSGS: return offset; + case ICQ_SRV_OFFLINE_MSGS: + /* FIXME */ + break; + case ICQ_SRV_END_OF_OFFLINE_MSGS: + proto_tree_add_item(t, hf_icq_dropped_msg_flag, tvb, offset, 1, ENC_LITTLE_ENDIAN); + return offset+1; + case ICQ_CLI_META_INFO_REQ: + case ICQ_SRV_META_INFO_REPL: + req_subtype = tvb_get_letohs(tvb, offset); + subtype_item = proto_tree_add_item(t, hf_icq_meta_subtype, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; + + for (i = 0; icq_calls[i].name; i++) { + if (icq_calls[i].subtype == req_subtype) break; + } + + col_set_str(pinfo->cinfo, COL_INFO, icq_calls[i].name?icq_calls[i].name:"Unknown ICQ Meta Call"); + + proto_item_append_text(subtype_item, " (%s)", icq_calls[i].name?icq_calls[i].name:"Unknown"); + + if (icq_calls[i].dissector) + return icq_calls[i].dissector(tvb_new_subset_remaining(tvb, offset), pinfo, t); + + default: + break; + } + + return offset; +} + +static int dissect_aim_icq_tlv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +{ + return dissect_aim_tlv(tvb, pinfo, 0, tree, icq_tlv); +} + +static const aim_subtype aim_fnac_family_icq[] = { + { 0x0001, "Error", dissect_aim_snac_error }, + { 0x0002, "ICQ Request", dissect_aim_icq_tlv }, + { 0x0003, "ICQ Response", dissect_aim_icq_tlv }, + { 0x0006, "Auth Request", NULL }, + { 0x0007, "Auth Response", NULL }, + { 0, NULL, NULL } +}; + +/*********************************************************************************************************** + * AIM INVITATION + ***********************************************************************************************************/ +static int dissect_aim_invitation_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *invite_tree) +{ + return dissect_aim_tlv_sequence(tvb, pinfo, 0, invite_tree, aim_onlinebuddy_tlvs); +} + +static const aim_subtype aim_fnac_family_invitation[] = { + { 0x0001, "Error", dissect_aim_snac_error }, + { 0x0002, "Invite a friend to join AIM", dissect_aim_invitation_req }, + { 0x0003, "Invitation Ack", NULL }, + { 0, NULL, NULL } +}; + + +/*********************************************************************************************************** + * AIM LOCATION + ***********************************************************************************************************/ +#define AIM_LOCATION_RIGHTS_TLV_MAX_PROFILE_LENGTH 0x0001 +#define AIM_LOCATION_RIGHTS_TLV_MAX_CAPABILITIES 0x0002 + +static const aim_tlv aim_location_rights_tlvs[] = { + { AIM_LOCATION_RIGHTS_TLV_MAX_PROFILE_LENGTH, "Max Profile Length", dissect_aim_tlv_value_uint16 }, + { AIM_LOCATION_RIGHTS_TLV_MAX_CAPABILITIES, "Max capabilities", dissect_aim_tlv_value_uint16 }, + { 0, NULL, NULL } +}; + +#define AIM_LOCATE_TAG_TLV_SIG_TYPE 0x0001 +#define AIM_LOCATE_TAG_TLV_SIG_DATA 0x0002 +#define AIM_LOCATE_TAG_TLV_UNAVAILABLE_TYPE 0x0003 +#define AIM_LOCATE_TAG_TLV_UNAVAILABLE_DATA 0x0004 +#define AIM_LOCATE_TAG_TLV_CAPABILITIES 0x0005 +#define AIM_LOCATE_TAG_TLV_SIG_TIME 0x000A +#define AIM_LOCATE_TAG_TLV_UNAVAILABLE_TIME 0x000B +#define AIM_LOCATE_TAG_TLV_SUPPORT_HOST_SIG 0x000C +#define AIM_LOCATE_TAG_TLV_HTML_INFO_TYPE 0x000D +#define AIM_LOCATE_TAG_TLV_HTML_INFO_DATA 0x000E + +static const aim_tlv aim_locate_tags_tlvs[] = { + { AIM_LOCATE_TAG_TLV_SIG_TYPE, "Signature MIME Type" , dissect_aim_tlv_value_string }, + { AIM_LOCATE_TAG_TLV_SIG_DATA, "Signature Data" , dissect_aim_tlv_value_string }, + { AIM_LOCATE_TAG_TLV_UNAVAILABLE_TYPE, "Away Message MIME Type" , dissect_aim_tlv_value_string }, + { AIM_LOCATE_TAG_TLV_UNAVAILABLE_DATA, "Away Message Data" , dissect_aim_tlv_value_string }, + { AIM_LOCATE_TAG_TLV_CAPABILITIES, "Client Capabilities" , dissect_aim_tlv_value_client_capabilities }, + { AIM_LOCATE_TAG_TLV_SIG_TIME, "Signature Time" , dissect_aim_tlv_value_time }, + { AIM_LOCATE_TAG_TLV_UNAVAILABLE_TIME, "Away Message Time" , dissect_aim_tlv_value_time }, + { AIM_LOCATE_TAG_TLV_SUPPORT_HOST_SIG, "Enable Server Based Profiles" , dissect_aim_tlv_value_uint8 }, + { AIM_LOCATE_TAG_TLV_HTML_INFO_TYPE, "Host Based Buddy MIME Type" , dissect_aim_tlv_value_string }, + { AIM_LOCATE_TAG_TLV_HTML_INFO_DATA, "Host Bases Buddy Data" , dissect_aim_tlv_value_string }, + { 0, NULL, NULL } +}; + +#define FAMILY_LOCATION_USERINFO_INFOTYPE_GENERALINFO 0x0001 +#define FAMILY_LOCATION_USERINFO_INFOTYPE_AWAYMSG 0x0003 +#define FAMILY_LOCATION_USERINFO_INFOTYPE_CAPS 0x0005 + +static const value_string aim_snac_location_request_user_info_infotypes[] = { + { FAMILY_LOCATION_USERINFO_INFOTYPE_GENERALINFO, "Request General Info" }, + { FAMILY_LOCATION_USERINFO_INFOTYPE_AWAYMSG, "Request Away Message" }, + { FAMILY_LOCATION_USERINFO_INFOTYPE_CAPS, "Request Capabilities" }, + { 0, NULL } +}; + +static int dissect_aim_location_rightsinfo(tvbuff_t *tvb, packet_info *pinfo, proto_tree *loc_tree) +{ + return dissect_aim_tlv_sequence(tvb, pinfo, 0, loc_tree, aim_location_rights_tlvs); +} + +static int dissect_aim_location_setuserinfo(tvbuff_t *tvb, packet_info *pinfo, proto_tree *loc_tree) +{ + return dissect_aim_tlv_sequence(tvb, pinfo, 0, loc_tree, aim_locate_tags_tlvs); +} + +static int dissect_aim_location_watcher_notification(tvbuff_t *tvb, packet_info *pinfo, proto_tree *loc_tree) +{ + int offset = 0; + while (tvb_reported_length_remaining(tvb, offset) > 0) { + offset = dissect_aim_buddyname(tvb, pinfo, offset, loc_tree); + } + return offset; +} + +static int dissect_aim_location_user_info_query(tvbuff_t *tvb, packet_info *pinfo, proto_tree *loc_tree) +{ + return dissect_aim_buddyname(tvb, pinfo, 4, loc_tree); +} + +static int dissect_aim_snac_location_request_user_information(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) +{ + int offset = 0; + guint8 buddyname_length = 0; + + /* Info Type */ + proto_tree_add_item(tree, hf_aim_snac_location_request_user_info_infotype, + tvb, offset, 2, ENC_BIG_ENDIAN); + offset += 2; + + /* Buddy Name length */ + buddyname_length = tvb_get_guint8(tvb, offset); + proto_tree_add_item(tree, hf_aim_location_buddyname_len, tvb, offset, 1, ENC_BIG_ENDIAN); + offset += 1; + + /* Buddy name */ + proto_tree_add_item(tree, hf_aim_location_buddyname, tvb, offset, buddyname_length, ENC_UTF_8|ENC_NA); + offset += buddyname_length; + + return offset; +} + +static int dissect_aim_snac_location_user_information(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +{ + int offset = 0; + guint8 buddyname_length = 0; + + /* Buddy Name length */ + buddyname_length = tvb_get_guint8(tvb, offset); + proto_tree_add_item(tree, hf_aim_location_buddyname_len, tvb, offset, 1, ENC_BIG_ENDIAN); + offset += 1; + + /* Buddy name */ + proto_tree_add_item(tree, hf_aim_location_buddyname, tvb, offset, buddyname_length, ENC_UTF_8|ENC_NA); + offset += buddyname_length; + + /* Warning level */ + proto_tree_add_item(tree, hf_aim_location_userinfo_warninglevel, tvb, offset, 2, ENC_BIG_ENDIAN); + offset += 2; + + offset = dissect_aim_tlv_list(tvb, pinfo, offset, tree, aim_onlinebuddy_tlvs); + + return dissect_aim_tlv_sequence(tvb, pinfo, offset, tree, aim_locate_tags_tlvs); +} + +static const aim_subtype aim_fnac_family_location[] = { + { 0x0001, "Error" , dissect_aim_snac_error }, + { 0x0002, "Request Rights" , NULL }, + { 0x0003, "Rights Info" , dissect_aim_location_rightsinfo }, + { 0x0004, "Set User Info" , dissect_aim_location_setuserinfo }, + { 0x0005, "Request User Info" , dissect_aim_snac_location_request_user_information }, + { 0x0006, "User Info" , dissect_aim_snac_location_user_information }, + { 0x0007, "Watcher Subrequest" , NULL }, + { 0x0008, "Watcher Notification" , dissect_aim_location_watcher_notification }, + { 0x0015, "User Info Query" , dissect_aim_location_user_info_query }, + { 0, NULL, NULL } +}; + + +/*********************************************************************************************************** + * AIM MESSAGING + ***********************************************************************************************************/ + + +#define INCOMING_CH1_MESSAGE_BLOCK 0x0002 +#define INCOMING_CH1_SERVER_ACK_REQ 0x0003 +#define INCOMING_CH1_MESSAGE_AUTH_RESP 0x0004 +#define INCOMING_CH1_MESSAGE_OFFLINE 0x0006 +#define INCOMING_CH1_ICON_PRESENT 0x0008 +#define INCOMING_CH1_BUDDY_REQ 0x0009 +#define INCOMING_CH1_TYPING 0x000b + +static const aim_tlv aim_messaging_incoming_ch1_tlvs[] = { + { INCOMING_CH1_MESSAGE_BLOCK, "Message Block", dissect_aim_tlv_value_messageblock }, + { INCOMING_CH1_SERVER_ACK_REQ, "Server Ack Requested", dissect_aim_tlv_value_bytes }, + { INCOMING_CH1_MESSAGE_AUTH_RESP, "Message is Auto Response", dissect_aim_tlv_value_bytes }, + { INCOMING_CH1_MESSAGE_OFFLINE, "Message was received offline", dissect_aim_tlv_value_bytes }, + { INCOMING_CH1_ICON_PRESENT, "Icon present", dissect_aim_tlv_value_bytes }, + { INCOMING_CH1_BUDDY_REQ, "Buddy Req", dissect_aim_tlv_value_bytes }, + { INCOMING_CH1_TYPING, "Non-direct connect typing notification", dissect_aim_tlv_value_bytes }, + { 0, NULL, NULL }, +}; + +static int dissect_aim_tlv_value_rendezvous(proto_item *ti, guint16 valueid _U_, tvbuff_t *tvb, packet_info *pinfo); + +#define ICBM_CHANNEL_IM 0x0001 +#define ICBM_CHANNEL_RENDEZVOUS 0x0002 + +static const value_string icbm_channel_types[] = { + { ICBM_CHANNEL_IM, "IM" }, + { ICBM_CHANNEL_RENDEZVOUS, "Rendezvous" }, + { 0, NULL }, +}; + +#define INCOMING_CH2_SERVER_ACK_REQ 0x0003 +#define INCOMING_CH2_RENDEZVOUS_DATA 0x0005 + +static const aim_tlv aim_messaging_incoming_ch2_tlvs[] = { + { INCOMING_CH2_SERVER_ACK_REQ, "Server Ack Requested", dissect_aim_tlv_value_bytes }, + { INCOMING_CH2_RENDEZVOUS_DATA, "Rendez Vous Data", dissect_aim_tlv_value_rendezvous }, + { 0, NULL, NULL }, +}; + +#define RENDEZVOUS_TLV_CHANNEL 0x0001 +#define RENDEZVOUS_TLV_IP_ADDR 0x0002 +#define RENDEZVOUS_TLV_INT_IP 0x0003 +#define RENDEZVOUS_TLV_EXT_IP 0x0004 +#define RENDEZVOUS_TLV_EXT_PORT 0x0005 +#define RENDEZVOUS_TLV_DOWNLOAD_URL 0x0006 +#define RENDEZVOUS_TLV_VERIFIED_DOWNLOAD_URL 0x0008 +#define RENDEZVOUS_TLV_SEQ_NUM 0x000A +#define RENDEZVOUS_TLV_CANCEL_REASON 0x000B +#define RENDEZVOUS_TLV_INVITATION 0x000C +#define RENDEZVOUS_TLV_INVITE_MIME_CHARSET 0x000D +#define RENDEZVOUS_TLV_INVITE_MIME_LANG 0x000E +#define RENDEZVOUS_TLV_REQ_HOST_CHECK 0x000F +#define RENDEZVOUS_TLV_REQ_USE_ARS 0x0010 +#define RENDEZVOUS_TLV_REQ_SECURE 0x0011 +#define RENDEZVOUS_TLV_MAX_PROTOCOL_VER 0x0012 +#define RENDEZVOUS_TLV_MIN_PROTOCOL_VER 0x0013 +#define RENDEZVOUS_TLV_COUNTER_REASON 0x0014 +#define RENDEZVOUS_TLV_INVITE_MIME_TYPE 0x0015 +#define RENDEZVOUS_TLV_IP_ADDR_XOR 0x0016 +#define RENDEZVOUS_TLV_PORT_XOR 0x0017 +#define RENDEZVOUS_TLV_ADDR_LIST 0x0018 +#define RENDEZVOUS_TLV_SESSION_ID 0x0019 +#define RENDEZVOUS_TLV_ROLLOVER_ID 0x001A +#define RENDEZVOUS_TLV_EXTENDED_DATA 0x2711 +#define RENDEZVOUS_TLV_ICHAT_INVITEES_DATA 0x277E + +static const aim_tlv aim_rendezvous_tlvs[] = { + { RENDEZVOUS_TLV_CHANNEL, "Rendezvous ICBM Channel", dissect_aim_tlv_value_uint16 }, + { RENDEZVOUS_TLV_IP_ADDR, "Rendezvous IP", dissect_aim_tlv_value_ipv4 }, + { RENDEZVOUS_TLV_INT_IP, "Internal IP", dissect_aim_tlv_value_ipv4 }, + { RENDEZVOUS_TLV_EXT_IP, "External IP", dissect_aim_tlv_value_ipv4 }, + { RENDEZVOUS_TLV_EXT_PORT, "External Port", dissect_aim_tlv_value_uint16 }, + { RENDEZVOUS_TLV_DOWNLOAD_URL, "Service Support Download URL", dissect_aim_tlv_value_string }, + { RENDEZVOUS_TLV_VERIFIED_DOWNLOAD_URL, "Verified Service Support Download URL", dissect_aim_tlv_value_string }, + { RENDEZVOUS_TLV_SEQ_NUM, "Sequence Number", dissect_aim_tlv_value_uint16 }, + { RENDEZVOUS_TLV_CANCEL_REASON, "Cancel Reason", dissect_aim_tlv_value_uint16 }, + { RENDEZVOUS_TLV_INVITATION, "Invitation Text", dissect_aim_tlv_value_string }, + { RENDEZVOUS_TLV_INVITE_MIME_CHARSET, "Data MIME Type", dissect_aim_tlv_value_string }, + { RENDEZVOUS_TLV_INVITE_MIME_LANG, "Data Language", dissect_aim_tlv_value_string }, + { RENDEZVOUS_TLV_REQ_HOST_CHECK, "Request Host Check", NULL }, + { RENDEZVOUS_TLV_REQ_USE_ARS, "Request Data via Rendezvous Server", NULL }, + { RENDEZVOUS_TLV_REQ_SECURE, "Request SSL Connection", NULL }, + { RENDEZVOUS_TLV_MAX_PROTOCOL_VER, "Maximum Protocol Version", dissect_aim_tlv_value_uint16 }, + { RENDEZVOUS_TLV_MIN_PROTOCOL_VER, "Minimum Protocol Version", dissect_aim_tlv_value_uint16 }, + { RENDEZVOUS_TLV_COUNTER_REASON, "Counter Proposal Reason", dissect_aim_tlv_value_uint16 }, + { RENDEZVOUS_TLV_INVITE_MIME_TYPE, "Data MIME Type", dissect_aim_tlv_value_string }, + { RENDEZVOUS_TLV_IP_ADDR_XOR, "XORed Rendezvous IP", dissect_aim_tlv_value_ipv4 }, + { RENDEZVOUS_TLV_PORT_XOR, "XORed Port", dissect_aim_tlv_value_uint16 }, + { RENDEZVOUS_TLV_ADDR_LIST, "Address/Port List", dissect_aim_tlv_value_string08_array }, + { RENDEZVOUS_TLV_SESSION_ID, "Session ID", dissect_aim_tlv_value_string }, + { RENDEZVOUS_TLV_ROLLOVER_ID, "Rollover ID", dissect_aim_tlv_value_string }, +/* + The dissect_aim_tlv_value_extended_data function does not work for iChat generated rendezvous data + { RENDEZVOUS_TLV_EXTENDED_DATA, "Extended Data", dissect_aim_tlv_value_extended_data }, +*/ + { RENDEZVOUS_TLV_EXTENDED_DATA, "Extended Data", NULL }, + { RENDEZVOUS_TLV_ICHAT_INVITEES_DATA, "iChat Invitees Data", NULL }, + { 0, NULL, NULL }, +}; + +#define MINITYPING_FINISHED_SIGN 0x0000 +#define MINITYPING_TEXT_TYPED_SIGN 0x0001 +#define MINITYPING_BEGUN_SIGN 0x0002 + +static const value_string minityping_type[] _U_ = { + {MINITYPING_FINISHED_SIGN, "Typing finished sign" }, + {MINITYPING_TEXT_TYPED_SIGN, "Text typed sign" }, + {MINITYPING_BEGUN_SIGN, "Typing begun sign" }, + {0, NULL } +}; + +#define RENDEZVOUS_MSG_REQUEST 0 +#define RENDEZVOUS_MSG_CANCEL 1 +#define RENDEZVOUS_MSG_ACCEPT 2 + +static const value_string rendezvous_msg_types[] = { + { RENDEZVOUS_MSG_REQUEST, "Request" }, + { RENDEZVOUS_MSG_CANCEL, "Cancel" }, + { RENDEZVOUS_MSG_ACCEPT, "Accept" }, + { 0, NULL }, +}; + +#define CLIENT_ERR__REASON_UNSUPPORTED_CHANNEL 1 +#define CLIENT_ERR__REASON_BUSTED_PAYLOAD 2 +#define CLIENT_ERR__REASON_CHANNEL_SPECIFIC 3 + +static const value_string client_err_reason_types[] = { + { CLIENT_ERR__REASON_UNSUPPORTED_CHANNEL, "Unsupported Channel" }, + { CLIENT_ERR__REASON_BUSTED_PAYLOAD, "Busted Payload" }, + { CLIENT_ERR__REASON_CHANNEL_SPECIFIC, "Channel Specific Error" }, + { 0, NULL }, +}; + +#define RENDEZVOUS_NAK_PROPOSAL_UNSUPPORTED 0 +#define RENDEZVOUS_NAK_PROPOSAL_DENIED 1 +#define RENDEZVOUS_NAK_PROPOSAL_IGNORED 2 +#define RENDEZVOUS_NAK_BUSTED_PARAMETERS 3 +#define RENDEZVOUS_NAK_PROPOSAL_TIMED_OUT 4 +#define RENDEZVOUS_NAK_ONLINE_BUT_NOT_AVAILABLE 5 +#define RENDEZVOUS_NAK_INSUFFICIENT_RESOURCES 6 +#define RENDEZVOUS_NAK_RATE_LIMITED 7 +#define RENDEZVOUS_NAK_NO_DATA 8 +#define RENDEZVOUS_NAK_VERSION_MISMATCH 9 +#define RENDEZVOUS_NAK_SECURITY_MISMATCH 10 +#define RENDEZVOUS_NAK_SERVICE_SPECIFIC_REASON 15 + +static const value_string rendezvous_nak_reason_types[] = { + { RENDEZVOUS_NAK_PROPOSAL_UNSUPPORTED, "Proposal UUID not supported" }, + { RENDEZVOUS_NAK_PROPOSAL_DENIED, "Not authorized, or user declined" }, + { RENDEZVOUS_NAK_PROPOSAL_IGNORED, "Proposal ignored" }, + { RENDEZVOUS_NAK_BUSTED_PARAMETERS, "Proposal malformed" }, + { RENDEZVOUS_NAK_PROPOSAL_TIMED_OUT, "Attempt to act on proposal (e.g. connect) timed out" }, + { RENDEZVOUS_NAK_ONLINE_BUT_NOT_AVAILABLE, "Recipient away or busy" }, + { RENDEZVOUS_NAK_INSUFFICIENT_RESOURCES, "Recipient had internal error" }, + { RENDEZVOUS_NAK_RATE_LIMITED, "Recipient was ratelimited" }, + { RENDEZVOUS_NAK_NO_DATA, "Recipient had nothing to send" }, + { RENDEZVOUS_NAK_VERSION_MISMATCH, "Incompatible versions" }, + { RENDEZVOUS_NAK_SECURITY_MISMATCH, "Incompatible security settings" }, + { RENDEZVOUS_NAK_SERVICE_SPECIFIC_REASON, "Service-specific reject defined by client" }, + { 0, NULL }, +}; + +#define EXTENDED_DATA_MTYPE_PLAIN 0x01 +#define EXTENDED_DATA_MTYPE_CHAT 0x02 +#define EXTENDED_DATA_MTYPE_FILEREQ 0x03 +#define EXTENDED_DATA_MTYPE_URL 0x04 +#define EXTENDED_DATA_MTYPE_AUTHREQ 0x06 +#define EXTENDED_DATA_MTYPE_AUTHDENY 0x07 +#define EXTENDED_DATA_MTYPE_AUTHOK 0x08 +#define EXTENDED_DATA_MTYPE_SERVER 0x09 +#define EXTENDED_DATA_MTYPE_ADDED 0x0C +#define EXTENDED_DATA_MTYPE_WWP 0x0D +#define EXTENDED_DATA_MTYPE_EEXPRESS 0x0E +#define EXTENDED_DATA_MTYPE_CONTACTS 0x13 +#define EXTENDED_DATA_MTYPE_PLUGIN 0x1A +#define EXTENDED_DATA_MTYPE_AUTOAWAY 0xE8 +#define EXTENDED_DATA_MTYPE_AUTOBUSY 0xE9 +#define EXTENDED_DATA_MTYPE_AUTONA 0xEA +#define EXTENDED_DATA_MTYPE_AUTODND 0xEB +#define EXTENDED_DATA_MTYPE_AUTOFFC 0xEC + +static const value_string extended_data_message_types[] = { + {EXTENDED_DATA_MTYPE_PLAIN, "Plain text (simple) message"}, + {EXTENDED_DATA_MTYPE_CHAT, "Chat request message"}, + {EXTENDED_DATA_MTYPE_FILEREQ, "File request / file ok message"}, + {EXTENDED_DATA_MTYPE_URL, "URL message (0xFE formatted)"}, + {EXTENDED_DATA_MTYPE_AUTHREQ, "Authorization request message (0xFE formatted)"}, + {EXTENDED_DATA_MTYPE_AUTHDENY, "Authorization denied message (0xFE formatted)"}, + {EXTENDED_DATA_MTYPE_AUTHOK, "Authorization given message (empty)"}, + {EXTENDED_DATA_MTYPE_SERVER, "Message from OSCAR server (0xFE formatted)"}, + {EXTENDED_DATA_MTYPE_ADDED, "\"You-were-added\" message (0xFE formatted)"}, + {EXTENDED_DATA_MTYPE_WWP, "Web pager message (0xFE formatted)"}, + {EXTENDED_DATA_MTYPE_EEXPRESS, "Email express message (0xFE formatted)"}, + {EXTENDED_DATA_MTYPE_CONTACTS, "Contact list message"}, + {EXTENDED_DATA_MTYPE_PLUGIN, "Plugin message described by text string"}, + {EXTENDED_DATA_MTYPE_AUTOAWAY, "Auto away message"}, + {EXTENDED_DATA_MTYPE_AUTOBUSY, "Auto occupied message"}, + {EXTENDED_DATA_MTYPE_AUTONA, "Auto not available message"}, + {EXTENDED_DATA_MTYPE_AUTODND, "Auto do not disturb message"}, + {EXTENDED_DATA_MTYPE_AUTOFFC, "Auto free for chat message"}, + { 0, NULL }, +}; + +#define EXTENDED_DATA_MFLAG_NORMAL 0x01 +#define EXTENDED_DATA_MFLAG_AUTO 0x03 +#define EXTENDED_DATA_MFLAG_MULTI 0x80 + +#define EVIL_ORIGIN_ANONYMOUS 1 +#define EVIL_ORIGIN_NONANONYMOUS 2 + +static const value_string evil_origins[] = { + {EVIL_ORIGIN_ANONYMOUS, "Anonymous"}, + {EVIL_ORIGIN_NONANONYMOUS, "Non-Anonymous"}, + {0, NULL }, +}; + +/* Initialize the protocol and registered fields */ + +static int +dissect_aim_tlv_value_rendezvous(proto_item *ti, guint16 valueid _U_, tvbuff_t *tvb, packet_info *pinfo) +{ + int offset = 0; + proto_tree *entry = proto_item_add_subtree(ti, ett_aim_rendezvous_data); + proto_tree_add_item(entry, hf_aim_rendezvous_msg_type, tvb, offset, 2, ENC_BIG_ENDIAN); + offset += 2; + + proto_tree_add_item(entry, hf_aim_icbm_cookie, tvb, offset, 8, ENC_NA); + offset += 8; + + offset = dissect_aim_capability(entry, tvb, offset); + + return dissect_aim_tlv_sequence(tvb, pinfo, offset, entry, + aim_rendezvous_tlvs); +} + +static int +dissect_aim_msg_outgoing(tvbuff_t *tvb, packet_info *pinfo, proto_tree *msg_tree) +{ + int offset = 0; + const aim_tlv *aim_ch_tlvs = NULL; + guint16 channel_id; + guint8 *buddyname; + int buddyname_length; + + /* ICBM Cookie */ + proto_tree_add_item(msg_tree, hf_aim_icbm_cookie, tvb, offset, 8, ENC_NA); + offset += 8; + + /* Message Channel ID */ + channel_id = tvb_get_ntohs(tvb, offset); + proto_tree_add_item(msg_tree, hf_aim_message_channel_id, tvb, offset, 2, + ENC_BIG_ENDIAN); + offset += 2; + + /* Add the outgoing username to the info column */ + buddyname_length = aim_get_buddyname(&buddyname, tvb, offset); + col_append_fstr(pinfo->cinfo, COL_INFO, " to: %s", + format_text(buddyname, buddyname_length)); + + offset = dissect_aim_buddyname(tvb, pinfo, offset, msg_tree); + + switch(channel_id) { + case ICBM_CHANNEL_IM: aim_ch_tlvs = aim_messaging_incoming_ch1_tlvs; break; + case ICBM_CHANNEL_RENDEZVOUS: aim_ch_tlvs = aim_messaging_incoming_ch2_tlvs; break; + default: return offset; + } + + return dissect_aim_tlv_sequence(tvb, pinfo, offset, msg_tree, aim_ch_tlvs); +} + + +static int +dissect_aim_msg_incoming(tvbuff_t *tvb, packet_info *pinfo, proto_tree *msg_tree) +{ + int offset = 0; + const aim_tlv *aim_ch_tlvs; + guint16 channel_id; + + /* ICBM Cookie */ + proto_tree_add_item(msg_tree, hf_aim_icbm_cookie, tvb, offset, 8, ENC_NA); + offset += 8; + + /* Message Channel ID */ + proto_tree_add_item(msg_tree, hf_aim_message_channel_id, tvb, offset, 2, + ENC_BIG_ENDIAN); + channel_id = tvb_get_ntohs(tvb, offset); + offset += 2; + + offset = dissect_aim_userinfo(tvb, pinfo, offset, msg_tree); + + switch(channel_id) { + case ICBM_CHANNEL_IM: aim_ch_tlvs = aim_messaging_incoming_ch1_tlvs; break; + case ICBM_CHANNEL_RENDEZVOUS: aim_ch_tlvs = aim_messaging_incoming_ch2_tlvs; break; + default: return offset; + } + + return dissect_aim_tlv_sequence(tvb, pinfo, offset, msg_tree, aim_ch_tlvs); +} + +static int +dissect_aim_msg_params(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *msg_tree) +{ + int offset = 0; + proto_tree_add_item(msg_tree, hf_aim_icbm_channel, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2; + proto_tree_add_item(msg_tree, hf_aim_icbm_msg_flags, tvb, offset, 4, ENC_BIG_ENDIAN); offset+=4; + proto_tree_add_item(msg_tree, hf_aim_icbm_max_snac_size, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2; + proto_tree_add_item(msg_tree, hf_aim_icbm_max_sender_warnlevel, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2; + proto_tree_add_item(msg_tree, hf_aim_icbm_max_receiver_warnlevel, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2; + proto_tree_add_item(msg_tree, hf_aim_icbm_min_msg_interval, tvb, offset, 4, ENC_BIG_ENDIAN); offset+=4; + return offset; +} + +static int +dissect_aim_msg_evil_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *msg_tree) +{ + int offset = 0; + proto_tree_add_item(msg_tree, hf_aim_icbm_evil, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2; + return dissect_aim_buddyname(tvb, pinfo, offset, msg_tree); +} + + +static int +dissect_aim_msg_evil_repl(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *msg_tree) +{ + int offset = 0; + proto_tree_add_item(msg_tree, hf_aim_evil_warn_level, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2; + proto_tree_add_item(msg_tree, hf_aim_evil_new_warn_level, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2; + return offset; +} + +static int +dissect_aim_msg_minityping(tvbuff_t *tvb, packet_info *pinfo, proto_tree *msg_tree) +{ + int offset = 0; + proto_tree_add_item(msg_tree,hf_aim_icbm_notification_cookie, tvb, offset, 8, ENC_NA); offset+=8; + proto_tree_add_item(msg_tree,hf_aim_icbm_notification_channel, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2; + offset = dissect_aim_buddyname(tvb, pinfo, offset, msg_tree); + proto_tree_add_item(msg_tree,hf_aim_icbm_notification_type, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2; + return offset; +} + +typedef struct _aim_client_plugin +{ + const char *name; + e_guid_t uuid; +} aim_client_plugin; + +static const aim_client_plugin known_client_plugins[] = { + { "None", + {0x0, 0x0, 0x0, + {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}}, + + { "Status Manager", + {0xD140CF10, 0xE94F, 0x11D3, + {0xBC, 0xD2, 0x00, 0x04, 0xAC, 0x96, 0xDD, 0x96}}}, + + { NULL, {0x0, 0x0, 0x0, { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 } } } +}; + +static const +aim_client_plugin *aim_find_plugin ( e_guid_t uuid) +{ + int i; + + for(i = 0; known_client_plugins[i].name; i++) + { + const aim_client_plugin *plugin = &(known_client_plugins[i]); + + if(memcmp(&(plugin->uuid), &uuid, sizeof(e_guid_t)) == 0) + return plugin; + } + + return NULL; +} + +static int +dissect_aim_plugin(proto_tree *entry, tvbuff_t *tvb, int offset, e_guid_t* out_plugin_uuid) +{ + const aim_client_plugin *plugin = NULL; + e_guid_t uuid; + proto_item* ti; + + uuid.data1 = tvb_get_ntohl(tvb, offset); + uuid.data2 = tvb_get_ntohs(tvb, offset+4); + uuid.data3 = tvb_get_ntohs(tvb, offset+6); + tvb_memcpy(tvb, uuid.data4, offset+8, 8); + if (out_plugin_uuid) + *out_plugin_uuid = uuid; + + plugin = aim_find_plugin(uuid); + + ti = proto_tree_add_item(entry, hf_aim_messaging_plugin, tvb, offset, 16, ENC_NA); + proto_item_append_text(ti, " (%s)", plugin ? plugin->name:"Unknown"); + + return offset+16; +} + +static int +dissect_aim_rendezvous_extended_message(tvbuff_t *tvb, proto_tree *msg_tree) +{ + int offset = 0; + guint32 text_length; + static const int * flags[] = { + &hf_aim_rendezvous_extended_data_message_flags_normal, + &hf_aim_rendezvous_extended_data_message_flags_auto, + &hf_aim_rendezvous_extended_data_message_flags_multi, + NULL + }; + + proto_tree_add_item(msg_tree, hf_aim_rendezvous_extended_data_message_type, tvb, offset, 1, ENC_BIG_ENDIAN); offset+=1; + proto_tree_add_bitmask(msg_tree, tvb, offset, hf_aim_rendezvous_extended_data_message_flags, + ett_aim_extended_data_message_flags, flags, ENC_NA); + offset+=1; + proto_tree_add_item(msg_tree, hf_aim_rendezvous_extended_data_message_status_code, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2; + proto_tree_add_item(msg_tree, hf_aim_rendezvous_extended_data_message_priority_code, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2; + text_length = tvb_get_letohs(tvb, offset); + 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; + proto_tree_add_item(msg_tree, hf_aim_rendezvous_extended_data_message_text, tvb, offset, text_length, ENC_ASCII|ENC_NA); /* offset+=text_length; */ + + offset = tvb_reported_length(tvb); + + return offset; +} + +static int +is_uuid_null(e_guid_t uuid) +{ + return (uuid.data1 == 0) && + (uuid.data2 == 0) && + (uuid.data3 == 0) && + (uuid.data4[0] == 0) && + (uuid.data4[1] == 0) && + (uuid.data4[2] == 0) && + (uuid.data4[3] == 0) && + (uuid.data4[4] == 0) && + (uuid.data4[5] == 0) && + (uuid.data4[6] == 0) && + (uuid.data4[7] == 0); +} + +static int +dissect_aim_tlv_value_extended_data(proto_tree *entry, guint16 valueid _U_, tvbuff_t *tvb, packet_info *pinfo _U_) +{ + int offset = 0; + guint16 length/*, protocol_version*/; + int start_offset; + e_guid_t plugin_uuid; + + length = tvb_get_letohs(tvb, offset); + proto_tree_add_item(entry, hf_aim_icbm_client_err_length, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; + start_offset = offset; + + proto_tree_add_item(entry, hf_aim_icbm_client_err_protocol_version, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2; + + offset = dissect_aim_plugin(entry, tvb, offset, &plugin_uuid); + proto_tree_add_item(entry, hf_aim_messaging_unknown, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset += 2; + proto_tree_add_item(entry, hf_aim_icbm_client_err_client_caps_flags, tvb, offset, 4, ENC_BIG_ENDIAN); offset+=4; + proto_tree_add_item(entry, hf_aim_messaging_unknown, tvb, offset, 1, ENC_NA); offset += 1; + proto_tree_add_item(entry, hf_aim_icbm_client_err_downcounter, tvb, offset, 2, ENC_LITTLE_ENDIAN); /* offset += 2;*/ + + offset = start_offset + length; + + length = tvb_get_letohs(tvb, offset); + proto_tree_add_item(entry, hf_aim_icbm_client_err_length, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; + start_offset = offset; + proto_tree_add_item(entry, hf_aim_icbm_client_err_downcounter, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset += 2; + proto_tree_add_item(entry, hf_aim_messaging_unknown_data, tvb, offset, length-2, ENC_NA); + offset = start_offset + length; + + if (is_uuid_null(plugin_uuid)) + { + /* a message follows */ + tvbuff_t *subtvb = tvb_new_subset_remaining(tvb, offset); + /* offset += */ dissect_aim_rendezvous_extended_message(subtvb, entry); + } + else + { + /* plugin-specific data follows */ + proto_tree_add_item(entry, hf_aim_messaging_plugin_specific_data, tvb, offset, -1, ENC_NA); + } + offset = tvb_reported_length(tvb); + + return offset; +} + +static int +dissect_aim_msg_ack(tvbuff_t *tvb, packet_info *pinfo, proto_tree *msg_tree) +{ + int offset = 0; + + proto_tree_add_item(msg_tree,hf_aim_icbm_cookie, tvb, offset, 8, ENC_NA); offset+=8; + + proto_tree_add_item(msg_tree, hf_aim_message_channel_id, tvb, offset, 2, + ENC_BIG_ENDIAN); offset += 2; + + offset = dissect_aim_buddyname(tvb, pinfo, offset, msg_tree); + + return offset; +} + +static int +dissect_aim_msg_client_err(tvbuff_t *tvb, packet_info *pinfo, proto_tree *msg_tree) +{ + int offset = 0; + guint16 channel, reason; + + proto_tree_add_item(msg_tree,hf_aim_icbm_cookie, tvb, offset, 8, ENC_NA); offset+=8; + channel = tvb_get_ntohs(tvb, offset); + proto_tree_add_item(msg_tree,hf_aim_icbm_channel, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2; + offset = dissect_aim_buddyname(tvb, pinfo, offset, msg_tree); + reason = tvb_get_ntohs(tvb, offset); + proto_tree_add_item(msg_tree, hf_aim_icbm_client_err_reason, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2; + + if (reason == CLIENT_ERR__REASON_CHANNEL_SPECIFIC && tvb_reported_length_remaining(tvb, offset) > 0) + { + switch (channel) + { + case ICBM_CHANNEL_RENDEZVOUS: + proto_tree_add_item(msg_tree, hf_aim_icbm_rendezvous_nak_length, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2; + proto_tree_add_item(msg_tree, hf_aim_icbm_rendezvous_nak, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2; + break; + + default: + { + tvbuff_t *subtvb = tvb_new_subset_remaining(tvb, offset); + proto_tree *extended_tree = proto_tree_add_subtree(msg_tree, tvb, offset, -1, ett_aim_extended_data, NULL, "Extended Data"); + dissect_aim_tlv_value_extended_data(extended_tree, 0, subtvb, pinfo); + break; + } + } + } + + return offset; +} + +static const aim_subtype aim_fnac_family_messaging[] = { + { 0x0001, "Error", dissect_aim_snac_error }, + { 0x0002, "Set ICBM Parameter", dissect_aim_msg_params }, + { 0x0003, "Reset ICBM Parameter", NULL }, + { 0x0004, "Request Parameter Info", NULL}, + { 0x0005, "Parameter Info", dissect_aim_msg_params }, + { 0x0006, "Outgoing", dissect_aim_msg_outgoing }, + { 0x0007, "Incoming", dissect_aim_msg_incoming }, + { 0x0008, "Evil Request", dissect_aim_msg_evil_req }, + { 0x0009, "Evil Response", dissect_aim_msg_evil_repl }, + { 0x000a, "Missed Call", NULL }, + { 0x000b, "Client Error", dissect_aim_msg_client_err }, + { 0x000c, "Acknowledge", dissect_aim_msg_ack }, + { 0x0014, "Mini Typing Notifications (MTN)", dissect_aim_msg_minityping }, + { 0, NULL, NULL } +}; + + + +/*********************************************************************************************************** + * AIM POPUP + ***********************************************************************************************************/ + + +#define AIM_POPUP_TLV_MESSAGE_TEXT 0x001 +#define AIM_POPUP_TLV_URL_STRING 0x002 +#define AIM_POPUP_TLV_WINDOW_WIDTH 0x003 +#define AIM_POPUP_TLV_WINDOW_HEIGHT 0x004 +#define AIM_POPUP_TLV_AUTOHIDE_DELAY 0x005 + +static const aim_tlv aim_popup_tlvs[] = { + { AIM_POPUP_TLV_MESSAGE_TEXT, "Message text (html)", dissect_aim_tlv_value_string }, + { AIM_POPUP_TLV_URL_STRING, "URL string", dissect_aim_tlv_value_string }, + { AIM_POPUP_TLV_WINDOW_WIDTH, "Window Width (pixels)", dissect_aim_tlv_value_uint16 }, + { AIM_POPUP_TLV_WINDOW_HEIGHT, "Window Height (pixels)", dissect_aim_tlv_value_uint16 }, + { AIM_POPUP_TLV_AUTOHIDE_DELAY, "Autohide delay (seconds)", dissect_aim_tlv_value_uint16 }, + { 0, NULL, NULL } +}; + +static int dissect_aim_popup(tvbuff_t *tvb, packet_info *pinfo, proto_tree *popup_tree) +{ + return dissect_aim_tlv(tvb, pinfo, 0, popup_tree, aim_popup_tlvs); +} + +static const aim_subtype aim_fnac_family_popup[] = { + { 0x0001, "Error", dissect_aim_snac_error }, + { 0x0002, "Display Popup Message Server Command" , dissect_aim_popup }, + { 0, NULL, NULL } +}; + +/*********************************************************************************************************** + * AIM SIGNON + ***********************************************************************************************************/ + +static int dissect_aim_snac_signon_logon(tvbuff_t *tvb, packet_info *pinfo, + proto_tree *tree) +{ + int offset = 0; + while (tvb_reported_length_remaining(tvb, offset) > 0) { + offset = dissect_aim_tlv(tvb, pinfo, offset, tree, aim_client_tlvs); + } + return offset; +} + +static int dissect_aim_snac_signon_logon_reply(tvbuff_t *tvb, + packet_info *pinfo, + proto_tree *tree) +{ + int offset = 0; + while (tvb_reported_length_remaining(tvb, offset) > 0) { + offset = dissect_aim_tlv(tvb, pinfo, offset, tree, aim_client_tlvs); + } + return offset; +} + +static int dissect_aim_snac_signon_signon(tvbuff_t *tvb, packet_info *pinfo, + proto_tree *tree) +{ + guint8 buddyname_length = 0; + int offset = 0; + guint8 *buddyname; + + /* Info Type */ + proto_tree_add_item(tree, hf_aim_infotype, tvb, offset, 2, ENC_BIG_ENDIAN); + offset += 2; + + /* Unknown */ + offset += 1; + + /* Buddy Name */ + buddyname_length = aim_get_buddyname( &buddyname, tvb, offset ); + + col_append_fstr(pinfo->cinfo, COL_INFO, " Username: %s", + format_text(buddyname, buddyname_length)); + + if(tree) { + offset+=dissect_aim_buddyname(tvb, pinfo, offset, tree); + } + + return offset; +} + +static int dissect_aim_snac_signon_signon_reply(tvbuff_t *tvb, + packet_info *pinfo _U_, + proto_tree *tree) +{ + int offset = 0; + guint16 challenge_length = 0; + + /* Logon Challenge Length */ + challenge_length = tvb_get_ntohs(tvb, offset); + proto_tree_add_item(tree, hf_aim_signon_challenge_len, tvb, offset, 2, ENC_BIG_ENDIAN); + offset += 2; + + /* Challenge */ + proto_tree_add_item(tree, hf_aim_signon_challenge, tvb, offset, challenge_length, ENC_UTF_8|ENC_NA); + offset += challenge_length; + return offset; +} + +static int dissect_aim_tlv_value_registration(proto_item *ti _U_, guint16 value_id _U_, tvbuff_t *tvb _U_, packet_info *pinfo _U_) +{ + /* FIXME */ + return 0; +} + +#define REG_TLV_REGISTRATION_INFO 0x0001 + +static const aim_tlv aim_registration_tlvs[] = { + { REG_TLV_REGISTRATION_INFO, "Registration Info", dissect_aim_tlv_value_registration }, + { 0, NULL, NULL }, +}; + +static int dissect_aim_snac_register (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +{ + return dissect_aim_tlv(tvb, pinfo, 0, tree, aim_registration_tlvs); +} + +static const aim_subtype aim_fnac_family_signon[] = { + { 0x0001, "Error", dissect_aim_snac_error }, + { 0x0002, "Logon", dissect_aim_snac_signon_logon }, + { 0x0003, "Logon Reply", dissect_aim_snac_signon_logon_reply }, + { 0x0004, "Request UIN", dissect_aim_snac_register }, + { 0x0005, "New UIN response", dissect_aim_snac_register }, + { 0x0006, "Sign-on", dissect_aim_snac_signon_signon }, + { 0x0007, "Sign-on Reply", dissect_aim_snac_signon_signon_reply }, + { 0x000a, "Server SecureID Request", NULL }, + { 0x000b, "Client SecureID Reply", NULL }, + { 0, NULL, NULL } +}; + +/*********************************************************************************************************** + * AIM SSI + ***********************************************************************************************************/ +#define SSI_RIGHTSINFO_TLV_MAX_ITEMS 0x0004 + +static const aim_tlv aim_ssi_rightsinfo_tlvs[] = { + { SSI_RIGHTSINFO_TLV_MAX_ITEMS, "Maximums For Items", dissect_aim_tlv_value_bytes }, + { 0, NULL, NULL }, +}; + +/* Initialize the protocol and registered fields */ + +/** Calculate size of SSI entry + * Size of SSI entry can be calculated as: + * sizeof(buddy name length field) = sizeof(guint16) = 2 + * + sizeof(buddy name string) = buddy name length field = N + * + sizeof(group ID) = sizeof(guint16) = 2 + * + sizeof(buddy ID) = sizeof(guint16) = 2 + * + sizeof(buddy type) = sizeof(guint16) = 2 + * + sizeof(TLV length) = sizeof(guint16) = 2 + * + sizeof(TLVs) = TLV length = M + * = 2 + N + 2 * 4 + M + */ +static int calc_ssi_entry_size(tvbuff_t *tvb, int offset) +{ + gint ssi_entry_size = 2 + tvb_get_ntohs(tvb, offset) + 2 * 3; + ssi_entry_size += tvb_get_ntohs(tvb, offset + ssi_entry_size) + 2; + return ssi_entry_size; +} + +static int dissect_ssi_item(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *ssi_entry) +{ + guint16 buddyname_length = 0; + int endoffset; + guint16 tlv_len = 0; + + /* Buddy Name Length */ + buddyname_length = tvb_get_ntohs(tvb, offset); + proto_tree_add_item(ssi_entry, hf_aim_fnac_subtype_ssi_buddyname_len, tvb, offset, 2, ENC_BIG_ENDIAN); + offset += 2; + + /* Buddy Name */ + if (buddyname_length > 0) { + proto_tree_add_item(ssi_entry, hf_aim_fnac_subtype_ssi_buddyname, tvb, offset, buddyname_length, ENC_UTF_8|ENC_NA); + offset += buddyname_length; + } + + /* Buddy group ID */ + proto_tree_add_item(ssi_entry, hf_aim_fnac_subtype_ssi_gid, tvb, offset, 2, ENC_BIG_ENDIAN); + offset += 2; + + /* Buddy ID */ + proto_tree_add_item(ssi_entry, hf_aim_fnac_subtype_ssi_bid, tvb, offset, 2, ENC_BIG_ENDIAN); + offset += 2; + + /* Buddy Type */ + proto_tree_add_item(ssi_entry, hf_aim_fnac_subtype_ssi_type, tvb, offset, 2, ENC_BIG_ENDIAN); + offset += 2; + + /* Size of the following TLV in bytes (as opposed to the number of + TLV objects in the chain) */ + tlv_len = tvb_get_ntohs(tvb, offset); + proto_tree_add_item(ssi_entry, hf_aim_fnac_subtype_ssi_tlvlen, tvb, offset, 2, ENC_BIG_ENDIAN); + offset += 2; + + endoffset = offset; + /* For now, we just dump the TLV contents as-is, since there is not a + TLV dissection utility that works based on total chain length */ + while(endoffset < offset+tlv_len) { + endoffset = dissect_aim_tlv(tvb, pinfo, endoffset, ssi_entry, aim_client_tlvs); + } + return endoffset; +} + +static int dissect_ssi_ssi_item(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ssi_entry) +{ + return dissect_ssi_item(tvb, pinfo, 0, ssi_entry); +} + +static int dissect_ssi_ssi_items(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +{ + int offset = 0; + gint ssi_entry_size; + proto_tree *ssi_entry = NULL; + int size = tvb_reported_length(tvb); + while (size > offset) + { + ssi_entry_size = calc_ssi_entry_size(tvb, offset); + ssi_entry = proto_tree_add_subtree(tree, tvb, offset, ssi_entry_size, ett_aim_ssi, NULL, "SSI Entry"); + offset = dissect_ssi_item(tvb, pinfo, offset, ssi_entry); + } + return offset; +} + +static int dissect_aim_ssi_rightsinfo(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ssi_tree) +{ + return dissect_aim_tlv_sequence(tvb, pinfo, 0, ssi_tree, aim_ssi_rightsinfo_tlvs); +} + +static int dissect_aim_ssi_was_added(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ssi_tree) +{ + return dissect_aim_buddyname(tvb, pinfo, 0, ssi_tree); +} + +static int dissect_aim_snac_ssi_time_and_items_num(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) +{ + int offset = 0; + + /* get timestamp */ + nstime_t tmptime; + tmptime.secs = tvb_get_ntohl(tvb, offset); + tmptime.nsecs = 0; + proto_tree_add_time(tree, hf_aim_fnac_subtype_ssi_last_change_time, tvb, offset, 4, &tmptime); + offset += 4; + + /* get number of SSI items */ + proto_tree_add_item(tree, hf_aim_fnac_subtype_ssi_numitems, tvb, offset, 2, ENC_BIG_ENDIAN); + offset += 2; + + return offset; +} + +static int dissect_aim_snac_ssi_list(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +{ + int offset = 0; + proto_tree *ssi_entry = NULL; + guint16 num_items, i; + nstime_t tmptime; + gint ssi_entry_size; + + /* SSI Version */ + proto_tree_add_item(tree, hf_aim_fnac_subtype_ssi_version, tvb, offset, 1, ENC_BIG_ENDIAN); + offset += 1; + + /* Number of items */ + proto_tree_add_item(tree, hf_aim_fnac_subtype_ssi_numitems, tvb, offset, 2, ENC_BIG_ENDIAN); + num_items = tvb_get_ntohs(tvb, offset); + offset += 2; + + for(i = 0; i < num_items; i++) { + ssi_entry_size = calc_ssi_entry_size(tvb, offset); + ssi_entry = proto_tree_add_subtree_format(tree, tvb, offset, ssi_entry_size, + ett_aim_ssi, NULL, "SSI Entry %u", i); + offset = dissect_ssi_item(tvb, pinfo, offset, ssi_entry); + } + tmptime.secs = tvb_get_ntohl(tvb, offset); + tmptime.nsecs = 0; + proto_tree_add_time(tree, hf_aim_fnac_subtype_ssi_last_change_time, tvb, offset, 4, &tmptime); + + return offset; +} + +static int dissect_aim_snac_ssi_auth_request(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) +{ + int offset = 0; + guint16 reason_length; + /*guint16 unknown;*/ + + /* get buddy length (1 byte) */ + guint8 buddyname_length = tvb_get_guint8(tvb, offset); + proto_tree_add_item(tree, hf_aim_fnac_subtype_ssi_buddyname_len8, tvb, offset, 1, ENC_BIG_ENDIAN); + offset += 1; + + /* show buddy name */ + if (buddyname_length > 0) { + proto_tree_add_item(tree, hf_aim_fnac_subtype_ssi_buddyname, tvb, offset, buddyname_length, ENC_UTF_8|ENC_NA); + offset += buddyname_length; + } + /* get reason message length (2 bytes) */ + reason_length = tvb_get_ntohs(tvb, offset); + proto_tree_add_item(tree, hf_aim_fnac_subtype_ssi_reason_str_len, tvb, offset, 2, ENC_BIG_ENDIAN); + offset += 2; + + /* show reason message if present */ + if (reason_length > 0) { + proto_tree_add_item(tree, hf_aim_fnac_subtype_ssi_reason_str, tvb, offset, reason_length, ENC_UTF_8|ENC_NA); + offset += reason_length; + } + + /* unknown (always 0x0000 ???) */ + /*unknown = tvb_get_ntohs(tvb, offset);*/ + proto_tree_add_item(tree, hf_aim_fnac_subtype_ssi_grant_auth_unkn, tvb, offset, 2, ENC_BIG_ENDIAN); + offset += 2; + + return offset; +} + +static int dissect_aim_snac_ssi_auth_reply(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) +{ + int offset = 0; + guint16 reason_length; + + /* get buddy length (1 byte) */ + guint8 buddyname_length = tvb_get_guint8(tvb, offset); + proto_tree_add_item(tree, hf_aim_fnac_subtype_ssi_buddyname_len8, tvb, offset, 1, ENC_BIG_ENDIAN); + offset += 1; + + /* show buddy name */ + if (buddyname_length > 0) { + proto_tree_add_item(tree, hf_aim_fnac_subtype_ssi_buddyname, tvb, offset, buddyname_length, ENC_UTF_8|ENC_NA); + offset += buddyname_length; + } + + /* accept/reject authorization flag */ + proto_tree_add_item(tree, hf_aim_fnac_subtype_ssi_allow_auth, tvb, offset, 1, ENC_BIG_ENDIAN); + offset += 1; + + /* get reason message length (2 bytes) */ + reason_length = tvb_get_ntohs(tvb, offset); + proto_tree_add_item(tree, hf_aim_fnac_subtype_ssi_reason_str_len, tvb, offset, 2, ENC_BIG_ENDIAN); + offset += 2; + + /* show reason message if present */ + if (reason_length > 0) { + proto_tree_add_item(tree, hf_aim_fnac_subtype_ssi_reason_str, tvb, offset, reason_length, ENC_UTF_8|ENC_NA); + offset += reason_length; + } + + return offset; +} + +static const aim_subtype aim_fnac_family_ssi[] = { + { 0x0001, "Error", dissect_aim_snac_error }, + { 0x0002, "Request Rights", NULL }, + { 0x0003, "Rights Info", dissect_aim_ssi_rightsinfo }, + { 0x0004, "Request List (first time)", NULL }, + { 0x0005, "Request List", dissect_aim_snac_ssi_time_and_items_num }, + { 0x0006, "List", dissect_aim_snac_ssi_list }, + { 0x0007, "Activate", NULL }, + { 0x0008, "Add Buddy", dissect_ssi_ssi_item }, + { 0x0009, "Modify Buddy", dissect_ssi_ssi_items }, + { 0x000a, "Delete Buddy", dissect_ssi_ssi_item }, + { 0x000e, "Server Ack", dissect_aim_ssi_result }, + { 0x000f, "No List", dissect_aim_snac_ssi_time_and_items_num }, + { 0x0011, "Edit Start", NULL }, + { 0x0012, "Edit Stop", NULL }, + { 0x0014, "Grant Future Authorization to Buddy", dissect_aim_snac_ssi_auth_request }, + { 0x0015, "Future Authorization Granted", dissect_aim_snac_ssi_auth_request }, + { 0x0018, "Send Authentication Request", dissect_aim_snac_ssi_auth_request }, + { 0x0019, "Authentication Request", dissect_aim_snac_ssi_auth_request }, + { 0x001a, "Send Authentication Reply", dissect_aim_snac_ssi_auth_reply }, + { 0x001b, "Authentication Reply", dissect_aim_snac_ssi_auth_reply }, + { 0x001c, "Remote User Added Client To List", dissect_aim_ssi_was_added }, + { 0, NULL, NULL } +}; + +/*********************************************************************************************************** + * AIM SST + ***********************************************************************************************************/ +static int dissect_aim_sst_buddy_down_req (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +{ + int offset = dissect_aim_buddyname(tvb, pinfo, 0, tree); + guint8 md5_size; + + proto_tree_add_item(tree, hf_aim_sst_unknown, tvb, offset, 4, ENC_NA); + offset+=4; + + proto_tree_add_item(tree, hf_aim_sst_md5_hash_size, tvb, offset, 1, ENC_BIG_ENDIAN); + md5_size = tvb_get_guint8(tvb, offset); + offset++; + + proto_tree_add_item(tree, hf_aim_sst_md5_hash, tvb, offset, md5_size, ENC_NA); + + offset+=md5_size; + return offset; +} + +static int dissect_aim_sst_buddy_down_repl (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +{ + int offset = dissect_aim_buddyname(tvb, pinfo, 0, tree); + guint8 md5_size; + guint16 icon_size; + + proto_tree_add_item(tree, hf_aim_sst_unknown, tvb, offset, 3, ENC_NA); + offset+=3; + + proto_tree_add_item(tree, hf_aim_sst_md5_hash_size, tvb, offset, 1, ENC_BIG_ENDIAN); + md5_size = tvb_get_guint8(tvb, offset); + offset++; + + proto_tree_add_item(tree, hf_aim_sst_md5_hash, tvb, offset, md5_size, ENC_NA); + + offset+=md5_size; + + proto_tree_add_item(tree, hf_aim_sst_icon_size, tvb, offset, 2, ENC_BIG_ENDIAN); + icon_size = tvb_get_ntohs(tvb, offset); + offset+=2; + + if (icon_size) + { + proto_tree_add_item(tree, hf_aim_sst_icon, tvb, offset, icon_size, ENC_NA); + } + + offset+=icon_size; + + return offset; +} + +static int dissect_aim_sst_buddy_up_repl (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) +{ + int offset = 0; + guint8 md5_size; + + proto_tree_add_item(tree, hf_aim_sst_unknown, tvb, offset, 4, ENC_NA); + offset+=4; + + proto_tree_add_item(tree, hf_aim_sst_md5_hash_size, tvb, offset, 1, ENC_BIG_ENDIAN); + md5_size = tvb_get_guint8(tvb, offset); + offset++; + + proto_tree_add_item(tree, hf_aim_sst_md5_hash, tvb, offset, md5_size, ENC_NA); + + offset+=md5_size; + return offset; +} + +static int dissect_aim_sst_buddy_up_req (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) +{ + int offset = 0; + guint16 icon_size; + + proto_tree_add_item(tree, hf_aim_sst_ref_num, tvb, offset, 2, ENC_BIG_ENDIAN); + offset+=2; + + proto_tree_add_item(tree, hf_aim_sst_icon_size, tvb, offset, 2, ENC_BIG_ENDIAN); + icon_size = tvb_get_ntohs(tvb, offset); + offset+=2; + + if (icon_size) + { + proto_tree_add_item(tree, hf_aim_sst_icon, tvb, offset, icon_size, ENC_NA); + } + + offset+=icon_size; + return offset; +} + +static const aim_subtype aim_fnac_family_sst[] = { + { 0x0001, "Error", dissect_aim_snac_error }, + { 0x0002, "Upload Buddy Icon Request", dissect_aim_sst_buddy_up_req }, + { 0x0003, "Upload Buddy Icon Reply", dissect_aim_sst_buddy_up_repl }, + { 0x0004, "Download Buddy Icon Request", dissect_aim_sst_buddy_down_req }, + { 0x0005, "Download Buddy Icon Reply", dissect_aim_sst_buddy_down_repl }, + { 0, NULL, NULL } +}; + +static const aim_subtype aim_fnac_family_stats[] = { + { 0x0001, "Error", dissect_aim_snac_error }, + { 0x0002, "Set Report Interval", NULL }, + { 0x0003, "Report Request", NULL }, + { 0x0004, "Report Ack", NULL }, + { 0, NULL, NULL } +}; + +static const aim_subtype aim_fnac_family_translate[] = { + { 0x0001, "Error", dissect_aim_snac_error }, + { 0x0002, "Translate Request", NULL }, + { 0x0003, "Translate Reply", NULL }, + { 0, NULL, NULL } +}; + +/*********************************************************************************************************** + * AIM USER LOOKUP + ***********************************************************************************************************/ +static int dissect_aim_userlookup_search(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *lookup_tree) +{ + proto_tree_add_item(lookup_tree, hf_aim_userlookup_email, tvb, 0, tvb_reported_length(tvb), ENC_UTF_8|ENC_NA); + return tvb_reported_length(tvb); +} + + +static int dissect_aim_userlookup_result(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lookup_tree) +{ + return dissect_aim_tlv_sequence(tvb, pinfo, 0, lookup_tree, aim_client_tlvs); +} + +static const aim_subtype aim_fnac_family_userlookup[] = { + { 0x0001, "Error", dissect_aim_snac_error }, + { 0x0002, "Search for user by email address", dissect_aim_userlookup_search }, + { 0x0003, "Search results", dissect_aim_userlookup_result }, + { 0, NULL, NULL } +}; -/* Register the protocol with Wireshark */ void proto_register_aim(void) { @@ -1514,14 +3873,6 @@ proto_register_aim(void) { &hf_aim_data, { "Data", "aim.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } }, -#if 0 - { &hf_aim_signon_challenge_len, - { "Signon challenge length", "aim.signon.challengelen", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } - }, - { &hf_aim_signon_challenge, - { "Signon challenge", "aim.signon.challenge", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } - }, -#endif { &hf_aim_fnac_family, { "FNAC Family ID", "aim.fnac.family", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } }, @@ -1534,11 +3885,6 @@ proto_register_aim(void) { &hf_aim_fnac_id, { "FNAC ID", "aim.fnac.id", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } }, -#if 0 - { &hf_aim_infotype, - { "Infotype", "aim.infotype", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } - }, -#endif { &hf_aim_buddyname_len, { "Buddyname len", "aim.buddynamelen", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } }, @@ -1691,6 +4037,397 @@ proto_register_aim(void) }, }; + static hf_register_info hf_admin[] = { + { &hf_admin_acctinfo_code, + { "Account Information Request Code", "aim_admin.acctinfo.code", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }, + }, + { &hf_admin_acctinfo_unknown, + { "Unknown", "aim_admin.acctinfo.unknown", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }, + }, + { &hf_admin_acctinfo_permissions, + { "Account Permissions", "aim_admin.acctinfo.permissions", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }, + }, + { &hf_admin_confirm_status, + { "Confirmation status", "aim_admin.confirm_status", FT_UINT16, BASE_HEX, VALS(confirm_statusses), 0x0, NULL, HFILL }, + }, + }; + + static hf_register_info hf_bos[] = { +#if 0 + { &hf_aim_bos_data, + { "Data", "aim_bos.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } + }, +#endif + { &hf_aim_bos_class, + { "User class", "aim_bos.userclass", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }, + }, + }; + + static hf_register_info hf_buddylist[] = { + { &hf_aim_buddylist_userinfo_warninglevel, + { "Warning Level", "aim_buddylist.userinfo.warninglevel", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }, + }, + }; + + static hf_register_info hf_chat[] = { + { &hf_aim_chat_screen_name, + { "Screen Name", "aim_chat.screen_name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }, + }, + }; + + static hf_register_info hf_generic[] = { + { &hf_generic_servicereq_service, + { "Requested Service", "aim_generic.servicereq.service", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }, + }, + { &hf_generic_motd_motdtype, + { "MOTD Type", "aim_generic.motd.motdtype", FT_UINT16, BASE_HEX, VALS(aim_snac_generic_motd_motdtypes), 0x0, NULL, HFILL }, + }, + { &hf_generic_family, + { "Family", "aim_generic.family", FT_UINT16, BASE_CUSTOM, CF_FUNC(aim_generic_family), 0x0, NULL, HFILL }, + }, + { &hf_generic_version, + { "Version", "aim_generic.version", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }, + }, + { &hf_generic_dll_version, + { "DLL Version", "aim_generic.dll_version", FT_UINT24, BASE_DEC, NULL, 0x0, NULL, HFILL }, + }, + { &hf_generic_rateinfo_numclasses, + { "Number of Rateinfo Classes", "aim_generic.rateinfo.numclasses", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }, + }, + { &hf_generic_rateinfo_windowsize, + { "Window Size", "aim_generic.rateinfo.class.window_size", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }, + }, + { &hf_generic_rateinfo_clearlevel, + { "Clear Level", "aim_generic.rateinfo.class.clearlevel", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }, + }, + { &hf_generic_rateinfo_alertlevel, + { "Alert Level", "aim_generic.rateinfo.class.alertlevel", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }, + }, + { &hf_generic_rateinfo_limitlevel, + { "Limit Level", "aim_generic.rateinfo.class.limitlevel", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }, + }, + { &hf_generic_rateinfo_disconnectlevel, + { "Disconnect Level", "aim_generic.rateinfo.class.disconnectlevel", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }, + }, + { &hf_generic_rateinfo_currentlevel, + { "Current Level", "aim_generic.rateinfo.class.currentlevel", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }, + }, + { &hf_generic_rateinfo_maxlevel, + { "Max Level", "aim_generic.rateinfo.class.maxlevel", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }, + }, + { &hf_generic_rateinfo_lasttime, + { "Last Time", "aim_generic.rateinfo.class.lasttime", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }, + }, + { &hf_generic_rateinfo_curstate, + { "Current State", "aim_generic.rateinfo.class.curstate", FT_UINT8, BASE_HEX, VALS(rateinfo_states), 0x0, NULL, HFILL }, + }, + { &hf_generic_rateinfo_classid, + { "Class ID", "aim_generic.rateinfo.class.id", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }, + }, + { &hf_generic_rateinfo_numpairs, + { "Number of Family/Subtype pairs", "aim_generic.rateinfo.class.numpairs", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }, + }, + { &hf_generic_rateinfoack_group, + { "Acknowledged Rate Class", "aim_generic.rateinfoack.class", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }, + }, + { &hf_generic_ratechange_msg, + { "Rate Change Message", "aim_generic.ratechange.msg", FT_UINT16, BASE_HEX, VALS(ratechange_msgs), 0x0, NULL, HFILL }, + }, + { &hf_generic_migration_numfams, + { "Number of families to migrate", "aim_generic.migrate.numfams", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }, + }, + { &hf_generic_priv_flags, + { "Privilege flags", "aim_generic.privilege_flags", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }, + }, + { &hf_generic_allow_idle_see, + { "Allow other users to see idle time", "aim_generic.privilege_flags.allow_idle", FT_BOOLEAN, 32, TFS(&tfs_set_notset), 0x0001, NULL, HFILL }, + }, + { &hf_generic_allow_member_see, + { "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), 0x0002, NULL, HFILL }, + }, + { &hf_generic_selfinfo_warninglevel, + { "Warning level", "aim_generic.selfinfo.warn_level", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }, + }, + { &hf_generic_evil_new_warn_level, + { "New warning level", "aim_generic.evil.new_warn_level", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }, + }, + { &hf_generic_idle_time, + { "Idle time (seconds)", "aim_generic.idle_time", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }, + }, + { &hf_generic_client_ver_req_offset, + { "Client Verification Request Offset", "aim_generic.client_verification.offset", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }, + }, + { &hf_generic_client_ver_req_length, + { "Client Verification Request Length", "aim_generic.client_verification.length", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }, + }, + { &hf_generic_client_ver_req_hash, + { "Client Verification MD5 Hash", "aim_generic.client_verification.hash", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }, + }, + { &hf_generic_ext_status_type, + { "Extended Status Type", "aim_generic.ext_status.type", FT_UINT16, BASE_DEC, VALS(ext_status_types), 0x0, NULL, HFILL }, + }, + { &hf_generic_ext_status_flags, + { "Extended Status Flags", "aim_generic.ext_status.flags", FT_UINT8, BASE_HEX, VALS(ext_status_flags), 0x0, NULL, HFILL }, + }, + { &hf_generic_ext_status_length, + { "Extended Status Length", "aim_generic.ext_status.length", FT_UINT8, BASE_HEX, NULL, 0x0, NULL , HFILL }, + }, + { &hf_generic_ext_status_data, + { "Extended Status Data", "aim_generic.ext_status.data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL , HFILL }, + }, + }; + + static hf_register_info hf_icq[] = { + { &hf_icq_tlv_data_chunk_size, + { "Data chunk size", "aim_icq.chunk_size", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }, + }, + { &hf_icq_tlv_request_owner_uid, + { "Owner UID", "aim_icq.owner_uid", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}, + }, + { &hf_icq_tlv_request_type, + {"Request Type", "aim_icq.request_type", FT_UINT16, BASE_DEC, VALS(aim_icq_data_types), 0x0, NULL, HFILL}, + }, + { &hf_icq_tlv_request_seq_num, + {"Request Sequence Number", "aim_icq.request_seq_number", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}, + }, + { &hf_icq_dropped_msg_flag, + {"Dropped messages flag", "aim_icq.offline_msgs.dropped_flag", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }, + }, + { &hf_icq_meta_subtype, + {"Meta Request Subtype", "aim_icq.subtype", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }, + }, + }; + + static hf_register_info hf_location[] = { + { &hf_aim_location_buddyname_len, + { "Buddyname len", "aim_location.buddynamelen", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL } + }, + { &hf_aim_location_buddyname, + { "Buddy Name", "aim_location.buddyname", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } + }, + { &hf_aim_location_userinfo_warninglevel, + { "Warning Level", "aim_location.userinfo.warninglevel", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }, + }, + { &hf_aim_snac_location_request_user_info_infotype, + { "Infotype", "aim_location.snac.request_user_info.infotype", FT_UINT16, BASE_HEX, VALS(aim_snac_location_request_user_info_infotypes), 0x0, NULL, HFILL } + }, + }; + + static hf_register_info hf_messaging[] = { + { &hf_aim_icbm_channel, + { "Channel", "aim_messaging.icbm.channel", + FT_UINT16, BASE_HEX, VALS(icbm_channel_types), 0x0, NULL, HFILL } + }, + { &hf_aim_icbm_msg_flags, + { "Message Flags", "aim_messaging.icbm.flags", + FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } + }, + { &hf_aim_icbm_max_snac_size, + { "Max SNAC Size", "aim_messaging.icbm.max_snac", + FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } + }, + { &hf_aim_icbm_max_sender_warnlevel, + { "Max sender warn level", "aim_messaging.icbm.max_sender_warn-level", + FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } + }, + { &hf_aim_icbm_max_receiver_warnlevel, + { "max receiver warn level", "aim_messaging.icbm.max_receiver_warnlevel", + FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } + }, + { &hf_aim_icbm_min_msg_interval, + { "Minimum message interval (milliseconds)", "aim_messaging.icbm.min_msg_interval", + FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL } + }, + { &hf_aim_icbm_cookie, + { "ICBM Cookie", "aim_messaging.icbmcookie", + FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } + }, + { &hf_aim_message_channel_id, + { "Message Channel ID", "aim_messaging.channelid", + FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } + }, + { &hf_aim_icbm_evil, + { "Send Evil Bit As", "aim_messaging.evilreq.origin", + FT_UINT16, BASE_DEC, VALS(evil_origins), 0x0, NULL, HFILL } + }, + { &hf_aim_evil_warn_level, + { "Old warning level", "aim_messaging.evil.warn_level", + FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } + }, + { &hf_aim_evil_new_warn_level, + { "New warning level", "aim_messaging.evil.new_warn_level", + FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } + }, + { &hf_aim_icbm_notification_cookie, + { "Notification Cookie", "aim_messaging.notification.cookie", + FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL } + }, + { &hf_aim_icbm_notification_channel, + { "Notification Channel", "aim_messaging.notification.channel", + FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } + }, + { &hf_aim_icbm_notification_type, + { "Notification Type", "aim_messaging.notification.type", + FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } + }, + { &hf_aim_icbm_rendezvous_nak, + { "Rendezvous NAK reason", "aim_messaging.rendezvous_nak", + FT_UINT16, BASE_HEX, VALS(rendezvous_nak_reason_types), 0x0, NULL, HFILL } + }, + { &hf_aim_icbm_rendezvous_nak_length, + { "Rendezvous NAK reason length", "aim_messaging.rendezvous_nak_length", + FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } + }, + { &hf_aim_rendezvous_msg_type, + { "Message Type", "aim_messaging.rendezvous.msg_type", + FT_UINT16, BASE_HEX, VALS(rendezvous_msg_types), 0x0, NULL, HFILL } + }, + { &hf_aim_icbm_client_err_reason, + { "Reason", "aim_messaging.clienterr.reason", + FT_UINT16, BASE_DEC, VALS(client_err_reason_types), 0x0, NULL, HFILL } + }, + { &hf_aim_icbm_client_err_protocol_version, + { "Version", "aim_messaging.clienterr.protocol_version", + FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } + }, + { &hf_aim_icbm_client_err_client_caps_flags, + { "Client Capabilities Flags", "aim_messaging.clienterr.client_caps_flags", + FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL } + }, + { &hf_aim_rendezvous_extended_data_message_type, + { "Message Type", "aim_messaging.icbm.extended_data.message.type", + FT_UINT8, BASE_HEX, VALS(extended_data_message_types), 0x0, NULL, HFILL } + }, + { &hf_aim_rendezvous_extended_data_message_flags, + { "Message Flags", "aim_messaging.icbm.extended_data.message.flags", + FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } + }, + { &hf_aim_rendezvous_extended_data_message_flags_normal, + { "Normal Message", "aim_messaging.icbm.extended_data.message.flags.normal", + FT_BOOLEAN, 16, TFS(&tfs_set_notset), EXTENDED_DATA_MFLAG_NORMAL, NULL, HFILL } + }, + { &hf_aim_rendezvous_extended_data_message_flags_auto, + { "Auto Message", "aim_messaging.icbm.extended_data.message.flags.auto", + FT_BOOLEAN, 16, TFS(&tfs_set_notset), EXTENDED_DATA_MFLAG_AUTO, NULL, HFILL } + }, + { &hf_aim_rendezvous_extended_data_message_flags_multi, + { "Multiple Recipients Message", "aim_messaging.icbm.rendezvous.extended_data.message.flags.multi", + FT_BOOLEAN, 16, TFS(&tfs_set_notset), EXTENDED_DATA_MFLAG_MULTI, NULL, HFILL } + }, + { &hf_aim_rendezvous_extended_data_message_status_code, + { "Status Code", "aim_messaging.icbm.extended_data.message.status_code", + FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } + }, + { &hf_aim_rendezvous_extended_data_message_priority_code, + { "Priority Code", "aim_messaging.icbm.extended_data.message.priority_code", + FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } + }, + { &hf_aim_rendezvous_extended_data_message_text_length, + { "Text Length", "aim_messaging.icbm.extended_data.message.text_length", + FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } + }, + { &hf_aim_rendezvous_extended_data_message_text, + { "Text", "aim_messaging.icbm.extended_data.message.text", + FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } + }, + /* Generated from convert_proto_tree_add_text.pl */ + { &hf_aim_messaging_plugin, { "Plugin", "aim_messaging.plugin", FT_GUID, BASE_NONE, NULL, 0x0, NULL, HFILL }}, + { &hf_aim_icbm_client_err_length, { "Length", "aim_messaging.clienterr.length", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }}, + { &hf_aim_messaging_unknown, { "Unknown", "aim_messaging.unknown", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }}, + { &hf_aim_icbm_client_err_downcounter, { "Downcounter?", "aim_messaging.clienterr.downcounter", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }}, + { &hf_aim_messaging_unknown_data, { "Unknown", "aim_messaging.unknown_bytes", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, + { &hf_aim_messaging_plugin_specific_data, { "Plugin-specific data", "aim_messaging.plugin_specific_data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }}, + }; + + static hf_register_info hf_signon[] = { + { &hf_aim_infotype, + { "Infotype", "aim_signon.infotype", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } + }, + { &hf_aim_signon_challenge_len, + { "Signon challenge length", "aim_signon.challengelen", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL } + }, + { &hf_aim_signon_challenge, + { "Signon challenge", "aim_signon.challenge", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } + }, + }; + + static hf_register_info hf_ssi[] = { + { &hf_aim_fnac_subtype_ssi_version, + { "SSI Version", "aim_ssi.fnac.version", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } + }, + { &hf_aim_fnac_subtype_ssi_numitems, + { "SSI Object count", "aim_ssi.fnac.numitems", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } + }, + { &hf_aim_fnac_subtype_ssi_last_change_time, + { "SSI Last Change Time", "aim_ssi.fnac.last_change_time", FT_ABSOLUTE_TIME, ABSOLUTE_TIME_LOCAL, NULL, 0x0, NULL, HFILL } + }, + { &hf_aim_fnac_subtype_ssi_buddyname_len, + { "SSI Buddy Name length", "aim_ssi.fnac.buddyname_len", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } + }, + { &hf_aim_fnac_subtype_ssi_buddyname, + { "Buddy Name", "aim_ssi.fnac.buddyname", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } + }, + { &hf_aim_fnac_subtype_ssi_gid, + { "SSI Buddy Group ID", "aim_ssi.fnac.gid", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } + }, + { &hf_aim_fnac_subtype_ssi_bid, + { "SSI Buddy ID", "aim_ssi.fnac.bid", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } + }, + { &hf_aim_fnac_subtype_ssi_type, + { "SSI Buddy type", "aim_ssi.fnac.type", FT_UINT16, BASE_HEX, VALS(aim_fnac_family_ssi_types), 0x0, NULL, HFILL } + }, + { &hf_aim_fnac_subtype_ssi_tlvlen, + { "SSI TLV Len", "aim_ssi.fnac.tlvlen", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } + }, +#if 0 + { &hf_aim_fnac_subtype_ssi_data, + { "SSI Buddy Data", "aim_ssi.fnac.data", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } + }, +#endif + { &hf_aim_fnac_subtype_ssi_buddyname_len8, + { "SSI Buddy Name length", "aim_ssi.fnac.buddyname_len8", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } + }, + { &hf_aim_fnac_subtype_ssi_reason_str_len, + { "Reason Message length", "aim_ssi.fnac.reason_len", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } + }, + { &hf_aim_fnac_subtype_ssi_reason_str, + { "Reason Message", "aim_ssi.fnac.reason", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } + }, + { &hf_aim_fnac_subtype_ssi_grant_auth_unkn, + { "Unknown", "aim_ssi.fnac.auth_unkn", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL } + }, + { &hf_aim_fnac_subtype_ssi_allow_auth, + { "Allow flag", "aim_ssi.fnac.allow_auth_flag", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } + }, + }; + + static hf_register_info hf_sst[] = { + { &hf_aim_sst_md5_hash, + { "MD5 Hash", "aim_sst.md5", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }, + }, + { &hf_aim_sst_md5_hash_size, + { "MD5 Hash Size", "aim_sst.md5.size", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }, + }, + { &hf_aim_sst_unknown, + { "Unknown Data", "aim_sst.unknown", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }, + }, + { &hf_aim_sst_ref_num, + { "Reference Number", "aim_sst.ref_num", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }, + }, + { &hf_aim_sst_icon_size, + { "Icon Size", "aim_sst.icon_size", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }, + }, + { &hf_aim_sst_icon, + { "Icon", "aim_sst.icon", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }, + }, + }; + + static hf_register_info hf_userlookup[] = { + { &hf_aim_userlookup_email, + { "Email address looked for", "aim_lookup.email", FT_STRING, BASE_NONE, NULL, 0, "Email address", HFILL } + }, + }; + /* Setup protocol subtree array */ static gint *ett[] = { &ett_aim, @@ -1704,7 +4441,45 @@ proto_register_aim(void) &ett_aim_messageblock, &ett_aim_nickinfo_caps, &ett_aim_nickinfo_short_caps, - &ett_aim_string08_array + &ett_aim_string08_array, + + &ett_aim_admin, + &ett_aim_adverts, + &ett_aim_bos, + &ett_aim_buddylist, + &ett_aim_chat, + &ett_aim_chatnav, + &ett_aim_directory, + &ett_aim_email, + + &ett_generic_clientready, + &ett_generic_migratefamilies, + &ett_generic_clientready_item, + &ett_generic_serverready, + &ett_generic, + &ett_generic_priv_flags, + &ett_generic_rateinfo_class, + &ett_generic_rateinfo_classes, + &ett_generic_rateinfo_groups, + &ett_generic_rateinfo_group, + + &ett_aim_icq, + &ett_aim_icq_tlv, + &ett_aim_invitation, + &ett_aim_location, + &ett_aim_messaging, + &ett_aim_rendezvous_data, + &ett_aim_extended_data, + &ett_aim_extended_data_message_flags, + &ett_aim_popup, + &ett_aim_signon, + &ett_aim_ssi, + &ett_ssi, + &ett_aim_sst, + &ett_aim_stats, + &ett_aim_translate, + &ett_aim_userlookup, + }; static ei_register_info ei[] = { @@ -1716,14 +4491,48 @@ proto_register_aim(void) /* Register the protocol name and description */ proto_aim = proto_register_protocol("AOL Instant Messenger", "AIM", "aim"); - aim_handle = register_dissector("aim", dissect_aim, proto_aim); + proto_aim_admin = proto_register_protocol("AIM Administrative", "AIM Administration", "aim_admin"); + proto_aim_adverts = proto_register_protocol("AIM Advertisements", "AIM Advertisements", "aim_adverts"); + proto_aim_bos = proto_register_protocol("AIM Privacy Management Service", "AIM BOS", "aim_bos"); + proto_aim_buddylist = proto_register_protocol("AIM Buddylist Service", "AIM Buddylist", "aim_buddylist"); + proto_aim_chat = proto_register_protocol("AIM Chat Service", "AIM Chat", "aim_chat"); + proto_aim_chatnav = proto_register_protocol("AIM Chat Navigation", "AIM ChatNav", "aim_chatnav"); + proto_aim_directory = proto_register_protocol("AIM Directory Search", "AIM Directory", "aim_dir"); + proto_aim_email = proto_register_protocol("AIM E-mail", "AIM Email", "aim_email"); + proto_aim_generic = proto_register_protocol("AIM Generic Service", "AIM Generic", "aim_generic"); + proto_aim_icq = proto_register_protocol("AIM ICQ", "AIM ICQ", "aim_icq"); + proto_aim_invitation = proto_register_protocol("AIM Invitation Service", "AIM Invitation", "aim_invitation"); + proto_aim_location = proto_register_protocol("AIM Location", "AIM Location", "aim_location"); + proto_aim_messaging = proto_register_protocol("AIM Messaging", "AIM Messaging", "aim_messaging"); + proto_aim_popup = proto_register_protocol("AIM Popup", "AIM Popup", "aim_popup"); + proto_aim_signon = proto_register_protocol("AIM Signon", "AIM Signon", "aim_signon"); + proto_aim_ssi = proto_register_protocol("AIM Server Side Info", "AIM SSI", "aim_ssi"); + proto_aim_sst = proto_register_protocol("AIM Server Side Themes", "AIM SST", "aim_sst"); + proto_aim_stats = proto_register_protocol("AIM Statistics", "AIM Stats", "aim_stats"); + proto_aim_translate = proto_register_protocol("AIM Translate", "AIM Translate", "aim_translate"); + proto_aim_userlookup = proto_register_protocol("AIM User Lookup", "AIM User Lookup", "aim_lookup"); - /* Required function calls to register the header fields and subtrees used */ proto_register_field_array(proto_aim, hf, array_length(hf)); + proto_register_field_array(proto_aim_admin, hf_admin, array_length(hf_admin)); + proto_register_field_array(proto_aim_bos, hf_bos, array_length(hf_bos)); + proto_register_field_array(proto_aim_buddylist, hf_buddylist, array_length(hf_buddylist)); + proto_register_field_array(proto_aim_chat, hf_chat, array_length(hf_chat)); + proto_register_field_array(proto_aim_generic, hf_generic, array_length(hf_generic)); + proto_register_field_array(proto_aim_icq, hf_icq, array_length(hf_icq)); + proto_register_field_array(proto_aim_location, hf_location, array_length(hf_location)); + proto_register_field_array(proto_aim_messaging, hf_messaging, array_length(hf_messaging)); + proto_register_field_array(proto_aim_signon, hf_signon, array_length(hf_signon)); + proto_register_field_array(proto_aim_ssi, hf_ssi, array_length(hf_ssi)); + proto_register_field_array(proto_aim_sst, hf_sst, array_length(hf_sst)); + proto_register_field_array(proto_aim_userlookup, hf_userlookup, array_length(hf_userlookup)); + proto_register_subtree_array(ett, array_length(ett)); + expert_aim = expert_register_protocol(proto_aim); expert_register_field_array(expert_aim, ei, array_length(ei)); + aim_handle = register_dissector("aim", dissect_aim, proto_aim); + aim_module = prefs_register_protocol(proto_aim, NULL); prefs_register_bool_preference(aim_module, "desegment", @@ -1740,8 +4549,31 @@ proto_reg_handoff_aim(void) ssl_dissector_add(0, aim_handle); /* Heuristics disabled by default, it is really weak... */ heur_dissector_add("ssl", dissect_aim_ssl_heur, "AIM over SSL", "aim_ssl", proto_aim, HEURISTIC_DISABLE); + + + aim_init_family(proto_aim_admin, ett_aim_admin, FAMILY_ADMIN, aim_fnac_family_admin); + aim_init_family(proto_aim_adverts, ett_aim_adverts, FAMILY_ADVERTS, aim_fnac_family_adverts); + aim_init_family(proto_aim_bos, ett_aim_bos, FAMILY_BOS, aim_fnac_family_bos); + aim_init_family(proto_aim_buddylist, ett_aim_buddylist, FAMILY_BUDDYLIST, aim_fnac_family_buddylist); + aim_init_family(proto_aim_chat, ett_aim_chat, FAMILY_CHAT, aim_fnac_family_chat); + aim_init_family(proto_aim_chatnav, ett_aim_chatnav, FAMILY_CHAT_NAV, aim_fnac_family_chatnav); + aim_init_family(proto_aim_directory, ett_aim_directory, FAMILY_DIRECTORY, aim_fnac_family_directory); + aim_init_family(proto_aim_email, ett_aim_email, FAMILY_EMAIL, aim_fnac_family_email); + aim_init_family(proto_aim_generic, ett_generic, FAMILY_GENERIC, aim_fnac_family_generic); + aim_init_family(proto_aim_icq, ett_aim_icq, FAMILY_ICQ, aim_fnac_family_icq); + aim_init_family(proto_aim_invitation, ett_aim_invitation, FAMILY_INVITATION, aim_fnac_family_invitation); + aim_init_family(proto_aim_location, ett_aim_location, FAMILY_LOCATION, aim_fnac_family_location); + aim_init_family(proto_aim_messaging, ett_aim_messaging, FAMILY_MESSAGING, aim_fnac_family_messaging); + aim_init_family(proto_aim_popup, ett_aim_popup, FAMILY_POPUP, aim_fnac_family_popup); + aim_init_family(proto_aim_signon, ett_aim_signon, FAMILY_SIGNON, aim_fnac_family_signon); + aim_init_family(proto_aim_ssi, ett_aim_ssi, FAMILY_SSI, aim_fnac_family_ssi); + aim_init_family(proto_aim_sst, ett_aim_sst, FAMILY_SST, aim_fnac_family_sst); + aim_init_family(proto_aim_stats, ett_aim_stats, FAMILY_STATS, aim_fnac_family_stats); + aim_init_family(proto_aim_translate, ett_aim_translate, FAMILY_TRANSLATE, aim_fnac_family_translate); + aim_init_family(proto_aim_userlookup, ett_aim_userlookup, FAMILY_USERLOOKUP, aim_fnac_family_userlookup); } + /* * Editor modelines - http://www.wireshark.org/tools/modelines.html * |