summaryrefslogtreecommitdiff
path: root/lib/libpcap
AgeCommit message (Collapse)Author
2018-12-13further document pcap_dump; from jan staryJason McIntyre
text tweaked and ok djm
2018-12-12some pcap_setdirection details; from jan staryJason McIntyre
ok djm
2018-12-09add basic MPLS filtering supportdenis
OK claudio@ jca@
2018-11-10unbreak VLAN filteringdenis
OK dlg@
2018-11-09fix a typodenis
OK jca@ (from a long time ago...)
2018-06-03Sync manual with the const changes introduced in pcap.h rev 1.20.Theo Buehler
2018-06-03Change some libpcap functions which use pointers as arguments andStuart Henderson
returns to const pointers: - the prefix argument to pcap_perror(); - the return value of pcap_strerror(); - the filter expression argument to pcap_compile() and pcap_compile_nopcap(); - the BPF filter program argument to bpf_image(). Matches changes made earlier in tcpdump.org's version of libpcap. From Guy Harris, ok tb@, been through a bulk ports build.
2018-04-26Convert a format string variable to a static const char[] to reduce warningsPhilip Guenther
ok tb@ millert@ krw@
2018-04-05Import pcap_set_immediate_mode() from mainline libpcap which allows aLawrence Teo
libpcap-based program to process packets as soon as they arrive. feedback from jasper@ ok jca@ (a long time ago)
2018-02-06recognise DLT_PPP_SERIAL.David Gwynne
shlib version doesnt need a bump before no new symbols were added or removed. part of a larger diff that was ok sthen@
2018-02-03Simple USBPcap parser for tcpdump(8). Raw dumps can be nicely analysedMartin Pieuchot
in wireshark. ok deraadt@, dlg@
2018-01-01Fix wrong ETHERTYPE_IPV6denis
OK jca@ kettenis@ job@
2017-07-09use working boilerplate for yacc/lex instead of homemade rules.Marc Espie
okay millert@ (forgot the obvious scanner.l tweak in my diff)
2017-04-27Remove the "volatile" attribute from bpf_error(). The "volatile"Todd C. Miller
attribute is an obsolete way of saying "noreturn". clang doesn't recognize it and the function is already marked __dead so it is superfluous anyway.
2017-04-19Switch base tools from /dev/bpf0 to /dev/bpf. Now that /dev/bpf has beenMartin Natano
around for two releases, it should be safe to do so. ok bluhm deraadt sthen tb yasuoka
2016-12-02add "lldp" to the ether protocol name db.David Gwynne
this lets me go "tcpdump ether proto lldp" to easily read lldp packets off the wire without other noise getting in the way. ok deraadt@ jca@ sthen@
2016-11-29Stop exporting the eproto_db array, export a pointer to it instead.Jeremie Courreges-Anglas
tcpdump directly uses eproto_db even though it is not part of the libpcap API. This means that we can't freely add members to this array, else ld.so complains about size mismatches. Keep the data in a static array instead and make it usable by tcpdump through a pointer whose size won't change in the future. A minor bump is enough here for ld.so to stop complaining. While here, mark _eproto_db and llc_db as const, as they are meant to be. Suggested by and ok deraadt@
2016-11-20Extend the DLT_OPENFLOW header to include the switch datapath id.Reyk Floeter
OK rzalamena@
2016-11-16Add new DLT_OPENFLOW link-type to allow using tcpdump to debug switch(4),Reyk Floeter
eg. tcpdump -y openflow -i switch0 Includes a minor bump for libpcap. Feedback and OK rzalamena@
2016-10-17Add missing argument names for pcap_offline_filter.Lawrence Teo
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@