aboutsummaryrefslogtreecommitdiffstats
path: root/pcap-null.c
AgeCommit message (Collapse)AuthorFilesLines
2009-02-14Update to the new style, wherein each capture type has its ownGuy Harris1-2/+2
pcap_create() routine, and pcap_activate() calls through the activate_op pointer in a pcap_t.
2008-04-04From Paolo Abeni and me: split pcap_open_live() into a "get a pcap_tguy1-4/+3
handle" routine, an 'activate a pcap_t handle" routine, and some "set the properties of the pcap_t handle" routines, so that, for example, the buffer size can be set on a BPF device before the device is bound to an interface. Add additional routines to set monitor mode, and make at least an initial attempt at supporting that on Linux, *BSD, and Mac OS X 10.4 and 10.5. (Very much "initial" for Linux, which is a twisty little maze of wireless drivers, many different.) Have a "timeout" member of the pcap_md structure on all platforms, use that on Windows instead of the "timeout" member of the pcap_t structure, and get rid of the "timeout" member of that structure.
2003-11-15Add _U_ to "rcsid[]" definitions, to eliminate "unused variable"guy1-2/+2
warnings from newer versions of GCC.
2003-07-25Add a "read" function pointer to the pcap_t structure, which handlesguy1-8/+1
reading packets from a pcap_t, and make "pcap_read()" call it. That removes the last place where we have to check for a pcap_t that refers to a DAG card rather than a live capture, so get rid of the "is_dag" flag.
2003-07-25Add a "set_datalink" function pointer to the pcap_t structure, whichhandlesguy1-7/+1
setting a filter for a pcap_t. Have "pcap_set_datalink()" call it, rather than explicitly calling "pcap_set_datalink_platform()".
2003-07-25Add a "setfilter" function pointer to the pcap_t structure, whichguy1-14/+1
handles setting a filter for a pcap_t. Have "pcap_setfilter()" call it, rather than being a per-platform function. The per-platform functions don't need to check for an offline capture any more, as they're not called for an offline capture (and the ones that just call "install_bpf_program()" don't need to exist at all).
2003-07-25Add a "stats" function pointer to the pcap_t structure, which handlesguy1-8/+1
getting statistics for a pcap_t. Have "pcap_stats()" call it, rather than being a per-platform function; have stats routines for non-live pcap_t's that return an error.
2002-12-22From Yoann Vandoorselaere <yoann@prelude-ids.org>: make the "device"guy1-2/+3
argument to "pcap_open_live()" a "const" pointer. Constify some additional device name arguments, and update the man page to reflect some arguments that were already consts.
2002-12-19NetBSD support for multiple data link types on an interface, from Davidguy1-1/+7
Young <dyoung@ojctech.com>, with some minor changes by Jason R. Thorpe <thorpej@netbsd.org>, and further changes by me to support it on BPF systems lacking BIOCGDLTLIST and other platforms lacking an equivalent feature. Update Jason Thorpe's e-mail address (Zembu is going away, if it hasn't done so already). Add APIs to map DLT names to DLT values and vice versa.
2002-07-11Add SunATM support, based on code from Yen Yen Lim at North Dakota Stateguy1-1/+7
University.
2000-10-28When attaching a "bpf_program" to a "pcap_t" to use as a userlandguy1-2/+3
filter, always attach a copy, as "pcap-linux.c" does; that way, after a program uses "pcap_setfilter()", it can safely use "pcap_freecode()" to free up the BPF instructions allocated by "pcap_compile()". Also, always free it up when the "pcap_t" is closed. Get rid of the "pcap_t *" argument to "pcap_freecode()", as it's not necessary. Document "pcap_freecode()", for the benefit of programs that might repeatedly compile filter programs and attach them, so that they can free them up after attaching them and avoid leaking memory for them.
2000-07-11add config.h, remove gnuc.h. remove __deadassar1-2/+5
2000-06-26remove some empty linesassar1-5/+1
2000-04-27s/PCAP_ERRBUFF_SIZE/PCAP_ERRBUF_SIZE/ (fatal typo)itojun1-2/+2
2000-04-27nuke strcpy()itojun1-2/+2
2000-04-27do not use sprintf(). always use snprintf().itojun1-4/+5
from NetBSD/OpenBSD src/lib/libpcap. use freeifaddrs() if exists.
1999-10-07Initial revisionmcr1-0/+73