May I recommend the source code from the GTK-Gnutella website.
gtk-gnutella - The Graphical Unix Gnutella Client
GTK
is the most advanced gnutella program at present time. I'm sure you will be able to pick out the methods from the code yourself. That is if you do not get another reply here soon by a GTK dev.
There is also the LPE source code. Components pages:
https://github.com/metapirate/LimeWi...dEndpoint.java .. /
.. https://github.com/metapirate/LimeWi.../gnutella-core
You could also register at and ask at the GDF.