aboutsummaryrefslogtreecommitdiffstats
path: root/packet-rtp.c
AgeCommit message (Collapse)AuthorFilesLines
2001-12-03Get rid of the lists of conversation dissectors; instead, have aGuy Harris1-4/+4
dissector table contain both a hash table, to use to look up port numbers to find a dissector, and a list of all dissectors that *could* be assigned to ports in that hash table, to be used by user interface code. Make the "Decode As" dialog box code use that. Also make it *not* let you choose whether to set the dissector for both the UDP and TCP versions of a port; some protocols run only atop TCP, some run only atop UDP, and even those that can run atop both may have different dissector handles to use over TCP and UDP, so handling a single merged list would be a mess. (If the user is setting the dissector for a TCP port, only those protocols that Ethereal can handle over TCP should be listed; if the user is setting the dissector for a UDP port, only those protocols that Ethereal can handle over TCP should be listed; if the user is setting a dissector for both, only those protocols that Ethereal can handle over *both* TCP *and* UDP should be listed, *and* there needs to be a way to let the "Decode As" code get both the TCP handle *and* the UDP handle and use the right ones. If somebody really wants that, they need to implement all of the above if they want the code to be correct.) Fix the code that handles setting the dissection for the IP protocol number to correctly update the lists of protocols being dissected as TCP and as UDP; the code before this change wasn't updating the single such list to add new protocols. svn path=/trunk/; revision=4311
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-10/+8
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-11-26Switched from using CHECK_DISPLAY_AS_DATA to using CHECK_DISPLAY_AS_XEd Warnicke1-2/+2
which also takes a handle as an argument and thus doesn't call dissect_data directly. svn path=/trunk/; revision=4270
2001-11-26Moved from using dissect_data() to using call_dissector()Ed Warnicke1-2/+4
svn path=/trunk/; revision=4269
2001-09-08From Jason Lango:Guy Harris1-1/+3
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-15/+20
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-07-16Convert a bunch of "proto_tree_add_bytes(tree, hf, tvb, offset, length,Guy Harris1-2/+2
tvb_get_ptr(tvb, offset, length))" calls to "proto_tree_add_item()" calls. Do the same, in "packet-iscsi.c" and "packet-mrdisc.c", for "proto_tree_add_uint()" and "proto_tree_add_boolean()" calls. svn path=/trunk/; revision=3726
2001-07-03Use the "pinfo" argument, rather than the global "pi", to refer to theGuy Harris1-5/+5
packet information in tvbuffified dissectors. svn path=/trunk/; revision=3645
2001-06-18From Joerg Mayer: explicitly fill in all members of aGuy Harris1-17/+17
"header_field_info" structure, including the ones that are later set by the routines to register fields. svn path=/trunk/; revision=3561
2001-06-15Clean up the handling of RTP padding.Guy Harris1-28/+73
svn path=/trunk/; revision=3550
2001-06-14Bug fix from Francisco Javier Cabello.Guy Harris1-1/+2
svn path=/trunk/; revision=3549
2001-06-14Set the reported length of the tvbuff we hand to the MPEG1 dissector.Guy Harris1-3/+5
svn path=/trunk/; revision=3545
2001-06-14RFC 2250 MPEG1 support, from Francisco Javier Cabello.Guy Harris1-2/+9
svn path=/trunk/; revision=3544
2001-06-14If we see an RTP packet for a version of the protocol other than versionGuy Harris1-10/+54
2, don't try to dissect any of it other than the version field. Don't try to dissect the RTP data and padding if there's more padding than data.... svn path=/trunk/; revision=3541
2001-06-12Give a number of files RCS IDs.Guy Harris1-1/+2
Give "proto_hier_stats.h" a standard header. svn path=/trunk/; revision=3540
2001-05-27Call the H.261 dissector through a handle.Guy Harris1-11/+24
Set the reported length of the tvbuff we hand to the H.261 dissector. svn path=/trunk/; revision=3464
2001-02-07Add in the various payload type definitions from RFC 1890.Guy Harris1-17/+46
svn path=/trunk/; revision=2997
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-09Add tables of "conversation" dissectors, which are associated withGuy Harris1-0/+10
particular protocols, and which keep track of all dissectors that could be associated with conversations using those particular protocols - for example, the RTP and RTCP dissectors could be assigned to UDP conversations. This is for future use with UI features allowing the dissector for a given conversation to be set from the UI, to allow 1) conversations between two ports, both of which have dissectors associated with them, that have been given to the wrong dissector to be given to the right dissector; 2) conversations between two ports, neither of which have dissectors associated with them, to be given to a dissector (RTP and RTCP, for example, typically run on random ports, and if you don't have, in a capture, traffic that would say "OK, traffic between these two hosts and ports will be RTP traffic", you may have to tell Ethereal explicitly what protocol the conversation is). svn path=/trunk/; revision=2848
2001-01-03Have "proto_register_protocol()" build a list of data structures forGuy Harris1-1/+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-19For each column, have both a buffer into which strings for that columnGuy Harris1-1/+1
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-05Make the RTCP, RTP, WSP, and WTP dissectors check whether theirGuy Harris1-4/+12
protocols have been disabled. Get rid of the "no tvbuff" dissectors for WSP and WTP - they're not used (and shouldn't ever be used). Make "dissect_wtp()" static, as it's not used outside "packet-wtp.c". svn path=/trunk/; revision=2568
2000-10-21Support for conversations with "wildcard" destination addresses, fromGuy Harris1-4/+7
Jeff Foster. svn path=/trunk/; revision=2523
2000-10-19Andreas Sikkema's new H.261 and TPKT dissectors, replacement RTCP andGuy Harris1-153/+555
RTP dissectors, and changes to the Q.931 dissector for use with H.323. svn path=/trunk/; revision=2511
2000-08-13Add the "Edit:Protocols..." feature which currently only implementsLaurent Deniel1-1/+3
the following: It is now possible to enable/disable a particular protocol decoding (i.e. the protocol dissector is void or not). When a protocol is disabled, it is displayed as Data and of course, all linked sub-protocols are disabled as well. Disabling a protocol could be interesting: - in case of buggy dissectors - in case of wrong heuristics - for performance reasons - to decode the data as another protocol (TODO) Currently (if I am not wrong), all dissectors but NFS can be disabled (and dissectors that do not register protocols :-) I do not like the way the RPC sub-dissectors are disabled (in the sub-dissectors) since this could be done in the RPC dissector itself, knowing the sub-protocol hfinfo entry (this is why, I've not modified the NFS one yet). Two functions are added in proto.c : gboolean proto_is_protocol_enabled(int n); void proto_set_decoding(int n, gboolean enabled); and two MACROs which can be used in dissectors: OLD_CHECK_DISPLAY_AS_DATA(index, pd, offset, fd, tree) CHECK_DISPLAY_AS_DATA(index, tvb, pinfo, tree) See also the XXX in proto_dlg.c and proto.c around the new functions. svn path=/trunk/; revision=2267
2000-05-31Add routines for adding items to a protocol tree that take arguments ofGuy Harris1-2/+2
a particular type, rather than taking a varargs list, along the lines of the "proto_tree_add_XXX_format()" routines. Replace most calls to "proto_tree_add_item()" and "proto_tree_add_item_hidden()" with calls to those routines. Rename "proto_tree_add_item()" and "proto_tree_add_item_hidden()" to "proto_tree_add_item_old()" and "proto_tree_add_item_hidden_old()", and add new "proto_tree_add_item()" and "proto_tree_add_item_hidden()" routines that don't take the item to be added as an argument - instead, they fetch the argument from the packet whose tvbuff was handed to them, from the offset handed to them. svn path=/trunk/; revision=2031
2000-05-11Add tvbuff class.Gilbert Ramirez1-17/+17
Add exceptions routines. Convert proto_tree_add_*() routines to require tvbuff_t* argument. Convert all dissectors to pass NULL argument ("NullTVB" macro == NULL) as the tvbuff_t* argument to proto_tree_add_*() routines. dissect_packet() creates a tvbuff_t, wraps the next dissect call in a TRY block, will print "Short Frame" on the proto_tree if a BoundsError exception is caught. The FDDI dissector is converted to use tvbuff's. svn path=/trunk/; revision=1939
2000-05-09Change from Jason Lango to put timestamps in the RTP summary column.Guy Harris1-5/+5
svn path=/trunk/; revision=1929
2000-04-21Support for RTCP and RTP, from Jason Lango.Guy Harris1-0/+215
svn path=/trunk/; revision=1885