I've been using such a thing since about October of 2002 in linux. Its based (well it was at first anyway) on a quick little hack called "wonder-shaper".
http://lartc.org/wondershaper/
I put it on the linux box that was routing my ISDN (don't laugh) and magic happened.
I was then compelled to study the deepness that is LARTC and found much enlightenment.
The path lies at http://lartc.org