summaryrefslogtreecommitdiffhomepage
path: root/client/client.go
diff options
context:
space:
mode:
authorWataru Ishida <ishida.wataru@lab.ntt.co.jp>2016-11-15 07:02:49 +0000
committerWataru Ishida <ishida.wataru@lab.ntt.co.jp>2016-11-15 07:03:53 +0000
commit25fe17c8176d5da2c0ffb7bca7dfd1780a34504c (patch)
tree486bd16e5bbf0c5b8e658aa642f36fde4bbc3edd /client/client.go
parentee8ce99e2df1f732ef515e20fb3054c0cff0249b (diff)
client: remove server package dependency
move ROA under table package Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'client/client.go')
-rw-r--r--client/client.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/client/client.go b/client/client.go
index 7a7b4606..734e7ec4 100644
--- a/client/client.go
+++ b/client/client.go
@@ -25,7 +25,6 @@ import (
api "github.com/osrg/gobgp/api"
"github.com/osrg/gobgp/config"
"github.com/osrg/gobgp/packet/bgp"
- "github.com/osrg/gobgp/server"
"github.com/osrg/gobgp/table"
"golang.org/x/net/context"
"google.golang.org/grpc"
@@ -775,21 +774,21 @@ func (cli *GoBGPClient) GetRPKI() ([]*config.RpkiServer, error) {
return servers, nil
}
-func (cli *GoBGPClient) GetROA(family bgp.RouteFamily) ([]*server.ROA, error) {
+func (cli *GoBGPClient) GetROA(family bgp.RouteFamily) ([]*table.ROA, error) {
rsp, err := cli.cli.GetRoa(context.Background(), &api.GetRoaRequest{
Family: uint32(family),
})
if err != nil {
return nil, err
}
- roas := make([]*server.ROA, 0, len(rsp.Roas))
+ roas := make([]*table.ROA, 0, len(rsp.Roas))
for _, r := range rsp.Roas {
ip := net.ParseIP(r.Prefix)
if ip.To4() != nil {
ip = ip.To4()
}
afi, _ := bgp.RouteFamilyToAfiSafi(family)
- roa := server.NewROA(int(afi), []byte(ip), uint8(r.Prefixlen), uint8(r.Maxlen), r.As, net.JoinHostPort(r.Conf.Address, r.Conf.RemotePort))
+ roa := table.NewROA(int(afi), []byte(ip), uint8(r.Prefixlen), uint8(r.Maxlen), r.As, net.JoinHostPort(r.Conf.Address, r.Conf.RemotePort))
roas = append(roas, roa)
}
return roas, nil