Home | History | Annotate | Download | only in wakeonlan

Lines Matching defs:bpf

38 #include <net/bpf.h>
83 wake(int bpf, const char *host)
90 return send_wakeup(bpf, &macaddr);
94 bind_if_to_bpf(char const *ifname, int bpf)
104 if (ioctl(bpf, BIOCSETIF, &ifr) == -1)
106 if (ioctl(bpf, BIOCGDLT, &dlt) == -1)
159 send_wakeup(int bpf, struct ether_addr const *addr)
180 if ((bw = write(bpf, p, len)) == -1)
191 int bpf, n;
197 if ((bpf = open(_PATH_BPF, O_RDWR)) == -1)
198 err(EXIT_FAILURE, "Cannot open bpf interface");
201 if (bind_if_to_bpf(argv[1], bpf) == -1) {
205 if (bind_if_to_bpf(ifname, bpf) == -1)
215 if (wake(bpf, argv[n]))