#.PDU and #.PDU_NEW
This directive in the Asn2wrs conformation file will generate a wrapper function around an object dissector. This is useful if there is an object inside the ASN.1 definition that we really want to register as a protocol dissector or if we want it to have a well known signature.
Function Names
The wrapper functions that are created will all be named and have the following signature
static void dissect_ProtocolName_ObjectName(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
Notice that this is exactly the same signature as dissector_t which is used by all dissector entrypoints.
Usage
To get Asn2wrs to generate such wrapper functions you just have to list all objects one by one on the lines following the #.PDU declaration.
Example
#.PDU SomeObject
Which will result in Asn2wrs creating this wrapper function in the packet-foo.c dissector file
static void dissect_SomeObject_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
dissect_foo_SomeObject(FALSE, ...
}
This function can then later be called or referenced from the template file or even exported.
