Wireshark-bugs: [Wireshark-bugs] [Bug 11968] New: Add function to Plugin IF to get capture file

Date: Wed, 06 Jan 2016 17:12:49 +0000
Bug ID 11968
Summary Add function to Plugin IF to get capture file status information
Product Wireshark
Version Git
Hardware x86
OS Windows 7
Status CONFIRMED
Severity Enhancement
Priority Low
Component Extras
Assignee [email protected]
Reporter [email protected]

Build Information:
Version 2.1.0-Syncro (v2.1.0rc0-1324-gffb51b3 from master)

Copyright 1998-2016 Gerald Combs <[email protected]> and contributors.
License GPLv2+: GNU GPL version 2 or later
<http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiled (64-bit) with Qt 5.5.1, with WinPcap (4_1_3), with libz 1.2.8, with
GLib 2.42.0, with SMI 0.4.8, with c-ares 1.9.1, with Lua 5.2, with GnuTLS
3.2.15, with Gcrypt 1.6.2, with MIT Kerberos, with GeoIP, with QtMultimedia,
with AirPcap.

Running on 64-bit Windows 7 Service Pack 1, build 7601, with locale C, with
WinPcap version 4.1.3 (packet.dll version 4.1.0.2980), based on libpcap version
1.0 branch 1_0_rel0b (20091008), with GnuTLS 3.2.15, with Gcrypt 1.6.2, with
AirPcap 4.1.0 build 1622.
Intel(R) Core(TM) i5-5300U CPU @ 2.30GHz (with SSE4.2), with 8082MB of physical
memory.


Built using Microsoft Visual C++ 12.0 build 31101
--
Plugin IF enhances the capabilities of the plugin framework to provide
functions such as Go To Frame and Apply Display Filter.  The Plugin IF
functions don't provide any form of feedback; there is no values returned.

During the development of a plugin I found a significant hindrance was the lack
of status information, particularly pertaining to the loaded capture file and
the current position within it.  Of particular concern is lack of visibility of
the current frame number.

Unfortunately, the frame number handed to the dissector via the pinfo structure
(pinfo->fd->num) does not always indicate the display position within the
capture file, for example during scanning and after a filter has been applied.

I have written a simple one-function extension to Plugin IF with the following
interface:

typedef struct _cf_info_t cf_info_t;

struct _cf_info_t
{
    file_state state;             /* Current state of capture file */
    gchar * filename;             /* Name of capture file */
    guint32 count;                /* Total number of frames */
    guint32 framenr;              /**< Currently displayed frame number */
    unsigned int passed_dfilter;  /**< 1 = display, 0 = no display */
};

WS_DLL_PUBLIC void plugin_if_get_cf_status(cf_info_t * status_info);

It requires no changes to existing code by simply building on what already
exists.

I'm not sure how I'm supposed to handle this but I'll submit the code via
gerrit and see if it's accepted.


You are receiving this mail because:
  • You are watching all bug changes.