TODO drsuapi compressed
[wireshark-sm.git] / epan / dissectors / packet-cbrs-oids.c
blob077ba72df562f5848da70cc1d4e3a94608697daa
1 /* Do not modify this file. Changes will be overwritten. */
2 /* Generated automatically by the ASN.1 to Wireshark dissector compiler */
3 /* packet-cbrs-oids.c */
4 /* asn2wrs.py -b -q -L -p cbrs-oids -c ./cbrs-oids.cnf -s ./packet-cbrs-oids-template -D . -O ../.. cbrs-oids.asn */
6 /* packet-cbrs-oids.c
8 * Citizens Broadband Radio Service - Object Identifiers
10 * Extracted from
11 * - WInnForum CBRS COMSEC TS WINNF-15-S-0065-V2.0.0
12 * https://www.wirelessinnovation.org/assets/work_products/Specifications/winnf-15-s-0065-v2.0.0%20cbrs%20communications%20security%20technical%20specification.pdf
13 * - WInnForum CBRS Certificate Policy Document WINNF-17-S-0022
14 * https://www.wirelessinnovation.org/assets/work_products/Specifications/winnf-17-s-0022%20v1.0.0%20cbrs%20pki%20certificate%20policy.pdf
16 * Wireshark - Network traffic analyzer
17 * By Gerald Combs <gerald@wireshark.org>
18 * Copyright 1998 Gerald Combs
20 * SPDX-License-Identifier: GPL-2.0-or-later
23 #include "config.h"
25 #include <epan/packet.h>
26 #include <epan/oids.h>
27 #include <epan/asn1.h>
28 #include <wsutil/array.h>
30 #include "packet-ber.h"
32 #define PNAME "Citizen Broadband Radio Service - Object Identifiers"
33 #define PSNAME "CBRS_OIDS"
34 #define PFNAME "cbrs_oids"
36 void proto_register_cbrs_oids(void);
37 void proto_reg_handoff_cbrs_oids(void);
39 /* Initialize the protocol and registered fields */
40 static int proto_cbrs_oids;
41 static int hf_cbrs_oids_ZONE_PDU; /* ZONE */
42 static int hf_cbrs_oids_FREQUENCY_PDU; /* FREQUENCY */
43 static int hf_cbrs_oids_FCCID_PDU; /* FCCID */
44 static int hf_cbrs_oids_SERIAL_PDU; /* SERIAL */
45 static int hf_cbrs_oids_FRN_PDU; /* FRN */
46 static int hf_cbrs_oids_CPIRID_PDU; /* CPIRID */
47 static int hf_cbrs_oids_TEST_PDU; /* TEST */
48 static int hf_cbrs_oids_UTF8String_PDU;
50 /* Initialize the subtree pointers */
53 static int
54 dissect_cbrs_oids_ZONE(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
55 offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_UTF8String,
56 actx, tree, tvb, offset, hf_index,
57 NULL);
59 return offset;
64 static int
65 dissect_cbrs_oids_FREQUENCY(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
66 offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_UTF8String,
67 actx, tree, tvb, offset, hf_index,
68 NULL);
70 return offset;
75 static int
76 dissect_cbrs_oids_FCCID(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
77 offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_UTF8String,
78 actx, tree, tvb, offset, hf_index,
79 NULL);
81 return offset;
86 static int
87 dissect_cbrs_oids_SERIAL(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
88 offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_UTF8String,
89 actx, tree, tvb, offset, hf_index,
90 NULL);
92 return offset;
97 static int
98 dissect_cbrs_oids_FRN(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
99 offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_UTF8String,
100 actx, tree, tvb, offset, hf_index,
101 NULL);
103 return offset;
108 static int
109 dissect_cbrs_oids_CPIRID(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
110 offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_UTF8String,
111 actx, tree, tvb, offset, hf_index,
112 NULL);
114 return offset;
119 static int
120 dissect_cbrs_oids_TEST(bool implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
121 offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_UTF8String,
122 actx, tree, tvb, offset, hf_index,
123 NULL);
125 return offset;
128 /*--- PDUs ---*/
130 static int dissect_ZONE_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
131 int offset = 0;
132 asn1_ctx_t asn1_ctx;
133 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
134 offset = dissect_cbrs_oids_ZONE(false, tvb, offset, &asn1_ctx, tree, hf_cbrs_oids_ZONE_PDU);
135 return offset;
137 static int dissect_FREQUENCY_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
138 int offset = 0;
139 asn1_ctx_t asn1_ctx;
140 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
141 offset = dissect_cbrs_oids_FREQUENCY(false, tvb, offset, &asn1_ctx, tree, hf_cbrs_oids_FREQUENCY_PDU);
142 return offset;
144 static int dissect_FCCID_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
145 int offset = 0;
146 asn1_ctx_t asn1_ctx;
147 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
148 offset = dissect_cbrs_oids_FCCID(false, tvb, offset, &asn1_ctx, tree, hf_cbrs_oids_FCCID_PDU);
149 return offset;
151 static int dissect_SERIAL_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
152 int offset = 0;
153 asn1_ctx_t asn1_ctx;
154 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
155 offset = dissect_cbrs_oids_SERIAL(false, tvb, offset, &asn1_ctx, tree, hf_cbrs_oids_SERIAL_PDU);
156 return offset;
158 static int dissect_FRN_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
159 int offset = 0;
160 asn1_ctx_t asn1_ctx;
161 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
162 offset = dissect_cbrs_oids_FRN(false, tvb, offset, &asn1_ctx, tree, hf_cbrs_oids_FRN_PDU);
163 return offset;
165 static int dissect_CPIRID_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
166 int offset = 0;
167 asn1_ctx_t asn1_ctx;
168 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
169 offset = dissect_cbrs_oids_CPIRID(false, tvb, offset, &asn1_ctx, tree, hf_cbrs_oids_CPIRID_PDU);
170 return offset;
172 static int dissect_TEST_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
173 int offset = 0;
174 asn1_ctx_t asn1_ctx;
175 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
176 offset = dissect_cbrs_oids_TEST(false, tvb, offset, &asn1_ctx, tree, hf_cbrs_oids_TEST_PDU);
177 return offset;
181 /*--- proto_register_cbrs_oids ----------------------------------------------*/
182 void proto_register_cbrs_oids(void) {
184 /* List of fields */
185 static hf_register_info hf[] = {
186 { &hf_cbrs_oids_UTF8String_PDU,
187 { "UTF8String", "cbrs-oids.UTF8String",
188 FT_STRING, BASE_NONE, NULL, 0,
189 NULL, HFILL }},
190 { &hf_cbrs_oids_ZONE_PDU,
191 { "ZONE", "cbrs-oids.ZONE",
192 FT_STRING, BASE_NONE, NULL, 0,
193 NULL, HFILL }},
194 { &hf_cbrs_oids_FREQUENCY_PDU,
195 { "FREQUENCY", "cbrs-oids.FREQUENCY",
196 FT_STRING, BASE_NONE, NULL, 0,
197 NULL, HFILL }},
198 { &hf_cbrs_oids_FCCID_PDU,
199 { "FCCID", "cbrs-oids.FCCID",
200 FT_STRING, BASE_NONE, NULL, 0,
201 NULL, HFILL }},
202 { &hf_cbrs_oids_SERIAL_PDU,
203 { "SERIAL", "cbrs-oids.SERIAL",
204 FT_STRING, BASE_NONE, NULL, 0,
205 NULL, HFILL }},
206 { &hf_cbrs_oids_FRN_PDU,
207 { "FRN", "cbrs-oids.FRN",
208 FT_STRING, BASE_NONE, NULL, 0,
209 NULL, HFILL }},
210 { &hf_cbrs_oids_CPIRID_PDU,
211 { "CPIRID", "cbrs-oids.CPIRID",
212 FT_STRING, BASE_NONE, NULL, 0,
213 NULL, HFILL }},
214 { &hf_cbrs_oids_TEST_PDU,
215 { "TEST", "cbrs-oids.TEST",
216 FT_STRING, BASE_NONE, NULL, 0,
217 NULL, HFILL }},
220 /* Register protocol */
221 proto_cbrs_oids = proto_register_protocol(PNAME, PSNAME, PFNAME);
223 /* Register fields and subtrees */
224 proto_register_field_array(proto_cbrs_oids, hf, array_length(hf));
225 /* proto_register_subtree_array(ett, array_length(ett)); */
228 /*--- proto_reg_handoff_cbrs_oids -------------------------------------------*/
229 void proto_reg_handoff_cbrs_oids(void) {
230 register_ber_oid_dissector("1.3.6.1.4.1.46609.1.2", dissect_ZONE_PDU, proto_cbrs_oids, "CBRS_PAL_ZONE");
231 register_ber_oid_dissector("1.3.6.1.4.1.46609.1.3", dissect_FREQUENCY_PDU, proto_cbrs_oids, "CBRS_PAL_FREQUENCY");
232 register_ber_oid_dissector("1.3.6.1.4.1.46609.1.4", dissect_FCCID_PDU, proto_cbrs_oids, "CBRS_CBSD_FCCID");
233 register_ber_oid_dissector("1.3.6.1.4.1.46609.1.5", dissect_SERIAL_PDU, proto_cbrs_oids, "CBRS_CBSD_SERIAL");
234 register_ber_oid_dissector("1.3.6.1.4.1.46609.1.6", dissect_FRN_PDU, proto_cbrs_oids, "CBRS_SAS/OPERATOR_administrator_FRN");
235 register_ber_oid_dissector("1.3.6.1.4.1.46609.1.7", dissect_CPIRID_PDU, proto_cbrs_oids, "CBRS_installer_CPIR-ID");
236 register_ber_oid_dissector("1.3.6.1.4.1.46609.1.8", dissect_TEST_PDU, proto_cbrs_oids, "CBRS_TEST");
238 oid_add_from_string("CBRS Policy Documents","1.3.6.1.4.1.46609.2");
239 oid_add_from_string("CBRS Certificates issued pursuant to CPS","1.3.6.1.4.1.46609.2.1");
240 oid_add_from_string("CBRS ROLE","1.3.6.1.4.1.46609.1.1");
241 oid_add_from_string("CBRS SAS","1.3.6.1.4.1.46609.1.1.1");
242 oid_add_from_string("CBRS INSTALLER","1.3.6.1.4.1.46609.1.1.2");
243 oid_add_from_string("CBRS CBSD","1.3.6.1.4.1.46609.1.1.3");
244 oid_add_from_string("CBRS OPERATOR (Domain Proxy Operator)","1.3.6.1.4.1.46609.1.1.4");
245 oid_add_from_string("CBRS CA","1.3.6.1.4.1.46609.1.1.5");
246 oid_add_from_string("CBRS PAL","1.3.6.1.4.1.46609.1.1.6");
247 oid_add_from_string("CBRS ESC","1.3.6.1.4.1.46609.1.1.7");