Wireshark mailing list archives

Re: Bit for starting / stopping / new Capture


From: "FIXED-TERM Scholz Tobias (DC-IA/EAI)" <fixed-term.Tobias.Scholz () boschrexroth de>
Date: Wed, 17 Feb 2016 16:06:28 +0000

Hey Pascal,

I finally could solve it with your mentioned function “register_cleanup_routine()” ! :D

Thanks a lot!


Von: wireshark-dev-bounces () wireshark org [mailto:wireshark-dev-bounces () wireshark org] Im Auftrag von Pascal 
Quantin
Gesendet: Mittwoch, 17. Februar 2016 16:45
An: Developer support list for Wireshark <wireshark-dev () wireshark org>
Betreff: Re: [Wireshark-dev] Bit for starting / stopping / new Capture



2016-02-17 16:38 GMT+01:00 FIXED-TERM Scholz Tobias (DC-IA/EAI) <fixed-term.Tobias.Scholz () boschrexroth 
de<mailto:fixed-term.Tobias.Scholz () boschrexroth de>>:
Hi Pascal,

thanks for your answer. I don’t get exactly the meaning of this routine functionality, but I think it is not what I’m 
searching for.

For my dissector I need a special bit or value as a trigger, which says, that e.g. the capture has stopped or starts 
new.
E.g.:     capture isn’t running (stopped) --> bit == FALSE

I do not understand your requirement. Maybe if you were explaining us what you would like to achieve exactly, we could 
see whether such functionality exists or not.

Does it exist?

Tobias


Von: wireshark-dev-bounces () wireshark org<mailto:wireshark-dev-bounces () wireshark org> 
[mailto:wireshark-dev-bounces () wireshark org<mailto:wireshark-dev-bounces () wireshark org>] Im Auftrag von Pascal 
Quantin
Gesendet: Mittwoch, 17. Februar 2016 16:24
An: Developer support list for Wireshark <wireshark-dev () wireshark org<mailto:wireshark-dev () wireshark org>>
Betreff: Re: [Wireshark-dev] Bit for starting / stopping / new Capture

Hi Tobias,

2016-02-17 16:16 GMT+01:00 FIXED-TERM Scholz Tobias (DC-IA/EAI) <fixed-term.Tobias.Scholz () boschrexroth 
de<mailto:fixed-term.Tobias.Scholz () boschrexroth de>>:
Hey,

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?

That would be a great help for my dissector.

Not sure this is exactly your request, but you can register callbacks when a capture is started / loaded / reloaded 
(when a preference changes for example) and when it is closed with the following functions:

/**
 * Allow protocols to register "init" routines, which are called before
 * we make a pass through a capture file and dissect all its packets
 * (e.g., when we read in a new capture file, or run a "filter packets"
 * or "colorize packets" pass over the current capture file or when the
 * preferences are changed).
 */
WS_DLL_PUBLIC void register_init_routine(void (*func)(void));

/**
 * Allows protocols to register "cleanup" routines which are called
 * after closing a capture file (or when preferences are changed, in
 * that case these routines are called before the init routines are
 * executed). It can be used to release resources that are allocated in
 * register_init_routine.
 */
WS_DLL_PUBLIC void register_cleanup_routine(void (*func)(void));
Hope it helps,
Pascal.

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org<mailto:wireshark-dev () wireshark org>>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org<mailto:wireshark-dev-request () wireshark 
org>?subject=unsubscribe

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

Current thread: