blob: 9db72840de41d032bb9b902254a48aceabd72737 [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
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// 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
235func init() {
236 multicastoperationsprofileBME = &ManagedEntityDefinition{
237 Name: "MulticastOperationsProfile",
238 ClassID: 309,
239 MessageTypes: mapset.NewSetWith(
240 Create,
241 Delete,
242 Get,
243 GetNext,
244 Set,
245 SetTable,
246 ),
247 AllowedAttributeMask: 0xffff,
248 AttributeDefinitions: AttributeDefinitionMap{
249 0: Uint16Field("ManagedEntityId", PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read, SetByCreate), false, false, false, 0),
250 1: ByteField("IgmpVersion", EnumerationAttributeType, 0x8000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 1),
251 2: ByteField("IgmpFunction", EnumerationAttributeType, 0x4000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 2),
252 3: ByteField("ImmediateLeave", EnumerationAttributeType, 0x2000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, false, false, 3),
253 4: Uint16Field("UpstreamIgmpTci", UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 4),
254 5: ByteField("UpstreamIgmpTagControl", UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 5),
255 6: Uint32Field("UpstreamIgmpRate", UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 6),
256 7: TableField("DynamicAccessControlListTable", TableAttributeType, 0x0200, TableInfo{nil, 24}, mapset.NewSetWith(Read, Write), false, false, false, 7),
257 8: TableField("StaticAccessControlListTable", TableAttributeType, 0x0100, TableInfo{nil, 24}, mapset.NewSetWith(Read, Write), false, false, false, 8),
258 9: TableField("LostGroupsListTable", TableAttributeType, 0x0080, TableInfo{nil, 10}, mapset.NewSetWith(Read), false, true, false, 9),
259 10: ByteField("Robustness", UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 10),
260 11: Uint32Field("QuerierIpAddress", UnsignedIntegerAttributeType, 0x0020, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 11),
261 12: Uint32Field("QueryInterval", UnsignedIntegerAttributeType, 0x0010, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 12),
262 13: Uint32Field("QueryMaxResponseTime", UnsignedIntegerAttributeType, 0x0008, 0, mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 13),
263 14: Uint32Field("LastMemberQueryInterval", UnsignedIntegerAttributeType, 0x0004, 0, mapset.NewSetWith(Read, Write), false, true, false, 14),
264 15: ByteField("UnauthorizedJoinRequestBehaviour", UnsignedIntegerAttributeType, 0x0002, 0, mapset.NewSetWith(Read, Write), false, true, false, 15),
265 16: MultiByteField("DownstreamIgmpAndMulticastTci", OctetsAttributeType, 0x0001, 3, toOctets("AAAA"), mapset.NewSetWith(Read, SetByCreate, Write), false, true, false, 16),
266 },
267 Access: CreatedByOlt,
268 Support: UnknownSupport,
269 Alarms: AlarmMap{
270 0: "Lost multicast group",
271 },
272 }
273}
274
275// NewMulticastOperationsProfile (class ID 309) creates the basic
276// Managed Entity definition that is used to validate an ME of this type that
277// is received from or transmitted to the OMCC.
278func NewMulticastOperationsProfile(params ...ParamData) (*ManagedEntity, OmciErrors) {
279 return NewManagedEntity(*multicastoperationsprofileBME, params...)
280}