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 | // Dot1XConfigurationProfileClassID is the 16-bit ID for the OMCI |
| 26 | // Managed entity Dot1X configuration profile |
| 27 | const Dot1XConfigurationProfileClassID ClassID = ClassID(291) |
| 28 | |
| 29 | var dot1xconfigurationprofileBME *ManagedEntityDefinition |
| 30 | |
| 31 | // Dot1XConfigurationProfile (class ID #291) |
| 32 | // An instance of this ME represents a set of attributes that control an ONU's 802.1X operation |
| 33 | // with regard to IEEE 802 services. An instance of this ME is created by the ONU if it is capable |
| 34 | // of supporting [IEEE 802.1X] authentication of CPE. |
| 35 | // |
| 36 | // Relationships |
| 37 | // One instance of this ME governs the ONU's 802.1X CPE authentication behaviour. |
| 38 | // |
| 39 | // Attributes |
| 40 | // Managed Entity Id |
| 41 | // Managed entity ID: This attribute provides a unique number for each instance of this ME. There |
| 42 | // is at most one instance, number 0. (R) (mandatory) (2-bytes) |
| 43 | // |
| 44 | // Circuit Id Prefix |
| 45 | // Circuit ID prefix: This attribute is a pointer to a large string ME whose content appears as the |
| 46 | // prefix of the NAS port ID in radius access-request messages. The remainder of the NAS port ID |
| 47 | // field is local information (for example, slot-port, appended by the ONU itself). The default |
| 48 | // value of this attribute is the null pointer 0. (R,-W) (mandatory) (2-bytes) |
| 49 | // |
| 50 | // Fallback Policy |
| 51 | // Fallback policy: When set to 1 (deny), this attribute causes IEEE-802.1X conversations to fail |
| 52 | // when no external authentication server is accessible, such that no Ethernet service is provided. |
| 53 | // The default value 0 causes IEEE-802.1X conversations to succeed when no external authentication |
| 54 | // server is accessible. (R,-W) (mandatory) (1-byte) |
| 55 | // |
| 56 | // Auth Server 1 |
| 57 | // Auth server 1: This attribute is a pointer to a large string ME that contains the URI of the |
| 58 | // first choice radius authentication server. The value 0 indicates that no radius authentication |
| 59 | // server is specified. (R,-W) (mandatory) (2-bytes) |
| 60 | // |
| 61 | // Shared Secret Auth1 |
| 62 | // Shared secret auth1: This attribute is the shared secret for the first radius authentication |
| 63 | // server. It is a null-terminated character string. (R,-W) (mandatory) (25-bytes) |
| 64 | // |
| 65 | // Auth Server 2 |
| 66 | // Auth server 2: (R,-W) (optional) (2-bytes) |
| 67 | // |
| 68 | // Shared Secret Auth2 |
| 69 | // Shared secret auth2: (R,-W) (optional) (25-bytes) |
| 70 | // |
| 71 | // Auth Server 3 |
| 72 | // Auth server 3: (R,-W) (optional) (2-bytes) |
| 73 | // |
| 74 | // Shared Secret Auth3 |
| 75 | // Shared secret auth3: (R,-W) (optional) (25-bytes) |
| 76 | // |
| 77 | // Olt Proxy Address |
| 78 | // OLT proxy address: This attribute indicates the IP address of a possible proxy at the OLT for |
| 79 | // IEEE-802.1X radius messages. The default value 0.0.0.0 indicates that no proxy is required. |
| 80 | // (R,-W) (optional) (4-bytes) |
| 81 | // |
| 82 | // Calling Station Id Format |
| 83 | // Other values are reserved. |
| 84 | // |
| 85 | type Dot1XConfigurationProfile struct { |
| 86 | ManagedEntityDefinition |
| 87 | Attributes AttributeValueMap |
| 88 | } |
| 89 | |
| 90 | func init() { |
| 91 | dot1xconfigurationprofileBME = &ManagedEntityDefinition{ |
| 92 | Name: "Dot1XConfigurationProfile", |
| 93 | ClassID: 291, |
| 94 | MessageTypes: mapset.NewSetWith( |
| 95 | Get, |
| 96 | Set, |
| 97 | ), |
| 98 | AllowedAttributeMask: 0xffc0, |
| 99 | AttributeDefinitions: AttributeDefinitionMap{ |
| 100 | 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0), |
| 101 | 1: Uint16Field("CircuitIdPrefix", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1), |
| 102 | 2: ByteField("FallbackPolicy", UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2), |
| 103 | 3: Uint16Field("AuthServer1", UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, false, false, 3), |
| 104 | 4: MultiByteField("SharedSecretAuth1", OctetsAttributeType, 0x1000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 4), |
| 105 | 5: Uint16Field("AuthServer2", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, true, false, 5), |
| 106 | 6: MultiByteField("SharedSecretAuth2", OctetsAttributeType, 0x0400, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, true, false, 6), |
| 107 | 7: Uint16Field("AuthServer3", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, true, false, 7), |
| 108 | 8: MultiByteField("SharedSecretAuth3", OctetsAttributeType, 0x0100, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, true, false, 8), |
| 109 | 9: Uint32Field("OltProxyAddress", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, true, false, 9), |
| 110 | 10: Uint16Field("CallingStationIdFormat", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, Write), false, true, false, 10), |
| 111 | }, |
| 112 | Access: CreatedByOnu, |
| 113 | Support: UnknownSupport, |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | // NewDot1XConfigurationProfile (class ID 291) creates the basic |
| 118 | // Managed Entity definition that is used to validate an ME of this type that |
| 119 | // is received from or transmitted to the OMCC. |
| 120 | func NewDot1XConfigurationProfile(params ...ParamData) (*ManagedEntity, OmciErrors) { |
| 121 | return NewManagedEntity(*dot1xconfigurationprofileBME, params...) |
| 122 | } |