aboutsummaryrefslogtreecommitdiff
path: root/src/ptunnel.h
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2017-12-19 21:12:55 +0100
committerToni Uhlig <matzeton@googlemail.com>2017-12-19 21:12:55 +0100
commit00e2c4e6849adc1b9cc8b9daf9069d67ff086dc3 (patch)
tree1f9df654212d9d37e178470d99d0338fc0b4a0ad /src/ptunnel.h
parent4176fdf0b64f068d123a0d960beb1eb5708f3e7b (diff)
ptunnel-ng:
* fixed missing conditionaled compile for pcap * ported to mingw64
Diffstat (limited to 'src/ptunnel.h')
-rw-r--r--src/ptunnel.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ptunnel.h b/src/ptunnel.h
index c5a9e9b..f2b514d 100644
--- a/src/ptunnel.h
+++ b/src/ptunnel.h
@@ -74,6 +74,14 @@
#include "pdesc.h"
#include "challenge.h"
+#ifdef WIN32
+/* pthread porting to windows */
+typedef CRITICAL_SECTION pthread_mutex_t;
+typedef unsigned long pthread_t;
+#define pthread_mutex_init InitializeCriticalSectionAndSpinCount
+#define pthread_mutex_lock EnterCriticalSection
+#define pthread_mutex_unlock LeaveCriticalSection
+#endif
extern pthread_mutex_t chain_lock;
extern uint32_t num_tunnels;
extern const int icmp_receive_buf_len;
@@ -129,8 +137,10 @@ typedef struct {
/* function Prototypes */
void* pt_proxy(void *args);
+#ifdef HAVE_PCAP
void pcap_packet_handler(u_char *refcon, const struct pcap_pkthdr *hdr,
const u_char* pkt);
+#endif
void pt_forwarder(void);