server

package
v0.0.0-...-ac9ef1f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 5, 2017 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Overview

ribDB.go

ribDBServer.go

ribdArpdServer.go

ribdAsicdServer.go

ribdEventHandler.go

ribNotify.go

ribdPolicyEngine.go

ribdPolicyServer.go

ribdRouteServer.go

ribdUtils.go

ribdv6RouteProcessApis.go

Index

Constants

View Source
const (
	PROTOCOL_NONE      = -1
	PROTOCOL_CONNECTED = 0
	PROTOCOL_STATIC    = 1
	PROTOCOL_OSPF      = 2
	PROTOCOL_BGP       = 3
	PROTOCOL_LAST      = 4
)
View Source
const (
	Invalid   = -1
	FIBOnly   = 0
	FIBAndRIB = 1
	RIBOnly   = 2
)
View Source
const (
	SUB_ASICD = 0
)

Variables

View Source
var AsicdSub *nanomsg.SubSocket
View Source
var ConnectedRoutes []*ribdInt.Routes
View Source
var GlobalPolicyEngineDB *policy.PolicyEngineDB
View Source
var IfNameToIfIndex map[string]int32
View Source
var InterfaceRouteMap map[string]PerProtocolRouteInfo //map[string]int
View Source
var IntfIdNameMap map[int32]IntfEntry
View Source
var PARAMSDIR string
View Source
var PolicyEngineDB *policy.PolicyEngineDB
View Source
var ProtocolAdminDistanceMapDB map[string]RouteDistanceConfig
View Source
var ProtocolRouteMap map[string]PerProtocolRouteInfo //map[string]int
View Source
var PublisherInfoMap map[string]PublisherMapInfo
View Source
var RIBD_POLICY_PUB *nanomsg.PubSocket
View Source
var RIBD_PUB *nanomsg.PubSocket
View Source
var RedistributeRouteMap map[string][]RedistributeRouteInfo
View Source
var RedistributionPolicyMap map[string]RedistributionPolicyInfo
View Source
var ReverseRouteProtoTypeMapDB map[int]string
View Source
var RouteProtocolTypeMapDB map[string]int
View Source
var TrackReachabilityMap map[string][]string //map[ipAddr][]protocols
View Source
var V4RouteInfoMap *patriciaDB.Trie //Routes are stored in patricia trie
View Source
var V6RouteInfoMap *patriciaDB.Trie //Routes are stored in patricia trie
View Source
var V6linklocalIPMap = make(map[string]Linklocaldata)

Functions

func BuildPolicyRouteFromribdIPv4Route

func BuildPolicyRouteFromribdIPv4Route(cfg *ribd.IPv4Route) (policyRoute ribdInt.Routes)

func BuildPolicyRouteFromribdIPv6Route

func BuildPolicyRouteFromribdIPv6Route(cfg *ribd.IPv6Route) (policyRoute ribdInt.Routes)

func BuildProtocolAdminDistanceMapDB

func BuildProtocolAdminDistanceMapDB()

func BuildProtocolAdminDistanceSlice

func BuildProtocolAdminDistanceSlice(force bool)

func BuildPublisherMap

func BuildPublisherMap()

func BuildRouteProtocolTypeMapDB

func BuildRouteProtocolTypeMapDB()

func CreateV4ConnectedRoutes

func CreateV4ConnectedRoutes(count int, iPv4IntfStateList []*asicdServices.IPv4IntfState)

func CreateV6ConnectedRoutes

func CreateV6ConnectedRoutes(count int, iPv6IntfStateList []*asicdServices.IPv6IntfState)

func DeleteRoutesOfType

func DeleteRoutesOfType(protocol string)

func DoesRouteExist

func DoesRouteExist(params interface{}) (exists bool)

func Getv4RoutesPerInterface

func Getv4RoutesPerInterface(intfref string) []string

func Getv4RoutesPerProtocol

func Getv4RoutesPerProtocol(protocol string) []*ribd.RouteInfoSummary

func Getv6RoutesPerInterface

func Getv6RoutesPerInterface(intfref string) []string

func Getv6RoutesPerProtocol

func Getv6RoutesPerProtocol(protocol string) []*ribd.RouteInfoSummary

func InitPublisher

func InitPublisher(pub_str string) (pub *nanomsg.PubSocket)

func IsRoutePresent

func IsRoutePresent(routeInfoRecordList RouteInfoRecordList,
	protocol string) (found bool)

Api to find if a route of a protocol type is present

func PolicyEngineFilter

func PolicyEngineFilter(route ribdInt.Routes, policyPath int, params interface{})

func RedistributionNotificationSend

func RedistributionNotificationSend(PUB *nanomsg.PubSocket, route ribdInt.Routes, evt int, targetProtocol string)

func ResolveNextHop

func ResolveNextHop(ipAddr string) (nextHopIntf ribdInt.NextHopInfo, resolvedNextHopIntf ribdInt.NextHopInfo, err error)
    Function updates the route reachability status of a network. When a route is created/deleted/state changes,
	we traverse the entire route map and call this function for each of the destination network with :
	    prefix = route prefix of route being visited
		handle = routeInfoList data stored at this node
		item - reachabilityInfo data formed with route that is modified and the state

func UpdateRouteReachabilityStatus(prefix patriciaDB.Prefix, //prefix of the node being traversed

	handle patriciaDB.Item, //data interface (routeInforRecordList) for this node
	item patriciaDB.Item) //RouteReachabilityStatusInfo data  (err error) {

	if handle == nil {
		logger.Err("nil handle")
		return err
	}
	routeReachabilityStatusInfo := item.(RouteReachabilityStatusInfo)
	var ipMask net.IP
	ip, ipNet, err := net.ParseCIDR(routeReachabilityStatusInfo.destNet)
	if err != nil {
		logger.Err("Error getting IP from cidr: ", routeReachabilityStatusInfo.destNet)
		return err
	}
	ipMask = make(net.IP, 4)
	copy(ipMask, ipNet.Mask)
	ipAddrStr := ip.String()
	ipMaskStr := net.IP(ipMask).String()
	destIpPrefix, err := getNetowrkPrefixFromStrings(ipAddrStr, ipMaskStr)
	if err != nil {
		logger.Err("Error getting ip prefix for ip:", ipAddrStr, " mask:", ipMaskStr)
		return err
	}
	//logger.Debug("UpdateRouteReachabilityStatus network: ", routeReachabilityStatusInfo.destNet, " status:", routeReachabilityStatusInfo.status, "ip: ", ip.String(), " destIPPrefix: ", destIpPrefix, " ipMaskStr:", ipMaskStr)
	rmapInfoRecordList := handle.(RouteInfoRecordList)
	//for each of the routes for this destination, check if the nexthop ip matches destPrefix - which is the route being modified
	for k, v := range rmapInfoRecordList.routeInfoProtocolMap {
		//logger.Debug("UpdateRouteReachabilityStatus - protocol: ", k)
		for i := 0; i < len(v); i++ {
			vPrefix, err := getNetowrkPrefixFromStrings(v[i].nextHopIp.String(), ipMaskStr)
			if err != nil {
				logger.Err("Error getting ip prefix for v[i].nextHopIp:", v[i].nextHopIp.String(), " mask:", ipMaskStr)
				return err
			}
			nextHopIntf := ribdInt.NextHopInfo{
				NextHopIp:      v[i].nextHopIp.String(),
				NextHopIfIndex: ribdInt.Int(v[i].nextHopIfIndex),
			}
			//is the next hop same as the modified route
			if bytes.Equal(vPrefix, destIpPrefix) {
				if routeReachabilityStatusInfo.status == "Down" && v[i].resolvedNextHopIpIntf.IsReachable == true {
					v[i].resolvedNextHopIpIntf.IsReachable = false
					rmapInfoRecordList.routeInfoProtocolMap[k] = v
					RouteInfoMap.Set(prefix, rmapInfoRecordList)
					//logger.Debug("Adding to DBRouteCh from updateRouteReachability case 1")
					RouteServiceHandler.DBRouteCh <- RIBdServerConfig{
						OrigConfigObject: RouteDBInfo{v[i], rmapInfoRecordList},
						Op:               "add",
					}
					//RouteServiceHandler.WriteIPv4RouteStateEntryToDB(RouteDBInfo{v[i], rmapInfoRecordList})
					//logger.Debug("Bringing down route : ip: ", v[i].networkAddr)
					RouteReachabilityStatusUpdate(k, RouteReachabilityStatusInfo{v[i].networkAddr, "Down", k, nextHopIntf})
					/*
					   The reachability status for this network has been updated, now check if there are routes dependent on
					   this prefix and call reachability status

		if RouteServiceHandler.NextHopInfoMap[NextHopInfoKey{string(prefix)}].refCount > 0 {
			//logger.Debug("There are dependent routes for this ip ", v[i].networkAddr)
			RouteInfoMap.VisitAndUpdate(UpdateRouteReachabilityStatus, RouteReachabilityStatusInfo{v[i].networkAddr, "Down", k, nextHopIntf})
		}
	} else if routeReachabilityStatusInfo.status == "Up" && v[i].resolvedNextHopIpIntf.IsReachable == false {
		//logger.Debug("Bringing up route : ip: ", v[i].networkAddr)
		v[i].resolvedNextHopIpIntf.IsReachable = true
		rmapInfoRecordList.routeInfoProtocolMap[k] = v
		RouteInfoMap.Set(prefix, rmapInfoRecordList)
		//logger.Debug("Adding to DBRouteCh from updateRouteReachability case 2")
		RouteServiceHandler.DBRouteCh <- RIBdServerConfig{
			OrigConfigObject: RouteDBInfo{v[i], rmapInfoRecordList},
			Op:               "add",
		}
		//RouteServiceHandler.WriteIPv4RouteStateEntryToDB(RouteDBInfo{v[i], rmapInfoRecordList})
		RouteReachabilityStatusUpdate(k, RouteReachabilityStatusInfo{v[i].networkAddr, "Up", k, nextHopIntf})
		/*
		   The reachability status for this network has been updated, now check if there are routes dependent on
		   this prefix and call reachability status

					if RouteServiceHandler.NextHopInfoMap[NextHopInfoKey{string(prefix)}].refCount > 0 {
						//logger.Debug("There are dependent routes for this ip ", v[i].networkAddr)
						RouteInfoMap.VisitAndUpdate(UpdateRouteReachabilityStatus, RouteReachabilityStatusInfo{v[i].networkAddr, "Up", k, nextHopIntf})
					}
				}
			}
		}
	}
	return err
}
Resolve and determine the immediate next hop info for a given ipAddr

func RouteInfoMapDelete

func RouteInfoMapDelete(ipType ribdCommonDefs.IPType, prefix patriciaDB.Prefix)

func RouteInfoMapGet

func RouteInfoMapGet(ipType ribdCommonDefs.IPType, prefix patriciaDB.Prefix) (item interface{})

func RouteInfoMapInsert

func RouteInfoMapInsert(ipType ribdCommonDefs.IPType, prefix patriciaDB.Prefix, routeInfoRecordList interface{}) (ok bool)

RoutInfoMap operations functions

func RouteInfoMapSet

func RouteInfoMapSet(ipType ribdCommonDefs.IPType, prefix patriciaDB.Prefix, routeInfoRecordList interface{})

func RouteInfoMapVisitAndUpdate

func RouteInfoMapVisitAndUpdate(ipType ribdCommonDefs.IPType, routeReachabilityStatusInfo RouteReachabilityStatusInfo)

func RouteReachabilityStatusNotificationSend

func RouteReachabilityStatusNotificationSend(targetProtocol string, info RouteReachabilityStatusInfo)

func RouteReachabilityStatusUpdate

func RouteReachabilityStatusUpdate(targetProtocol string, info RouteReachabilityStatusInfo)

func SelectBestRoute

func SelectBestRoute(routeInfoRecordList RouteInfoRecordList) (addRouteList []RouteOpInfoRecord, deleteRouteList []RouteOpInfoRecord, newSelectedProtocol string)

Function which determines the best route when a route is deleted or updated

func SelectNextBestRoute

func SelectNextBestRoute(routeInfoRecordList RouteInfoRecordList, protocol string) (newSelectedProtocol string)

Function which determines the next best route

func SelectRoute

func SelectRoute(destNetPrefix patriciaDB.Prefix,
	routeInfoRecordList RouteInfoRecordList,
	routeInfoRecord RouteInfoRecord,
	op ribd.Int,
	opType int,
) (err error)
    This function is called whenever a route is added or deleted. In either of the cases,
	this function selects the best route to be programmed in FIB.

func UpdateInterfaceRouteMap

func UpdateInterfaceRouteMap(intf int, op string, ipType ribdCommonDefs.IPType, value string, ecmp bool)

func UpdateProtocolRouteMap

func UpdateProtocolRouteMap(protocol string, op string, ipType ribdCommonDefs.IPType, value string, ecmp bool)

func UpdateRedistributeTargetMap

func UpdateRedistributeTargetMap(evt int, protocol string, route ribdInt.Routes)

func UpdateRouteAndPolicyDB

func UpdateRouteAndPolicyDB(policyDetails policy.PolicyDetails, params interface{})

func UpdateV4InterfaceRouteMap

func UpdateV4InterfaceRouteMap(intfref string, op string, value string, ecmp bool)

func UpdateV4ProtocolRouteMap

func UpdateV4ProtocolRouteMap(protocol string, op string, value string, ecmp bool)

func UpdateV4RouteReachabilityStatus

func UpdateV4RouteReachabilityStatus(prefix patriciaDB.Prefix,
	handle patriciaDB.Item,
	item patriciaDB.Item) (err error)
    Function updates the route reachability status of a network. When a route is created/deleted/state changes,
	we traverse the entire route map and call this function for each of the destination network with :
	    prefix = route prefix of route being visited
		handle = routeInfoList data stored at this node
		item - reachabilityInfo data formed with route that is modified and the state

func UpdateV6InterfaceRouteMap

func UpdateV6InterfaceRouteMap(intfref string, op string, value string, ecmp bool)

func UpdateV6ProtocolRouteMap

func UpdateV6ProtocolRouteMap(protocol string, op string, value string, ecmp bool)

func UpdateV6RouteReachabilityStatus

func UpdateV6RouteReachabilityStatus(prefix patriciaDB.Prefix,
	handle patriciaDB.Item,
	item patriciaDB.Item) (err error)
    Function updates the route reachability status of a network. When a route is created/deleted/state changes,
	we traverse the entire route map and call this function for each of the destination network with :
	    prefix = route prefix of route being visited
		handle = routeInfoList data stored at this node
		item - reachabilityInfo data formed with route that is modified and the state

Types

type AdminDistanceSlice

type AdminDistanceSlice []ribd.RouteDistanceState
var ProtocolAdminDistanceSlice AdminDistanceSlice

func (AdminDistanceSlice) Len

func (slice AdminDistanceSlice) Len() int

func (AdminDistanceSlice) Less

func (slice AdminDistanceSlice) Less(i, j int) bool

func (AdminDistanceSlice) Swap

func (slice AdminDistanceSlice) Swap(i, j int)

type ApplyPolicyInfo

type ApplyPolicyInfo struct {
	Source     string //source application/protocol
	Policy     string
	Action     string
	Conditions []*ribdInt.ConditionInfo
}

type ApplyPolicyList

type ApplyPolicyList struct {
	ApplyList []*ribdInt.ApplyPolicyInfo
	UndoList  []*ribdInt.ApplyPolicyInfo
}

type ArpdClient

type ArpdClient struct {
	RIBClientBase
	ClientHdl *arpd.ARPDServicesClient
	// contains filtered or unexported fields
}

func (*ArpdClient) ConnectToClient

func (clnt *ArpdClient) ConnectToClient()

connect to client functions

func (*ArpdClient) DmnDownHandler

func (clnt *ArpdClient) DmnDownHandler()

Daemon DOWN handler functions

func (*ArpdClient) DmnUpHandler

func (clnt *ArpdClient) DmnUpHandler()

Daemon UP handler functions

type AsicdClient

type AsicdClient struct {
	RIBClientBase
	ClientHdl *asicdServices.ASICDServicesClient
	// contains filtered or unexported fields
}

func (*AsicdClient) ConnectToClient

func (clnt *AsicdClient) ConnectToClient()

func (*AsicdClient) DmnDownHandler

func (clnt *AsicdClient) DmnDownHandler()

func (*AsicdClient) DmnUpHandler

func (clnt *AsicdClient) DmnUpHandler()

type BGPdClient

type BGPdClient struct {
	// contains filtered or unexported fields
}

func (*BGPdClient) ConnectToClient

func (clnt *BGPdClient) ConnectToClient()

func (*BGPdClient) DmnDownHandler

func (clnt *BGPdClient) DmnDownHandler()

func (*BGPdClient) DmnUpHandler

func (clnt *BGPdClient) DmnUpHandler()

type ClientIf

type ClientIf interface {
	DmnDownHandler()
	DmnUpHandler()
	ConnectToClient()
}

type ClientJson

type ClientJson struct {
	Name string `json:Name`
	Port int    `json:Port`
}

type DBRouteKey

type DBRouteKey struct {
	// contains filtered or unexported fields
}

type IntfEntry

type IntfEntry struct {
	// contains filtered or unexported fields
}

type Linklocaldata

type Linklocaldata struct{}

type NextHopInfo

type NextHopInfo struct {
	// contains filtered or unexported fields
}

type NextHopInfoKey

type NextHopInfoKey struct {
	// contains filtered or unexported fields
}

type NotificationMsg

type NotificationMsg struct {
	// contains filtered or unexported fields
}

type OSPFdClient

type OSPFdClient struct {
	// contains filtered or unexported fields
}

func (*OSPFdClient) ConnectToClient

func (clnt *OSPFdClient) ConnectToClient()

func (*OSPFdClient) DmnDownHandler

func (clnt *OSPFdClient) DmnDownHandler()

func (*OSPFdClient) DmnUpHandler

func (clnt *OSPFdClient) DmnUpHandler()

type PerProtocolRouteInfo

type PerProtocolRouteInfo struct {
	// contains filtered or unexported fields
}

type Policy

type Policy struct {
	*policy.Policy
	// contains filtered or unexported fields
}

type PolicyExtensions

type PolicyExtensions struct {
	// contains filtered or unexported fields
}

This structure can be used along with policyDefinitionConfig object to pass on any application specific info to policy engine

type PolicyRouteIndex

type PolicyRouteIndex struct {
	// contains filtered or unexported fields
}

Index of policy entity

type PublisherMapInfo

type PublisherMapInfo struct {
	// contains filtered or unexported fields
}

type RIBClientBase

type RIBClientBase struct {
	Address            string
	Transport          thrift.TTransport
	PtrProtocolFactory *thrift.TBinaryProtocolFactory
	IsConnected        bool
}

type RIBDServer

type RIBDServer struct {
	Logger               *logging.Writer
	PolicyEngineDB       *policy.PolicyEngineDB
	GlobalPolicyEngineDB *policy.PolicyEngineDB
	TrackReachabilityCh  chan TrackReachabilityInfo
	RouteConfCh          chan RIBdServerConfig
	AsicdRouteCh         chan RIBdServerConfig
	ArpdRouteCh          chan RIBdServerConfig
	NotificationChannel  chan NotificationMsg
	NextHopInfoMap       map[NextHopInfoKey]NextHopInfo
	/*PolicyConditionConfCh  chan RIBdServerConfig
	PolicyActionConfCh     chan RIBdServerConfig
	PolicyStmtConfCh       chan RIBdServerConfig*/
	PolicyConfCh chan RIBdServerConfig
	//PolicyApplyCh       chan ApplyPolicyList
	PolicyUpdateApplyCh chan ApplyPolicyList
	DBRouteCh           chan RIBdServerConfig
	AcceptConfig        bool
	ServerUpCh          chan bool
	DBReadDone          chan bool
	V4IntfsGetDone      chan V4IntfGetInfo
	V6IntfsGetDone      chan V6IntfGetInfo
	PolicyConfDone      chan error
	DbHdl               *dbutils.DBUtil
	Clients             map[string]ClientIf
}
type PatchUpdateRouteInfo struct {
	OrigRoute *ribd.IPv4Route
	NewRoute  *ribd.IPv4Route
	Op        []*ribd.PatchOpInfo
}
var RouteServiceHandler *RIBDServer

func NewRIBDServicesHandler

func NewRIBDServicesHandler(dbHdl *dbutils.DBUtil, loggerC *logging.Writer) *RIBDServer

func (*RIBDServer) AcceptConfigActions

func (ribdServiceHandler *RIBDServer) AcceptConfigActions()

func (*RIBDServer) ConnectToClients

func (ribdServiceHandler *RIBDServer) ConnectToClients(paramsFile string)
func (ribdServiceHandler *RIBDServer) connectToClient(name string) {
	var timer *time.Timer
	logger.Info("in go routine ConnectToClient for connecting to %s\n", name)
	for {
		timer = time.NewTimer(time.Second * 10)
		<-timer.C
		if name == "asicd" {
			logger.Info("Connecting to asicd at address ", asicdclnt.Address)
			//asicdclnt.Address = "localhost:" + strconv.Itoa(port)
			asicdclnt.Transport, asicdclnt.PtrProtocolFactory, _ = ipcutils.CreateIPCHandles(asicdclnt.Address)
			if asicdclnt.Transport != nil && asicdclnt.PtrProtocolFactory != nil {
				logger.Info("connecting to asicd,arpdclnt.IsConnected:", arpdclnt.IsConnected)
				asicdclnt.ClientHdl = asicdServices.NewASICDServicesClientFactory(asicdclnt.Transport, asicdclnt.PtrProtocolFactory)
				asicdclnt.IsConnected = true
				ribdServiceHandler.Clients["asicd"] = asicdclnt
				if arpdclnt.IsConnected == true {
					logger.Info(" Connected to all clients: call AcceptConfigActions")
					ribdServiceHandler.AcceptConfigActions()
				}
				timer.Stop()
				return
			}
		}
		if name == "arpd" {
			logger.Info("Connecting to arpd at address ", arpdclnt.Address)
			//arpdclnt.Address = "localhost:" + strconv.Itoa(port)
			arpdclnt.Transport, arpdclnt.PtrProtocolFactory, _ = ipcutils.CreateIPCHandles(arpdclnt.Address)
			if arpdclnt.Transport != nil && arpdclnt.PtrProtocolFactory != nil {
				logger.Info("connecting to arpd,asicdclnt.IsConnected:", asicdclnt.IsConnected)
				arpdclnt.ClientHdl = arpd.NewARPDServicesClientFactory(arpdclnt.Transport, arpdclnt.PtrProtocolFactory)
				arpdclnt.IsConnected = true
				ribdServiceHandler.Clients["arpd"] = arpdclnt
				if asicdclnt.IsConnected == true {
					logger.Info(" Connected to all clients: call AcceptConfigActions")
					ribdServiceHandler.AcceptConfigActions()
				}
				timer.Stop()
				return
			}
		}
	}
}

func (RIBDServer) ConvertIntfStrToIfIndexStr

func (m RIBDServer) ConvertIntfStrToIfIndexStr(intfString string) (ifIndex string, err error)

func (RIBDServer) DelIPv4RouteStateEntryFromDB

func (m RIBDServer) DelIPv4RouteStateEntryFromDB(dbInfo RouteDBInfo) error

func (RIBDServer) DelIPv6RouteStateEntryFromDB

func (m RIBDServer) DelIPv6RouteStateEntryFromDB(dbInfo RouteDBInfo) error

func (*RIBDServer) DmnDownHandler

func (mgr *RIBDServer) DmnDownHandler(name string) error

func (*RIBDServer) DmnUpHandler

func (mgr *RIBDServer) DmnUpHandler(name string) error

func (RIBDServer) GetBulkIPv4RouteState

func (m RIBDServer) GetBulkIPv4RouteState(fromIndex ribd.Int, rcount ribd.Int) (routes *ribd.IPv4RouteStateGetInfo, err error)

func (RIBDServer) GetBulkPolicyConditionState

func (m RIBDServer) GetBulkPolicyConditionState(fromIndex ribd.Int, rcount ribd.Int, db *policy.PolicyEngineDB) (policyConditions *ribd.PolicyConditionStateGetInfo, err error)

func (RIBDServer) GetBulkPolicyDefinitionState

func (m RIBDServer) GetBulkPolicyDefinitionState(fromIndex ribd.Int, rcount ribd.Int, db *policy.PolicyEngineDB) (policyStmts *ribd.PolicyDefinitionStateGetInfo, err error)

func (RIBDServer) GetBulkPolicyPrefixSetState

func (m RIBDServer) GetBulkPolicyPrefixSetState(fromIndex ribd.Int, rcount ribd.Int, db *policy.PolicyEngineDB) (policyPrefixSets *ribd.PolicyPrefixSetStateGetInfo, err error)

func (RIBDServer) GetBulkPolicyStmtState

func (m RIBDServer) GetBulkPolicyStmtState(fromIndex ribd.Int, rcount ribd.Int, db *policy.PolicyEngineDB) (policyStmts *ribd.PolicyStmtStateGetInfo, err error)

func (RIBDServer) GetBulkRIBEventState

func (m RIBDServer) GetBulkRIBEventState(fromIndex ribd.Int, rcount ribd.Int) (events *ribd.RIBEventStateGetInfo, err error)

func (RIBDServer) GetBulkRouteDistanceState

func (m RIBDServer) GetBulkRouteDistanceState(fromIndex ribd.Int, rcount ribd.Int) (routeDistanceStates *ribd.RouteDistanceStateGetInfo, err error)

thrift API definitions

func (RIBDServer) GetBulkRouteStatsPerInterfaceState

func (m RIBDServer) GetBulkRouteStatsPerInterfaceState(fromIndex ribd.Int, count ribd.Int) (stats *ribd.RouteStatsPerInterfaceStateGetInfo, err error)

func (RIBDServer) GetBulkRouteStatsPerProtocolState

func (m RIBDServer) GetBulkRouteStatsPerProtocolState(fromIndex ribd.Int, count ribd.Int) (stats *ribd.RouteStatsPerProtocolStateGetInfo, err error)

func (RIBDServer) GetBulkRoutesForProtocol

func (m RIBDServer) GetBulkRoutesForProtocol(srcProtocol string, fromIndex ribdInt.Int, rcount ribdInt.Int) (routes *ribdInt.RoutesGetInfo, err error)

Application daemons like BGPD/OSPFD can call this API to get list of routes that they should have, typically called at startup time

func (RIBDServer) GetPerProtocolRouteCountList

func (m RIBDServer) GetPerProtocolRouteCountList() (retList []*ribd.PerProtocolRouteCount)

func (RIBDServer) GetRouteDistanceState

func (m RIBDServer) GetRouteDistanceState(protocol string) (*ribd.RouteDistanceState, error)

func (RIBDServer) GetRouteReachabilityInfo

func (m RIBDServer) GetRouteReachabilityInfo(destNet string, ifIndex ribdInt.Int) (nextHopIntf *ribdInt.NextHopInfo, err error)

func (RIBDServer) GetRouteStatsPerInterfaceState

func (m RIBDServer) GetRouteStatsPerInterfaceState(intfref string) (stats *ribd.RouteStatsPerInterfaceState, err error)

func (RIBDServer) GetRouteStatsPerProtocolState

func (m RIBDServer) GetRouteStatsPerProtocolState(protocol string) (stats *ribd.RouteStatsPerProtocolState, err error)

func (RIBDServer) GetTotalv4RouteCount

func (m RIBDServer) GetTotalv4RouteCount() (number int, err error)

func (RIBDServer) GetTotalv6RouteCount

func (m RIBDServer) GetTotalv6RouteCount() (number int, err error)

func (RIBDServer) GetV4ConnectedRoutes

func (m RIBDServer) GetV4ConnectedRoutes()

func (RIBDServer) GetV4RouteReachabilityInfo

func (m RIBDServer) GetV4RouteReachabilityInfo(destNet string, ifIndex ribdInt.Int) (nextHopIntf *ribdInt.NextHopInfo, err error)

Returns the longest prefix match route to reach the destination network destNet

func (RIBDServer) GetV6ConnectedRoutes

func (m RIBDServer) GetV6ConnectedRoutes()

func (RIBDServer) GetV6RouteReachabilityInfo

func (m RIBDServer) GetV6RouteReachabilityInfo(destNet string, ifIndex ribdInt.Int) (nextHopIntf *ribdInt.NextHopInfo, err error)

Returns the longest prefix match route to reach the destination network destNet

func (RIBDServer) Getv4Route

func (m RIBDServer) Getv4Route(destNetIp string) (route *ribdInt.IPv4RouteState, err error)

func (RIBDServer) Getv4RouteCreatedTime

func (m RIBDServer) Getv4RouteCreatedTime(number int) (time string, err error)

func (RIBDServer) Getv6Route

func (m RIBDServer) Getv6Route(destNetIp string) (route *ribdInt.IPv6RouteState, err error)

func (RIBDServer) IPv6RouteConfigValidationCheck

func (m RIBDServer) IPv6RouteConfigValidationCheck(cfg *ribd.IPv6Route, op string) (err error)
    This function performs config parameters validation for op = "add" and "del" values.
	Key validations performed by this fucntion include:
	   - if the Protocol specified is valid (STATIC/CONNECTED/EBGP/OSPF)
	   - Validate destinationNw. If provided in CIDR notation, convert to ip addr and mask values
	   - In case of op == "del", check if the route is present in the DB
	   - for each of the nextHop info, check:
	       - if the next hop ip is valid
		   - if the nexthopIntf is valid L3 intf and if so, convert to string value

func (RIBDServer) IPv6RouteConfigValidationCheckForPatchUpdate

func (m RIBDServer) IPv6RouteConfigValidationCheckForPatchUpdate(oldcfg *ribd.IPv6Route, cfg *ribd.IPv6Route, op []*ribd.PatchOpInfo) (err error)

func (RIBDServer) IPv6RouteConfigValidationCheckForUpdate

func (m RIBDServer) IPv6RouteConfigValidationCheckForUpdate(oldcfg *ribd.IPv6Route, cfg *ribd.IPv6Route, attrset []bool) (err error)
    This function performs config parameters validation for Route update operation.
	Key validations performed by this fucntion include:
	   - Validate destinationNw. If provided in CIDR notation, convert to ip addr and mask values

func (*RIBDServer) InitServer

func (s *RIBDServer) InitServer()

func (*RIBDServer) InitializeGlobalPolicyDB

func (ribdServiceHandler *RIBDServer) InitializeGlobalPolicyDB() *policy.PolicyEngineDB

func (*RIBDServer) InitializePolicyDB

func (ribdServiceHandler *RIBDServer) InitializePolicyDB() *policy.PolicyEngineDB

func (*RIBDServer) ListenToClientStateChanges

func (mgr *RIBDServer) ListenToClientStateChanges()

func (*RIBDServer) NotificationServer

func (ribdServiceHandler *RIBDServer) NotificationServer()

func (*RIBDServer) PolicyConditionNotificationSend

func (ribdServiceHandler *RIBDServer) PolicyConditionNotificationSend(PUB *nanomsg.PubSocket, cfg ribd.PolicyCondition, evt int)

Function to send PolicyCondition Notification

func (*RIBDServer) PolicyDefinitionNotificationSend

func (ribdServiceHandler *RIBDServer) PolicyDefinitionNotificationSend(PUB *nanomsg.PubSocket, cfg ribd.PolicyDefinition, evt int)

Function to send PolicyDefinition Notification

func (*RIBDServer) PolicyPrefixSetNotificationSend

func (ribdServiceHandler *RIBDServer) PolicyPrefixSetNotificationSend(PUB *nanomsg.PubSocket, cfg ribd.PolicyPrefixSet, evt int)

Function to send PolicyPrefixSet Notification

func (*RIBDServer) PolicyStmtNotificationSend

func (ribdServiceHandler *RIBDServer) PolicyStmtNotificationSend(PUB *nanomsg.PubSocket, cfg ribd.PolicyStmt, evt int)

Function to send PolicyStmt Notification

func (*RIBDServer) ProcessAsicdEvents

func (ribdServiceHandler *RIBDServer) ProcessAsicdEvents(sub *nanomsg.SubSocket)

func (RIBDServer) ProcessBulkRouteCreateConfig

func (m RIBDServer) ProcessBulkRouteCreateConfig(bulkCfg []*ribdInt.IPv4RouteConfig) (val bool, err error)

func (*RIBDServer) ProcessEvents

func (ribdServiceHandler *RIBDServer) ProcessEvents(sub *nanomsg.SubSocket, subType ribd.Int)

func (*RIBDServer) ProcessIPv4IntfCreateEvent

func (ribdServiceHandler *RIBDServer) ProcessIPv4IntfCreateEvent(msg asicdCommonDefs.IPv4IntfNotifyMsg)

func (*RIBDServer) ProcessIPv4IntfDeleteEvent

func (ribdServiceHandler *RIBDServer) ProcessIPv4IntfDeleteEvent(msg asicdCommonDefs.IPv4IntfNotifyMsg)

func (*RIBDServer) ProcessIPv4IntfDownEvent

func (ribdServiceHandler *RIBDServer) ProcessIPv4IntfDownEvent(ipAddr string, ifIndex int32)

Handle Interface down event

func (*RIBDServer) ProcessIPv4IntfUpEvent

func (ribdServiceHandler *RIBDServer) ProcessIPv4IntfUpEvent(ipAddr string, ifIndex int32)

Handle Interface up event

func (*RIBDServer) ProcessIPv6IntfCreateEvent

func (ribdServiceHandler *RIBDServer) ProcessIPv6IntfCreateEvent(msg asicdCommonDefs.IPv6IntfNotifyMsg)

func (*RIBDServer) ProcessIPv6IntfDeleteEvent

func (ribdServiceHandler *RIBDServer) ProcessIPv6IntfDeleteEvent(msg asicdCommonDefs.IPv6IntfNotifyMsg)

func (*RIBDServer) ProcessIPv6IntfDownEvent

func (ribdServiceHandler *RIBDServer) ProcessIPv6IntfDownEvent(ipAddr string, ifIndex int32)

func (*RIBDServer) ProcessIPv6IntfUpEvent

func (ribdServiceHandler *RIBDServer) ProcessIPv6IntfUpEvent(ipAddr string, ifIndex int32)

func (*RIBDServer) ProcessLogicalIntfCreateEvent

func (ribdServiceHandler *RIBDServer) ProcessLogicalIntfCreateEvent(logicalIntfNotifyMsg asicdCommonDefs.LogicalIntfNotifyMsg)

func (RIBDServer) ProcessPolicyConditionConfigCreate

func (m RIBDServer) ProcessPolicyConditionConfigCreate(cfg *ribd.PolicyCondition, db *policy.PolicyEngineDB) (val bool, err error)

Function to create policy condition in the policyEngineDB

func (RIBDServer) ProcessPolicyConditionConfigDelete

func (m RIBDServer) ProcessPolicyConditionConfigDelete(cfg *ribd.PolicyCondition, db *policy.PolicyEngineDB) (val bool, err error)

Function to delete policy condition in the policyEngineDB

func (RIBDServer) ProcessPolicyConditionConfigUpdate

func (m RIBDServer) ProcessPolicyConditionConfigUpdate(origCfg *ribd.PolicyCondition, newCfg *ribd.PolicyCondition, attrset []bool, db *policy.PolicyEngineDB) (err error)

Function to update policy condition in the policyEngineDB

func (RIBDServer) ProcessPolicyDefinitionConfigCreate

func (m RIBDServer) ProcessPolicyDefinitionConfigCreate(cfg *ribd.PolicyDefinition, db *policy.PolicyEngineDB) (err error)

Function to create policy definition in the policyEngineDB

func (RIBDServer) ProcessPolicyDefinitionConfigDelete

func (m RIBDServer) ProcessPolicyDefinitionConfigDelete(cfg *ribd.PolicyDefinition, db *policy.PolicyEngineDB) (err error)

Function to delete policy definition in the policyEngineDB

func (RIBDServer) ProcessPolicyDefinitionConfigPatchUpdate

func (m RIBDServer) ProcessPolicyDefinitionConfigPatchUpdate(origCfg *ribd.PolicyDefinition, newCfg *ribd.PolicyDefinition, op []*ribd.PatchOpInfo, db *policy.PolicyEngineDB) (err error)

Function to patch update policy definition in the policyEngineDB

func (RIBDServer) ProcessPolicyDefinitionConfigUpdate

func (m RIBDServer) ProcessPolicyDefinitionConfigUpdate(origCfg *ribd.PolicyDefinition, newCfg *ribd.PolicyDefinition, attrset []bool, db *policy.PolicyEngineDB) (err error)

Function to update policy definition in the policyEngineDB

func (RIBDServer) ProcessPolicyPrefixSetConfigCreate

func (m RIBDServer) ProcessPolicyPrefixSetConfigCreate(cfg *ribd.PolicyPrefixSet, db *policy.PolicyEngineDB) (val bool, err error)

Function to create policy prefix set in the policyEngineDB

func (RIBDServer) ProcessPolicyPrefixSetConfigDelete

func (m RIBDServer) ProcessPolicyPrefixSetConfigDelete(cfg *ribd.PolicyPrefixSet, db *policy.PolicyEngineDB) (val bool, err error)

Function to delete policy prefix set in the policyEngineDB

func (RIBDServer) ProcessPolicyPrefixSetConfigPatchUpdate

func (m RIBDServer) ProcessPolicyPrefixSetConfigPatchUpdate(origCfg *ribd.PolicyPrefixSet, newCfg *ribd.PolicyPrefixSet, op []*ribd.PatchOpInfo, db *policy.PolicyEngineDB) (err error)

Function to patch update policy prefix set in the policyEngineDB

func (RIBDServer) ProcessPolicyPrefixSetConfigUpdate

func (m RIBDServer) ProcessPolicyPrefixSetConfigUpdate(origCfg *ribd.PolicyPrefixSet, newCfg *ribd.PolicyPrefixSet, attrset []bool, db *policy.PolicyEngineDB) (err error)

Function to update policy prefix set in the policyEngineDB

func (RIBDServer) ProcessPolicyStmtConfigCreate

func (m RIBDServer) ProcessPolicyStmtConfigCreate(cfg *ribd.PolicyStmt, db *policy.PolicyEngineDB) (err error)
Function to create policy action in the policyEngineDB
func (m RIBDServer) ProcessPolicyActionConfigCreate(cfg *ribdInt.PolicyAction, db *policy.PolicyEngineDB) (val bool, err error) {
	logger.Debug("ProcessPolicyActionConfigCreate:CreatePolicyAction"))
	newAction := policy.PolicyActionConfig{Name: cfg.Name, ActionType: cfg.ActionType, SetAdminDistanceValue: int(cfg.SetAdminDistanceValue), Accept: cfg.Accept, Reject: cfg.Reject, RedistributeAction: cfg.RedistributeAction, RedistributeTargetProtocol: cfg.RedistributeTargetProtocol, NetworkStatementTargetProtocol: cfg.NetworkStatementTargetProtocol}
	val, err = db.CreatePolicyAction(newAction)
	return val, err
}
Function to delete policy action in the policyEngineDB
func (m RIBDServer) ProcessPolicyActionConfigDelete(cfg *ribdInt.PolicyAction, db *policy.PolicyEngineDB) (val bool, err error) {
	logger.Debug("ProcessPolicyActionConfigDelete:CreatePolicyAction"))
	newAction := policy.PolicyActionConfig{Name: cfg.Name}
	val, err = db.DeletePolicyAction(newAction)
	return val, err
}
Function to create policy stmt in the policyEngineDB

func (RIBDServer) ProcessPolicyStmtConfigDelete

func (m RIBDServer) ProcessPolicyStmtConfigDelete(cfg *ribd.PolicyStmt, db *policy.PolicyEngineDB) (err error)

Function to delete policy stmt in the policyEngineDB

func (RIBDServer) ProcessPolicyStmtConfigPatchUpdate

func (m RIBDServer) ProcessPolicyStmtConfigPatchUpdate(origCfg *ribd.PolicyStmt, newCfg *ribd.PolicyStmt, op []*ribd.PatchOpInfo, db *policy.PolicyEngineDB) (err error)

Function to patch update policy stmt in the policyEngineDB

func (RIBDServer) ProcessPolicyStmtConfigUpdate

func (m RIBDServer) ProcessPolicyStmtConfigUpdate(origCfg *ribd.PolicyStmt, newCfg *ribd.PolicyStmt, attrset []bool, db *policy.PolicyEngineDB) (err error)

Function to update policy stmt in the policyEngineDB

func (RIBDServer) ProcessV4RouteCreateConfig

func (m RIBDServer) ProcessV4RouteCreateConfig(cfg *ribd.IPv4Route, addType int, sliceIdx ribd.Int) (val bool, err error)

func (RIBDServer) ProcessV4RouteDeleteConfig

func (m RIBDServer) ProcessV4RouteDeleteConfig(cfg *ribd.IPv4Route, delType int) (val bool, err error)

func (RIBDServer) ProcessV6RouteCreateConfig

func (m RIBDServer) ProcessV6RouteCreateConfig(cfg *ribd.IPv6Route, addType int, sliceIdx ribd.Int) (val bool, err error)

func (RIBDServer) ProcessV6RouteDeleteConfig

func (m RIBDServer) ProcessV6RouteDeleteConfig(cfg *ribd.IPv6Route, delType int) (val bool, err error)

func (*RIBDServer) ProcessVlanCreateEvent

func (ribdServiceHandler *RIBDServer) ProcessVlanCreateEvent(vlanNotifyMsg asicdCommonDefs.VlanNotifyMsg)

func (RIBDServer) Processv4RoutePatchUpdateConfig

func (m RIBDServer) Processv4RoutePatchUpdateConfig(origconfig *ribd.IPv4Route, newconfig *ribd.IPv4Route, op []*ribd.PatchOpInfo) (ret bool, err error)

func (RIBDServer) Processv4RouteUpdateConfig

func (m RIBDServer) Processv4RouteUpdateConfig(origconfig *ribd.IPv4Route, newconfig *ribd.IPv4Route, attrset []bool) (val bool, err error)

func (RIBDServer) Processv6RoutePatchUpdateConfig

func (m RIBDServer) Processv6RoutePatchUpdateConfig(origconfig *ribd.IPv6Route, newconfig *ribd.IPv6Route, op []*ribd.PatchOpInfo) (ret bool, err error)

func (RIBDServer) Processv6RouteUpdateConfig

func (m RIBDServer) Processv6RouteUpdateConfig(origconfig *ribd.IPv6Route, newconfig *ribd.IPv6Route, attrset []bool) (val bool, err error)

func (RIBDServer) ReadAndUpdateRoutesFromDB

func (m RIBDServer) ReadAndUpdateRoutesFromDB()

func (RIBDServer) ReadAndUpdatev6RoutesFromDB

func (m RIBDServer) ReadAndUpdatev6RoutesFromDB()

func (RIBDServer) RouteConfigValidationCheck

func (m RIBDServer) RouteConfigValidationCheck(cfg *ribd.IPv4Route, op string) (err error)
    This function performs config parameters validation for op = "add" and "del" values.
	Key validations performed by this fucntion include:
	   - if the Protocol specified is valid (STATIC/CONNECTED/EBGP/OSPF)
	   - Validate destinationNw. If provided in CIDR notation, convert to ip addr and mask values
	   - In case of op == "del", check if the route is present in the DB
	   - for each of the nextHop info, check:
	       - if the next hop ip is valid
		   - if the nexthopIntf is valid L3 intf and if so, convert to string value

func (RIBDServer) RouteConfigValidationCheckForPatchUpdate

func (m RIBDServer) RouteConfigValidationCheckForPatchUpdate(oldcfg *ribd.IPv4Route, cfg *ribd.IPv4Route, op []*ribd.PatchOpInfo) (err error)

func (RIBDServer) RouteConfigValidationCheckForUpdate

func (m RIBDServer) RouteConfigValidationCheckForUpdate(oldcfg *ribd.IPv4Route, cfg *ribd.IPv4Route, attrset []bool) (err error)
    This function performs config parameters validation for Route update operation.
	Key validations performed by this fucntion include:
	   - Validate destinationNw. If provided in CIDR notation, convert to ip addr and mask values

func (*RIBDServer) SetupEventHandler

func (ribdServiceHandler *RIBDServer) SetupEventHandler(sub *nanomsg.SubSocket, address string, subtype ribd.Int)

func (*RIBDServer) StartArpdServer

func (ribdServiceHandler *RIBDServer) StartArpdServer()

func (*RIBDServer) StartAsicdServer

func (ribdServiceHandler *RIBDServer) StartAsicdServer()

func (*RIBDServer) StartDBServer

func (ribdServiceHandler *RIBDServer) StartDBServer()

func (*RIBDServer) StartPolicyServer

func (ribdServiceHandler *RIBDServer) StartPolicyServer()
   Handles all policy object config based server updates. The flow is:
                                               policyChannels
   userConfig------rpc(policyHandler_functions)----------------policyServer
                                                                 |
                                                              policy objects updated in RIB's GlobalpolicyEngine
													      send events to applications about these object configs
														 policy objects updated in RIB's local policy engine which
														 functions as filter

func (*RIBDServer) StartRouteProcessServer

func (ribdServiceHandler *RIBDServer) StartRouteProcessServer()

func (*RIBDServer) StartServer

func (ribdServiceHandler *RIBDServer) StartServer(paramsDir string)

func (*RIBDServer) StopServer

func (s *RIBDServer) StopServer()

func (RIBDServer) TrackReachabilityStatus

func (m RIBDServer) TrackReachabilityStatus(ipAddr string, protocol string, op string) error
    API called by external applications interested in tracking reachability status of a network
	This function adds and removes ipAddr from the TrachReachabilityMap based on the op value

func (*RIBDServer) UndoApplyPolicy

func (m *RIBDServer) UndoApplyPolicy(info *ribdInt.ApplyPolicyInfo, apply bool, db *policy.PolicyEngineDB)

func (RIBDServer) UpdateApplyPolicy

func (m RIBDServer) UpdateApplyPolicy(info *ribdInt.ApplyPolicyInfo, apply bool, db *policy.PolicyEngineDB)

func (*RIBDServer) UpdateApplyPolicyList

func (m *RIBDServer) UpdateApplyPolicyList(applyList []*ribdInt.ApplyPolicyInfo, undoList []*ribdInt.ApplyPolicyInfo, apply bool, db *policy.PolicyEngineDB)
    Function called when apply policy is called by an application
	Inputs:
	        info - type ApplyPolicyInfo - specifies the policy,
			                             Source protocol which is applying the policy,
                                          Conditions when to apply the policy,
                                          Action - what needs to be done on a hit
            apply - type bool - whether to apply the policy

func (*RIBDServer) UpdateGlobalPolicyConditionsFromDB

func (ribdServiceHandler *RIBDServer) UpdateGlobalPolicyConditionsFromDB(dbHdl *dbutils.DBUtil) (err error)

func (*RIBDServer) UpdateGlobalPolicyFromDB

func (ribdServiceHandler *RIBDServer) UpdateGlobalPolicyFromDB(dbHdl *dbutils.DBUtil) (err error)

func (*RIBDServer) UpdateGlobalPolicyPrefixSetsFromDB

func (ribdServiceHandler *RIBDServer) UpdateGlobalPolicyPrefixSetsFromDB(dbHdl *dbutils.DBUtil) (err error)

func (*RIBDServer) UpdateGlobalPolicyStmtsFromDB

func (ribdServiceHandler *RIBDServer) UpdateGlobalPolicyStmtsFromDB(dbHdl *dbutils.DBUtil) (err error)

func (*RIBDServer) UpdatePolicyObjectsFromDB

func (ribdServiceHandler *RIBDServer) UpdatePolicyObjectsFromDB()

func (*RIBDServer) UpdateRoutesFromDB

func (ribdServiceHandler *RIBDServer) UpdateRoutesFromDB() (err error)

func (RIBDServer) WriteIPv4RouteStateEntryToDB

func (m RIBDServer) WriteIPv4RouteStateEntryToDB(dbInfo RouteDBInfo) error

func (RIBDServer) WriteIPv6RouteStateEntryToDB

func (m RIBDServer) WriteIPv6RouteStateEntryToDB(dbInfo RouteDBInfo) error

type RIBdServerConfig

type RIBdServerConfig struct {
	OrigConfigObject          interface{}
	NewConfigObject           interface{}
	OrigBulkRouteConfigObject []*ribdInt.IPv4RouteConfig
	Bulk                      bool
	BulkEnd                   bool
	AttrSet                   []bool
	Op                        string //"add"/"del"/"update/get"
	PatchOp                   []*ribd.PatchOpInfo
	PolicyList                ApplyPolicyList
	AdditionalParams          interface{}
}

type RedistributeRouteInfo

type RedistributeRouteInfo struct {
	// contains filtered or unexported fields
}

type RedistributionPolicyInfo

type RedistributionPolicyInfo struct {
	// contains filtered or unexported fields
}

type RouteConfigInfo

type RouteConfigInfo struct {
	OrigRoute *ribd.IPv4Route
	NewRoute  *ribd.IPv4Route
	Attrset   []bool
	Op        string //"add"/"del"/"update"
}

type RouteCountInfo

type RouteCountInfo struct {
	// contains filtered or unexported fields
}

type RouteDBInfo

type RouteDBInfo struct {
	// contains filtered or unexported fields
}

type RouteDistanceConfig

type RouteDistanceConfig struct {
	// contains filtered or unexported fields
}

type RouteEventInfo

type RouteEventInfo struct {
	// contains filtered or unexported fields
}

event notification data-structure

type RouteInfoRecord

type RouteInfoRecord struct {
	// contains filtered or unexported fields
}

Data type of each route stored in the DB

var DummyRouteInfoRecord RouteInfoRecord

type RouteInfoRecordList

type RouteInfoRecordList struct {
	// contains filtered or unexported fields
}

Map of routeInfoRecords for each protocol type along with few other attributes

type RouteOpInfoRecord

type RouteOpInfoRecord struct {
	// contains filtered or unexported fields
}

data-structure used for add/delete operations

type RouteParams

type RouteParams struct {
	// contains filtered or unexported fields
}

data-structure used to communicate with policy engine

func BuildRouteParamsFromRouteInoRecord

func BuildRouteParamsFromRouteInoRecord(routeInfoRecord RouteInfoRecord) RouteParams

func BuildRouteParamsFromribdIPv4Route

func BuildRouteParamsFromribdIPv4Route(cfg *ribd.IPv4Route, createType int, deleteType int, sliceIdx ribd.Int) RouteParams

func BuildRouteParamsFromribdIPv6Route

func BuildRouteParamsFromribdIPv6Route(cfg *ribd.IPv6Route, createType int, deleteType int, sliceIdx ribd.Int) RouteParams

type RouteReachabilityStatusInfo

type RouteReachabilityStatusInfo struct {
	// contains filtered or unexported fields
}

to track reachability of a route

type TrackReachabilityInfo

type TrackReachabilityInfo struct {
	IpAddr   string
	Protocol string
	Op       string
}

type TraverseAndApplyPolicyData

type TraverseAndApplyPolicyData struct {
	// contains filtered or unexported fields
}

type V4IntfGetInfo

type V4IntfGetInfo struct {
	Count        int
	IPv4IntfList []*asicdServices.IPv4IntfState
}

type V6IntfGetInfo

type V6IntfGetInfo struct {
	Count        int
	IPv6IntfList []*asicdServices.IPv6IntfState
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL