2.2.1.9 PEER_RECORD

This represents a record that is part of the graph database. Each record is identified by a record type that defines the format of the payload data. The Peer-to-Peer Graphing Protocol defines four internal record types to represent data that is internally used by the protocol. For more details, see section 2.2.3.


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

Record Type (16 bytes)

...

...

Record ID (16 bytes)

...

...

Record Version

Reserved

A

B

C

D

E

F

D

G

Creator ID Length

Creator ID (variable)

...

Last Modified By ID Length

Last Modified By ID (variable)

...

Security Data Size

Security Data (variable)

...

Creation Time

...

Expiration Time

...

Last Modification Time

...

Graph ID Length

Graph ID (variable)

...

Protocol Version

Payload Data Size

...

Payload Data (variable)

...

Attributes Length

Attributes (variable)

...

Record Type (16 bytes): The type of this record, expressed as a GUID. The Peer-to-Peer Graphing Protocol reserves the following record types for internal use only.

Name

Value

RECORD_TYPE_GRAPH_INFO

{ 00000100-0000-0000-0000-000000000000 }

RECORD_TYPE_SIGNATURE

{ 00000200-0000-0000-0000-000000000000 }

RECORD_TYPE_CONTACT

{ 00000300-0000-0000-0000-000000000000 }

RECORD_TYPE_PRESENCE

{ 00000400-0000-0000-0000-000000000000 }

Record ID (16 bytes): The unique ID of this record in the graph, expressed as a GUID.

Record Version (4 bytes): The current version of this record. This version is initialized to 1 on record creation and incremented each time the record is updated.

Reserved (3 bytes): MUST be set to 0x000000 and ignored on receipt.

A - Z1 (1 bit): MUST be set to 0.

B - Z2 (1 bit): MUST be set to 0.

C - Z3 (1 bit): MUST be set to 0.

D - Z4 (1 bit): MUST be set to 0.

E - Z5 (1 bit): MUST be set to 0.

F - Z6 (1 bit): MUST be set to 0.

D (1 bit): (Deleted): Indicates that the record has been deleted. If set to 1, the Payload Data field of this record MUST be empty.

H - Z8 (1 bit): MUST be set to 0.

Creator ID Length (4 bytes): The length, in characters, of the string that follows, including the terminating null character. This field MUST be in the range 2 to 256.

Creator ID (variable): A null-terminated Unicode string representing the Peer ID of the record creator.

Last Modified By ID Length (4 bytes): The length, in characters, of the Last Modified By ID string, including the terminating null character. This field MUST be in the range 0 to 256.

Last Modified By ID (variable): A null-terminated Unicode string representing the Peer ID of the node that last modified this record. This field MUST NOT be present if the Last Modified By ID Length value is 0x00000000.

Security Data Size (4 bytes): The size of Security Data, in bytes.

Security Data (variable): The security data supplied by the graph security provider. If Security Data Size is 0x00000000, this field MUST NOT be present.

Creation Time (8 bytes): The peer time value of the record creator at the time that this record was created.

Expiration Time (8 bytes): The peer time at the local node at which this record will expire.

Last Modification Time (8 bytes): The peer time value of the last modifier at the time that the record was last modified. For a record that has never been modified, this field MUST have the same value as the Creation Time.

Graph ID Length (4 bytes): The length, in characters, of the string that follows, including the terminating null character. This field MUST be in the range 2 to 256.

Graph ID (variable): A null-terminated Unicode string representing the graph ID of the graph to which this record belongs.

Protocol Version (2 bytes): The Peer-to-Peer Graphing Protocol version number. This MUST be set to 0x0100 to signify version 1.0.

Payload Data Size (4 bytes): The size of the Payload Data, in bytes.

Payload Data (variable): The payload data.

Attributes Length (4 bytes): The length, in characters, of the Attributes string, including the terminating null character.

Attributes (variable): A null-terminated Unicode XML string that contains the set of attribute name and value pairs that are associated with this record. This field MUST NOT be present if the Attributes Length value is 0x00000000. See section 2.2.3.5 for the specification of the syntax of Attributes.