2.2.2.4 REFUSE

The REFUSE message is sent in response to the CONNECT (section 2.2.2.2) message when the connection is not accepted.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

Message Size

Version

Message Type

Reserved

Error Code

Address Count

Address Offset

IPv6 Address Array (variable)

...

Message Size (4 bytes): The total number of bytes in the message.

VersionĀ  (1 byte): The Peer-to-Peer Graphing Protocol version number. This MUST be set to 0x10 to signify version 1.0.

Message Type (1 byte): MUST be set to 0x04.

Reserved (2 bytes): MUST be set to zero and MUST be ignored on receipt.

Error Code (1 byte): One of the following values.

Value

Meaning

REFUSE_CODE_BUSY

0x01

The sending node already has the maximum number of neighbor connections. This code is never sent for a direct connection.

REFUSE_CODE_ALREADY_CONNECTED

0x02

The connection on which this message was received is already in the CONNECTED state and the CONNECT message did not have the Update bit set.

REFUSE_CODE_DUPLICATE_CONNECTION

0x03

The sending node is already connected to the receiving node on another connection.

REFUSE_CODE_DIRECT_CONNECTION_DISALLOWED

0x04

The receiving node is not accepting direct connections. This code MUST be returned when the application is not expecting direct connections.

Address Count (1 byte): The total number of address entries included in the message.

Address Offset (2 bytes): The offset, in bytes, from the beginning of the message to the first address in the address list.

IPv6 Address Array (variable): An array of Address Count IPv6 addresses in PEER_IN6_ADDRESS (section 2.2.1.3) form. This field MUST NOT be present if the Address Count is 0x00.