From 6c86d7507223df3b8dd46149a5ffd6518d244fd8 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Tue, 4 Nov 2014 01:10:32 +0900 Subject: packet: add NewNLRInfo function Signed-off-by: FUJITA Tomonori --- packet/bgp.go | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- cgit v1.2.3