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] Problems with regenerating lppe dissector

From: Jakub Zawadzki <darkjames-ws@xxxxxxxxxxxx>
Date: Mon, 10 Sep 2012 14:58:57 +0200
Hi,

I'm trying to regenerate packet-lppe.c from asn1/lppe using command:
  ../../tools/asn2wrs.py -p lppe -c ./lppe.cnf -s ./packet-lppe-template -D . -O ../../epan/dissectors LPPe.asn

Regenerated version doesn't compiles:

../../asn1/lppe/packet-lppe-fn.c:868:77: error: use of undeclared identifier 'dissect_LPP_PDU_Definitions_GNSS_ID_Bitmap'
  { &hf_lppe_gnssTimeReference, ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_LPP_PDU_Definitions_GNSS_ID_Bitmap },
../../asn1/lppe/packet-lppe-fn.c:1153:75: error: use of undeclared identifier 'dissect_LPP_PDU_Definitions_GNSS_ID'
  { &hf_lppe_gnss_ID        , ASN1_EXTENSION_ROOT    , ASN1_NOT_OPTIONAL, dissect_LPP_PDU_Definitions_GNSS_ID },
...

Looking at diff, I have lot of identifier renames, like:
-  { &hf_lppe_gnssTimeReference, ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_lpp_GNSS_ID_Bitmap },
+  { &hf_lppe_gnssTimeReference, ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_LPP_PDU_Definitions_GNSS_ID_Bitmap },
-  { &hf_lppe_ccpAssistanceSuppport, ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_lpp_GNSS_SignalIDs },
+  { &hf_lppe_ccpAssistanceSuppport, ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_LPP_PDU_Definitions_GNSS_SignalIDs },
...

and hf types changes:
       { "eARFCN", "lppe.eARFCN",
-        FT_UINT32, BASE_DEC, NULL, 0,
+        FT_NONE, BASE_NONE, NULL, 0,
       { "dl-CarrierFreq", "lppe.dl_CarrierFreq",
-        FT_UINT32, BASE_DEC, NULL, 0,
+        FT_NONE, BASE_NONE, NULL, 0,
...

I really need to change only one line:

-static int dissect_OMA_LPPe_MessageExtension_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
+static int dissect_OMA_LPPe_MessageExtension_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {

So I'll commit only this line change, but it'd be great if someone could look at it.

Thanks.