LNI

From Gnutella2
Jump to: navigation, search

Root Packets
CRAWLA - CRAWLR
HAW - LNI
KHL - KHLA - KHLR
PI - PO - PUSH
QKA - QKR
Q2 - QA - QH2 - QHT
UPROC - UPROD

Contents

/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/FW - Firewalled
  • /LNI/QK - Query Key Caching
  • /LNI/HA - Hub Able
  • /LNI/RTR - Router
  • /LNI/UP - Uptime

/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.

/LNI/UP - Uptime

The /LNI/UP packet contains the node uptime, measured in seconds.

Sending

This child packet can be sent by any node (hub or leaf)

Payload

A variable-length quantity: an uptime of less than 256 seconds will be transmitted using one single byte, less than 65536 will require only 2 bytes, etc...

Children

This packet has no known children at the current time.

Retrieved from "http://g2.doxu.org/index.php?title=LNI&oldid=85127" (GetEnvy.com mirror)