blob: ad53d446f2df8b9f07b2b3e08c0b945b87943a7a [file] [log] [blame]
Chip Boling6e27b352020-02-14 09:10:01 -06001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
Andrea Campanella7167ebb2020-02-24 09:56:38 +01003 * Copyright 2020-present Open Networking Foundation
4
Chip Boling6e27b352020-02-14 09:10:01 -06005 * 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 Campanella7167ebb2020-02-24 09:56:38 +01008
Chip Boling6e27b352020-02-14 09:10:01 -06009 * http://www.apache.org/licenses/LICENSE-2.0
Andrea Campanella7167ebb2020-02-24 09:56:38 +010010
Chip Boling6e27b352020-02-14 09:10:01 -060011 * 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. Bainbridgeadf422d2021-04-09 16:06:41 +000017/*
Chip Boling6e27b352020-02-14 09:10:01 -060018 * 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
Chip Boling610117d2021-09-09 11:24:34 -050030const Dot1XConfigurationProfileClassID = ClassID(291) // 0x0123
Chip Boling6e27b352020-02-14 09:10:01 -060031
32var dot1xconfigurationprofileBME *ManagedEntityDefinition
33
Chip Boling610117d2021-09-09 11:24:34 -050034// Dot1XConfigurationProfile (Class ID: #291 / 0x0123)
Chip Boling6e27b352020-02-14 09:10:01 -060035// 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 Boling610117d2021-09-09 11:24:34 -050044// 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 Boling6e27b352020-02-14 09:10:01 -060046//
47// Circuit Id Prefix
Chip Boling610117d2021-09-09 11:24:34 -050048// 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 Boling6e27b352020-02-14 09:10:01 -060052//
53// Fallback Policy
Chip Boling610117d2021-09-09 11:24:34 -050054// 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 Boling6e27b352020-02-14 09:10:01 -060058//
59// Auth Server 1
Chip Boling610117d2021-09-09 11:24:34 -050060// 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 Boling6e27b352020-02-14 09:10:01 -060063//
64// Shared Secret Auth1
Chip Boling610117d2021-09-09 11:24:34 -050065// 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 Boling6e27b352020-02-14 09:10:01 -060069//
70// Auth Server 2
Chip Boling610117d2021-09-09 11:24:34 -050071// (R,-W) (optional) (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060072//
73// Shared Secret Auth2
Chip Boling610117d2021-09-09 11:24:34 -050074// (R,-W) (optional) (25-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060075//
76// Auth Server 3
Chip Boling610117d2021-09-09 11:24:34 -050077// (R,-W) (optional) (2-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060078//
79// Shared Secret Auth3
Chip Boling610117d2021-09-09 11:24:34 -050080// (R,-W) (optional) (25-bytes)
Chip Boling6e27b352020-02-14 09:10:01 -060081//
82// Olt Proxy Address
Chip Boling610117d2021-09-09 11:24:34 -050083// 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 Boling6e27b352020-02-14 09:10:01 -060086//
87// Calling Station Id Format
Chip Boling610117d2021-09-09 11:24:34 -050088// 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 Boling6e27b352020-02-14 09:10:01 -0600106// Other values are reserved.
107//
108type Dot1XConfigurationProfile struct {
109 ManagedEntityDefinition
110 Attributes AttributeValueMap
111}
112
113func 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.
143func NewDot1XConfigurationProfile(params ...ParamData) (*ManagedEntity, OmciErrors) {
144 return NewManagedEntity(*dot1xconfigurationprofileBME, params...)
145}