Documentation
¶
Index ¶
- Constants
- func AsPathTokenGet(str string) (string, int, uint32)
- func AsSegmentDelimiter(typ uint8) (string, string)
- func MatchVersion(rule interface{}, val interface{}) bool
- func MatchVersionCompile(args []string) interface{}
- type ASPath
- type Action
- type As2Segment
- type As4Segment
- func (seg *As4Segment) Append(asnum uint32)
- func (seg *As4Segment) DecodeFromBytes(data []byte) error
- func (seg *As4Segment) EncodeLength() int
- func (seg *As4Segment) GetLength() int
- func (seg *As4Segment) GetType() uint8
- func (seg *As4Segment) PathLength() int
- func (seg *As4Segment) Replace(from, to uint32)
- func (seg *As4Segment) Serialize() ([]byte, error)
- func (seg *As4Segment) String() string
- type AsPath
- type AsSegmentInterface
- type DecodeOption
- type MatchTag
- type PrefixList
- type PrefixListEntry
- type PrefixListEntrySlice
- type PrefixListMaster
- func (m *PrefixListMaster) Delete(name string)
- func (m *PrefixListMaster) DescriptionSet(name string, desc string)
- func (m *PrefixListMaster) DescriptionUnset(name string, desc string)
- func (m *PrefixListMaster) EntryAdd(name string, entry *PrefixListEntry) error
- func (m *PrefixListMaster) EntryDelete(name string, entry *PrefixListEntry)
- func (m *PrefixListMaster) Get(name string) *PrefixList
- func (m *PrefixListMaster) Lookup(name string) *PrefixList
- type PrefixListOption
- type RouteMap
- type RouteMapAction
- type RouteMapEntry
- type RouteMapMaster
- type RouteMapMatch
Constants ¶
View Source
const ( AS_SET = 1 AS_SEQUENCE = 2 AS_CONFED_SEQUENCE = 3 AS_CONFED_SET = 4 )
View Source
const ( Permit = true Deny = false )
Variables ¶
This section is empty.
Functions ¶
func AsSegmentDelimiter ¶ added in v1.8.1
func MatchVersion ¶ added in v1.8.1
func MatchVersion(rule interface{}, val interface{}) bool
func MatchVersionCompile ¶ added in v1.8.1
func MatchVersionCompile(args []string) interface{}
Types ¶
type ASPath ¶ added in v1.8.1
type ASPath struct {
// contains filtered or unexported fields
}
////////////////////////////
func (*ASPath) DecodeFromBytes ¶ added in v1.8.1
func (aspath *ASPath) DecodeFromBytes(data []byte, opts ...DecodeOption) error
type Action ¶ added in v1.8.1
type Action bool
func String2Action ¶ added in v1.8.1
func (Action) MarshalJSON ¶ added in v1.8.1
type As2Segment ¶ added in v1.8.1
func (*As2Segment) DecodeFromBytes ¶ added in v1.8.1
func (seg *As2Segment) DecodeFromBytes(data []byte) error
func (*As2Segment) EncodeLength ¶ added in v1.8.1
func (seg *As2Segment) EncodeLength() int
func (*As2Segment) PathLength ¶ added in v1.8.1
func (seg *As2Segment) PathLength() int
func (*As2Segment) Serialize ¶ added in v1.8.1
func (seg *As2Segment) Serialize() ([]byte, error)
func (*As2Segment) String ¶ added in v1.8.1
func (seg *As2Segment) String() string
type As4Segment ¶ added in v1.8.1
func NewAs4Segment ¶ added in v1.8.1
func NewAs4Segment(typ uint8) *As4Segment
func (*As4Segment) Append ¶ added in v1.8.1
func (seg *As4Segment) Append(asnum uint32)
func (*As4Segment) DecodeFromBytes ¶ added in v1.8.1
func (seg *As4Segment) DecodeFromBytes(data []byte) error
func (*As4Segment) EncodeLength ¶ added in v1.8.1
func (seg *As4Segment) EncodeLength() int
func (*As4Segment) GetLength ¶ added in v1.8.1
func (seg *As4Segment) GetLength() int
func (*As4Segment) GetType ¶ added in v1.8.1
func (seg *As4Segment) GetType() uint8
func (*As4Segment) PathLength ¶ added in v1.8.1
func (seg *As4Segment) PathLength() int
func (*As4Segment) Replace ¶ added in v1.8.1
func (seg *As4Segment) Replace(from, to uint32)
func (*As4Segment) Serialize ¶ added in v1.8.1
func (seg *As4Segment) Serialize() ([]byte, error)
func (*As4Segment) String ¶ added in v1.8.1
func (seg *As4Segment) String() string
type AsPath ¶ added in v1.8.1
type AsPath []AsSegmentInterface
func AsPathParse ¶ added in v1.8.1
func (AsPath) PathLength ¶ added in v1.8.1
type AsSegmentInterface ¶ added in v1.8.1
type DecodeOption ¶ added in v1.8.1
type DecodeOption func() int
func With2Octet ¶ added in v1.8.1
func With2Octet() DecodeOption
type MatchTag ¶ added in v1.8.1
type MatchTag struct {
// contains filtered or unexported fields
}
MatchTag for route-map match statement such as "match tag 100".
type PrefixList ¶ added in v1.8.1
type PrefixList struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
Entries PrefixListEntrySlice `json:"seq"`
}
func NewPrefixList ¶ added in v1.8.1
func NewPrefixList(name string) *PrefixList
func (*PrefixList) AddWithClosure ¶ added in v1.8.1
func (plist *PrefixList) AddWithClosure(entry *PrefixListEntry)
func (*PrefixList) EntryAdd ¶ added in v1.8.1
func (plist *PrefixList) EntryAdd(entry *PrefixListEntry)
func (*PrefixList) EntryDelete ¶ added in v1.8.1
func (plist *PrefixList) EntryDelete(entry *PrefixListEntry)
type PrefixListEntry ¶ added in v1.8.1
type PrefixListEntry struct {
Seq int `json:"number"`
Action Action `json:"action"`
Prefix *netutil.Prefix `json:"prefix"`
Le *int `json:"le,omitempty"`
Ge *int `json:"ge,omitempty"`
Eq *int `json:"eq,omitempty"`
}
func NewPrefixListEntry ¶ added in v1.8.1
func NewPrefixListEntry(seq int, action Action, p *netutil.Prefix, opts ...PrefixListOption) *PrefixListEntry
func (*PrefixListEntry) Match ¶ added in v1.8.1
func (entry *PrefixListEntry) Match(p *netutil.Prefix) bool
func (*PrefixListEntry) Validate ¶ added in v1.8.1
func (entry *PrefixListEntry) Validate() error
type PrefixListEntrySlice ¶ added in v1.8.1
type PrefixListEntrySlice []*PrefixListEntry
func (PrefixListEntrySlice) Add ¶ added in v1.8.1
func (entries PrefixListEntrySlice) Add(entry *PrefixListEntry) PrefixListEntrySlice
type PrefixListMaster ¶ added in v1.8.1
type PrefixListMaster struct {
PrefixLists map[string]*PrefixList `json:"prefix-lists"`
}
func NewPrefixListMaster ¶ added in v1.8.1
func NewPrefixListMaster() *PrefixListMaster
func PrefixListMasterFromJSON ¶ added in v1.8.1
func PrefixListMasterFromJSON(cfg *config.PrefixLists) *PrefixListMaster
func (*PrefixListMaster) Delete ¶ added in v1.8.1
func (m *PrefixListMaster) Delete(name string)
func (*PrefixListMaster) DescriptionSet ¶ added in v1.8.1
func (m *PrefixListMaster) DescriptionSet(name string, desc string)
func (*PrefixListMaster) DescriptionUnset ¶ added in v1.8.1
func (m *PrefixListMaster) DescriptionUnset(name string, desc string)
func (*PrefixListMaster) EntryAdd ¶ added in v1.8.1
func (m *PrefixListMaster) EntryAdd(name string, entry *PrefixListEntry) error
func (*PrefixListMaster) EntryDelete ¶ added in v1.8.1
func (m *PrefixListMaster) EntryDelete(name string, entry *PrefixListEntry)
func (*PrefixListMaster) Get ¶ added in v1.8.1
func (m *PrefixListMaster) Get(name string) *PrefixList
func (*PrefixListMaster) Lookup ¶ added in v1.8.1
func (m *PrefixListMaster) Lookup(name string) *PrefixList
type PrefixListOption ¶ added in v1.8.1
type PrefixListOption func(*PrefixListEntry)
func WithEq ¶ added in v1.8.1
func WithEq(val int) PrefixListOption
func WithGe ¶ added in v1.8.1
func WithGe(val int) PrefixListOption
func WithLe ¶ added in v1.8.1
func WithLe(val int) PrefixListOption
type RouteMap ¶ added in v1.8.1
type RouteMap struct {
// contains filtered or unexported fields
}
func (*RouteMap) RouteMapEntryAdd ¶ added in v1.8.1
func (rmap *RouteMap) RouteMapEntryAdd(ent *RouteMapEntry)
type RouteMapAction ¶ added in v1.8.1
type RouteMapAction interface {
Action(interface{}, interface{})
}
type RouteMapEntry ¶ added in v1.8.1
type RouteMapEntry struct {
// contains filtered or unexported fields
}
func NewRouteMapEntry ¶ added in v1.8.1
func NewRouteMapEntry(typ Action, seq uint32) *RouteMapEntry
func (*RouteMapEntry) Action ¶ added in v1.8.1
func (ent *RouteMapEntry) Action(p, r interface{})
func (*RouteMapEntry) Match ¶ added in v1.8.1
func (ent *RouteMapEntry) Match(p, r interface{}) bool
func (*RouteMapEntry) MatchAdd ¶ added in v1.8.1
func (rmap *RouteMapEntry) MatchAdd(name string, args ...string)
type RouteMapMaster ¶ added in v1.8.1
func NewRouteMapMaster ¶ added in v1.8.1
func NewRouteMapMaster() *RouteMapMaster
func (*RouteMapMaster) RouteMapEntryGet ¶ added in v1.8.1
func (m *RouteMapMaster) RouteMapEntryGet(name string, typ Action, seq uint32) *RouteMapEntry
func (*RouteMapMaster) RouteMapLookup ¶ added in v1.8.1
func (m *RouteMapMaster) RouteMapLookup(name string) *RouteMap
type RouteMapMatch ¶ added in v1.8.1
Click to show internal directories.
Click to hide internal directories.