diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2018-10-29 19:43:30 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2018-10-30 07:22:47 +0900 |
commit | 5a2985e52fa719731ea03bf23f88dad03984de84 (patch) | |
tree | 2c7220528c670542d140dc1c7110bff269fb0569 /pkg/server/peer.go | |
parent | 8bccb4278a1c6cb291a9635a4b2252372f074b7e (diff) |
server: unexport fsm stuff
No need to export the bgp peer internals.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'pkg/server/peer.go')
-rw-r--r-- | pkg/server/peer.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/pkg/server/peer.go b/pkg/server/peer.go index 28bf0fee..a33287b7 100644 --- a/pkg/server/peer.go +++ b/pkg/server/peer.go @@ -96,7 +96,7 @@ func newDynamicPeer(g *config.Global, neighborAddress string, pg *config.PeerGro type peer struct { tableId string - fsm *FSM + fsm *fsm adjRibIn *table.AdjRib outgoing *channels.InfiniteChannel policy *table.RoutingPolicy @@ -110,7 +110,7 @@ func newPeer(g *config.Global, conf *config.Neighbor, loc *table.TableManager, p outgoing: channels.NewInfiniteChannel(), localRib: loc, policy: policy, - fsm: NewFSM(g, conf, policy), + fsm: newFSM(g, conf, policy), prefixLimitWarned: make(map[bgp.RouteFamily]bool), } if peer.isRouteServerClient() { @@ -441,7 +441,7 @@ func (peer *peer) updatePrefixLimitConfig(c []config.AfiSafi) error { }).Warnf("update prefix limit configuration") peer.prefixLimitWarned[e.State.Family] = false if msg := peer.doPrefixLimit(e.State.Family, &e.PrefixLimit.Config); msg != nil { - sendFsmOutgoingMsg(peer, nil, msg, true) + sendfsmOutgoingMsg(peer, nil, msg, true) } } } @@ -451,7 +451,7 @@ func (peer *peer) updatePrefixLimitConfig(c []config.AfiSafi) error { return nil } -func (peer *peer) handleUpdate(e *FsmMsg) ([]*table.Path, []bgp.RouteFamily, *bgp.BGPMessage) { +func (peer *peer) handleUpdate(e *fsmMsg) ([]*table.Path, []bgp.RouteFamily, *bgp.BGPMessage) { m := e.MsgData.(*bgp.BGPMessage) update := m.Body.(*bgp.BGPUpdate) log.WithFields(log.Fields{ @@ -526,8 +526,8 @@ func (peer *peer) handleUpdate(e *FsmMsg) ([]*table.Path, []bgp.RouteFamily, *bg return nil, nil, nil } -func (peer *peer) startFSMHandler(incoming *channels.InfiniteChannel, stateCh chan *FsmMsg) { - handler := NewFSMHandler(peer.fsm, incoming, stateCh, peer.outgoing) +func (peer *peer) startFSMHandler(incoming *channels.InfiniteChannel, stateCh chan *fsmMsg) { + handler := newFSMHandler(peer.fsm, incoming, stateCh, peer.outgoing) peer.fsm.lock.Lock() peer.fsm.h = handler peer.fsm.lock.Unlock() |