-Wmissing-prototypes
[metze/wireshark/wip.git] / asn1 / gprscdr / packet-gprscdr-template.c
1 /* packet-gprscdr-template.c
2  * Copyright 2011 , Anders Broman <anders.broman [AT] ericsson.com>
3  *
4  * $Id$
5  *
6  * Wireshark - Network traffic analyzer
7  * By Gerald Combs <gerald@wireshark.org>
8  * Copyright 1998 Gerald Combs
9  *
10  * This program is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU General Public License
12  * as published by the Free Software Foundation; either version 2
13  * of the License, or (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23  * References: 3GPP TS 32.298
24  */
25
26 #include "config.h"
27
28 #include <glib.h>
29 #include <epan/packet.h>
30 #include <epan/asn1.h>
31
32 #include "packet-ber.h"
33 #include "packet-gsm_map.h"
34 #include "packet-e212.h"
35 #include "packet-gprscdr.h"
36
37 #define PNAME  "GPRS CDR"
38 #define PSNAME "GPRSCDR"
39 #define PFNAME "gprscdr"
40
41 void proto_register_gprscdr(void);
42
43 /* Define the GPRS CDR proto */
44 static int proto_gprscdr = -1;
45
46 #include "packet-gprscdr-hf.c"
47
48 static int ett_gprscdr = -1;
49 static int ett_gprscdr_timestamp = -1;
50 static int ett_gprscdr_plmn_id = -1;
51 #include "packet-gprscdr-ett.c"
52
53 static const value_string gprscdr_daylight_saving_time_vals[] = {
54     {0, "No adjustment"},
55     {1, "+1 hour adjustment for Daylight Saving Time"},
56     {2, "+2 hours adjustment for Daylight Saving Time"},
57     {3, "Reserved"},
58     {0, NULL}
59 };
60
61 #include "packet-gprscdr-fn.c"
62
63
64
65 /* Register all the bits needed with the filtering engine */
66 void
67 proto_register_gprscdr(void)
68 {
69   /* List of fields */
70   static hf_register_info hf[] = {
71 #include "packet-gprscdr-hfarr.c"
72   };
73
74   /* List of subtrees */
75     static gint *ett[] = {
76     &ett_gprscdr,
77         &ett_gprscdr_timestamp,
78         &ett_gprscdr_plmn_id,
79 #include "packet-gprscdr-ettarr.c"
80         };
81
82   proto_gprscdr = proto_register_protocol(PNAME, PSNAME, PFNAME);
83
84   proto_register_field_array(proto_gprscdr, hf, array_length(hf));
85   proto_register_subtree_array(ett, array_length(ett));
86 }
87
88 /* The registration hand-off routine */
89