Documentation ¶
Index ¶
Constants ¶
const ( // ASSet is the AS Path type used to indicate an AS Set (RFC4271) ASSet = 1 // ASSequence is tha AS Path type used to indicate an AS Sequence (RFC4271) ASSequence = 2 // MaxASNsSegment is the maximum number of ASNs in an AS segment MaxASNsSegment = 255 )
ASPath Segment Types
const ( // WellKnownCommunityNoExport is the well known no export BGP community (RFC1997) WellKnownCommunityNoExport = 0xFFFFFF01 // WellKnownCommunityNoAdvertise is the well known no advertise BGP community (RFC1997) WellKnownCommunityNoAdvertise = 0xFFFFFF02 )
Variables ¶
This section is empty.
Functions ¶
func CommunityStringForUint32 ¶
CommunityStringForUint32 transforms a community into a human readable representation
func ParseCommunityString ¶
ParseCommunityString parses human readable community representation
Types ¶
type ASPath ¶
type ASPath []ASPathSegment
ASPath represents an AS Path (RFC4271)
func ASPathFromProtoASPath ¶
func ASPathFromProtoASPath(segments []*api.ASPathSegment) *ASPath
ASPathFromProtoASPath converts an proto ASPath to ASPath
func (ASPath) ToProto ¶
func (pa ASPath) ToProto() []*api.ASPathSegment
ToProto converts ASPath to proto ASPath
type ASPathSegment ¶
ASPathSegment represents an AS Path Segment (RFC4271)
func (ASPathSegment) Compare ¶
func (s ASPathSegment) Compare(t ASPathSegment) bool
Compare checks if ASPathSegments are the same
type Aggregator ¶
Aggregator represents an AGGREGATOR attribute (type code 7) as in RFC4271
type ClusterList ¶
type ClusterList []uint32
func (*ClusterList) String ¶
func (cl *ClusterList) String() string
type Communities ¶
type Communities []uint32
func (*Communities) String ¶
func (c *Communities) String() string
type LargeCommunities ¶
type LargeCommunities []LargeCommunity
func (*LargeCommunities) String ¶
func (lc *LargeCommunities) String() string
type LargeCommunity ¶
LargeCommunity represents a large community (RFC8195)
func LargeCommunityFromProtoCommunity ¶
func LargeCommunityFromProtoCommunity(alc *api.LargeCommunity) LargeCommunity
LargeCommunityFromProtoCommunity converts a proto LargeCommunity to LargeCommunity
func ParseLargeCommunityString ¶
func ParseLargeCommunityString(s string) (com LargeCommunity, err error)
ParseLargeCommunityString parses a human readable large community representation
func (*LargeCommunity) String ¶
func (c *LargeCommunity) String() string
String transitions a large community to it's human readable representation
func (*LargeCommunity) ToProto ¶
func (c *LargeCommunity) ToProto() *api.LargeCommunity
ToProto converts LargeCommunity to proto LargeCommunity
type UnknownPathAttribute ¶
type UnknownPathAttribute struct { Optional bool Transitive bool Partial bool TypeCode uint8 Value []byte }
UnknownPathAttribute represents an unknown path attribute BIO does not support
func UnknownPathAttributeFromProtoUnknownPathAttribute ¶
func UnknownPathAttributeFromProtoUnknownPathAttribute(x *api.UnknownPathAttribute) UnknownPathAttribute
UnknownPathAttributeFromProtoUnknownPathAttribute convers an proto UnknownPathAttribute to UnknownPathAttribute
func (*UnknownPathAttribute) Compare ¶
func (u *UnknownPathAttribute) Compare(s *UnknownPathAttribute) bool
Compare compares unknown attributes
func (*UnknownPathAttribute) ToProto ¶
func (u *UnknownPathAttribute) ToProto() *api.UnknownPathAttribute
ToProto converts UnknownPathAttribute to proto UnknownPathAttribute
func (*UnknownPathAttribute) WireLength ¶
func (u *UnknownPathAttribute) WireLength() uint16
WireLength returns the number of bytes the attribute need on the wire