* Flash a packet by the BPF (requires prepending 4 byte AF header) * Note the phoney mbuf; this is OK because BPF treats it read-only. */
| 416 | * Note the phoney mbuf; this is OK because BPF treats it read-only. |
| 417 | */ |
| 418 | static void |
| 419 | ng_iface_bpftap(struct ifnet *ifp, struct mbuf *m, sa_family_t family) |
| 420 | { |
| 421 | KASSERT(family != AF_UNSPEC, ("%s: family=AF_UNSPEC", __func__)); |
| 422 | if (bpf_peers_present(ifp->if_bpf)) { |
| 423 | int32_t family4 = (int32_t)family; |
| 424 | bpf_mtap2(ifp->if_bpf, &family4, sizeof(family4), m); |
| 425 | } |
| 426 | } |
| 427 | |
| 428 | /* |
| 429 | * This routine does actual delivery of the packet into the |
no test coverage detected