summaryrefslogtreecommitdiff
path: root/lib/libpcap
AgeCommit message (Collapse)Author
2016-05-08Use /dev/bpf0 instead of /dev/bpf (without loop though), as suggested byMartin Natano
sthen@. to make remote upgrades without media less painful. ok tb@
2016-05-03Move to /dev/bpf; ok lteoMartin Natano
2016-04-06bad spell of whether...Jason McIntyre
2016-04-06add two functions from libpcap-1.7.4 which are required by at least gopacketJasper Lievisse Adriaanse
ok lteo@ "go for it" dlg@
2016-04-05Move more fcntl(,F_GETFL,0) -> fcntl(,F_GETFL).Kenneth R Westerback
No functional change. ok guenther@
2016-04-02refactor bpf_filter a bit.David Gwynne
the code was confusing around how it dealt with packets in mbufs vs plain memory buffers with a lenght. this renames bpf_filter to _bpf_filter, and changes it so the packet memory is referred to by an opaque pointer, and callers have to provide a set of operations to extra values from that opaque pointer. bpf_filter is now provided as a wrapper around _bpf_filter. it provides a set of operators that work on a straight buffer with a lenght. this also adds a bpf_mfilter function which takes an mbuf instead of a buffer, and it provides explicit operations for extracting values from mbufs. if we want to use bpf filters against other data structures (usb or scsi packets maybe?) we are able to provide functions for extracting payloads from them and use _bpf_filter as is. ok canacar@
2016-03-30for some time now mandoc has not required MLINKS to functionJason McIntyre
correctly - logically complete that now by removing MLINKS from base; authors need only to ensure there is an entry in NAME for any function/ util being added. MLINKS will still work, and remain for perl to ease upgrades; ok nicm (curses) bcook (ssl) ok schwarze, who provided a lot of feedback and assistance ok tb natano jung
2016-02-05Use the correct structure size when allocating the array for nodes.Can Erkin Acar
ok tb@ millert@
2015-12-22remove NULL-checks before free()mmcc
2015-11-17Remove register keyword.mmcc
ok deraadt@
2015-11-17memory.h -> string.hmmcc
ok deraadt@
2015-11-15update NAME; ok schwarzeJason McIntyre
2015-10-24Cast isxdigit()'s argument to unsigned char.mmcc
ok guenther@
2015-10-24Cast ctype function arguments to unsigned char.mmcc
ok guenther@
2015-10-01remove the #if bsdi path from here as wellJonathan Gray
2015-09-27lint is dead: delete the trivial uses of /* VARARGS[0-9]+ */Philip Guenther
(others require more care)
2015-09-11fix libpcap for ifmedia64Stefan Sperling
2015-04-07Fix miscellaneous factual, grammar, and markup errors.Lawrence Teo
From Jan Stary.
2015-02-15Teach monitor_mode() that the return code for unknown ioctl requests wasStuart Henderson
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
2015-01-16Move to the <limits.h> universe.Theo de Raadt
review by millert, binary checking process with doug, concept with guenther
2015-01-16Complete the list of functions in the paragraph that mentions thatLawrence Teo
errbuf needs to hold at least PCAP_ERRBUF_SIZE chars.
2015-01-16Rename pcap_create()'s ebuf argument to errbuf to match the rest of theLawrence Teo
public pcap_* functions that use errbuf. Mainline libpcap also uses "errbuf" for pcap_create(). No object file change.
2015-01-16Add more missing argument names.Lawrence Teo
2015-01-16Remove pointless casts for several malloc/calloc/free calls. No objectLawrence Teo
file change.
2015-01-16Fix a use after free, where the already freed p->opt.source was used byLawrence Teo
pcap_cleanup_bpf() to disable monitor mode on 802.11 devices. feedback blambert@ ok deraadt@ mikeb@ millert@
2015-01-15remove .Tn; from Jan Stary <hans at stare dot cz>Ingo Schwarze
2014-12-24Add missing argument names, and sync the argument types and names withLawrence Teo
the ones used in the code. pointed out by schwarze@
2014-12-12markup fixes, and repair some wrong argument types while here;Ingo Schwarze
from Kaspars at Bankovskis dot net
2014-12-06A few last 'easy' #include dedups.Kenneth R Westerback
ok tedu@
2014-11-20Yet more #include de-duplication.Kenneth R Westerback
ok deraadt@ tedu@
2014-10-16use reallocarray(); ok lteoTheo de Raadt
2014-06-26Convert several calloc calls to reallocarray. These calloc calls wereLawrence Teo
originally malloc(n * m) calls (without memset/bzero) in the past. ok deraadt@ tedu@
2014-04-11Zap CVS $Header tags, reduces diff with upstream's repoLawrence Teo
ok deraadt@
2014-03-21Remove #ifdef lint block, since lint is gone. This #ifdef block was aLawrence Teo
local addition that has never been part of upstream. No binary change. feedback from guenther@
2014-03-16Overflow check the calculation for a malloc size.Theo de Raadt
XXX noted by lteo, change proofed & tested as well
2014-03-14Remove pointless casts. No binary change.Lawrence Teo
suggested by krw@
2014-03-14Change a few malloc+memset calls to calloc.Lawrence Teo
ok deraadt@ florian@
2014-02-19Add tcpdump(8) to the SEE ALSO section, and tweak the formatting in thatLawrence Teo
section to follow traditional man(7) conventions. man(7) formatting help from jmc@ and schwarze@ feedback/ok jmc@
2013-12-03timeb.h has not been used foreverTheo de Raadt
2013-08-13Switch time_t, ino_t, clock_t, and struct kevent's ident and dataPhilip Guenther
members to 64bit types. Assign new syscall numbers for (almost all) the syscalls that involve the affected types, including anything with time_t, timeval, itimerval, timespec, rusage, dirent, stat, or kevent arguments. Add a d_off member to struct dirent and replace getdirentries() with getdents(), thus immensely simplifying and accelerating telldir/seekdir. Build perl with -DBIG_TIME. Bump the major on every single base library: the compat bits included here are only good enough to make the transition; the T32 compat option will be burned as soon as we've reached the new world are are happy with the snapshots for all architectures. DANGER: ABI incompatibility. Updating to this kernel requires extra work or you won't be able to login: install a snapshot instead. Much assistance in fixing userland issues from deraadt@ and tedu@ and build assistance from todd@ and otto@
2013-06-25zap trailing whitespace;Jason McIntyre
2013-06-25bring return value of pcap_breakloop in sync with reality.Sebastian Reitenbach
OK jmc@
2013-06-19Do not install pcap-int.h to /usr/include as it is an internal libraryLawrence Teo
header (pointed out by matthew@). Let only pflogd and tcpdump include pcap-int.h directly since they need it for privilege separation. "looks good" sthen feedback/ok deraadt matthew millert
2012-08-02remove leftover NOLINT, WANTLINT, LINTFLAGS, LOBJ vars and lint targets.Okan Demirmen
ok guenther@
2012-07-16Add a man page describing pcap grammargiovanni
help from lteo@, claudio, jmc@ ok jmc@
2012-05-25tweak previous; ok sthen lteoJason McIntyre
2012-05-25Import a number of core functions from libpcap-1.2.0 while preservingLawrence Teo
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
2011-03-28Add icmptype and tcpflags support to the grammargiovanni
ok claudio@ jsing@
2010-10-09Fix typo in pflog header size computation. Fixes filtering with the newCan Erkin Acar
pflog headers. reported by jmc@, tested by jmc@ and sthen@, ok sthen@
2010-09-08Make tcpdump of pflog interfaces work with 'net <net>' expression.Kenneth R Westerback
My problem, canacar@'s fix. ok sthen@ canacar@