-
Description ============================================================================= The protocol that NSTS server and client follow to organize and execute tests. NSTS protocol is a message-based plain-text protocol with dependency on python pickle dump format.
-
Messages =================================
All informations are exchanged in the form of messages. Each message is separated by the next message by using the LF (LineFeed) character.
Each message has the following format:
<TYPE> <PARAMS>
TYPE:
Is a sequence of \[A-Z0-9\] characters that define the type of message.
PARAMS:
Is a base64 encoded of the payload that is generated by python pickle text
format.
PARAMS = {
"version" // (tuple) sender's protocol version
"remote_addr" // (string) receiver's public address
}
The first message to be sent and expected by both endpoints. This will be always forward compatible.
PARAMS = {
}
A reply that last message was received and executed successfully.
PARAMS = {
"reason" // (string) A reason why it was failed
}
A reply that last message was received but there was an error executing.
PARAMS = {
"profile_id" // (string) unique identifier of the profile
}
Asks the other peer to check for a profile. Checking involves if it is installed and supported execution on the other end.
A "PROFILEINFO" response is expected.
PARAMS = {
"profile_id" // (string) unique identifier of the profile
"installed" // (bool) Flag if the test is known
"supported" // (bool) Flag if the test can be run
"error" // (string) Any error message why is not supported
}
A message containing information about the status of a profile.
PARAMS = {
"profile_id" // (string) unique identifier of the profile
"direction" // (enum) = { "receive", "send" }
"options" // (object) profile parameters
"execution_id" // (string) unique id of execution context
}
Requests the other end to prepare a profile for execution.
An OK/ERROR reply is expected.
PARAMS = {
"execution_id" // (string) unique id of execution context
}
Announce that profile execution has finished.
Profiles can intracommunicate with custom messagse. The type of the message must be in the form of:
__XXXX_YYYYY where
XXXX:
The unique identifier of the profile
YYYY:
Profile's internal identifier to distinguish messages