summaryrefslogtreecommitdiffhomepage
path: root/packet
diff options
context:
space:
mode:
Diffstat (limited to 'packet')
-rw-r--r--packet/bgp.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/packet/bgp.go b/packet/bgp.go
index 60502e1a..527ebb7a 100644
--- a/packet/bgp.go
+++ b/packet/bgp.go
@@ -68,6 +68,7 @@ type ParameterCapabilityInterface interface {
DecodeFromBytes([]byte) error
Serialize() ([]byte, error)
Len() int
+ Code() BGPCapabilityCode
}
type DefaultParameterCapability struct {
@@ -76,6 +77,10 @@ type DefaultParameterCapability struct {
CapValue []byte
}
+func (c *DefaultParameterCapability) Code() BGPCapabilityCode {
+ return c.CapCode
+}
+
func (c *DefaultParameterCapability) DecodeFromBytes(data []byte) error {
c.CapCode = BGPCapabilityCode(data[0])
c.CapLen = data[1]