diff options
author | Dario Lombardo <lomato@gmail.com> | 2016-02-22 16:24:05 +0100 |
---|---|---|
committer | Roland Knall <rknall@gmail.com> | 2016-02-25 14:05:51 +0000 |
commit | a376915fdde1db06bd52b30f18bf9acf8d7bb084 (patch) | |
tree | 528385261eabefa2aa7cd91fbc653c71e9b3781e /extcap/extcap-base.h | |
parent | 0ffa73ae249999fad7125879207bcfc0c601898d (diff) |
extcap: move includes into extcap-base.
Change-Id: I802cc3a3bb3989411216ed070ecc018345e0d54f
Reviewed-on: https://code.wireshark.org/review/14073
Reviewed-by: Roland Knall <rknall@gmail.com>
Diffstat (limited to 'extcap/extcap-base.h')
-rw-r--r-- | extcap/extcap-base.h | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/extcap/extcap-base.h b/extcap/extcap-base.h index 0dabd8b2a9..9da001a87b 100644 --- a/extcap/extcap-base.h +++ b/extcap/extcap-base.h @@ -28,6 +28,42 @@ #include <glib/gprintf.h> #include <stdlib.h> +#ifdef HAVE_GETOPT_H + #include <getopt.h> +#endif + +#ifndef HAVE_GETOPT_LONG + #include "wsutil/wsgetopt.h" +#endif + +#ifdef _WIN32 + #include <io.h> +#endif + +#if defined(_WIN32) && !defined(__CYGWIN__) + #ifdef HAVE_WINDOWS_H + #include <windows.h> + #endif + + #include <ws2tcpip.h> + + #ifdef HAVE_WINSOCK2_H + #include <winsock2.h> + #endif + + #include <process.h> + + #define socket_handle_t SOCKET +#else + /* + * UN*X, or Windows pretending to be UN*X with the aid of Cygwin. + */ + #define closesocket(socket) close(socket) + #define socket_handle_t int + #define INVALID_SOCKET (-1) + #define SOCKET_ERROR (-1) +#endif + #define EXTCAP_BASE_OPTIONS_ENUM \ OPT_LIST_INTERFACES, \ OPT_LIST_DLTS, \ @@ -60,4 +96,4 @@ * * vi: set shiftwidth=4 tabstop=4 noexpandtab: * :indentSize=4:tabSize=4:noTabs=false: - */
\ No newline at end of file + */ |