Wireshark-commits: [Wireshark-commits] master 5750c49: protobuf: add support for Protocol Buffers L
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=5750c4981c56464ef1dbb8d7cfb0446cdb4b12ec
Submitter: "Anders Broman <a.broman58@xxxxxxxxx>"
Changed: branch: master
Repository: wireshark
Commits:
5750c49 by Huang Qiangxiong (qiangxiong.huang@xxxxxx):
protobuf: add support for Protocol Buffers Language (*.proto) files
1. A C-style Protocol Buffers Language (PBL) parser for *.proto file is added.
It contains protobuf_lang_scanner.l (lex scanner), epan/protobuf_lang.y (grammar
parser), and protobuf_lang_tree.h/c (grammar tree implementation).
2. The protobuf-helper.h/cpp is an interface wrapper layer. If one day C++ is allowed,
we can create a protobuf-helper.cpp file, which using offical protobuf C++
library, to replace protobuf-helper.c. That keeps packet-protobuf.c unchanged.
3. User can specify protobuf search paths, and the UDP ports to protobuf message type
maps at the Protobuf protocol preferences.
4. Other dissectors can pass the message type to Protobuf dissector by data parameter
or pinfo->private_table["pb_msg_type"] (pinfo.private["pb_msg_type"] in lua).
Some Sample of GRPC with Protobuf captures can be found in Bug: 13932.
Bug: 13932
Change-Id: Ife16c2f7b381296f8db4740dabe5f8362a456f48
Reviewed-on: https://code.wireshark.org/review/22892
Petri-Dish: Anders Broman <a.broman58@xxxxxxxxx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
Actions performed:
from 0d8bebc SMB: fix dissection of Directory Information field in Search (0x81) response
add 5750c49 protobuf: add support for Protocol Buffers Language (*.proto) files
Summary of changes:
docbook/release-notes.adoc | 1 +
docbook/wsug_src/WSUG_chapter_customize.adoc | 78 +++
epan/CMakeLists.txt | 7 +
epan/dissectors/packet-protobuf.c | 813 ++++++++++++++++++++-----
epan/protobuf-helper.c | 215 +++++++
epan/protobuf-helper.h | 209 +++++++
epan/protobuf_lang.y | 621 +++++++++++++++++++
epan/protobuf_lang_scanner.l | 199 +++++++
epan/protobuf_lang_tree.c | 850 +++++++++++++++++++++++++++
epan/protobuf_lang_tree.h | 340 +++++++++++
10 files changed, 3174 insertions(+), 159 deletions(-)
create mode 100644 epan/protobuf-helper.c
create mode 100644 epan/protobuf-helper.h
create mode 100644 epan/protobuf_lang.y
create mode 100644 epan/protobuf_lang_scanner.l
create mode 100644 epan/protobuf_lang_tree.c
create mode 100644 epan/protobuf_lang_tree.h