Displaying 2 results from an estimated 2 matches for "tc_u32_key".
1999 Nov 14
0
help: can some body tell me the how to fill params of u32 filter in kernel ?
i'm a chinese programmer, i want to write a system call to create an filter attach with some
qdisc, but i don't know the filter param's struct in the kernel.
i just know the struct
struct tc_u32_key
{
__u32 mask;
__u32 val;
int off;
int offmask;
};
struct tc_u32_sel
{
unsigned char flags;
unsigned char offshift;
unsigned char nkeys;
__u16 offmask;
__u16 off;
short offoff;
short hoff;
__u32 hmask;
struct tc_u32_key keys[0];
};
but i don't know how to fill...
2006 Feb 10
14
[PATCH] TC: bug fixes to the "sample" clause
...set. This patch fixes it.
diff -Nur iproute-20051007.keep/tc/f_u32.c iproute-20051007/tc/f_u32.c
--- iproute-20051007.keep/tc/f_u32.c 2005-01-19 08:11:58.000000000 +1000
+++ iproute-20051007/tc/f_u32.c 2006-01-12 17:12:43.000000000 +1000
@@ -878,6 +878,7 @@
struct tc_u32_sel sel;
struct tc_u32_key keys[4];
} sel2;
+ memset(&sel2, 0, sizeof(sel2));
NEXT_ARG();
if (parse_selector(&argc, &argv, &sel2.sel, n)) {
fprintf(stderr, "Illegal \"sample\"\n");
PATCH 2
=======
In tc, the u32 sample clause uses the 2.4 hashing algorithm.
The hashin...