Documentation ¶
Index ¶
- Constants
- Variables
- func NewBmpCmd() *cobra.Command
- func NewGlobalCmd() *cobra.Command
- func NewMonitorCmd() *cobra.Command
- func NewMrtCmd() *cobra.Command
- func NewNeighborCmd() *cobra.Command
- func NewPolicyCmd() *cobra.Command
- func NewRPKICmd() *cobra.Command
- func NewRootCmd() *cobra.Command
- func NewVrfCmd() *cobra.Command
- func ParseEVPNIPPrefixArgs(args []string) (bgp.AddrPrefixInterface, []string, error)
- func ParseEvpnArgs(args []string) (bgp.AddrPrefixInterface, []string, error)
- func ParseEvpnMacAdvArgs(args []string) (bgp.AddrPrefixInterface, []string, error)
- func ParseEvpnMulticastArgs(args []string) (bgp.AddrPrefixInterface, []string, error)
- func ParseExtendedCommunities(input string) ([]bgp.ExtendedCommunityInterface, error)
- func ParseFlowSpecArgs(rf bgp.RouteFamily, args []string, rd bgp.RouteDistinguisherInterface) (bgp.AddrPrefixInterface, []string, error)
- func ParsePath(rf bgp.RouteFamily, args []string) (*table.Path, error)
- func ShowRoute(pathList []*table.Path, ...)
- type AsPathFormat
- type ExtCommType
Constants ¶
View Source
const ( CMD_GLOBAL = "global" CMD_NEIGHBOR = "neighbor" CMD_POLICY = "policy" CMD_RIB = "rib" CMD_ADD = "add" CMD_DEL = "del" CMD_ALL = "all" CMD_SET = "set" CMD_LOCAL = "local" CMD_ADJ_IN = "adj-in" CMD_ADJ_OUT = "adj-out" CMD_RESET = "reset" CMD_SOFT_RESET = "softreset" CMD_SOFT_RESET_IN = "softresetin" CMD_SOFT_RESET_OUT = "softresetout" CMD_SHUTDOWN = "shutdown" CMD_ENABLE = "enable" CMD_DISABLE = "disable" CMD_PREFIX = "prefix" CMD_ASPATH = "as-path" CMD_COMMUNITY = "community" CMD_EXTCOMMUNITY = "ext-community" CMD_IMPORT = "import" CMD_EXPORT = "export" CMD_IN = "in" CMD_MONITOR = "monitor" CMD_MRT = "mrt" CMD_DUMP = "dump" CMD_INJECT = "inject" CMD_RPKI = "rpki" CMD_RPKI_TABLE = "table" CMD_RPKI_SERVER = "server" CMD_VRF = "vrf" CMD_ACCEPTED = "accepted" CMD_REJECTED = "rejected" CMD_STATEMENT = "statement" CMD_CONDITION = "condition" CMD_ACTION = "action" CMD_UPDATE = "update" CMD_ROTATE = "rotate" CMD_BMP = "bmp" CMD_LARGECOMMUNITY = "large-community" CMD_SUMMARY = "summary" )
Variables ¶
View Source
var ExtCommNameMap = map[ExtCommType]string{ ACCEPT: "accept", DISCARD: "discard", RATE: "rate-limit", REDIRECT: "redirect", MARK: "mark", ACTION: "action", RT: "rt", ENCAP: "encap", VALID: "valid", NOT_FOUND: "not-found", INVALID: "invalid", }
View Source
var ExtCommParserMap = map[ExtCommType]func([]string) ([]bgp.ExtendedCommunityInterface, error){ ACCEPT: nil, DISCARD: rateLimitParser, RATE: rateLimitParser, REDIRECT: redirectParser, MARK: markParser, ACTION: actionParser, RT: rtParser, ENCAP: encapParser, VALID: validationParser, NOT_FOUND: validationParser, INVALID: validationParser, }
View Source
var ExtCommValueMap = map[string]ExtCommType{ ExtCommNameMap[ACCEPT]: ACCEPT, ExtCommNameMap[DISCARD]: DISCARD, ExtCommNameMap[RATE]: RATE, ExtCommNameMap[REDIRECT]: REDIRECT, ExtCommNameMap[MARK]: MARK, ExtCommNameMap[ACTION]: ACTION, ExtCommNameMap[RT]: RT, ExtCommNameMap[ENCAP]: ENCAP, ExtCommNameMap[VALID]: VALID, ExtCommNameMap[NOT_FOUND]: NOT_FOUND, ExtCommNameMap[INVALID]: INVALID, }
Functions ¶
func NewGlobalCmd ¶
func NewMonitorCmd ¶
func NewNeighborCmd ¶
func NewPolicyCmd ¶
func NewRPKICmd ¶
func NewRootCmd ¶
func ParseEVPNIPPrefixArgs ¶
func ParseEVPNIPPrefixArgs(args []string) (bgp.AddrPrefixInterface, []string, error)
func ParseEvpnArgs ¶
func ParseEvpnArgs(args []string) (bgp.AddrPrefixInterface, []string, error)
func ParseEvpnMacAdvArgs ¶
func ParseEvpnMacAdvArgs(args []string) (bgp.AddrPrefixInterface, []string, error)
func ParseEvpnMulticastArgs ¶
func ParseEvpnMulticastArgs(args []string) (bgp.AddrPrefixInterface, []string, error)
func ParseExtendedCommunities ¶
func ParseExtendedCommunities(input string) ([]bgp.ExtendedCommunityInterface, error)
func ParseFlowSpecArgs ¶
func ParseFlowSpecArgs(rf bgp.RouteFamily, args []string, rd bgp.RouteDistinguisherInterface) (bgp.AddrPrefixInterface, []string, error)
Types ¶
type AsPathFormat ¶
type AsPathFormat struct {
// contains filtered or unexported fields
}
type ExtCommType ¶
type ExtCommType int
const ( ACCEPT ExtCommType = iota DISCARD RATE REDIRECT MARK ACTION RT ENCAP VALID NOT_FOUND INVALID )
Click to show internal directories.
Click to hide internal directories.