Documentation ¶
Overview ¶
* Copyright (c) 2019 - present. Boling Consulting Solutions (bcsw.net) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *
Index ¶
- Constants
- Variables
- func NewEthernetStatistics(request *me.ManagedEntity, control *interfaces.PMControlBlock, ...) *interfaces.Statistics
- type ExtendedVlanTaggingConfig
- func (config *ExtendedVlanTaggingConfig) Get(request *me.ManagedEntity, existing *interfaces.MeDbEntry) gopacket.SerializableLayer
- func (config *ExtendedVlanTaggingConfig) RxFrame(packet gopacket.Packet, sender interface{})
- func (config *ExtendedVlanTaggingConfig) Set(request *me.ManagedEntity, existing *interfaces.MeDbEntry) gopacket.SerializableLayer
- type ReceiveVlanTaggingOperationTable
- type ReceivedFrameVlanTaggingOperationRow
- type UNI
- func (uni *UNI) AddTimers(timer *time.Timer)
- func (uni *UNI) Configuration() interface{}
- func (uni *UNI) Disable() error
- func (uni *UNI) Enable() error
- func (uni *UNI) EthernetPerformanceMonitoringHistoryDataHandler(request *me.ManagedEntity, existing *interfaces.MeDbEntry, mt omci.MessageType) gopacket.SerializableLayer
- func (uni *UNI) ID() uint
- func (uni *UNI) Input() chan<- interface{}
- func (uni *UNI) IsEnabled() bool
- func (uni *UNI) Name() string
- func (uni *UNI) Parent() interfaces.ICommon
- func (uni *UNI) PhysicalPathTerminationPointEthernetUniHandler(request *me.ManagedEntity, existing *interfaces.MeDbEntry, mt omci.MessageType) gopacket.SerializableLayer
- func (uni *UNI) RxFrame(packet gopacket.Packet, sender interface{})
- func (uni *UNI) State() fsm.State
- func (uni *UNI) StateTransitionCallback(state fsm.State) error
- func (uni *UNI) String() string
- func (uni *UNI) UniGHandler(request *me.ManagedEntity, existing *interfaces.MeDbEntry, mt omci.MessageType) gopacket.SerializableLayer
Constants ¶
const InitialState fsm.State = "initial" // State after creation of UNI
const UniDisabledState fsm.State = "disabled" // Initial state
const UniEnabledState fsm.State = "enabled" // UNI has be activated, normal state
const UniImpairedState fsm.State = "impaired" // UNI has some type of fault
Variables ¶
var EthernetPart1StatisticsNameToIndex map[string]uint
var EthernetPart2StatisticsNameToIndex map[string]uint
var EthernetPart3StatisticsNameToIndex map[string]uint
Functions ¶
func NewEthernetStatistics ¶
func NewEthernetStatistics(request *me.ManagedEntity, control *interfaces.PMControlBlock, intervalEndTime uint8) *interfaces.Statistics
Types ¶
type ExtendedVlanTaggingConfig ¶
type ExtendedVlanTaggingConfig struct { EntityID uint16 // contains filtered or unexported fields }
func NewExtendedVlanMappingConfig ¶
func NewExtendedVlanMappingConfig(onu interfaces.IOnu, request *me.ManagedEntity) (*ExtendedVlanTaggingConfig, me.OmciErrors)
func (*ExtendedVlanTaggingConfig) Get ¶
func (config *ExtendedVlanTaggingConfig) Get(request *me.ManagedEntity, existing *interfaces.MeDbEntry) gopacket.SerializableLayer
Get is responsible for parsing the attribute values to pulling the data from the MIB
func (*ExtendedVlanTaggingConfig) RxFrame ¶
func (config *ExtendedVlanTaggingConfig) RxFrame(packet gopacket.Packet, sender interface{})
RxFrame handles frame reception from the PON and is responsible for looking up a matching GEM Port to forward the packet to while updating approprate statistics
func (*ExtendedVlanTaggingConfig) Set ¶
func (config *ExtendedVlanTaggingConfig) Set(request *me.ManagedEntity, existing *interfaces.MeDbEntry) gopacket.SerializableLayer
Set is responsible for parsing the attribute values to set and after validation, updating both the cached struct and the MIB database
type ReceiveVlanTaggingOperationTable ¶
type ReceiveVlanTaggingOperationTable struct {
// contains filtered or unexported fields
}
ReceiveVlanTaggingOperationTable is used to manage the rows of the table. For each table row, the first 8 bytes of ReceiveVlanTaggingOperationTable each entry are guaranteed to be unique, and are used to identify table entries (list order, above, refers to a sort on the first 8 bytes). The OLT deletes a table entry by setting all of its last 8 bytes to 0xFF.
func DefaultReceiveVlanTaggingOperationTable ¶
func DefaultReceiveVlanTaggingOperationTable() *ReceiveVlanTaggingOperationTable
func NewReceiveVlanTaggingOperationTable ¶
func NewReceiveVlanTaggingOperationTable() *ReceiveVlanTaggingOperationTable
func (*ReceiveVlanTaggingOperationTable) Insert ¶
func (table *ReceiveVlanTaggingOperationTable) Insert(row ReceivedFrameVlanTaggingOperationRow)
type ReceivedFrameVlanTaggingOperationRow ¶
type ReceivedFrameVlanTaggingOperationRow struct { // Word 1 FilterOuterPriority uint8 // 4-bits FilterOuterVID uint16 // 13-bits FilterOuterTPID_DEI uint8 // 3-bits // Word 2 FilterInnerPriority uint8 // 4-bits FilterInnerVID uint16 // 13-bits FilterInnerTPID_DEI uint8 // 3-bits FilterEthertype uint8 // 4-bits // Word 3 TreatmentTagsToRemove uint8 // 2-bits TreatmentOuterPriority uint8 // 4-bits TreatmentOuterVID uint16 // 13-bits TreatmentOuterTPID_DEI uint8 // 3-bits // Word 4 TreatmentInnerPriority uint8 // 4-bits TreatmentInnerVID uint16 // 13-bits TreatmentInnerTPID_DEI uint8 // 3-bits }
func DefaultDownstreamVlanTaggingOperations ¶
func DefaultDownstreamVlanTaggingOperations() []ReceivedFrameVlanTaggingOperationRow
DefaultDownstreamVlanTaggingOperations provides three default downstream rules. When the Rx VLAN Tagging operation table is created, the ONU should autonomously predefine three entries that list the default treatment (normal forwarding without filtering or modification) for untagged, single tagged, and double tagged frames. As an exception to the rule on ordered processing, these default rules are always considered as a last resort for frames that do not match any other rule. Best practice dictates that these entries not be deleted by the OLT; however, they can be modified to produce the desired default behaviour.
It should be noted that downstream frame treatment is defined by the downstream mode attribute and is not affected by the upstream default rules.
func NewReceivedFrameVlanTaggingOperationRow ¶
func NewReceivedFrameVlanTaggingOperationRow(data []uint8) (*ReceivedFrameVlanTaggingOperationRow, error)
NewReceivedFrameVlanTaggingOperationRow creates a new table with optional default entries
func (*ReceivedFrameVlanTaggingOperationRow) Serialize ¶
func (table *ReceivedFrameVlanTaggingOperationRow) Serialize() []uint8
Serialize returns the DSCP PBit Mapping as an array of octets ready for insertion into a frame for transmission
type UNI ¶
type UNI struct { Onu interfaces.IOnu // Associated ONU PortNumber uint16 // Port number UniType me.ClassID // UNI Type (Class ID) PPTP, VEIP, ... FSM *fsm.Machine // Finite state machien ExtendedPMStats *interfaces.Statistics ExtendedPM64BitStats *interfaces.Statistics EthernetPart1Stats *interfaces.Statistics EthernetPart2Stats *interfaces.Statistics EthernetPart3Stats *interfaces.Statistics // contains filtered or unexported fields }
UNI is used to model the UNI/PON interface of an ONU
func (*UNI) Configuration ¶
func (uni *UNI) Configuration() interface{}
func (*UNI) EthernetPerformanceMonitoringHistoryDataHandler ¶
func (uni *UNI) EthernetPerformanceMonitoringHistoryDataHandler(request *me.ManagedEntity, existing *interfaces.MeDbEntry, mt omci.MessageType) gopacket.SerializableLayer
func (*UNI) IsEnabled ¶
IsEnabled returns the current UNI enable state. An enabled UNI is activated and able to pass OMCI messages
func (*UNI) Parent ¶
func (uni *UNI) Parent() interfaces.ICommon
Parent returns the parent object of this UNI (an ONU)
func (*UNI) PhysicalPathTerminationPointEthernetUniHandler ¶
func (uni *UNI) PhysicalPathTerminationPointEthernetUniHandler(request *me.ManagedEntity, existing *interfaces.MeDbEntry, mt omci.MessageType) gopacket.SerializableLayer
func (*UNI) RxFrame ¶
RxFrame handles frame reception from the PON and is responsible for looking up a matching GEM Port to forward the packet to while updating approprate statistics
func (*UNI) StateTransitionCallback ¶
StateTransitionCallback is called after transition to the new state and when the FSM mutex is locked. If synchronous, it will call directly into method. If async, uses a go routine to call the callback
func (*UNI) UniGHandler ¶
func (uni *UNI) UniGHandler(request *me.ManagedEntity, existing *interfaces.MeDbEntry, mt omci.MessageType) gopacket.SerializableLayer