[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[altq 546] Re: qop_add_filter() in qop.c
Hao Zhang wrote:
> I am writing a code to set up a filter in terms of label. When the code
> runs, it encounters problem at following line of qop_add_filter() in
> libaltq/qop.c
>
> if (error =(*ifinfo->qdisc->add_filter)(fltrinfo) != 0) {
> remove_filter_rule(ifinfo, fltrinfo);
> goto err_ret;
> }
>
> At this point error is returned a value of 1, which is "syscall error" in
> qop_errorlist[].
>
> Can anyone give me some information about how
> ifinfo->qdisc->add_filter(fltrinfo)works. Thanks in advance.
It calls a discipline-specific system call wrapper to add a filter.
(the function name is cbq_add_filer() in qop_cbq.c for CBQ)
You should learn how to use gdb.
I guess the system call fails because you changed the size of the
filter structure but didn't re-make the library. (arg size mismatch
for the ioctl.)
-Kenjiro