blob: 428d9dee42a80e84f50fa7fc984b474b163bba7d [file] [log] [blame]
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
Matteo Scandolof9d43412021-01-12 11:11:34 -08003 * Copyright 2020-present Open Networking Foundation
4
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07005 * 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
Matteo Scandolof9d43412021-01-12 11:11:34 -08008
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -07009 * http://www.apache.org/licenses/LICENSE-2.0
Matteo Scandolof9d43412021-01-12 11:11:34 -080010
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070011 * 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 */
Matteo Scandolof9d43412021-01-12 11:11:34 -080023
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070024package generated
25
26import "github.com/deckarep/golang-set"
27
Matteo Scandolof9d43412021-01-12 11:11:34 -080028// Dot1XPortExtensionPackageClassID is the 16-bit ID for the OMCI
29// Managed entity Dot1X port extension package
30const Dot1XPortExtensionPackageClassID ClassID = ClassID(290)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070031
32var dot1xportextensionpackageBME *ManagedEntityDefinition
33
34// Dot1XPortExtensionPackage (class ID #290)
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// Managed entity ID: This attribute provides a unique number for each instance of this ME. Its
46// value is the same as that of its associated PPTP (i.e., slot and port number). (R) (mandatory)
Matteo Scandolof9d43412021-01-12 11:11:34 -080047// (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070048//
49// Dot1X Enable
50// Dot1x enable: If true, this Boolean attribute forces the associated port to authenticate via
51// [IEEE 802.1X] as a precondition of normal service. The default value false does not impose IEEE
Matteo Scandolof9d43412021-01-12 11:11:34 -080052// 802.1X authentication on the associated port. (R,-W) (mandatory) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070053//
54// Action Register
Matteo Scandolof9d43412021-01-12 11:11:34 -080055// (W) (mandatory) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070056//
57// Authenticator Pae State
Matteo Scandolof9d43412021-01-12 11:11:34 -080058// (R) (optional) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070059//
60// Backend Authentication State
Matteo Scandolof9d43412021-01-12 11:11:34 -080061// (R) (optional) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070062//
63// Admin Controlled Directions
64// Admin controlled directions: This attribute controls the directionality of the port's
65// authentication requirement. The default value 0 indicates that control is imposed in both
66// directions. The value 1 indicates that control is imposed only on traffic from the subscriber
Matteo Scandolof9d43412021-01-12 11:11:34 -080067// towards the network. (R,-W) (optional) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070068//
69// Operational Controlled Directions
70// Operational controlled directions: This attribute indicates the directionality of the port's
71// current authentication state. The value 0 indicates that control is imposed in both directions.
72// The value 1 indicates that control is imposed only on traffic from the subscriber towards the
Matteo Scandolof9d43412021-01-12 11:11:34 -080073// network. (R) (optional) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070074//
75// Authenticator Controlled Port Status
76// Authenticator controlled port status: This attribute indicates whether the controlled port is
Matteo Scandolof9d43412021-01-12 11:11:34 -080077// currently authorized (1) or unauthorized (2). (R) (optional) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070078//
79// Quiet Period
80// Quiet period: This attribute specifies the interval between EAP request/identity invitations
81// sent to the peer. Other events such as carrier present or EAPOL start frames from the peer may
82// trigger an EAP request/identity frame from the ONU at any time; this attribute controls the
83// ONU's periodic behaviour in the absence of these other inputs. It is expressed in seconds.
Matteo Scandolof9d43412021-01-12 11:11:34 -080084// (R,-W) (optional) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070085//
86// Server Timeout Period
87// Server timeout period: This attribute specifies the time the ONU will wait for a response from
88// the radius server before timing out. Within this maximum interval, the ONU may initiate several
89// retransmissions with exponentially increasing delay. Upon timeout, the ONU may try another
90// radius server if there is one, or invoke the fallback policy, if no alternate radius servers are
91// available. Server timeout is expressed in seconds, with a default value of 30 and a maximum
Matteo Scandolof9d43412021-01-12 11:11:34 -080092// value of 65535. (R,-W) (optional) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070093//
94// Re_Authentication Period
95// Re-authentication period: This attribute records the re-authentication interval specified by the
96// radius authentication server. It is expressed in seconds. The attribute is only meaningful after
Matteo Scandolof9d43412021-01-12 11:11:34 -080097// a port has been authenticated. (R) (optional) (2-bytes)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -070098//
99// Re_Authentication Enabled
100// Re-authentication enabled: This Boolean attribute records whether the radius authentication
101// server has enabled re-authentication on this service (true) or not (false). The attribute is
Matteo Scandolof9d43412021-01-12 11:11:34 -0800102// only meaningful after a port has been authenticated. (R) (optional) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700103//
104// Key Transmission Enabled
105// Key transmission enabled: This Boolean attribute indicates whether key transmission is enabled
106// (true) or not (false). This feature is not required; the parameter is listed here for
Matteo Scandolof9d43412021-01-12 11:11:34 -0800107// completeness vis-`a-vis [IEEE 802.1X]. (R,-W) (optional) (1-byte)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700108//
109type Dot1XPortExtensionPackage struct {
110 ManagedEntityDefinition
111 Attributes AttributeValueMap
112}
113
114func init() {
115 dot1xportextensionpackageBME = &ManagedEntityDefinition{
116 Name: "Dot1XPortExtensionPackage",
117 ClassID: 290,
118 MessageTypes: mapset.NewSetWith(
119 Get,
120 Set,
121 ),
Matteo Scandolof9d43412021-01-12 11:11:34 -0800122 AllowedAttributeMask: 0xfff0,
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700123 AttributeDefinitions: AttributeDefinitionMap{
Matteo Scandolof9d43412021-01-12 11:11:34 -0800124 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
125 1: ByteField("Dot1XEnable", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
126 2: ByteField("ActionRegister", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Write), false, false, false, 2),
127 3: ByteField("AuthenticatorPaeState", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, true, false, 3),
128 4: ByteField("BackendAuthenticationState", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, true, false, 4),
129 5: ByteField("AdminControlledDirections", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, true, false, 5),
130 6: ByteField("OperationalControlledDirections", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, true, false, 6),
131 7: ByteField("AuthenticatorControlledPortStatus", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, true, false, 7),
132 8: Uint16Field("QuietPeriod", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, true, false, 8),
133 9: Uint16Field("ServerTimeoutPeriod", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, true, false, 9),
134 10: Uint16Field("ReAuthenticationPeriod", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, true, false, 10),
135 11: ByteField("ReAuthenticationEnabled", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, true, false, 11),
136 12: ByteField("KeyTransmissionEnabled", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, true, false, 12),
137 },
138 Access: CreatedByOnu,
139 Support: UnknownSupport,
140 Alarms: AlarmMap{
141 0: "dot1x local authentication - allowed",
142 1: "dot1x local authentication - denied",
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700143 },
144 }
145}
146
Matteo Scandolof9d43412021-01-12 11:11:34 -0800147// NewDot1XPortExtensionPackage (class ID 290) creates the basic
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700148// Managed Entity definition that is used to validate an ME of this type that
Matteo Scandolof9d43412021-01-12 11:11:34 -0800149// is received from or transmitted to the OMCC.
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700150func NewDot1XPortExtensionPackage(params ...ParamData) (*ManagedEntity, OmciErrors) {
Matteo Scandolof9d43412021-01-12 11:11:34 -0800151 return NewManagedEntity(*dot1xportextensionpackageBME, params...)
Matteo Scandoloa6a3aee2019-11-26 13:30:14 -0700152}