aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/plugin_api.h
Commit message (Collapse)AuthorAgeFilesLines
* From Tomas Kukosa: export more routines to plugins.Guy Harris2002-11-141-1/+31
| | | | svn path=/trunk/; revision=6630
* Removed trailing whitespaces from .h and .c files using theJörg Mayer2002-08-281-4/+4
| | | | | | | winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6116
* From Tomas Kukosa: add some more routines to the plugin API.Guy Harris2002-08-141-1/+7
| | | | | | | While we're at it, add "extern" to a bunch of function declaration the preceding change *didn't* require to have the "extern" added. svn path=/trunk/; revision=5995
* From Anand V. Narwani:Guy Harris2002-07-121-1/+4
| | | | | | | | | | | | | | | DOCSIS support, including support for "Ethernet" captures where the raw frame is a DOCSIS frame rather than an Ethernet frame (some Cisco cable-modem head-end gear can send out a trace of all traffic on an Ethernet, but what it sends are the raw bytes of DOCSIS frames, not Ethernet frames) Get rid of second AUTHORS entry for Devin Heitmueller, merging its item into the older entry. Clean up the order of some lists of plugin items. svn path=/trunk/; revision=5861
* Put the pointer to "tcp_dissect_pdus()" in the function pointer tableGuy Harris2002-05-051-3/+3
| | | | | | | | | | | | where the pointer to "dissect_data()" was in 0.9.3; the pointer to "dissect_data()" wasn't initialized in 0.9.3 (as the function wasn't exported - you call it through a handle), so no plugin should have been using it, and putting the pointer to "tcp_dissect_pdus()" in its place means the structure offsets of all function pointers after it will be the same in 0.9.3 and the next release, preserving binary compatibility for plugins. svn path=/trunk/; revision=5395
* Make a "tcp_dissect_pdus()" with the standard loop for a TCP segment,Guy Harris2002-05-051-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | extracting PDUs from it and possibly doing reassembly. Make the COPS, DNS, DSI, Gryphon, and SCCP dissectors use it. Add "set_actual_length()", "tcp_dissect_pdus()", "decode_boolean_bitfield()", "decode_numeric_bitfield()", and "decode_enumerated_bitfield()" to the list of routines available to dissectors on platforms where routines in the main program aren't available to dynamically-loaded code. Declare routines in "to_str.h" as "extern"; as I remember, that's necessary to allow the "decode_XXX_bitfield()" routines declared therein to be made available to plugins as per the above. Note that new exported routines should be added to the end of the table if that's the only change being made to the table. Create a new "plugin_api_decls.h" header file, used to declare both the "p_" variables and the "p_" structure members in the routine-exporting mechanism; this reduces the number of places you have to change to change the list of exported routines. svn path=/trunk/; revision=5394
* Handle TPKT packets split across segment boundaries, and multiple TPKTGuy Harris2002-02-221-2/+8
| | | | | | | | | | | | | packets per segment. Instead of having a routine for dissectors such as the Q.931 dissector to call to dissect the TPKT header, have a routine that does all the reassembly and multiple-packets-per-segment work, and have the Q.931 dissector call it. Export "is_tpkt()", and the new routine, to plugins. Add preferences for TPKT and Q.931 reassembly. svn path=/trunk/; revision=4778
* Export "conversation_set_dissector()" in the plugin API table.Guy Harris2002-02-201-3/+6
| | | | svn path=/trunk/; revision=4760
* Routines added to the plugin table, and include-once #ifndef/#defineGuy Harris2002-02-021-1/+10
| | | | | | wrappers added to plugin header files, by Charlie Duke. svn path=/trunk/; revision=4676
* Support for capturing on, and reading captures from, OpenBSD firewallGuy Harris2002-01-291-1/+2
| | | | | | logging virtual interface, from Mike Frantzen. svn path=/trunk/; revision=4616
* Include files from the "epan" directory and subdirectories thereof withGuy Harris2002-01-211-3/+3
| | | | | | | | | | | | | "epan/..." pathnames, so as to avoid collisions with header files in any of the directories in which we look (e.g., "proto.h", as some other package has its own "proto.h" file which it installs in the top-level include directory). Don't add "-I" flags to search "epan", as that's no longer necessary (and we want includes of "epan" headers to fail if the "epan/" is left out, so that we don't re-introduce includes lacking "epan/"). svn path=/trunk/; revision=4586
* Long NCP traces can easily have many packets whose "uniqueness"Gilbert Ramirez2002-01-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | variables wrap-around. Since the request/reply packets are related via a hash based on these uniqueness variables, long NCP traces can have mis-matches reqeust/reply records. Thus, only do the hash-lookup for the reply packet during the first sequential scan of the trace file. Once the pertinent info is found, store it in the packet's private data area. Since the memory allocated for the hash and for the structures that make up the keys are no longer needed after the first sequential run through the trace file, arrange to free that memory after the first sequential run. Similar to the register_init_routine() that allows dissectors to register callbacks for calling *before* a capture file is loaded, set up a register_postseq_cleanup_routine() function that allows dissectors to register callbacks for calling *after* the first sequential run-through of the trace file is made. This is not a *final* cleanup callback, since Ethereal will still have that trace file open for random-access reading. I didn't have tethereal call postseq_cleanup_all_protocols() since tethereal doesn't keep the trace file open for random-access reading. I could easily be swayed to make tethereal call that function, however. svn path=/trunk/; revision=4484
* Remove the no-longer-extant "conv_dissector_add()" from the list ofGuy Harris2001-12-031-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
* Make "dissector_add()", "dissector_delete()", and "dissector_change()"Guy Harris2001-12-031-1/+2
| | | | | | | | 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
* This should be the final bit of removing the dissect_data symbolEd Warnicke2001-11-261-3/+1
| | | | | | | | 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
* Finish removing the pointer to the no-longer-extant global "packet_info"Guy Harris2001-11-241-3/+1
| | | | | | structure "pi" from the plugin API. svn path=/trunk/; revision=4259
* Hopefully the last time I have to change my e-mail address.Gilbert Ramirez2001-11-131-2/+2
| | | | svn path=/trunk/; revision=4199
* Include "conversation.h", as the plugin API now includes the routines toGuy Harris2001-11-041-1/+2
| | | | | | create and find conversations. svn path=/trunk/; revision=4155
* Additional routines made available to plugins, from Tomas Kukosa.Guy Harris2001-11-041-9/+18
| | | | svn path=/trunk/; revision=4150
* Stop using "tvb_get_ntohll()" and "%llX" in the BOOTP dissector, as theGuy Harris2001-10-291-7/+1
| | | | | | | | | | | | | | 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
* Enable building of the coseventcomm plugin on Win32.Gilbert Ramirez2001-10-171-4/+25
| | | | | | Some of these changs are from Frank Singleton, some are mine. svn path=/trunk/; revision=4035
* From Thomas Wittwer: add "prefs_register_string_preference()" to theGuy Harris2001-09-041-1/+2
| | | | | | list of functions available to plugins. svn path=/trunk/; revision=3906
* Add a "proto_item_append_text()" routine, which is likeGuy Harris2001-08-291-1/+2
| | | | | | | | "proto_item_set_text()" except that it appends the result of the formatting to the item's current text, rather than replacing the item's current text. Use it in the DNS dissector. svn path=/trunk/; revision=3880
* Get rid of "proto_tree_add_notext()" - if you create a subtree using it,Guy Harris2001-08-281-4/+1
| | | | | | | | | | | | | but, before you set the text, you throw an exception while putting stuff under the subtree, you end up with an absolutely blank protocol tree item, which is really gross. Instead of calling "proto_tree_add_notext()", call "proto_tree_add_text()" with at least a minimal label - yes, it does mean you do some work that will probably be unnecessary, but, absent a scheme to arrange to do that work if it *is* necessary (e.g., catching exceptions), the alternative is an ugly protocol tree display. svn path=/trunk/; revision=3879
* Add a bunch of routines used by GIOP plugins to the plugin addressGuy Harris2001-07-221-2/+11
| | | | | | table. svn path=/trunk/; revision=3764
* Get rid of support for non-tvbuffified plugin dissectors.Guy Harris2001-04-251-3/+1
| | | | svn path=/trunk/; revision=3385
* Make "col_set_str()" and "tvb_reported_length_remaining()" available inGuy Harris2001-04-251-1/+3
| | | | | | plugins. svn path=/trunk/; revision=3384
* Add "col_clear()" to the list of functions in the transfer vector forGuy Harris2001-01-281-1/+2
| | | | | | | | | | plugins, as the MGCP dissector uses it. Don't set pointers to "dfilter_init()" and "dfilter_cleanup()" in that transfer vector, as there *aren't* any pointers to them in the transfer vector. svn path=/trunk/; revision=2949
* Clean up the dissector registration up a bit - arrange that all pluginsGuy Harris2001-01-261-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Tvbuffify the PIM dissector.Guy Harris2001-01-131-2/+1
| | | | | | | It was the last dissector that used "old_call_dissector()", and tvbuffifying it got rid of that, so get rid of "old_call_dissector()". svn path=/trunk/; revision=2892
* Add a new "prefs_register_protocol()" routine, which is likeGuy Harris2001-01-031-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. svn path=/trunk/; revision=2812
* Use GLib's G_MODULE_EXPORT when defining constants and functionsGuy Harris2000-11-291-10/+1
| | | | | | exported by a plugin, rather than defining our own DLLEXPORT. svn path=/trunk/; revision=2713
* Add a mechanism by which a dissector can be registered by name, anotherGuy Harris2000-11-151-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dissector can get a "handle" for that dissector by name and then call that dissector through the handle. This allows dissectors that can't be called through a port table or a heuristic table to be called from other dissectors without directly referring to the dissector function - dynamically-loaded modules, under Windows, cannot directly call functions in the main program, and non-plugin dissectors are in the main program and thus cannot be called from plugin dissectors unless either 1) a pointer to the dissector is put in the Big Transfer Vector or 2) some other mechanism for getting a pointer to the dissector is provided. This mechanism could also support registering old-style dissectors and calling them from new-style dissectors without the new-style dissector having to do the argument translation itself (I didn't add support for registering old-style dissectors because I'd prefer to have people tvbuffify their code if they have to register a dissector...). It could also, in the future, perhaps support disabling of protocols; setting "pinfo->current_proto"; inside "call_dissector()" - and inside "{old_}dissector_try_port()" and "{old_"dissector_try_heuristic()" - allowing a pile of stuff that currently has to be done in every dissector be done by common code. (I have some ideas about how to do this, by having "proto_register_protocol()" take an abbreviation - of the sort that would be put in, for example, "pinfo->current_proto" - as an argument; having the calls to register dissectors take an index returned by "proto_register_protocol()" as an argument. The abbreviation could be used elsewhere as well, e.g. in the "Decoding" tab of the "Edit->Protocols" dialog box, and in a GUI for constructing protocol filters. Watch this space.) Make "dissect_sdp()" the first client of this mechanism; it's now static to "packet-sdp.c", and all dissectors that call it - including the MGCP plugin - now call it through a dissector handle fetched by "find_dissector()". (Next step - see if Ethereal can now compile on Windows as a result of this.) svn path=/trunk/; revision=2647
* "plugin_api.c" needs to include <glib.h>, to define G_HAVE_GINT64 onGuy Harris2000-11-141-2/+2
| | | | | | | | | | | | platforms that have "gint64". Fix plugin-table lines for "dissector_delete()", "dissect_data()", "prefs_register_module()", and "prefs_register_uint_preference()". The MGCP dissector uses routines from GLib, so when building it as a DLL for Windows, it has to be linked with "glib-XXX.lib". svn path=/trunk/; revision=2643
* Add "dissector_delete()", "proto_item_get_len()",Guy Harris2000-11-131-1/+12
| | | | | | | | | "proto_item_set_len()", "proto_item_set_text()", and the preference routines expected to be used by dissectors to the table of function pointers handed to dissectors on platforms where dynamically-loaded modules can't access symbols from the main program. svn path=/trunk/; revision=2638
* Add the tvbuff routines expected to be used by dissectors to the tableGuy Harris2000-11-131-1/+48
| | | | | | | of function pointers handed to dissectors on platforms where dynamically-loaded modules can't access symbols from the main program. svn path=/trunk/; revision=2635
* Add a Makefile.nmake for the MGCP plugin, and updateGuy Harris2000-11-121-1/+6
| | | | | | | | | | | | | | | | | | | | | | | "plugins/Makefile.nmake" to build that plugin. Add to the table of routines callable from plugins "old_dissector_add()", "old_dissect_data()", and "proto_is_protocol_enabled()", so that the Gryphon dissector can build on Windows. Move the includes of "plugins/plugin_api.h" and "moduleinfo.h" before all the other includes, except for "config.h", in "plugin-mgcp.c", to match what the Gryphon dissector does; "plugins_api.h" must be included before any of the routines whose names it #defines in order for the plugin to build on Windows. (It still doesn't build on Windows, as still more routines need to be added to the table of routines callable from plugins, but tomorrow is another day. Making libethereal a DLL may obviate the need for that table, *if* all the routines called from a plugin are in libethereal, as I think routines in a DLL, even a run-time-loaded DLL, can call routines from another DLL as long as those routines are exported from the other DLL.) svn path=/trunk/; revision=2622
* Miscellaneous code cleaningLaurent Deniel2000-08-111-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - add <stdarg.h> or <varargs.h> in snprintf.h and remove those inclusions in the other #ifdef NEED_SNPRINTF_H codes - remove the check of multiple inclusions in source (.c) code (there is a bit loss of _cpp_ performance, but I prefer the gain of code reading and maintenance; and nowadays, disk caches and VM are correctly optimized ;-). - protect all (well almost) header files against multiple inclusions - add header (i.e. GPL license) in some include files - reorganize a bit the way header files are included: First: #include <system_include_files> #include <external_package_include_files (e.g. gtk, glib etc.)> Then #include "ethereal_include_files" with the correct HAVE_XXX or NEED_XXX protections. - add some HAVE_XXX checks before including some system header files - add the same HAVE_XXX in wiretap as in ethereal Please forgive me, if I break something (I've only compiled and regression tested on Linux). svn path=/trunk/; revision=2254
* Fix plugin function table so that plugins work on Win32.Gilbert Ramirez2000-05-311-1/+28
| | | | svn path=/trunk/; revision=2034
* Add routines to:Guy Harris2000-05-051-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | register lists of "heuristic" dissectors, which are handed a frame that may or may contain a payload for the protocol they dissect, and that return FALSE if it's not or dissect the packet and return TRUE if it is; add a dissector to such a list; go through such a list, calling each dissector until either a dissector returns TRUE, in which case the routine returns TRUE, or it runs out of entries in the list, in which case the routine returns FALSE. Have lists of heuristic dissectors for TCP and for COTP when used with the Inactive Subset of CLNP, and add the GIOP and Yahoo Messenger dissectors to the first list and the Sinec H1 dissector to the second list. Make the dissector name argument to "dissector_add()" and "dissector_delete()" a "const char *" rarther than just a "char *". Add "heur_dissector_add()", the routine to add a heuristic dissector to a list of heuristic dissectors, to the set of routines we can export to plugins through a table on platforms where dynamically-loaded code can't call stuff in the main program, and initialize the element in the table in question for "dissector_add()" (which we'd forgotten to do). svn path=/trunk/; revision=1909
* Add "dissector_add()" to the list of routines exported to plugins viaGuy Harris2000-04-041-1/+3
| | | | | | the Big Function Pointer Table. svn path=/trunk/; revision=1797
* Give all the Ethereal APIs available to plugins their own functionGuy Harris2000-03-151-79/+52
| | | | | | | | pointers, and call the APIs by calling through the function pointers - the old technique of using wrappers didn't work, as the underlying function they all called no longer exists. svn path=/trunk/; revision=1724
* Change "unsigned gint64" to "guint64", and add GPL header to plugin_api.[ch]Gilbert Ramirez2000-02-071-0/+22
| | | | svn path=/trunk/; revision=1606
* Code changes, but not Makefile changes, for enabling plugins for Win32.Gilbert Ramirez2000-02-071-0/+96
svn path=/trunk/; revision=1605