Refactoring and fixes
[govpp.git] / binapi / gtpu / gtpu_rpc.ba.go
index d5f3263..c7b0f12 100644 (file)
@@ -11,11 +11,12 @@ import (
        vpe "git.fd.io/govpp.git/binapi/vpe"
 )
 
-// RPCService defines RPC service  gtpu.
+// RPCService defines RPC service gtpu.
 type RPCService interface {
        GtpuAddDelTunnel(ctx context.Context, in *GtpuAddDelTunnel) (*GtpuAddDelTunnelReply, error)
        GtpuOffloadRx(ctx context.Context, in *GtpuOffloadRx) (*GtpuOffloadRxReply, error)
        GtpuTunnelDump(ctx context.Context, in *GtpuTunnelDump) (RPCService_GtpuTunnelDumpClient, error)
+       GtpuTunnelUpdateTteid(ctx context.Context, in *GtpuTunnelUpdateTteid) (*GtpuTunnelUpdateTteidReply, error)
        SwInterfaceSetGtpuBypass(ctx context.Context, in *SwInterfaceSetGtpuBypass) (*SwInterfaceSetGtpuBypassReply, error)
 }
 
@@ -33,7 +34,7 @@ func (c *serviceClient) GtpuAddDelTunnel(ctx context.Context, in *GtpuAddDelTunn
        if err != nil {
                return nil, err
        }
-       return out, nil
+       return out, api.RetvalToVPPApiError(out.Retval)
 }
 
 func (c *serviceClient) GtpuOffloadRx(ctx context.Context, in *GtpuOffloadRx) (*GtpuOffloadRxReply, error) {
@@ -42,7 +43,7 @@ func (c *serviceClient) GtpuOffloadRx(ctx context.Context, in *GtpuOffloadRx) (*
        if err != nil {
                return nil, err
        }
-       return out, nil
+       return out, api.RetvalToVPPApiError(out.Retval)
 }
 
 func (c *serviceClient) GtpuTunnelDump(ctx context.Context, in *GtpuTunnelDump) (RPCService_GtpuTunnelDumpClient, error) {
@@ -78,17 +79,30 @@ func (c *serviceClient_GtpuTunnelDumpClient) Recv() (*GtpuTunnelDetails, error)
        case *GtpuTunnelDetails:
                return m, nil
        case *vpe.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)
        }
 }
 
+func (c *serviceClient) GtpuTunnelUpdateTteid(ctx context.Context, in *GtpuTunnelUpdateTteid) (*GtpuTunnelUpdateTteidReply, error) {
+       out := new(GtpuTunnelUpdateTteidReply)
+       err := c.conn.Invoke(ctx, in, out)
+       if err != nil {
+               return nil, err
+       }
+       return out, api.RetvalToVPPApiError(out.Retval)
+}
+
 func (c *serviceClient) SwInterfaceSetGtpuBypass(ctx context.Context, in *SwInterfaceSetGtpuBypass) (*SwInterfaceSetGtpuBypassReply, error) {
        out := new(SwInterfaceSetGtpuBypassReply)
        err := c.conn.Invoke(ctx, in, out)
        if err != nil {
                return nil, err
        }
-       return out, nil
+       return out, api.RetvalToVPPApiError(out.Retval)
 }