Then please talk to your supervisors - using Gnutella 0.4 doesn't make that much sense.
But if you can't change that requirement, you might want to have a look at pygnutella; it implements Gnutella 0.4 (aside from now connecting with a Gnutella 0.6 handshake to be able to test it with regular Gnutella clients).
That's also code with which I could provide help since I took some time hacking on it for fun.
-
SourceForge.net: pygnutella
That one is in Python, not in ANSI C, though (which makes it far easier to experiment with it).