The easiest way I think to do protocol-level things is to make a proxy like MessengerDiscovery. Given MD's lukewarm reception here, you may get the impression it's not a good program, and i admit it could be laods better. But then I didn't write it
I'm going to start a project soon that will operate at the protocol-level. However, it will be while before it's released, not just because it's a big project, but I also have other things to do.
EDIT: Rewrote last sentence and trimmed it a bit... Hopefully it makes sense now.