blob: d00bd7b937e34966105f90998d5889c0e60effc1 [file] [log] [blame]
Chip Boling610117d2021-09-09 11:24:34 -05001/*
2 * Copyright (c) 2018 - present. Boling Consulting Solutions (bcsw.net)
3 * Copyright 2020-present Open Networking Foundation
Chip Boling8cdd6392022-01-27 08:43:37 -06004 *
Chip Boling610117d2021-09-09 11:24:34 -05005 * 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
Chip Boling8cdd6392022-01-27 08:43:37 -06008 *
Chip Boling610117d2021-09-09 11:24:34 -05009 * http://www.apache.org/licenses/LICENSE-2.0
Chip Boling8cdd6392022-01-27 08:43:37 -060010 *
Chip Boling610117d2021-09-09 11:24:34 -050011 * 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// MulticastOperationsProfileClassID is the 16-bit ID for the OMCI
29// Managed entity Multicast operations profile
30const MulticastOperationsProfileClassID = ClassID(309) // 0x0135
31
32var multicastoperationsprofileBME *ManagedEntityDefinition
33
34// MulticastOperationsProfile (Class ID: #309 / 0x0135)
35// This ME expresses multicast policy. A multi-dwelling unit ONU may have several such policies,
36// which are linked to subscribers as required. Some of the attributes configure IGMP snooping and
37// proxy parameters if the defaults do not suffice, as described in [IETF-RFC-2236], [IETF-RFC
38// 3376], [IETF RFC 3810] and [IETF RFC 5519]. Instances of this ME are created and deleted by the
39// OLT.
40//
41// Relationships
42// An instance of this ME may be associated with zero or more instances of the multicast subscriber
43// config info ME.
44//
45// Attributes
46// Managed Entity Id
47// This attribute uniquely identifies each instance of this ME. The values 0 and 0xFFFF are
48// reserved. (R, setbycreate) (mandatory) (2-bytes)
49//
50// Igmp Version
51// This attribute specifies the version of IGMP to be supported. Support of a given version implies
52// compatible support of previous versions. If the ONU cannot support the version requested, it
53// should deny an attempt to set the attribute. (R,W, set-by-create) (mandatory) (1 byte)
54//
55// 1 IGMP version 1 (deprecated)
56//
57// 2 IGMP version 2
58//
59// 3 IGMP version 3
60//
61// 16 MLD version 1
62//
63// 17 MLD version 2
64//
65// Other values are reserved.
66//
67// Igmp Function
68// This attribute enables an IGMP function. The value 0 specifies transparent IGMP snooping only.
69// The value 1 specifies snooping with proxy reporting (SPR); the value 2 specifies IGMP proxy. The
70// function must be consistent with the capabilities specified by the other IGMP configuration
71// attributes. (R,W, setbycreate) (mandatory) (1-byte)
72//
73// Immediate Leave
74// This Boolean attribute controls the immediate leave function. The value false disables immediate
75// leave; true enables immediate leave. (R,W, setbycreate) (mandatory) (1-byte)
76//
77// Upstream Igmp Tci
78// Under control of the upstream IGMP tag control attribute, the upstream IGMP TCI attribute
79// defines a VLAN ID and P-bits to add to upstream IGMP messages. (R,-W, setbycreate) (optional)
80// (2-bytes)
81//
82// Upstream Igmp Tag Control
83// 2 Replace the entire TCI (VLAN ID plus P bits) on upstream IGMP/MLD traffic. The new tag is
84// specified by the upstream IGMP/MLD TCI attribute. If the received IGMP/MLD traffic is untagged,
85// an add operation is performed.
86//
87// 3 Replace only the VLAN ID on upstream IGMP/MLD traffic, retaining the original DEI and P bits.
88// The new VLAN ID is specified by the VLAN ID field of the upstream IGMP TCI attribute. If the
89// received IGMP/MLD traffic is untagged, an add operation is performed, with DEI and P bits also
90// taken from the upstream IGMP TCI attribute.
91//
92// Other values are reserved.
93//
94// This attribute controls the upstream IGMP TCI attribute. If this attribute is non-zero, a
95// possible extended VLAN tagging operation ME is ignored for upstream frames containing IGMP/MLD
96// packets. (R,-W, setbycreate) (optional) (1-byte)
97//
98// Value Meaning
99//
100// 0 Pass upstream IGMP/MLD traffic transparently, neither adding, stripping nor modifying tags
101// that may be present.
102//
103// 1 Add a VLAN tag (including P bits) to upstream IGMP/MLD traffic. The tag is specified by the
104// upstream IGMP TCI attribute.
105//
106// Upstream Igmp Rate
107// This attribute limits the maximum rate of upstream IGMP traffic. Traffic in excess of this limit
108// is silently discarded. The attribute value is specified in messages/second. The recommended
109// default value 0 imposes no rate limit on this traffic. (R,-W, setbycreate) (optional) (4-bytes)
110//
111// Dynamic Access Control List Table
112// This attribute is a list that specifies one or more multicast group address ranges. Each row in
113// the list comprises up to three row parts, where each row part is 24-bytes long. Each entry must
114// include row part 0. The ONU may also support row parts 1-2, thus allowing the table to contain
115// logical rows that exceed the 24-byte definition of row part 0.
116//
117// Static Access Control List Table
118// This attribute is a list that specifies one or more multicast group address ranges. Groups
119// defined in this list are multicast on the associated UNI(s) unconditionally, i.e., without the
120// need for an IGMP join. The bandwidth of static multicast groups is not included in the current
121// multicast bandwidth measurement maintained by the multicast subscriber monitor ME. If a join
122// message is always expected, this table may be empty. Table entries have the same format as those
123// in the dynamic access control list table. The preview fields are not meaningful. (R,-W)
124// (mandatory) (each row part: 24 bytes)
125//
126// Lost Groups List Table
127// This attribute is a list of groups from the dynamic access control list table for which there is
128// an active join, but no downstream flow is present, possibly because of source failure, but also
129// possibly because of misconfiguration somewhere upstream. Be aware of possible ambiguity between
130// overlapping service providers and IPv4/IPv6 addresses. After a join, the ONU should wait a
131// reasonable time for upstream processing before declaring a group to be lost. Each entry is a
132// vector of the following components:
133//
134// - VLAN ID, 0 if not used (2-bytes)
135//
136// - Source IP address, 0.0.0.0 if not used. In IPv6, this field captures only the four least
137// significant bytes. (4-bytes)
138//
139// - Multicast destination IP address. In IPv6, this field captures only the four least significant
140// bytes. (4-bytes)
141//
142// (R) (optional) (10N bytes)
143//
144// Robustness
145// This attribute allows tuning for possible packet loss in the network. The recommended default
146// value 0 causes the ONU to follow [IETF RFC 3376] to copy the robustness value from query
147// messages originating further upstream. (R,-W, setbycreate) (optional) (1-byte)
148//
149// Querier Ip Address
150// This attribute specifies the IP address to be used by a proxy querier. Although it is not a
151// legitimate IP address, the recommended default value 0.0.0.0 is legal in this case (see [b-IETF
152// RFC 4541]). (R,-W, setbycreate) (optional) (4-bytes)
153//
154// Query Interval
155// This attribute specifies the interval between general queries in seconds. The value 0 specifies
156// that the ONU uses its own default, which may or may not be the same as the recommended default
157// of 125-s. (R,-W, set-by-create) (optional) (4-bytes)
158//
159// Query Max Response Time
160// This attribute is the max response time added by the proxy into general query messages directed
161// to UNIs. It is expressed in units of 0.1-s. The value 0 specifies that the ONU uses its own
162// default, which may or may not be the same as the recommended default of 100 (10-s). (R,-W,
163// setby-create) (optional) (4-bytes)
164//
165// Last Member Query Interval
166// This attribute specifies the maximum response time inserted into group-specific queries sent to
167// UNIs in response to group leave messages. It is also the repetition rate of [robustness]
168// transmissions of the query. It is specified in units of 0.1-s, with a default of 10 (1-s).
169// (R,-W) (optional) (4-bytes)
170//
171// Unauthorized Join Request Behaviour
172// This Boolean attribute specifies the ONU's behaviour when it receives an IGMP join request for a
173// group that is not authorized in the dynamic address control list table, or an IGMPv3 membership
174// report for groups, none of which are authorized in the dynamic ACL. The default value false
175// specifies that the ONU silently discard the IGMP request; the value true specifies that the ONU
176// forwards the request upstream. The ONU does not attempt to honour the request for the
177// unauthorized group(s) in either case. (R,-W) (optional) (1-byte)
178//
179// Downstream IGMP and multicast TCI
180// This attribute controls the downstream tagging of both the IGMP/MLD and multicast frames. If the
181// first byte of this attribute is non-zero, a possible extended VLAN tagging operation ME is
182// ignored for downstream IGMP/MLD and multicast frames. (R,-W, set-by-create) (optional) (3-bytes)
183//
184// The first byte defines the control type:
185//
186// Value Meaning
187//
188// 0 Pass the downstream IGMP/MLD and multicast traffic transparently, neither stripping nor
189// modifying tags that may be present.
190//
191// 1 Strip the outer VLAN tag (including P bits) from the downstream IGMP/MLD and multicast
192// traffic.
193//
194// 2 Add a tag on to the downstream IGMP/MLD and multicast traffic. The new tag is specified by the
195// second and third bytes of this attribute.
196//
197// 3 Replace the tag on the downstream IGMP/MLD and multicast traffic. The new tag is specified by
198// the second and third bytes of this attribute.
199//
200// 4 Replace only the VLAN ID on the downstream IGMP/MLD and multicast traffic, retaining the
201// original DEI and P bits. The new VLAN ID is specified by the VLAN ID field of the second and
202// third bytes of this attribute.
203//
204// 5 Add a tag on to the downstream IGMP/MLD and multicast traffic. The new tag is specified by the
205// VID (UNI) field of the multicast service package table row of the multicast subscriber config
206// info ME that is associated with this profile. If the VID (UNI) field is unspecified (0xFFFF) or
207// specifies untagged traffic, the new tag is specified by the second and third bytes of this
208// attribute.
209//
210// 6 Replace the tag on the downstream IGMP/MLD and multicast traffic. The new tag is specified by
211// the VID (UNI) field of the multicast service package table row of the multicast subscriber
212// config info ME that is associated with this profile. If the VID (UNI) field specifies untagged
213// traffic, the outer VLAN tag (including P bits) is stripped from the downstream IGMP/MLD and
214// multicast traffic. If the value of the VID (UNI) is unspecified (0xFFFF), the new tag is
215// specified by the second and third bytes of this attribute.
216//
217// 7 Replace only the VID on the downstream IGMP/MLD and multicast traffic, retaining the original
218// DEI and P bits. The new VLAN ID is specified by the VID (UNI) field of the multicast service
219// package table row of the multicast subscriber config info ME that is associated with this
220// profile. If the VID (UNI) field specifies untagged traffic, the outer VLAN tag (including P
221// bits) is stripped from the downstream IGMP/MLD and multicast traffic. If the value of the VID
222// (UNI) is unspecified (0xFFFF), the new tag is specified by the second and third bytes of this
223// attribute.
224//
225// Other values are reserved.
226//
227// The second and third bytes define the TCI (VLAN ID and P bits) to be applied on the downstream
228// IGMP/MLD and multicast streams in case the replace or add option is selected.
229//
230type MulticastOperationsProfile struct {
231 ManagedEntityDefinition
232 Attributes AttributeValueMap
233}
234
Chip Boling8cdd6392022-01-27 08:43:37 -0600235// Attribute name constants
236
237const MulticastOperationsProfile_IgmpVersion = "IgmpVersion"
238const MulticastOperationsProfile_IgmpFunction = "IgmpFunction"
239const MulticastOperationsProfile_ImmediateLeave = "ImmediateLeave"
240const MulticastOperationsProfile_UpstreamIgmpTci = "UpstreamIgmpTci"
241const MulticastOperationsProfile_UpstreamIgmpTagControl = "UpstreamIgmpTagControl"
242const MulticastOperationsProfile_UpstreamIgmpRate = "UpstreamIgmpRate"
243const MulticastOperationsProfile_DynamicAccessControlListTable = "DynamicAccessControlListTable"
244const MulticastOperationsProfile_StaticAccessControlListTable = "StaticAccessControlListTable"
245const MulticastOperationsProfile_LostGroupsListTable = "LostGroupsListTable"
246const MulticastOperationsProfile_Robustness = "Robustness"
247const MulticastOperationsProfile_QuerierIpAddress = "QuerierIpAddress"
248const MulticastOperationsProfile_QueryInterval = "QueryInterval"
249const MulticastOperationsProfile_QueryMaxResponseTime = "QueryMaxResponseTime"
250const MulticastOperationsProfile_LastMemberQueryInterval = "LastMemberQueryInterval"
251const MulticastOperationsProfile_UnauthorizedJoinRequestBehaviour = "UnauthorizedJoinRequestBehaviour"
252const MulticastOperationsProfile_DownstreamIgmpAndMulticastTci = "DownstreamIgmpAndMulticastTci"
253
Chip Boling610117d2021-09-09 11:24:34 -0500254func init() {
255 multicastoperationsprofileBME = &ManagedEntityDefinition{
256 Name: "MulticastOperationsProfile",
Chip Boling8cdd6392022-01-27 08:43:37 -0600257 ClassID: MulticastOperationsProfileClassID,
Chip Boling610117d2021-09-09 11:24:34 -0500258 MessageTypes: mapset.NewSetWith(
259 Create,
260 Delete,
261 Get,
262 GetNext,
263 Set,
264 SetTable,
265 ),
266 AllowedAttributeMask: 0xffff,
267 AttributeDefinitions: AttributeDefinitionMap{
Chip Boling8cdd6392022-01-27 08:43:37 -0600268 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
269 1: ByteField(MulticastOperationsProfile_IgmpVersion, EnumerationAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
270 2: ByteField(MulticastOperationsProfile_IgmpFunction, EnumerationAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
271 3: ByteField(MulticastOperationsProfile_ImmediateLeave, EnumerationAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
272 4: Uint16Field(MulticastOperationsProfile_UpstreamIgmpTci, UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 4),
273 5: ByteField(MulticastOperationsProfile_UpstreamIgmpTagControl, UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 5),
274 6: Uint32Field(MulticastOperationsProfile_UpstreamIgmpRate, UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 6),
275 7: TableField(MulticastOperationsProfile_DynamicAccessControlListTable, TableAttributeType, 0x0200, TableInfo{nil, 24}, mapset.NewSetWith(Read, Write), false, false, false, 7),
276 8: TableField(MulticastOperationsProfile_StaticAccessControlListTable, TableAttributeType, 0x0100, TableInfo{nil, 24}, mapset.NewSetWith(Read, Write), false, false, false, 8),
277 9: TableField(MulticastOperationsProfile_LostGroupsListTable, TableAttributeType, 0x0080, TableInfo{nil, 10}, mapset.NewSetWith(Read), false, true, false, 9),
278 10: ByteField(MulticastOperationsProfile_Robustness, UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 10),
279 11: Uint32Field(MulticastOperationsProfile_QuerierIpAddress, UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 11),
280 12: Uint32Field(MulticastOperationsProfile_QueryInterval, UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 12),
281 13: Uint32Field(MulticastOperationsProfile_QueryMaxResponseTime, UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 13),
282 14: Uint32Field(MulticastOperationsProfile_LastMemberQueryInterval, UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, Write), false, true, false, 14),
283 15: ByteField(MulticastOperationsProfile_UnauthorizedJoinRequestBehaviour, UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read, Write), false, true, false, 15),
284 16: MultiByteField(MulticastOperationsProfile_DownstreamIgmpAndMulticastTci, OctetsAttributeType, 0x0001, 3, toOctets("AAAA"), mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 16),
Chip Boling610117d2021-09-09 11:24:34 -0500285 },
286 Access: CreatedByOlt,
287 Support: UnknownSupport,
Chip Boling610117d2021-09-09 11:24:34 -0500288 }
289}
290
291// NewMulticastOperationsProfile (class ID 309) creates the basic
292// Managed Entity definition that is used to validate an ME of this type that
293// is received from or transmitted to the OMCC.
294func NewMulticastOperationsProfile(params ...ParamData) (*ManagedEntity, OmciErrors) {
295 return NewManagedEntity(*multicastoperationsprofileBME, params...)
296}