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