p2psim: Roll Your Own P2P Protocol
Anonymous Coward writes "p2psim is a free, multi-threaded, discrete event simulator developed at MIT to evaluate and investigate p2p protocols. You can quite easily add your own p2p protocol and compare it with others to make sure it runs well before you write the real thing. p2psim runs in Linux and FreeBSD."
I don't think I have ever seen or read anything that states that p2p is not legal. Maybe I'm just way behind the times, but it was my understanding that p2p itself is legal, it's what the network is used for that is illegal.