summaryrefslogtreecommitdiffstats
path: root/lib/libpcap/pcap-bpf.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* When system calls indicate an error they return -1, not some arbitraryderaadt2019-06-281-17/+17
| | | | | | value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
* Import pcap_set_immediate_mode() from mainline libpcap which allows alteo2018-04-051-1/+12
| | | | | | | | libpcap-based program to process packets as soon as they arrive. feedback from jasper@ ok jca@ (a long time ago)
* Switch base tools from /dev/bpf0 to /dev/bpf. Now that /dev/bpf has beennatano2017-04-191-3/+3
| | | | | | around for two releases, it should be safe to do so. ok bluhm deraadt sthen tb yasuoka
* Use /dev/bpf0 instead of /dev/bpf (without loop though), as suggested bynatano2016-05-081-3/+3
| | | | | | sthen@. to make remote upgrades without media less painful. ok tb@
* Move to /dev/bpf; ok lteonatano2016-05-031-60/+11
|
* remove NULL-checks before free()mmcc2015-12-221-4/+4
|
* Remove register keyword.mmcc2015-11-171-3/+3
| | | | ok deraadt@
* remove the #if bsdi path from here as welljsg2015-10-011-22/+1
|
* fix libpcap for ifmedia64stsp2015-09-111-3/+3
|
* Teach monitor_mode() that the return code for unknown ioctl requests wassthen2015-02-151-1/+2
| | | | | | changed from EINVAL to ENOTTY in sys/net/if_media.c r1.19; it should just indicate that monitor mode is not available, rather than return a general error. ok dcoppa jca
* Rename pcap_create()'s ebuf argument to errbuf to match the rest of thelteo2015-01-161-4/+4
| | | | | | | public pcap_* functions that use errbuf. Mainline libpcap also uses "errbuf" for pcap_create(). No object file change.
* Remove pointless casts for several malloc/calloc/free calls. No objectlteo2015-01-161-4/+4
| | | | file change.
* Fix a use after free, where the already freed p->opt.source was used bylteo2015-01-161-3/+2
| | | | | | | pcap_cleanup_bpf() to disable monitor mode on 802.11 devices. feedback blambert@ ok deraadt@ mikeb@ millert@
* use reallocarray(); ok lteoderaadt2014-10-161-5/+5
|
* Change a few malloc+memset calls to calloc.lteo2014-03-141-3/+2
| | | | ok deraadt@ florian@
* timeb.h has not been used foreverderaadt2013-12-031-2/+1
|
* Import a number of core functions from libpcap-1.2.0 while preservinglteo2012-05-251-75/+702
| | | | | | | | | | | | | | | | | | | | | | | | local changes: strncpy() -> strlcpy(), malloc(x * y) -> calloc(x, y), exclude cross-platform cruft, etc. The new functions are pcap_create(), pcap_set_snaplen(), pcap_set_promisc(), pcap_can_set_rfmon(), pcap_set_rfmon(), pcap_set_timeout(), pcap_set_buffer_size(), pcap_activate(), and pcap_statustostr(). This diff was tested on amd64, i386, macppc, and sparc64, where regression tests were done on various pcap-based ports (especially amd64 and i386 where regression tests were run on all pcap-based ports). Testers also tried running pcap-based ports that they are familiar with to ensure that there is no behavioral change. tcpdump and pflogd in base were also tested by different testers. The new pcap_* functions were tested with a proof-of-concept Snort 2.9 port for many months. Thank you to everyone who helped test this diff and provided feedback: haesbaert@, sthen@, matthew@, gonzalo@, brett@, Rodolfo Gouveia, Aaron Bieber, Markus Lude, and Ray Percival. ok haesbaert sthen henning
* add remaining tcpdump.org libpcap 0.9 APIs, most notablydjm2006-03-261-2/+36
| | | | | pcap_setdirection() (which depends on the kernel-side bpf changes committed yesterday); ok canacar@
* malloc fix for bpf interface array allocation (from freebsd). usereyk2006-01-161-3/+2
| | | | | | calloc instead of the proposed fix with additional parentheses. ok moritz@ millert@
* - check for malloc failurejaredy2006-01-111-5/+6
| | | | | | | | | - plug some memleaks - avoid close(-1) when open() fails in pcap_open_live() sent upstream where applicable ok djm moritz
* pull in the good bits of libpcap-0.9.4's API without the cross-platformdjm2005-11-181-2/+111
| | | | | | cruft. help from deraadt@, mpf@, jmc@; ok mpf@a nb. this will break tcpdump unless it updated too
* use the kernel default for buf size. no behavior change by default.tedu2004-02-061-1/+4
| | | | ok canacar@ mcbride@
* remove $Header, it was messing up cvs for me. ok deraadt@tedu2004-01-271-5/+1
|
* Replace some strncpy() calls with strlcpy()jfb2004-01-211-3/+3
| | | | tested by jose@, ok canacar@ and otto@
* prevent double-free; from aldo@nullcube.com; dhartmei@ okmickey2003-11-241-7/+16
|
* sync with libpcap v0.5jakob2000-04-261-3/+12
| | | | add support for INET6 (kame)
* More <sys/file.h> vs. <fcntl.h> and open() flags fixes.millert1999-08-171-3/+3
|
* changes brought in from v0.4; started by brad, more by me, being tested by mtsderaadt1999-07-201-8/+28
|
* buf oflowsderaadt1998-07-141-16/+27
|
* Fix PR #299 (pcap_inject busted).dm1997-08-131-2/+4
|
* Use __inlinetholo1996-09-161-2/+2
|
* bring it to the latest 0.2 LBL release.mickey1996-07-121-16/+21
|
* merge to latest libpcapderaadt1996-06-101-1/+1
|
* Use __inline, not inlinetholo1996-03-231-2/+2
|
* Update to the latest LBL release.mickey1996-03-041-0/+1
|
* pcap inject function is a good idea; from scottr@edsi.org; netbsd pr#1747deraadt1995-11-131-0/+6
|
* initial import of NetBSD treederaadt1995-10-181-0/+238