Wireshark-dev: Re: [Wireshark-dev] Extcap version
From: Dario Lombardo <[email protected]>
Date: Mon, 27 Feb 2017 11:42:54 +0100
Ok. Since I was on my way of cleaning up some leaks in extcap, I'll wait until you finish, maybe some of them will be gone. 

"help" seems to be in the same position: lives in extcap_info and in extcap_interface at the same time. I don't think we need both: I hardly figure out how we'd need to different help pages/files for 2 different intefaces of the same extcap. What about removing the help in the interface?

On Mon, Feb 27, 2017 at 11:32 AM, Roland Knall <[email protected]> wrote:
That is an early design flaw - still going strong to that very day. It stems from the fact, that the version query was introduced later on, and the interface list query basically covered that as well. Additionally, parsed extcap interfaces where not parsed on a tool (meaning executable) level, but rather on a per-interface level. That resulted in the fact, that there was no storage in place for saving the version after parsing, except in extcap_interface.

extcap_tools is rather new to this concert (merged last week) and so the version moved there. But I am in the process of restructuring extcap_interface, and in that process I clean up a bit more. In the meantime, when in doubt, extcap_info->version is the one read by the overall system.

regards
Roland

On Mon, Feb 27, 2017 at 11:19 AM, Dario Lombardo <[email protected]> wrote:
Hi
In extcap structs I've found 2 entries for "version". In

typedef struct _extcap_interface {
    gchar * call;
    gchar * display;
    gchar * version;
    gchar * help;
    gchar * extcap_path;

    extcap_sentence_type if_type;
} extcap_interface;

and

typedef struct _extcap_info {
    gchar * basename;
    gchar * full_path;
    gchar * version;

    GList * interfaces;
} extcap_info;

Is that intentional? While I get the reason for version in extcap info, I don't get it for interface. Moreover, extcap tools show global version but not version in interface

extcap {version=1.0.0}{help=file:///usr/local/share/wireshark/ciscodump.html}
interface {value=cisco}{display=Cisco remote capture}
extcap {version=0.1.0}{help=file:///usr/local/share/wireshark/randpktdump.html}
interface {value=randpkt}{display=Random packet generator}
extcap {version=1.0.0}{help=file:///usr/local/share/wireshark/sshdump.html}
interface {value=ssh}{display=SSH remote capture}
extcap {version=0.1.0}{help=file:///usr/local/share/wireshark/udpdump.html}
interface {value=udpdump}{display=UDP Listener remote capture}

What is it for?

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <[email protected]>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:[email protected]wireshark.org?subject=unsubscribe


___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <[email protected]>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:[email protected]wireshark.org?subject=unsubscribe