ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: [Wireshark-dev] How to build the simple ASN.1 UDP-based dissector example (foo)

From: Vincent Randal <vtrandal@xxxxxxxxx>
Date: Tue, 13 Apr 2021 06:31:55 -0600
Hello everyone,

I need help building the simple ASN.1 UDP-based dissector example (foo); specifically, I need help building the generate_dissector-*proto* target (Step #6 below). I'm certainly missing something here.

I'm following the Step by Step instructions (shown below) to create the simple ASN1 UDP-based dissector mentioned in 14.2. ASN.1 Dissector Requirements and I'm stuck on step #6. In this case *proto* = "foo" (the simple ASN1 UDP-based dissector, attached to this email as foo.tgz).

14.7. Step By Step Instructions [Creating ASN.1 Dissectors]

  1. Create a directory for your protocol in the epan/dissectors/asn1 directory and put your ASN.1 file there.
  2. Copy CMakeLists.txt from another ASN.1 dissector and edit it to suit your needs.
  3. Create a .cnf file either by copying an existing one and editing it or using the empty example above.
  4. Create template files either by copying suitable existing ones and editing them or use the examples above, putting your protocol name in the appropriate places.
  5. Add your dissector to epan/dissectors/asn1/CMakeLists.txt
  6. Test generating your dissector by building the generate_dissector-*proto* target. <== how? using cmake?
  7. Depending on the outcome you may have to edit your .cnf file, ASN.1 file etc…
  8. Build Wireshark. <== with cmake
NOTES:
(a) The above Step by Step instructions come from here:
(b) Prior to attempting any dissector development I built and installed wireshark-3.4.4 successfully (using cmake).
(c) I created directory "foo" by extracting the attachment (foo.tgz) in epan/dissectors/asn1/
(d) There is a CMakeListsCustom.txt.example file in epan/dissectors/asn1 which already contains an entry for "foo".
(e) Since I don't know what to do in Step #6, I build Wireshare (using cmake), but no build targets get updated.

If the solution to this problem belongs in the Wireshark documentation, I would be glad to help update the documentation. Namely, I don't understand the usage of the 5 (five) CMakeListsCustom.txt.example files inWireshark source code.

Sincerely,
Vincent Randal

Attachment: foo.tgz
Description: application/compressed-tar