diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-08-31 22:00:09 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-08-31 22:00:09 +0900 |
commit | 955409c37ce17daf346e30aa1d1e2d40767ebb43 (patch) | |
tree | 31fb0c026bf2f80c481efe13aea938965ff19469 /server/grpc_server.go | |
parent | 70a8399e0dab0d9ee4c11959721e48e87ef261c0 (diff) |
rpki: support show the state of RPKI servers
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 b56e2e14..ee8e5de1 100644 --- a/server/grpc_server.go +++ b/server/grpc_server.go @@ -83,6 +83,7 @@ const ( REQ_MRT_GLOBAL_RIB REQ_MRT_LOCAL_RIB REQ_RPKI + REQ_ROA REQ_VRF REQ_VRFS REQ_VRF_MOD @@ -513,6 +514,15 @@ func (s *Server) GetRPKI(arg *api.Arguments, stream api.Grpc_GetRPKIServer) erro s.bgpServerCh <- req return handleMultipleResponses(req, func(res *GrpcResponse) error { + return stream.Send(res.Data.(*api.RPKI)) + }) +} + +func (s *Server) GetROA(arg *api.Arguments, stream api.Grpc_GetROAServer) error { + req := NewGrpcRequest(REQ_ROA, arg.Name, bgp.RouteFamily(arg.Rf), nil) + s.bgpServerCh <- req + + return handleMultipleResponses(req, func(res *GrpcResponse) error { return stream.Send(res.Data.(*api.ROA)) }) } |