/netbsd-src/external/bsd/dhcpcd/dist/src/ |
H A D | bpf.c | 148 struct bpf * 150 int (*filter)(const struct bpf *, const struct in_addr *), in bpf_open() argument 153 struct bpf *bpf; in bpf_open() local 169 bpf = calloc(1, sizeof(*bpf)); in bpf_open() 170 if (bpf == NULL) in bpf_open() 172 bpf->bpf_ifp = ifp; in bpf_open() 175 bpf->bpf_fd = open("/dev/bpf", BPF_OPEN_FLAGS); in bpf_open() 178 if (bpf->bpf_fd == -1) { in bpf_open() 184 bpf->bpf_fd = open(device, BPF_OPEN_FLAGS); in bpf_open() 185 } while (bpf->bpf_fd == -1 && errno == EBUSY); in bpf_open() [all …]
|
H A D | bpf.h | 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 *); 80 int bpf_bootp(const struct bpf *, const struct in_addr *);
|
H A D | privsep-bpf.c | 62 struct bpf *bpf = psp->psp_bpf; in ps_bpf_recvbpf() local 73 bpf->bpf_flags &= ~BPF_EOF; in ps_bpf_recvbpf() 76 while (!(bpf->bpf_flags & BPF_EOF)) { in ps_bpf_recvbpf() 77 len = bpf_read(bpf, buf, sizeof(buf)); in ps_bpf_recvbpf() 88 eloop_event_delete(psp->psp_ctx->eloop, bpf->bpf_fd); in ps_bpf_recvbpf() 89 bpf_close(bpf); in ps_bpf_recvbpf() 95 psm.ps_flags = bpf->bpf_flags; in ps_bpf_recvbpf() 284 uint8_t *bpf; in ps_bpf_dispatch() local 303 bpf = iov->iov_base; in ps_bpf_dispatch() 309 arp_packet(ifp, bpf, bpf_len, (unsigned int)psm->ps_flags); in ps_bpf_dispatch() [all …]
|
H A D | arp.c | 115 return bpf_send(astate->bpf, ETHERTYPE_ARP, arp_buffer, len); in arp_request() 337 struct bpf *bpf = astate->bpf; in arp_read() local 349 bpf->bpf_flags &= ~BPF_EOF; in arp_read() 350 while (!(bpf->bpf_flags & BPF_EOF)) { in arp_read() 351 bytes = bpf_read(bpf, buf, sizeof(buf)); in arp_read() 357 arp_packet(ifp, buf, (size_t)bytes, bpf->bpf_flags); in arp_read() 361 if ((bpf = astate->bpf) == NULL) in arp_read() 599 astate->bpf = bpf_open(ifp, bpf_arp, addr); in arp_new() 600 if (astate->bpf == NULL) { in arp_new() 605 if (eloop_event_add(ifp->ctx->eloop, astate->bpf->bpf_fd, ELE_READ, in arp_new() [all …]
|
H A D | privsep.h | 166 struct bpf; 183 int (*psp_filter)(const struct bpf *, const struct in_addr *); 185 struct bpf *psp_bpf;
|
/netbsd-src/usr.bin/fstat/ |
H A D | misc.c | 126 struct bpf_d bpf; in p_bpf() local 132 if (!KVM_READ(f->f_data, &bpf, sizeof(bpf))) { in p_bpf() 136 if (bpf.bd_bif != NULL) { in p_bpf() 137 if (!KVM_READ(bpf.bd_bif, &bi, sizeof(bi))) in p_bpf() 139 bpf.bd_bif, Pid); in p_bpf() 146 bpf.bd_rcount, bpf.bd_dcount, bpf.bd_ccount, in p_bpf() 147 (unsigned long)bpf.bd_pid); in p_bpf() 148 if (bpf.bd_promisc) in p_bpf() 150 if (bpf.bd_immediate) in p_bpf() 152 if (bpf.bd_direction == BPF_D_IN) in p_bpf() [all …]
|
/netbsd-src/usr.sbin/wakeonlan/ |
H A D | wakeonlan.c | 83 wake(int bpf, const char *host) in wake() argument 90 return send_wakeup(bpf, &macaddr); in wake() 94 bind_if_to_bpf(char const *ifname, int bpf) in bind_if_to_bpf() argument 104 if (ioctl(bpf, BIOCSETIF, &ifr) == -1) in bind_if_to_bpf() 106 if (ioctl(bpf, BIOCGDLT, &dlt) == -1) in bind_if_to_bpf() 159 send_wakeup(int bpf, struct ether_addr const *addr) in send_wakeup() argument 180 if ((bw = write(bpf, p, len)) == -1) in send_wakeup() 191 int bpf, n; in main() local 197 if ((bpf = open(_PATH_BPF, O_RDWR)) == -1) in main() 201 if (bind_if_to_bpf(argv[1], bpf) == -1) { in main() [all …]
|
/netbsd-src/external/gpl3/gdb/dist/sim/bpf/ |
H A D | ChangeLog-2021 | 35 * bpf.c (bpfbf_exit): Use PRI 64 formats. 48 * bpf-helpers.c: Include bpf-helpers.h. 49 * bpf-helpers.h (bpf_trace_printk): Change return type to int. 51 * bpf.c: Include decode-be.h & decode-le.h. 57 * sim-main.h: Include bpf-helpers.h. 61 * bpf-helpers.c (bpf_trace_printk): Add casts to every value printf. 65 * bpf-helpers.c (bpf_trace_printk): Move value decl to top of scope. 123 * bpf.c: Include sim-signal.h. 158 * bpf.c (bpf_engine_run_full): Change current_target_byte_order to 173 * bpf-helpers.c, bpf.c, sim-if.c, traps.c: Include defs.h. [all …]
|
/netbsd-src/external/gpl3/gcc/dist/gcc/config/bpf/ |
H A D | t-bpf | 2 TM_H += $(srcdir)/config/bpf/coreout.h 4 coreout.o: $(srcdir)/config/bpf/coreout.cc 8 PASSES_EXTRA += $(srcdir)/config/bpf/bpf-passes.def
|
/netbsd-src/external/gpl3/binutils/dist/gas/ |
H A D | ChangeLog | 13 * config/tc-bpf.h (DOUBLESLASH_LINE_COMMENTS): Define. 14 * testsuite/gas/bpf/comments.s: New file. 15 * testsuite/gas/bpf/comments.d: Likewise. 16 * testsuite/gas/bpf/comments-pseudoc.d: Likewise. 17 * testsuite/gas/bpf/comments-pseudoc.s: Likewise. 18 * testsuite/gas/bpf/bpf.exp: Run comments and comments-pseudoc. 19 * doc/c-bpf.texi (BPF Special Characters): Document // comments. 29 * config/tc-bpf.c: Semicolon does not start a comment, but 31 * testsuite/gas/bpf/alu-pseudoc.s: Adapt test accordingly. 32 * testsuite/gas/bpf/spacing-pseudoc.s: Likewise. [all …]
|
/netbsd-src/tests/ipf/regress/ |
H A D | bpf1 | 1 pass in bpf-v4 { "0x20 0 0 0xc 0x15 0 0x1 0x1010101 0x6 0 0 0x60 0x6 0 0 0" } 2 pass out bpf-v4 { "src host 1.1.1.1" } 3 pass in bpf-v4 { "0x20 0 0 0x10 0x15 0 0x1 0x1010101 0x6 0 0 0x60 0x6 0 0 0" } 4 pass out bpf-v4 { "dst host 1.1.1.1" }
|
H A D | bpf-f1 | 1 pass in bpf-v4 { "0x20 0 0 0xc 0x15 0 0x1 0x1010101 0x6 0 0 0x60 0x6 0 0 0" } 2 pass out bpf-v4 { "0x20 0 0 0xc 0x15 0 0x1 0x1010101 0x6 0 0 0x60 0x6 0 0 0" } 3 pass in bpf-v4 { "0x20 0 0 0x10 0x15 0 0x1 0x1010101 0x6 0 0 0x60 0x6 0 0 0" } 4 pass out bpf-v4 { "0x20 0 0 0x10 0x15 0 0x1 0x1010101 0x6 0 0 0x60 0x6 0 0 0" }
|
/netbsd-src/external/bsd/libpcap/dist/testprogs/fuzz/ |
H A D | fuzz_filter.c | 13 struct bpf_program bpf; in LLVMFuzzerTestOneInput() local 32 if (pcap_compile(pkts, &bpf, filter, 1, PCAP_NETMASK_UNKNOWN) == 0) { in LLVMFuzzerTestOneInput() 33 pcap_setfilter(pkts, &bpf); in LLVMFuzzerTestOneInput() 35 pcap_freecode(&bpf); in LLVMFuzzerTestOneInput()
|
H A D | fuzz_both.c | 47 struct bpf_program bpf; in LLVMFuzzerTestOneInput() local 83 if (pcap_compile(pkts, &bpf, filter, 1, PCAP_NETMASK_UNKNOWN) == 0) { in LLVMFuzzerTestOneInput() 88 …ket length=%d/%d filter=%d\n",header->caplen, header->len, pcap_offline_filter(&bpf, header, pkt)); in LLVMFuzzerTestOneInput() 93 pcap_freecode(&bpf); in LLVMFuzzerTestOneInput()
|
/netbsd-src/tests/ipf/expected/ |
H A D | bpf1 | 1 pass in bpf-v4 { "0x20 0 0 0xc 0x15 0 0x1 0x1010101 0x6 0 0 0x60 0x6 0 0 0" } 2 pass out bpf-v4 { "0 0 0 0 0x20 0 0 0xc 0x15 0 0x1 0x1010101 0x6 0 0 0x1 0x6 0 0 0" } 3 pass in bpf-v4 { "0x20 0 0 0x10 0x15 0 0x1 0x1010101 0x6 0 0 0x60 0x6 0 0 0" } 4 pass out bpf-v4 { "0 0 0 0 0x20 0 0 0x10 0x15 0 0x1 0x1010101 0x6 0 0 0x1 0x6 0 0 0" }
|
/netbsd-src/external/gpl3/binutils.old/dist/opcodes/ |
H A D | Makefile.am | 62 bpf-desc.h bpf-opc.h \ 100 bpf-asm.c \ 101 bpf-desc.c \ 102 bpf-dis.c \ 103 bpf-ibld.c \ 104 bpf-opc.c \ 375 BPF_DEPS = stamp-bpf 423 $(srcdir)/bpf-desc.h $(srcdir)/bpf-desc.c $(srcdir)/bpf-opc.h \ 424 $(srcdir)/bpf-opc.c $(srcdir)/bpf-ibld.c \ 425 $(srcdir)/bpf-asm.c $(srcdir)/bpf-dis.c: $(BPF_DEPS) [all …]
|
/netbsd-src/external/gpl3/gcc.old/dist/libgcc/config/bpf/ |
H A D | t-bpf | 3 crti.o: $(srcdir)/config/bpf/crti.S 6 crtn.o: $(srcdir)/config/bpf/crtn.S 13 # Patterns in bpf.md must guarantee that no calls to the excluded
|
/netbsd-src/external/gpl3/gcc/dist/libgcc/config/bpf/ |
H A D | t-bpf | 3 crti.o: $(srcdir)/config/bpf/crti.S 6 crtn.o: $(srcdir)/config/bpf/crtn.S 13 # Patterns in bpf.md must guarantee that no calls to the excluded
|
/netbsd-src/external/gpl3/binutils.old/dist/opcodes/po/ |
H A D | POTFILES.in | 20 bpf-asm.c 21 bpf-desc.c 22 bpf-desc.h 23 bpf-dis.c 24 bpf-ibld.c 25 bpf-opc.c 26 bpf-opc.h
|
/netbsd-src/external/bsd/libpcap/dist/ |
H A D | chmod_bpf | 18 chgrp admin /dev/bpf* 19 chmod g+rw /dev/bpf*
|
/netbsd-src/sys/modules/bpf/ |
H A D | Makefile | 8 KMOD= bpf 9 SRCS= bpf.c
|
/netbsd-src/external/bsd/libpcap/dist/ChmodBPF/ |
H A D | ChmodBPF | 22 chgrp admin /dev/bpf* 23 chmod g+rw /dev/bpf*
|
/netbsd-src/usr.sbin/rbootd/ |
H A D | Makefile | 8 SRCS= bpf.c conf.c parseconf.c rbootd.c rmpproto.c utils.c 20 COPTS.bpf.c+= ${CC_WNO_STRINGOP_TRUNCATION}
|
/netbsd-src/etc/etc.riscv/ |
H A D | MAKEDEV.conf | 10 makedev bpf 14 makedev std bpf fd0 fd1 wd0 wd1 wd2 wd3 md0 md1 sd0 sd1 sd2 sd3
|
/netbsd-src/etc/etc.mac68k/ |
H A D | MAKEDEV.conf | 9 makedev bpf 27 makedev bpf
|