In my mind it should be possible to define some kind of matching/accounting rule with iptables which interpret the different vlan-tag every packet got when it arrives at one of the switch-ports.
So it would be possible to detect which amount of traffic each port generates on the wan-port. This would be very nice and i would like to include it to my project described in http://www.openwrt.org/forum/viewtopic.php?t=813
For now i only have a solution matching/accounting this traffic on the different ip's. But i would like to have a more general solution, which works out of the box on every openwrt-installation.
Can anybody give me a hint in the right direction if and how this can be realized with iptables ? I think iptables needs a special target for vlan-tags then.
Regards
Christian Rost