aboutsummaryrefslogtreecommitdiffstats
path: root/packet-sip.c
AgeCommit message (Collapse)AuthorFilesLines
2004-07-18Move dissectors to epan/dissectors directory.Gilbert Ramirez1-2063/+0
Also move ncp222.py, x11-fields, process-x11-fields.pl, make-reg-dotc, and make-reg-dotc.py. Adjust #include lines in files that include packet-*.h files. svn path=/trunk/; revision=11410
2004-07-18Set the svn:eol-style property on all text files to "native", so thatGuy Harris1-1/+1
they have LF at the end of the line on UN*X and CR/LF on Windows; hopefully this means that if a CR/LF version is checked in on Windows, the CRs will be stripped so that they show up only when checked out on Windows, not on UN*X. svn path=/trunk/; revision=11400
2004-06-16Completly change parsing of "From" and "To" lines to fix a problem with ↵Anders Broman1-213/+344
finding "tag" add and export "dfilter_store_sip_from_addr" to make it possible to filter on SIP url:s in multiple dissectors and some wite space changes. svn path=/trunk/; revision=11159
2004-05-15From Martin Mathieson: mark the "this is a suspected resend" Boolean andGuy Harris1-8/+14
"this is suspected to be a resend of frame N" entries as generated, and make the latter an FT_FRAMENUM field so you can go to that frame conveniently. svn path=/trunk/; revision=10905
2004-05-04Fixed a copy-paste errorAnders Broman1-3/+3
svn path=/trunk/; revision=10797
2004-05-01From Martin Mathieson Update of SIP resend detection.Anders Broman1-57/+82
svn path=/trunk/; revision=10750
2004-04-22From Martin MathiesonAnders Broman1-8/+318
add 2 hidden display filters for SIP - namely: (1) sip.error (for all responses with code >= 300) (2) sip.resend (for all packets that appear to have been retransmitted). A field showing a count of these is shown in the SIP stats window. svn path=/trunk/; revision=10662
2004-04-14Correct the removal of spaces before parameters in the Content type line, ↵Anders Broman1-21/+23
change some tags according to --sip-publish-03 svn path=/trunk/; revision=10598
2004-04-03As pointed out by Chernishov Yury - strip of leading spaces of parametersAnders Broman1-7/+15
svn path=/trunk/; revision=10550
2004-03-30From Lars Roland: Tethereal version of SIP statistics tap, and fixes toGuy Harris1-295/+343
the Ethereal version. svn path=/trunk/; revision=10522
2004-03-26From Martin Mathieson: SIP statistics tap.Guy Harris1-9/+38
svn path=/trunk/; revision=10493
2004-02-18From Martin Mathieson: make the top-level SIP item include the messageGuy Harris1-4/+2
body, as that's included in the SIP tree. svn path=/trunk/; revision=10099
2004-02-11Cast "char" values to "guchar" before passing them to <ctype.h> macros,Guy Harris1-2/+2
so that characters with the 8th bit set don't get sign-extended and cause the macros not to return the right answer. svn path=/trunk/; revision=10036
2004-02-03Handle the media type "message/sip".Guy Harris1-2/+2
svn path=/trunk/; revision=9973
2004-01-19Free "media_type_str" once we've made the lower-cased copy - and referGuy Harris1-4/+3
only to the lower-cased copy in subsequent code. svn path=/trunk/; revision=9744
2004-01-19Fix a double free bug introduced by the previous patch.Olivier Biot1-2/+2
svn path=/trunk/; revision=9741
2004-01-18From Anders Broman:Olivier Biot1-2/+13
Convert content type to lowercase, and save pinfo->prvate_data before handing off to a subdissector. svn path=/trunk/; revision=9725
2004-01-07Add a preference that controls the way the SIP version is enforced. By default,Olivier Biot1-9/+33
strict enforcement of SIP/2.0 will be applied. Add some comments. From Anders Broman: Fix the length of content_type_parameter_str. Fix a typo in a comment. svn path=/trunk/; revision=9591
2004-01-02From Steven Lass: put the request and status lines into the protocolGuy Harris1-6/+23
tree as filterable fields. svn path=/trunk/; revision=9518
2003-12-17There's no need for the "content_type_exist" variable - we can justGuy Harris1-4/+2
check whether "media_type_str" is null. svn path=/trunk/; revision=9322
2003-12-17From Anders Broman:Guy Harris1-18/+27
check that there *is* a content type string before using it; get rid of some incomplete code for multipart/mixed (it set some variables but didn't use them); add some incomplete code for handling parameters to Content-Type. svn path=/trunk/; revision=9321
2003-12-08From Anders Broman:Guy Harris1-169/+223
Call subdissectors regardless of whether we're building a protocol tree or not. Use the "media_type" dissector table to hand off to subdissectors, rather than wiring in SDP. Put the message body into a subtree of the SIP tree rather than at the top level. svn path=/trunk/; revision=9200
2003-11-25From Anders Broman: add more SIP headers, and the PUBLISH method.Guy Harris1-102/+297
svn path=/trunk/; revision=9089
2003-11-20From Martin Mathieson:Guy Harris1-30/+95
- Add some summary info to REGISTER requests and responses - Tidy up whitespace a little svn path=/trunk/; revision=9048
2003-11-14Add support for the compact form of headers.Guy Harris1-54/+62
svn path=/trunk/; revision=8963
2003-10-24From Anders Broman: make it possible to filter on only address or tag inGuy Harris1-14/+114
the SIP address fields. svn path=/trunk/; revision=8770
2003-10-14Update list of SIP RFCsJörg Mayer1-2/+2
svn path=/trunk/; revision=8697
2003-09-26For (non-heuristic) SIP-over-TCP, dissect stuff that's neither a requestGuy Harris1-131/+118
nor a response as continuation data. For SIP-over-everything-else, reject it. Parse the headers regardless of whether we're building a protocol tree or not; if we're not, we just do it to look for a blank line separating the headers from the body. Do that instead of scanning for the message body separately. When scanning for a colon, don't scan past the end of the line. svn path=/trunk/; revision=8549
2003-09-26Make the non-heuristic SIP dissector reject the packet if it doesn'tGuy Harris1-23/+25
look like a SIP packet, so some other dissector gets a chance at it. When looking for the blank line separating headers from data, use "tvb_find_line_end()" so we handle CR/LF and LF as end-of-line indications (RFC 2543 says "senders MUST terminate lines with a CRLF", but it also says "but receivers MUSTalso interpret CR and LF by themselves as line terminators"), and return an offset past the end of the buffer, rather than -1, if we don't find it (not all packets have one). When checking whether a header is one we know about, do a case-insensitive comparison (RFC 2543 says header field names are case-insensitive). svn path=/trunk/; revision=8548
2003-09-02From Anders Broman: add a preference option to enable the display of theGuy Harris1-3/+62
whole SIP message as text lines, as well as showing the dissected message. svn path=/trunk/; revision=8340
2003-08-04Register as a heuristic subdissector of SCTP.Guy Harris1-4/+2
Doing so obviates the need to register the dissector by name (that was done to let the SCTP dissector explicitly call the SIP dissector), so don't bother doing so. svn path=/trunk/; revision=8129
2003-07-31From Ruud Linders:Guy Harris1-2/+6
"UPDATE" is now a valid sip method; register the SIP decoder so it can be called from other protocols (i.e. SCTP). svn path=/trunk/; revision=8115
2003-06-12Add new routines:Guy Harris1-7/+3
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-06-11Put the subfields of the request or response line under the protocolGuy Harris1-7/+11
tree item for that line. In "dfilter_sip_request_line()", free the string after we're done. svn path=/trunk/; revision=7848
2003-06-09Clean up the checks for valid SIP requests and responses; do the tests -Guy Harris1-181/+299
and the finding of tokens in the header - only once. Don't assume there's either zero or one spaces after the colon in a Name:Value header, and don't put a tvb_format_text()-formatted version of the value into the protocol tree. svn path=/trunk/; revision=7811
2003-05-29From Steven Lass: if there is no whitespace after the colon in a header,Guy Harris1-7/+26
don't try to eat the non-existent whitespace. svn path=/trunk/; revision=7763
2003-03-11MSVC++ didn't care for having const ints in its hf subarray indices. UseGerald Combs1-99/+99
#defines instead. svn path=/trunk/; revision=7339
2003-03-10From Stefan Wenk: filterable header fields in SIP dissector.Guy Harris1-5/+486
svn path=/trunk/; revision=7336
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