LNI

From Gnutella2
Revision as of 18:26, 19 March 2005 by Dcat (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

/LNI - Local Node Information

The local node information packet is used to convey essential information about the node on either end of a TCP stream connection.

Sending

The /LNI packet should be sent to a TCP neighbour upon connection, and at regular intervals following that if the information within it has changed. A minimum update time of one minute is recommended.

Receiving

Upon receiving a /LNI packet, the information within should be stored for subsequent use.

Payload

This packet has no payload at the current time.

Children

The /LNI packet has many child packet types defined at the current time:

  • /LNI/NA - Node Address
  • /LNI/GU - GUID
  • /LNI/V - Vendor Code
  • /LNI/LS - Library Statistics
  • /LNI/HS - Hub Status

/LNI/NA - Node Address

The /LNI/NA child packet specifies the node or network address of the sending node.

Sending

This child is required.

Payload

The physical network address of the sending node. See datatypes for more information.

Children

This packet has no known children at the current time.

/LNI/GU - GUID

The /LNI/GU child packet specifies the globally unique identifier of the sending node.

Sending

This child is required.

Payload

The 16 byte globally unique node identifier of the sending node.

Children

This packet has no known children at the current time.

/LNI/V - Vendor Code

The /LNI/V child packet specifies the vendor code of the software operating the sending node.

Sending

This child is optional.

Payload

A four byte vendor code.

Children

This packet has no known children at the current time.

/LNI/LS - Library Statistics

The /LNI/LS packet provides information about the content library of the sending node.

Sending

This child is optional.

Payload

Two 32-bit integers representing the number of files in the local library, and the total KB in the local library respectively. If the sending node is a hub these statistics are combined with the known statistics from all connected leaves. The payload may grow beyond 8 bytes in the future.

Children

This packet has no known children at the current time.

/LNI/HS - Hub Status

The /LNI/HS packet is included only if the sending node is a hub, and contains the status of the hub.

Sending

This child packet should only be sent by hub nodes. Leaf nodes should not transmit it, and if it is received from a leaf node, it should be ignored.

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.