Main Page   Modules   Data Structures   File List   Data Fields   Globals  

Pcap-win32.c File Reference

#include <pcap-int.h>
#include <packet32.h>
#include <Ntddndis.h>

Go to the source code of this file.

Defines

#define PcapBufSize   256000
#define SIZE_BUF   1000000
#define bhp   ((struct bpf_hdr *)bp)

Functions

int wsockinit ()
int pcap_stats (pcap_t *p, struct pcap_stat *ps)
  Discouraged, Use pcap_stats_ex() instead.
Returns statistics on current capture.
More...


int pcap_read (pcap_t *p, int cnt, pcap_handler callback, u_char *user)
pcap_tpcap_open_live (char *device, int snaplen, int promisc, int to_ms, char *ebuf)
 Opens a physical interface for live capture. More...

int pcap_setfilter (pcap_t *p, struct bpf_program *fp)
 Associates a filter to a capture. More...

int pcap_setmode (pcap_t *p, int mode)
 Win32 Specific. Sets the working mode of the interface p to mode. More...

int pcap_sendpacket (pcap_t *p, u_char *buf, int size)
 Win32 Specific. Sends a raw packet. More...

int pcap_setbuff (pcap_t *p, int dim)
 Win32 Specific. Sets the size of the kernel buffer associated with an adapter. More...

int pcap_setmintocopy (pcap_t *p, int size)
 Win32 Specific. Sets the minumum amount of data received by the kernel in a single call. More...


Variables

const char rcsid []


Define Documentation

#define bhp   ((struct bpf_hdr *)bp)
 

#define PcapBufSize   256000
 

Definition at line 35 of file Pcap-win32.c.

Referenced by pcap_open_live.

#define SIZE_BUF   1000000
 

Definition at line 36 of file Pcap-win32.c.

Referenced by pcap_open_live.


Function Documentation

int pcap_read pcap_t   p,
int    cnt,
pcap_handler    callback,
u_char *    user
 

Definition at line 68 of file Pcap-win32.c.

References PacketReceivePacket, PCAP_ERRBUF_SIZE, pcap_handler, and pcap_t.

Referenced by pcap_dispatch, and pcap_loop.

int wsockinit  
 

Definition at line 40 of file Pcap-win32.c.

Referenced by pcap_open_live.


Variable Documentation

const char rcsid[] [static]
 

Initial value:

    "@(#) $Header: /tcpdump/master/libpcap/pcap-win32.c,v 1.2 2002/08/05 07:45:09 guy Exp $ (LBL)"

Definition at line 23 of file Pcap-win32.c.


documentation. Copyright (c) 2002 Politecnico di Torino. All rights reserved.