mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
* new Packet type: PAYLOAD_TYPE_TRACE
This commit is contained in:
parent
ef95462345
commit
0db15db625
9 changed files with 135 additions and 8 deletions
|
|
@ -25,6 +25,7 @@ namespace mesh {
|
|||
#define PAYLOAD_TYPE_GRP_DATA 0x06 // an (unverified) group datagram (prefixed with channel hash, MAC) (enc data: timestamp, blob)
|
||||
#define PAYLOAD_TYPE_ANON_REQ 0x07 // generic request (prefixed with dest_hash, ephemeral pub_key, MAC) (enc data: ...)
|
||||
#define PAYLOAD_TYPE_PATH 0x08 // returned path (prefixed with dest/src hashes, MAC) (enc data: path, extra)
|
||||
#define PAYLOAD_TYPE_TRACE 0x09 // trace a path, collecting SNI for each hop
|
||||
//...
|
||||
#define PAYLOAD_TYPE_RESERVEDM 0x0F // FUTURE
|
||||
|
||||
|
|
@ -44,6 +45,7 @@ public:
|
|||
uint16_t payload_len, path_len;
|
||||
uint8_t path[MAX_PATH_SIZE];
|
||||
uint8_t payload[MAX_PACKET_PAYLOAD];
|
||||
float _snr;
|
||||
|
||||
/**
|
||||
* \brief calculate the hash of payload + type
|
||||
|
|
@ -72,6 +74,8 @@ public:
|
|||
void markDoNotRetransmit() { header = 0xFF; }
|
||||
bool isMarkedDoNotRetransmit() const { return header == 0xFF; }
|
||||
|
||||
float getSNR() const { return _snr; }
|
||||
|
||||
/**
|
||||
* \brief save entire packet as a blob
|
||||
* \param dest (OUT) destination buffer (assumed to be MAX_MTU_SIZE)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue