[2.2.2] The difference between sk_filter and sock_filter?

Dr. Werner Fink (werner@suse.de)
Tue, 23 Feb 1999 15:54:09 +0100


Hi,

there is trouble with the option CONFIG_FILTER. The structure
sk_filter used with patch 2.2.2 isn't defined in any header. Only the
struct sock_filter is given in include/linux/filter.h.
It looks like sk_filter and sock_filter are different structures because
the sk_run_filter call in include/net/sock.h uses the entries insns and
len of that new structure. That means something like

struct sk_filter {
unsigned short len;
atomic_t refcnt;
struct sock_filter *insns;
}

Besides this the change of sk_run_filter() in net/core/filter.c
wasn't ported to include/linux/filter.h.
The (inlined) function sk_filter_len() is missed (calculate the
real length out of the numbers of blocks used??).
And some macros are missed: SKF_NET_OFF, SKF_LL_OFF, SKF_AD_OFF,
SKF_AD_PROTOCOL, SKF_AD_PKTTYPE, and SKF_AD_IFINDEX.

Werner

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/