Documentation ¶
Overview ¶
Package afthelper provides helper functions for handling the OpenConfig AFT schema.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NextHopAddrsForPrefix ¶
func NextHopAddrsForPrefix(rib map[string]*aft.RIB, netinst, prefix string) (map[string]*NextHopSummary, error)
NextHopAddrsForPrefix unrolls the prefix specified within the network-instance netInst from the specified ribs. It returns a map of next-hop IP address to a summary of the resolved next-hop.
TODO(robjs): support recursion.
Types ¶
type NextHopSummary ¶
type NextHopSummary struct { // Weight is the share of traffic that the next-hop gets. Weight uint64 `json:"weight"` // Address is the IP address of the next-hop. Address string `json:"address"` // NetworkInstance is the network instance within which the address was resolved. NetworkInstance string `json:"network-instance"` }
NextHopSummary provides a summary of an next-hop for a particular entry.
Click to show internal directories.
Click to hide internal directories.