blob: 47e147d38d2e4a6ad47c139e2268f938577222f7 [file] [log] [blame]
mpagenko836a1fd2021-11-01 16:12:42 +00001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 * Copyright 2020-present Open Networking Foundation
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00004 *
mpagenko836a1fd2021-11-01 16:12:42 +00005 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00008 *
mpagenko836a1fd2021-11-01 16:12:42 +00009 * http://www.apache.org/licenses/LICENSE-2.0
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +000010 *
mpagenko836a1fd2021-11-01 16:12:42 +000011 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17/*
18 * NOTE: This file was generated, manual edits will be overwritten!
19 *
20 * Generated by 'goCodeGenerator.py':
21 * https://github.com/cboling/OMCI-parser/README.md
22 */
23
24package generated
25
26import "github.com/deckarep/golang-set"
27
28// Dot1XPortExtensionPackageClassID is the 16-bit ID for the OMCI
29// Managed entity Dot1X port extension package
30const Dot1XPortExtensionPackageClassID = ClassID(290) // 0x0122
31
32var dot1xportextensionpackageBME *ManagedEntityDefinition
33
34// Dot1XPortExtensionPackage (Class ID: #290 / 0x0122)
35// An instance of this ME represents a set of attributes that control a port's IEEE 802.1X
36// operation. It is created and deleted autonomously by the ONU upon the creation or deletion of a
37// PPTP that supports [IEEE 802.1X] authentication of customer premises equipment (CPE).
38//
39// Relationships
40// An instance of this ME is associated with a PPTP that performs IEEE 802.1X authentication of CPE
41// (e.g., Ethernet or DSL).
42//
43// Attributes
44// Managed Entity Id
45// This attribute provides a unique number for each instance of this ME. Its value is the same as
46// that of its associated PPTP (i.e., slot and port number). (R) (mandatory) (2-bytes)
47//
48// Dot1X Enable
49// If true, this Boolean attribute forces the associated port to authenticate via [IEEE 802.1X] as
50// a precondition of normal service. The default value false does not impose IEEE 802.1X
51// authentication on the associated port. (R,-W) (mandatory) (1-byte)
52//
53// Action Register
54// This attribute defines a set of actions that can be performed on the associated port. The act of
55// writing to the register causes the specified action.
56//
57// 1 Force re-authentication - this opcode initiates an IEEE-802.1X reauthentication conversation
58// with the associated port. The port remains in its current authorization state until the
59// conversation concludes.
60//
61// 2 Force unauthenticated - this opcode initiates an IEEE-802.1X authentication conversation whose
62// outcome is predestined to fail, thereby disabling normal Ethernet service on the port. The
63// port's provisioning is not changed, such that upon re-initialization, a new IEEE-802.1X
64// conversation may restore service without prejudice.
65//
66// 3 Force authenticated - this opcode initiates an IEEE-802.1X authentication conversation whose
67// outcome is predestined to succeed, thereby unconditionally enabling normal Ethernet service on
68// the port. The port's provisioning is not changed, such that upon re-initialization, a new
69// IEEE-802.1X conversation is required.
70//
71// (W) (mandatory) (1-byte)
72//
73// Authenticator Pae State
74// 4 Authenticated
75//
76// 5 Aborting
77//
78// 6 Held
79//
80// 7 Force auth
81//
82// 8 Force unauth
83//
84// 9 Restart
85//
86// (R) (optional) (1-byte)
87//
88// This attribute returns the value of the port's PAE state. States are further described in [IEEE
89// 802.1X]. Values are coded as follows.
90//
91// 0 Initialize
92//
93// 1 Disconnected
94//
95// 2 Connecting
96//
97// 3 Authenticating
98//
99// Backend Authentication State
100// This attribute returns the value of the port's back-end authentication state. States are further
101// described in [IEEE 802.1X]. Values are coded as follows.
102//
103// 0 Request
104//
105// 1 Response
106//
107// 2 Success
108//
109// 3 Fail
110//
111// 4 Timeout
112//
113// 5 Idle
114//
115// 6 Initialize
116//
117// 7 Ignore
118//
119// (R) (optional) (1-byte)
120//
121// Admin Controlled Directions
122// This attribute controls the directionality of the port's authentication requirement. The default
123// value 0 indicates that control is imposed in both directions. The value 1 indicates that control
124// is imposed only on traffic from the subscriber towards the network. (R,-W) (optional) (1-byte)
125//
126// Operational Controlled Directions
127// This attribute indicates the directionality of the port's current authentication state. The
128// value 0 indicates that control is imposed in both directions. The value 1 indicates that control
129// is imposed only on traffic from the subscriber towards the network. (R) (optional) (1-byte)
130//
131// Authenticator Controlled Port Status
132// This attribute indicates whether the controlled port is currently authorized (1) or unauthorized
133// (2). (R) (optional) (1-byte)
134//
135// Quiet Period
136// This attribute specifies the interval between EAP request/identity invitations sent to the peer.
137// Other events such as carrier present or EAPOL start frames from the peer may trigger an EAP
138// request/identity frame from the ONU at any time; this attribute controls the ONU's periodic
139// behaviour in the absence of these other inputs. It is expressed in seconds. (R,-W) (optional)
140// (2-bytes)
141//
142// Server Timeout Period
143// This attribute specifies the time the ONU will wait for a response from the radius server before
144// timing out. Within this maximum interval, the ONU may initiate several retransmissions with
145// exponentially increasing delay. Upon timeout, the ONU may try another radius server if there is
146// one, or invoke the fallback policy, if no alternate radius servers are available. Server timeout
147// is expressed in seconds, with a default value of 30 and a maximum value of 65535. (R,-W)
148// (optional) (2-bytes)
149//
150// Re_Authentication Period
151// Re-authentication period: This attribute records the re-authentication interval specified by the
152// radius authentication server. It is expressed in seconds. The attribute is only meaningful after
153// a port has been authenticated. (R) (optional) (2-bytes)
154//
155// Re_Authentication Enabled
156// Re-authentication enabled: This Boolean attribute records whether the radius authentication
157// server has enabled re-authentication on this service (true) or not (false). The attribute is
158// only meaningful after a port has been authenticated. (R) (optional) (1-byte)
159//
160// Key Transmission Enabled
161// This Boolean attribute indicates whether key transmission is enabled (true) or not (false). This
162// feature is not required; the parameter is listed here for completeness vis-`a-vis [IEEE 802.1X].
163// (R,-W) (optional) (1-byte)
164//
165type Dot1XPortExtensionPackage struct {
166 ManagedEntityDefinition
167 Attributes AttributeValueMap
168}
169
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000170// Attribute name constants
171
172const Dot1XPortExtensionPackage_Dot1XEnable = "Dot1XEnable"
173const Dot1XPortExtensionPackage_ActionRegister = "ActionRegister"
174const Dot1XPortExtensionPackage_AuthenticatorPaeState = "AuthenticatorPaeState"
175const Dot1XPortExtensionPackage_BackendAuthenticationState = "BackendAuthenticationState"
176const Dot1XPortExtensionPackage_AdminControlledDirections = "AdminControlledDirections"
177const Dot1XPortExtensionPackage_OperationalControlledDirections = "OperationalControlledDirections"
178const Dot1XPortExtensionPackage_AuthenticatorControlledPortStatus = "AuthenticatorControlledPortStatus"
179const Dot1XPortExtensionPackage_QuietPeriod = "QuietPeriod"
180const Dot1XPortExtensionPackage_ServerTimeoutPeriod = "ServerTimeoutPeriod"
181const Dot1XPortExtensionPackage_ReAuthenticationPeriod = "ReAuthenticationPeriod"
182const Dot1XPortExtensionPackage_ReAuthenticationEnabled = "ReAuthenticationEnabled"
183const Dot1XPortExtensionPackage_KeyTransmissionEnabled = "KeyTransmissionEnabled"
184
mpagenko836a1fd2021-11-01 16:12:42 +0000185func init() {
186 dot1xportextensionpackageBME = &ManagedEntityDefinition{
187 Name: "Dot1XPortExtensionPackage",
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000188 ClassID: Dot1XPortExtensionPackageClassID,
mpagenko836a1fd2021-11-01 16:12:42 +0000189 MessageTypes: mapset.NewSetWith(
190 Get,
191 Set,
192 ),
193 AllowedAttributeMask: 0xfff0,
194 AttributeDefinitions: AttributeDefinitionMap{
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000195 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
196 1: ByteField(Dot1XPortExtensionPackage_Dot1XEnable, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
197 2: ByteField(Dot1XPortExtensionPackage_ActionRegister, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Write), false, false, false, 2),
198 3: ByteField(Dot1XPortExtensionPackage_AuthenticatorPaeState, UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, true, false, 3),
199 4: ByteField(Dot1XPortExtensionPackage_BackendAuthenticationState, UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, true, false, 4),
200 5: ByteField(Dot1XPortExtensionPackage_AdminControlledDirections, UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, true, false, 5),
201 6: ByteField(Dot1XPortExtensionPackage_OperationalControlledDirections, UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, true, false, 6),
202 7: ByteField(Dot1XPortExtensionPackage_AuthenticatorControlledPortStatus, UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, true, false, 7),
203 8: Uint16Field(Dot1XPortExtensionPackage_QuietPeriod, UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, true, false, 8),
204 9: Uint16Field(Dot1XPortExtensionPackage_ServerTimeoutPeriod, UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, true, false, 9),
205 10: Uint16Field(Dot1XPortExtensionPackage_ReAuthenticationPeriod, UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, true, false, 10),
206 11: ByteField(Dot1XPortExtensionPackage_ReAuthenticationEnabled, UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, true, false, 11),
207 12: ByteField(Dot1XPortExtensionPackage_KeyTransmissionEnabled, UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, true, false, 12),
mpagenko836a1fd2021-11-01 16:12:42 +0000208 },
209 Access: CreatedByOnu,
210 Support: UnknownSupport,
211 Alarms: AlarmMap{
212 0: "dot1x local authentication - allowed",
213 1: "dot1x local authentication - denied",
214 },
215 }
216}
217
218// NewDot1XPortExtensionPackage (class ID 290) creates the basic
219// Managed Entity definition that is used to validate an ME of this type that
220// is received from or transmitted to the OMCC.
221func NewDot1XPortExtensionPackage(params ...ParamData) (*ManagedEntity, OmciErrors) {
222 return NewManagedEntity(*dot1xportextensionpackageBME, params...)
223}