Replace a handful of tabs with spaces.
[obnox/wireshark/wip.git] / asn1 / rrlp / packet-rrlp-template.c
1 /* packet-rrlp.c
2  * Routines for 3GPP Radio Resource LCS Protocol (RRLP) packet dissection
3  * Copyright 2006, Anders Broman <anders.broman@ericsson.com>
4  *
5  * $Id$
6  *
7  * Wireshark - Network traffic analyzer
8  * By Gerald Combs <gerald@wireshark.org>
9  * Copyright 1998 Gerald Combs
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * as published by the Free Software Foundation; either version 2
14  * of the License, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
24  *
25  * Ref 3GPP TS 44.031 version 6.8.0 Release 6
26  * http://www.3gpp.org
27  */
28
29 #ifdef HAVE_CONFIG_H
30 # include "config.h"
31 #endif
32
33 #include <glib.h>
34 #include <epan/packet.h>
35 #include <epan/conversation.h>
36 #include <epan/asn1.h>
37
38 #include <stdio.h>
39 #include <string.h>
40
41 #include "packet-ber.h"
42 #include "packet-per.h"
43 #include "packet-gsm_map.h"
44
45 #define PNAME  "Radio Resource LCS Protocol (RRLP)"
46 #define PSNAME "RRLP"
47 #define PFNAME "rrlp"
48
49
50
51 #ifdef _MSC_VER
52 /* disable: "warning C4146: unary minus operator applied to unsigned type, result still unsigned" */
53 #pragma warning(disable:4146)
54 #endif
55
56 static dissector_handle_t rrlp_handle=NULL;
57
58
59 /* Initialize the protocol and registered fields */
60 static int proto_rrlp = -1;
61
62
63 #include "packet-rrlp-hf.c"
64
65 /* Initialize the subtree pointers */
66 static gint ett_rrlp = -1;
67 #include "packet-rrlp-ett.c"
68
69 /* Include constants */
70 #include "packet-rrlp-val.h"
71
72
73 #include "packet-rrlp-fn.c"
74
75
76 /*--- proto_register_rrlp -------------------------------------------*/
77 void proto_register_rrlp(void) {
78
79   /* List of fields */
80   static hf_register_info hf[] = {
81
82 #include "packet-rrlp-hfarr.c"
83   };
84
85   /* List of subtrees */
86   static gint *ett[] = {
87           &ett_rrlp,
88 #include "packet-rrlp-ettarr.c"
89   };
90
91
92   /* Register protocol */
93   proto_rrlp = proto_register_protocol(PNAME, PSNAME, PFNAME);
94   register_dissector("rrlp", dissect_PDU_PDU, proto_rrlp);
95
96   /* Register fields and subtrees */
97   proto_register_field_array(proto_rrlp, hf, array_length(hf));
98   proto_register_subtree_array(ett, array_length(ett));
99
100  
101 }
102
103
104 /*--- proto_reg_handoff_rrlp ---------------------------------------*/
105 void
106 proto_reg_handoff_rrlp(void)
107 {
108
109         rrlp_handle = create_dissector_handle(dissect_PDU_PDU, proto_rrlp);
110
111
112 }
113
114