| /src/external/bsd/dhcpcd/dist/src/ |
| bpf.h | 3 * dhcpcd: BPF arp and bootp filtering 37 * Even though we program the BPF filter should we trust it? 50 * If you want to be notified of any packet failing the BPF filter, 57 struct bpf { struct 72 struct bpf * bpf_open(const struct interface *, 73 int (*)(const struct bpf *, const struct in_addr *), 75 void bpf_close(struct bpf *); 77 ssize_t bpf_send(const struct bpf *, uint16_t, const void *, size_t); 78 ssize_t bpf_read(struct bpf *, void *, size_t); 79 int bpf_arp(const struct bpf *, const struct in_addr *) [all...] |
| privsep-bpf.c | 3 * Privilege Separation BPF Initiator 48 #include "bpf.h" 62 struct bpf *bpf = psp->psp_bpf; local 73 bpf->bpf_flags &= ~BPF_EOF; 74 /* A BPF read can read more than one filtered packet at time. 76 while (!(bpf->bpf_flags & BPF_EOF)) { 77 len = bpf_read(bpf, buf, sizeof(buf)); 85 /* If the interface has departed, close the BPF 88 eloop_event_delete(psp->psp_ctx->eloop, bpf->bpf_fd) 285 uint8_t *bpf; local [all...] |
| arp.h | 44 #include "bpf.h" 72 struct bpf *bpf; member in struct:arp_state
|
| arp.c | 47 #include "bpf.h" 115 return bpf_send(astate->bpf, ETHERTYPE_ARP, arp_buffer, len); 272 logerrx("%s: ARP BPF validation failure", ifp->name); 333 struct bpf *bpf = astate->bpf; local 345 bpf->bpf_flags &= ~BPF_EOF; 346 while (!(bpf->bpf_flags & BPF_EOF)) { 347 bytes = bpf_read(bpf, buf, sizeof(buf)); 353 arp_packet(ifp, buf, (size_t)bytes, bpf->bpf_flags) [all...] |
| bpf.c | 3 * dhcpcd: BPF arp and bootp filtering 39 /* Special BPF snowflake. */ 43 #include <net/bpf.h> 54 #include "bpf.h" 59 /* BPF helper macros */ 66 /* Macros to update the BPF structure */ 143 /* Linux is a special snowflake for opening, attaching and reading BPF. 144 * See if-linux.c for the Linux specific BPF functions. */ 148 struct bpf * 150 int (*filter)(const struct bpf *, const struct in_addr *) 153 struct bpf *bpf; local [all...] |
| dhcp.h | 44 #include "bpf.h" 228 struct bpf *bpf; member in struct:dhcp_state
|
| dhcp.c | 64 #include "bpf.h" 1657 if (state->bpf != NULL) { 1658 eloop_event_delete(ctx->eloop, state->bpf->bpf_fd); 1659 bpf_close(state->bpf); 1660 state->bpf = NULL; 1906 * only receive broadcast messages via BPF. 1912 * As such, we always broadcast and receive the reply to it via BPF. 1936 r = bpf_send(state->bpf, ETHERTYPE_IP, udp, ulen); 2088 // Set the expired state so we send over BPF as this could be 2253 // Delay restarting to give time for the BPF ARP process to exi 3776 struct bpf *bpf = state->bpf; local [all...] |
| /src/usr.sbin/wakeonlan/ |
| wakeonlan.c | 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; local 197 if ((bpf = open(_PATH_BPF, O_RDWR)) == -1 [all...] |
| /src/usr.bin/fstat/ |
| misc.c | 126 struct bpf_d bpf; local 132 if (!KVM_READ(f->f_data, &bpf, sizeof(bpf))) { 133 dprintf("can't read bpf at %p for pid %d", f->f_data, Pid); 136 if (bpf.bd_bif != NULL) { 137 if (!KVM_READ(bpf.bd_bif, &bi, sizeof(bi))) 138 dprintf("can't read bpf interface at %p for pid %d", 139 bpf.bd_bif, Pid); 145 (void)printf("* bpf@%s rec=%lu, dr=%lu, cap=%lu, pid=%lu", ifn.if_xname, 146 bpf.bd_rcount, bpf.bd_dcount, bpf.bd_ccount [all...] |
| /src/external/bsd/ntp/dist/ntpd/ |
| refclock_chu.c | 385 double bpf[9]; /* IIR bandpass filter */ member in struct:chuunit 760 signal = (up->bpf[8] = up->bpf[7]) * 5.844676e-01; 761 signal += (up->bpf[7] = up->bpf[6]) * 4.884860e-01; 762 signal += (up->bpf[6] = up->bpf[5]) * 2.704384e+00; 763 signal += (up->bpf[5] = up->bpf[4]) * 1.645032e+00; 764 signal += (up->bpf[4] = up->bpf[3]) * 4.644557e+00 [all...] |
| refclock_irig.c | 239 double bpf[9]; /* IRIG-B filter shift register */ member in struct:irigunit 529 irig_b = (up->bpf[8] = up->bpf[7]) * 6.505491e-001; 530 irig_b += (up->bpf[7] = up->bpf[6]) * -3.875180e+000; 531 irig_b += (up->bpf[6] = up->bpf[5]) * 1.151180e+001; 532 irig_b += (up->bpf[5] = up->bpf[4]) * -2.141264e+001; 533 irig_b += (up->bpf[4] = up->bpf[3]) * 2.712837e+001 [all...] |
| refclock_wwv.c | 935 static double bpf[9]; /* 1000/1200-Hz bpf delay line */ local 936 double syncx; /* bpf output */ 984 memset((char *)bpf, 0, sizeof(bpf)); 1057 syncx = (bpf[8] = bpf[7]) * 4.897278e-01; 1058 syncx += (bpf[7] = bpf[6]) * -2.765914e+00; 1059 syncx += (bpf[6] = bpf[5]) * 8.110921e+00 [all...] |