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:
85 err = c.Stream.Close()
91 return nil, fmt.Errorf("unexpected message: %T %v", m, m)
95 func (c *serviceClient) IPNeighborFlush(ctx context.Context, in *IPNeighborFlush) (*IPNeighborFlushReply, error) {
96 out := new(IPNeighborFlushReply)
97 err := c.conn.Invoke(ctx, in, out)
101 return out, api.RetvalToVPPApiError(out.Retval)
104 func (c *serviceClient) IPNeighborReplaceBegin(ctx context.Context, in *IPNeighborReplaceBegin) (*IPNeighborReplaceBeginReply, error) {
105 out := new(IPNeighborReplaceBeginReply)
106 err := c.conn.Invoke(ctx, in, out)
110 return out, api.RetvalToVPPApiError(out.Retval)
113 func (c *serviceClient) IPNeighborReplaceEnd(ctx context.Context, in *IPNeighborReplaceEnd) (*IPNeighborReplaceEndReply, error) {
114 out := new(IPNeighborReplaceEndReply)
115 err := c.conn.Invoke(ctx, in, out)
119 return out, api.RetvalToVPPApiError(out.Retval)
122 func (c *serviceClient) WantIPNeighborEvents(ctx context.Context, in *WantIPNeighborEvents) (*WantIPNeighborEventsReply, error) {
123 out := new(WantIPNeighborEventsReply)
124 err := c.conn.Invoke(ctx, in, out)
128 return out, api.RetvalToVPPApiError(out.Retval)
131 func (c *serviceClient) WantIPNeighborEventsV2(ctx context.Context, in *WantIPNeighborEventsV2) (*WantIPNeighborEventsV2Reply, error) {
132 out := new(WantIPNeighborEventsV2Reply)
133 err := c.conn.Invoke(ctx, in, out)
137 return out, api.RetvalToVPPApiError(out.Retval)