Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame^] | 1 | /* |
| 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 | */ |
| 20 | |
| 21 | package generated |
| 22 | |
| 23 | import "github.com/deckarep/golang-set" |
| 24 | |
| 25 | // Dot1XPortExtensionPackageClassID is the 16-bit ID for the OMCI |
| 26 | // Managed entity Dot1X port extension package |
| 27 | const Dot1XPortExtensionPackageClassID ClassID = ClassID(290) |
| 28 | |
| 29 | var dot1xportextensionpackageBME *ManagedEntityDefinition |
| 30 | |
| 31 | // Dot1XPortExtensionPackage (class ID #290) |
| 32 | // An instance of this ME represents a set of attributes that control a port's IEEE 802.1X |
| 33 | // operation. It is created and deleted autonomously by the ONU upon the creation or deletion of a |
| 34 | // PPTP that supports [IEEE 802.1X] authentication of customer premises equipment (CPE). |
| 35 | // |
| 36 | // Relationships |
| 37 | // An instance of this ME is associated with a PPTP that performs IEEE 802.1X authentication of CPE |
| 38 | // (e.g., Ethernet or DSL). |
| 39 | // |
| 40 | // Attributes |
| 41 | // Managed Entity Id |
| 42 | // Managed entity ID: This attribute provides a unique number for each instance of this ME. Its |
| 43 | // value is the same as that of its associated PPTP (i.e., slot and port number). (R) (mandatory) |
| 44 | // (2-bytes) |
| 45 | // |
| 46 | // Dot1X Enable |
| 47 | // Dot1x enable: If true, this Boolean attribute forces the associated port to authenticate via |
| 48 | // [IEEE 802.1X] as a precondition of normal service. The default value false does not impose IEEE |
| 49 | // 802.1X authentication on the associated port. (R,-W) (mandatory) (1-byte) |
| 50 | // |
| 51 | // Action Register |
| 52 | // (W) (mandatory) (1-byte) |
| 53 | // |
| 54 | // Authenticator Pae State |
| 55 | // (R) (optional) (1-byte) |
| 56 | // |
| 57 | // Backend Authentication State |
| 58 | // (R) (optional) (1-byte) |
| 59 | // |
| 60 | // Admin Controlled Directions |
| 61 | // Admin controlled directions: This attribute controls the directionality of the port's |
| 62 | // authentication requirement. The default value 0 indicates that control is imposed in both |
| 63 | // directions. The value 1 indicates that control is imposed only on traffic from the subscriber |
| 64 | // towards the network. (R,-W) (optional) (1-byte) |
| 65 | // |
| 66 | // Operational Controlled Directions |
| 67 | // Operational controlled directions: This attribute indicates the directionality of the port's |
| 68 | // current authentication state. The value 0 indicates that control is imposed in both directions. |
| 69 | // The value 1 indicates that control is imposed only on traffic from the subscriber towards the |
| 70 | // network. (R) (optional) (1-byte) |
| 71 | // |
| 72 | // Authenticator Controlled Port Status |
| 73 | // Authenticator controlled port status: This attribute indicates whether the controlled port is |
| 74 | // currently authorized (1) or unauthorized (2). (R) (optional) (1-byte) |
| 75 | // |
| 76 | // Quiet Period |
| 77 | // Quiet period: This attribute specifies the interval between EAP request/identity invitations |
| 78 | // sent to the peer. Other events such as carrier present or EAPOL start frames from the peer may |
| 79 | // trigger an EAP request/identity frame from the ONU at any time; this attribute controls the |
| 80 | // ONU's periodic behaviour in the absence of these other inputs. It is expressed in seconds. |
| 81 | // (R,-W) (optional) (2-bytes) |
| 82 | // |
| 83 | // Server Timeout Period |
| 84 | // Server timeout period: This attribute specifies the time the ONU will wait for a response from |
| 85 | // the radius server before timing out. Within this maximum interval, the ONU may initiate several |
| 86 | // retransmissions with exponentially increasing delay. Upon timeout, the ONU may try another |
| 87 | // radius server if there is one, or invoke the fallback policy, if no alternate radius servers are |
| 88 | // available. Server timeout is expressed in seconds, with a default value of 30 and a maximum |
| 89 | // value of 65535. (R,-W) (optional) (2-bytes) |
| 90 | // |
| 91 | // Re_Authentication Period |
| 92 | // Re-authentication period: This attribute records the re-authentication interval specified by the |
| 93 | // radius authentication server. It is expressed in seconds. The attribute is only meaningful after |
| 94 | // a port has been authenticated. (R) (optional) (2-bytes) |
| 95 | // |
| 96 | // Re_Authentication Enabled |
| 97 | // Re-authentication enabled: This Boolean attribute records whether the radius authentication |
| 98 | // server has enabled re-authentication on this service (true) or not (false). The attribute is |
| 99 | // only meaningful after a port has been authenticated. (R) (optional) (1-byte) |
| 100 | // |
| 101 | // Key Transmission Enabled |
| 102 | // Key transmission enabled: This Boolean attribute indicates whether key transmission is enabled |
| 103 | // (true) or not (false). This feature is not required; the parameter is listed here for |
| 104 | // completeness vis-`a-vis [IEEE 802.1X]. (R,-W) (optional) (1-byte) |
| 105 | // |
| 106 | type Dot1XPortExtensionPackage struct { |
| 107 | ManagedEntityDefinition |
| 108 | Attributes AttributeValueMap |
| 109 | } |
| 110 | |
| 111 | func init() { |
| 112 | dot1xportextensionpackageBME = &ManagedEntityDefinition{ |
| 113 | Name: "Dot1XPortExtensionPackage", |
| 114 | ClassID: 290, |
| 115 | MessageTypes: mapset.NewSetWith( |
| 116 | Get, |
| 117 | Set, |
| 118 | ), |
| 119 | AllowedAttributeMask: 0xfff0, |
| 120 | AttributeDefinitions: AttributeDefinitionMap{ |
| 121 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0), |
| 122 | 1: ByteField("Dot1XEnable", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1), |
| 123 | 2: ByteField("ActionRegister", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Write), false, false, false, 2), |
| 124 | 3: ByteField("AuthenticatorPaeState", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read), false, true, false, 3), |
| 125 | 4: ByteField("BackendAuthenticationState", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read), false, true, false, 4), |
| 126 | 5: ByteField("AdminControlledDirections", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, true, false, 5), |
| 127 | 6: ByteField("OperationalControlledDirections", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read), false, true, false, 6), |
| 128 | 7: ByteField("AuthenticatorControlledPortStatus", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read), false, true, false, 7), |
| 129 | 8: Uint16Field("QuietPeriod", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, true, false, 8), |
| 130 | 9: Uint16Field("ServerTimeoutPeriod", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, true, false, 9), |
| 131 | 10: Uint16Field("ReAuthenticationPeriod", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), false, true, false, 10), |
| 132 | 11: ByteField("ReAuthenticationEnabled", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read), false, true, false, 11), |
| 133 | 12: ByteField("KeyTransmissionEnabled", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, Write), false, true, false, 12), |
| 134 | }, |
| 135 | Access: CreatedByOnu, |
| 136 | Support: UnknownSupport, |
| 137 | } |
| 138 | } |
| 139 | |
| 140 | // NewDot1XPortExtensionPackage (class ID 290) creates the basic |
| 141 | // Managed Entity definition that is used to validate an ME of this type that |
| 142 | // is received from or transmitted to the OMCC. |
| 143 | func NewDot1XPortExtensionPackage(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 144 | return NewManagedEntity(*dot1xportextensionpackageBME, params...) |
| 145 | } |