Change module name to go.fd.io/govpp
[govpp.git] / binapi / arp / arp_rpc.ba.go
index 8bb64ce..cff3850 100644 (file)
@@ -7,11 +7,11 @@ import (
        "fmt"
        "io"
 
-       api "git.fd.io/govpp.git/api"
-       vpe "git.fd.io/govpp.git/binapi/vpe"
+       api "go.fd.io/govpp/api"
+       memclnt "go.fd.io/govpp/binapi/memclnt"
 )
 
-// RPCService defines RPC service  arp.
+// RPCService defines RPC service arp.
 type RPCService interface {
        ProxyArpAddDel(ctx context.Context, in *ProxyArpAddDel) (*ProxyArpAddDelReply, error)
        ProxyArpDump(ctx context.Context, in *ProxyArpDump) (RPCService_ProxyArpDumpClient, error)
@@ -33,7 +33,7 @@ func (c *serviceClient) ProxyArpAddDel(ctx context.Context, in *ProxyArpAddDel)
        if err != nil {
                return nil, err
        }
-       return out, nil
+       return out, api.RetvalToVPPApiError(out.Retval)
 }
 
 func (c *serviceClient) ProxyArpDump(ctx context.Context, in *ProxyArpDump) (RPCService_ProxyArpDumpClient, error) {
@@ -45,7 +45,7 @@ func (c *serviceClient) ProxyArpDump(ctx context.Context, in *ProxyArpDump) (RPC
        if err := x.Stream.SendMsg(in); err != nil {
                return nil, err
        }
-       if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+       if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
                return nil, err
        }
        return x, nil
@@ -68,7 +68,11 @@ func (c *serviceClient_ProxyArpDumpClient) Recv() (*ProxyArpDetails, error) {
        switch m := msg.(type) {
        case *ProxyArpDetails:
                return m, nil
-       case *vpe.ControlPingReply:
+       case *memclnt.ControlPingReply:
+               err = c.Stream.Close()
+               if err != nil {
+                       return nil, err
+               }
                return nil, io.EOF
        default:
                return nil, fmt.Errorf("unexpected message: %T %v", m, m)
@@ -84,7 +88,7 @@ func (c *serviceClient) ProxyArpIntfcDump(ctx context.Context, in *ProxyArpIntfc
        if err := x.Stream.SendMsg(in); err != nil {
                return nil, err
        }
-       if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+       if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
                return nil, err
        }
        return x, nil
@@ -107,7 +111,11 @@ func (c *serviceClient_ProxyArpIntfcDumpClient) Recv() (*ProxyArpIntfcDetails, e
        switch m := msg.(type) {
        case *ProxyArpIntfcDetails:
                return m, nil
-       case *vpe.ControlPingReply:
+       case *memclnt.ControlPingReply:
+               err = c.Stream.Close()
+               if err != nil {
+                       return nil, err
+               }
                return nil, io.EOF
        default:
                return nil, fmt.Errorf("unexpected message: %T %v", m, m)
@@ -120,5 +128,5 @@ func (c *serviceClient) ProxyArpIntfcEnableDisable(ctx context.Context, in *Prox
        if err != nil {
                return nil, err
        }
-       return out, nil
+       return out, api.RetvalToVPPApiError(out.Retval)
 }