blob: 2516f2ace0cce915584782cce55500930d003208 [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
Elia Battiston9bfe1102022-02-03 10:38:03 +01004 *
Matteo Scandolof9d43412021-01-12 11:11:34 -08005 * 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
Elia Battiston9bfe1102022-02-03 10:38:03 +01008 *
Matteo Scandolof9d43412021-01-12 11:11:34 -08009 * http://www.apache.org/licenses/LICENSE-2.0
Elia Battiston9bfe1102022-02-03 10:38:03 +010010 *
Matteo Scandolof9d43412021-01-12 11:11:34 -080011 * 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 */
Girish Gowdra161d27a2021-05-05 12:01:44 -070017/*
Matteo Scandolof9d43412021-01-12 11:11:34 -080018 * 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// MacBridgePortFilterPreAssignTableClassID is the 16-bit ID for the OMCI
29// Managed entity MAC bridge port filter pre-assign table
Andrea Campanella10426e22021-10-15 17:58:04 +020030const MacBridgePortFilterPreAssignTableClassID = ClassID(79) // 0x004f
Matteo Scandolof9d43412021-01-12 11:11:34 -080031
32var macbridgeportfilterpreassigntableBME *ManagedEntityDefinition
33
Andrea Campanella10426e22021-10-15 17:58:04 +020034// MacBridgePortFilterPreAssignTable (Class ID: #79 / 0x004f)
Matteo Scandolof9d43412021-01-12 11:11:34 -080035// This ME provides an alternate approach to DA filtering from that supported through the MAC
36// bridge port filter table data ME. This alternate approach is useful when all groups of addresses
37// are stored beforehand in the ONU, and the MAC bridge port filter pre-assign table ME designates
38// which groups are valid or invalid for filtering. On a circuit pack in which all groups of
39// addresses are pre-assigned and stored locally, the ONU creates or deletes an instance of this ME
40// automatically upon creation or deletion of a MAC bridge port configuration data ME.
41//
42// Relationships
43// An instance of this ME is associated with an instance of a MAC bridge port configuration data
44// ME.
45//
46// Attributes
47// Managed Entity Id
Andrea Campanella10426e22021-10-15 17:58:04 +020048// The following 10 attributes have similar definitions. Each permits the OLT to specify whether
49// MAC DAs or Ethertypes of the named type are forwarded (0) or filtered (1). In each case, the
50// initial value of the attribute is 0.
51//
52// This attribute uniquely identifies each instance of this ME. Through an identical ID, this ME is
53// implicitly linked to an instance of the MAC bridge port configuration data ME. (R) (mandatory)
54// (2-bytes)
Matteo Scandolof9d43412021-01-12 11:11:34 -080055//
56// Ipv4 Multicast Filtering
Andrea Campanella10426e22021-10-15 17:58:04 +020057// (R,-W) (mandatory) (1-byte)
Matteo Scandolof9d43412021-01-12 11:11:34 -080058//
59// Ipv6 Multicast Filtering
Andrea Campanella10426e22021-10-15 17:58:04 +020060// (R,-W) (mandatory) (1-byte)
Matteo Scandolof9d43412021-01-12 11:11:34 -080061//
62// Ipv4 Broadcast Filtering
Andrea Campanella10426e22021-10-15 17:58:04 +020063// (R,-W) (mandatory) (1-byte)
Matteo Scandolof9d43412021-01-12 11:11:34 -080064//
65// Rarp Filtering
Andrea Campanella10426e22021-10-15 17:58:04 +020066// (R,-W) (mandatory) (1-byte)
Matteo Scandolof9d43412021-01-12 11:11:34 -080067//
68// Ipx Filtering
Andrea Campanella10426e22021-10-15 17:58:04 +020069// (R,-W) (mandatory) (1-byte)
Matteo Scandolof9d43412021-01-12 11:11:34 -080070//
71// Netbeui Filtering
Andrea Campanella10426e22021-10-15 17:58:04 +020072// (R,-W) (mandatory) (1-byte)
Matteo Scandolof9d43412021-01-12 11:11:34 -080073//
74// Appletalk Filtering
Andrea Campanella10426e22021-10-15 17:58:04 +020075// (R,-W) (mandatory) (1-byte)
Matteo Scandolof9d43412021-01-12 11:11:34 -080076//
77// Bridge Management Information Filtering
Andrea Campanella10426e22021-10-15 17:58:04 +020078// (R,-W) (mandatory) (1-byte)
79//
80// Note that some destination MAC addresses should never be forwarded, considering the following
81// rules of [IEEE 802.1D].
82//
83// 1 Addresses from 01.80.C2.00.00.00 to 01.80.C2.00.00.0F are reserved.
84//
Matteo Scandolof9d43412021-01-12 11:11:34 -080085// 2 Addresses from 01.80.C2.00.00.20 to 01.80.C2.00.00.2F are used for generic attribute
86// registration protocol (GARP) applications.
87//
88// Arp Filtering
Andrea Campanella10426e22021-10-15 17:58:04 +020089// (R,-W) (mandatory) (1-byte)
Matteo Scandolof9d43412021-01-12 11:11:34 -080090//
91// Point_To_Point Protocol Over Ethernet Pppoe Broadcast Filtering
92// Point-to-point protocol over Ethernet (PPPoE) broadcast filtering: (R,-W) (mandatory) (1-byte)
93//
94type MacBridgePortFilterPreAssignTable struct {
95 ManagedEntityDefinition
96 Attributes AttributeValueMap
97}
98
Elia Battiston9bfe1102022-02-03 10:38:03 +010099// Attribute name constants
100
101const MacBridgePortFilterPreAssignTable_Ipv4MulticastFiltering = "Ipv4MulticastFiltering"
102const MacBridgePortFilterPreAssignTable_Ipv6MulticastFiltering = "Ipv6MulticastFiltering"
103const MacBridgePortFilterPreAssignTable_Ipv4BroadcastFiltering = "Ipv4BroadcastFiltering"
104const MacBridgePortFilterPreAssignTable_RarpFiltering = "RarpFiltering"
105const MacBridgePortFilterPreAssignTable_IpxFiltering = "IpxFiltering"
106const MacBridgePortFilterPreAssignTable_NetbeuiFiltering = "NetbeuiFiltering"
107const MacBridgePortFilterPreAssignTable_AppletalkFiltering = "AppletalkFiltering"
108const MacBridgePortFilterPreAssignTable_BridgeManagementInformationFiltering = "BridgeManagementInformationFiltering"
109const MacBridgePortFilterPreAssignTable_ArpFiltering = "ArpFiltering"
110const MacBridgePortFilterPreAssignTable_PointToPointProtocolOverEthernetPppoeBroadcastFiltering = "PointToPointProtocolOverEthernetPppoeBroadcastFiltering"
111
Matteo Scandolof9d43412021-01-12 11:11:34 -0800112func init() {
113 macbridgeportfilterpreassigntableBME = &ManagedEntityDefinition{
114 Name: "MacBridgePortFilterPreAssignTable",
Elia Battiston9bfe1102022-02-03 10:38:03 +0100115 ClassID: MacBridgePortFilterPreAssignTableClassID,
Matteo Scandolof9d43412021-01-12 11:11:34 -0800116 MessageTypes: mapset.NewSetWith(
117 Get,
118 Set,
119 ),
120 AllowedAttributeMask: 0xffc0,
121 AttributeDefinitions: AttributeDefinitionMap{
Elia Battiston9bfe1102022-02-03 10:38:03 +0100122 0: Uint16Field(ManagedEntityID, PointerAttributeType, 0x0000, 0, mapset.NewSetWith(Read), false, false, false, 0),
123 1: ByteField(MacBridgePortFilterPreAssignTable_Ipv4MulticastFiltering, UnsignedIntegerAttributeType, 0x8000, 0, mapset.NewSetWith(Read, Write), false, false, false, 1),
124 2: ByteField(MacBridgePortFilterPreAssignTable_Ipv6MulticastFiltering, UnsignedIntegerAttributeType, 0x4000, 0, mapset.NewSetWith(Read, Write), false, false, false, 2),
125 3: ByteField(MacBridgePortFilterPreAssignTable_Ipv4BroadcastFiltering, UnsignedIntegerAttributeType, 0x2000, 0, mapset.NewSetWith(Read, Write), false, false, false, 3),
126 4: ByteField(MacBridgePortFilterPreAssignTable_RarpFiltering, UnsignedIntegerAttributeType, 0x1000, 0, mapset.NewSetWith(Read, Write), false, false, false, 4),
127 5: ByteField(MacBridgePortFilterPreAssignTable_IpxFiltering, UnsignedIntegerAttributeType, 0x0800, 0, mapset.NewSetWith(Read, Write), false, false, false, 5),
128 6: ByteField(MacBridgePortFilterPreAssignTable_NetbeuiFiltering, UnsignedIntegerAttributeType, 0x0400, 0, mapset.NewSetWith(Read, Write), false, false, false, 6),
129 7: ByteField(MacBridgePortFilterPreAssignTable_AppletalkFiltering, UnsignedIntegerAttributeType, 0x0200, 0, mapset.NewSetWith(Read, Write), false, false, false, 7),
130 8: ByteField(MacBridgePortFilterPreAssignTable_BridgeManagementInformationFiltering, UnsignedIntegerAttributeType, 0x0100, 0, mapset.NewSetWith(Read, Write), false, false, false, 8),
131 9: ByteField(MacBridgePortFilterPreAssignTable_ArpFiltering, UnsignedIntegerAttributeType, 0x0080, 0, mapset.NewSetWith(Read, Write), false, false, false, 9),
132 10: ByteField(MacBridgePortFilterPreAssignTable_PointToPointProtocolOverEthernetPppoeBroadcastFiltering, UnsignedIntegerAttributeType, 0x0040, 0, mapset.NewSetWith(Read, Write), false, false, false, 10),
Matteo Scandolof9d43412021-01-12 11:11:34 -0800133 },
134 Access: CreatedByOnu,
135 Support: UnknownSupport,
136 }
137}
138
139// NewMacBridgePortFilterPreAssignTable (class ID 79) creates the basic
140// Managed Entity definition that is used to validate an ME of this type that
141// is received from or transmitted to the OMCC.
142func NewMacBridgePortFilterPreAssignTable(params ...ParamData) (*ManagedEntity, OmciErrors) {
143 return NewManagedEntity(*macbridgeportfilterpreassigntableBME, params...)
144}