mirror of
https://github.com/meshtastic/protobufs.git
synced 2026-04-20 22:13:55 +00:00
move ServiceEnvelope (MQTT) into the device code
This commit is contained in:
parent
2aa1439214
commit
7dcc783411
4 changed files with 71 additions and 40 deletions
|
|
@ -8,28 +8,6 @@ import "channel.proto";
|
|||
|
||||
option java_outer_classname = "AppOnlyProtos";
|
||||
|
||||
/*
|
||||
* This message wraps a MeshPacket with extra metadata about the sender and how it arrived.
|
||||
*/
|
||||
message ServiceEnvelope {
|
||||
/*
|
||||
* The (probably encrypted) packet
|
||||
*/
|
||||
MeshPacket packet = 1;
|
||||
|
||||
/*
|
||||
* The global channel ID it was sent on
|
||||
*/
|
||||
string channel_id = 2;
|
||||
|
||||
/*
|
||||
* The sending gateway. Can we use this to authenticate/prevent fake
|
||||
* nodeid impersonation for senders? - i.e. use gateway/mesh id (which is authenticated) + local node id as
|
||||
* the globally trusted nodenum
|
||||
*/
|
||||
string gateway_id = 3;
|
||||
}
|
||||
|
||||
/*
|
||||
* This is the most compact possible representation for a set of channels. It includes only one PRIMARY channel (which must be first) and
|
||||
* any SECONDARY channels. No DISABLED channels are included.
|
||||
|
|
|
|||
54
docs/docs.md
54
docs/docs.md
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
- [apponly.proto](#apponly.proto)
|
||||
- [ChannelSet](#.ChannelSet)
|
||||
- [ServiceEnvelope](#.ServiceEnvelope)
|
||||
|
||||
- [channel.proto](#channel.proto)
|
||||
- [Channel](#.Channel)
|
||||
|
|
@ -46,6 +45,9 @@
|
|||
- [MeshPacket.Priority](#.MeshPacket.Priority)
|
||||
- [Routing.Error](#.Routing.Error)
|
||||
|
||||
- [mqtt.proto](#mqtt.proto)
|
||||
- [ServiceEnvelope](#.ServiceEnvelope)
|
||||
|
||||
- [portnums.proto](#portnums.proto)
|
||||
- [PortNum](#.PortNum)
|
||||
|
||||
|
|
@ -134,23 +136,6 @@ This abstraction is used only on the the 'app side' of the world (ie pyt
|
|||
|
||||
|
||||
|
||||
|
||||
<a name=".ServiceEnvelope"></a>
|
||||
|
||||
### ServiceEnvelope
|
||||
This message wraps a MeshPacket with extra metadata about the sender and how it arrived.
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| packet | [MeshPacket](#MeshPacket) | | The (probably encrypted) packet |
|
||||
| channel_id | [string](#string) | | The global channel ID it was sent on |
|
||||
| gateway_id | [string](#string) | | The sending gateway. Can we use this to authenticate/prevent fake nodeid impersonation for senders? - i.e. use gateway/mesh id (which is authenticated) + local node id as the globally trusted nodenum |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -862,6 +847,39 @@ details on the type of failure).
|
|||
|
||||
|
||||
|
||||
<a name="mqtt.proto"></a>
|
||||
<p align="right"><a href="#top">Top</a></p>
|
||||
|
||||
## mqtt.proto
|
||||
|
||||
|
||||
|
||||
<a name=".ServiceEnvelope"></a>
|
||||
|
||||
### ServiceEnvelope
|
||||
This message wraps a MeshPacket with extra metadata about the sender and how it arrived.
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| packet | [MeshPacket](#MeshPacket) | | The (probably encrypted) packet |
|
||||
| channel_id | [string](#string) | | The global channel ID it was sent on |
|
||||
| gateway_id | [string](#string) | | The sending gateway. Can we use this to authenticate/prevent fake nodeid impersonation for senders? - i.e. use gateway/mesh id (which is authenticated) + local node id as the globally trusted nodenum |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="portnums.proto"></a>
|
||||
<p align="right"><a href="#top">Top</a></p>
|
||||
|
||||
|
|
|
|||
3
mqtt.options
Normal file
3
mqtt.options
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
*ServiceEnvelope.packet type:FT_POINTER
|
||||
*ServiceEnvelope.channel_id type:FT_POINTER
|
||||
*ServiceEnvelope.gateway_id type:FT_POINTER
|
||||
32
mqtt.proto
Normal file
32
mqtt.proto
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
syntax = "proto3";
|
||||
|
||||
option java_package = "com.geeksville.mesh";
|
||||
option optimize_for = LITE_RUNTIME;
|
||||
|
||||
import "mesh.proto";
|
||||
import "channel.proto";
|
||||
|
||||
option java_outer_classname = "MQTTProtos";
|
||||
|
||||
/*
|
||||
* This message wraps a MeshPacket with extra metadata about the sender and how it arrived.
|
||||
*/
|
||||
message ServiceEnvelope {
|
||||
/*
|
||||
* The (probably encrypted) packet
|
||||
*/
|
||||
MeshPacket packet = 1;
|
||||
|
||||
/*
|
||||
* The global channel ID it was sent on
|
||||
*/
|
||||
string channel_id = 2;
|
||||
|
||||
/*
|
||||
* The sending gateway. Can we use this to authenticate/prevent fake
|
||||
* nodeid impersonation for senders? - i.e. use gateway/mesh id (which is authenticated) + local node id as
|
||||
* the globally trusted nodenum
|
||||
*/
|
||||
string gateway_id = 3;
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue