aboutsummaryrefslogtreecommitdiffstats
path: root/packet-sip.c
AgeCommit message (Collapse)AuthorFilesLines
2001-12-10Move the pointer to the "column_info" structure in the "frame_data"guy1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4370 f5534014-38df-0310-8fa8-9805f1628bb7
2001-12-03Make "dissector_add()", "dissector_delete()", and "dissector_change()"guy1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4308 f5534014-38df-0310-8fa8-9805f1628bb7
2001-11-25Switched from calling dissect_data to using call_dissectorhagbard1-2/+4
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4263 f5534014-38df-0310-8fa8-9805f1628bb7
2001-10-26Fix the rest of the signed/unsigned comparison warnings.gram1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4088 f5534014-38df-0310-8fa8-9805f1628bb7
2001-08-23"sip_is_request()" is intended to indicate whether a given SIP packet isguy1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3865 f5534014-38df-0310-8fa8-9805f1628bb7
2001-06-18From Joerg Mayer: explicitly fill in all members of aguy1-2/+2
"header_field_info" structure, including the ones that are later set by the routines to register fields. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3561 f5534014-38df-0310-8fa8-9805f1628bb7
2001-03-09Fixes to Lemon to get it to compile on platforms (such as some versionsguy1-2/+2
of Tru64 UNIX) that define TRUE and FALSE. Fixes to some Tru64 compiler warnings. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3120 f5534014-38df-0310-8fa8-9805f1628bb7
2001-01-30Slightly better invalid packet handling.gerald1-6/+6
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2959 f5534014-38df-0310-8fa8-9805f1628bb7
2001-01-30Fix a bounds checking problem when handed an invalid SIP packet, asgerald1-9/+16
discovered by Ruud Linders <ruud@lucent.com>. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2958 f5534014-38df-0310-8fa8-9805f1628bb7
2001-01-25Remove more "CHECK_DISPLAY_AS_DATA()" calls and "pinfo->current_proto ="guy1-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.) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2938 f5534014-38df-0310-8fa8-9805f1628bb7
2001-01-09Add an additional "protocol index" argument to "{old_}dissector_add()",guy1-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....) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2849 f5534014-38df-0310-8fa8-9805f1628bb7
2001-01-03Have "proto_register_protocol()" build a list of data structures forguy1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2810 f5534014-38df-0310-8fa8-9805f1628bb7
2000-11-19For each column, have both a buffer into which strings for that columnguy1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2670 f5534014-38df-0310-8fa8-9805f1628bb7
2000-11-18dissect_sip() was incorrectly always calling the next levelgram1-4/+5
dissector when tree was NULL. From Heikki Vatiainen <hessu@cs.tut.fi> git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2661 f5534014-38df-0310-8fa8-9805f1628bb7
2000-11-16Tvbuffify the STP dissector, have it register itself and have the LLCguy1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2651 f5534014-38df-0310-8fa8-9805f1628bb7
2000-11-15Add a mechanism by which a dissector can be registered by name, anotherguy1-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.) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2647 f5534014-38df-0310-8fa8-9805f1628bb7
2000-11-13As the SDP dissector now appends to, rather than overwriting, theguy1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2637 f5534014-38df-0310-8fa8-9805f1628bb7
2000-11-11Updates from Heikki Vatiainen.guy1-43/+22
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2612 f5534014-38df-0310-8fa8-9805f1628bb7
2000-11-10Tvbuffify the SAP and SDP dissectors.guy1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2595 f5534014-38df-0310-8fa8-9805f1628bb7
2000-11-04SIP dissector, from Heikki Vatiainen.guy1-0/+224
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2562 f5534014-38df-0310-8fa8-9805f1628bb7