1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
10 api "git.fd.io/govpp.git/api"
11 vpe "git.fd.io/govpp.git/binapi/vpe"
14 // RPCService defines RPC service l2tp.
15 type RPCService interface {
16 L2tpv3CreateTunnel(ctx context.Context, in *L2tpv3CreateTunnel) (*L2tpv3CreateTunnelReply, error)
17 L2tpv3InterfaceEnableDisable(ctx context.Context, in *L2tpv3InterfaceEnableDisable) (*L2tpv3InterfaceEnableDisableReply, error)
18 L2tpv3SetLookupKey(ctx context.Context, in *L2tpv3SetLookupKey) (*L2tpv3SetLookupKeyReply, error)
19 L2tpv3SetTunnelCookies(ctx context.Context, in *L2tpv3SetTunnelCookies) (*L2tpv3SetTunnelCookiesReply, error)
20 SwIfL2tpv3TunnelDump(ctx context.Context, in *SwIfL2tpv3TunnelDump) (RPCService_SwIfL2tpv3TunnelDumpClient, error)
23 type serviceClient struct {
27 func NewServiceClient(conn api.Connection) RPCService {
28 return &serviceClient{conn}
31 func (c *serviceClient) L2tpv3CreateTunnel(ctx context.Context, in *L2tpv3CreateTunnel) (*L2tpv3CreateTunnelReply, error) {
32 out := new(L2tpv3CreateTunnelReply)
33 err := c.conn.Invoke(ctx, in, out)
40 func (c *serviceClient) L2tpv3InterfaceEnableDisable(ctx context.Context, in *L2tpv3InterfaceEnableDisable) (*L2tpv3InterfaceEnableDisableReply, error) {
41 out := new(L2tpv3InterfaceEnableDisableReply)
42 err := c.conn.Invoke(ctx, in, out)
49 func (c *serviceClient) L2tpv3SetLookupKey(ctx context.Context, in *L2tpv3SetLookupKey) (*L2tpv3SetLookupKeyReply, error) {
50 out := new(L2tpv3SetLookupKeyReply)
51 err := c.conn.Invoke(ctx, in, out)
58 func (c *serviceClient) L2tpv3SetTunnelCookies(ctx context.Context, in *L2tpv3SetTunnelCookies) (*L2tpv3SetTunnelCookiesReply, error) {
59 out := new(L2tpv3SetTunnelCookiesReply)
60 err := c.conn.Invoke(ctx, in, out)
67 func (c *serviceClient) SwIfL2tpv3TunnelDump(ctx context.Context, in *SwIfL2tpv3TunnelDump) (RPCService_SwIfL2tpv3TunnelDumpClient, error) {
68 stream, err := c.conn.NewStream(ctx)
72 x := &serviceClient_SwIfL2tpv3TunnelDumpClient{stream}
73 if err := x.Stream.SendMsg(in); err != nil {
76 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
82 type RPCService_SwIfL2tpv3TunnelDumpClient interface {
83 Recv() (*SwIfL2tpv3TunnelDetails, error)
87 type serviceClient_SwIfL2tpv3TunnelDumpClient struct {
91 func (c *serviceClient_SwIfL2tpv3TunnelDumpClient) Recv() (*SwIfL2tpv3TunnelDetails, error) {
92 msg, err := c.Stream.RecvMsg()
96 switch m := msg.(type) {
97 case *SwIfL2tpv3TunnelDetails:
99 case *vpe.ControlPingReply:
102 return nil, fmt.Errorf("unexpected message: %T %v", m, m)