Closed PeiwenChen closed 8 years ago
showNeighbor()
is not just formatting function. It also retrieves neighbor info via gRPC using some global variables (client
, globalOpts
) which are initialised in other place of cli code.
So I think you can't use showNeighbor()
as you want.
We could segregate formatting part (https://github.com/osrg/gobgp/blob/master/gobgp/cmd/neighbor.go#L161-L296) from showNeighbor()
and create new function ( FormatNeighbor()
?).
Thanks for your response. Actually I am not blocking by this issue currently, so no rush to fix.
Yeah, a FormatNeighbor
or PrintNeighbor
sounds good!
The API to monitor the state of neighbors has been changed. This is not valid any more.
Hi @ishidawataru We can send the request of
REQ_MONITOR_NEIGHBOR_PEER_STATE
to monitor the peer state changes, and read the response, like the below:But since the
showNeighbor
is not exported (lower case), we cannot print the state changes. Can we export it?