Fix up the asn/q932 Makefile as per Tomas Kukosa's suggestion - and make
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 30 Apr 2007 08:55:59 +0000 (08:55 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 30 Apr 2007 08:55:59 +0000 (08:55 +0000)
it a lot more like the Makefile.nmake file.  Also, use $(PROTOCOL_NAME)
in a couple of places in Makefile.nmake where it wasn't being used
before.

(It might be interesting to see whether we can use a template for these
Makefiles, and just tweak some variables at the beginning.)

That lets us get a Q.932 ROS dissector with the right file name and with
"q932.ros" rather than "q932-ros" as the dissector name; do that.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21625 f5534014-38df-0310-8fa8-9805f1628bb7

asn1/q932/Makefile
asn1/q932/Makefile.nmake
asn1/q932/packet-q932-ros-template.c
asn1/q932/packet-q932-template.c
asn1/qsig/packet-qsig-template.c
asn1/qsig/qsig-exp.cnf
epan/dissectors/packet-q932-ros.c
epan/dissectors/packet-q932-ros.h
epan/dissectors/packet-q932.c
epan/dissectors/packet-qsig.c

index b1f8966d58560d208754ff3c452ebd09b94daf06..eeea5bcd3034ef09d234a520907ce3c972d4643f 100644 (file)
@@ -1,16 +1,20 @@
 # $Id$
 
-DISSECTOR_FILES=packet-q932.c packet-q932.h packet-q932-ros.c packet-q932-ros.h
+PROTOCOL_NAME=q932
+Q932_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h 
+Q932_ROS_FILES=packet-$(PROTOCOL_NAME)-ros.c packet-$(PROTOCOL_NAME)-ros.h 
+DISSECTOR_FILES=$(Q932_FILES) $(Q932_ROS_FILES)
+Q932_ASN=Addressing-Data-Elements.asn Network-Facility-Extension.asn Network-Protocol-Profile-component.asn Interpretation-component.asn
 
 all: generate_dissector
 
 generate_dissector: $(DISSECTOR_FILES)
 
-packet-q932.c packet-q932.h: ../../tools/asn2wrs.py packet-q932-template.c packet-q932-template.h q932.cnf
-       python ../../tools/asn2wrs.py -b -T -e -p q932 -c q932.cnf -s packet-q932-template Addressing-Data-Elements.asn Network-Facility-Extension.asn Network-Protocol-Profile-component.asn Interpretation-component.asn
+$(Q932_FILES): ../../tools/asn2wrs.py $(Q932_ASN) packet-$(PROTOCOL_NAME)-template.c packet-$(PROTOCOL_NAME)-template.h $(PROTOCOL_NAME).cnf
+       python ../../tools/asn2wrs.py -b -T -e -p $(PROTOCOL_NAME) -c $(PROTOCOL_NAME).cnf -s packet-$(PROTOCOL_NAME)-template $(Q932_ASN)
 
-packet-q932-ros.c packet-q932-ros.h: ../../tools/asn2wrs.py packet-q932-ros-template.c packet-q932-ros-template.h q932-ros.cnf
-       python ../../tools/asn2wrs.py -b -T -e -p q932-ros -c q932-ros.cnf -s packet-q932-ros-template q932-ros.asn
+$(Q932_ROS_FILES): ../../tools/asn2wrs.py $(PROTOCOL_NAME)-ros.asn packet-$(PROTOCOL_NAME)-ros-template.c packet-$(PROTOCOL_NAME)-ros-template.h $(PROTOCOL_NAME)-ros.cnf
+       python ../../tools/asn2wrs.py -b -T -e -p $(PROTOCOL_NAME).ros -c $(PROTOCOL_NAME)-ros.cnf -o $(PROTOCOL_NAME)-ros -s packet-$(PROTOCOL_NAME)-ros-template $(PROTOCOL_NAME)-ros.asn
 
 clean:
        rm -f parsetab.py $(DISSECTOR_FILES)
index 146374b7137ed86ab944074f55f98f44f852d1e7..bf829d3b2e863f6f73057e64b3b538b751c7211d 100644 (file)
@@ -24,9 +24,9 @@ $(Q932_FILES): ../../tools/asn2wrs.py $(Q932_ASN) packet-$(PROTOCOL_NAME)-templa
        @exit 1
 !ENDIF
 
-$(Q932_ROS_FILES): ../../tools/asn2wrs.py q932-ros.asn packet-$(PROTOCOL_NAME)-ros-template.c packet-$(PROTOCOL_NAME)-ros-template.h $(PROTOCOL_NAME)-ros.cnf
+$(Q932_ROS_FILES): ../../tools/asn2wrs.py $(PROTOCOL_NAME)-ros.asn packet-$(PROTOCOL_NAME)-ros-template.c packet-$(PROTOCOL_NAME)-ros-template.h $(PROTOCOL_NAME)-ros.cnf
 !IFDEF PYTHON
-       $(PYTHON) "../../tools/asn2wrs.py" -b -T -p $(PROTOCOL_NAME).ros -c $(PROTOCOL_NAME)-ros.cnf -o $(PROTOCOL_NAME)-ros -s packet-$(PROTOCOL_NAME)-ros-template q932-ros.asn
+       $(PYTHON) "../../tools/asn2wrs.py" -b -T -p $(PROTOCOL_NAME).ros -c $(PROTOCOL_NAME)-ros.cnf -o $(PROTOCOL_NAME)-ros -s packet-$(PROTOCOL_NAME)-ros-template $(PROTOCOL_NAME)-ros.asn
 !ELSE
        @echo Error: You need Python to use asn2wrs.py
        @exit 1
index de6570646be2ac43475f4f444f073e3fb8394656..d2a7a8450d7220ce1a3ab7991bff64bf05656032 100644 (file)
@@ -38,8 +38,8 @@
 #include "packet-q932-ros.h"
 
 #define PNAME  "Q.932 Operations Service Element"
-#define PSNAME "Q932-ROS"
-#define PFNAME "q932-ros"
+#define PSNAME "Q932.ROS"
+#define PFNAME "q932.ros"
 
 /* Initialize the protocol and registered fields */
 int proto_rose = -1;
index 46a3f651400ca99eafd7a4f00c0d0be555bcdfde..e67f35c93538e06173150105979f4d0451d948bf 100644 (file)
@@ -311,10 +311,10 @@ void proto_register_q932(void) {
   proto_register_subtree_array(ett, array_length(ett));
 
   /* Register dissector tables */
-  q932_rose_ctx.arg_global_dissector_table = register_dissector_table("q932-ros.global.arg", "Q.932 Operation Argument (global opcode)", FT_STRING, BASE_NONE);
-  q932_rose_ctx.res_global_dissector_table = register_dissector_table("q932-ros.global.res", "Q.932 Operation Result (global opcode)", FT_STRING, BASE_NONE);
-  q932_rose_ctx.arg_local_dissector_table = register_dissector_table("q932-ros.local.arg", "Q.932 Operation Argument (local opcode)", FT_UINT32, BASE_HEX); 
-  q932_rose_ctx.res_local_dissector_table = register_dissector_table("q932-ros.local.res", "Q.932 Operation Result (local opcode)", FT_UINT32, BASE_HEX); 
+  q932_rose_ctx.arg_global_dissector_table = register_dissector_table("q932.ros.global.arg", "Q.932 Operation Argument (global opcode)", FT_STRING, BASE_NONE);
+  q932_rose_ctx.res_global_dissector_table = register_dissector_table("q932.ros.global.res", "Q.932 Operation Result (global opcode)", FT_STRING, BASE_NONE);
+  q932_rose_ctx.arg_local_dissector_table = register_dissector_table("q932.ros.local.arg", "Q.932 Operation Argument (local opcode)", FT_UINT32, BASE_HEX); 
+  q932_rose_ctx.res_local_dissector_table = register_dissector_table("q932.ros.local.res", "Q.932 Operation Result (local opcode)", FT_UINT32, BASE_HEX); 
 }
 
 /*--- proto_reg_handoff_q932 ------------------------------------------------*/
index f095db90db279daeaa2bdf2c69d684bef4ce0f71..3d118e34e707575416f14ecd8e16a4a8b2654faf 100644 (file)
@@ -789,15 +789,15 @@ void proto_reg_handoff_qsig(void) {
 
   data_handle = find_dissector("data");
 
-  if (find_dissector_table("q932-ros.local.arg")) {
+  if (find_dissector_table("q932.ros.local.arg")) {
     for (op=0; op<array_length(qsig_tab); op++) {
       if (qsig_tab[op].arg_dissector) {
         qsig_op_handle = create_dissector_handle(qsig_tab[op].arg_dissector, proto_qsig);
-        dissector_add("q932-ros.local.arg", op, qsig_op_handle);
+        dissector_add("q932.ros.local.arg", op, qsig_op_handle);
       }
       if (qsig_tab[op].res_dissector) {
         qsig_op_handle = create_dissector_handle(qsig_tab[op].res_dissector, proto_qsig);
-        dissector_add("q932-ros.local.res", op, qsig_op_handle);
+        dissector_add("q932.ros.local.res", op, qsig_op_handle);
       }
     }
   }
index 180d21c13696eb20b18e835903dc70d4cf6d5e8f..8ab5d3693e1f9e7d319227362f8a816d5e488fd3 100644 (file)
@@ -1,6 +1,6 @@
 # Do not modify this file.
 # It is created automatically by the ASN.1 to Wireshark dissector compiler
-# .\qsig-exp.cnf
+# ./qsig-exp.cnf
 # ../../tools/asn2wrs.py -b -T -e -p qsig -c qsig.cnf -s packet-qsig-template qsig-gf-ext.asn qsig-gf-gp.asn qsig-gf-ade.asn qsig-na.asn qsig-cf.asn
 
 #.MODULE
index e25745952bd87729685c78e001894c3202ba5ba9..2df8165b6c39210a7f73ae6767a0e0f2a6328415 100644 (file)
@@ -1,7 +1,7 @@
 /* Do not modify this file.                                                   */
 /* It is created automatically by the ASN.1 to Wireshark dissector compiler   */
 /* ./packet-q932-ros.c                                                        */
-/* ../../tools/asn2wrs.py -b -T -e -p q932-ros -c q932-ros.cnf -s packet-q932-ros-template q932-ros.asn */
+/* ../../tools/asn2wrs.py -b -T -e -p q932.ros -c q932-ros.cnf -o q932-ros -s packet-q932-ros-template q932-ros.asn */
 
 /* Input file: packet-q932-ros-template.c */
 
@@ -46,8 +46,8 @@
 #include "packet-q932-ros.h"
 
 #define PNAME  "Q.932 Operations Service Element"
-#define PSNAME "Q932-ROS"
-#define PFNAME "q932-ros"
+#define PSNAME "Q932.ROS"
+#define PFNAME "q932.ros"
 
 /* Initialize the protocol and registered fields */
 int proto_rose = -1;
@@ -726,95 +726,95 @@ void proto_register_rose(void) {
 /*--- Included file: packet-q932-ros-hfarr.c ---*/
 #line 1 "packet-q932-ros-hfarr.c"
     { &hf_q932_ros_RoseAPDU_PDU,
-      { "RoseAPDU", "q932-ros.RoseAPDU",
+      { "RoseAPDU", "q932.ros.RoseAPDU",
         FT_UINT32, BASE_DEC, VALS(q932_ros_RoseAPDU_vals), 0,
         "q932_ros.RoseAPDU", HFILL }},
     { &hf_q932_ros_local,
-      { "local", "q932-ros.local",
+      { "local", "q932.ros.local",
         FT_INT32, BASE_DEC, NULL, 0,
         "q932_ros.T_local", HFILL }},
     { &hf_q932_ros_global,
-      { "global", "q932-ros.global",
+      { "global", "q932.ros.global",
         FT_OID, BASE_NONE, NULL, 0,
         "q932_ros.T_global", HFILL }},
     { &hf_q932_ros_invoke,
-      { "invoke", "q932-ros.invoke",
+      { "invoke", "q932.ros.invoke",
         FT_NONE, BASE_NONE, NULL, 0,
         "q932_ros.Invoke", HFILL }},
     { &hf_q932_ros_returnResult,
-      { "returnResult", "q932-ros.returnResult",
+      { "returnResult", "q932.ros.returnResult",
         FT_NONE, BASE_NONE, NULL, 0,
         "q932_ros.ReturnResult", HFILL }},
     { &hf_q932_ros_returnError,
-      { "returnError", "q932-ros.returnError",
+      { "returnError", "q932.ros.returnError",
         FT_NONE, BASE_NONE, NULL, 0,
         "q932_ros.ReturnError", HFILL }},
     { &hf_q932_ros_reject,
-      { "reject", "q932-ros.reject",
+      { "reject", "q932.ros.reject",
         FT_NONE, BASE_NONE, NULL, 0,
         "q932_ros.Reject", HFILL }},
     { &hf_q932_ros_invokeId,
-      { "invokeId", "q932-ros.invokeId",
+      { "invokeId", "q932.ros.invokeId",
         FT_UINT32, BASE_DEC, VALS(q932_ros_InvokeId_vals), 0,
         "q932_ros.InvokeId", HFILL }},
     { &hf_q932_ros_linkedId,
-      { "linkedId", "q932-ros.linkedId",
+      { "linkedId", "q932.ros.linkedId",
         FT_UINT32, BASE_DEC, VALS(q932_ros_T_linkedId_vals), 0,
         "q932_ros.T_linkedId", HFILL }},
     { &hf_q932_ros_linkedIdPresent,
-      { "present", "q932-ros.present",
+      { "present", "q932.ros.present",
         FT_UINT32, BASE_DEC, VALS(q932_ros_InvokeId_vals), 0,
         "q932_ros.InvokeId", HFILL }},
     { &hf_q932_ros_absent,
-      { "absent", "q932-ros.absent",
+      { "absent", "q932.ros.absent",
         FT_NONE, BASE_NONE, NULL, 0,
         "q932_ros.NULL", HFILL }},
     { &hf_q932_ros_opcode,
-      { "opcode", "q932-ros.opcode",
+      { "opcode", "q932.ros.opcode",
         FT_UINT32, BASE_DEC, VALS(q932_ros_Code_vals), 0,
         "q932_ros.Code", HFILL }},
     { &hf_q932_ros_argument,
-      { "argument", "q932-ros.argument",
+      { "argument", "q932.ros.argument",
         FT_BYTES, BASE_HEX, NULL, 0,
         "q932_ros.InvokeArgument", HFILL }},
     { &hf_q932_ros_result,
-      { "result", "q932-ros.result",
+      { "result", "q932.ros.result",
         FT_NONE, BASE_NONE, NULL, 0,
         "q932_ros.T_result", HFILL }},
     { &hf_q932_ros_resultArgument,
-      { "result", "q932-ros.result",
+      { "result", "q932.ros.result",
         FT_BYTES, BASE_HEX, NULL, 0,
         "q932_ros.ResultArgument", HFILL }},
     { &hf_q932_ros_errcode,
-      { "errcode", "q932-ros.errcode",
+      { "errcode", "q932.ros.errcode",
         FT_UINT32, BASE_DEC, VALS(q932_ros_Code_vals), 0,
         "q932_ros.Code", HFILL }},
     { &hf_q932_ros_parameter,
-      { "parameter", "q932-ros.parameter",
+      { "parameter", "q932.ros.parameter",
         FT_BYTES, BASE_HEX, NULL, 0,
         "q932_ros.T_parameter", HFILL }},
     { &hf_q932_ros_problem,
-      { "problem", "q932-ros.problem",
+      { "problem", "q932.ros.problem",
         FT_UINT32, BASE_DEC, VALS(q932_ros_T_problem_vals), 0,
         "q932_ros.T_problem", HFILL }},
     { &hf_q932_ros_general,
-      { "general", "q932-ros.general",
+      { "general", "q932.ros.general",
         FT_INT32, BASE_DEC, VALS(q932_ros_GeneralProblem_vals), 0,
         "q932_ros.GeneralProblem", HFILL }},
     { &hf_q932_ros_invokeProblem,
-      { "invoke", "q932-ros.invoke",
+      { "invoke", "q932.ros.invoke",
         FT_INT32, BASE_DEC, VALS(q932_ros_InvokeProblem_vals), 0,
         "q932_ros.InvokeProblem", HFILL }},
     { &hf_q932_ros_returnResultProblem,
-      { "returnResult", "q932-ros.returnResult",
+      { "returnResult", "q932.ros.returnResult",
         FT_INT32, BASE_DEC, VALS(q932_ros_ReturnResultProblem_vals), 0,
         "q932_ros.ReturnResultProblem", HFILL }},
     { &hf_q932_ros_returnErrorProblem,
-      { "returnError", "q932-ros.returnError",
+      { "returnError", "q932.ros.returnError",
         FT_INT32, BASE_DEC, VALS(q932_ros_ReturnErrorProblem_vals), 0,
         "q932_ros.ReturnErrorProblem", HFILL }},
     { &hf_q932_ros_present,
-      { "present", "q932-ros.present",
+      { "present", "q932.ros.present",
         FT_INT32, BASE_DEC, NULL, 0,
         "q932_ros.INTEGER", HFILL }},
 
index 32a90c31912c05a55558f500b068bd095fd7cbf9..85218e6ddc93b5dbec2a04dfc0356bbb702fbf92 100644 (file)
@@ -1,7 +1,7 @@
 /* Do not modify this file.                                                   */
 /* It is created automatically by the ASN.1 to Wireshark dissector compiler   */
 /* ./packet-q932-ros.h                                                        */
-/* ../../tools/asn2wrs.py -b -T -e -p q932-ros -c q932-ros.cnf -s packet-q932-ros-template q932-ros.asn */
+/* ../../tools/asn2wrs.py -b -T -e -p q932.ros -c q932-ros.cnf -o q932-ros -s packet-q932-ros-template q932-ros.asn */
 
 /* Input file: packet-q932-ros-template.h */
 
index 1204f64c909223308aec90db47725acb5d8ed3db..31b748222c1817658bea7bc01b1f55ee0c8f1fea 100644 (file)
@@ -1095,10 +1095,10 @@ void proto_register_q932(void) {
   proto_register_subtree_array(ett, array_length(ett));
 
   /* Register dissector tables */
-  q932_rose_ctx.arg_global_dissector_table = register_dissector_table("q932-ros.global.arg", "Q.932 Operation Argument (global opcode)", FT_STRING, BASE_NONE);
-  q932_rose_ctx.res_global_dissector_table = register_dissector_table("q932-ros.global.res", "Q.932 Operation Result (global opcode)", FT_STRING, BASE_NONE);
-  q932_rose_ctx.arg_local_dissector_table = register_dissector_table("q932-ros.local.arg", "Q.932 Operation Argument (local opcode)", FT_UINT32, BASE_HEX); 
-  q932_rose_ctx.res_local_dissector_table = register_dissector_table("q932-ros.local.res", "Q.932 Operation Result (local opcode)", FT_UINT32, BASE_HEX); 
+  q932_rose_ctx.arg_global_dissector_table = register_dissector_table("q932.ros.global.arg", "Q.932 Operation Argument (global opcode)", FT_STRING, BASE_NONE);
+  q932_rose_ctx.res_global_dissector_table = register_dissector_table("q932.ros.global.res", "Q.932 Operation Result (global opcode)", FT_STRING, BASE_NONE);
+  q932_rose_ctx.arg_local_dissector_table = register_dissector_table("q932.ros.local.arg", "Q.932 Operation Argument (local opcode)", FT_UINT32, BASE_HEX); 
+  q932_rose_ctx.res_local_dissector_table = register_dissector_table("q932.ros.local.res", "Q.932 Operation Result (local opcode)", FT_UINT32, BASE_HEX); 
 }
 
 /*--- proto_reg_handoff_q932 ------------------------------------------------*/
index a3849cbb879e5bf62d742b1336132c72a904b8a4..e3b902bf5e60c1b44f293b6779a12c011b7c84f5 100644 (file)
@@ -2912,15 +2912,15 @@ void proto_reg_handoff_qsig(void) {
 
   data_handle = find_dissector("data");
 
-  if (find_dissector_table("q932-ros.local.arg")) {
+  if (find_dissector_table("q932.ros.local.arg")) {
     for (op=0; op<array_length(qsig_tab); op++) {
       if (qsig_tab[op].arg_dissector) {
         qsig_op_handle = create_dissector_handle(qsig_tab[op].arg_dissector, proto_qsig);
-        dissector_add("q932-ros.local.arg", op, qsig_op_handle);
+        dissector_add("q932.ros.local.arg", op, qsig_op_handle);
       }
       if (qsig_tab[op].res_dissector) {
         qsig_op_handle = create_dissector_handle(qsig_tab[op].res_dissector, proto_qsig);
-        dissector_add("q932-ros.local.res", op, qsig_op_handle);
+        dissector_add("q932.ros.local.res", op, qsig_op_handle);
       }
     }
   }