Re: detailed description of linux socket filter and sniffing problem

From: Alan Cox (
Date: Fri Jul 06 2001 - 06:23:19 EST

> 5) so i remove the filter expression by means of setsockopt
> SO_DETACH_FILTER and then regenrate the bpfcode for the nw expression.
> 6) now i do a attach operation on the socket by means of setsockopt and
> so attach the new filter.

You can just issue a new SO_ATTACH_FILTER and it will swap them over rather
than having an 'all packets' time. You will have some buffered frames matching
the old filter
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sat Jul 07 2001 - 21:00:18 EST