- macOS 10.4+
Used to allow the socket filter to set the cookie for this attachment.
The socket the filter is being attached to.
If you return a non-zero value, your filter will not be attached to this socket.
sf_attach_func is called to notify the filter it has been attached to a socket. The filter may allocate memory for this attachment and use the cookie to track it. This filter is called in one of two cases:
You've installed a global filter and a new socket was created.
Your non-global socket filter is being attached using the SO_NKE socket option.