Hello,
I am reading man page for pfil_add_ihook() and my question is:
when I create hook with parameter PFIL_IFNET what actions should invoke
hook with PFIL_IFNET_ATTACH or PFIL_IFNET_DETACH ?
For example when I create hook with PFIL_IFADDR then it is called on
ifconfig iface_name up/down or
> But, surely, it seems to me the simple thing to do is to just grep for
> PFIL_IFNET_ATTACH and PFIL_IFNET_DETACH and look at the surrounding
> code to see what circumstances they're used in.
Yea just a quick look, they only really appear here.
src/sys/net/if.c:755: pfil_run_ifhooks(if_pfil, PFI
> when I create hook with parameter PFIL_IFNET what actions should
> invoke hook with PFIL_IFNET_ATTACH or PFIL_IFNET_DETACH ?
I don't actually know, though my guess would be an interface attaching
or detaching (eg, USB Ethernet plugged in or removed).
But, surely, it seems to me the simple thing