summaryrefslogtreecommitdiffhomepage
path: root/packet/bgp.go
diff options
context:
space:
mode:
Diffstat (limited to 'packet/bgp.go')
-rw-r--r--packet/bgp.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/packet/bgp.go b/packet/bgp.go
index 580c32ff..59d62915 100644
--- a/packet/bgp.go
+++ b/packet/bgp.go
@@ -1831,6 +1831,12 @@ type NLRInfo struct {
IPAddrPrefix
}
+func NewNLRInfo(length uint8, prefix string) *NLRInfo {
+ return &NLRInfo{
+ IPAddrPrefix: *NewIPAddrPrefix(length, prefix),
+ }
+}
+
type BGPUpdate struct {
WithdrawnRoutesLen uint16
WithdrawnRoutes []WithdrawnRoute