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