aboutsummaryrefslogtreecommitdiffstats
path: root/caputils/capture_wpcap_packet.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2017-10-26 10:50:25 -0700
committerGerald Combs <gerald@wireshark.org>2017-10-26 18:22:59 +0000
commit6ddee4aab22a96c444ace755fe33402f65e9f775 (patch)
treee3ac2b2d5825bee8047de9c9ba76d3a881cb91c9 /caputils/capture_wpcap_packet.c
parentfb160e53c8a9423ff78688bc9ef1ad5e1ec1edb1 (diff)
We don't need to define sockaddr_storage.
Winsock2.h will do that for us via packet32.h. Change-Id: Ie834d49b052c3db6784481bb85d94d4eecff8287 Reviewed-on: https://code.wireshark.org/review/24082 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'caputils/capture_wpcap_packet.c')
-rw-r--r--caputils/capture_wpcap_packet.c48
1 files changed, 0 insertions, 48 deletions
diff --git a/caputils/capture_wpcap_packet.c b/caputils/capture_wpcap_packet.c
index eac5ca7c5d..50a1b4aaf6 100644
--- a/caputils/capture_wpcap_packet.c
+++ b/caputils/capture_wpcap_packet.c
@@ -37,64 +37,16 @@
#include <epan/value_string.h>
-#include <winsock2.h> /* Needed here to force a definition of WINVER */
- /* for some (all ?) Microsoft compilers newer than vc6. */
- /* (If windows.h were used instead, there might be */
- /* issues re winsock.h included before winsock2.h ) */
#include <windowsx.h>
#include <Ntddndis.h>
#include "caputils/capture_wpcap_packet.h"
#include <wsutil/file_util.h>
-/* packet32.h requires sockaddr_storage
- * whether sockaddr_storage is defined or not depends on the Platform SDK
- * version installed. The only one not defining it is the SDK that comes
- * with MSVC 6.0 (WINVER 0x0400).
- *
- * copied from RFC2553 (and slightly modified because of datatypes) ...
- * XXX - defined more than once, move this to a header file */
-#ifndef WINVER
-#error WINVER not defined ....
-#endif
-#if (WINVER <= 0x0400) && defined(_MSC_VER)
-typedef unsigned short eth_sa_family_t;
-
-/*
- * Desired design of maximum size and alignment
- */
-#define ETH_SS_MAXSIZE 128 /* Implementation specific max size */
-#define ETH_SS_ALIGNSIZE (sizeof (gint64 /*int64_t*/))
- /* Implementation specific desired alignment */
-/*
- * Definitions used for sockaddr_storage structure paddings design.
- */
-#define ETH_SS_PAD1SIZE (ETH_SS_ALIGNSIZE - sizeof (eth_sa_family_t))
-#define ETH_SS_PAD2SIZE (ETH_SS_MAXSIZE - (sizeof (eth_sa_family_t) + \
- ETH_SS_PAD1SIZE + ETH_SS_ALIGNSIZE))
-
-struct sockaddr_storage {
- eth_sa_family_t __ss_family; /* address family */
- /* Following fields are implementation specific */
- char __ss_pad1[ETH_SS_PAD1SIZE];
- /* 6 byte pad, this is to make implementation */
- /* specific pad up to alignment field that */
- /* follows explicit in the data structure */
- gint64 /*int64_t*/ __ss_align; /* field to force desired structure */
- /* storage alignment */
- char __ss_pad2[ETH_SS_PAD2SIZE];
- /* 112 byte pad to achieve desired size, */
- /* _SS_MAXSIZE value minus size of ss_family */
- /* __ss_pad1, __ss_align fields is 112 */
-};
-/* ... copied from RFC2553 */
-#endif /* WINVER */
-
#include <Packet32.h>
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, ...).
*