aboutsummaryrefslogtreecommitdiffstats
path: root/packet-sip.c
AgeCommit message (Collapse)AuthorFilesLines
2002-10-02Update Jean-Francois Mule's email addressGerald Combs1-2/+2
svn path=/trunk/; revision=6364
2002-08-28Removed trailing whitespaces from .h and .c files using theJörg Mayer1-13/+13
winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6117
2002-07-25From Stefan Wenk: remove an unnecessary +1 from some offsetGuy Harris1-4/+3
computations. svn path=/trunk/; revision=5905
2002-07-17Add an extra argument to "tvb_find_line_end()", which specifies what itGuy Harris1-4/+5
should do if it doesn't find an EOL; if FALSE, it behaves as before, returning values that treat the line as ending at the end of the tvbuff, and if TRUE, it returns -1, so its caller can do segment reassembly until it gets the EOL. Add an option to the SMTP dissector to do segment reassembly, and do segment reassembly of the first line. svn path=/trunk/; revision=5891
2002-05-09Fix another place where the heuristic dissector was checking data beforeGuy Harris1-7/+22
it new it was available. Fix some comments. svn path=/trunk/; revision=5425
2002-05-09In the heuristic dissector, check to make sure the data being looked atGuy Harris1-3/+15
is available before looking at it, so we don't throw an exception before we conclude whether the packet is, or isn't, one of ours. svn path=/trunk/; revision=5424
2002-05-08From Stefan Wenk: SIP heuristic dissector.Guy Harris1-9/+49
svn path=/trunk/; revision=5418
2002-05-01From Joerg Mayer: get rid of an unused argument.Guy Harris1-4/+4
svn path=/trunk/; revision=5332
2002-03-29From Jakob Schlyter: add "PRACK" and "SPRACK" methods.Gerald Combs1-35/+81
Change the behavior of the dissector to treat anything matching "^.* .+:.+ SIP/2.0$" as a SIP request. Methods that don't match our list are labelled "unknown". Convert some tabs to spaces to match the rest of the code. svn path=/trunk/; revision=5040
2002-03-21From Jakob Schlyter, add the "MESSAGE" method.Gerald Combs1-2/+5
Add the "QAUTH" and "DO" methods as well. svn path=/trunk/; revision=4997
2002-02-02Use "tvb_offset_exists()" to check whether there's a payload, and useGuy Harris1-12/+19
"msg_offset" rather than "offset" as the offset of the beginning of the payload ("offset" is only advanced if "tree" is non-null, so it doesn't necessarily point to the beginning of the payload). Use -1 rather than "tvb_length_remaining()" as a length argument to "tvb_find_guint8()" to get it to search to the end of the tvbuff, and, before checking for the additional "\n\r\n" after a "\r", check whether those 3 bytes are in the tvbuff. svn path=/trunk/; revision=4671
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-2/+2
"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
2001-12-10Move the pointer to the "column_info" structure in the "frame_data"Guy Harris1-5/+5
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-3/+6
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-11-25Switched from calling dissect_data to using call_dissectorEd Warnicke1-2/+4
svn path=/trunk/; revision=4263
2001-10-26Fix the rest of the signed/unsigned comparison warnings.Gilbert Ramirez1-2/+2
svn path=/trunk/; revision=4088
2001-08-23"sip_is_request()" is intended to indicate whether a given SIP packet isGuy Harris1-8/+20
a request or reply; make its return value "gboolean", and have it just return TRUE or FALSE. Also make an array index variable unsigned, to squelch a GCC warning. Support for additional SIP methods, from Jean-Francois Mule. svn path=/trunk/; revision=3865
2001-06-18From Joerg Mayer: explicitly fill in all members of aGuy Harris1-2/+2
"header_field_info" structure, including the ones that are later set by the routines to register fields. svn path=/trunk/; revision=3561
2001-03-09Fixes to Lemon to get it to compile on platforms (such as some versionsGuy Harris1-2/+2
of Tru64 UNIX) that define TRUE and FALSE. Fixes to some Tru64 compiler warnings. svn path=/trunk/; revision=3120
2001-01-30Slightly better invalid packet handling.Gerald Combs1-6/+6
svn path=/trunk/; revision=2959
2001-01-30Fix a bounds checking problem when handed an invalid SIP packet, asGerald Combs1-9/+16
discovered by Ruud Linders <ruud@lucent.com>. svn path=/trunk/; revision=2958
2001-01-25Remove more "CHECK_DISPLAY_AS_DATA()" calls and "pinfo->current_proto ="Guy Harris1-4/+9
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. "Tvbuffify" the Mobile IP dissector (it took old-style arguments, and then converted them into tvbuff arguments, so there wasn't much to do, other than to fix references to "fd" to refer to "pinfo->fd"). In the SCTP dissector, refer to the port type and source and destination ports through "pinfo" rather than through the global "pi", as it's a tvbuffified dissector. In the SMTP and Time Protocol dissectors, use "pinfo->match_port" rather than "TCP_PORT_SMTP" when checking whether the packet is a request or reply, just in case somebody makes a non-standard port be dissected as SMTP or Time. (Also, remove a bogus comment from the Time dissector; it was probably cut-and-pasted from the TFTP dissector.) svn path=/trunk/; revision=2938
2001-01-09Add an additional "protocol index" argument to "{old_}dissector_add()",Guy Harris1-3/+3
"{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/+3
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-19For each column, have both a buffer into which strings for that columnGuy Harris1-2/+2
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-18dissect_sip() was incorrectly always calling the next levelGilbert Ramirez1-4/+5
dissector when tree was NULL. From Heikki Vatiainen <hessu@cs.tut.fi> svn path=/trunk/; revision=2661
2000-11-16Tvbuffify the STP dissector, have it register itself and have the LLCGuy Harris1-2/+2
dissector call it through a handle, and make it static. Give "dissect_data()" an "offset" argument, so dissectors can use it to dissect part of the packet without having to cook up a new tvbuff. Go back to using "dissect_data()" to dissect the data in an IPP request. svn path=/trunk/; revision=2651
2000-11-15Add a mechanism by which a dissector can be registered by name, anotherGuy Harris1-3/+9
dissector can get a "handle" for that dissector by name and then call that dissector through the handle. This allows dissectors that can't be called through a port table or a heuristic table to be called from other dissectors without directly referring to the dissector function - dynamically-loaded modules, under Windows, cannot directly call functions in the main program, and non-plugin dissectors are in the main program and thus cannot be called from plugin dissectors unless either 1) a pointer to the dissector is put in the Big Transfer Vector or 2) some other mechanism for getting a pointer to the dissector is provided. This mechanism could also support registering old-style dissectors and calling them from new-style dissectors without the new-style dissector having to do the argument translation itself (I didn't add support for registering old-style dissectors because I'd prefer to have people tvbuffify their code if they have to register a dissector...). It could also, in the future, perhaps support disabling of protocols; setting "pinfo->current_proto"; inside "call_dissector()" - and inside "{old_}dissector_try_port()" and "{old_"dissector_try_heuristic()" - allowing a pile of stuff that currently has to be done in every dissector be done by common code. (I have some ideas about how to do this, by having "proto_register_protocol()" take an abbreviation - of the sort that would be put in, for example, "pinfo->current_proto" - as an argument; having the calls to register dissectors take an index returned by "proto_register_protocol()" as an argument. The abbreviation could be used elsewhere as well, e.g. in the "Decoding" tab of the "Edit->Protocols" dialog box, and in a GUI for constructing protocol filters. Watch this space.) Make "dissect_sdp()" the first client of this mechanism; it's now static to "packet-sdp.c", and all dissectors that call it - including the MGCP plugin - now call it through a dissector handle fetched by "find_dissector()". (Next step - see if Ethereal can now compile on Windows as a result of this.) svn path=/trunk/; revision=2647
2000-11-13As the SDP dissector now appends to, rather than overwriting, theGuy Harris1-3/+1
Protocol and Info columns, there's no longer any need for the SIP dissector to make the columns non-writable - SDP won't trash what SIP put there. svn path=/trunk/; revision=2637
2000-11-11Updates from Heikki Vatiainen.Guy Harris1-43/+22
svn path=/trunk/; revision=2612
2000-11-10Tvbuffify the SAP and SDP dissectors.Guy Harris1-5/+2
Add "tvb_find_line_end_unquoted()" for the benefit of the SDP dissector; get rid of "find_line_end_unquoted()" as nobody uses it any more. Add "tvb_pbrk_guint8()" for the benefit of "tvb_find_line_end_unquoted()"; it searches for any of a number of characters, unlike "tvb_find_guint8()" which searches for only one. svn path=/trunk/; revision=2595
2000-11-04SIP dissector, from Heikki Vatiainen.Guy Harris1-0/+224
svn path=/trunk/; revision=2562