blob: bb41523516608aa6724213080333ed956df1b853 [file] [log] [blame]
Matteo Scandolof9d43412021-01-12 11:11:34 -08001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 * Copyright 2020-present Open Networking Foundation
Elia Battiston9bfe1102022-02-03 10:38:03 +01004 *
Matteo Scandolof9d43412021-01-12 11:11:34 -08005 * 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
Elia Battiston9bfe1102022-02-03 10:38:03 +01008 *
Matteo Scandolof9d43412021-01-12 11:11:34 -08009 * http://www.apache.org/licenses/LICENSE-2.0
Elia Battiston9bfe1102022-02-03 10:38:03 +010010 *
Matteo Scandolof9d43412021-01-12 11:11:34 -080011 * 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 */
Girish Gowdra161d27a2021-05-05 12:01:44 -070017/*
Matteo Scandolof9d43412021-01-12 11:11:34 -080018 * 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
Andrea Campanella10426e22021-10-15 17:58:04 +020030const Dot1XConfigurationProfileClassID = ClassID(291) // 0x0123
Matteo Scandolof9d43412021-01-12 11:11:34 -080031
32var dot1xconfigurationprofileBME *ManagedEntityDefinition
33
Andrea Campanella10426e22021-10-15 17:58:04 +020034// Dot1XConfigurationProfile (Class ID: #291 / 0x0123)
Matteo Scandolof9d43412021-01-12 11:11:34 -080035// 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
Andrea Campanella10426e22021-10-15 17:58:04 +020044// 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)
Matteo Scandolof9d43412021-01-12 11:11:34 -080046//
47// Circuit Id Prefix
Andrea Campanella10426e22021-10-15 17:58:04 +020048// 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)
Matteo Scandolof9d43412021-01-12 11:11:34 -080052//
53// Fallback Policy
Andrea Campanella10426e22021-10-15 17:58:04 +020054// 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)
Matteo Scandolof9d43412021-01-12 11:11:34 -080058//
59// Auth Server 1
Andrea Campanella10426e22021-10-15 17:58:04 +020060// 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)
Matteo Scandolof9d43412021-01-12 11:11:34 -080063//
64// Shared Secret Auth1
Andrea Campanella10426e22021-10-15 17:58:04 +020065// 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:
Matteo Scandolof9d43412021-01-12 11:11:34 -080069//
70// Auth Server 2
Andrea Campanella10426e22021-10-15 17:58:04 +020071// (R,-W) (optional) (2-bytes)
Matteo Scandolof9d43412021-01-12 11:11:34 -080072//
73// Shared Secret Auth2
Andrea Campanella10426e22021-10-15 17:58:04 +020074// (R,-W) (optional) (25-bytes)
Matteo Scandolof9d43412021-01-12 11:11:34 -080075//
76// Auth Server 3
Andrea Campanella10426e22021-10-15 17:58:04 +020077// (R,-W) (optional) (2-bytes)
Matteo Scandolof9d43412021-01-12 11:11:34 -080078//
79// Shared Secret Auth3
Andrea Campanella10426e22021-10-15 17:58:04 +020080// (R,-W) (optional) (25-bytes)
Matteo Scandolof9d43412021-01-12 11:11:34 -080081//
82// Olt Proxy Address
Andrea Campanella10426e22021-10-15 17:58:04 +020083// 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)
Matteo Scandolof9d43412021-01-12 11:11:34 -080086//
87// Calling Station Id Format
Andrea Campanella10426e22021-10-15 17:58:04 +020088// 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//
Matteo Scandolof9d43412021-01-12 11:11:34 -0800106// Other values are reserved.
107//
108type Dot1XConfigurationProfile struct {
109 ManagedEntityDefinition
110 Attributes AttributeValueMap
111}
112
Elia Battiston9bfe1102022-02-03 10:38:03 +0100113// 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
Matteo Scandolof9d43412021-01-12 11:11:34 -0800126func init() {
127 dot1xconfigurationprofileBME = &ManagedEntityDefinition{
128 Name: "Dot1XConfigurationProfile",
Elia Battiston9bfe1102022-02-03 10:38:03 +0100129 ClassID: Dot1XConfigurationProfileClassID,
Matteo Scandolof9d43412021-01-12 11:11:34 -0800130 MessageTypes: mapset.NewSetWith(
131 Get,
132 Set,
133 ),
134 AllowedAttributeMask: 0xffc0,
135 AttributeDefinitions: AttributeDefinitionMap{
Elia Battiston9bfe1102022-02-03 10:38:03 +0100136 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),
Matteo Scandolof9d43412021-01-12 11:11:34 -0800147 },
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}