3.1.4.3 Application Adds a Record
When the application requests that a record be added to the database, the following PEER_RECORD (section 2.2.1.9) field values MUST be provided to the Peer-to-Peer Graphing Protocol:
Record Type
Expiration Time
The Peer-to-Peer Graphing Protocol MUST then construct a new record using those field values. In addition, values for the following fields MAY be provided by the application; if they are not provided, those fields MUST NOT be present in the PEER_RECORD:
Payload Data
Attributes
Record Version
Values for the following fields MAY be provided by the application; if not, the specified default values MUST be used:
Creator Id. The default value is the Peer ID.
Last Modified By ID. The default value is the Peer ID.
Any other field provided by the application MUST be ignored by the protocol.
The record MUST then be validated with the following steps:
The Record Type MUST NOT be in the reserved range. For more details, see section 2.2.1.9.
The Autorefresh flag MUST NOT be set.
The record size MUST be less than the Max Record Size. For more details, see section 3.1.1.
If Attributes are provided, they MUST conform to the attribute syntax (see section 2.2.3.5).
Expiration Time MUST be later than the current Peer Time.
If the above record validation fails for any reason, then the record MUST NOT be processed further and an error MUST be returned to the application.
The fields of the records MUST be initialized as described in section 2.2.1.9.
If a Security Provider is configured it MUST be called to secure the record. For more details, see section 3.1.7.28. The record MUST then be published. For more details, see section 3.1.7.3.