diff options
author | Dario Lombardo <lomato@gmail.com> | 2019-11-08 23:55:31 +0100 |
---|---|---|
committer | Dario Lombardo <lomato@gmail.com> | 2019-11-14 12:33:10 +0000 |
commit | 40d822ed61831733e5595dbb57bf4e63da856e50 (patch) | |
tree | 1827d96ffe847b6e317f436f9c3eb16e258d98fa /doc | |
parent | 9dbf684c71acaa15c020a14ed52841c5c6dca4c7 (diff) |
tools: add automatic C skeleton dissector generator.
Generate a dissector based on doc/packet-PROTOABBREV.c.
Change-Id: I9233c1212acb30f7166ba91e39d98bc3fb123731
Reviewed-on: https://code.wireshark.org/review/35062
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/README.dissector | 13 | ||||
-rw-r--r-- | doc/packet-PROTOABBREV.c | 4 |
2 files changed, 15 insertions, 2 deletions
diff --git a/doc/README.dissector b/doc/README.dissector index b885ee5827..16bbba6cde 100644 --- a/doc/README.dissector +++ b/doc/README.dissector @@ -97,6 +97,9 @@ PROTOSHORTNAME An abbreviated name for the protocol; this is displayed PROTOABBREV A name for the protocol for use in filter expressions; it may contain only lower-case letters, digits, and hyphens, underscores, and periods. +LICENSE The license this dissector is under. Please use a SPDX License + identifier. +YEARS The years the above license is valid for. FIELDNAME The displayed name for the header field. FIELDABBREV The abbreviated name for the header field; it may contain only letters, digits, hyphens, underscores, and periods. @@ -195,6 +198,16 @@ If, for example, PROTONAME is "Internet Bogosity Discovery Protocol", PROTOSHORTNAME would be "IBDP", and PROTOABBREV would be "ibdp". Try to conform with IANA names. +1.2.1 Automatic substitution in code skeleton + +Instead of manual substitutions in the code skeleton, a tool to automate it can +be found under the tools directory. The script is called tools/generate-dissector.py +and takes all the needed options to generate a compilable dissector. Look at the +above fields to know how to set them. Some assumptions have been made in the +generation to shorten the list of required options. The script patches the +CMakeLists.txt file adding the new dissector in the proper list, alphabetically +sorted. + 1.3 The dissector and the data it receives. diff --git a/doc/packet-PROTOABBREV.c b/doc/packet-PROTOABBREV.c index 69262e8acc..f8625e8bb8 100644 --- a/doc/packet-PROTOABBREV.c +++ b/doc/packet-PROTOABBREV.c @@ -1,12 +1,12 @@ /* packet-PROTOABBREV.c * Routines for PROTONAME dissection - * Copyright 201x, YOUR_NAME <YOUR_EMAIL_ADDRESS> + * Copyright YEARS, YOUR_NAME <YOUR_EMAIL_ADDRESS> * * Wireshark - Network traffic analyzer * By Gerald Combs <gerald@wireshark.org> * Copyright 1998 Gerald Combs * - * SPDX-License-Identifier: GPL-2.0-or-later + * SPDX-License-Identifier: LICENSE */ /* |