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 */
8 * Citizens Broadband Radio Service - Object Identifiers
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
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 */
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
,
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
,
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
,
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
,
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
,
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
,
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
,
130 static int dissect_ZONE_PDU(tvbuff_t
*tvb _U_
, packet_info
*pinfo _U_
, proto_tree
*tree _U_
, void *data _U_
) {
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
);
137 static int dissect_FREQUENCY_PDU(tvbuff_t
*tvb _U_
, packet_info
*pinfo _U_
, proto_tree
*tree _U_
, void *data _U_
) {
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
);
144 static int dissect_FCCID_PDU(tvbuff_t
*tvb _U_
, packet_info
*pinfo _U_
, proto_tree
*tree _U_
, void *data _U_
) {
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
);
151 static int dissect_SERIAL_PDU(tvbuff_t
*tvb _U_
, packet_info
*pinfo _U_
, proto_tree
*tree _U_
, void *data _U_
) {
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
);
158 static int dissect_FRN_PDU(tvbuff_t
*tvb _U_
, packet_info
*pinfo _U_
, proto_tree
*tree _U_
, void *data _U_
) {
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
);
165 static int dissect_CPIRID_PDU(tvbuff_t
*tvb _U_
, packet_info
*pinfo _U_
, proto_tree
*tree _U_
, void *data _U_
) {
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
);
172 static int dissect_TEST_PDU(tvbuff_t
*tvb _U_
, packet_info
*pinfo _U_
, proto_tree
*tree _U_
, void *data _U_
) {
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
);
181 /*--- proto_register_cbrs_oids ----------------------------------------------*/
182 void proto_register_cbrs_oids(void) {
185 static hf_register_info hf
[] = {
186 { &hf_cbrs_oids_UTF8String_PDU
,
187 { "UTF8String", "cbrs-oids.UTF8String",
188 FT_STRING
, BASE_NONE
, NULL
, 0,
190 { &hf_cbrs_oids_ZONE_PDU
,
191 { "ZONE", "cbrs-oids.ZONE",
192 FT_STRING
, BASE_NONE
, NULL
, 0,
194 { &hf_cbrs_oids_FREQUENCY_PDU
,
195 { "FREQUENCY", "cbrs-oids.FREQUENCY",
196 FT_STRING
, BASE_NONE
, NULL
, 0,
198 { &hf_cbrs_oids_FCCID_PDU
,
199 { "FCCID", "cbrs-oids.FCCID",
200 FT_STRING
, BASE_NONE
, NULL
, 0,
202 { &hf_cbrs_oids_SERIAL_PDU
,
203 { "SERIAL", "cbrs-oids.SERIAL",
204 FT_STRING
, BASE_NONE
, NULL
, 0,
206 { &hf_cbrs_oids_FRN_PDU
,
207 { "FRN", "cbrs-oids.FRN",
208 FT_STRING
, BASE_NONE
, NULL
, 0,
210 { &hf_cbrs_oids_CPIRID_PDU
,
211 { "CPIRID", "cbrs-oids.CPIRID",
212 FT_STRING
, BASE_NONE
, NULL
, 0,
214 { &hf_cbrs_oids_TEST_PDU
,
215 { "TEST", "cbrs-oids.TEST",
216 FT_STRING
, BASE_NONE
, NULL
, 0,
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");