wiki:MessageStructure

neuropil messages (source:neuropil/include/np_message.h) are represented by the following structure:

  • header:
    • subject: the hash value of the subject
    • to: the target hash value to receive the message
    • (optional) from: the origin hash value which send the message
    • (optional) reply_to: the hash value of the reply target
  • instructions:
    • ack_mode: acknowledge mode
    • (optional) ack_to: the hash value of the acknowledge target
    • seq: the node's current sequence number
    • uuid: uuid of the message
    • tstamp: timestamp when the message was created
    • ttl: seconds the message is valid (a message will be dropped if expired)
    • parts: the number of message parts required to reconstruct the whole message
  • footer:
    • garbage: fillup garbage data to always have 1024 byte messages

The complete message structure is transport encrypted using the libsodium crypto_secretbox_easy functions.


Open improvements:

  • integrity protect certain parts of the message instructions and header
  • add an end-to-end send counter
Last modified 3 years ago Last modified on 04/20/17 16:43:37