Documentation ¶
Index ¶
Constants ¶
View Source
const ( ASPathSegmentTypeSet = iota ASPathSegmentTypeSequence )
Similar to https://github.com/kaorimatz/go-mrt/blob/master/bgp.go#L29-L32
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ASNDatabase ¶
type ASNDatabase struct {
Entries []PrefixOrigin
}
func (ASNDatabase) MarshalText ¶
func (db ASNDatabase) MarshalText(singleAS bool) ([]byte, error)
TODO: Deduplicate code
func (*ASNDatabase) UnmarshalText ¶ added in v0.0.2
func (db *ASNDatabase) UnmarshalText(data []byte) error
type ASNTree ¶
type ASNTree struct {
// contains filtered or unexported fields
}
func NewASNTree ¶
func NewASNTree(prefixes []PrefixOrigin) (*ASNTree, error)
func NewASNTreeFromFile ¶ added in v0.0.2
TODO: Detect file type (txt, json, ...)
func NewASNTreeFromText ¶ added in v0.0.4
func (ASNTree) LookupIPMultiple ¶ added in v0.0.2
type ASPathSegment ¶
type IXPDatabase ¶
type IXPDatabase struct {
Entries []PrefixIXP
}
func (IXPDatabase) MarshalText ¶ added in v0.0.2
func (db IXPDatabase) MarshalText() ([]byte, error)
TODO: Deduplicate code
func (*IXPDatabase) UnmarshalText ¶ added in v0.0.2
func (db *IXPDatabase) UnmarshalText(data []byte) error
type IXPTree ¶
type IXPTree struct {
// contains filtered or unexported fields
}
func (IXPTree) LookupIPMultiple ¶ added in v0.0.3
type PrefixIXP ¶
PrefixIXP represents the IXP associated to a prefix.
func (PrefixIXP) MarshalText ¶ added in v0.0.2
func (*PrefixIXP) UnmarshalText ¶ added in v0.0.2
type PrefixOrigin ¶
PrefixOrigin represents the origin AS(es) associated to a prefix. There can be multiple ASes if the prefix is multi-homed.
func NewPrefixOrigin ¶
func NewPrefixOrigin(e RIBEntry) PrefixOrigin
func (PrefixOrigin) MarshalText ¶ added in v0.0.2
func (p PrefixOrigin) MarshalText(singleAS bool) ([]byte, error)
func (*PrefixOrigin) UnmarshalText ¶ added in v0.0.2
func (p *PrefixOrigin) UnmarshalText(data []byte) error
Click to show internal directories.
Click to hide internal directories.