path: root/packet-rtsp.c
AgeCommit message (Collapse)AuthorFilesLines
2004-07-18Move dissectors to epan/dissectors directory.Gilbert Ramirez1-1217/+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-07-09Use "iscntrl()", rather than "isprint()", to test whether a character isGuy Harris1-18/+32
a CTL in HTTP, ICAP, and RTSP. Check for non-ASCII characters in ICAP and RTSP, just as we do in HTTP. The headers in those protocols are just "headers", not "MIME headers", at least in the RFCs (common usage nonwithstanding; not all of those headers are for MIME stuff such as Content-Type). Add some RFC numbers. svn path=/trunk/; revision=11357
2004-06-29From Martin Mathieson:Anders Broman1-3/+3
packet-rtp.c packet_rtsp.cand packet-rtcp.c ------------------------------------------ Make sure that the RTP RTSP and RTCP dissectors show the setup frame corresponding to the destination address svn path=/trunk/; revision=11270
2004-06-15From Thomas Anders: Navigating from RTP/RTCP packets to setup where it was ↵Anders Broman1-31/+29
set up svn path=/trunk/; revision=11154
2004-05-11A line is an RTSP request merely because it begins with a string that'sGuy Harris1-3/+6
an RTSP request name - either the line has to end after the request name or there has to be a whitespace character after the request name. svn path=/trunk/; revision=10849
2004-03-19From Anders Broman: put E.164 numbers into the protocol tree using theGuy Harris1-17/+28
E.164 routines. svn path=/trunk/; revision=10405
2004-03-05From Anders Broman: add some filterable fields, and un-hide some otherGuy Harris1-38/+145
ones. svn path=/trunk/; revision=10315
2004-01-17splitted some of the preferences texts into more than one line,Ulf Lamping1-4/+4
to reduce the size of the preferences dialog. This becoming necessary, as some of the texts were huge svn path=/trunk/; revision=9693
2004-01-05For RTSP requests, we assume that, if there's no Content-Length header,Guy Harris1-17/+44
the request has no body. When displaying the body, use the reported length remaining, not the captured length remaining, as the length. svn path=/trunk/; revision=9552
2004-01-01Make the RTSP packet handling more like the HTTP packet handling.Guy Harris1-31/+81
svn path=/trunk/; revision=9516
2003-12-31Remove redundant protocol names from preference values.Guy Harris1-3/+3
svn path=/trunk/; revision=9505
2003-12-23Not all headers in HTTP, RTSP, SIP, etc. are entity headers; rename someGuy Harris1-5/+5
files, routines, data structures, etc.. svn path=/trunk/; revision=9428
2003-12-23Note that we should do the same sort of entity header processing thatGuy Harris1-16/+41
HTTP does. Note that the RTSP RFC talks about packets with no content length, although it also says they shouldn't exist. Update a comment now that we *do* handle data that crosses TCP segment boundaries. Handle the payload length a bit differently, to make it a bit clearer what's going on. svn path=/trunk/; revision=9425
2003-12-23From Anders Broman: add the alternate TCP port.Guy Harris1-2/+12
svn path=/trunk/; revision=9421
2003-12-22Call subdissectors even if we're not building a protocol tree.Guy Harris1-24/+23
In the loop that processes TCP segment data, loop over the full reported length of the segment, so that we throw an exception if the frame was short. svn path=/trunk/; revision=9420
2003-12-22Do reassembly of interleaved binary data.Guy Harris1-6/+55
svn path=/trunk/; revision=9419
2003-12-22Use "rreh_do_reassembly()" to do reassembly.Guy Harris1-35/+90
svn path=/trunk/; revision=9409
2003-12-17From Anders Broman: add a preference setting for the RTSP TCP port.Guy Harris1-8/+40
svn path=/trunk/; revision=9323
2002-08-28Removed trailing whitespaces from .h and .c files using theJörg Mayer1-5/+5
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-31/+27
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-17Add an extra argument to "tvb_find_line_end()", which specifies what itGuy Harris1-3/+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-01-21Include files from the "epan" directory and subdirectories thereof withGuy Harris1-4/+4
"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-20Allow a length of -1 to be specified when adding FT_NONE and FT_PROTOCOLGuy Harris1-3/+3
items to the protocol tree; it's interpreted as "the rest of the data in the tvbuff". This can be used if 1) the item covers the entire packet or the remaining payload in the packet or 2) the item's length won't be known until it's dissected, and will be then set with "proto_item_set_len()" - if an exception is thrown in the dissection, it means the item ran *past* the end of the tvbuff, so saying it runs to the end of the tvbuff is reasonable. Convert a number of "proto_tree_add_XXX()" calls using "tvb_length_remaining()", values derived from the result of "tvb_length()", or 0 (in the case of items whose length is unknown) to use -1 instead (using 0 means that if an exception is thrown, selecting the item highlights nothing; using -1 means it highlights all the data for that item that's available). In some places where "tvb_length()" or "tvb_length_remaining()" was used to determine how large a packet is, use "tvb_reported_length()" or "tvb_reported_length_remaining()", instead - the first two calls indicate how much captured data was in the packet, the latter two calls indicate how large the packet actually was (and the fact that using the latter could cause BoundsError exceptions to be thrown is a feature - if such an exception is thrown, the frame really *was* short, and it should be tagged as such). Replace some "proto_tree_add_XXX()" calls with equivalent "proto_tree_add_item()" calls. Fix some indentation. svn path=/trunk/; revision=4578
2001-12-10Move the pointer to the "column_info" structure in the "frame_data"Guy Harris1-11/+11
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-11-27Change "conversation_set_dissector()" to take a dissector handle, ratherGuy Harris1-3/+3
than a pointer to a dissector function, as an argument. This means that the conversation dissector is called through "call_dissector()", so the dissector itself doesn't have to worry about checking whether the protocol is enabled or setting "pinfo->current_proto", so get rid of the code that does that in conversation dissectors. Also, make the conversation dissectors static. Get rid of some direct calls to dissectors; replace them with calls through handles, and, again, get rid of code to check whether a protocol is enabled and set "pinfo->current_proto" where that code isn't needed. Make those dissectors static if they aren't already static. Add a routine "create_dissector_handle()" to create a dissector handle without registering it by name, if the dissector isn't used outside the module in which it's defined. svn path=/trunk/; revision=4281
2001-09-08From Jason Lango:Guy Harris1-17/+121
Clean up RTSP Transport parsing and sub-conversation code. Dissect RTP/MP4 (and other RTP/xxx) as RTP/AVP (for now). svn path=/trunk/; revision=3912
2001-09-03Instead of having a single datum attached to a conversation, have a listGuy Harris1-7/+4
of protocol-id-plus-datum pairs, so that multiple protocols can attach information to the same conversation. Dissectors that attach information to a conversation should not assume that if they find a conversation it has one of its data attached to it; the conversation might've been created by another dissector. svn path=/trunk/; revision=3901
2001-08-18From Jason Lango:Guy Harris1-18/+29
Make sure that we can handle the lack of 'server_port=' when setting up a conversation dissector. Squelch some signed vs. unsigned comparison warnings. Changes to match only on the destination address in conversations, because the server might send back a packet from an address other than the address to which its client sent the packet, so we construct a conversation with no second address. svn path=/trunk/; revision=3845
2001-06-19Get rid of global references to "pi" - use "pinfo" instead.Guy Harris1-5/+6
svn path=/trunk/; revision=3572
2001-06-18From Joerg Mayer: explicitly fill in all members of aGuy Harris1-4/+4
"header_field_info" structure, including the ones that are later set by the routines to register fields. svn path=/trunk/; revision=3561
2001-05-31Support for leading LWS in RTSP headers, from Robert Tsai.Guy Harris1-1/+9
svn path=/trunk/; revision=3493
2001-01-25Remove more "CHECK_DISPLAY_AS_DATA()" calls and "pinfo->current_proto ="Guy Harris1-5/+3
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-13Make top-level items for interleaved RTSP packets be items for the RTSPGuy Harris1-2/+2
protocol, as well as top-level items for regular RTSP, so that the filter expression "rtsp" matches both of them. svn path=/trunk/; revision=2887
2001-01-11Some cleanups.Guy Harris1-3/+3
svn path=/trunk/; revision=2880
2001-01-11Interleaved RTSP support, from Jason Lango.Guy Harris1-4/+92
svn path=/trunk/; revision=2878
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-12-27Tvbuffify the RIP and OSPF dissectors.Guy Harris1-2/+2
Change them to use facilities in Ethereal that were probably not present when they were originally written, e.g. routines to fetch 24-bit integers and to dump a bunch of raw bytes in hex. Redo them to extract data from the packet as they dissect it, rather than extracting an entire data structure at once; that way, it may be able to dissect a structure not all of which is in the packet. Dissect a bit more of the type-of-service metrics etc. in OSPF packets. Make "tvb_length_remaining()" return a "gint", not a "guint"; it returns -1 if the offset is past the end of the tvbuff. Add a "tvb_reported_length_remaining()" routine, similar to "tvb_length_remaining()". Use it instead of just subtracting an offset from "tvb_reported_length()". svn path=/trunk/; revision=2787
2000-12-02Clean up the handling of MIME headers.Guy Harris1-39/+195
Handle the Content-Length: MIME header, so that, if there's a Content-Length: header, we only process as RTSP payload the amount of data specified by that header. Handle frames with more than one RTSP message in them (the previous change allows us to do so). svn path=/trunk/; revision=2729
2000-11-30Clean up the handling of the RTSP payload a bit.Guy Harris1-6/+7
svn path=/trunk/; revision=2716
2000-11-19For each column, have both a buffer into which strings for that columnGuy Harris1-3/+3
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-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-13Use "tvb_offset_exists()" rather than "tvb_length_remaining()" to checkGuy Harris1-2/+2
whether there's any data left in the tvbuff starting at a specified offset. svn path=/trunk/; revision=2636
2000-11-12As RFC 2327 says, "SDP is purely a format for session description - itGuy Harris1-3/+1
does not incorporate a transport protocol, and is intended to use different transport protocols as appropriate including the Session Announcement Protocol [4], Session Initiation Protocol [11], Real- Time Streaming Protocol [12], electronic mail using the MIME extensions, and the Hypertext Transport Protocol." As such, it shouldn't set the protocol column to SDP, as that means the protocol column won't indicate what the transport protocol was; instead, it should append "/SDP" to the protocol column - RTSP was, after calling "dissect_sdp()", setting the protocol column to "RTSP/SDP", and this change means that all protocols using SDP will have the protocol column set in that fashion, and that the RTSP dissector doesn't have to explicitly set the protocol column to cause that to happen. svn path=/trunk/; revision=2624
2000-11-10Tvbuffify the SAP and SDP dissectors.Guy Harris1-7/+6
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-09Tvbuffify the HTTP, NNTP, RSH, RTSP, and Telnet dissectors.Guy Harris1-127/+202
Add "tvb_find_line_end()", to find a CR and/or LF-terminated line in a tvbuff and return its length and the offset of the character after the line end, for the use of those dissectors. Add "tvb_strncaseeql()", which is like "tvb_strneql()" except that it does a case-insensitive comparison. svn path=/trunk/; revision=2590
2000-10-21Support for conversations with "wildcard" destination addresses, fromGuy Harris1-3/+3
Jeff Foster. svn path=/trunk/; revision=2523
2000-10-19Andreas Sikkema's new H.261 and TPKT dissectors, replacement RTCP andGuy Harris1-3/+3
RTP dissectors, and changes to the Q.931 dissector for use with H.323. svn path=/trunk/; revision=2511