Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

decode protobuf within a protobuf in lua plugin

I have a lua script to decode a packet with a protobuf. as suggested here https://gitlab.com/wireshark/wireshark/-/wikis/Protobuf

Now some of the protobufs have a byte array which is actually another protobuf.

How can I decode these nested protobufs in a lua plugin.

decode protobuf within a protobuf in lua plugin

I have a lua script to decode a htt2 packet with a protobuf. as suggested here https://gitlab.com/wireshark/wireshark/-/wikis/Protobufgrpc+protobuf content.

Now some of the protobufs have The protobuf inside grpc has a byte array field which itself is actually another protobuf. a protobuf.

How can I decode these nested protobufs in have written a lua plugin.post-dissector which find offset and length of this byte array and calls protobuf dissector on it as follows:

        pinfo.private["pb_msg_type"] = "message," .. probmsgtype
        Dissector.get("protobuf"):call(tvb, pinfo, subtree)

i am seeing following error: Protocol Buffers: pbuf.pbufmsgtype [Packet size limited during capture: ProtoBuf truncated]

I verified that length of buffer and content is alright.

i doubt some field in http2 header messing it up.

Any ideas?

decode protobuf within a protobuf in lua plugin

I have a htt2 http2 packet with grpc+protobuf content.

The protobuf inside grpc has a byte array field which itself is a protobuf.

I have written a lua post-dissector which find offset and length of this byte array and calls protobuf dissector on it as follows:

        pinfo.private["pb_msg_type"] = "message," .. probmsgtype
        Dissector.get("protobuf"):call(tvb, pinfo, subtree)

i am seeing following error: Protocol Buffers: pbuf.pbufmsgtype [Packet size limited during capture: ProtoBuf truncated]

I verified that length of buffer and content is alright.

i doubt some field in http2 header messing it up.

Any ideas?