bpfattach
Declaration
void bpfattach(ifnet_t interface, u_int data_link_type, u_int header_length);Parameters
- interface:
The interface to register with BPF.
- data_link_type:
The data link type of the interface. See the DLT_* defines in bpf.h.
- header_length:
The length, in bytes, of the data link header.
Discussion
Registers an interface with BPF. This allows bpf devices to attach to your interface to capture packets. Your interface will be unregistered automatically when your interface is detached.