Gnutella - HUGE (Hash/URN Gnutella Extensions)

Our blue logo

Gnutella Protocol Development

Home :: Developer :: Press :: Research :: Servents

HUGE (Hash/URN Gnutella Extensions

Source - Gordon Mohr

 

If you would like to receive URNs, such as hashes, reported on the
hits for any other Query, insert a null-terminated string indicating
the prefix of the kind(s) of URNs you'd like to receive after the
first null, within the Query payload. For example:

QUERY:
STD-HEADER:
[23 bytes]
QUERY-SEARCH-STRING:
Gnutella Protocol[0x00]urn:[0x00]

Meaning: "Find files with the keywords 'Gnutella Protocol', and if
possible, label the results with any 'urn:' identifiers available."

If you would like to Query for files by hash value, leave the
standard search-string empty, and insert a valid URN between-the-
nulls. For example:

QUERY:
STD-HEADER:
[23 bytes]
QUERY-SEARCH-STRING:
[0x00]urn:sha1:PLSTHIPQGSSZTS5FJUPAKUZWUGYQYPFB[0x00]

Meaning: "Find files with exactly this SHA1 hash." (In the case of
the SHA1 URN type, that is 20 raw bytes, Base32-encoded.)

When you receive a QueryHit that requests URNs, or if you choose to
always include URNs, report them by inserting the valid URN between
the two nulls which mark the end of each distinct result. For
example:


Mohr [Page 2]

The GDF HUGE v0.94 April 2002


QUERYHIT:
STD-HEADER:
[23 bytes]
QUERY-HIT-HEADER:
[11 bytes]
EACH-RESULT:
INDEX:
[4 bytes]
LEN:
[4 bytes]
FILENAME:
GnutellaProtocol04.pdf[0x00]
EXTRA:
urn:sha1:PLSTHIPQGSSZTS5FJUPAKUZWUGYQYPFB[0x00]
SERVENT-IDENTIFIER:
[16 bytes]

Meaning: "Here's a file which matches your Query, and here also is
its SHA1 hash."

If you return such an URN, you must also accept it in an HTTP file-
request, in accordance with the following Request-URI syntax:

GET /uri-res/N2R?urn:sha1:PLSTHIPQGSSZTS5FJUPAKUZWUGYQYPFB HTTP/1.0

This syntax is in addition to, not in place of, the traditional file-
index/filename based GET convention.

To be in compliance with this specification, you should support at
least the SHA1 hash algorithm and format reflected here, and be able
to downconvert the related "bitprint" format in requests and reports
to SHA1. Other URN namespaces are optional and should be gracefully
ignored if not understood. Please refer to the rest of this document
for other important details.

 

 

 

Home :: Developer :: Press :: Research :: Servents

SourceForge.net Logo