]> git.ipfire.org Git - thirdparty/lldpd.git/commit - src/daemon/lldpd.h
interfaces: setting up raw interface with BPF filter is OS specific
authorVincent Bernat <bernat@luffy.cx>
Tue, 25 Dec 2012 10:40:06 +0000 (11:40 +0100)
committerVincent Bernat <bernat@luffy.cx>
Tue, 25 Dec 2012 10:40:06 +0000 (11:40 +0100)
commit88bc404fec75841f058eacf7402d8f3555cc4409
tree28ce164f86904bb5d0b58dd78999c9076bff0d46
parentadbb6e54c36cf77e033a5eb4fe28c7aa5abfcd76
interfaces: setting up raw interface with BPF filter is OS specific

On Linux, setting up a BPF filter on an interface means using
`setsockopt()` on a raw socket. On BSD, we need to open `/dev/bpf` as
a raw socket and attach the interface to it. Therefore, physical
interface initialization cannot be abstracted.
src/daemon/interfaces-linux.c
src/daemon/interfaces.c
src/daemon/lldpd.h