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