About Adam Knight
Location
Austin, TX
Home page/site
http://www.hopelessgeek.com/
Author Biography
Adam Knight is one of the founders of Mac Geekery and is a geek at heart. Programmer by day, hacker by night, his daily life revolves around the Macintosh platform, which he has been a user and programmer for since the early days of System 7 when his LCII replaced his Apple //c.
In-between tech jobs, he’s managed to learn the basics of any web hacker: PHP, MySQL, Perl, Apache, Linux, *BSD, and the intricacies of ./configure —prefix=~/bombshelter/. Today, codepoet is concentrating on blogging again, writing some software for the Mac by himself (including Notae) and for his company (such as Photonic) and has a few other toys coming out soon. Bug him over AIM or email [link fixed].


Actually, this capability is built right into OS X with ipfw. Because of ipfw’s flexibility, very targeted bandwidth limiting rules can be made in only a few lines.
The following ipfw rules will limit connections from my Mac to my ISP’s mail server to 100K per second only for outgoing smtp connections:
sudo ipfw pipe 1 config bw 100Kbit/ssudo ipfw pipe 1 tcp from me to smtp.west.cox.net 25Obviously, the rate can be tailored to anything you like, and the rule is specific enough not to get in the way of any other connections going on. This isn’t persistent accross reboots though, but finding a way to make it run at each boot can probably be found elsewhere on this site.
I hunted, and I hunted, and the rabbit eluded me. I’ve done this with FreeBSD and Linux, but when I tried BSD syntax in Mac OS X it failed. I then looked into it and was told dummynet wasn’t in Mac OS X…
However, now that I know to keep looking, it appears this was added in Tiger.
So, to expand the answer: In Tiger, use
ipfwfor your needs. In Panther and earlier, use throttled.—
cp