aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2018-09-20 00:19:27 +0200
committerAnders Broman <a.broman58@gmail.com>2018-09-20 22:59:58 +0000
commitc768cf550384a846204e65520c5d1f0ada908cb0 (patch)
treeb8f4eedad859645758178f79713431ffc506c1c6 /tools
parent87661668555720c992d7cd6df13a576069244bbe (diff)
checkAPIs.pl: support for new-style dissectors in check_hf_entries
Tested with dissectors like epan/dissectors/packet-netlink-sock_diag.c. Change-Id: Icb43892d68896a8f61f4c0caf413327f0479f007 Reviewed-on: https://code.wireshark.org/review/29754 Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/checkAPIs.pl14
1 files changed, 13 insertions, 1 deletions
diff --git a/tools/checkAPIs.pl b/tools/checkAPIs.pl
index 9a597b6055..2b7f823336 100755
--- a/tools/checkAPIs.pl
+++ b/tools/checkAPIs.pl
@@ -726,11 +726,23 @@ sub check_hf_entries($$)
my $errorCount = 0;
my @items;
- @items = (${$fileContentsRef} =~ m{
+ my $hfRegex = qr{
\{
\s*
&\s*([A-Z0-9_\[\]-]+) # &hf
\s*,\s*
+ }xis;
+ if (${$fileContentsRef} =~ /^#define\s+NEW_PROTO_TREE_API/m) {
+ $hfRegex = qr{
+ \sheader_field_info\s+
+ ([A-Z0-9_]+)
+ \s+
+ [A-Z0-9_]*
+ \s*=\s*
+ }xis;
+ }
+ @items = (${$fileContentsRef} =~ m{
+ $hfRegex # &hf or "new" hfi name
\{\s*
("[A-Z0-9 '\./\(\)_:-]+") # name
\s*,\s*