summaryrefslogtreecommitdiffhomepage
path: root/client
diff options
context:
space:
mode:
authorIWASE Yusuke <iwase.yusuke0@gmail.com>2017-01-18 13:28:46 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2017-02-03 22:47:34 -0800
commit1063bcab1ee22cac4c7e375aaf37589747bad133 (patch)
tree1045a331ace96926da8728915318e0084eb8c5c5 /client
parent356c01a9d061b2b6bb4c3068a9888b56dc435600 (diff)
cli: Communication on Administrative Shutdown NOTIFICATION
This patch enable to send an arbitrary message on the Cease NOTIFICATION message with "Administrative Shutdown" and "Administrative Reset" subcodes with "--reason" option. Usage: $ gobgp neighbor <neighbor address> shutdown --reason "some messages" $ gobgp neighbor <neighbor address> reset --reason "some messages" Reference: https://tools.ietf.org/html/draft-ietf-idr-shutdown-04 Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Diffstat (limited to 'client')
-rw-r--r--client/client.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/client/client.go b/client/client.go
index 521c4b38..49c5574d 100644
--- a/client/client.go
+++ b/client/client.go
@@ -193,13 +193,13 @@ func (cli *Client) DeleteNeighbor(c *config.Neighbor) error {
//func (cli *Client) UpdateNeighbor(c *config.Neighbor) (bool, error) {
//}
-func (cli *Client) ShutdownNeighbor(addr string) error {
- _, err := cli.cli.ShutdownNeighbor(context.Background(), &api.ShutdownNeighborRequest{Address: addr})
+func (cli *Client) ShutdownNeighbor(addr, communication string) error {
+ _, err := cli.cli.ShutdownNeighbor(context.Background(), &api.ShutdownNeighborRequest{Address: addr, Communication: communication})
return err
}
-func (cli *Client) ResetNeighbor(addr string) error {
- _, err := cli.cli.ResetNeighbor(context.Background(), &api.ResetNeighborRequest{Address: addr})
+func (cli *Client) ResetNeighbor(addr, communication string) error {
+ _, err := cli.cli.ResetNeighbor(context.Background(), &api.ResetNeighborRequest{Address: addr, Communication: communication})
return err
}