diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-01-06 12:40:17 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-01-06 12:40:17 +0900 |
commit | 302632715c1dded7af7038d448ac66aeb5f44b49 (patch) | |
tree | 2bb06a4e4a0464eb21ddf69b2b1f2de536573652 /server/grpc_server.go | |
parent | 784578ec55d90492b16d6fe45197e5a74c40790d (diff) |
rpki: add monitor command support
monitor the change of rpki validation results:
$ gobgp monitor rpki
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server/grpc_server.go')
-rw-r--r-- | server/grpc_server.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/server/grpc_server.go b/server/grpc_server.go index 776f64da..212e9842 100644 --- a/server/grpc_server.go +++ b/server/grpc_server.go @@ -46,6 +46,7 @@ const ( REQ_GLOBAL_RIB REQ_MONITOR_GLOBAL_BEST_CHANGED REQ_MONITOR_NEIGHBOR_PEER_STATE + REQ_MONITOR_ROA_VALIDATION_RESULT REQ_MRT_GLOBAL_RIB REQ_MRT_LOCAL_RIB REQ_MOD_MRT @@ -171,6 +172,15 @@ func (s *Server) MonitorPeerState(arg *api.Arguments, stream api.GobgpApi_Monito }) } +func (s *Server) MonitorROAValidation(arg *api.Arguments, stream api.GobgpApi_MonitorROAValidationServer) error { + req := NewGrpcRequest(REQ_MONITOR_ROA_VALIDATION_RESULT, "", bgp.RouteFamily(arg.Family), nil) + s.bgpServerCh <- req + + return handleMultipleResponses(req, func(res *GrpcResponse) error { + return stream.Send(res.Data.(*api.ROAResult)) + }) +} + func (s *Server) neighbor(reqType int, arg *api.Arguments) (*api.Error, error) { none := &api.Error{} req := NewGrpcRequest(reqType, arg.Name, bgp.RouteFamily(arg.Family), nil) |