summaryrefslogtreecommitdiffhomepage
path: root/packet/bgp.go
diff options
context:
space:
mode:
Diffstat (limited to 'packet/bgp.go')
-rw-r--r--packet/bgp.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/packet/bgp.go b/packet/bgp.go
index 407b4b9f..3e11bf8c 100644
--- a/packet/bgp.go
+++ b/packet/bgp.go
@@ -1104,6 +1104,8 @@ type PathAttributeInterface interface {
DecodeFromBytes([]byte) error
Serialize() ([]byte, error)
Len() int
+ getFlags() uint8
+ getType() BGPAttrType
}
type PathAttribute struct {
@@ -1123,6 +1125,14 @@ func (p *PathAttribute) Len() int {
return int(l)
}
+func (p *PathAttribute) getFlags() uint8 {
+ return p.Flags
+}
+
+func (p *PathAttribute) getType() BGPAttrType {
+ return p.Type
+}
+
func (p *PathAttribute) DecodeFromBytes(data []byte) error {
eCode := uint8(BGP_ERROR_UPDATE_MESSAGE_ERROR)
eSubCode := uint8(BGP_ERROR_SUB_ATTRIBUTE_LENGTH_ERROR)