---
title: bpf_tap_in
framework: Kernel
role: symbol
role_heading: Function
platforms: [macOS 10.5+]
path: kernel/1589470-bpf_tap_in
---

# bpf_tap_in

## Declaration

```occ
void bpf_tap_in(ifnet_t interface, u_int32_t dlt, mbuf_t packet, void *header, size_t header_len);
```

## Parameters

- `interface`: The interface the packet was received on.
- `dlt`: The data link type of the packet.
- `packet`: The packet received.
- `header`: An optional pointer to a header that will be prepended.
- `headerlen`: If the header was specified, the length of the header.

## Discussion

Discussion Call this function when your interface receives a packet. This function will check if any bpf devices need a a copy of the packet.

## See Also

### bpf

- [bpf_attach](kernel/1589700-bpf_attach.md)
- [bpf_tap_out](kernel/1589576-bpf_tap_out.md)
- [bpfattach](kernel/1589467-bpfattach.md)
