I wrote some code in parser.c to define a filter in terms of other field of a packet header. The compiling is fine. I also recompile altqd.c. In altq.conf, I just define one corresponding fitler like this:
filter xl0 EF label ox00000000
When I lauch altq, I got following error message:
filter shadows an existing filter. add filter failed.
altq is running, but filter isn't added. Can you give some suggestion where the problem might be? Thanks in advance
Hao
-----Original Message-----
From: Kenjiro Cho [mailto:kjc@csl.sony.co.jp]
Sent: Tuesday, August 15, 2000 4:49 AM
To: altq@csl.sony.co.jp; Zhang, Hao [WDLN2:AN22:EXCH]
Subject: [altq 517] Re: define a filter
Hao Zhang wrote:
> I am now working on the development using CBQ code. now filter is defined in
> terms of 5 parameters <dst_addr, dst_port, src_addr, src_port, proto> and
> tos field. I want to define a filte in terms of not only adove mentioned
> things, but something else. So I have two questions.
>
> 1) Can you tell me what part of code reads the fitler parameters from
> altq.conf file.
libaltq/parser.c (filter_parser())
> 2) in altq_cbq.h:
>
> #define CBQ_ADD_FILTER _IOWR('Q', 3, struct cbq_add_filter)
>
> Is Q a char or something else? I couldn't find the defination of Q
It's just a character to identify an ioctl group. An ioctl group
character is encoded into an ioctl number. see sys/sys/ioccom.h.
-Kenjiro