summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2015-11-08 16:28:47 +0900
committerISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2015-11-11 00:31:35 +0900
commit318b3af291c5c1ed36f630fced6a521b136d4d54 (patch)
tree63d27d244bf3d9b7411c93df1d4a767053c87faf
parent403ae3580bbaeb49da535efa66b96ee7b87b31d9 (diff)
server: add MsgDst to FsmMsg
will use this later for performance test Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
-rw-r--r--server/fsm.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/server/fsm.go b/server/fsm.go
index 4ac2a4b1..7df4b632 100644
--- a/server/fsm.go
+++ b/server/fsm.go
@@ -39,6 +39,7 @@ const (
type FsmMsg struct {
MsgType FsmMsgType
MsgSrc string
+ MsgDst string
MsgData interface{}
PathList []*table.Path
}
@@ -457,6 +458,7 @@ func (h *FSMHandler) recvMessageWithError() error {
h.msgCh <- &FsmMsg{
MsgType: FSM_MSG_BGP_MESSAGE,
MsgSrc: h.fsm.pConf.NeighborConfig.NeighborAddress.String(),
+ MsgDst: h.fsm.pConf.Transport.TransportConfig.LocalAddress.String(),
MsgData: err,
}
return err
@@ -486,12 +488,14 @@ func (h *FSMHandler) recvMessageWithError() error {
fmsg = &FsmMsg{
MsgType: FSM_MSG_BGP_MESSAGE,
MsgSrc: h.fsm.pConf.NeighborConfig.NeighborAddress.String(),
+ MsgDst: h.fsm.pConf.Transport.TransportConfig.LocalAddress.String(),
MsgData: err,
}
} else {
fmsg = &FsmMsg{
MsgType: FSM_MSG_BGP_MESSAGE,
MsgSrc: h.fsm.pConf.NeighborConfig.NeighborAddress.String(),
+ MsgDst: h.fsm.pConf.Transport.TransportConfig.LocalAddress.String(),
MsgData: m,
}
if h.fsm.state == bgp.BGP_FSM_ESTABLISHED {
@@ -586,6 +590,7 @@ func (h *FSMHandler) opensent() bgp.FSMState {
e := &FsmMsg{
MsgType: FSM_MSG_BGP_MESSAGE,
MsgSrc: fsm.pConf.NeighborConfig.NeighborAddress.String(),
+ MsgDst: fsm.pConf.Transport.TransportConfig.LocalAddress.String(),
MsgData: m,
}
h.incoming <- e
@@ -964,6 +969,7 @@ func (h *FSMHandler) loop() error {
e := &FsmMsg{
MsgType: FSM_MSG_STATE_CHANGE,
MsgSrc: fsm.pConf.NeighborConfig.NeighborAddress.String(),
+ MsgDst: fsm.pConf.Transport.TransportConfig.LocalAddress.String(),
MsgData: nextState,
}
h.incoming <- e