aboutsummaryrefslogtreecommitdiff
path: root/src/ptunnel.h
diff options
context:
space:
mode:
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);