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 ip_neighbor.
15 type RPCService interface {
16 IPNeighborAddDel(ctx context.Context, in *IPNeighborAddDel) (*IPNeighborAddDelReply, error)
17 IPNeighborConfig(ctx context.Context, in *IPNeighborConfig) (*IPNeighborConfigReply, error)
18 IPNeighborDump(ctx context.Context, in *IPNeighborDump) (RPCService_IPNeighborDumpClient, error)
19 IPNeighborFlush(ctx context.Context, in *IPNeighborFlush) (*IPNeighborFlushReply, error)
20 IPNeighborReplaceBegin(ctx context.Context, in *IPNeighborReplaceBegin) (*IPNeighborReplaceBeginReply, error)
21 IPNeighborReplaceEnd(ctx context.Context, in *IPNeighborReplaceEnd) (*IPNeighborReplaceEndReply, error)
22 WantIPNeighborEvents(ctx context.Context, in *WantIPNeighborEvents) (*WantIPNeighborEventsReply, error)
23 WantIPNeighborEventsV2(ctx context.Context, in *WantIPNeighborEventsV2) (*WantIPNeighborEventsV2Reply, error)
26 type serviceClient struct {
30 func NewServiceClient(conn api.Connection) RPCService {
31 return &serviceClient{conn}
34 func (c *serviceClient) IPNeighborAddDel(ctx context.Context, in *IPNeighborAddDel) (*IPNeighborAddDelReply, error) {
35 out := new(IPNeighborAddDelReply)
36 err := c.conn.Invoke(ctx, in, out)
40 return out, api.RetvalToVPPApiError(out.Retval)
43 func (c *serviceClient) IPNeighborConfig(ctx context.Context, in *IPNeighborConfig) (*IPNeighborConfigReply, error) {
44 out := new(IPNeighborConfigReply)
45 err := c.conn.Invoke(ctx, in, out)
49 return out, api.RetvalToVPPApiError(out.Retval)
52 func (c *serviceClient) IPNeighborDump(ctx context.Context, in *IPNeighborDump) (RPCService_IPNeighborDumpClient, error) {
53 stream, err := c.conn.NewStream(ctx)
57 x := &serviceClient_IPNeighborDumpClient{stream}
58 if err := x.Stream.SendMsg(in); err != nil {
61 if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
67 type RPCService_IPNeighborDumpClient interface {
68 Recv() (*IPNeighborDetails, error)
72 type serviceClient_IPNeighborDumpClient struct {
76 func (c *serviceClient_IPNeighborDumpClient) Recv() (*IPNeighborDetails, error) {
77 msg, err := c.Stream.RecvMsg()
81 switch m := msg.(type) {
82 case *IPNeighborDetails:
84 case *vpe.ControlPingReply:
87 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
91 func (c *serviceClient) IPNeighborFlush(ctx context.Context, in *IPNeighborFlush) (*IPNeighborFlushReply, error) {
92 out := new(IPNeighborFlushReply)
93 err := c.conn.Invoke(ctx, in, out)
97 return out, api.RetvalToVPPApiError(out.Retval)
100 func (c *serviceClient) IPNeighborReplaceBegin(ctx context.Context, in *IPNeighborReplaceBegin) (*IPNeighborReplaceBeginReply, error) {
101 out := new(IPNeighborReplaceBeginReply)
102 err := c.conn.Invoke(ctx, in, out)
106 return out, api.RetvalToVPPApiError(out.Retval)
109 func (c *serviceClient) IPNeighborReplaceEnd(ctx context.Context, in *IPNeighborReplaceEnd) (*IPNeighborReplaceEndReply, error) {
110 out := new(IPNeighborReplaceEndReply)
111 err := c.conn.Invoke(ctx, in, out)
115 return out, api.RetvalToVPPApiError(out.Retval)
118 func (c *serviceClient) WantIPNeighborEvents(ctx context.Context, in *WantIPNeighborEvents) (*WantIPNeighborEventsReply, error) {
119 out := new(WantIPNeighborEventsReply)
120 err := c.conn.Invoke(ctx, in, out)
124 return out, api.RetvalToVPPApiError(out.Retval)
127 func (c *serviceClient) WantIPNeighborEventsV2(ctx context.Context, in *WantIPNeighborEventsV2) (*WantIPNeighborEventsV2Reply, error) {
128 out := new(WantIPNeighborEventsV2Reply)
129 err := c.conn.Invoke(ctx, in, out)
133 return out, api.RetvalToVPPApiError(out.Retval)