summaryrefslogtreecommitdiff
path: root/lib/libpcap
AgeCommit message (Collapse)Author
2019-12-17Fix bogus ".It .Cm"Jeremie Courreges-Anglas
2019-11-28Fix typo in comment in struct pcap_pkthdrakoshibe
2019-09-25the mentioned .Fn functions are in a another file, so .Xr themTheo de Raadt
ok jmc
2019-09-25pcap-filter now section 5: adjust XrJason McIntyre
2019-09-25mdoc version of pcap-filter;Jason McIntyre
conversion suggested by deraadt, as well as renaming from section 7 to section 5; ok deraadt
2019-09-03pcap-filter(3) is not a function, it is a language description. It wasTheo de Raadt
mostly cobbled together from a pre-mandoc tcpdump manual page, and desperately needs some loving. First step is to name it right. Discussed with jmc
2019-08-30there is no pcap(3) function, "man pcap" returns an incorrect result.Theo de Raadt
this page should be called by one of the functions, so i chose the first one: pcap_open_live(3)
2019-07-19add "slow" to the list of ethernet protocol names.David Gwynne
this allows "tcpdump ether proto slow", which makes looking at lacp frames a bit easier.
2019-06-28When system calls indicate an error they return -1, not some arbitraryTheo de Raadt
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.
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.