pfil_add_ihook() with PFIL_IFNET

2025-04-05 Thread Peter Skvarka
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

Re: pfil_add_ihook() with PFIL_IFNET

2025-03-24 Thread Ethan Miller
> 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

Re: pfil_add_ihook() with PFIL_IFNET

2025-03-24 Thread Mouse
> 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