Wireshark-dev: [Wireshark-dev] Walk capture_global_opts to find interface
From: Roland Knall <[email protected]>
Date: Thu, 8 May 2014 16:48:59 +0200

During development of the extcap interface I stumbled across an issue, which could easily be fixed, if I could get the interface_t struct element for an iface name.

To the point, one extcap program may allow more than one interface for managment. But capture_get_if_capabilities just gets the iface name, and then forwards that to the extcap method. This results in each extcap program getting asked the information for each possible interface (even the none extcap ones, as IFTYPE_EXTCAP is also not available, which results in many executable calls and furthermore poses a potential memory and security issue.

Therefore I want to guard the functions of extcap, to only call the executable responsible for the interface, and therefore need some information from the interface_t structure.

So my question is, Is it allowed to walk through capture_global_opts and search for a given iface name or is there another way or method of getting the interface_t struct for a given interface? Or is there even another way of performing said task?