ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] master 579e7e1: Wireshark: Add option to

From: Anders Broman <anders.broman@xxxxxxxxxxxx>
Date: Thu, 6 Mar 2014 17:31:02 +0000
Hi,
I try to keep up with the API changes so changing the API is no big problem as long as I understand what to do :-)
Regards
Anders

-----Original Message-----
From: wireshark-dev-bounces@xxxxxxxxxxxxx [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] On Behalf Of Hadriel Kaplan
Sent: den 6 mars 2014 18:26
To: Developer support list for Wireshark
Subject: Re: [Wireshark-dev] [Wireshark-commits] master 579e7e1: Wireshark: Add option to choose format type of capture file


BTW, is changing the wtap_register_open_info() function prototype/ABI again soon going to cause you problems?

I ask because it changes again, with an additional argument, in here:
https://code.wireshark.org/review/#/c/431/

The additional argument is for whether the wiretap reader being registered should be put at the top or bottom of its respective magic/heuristic section.  For example if it's a heuristic type, is it a strong vs. weak heuristic.

But if it would be painful for you, I can change that to keep the current wtap_register_open_info() as is, and make a new internal one that the existing wtap_register_open_info() can then just call with the default argument (which is for a weak heuristic).

-hadriel


On Mar 6, 2014, at 9:53 AM, Anders Broman <anders.broman@xxxxxxxxxxxx> wrote:

> Hi,
> This change broke a custom wiretap plugin I have which used wtap_register_magic_number_open_routine() which now is #if 0:ed out.
> I gather I should now use wtap_register_open_info() with const struct 
> open_info
> 
> Unfortunately there isn't a good description of the content of the struct:
> struct open_info {
>    const char *name;                                              /**< ? */
>    int type;                                                               /**< One of OPEN_INFO_MAGIC or OPEN_INFO_HEURISTIC */
>    wtap_open_routine_t open_routine;                 /**< Callback */
>    const char *extensions;                                     /**<  "I'm guessing" the default file extension, used to save this type should be NULL if no default extension is known */
> };
> 
> What should "*name" be?
> 
> Regards
> Anders

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