KHLA: Difference between revisions
(Added detail of KHLA packet. (incomplete)) |
m (Fixed typo) |
||
(One intermediate revision by the same user not shown) | |||
Line 12: | Line 12: | ||
== Receiving == | == Receiving == | ||
Upon receiving a known hub list, the detailed hubs should be stored in appropriate | Upon receiving a known hub list, the detailed hubs should be stored in appropriate data structures. | ||
data structures | |||
== Payload == | == Payload == | ||
Line 34: | Line 32: | ||
Unique ID which must be same as sent on corresponding /KHLR packet. Client requesting | Unique ID which must be same as sent on corresponding /KHLR packet. Client requesting | ||
Known Hub List should compare if ID is same as corresponding /KHLR packet for | Known Hub List should compare if ID is same as corresponding /KHLR packet for security | ||
reason. | reason. | ||
Latest revision as of 09:49, 29 January 2009
Root Packets
CRAWLA - CRAWLR
HAW - LNI
KHL - KHLA - KHLR
PI - PO - PUSH
QKA - QKR
Q2 - QA - QH2 - QHT
UPROC - UPROD
/KHLA
The known hub list acknowledgement packet is part of UKHL implementation, used to answer back to request of packet list of known Gnutella2 hubs with /KHLR packet.
Sending
This packet should be sent through UDP when received /KHLR packet.
Receiving
Upon receiving a known hub list, the detailed hubs should be stored in appropriate data structures.
Payload
This packet has no payload at the current time.
Children
This packet has several child packet types defined at the current time:
- /KHLA/UKHLID - Unique ID
- /KHLA/YOURIP - IP address of requester.
- /KHLA/URL - URL to UKHL services for bootstrap propagation.
- /KHLA/TS - Timestamp
- /KHLA/NH - Neighbouring Hub
- /KHLA/CH - Cached Hub
/KHLA/UKHLID - Unique ID
Unique ID which must be same as sent on corresponding /KHLR packet. Client requesting Known Hub List should compare if ID is same as corresponding /KHLR packet for security reason.
Sending
This child is optional but recommended.
Payload
16Byte unique ID such as GUID.
/KHLA/TS - Timestamp
The /KHLA/TS child provides a timestamp representing the current universal time at the sending node. This can be used as a reference when considering other timestamps in the packet, allowing them to be adjusted to eliminate differences between the time setting on the local and remote node.
Sending
This child is optional but recommended.
Payload
A 32-bit integer representing the current UNIX time, or time (NULL).
Children
This packet has no known children at the current time.
/KHLA/NH - Neighbouring Hub
This child packet represents a neighbouring hub.
Sending
One should be included for each Gnutella2 neighbour hub, with the possible exception of the one to which this packet is being sent.
Payload
The node address of the hub. See datatypes for more information.
Children
This packet has several child packet types defined at the current time:
- /KHLA/NH/GU - GUID
- /KHLA/NH/V - Vendor Code
- /KHLA/NH/LS - Library Statistics
- /KHLA/NH/HS - Hub Status
/KHLA/NH/GU - GUID
The /KHLA/NH/GU child packet specifies the globally unique identifier of the hub.
Sending
This child is optional.
Payload
The 16 byte globally unique node identifier of the hub.
Children
This packet has no known children at the current time.
/KHLA/NH/V - Vendor Code
The /KHLA/NH/V child packet specifies the vendor code of the software operating the hub.
Sending
This child is optional.
Payload
A four byte vendor code.
Children
This packet has no known children at the current time.
/KHLA/NH/LS - Library Statistics
The /KHLA/NH/LS packet provides information about the content library of the hub and its connected leaves.
Sending
This child is optional.
Payload
Two 32-bit integers representing the number of files, and the total KB of available content in the hub's own library and the libraries of its connected leaves. The payload may grow beyond 8 bytes in the future.
Children
This packet has no known children at the current time.
/KHLA/NH/HS - Hub Status
The /KHLA/NH/HS packet contains the status of the hub.
Sending
This child is optional.
Payload
Two 16-bit integers representing the current leaf count and the maximum leaf count respectively. This packet may grow beyond 4 bytes in the future.
Children
This packet has no known children at the current time.
/KHLA/CH - Cached Hub
This child packet represents a hub from the hub cache.
Sending
An arbitrary number of these children should be included, constrained by space and the number of available cached hubs. A selection of freshly time stamped but previously unknown hubs should be included, and the list should not include hubs in the local cluster.
Payload
The node address of the hub, followed by the time this hub was last seen as a 32-bit timestamp. The last seen time can be adjusted based on the difference between the /KHLA/TS timestamp and the local time. Note that the node address is of variable length, so it is important to consider the last 4 bytes as the timestamp rather than assuming a fixed length node address.
Children
This packet has several child packet types defined at the current time:
- /KHLA/CH/GU - GUID
- /KHLA/CH/V - Vendor Code
- /KHLA/CH/LS - Library Statistics
- /KHLA/CH/HS - Hub Status
This extra information is considered less relevant for a cached hub because it is unlikely to be up to date enough to be useful.
/KHLA/CH/GU - GUID
The /KHLA/CH/GU child packet specifies the globally unique identifier of the hub.
Sending
This child is optional.
Payload
The 16 byte globally unique node identifier of the hub.
Children
This packet has no known children at the current time.
/KHLA/CH/V - Vendor Code
The /KHLA/CH/V child packet specifies the vendor code of the software operating the hub.
Sending
This child is optional.
Payload
A four byte vendor code.
Children
This packet has no known children at the current time.
/KHLA/CH/LS - Library Statistics
The /KHLA/NH/LS packet provides information about the content library of the hub and its connected leaves.
Sending
This child is optional.
Payload
Two 32-bit integers representing the number of files, and the total KB of available content in the hub's own library and the libraries of its connected leaves. The payload may grow beyond 8 bytes in the future.
Children
This packet has no known children at the current time.
/KHLA/CH/HS - Hub Status
The /KHLA/CH/HS packet contains the status of the hub.
Sending
This child is optional.
Payload
Two 16-bit integers representing the current leaf count and the maximum leaf count respectively. This packet may grow beyond 4 bytes in the future.
Children
This packet has no known children at the current time.