capture-wpcap: Rename a stub function
This stub implements an interface from WinPcap/Npcap. The function declaration differs in a constness attribute between different WinPcap flavors, leading to pain and tears. Just rename the function instead so it doesn't clobber any public declaration from WinPcap/Npcap and cause mismatched declaration errors.
This commit is contained in:
parent
8dc5d2d348
commit
dde314f4b2
|
@ -68,6 +68,9 @@
|
|||
#include "capture/capture_ifinfo.h"
|
||||
#include "capture/capture-pcap-util.h"
|
||||
#include "capture/capture-pcap-util-int.h"
|
||||
#ifdef _WIN32
|
||||
#include "capture/capture-wpcap.h"
|
||||
#endif
|
||||
|
||||
#include <wsutil/file_util.h>
|
||||
#include <wsutil/please_report_bug.h>
|
||||
|
@ -623,7 +626,7 @@ get_interface_list_findalldevs_ex(const char *hostname, const char *port,
|
|||
auth.username = g_strdup(username);
|
||||
auth.password = g_strdup(passwd);
|
||||
|
||||
if (pcap_findalldevs_ex(source, &auth, &alldevs, errbuf) == -1) {
|
||||
if (ws_pcap_findalldevs_ex(source, &auth, &alldevs, errbuf) == -1) {
|
||||
*err = CANT_GET_INTERFACE_LIST;
|
||||
if (err_str != NULL)
|
||||
*err_str = cant_get_if_list_error_message(errbuf);
|
||||
|
|
|
@ -420,7 +420,7 @@ pcap_open(const char *a, int b, int c, int d, struct pcap_rmtauth *e, char *errb
|
|||
}
|
||||
|
||||
int
|
||||
pcap_findalldevs_ex(const char *a, struct pcap_rmtauth *b, pcap_if_t **c, char *errbuf)
|
||||
ws_pcap_findalldevs_ex(const char *a, struct pcap_rmtauth *b, pcap_if_t **c, char *errbuf)
|
||||
{
|
||||
int ret;
|
||||
ws_assert(has_wpcap);
|
||||
|
|
|
@ -14,6 +14,13 @@
|
|||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#ifdef HAVE_LIBPCAP
|
||||
#ifdef __MINGW32__
|
||||
#include <_bsd_types.h>
|
||||
#endif
|
||||
#include <pcap.h>
|
||||
#endif
|
||||
|
||||
extern gboolean has_wpcap;
|
||||
|
||||
extern void load_wpcap(void);
|
||||
|
@ -25,6 +32,9 @@ extern void load_wpcap(void);
|
|||
*/
|
||||
gboolean npf_sys_is_running(void);
|
||||
|
||||
int
|
||||
ws_pcap_findalldevs_ex(const char *a, struct pcap_rmtauth *b, pcap_if_t **c, char *errbuf);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
|
Loading…
Reference in New Issue