forked from osmocom/wireshark
Fix some places where we forgot to mention Npcap.
Mostly comments, but a few messages. Change-Id: Iff7380eb15f064bf6a3078e131c70987e36bca44 Reviewed-on: https://code.wireshark.org/review/36381 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
parent
16adaf33b4
commit
f77c677f18
|
@ -1,5 +1,5 @@
|
|||
/* capture-pcap-util-int.h
|
||||
* Definitions of routines internal to the libpcap/WinPcap utilities
|
||||
* Definitions of routines internal to the libpcap/WinPcap/Npcap utilities
|
||||
*
|
||||
* Wireshark - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@wireshark.org>
|
||||
|
|
|
@ -22,7 +22,7 @@ extern "C" {
|
|||
#include "capture_opts.h"
|
||||
|
||||
/*
|
||||
* A snapshot length of 0 is useless - and libpcap/WinPcap don't guarantee
|
||||
* A snapshot length of 0 is useless - and libpcap/WinPcap/Npcap don't guarantee
|
||||
* that a snapshot length of 0 will work, and, on some platforms, it won't
|
||||
* (with BPF, for example, the kernel is told the snapshot length via the
|
||||
* return value of the BPF program, and a return value of 0 means "drop
|
||||
|
@ -77,9 +77,9 @@ extern void get_compiled_caplibs_version(GString *str);
|
|||
/*
|
||||
* Append to a GString an indication of the version of capture libraries
|
||||
* with which we're running, or an indication that we're not running
|
||||
* with capture libraries, if we were compiled with WinPcap but
|
||||
* WinPcap wasn't loaded, or nothing, if we weren't compiled with
|
||||
* libpcap/WinPcap.
|
||||
* with capture libraries, if we were compiled with WinPcap or Npcap but
|
||||
* WinPcap/Npcap wasn't loaded, or nothing, if we weren't compiled with
|
||||
* libpcap/WinPcap/Npcap.
|
||||
*/
|
||||
extern void get_runtime_caplibs_version(GString *str);
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
/* capture-wpcap.c
|
||||
* WinPcap-specific interfaces for capturing. We load WinPcap at run
|
||||
* time, so that we only need one Wireshark binary and one TShark binary
|
||||
* for Windows, regardless of whether WinPcap is installed or not.
|
||||
* WinPcap/Npcap-specific interfaces for capturing. We load WinPcap/Npcap
|
||||
* at run time, so that we only need one Wireshark binary and one TShark
|
||||
* binary for Windows, regardless of whether WinPcap/Npcap is installed
|
||||
* or not.
|
||||
*
|
||||
* Wireshark - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@wireshark.org>
|
||||
|
@ -409,7 +410,7 @@ pcap_open_live(const char *a, int b, int c, int d, char *errbuf)
|
|||
pcap_t *p;
|
||||
if (!has_wpcap) {
|
||||
g_snprintf(errbuf, PCAP_ERRBUF_SIZE,
|
||||
"unable to load WinPcap (wpcap.dll); can't open %s to capture",
|
||||
"unable to load Npcap or WinPcap (wpcap.dll); can't open %s to capture",
|
||||
a);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -448,7 +449,7 @@ pcap_open(const char *a, int b, int c, int d, struct pcap_rmtauth *e, char *errb
|
|||
pcap_t *ret;
|
||||
if (!has_wpcap) {
|
||||
g_snprintf(errbuf, PCAP_ERRBUF_SIZE,
|
||||
"unable to load WinPcap (wpcap.dll); can't open %s to capture",
|
||||
"unable to load Npcap or WinPcap (wpcap.dll); can't open %s to capture",
|
||||
a);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -874,7 +875,7 @@ get_interface_list(int *err, char **err_str)
|
|||
|
||||
if (!has_wpcap) {
|
||||
/*
|
||||
* We don't have WinPcap, so we can't get a list of
|
||||
* We don't have Npcap or WinPcap, so we can't get a list of
|
||||
* interfaces.
|
||||
*/
|
||||
*err = DONT_HAVE_PCAP;
|
||||
|
@ -889,7 +890,7 @@ get_interface_list(int *err, char **err_str)
|
|||
#endif
|
||||
|
||||
/*
|
||||
* In WinPcap, pcap_lookupdev is implemented by calling
|
||||
* In WinPcap/Npcap, pcap_lookupdev is implemented by calling
|
||||
* PacketGetAdapterNames. According to the documentation
|
||||
* I could find:
|
||||
*
|
||||
|
@ -1105,7 +1106,7 @@ void
|
|||
get_runtime_caplibs_version(GString *str)
|
||||
{
|
||||
/*
|
||||
* On Windows, we might have been compiled with WinPcap but
|
||||
* On Windows, we might have been compiled with WinPcap/Npcap but
|
||||
* might not have it loaded; indicate whether we have it or
|
||||
* not and, if we have it and we have "pcap_lib_version()",
|
||||
* what version we have.
|
||||
|
@ -1204,11 +1205,11 @@ load_wpcap(void)
|
|||
void
|
||||
get_compiled_caplibs_version(GString *str)
|
||||
{
|
||||
g_string_append(str, "without WinPcap");
|
||||
g_string_append(str, "without Npcap or WinPcap");
|
||||
}
|
||||
|
||||
/*
|
||||
* Don't append anything, as we weren't even compiled to use WinPcap.
|
||||
* Don't append anything, as we weren't even compiled to use WinPcap/Npcap.
|
||||
*/
|
||||
void
|
||||
get_runtime_caplibs_version(GString *str _U_)
|
||||
|
|
|
@ -75,7 +75,7 @@ extern GList *capture_interface_list(int *err, char **err_str, void (*update_cb)
|
|||
|
||||
/* Error values from "get_interface_list()/capture_interface_list()". */
|
||||
#define CANT_GET_INTERFACE_LIST 1 /* error getting list */
|
||||
#define DONT_HAVE_PCAP 2 /* couldn't load WinPcap */
|
||||
#define DONT_HAVE_PCAP 2 /* couldn't load WinPcap/Npcap */
|
||||
|
||||
void free_interface_list(GList *if_list);
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/* capture_wpcap_packet.c
|
||||
* WinPcap-specific interfaces for low-level information (packet.dll).
|
||||
* We load WinPcap at run
|
||||
* time, so that we only need one Wireshark binary and one TShark binary
|
||||
* for Windows, regardless of whether WinPcap is installed or not.
|
||||
* WinPcap/Npcap-specific interfaces for low-level information (packet.dll).
|
||||
* We load WinPcap/Npcap at run time, so that we only need one Wireshark
|
||||
* binary and one TShark binary for Windows, regardless of whether
|
||||
* WinPcap/Npcap is installed or not.
|
||||
*
|
||||
* Wireshark - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@wireshark.org>
|
||||
|
@ -35,8 +35,9 @@
|
|||
|
||||
gboolean has_wpacket = FALSE;
|
||||
|
||||
/* This module will use the PacketRequest function in packet.dll (coming with WinPcap) to "directly" access
|
||||
* the Win32 NDIS network driver(s) and ask for various values (status, statistics, ...).
|
||||
/* This module will use the PacketRequest function in packet.dll (coming
|
||||
* with WinPcap and Npcap) to "directly" access the Win32 NDIS network
|
||||
* driver(s) and ask for various values (status, statistics, ...).
|
||||
*
|
||||
* Unfortunately, the definitions required for this are not available through the usual windows header files,
|
||||
* but require the Windows "Device Driver Kit" which is not available for free :-(
|
||||
|
@ -64,7 +65,7 @@ gboolean has_wpacket = FALSE;
|
|||
|
||||
|
||||
/******************************************************************************************************************************/
|
||||
/* stuff to load WinPcap's packet.dll and the functions required from it */
|
||||
/* stuff to load WinPcap/Npcap's packet.dll and the functions required from it */
|
||||
|
||||
static PCHAR (*p_PacketGetVersion) (void);
|
||||
static LPADAPTER (*p_PacketOpenAdapter) (char *adaptername);
|
||||
|
|
|
@ -245,7 +245,7 @@
|
|||
/* Define to 1 if you have the `pcap_open_dead' function. */
|
||||
#cmakedefine HAVE_PCAP_OPEN_DEAD 1
|
||||
|
||||
/* Define to 1 if you have libpcap/WinPcap remote capturing support. */
|
||||
/* Define to 1 if you have libpcap/WinPcap/Npcap remote capturing support. */
|
||||
#cmakedefine HAVE_PCAP_REMOTE 1
|
||||
|
||||
/* Define to 1 if you have the `pcap_set_datalink' function. */
|
||||
|
|
|
@ -394,6 +394,9 @@ get_if_name(const char *if_text)
|
|||
* We also can't assume it begins with "\Device\", either, as, on
|
||||
* Windows OT, WinPcap doesn't put "\Device\" in front of the name.
|
||||
*
|
||||
* XXX - we don't support Windows OT any more; do we need to worry
|
||||
* about this?
|
||||
*
|
||||
* As I remember, we can't assume that the interface description
|
||||
* doesn't contain a colon, either; I think some do.
|
||||
*
|
||||
|
|
|
@ -430,8 +430,9 @@ void CaptureOptionsDialog::interfaceItemChanged(QTreeWidgetItem *item, int colum
|
|||
link_row *linkr = new link_row();
|
||||
data_link_info_t *data_link_info = gxx_list_data(data_link_info_t *, lt_entry);
|
||||
/*
|
||||
* For link-layer types libpcap/WinPcap doesn't know about, the
|
||||
* name will be "DLT n", and the description will be null.
|
||||
* For link-layer types libpcap/WinPcap/Npcap doesn't know
|
||||
* about, the name will be "DLT n", and the description will
|
||||
* be null.
|
||||
* We mark those as unsupported, and don't allow them to be
|
||||
* used - capture filters won't work on them, for example.
|
||||
*/
|
||||
|
|
|
@ -440,8 +440,9 @@ void ManageInterfacesDialog::updateRemoteInterfaceList(GList* rlist, remote_opti
|
|||
data_link_info = gxx_list_data(data_link_info_t *, lt_entry);
|
||||
linkr = new link_row;
|
||||
/*
|
||||
* For link-layer types libpcap/WinPcap doesn't know about, the
|
||||
* name will be "DLT n", and the description will be null.
|
||||
* For link-layer types libpcap/WinPcap/Npcap doesn't know
|
||||
* about, the name will be "DLT n", and the description will
|
||||
* be null.
|
||||
* We mark those as unsupported, and don't allow them to be
|
||||
* used.
|
||||
*/
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* and
|
||||
*
|
||||
* 2) WinPcap doesn't have it, because a file descriptor opened
|
||||
* 2) WinPcap/Npcap don't have it, because a file descriptor opened
|
||||
* by code built for one version of the MSVC++ C library
|
||||
* can't be used by library routines built for another version
|
||||
* (e.g., threaded vs. unthreaded).
|
||||
|
|
4
wspcap.h
4
wspcap.h
|
@ -1,8 +1,8 @@
|
|||
/* wspcap.h
|
||||
*
|
||||
* Wrapper around libpcap/WinPcap's pcap.h.
|
||||
* Wrapper around libpcap/WinPcap/Npcap's pcap.h.
|
||||
*
|
||||
* If HAVE_PCAP_REMOTE is defined, it forces the WinPcap header files to
|
||||
* If HAVE_PCAP_REMOTE is defined, it forces the WinPcap/Npcap header files to
|
||||
* define things required for remote capture, by defining HAVE_REMOTE.
|
||||
*
|
||||
* With current versions of the WinPcap or Npcap SDK, if:
|
||||
|
|
Loading…
Reference in New Issue