[Javanetsim-cvs] IceScan/icesockets sock_pcap.h,1.6,1.7
Status: Beta
Brought to you by:
darkkey
From: Alexander B. <da...@us...> - 2006-12-19 18:59:19
|
Update of /cvsroot/javanetsim/IceScan/icesockets In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv31614/icesockets Modified Files: sock_pcap.h Log Message: no message Index: sock_pcap.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/icesockets/sock_pcap.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** sock_pcap.h 17 Dec 2006 21:22:36 -0000 1.6 --- sock_pcap.h 19 Dec 2006 18:59:16 -0000 1.7 *************** *** 9,12 **** --- 9,14 ---- #define _sock_pcap_H + #include "sock_types.h" + #ifdef __CYGWIN__ //There's no pcap in Cygwin :( typedef int pcap_t; *************** *** 22,35 **** return NULL; } bool pcap_filter(pcap_t *p, char *filter_exp){ return true; } void close_pcap(pcap_t *p){ } #else /* __CYGWIN__ */ - #include "sock_types.h" - pcap_t* init_pcap(int index = 0){ char *dev; --- 24,39 ---- return NULL; } + bool pcap_filter(pcap_t *p, char *filter_exp){ return true; } + int pcap_block(pcap_t *p, bool block){ + } + void close_pcap(pcap_t *p){ } #else /* __CYGWIN__ */ pcap_t* init_pcap(int index = 0){ char *dev; *************** *** 220,227 **** } void close_pcap(pcap_t *p){ pcap_close(p); } ! #endif /* __CYGWIN__ */ #endif /* _sock_pcap_H */ --- 224,235 ---- } + int pcap_block(pcap_t *p, bool block){ + return pcap_setnonblock(p, (int)(!block), NULL); + } + void close_pcap(pcap_t *p){ pcap_close(p); } ! #endif #endif /* _sock_pcap_H */ |