packet-iwarp-mpa: give more information if the ULPDU length doesn't match
[metze/wireshark/wip.git] / capture_ifinfo.h
index ea18085bb71c5d3aa0e69ef7fbd5fa925443bb24..b19454f89980f1f5e5cf0fc1dbb153b1005059df 100644 (file)
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
 #ifndef __CAPTURE_IFINFO_H__
 #define __CAPTURE_IFINFO_H__
 
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+typedef enum {
+       IF_WIRED,
+       IF_AIRPCAP,
+       IF_PIPE,
+       IF_STDIN,
+       IF_BLUETOOTH,
+       IF_WIRELESS,
+       IF_DIALUP,
+       IF_USB,
+       IF_VIRTUAL
+} interface_type;
+
 /*
  * The list of interfaces returned by "get_interface_list()" is
  * a list of these structures.
  */
 typedef struct {
        char    *name;          /* e.g. "eth0" */
-       char    *description;   /* from OS, e.g. "Local Area Connection" or NULL */
+       char    *friendly_name; /* from OS, e.g. "Local Area Connection", or
+                                  NULL if not available */
+       char    *vendor_description;
+                               /* vendor description from pcap_findalldevs(),
+                                  e.g. "Realtek PCIe GBE Family Controller",
+                                  or NULL if not available */
        GSList  *addrs;         /* containing address values of if_addr_t */
+       interface_type type;    /* type of interface */
        gboolean loopback;      /* TRUE if loopback, FALSE otherwise */
 } if_info_t;
 
@@ -55,11 +77,12 @@ typedef struct {
 /**
  * Fetch the interface list from a child process.
  */
-extern GList *capture_interface_list(int *err, char **err_str);
+extern GList *capture_interface_list(int *err, char **err_str, void (*update_cb)(void));
 
 /* Error values from "get_interface_list()/capture_interface_list()". */
 #define        CANT_GET_INTERFACE_LIST 1       /* error getting list */
 #define        NO_INTERFACES_FOUND     2       /* list is empty */
+#define        DONT_HAVE_PCAP          3       /* couldn't load WinPcap */
 
 void free_interface_list(GList *if_list);
 
@@ -87,10 +110,14 @@ typedef struct {
  */
 extern if_capabilities_t *
 capture_get_if_capabilities(const char *devname, gboolean monitor_mode,
-                            char **err_str);
+                            char **err_str, void (*update_cb)(void));
 
 void free_if_capabilities(if_capabilities_t *caps);
 
 void add_interface_to_remote_list(if_info_t *if_info);
 
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
 #endif /* __CAPTURE_IFINFO_H__ */