Re: abusing watcher extensions for statistics and new rules
Bart De Schuymer <[email protected]>
| Newsgroups | gmane.linux.network.bridge.ebtables.devel |
|---|---|
| Message-ID | <[email protected]> |
Op di, 29-03-2005 te 16:35 +0200, schreef Carl-Daniel Hailfinger: > Hi, > > I'm currently trying to make the kernel collect per-MAC statistics for > the traffic that goes through my bridge. > Why do that in the kernel and not with some userspace utility? Simple. > Doing it in userspace means countless context switches and sharing or > cloning the skbs which should be accounted. > So right now I'm implementing a watcher extension which uses a hash > table to store some statistics about traffic from all MAC addresses. > These statistics, however, should be usable from a match extension and > I can't figure out whether the ebtables architecture supports something > exotic like this or whether I should simply output some message to the > kernel log, watch the log from userspace and insert/delete another rule > from userspace once the log message appears. You can work analogous to the ip_pool implementation (using extern), see http://svn.netfilter.org/cgi-bin/viewcvs.cgi/trunk/patch-o-matic- ng/pool/linux/net/ipv4/netfilter/ cheers, Bart ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click