On Tue, Apr 12, 2011 at 12:59 PM, Dave Smith <[email protected]> wrote: > I've been using tc/netem to do things *like* this, but it has a few > drawbacks: > > 1. tc requires root access > 2. tc is sophisticated (does a *lot* more than I want) > 3. tc has a tricky command line interface > > I'm thinking this might be a good stand-alone executable that would be > well suited to Google Go.
You're going to either need root to create tun/tap devices, or you'll need to virtualize the system your code runs on so that the virtual machine presents an ethernet device that really connects to some sort of pipe. If you're okay with using root access to create a couple of tap/tun devices, you could easily link them with a simple program. Here's a tutorial: http://backreference.org/2010/03/26/tuntap-interface-tutorial/ But the time it would take to write a program to create a lossy tunnel probably outweighs whatever time you would spend configuring something like tc. On a tangent, looking up the pages about VDE led me to this amazingly cool little utility, which I will be downloading immediately: http://www.dest-unreach.org/socat/doc/socat.html --Levi /* PLUG: http://plug.org, #utah on irc.freenode.net Unsubscribe: http://plug.org/mailman/options/plug Don't fear the penguin. */
