1 /* Do not modify this file. Changes will be overwritten. */
2 /* Generated automatically by the ASN.1 to Wireshark dissector compiler */
3 /* packet-wlancertextn.c */
4 /* asn2wrs.py -b -q -L -p wlancertextn -c ./wlancertextn.cnf -s ./packet-wlancertextn-template -D . -O ../.. WLANCERTEXTN.asn */
6 /* packet-wlancertextn.c
7 * Routines for Wireless Certificate Extension (RFC3770)
10 * Wireshark - Network traffic analyzer
11 * By Gerald Combs <gerald@wireshark.org>
12 * Copyright 1998 Gerald Combs
14 * SPDX-License-Identifier: GPL-2.0-or-later
19 #include <epan/packet.h>
20 #include <epan/oids.h>
21 #include <epan/asn1.h>
23 #include <wsutil/array.h>
25 #include "packet-ber.h"
26 #include "packet-wlancertextn.h"
27 #include "packet-x509af.h"
28 #include "packet-x509ce.h"
29 #include "packet-x509sat.h"
31 #define PNAME "Wlan Certificate Extension"
32 #define PSNAME "WLANCERTEXTN"
33 #define PFNAME "wlancertextn"
35 void proto_register_wlancertextn(void);
36 void proto_reg_handoff_wlancertextn(void);
38 /* Initialize the protocol and registered fields */
39 static int proto_wlancertextn
;
40 static int hf_wlancertextn_SSIDList_PDU
; /* SSIDList */
41 static int hf_wlancertextn_SSIDList_item
; /* SSID */
43 /* Initialize the subtree pointers */
44 static int ett_wlancertextn_SSIDList
;
49 dissect_wlancertextn_SSID(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
50 offset
= dissect_ber_octet_string(implicit_tag
, actx
, tree
, tvb
, offset
, hf_index
,
57 static const ber_sequence_t SSIDList_sequence_of
[1] = {
58 { &hf_wlancertextn_SSIDList_item
, BER_CLASS_UNI
, BER_UNI_TAG_OCTETSTRING
, BER_FLAGS_NOOWNTAG
, dissect_wlancertextn_SSID
},
62 dissect_wlancertextn_SSIDList(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
63 offset
= dissect_ber_sequence_of(implicit_tag
, actx
, tree
, tvb
, offset
,
64 SSIDList_sequence_of
, hf_index
, ett_wlancertextn_SSIDList
);
71 static int dissect_SSIDList_PDU(tvbuff_t
*tvb _U_
, packet_info
*pinfo _U_
, proto_tree
*tree _U_
, void *data _U_
) {
74 asn1_ctx_init(&asn1_ctx
, ASN1_ENC_BER
, true, pinfo
);
75 offset
= dissect_wlancertextn_SSIDList(false, tvb
, offset
, &asn1_ctx
, tree
, hf_wlancertextn_SSIDList_PDU
);
81 /*--- proto_register_wlancertextn ----------------------------------------------*/
82 void proto_register_wlancertextn(void) {
85 static hf_register_info hf
[] = {
86 { &hf_wlancertextn_SSIDList_PDU
,
87 { "SSIDList", "wlancertextn.SSIDList",
88 FT_UINT32
, BASE_DEC
, NULL
, 0,
90 { &hf_wlancertextn_SSIDList_item
,
91 { "SSID", "wlancertextn.SSID",
92 FT_BYTES
, BASE_NONE
, NULL
, 0,
96 /* List of subtrees */
98 &ett_wlancertextn_SSIDList
,
101 /* Register protocol */
102 proto_wlancertextn
= proto_register_protocol(PNAME
, PSNAME
, PFNAME
);
104 /* Register fields and subtrees */
105 proto_register_field_array(proto_wlancertextn
, hf
, array_length(hf
));
106 proto_register_subtree_array(ett
, array_length(ett
));
111 /*--- proto_reg_handoff_wlancertextn -------------------------------------------*/
112 void proto_reg_handoff_wlancertextn(void) {
113 register_ber_oid_dissector("1.3.6.1.5.5.7.1.13", dissect_SSIDList_PDU
, proto_wlancertextn
, "id-pe-wlanSSID");
114 register_ber_oid_dissector("1.3.6.1.5.5.7.10.6", dissect_SSIDList_PDU
, proto_wlancertextn
, "id-aca-wlanSSID");
116 oid_add_from_string("id-kp-eapOverPPP","1.3.6.1.5.5.7.3.13");
117 oid_add_from_string("id-kp-eapOverLAN","1.3.6.1.5.5.7.3.14");