diff options
author | Ali Abdulkadir <autostart.ini@gmail.com> | 2018-06-11 18:06:36 +0300 |
---|---|---|
committer | Ali Abdulkadir <autostart.ini@gmail.com> | 2018-06-11 18:06:36 +0300 |
commit | d3f66d77c8ad867637f116a4c65b01c1625ebf45 (patch) | |
tree | 8f96df6277385b3025a6ceeac241c66b8c46e72d | |
parent | cf6beba0fea625b1e87c76873f81a0e91916ebc3 (diff) | |
download | libnet-d3f66d77c8ad867637f116a4c65b01c1625ebf45.tar.gz |
Windows: Include pcap.h only when building libnet
-rw-r--r-- | libnet/include/libnet/libnet-structures.h | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/libnet/include/libnet/libnet-structures.h b/libnet/include/libnet/libnet-structures.h index 13b50a8..e8ade01 100644 --- a/libnet/include/libnet/libnet-structures.h +++ b/libnet/include/libnet/libnet-structures.h @@ -30,8 +30,7 @@ #ifndef __LIBNET_STRUCTURES_H #define __LIBNET_STRUCTURES_H -#if ((__WIN32__) && !(__CYGWIN__)) -#include <pcap.h> +#if ((_WIN32) && !(__CYGWIN__)) #include "Packet32.h" #endif @@ -50,15 +49,9 @@ struct libnet_port_list_chain /* libnet statistics structure */ struct libnet_stats { -#if (!defined(__WIN32__) || (__CYGWIN__)) - uint64_t packets_sent; /* packets sent */ - uint64_t packet_errors; /* packets errors */ - uint64_t bytes_written; /* bytes written */ -#else __int64 packets_sent; /* packets sent */ __int64 packet_errors; /* packets errors */ __int64 bytes_written; /* bytes written */ -#endif }; @@ -184,7 +177,7 @@ typedef struct libnet_protocol_block libnet_pblock_t; */ struct libnet_context { -#if ((__WIN32__) && !(__CYGWIN__)) +#if ((_WIN32) && !(__CYGWIN__)) SOCKET fd; LPADAPTER lpAdapter; #else |