Commit Graph

111 Commits

Author SHA1 Message Date
João Valverde 02238edf92 Do not require using wsgcrypt.h
The reason to use wsgcrypt.h was to wrap it around DIAG_OFF()
macros and that should no longer be necessary.
2023-02-06 15:52:10 +00:00
João Valverde caacdae870 epan: Add a post_init() plugin routine
Epan plugins init runs before proto_init() to setup for that but there
is also a need to have a routine that runs at the end of epan_init(),
which can do pretty much anything using epan, like runnning tests.
2022-06-02 14:11:17 +00:00
David Perry e2fab18853 wsutil: New API to gather compile/runtime info 2022-02-24 13:27:08 +00:00
Moshe Kaplan 1c3a9af869 Add files with WS_DLL_PUBLIC to Doxygen
Add @file markers for most files that
contain functions exported with
WS_DLL_PUBLIC so that Doxygen will
generate documentation for them.
2021-11-29 21:27:45 +00:00
Developer Alexander 03480fd6e1 epan: export epan_set_always_visible()
Exports (DLL) epan_set_always_visible() to make it accessible for plugins.

This enables post dissection taps to access all fields.
2021-09-08 14:40:24 +00:00
Guy Harris dd5907d2a3 Consistently refer to blocks that have been modified as "modified".
"User" sounds as if the blocks belong to the user; at most, the current
user might have modified them directly, but they might also have, for
example, run a Lua script that, unknown to them, modified comments.
Also, a file might have "user comments" added by a previous user, who
them wrote the file and and provided it to the current user.

"Modified" seems a bit clearer than "changed".
2021-07-08 00:05:35 -07:00
David Perry 73087d6fb4 Use wtap_blocks for packet comments
Mostly functioning proof of concept for #14329. This work is intended to
allow Wireshark to support multiple packet comments per packet.

Uses and expands upon the `wtap_block` API in `wiretap/wtap_opttypes.h`.
It attaches a `wtap_block` structure to `wtap_rec` in place of its
current `opt_comment` and `packet_verdict` members to hold OPT_COMMENT
and OPT_PKT_VERDICT option values.
2021-07-07 18:40:24 +00:00
Guy Harris 1a7b9c28d3 Don't include wsutil/plugins.h in epan/epan.h - it's not necessary.
It's *not* part of the exported API, but epan/epan.h is, and everything
that needs it either includes it or includes someething else that
includes it.

See issue #17390.
2021-05-14 23:46:31 -07:00
Guy Harris 1e1f4e6b5f Move more headers outside extern "C".
If a header declares a function, or anything else requiring the extern
"C" decoration, have it wrap the declaration itself; don't rely on the
header itself being included inside extern "C".
2021-03-16 02:36:10 -07:00
Anders Broman 4131019969 proto.c: Use global var insted of environment var
WIRESHARK_ABORT_ON_TOO_MANY_ITEMS
Closes #17275
2021-03-08 15:12:56 +00:00
Michal Ruprich c8246c9973 Moving glib.h out of extern C 2021-02-10 17:49:09 +00:00
João Valverde 89fee9321e Avoid exposing HAVE_PLUGINS in the public API
Instead *_register_plugin() is turned into a noop (with a warning).

The test suit is failing with ENABLE_PLUGINS=Off (it was already failing
before and this patch didn't affect that).

Closes #17202.
2021-02-06 16:35:51 +00:00
Anders Broman 98cda1bf46 Load environment vars to globals for efficency.
These environment variables are read very frequently, read them once to
globals for performance improvment.

Change-Id: I4f05a5edca85b370674cc5f85fce40bd1af695cb
Reviewed-on: https://code.wireshark.org/review/34449
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-09-04 12:31:53 +00:00
João Valverde 1d1679f061 Extend epan library plugins with a tap registration callback
tap_register_plugin() is not sufficient for an extension language
implementation because the epan plugin is initialized before
proto_init(), therefore before dissectors have registered taps.

Change-Id: Ief213f85ff4f7182f9af985e5f45476355cc2b86
Reviewed-on: https://code.wireshark.org/review/34048
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2019-07-21 22:46:57 +00:00
João Valverde ff1e16055f epan: Add argument to epan_init() to disable plugins
Change-Id: I8dc76e6bf8c4d5a3081cbdc1d47b88e857415d29
Reviewed-on: https://code.wireshark.org/review/29498
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2018-09-09 02:27:34 +00:00
João Valverde 8eddb1650d epan: Remove unnecessary all protocols registration callback
We are exporting a registration function from libwireshark just
to have it passed back as a callback. Seems unnecessary.

Change-Id: I7621005c9be11691d319102326824c5e3520a6f3
Reviewed-on: https://code.wireshark.org/review/29328
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2018-08-29 23:22:44 +00:00
Gerald Combs ad84eec866 Switch the Doxygen API reference build to CMake.
Switch to a single Doyxgen configuration which was generated using a
recent version of Doxygen and customized to suit our needs. Add
wsar_html and wsar_html_zip targets to CMake. Update some Doxygen markup
and documentation as needed.

Change-Id: Ic8a424b292c35a26f74ae0b53322265683e56e69
Reviewed-on: https://code.wireshark.org/review/26976
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-17 03:46:05 +00:00
Guy Harris 1f5f63f8ef Generalize wtap_pkthdr into a structure for packet and non-packet records.
Separate the stuff that any record could have from the stuff that only
particular record types have; put the latter into a union, and put all
that into a wtap_rec structure.

Add some record-type checks as necessary.

Change-Id: Id6b3486858f826fce4b096c59231f463e44bfaa2
Reviewed-on: https://code.wireshark.org/review/25696
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-09 00:29:51 +00:00
Dario Lombardo 55c68ee69c epan: use SPDX indentifiers.
Skipping dissectors dir for now.

Change-Id: I717b66bfbc7cc81b83f8c2cbc011fcad643796aa
Reviewed-on: https://code.wireshark.org/review/25694
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-08 19:29:45 +00:00
João Valverde cebb8ea20e Add new plugin type for libwireshark
Allow epan itself to be extended by plugins. Adds the following new plugin
interfaces:

  void plugin_epan_init()
  void plugin_epan_dissect_init(epan_dissect_t *)
  void plugin_epan_dissect_cleanup(epan_dissect_t *)
  void plugin_epan_cleanup()
  void plugin_epan_register_all_protocols(register_cb, gointer) [OPTIONAL]
  void plugin_epan_register_all_handoffs(register_cb, gointer) [OPTIONAL]

Any one of these can be an empty function but the first four must be
present.

The motivation for the change is a better way to implement a language binding
other than registering a fake protocol and stuffing everything into a single
dissector call (and maybe require an extra packet_info field) but I expect
there would be other interesting use cases.

Change-Id: I215d50750ac7561fe25fdcdcfbc6a3f351984785
Reviewed-on: https://code.wireshark.org/review/24813
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2017-12-14 22:12:38 +00:00
João Valverde 995812c5f1 Refactor plugin registration and loading
Put different types of plugins (libwiretap, libwireshark) in different
subdirectories, give libwiretap and libwireshark init routines that
load the plugins, and have them scan the appropriate subdirectories
so that we don't even *try* to, for example, load libwireshark plugins
in programs that only use libwiretap.

Compiled plugins are stored in subfolders of the plugin folders, with
the subfolder name being the Wireshark minor version number (X.Y). There is
another hierarchical level for each Wireshark library (libwireshark, libwscodecs
and libwiretap).

The folder names are respectively plugins/X.Y/{epan,codecs,wiretap}.

Currently we only distribute "epan" (libwireshark) plugins.

Change-Id: I3438787a6f45820d64ba4ca91cbe3c8864708acb
Reviewed-on: https://code.wireshark.org/review/23983
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2017-12-14 08:43:57 +00:00
Guy Harris 48e65c4af4 Hand the packet provider functions to epan_new().
Have separate packet_provider_data structures and packet_provider_funcs
structures; the latter holds a table of functions that libwireshark can
call for information about packets, the latter holds the data that those
functions use.

This means we no longer need to expose the structure of an epan_t
outside epan/epan.c; get rid of epan/epan-int.h.

Change-Id: I381b88993aa19e55720ce02c42ad33738e3f51f4
Reviewed-on: https://code.wireshark.org/review/24732
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-12-08 04:33:55 +00:00
Guy Harris 797d2f6a87 Move the frame_set stuff back into the capture_file structure.
libwireshark now expects an epan_t to be created with a pointer to a
"packet provider" structure; that structure is opaque within
libwireshark, and a pointer to it is passed to the callbacks that
provide interface names, interface, descriptions, user comments, and
packet time stamps, and that set user comments.  The code that calls
epan_new() is expected to provide those callbacks, and to define the
structure, which can be used by the providers.  If none of the callbacks
need that extra information, the "packet provider" structure can be
null.

Have a "file" packet provider for all the programs that provide packets
from a file.

Change-Id: I4b5709a3dd7b098ebd7d2a7d95bcdd7b5903c1a0
Reviewed-on: https://code.wireshark.org/review/24731
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-12-08 03:32:25 +00:00
Michael Mann 800b26edbe Remove circuit API
Replace with conversation API that limits the "endpoint" to a single
uint32 value.

The intention is to eventually have "layered" endpoints, because circuit_id
was used in cases where src/dest port have already been populated (and
are used for layers above).  Those src/dest ports should just be treated
as just another endpoint, but we currently only have support for one.

Change-Id: Ic6aa7ef0241275aa4dfde9459194369b48c72960
Reviewed-on: https://code.wireshark.org/review/24369
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-13 05:21:36 +00:00
João Valverde 8390744957 Add function to return version number at run-time
For use by plugins using libwireshark to check compatibility.

Change-Id: I66a9d41644da7efce01cbed30d2a1f76fbc3754d
Reviewed-on: https://code.wireshark.org/review/23378
Petri-Dish: João Valverde <j@v6e.pt>
Reviewed-by: João Valverde <j@v6e.pt>
2017-09-03 20:12:39 +00:00
Michael Mann 5cd7ea6af2 Don't have epan_dissect_init() return anything.
It manipulates the epan_dissect_t structure passed into it and then
returns that.
Callers can (and have been) just using the passed in epan_dissect_t
structure anyway.

Change-Id: Ia19d360a7347ff473654eeb553756f59a38f95bd
Reviewed-on: https://code.wireshark.org/review/21570
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-05-09 16:36:06 +00:00
Guy Harris 847c25c5a7 Prime the epan_dissect_t with postdissector wanted fields if necessary.
This makes sure that postdissectors that indicate that they need certain
fields in the first pass will get them.

While we're at it:

Fix the field-fetching code in TRANSUM not to assume it got any
instances of the field being fetched.

Rename process_packet_first_pass() in sharkd to process_packet(), as
it's the only routine in sharkd that processes packets.

Rename process_packet() in tshark and tfshark to
process_packet_single_pass(), as it's what's used if we're only doing
one-pass analysis.

Clean up comments and whitespace.

Change-Id: I3769af952c66f5ca4b68002ad6213858ab9cab9b
Reviewed-on: https://code.wireshark.org/review/21063
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-12 23:33:37 +00:00
Guy Harris 4d2d423106 Rename routines to clarify what they do.
XXX_prime_with_YYY makes it a bit clearer than does XXX_prime_YYY that
we're not priming YYY, we're priming XXX *using* YYY.

Change-Id: I1686b8b5469bc0f0bd6db8551fb6301776a1b133
Reviewed-on: https://code.wireshark.org/review/21031
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-12 04:56:49 +00:00
Guy Harris 6b3714254d Pull all the "load settings" calls into a epan_load_settings() routine.
That way, nothing using libwireshark needs to know what settings need to
be loaded, they just call epan_load_settings().

Change-Id: I9390e259e286fc4f5acaeaac2767e4c3c4b656af
Reviewed-on: https://code.wireshark.org/review/20983
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-09 22:40:30 +00:00
Michael Mann b54c438011 Convert conversation hash tables to use wmem.
Simplifies cleanup because wmem can handle the memory cleanup.

Change-Id: Idc6a9bfe5f23c83b59a5278a64b9fb706862342d
Reviewed-on: https://code.wireshark.org/review/20042
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-02-10 13:26:14 +00:00
Jim Young 520a1b2066 Make the capture file's interface description filterable
This patch introduces the frame.interface_description field.

While testing this new functionality it became obvious that we have
a non-optimal interaction between the existing cfile.c's
cap_file_get_interface_name(), the recently added frame.interface_name
field and this new frame.interface_description field.

The string returned from cap_file_get_interface_name() may in fact
come from one of three different sources: the idb's interface name
(if it exists) or the idb's interface description (if that exists)
or a default text of "unknown".  The string ultimately becomes the
rame.interface_name whether or not the idb had an interface name
option to begin with.  This behavior does not allow one to test for
the simple presence of frame.interface_name.  The new peer function
cap_file_get_interface_description() added by this patch returns
NULL instead of "unknown" if the idb does not have an interface
description.  Should cap_file_get_interface_name() be similarly
modified to return NULL if the idb does not have an interface name?

Bug: 9781
Change-Id: Ie479f373c5080c004dd22bd88919838feca71e95
Reviewed-on: https://code.wireshark.org/review/19861
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-02-09 11:31:59 +00:00
Guy Harris 099698445b Move the proto data stuff out of frame_data.[ch].
It's not tied to the frame_data structure any more, so it belongs by
itself.

Clean up some #includes while we're at it; in particular, frame_data.h
doesn't use anything related to tvbuffs, so don't have it gratuitiously
include tvbuff.h.

Change-Id: Ic32922d4a3840bac47007c5d4c546b8842245e0c
Reviewed-on: https://code.wireshark.org/review/13518
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-25 02:24:34 +00:00
Guy Harris cdf9943717 Don't walk the entire protocol tree to extract the value of one field.
Instead, prime the epan_dissect_t's tree to look for rtp.ssrc, and
extract that value with proto_get_finfo_ptr_array().

Also, have the filter used to check whether the packet is a candidate
for RTP analysis to check for RTPv2 (and add a check for IPv4 or IPv6
back to the Qt version), and get rid of an unnecessary extra level of
indirection for that string.

In the Qt version, if findStreams() set the error string, don't
overwrite it with a "No streams found." indication, and fix error
handling for the "filter didn't compile" case.

Change-Id: I09d0ea37ccd4806d99e3b6394f2a8a376e974705
Reviewed-on: https://code.wireshark.org/review/13045
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-04 21:14:42 +00:00
Guy Harris c7e42be2e5 Catch REPORT_DISSECTOR_BUG() calls in dissector registration routines.
Have epan_init() return a success/failure Boolean indication.  Catch
exceptions when calling the dissector registration routines and, if we
get one, report the error and return a failure indication.

If epan_init() fails, quit, but first make sure the reported error is
displayed.

Change-Id: I0300cbb1f66a5644f857a205235124909d684c50
Reviewed-on: https://code.wireshark.org/review/11340
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-10-28 00:44:26 +00:00
Michal Labedzki fb00452b30 Bluetooth/GUI: ATT: Add Server Attribute Table
It is a GUI+QT feature that introduce Bluetooth menu and
"ATT Server Attributes" that present all handle+UUID pairs
as table. User may copy cell value, row, selected rows or whole
table within header. On activate user will go to packet that
introduce UUID for specified handle.

Change-Id: If17e53aff5feb89ededc740a595ba5882b90be5e
Reviewed-on: https://code.wireshark.org/review/6911
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-02-07 16:35:39 +00:00
Michael Mann 07c9492b8d Remove pkt_comment member from packet_info structure.
Change-Id: Ifd3d201a09944e3fc36188f891ea8a584886101d
Reviewed-on: https://code.wireshark.org/review/5884
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-02 00:00:57 +00:00
Michal Labedzki 361ea8215d Add support for multifields in custom column
You can now add column with Custom type with more than one field
by using OR "||" splitter.

Bug: 9695

Change-Id: Ia82a91e7a35b867647d36cb9626e3870f46c0d85
Reviewed-on: https://code.wireshark.org/review/5804
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-12-18 11:03:42 +00:00
Guy Harris 318cf8a678 Add support for dissecting non-packet records.
Add a dissector table indexed by the file type, and, for the
file-type-specific records, have the frame dissector skip the usual
pseudo-header processing, as the pseudo-header has a file-type-specific
record subtype in it, and call the dissector for that file type's
records.

Change-Id: Ibe97cf6340ffb0dabc08f355891bc346391b91f9
Reviewed-on: https://code.wireshark.org/review/1782
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-05-25 00:05:07 +00:00
Anders Broman 0513b29b8b Revert "Allow pcapng interface options to be available to dissectors."
This patch causes Wireshark/tshark to segfault if the file is reread(open a file and press reload).
The test suite also fails on 
2.1.1 Step: Exit status for existing file: "/home/wireshark/builders/trunk/sol10sparc/build/test/captures/dhcp.pcap" must be 0/home/wireshark/builders/trunk/sol10sparc/build/test/suite-clopts.sh: line 149:  6646 Segmentation Fault      (core dumped) $TSHARK -r "${CAPTURE_DIR}dhcp.pcap" > ./testout.txt 2>&1

OSX build bot chokes on
pcapng.c: In function 'pcapng_destroy_option_value':
pcapng.c:377: warning: implicit declaration of function 'g_byte_array_unref'
pcapng.c:379: warning: implicit declaration of function 'g_array_unref'
pcapng.c: In function 'pcapng_collect_block_option':
pcapng.c:419: warning: implicit declaration of function 'g_byte_array_new_take'
pcapng.c:419: warning: initialization makes pointer from integer without a cast

these functions are glib 2.22
This reverts commit 7b13a3b0f6.

Change-Id: Ia82fdb2d08287bc2cd2841e1e941ae68cbc2e009
Reviewed-on: https://code.wireshark.org/review/749
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-20 12:25:21 +00:00
Christopher Kilgour 7b13a3b0f6 Allow pcapng interface options to be available to dissectors.
Interface options[1], and more generally pcapng options[2], are useful
information that can provide improved dissector output.

Prior to this change, only certain pcapng interface options were interpreted
and made available to dissectors, e.g. the interface name or description.
This change augments the situation by providing epan_get_interface_option( ),
which returns an array of byte arrays if the option code exists
(otherwise NULL).  Each element of the array is a byte buffer containing
the raw data of the option.  An array-of-buffers is used because pcapng
allows for multiple instances of the same option to be present in the file.
All interface options found in a pcapng file are thus made available to the
dissector.

The implementation also provides infrastructure to collect options from
other pcapng blocks such as the section header.  Currently these options
are discarded, but could be retained in the future to support more features.

[1] http://www.winpcap.org/ntar/draft/PCAP-DumpFileFormat.html#sectionidb
[2] http://www.winpcap.org/ntar/draft/PCAP-DumpFileFormat.html#sectionopt

Change-Id: I944b6f0f03dde9b8e7d1348b76acde6f9d312f37
Reviewed-on: https://code.wireshark.org/review/331
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-20 09:54:01 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(Using sed : sed -i '/^ \* \$Id\$/,+1 d')

Fix manually some typo (in export_object_dicom.c and crc16-plain.c)

Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8
Reviewed-on: https://code.wireshark.org/review/497
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04 14:27:33 +00:00
Hadriel Kaplan bd36fe1bcb Fix bug 6357: Lua all_field_infos() broken within tap/listener
The current API for Lua provides a global function
"all_field_infos()" which returns all the populated field_info nodes
in the current proto_tree.

By default all_field_infos() "works", in the literal sense: it returns
exactly the fields the previous dissectors of the packet have
populated at that instant of time.  But of course dissectors don't
populate all the applicable fields most of the time, because of the
TRY_TO_FAKE_THIS_ITEM optimization where they don't fill in things
that aren't needed at the time by a display, color, or tap's dfilter.

So this commit offers a way to force the dissectors to populate
all the applicable field_infos in the tree, by setting the proto_tree
to be visible.  Obviously that is going to impact performance, since
it basically bypasses the TRY_TO_FAKE_THIS_ITEM optimization; so the
patch only does this if the Lua script author told it to explicitly,
by adding an argument to Listener.new() and register_postdissector().

Change-Id: I11d3559fbe8c14fbadf1b51415a3701dc1200b7b
Reviewed-on: https://code.wireshark.org/review/286
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-25 21:06:50 +00:00
Michael Mann bf284da2ee TFShark (Terminal Fileshark) v.001. Bug 9607 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9607)
This is a VERY PRELIMINARY version of tfshark.  It's an attempt to jumpstart FileShark and its architecture.  Right now it's mostly just a very stripped down version of tshark with all of the necessary build modifications (including now building filetap library since tfshark depends on it)

This code has helped me identify what I believe to be all of the necessary layers for a complete fileshark architecture.  And those layers will slowly be added in time (patches always welcome!).

svn path=/trunk/; revision=54646
2014-01-08 04:35:28 +00:00
Jakub Zawadzki 0f8572cb51 Avoid including definition of column_info structure in dissectors.
Move COL_* enum to <epan/column-utils.h>

XXX Later we can rename epan/column-info.h to column-int.h (or smth like this)

svn path=/trunk/; revision=54352
2013-12-22 10:41:27 +00:00
Guy Harris 125a17f8e5 Initialize the error-reporting routines before scanning for plugins, as
the code to scan for them uses those routines.

This means epan_init() no longer takes those routines as arguments -
which is just as well, given that the mechanism in question is no longer
part of libwireshark, but is part of libwsutil.

This should fix bug 9508.

svn path=/trunk/; revision=53796
2013-12-05 09:30:22 +00:00
Jakub Zawadzki 5afbad4179 Rename struct _epan_dissect_t to epan_dissect.
svn path=/trunk/; revision=53770
2013-12-03 22:26:07 +00:00
Jakub Zawadzki cedb73c7f7 Dissectors should not use dfilter.h, don't include it.
XXX ncp2222 dissector is using dfilter_compile(), why?

svn path=/trunk/; revision=53766
2013-12-03 21:31:04 +00:00
Guy Harris 0cc1545d05 Move most of the plugin code from epan to wsutil and remove all
knowledge of particular types of plugins.  Instead, let particular types
of plugins register with the common plugin code, giving a name and a
routine to recognize that type of plugin.

In particular applications, only process the relevant plugin types.

Add a Makefile.common to the codecs directory.

svn path=/trunk/; revision=53710
2013-12-02 08:30:29 +00:00
Jakub Zawadzki bad81b517f Reintroduce back epan_dissect_reset(), proto_tree_reset()
This time it makes more sense, cause for each dissection we need two wmem allocators.
Reseting wmem allocator is much faster than destroy & create.

svn path=/trunk/; revision=52706
2013-10-20 10:21:25 +00:00
Jörg Mayer 662c7704f8 After looking for something in the column-*.h files and
not finding it, I finally found it in column_info.h
Renamed column_info.h to column-info.h to have consistency
with the column*h files.

svn path=/trunk/; revision=52667
2013-10-18 13:06:05 +00:00