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 nat64.
15 type RPCService interface {
16 Nat64AddDelInterface(ctx context.Context, in *Nat64AddDelInterface) (*Nat64AddDelInterfaceReply, error)
17 Nat64AddDelInterfaceAddr(ctx context.Context, in *Nat64AddDelInterfaceAddr) (*Nat64AddDelInterfaceAddrReply, error)
18 Nat64AddDelPoolAddrRange(ctx context.Context, in *Nat64AddDelPoolAddrRange) (*Nat64AddDelPoolAddrRangeReply, error)
19 Nat64AddDelPrefix(ctx context.Context, in *Nat64AddDelPrefix) (*Nat64AddDelPrefixReply, error)
20 Nat64AddDelStaticBib(ctx context.Context, in *Nat64AddDelStaticBib) (*Nat64AddDelStaticBibReply, error)
21 Nat64BibDump(ctx context.Context, in *Nat64BibDump) (RPCService_Nat64BibDumpClient, error)
22 Nat64GetTimeouts(ctx context.Context, in *Nat64GetTimeouts) (*Nat64GetTimeoutsReply, error)
23 Nat64InterfaceDump(ctx context.Context, in *Nat64InterfaceDump) (RPCService_Nat64InterfaceDumpClient, error)
24 Nat64PluginEnableDisable(ctx context.Context, in *Nat64PluginEnableDisable) (*Nat64PluginEnableDisableReply, error)
25 Nat64PoolAddrDump(ctx context.Context, in *Nat64PoolAddrDump) (RPCService_Nat64PoolAddrDumpClient, error)
26 Nat64PrefixDump(ctx context.Context, in *Nat64PrefixDump) (RPCService_Nat64PrefixDumpClient, error)
27 Nat64SetTimeouts(ctx context.Context, in *Nat64SetTimeouts) (*Nat64SetTimeoutsReply, error)
28 Nat64StDump(ctx context.Context, in *Nat64StDump) (RPCService_Nat64StDumpClient, error)
31 type serviceClient struct {
35 func NewServiceClient(conn api.Connection) RPCService {
36 return &serviceClient{conn}
39 func (c *serviceClient) Nat64AddDelInterface(ctx context.Context, in *Nat64AddDelInterface) (*Nat64AddDelInterfaceReply, error) {
40 out := new(Nat64AddDelInterfaceReply)
41 err := c.conn.Invoke(ctx, in, out)
45 return out, api.RetvalToVPPApiError(out.Retval)
48 func (c *serviceClient) Nat64AddDelInterfaceAddr(ctx context.Context, in *Nat64AddDelInterfaceAddr) (*Nat64AddDelInterfaceAddrReply, error) {
49 out := new(Nat64AddDelInterfaceAddrReply)
50 err := c.conn.Invoke(ctx, in, out)
54 return out, api.RetvalToVPPApiError(out.Retval)
57 func (c *serviceClient) Nat64AddDelPoolAddrRange(ctx context.Context, in *Nat64AddDelPoolAddrRange) (*Nat64AddDelPoolAddrRangeReply, error) {
58 out := new(Nat64AddDelPoolAddrRangeReply)
59 err := c.conn.Invoke(ctx, in, out)
63 return out, api.RetvalToVPPApiError(out.Retval)
66 func (c *serviceClient) Nat64AddDelPrefix(ctx context.Context, in *Nat64AddDelPrefix) (*Nat64AddDelPrefixReply, error) {
67 out := new(Nat64AddDelPrefixReply)
68 err := c.conn.Invoke(ctx, in, out)
72 return out, api.RetvalToVPPApiError(out.Retval)
75 func (c *serviceClient) Nat64AddDelStaticBib(ctx context.Context, in *Nat64AddDelStaticBib) (*Nat64AddDelStaticBibReply, error) {
76 out := new(Nat64AddDelStaticBibReply)
77 err := c.conn.Invoke(ctx, in, out)
81 return out, api.RetvalToVPPApiError(out.Retval)
84 func (c *serviceClient) Nat64BibDump(ctx context.Context, in *Nat64BibDump) (RPCService_Nat64BibDumpClient, error) {
85 stream, err := c.conn.NewStream(ctx)
89 x := &serviceClient_Nat64BibDumpClient{stream}
90 if err := x.Stream.SendMsg(in); err != nil {
93 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
99 type RPCService_Nat64BibDumpClient interface {
100 Recv() (*Nat64BibDetails, error)
104 type serviceClient_Nat64BibDumpClient struct {
108 func (c *serviceClient_Nat64BibDumpClient) Recv() (*Nat64BibDetails, error) {
109 msg, err := c.Stream.RecvMsg()
113 switch m := msg.(type) {
114 case *Nat64BibDetails:
116 case *vpe.ControlPingReply:
119 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
123 func (c *serviceClient) Nat64GetTimeouts(ctx context.Context, in *Nat64GetTimeouts) (*Nat64GetTimeoutsReply, error) {
124 out := new(Nat64GetTimeoutsReply)
125 err := c.conn.Invoke(ctx, in, out)
129 return out, api.RetvalToVPPApiError(out.Retval)
132 func (c *serviceClient) Nat64InterfaceDump(ctx context.Context, in *Nat64InterfaceDump) (RPCService_Nat64InterfaceDumpClient, error) {
133 stream, err := c.conn.NewStream(ctx)
137 x := &serviceClient_Nat64InterfaceDumpClient{stream}
138 if err := x.Stream.SendMsg(in); err != nil {
141 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
147 type RPCService_Nat64InterfaceDumpClient interface {
148 Recv() (*Nat64InterfaceDetails, error)
152 type serviceClient_Nat64InterfaceDumpClient struct {
156 func (c *serviceClient_Nat64InterfaceDumpClient) Recv() (*Nat64InterfaceDetails, error) {
157 msg, err := c.Stream.RecvMsg()
161 switch m := msg.(type) {
162 case *Nat64InterfaceDetails:
164 case *vpe.ControlPingReply:
167 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
171 func (c *serviceClient) Nat64PluginEnableDisable(ctx context.Context, in *Nat64PluginEnableDisable) (*Nat64PluginEnableDisableReply, error) {
172 out := new(Nat64PluginEnableDisableReply)
173 err := c.conn.Invoke(ctx, in, out)
177 return out, api.RetvalToVPPApiError(out.Retval)
180 func (c *serviceClient) Nat64PoolAddrDump(ctx context.Context, in *Nat64PoolAddrDump) (RPCService_Nat64PoolAddrDumpClient, error) {
181 stream, err := c.conn.NewStream(ctx)
185 x := &serviceClient_Nat64PoolAddrDumpClient{stream}
186 if err := x.Stream.SendMsg(in); err != nil {
189 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
195 type RPCService_Nat64PoolAddrDumpClient interface {
196 Recv() (*Nat64PoolAddrDetails, error)
200 type serviceClient_Nat64PoolAddrDumpClient struct {
204 func (c *serviceClient_Nat64PoolAddrDumpClient) Recv() (*Nat64PoolAddrDetails, error) {
205 msg, err := c.Stream.RecvMsg()
209 switch m := msg.(type) {
210 case *Nat64PoolAddrDetails:
212 case *vpe.ControlPingReply:
215 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
219 func (c *serviceClient) Nat64PrefixDump(ctx context.Context, in *Nat64PrefixDump) (RPCService_Nat64PrefixDumpClient, error) {
220 stream, err := c.conn.NewStream(ctx)
224 x := &serviceClient_Nat64PrefixDumpClient{stream}
225 if err := x.Stream.SendMsg(in); err != nil {
228 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
234 type RPCService_Nat64PrefixDumpClient interface {
235 Recv() (*Nat64PrefixDetails, error)
239 type serviceClient_Nat64PrefixDumpClient struct {
243 func (c *serviceClient_Nat64PrefixDumpClient) Recv() (*Nat64PrefixDetails, error) {
244 msg, err := c.Stream.RecvMsg()
248 switch m := msg.(type) {
249 case *Nat64PrefixDetails:
251 case *vpe.ControlPingReply:
254 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
258 func (c *serviceClient) Nat64SetTimeouts(ctx context.Context, in *Nat64SetTimeouts) (*Nat64SetTimeoutsReply, error) {
259 out := new(Nat64SetTimeoutsReply)
260 err := c.conn.Invoke(ctx, in, out)
264 return out, api.RetvalToVPPApiError(out.Retval)
267 func (c *serviceClient) Nat64StDump(ctx context.Context, in *Nat64StDump) (RPCService_Nat64StDumpClient, error) {
268 stream, err := c.conn.NewStream(ctx)
272 x := &serviceClient_Nat64StDumpClient{stream}
273 if err := x.Stream.SendMsg(in); err != nil {
276 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
282 type RPCService_Nat64StDumpClient interface {
283 Recv() (*Nat64StDetails, error)
287 type serviceClient_Nat64StDumpClient struct {
291 func (c *serviceClient_Nat64StDumpClient) Recv() (*Nat64StDetails, error) {
292 msg, err := c.Stream.RecvMsg()
296 switch m := msg.(type) {
297 case *Nat64StDetails:
299 case *vpe.ControlPingReply:
302 return nil, fmt.Errorf("unexpected message: %T %v", m, m)