Ask Your Question
0

Find grpc call name in Lua dissector

asked 2018-06-21 14:54:07 +0000

sigsegv gravatar image

I am writing a Lua dissector for a specific grpc schema I use.

To see requests/responses for a given call, I register my proto in the grpc dissection table like so:

DissectorTable.get("grpc_message_type"):add("application/grpc,/some.App/Unlock,request", proto) DissectorTable.get("grpc_message_type"):add("application/grpc,/some.App/Unlock,response", proto) DissectorTable.get("grpc_message_type"):add("application/grpc,/some.App/OtherFunc,request", proto) ...

Here /some.App/Unlock is the name of the call, request/response indicate the direction of the message.

In the dissector function, how do I find out which call I am dissecting for?

The grpc dissector does not seem to offer this information in a field.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-03-14 13:34:47 +0000

Skison gravatar image

If your dissector is written in C, you can get this information from 'data' parameter of your "int dissect_xxx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)" function. But unfortunately passing 'data' parameter to subdissector written in Lua is not supported by current wireshark.

But if your gRPC operation is defined in 'xxx.proto' file and the wire data is encoded in protobuf format, you need not write dissector by yourself. Because new version of wireshark (since 3.2.0) support configuration '*.proto' feature (https://www.wireshark.org/docs/relnot...).

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-06-21 14:54:07 +0000

Seen: 397 times

Last updated: Mar 14 '20