QKA: Difference between revisions

From Gnutella2
Jump to navigation Jump to search
No edit summary
 
(navi)
Line 1: Line 1:
[[PUSH|<< PUSH]] | [[QKR|QKR >>]] | [[Root_packets_index|Packet Index]]
= /QKA - Query Key Answer =
= /QKA - Query Key Answer =



Revision as of 23:39, 5 September 2005

<< PUSH | QKR >> | Packet Index


/QKA - Query Key Answer

The query key answer packet is sent in response to a query key request or in the event that a query with an incorrect or omitted query key is received. It advises the receiver of the correct query key to be used when contacting the sending hub to execute a remote cluster query.

Sending

The query key answer packet should be sent by a hub when a query key has been requested. It should contain a key unique to the local hub and the requesting node address supplied in the request, and should be sent to that address only. The query key answer packet may also be sent upon receiving a query with a missing or invalid query key. In this case no query should be performed.

Receiving

Upon receiving a query key answer packet, the supplied query key should be stored for later use. If the answer packet contains a sending node address (/QKA/SNA) child which does not match the local node address, it may be forwarded to a connected leaf node via TCP with a matching address. In the forwarding case, a query node address (/QKA/QNA) child is added prior to forwarding to retain the remote (queried) hub's address.

Payload

This packet has no payload at the current time.

Children

The QKA packet has three child packets defined at the current time:

  • /QKA/QK
  • /QKA/SNA
  • /QKA/QNA

/QKA/QK - Query Key

The /QKA/QK child contains the query key that was requested.

Sending

This child is required if a key is being issued. Sending a /QKA without a /QKA/QK indicates that the hub does not wish to authorise the requesting node to query it or its cluster.

Payload

A 32-bit query key which is unique to the hub and the sending node address.

Children

This packet has no known children at the current time.

/QKA/SNA - Sending Node Address

This child specifies the node address for which the key has been issued. This is not necessarily the node that physically transmitted the key request or the query.

Sending

This child is required.

Payload

The node address (with port number optional) of the node which requested the query key.

Children

This packet has no known children at the current time.

/QKA/QNA - Queried Node Address

If this query key answer packet has been forwarded to a firewalled leaf from a connected hub, a /QKA/QNA child will have been added to indicate the address of the remote hub.

Sending

This child should be added by a hub when relaying a received query key answer on to a leaf via TCP.

Receiving

If this child is present, the query key answer should be treated as if it originated from the stored address rather than the TCP neighbour.

Payload

The node address (with port number optional) of the remote hub.

Children

This packet has no known children at the current time.