Versions in this module Expand all Collapse all v0 v0.5.1 Jun 13, 2025 Changes in this version type Msg + Version int + func (msg *Msg) Edit(cond ...bool) type Update + func (u *Update) AfiSafi() afi.AS + func (u *Update) AllReach() []nlri.NLRI + func (u *Update) AllUnreach() []nlri.NLRI + func (u *Update) Community() *attrs.Community + func (u *Update) ExtCommunity() *attrs.Extcom + func (u *Update) LargeCommunity() *attrs.LargeCom v0.5.0 Oct 4, 2024 v0.4.0 Oct 4, 2024 Changes in this version type Update + func (u *Update) AS() afi.AS + func (u *Update) AsPath() *attrs.Aspath + func (u *Update) GetReach(dst []nlri.NLRI) []nlri.NLRI + func (u *Update) GetUnreach(dst []nlri.NLRI) []nlri.NLRI + func (u *Update) HasReach() bool + func (u *Update) HasUnreach() bool + func (u *Update) MP(ac attrs.Code) *attrs.MP + func (u *Update) NextHop() (nh netip.Addr) v0.3.0 May 22, 2024 Changes in this version type Msg + func (msg *Msg) Len() int v0.2.0 Apr 12, 2024 Changes in this version + var BgpMarker = []byte v0.1.7 Mar 22, 2024 Changes in this version + var ErrNoData = errors.New("no message data") + var ErrNoUpper = errors.New("no upper layer") type Msg + func (msg *Msg) DropData() *Msg + func (msg *Msg) FromBytes(buf []byte) (off int, err error) + func (msg *Msg) GetJSON() []byte + func (msg *Msg) Marshal(cps caps.Caps) error + func (msg *Msg) Modified() + func (msg *Msg) Use(typ Type) *Msg v0.1.6 Feb 19, 2024 v0.1.4 Oct 30, 2023 Changes in this version type Update + func (u *Update) AF() af.AF v0.1.3 Oct 26, 2023 v0.1.2 Oct 26, 2023 v0.1.1 Oct 26, 2023 Changes in this version + const AS_TRANS + const HEADLEN + const JSON_TIME + const MAXLEN + const MAXLEN_EXT + const OPEN_HOLDTIME + const OPEN_MINLEN + const OPEN_VERSION + const PARAM_CAPS + const PARAM_EXTLEN + const UPDATE_MINLEN + var ErrAttrCode = errors.New("invalid attribute code") + var ErrAttrDupe = errors.New("duplicate attribute") + var ErrAttrFlags = errors.New("invalid attribute flags") + var ErrAttrs = errors.New("invalid attributes") + var ErrCaps = errors.New("invalid capabilities") + var ErrLength = errors.New("invalid length") + var ErrLong = errors.New("too long") + var ErrMarker = errors.New("marker not found") + var ErrParams = errors.New("invalid parameters") + var ErrSegLen = errors.New("invalid segment length") + var ErrSegType = errors.New("invalid segment type") + var ErrShort = errors.New("too short") + var ErrTODO = errors.New("not implemented") + var ErrType = errors.New("invalid type") + var ErrUnsupported = errors.New("unsupported") + var ErrValue = errors.New("invalid value") + var ErrVersion = errors.New("invalid version") + func DirStrings() []string + func TypeStrings() []string + type Dir byte + const DIR_L + const DIR_LR + const DIR_R + func DirString(s string) (Dir, error) + func DirValues() []Dir + func (d Dir) Flip() Dir + func (i Dir) IsADir() bool + func (i Dir) String() string + type Msg struct + Data []byte + Dir Dir + Dirty bool + Open Open + Seq int64 + Time time.Time + Type Type + Update Update + Upper Type + Value Value + func NewMsg() *Msg + func (msg *Msg) CopyData() *Msg + func (msg *Msg) Disown() *Msg + func (msg *Msg) FromJSON(src []byte) (reterr error) + func (msg *Msg) Length() int + func (msg *Msg) MarshalUpper(caps caps.Caps) error + func (msg *Msg) Own() *Msg + func (msg *Msg) Parse(raw []byte) (off int, err error) + func (msg *Msg) ParseUpper(caps caps.Caps) error + func (msg *Msg) Reset() *Msg + func (msg *Msg) SetData(data []byte) *Msg + func (msg *Msg) String() string + func (msg *Msg) ToJSON(dst []byte) []byte + func (msg *Msg) Up(typ Type) *Msg + func (msg *Msg) WriteTo(w io.Writer) (n int64, err error) + type Open struct + ASN uint16 + Caps caps.Caps + HoldTime uint16 + Identifier netip.Addr + Msg *Msg + Params []byte + ParamsExt bool + Version byte + func (o *Open) FromJSON(src []byte) error + func (o *Open) GetASN() int + func (o *Open) Init(m *Msg) + func (o *Open) Marshal() error + func (o *Open) MarshalCaps() error + func (o *Open) Parse() error + func (o *Open) ParseCaps() error + func (o *Open) Reset() + func (o *Open) SetASN(asn int) + func (o *Open) String() string + func (o *Open) ToJSON(dst []byte) []byte + type Type byte + const INVALID + const KEEPALIVE + const NOTIFY + const OPEN + const REFRESH + const UPDATE + func TypeString(s string) (Type, error) + func TypeValues() []Type + func (i Type) IsAType() bool + func (i Type) String() string + type Update struct + Attrs attrs.Attrs + Msg *Msg + RawAttrs []byte + Reach []netip.Prefix + Unreach []netip.Prefix + func (u *Update) Afi() af.AFI + func (u *Update) FromJSON(src []byte) error + func (u *Update) Init(m *Msg) + func (u *Update) Marshal(cps caps.Caps) error + func (u *Update) MarshalAttrs(cps caps.Caps) error + func (u *Update) Parse() error + func (u *Update) ParseAttrs(cps caps.Caps) error + func (u *Update) ReachMP() attrs.MPValue + func (u *Update) Reset() + func (u *Update) Safi() af.SAFI + func (u *Update) String() string + func (u *Update) ToJSON(dst []byte) []byte + func (u *Update) UnreachMP() attrs.MPValue + type Value interface + FromJSON func(src []byte) error + ToJSON func(dst []byte) []byte