* By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef __CAPTURE_OPTS_H__
#define __CAPTURE_OPTS_H__
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h> /* for gid_t */
-#endif
+#include <sys/types.h> /* for gid_t */
#include <caputils/capture_ifinfo.h>
+#ifdef _WIN32
+#include <windows.h>
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
if_info_t if_info;
gboolean selected;
gboolean hidden;
- gboolean locked;
-#ifdef HAVE_EXTCAP
/* External capture cached data */
GHashTable *external_cap_args_settings;
-#endif
gchar *timestamp_type;
} interface_t;
gint dlt;
} link_row;
-#ifdef _WIN32
-#define INVALID_EXTCAP_PID INVALID_HANDLE_VALUE
-#else
-#define INVALID_EXTCAP_PID (GPid)-1
-#endif
-
typedef struct interface_options_tag {
- gchar *name; /* the name of the interface provided to winpcap/libpcap to specify the interface */
- gchar *descr;
- gchar *console_display_name; /* the name displayed in the console, also the basis for autonamed pcap filenames */
+ gchar *name; /* the name of the interface supplied to libpcap/WinPcap/Npcap to specify the interface */
+ gchar *descr; /* a more user-friendly description of the interface; may be NULL if none */
+ gchar *display_name; /* the name displayed in the console and title bar */
gchar *cfilter;
gboolean has_snaplen;
int snaplen;
int linktype;
gboolean promisc_mode;
interface_type if_type;
-#ifdef HAVE_EXTCAP
gchar *extcap;
gchar *extcap_fifo;
GHashTable *extcap_args;
- GPid extcap_pid; /* pid of running process or INVALID_EXTCAP_PID */
- gpointer extcap_userdata;
+ GPid extcap_pid; /* pid of running process or WS_INVALID_PID */
+ gpointer extcap_pipedata;
guint extcap_child_watch;
+#ifdef _WIN32
+ HANDLE extcap_pipe_h;
+ HANDLE extcap_control_in_h;
+ HANDLE extcap_control_out_h;
+#endif
gchar *extcap_control_in;
gchar *extcap_control_out;
-#endif
#ifdef CAN_SET_CAPTURE_BUFFER_SIZE
int buffer_size;
#endif
/* GUI related */
gboolean real_time_mode; /**< Update list of packets in real time */
- gboolean show_info; /**< show the info dialog. GTK+ only. */
+ gboolean show_info; /**< show the info dialog. */
gboolean restart; /**< restart after closing is done */
gchar *orig_save_file; /**< the original capture file name (saved for a restart) */