diff --git a/apponly.proto b/apponly.proto index df439c9..fb14711 100644 --- a/apponly.proto +++ b/apponly.proto @@ -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. diff --git a/docs/docs.md b/docs/docs.md index 8b4dff5..653faa4 100644 --- a/docs/docs.md +++ b/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 - - - -### 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). + +

Top

+ +## mqtt.proto + + + + + +### 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 | + + + + + + + + + + + + + + +

Top

diff --git a/mqtt.options b/mqtt.options new file mode 100644 index 0000000..261a74b --- /dev/null +++ b/mqtt.options @@ -0,0 +1,3 @@ +*ServiceEnvelope.packet type:FT_POINTER +*ServiceEnvelope.channel_id type:FT_POINTER +*ServiceEnvelope.gateway_id type:FT_POINTER \ No newline at end of file diff --git a/mqtt.proto b/mqtt.proto new file mode 100644 index 0000000..839a25e --- /dev/null +++ b/mqtt.proto @@ -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; +} +