aboutsummaryrefslogtreecommitdiffstats
path: root/epan/epan.c
AgeCommit message (Collapse)AuthorFilesLines
2008-04-29Call se_free_all() in epan_cleanup() so that we will detect per-session (se_)Jeff Morriss1-0/+1
memory corruption in tshark (and Wireshark when exiting the program instead of loading a new file?). Why this wasn't always here I don't know. This may give us a pile of buildbot fuzz failures but that's a Good Thing. svn path=/trunk/; revision=25196
2007-11-30Next few improvements to speed up startup about 10%.Tomas Kukosa1-0/+3
- use GTree instead of GList for preference module lists svn path=/trunk/; revision=23679
2007-08-25get users of oid_resolv to use the new oids, rollout packet-snmp.cLuis Ontanon1-2/+2
svn path=/trunk/; revision=22651
2007-05-25Have editcap and capinfos loading the wiretap plugins.Luis Ontanon1-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. svn path=/trunk/; revision=21935
2007-05-07Updated splash screen for Wireshark that shows the initialisation progress. Graeme Lunt1-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. svn path=/trunk/; revision=21716
2007-01-02Add a WIRESHARK_RUN_FROM_BUILD_DIRECTORY environment variable on UN*X;Guy Harris1-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. svn path=/trunk/; revision=20261
2006-11-30Add GPL disclaimer, which as been missing since forever.Gilbert Ramirez1-1/+17
Thanks to Jaap Keuter for pointing this out. svn path=/trunk/; revision=20027
2006-11-21We also need the memory allocation subsystem initialized in anythingGuy Harris1-0/+4
that uses libwireshark. svn path=/trunk/; revision=19940
2006-11-21Call guids_init() in epan_init(), so anything that needs libwireshark -Guy Harris1-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). svn path=/trunk/; revision=19939
2006-09-26Re-enable lua as the windows version is already there.Luis Ontanon1-1/+1
svn path=/trunk/; revision=19327
2006-09-26Complete the workarround of prev rev, temporarilly disabling lua from unix ↵Luis Ontanon1-1/+1
as well. Luis. svn path=/trunk/; revision=19323
2006-09-26Since there's no Lua headers in windows yet, as a temporary workarround just ↵Luis Ontanon1-1/+1
declare wslua_init instead of including wslua.h. Sorry! svn path=/trunk/; revision=19322
2006-09-25Move the Lua interface into epan... (not a plugin anymore).Luis Ontanon1-0/+8
- Rename Tap into Listener - add a mechanism to pass protocols' tap data to the Listener svn path=/trunk/; revision=19319
2006-08-10GnuTLS/libgcrypt initialization moved to epan.cTomas Kukosa1-0/+21
svn path=/trunk/; revision=18863
2006-06-13new function epan_get_version()Tomas Kukosa1-0/+5
svn path=/trunk/; revision=18450
2006-05-31libethereal -> libwireshark. idl2eth -> idl2wrs. There are a _lot_ ofGerald Combs1-3/+3
changes here. It compiles OK on OS X, but hasn't been tested anywhere else. svn path=/trunk/; revision=18260
2006-05-21name changeRonnie Sahlberg1-1/+1
svn path=/trunk/; revision=18197
2005-12-06OBJECT IDENTIFIER name resolution moved to oid_resolv.cTomas Kukosa1-0/+3
svn path=/trunk/; revision=16699
2005-10-02add doxygen comments to column-utils.h and do a slight code cleanupUlf Lamping1-1/+1
svn path=/trunk/; revision=16066
2005-09-11I'm adding the "Expert Info" prototype now, as it seems to be in a state ↵Ulf Lamping1-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. svn path=/trunk/; revision=15754
2005-08-13get rid of one more gmemchunkRonnie Sahlberg1-2/+0
svn path=/trunk/; revision=15332
2005-07-22EMEM : a simple and FAST api to allocate memory that will be automatically ↵Ronnie 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. svn path=/trunk/; revision=14984
2004-09-29Move the tap infrastructure to the epan directory.Guy Harris1-1/+1
svn path=/trunk/; revision=12128
2004-08-06From Albert Chin: rename resolv.{ch} to addr_resolv.{ch}, so that anGuy Harris1-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]). svn path=/trunk/; revision=11615
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-04-16Add a "report_failure()" routine to allow dissectors to report arbitraryGuy Harris1-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. svn path=/trunk/; revision=10616
2004-03-23Make "epan_init()" take, as additional arguments, pointers to routinesGuy Harris1-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. svn path=/trunk/; revision=10470
2003-05-04Add support for asynchronous DNS updates using the GNU ADNS library.Gerald Combs1-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. svn path=/trunk/; revision=7640
2002-10-22Add in a notion of "circuits", which are for virtual circuit-orientedGuy Harris1-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. svn path=/trunk/; revision=6469
2002-09-09"dfilter_prime_proto_tree()" doesn't modify the "dfilter_t" to whichGuy Harris1-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. svn path=/trunk/; revision=6239
2002-09-04Tap api. tap is a simple api that can be used for arbitrary extensions.Ronnie 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. svn path=/trunk/; revision=6175
2002-06-04Get rid of the "data_src" member of the "frame_data" structure; put itGuy Harris1-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". svn path=/trunk/; revision=5614
2002-05-09Merge the work in Novell_NCP_branch into the mainline code.Gilbert Ramirez1-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. svn path=/trunk/; revision=5432
2002-02-18Don't give tvbuffs names; instead, give data sources names, where aGuy Harris1-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. svn path=/trunk/; revision=4749
2002-01-04Fix up white space.Guy Harris1-5/+5
svn path=/trunk/; revision=4478
2001-12-18Provide for per-protocol-tree data in the proto_tree code.Gilbert Ramirez1-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. svn path=/trunk/; revision=4422
2001-12-16Add an extra argument to "epan_dissect_new()" that indicates whether theGuy Harris1-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. svn path=/trunk/; revision=4408
2001-12-10Move the pointer to the "column_info" structure in the "frame_data"Guy Harris1-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. svn path=/trunk/; revision=4370
2001-12-06Remove proto_tree from capture_file and PacketWinData, since theyGilbert Ramirez1-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. svn path=/trunk/; revision=4343
2001-11-21Remove the global packet_info called "pi". Dissectors now onlyGilbert Ramirez1-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(). svn path=/trunk/; revision=4246
2001-04-02Added two new arguments to epan_init() and proto_init() toEd Warnicke1-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. svn path=/trunk/; revision=3237
2001-04-01Changed packet_init() to look up the frame dissector and cache itsEd Warnicke1-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 ). svn path=/trunk/; revision=3234
2001-04-01Moved the frame_data structures and functions from packet.{h,c} toEd Warnicke1-1/+3
frame_data{h,c}. Added a frame_data_init to be called by epan_init. svn path=/trunk/; revision=3223
2001-03-23Changes required to support multiple named data sources.Jeff Foster1-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. svn path=/trunk/; revision=3165
2001-02-01Create a more modular type system for the FT_* types. Put themGilbert Ramirez1-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. svn path=/trunk/; revision=2967
2001-01-26Clean up the dissector registration up a bit - arrange that all pluginsGuy Harris1-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. svn path=/trunk/; revision=2940
2000-10-16Give libethereal its own configuration file, and have that configurationGuy Harris1-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. svn path=/trunk/; revision=2498
2000-10-06Implement epan_dissect_new() and epan_dissect_free(). These are theGilbert Ramirez1-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" svn path=/trunk/; revision=2478
2000-09-30- HAVE_PLUGINS is defined in plugins.h so it must be included here.Olivier Abad1-1/+2
- get rid of the "epan" argument for init_plugins() svn path=/trunk/; revision=2471
2000-09-27First step in moving core Ethereal routines to libepan.Gilbert Ramirez1-0/+41
svn path=/trunk/; revision=2458