Thanks for those responses. It's quite clear that there's no simple general way to get the traffic data - each modem/router seems to present the information in a different way, and it's not always clear which interface is the appropriate one. The Thomson/Technicolor models seem to have a consistent command, but for the remainder I'm going to have to build some sort of database of models with the applicable commands and interfaces. Initially at least it will be a very incomplete database, and I'll provide configurable options for users to make their own choices.
I have to say that adding usage data to DSLstats is going to be firmly in the experimental area for some time, but I'll make sure that it doesn't interfere with the normal operation of the program.