aboutsummaryrefslogtreecommitdiffstats
path: root/epan/epan.h
AgeCommit message (Collapse)AuthorFilesLines
2005-08-02add some comments, has to be extendedUlf Lamping1-1/+13
svn path=/trunk/; revision=15190
2005-03-06"report_err.h" declares "report_failure()", so it doesn't need to beGuy Harris1-2/+0
declared in "epan.h", and, as "epan/plugins.c" now includes "report_err.h", it doesn't need to include "epan.h". svn path=/trunk/; revision=13634
2005-03-06Warning fix:Jörg Mayer1-0/+2
plugins.c:236: warning: implicit declaration of function 'report_failure' svn path=/trunk/; revision=13625
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-1/+2
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/+5
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
2002-10-22Add in a notion of "circuits", which are for virtual circuit-orientedGuy Harris1-3/+2
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=6471
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-08-28Removed trailing whitespaces from .h and .c files using theJörg Mayer1-4/+4
winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6116
2001-12-18Provide for per-protocol-tree data in the proto_tree code.Gilbert Ramirez1-20/+30
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/+3
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-2/+3
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/+6
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-10-21Use G_DIR_SEPARATOR_S rather than "/" as a pathname separator in formatGuy Harris1-12/+1
strings used to generate pathnames. Move the definition of PF_DIR from <epan/epan.h> to <epan/filesystem.h>, so that files requiring only the definition of PF_DIR don't have to include <epan/epan.h>, and get rid of no-longer-necessary includes of <epan/epan.h>. Add a routine to get the directory for "system files" such as "/etc/ethers" - it's "/etc" on UNIX, and the datafile directory on Windows (as there's no "/etc" on Windows). Use that to construct the pathname of the ethers and ipxnet files. svn path=/trunk/; revision=4056
2001-04-02Added two new arguments to epan_init() and proto_init() toEd Warnicke1-2/+3
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-02-01Create a more modular type system for the FT_* types. Put themGilbert Ramirez1-2/+5
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
2000-10-16Give libethereal its own configuration file, and have that configurationGuy Harris1-1/+3
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-6/+15
"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-28More EPAN-related code movements. Get rid of usage of #include "globals.h"Gilbert Ramirez1-0/+6
and #include "util.h" from epan code. Move get_home_dir() into epan/filesystem.c as it's used by plugins.c. svn path=/trunk/; revision=2461
2000-09-27First step in moving core Ethereal routines to libepan.Gilbert Ramirez1-0/+49
svn path=/trunk/; revision=2458