Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net) |
Andrea Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 3 | * Copyright 2020-present Open Networking Foundation |
| 4 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 5 | * 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 Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 8 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
Andrea Campanella | 7167ebb | 2020-02-24 09:56:38 +0100 | [diff] [blame] | 10 | |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 11 | * 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 | */ |
David K. Bainbridge | adf422d | 2021-04-09 16:06:41 +0000 | [diff] [blame] | 17 | /* |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 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 | |
| 24 | package generated |
| 25 | |
| 26 | import "github.com/deckarep/golang-set" |
| 27 | |
| 28 | // Dot1XConfigurationProfileClassID is the 16-bit ID for the OMCI |
| 29 | // Managed entity Dot1X configuration profile |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 30 | const Dot1XConfigurationProfileClassID = ClassID(291) // 0x0123 |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 31 | |
| 32 | var dot1xconfigurationprofileBME *ManagedEntityDefinition |
| 33 | |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 34 | // Dot1XConfigurationProfile (Class ID: #291 / 0x0123) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 35 | // An instance of this ME represents a set of attributes that control an ONU's 802.1X operation |
| 36 | // with regard to IEEE 802 services. An instance of this ME is created by the ONU if it is capable |
| 37 | // of supporting [IEEE 802.1X] authentication of CPE. |
| 38 | // |
| 39 | // Relationships |
| 40 | // One instance of this ME governs the ONU's 802.1X CPE authentication behaviour. |
| 41 | // |
| 42 | // Attributes |
| 43 | // Managed Entity Id |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 44 | // This attribute provides a unique number for each instance of this ME. There is at most one |
| 45 | // instance, number 0. (R) (mandatory) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 46 | // |
| 47 | // Circuit Id Prefix |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 48 | // This attribute is a pointer to a large string ME whose content appears as the prefix of the NAS |
| 49 | // port ID in radius access-request messages. The remainder of the NAS port ID field is local |
| 50 | // information (for example, slot-port, appended by the ONU itself). The default value of this |
| 51 | // attribute is the null pointer 0. (R,-W) (mandatory) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 52 | // |
| 53 | // Fallback Policy |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 54 | // When set to 1 (deny), this attribute causes IEEE-802.1X conversations to fail when no external |
| 55 | // authentication server is accessible, such that no Ethernet service is provided. The default |
| 56 | // value 0 causes IEEE-802.1X conversations to succeed when no external authentication server is |
| 57 | // accessible. (R,-W) (mandatory) (1-byte) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 58 | // |
| 59 | // Auth Server 1 |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 60 | // This attribute is a pointer to a large string ME that contains the URI of the first choice |
| 61 | // radius authentication server. The value 0 indicates that no radius authentication server is |
| 62 | // specified. (R,-W) (mandatory) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 63 | // |
| 64 | // Shared Secret Auth1 |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 65 | // This attribute is the shared secret for the first radius authentication server. It is a null- |
| 66 | // terminated character string. (R,-W) (mandatory) (25-bytes) |
| 67 | // |
| 68 | // The following two pairs of attributes are defined in the same way: |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 69 | // |
| 70 | // Auth Server 2 |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 71 | // (R,-W) (optional) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 72 | // |
| 73 | // Shared Secret Auth2 |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 74 | // (R,-W) (optional) (25-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 75 | // |
| 76 | // Auth Server 3 |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 77 | // (R,-W) (optional) (2-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 78 | // |
| 79 | // Shared Secret Auth3 |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 80 | // (R,-W) (optional) (25-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 81 | // |
| 82 | // Olt Proxy Address |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 83 | // This attribute indicates the IP address of a possible proxy at the OLT for IEEE-802.1X radius |
| 84 | // messages. The default value 0.0.0.0 indicates that no proxy is required. (R,-W) (optional) |
| 85 | // (4-bytes) |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 86 | // |
| 87 | // Calling Station Id Format |
Chip Boling | 610117d | 2021-09-09 11:24:34 -0500 | [diff] [blame] | 88 | // Radius messages initiated by the ONU contain a calling-station-ID field that is specified to be |
| 89 | // the supplicant's MAC address in upper-case ASCII form, with bytes separated by a delimiter. This |
| 90 | // attribute permits specification of the delimiter. (R,-W) (optional) (2-bytes) |
| 91 | // |
| 92 | // Value Meaning |
| 93 | // |
| 94 | // 0 ONU's internal default |
| 95 | // |
| 96 | // 1 Hyphen (-) delimiter |
| 97 | // |
| 98 | // 2 Colon (:) delimiter |
| 99 | // |
| 100 | // 3 No delimiter |
| 101 | // |
| 102 | // 0x20 - 0x7E Use this value as the delimiter |
| 103 | // |
| 104 | // 0xF0 - 0xFE Vendor-specific use |
| 105 | // |
Chip Boling | 6e27b35 | 2020-02-14 09:10:01 -0600 | [diff] [blame] | 106 | // Other values are reserved. |
| 107 | // |
| 108 | type Dot1XConfigurationProfile struct { |
| 109 | ManagedEntityDefinition |
| 110 | Attributes AttributeValueMap |
| 111 | } |
| 112 | |
| 113 | func init() { |
| 114 | dot1xconfigurationprofileBME = &ManagedEntityDefinition{ |
| 115 | Name: "Dot1XConfigurationProfile", |
| 116 | ClassID: 291, |
| 117 | MessageTypes: mapset.NewSetWith( |
| 118 | Get, |
| 119 | Set, |
| 120 | ), |
| 121 | AllowedAttributeMask: 0xffc0, |
| 122 | AttributeDefinitions: AttributeDefinitionMap{ |
| 123 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0), |
| 124 | 1: Uint16Field("CircuitIdPrefix", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1), |
| 125 | 2: ByteField("FallbackPolicy", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2), |
| 126 | 3: Uint16Field("AuthServer1", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, false, false, 3), |
| 127 | 4: MultiByteField("SharedSecretAuth1", OctetsAttributeType, 0x1000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 4), |
| 128 | 5: Uint16Field("AuthServer2", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, true, false, 5), |
| 129 | 6: MultiByteField("SharedSecretAuth2", OctetsAttributeType, 0x0400, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, true, false, 6), |
| 130 | 7: Uint16Field("AuthServer3", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, true, false, 7), |
| 131 | 8: MultiByteField("SharedSecretAuth3", OctetsAttributeType, 0x0100, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, true, false, 8), |
| 132 | 9: Uint32Field("OltProxyAddress", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, true, false, 9), |
| 133 | 10: Uint16Field("CallingStationIdFormat", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, Write), false, true, false, 10), |
| 134 | }, |
| 135 | Access: CreatedByOnu, |
| 136 | Support: UnknownSupport, |
| 137 | } |
| 138 | } |
| 139 | |
| 140 | // NewDot1XConfigurationProfile (class ID 291) 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 NewDot1XConfigurationProfile(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 144 | return NewManagedEntity(*dot1xconfigurationprofileBME, params...) |
| 145 | } |