blob: 96ca750bb75939e7ab82befe4d3f8f273b8fa64c [file] [log] [blame]
Chip Boling6e27b352020-02-14 09:10:01 -06001/*
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
21package generated
22
23import "github.com/deckarep/golang-set"
24
25// IpHostConfigDataClassID is the 16-bit ID for the OMCI
26// Managed entity IP host config data
27const IpHostConfigDataClassID ClassID = ClassID(134)
28
29var iphostconfigdataBME *ManagedEntityDefinition
30
31// IpHostConfigData (class ID #134)
32// The IP host config data configures IPv4 based services offered on the ONU. The ONU automatically
33// creates instances of this ME if IP host services are available. A possible IPv6 stack is
34// supported through the IPv6 host config data ME. In this clause, references to IP addresses are
35// understood to mean IPv4.
36//
37// Relationships
38// An instance of this ME is associated with the ONU ME. Any number of TCP/UDP config data MEs can
39// point to the IP host config data, to model any number of ports and protocols. Performance may be
40// monitored through an implicitly linked IP host PM history data ME.
41//
42// Attributes
43// Managed Entity Id
44// Managed entity ID: This attribute uniquely identifies each instance of this ME. The ONU creates
45// as many instances as there are independent IPv4 stacks on the ONU. To facilitate discovery, IP
46// host config data MEs should be numbered from 0 upwards. The ONU should create IP(v4) and IPv6
47// host config data MEs with separate ME IDs, such that other MEs can use a single TP type
48// attribute to link with either. (R) (mandatory) (2 bytes)
49//
50// Ip Options
51// (R,-W) (mandatory) (1-byte)
52//
53// Mac Address
54// MAC address: This attribute indicates the MAC address used by the IP node. (R) (mandatory)
55// (6-bytes)
56//
57// Onu Identifier
58// Onu identifier: A unique ONU identifier string. If set to a non-null value, this string is used
59// instead of the MAC address in retrieving dynamic host configuration protocol (DHCP) parameters.
60// If the string is shorter than 25 characters, it must be null terminated. Its default value is 25
61// null bytes. (R,-W) (mandatory) (25-bytes)
62//
63// Ip Address
64// IP address: The address used for IP host services; this attribute has the default value 0.
65// (R,-W) (mandatory) (4-bytes)
66//
67// Mask
68// Mask: The subnet mask for IP host services; this attribute has the default value 0. (R,-W)
69// (mandatory) (4-bytes)
70//
71// Gateway
72// Gateway: The default gateway address used for IP host services; this attribute has the default
73// value 0. (R,-W) (mandatory) (4-bytes)
74//
75// Primary Dns
76// Primary DNS: The address of the primary DNS server; this attribute has the default value 0.
77// (R,-W) (mandatory) (4-bytes)
78//
79// Secondary Dns
80// Secondary DNS: The address of the secondary DNS server; this attribute has the default value 0.
81// (R,-W) (mandatory) (4-bytes)
82//
83// Current Address
84// Current address: Current address of the IP host service. (R) (optional) (4-bytes)
85//
86// Current Mask
87// Current mask: Current subnet mask for the IP host service. (R) (optional) (4-bytes)
88//
89// Current Gateway
90// Current gateway: Current default gateway address for the IP host service. (R) (optional)
91// (4-bytes)
92//
93// Current Primary Dns
94// Current primary DNS: Current primary DNS server address. (R) (optional) (4-bytes)
95//
96// Current Secondary Dns
97// Current secondary DNS: Current secondary DNS server address. (R) (optional) (4-bytes)
98//
99// Domain Name
100// Domain name: If DHCP indicates a domain name, it is presented here. If no domain name is
101// indicated, this attribute is set to a null string. If the string is shorter than 25-bytes, it
102// must be null terminated. The default value is 25 null bytes. (R) (mandatory) (25-bytes)
103//
104// Host Name
105// Host name: If DHCP indicates a host name, it is presented here. If no host name is indicated,
106// this attribute is set to a null string. If the string is shorter than 25-bytes, it must be null
107// terminated. The default value is 25 null bytes. (R) (mandatory) (25-bytes)
108//
109// Relay Agent Options
110// 2/3/4:atm/123.4567
111//
112type IpHostConfigData struct {
113 ManagedEntityDefinition
114 Attributes AttributeValueMap
115}
116
117func init() {
118 iphostconfigdataBME = &ManagedEntityDefinition{
119 Name: "IpHostConfigData",
120 ClassID: 134,
121 MessageTypes: mapset.NewSetWith(
122 Get,
123 Set,
124 ),
125 AllowedAttributeMask: 0xffff,
126 AttributeDefinitions: AttributeDefinitionMap{
127 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
128 1: ByteField("IpOptions", UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
129 2: MultiByteField("MacAddress", OctetsAttributeType, 0x4000, 6, toOctets("AAAAAAAA"), mapset.NewSetWith(Read), false, false, false, 2),
130 3: MultiByteField("OnuIdentifier", OctetsAttributeType, 0x2000, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read, Write), false, false, false, 3),
131 4: Uint32Field("IpAddress", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, false, false, 4),
132 5: Uint32Field("Mask", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
133 6: Uint32Field("Gateway", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, false, false, 6),
134 7: Uint32Field("PrimaryDns", UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, false, false, 7),
135 8: Uint32Field("SecondaryDns", UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, false, false, 8),
136 9: Uint32Field("CurrentAddress", UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read), true, true, false, 9),
137 10: Uint32Field("CurrentMask", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read), true, true, false, 10),
138 11: Uint32Field("CurrentGateway", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read), true, true, false, 11),
139 12: Uint32Field("CurrentPrimaryDns", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read), true, true, false, 12),
140 13: Uint32Field("CurrentSecondaryDns", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read), true, true, false, 13),
141 14: MultiByteField("DomainName", OctetsAttributeType, 0x0004, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), true, false, false, 14),
142 15: MultiByteField("HostName", OctetsAttributeType, 0x0002, 25, toOctets("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=="), mapset.NewSetWith(Read), true, false, false, 15),
143 16: Uint16Field("RelayAgentOptions", UnsignedIntegerAttributeType, 0x0001, 0, mapset.NewSetWith(Read, Write), true, true, false, 16),
144 },
145 Access: CreatedByOnu,
146 Support: UnknownSupport,
147 }
148}
149
150// NewIpHostConfigData (class ID 134) creates the basic
151// Managed Entity definition that is used to validate an ME of this type that
152// is received from or transmitted to the OMCC.
153func NewIpHostConfigData(params ...ParamData) (*ManagedEntity, OmciErrors) {
154 return NewManagedEntity(*iphostconfigdataBME, params...)
155}