Coverage Report

Created: 2026-05-14 06:28

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/wireshark/epan/dissectors/packet-cbrs-oids.c
Line
Count
Source
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 */
5
6
/* packet-cbrs-oids.c
7
 *
8
 * Citizens Broadband Radio Service - Object Identifiers
9
 *
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
15
 *
16
 * Wireshark - Network traffic analyzer
17
 * By Gerald Combs <gerald@wireshark.org>
18
 * Copyright 1998 Gerald Combs
19
 *
20
 * SPDX-License-Identifier: GPL-2.0-or-later
21
 */
22
23
#include "config.h"
24
25
#include <epan/packet.h>
26
#include <epan/oids.h>
27
#include <epan/asn1.h>
28
#include <wsutil/array.h>
29
30
#include "packet-ber.h"
31
32
void proto_register_cbrs_oids(void);
33
void proto_reg_handoff_cbrs_oids(void);
34
35
/* Initialize the protocol and registered fields */
36
static int proto_cbrs_oids;
37
static int hf_cbrs_oids_ZONE_PDU;                 /* ZONE */
38
static int hf_cbrs_oids_FREQUENCY_PDU;            /* FREQUENCY */
39
static int hf_cbrs_oids_FCCID_PDU;                /* FCCID */
40
static int hf_cbrs_oids_SERIAL_PDU;               /* SERIAL */
41
static int hf_cbrs_oids_FRN_PDU;                  /* FRN */
42
static int hf_cbrs_oids_CPIRID_PDU;               /* CPIRID */
43
static int hf_cbrs_oids_TEST_PDU;                 /* TEST */
44
static int hf_cbrs_oids_UTF8String_PDU;
45
46
/* Initialize the subtree pointers */
47
48
49
static unsigned
50
0
dissect_cbrs_oids_ZONE(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
51
0
  offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_UTF8String,
52
0
                                            actx, tree, tvb, offset, hf_index,
53
0
                                            NULL);
54
55
0
  return offset;
56
0
}
57
58
59
60
static unsigned
61
0
dissect_cbrs_oids_FREQUENCY(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
62
0
  offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_UTF8String,
63
0
                                            actx, tree, tvb, offset, hf_index,
64
0
                                            NULL);
65
66
0
  return offset;
67
0
}
68
69
70
71
static unsigned
72
0
dissect_cbrs_oids_FCCID(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
73
0
  offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_UTF8String,
74
0
                                            actx, tree, tvb, offset, hf_index,
75
0
                                            NULL);
76
77
0
  return offset;
78
0
}
79
80
81
82
static unsigned
83
0
dissect_cbrs_oids_SERIAL(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
84
0
  offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_UTF8String,
85
0
                                            actx, tree, tvb, offset, hf_index,
86
0
                                            NULL);
87
88
0
  return offset;
89
0
}
90
91
92
93
static unsigned
94
0
dissect_cbrs_oids_FRN(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
95
0
  offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_UTF8String,
96
0
                                            actx, tree, tvb, offset, hf_index,
97
0
                                            NULL);
98
99
0
  return offset;
100
0
}
101
102
103
104
static unsigned
105
0
dissect_cbrs_oids_CPIRID(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
106
0
  offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_UTF8String,
107
0
                                            actx, tree, tvb, offset, hf_index,
108
0
                                            NULL);
109
110
0
  return offset;
111
0
}
112
113
114
115
static unsigned
116
0
dissect_cbrs_oids_TEST(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
117
0
  offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_UTF8String,
118
0
                                            actx, tree, tvb, offset, hf_index,
119
0
                                            NULL);
120
121
0
  return offset;
122
0
}
123
124
/*--- PDUs ---*/
125
126
0
static int dissect_ZONE_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
127
0
  unsigned offset = 0;
128
0
  asn1_ctx_t asn1_ctx;
129
0
  asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
130
0
  offset = dissect_cbrs_oids_ZONE(false, tvb, offset, &asn1_ctx, tree, hf_cbrs_oids_ZONE_PDU);
131
0
  return offset;
132
0
}
133
0
static int dissect_FREQUENCY_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
134
0
  unsigned offset = 0;
135
0
  asn1_ctx_t asn1_ctx;
136
0
  asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
137
0
  offset = dissect_cbrs_oids_FREQUENCY(false, tvb, offset, &asn1_ctx, tree, hf_cbrs_oids_FREQUENCY_PDU);
138
0
  return offset;
139
0
}
140
0
static int dissect_FCCID_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
141
0
  unsigned offset = 0;
142
0
  asn1_ctx_t asn1_ctx;
143
0
  asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
144
0
  offset = dissect_cbrs_oids_FCCID(false, tvb, offset, &asn1_ctx, tree, hf_cbrs_oids_FCCID_PDU);
145
0
  return offset;
146
0
}
147
0
static int dissect_SERIAL_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
148
0
  unsigned offset = 0;
149
0
  asn1_ctx_t asn1_ctx;
150
0
  asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
151
0
  offset = dissect_cbrs_oids_SERIAL(false, tvb, offset, &asn1_ctx, tree, hf_cbrs_oids_SERIAL_PDU);
152
0
  return offset;
153
0
}
154
0
static int dissect_FRN_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
155
0
  unsigned offset = 0;
156
0
  asn1_ctx_t asn1_ctx;
157
0
  asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
158
0
  offset = dissect_cbrs_oids_FRN(false, tvb, offset, &asn1_ctx, tree, hf_cbrs_oids_FRN_PDU);
159
0
  return offset;
160
0
}
161
0
static int dissect_CPIRID_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
162
0
  unsigned offset = 0;
163
0
  asn1_ctx_t asn1_ctx;
164
0
  asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
165
0
  offset = dissect_cbrs_oids_CPIRID(false, tvb, offset, &asn1_ctx, tree, hf_cbrs_oids_CPIRID_PDU);
166
0
  return offset;
167
0
}
168
0
static int dissect_TEST_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) {
169
0
  unsigned offset = 0;
170
0
  asn1_ctx_t asn1_ctx;
171
0
  asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, true, pinfo);
172
0
  offset = dissect_cbrs_oids_TEST(false, tvb, offset, &asn1_ctx, tree, hf_cbrs_oids_TEST_PDU);
173
0
  return offset;
174
0
}
175
176
177
/*--- proto_register_cbrs_oids ----------------------------------------------*/
178
15
void proto_register_cbrs_oids(void) {
179
180
  /* List of fields */
181
15
  static hf_register_info hf[] = {
182
15
    { &hf_cbrs_oids_UTF8String_PDU,
183
15
      { "UTF8String", "cbrs-oids.UTF8String",
184
15
        FT_STRING, BASE_NONE, NULL, 0,
185
15
        NULL, HFILL }},
186
15
    { &hf_cbrs_oids_ZONE_PDU,
187
15
      { "ZONE", "cbrs-oids.ZONE",
188
15
        FT_STRING, BASE_NONE, NULL, 0,
189
15
        NULL, HFILL }},
190
15
    { &hf_cbrs_oids_FREQUENCY_PDU,
191
15
      { "FREQUENCY", "cbrs-oids.FREQUENCY",
192
15
        FT_STRING, BASE_NONE, NULL, 0,
193
15
        NULL, HFILL }},
194
15
    { &hf_cbrs_oids_FCCID_PDU,
195
15
      { "FCCID", "cbrs-oids.FCCID",
196
15
        FT_STRING, BASE_NONE, NULL, 0,
197
15
        NULL, HFILL }},
198
15
    { &hf_cbrs_oids_SERIAL_PDU,
199
15
      { "SERIAL", "cbrs-oids.SERIAL",
200
15
        FT_STRING, BASE_NONE, NULL, 0,
201
15
        NULL, HFILL }},
202
15
    { &hf_cbrs_oids_FRN_PDU,
203
15
      { "FRN", "cbrs-oids.FRN",
204
15
        FT_STRING, BASE_NONE, NULL, 0,
205
15
        NULL, HFILL }},
206
15
    { &hf_cbrs_oids_CPIRID_PDU,
207
15
      { "CPIRID", "cbrs-oids.CPIRID",
208
15
        FT_STRING, BASE_NONE, NULL, 0,
209
15
        NULL, HFILL }},
210
15
    { &hf_cbrs_oids_TEST_PDU,
211
15
      { "TEST", "cbrs-oids.TEST",
212
15
        FT_STRING, BASE_NONE, NULL, 0,
213
15
        NULL, HFILL }},
214
15
  };
215
216
  /* Register protocol */
217
15
  proto_cbrs_oids = proto_register_protocol("Citizen Broadband Radio Service - Object Identifiers", "CBRS_OIDS", "cbrs_oids");
218
219
  /* Register fields and subtrees */
220
15
  proto_register_field_array(proto_cbrs_oids, hf, array_length(hf));
221
/*  proto_register_subtree_array(ett, array_length(ett)); */
222
15
}
223
224
/*--- proto_reg_handoff_cbrs_oids -------------------------------------------*/
225
15
void proto_reg_handoff_cbrs_oids(void) {
226
15
  register_ber_oid_dissector("1.3.6.1.4.1.46609.1.2", dissect_ZONE_PDU, proto_cbrs_oids, "CBRS_PAL_ZONE");
227
15
  register_ber_oid_dissector("1.3.6.1.4.1.46609.1.3", dissect_FREQUENCY_PDU, proto_cbrs_oids, "CBRS_PAL_FREQUENCY");
228
15
  register_ber_oid_dissector("1.3.6.1.4.1.46609.1.4", dissect_FCCID_PDU, proto_cbrs_oids, "CBRS_CBSD_FCCID");
229
15
  register_ber_oid_dissector("1.3.6.1.4.1.46609.1.5", dissect_SERIAL_PDU, proto_cbrs_oids, "CBRS_CBSD_SERIAL");
230
15
  register_ber_oid_dissector("1.3.6.1.4.1.46609.1.6", dissect_FRN_PDU, proto_cbrs_oids, "CBRS_SAS/OPERATOR_administrator_FRN");
231
15
  register_ber_oid_dissector("1.3.6.1.4.1.46609.1.7", dissect_CPIRID_PDU, proto_cbrs_oids, "CBRS_installer_CPIR-ID");
232
15
  register_ber_oid_dissector("1.3.6.1.4.1.46609.1.8", dissect_TEST_PDU, proto_cbrs_oids, "CBRS_TEST");
233
234
15
  oid_add_from_string("CBRS Policy Documents","1.3.6.1.4.1.46609.2");
235
15
  oid_add_from_string("CBRS Certificates issued pursuant to CPS","1.3.6.1.4.1.46609.2.1");
236
15
  oid_add_from_string("CBRS ROLE","1.3.6.1.4.1.46609.1.1");
237
15
  oid_add_from_string("CBRS SAS","1.3.6.1.4.1.46609.1.1.1");
238
15
  oid_add_from_string("CBRS INSTALLER","1.3.6.1.4.1.46609.1.1.2");
239
15
  oid_add_from_string("CBRS CBSD","1.3.6.1.4.1.46609.1.1.3");
240
15
  oid_add_from_string("CBRS OPERATOR (Domain Proxy Operator)","1.3.6.1.4.1.46609.1.1.4");
241
15
  oid_add_from_string("CBRS CA","1.3.6.1.4.1.46609.1.1.5");
242
15
  oid_add_from_string("CBRS PAL","1.3.6.1.4.1.46609.1.1.6");
243
15
  oid_add_from_string("CBRS ESC","1.3.6.1.4.1.46609.1.1.7");
244
15
}