aboutsummaryrefslogtreecommitdiffstats
path: root/packet-aim.c
AgeCommit message (Collapse)AuthorFilesLines
2004-05-05Use "tvb_reported_length_remaining()" in "until the end of the packet"Guy Harris1-21/+21
loops, so we mark frames as short if they've been cut short by a snapshot length. The user class in buddy list TLVs appears to be 2 bytes, in at least some captures; make "dissect_aim_userclass()" take the user class value, and the length of the user class field, as arguments, and have the caller fetch the value. Also, display the numerical value of the user class in hex, as it's a bitset. Fix the messaging dissector to put stuff under the top-level item rather than at the top level. Fix a typo. Clean up indentation. svn path=/trunk/; revision=10802
2004-04-26From Jelmer Vernooij:Olivier Biot1-1/+7
Add 2 missing header fields. svn path=/trunk/; revision=10714
2004-04-26From Jelmer Vernooij:Olivier Biot1-111/+237
Add support form extra SNACs. All TLV's are now recognized. svn path=/trunk/; revision=10712
2004-04-20From Jelmer Vernooij:Guy Harris1-77/+121
Add support for a couple more SNAC's. Handle TLV's in a somewhat more extendible manner. Fix a bug in the buddylist dissector that caused pango warnings. svn path=/trunk/; revision=10646
2004-04-11From Jon Oberheide: add the "Password Hash" label to AIM_TLV_PASSWORDGuy Harris1-1/+2
(0x0025) which was previously "Unknown". svn path=/trunk/; revision=10582
2004-03-23Get rid of a no-longer-used argument.Guy Harris1-4/+4
svn path=/trunk/; revision=10453
2004-03-23The dissectors for particular AIM families aren't for real protocols,Guy Harris1-2/+2
and they don't create their own subtrees; hand them the pointer to the AIM subtree, rather than the top-level tree, so they'll put the protocol tree items in the AIM subtree. svn path=/trunk/; revision=10452
2004-03-23From Jelmer Vernooij: split the AIM dissector into multiple files, andGuy Harris1-1525/+234
add a few more SNACs. svn path=/trunk/; revision=10450
2004-03-20From Jelmer Vernooij: add support for SNAC(x,1), SNAC(1,2-6) andGuy Harris1-194/+281
SNAC(1,0x13). svn path=/trunk/; revision=10424
2004-03-20From Jelmer Vernooij: add support for some more SNACs.Guy Harris1-6/+121
svn path=/trunk/; revision=10414
2003-12-21warning: ISO C does not allow extra ; outside of a functionJörg Mayer1-2/+2
svn path=/trunk/; revision=9390
2003-06-12Add new routines:Guy Harris1-3/+2
tvb_get_string() - takes a tvbuff, an offset, and a length as arguments, allocates a buffer big enough to hold a string with the specified number of bytes plus an added null terminator (i.e., length+1), copies the specified number of bytes from the tvbuff, at the specified offset, to that buffer and puts in a null terminator, and returns a pointer to that buffer (or throws an exception before allocating the buffer if that many bytes aren't available in the tvbuff); tvb_get_stringz() - takes a tvbuff, an offset, and a pointer to a "gint" as arguments, gets the size of the null-terminated string starting at the specified offset in the tvbuff (throwing an exception if the null terminator isn't found), allocates a buffer big enough to hold that string, copies the string to that buffer, and returns a pointer to that buffer and stores the length of the string (including the terminating null) in the variable pointed to by the "gint" pointer. Replace many pieces of code allocating a buffer and copying a string with calls to "tvb_get_string()" (for one thing, "tvb_get_string()" doesn't require you to remember that the argument to "tvb_get_nstringz0()" is the size of the buffer into which you're copying the string, which might be the length of the string to be copied *plus 1*). Don't use fixed-length buffers for null-terminated strings (even if the code that generates those packets has a #define to limit the length of the string). Use "tvb_get_stringz()", instead. In some cases where a value is fetched but is only used to pass an argument to a "proto_tree_add_XXX" routine, use "proto_tree_add_item()" instead. svn path=/trunk/; revision=7859
2003-05-19More tvb_get_nstringz0() fixes. Timo Sirainen pointed out that BadGerald Combs1-3/+3
Things can happen if we pass a zero buffer length to tvb_get_nstringz0(). Throw an exception if this happens. In various dissectors make sure the tvb_get_nstringz0()'s buffer length is greater than zero. svn path=/trunk/; revision=7688
2003-05-11"tvb_get_nstringz0()" now expects its third argument to be the maximumGuy Harris1-6/+6
number of bytes to put into the string, including the trailing '\0', not the maximum number of real characters in the string; fix the call appropriately (and make the buffer big enough to hold a null-terminated string with MAX_BUDDYNAME_LENGTH characters). svn path=/trunk/; revision=7663
2003-04-30Modify tvb_get_nstringz*() to behave more like snprintf(). Make changesGerald Combs1-3/+2
where necessary to reflect the new behavior. svn path=/trunk/; revision=7607
2003-04-15From Devin Heitmueller: dissect the "List" subtype in the Server StoredGuy Harris1-4/+139
List (SSI) family. svn path=/trunk/; revision=7458
2003-03-14From Devin Heitmueller: for packets with an unknown family ID, displayGuy Harris1-2/+2
the family ID in hex in the summary line. svn path=/trunk/; revision=7353
2003-02-27From Devin Heitmueller: dissection for user info requests (away message,Guy Harris1-7/+51
user profile, etc). svn path=/trunk/; revision=7209
2003-02-21From Devin Heitmueller: handle the AIM logon reply.Guy Harris1-4/+40
svn path=/trunk/; revision=7182
2003-02-20Updates from Devin Heitmueller to add a framework to handle TLVs, and toGuy Harris1-23/+158
handle "oncoming buddy" and "signon" TLVs. svn path=/trunk/; revision=7174
2003-01-20Do desegmentation and handle multiple AIM messages per TCP segment.Guy Harris1-36/+76
If the packet doesn't look like an AIM packet, tell our caller so they can try something else. Don't display an item for undissected data if there isn't any data. svn path=/trunk/; revision=6945
2003-01-15From Devin Heitmueller: further AIM cleanups, including cleanups ofGuy Harris1-54/+445
Family subtype dissection, and addition of subtypes present in GAIM source but not in Ethereal. svn path=/trunk/; revision=6932
2003-01-12From Devin Heitmueller:Guy Harris1-337/+804
* Break up dissection into separate functions * Added families not already present (based on GAIM source code) * Added entries from the "generic" family not already present * Started to break families and subtypes into constants instead of having hardcoded values (signon and generic are done, others in progress) svn path=/trunk/; revision=6917
2003-01-11From Devin Heitmueller: improve dissection of the AIM signon-reply, theGuy Harris1-3/+107
request-user-info, and the start of the user-info reply. svn path=/trunk/; revision=6906
2002-08-28Removed trailing whitespaces from .h and .c files using theJörg Mayer1-85/+85
winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6117
2002-08-02Replace the types from sys/types.h and netinet/in.h by their glib.hJörg Mayer1-12/+4
equivalents for the toplevel directory. The removal of winsock2.h will hopefully not cause any problems under MSVC++, as those files using struct timeval still include wtap.h, which still includes winsock2.h. svn path=/trunk/; revision=5932
2002-07-17From Joerg Mayer:Guy Harris1-5/+1
dftest.c: Remove #if-0-ed includes packet-ieee80211.c, packet-wtls.c, packet-afp.c, packet-wsp.c, packet-wtp.c, ethereal_gen.py: Remove redundant include varargs (already in snprintf.h, and required only for snprintf.h) Remove unused include of snprintf.h from files not using "snprintf()". svn path=/trunk/; revision=5889
2002-01-24Replace a bunch of "tvb_length()" and "tvb_length_remaining()" calls inGuy Harris1-2/+2
arguments to "proto_tree_add_text()", and to "proto_tree_add_XXX()" calls that add FT_NONE or FT_PROTO items to the protocol tree, with -1. Replace some calls to "tvb_length()" or "tvb_length_remaining()" with calls to "tvb_reported_length()" and "tvb_reported_length_remaining()", as those give the actual length of the data in the packet, not just the data that happened to be captured. svn path=/trunk/; revision=4605
2002-01-21Include files from the "epan" directory and subdirectories thereof withGuy Harris1-3/+3
"epan/..." pathnames, so as to avoid collisions with header files in any of the directories in which we look (e.g., "proto.h", as some other package has its own "proto.h" file which it installs in the top-level include directory). Don't add "-I" flags to search "epan", as that's no longer necessary (and we want includes of "epan" headers to fail if the "epan/" is left out, so that we don't re-introduce includes lacking "epan/"). svn path=/trunk/; revision=4586
2002-01-20The family and subtype fields in AIM messages are 16-bit fields, andGuy Harris1-2/+2
apparently specified in hex; display them as such in the Info column. svn path=/trunk/; revision=4583
2001-12-10Move the pointer to the "column_info" structure in the "frame_data"Guy Harris1-71/+71
structure to the "packet_info" structure; only stuff that's permanently stored with each frame should be in the "frame_data" structure, and the "column_info" structure is not guaranteed to hold the column values for that frame at all times - it was only in the "frame_data" structure so that it could be passed to dissectors, and, as all dissectors are now passed a pointer to a "packet_info" structure, it could just as well be put in the "packet_info" structure. That saves memory, by shrinking the "frame_data" structure (there's one of those per frame), and also lets us clean up the code a bit. svn path=/trunk/; revision=4370
2001-12-03Make "dissector_add()", "dissector_delete()", and "dissector_change()"Guy Harris1-2/+5
take a dissector handle as an argument, rather than a pointer to a dissector function and a protocol ID. Associate dissector handles with dissector table entries. svn path=/trunk/; revision=4308
2001-06-18From Joerg Mayer: explicitly fill in all members of aGuy Harris1-7/+7
"header_field_info" structure, including the ones that are later set by the routines to register fields. svn path=/trunk/; revision=3561
2001-04-20Fix Gerald's e-mail address - and fix it in "README.developer", soGuy Harris1-2/+2
people don't blindly insert the old address into new dissectors, which is probably how it got into the dissectors being fixed here. svn path=/trunk/; revision=3348
2001-01-22Remove more "CHECK_DISPLAY_AS_DATA()" calls and "pinfo->current_proto ="Guy Harris1-9/+1
statements. Move the setting of the Protocol column in various dissectors before anything is fetched from the packet, and also clear the Info column at that point in those and some other dissectors, so that if an exception is thrown, the columns don't reflect the previous protocol. Don't use col_add_fstr(..., "%s", string); Use col_add_str(..., string); as it does the same thing, but doesn't drag all the heavy *printf machinery in. Fix the DDTP dissector to set the Info column regardless of whether we're building a protocol tree or not, and to set it to "Encrypted payload" if the payload is encrypted. Also fix a typo in a field name. Register the FTP data dissector as being associated with the FTP data protocol, not the FTP protocol (the removed "CHECK_DISPLAY_AS_DATA()" call checked "proto_ftp_data", and the removed "pinfo->current_proto =" line set it to "FTP-DATA", so it should be associated with "proto_ftp_data"). Make the H1 dissector check whether the frame has at least 2 bytes in it before checking the first two bytes; heuristic dissectors must not throw exceptions until they've accepted the packet as one of theirs. Use "tvb_format_text()" rather than "tvb_get_ptr()" and "format_text()" in some dissectors where the result of "tvb_get_ptr()" is used only in the "format_text()" call. In the Quake dissector, don't check whether there are at least 4 bytes in the packet - if we return, the packet won't be dissected at all (it's not as if some other dissector will get to handle it), and, if we don't return, we'll throw an exception if there aren't at least 4 bytes in the packet, so the packet will be marked as short or malformed, as appropriate. In the RIPng dissector, associate the table of strings for the command field with the command field, so that the dissector doesn't have to format the string for the protocol tree entry itself, and so that the filter construction dialog box can let you select "Request" or "Response" from a list rather than requiring you to know the values for "Request" and "Response". Make "dissect_rpc()" static, as it's called only through a heuristic dissector list. Use "col_set_str()" to set the COL_PROTOCOL column for RPC protocols; the string used is from a table provided by the dissector, and is a string constant. Don't format the Info column for WSP into a buffer and then format that buffer into the column with "%s" - "col_add_fstr()" can do the formatting for you, without having to allocate your own buffer (or run through the *printf machinery twice). Don't fetch fields from the WTP packet until you're ready to use them, so that you don't throw an exception before you even set the Protocol column or clear the Info column. Use "pinfo->destport", not "pi.destport", in the Zebra dissector when checking whether the packet is a request or reply, and do the check by comparing with "pinfo->match_port" rather than TCP_PORT_ZEBRA (so that if the dissector is ever registered on another port, it still correctly determines whether the packet is a request or reply - the Network Monitor HTTP dissector has port 80 wired into its brain, which is a bit irritating if you're trying to get it to dissect HTTP proxy traffic on port 3128 or proxy administration UI traffic on port 3132). svn path=/trunk/; revision=2931
2001-01-09Add an additional "protocol index" argument to "{old_}dissector_add()",Guy Harris1-2/+2
"{old_}heur_dissector_add()", "{old_}conv_dissector_add()", and "register_dissector()", so that an entry in those tables has associated with it the protocol index of the protocol the dissector handles (or -1, if there is no protocol index for it). This is for future use in a number of places. (Arguably, "proto_register_protocol()" should take a dissector pointer as an argument, but 1) it'd have to handle both regular and heuristic dissectors; 2) making it take either a "dissector_t" or a union of that and a "heur_dissector_t" introduces some painful header-file interdependencies so I'm punting on that for now. As with other Ethereal internal APIs, these APIs are subject to change in the future, at least until Ethereal 1.0 comes out....) svn path=/trunk/; revision=2849
2001-01-03Have "proto_register_protocol()" build a list of data structures forGuy Harris1-2/+2
protocols, in addition to adding structures to the list of filterable fields. Give it an extra argument that specifies a "short name" for the protocol, for use in such places as pinfo->current_proto; the dialog box for constructing filters; the preferences tab for the protocol; and so on (although we're not yet using it in all those places). Make the preference name that appears in the preferences file and the command line for the DIAMETER protocol "diameter", not "Diameter"; the convention is that the name in question be all-lower-case. Make some routines and variables that aren't exported static. Update a comment in the ICP dissector to make it clear that the dissector won't see fragments other than the first fragment of a fragmented datagram. svn path=/trunk/; revision=2810
2000-11-28Updates from Ralf Holzer.Guy Harris1-17/+93
svn path=/trunk/; revision=2704
2000-11-19For each column, have both a buffer into which strings for that columnGuy Harris1-6/+6
can be put, and a pointer to the string for the column, which might or might not point to that buffer. Add a routine "col_set_str()", which sets the string for the column to the string passed to it as an argument; it should only be handed a static string (a string constant would be ideal). It doesn't do any copying, so it's faster than "col_add_str()". Make the routines that append to columns check whether the pointer to the string for the column points to the buffer for the column and, if not, copy the string for the column to the buffer for the column so that you can append to it (so you can use "col_set_str()" and then use "col_append_str()" or "col_append_fstr()"). Convert a bunch of "col_add_str()" calls that take a string constant as an argument to "col_set_str()" calls. Convert some "col_add_fstr()" calls that take a string constant as the only argument - i.e., the format string doesn't have any "%" slots into which to put strings for subsequent arguments to "col_set_str()" calls (those calls are just like "col_add_str()" calls). Replace an END_OF_FRAME reference in a tvbuffified dissector with a "tvb_length(tvb)" call. svn path=/trunk/; revision=2670
2000-11-12"pinfo->current_proto" is typically set to an acronym or short name forGuy Harris1-2/+2
the protocol, not the filter name for the protocol, so it should be "AIM", not "aim". svn path=/trunk/; revision=2621
2000-11-06AIM/OSCAR dissector, from Ralf Holzer.Guy Harris1-0/+548
svn path=/trunk/; revision=2571