blob: bc8246c01298d1e7816e8febb9c7605c6ed8b20e [file] [log] [blame]
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 * http://www.apache.org/licenses/LICENSE-2.0
8 * Unless required by applicable law or agreed to in writing, software
9 * distributed under the License is distributed on an "AS IS" BASIS,
10 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 * See the License for the specific language governing permissions and
12 * limitations under the License.
13 */
14/*
15 * NOTE: This file was generated, manual edits will be overwritten!
16 *
17 * Generated by 'goCodeGenerator.py':
18 * https://github.com/cboling/OMCI-parser/README.md
19 */
20package generated
21
22import "github.com/deckarep/golang-set"
23
24const EnhancedSecurityControlClassId ClassID = ClassID(332)
25
26var enhancedsecuritycontrolBME *ManagedEntityDefinition
27
28// EnhancedSecurityControl (class ID #332)
29// This ME contains the capabilities, parameters and controls of enhanced GPON security features
30// when they are negotiated via the OMCI (Note). The attributes in this ME are intended to be used
31// to implement a symmetric-key-based three step authentication process as described in the
32// supplemental information section in the following.
33//
34// NOTE – If an ITU-T G.987 system uses 802.1X authentication as defined in [ITU-T G.987.3], the
35// only applicable attribute of this ME is the broadcast key table.
36//
37// Relationships
38// One instance of this ME is associated with the ONU ME.
39//
40// Attributes
41// Managed Entity Id
42// Managed entity ID: This attribute uniquely identifies each instance of this ME. There is only
43// one instance, number 0. (R) (mandatory) (2 bytes)
44//
45// Olt Crypto Capabilities
46// (W) (mandatory) (16 bytes)
47//
48// Olt Random Challenge Table
49// NOTE – It is assumed that the length of OLT_challenge is always an integer multiple of 16 bytes.
50//
51// Olt Challenge Status
52// The ONU initializes this attribute to the value false. (R, W) (mandatory) (1 byte)
53//
54// Onu Selected Crypto Capabilities
55// ONU selected crypto capabilities: This attribute specifies the cryptographic capability selected
56// by the ONU in authentication step 2. Its value specifies one of the bit positions that has the
57// value 1 in the OLT crypto capabilities attribute. (R) (mandatory) (1 byte)
58//
59// Onu Random Challenge Table
60// ONU random challenge table: This attribute specifies the random challenge ONU_challenge issued
61// by the ONU during authentication step 2. It is structured as a table, with each entry being
62// 16 bytes of content. ONU_challenge is the concatenation of all 16 byte content fields in the
63// table. Once the OLT triggers a response to be generated using the OLT challenge status
64// attribute, the ONU generates the response and writes the table (in a single operation). The AVC
65// generated by this attribute signals to the OLT that the challenge is ready, so that the OLT can
66// commence a get/get-next sequence to obtain the table's contents. (R) (mandatory) (16 * P bytes)
67//
68// Onu Authentication Result Table
69// Once the OLT triggers a response to be generated using the OLT challenge status attribute, the
70// ONU generates ONU_result and writes the table (in a single operation). The AVC generated by this
71// attribute signals to the OLT that the response is ready, so that the OLT can commence a get/get-
72// next sequence to obtain the table's contents. (R) (mandatory) (16 * Q bytes)
73//
74// Olt Authentication Result Table
75// This attribute is structured as a table, with each entry being 17 bytes. The first byte is the
76// table row number, starting at 1; the remaining 16 bytes are content. OLT_result is the
77// concatenation of all 16 byte content fields. The OLT writes all entries into the table, and then
78// triggers the ONU's processing of the table using the OLT result status attribute. The number of
79// rows R is implicit in the choice of hash algorithm. The OLT can clear the table with a set
80// operation to row 0. (W) (mandatory) (17 * R bytes)
81//
82// Olt Result Status
83// (R, W) (mandatory) (1 byte)
84//
85// Onu Authentication Status
86// (R) (mandatory) (1 byte)
87//
88// Master Session Key Name
89// Upon the invalidation of a master session key (e.g., due to an ONU reset or deactivation, or due
90// to an ONU-local decision that the master session key has expired), the ONU sets the master
91// session key name to all zeros. (R) (mandatory) (16 bytes)
92//
93// Broadcast Key Table
94// (R, W) (optional) (18N bytes)
95//
96// Effective Key Length
97// Effective key length: This attribute specifies the maximum effective length, in bits, of keys
98// generated by the ONU. (R) (optional) (2 bytes)
99//
100type EnhancedSecurityControl struct {
101 ManagedEntityDefinition
102 Attributes AttributeValueMap
103}
104
105func init() {
106 enhancedsecuritycontrolBME = &ManagedEntityDefinition{
107 Name: "EnhancedSecurityControl",
108 ClassID: 332,
109 MessageTypes: mapset.NewSetWith(
110 Get,
111 GetNext,
112 Set,
113 ),
114 AllowedAttributeMask: 0XFFF0,
115 AttributeDefinitions: AttributeDefinitionMap{
116 0: Uint16Field("ManagedEntityId", 0, mapset.NewSetWith(Read), false, false, false, false, 0),
117 1: MultiByteField("OltCryptoCapabilities", 16, nil, mapset.NewSetWith(Write), false, false, false, false, 1),
118 2: TableField("OltRandomChallengeTable", TableInfo{nil, 17}, mapset.NewSetWith(Read, Write), false, false, false, 2),
119 3: ByteField("OltChallengeStatus", 0, mapset.NewSetWith(Read, Write), false, false, false, false, 3),
120 4: ByteField("OnuSelectedCryptoCapabilities", 0, mapset.NewSetWith(Read), false, false, false, false, 4),
121 5: TableField("OnuRandomChallengeTable", TableInfo{nil, 16}, mapset.NewSetWith(Read), true, false, false, 5),
122 6: TableField("OnuAuthenticationResultTable", TableInfo{nil, 16}, mapset.NewSetWith(Read), true, false, false, 6),
123 7: TableField("OltAuthenticationResultTable", TableInfo{nil, 17}, mapset.NewSetWith(Read, Write), false, false, false, 7),
124 8: ByteField("OltResultStatus", 0, mapset.NewSetWith(Read, Write), false, false, false, false, 8),
125 9: ByteField("OnuAuthenticationStatus", 0, mapset.NewSetWith(Read), true, false, false, false, 9),
126 10: MultiByteField("MasterSessionKeyName", 16, nil, mapset.NewSetWith(Read), false, false, false, false, 10),
127 11: TableField("BroadcastKeyTable", TableInfo{nil, 18}, mapset.NewSetWith(Read, Write), false, true, false, 11),
128 12: Uint16Field("EffectiveKeyLength", 0, mapset.NewSetWith(Read), false, false, true, false, 12),
129 },
130 }
131}
132
133// NewEnhancedSecurityControl (class ID 332 creates the basic
134// Managed Entity definition that is used to validate an ME of this type that
135// is received from the wire, about to be sent on the wire.
136func NewEnhancedSecurityControl(params ...ParamData) (*ManagedEntity, OmciErrors) {
137 return NewManagedEntity(enhancedsecuritycontrolBME, params...)
138}