Documentation
¶
Index ¶
- Constants
- func AttrToString(attrs *pbbgp.BGPUpdate_Attributes) string
- func NewBgpHeaderBuf(buf []byte, v6, as4 bool) *bgpHeaderBuf
- func NewBgpUpdateBuf(buf []byte, v6, as4 bool) *bgpUpdateBuf
- func ParseAttrs(buf []byte, as4, v6 bool) (*pbbgp.BGPUpdate_Attributes, error, []*pbcom.PrefixWrapper, ...)
- type AggregatorWrapper
- type AttrsWrapper
- type PrefixWrapper
- type UpdateWrapper
Constants ¶
View Source
const ( AFI_IP = 1 AFI_IP6 = 2 )
Variables ¶
This section is empty.
Functions ¶
func AttrToString ¶
func AttrToString(attrs *pbbgp.BGPUpdate_Attributes) string
func NewBgpHeaderBuf ¶
func NewBgpUpdateBuf ¶
func ParseAttrs ¶
func ParseAttrs(buf []byte, as4, v6 bool) (*pbbgp.BGPUpdate_Attributes, error, []*pbcom.PrefixWrapper, []*pbcom.PrefixWrapper)
Types ¶
type AggregatorWrapper ¶
type AggregatorWrapper struct { *pbbgp.BGPUpdate_Aggregator Ip net.IP `json:"ip,omitempty"` }
func NewAggregatorWrapper ¶
func NewAggregatorWrapper(base *pbbgp.BGPUpdate_Aggregator) *AggregatorWrapper
type AttrsWrapper ¶
type AttrsWrapper struct { *pbbgp.BGPUpdate_Attributes NextHop net.IP `json:"next_hop,omitempty"` Aggregator *AggregatorWrapper `json:"aggregator,omitempty"` }
func NewAttrsWrapper ¶
func NewAttrsWrapper(base *pbbgp.BGPUpdate_Attributes) *AttrsWrapper
type PrefixWrapper ¶
Neither of these fields should be omitted
func NewPrefixWrapper ¶
func NewPrefixWrapper(pw *pbcom.PrefixWrapper) *PrefixWrapper
type UpdateWrapper ¶
type UpdateWrapper struct { AdvertizedRoutes []*PrefixWrapper `json:"advertized_routes,omitempty"` WithdrawnRoutes []*PrefixWrapper `json:"withdrawn_routes,omitempty"` Attrs *AttrsWrapper `json:"attrs,omitempty"` }
func NewUpdateWrapper ¶
func NewUpdateWrapper(update *pbbgp.BGPUpdate) *UpdateWrapper
Click to show internal directories.
Click to hide internal directories.