sk_attach_filter (9) - Linux Man Pages
sk_attach_filter: attach a socket filter
sk_attach_filter - attach a socket filter
int sk_attach_filter(struct sock_fprog
*fprog, struct sock *sk);
- the filter program
- the socket to use
Attach the user's filter code. We first run some sanity checks on it to make sure it does not explode on us later. If an error occurs or there is insufficient memory for the filter a negative errno code is returned. On success the return is zero.