14.2. ASN.1 Dissector Requirements

The compiler needs 4 input files: an ASN.1 description of a protocol, a .cnf file, and two template files. The ASN.1 specification may have to be edited to work, however work is in progress to at least read all ASN1 specifications. Changing the ASN1 file is being deprecated as this creates problems when updating protocols. The H.248 Binary encoding dissector is a good example of a dissector with relatively small changes.

A complete simple ASN1 UDP-based dissector is also available.

14.2.1. Building An ASN.1-Based Plugin

The usual way to build an ASN.1-based dissector is to put it into the epan/dissectors/asn1 subtree. This works well and is somewhat simpler than building as a plugin, but there are two reasons one might want to build as a plugin:

  • To speed development, since only the plugin needs to be recompiled.
  • To allow flexibility in deploying an updated plugin, since only the plugin needs to be distributed.

Reasons one might not want to build as a plugin:

  • The code is somewhat more complex.
  • The CMakeFile is quite a bit more complex.
  • Building under the asn1 subtree keeps all such dissectors together.

If you still think you’d like to build your module as a plugin, see Building ASN1 Plugins.