Wireshark-dev: Re: [Wireshark-dev] Bit for starting / stopping / new Capture
From: Paul Offord <[email protected]>
Date: Wed, 17 Feb 2016 18:38:55 +0000

There’s an enhancement to plugin_if that doesn’t address your needs directly but may give you enough functionality.  It’s a function called plugin_if_get_ws_info.  You can call it from within a dissector and it populates the following structure:

 

typedef struct _ws_info_t

{

    gboolean ws_info_supported;                 /* false if no libpcap */

    file_state cf_state;                        /* Current state of capture file */

    gchar *cf_filename;                         /* Name of capture file */

    guint32 cf_count;                           /* Total number of frames */

    guint32 cf_framenr;                         /**< Currently displayed frame number */

    gboolean frame_passed_dfilter;              /**< true = display, false = no display */

} ws_info_t;

 

You may be able to interpret the cf_filename and cf_state values to give you what you need.

 

The plugin_if_get_ws_info code has been accepted and merged but it’s not in 2.0.1.  It’s in the latest git pull and I guess will be in 2.0.2.

 

Best regards…Paul

 

From: [email protected] [mailto:[email protected]] On Behalf Of Guy Harris
Sent: 17 February 2016 16:59
To: Developer support list for Wireshark <[email protected]>
Subject: Re: [Wireshark-dev] Bit for starting / stopping / new Capture

 



On Feb 17, 2016, at 7:16 AM, "FIXED-TERM Scholz Tobias (DC-IA/EAI)" <[email protected]> wrote:

 

I made some recherché, but couldn’t find any information to this topic. Is there a possibility to know (special bit for example), whether the user stopped, started the capture or opened Wireshark new?

 

There is nothing available to dissectors to indicate whether the packets are coming from a live capture or a capture done in the past, and thus there is nothing to indicate the status of a live capture.

 

That would be a great help for my dissector.

 

Why? What would you do differently, depending on whether you have a live capture and, if so, what the status of that capture is?


______________________________________________________________________

This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.

Any views or opinions expressed are solely those of the author and do not necessarily represent those of Advance Seven Ltd. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission.

Advance Seven Ltd. Registered in England & Wales numbered 2373877 at Endeavour House, Coopers End Lane, Stansted, Essex CM24 1SJ

______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________