]> The Tcpdump Group git mirrors - libpcap/commitdiff
Fix argument to PacketRequest().
authorGuy Harris <[email protected]>
Mon, 14 Sep 2015 00:15:11 +0000 (17:15 -0700)
committerGuy Harris <[email protected]>
Mon, 14 Sep 2015 00:15:11 +0000 (17:15 -0700)
pcap-int.h
pcap-win32.c

index 655c19d913a63a74230265a7de19f31a2670c40d..b9dad859a6cec9a23f173314e6b29adbb551fe3d 100644 (file)
@@ -41,7 +41,12 @@ extern "C" {
 #endif
 
 #ifdef _WIN32
-#include <Packet32.h>
+/*
+ * If we haven't included Packet32.h, define ADAPTER ourselves.
+ */
+#ifndef __PACKET32
+typedef struct _ADAPTER ADAPTER;
+#endif
 extern CRITICAL_SECTION g_PcapCompileCriticalSection;
 #endif /* _WIN32 */
 
index aed5a1b87db653a615c5ab58b02b1ab219d68380..46d77ad79e6c6331c4969c3b3a1f698246a65b88 100644 (file)
@@ -322,7 +322,7 @@ pcap_oid_set_request_win32(pcap_t *p, bpf_u_int32 oid, const void *data,
        oid_data_arg->oid = oid;
        oid_data_arg->length = len;
        memcpy(oid_data_arg->data, data, len);
-       if (!PacketRequest(p->adapter, TRUE, data)) {
+       if (!PacketRequest(p->adapter, TRUE, oid_data_arg)) {
                pcap_win32_err_to_str(GetLastError(), errbuf);
                snprintf(p->errbuf, PCAP_ERRBUF_SIZE,
                    "Error calling PacketRequest: %s", errbuf);