summaryrefslogtreecommitdiffhomepage
path: root/cmd/gobgpd
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2018-07-08 00:00:47 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2018-07-08 21:32:32 +0900
commit07f47b7d370e4a2197cf34e3847b2f867b97a40a (patch)
treeae89ab07ea53d9bc34c443efcb5a980d7f3ac625 /cmd/gobgpd
parent26aed14b48dc8afce6a3d2faa20f5a8ce95494b6 (diff)
remove package dependency except for grpc in api/
Nothing except for protobuf IDL files and files generated by protobuf in api/. Try to make the APIs portable to any languages. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'cmd/gobgpd')
-rw-r--r--cmd/gobgpd/main.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd/gobgpd/main.go b/cmd/gobgpd/main.go
index 6f1a364d..31af0f67 100644
--- a/cmd/gobgpd/main.go
+++ b/cmd/gobgpd/main.go
@@ -35,6 +35,7 @@ import (
"google.golang.org/grpc/credentials"
api "github.com/osrg/gobgp/api"
+ "github.com/osrg/gobgp/internal/pkg/apiutil"
"github.com/osrg/gobgp/internal/pkg/config"
"github.com/osrg/gobgp/internal/pkg/table"
"github.com/osrg/gobgp/pkg/packet/bgp"
@@ -50,7 +51,7 @@ func marshalRouteTargets(l []string) ([]*any.Any, error) {
if err != nil {
return nil, err
}
- rtList = append(rtList, api.MarshalRT(rt))
+ rtList = append(rtList, apiutil.MarshalRT(rt))
}
return rtList, nil
}
@@ -252,7 +253,7 @@ func main() {
if _, err := apiServer.AddVrf(context.Background(), &api.AddVrfRequest{
Vrf: &api.Vrf{
Name: vrf.Config.Name,
- Rd: api.MarshalRD(rd),
+ Rd: apiutil.MarshalRD(rd),
Id: uint32(vrf.Config.Id),
ImportRt: importRtList,
ExportRt: exportRtList,