forked from osmocom/wireshark
protobuf: allow config of UDP ports
Make it easier to check if traffic over UDP ports is protobuf-based. Change-Id: Ib88c4a7a6d2996f53249da6707f35e06b38c7b2d Reviewed-on: https://code.wireshark.org/review/26625 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
03e01a42b7
commit
a00bb067d7
|
@ -520,7 +520,7 @@ dissect_protobuf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
|
|||
proto_item_append_text(ti, ": %s", (const gchar*)data);
|
||||
}
|
||||
|
||||
/* each time we dissec one protobuf field. */
|
||||
/* each time we dissect one protobuf field. */
|
||||
while (tvb_reported_length_remaining(tvb, offset) > 0)
|
||||
{
|
||||
if (!dissect_one_protobuf_field(tvb, &offset, tvb_reported_length_remaining(tvb, offset), pinfo, protobuf_tree, data))
|
||||
|
@ -662,6 +662,8 @@ proto_register_protobuf(void)
|
|||
void
|
||||
proto_reg_handoff_protobuf(void)
|
||||
{
|
||||
dissector_add_uint_range_with_preference("udp.port", "", protobuf_handle);
|
||||
|
||||
dissector_add_string("grpc_message_type", "application/grpc", protobuf_handle);
|
||||
dissector_add_string("grpc_message_type", "application/grpc+proto", protobuf_handle);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue