diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-12-30 23:42:21 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-12-30 23:42:21 +0900 |
commit | a9160a0061dfeab8a9c48b2b3908832492799fd3 (patch) | |
tree | d7cc7298ca36bd955748f71da2af263e4765075d /table/message.go | |
parent | 7cac8709ad043b8aa2ce7dae378b7f921071835d (diff) |
table: Path's getnlri, getpathattrs, getpathattr private
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'table/message.go')
-rw-r--r-- | table/message.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/table/message.go b/table/message.go index a22c3b01..dac7c439 100644 --- a/table/message.go +++ b/table/message.go @@ -126,22 +126,22 @@ func CreateUpdateMsgFromPath(path Path, msg *bgp.BGPMessage) (*bgp.BGPMessage, e if rf == bgp.RF_IPv4_UC { if path.IsWithdraw() { - draw := path.GetNlri().(*bgp.WithdrawnRoute) + draw := path.getNlri().(*bgp.WithdrawnRoute) return bgp.NewBGPUpdateMessage([]bgp.WithdrawnRoute{*draw}, []bgp.PathAttributeInterface{}, []bgp.NLRInfo{}), nil } else { - nlri := path.GetNlri().(*bgp.NLRInfo) - pathAttrs := path.GetPathAttrs() + nlri := path.getNlri().(*bgp.NLRInfo) + pathAttrs := path.getPathAttrs() return bgp.NewBGPUpdateMessage([]bgp.WithdrawnRoute{}, pathAttrs, []bgp.NLRInfo{*nlri}), nil } } else if rf == bgp.RF_IPv6_UC { if path.IsWithdraw() { - clonedAttrs := clonePathAttributes(path.GetPathAttrs()) - idx, attr := path.GetPathAttr(bgp.BGP_ATTR_TYPE_MP_REACH_NLRI) + clonedAttrs := clonePathAttributes(path.getPathAttrs()) + idx, attr := path.getPathAttr(bgp.BGP_ATTR_TYPE_MP_REACH_NLRI) reach := attr.(*bgp.PathAttributeMpReachNLRI) clonedAttrs[idx] = bgp.NewPathAttributeMpUnreachNLRI(reach.Value) return bgp.NewBGPUpdateMessage([]bgp.WithdrawnRoute{}, clonedAttrs, []bgp.NLRInfo{}), nil } else { - return bgp.NewBGPUpdateMessage([]bgp.WithdrawnRoute{}, path.GetPathAttrs(), []bgp.NLRInfo{}), nil + return bgp.NewBGPUpdateMessage([]bgp.WithdrawnRoute{}, path.getPathAttrs(), []bgp.NLRInfo{}), nil } } return nil, nil |