Thread: Descriptor Help
View Single Post
  #2 (permalink)  
Old August 19th, 2001
HydroPhonic HydroPhonic is offline
Enthusiast
 
Join Date: July 12th, 2001
Posts: 36
HydroPhonic is flying high
Default Descriptors in a string

You will have to parse the string, discern the Payload length, handle the payload(optional), and pass the descriptor... are you asking how to parse an incoming descriptor?? Or are you befuddled by a descriptor that appears to be a gobbledygook search query? (BearShare sends unintelligible Query descriptors meant for other BearShare clients to check their versions; just decrement their TTL and pass them on...)

Parse the first 23 bytes (you do have the spec, I assume) to determine what kind of descriptor it is.
The descriptor in your example appears to be a Query Descriptor. Beyond that, I can read little from it (it's not in Hex, and I'm too damn lazy to parse it myself).

Which do you need?
The Gnutella Protocol specification
A routine to parse strings??

(As a genuine lazy-***, I use that wonderful feature of C, type casting, to simply reinterpret that string as a DescriptorHeader type )
Reply With Quote