blob: bb41523516608aa6724213080333ed956df1b853 [file] [log] [blame]
Holger Hildebrandtfa074992020-03-27 15:42:06 +00001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 * Copyright 2020-present Open Networking Foundation
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00004 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +00005 * 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
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +00008 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +00009 * http://www.apache.org/licenses/LICENSE-2.0
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +000010 *
Holger Hildebrandtfa074992020-03-27 15:42:06 +000011 * 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. Bainbridged80007b2021-04-12 12:22:29 +000017/*
Holger Hildebrandtfa074992020-03-27 15:42:06 +000018 * 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// Dot1XConfigurationProfileClassID is the 16-bit ID for the OMCI
29// Managed entity Dot1X configuration profile
mpagenko836a1fd2021-11-01 16:12:42 +000030const Dot1XConfigurationProfileClassID = ClassID(291) // 0x0123
Holger Hildebrandtfa074992020-03-27 15:42:06 +000031
32var dot1xconfigurationprofileBME *ManagedEntityDefinition
33
mpagenko836a1fd2021-11-01 16:12:42 +000034// Dot1XConfigurationProfile (Class ID: #291 / 0x0123)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000035// 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
mpagenko836a1fd2021-11-01 16:12:42 +000044// 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)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000046//
47// Circuit Id Prefix
mpagenko836a1fd2021-11-01 16:12:42 +000048// 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)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000052//
53// Fallback Policy
mpagenko836a1fd2021-11-01 16:12:42 +000054// 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)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000058//
59// Auth Server 1
mpagenko836a1fd2021-11-01 16:12:42 +000060// 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)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000063//
64// Shared Secret Auth1
mpagenko836a1fd2021-11-01 16:12:42 +000065// 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:
Holger Hildebrandtfa074992020-03-27 15:42:06 +000069//
70// Auth Server 2
mpagenko836a1fd2021-11-01 16:12:42 +000071// (R,-W) (optional) (2-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000072//
73// Shared Secret Auth2
mpagenko836a1fd2021-11-01 16:12:42 +000074// (R,-W) (optional) (25-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000075//
76// Auth Server 3
mpagenko836a1fd2021-11-01 16:12:42 +000077// (R,-W) (optional) (2-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000078//
79// Shared Secret Auth3
mpagenko836a1fd2021-11-01 16:12:42 +000080// (R,-W) (optional) (25-bytes)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000081//
82// Olt Proxy Address
mpagenko836a1fd2021-11-01 16:12:42 +000083// 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)
Holger Hildebrandtfa074992020-03-27 15:42:06 +000086//
87// Calling Station Id Format
mpagenko836a1fd2021-11-01 16:12:42 +000088// 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//
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000106// Other values are reserved.
107//
108type Dot1XConfigurationProfile struct {
109 ManagedEntityDefinition
110 Attributes AttributeValueMap
111}
112
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000113// Attribute name constants
114
115const Dot1XConfigurationProfile_CircuitIdPrefix = "CircuitIdPrefix"
116const Dot1XConfigurationProfile_FallbackPolicy = "FallbackPolicy"
117const Dot1XConfigurationProfile_AuthServer1 = "AuthServer1"
118const Dot1XConfigurationProfile_SharedSecretAuth1 = "SharedSecretAuth1"
119const Dot1XConfigurationProfile_AuthServer2 = "AuthServer2"
120const Dot1XConfigurationProfile_SharedSecretAuth2 = "SharedSecretAuth2"
121const Dot1XConfigurationProfile_AuthServer3 = "AuthServer3"
122const Dot1XConfigurationProfile_SharedSecretAuth3 = "SharedSecretAuth3"
123const Dot1XConfigurationProfile_OltProxyAddress = "OltProxyAddress"
124const Dot1XConfigurationProfile_CallingStationIdFormat = "CallingStationIdFormat"
125
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000126func init() {
127 dot1xconfigurationprofileBME = &ManagedEntityDefinition{
128 Name: "Dot1XConfigurationProfile",
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000129 ClassID: Dot1XConfigurationProfileClassID,
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000130 MessageTypes: mapset.NewSetWith(
131 Get,
132 Set,
133 ),
134 AllowedAttributeMask: 0xffc0,
135 AttributeDefinitions: AttributeDefinitionMap{
Holger Hildebrandt3ac49bd2022-02-07 17:46:43 +0000136 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
137 1: Uint16Field(Dot1XConfigurationProfile_CircuitIdPrefix, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
138 2: ByteField(Dot1XConfigurationProfile_FallbackPolicy, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2),
139 3: Uint16Field(Dot1XConfigurationProfile_AuthServer1, UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, false, false, 3),
140 4: MultiByteField(Dot1XConfigurationProfile_SharedSecretAuth1, OctetsAttributeType, 0x1000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 4),
141 5: Uint16Field(Dot1XConfigurationProfile_AuthServer2, UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, true, false, 5),
142 6: MultiByteField(Dot1XConfigurationProfile_SharedSecretAuth2, OctetsAttributeType, 0x0400, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, true, false, 6),
143 7: Uint16Field(Dot1XConfigurationProfile_AuthServer3, UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, true, false, 7),
144 8: MultiByteField(Dot1XConfigurationProfile_SharedSecretAuth3, OctetsAttributeType, 0x0100, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, true, false, 8),
145 9: Uint32Field(Dot1XConfigurationProfile_OltProxyAddress, UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, true, false, 9),
146 10: Uint16Field(Dot1XConfigurationProfile_CallingStationIdFormat, UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, Write), false, true, false, 10),
Holger Hildebrandtfa074992020-03-27 15:42:06 +0000147 },
148 Access: CreatedByOnu,
149 Support: UnknownSupport,
150 }
151}
152
153// NewDot1XConfigurationProfile (class ID 291) creates the basic
154// Managed Entity definition that is used to validate an ME of this type that
155// is received from or transmitted to the OMCC.
156func NewDot1XConfigurationProfile(params ...ParamData) (*ManagedEntity, OmciErrors) {
157 return NewManagedEntity(*dot1xconfigurationprofileBME, params...)
158}