Documentation ¶
Overview ¶
* Copyright 2020-2024 Open Networking Foundation (ONF) and the ONF Contributors * * 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
- func ExtractAccessFromFlow(inPort, outPort uint32) (uint32, uint32, uint32, uint32)
- func FlowExtractInfo(ctx context.Context, flow *ofp.OfpFlowStats, flowDirection string) (uint32, uint32, uint32, uint32, uint32, uint32, error)
- func IntfIDFromNniPortNum(ctx context.Context, portNum uint32) (uint32, error)
- func IntfIDFromPonPortNum(ctx context.Context, portNum uint32) (uint32, error)
- func IntfIDFromUniPortNum(portNum uint32) uint32
- func IntfIDToPortNo(intfID uint32, intfType voltha.Port_PortType) uint32
- func IntfIDToPortTypeName(intfID uint32) voltha.Port_PortType
- func IsControllerBoundFlow(outPort uint32) bool
- func IsUpstream(outPort uint32) bool
- func MkUniPortNum(ctx context.Context, intfID, onuID, uniID uint32) uint32
- func OnuIDFromPortNum(portNum uint32) uint32
- func OnuIDFromUniPortNum(portNum uint32) uint32
- func PortNoToIntfID(portno uint32, intfType voltha.Port_PortType) uint32
- func UniIDFromPortNum(portNum uint32) uint32
Constants ¶
const ( // MaxOnusPerPon is Max number of ONUs on any PON port MaxOnusPerPon = (1 << bitsForONUID) // MaxPonsPerOlt is Max number of PON ports on any OLT MaxPonsPerOlt = (1 << bitsForPONID) // MaxUnisPerOnu is the Max number of UNI ports on any ONU MaxUnisPerOnu = (1 << bitsForUniID) //Technology Profiles ID start value TpIDStart = 64 //Technology Profiles ID end value TpIDEnd = 256 //Number of Technology Profiles can be defined. TpRange = TpIDEnd - TpIDStart )
Variables ¶
This section is empty.
Functions ¶
func ExtractAccessFromFlow ¶
ExtractAccessFromFlow returns AccessDevice information
func FlowExtractInfo ¶
func FlowExtractInfo(ctx context.Context, flow *ofp.OfpFlowStats, flowDirection string) (uint32, uint32, uint32, uint32, uint32, uint32, error)
FlowExtractInfo fetches uniport from the flow, based on which it gets and returns ponInf, onuID, uniID, inPort and ethType
func IntfIDFromNniPortNum ¶
IntfIDFromNniPortNum returns Intf ID derived from portNum
func IntfIDFromPonPortNum ¶
IntfIDFromPonPortNum returns Intf ID derived from portNum
func IntfIDFromUniPortNum ¶
IntfIDFromUniPortNum returns IntfID derived from portNum
func IntfIDToPortNo ¶
func IntfIDToPortNo(intfID uint32, intfType voltha.Port_PortType) uint32
IntfIDToPortNo returns portId derived from intftype, intfId and portType
func IntfIDToPortTypeName ¶
func IntfIDToPortTypeName(intfID uint32) voltha.Port_PortType
IntfIDToPortTypeName returns port type derived from the intfId
func IsControllerBoundFlow ¶
IsControllerBoundFlow returns true/false
func IsUpstream ¶
IsUpstream returns true for Upstream and false for downstream
func MkUniPortNum ¶
MkUniPortNum returns new UNIportNum based on intfID, inuID and uniID
func OnuIDFromPortNum ¶
OnuIDFromPortNum returns ONUID derived from portNumber
func OnuIDFromUniPortNum ¶
OnuIDFromUniPortNum returns onuId from give portNum information.
func PortNoToIntfID ¶
func PortNoToIntfID(portno uint32, intfType voltha.Port_PortType) uint32
PortNoToIntfID returns portnumber derived from interfaceID
func UniIDFromPortNum ¶
UniIDFromPortNum return UniID derived from portNum
Types ¶
This section is empty.