aboutsummaryrefslogtreecommitdiffstats
path: root/binapi/ip_neighbor
diff options
context:
space:
mode:
Diffstat (limited to 'binapi/ip_neighbor')
-rw-r--r--binapi/ip_neighbor/ip_neighbor.ba.go232
-rw-r--r--binapi/ip_neighbor/ip_neighbor_rest.ba.go134
-rw-r--r--binapi/ip_neighbor/ip_neighbor_rpc.ba.go37
3 files changed, 238 insertions, 165 deletions
diff --git a/binapi/ip_neighbor/ip_neighbor.ba.go b/binapi/ip_neighbor/ip_neighbor.ba.go
index b4da5b1..b737957 100644
--- a/binapi/ip_neighbor/ip_neighbor.ba.go
+++ b/binapi/ip_neighbor/ip_neighbor.ba.go
@@ -1,25 +1,26 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
-// VPP: 20.05-release
+// binapi-generator: v0.6.0-dev
+// VPP: 22.02-release
// source: /usr/share/vpp/api/core/ip_neighbor.api.json
// Package ip_neighbor contains generated bindings for API file ip_neighbor.api.
//
// Contents:
-// 1 enum
+// 2 enums
// 1 struct
-// 15 messages
+// 18 messages
//
package ip_neighbor
import (
- api "git.fd.io/govpp.git/api"
- ethernet_types "git.fd.io/govpp.git/binapi/ethernet_types"
- interface_types "git.fd.io/govpp.git/binapi/interface_types"
- ip_types "git.fd.io/govpp.git/binapi/ip_types"
- codec "git.fd.io/govpp.git/codec"
"strconv"
+
+ api "go.fd.io/govpp/api"
+ ethernet_types "go.fd.io/govpp/binapi/ethernet_types"
+ interface_types "go.fd.io/govpp/binapi/interface_types"
+ ip_types "go.fd.io/govpp/binapi/ip_types"
+ codec "go.fd.io/govpp/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -31,9 +32,55 @@ const _ = api.GoVppAPIPackageIsVersion2
const (
APIFile = "ip_neighbor"
APIVersion = "1.0.0"
- VersionCrc = 0xe6512b94
+ VersionCrc = 0xfde4a69a
+)
+
+// IPNeighborEventFlags defines enum 'ip_neighbor_event_flags'.
+type IPNeighborEventFlags uint32
+
+const (
+ IP_NEIGHBOR_API_EVENT_FLAG_ADDED IPNeighborEventFlags = 1
+ IP_NEIGHBOR_API_EVENT_FLAG_REMOVED IPNeighborEventFlags = 2
)
+var (
+ IPNeighborEventFlags_name = map[uint32]string{
+ 1: "IP_NEIGHBOR_API_EVENT_FLAG_ADDED",
+ 2: "IP_NEIGHBOR_API_EVENT_FLAG_REMOVED",
+ }
+ IPNeighborEventFlags_value = map[string]uint32{
+ "IP_NEIGHBOR_API_EVENT_FLAG_ADDED": 1,
+ "IP_NEIGHBOR_API_EVENT_FLAG_REMOVED": 2,
+ }
+)
+
+func (x IPNeighborEventFlags) String() string {
+ s, ok := IPNeighborEventFlags_name[uint32(x)]
+ if ok {
+ return s
+ }
+ str := func(n uint32) string {
+ s, ok := IPNeighborEventFlags_name[uint32(n)]
+ if ok {
+ return s
+ }
+ return "IPNeighborEventFlags(" + strconv.Itoa(int(n)) + ")"
+ }
+ for i := uint32(0); i <= 32; i++ {
+ val := uint32(x)
+ if val&(1<<i) != 0 {
+ if s != "" {
+ s += "|"
+ }
+ s += str(1 << i)
+ }
+ }
+ if s == "" {
+ return str(uint32(x))
+ }
+ return s
+}
+
// IPNeighborFlags defines enum 'ip_neighbor_flags'.
type IPNeighborFlags uint8
@@ -99,7 +146,7 @@ type IPNeighborAddDel struct {
func (m *IPNeighborAddDel) Reset() { *m = IPNeighborAddDel{} }
func (*IPNeighborAddDel) GetMessageName() string { return "ip_neighbor_add_del" }
-func (*IPNeighborAddDel) GetCrcString() string { return "105518b6" }
+func (*IPNeighborAddDel) GetCrcString() string { return "0607c257" }
func (*IPNeighborAddDel) GetMessageType() api.MessageType {
return api.RequestMessage
}
@@ -263,7 +310,7 @@ type IPNeighborDetails struct {
func (m *IPNeighborDetails) Reset() { *m = IPNeighborDetails{} }
func (*IPNeighborDetails) GetMessageName() string { return "ip_neighbor_details" }
-func (*IPNeighborDetails) GetCrcString() string { return "870e80b9" }
+func (*IPNeighborDetails) GetCrcString() string { return "e29d79f0" }
func (*IPNeighborDetails) GetMessageType() api.MessageType {
return api.ReplyMessage
}
@@ -312,7 +359,7 @@ type IPNeighborDump struct {
func (m *IPNeighborDump) Reset() { *m = IPNeighborDump{} }
func (*IPNeighborDump) GetMessageName() string { return "ip_neighbor_dump" }
-func (*IPNeighborDump) GetCrcString() string { return "cd831298" }
+func (*IPNeighborDump) GetCrcString() string { return "d817a484" }
func (*IPNeighborDump) GetMessageType() api.MessageType {
return api.RequestMessage
}
@@ -342,6 +389,7 @@ func (m *IPNeighborDump) Unmarshal(b []byte) error {
}
// IPNeighborEvent defines message 'ip_neighbor_event'.
+// Deprecated: the message will be removed in the future versions
type IPNeighborEvent struct {
PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
Neighbor IPNeighbor `binapi:"ip_neighbor,name=neighbor" json:"neighbor,omitempty"`
@@ -349,7 +397,7 @@ type IPNeighborEvent struct {
func (m *IPNeighborEvent) Reset() { *m = IPNeighborEvent{} }
func (*IPNeighborEvent) GetMessageName() string { return "ip_neighbor_event" }
-func (*IPNeighborEvent) GetCrcString() string { return "83933131" }
+func (*IPNeighborEvent) GetCrcString() string { return "bdb092b2" }
func (*IPNeighborEvent) GetMessageType() api.MessageType {
return api.EventMessage
}
@@ -390,6 +438,59 @@ func (m *IPNeighborEvent) Unmarshal(b []byte) error {
return nil
}
+// IPNeighborEventV2 defines message 'ip_neighbor_event_v2'.
+type IPNeighborEventV2 struct {
+ PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
+ Flags IPNeighborEventFlags `binapi:"ip_neighbor_event_flags,name=flags" json:"flags,omitempty"`
+ Neighbor IPNeighbor `binapi:"ip_neighbor,name=neighbor" json:"neighbor,omitempty"`
+}
+
+func (m *IPNeighborEventV2) Reset() { *m = IPNeighborEventV2{} }
+func (*IPNeighborEventV2) GetMessageName() string { return "ip_neighbor_event_v2" }
+func (*IPNeighborEventV2) GetCrcString() string { return "c1d53dc0" }
+func (*IPNeighborEventV2) GetMessageType() api.MessageType {
+ return api.EventMessage
+}
+
+func (m *IPNeighborEventV2) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.PID
+ size += 4 // m.Flags
+ size += 4 // m.Neighbor.SwIfIndex
+ size += 1 // m.Neighbor.Flags
+ size += 1 * 6 // m.Neighbor.MacAddress
+ size += 1 // m.Neighbor.IPAddress.Af
+ size += 1 * 16 // m.Neighbor.IPAddress.Un
+ return size
+}
+func (m *IPNeighborEventV2) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.PID)
+ buf.EncodeUint32(uint32(m.Flags))
+ buf.EncodeUint32(uint32(m.Neighbor.SwIfIndex))
+ buf.EncodeUint8(uint8(m.Neighbor.Flags))
+ buf.EncodeBytes(m.Neighbor.MacAddress[:], 6)
+ buf.EncodeUint8(uint8(m.Neighbor.IPAddress.Af))
+ buf.EncodeBytes(m.Neighbor.IPAddress.Un.XXX_UnionData[:], 16)
+ return buf.Bytes(), nil
+}
+func (m *IPNeighborEventV2) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.PID = buf.DecodeUint32()
+ m.Flags = IPNeighborEventFlags(buf.DecodeUint32())
+ m.Neighbor.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ m.Neighbor.Flags = IPNeighborFlags(buf.DecodeUint8())
+ copy(m.Neighbor.MacAddress[:], buf.DecodeBytes(6))
+ m.Neighbor.IPAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
+ copy(m.Neighbor.IPAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
+ return nil
+}
+
// IPNeighborFlush defines message 'ip_neighbor_flush'.
type IPNeighborFlush struct {
Af ip_types.AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
@@ -581,6 +682,7 @@ func (m *IPNeighborReplaceEndReply) Unmarshal(b []byte) error {
}
// WantIPNeighborEvents defines message 'want_ip_neighbor_events'.
+// Deprecated: the message will be removed in the future versions
type WantIPNeighborEvents struct {
Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
@@ -590,7 +692,7 @@ type WantIPNeighborEvents struct {
func (m *WantIPNeighborEvents) Reset() { *m = WantIPNeighborEvents{} }
func (*WantIPNeighborEvents) GetMessageName() string { return "want_ip_neighbor_events" }
-func (*WantIPNeighborEvents) GetCrcString() string { return "1a312870" }
+func (*WantIPNeighborEvents) GetCrcString() string { return "73e70a86" }
func (*WantIPNeighborEvents) GetMessageType() api.MessageType {
return api.RequestMessage
}
@@ -629,6 +731,7 @@ func (m *WantIPNeighborEvents) Unmarshal(b []byte) error {
}
// WantIPNeighborEventsReply defines message 'want_ip_neighbor_events_reply'.
+// Deprecated: the message will be removed in the future versions
type WantIPNeighborEventsReply struct {
Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
@@ -661,23 +764,109 @@ func (m *WantIPNeighborEventsReply) Unmarshal(b []byte) error {
return nil
}
+// WantIPNeighborEventsV2 defines message 'want_ip_neighbor_events_v2'.
+type WantIPNeighborEventsV2 struct {
+ Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
+ PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
+ IP ip_types.Address `binapi:"address,name=ip" json:"ip,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
+}
+
+func (m *WantIPNeighborEventsV2) Reset() { *m = WantIPNeighborEventsV2{} }
+func (*WantIPNeighborEventsV2) GetMessageName() string { return "want_ip_neighbor_events_v2" }
+func (*WantIPNeighborEventsV2) GetCrcString() string { return "73e70a86" }
+func (*WantIPNeighborEventsV2) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *WantIPNeighborEventsV2) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 1 // m.Enable
+ size += 4 // m.PID
+ size += 1 // m.IP.Af
+ size += 1 * 16 // m.IP.Un
+ size += 4 // m.SwIfIndex
+ return size
+}
+func (m *WantIPNeighborEventsV2) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeBool(m.Enable)
+ buf.EncodeUint32(m.PID)
+ buf.EncodeUint8(uint8(m.IP.Af))
+ buf.EncodeBytes(m.IP.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint32(uint32(m.SwIfIndex))
+ return buf.Bytes(), nil
+}
+func (m *WantIPNeighborEventsV2) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Enable = buf.DecodeBool()
+ m.PID = buf.DecodeUint32()
+ m.IP.Af = ip_types.AddressFamily(buf.DecodeUint8())
+ copy(m.IP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
+ m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ return nil
+}
+
+// WantIPNeighborEventsV2Reply defines message 'want_ip_neighbor_events_v2_reply'.
+type WantIPNeighborEventsV2Reply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+}
+
+func (m *WantIPNeighborEventsV2Reply) Reset() { *m = WantIPNeighborEventsV2Reply{} }
+func (*WantIPNeighborEventsV2Reply) GetMessageName() string {
+ return "want_ip_neighbor_events_v2_reply"
+}
+func (*WantIPNeighborEventsV2Reply) GetCrcString() string { return "e8d4e804" }
+func (*WantIPNeighborEventsV2Reply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *WantIPNeighborEventsV2Reply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ return size
+}
+func (m *WantIPNeighborEventsV2Reply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ return buf.Bytes(), nil
+}
+func (m *WantIPNeighborEventsV2Reply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ return nil
+}
+
func init() { file_ip_neighbor_binapi_init() }
func file_ip_neighbor_binapi_init() {
- api.RegisterMessage((*IPNeighborAddDel)(nil), "ip_neighbor_add_del_105518b6")
+ api.RegisterMessage((*IPNeighborAddDel)(nil), "ip_neighbor_add_del_0607c257")
api.RegisterMessage((*IPNeighborAddDelReply)(nil), "ip_neighbor_add_del_reply_1992deab")
api.RegisterMessage((*IPNeighborConfig)(nil), "ip_neighbor_config_f4a5cf44")
api.RegisterMessage((*IPNeighborConfigReply)(nil), "ip_neighbor_config_reply_e8d4e804")
- api.RegisterMessage((*IPNeighborDetails)(nil), "ip_neighbor_details_870e80b9")
- api.RegisterMessage((*IPNeighborDump)(nil), "ip_neighbor_dump_cd831298")
- api.RegisterMessage((*IPNeighborEvent)(nil), "ip_neighbor_event_83933131")
+ api.RegisterMessage((*IPNeighborDetails)(nil), "ip_neighbor_details_e29d79f0")
+ api.RegisterMessage((*IPNeighborDump)(nil), "ip_neighbor_dump_d817a484")
+ api.RegisterMessage((*IPNeighborEvent)(nil), "ip_neighbor_event_bdb092b2")
+ api.RegisterMessage((*IPNeighborEventV2)(nil), "ip_neighbor_event_v2_c1d53dc0")
api.RegisterMessage((*IPNeighborFlush)(nil), "ip_neighbor_flush_16aa35d2")
api.RegisterMessage((*IPNeighborFlushReply)(nil), "ip_neighbor_flush_reply_e8d4e804")
api.RegisterMessage((*IPNeighborReplaceBegin)(nil), "ip_neighbor_replace_begin_51077d14")
api.RegisterMessage((*IPNeighborReplaceBeginReply)(nil), "ip_neighbor_replace_begin_reply_e8d4e804")
api.RegisterMessage((*IPNeighborReplaceEnd)(nil), "ip_neighbor_replace_end_51077d14")
api.RegisterMessage((*IPNeighborReplaceEndReply)(nil), "ip_neighbor_replace_end_reply_e8d4e804")
- api.RegisterMessage((*WantIPNeighborEvents)(nil), "want_ip_neighbor_events_1a312870")
+ api.RegisterMessage((*WantIPNeighborEvents)(nil), "want_ip_neighbor_events_73e70a86")
api.RegisterMessage((*WantIPNeighborEventsReply)(nil), "want_ip_neighbor_events_reply_e8d4e804")
+ api.RegisterMessage((*WantIPNeighborEventsV2)(nil), "want_ip_neighbor_events_v2_73e70a86")
+ api.RegisterMessage((*WantIPNeighborEventsV2Reply)(nil), "want_ip_neighbor_events_v2_reply_e8d4e804")
}
// Messages returns list of all messages in this module.
@@ -690,6 +879,7 @@ func AllMessages() []api.Message {
(*IPNeighborDetails)(nil),
(*IPNeighborDump)(nil),
(*IPNeighborEvent)(nil),
+ (*IPNeighborEventV2)(nil),
(*IPNeighborFlush)(nil),
(*IPNeighborFlushReply)(nil),
(*IPNeighborReplaceBegin)(nil),
@@ -698,5 +888,7 @@ func AllMessages() []api.Message {
(*IPNeighborReplaceEndReply)(nil),
(*WantIPNeighborEvents)(nil),
(*WantIPNeighborEventsReply)(nil),
+ (*WantIPNeighborEventsV2)(nil),
+ (*WantIPNeighborEventsV2Reply)(nil),
}
}
diff --git a/binapi/ip_neighbor/ip_neighbor_rest.ba.go b/binapi/ip_neighbor/ip_neighbor_rest.ba.go
deleted file mode 100644
index 7db4694..0000000
--- a/binapi/ip_neighbor/ip_neighbor_rest.ba.go
+++ /dev/null
@@ -1,134 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package ip_neighbor
-
-import (
- "encoding/json"
- "io/ioutil"
- "net/http"
-)
-
-func RESTHandler(rpc RPCService) http.Handler {
- mux := http.NewServeMux()
- mux.HandleFunc("/ip_neighbor_add_del", func(w http.ResponseWriter, req *http.Request) {
- var request = new(IPNeighborAddDel)
- b, err := ioutil.ReadAll(req.Body)
- if err != nil {
- http.Error(w, "read body failed", http.StatusBadRequest)
- return
- }
- if err := json.Unmarshal(b, request); err != nil {
- http.Error(w, "unmarshal data failed", http.StatusBadRequest)
- return
- }
- reply, err := rpc.IPNeighborAddDel(req.Context(), request)
- if err != nil {
- http.Error(w, "request failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- rep, err := json.MarshalIndent(reply, "", " ")
- if err != nil {
- http.Error(w, "marshal failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- w.Write(rep)
- })
- mux.HandleFunc("/ip_neighbor_config", func(w http.ResponseWriter, req *http.Request) {
- var request = new(IPNeighborConfig)
- b, err := ioutil.ReadAll(req.Body)
- if err != nil {
- http.Error(w, "read body failed", http.StatusBadRequest)
- return
- }
- if err := json.Unmarshal(b, request); err != nil {
- http.Error(w, "unmarshal data failed", http.StatusBadRequest)
- return
- }
- reply, err := rpc.IPNeighborConfig(req.Context(), request)
- if err != nil {
- http.Error(w, "request failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- rep, err := json.MarshalIndent(reply, "", " ")
- if err != nil {
- http.Error(w, "marshal failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- w.Write(rep)
- })
- mux.HandleFunc("/ip_neighbor_flush", func(w http.ResponseWriter, req *http.Request) {
- var request = new(IPNeighborFlush)
- b, err := ioutil.ReadAll(req.Body)
- if err != nil {
- http.Error(w, "read body failed", http.StatusBadRequest)
- return
- }
- if err := json.Unmarshal(b, request); err != nil {
- http.Error(w, "unmarshal data failed", http.StatusBadRequest)
- return
- }
- reply, err := rpc.IPNeighborFlush(req.Context(), request)
- if err != nil {
- http.Error(w, "request failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- rep, err := json.MarshalIndent(reply, "", " ")
- if err != nil {
- http.Error(w, "marshal failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- w.Write(rep)
- })
- mux.HandleFunc("/ip_neighbor_replace_begin", func(w http.ResponseWriter, req *http.Request) {
- var request = new(IPNeighborReplaceBegin)
- reply, err := rpc.IPNeighborReplaceBegin(req.Context(), request)
- if err != nil {
- http.Error(w, "request failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- rep, err := json.MarshalIndent(reply, "", " ")
- if err != nil {
- http.Error(w, "marshal failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- w.Write(rep)
- })
- mux.HandleFunc("/ip_neighbor_replace_end", func(w http.ResponseWriter, req *http.Request) {
- var request = new(IPNeighborReplaceEnd)
- reply, err := rpc.IPNeighborReplaceEnd(req.Context(), request)
- if err != nil {
- http.Error(w, "request failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- rep, err := json.MarshalIndent(reply, "", " ")
- if err != nil {
- http.Error(w, "marshal failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- w.Write(rep)
- })
- mux.HandleFunc("/want_ip_neighbor_events", func(w http.ResponseWriter, req *http.Request) {
- var request = new(WantIPNeighborEvents)
- b, err := ioutil.ReadAll(req.Body)
- if err != nil {
- http.Error(w, "read body failed", http.StatusBadRequest)
- return
- }
- if err := json.Unmarshal(b, request); err != nil {
- http.Error(w, "unmarshal data failed", http.StatusBadRequest)
- return
- }
- reply, err := rpc.WantIPNeighborEvents(req.Context(), request)
- if err != nil {
- http.Error(w, "request failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- rep, err := json.MarshalIndent(reply, "", " ")
- if err != nil {
- http.Error(w, "marshal failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- w.Write(rep)
- })
- return http.HandlerFunc(mux.ServeHTTP)
-}
diff --git a/binapi/ip_neighbor/ip_neighbor_rpc.ba.go b/binapi/ip_neighbor/ip_neighbor_rpc.ba.go
index 86589dd..00c2e45 100644
--- a/binapi/ip_neighbor/ip_neighbor_rpc.ba.go
+++ b/binapi/ip_neighbor/ip_neighbor_rpc.ba.go
@@ -5,12 +5,13 @@ package ip_neighbor
import (
"context"
"fmt"
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
"io"
+
+ api "go.fd.io/govpp/api"
+ memclnt "go.fd.io/govpp/binapi/memclnt"
)
-// RPCService defines RPC service ip_neighbor.
+// RPCService defines RPC service ip_neighbor.
type RPCService interface {
IPNeighborAddDel(ctx context.Context, in *IPNeighborAddDel) (*IPNeighborAddDelReply, error)
IPNeighborConfig(ctx context.Context, in *IPNeighborConfig) (*IPNeighborConfigReply, error)
@@ -19,6 +20,7 @@ type RPCService interface {
IPNeighborReplaceBegin(ctx context.Context, in *IPNeighborReplaceBegin) (*IPNeighborReplaceBeginReply, error)
IPNeighborReplaceEnd(ctx context.Context, in *IPNeighborReplaceEnd) (*IPNeighborReplaceEndReply, error)
WantIPNeighborEvents(ctx context.Context, in *WantIPNeighborEvents) (*WantIPNeighborEventsReply, error)
+ WantIPNeighborEventsV2(ctx context.Context, in *WantIPNeighborEventsV2) (*WantIPNeighborEventsV2Reply, error)
}
type serviceClient struct {
@@ -35,7 +37,7 @@ func (c *serviceClient) IPNeighborAddDel(ctx context.Context, in *IPNeighborAddD
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IPNeighborConfig(ctx context.Context, in *IPNeighborConfig) (*IPNeighborConfigReply, error) {
@@ -44,7 +46,7 @@ func (c *serviceClient) IPNeighborConfig(ctx context.Context, in *IPNeighborConf
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IPNeighborDump(ctx context.Context, in *IPNeighborDump) (RPCService_IPNeighborDumpClient, error) {
@@ -56,7 +58,7 @@ func (c *serviceClient) IPNeighborDump(ctx context.Context, in *IPNeighborDump)
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
@@ -79,7 +81,11 @@ func (c *serviceClient_IPNeighborDumpClient) Recv() (*IPNeighborDetails, error)
switch m := msg.(type) {
case *IPNeighborDetails:
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)
@@ -92,7 +98,7 @@ func (c *serviceClient) IPNeighborFlush(ctx context.Context, in *IPNeighborFlush
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IPNeighborReplaceBegin(ctx context.Context, in *IPNeighborReplaceBegin) (*IPNeighborReplaceBeginReply, error) {
@@ -101,7 +107,7 @@ func (c *serviceClient) IPNeighborReplaceBegin(ctx context.Context, in *IPNeighb
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IPNeighborReplaceEnd(ctx context.Context, in *IPNeighborReplaceEnd) (*IPNeighborReplaceEndReply, error) {
@@ -110,7 +116,7 @@ func (c *serviceClient) IPNeighborReplaceEnd(ctx context.Context, in *IPNeighbor
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) WantIPNeighborEvents(ctx context.Context, in *WantIPNeighborEvents) (*WantIPNeighborEventsReply, error) {
@@ -119,5 +125,14 @@ func (c *serviceClient) WantIPNeighborEvents(ctx context.Context, in *WantIPNeig
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
+}
+
+func (c *serviceClient) WantIPNeighborEventsV2(ctx context.Context, in *WantIPNeighborEventsV2) (*WantIPNeighborEventsV2Reply, error) {
+ out := new(WantIPNeighborEventsV2Reply)
+ err := c.conn.Invoke(ctx, in, out)
+ if err != nil {
+ return nil, err
+ }
+ return out, api.RetvalToVPPApiError(out.Retval)
}