Commit Graph

6 Commits

Author SHA1 Message Date
Anders Broman 61d923da39 bison/flex: comment why we ignore deprecated directive warning.
Change-Id: Ia2c6500180f5f28c25311c4763406de4174dc223
Reviewed-on: https://code.wireshark.org/review/36970
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2020-04-30 07:57:39 +00:00
Guy Harris 13703434da Get rid of %debug, so protobuf_lang.y can be processed by Berkeley YACC.
If somebody wants to debug the parser, they can add it if necessary in
their version.

Bug: 16306
Change-Id: I00e5924058d9401176e3fab40833932dc5757e6a
Reviewed-on: https://code.wireshark.org/review/35665
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2020-01-06 10:25:18 +00:00
Huang Qiangxiong 4fe4405bef Protobuf: Enhancements about error message during loading .proto files
When printing an error message about (1) imported file does not exist
or (2) type is defined duplicated, the loaded .proto filename and line
number are included to ease fixing the errors of .proto file.

Change-Id: I2efc7a200dd86016450bba2bc960f53773bfc2e8
Reviewed-on: https://code.wireshark.org/review/35032
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-11-10 10:19:16 +00:00
Huang Qiangxiong 62101950f3 Protobuf: Add show_details preferences. Fix two bugs.
1. Add show_details preferences. Disable it will hidden names of
message/field/enum, field number, and other details.

2. Have only one popup message with all the errors listed,
that are found during parsing .proto files. (Buffer errors and print once)
Loading .proto files and checking message types of UDP port will
be done only when protobuf dissector has been called.

3. Support parsing .proto files in legacy MAC file format
(that newline is '\r') or mixed newline (\r + \n) file format.

Change-Id: I97bcde000957e4cd1cce98a7f61120d03027423e
Reviewed-on: https://code.wireshark.org/review/34736
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-10-14 06:47:30 +00:00
Stig Bjørlykke dbf3cdcc3f protobuf: Fix typo in error message
Change-Id: I0a3ef1a2c690148672aa65a8385f230e7f070e57
Reviewed-on: https://code.wireshark.org/review/34728
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2019-10-08 07:07:06 +00:00
Huang Qiangxiong 5750c4981c 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@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-10-07 10:35:52 +00:00