aboutsummaryrefslogtreecommitdiffstats
path: root/epan/epan.c
AgeCommit message (Collapse)AuthorFilesLines
2007-11-30Next few improvements to speed up startup about 10%.kukosa1-0/+3
- use GTree instead of GList for preference module lists git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@23679 f5534014-38df-0310-8fa8-9805f1628bb7
2007-08-25get users of oid_resolv to use the new oids, rollout packet-snmp.clego1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@22651 f5534014-38df-0310-8fa8-9805f1628bb7
2007-05-25Have editcap and capinfos loading the wiretap plugins.lego1-43/+1
epan/filesystem.c have get_plugin_dir() calling init_plugin_dir() if necessary epan/epan.c and epan/report_err.c move the report_failure family into the new report_err.c file, have epan_init() calling the initializer epan/plugins.h and epan/proto.c do not have init_plugins() calling the proto_reg functions instead do it in init_proto() gtk/main.c and tshark.c init_plugin_dir() has become suprefluous capinfos.c and editcap.c load the wiretap plugins Makefiles do what's needed to build withe the above changes. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21935 f5534014-38df-0310-8fa8-9805f1628bb7
2007-05-07Updated splash screen for Wireshark that shows the initialisation progress. gal1-3/+5
The splash screen shows a progress bar and a percentage complete - like the progress dialog. As dissectors are initialised and handed off the name is shown. However, the names of plugin dissectors are not shown. The update to the make-dissector-reg shell script has been tested, though I think generally the python version is used. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21716 f5534014-38df-0310-8fa8-9805f1628bb7
2007-01-02Add a WIRESHARK_RUN_FROM_BUILD_DIRECTORY environment variable on UN*X;guy1-23/+2
if set, and if the program isn't running with additional privileges, it'll treat the directory in which the program is found as the data directory. If, on Windows, the version-number subdirectory of {data directory}\plugins doesn't exist (which is assumed to mean that the program is being run from the build directory), or if, on UN*X, WIRESHARK_RUN_FROM_BUILD_DIRECTORY is set, the plugin directory is the "plugins" subdirectory of the data directory, and all subdirectories of that directory are scanned for plugins, as the "plugins" subdirectory of the build directory contains subdirectories for the plugins; this means that if we're running from the build directory, we'll find the plugins we built in the build tree. When generating the wireshark-filter man page, run tshark with WIRESHARK_RUN_FROM_BUILD_DIRECTORY set, so it uses the plugins from the build to generate the list of filters. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@20261 f5534014-38df-0310-8fa8-9805f1628bb7
2006-11-30Add GPL disclaimer, which as been missing since forever.gram1-1/+17
Thanks to Jaap Keuter for pointing this out. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@20027 f5534014-38df-0310-8fa8-9805f1628bb7
2006-11-21We also need the memory allocation subsystem initialized in anythingguy1-0/+4
that uses libwireshark. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19940 f5534014-38df-0310-8fa8-9805f1628bb7
2006-11-21Call guids_init() in epan_init(), so anything that needs libwireshark -guy1-0/+4
including dftest - will get the GUID table initialized (which anything that needs libwireshark needs to have happen, so dissectors can register GUIDs in that table). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19939 f5534014-38df-0310-8fa8-9805f1628bb7
2006-09-26Re-enable lua as the windows version is already there.lego1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19327 f5534014-38df-0310-8fa8-9805f1628bb7
2006-09-26Complete the workarround of prev rev, temporarilly disabling lua from unix ↵lego1-1/+1
as well. Luis. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19323 f5534014-38df-0310-8fa8-9805f1628bb7
2006-09-26Since there's no Lua headers in windows yet, as a temporary workarround just ↵lego1-1/+1
declare wslua_init instead of including wslua.h. Sorry! git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19322 f5534014-38df-0310-8fa8-9805f1628bb7
2006-09-25Move the Lua interface into epan... (not a plugin anymore).lego1-0/+8
- Rename Tap into Listener - add a mechanism to pass protocols' tap data to the Listener git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19319 f5534014-38df-0310-8fa8-9805f1628bb7
2006-08-10GnuTLS/libgcrypt initialization moved to epan.ckukosa1-0/+21
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18863 f5534014-38df-0310-8fa8-9805f1628bb7
2006-06-13new function epan_get_version()kukosa1-0/+5
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18450 f5534014-38df-0310-8fa8-9805f1628bb7
2006-05-31libethereal -> libwireshark. idl2eth -> idl2wrs. There are a _lot_ ofgerald1-3/+3
changes here. It compiles OK on OS X, but hasn't been tested anywhere else. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18260 f5534014-38df-0310-8fa8-9805f1628bb7
2006-05-21name changesahlberg1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18197 f5534014-38df-0310-8fa8-9805f1628bb7
2005-12-06OBJECT IDENTIFIER name resolution moved to oid_resolv.ckukosa1-0/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16699 f5534014-38df-0310-8fa8-9805f1628bb7
2005-10-02add doxygen comments to column-utils.h and do a slight code cleanupulfl1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16066 f5534014-38df-0310-8fa8-9805f1628bb7
2005-09-11I'm adding the "Expert Info" prototype now, as it seems to be in a state ↵ulfl1-0/+3
where others might have a look and probably already find it useful :-). Anyway, we can easily disable it at one or two places in the code if it get's in our way of a new release. Please see: http://wiki.ethereal.com/Development/ExpertInfo for a complete overview of the intended feature and it's current state of implementation. While I'm working on this, I've also added some more status result codes to the DCE/RPC and DCOM dissectors. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15754 f5534014-38df-0310-8fa8-9805f1628bb7
2005-08-13get rid of one more gmemchunksahlberg1-2/+0
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15332 f5534014-38df-0310-8fa8-9805f1628bb7
2005-07-22EMEM : a simple and FAST api to allocate memory that will be automatically ↵sahlberg1-0/+4
freed() when the next packet is dissected. This offesr memory allocation with a packet scope making memory leaks less likely and memory management faster. Add initialization calls for both tethereal and ethereal. Convert the ip_to_str() function to use this and avoid doing the silly rotating buffers thing it previously did. We also need an equivalent set of functions for allocation with capture file scope (free when next capture is loaded) but i dont know where to put the free_all call. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14984 f5534014-38df-0310-8fa8-9805f1628bb7
2004-09-29Move the tap infrastructure to the epan directory.guy1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@12128 f5534014-38df-0310-8fa8-9805f1628bb7
2004-08-06From Albert Chin: rename resolv.{ch} to addr_resolv.{ch}, so that anguy1-1/+1
include of <resolv.h> in any system header file gets the system <resolv.h> (needed for builds on Tru64 with GTK+ 1.2[.x]). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11615 f5534014-38df-0310-8fa8-9805f1628bb7
2004-07-18Set the svn:eol-style property on all text files to "native", so thatguy1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11400 f5534014-38df-0310-8fa8-9805f1628bb7
2004-04-16Add a "report_failure()" routine to allow dissectors to report arbitraryguy1-2/+22
errors to the user. Use that, rather than "g_warning()", in the Diameter dissector to report errors reading the dictionary. Make the format argument to "simple_dialog()" a "const" pointer. Fix up the read-error message in Tethereal to end with a newline. If a simple dialog is requested before the main window or the capture-control window is popped up, queue it up and pop the queued messages up once the main or capture-control window is displayed. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10616 f5534014-38df-0310-8fa8-9805f1628bb7
2004-03-23Make "epan_init()" take, as additional arguments, pointers to routinesguy1-3/+30
that dissectors should call to report file open and read errors, and have "report_open_failure()" and "report_read_failure()" call through those pointers, rather than being defined and exported by the application using libethereal - instead, the application would define those functions and pass pointers to them to 'epan_init()". Move "report_err.h" to the epan directory, as the functions it declares are now part of the libethereal API. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10470 f5534014-38df-0310-8fa8-9805f1628bb7
2003-05-04Add support for asynchronous DNS updates using the GNU ADNS library.gerald1-1/+4
Support can be enabled at configure time by using "--with-adns=DIR". If support is enabled, async queries happen whenever host name resolution is enabled. Do we need a separate preference for async queries? Currently, only IPv4 reverse queries are supported. I can add IPv4 forward lookup support, but I don't have any way to test IPv6 queries. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7640 f5534014-38df-0310-8fa8-9805f1628bb7
2002-10-22Add in a notion of "circuits", which are for virtual circuit-orientedguy1-3/+7
protocols (where there's a virtual circuit ID of some sort in packets) what conversations are for protocols ultimately running atop connectionless network layers. Have circuit type and ID values in the "packet_info" structure. Have the Frame Relay dissector set the circuit type and ID values, and have the Wellfleet compression protocol set up circuit information and store compression information with the circuit. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6469 f5534014-38df-0310-8fa8-9805f1628bb7
2002-09-09"dfilter_prime_proto_tree()" doesn't modify the "dfilter_t" to whichguy1-3/+2
it's handed a pointer, which means that "epan_dissect_prime_dfilter()" doesn't do so either; make that argument a "const dfilter_t *" in both cases. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6239 f5534014-38df-0310-8fa8-9805f1628bb7
2002-09-04Tap api. tap is a simple api that can be used for arbitrary extensions.sahlberg1-1/+3
One example extension is rpcstat. Try -Z rpc,rtt,100003,3 as argument to tethereal when reading a capture containing NFSv3 packets. tap-rpcstat.[ch] is intended to demonstrate the api and can be used to base other extensions on. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6175 f5534014-38df-0310-8fa8-9805f1628bb7
2002-06-04Get rid of the "data_src" member of the "frame_data" structure; put itguy1-4/+4
in the "packet_info" structure instead, as we don't need a pointer for every single frame in the capture file, just for each frame for which we currently have an open "epan_dissect_t". git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5614 f5534014-38df-0310-8fa8-9805f1628bb7
2002-05-09Merge the work in Novell_NCP_branch into the mainline code.gram1-11/+3
A little work still needs to be done on the new NCP dissector -- make some of the COL_INFO texts more useful, handle a Unicode issue, and modify some of the cases that use "request conditions". But the NCP dissector as it stands is very usable now. Note: I didn't merge in the PROTO_LENGTH_UNTIL_END macro... I wanted to think about the various possible macros and review an email conversation I had with Guy on the subject. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5432 f5534014-38df-0310-8fa8-9805f1628bb7
2002-02-18Don't give tvbuffs names; instead, give data sources names, where aguy1-5/+2
"data source" has a name and a top-level tvbuff, and frames can have a list of data sources associated with them. Use the tvbuff pointer to determine which data source is the data source for a given field; this means we don't have to worry about multiple data sources with the same name - the only thing the name does is label the notebook tab for the display of the data source, and label the hex dump of the data source in print/Tethereal output. Clean up a bunch of things discovered in the process of doing the above. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4749 f5534014-38df-0310-8fa8-9805f1628bb7
2002-01-04Fix up white space.guy1-5/+5
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4478 f5534014-38df-0310-8fa8-9805f1628bb7
2001-12-18Provide for per-protocol-tree data in the proto_tree code.gram1-22/+39
Put a hash-table of "interesting" fields in the per-proto-tree data. The dfilter code records which fields/protocols are "interesting" (by which I mean, their value or existence is checked). Thus, the proto_tree routines can create special arrays of field_info*'s that are ready for the dfilter engine to use during a filter operation. Also store the "proto_tree_is_visible" boolean, renamed "visible", in the per-proto-tree data. Move epan_dissect_t to its own header file to make #include dependencies easier to handle. Provide epan_dissect_fill_in_columns(), which accepts just the epan_dissect_t* as an argument. epan_dissect_new() needs to be followed by epan_dissect_run() for the dissection to actually take place. Between those two calls, epan_dissect_prime_dfilter() can be run 0, 1, or multiple times in order to prime the empty proto_tree with the "intersesting" fields from the dfilter_t. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4422 f5534014-38df-0310-8fa8-9805f1628bb7
2001-12-16Add an extra argument to "epan_dissect_new()" that indicates whether theguy1-2/+11
display representation should be put into protocol tree items if a protocol tree is to be constructed; have it set "proto_tree_is_visible" from that argument. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4408 f5534014-38df-0310-8fa8-9805f1628bb7
2001-12-10Move the pointer to the "column_info" structure in the "frame_data"guy1-3/+3
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4370 f5534014-38df-0310-8fa8-9805f1628bb7
2001-12-06Remove proto_tree from capture_file and PacketWinData, since theygram1-4/+13
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4343 f5534014-38df-0310-8fa8-9805f1628bb7
2001-11-21Remove the global packet_info called "pi". Dissectors now onlygram1-2/+2
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(). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4246 f5534014-38df-0310-8fa8-9805f1628bb7
2001-04-02Added two new arguments to epan_init() and proto_init() tohagbard1-3/+4
allow the passing of register_all_protocols() and register_all_protocol_handoffs() through epan_init() to proto_init(). This allows the removal of the compile time dependence of proto.c on register.h. Modified dftest.c, tethereal.c, and gtk/main.c to use the new style epan_init() and depend on register.h. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3237 f5534014-38df-0310-8fa8-9805f1628bb7
2001-04-01Changed packet_init() to look up the frame dissector and cache itshagbard1-2/+2
dissector_handle in a static variable in packet.c. Changed dissect_packet to call dissector from using the call_dissector() function and the cached dissector_handle for frame_dissector. Changed the order of function calls in epan_init() to allow for this change ( it sucks to look up a dissector when none are registered ). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3234 f5534014-38df-0310-8fa8-9805f1628bb7
2001-04-01Moved the frame_data structures and functions from packet.{h,c} tohagbard1-1/+3
frame_data{h,c}. Added a frame_data_init to be called by epan_init. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3223 f5534014-38df-0310-8fa8-9805f1628bb7
2001-03-23Changes required to support multiple named data sources.jfoster1-1/+6
Tvbuffers changed to added the data source name, GUI and printing code changed to support these changes and display the multiple hex views. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3165 f5534014-38df-0310-8fa8-9805f1628bb7
2001-02-01Create a more modular type system for the FT_* types. Put themgram1-7/+4
into epan/ftypes. Re-write display filter routines using Lemon parser instead of yacc. Besides using a different tool, the new grammar is much simpler, while the display filter engine itself is more powerful and more easily extended. Add dftest executable, to test display filter "bytecode" generation. Add option to "configure" to build dftest or randpkt, both of which are not built by default. Implement Ed Warnicke's ideas about dranges in the new display filter and ftype code. Remove type FT_TEXT_ONLY in favor of FT_NONE, and have protocols registered as FT_PROTOCOL. Thus, FT_NONE is used only for simple labels in the proto tree, while FT_PROTOCOL is used for protocols. This was necessary for being able to make byte slices (ranges) out of protocols, like "frame[0:3]" Win32 Makefile.nmake's will be added tonight. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2967 f5534014-38df-0310-8fa8-9805f1628bb7
2001-01-26Clean up the dissector registration up a bit - arrange that all pluginsguy1-6/+2
be loaded and their initialization routines called in right after we call the initialization routines for built-in dissectors, but don't call their handoff registration routines yet, and then call the handoff registration routines right after calling the handoff registration routines for built-in dissectors. Do all that in "proto_init()", rather than "epan_init()". That way, we call all dissector registration routines together, and then call all dissector handoff registration routines together; all the registration routines are called before any handoff registration routines, as is required, and, as "proto_init()" is called by "epan_init()" before "dfilter_init()" is called, all filterable fields have been registered before "dfilter_init()" is called, and no plugins have to call "dfilter_init()" themselves to get their fields registered. Remove pointers to "dfilter_init()" and "dfilter_cleanup()" from the plugin address table, as plugins shouldn't be calling them any more, and remove calls to them from plugins. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2940 f5534014-38df-0310-8fa8-9805f1628bb7
2000-10-16Give libethereal its own configuration file, and have that configurationguy1-2/+30
file, rather than the top-level Ethereal configuration file, check for "inet_aton()", "inet_pton()", and "inet_ntop()". Then make its Makefile.am include the appropriate object files if necessary. Otherwise, they don't get built and put into libethereal, and therefore attempts to link with anything in libethereal that uses them fail on platforms that lack ethem, causing the build to fail. That means a bunch of things need to be fixed to cope with libethereal having its own "config.h" file; this means removing the include of "config.h" from some libethereal header files. Move the definitions of the path names used only by "resolv.c" to "resolv.c" from "resolv.h" (so "resolv.h" doesn't need "config.h", define HAVE_PLUGINS in the configure script (so we don't have to include it in "plugins.h" to check whether HAVE_DLFCN_H is defined). Unfortunately, stuff outside libethereal needs to know PLUGIN_DIR; for now, define that in the top-level configuration file, and have Ethereal and Tethereal pass it as an argument to "epan_init()" - that should be cleaned up at some point. Remove from the top-level configure script checks for things used only in libethereal. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2498 f5534014-38df-0310-8fa8-9805f1628bb7
2000-10-06Implement epan_dissect_new() and epan_dissect_free(). These are thegram1-0/+35
"top-level" dissectors that libepan-users call, instead of dissect_packet(). The epan_dissect_t holds the tvbuff after dissection so that the tvbuff's memory is not cleared until after the proto_tree is freed. (I might stuff the proto_tree into the epan_dissect_t, too). What remains of dissect_packet() in packet.c handles the tvbuff initialiation. The real meat of dissect_packet() is now in dissect_frame(), in packet-frame.c This means that "packet.c" is no longer a dissector, os it is no longer passed to make-reg-dotc. Once dissect_fddi() gets two wrapper functions (dissect_fddi_swapped() and dissect_fddi_nonswapped()), the a dissector handoff routine could be used instead of the switch statement in dissect_frame(). I'd register a field like "wtap.encap" git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2478 f5534014-38df-0310-8fa8-9805f1628bb7
2000-09-30- HAVE_PLUGINS is defined in plugins.h so it must be included here.oabad1-1/+2
- get rid of the "epan" argument for init_plugins() git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2471 f5534014-38df-0310-8fa8-9805f1628bb7
2000-09-27First step in moving core Ethereal routines to libepan.gram1-0/+41
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2458 f5534014-38df-0310-8fa8-9805f1628bb7