diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-11-04 01:10:32 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-11-04 01:11:14 +0900 |
commit | 6c86d7507223df3b8dd46149a5ffd6518d244fd8 (patch) | |
tree | d9b543376d367be2f92149fbeee2e3906a04e9d2 /packet/bgp.go | |
parent | b4c787686c302c146e3cad42057db2cb01149056 (diff) |
packet: add NewNLRInfo function
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'packet/bgp.go')
-rw-r--r-- | packet/bgp.go | 6 |
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 |