summaryrefslogtreecommitdiffstats
path: root/lib/libpcap (follow)
Commit message (Collapse)AuthorAgeFilesLines
* remove leftover NOLINT, WANTLINT, LINTFLAGS, LOBJ vars and lint targets.okan2012-08-021-2/+1
| | | | ok guenther@
* Add a man page describing pcap grammargiovanni2012-07-163-7/+737
| | | | | help from lteo@, claudio, jmc@ ok jmc@
* tweak previous; ok sthen lteojmc2012-05-251-5/+7
|
* Import a number of core functions from libpcap-1.2.0 while preservinglteo2012-05-258-114/+1050
| | | | | | | | | | | | | | | | | | | | | | | | 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 icmptype and tcpflags support to the grammargiovanni2011-03-281-1/+25
| | | | ok claudio@ jsing@
* Fix typo in pflog header size computation. Fixes filtering with the newcanacar2010-10-091-2/+2
| | | | pflog headers. reported by jmc@, tested by jmc@ and sthen@, ok sthen@
* Make tcpdump of pflog interfaces work with 'net <net>' expression.krw2010-09-081-3/+3
| | | | | | My problem, canacar@'s fix. ok sthen@ canacar@
* Properly handle the size field in pflog link headercanacar2010-07-271-45/+236
| | | | | | | | | when generating the filter. This will allow the pflog header to be extended without adding a new link type. No change to generated code for other link types. ok henning@
* remove support for the old pflog format, replaced in 2003henning2010-06-262-36/+2
| | | | ok ryan theo & herr reyksminister
* rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt2009-10-272-11/+2
| | | | | | | unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
* Zero out IPv6 mask before using it. This fixes expressions likebluhm2009-09-181-1/+2
| | | | | | 'net 2002::/16', which were previously non-deterministic based on the previous contents of memory. from upstream; ok claudio@
* various MLINK fixes from Alan R. S. Bueno;jmc2009-08-131-2/+3
|
* teach libpcap about scrub ruleshenning2009-04-061-2/+4
|
* Swap the code for a calling function and what it calls, so that the calledderaadt2008-06-151-14/+14
| | | | | function is in scope and a pointer is not returned via an int ok dtucker
* Import vlan support from upstream libpcap. This allows, eg, "tcpdump vla 3"dtucker2008-06-116-10/+118
| | | | to work on a vlan parent interface. ok mcbride@, "commit it" deraadt@
* fix format stringchl2007-11-061-2/+2
| | | | ok ray@ gilles@
* use calloc() to avoid malloc(n * m) overflows; checked by djm canacar jsgderaadt2007-09-022-8/+8
|
* convert to new .Dd format;jmc2007-05-311-2/+2
|
* remove extra \n in bpf_error() calls.reyk2007-01-021-10/+10
| | | | figured out by claudio@
* define bpf filters to match address and header fields in IEEE 802.11reyk2007-01-024-18/+300
| | | | | | | | wlan frames (DLT_IEEE802_11 and DLT_IEEE802_11_RADIO linktypes). see tcpdump(8) for details. "Works for me" claudio@ ok jmc@ deraadt@
* +MLINK pcap.3 pcap_get_selectable_fd.3jmc2006-09-181-3/+3
| | | | from okan demirmen
* document pcap_get_selectable_fd(); MLINK will happen after unlockjmc2006-09-091-2/+6
| | | | | from okan demirmen; ok djm
* get rid of arc network support. we have no users of it so this is deaddlg2006-07-182-96/+3
| | | | | | | code. however, it is still cluttering up the kernel namespace a bit. it is better gone. ok claudio@
* strnvis illegal tokens as well and remove a spurious "i" that crept inotto2006-04-181-4/+10
| | | | the pattern long ago; ok deraadt@ and markus@ for the "i" removal
* vis() illegal characters; ok ottoderaadt2006-04-181-3/+9
|
* malloc(x * y) -> calloc(x, y) from adobriyan AT gmail.com, with tweaksdjm2006-04-021-5/+4
| | | | suggested by kjell@; ok otto@ pat@ millert@ jaredy@
* MLINK to new man pagesderaadt2006-03-271-2/+5
|
* add remaining tcpdump.org libpcap 0.9 APIs, most notablydjm2006-03-268-38/+264
| | | | | pcap_setdirection() (which depends on the kernel-side bpf changes committed yesterday); ok canacar@
* scrub can log, so it is a valid pf action to filter oncamield2006-03-261-2/+4
| | | | ok dhartmei
* 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-113-33/+51
| | | | | | | | | - plug some memleaks - avoid close(-1) when open() fails in pcap_open_live() sent upstream where applicable ok djm moritz
* Fix syntax error (missing ')') in #ifdef'ed out code. Spotted by lint.krw2005-11-251-2/+2
| | | | ok deraadt@
* use WANTLINT= (on all architectures)deraadt2005-11-241-1/+2
|
* In count_stmts(), make sure to account for long jump instructions as well,aaron2005-11-191-2/+2
| | | | | | | avoiding a memory error that could lead to a crash when a sufficiently complex bpf filter has been specified. otto@, millert@, djm@ ok Reference- http://www.tcpdump.org/lists/workers/2000/msg01364.html
* - new sentence, new linejmc2005-11-181-5/+5
| | | | | - avoid Xr to self - lookup(n.) -> look up(v.)
* pull in the good bits of libpcap-0.9.4's API without the cross-platformdjm2005-11-1810-34/+997
| | | | | | cruft. help from deraadt@, mpf@, jmc@; ok mpf@a nb. this will break tcpdump unless it updated too
* Add Spanning Tree Protocol support.mpf2005-10-077-12/+209
| | | | | Bump version to 3.1. OK brad@
* accept hostnames 1 char long; spotted by otto, ok ottoderaadt2005-09-271-2/+3
|
* Fix description in a comment.joel2005-06-041-2/+2
|
* rdr, nat and binat can appear in pflog now, so make them valid argumentscamield2005-05-261-2/+8
| | | | | | for the "action" keyword ok dhartmei
* add some const to ether_*. remove bonus prototypes this brought out.tedu2005-03-281-6/+2
| | | | ok deraadt@
* add DLT_IEEE802_11_RADIO (802.11 + radiotap header)reyk2005-02-281-1/+6
| | | | ok jsg@ deraadt@
* errno changes, lib major version bumps, and general flag daymarc2004-07-131-2/+2
| | | | | | | To build you must: cd /usr/src && make obj && make includes cd lib/libc && make depend && make && NOMAN=1 sudo make install cd /usr/src && make build
* make safe for inclusion in C++ code; ok deraadt@naddy2004-06-241-2/+4
|
* add DLT_PPP_ETHER supportbrad2004-05-211-1/+11
| | | | | | ok canacar@ From: Marc Huber <pppoe at pro-bono-publico dot de>
* 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-279-50/+9
|
* add DLT_IEEE802_11 support; from NetBSD. bump minor.fgsch2004-01-262-3/+8
| | | | deraadt@ ok.
* Replace some strncpy() calls with strlcpy()jfb2004-01-212-12/+11
| | | | tested by jose@, ok canacar@ and otto@
* prevent double-free; from aldo@nullcube.com; dhartmei@ okmickey2003-11-241-7/+16
|