I think Dummynet is what you are looking for. Dummynet is a network emulation tool which can simulate bandwidth limitations, delays, packet losses, and many more. You can easily choose which traffic you want to intercept and configure the limitations, e.g. to limit all incoming TCP traffic to 2Mbit/s you do
ipfw add pipe 2 in proto tcp
ipfw pipe 2 config bw 2Mbit/s
You see the traffic selection is done by the known ipfw firewall and the pipes provide the limitation features.
It is available for FreeBDSFreeBSD, Linux and Windows.