]> git.ipfire.org Git - thirdparty/dhcpcd.git/commit
Rename if_*raw functions to bpf_* so it's more descriptive and move
authorRoy Marples <roy@marples.name>
Wed, 8 Mar 2017 08:41:07 +0000 (08:41 +0000)
committerRoy Marples <roy@marples.name>
Wed, 8 Mar 2017 08:41:07 +0000 (08:41 +0000)
commit5fb1b714ea587c381ea45510feb2a190ca309f48
treeb813d5610bfa22493daf4382e52a3b3869c65ee4
parent0f7458d24fce3c5327b79e31b8f5623ce27444a5
Rename if_*raw functions to bpf_* so it's more descriptive and move
them from if-bsd.c to bpf.c so they can be re-used on SunOS in the future.
Linux is a special snowflake, so the BPF functions for opening, reading and
attaching remain in if-linux.c.
On Linux, open PF_PACKET as SOCK_RAW so we see the datalink frame header
just as BPF elsewhere so we don't have to mess around with offsets.

The BPF filters themselves have been improved to filter out more gunk such
as ensuring BOOTP messages are in an IPv4 packet and from the BOOTPS port.
ARP messages now check protocol family as well.

More improvements to T101.
arp.c
bpf.c
bpf.h [new file with mode: 0644]
dhcp.c
dhcp.h
if-bsd.c
if-linux.c
if.h
ipv4.c
ipv4.h