aboutsummaryrefslogtreecommitdiffstats
path: root/epan
AgeCommit message (Collapse)AuthorFilesLines
2001-12-08Clean up indentation.Guy Harris1-20/+20
svn path=/trunk/; revision=4362
2001-12-08Attach a descriptive name field type and base to dissector tables; thatGuy Harris2-7/+58
specifies how the selector values used as keys in those tables are to be displayed, and the title to use when displaying the table. Use that information in the code to display the initial and current entries of various dissector tables. Have the dissector for BACnet APDUs register itself by name, and have the BACnet NPDU dissector call it iff the BAC_CONTROL_NET bit isn't set, rather than doing it with a dissector table. svn path=/trunk/; revision=4358
2001-12-07Use "-no-cpp-precomp" rather than "-traditional-cpp" on MacOS X, as perGuy Harris1-3/+17
the "The Compiler and Tools" section on http://fink.sourceforge.net/doc/porting/basics.php Do so on MacOS X regardless of whether the compiler is called "gcc" or not, as that page also indicates that the compiler is installed as "cc". svn path=/trunk/; revision=4354
2001-12-07Dfilter code finds field under *any* parent's subtree, not justGilbert Ramirez2-32/+9
the parent under which the field was registered. This is the *unoptimized* version, to give developers something to use while the optimized version is being created. svn path=/trunk/; revision=4351
2001-12-06Remove proto_tree from capture_file and PacketWinData, since theyGilbert Ramirez2-6/+16
already contain a pointer to an epan_dissect_t, which contains the proto_tree. Routines calling epan_dissect_new() do not create their own proto_tree via proto_tree_create_root(); instead, they pass a boolean to epan_dissect_new() telling it whether it should create the root proto_tree. svn path=/trunk/; revision=4343
2001-12-03Remove the no-longer-extant "conv_dissector_add()" from the list ofGuy Harris1-2/+2
plugin APIs, and add the new "dissector_add_handle()". Add an entry in the dissector table structure for "create_dissector_handle". svn path=/trunk/; revision=4314
2001-12-03A "dissector_table_t" is no longer a pointer to a hash table, it's aGuy Harris1-4/+4
pointer to a "struct dissector_table", containing a pointer to a hash table and a pointer to a list of handles. Fix "dissector_all_tables_foreach_func()" to understand that. svn path=/trunk/; revision=4312
2001-12-03Get rid of the lists of conversation dissectors; instead, have aGuy Harris2-142/+105
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-03Add a routine tro look for a given port in a given dissector table and,Guy Harris2-6/+23
if found, return the dissector handle for that port. Use that routine in the X.25 dissector; revert to attaching a dissector handle to an X.25 virtual circuit. svn path=/trunk/; revision=4310
2001-12-03Make "dissector_add()", "dissector_delete()", and "dissector_change()"Guy Harris5-119/+81
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-12-03Rename another routine to get rid of an unnecessary "1" in its name.Guy Harris1-3/+3
svn path=/trunk/; revision=4305
2001-12-03Don't bother saving or restoring "can_desegment" until you actually callGuy Harris1-13/+14
a subdissector. svn path=/trunk/; revision=4304
2001-12-03Rename and re-comment some routines to make it clearer what they do.Guy Harris1-18/+27
svn path=/trunk/; revision=4303
2001-11-29Update from Ronnie Sahlberg:Guy Harris3-7/+48
1. Changes how can_desegment works so that can_desegment is only != 0 for whichever dissector is running immediately on top of whoever offers the can_desegment service. Thus DCERPC needs no special handling to see if it can trust can_desegment (which is currently only available ontop of TCP and not ontop of tcp->nbss->smb). 2. Changes fragment reassembly of transaction smb to only show the defragmented packet for the transaction smb holding the first fragment. To see why, test it with a transaction SMB containing a ~60kb PDU or larger. The old behaviour had approximately quadratic behaviour regarding runtime for dissecting such PDUs. (example: NetShareEnum is a command which can grow really really large if the number of shares and comments are large) svn path=/trunk/; revision=4296
2001-11-27Change "conversation_set_dissector()" to take a dissector handle, ratherGuy Harris4-12/+32
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-26This should be the final bit of removing the dissect_data symbolEd Warnicke4-18/+9
from being required by anyone other than packet-data.c. It can now be accessed with call_dissector() with the name "data". dissect_data is now also of dissect_t. svn path=/trunk/; revision=4271
2001-11-26Switched from using CHECK_DISPLAY_AS_DATA to using CHECK_DISPLAY_AS_XEd Warnicke1-1/+9
which also takes a handle as an argument and thus doesn't call dissect_data directly. svn path=/trunk/; revision=4270
2001-11-24Update the Makefile.nmake files to reflect the move of "int-64bit.c" toGuy Harris1-0/+1
the "epan" subdirectory. Include "strptime.obj" in the list of object files used to build "text2pcap.exe". svn path=/trunk/; revision=4258
2001-11-22Moved int-64bit.{c,h} into epan/Ed Warnicke5-5/+619
svn path=/trunk/; revision=4248
2001-11-21Remove the pointer to the global packet_info from the table ofGilbert Ramirez1-3/+1
pointers used for plugins on win32. svn path=/trunk/; revision=4247
2001-11-21Remove the global packet_info called "pi". Dissectors now onlyGilbert Ramirez10-100/+62
access their own "pinfo". A packet_info is stored in epan_dissect_t, which is created for the dissection of a single packet. GUI functions which need to access the packet_info of the currently selected packet used to use "pi"; now they use cfile.edt->pi. cfile's "edt" member is the epan_dissect_t of the currently-selected packet. The functionality of blank_packetinfo() was moved into dissect_packet(), as that's the only place that called blank_packetinfo(), after a spurious call to blank_packetinfo() was removed from packet_list_select_cb(). svn path=/trunk/; revision=4246
2001-11-21Get rid of some unused variables.Guy Harris3-11/+3
svn path=/trunk/; revision=4239
2001-11-21Fix an earlier typo of mine.Guy Harris1-2/+2
svn path=/trunk/; revision=4238
2001-11-20Get rid of "tvb_compat()"; it's no longer needed (the one remaining callGuy Harris2-19/+3
to it returns data that's no longer used). svn path=/trunk/; revision=4237
2001-11-20Get rid of the "len" and "captured_len" members of the "packet_info"Guy Harris2-30/+3
structure; they're no longer used. svn path=/trunk/; revision=4236
2001-11-20Make the capture routines take an additional argument giving the amountGuy Harris1-8/+6
of packet data captured. Make the "BYTES_ARE_IN_FRAME()" macro take a "captured length of the packet" argument. Add some length checks to capture routines. svn path=/trunk/; revision=4235
2001-11-20"END_OF_FRAME" and "IS_DATA_IN_FRAME()" are no longer used; get rid ofGuy Harris1-13/+5
them. svn path=/trunk/; revision=4234
2001-11-20Allow the tvbuff pointer to various "proto_tree_add" routines to be nullGuy Harris1-3/+14
if (and only if) the length of the item being added is 0 (so that it has no data backing it). This means the data stream name pointer for the item in question is null; make sure we handle that. Use that for some "uses the value from the matching request" fields in the SMB Pipe protocol. svn path=/trunk/; revision=4231
2001-11-15Get rid of NullTVB, the "compat_top_tvb" member of the "packet_info"Guy Harris5-23/+7
structure, the check for a null tvbuff pointer in "alloc_field_info()", and the "tvb_create_from_top()" macro; they're no longer needed, as there's no non-tvbuffified dissector code remaining. svn path=/trunk/; revision=4205
2001-11-13Hopefully the last time I have to change my e-mail address.Gilbert Ramirez7-13/+13
svn path=/trunk/; revision=4199
2001-11-04Include "conversation.h", as the plugin API now includes the routines toGuy Harris1-1/+2
create and find conversations. svn path=/trunk/; revision=4155
2001-11-04Declare routines exported to plugins through the plugin API table asGuy Harris2-15/+15
extern, so that "plugin_api_defs.h" works on platforms where you have to use the plugin API table. svn path=/trunk/; revision=4151
2001-11-04Additional routines made available to plugins, from Tomas Kukosa.Guy Harris1-2/+9
svn path=/trunk/; revision=4150
2001-11-03Tvbuffification of Negotiate Protocol, from Ronnie Sahlberg.Guy Harris1-3/+15
Fix up Info column to put "Request" or "Response" *after* the name of the request. Give the Negotiate Protocol request its full name. svn path=/trunk/; revision=4139
2001-11-03TVBUFF_SUBSET tvbuffs share a "ds_name" with the parent tvbuff, so theirGuy Harris1-5/+11
"ds_name"s shouldn't be freed when the tvbuff is freed. (Thanks and a tip of the Hatlo hat to the FreeBSD memory allocator for complaining about multiple frees of the same string.) svn path=/trunk/; revision=4136
2001-11-03More indentation fixes.Guy Harris1-2/+2
svn path=/trunk/; revision=4135
2001-11-03When freeing the "gpa_hfinfo" pointer array, free the array itself, asGuy Harris1-3/+3
well as the structure containing it. svn path=/trunk/; revision=4131
2001-11-03Rename the "private" member of the "packet_info" structure toGuy Harris2-4/+4
"private_data", to keep C++ compilers from getting heartburn. svn path=/trunk/; revision=4130
2001-11-03Fix the indentation.Guy Harris1-4/+4
svn path=/trunk/; revision=4129
2001-11-02Fix leak of ds_name. Thanks to Sirop Erable <matrix_ottawa@yahoo.ca>Gilbert Ramirez1-1/+6
svn path=/trunk/; revision=4128
2001-11-02Add support for 64-bit signed integers in "int-64bit.[ch]", add anGuy Harris4-11/+267
FT_INT64 type, and make the Diameter dissector use it. Handle the 64-bit integer types in the display filter semantics checks. svn path=/trunk/; revision=4125
2001-10-31Put "extern" in front of a pile of function declarations.Guy Harris4-206/+222
It makes no difference if they really are function declarations; however, in plugins, when building on OSes that don't let dynamically-loaded modules access functions in the main program (e.g., Windows), when compiling a plugin, <plugin_api.h> defines the names of those functions as (*pointer_name), so they turn into declarations of pointer variables pointing to the functions in question, and, on platforms with a def/ref model in the linker, if a plugin has more than one source file that gets linked into the plugin, the linker may get upset at two definitions of the same variable. svn path=/trunk/; revision=4114
2001-10-31Get rid of a bunch of stuff that was there to support non-tvbuffifiedGuy Harris5-132/+30
dissectors and that's no longer needed. svn path=/trunk/; revision=4112
2001-10-29Stop using "tvb_get_ntohll()" and "%llX" in the BOOTP dissector, as theGuy Harris4-63/+4
former depends on having "guint64" and the latter depends on "%ll[douxX]" being what's used to print 64-bit integers, and there are platforms on which Etheeal runs that don't have "guint64" or that don't use "%ll[douxX]" to print 64-bit integers. Get rid of the routines to extract 64-bit integers into "gint64"s and "guint64"s, as per Ronnie Sahlberg's suggestion, to discourage people from writing code that won't work on all platforms; they should be using FT_UINT64, or the routines in "int-64bit.c", instead. svn path=/trunk/; revision=4102
2001-10-29From Ronnie Sahlberg: FT_UINT64 support, code to handle 64-bit integersGuy Harris4-6/+130
without requiring compiler support for them, and updates to the Diameter, L2TP, NFS, and NLM dissectors to use it and to the ONC RPC dissector to allow ONC RPC subdissectors to use it. svn path=/trunk/; revision=4099
2001-10-28Clean up another signed vs. unsigned comparison warning - ifGuy Harris1-2/+6
"snprintf()" returns a negative number, that's an error, and we assume "errno" was set and return NULL, otherwise we cast its return value to "size_t" and compare it with the size of the buffer we were given, and, if it was bigger, we know that "snprintf()" didn't generate all the characters it could be cause they wouldn't have fit, so we set "errno" to ENOSPC and return NULL. svn path=/trunk/; revision=4095
2001-10-28Check, in the configure script in the epan directory, whether we haveGuy Harris2-2/+6
"strptime()" and, if not, define NEED_STRPTIME_H. svn path=/trunk/; revision=4093
2001-10-28From Mike Frisch: Win32 systems don't have "strptime()", so we need toGuy Harris1-1/+2
use a replacement "strptime()" on those systems, and thus need to include "strptime.h" to declare "strptime()". svn path=/trunk/; revision=4092
2001-10-28"ftypes" and "dfilter" should depend on "config.h", so that if itGuy Harris1-2/+2
doesn't exist, or is out of date with respect to "config.h.win32", it's remade - stuff in "ftypes" and "dfilter" includes "config.h", and it should get the "config.h" in "epan". svn path=/trunk/; revision=4091
2001-10-26Fix some signed/unsigned comparison warnings. In the case of tvbuff.h,Gilbert Ramirez6-31/+34
there were 2 functions which accepted 'maxlength' == -1, but the function prototypes had maxlength as a guint --- fixed. svn path=/trunk/; revision=4087