[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[altq 695] Re: trapping inoming ICMP packets




Loong Chee-Yuh wtote:
> I'm actually interested in implementing an adaptive router (based on CBQ or
> PRIQ), which will be able to change its behaviour on its own in realtime.
> Because the router needs to send out ICMP packets to measure certain network
> parameters, I need to be able to
>   a. "trap" the returning ICMP replies, and
>   b. communicate these to qdisc accordingly.
> 
> A simple solution to (b) is to use standad ioctl calls and implement the
> apporpriate handles in the qdisc module.
> But I was wondering if there's a easy method to do (a), since AltQ only
> filter outgoing packets, and I'm not interested in setting up a socket due
> to performance reasons.
> 
> In short, I was hoping to trap raw ICMP packets on the incoming interface,
> but got stuck on how to implement it efficiently under AltQ.

Take a look at traffic conditioners (altq_cdnr.[ch]).  They are placed
on the input path and use the same classifer as CBQ and PRIQ.
Probably, you have to create a new traffic conditioner type, and make
it to control the queueing discipline somehow.

-Kenjiro