aboutsummaryrefslogtreecommitdiffstats
path: root/packet-bxxp.c
AgeCommit message (Collapse)AuthorFilesLines
2001-07-03Use the "pinfo" argument, rather than the global "pi", to refer to theguy1-6/+6
packet information in tvbuffified dissectors. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3645 f5534014-38df-0310-8fa8-9805f1628bb7
2001-06-18From Joerg Mayer: explicitly fill in all members of aguy1-19/+19
"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-04-27More signed-vs-unsigned changes from Joerg Mayer.guy1-15/+16
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3386 f5534014-38df-0310-8fa8-9805f1628bb7
2001-04-23Get rid of NullTVB references.guy1-5/+5
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3362 f5534014-38df-0310-8fa8-9805f1628bb7
2001-01-22Remove more "CHECK_DISPLAY_AS_DATA()" calls and "pinfo->current_proto ="guy1-6/+4
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. Don't use col_add_fstr(..., "%s", string); Use col_add_str(..., string); as it does the same thing, but doesn't drag all the heavy *printf machinery in. Fix the DDTP dissector to set the Info column regardless of whether we're building a protocol tree or not, and to set it to "Encrypted payload" if the payload is encrypted. Also fix a typo in a field name. Register the FTP data dissector as being associated with the FTP data protocol, not the FTP protocol (the removed "CHECK_DISPLAY_AS_DATA()" call checked "proto_ftp_data", and the removed "pinfo->current_proto =" line set it to "FTP-DATA", so it should be associated with "proto_ftp_data"). Make the H1 dissector check whether the frame has at least 2 bytes in it before checking the first two bytes; heuristic dissectors must not throw exceptions until they've accepted the packet as one of theirs. Use "tvb_format_text()" rather than "tvb_get_ptr()" and "format_text()" in some dissectors where the result of "tvb_get_ptr()" is used only in the "format_text()" call. In the Quake dissector, don't check whether there are at least 4 bytes in the packet - if we return, the packet won't be dissected at all (it's not as if some other dissector will get to handle it), and, if we don't return, we'll throw an exception if there aren't at least 4 bytes in the packet, so the packet will be marked as short or malformed, as appropriate. In the RIPng dissector, associate the table of strings for the command field with the command field, so that the dissector doesn't have to format the string for the protocol tree entry itself, and so that the filter construction dialog box can let you select "Request" or "Response" from a list rather than requiring you to know the values for "Request" and "Response". Make "dissect_rpc()" static, as it's called only through a heuristic dissector list. Use "col_set_str()" to set the COL_PROTOCOL column for RPC protocols; the string used is from a table provided by the dissector, and is a string constant. Don't format the Info column for WSP into a buffer and then format that buffer into the column with "%s" - "col_add_fstr()" can do the formatting for you, without having to allocate your own buffer (or run through the *printf machinery twice). Don't fetch fields from the WTP packet until you're ready to use them, so that you don't throw an exception before you even set the Protocol column or clear the Info column. Use "pinfo->destport", not "pi.destport", in the Zebra dissector when checking whether the packet is a request or reply, and do the check by comparing with "pinfo->match_port" rather than TCP_PORT_ZEBRA (so that if the dissector is ever registered on another port, it still correctly determines whether the packet is a request or reply - the Network Monitor HTTP dissector has port 80 wired into its brain, which is a bit irritating if you're trying to get it to dissect HTTP proxy traffic on port 3128 or proxy administration UI traffic on port 3132). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2931 f5534014-38df-0310-8fa8-9805f1628bb7
2001-01-09Add an additional "protocol index" argument to "{old_}dissector_add()",guy1-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....) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2849 f5534014-38df-0310-8fa8-9805f1628bb7
2001-01-03Add a new "prefs_register_protocol()" routine, which is likeguy1-2/+2
"prefs_register_module()" except that it takes a protocol index as returned by "proto_register_protocol()" as its first argument, rather than taking two character strings as arguments as its first two arguments, and uses the protocol's abbreviation as the name to use for preferences in the preferences file and the "-o" flag and uses the protocol's short name as the name to use in the tabs in the "Edit->Preferences" window. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2812 f5534014-38df-0310-8fa8-9805f1628bb7
2001-01-03Have "proto_register_protocol()" build a list of data structures forguy1-9/+8
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-12-02Some tvbuffified dissectors weren't setting "pinfo->current_proto", soguy1-1/+3
that if they threw an exception, the wrong protocol would be blamed. Add the missing assignments. Clean up the extraction of the null-encapsulation header. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2730 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-10-24Fixing a small bug that Guy Harris noticed.sharpe1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2532 f5534014-38df-0310-8fa8-9805f1628bb7
2000-10-21Support for conversations with "wildcard" destination addresses, fromguy1-3/+4
Jeff Foster. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2523 f5534014-38df-0310-8fa8-9805f1628bb7
2000-10-09Adding a small attribution to Invisible Worlds and Collab.Net as thesharpe1-1/+4
sponsors of the BXXP dissector ... git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2483 f5534014-38df-0310-8fa8-9805f1628bb7
2000-10-07Squash one more little bug where I wasn't handling the MIME headersharpe1-5/+7
properly if a BXXP message occurrect after a SEQ but in the same segment. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2479 f5534014-38df-0310-8fa8-9805f1628bb7
2000-10-05Added further state keeping so I can distinguish the first message fromsharpe1-40/+176
continuations, as only the first has a MIME header. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2477 f5534014-38df-0310-8fa8-9805f1628bb7
2000-10-03Updates to allow CR and LF to be used (incorrectly) as terminators and tosharpe1-67/+103
be flagged as incorrect terminators. These allow people who are developing implementations of the protocol to see where they have gone wrong. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2475 f5534014-38df-0310-8fa8-9805f1628bb7
2000-10-02Add some clean up to the bxxp dissector and really handle all packets onsharpe1-126/+296
the first pass. This got to be really ugly, as I now push the test for a tree all the way down into a lot of routines and parse the messages, but only add things to the protocol tree if we were passed a protocol tree. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2472 f5534014-38df-0310-8fa8-9805f1628bb7
2000-09-12This completes the tvbuffication of packet-bxxp.c, in that all the cruft is ↵sharpe1-33/+165
gone, I think. I also now handle a lot more of the BXXP protocol, and can handle multiple messages within a TCP segment. However, captures from the Linux loopback device confuse things awfully. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2414 f5534014-38df-0310-8fa8-9805f1628bb7
2000-09-08I have tvbuffified packet-bxxp.c and started on per-session and per-packetsharpe1-100/+249
state so I can dissect things correctly ... Will have to clean out all the old non-tvbuff cruft as well. Boy, I will be glad when we re-do Ethereal and have TCP segment re-assembly under control. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2397 f5534014-38df-0310-8fa8-9805f1628bb7
2000-08-30Initial BXXP dissector ...sharpe1-0/+632
Lots more work to be done. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2384 f5534014-38df-0310-8fa8-9805f1628bb7