X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=binapi%2Farp%2Farp_rpc.ba.go;h=cff38506f44c6015e50e49c64ae075eb7cff4dd7;hb=HEAD;hp=8ccfa75651dac742b5b305e0a6488bb48e54f867;hpb=d1f24d37bd447b64e402298bb8eb2479681facf9;p=govpp.git diff --git a/binapi/arp/arp_rpc.ba.go b/binapi/arp/arp_rpc.ba.go index 8ccfa75..cff3850 100644 --- a/binapi/arp/arp_rpc.ba.go +++ b/binapi/arp/arp_rpc.ba.go @@ -5,12 +5,13 @@ package arp import ( "context" "fmt" - api "git.fd.io/govpp.git/api" - vpe "git.fd.io/govpp.git/binapi/vpe" "io" + + 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) @@ -32,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) { @@ -44,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 @@ -67,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) @@ -83,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 @@ -106,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) @@ -119,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) }