[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[altq:1848] struct flow_filter & qcmd_add_filter
- To: altq@csl.sony.co.jp
- Subject: [altq:1848] struct flow_filter & qcmd_add_filter
- From: Tiago Fioreze <tfioreze@inf.ufrgs.br>
- Date: Mon, 23 Jun 2003 18:34:58 -0300
Hi!
I have had problems when I try to add a filter to a class. I did the
following sequence:
--------------------------- BEGIN ------------------------------
struct flow_filter teste;
memset(&teste, 0, sizeof(teste));
teste.ff_flow.fi_dst.s_addr= inet_addr("200.18.42.6");
teste.ff_flow.fi_src.s_addr= inet_addr("200.18.42.86");
teste.ff_flow.fi_proto=6;
qcmd_init();
qcmd_cbq_add_if(ifname, bw, is_wrr, eff);
// Add the root class.
qcmd_cbq_add_class(ifname, "root_class", NULL, NULL, 0, 10000000,
NULL, NULL, NULL, NULL, NULL, NULL, NULL);
// Add the default class
qcmd_cbq_add_class(ifname, "def_class", "root_class", NULL, 0,
950000, NULL, NULL, NULL, NULL, NULL, NULL, CBQCLF_DEFCLASS);
// Add a http class
// qcmd_cbq_add_class(ifname, "http_class", "def_class", NULL, 0,
100000, NULL, NULL, NULL, NULL, NULL, NULL, NU
LL);
qcmd_add_filter(ifname, "http_class", NULL, &teste);
qcmd_enable(ifname);
---------------------------- END --------------------------------
When the qcmd_add_filter is executed, I got the message:
"syscall error: add filter failed!: Invalid argument"
What's the problem?
Thanks in advance,
Tiago Fioreze