First time here? Check out the FAQ!
THIS IS A TEST INSTANCE. Feel free to ask and answer questions, but take care to avoid triggering too many notifications.
0

Protobuf decoding for Mqtt messages

i see details about adding protobuf decoding to TCP UDP messages, but is there a way to add protobuf decoding to already dissected mqtt messages?

Vivan5's avatar
1
Vivan5
asked 2022-03-10 07:04:00 +0000
edit flag offensive 0 remove flag close merge delete

Comments

Not entirely sure what your end goal is here, but the SparkPlugB dissector relies on the MQTT dissector to deliver messages, parses off the SparkPlugB header and then uses the protobuf dissector to dissect the message contents.

What are you trying to do and does the protocol have a name or specification?

grahamb's avatar grahamb (2022-03-10 09:30:30 +0000) edit

Thanks for your comment. No new protocol, basically i am sending protobuf encoded messages on mqtt. i am trying to see protobuf decoding of mqtt messages data in wireshark log itself. Like there is a way to directly link protobuf with UDP messages. Can we do some similar linking between protobuf and Mqtt message data.

Vivan5's avatar Vivan5 (2022-03-11 08:35:40 +0000) edit
add a comment see more comments

1 Answer

0

The MQTT dissector has a preference "Message Decoding" to allow dissection of a topic using any other dissector.

The preference setting is comprised of a match operator (Equal To, Contains, ...) the topic string to match against, whether the payload is compressed or not and lastly the dissector to call.

Note that the latter argument has to be the registered name of the dissector, e.g. as shown in the first column of the "Enabled Protocols" dialog.

grahamb's avatar
23.8k
grahamb
answered 2022-03-14 14:56:02 +0000
edit flag offensive 0 remove flag delete link

Comments

Thanks a lot Graham for your answer, It is working. I created specific protobuf message's dissectors in a Lua script and assigned them in Mqtt "Message Decoding" preference to different topic strings in Wireshark. Now i can see protobuf decoding for all mqtt messages in Wireshark

Just another question. Can we do it all in a Lua script? Parse mqtt topic strings and map them to different protobuf dissectors without having to go to Wireshark MQTT dissector preference "Message Decoding"?

I am not that expert in Lua script but just curious if it's a possible option as it will give easy working

Vivan5's avatar Vivan5 (2022-03-14 16:47:38 +0000) edit

I'm not sure if a Lua dissector can set the preferences of another dissector.

grahamb's avatar grahamb (2022-03-14 17:23:05 +0000) edit
add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer