Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] master 579e7e1: Wireshark: Add option to
From: Anders Broman <[email protected]>
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: [email protected] [mailto:[email protected]] 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 <[email protected]> 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 <[email protected]>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:[email protected]?subject=unsubscribe