Documentation
¶
Overview ¶
Copyright 2018 Platina Systems, Inc. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
File to catch message updates from linux kernel (via platina-mk1 driver) that signal different networking events (replacement for netlink.go)
- prefix/nexthop add/delete/replace
- ifaddr add/delete
- ifinfo (admin up/down)
- neighbor add/delete/replace
Index ¶
- Constants
- Variables
- func AddInterfaceFilter(v *vnet.Vnet, s string, ok bool)
- func Init(v *vnet.Vnet, cf Config)
- func InitInterfaceEthtool(v *vnet.Vnet)
- func ProcessFibEntry(msg *xeth.MsgFibentry, v *vnet.Vnet) (err error)
- func ProcessInterfaceAddr(msg *xeth.MsgIfa, action vnet.ActionType, v *vnet.Vnet) (err error)
- func ProcessInterfaceInfo(msg *xeth.MsgIfinfo, action vnet.ActionType, v *vnet.Vnet) (err error)
- func ProcessIpNeighbor(msg *xeth.MsgNeighUpdate, v *vnet.Vnet) (err error)
- func ProcessZeroGw(msg *xeth.MsgFibentry, v *vnet.Vnet, ns *net_namespace, ...) (err error)
- func ScopeTranslate(scope uint8) string
- func SetRxInject(v *vnet.Vnet, inject_node_name string)
- type Config
- type FdbMain
- type Main
Constants ¶
View Source
const ( UNSUPPORTED_VLAN_CTAG_RANGE_MIN = 3000 + iota UNSUPPORTED_VLAN_CTAG_RANGE_MAX = 3999 )
View Source
const MAXMSGSPEREVENT = 1000
Variables ¶
View Source
var ( // Function flags FdbOn bool = true AllowBridge bool = true )
Functions ¶
func InitInterfaceEthtool ¶
func ProcessFibEntry ¶
func ProcessFibEntry(msg *xeth.MsgFibentry, v *vnet.Vnet) (err error)
NB: Using these tests you could replace interface-address message and just use fibentry - use this test for interface address routes
if (msg.Id == xeth.RT_TABLE_LOCAL && msg.Type == xeth.RTN_LOCAL) || (msg.Id == xeth.RT_TABLE_MAIN && msg.Type == xeth.RTN_UNICAST) {
func ProcessInterfaceAddr ¶
func ProcessInterfaceInfo ¶
func ProcessIpNeighbor ¶
func ProcessIpNeighbor(msg *xeth.MsgNeighUpdate, v *vnet.Vnet) (err error)
func ProcessZeroGw ¶
func ProcessZeroGw(msg *xeth.MsgFibentry, v *vnet.Vnet, ns *net_namespace, isDel, isLocal, isMainUc bool) (err error)
Zero Gw processing covers 2 major sub-cases:
- Interface-address setting If local table entry and is a known interface of vnet i.e. front-panel then install an interface address
- Dummy or any other interface that's not a front panel or vlans of a front panel setting If not a known interface of vnet, we assume it's a dummy and install as a punt adjacency (FIXME - need to filter routes through eth0 and others)
func ScopeTranslate ¶
func SetRxInject ¶
Types ¶
type FdbMain ¶
func (*FdbMain) GetEvent ¶
func (m *FdbMain) GetEvent(evType vnet.ActionType) *fdbEvent
type Main ¶
func (*Main) RegisterHwInterface ¶
func (m *Main) RegisterHwInterface(h vnet.HwInterfacer)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.