aboutsummaryrefslogtreecommitdiffstats
path: root/pcap.h
diff options
context:
space:
mode:
authorrisso <risso>2002-08-01 08:33:01 +0000
committerrisso <risso>2002-08-01 08:33:01 +0000
commit6831542ec753e8d13d7de2f383aebcc2df8b5a98 (patch)
tree345b85f08385176a2aa369571ae6c209b55eef32 /pcap.h
parent3d856fe86501030f034ae6db80bf0072b439e097 (diff)
Added support for Win32, based on WinPcap.
Diffstat (limited to 'pcap.h')
-rw-r--r--pcap.h28
1 files changed, 25 insertions, 3 deletions
diff --git a/pcap.h b/pcap.h
index 47a0c4f..c2855b0 100644
--- a/pcap.h
+++ b/pcap.h
@@ -31,14 +31,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * @(#) $Header: /tcpdump/master/libpcap/pcap.h,v 1.35 2002-07-20 23:50:21 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/libpcap/pcap.h,v 1.36 2002-08-01 08:33:04 risso Exp $ (LBL)
*/
#ifndef lib_pcap_h
#define lib_pcap_h
-#include <sys/types.h>
-#include <sys/time.h>
+#include <pcap-stdinc.h>
#include <net/bpf.h>
@@ -129,6 +128,9 @@ struct pcap_stat {
u_int ps_recv; /* number of packets received */
u_int ps_drop; /* number of packets dropped */
u_int ps_ifdrop; /* drops by interface XXX not yet supported */
+#ifdef WIN32
+ u_int bs_capt; /* number of packets that reach the application */
+#endif /* WIN32 */
};
/*
@@ -203,6 +205,26 @@ int bpf_validate(struct bpf_insn *f, int len);
char *bpf_image(struct bpf_insn *, int);
void bpf_dump(struct bpf_program *, int);
+#ifdef WIN32
+/*
+ * Win32 definitions
+ */
+
+int pcap_setbuff(pcap_t *p, int dim);
+int pcap_setmode(pcap_t *p, int mode);
+int pcap_sendpacket(pcap_t *p, u_char *buf, int size);
+int pcap_setmintocopy(pcap_t *p, int size);
+
+#ifdef WPCAP
+/* Include file with the wpcap-specific extensions */
+#include <Win32-Extensions.h>
+#endif
+
+#define MODE_CAPT 0
+#define MODE_STAT 1
+
+#endif /* WIN32 */
+
#ifdef __cplusplus
}
#endif