blob: 8970c4a58165c5add1a7f93117dced1438db5f3a [file] [log] [blame]
Chip Boling6e27b352020-02-14 09:10:01 -06001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
Andrea Campanella7167ebb2020-02-24 09:56:38 +01003 * Copyright 2020-present Open Networking Foundation
4
Chip Boling6e27b352020-02-14 09:10:01 -06005 * 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
Andrea Campanella7167ebb2020-02-24 09:56:38 +01008
Chip Boling6e27b352020-02-14 09:10:01 -06009 * http://www.apache.org/licenses/LICENSE-2.0
Andrea Campanella7167ebb2020-02-24 09:56:38 +010010
Chip Boling6e27b352020-02-14 09:10:01 -060011 * 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 */
Chip Boling34ebcb62021-02-02 12:13:58 -060017/*
Chip Boling6e27b352020-02-14 09:10:01 -060018 * 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
Chip Boling610117d2021-09-09 11:24:34 -050030const Dot1XPortExtensionPackageClassID = ClassID(290) // 0x0122
Chip Boling6e27b352020-02-14 09:10:01 -060031
32var dot1xportextensionpackageBME *ManagedEntityDefinition
33
Chip Boling610117d2021-09-09 11:24:34 -050034// Dot1XPortExtensionPackage (Class ID: #290 / 0x0122)
Chip Boling6e27b352020-02-14 09:10:01 -060035// 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
Chip Boling610117d2021-09-09 11:24:34 -050045// 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)
Chip Boling6e27b352020-02-14 09:10:01 -060047//
48// Dot1X Enable
Chip Boling610117d2021-09-09 11:24:34 -050049// 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)
Chip Boling6e27b352020-02-14 09:10:01 -060052//
53// Action Register
Chip Boling610117d2021-09-09 11:24:34 -050054// 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//
Chip Boling6e27b352020-02-14 09:10:01 -060071// (W) (mandatory) (1-byte)
72//
73// Authenticator Pae State
Chip Boling610117d2021-09-09 11:24:34 -050074// 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//
Chip Boling6e27b352020-02-14 09:10:01 -060086// (R) (optional) (1-byte)
87//
Chip Boling610117d2021-09-09 11:24:34 -050088// 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//
Chip Boling6e27b352020-02-14 09:10:01 -060099// Backend Authentication State
Chip Boling610117d2021-09-09 11:24:34 -0500100// 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//
Chip Boling6e27b352020-02-14 09:10:01 -0600119// (R) (optional) (1-byte)
120//
121// Admin Controlled Directions
Chip Boling610117d2021-09-09 11:24:34 -0500122// 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)
Chip Boling6e27b352020-02-14 09:10:01 -0600125//
126// Operational Controlled Directions
Chip Boling610117d2021-09-09 11:24:34 -0500127// 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)
Chip Boling6e27b352020-02-14 09:10:01 -0600130//
131// Authenticator Controlled Port Status
Chip Boling610117d2021-09-09 11:24:34 -0500132// This attribute indicates whether the controlled port is currently authorized (1) or unauthorized
133// (2). (R) (optional) (1-byte)
Chip Boling6e27b352020-02-14 09:10:01 -0600134//
135// Quiet Period
Chip Boling610117d2021-09-09 11:24:34 -0500136// 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)
Chip Boling6e27b352020-02-14 09:10:01 -0600141//
142// Server Timeout Period
Chip Boling610117d2021-09-09 11:24:34 -0500143// 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)
Chip Boling6e27b352020-02-14 09:10:01 -0600149//
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
Chip Boling610117d2021-09-09 11:24:34 -0500161// 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)
Chip Boling6e27b352020-02-14 09:10:01 -0600164//
165type Dot1XPortExtensionPackage struct {
166 ManagedEntityDefinition
167 Attributes AttributeValueMap
168}
169
170func init() {
171 dot1xportextensionpackageBME = &ManagedEntityDefinition{
172 Name: "Dot1XPortExtensionPackage",
173 ClassID: 290,
174 MessageTypes: mapset.NewSetWith(
175 Get,
176 Set,
177 ),
178 AllowedAttributeMask: 0xfff0,
179 AttributeDefinitions: AttributeDefinitionMap{
180 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
181 1: ByteField("Dot1XEnable", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
182 2: ByteField("ActionRegister", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Write), false, false, false, 2),
183 3: ByteField("AuthenticatorPaeState", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, true, false, 3),
184 4: ByteField("BackendAuthenticationState", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, true, false, 4),
185 5: ByteField("AdminControlledDirections", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, true, false, 5),
186 6: ByteField("OperationalControlledDirections", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, true, false, 6),
187 7: ByteField("AuthenticatorControlledPortStatus", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, true, false, 7),
188 8: Uint16Field("QuietPeriod", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, true, false, 8),
189 9: Uint16Field("ServerTimeoutPeriod", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, true, false, 9),
190 10: Uint16Field("ReAuthenticationPeriod", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, true, false, 10),
191 11: ByteField("ReAuthenticationEnabled", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, true, false, 11),
192 12: ByteField("KeyTransmissionEnabled", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, true, false, 12),
193 },
194 Access: CreatedByOnu,
195 Support: UnknownSupport,
Chip Boling34ebcb62021-02-02 12:13:58 -0600196 Alarms: AlarmMap{
197 0: "dot1x local authentication - allowed",
198 1: "dot1x local authentication - denied",
199 },
Chip Boling6e27b352020-02-14 09:10:01 -0600200 }
201}
202
203// NewDot1XPortExtensionPackage (class ID 290) creates the basic
204// Managed Entity definition that is used to validate an ME of this type that
205// is received from or transmitted to the OMCC.
206func NewDot1XPortExtensionPackage(params ...ParamData) (*ManagedEntity, OmciErrors) {
207 return NewManagedEntity(*dot1xportextensionpackageBME, params...)
208}