X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=binapi%2Fpppoe%2Fpppoe_rpc.ba.go;h=ac7c63d803dae024e00bd5bcc676a72b62072f53;hb=4102c72bce694babd94a481b1201d33895a6f9c5;hp=6a21a10deac537cd754b36749d8625ec3801faab;hpb=c94a962279858fb13eaacc689f47aed358373e44;p=govpp.git diff --git a/binapi/pppoe/pppoe_rpc.ba.go b/binapi/pppoe/pppoe_rpc.ba.go index 6a21a10..ac7c63d 100644 --- a/binapi/pppoe/pppoe_rpc.ba.go +++ b/binapi/pppoe/pppoe_rpc.ba.go @@ -8,11 +8,12 @@ import ( "io" api "git.fd.io/govpp.git/api" - vpe "git.fd.io/govpp.git/binapi/vpe" + memclnt "git.fd.io/govpp.git/binapi/memclnt" ) -// RPCService defines RPC service pppoe. +// RPCService defines RPC service pppoe. type RPCService interface { + PppoeAddDelCp(ctx context.Context, in *PppoeAddDelCp) (*PppoeAddDelCpReply, error) PppoeAddDelSession(ctx context.Context, in *PppoeAddDelSession) (*PppoeAddDelSessionReply, error) PppoeSessionDump(ctx context.Context, in *PppoeSessionDump) (RPCService_PppoeSessionDumpClient, error) } @@ -25,13 +26,22 @@ func NewServiceClient(conn api.Connection) RPCService { return &serviceClient{conn} } +func (c *serviceClient) PppoeAddDelCp(ctx context.Context, in *PppoeAddDelCp) (*PppoeAddDelCpReply, error) { + out := new(PppoeAddDelCpReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, api.RetvalToVPPApiError(out.Retval) +} + func (c *serviceClient) PppoeAddDelSession(ctx context.Context, in *PppoeAddDelSession) (*PppoeAddDelSessionReply, error) { out := new(PppoeAddDelSessionReply) err := c.conn.Invoke(ctx, in, out) if err != nil { return nil, err } - return out, nil + return out, api.RetvalToVPPApiError(out.Retval) } func (c *serviceClient) PppoeSessionDump(ctx context.Context, in *PppoeSessionDump) (RPCService_PppoeSessionDumpClient, error) { @@ -43,7 +53,7 @@ func (c *serviceClient) PppoeSessionDump(ctx context.Context, in *PppoeSessionDu 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 @@ -66,7 +76,11 @@ func (c *serviceClient_PppoeSessionDumpClient) Recv() (*PppoeSessionDetails, err switch m := msg.(type) { case *PppoeSessionDetails: 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)