summaryrefslogtreecommitdiff
path: root/sbin/dhclient/bpf.c
AgeCommit message (Expand)Author
2019-03-18explicitly use BPF_FILDROP_CAPTURE when configuring BIOCSFILDROPDavid Gwynne
2019-01-05Simplify and clarify (i.e. shrink) code processingKenneth R Westerback
2018-12-27Rename ufdesc to udpfd to make the code slightly more intuitive.Kenneth R Westerback
2018-12-27Rename bfdesc to bpffd and packethandler() to bpffd_handler() to makeKenneth R Westerback
2018-12-08ssize_t and unsigned int may be different sizes. Use ssize_t insteadKenneth R Westerback
2018-07-04Print the amount of bytes written, as intended, instead of -1 whenMartin Pieuchot
2017-09-20Make log messages more informative by using theKenneth R Westerback
2017-09-20Make send_packet() log entries more informative byKenneth R Westerback
2017-09-20Nuke a few extraneous blanks.Kenneth R Westerback
2017-09-19Make send_packet() usage consistent. i.e. don't exitKenneth R Westerback
2017-09-17Create global 'log_procname' and set it to '<ifname>' orKenneth R Westerback
2017-09-14Strive to rationalize fatal[x]() usage andKenneth R Westerback
2017-07-24Tweak some commentsKenneth R Westerback
2017-07-14"ioctl() < 0" ==> "ioctl() == -1" as god and guenther@Kenneth R Westerback
2017-07-14Replace remaining "!var" expressions withKenneth R Westerback
2017-07-10Take some of the mystery out of who does what byKenneth R Westerback
2017-07-10Use a modern spacious idiom on all function local variableKenneth R Westerback
2017-07-09Be consistent. "return (e);" -> "return e;"Kenneth R Westerback
2017-07-08Always use uintNN_t instead of sometimes u_intNN_tKenneth R Westerback
2017-07-07assemble_eh_header() needs only to know about hw_addr.Kenneth R Westerback
2017-07-03sizeof(struct sockaddr_in) != sizeof(struct in_addr).Kenneth R Westerback
2017-06-27Make if_register_bpf() the same as the other if_register_*() functionsKenneth R Westerback
2017-06-19Various KNF nits.Kenneth R Westerback
2017-06-14Start consolidating client_state into interface_info. FirstKenneth R Westerback
2017-06-13Rename 'packet' field to 'recv_packet' and 'bootrequest_packet'Kenneth R Westerback
2017-04-19Switch base tools from /dev/bpf0 to /dev/bpf. Now that /dev/bpf has beenMartin Natano
2017-04-18Tweak parameters to decode_*, add a check or two, and thus gain most of theKenneth R Westerback
2017-04-18After 11 years of pondering about it I think that brookdavis@freebsd.orgKenneth R Westerback
2017-02-12Eliminate most strerror() invocations by using log_warn() and fatal()Kenneth R Westerback
2017-02-12Adjust lines that are too long.Kenneth R Westerback
2017-02-12Switch from 'legacy' errwarn.c to standard daemon logging functions.Kenneth R Westerback
2016-08-31Remove the 'client' global and make it per-ifp.Martin Pieuchot
2016-08-23Make the 'ifi' global local to dhclient.c and pass it as an argument toMartin Pieuchot
2016-07-23Back out the dhclient BPF change. There are DHCP servers out there whichStefan Sperling
2016-07-19Narrow the BPF read filter rules so only packets sent to theKenneth R Westerback
2016-05-08Use /dev/bpf0 instead of /dev/bpf (without loop though), as suggested byMartin Natano
2016-05-03Move to /dev/bpf; ok tb jmcMartin Natano
2016-02-06Eliminate #include inside *.h files and include only needed headers inKenneth R Westerback
2014-12-03Correct comment to state that the BPF program is patched inKenneth R Westerback
2014-11-23Cleanup some struct interface_info fields. Make 'nomedia' a flag. ReplaceKenneth R Westerback
2014-11-08Use open(O_CLOEXEC) rather than open() + fcntl(FD_CLOEXEC). InspiredKenneth R Westerback
2014-11-08Exhort user to recompile 'dhclient', not 'dhcpd', when bpf versions areKenneth R Westerback
2014-10-25Remove unnecessary netinet/in_systm.h include.Lawrence Teo
2014-04-17Eliminate a couple of always-NULL parameters. Eliminate someKenneth R Westerback
2013-12-12Assemble outgoing packets using iovec to combine the (optional)Kenneth R Westerback
2013-12-06Having stopped pretending we handle anything but ethernet packets,Kenneth R Westerback
2013-11-11Shuffle function prototypes and extern declarations around toKenneth R Westerback
2013-05-02Bunch of comment/whitespace cleanup. Eliminate some misleading orKenneth R Westerback
2013-04-05send_packet() and writev() return ssize_t, not int. Use correctKenneth R Westerback
2013-02-14Don't rely on the packet buffer (client->packet) being preserved betweenKenneth R Westerback