aboutsummaryrefslogtreecommitdiffstats
path: root/binapi/arp
diff options
context:
space:
mode:
Diffstat (limited to 'binapi/arp')
-rw-r--r--binapi/arp/arp.ba.go24
-rw-r--r--binapi/arp/arp_rest.ba.go60
-rw-r--r--binapi/arp/arp_rpc.ba.go27
3 files changed, 30 insertions, 81 deletions
diff --git a/binapi/arp/arp.ba.go b/binapi/arp/arp.ba.go
index 90ff55b..2f86d31 100644
--- a/binapi/arp/arp.ba.go
+++ b/binapi/arp/arp.ba.go
@@ -1,7 +1,7 @@
// 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/arp.api.json
// Package arp contains generated bindings for API file arp.api.
@@ -13,11 +13,11 @@
package arp
import (
- api "git.fd.io/govpp.git/api"
- _ "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"
+ api "go.fd.io/govpp/api"
+ _ "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
@@ -29,7 +29,7 @@ const _ = api.GoVppAPIPackageIsVersion2
const (
APIFile = "arp"
APIVersion = "1.0.0"
- VersionCrc = 0x79ca86f2
+ VersionCrc = 0xb57796ae
)
// ProxyArp defines type 'proxy_arp'.
@@ -47,7 +47,7 @@ type ProxyArpAddDel struct {
func (m *ProxyArpAddDel) Reset() { *m = ProxyArpAddDel{} }
func (*ProxyArpAddDel) GetMessageName() string { return "proxy_arp_add_del" }
-func (*ProxyArpAddDel) GetCrcString() string { return "85486cbd" }
+func (*ProxyArpAddDel) GetCrcString() string { return "1823c3e7" }
func (*ProxyArpAddDel) GetMessageType() api.MessageType {
return api.RequestMessage
}
@@ -122,7 +122,7 @@ type ProxyArpDetails struct {
func (m *ProxyArpDetails) Reset() { *m = ProxyArpDetails{} }
func (*ProxyArpDetails) GetMessageName() string { return "proxy_arp_details" }
-func (*ProxyArpDetails) GetCrcString() string { return "9228c150" }
+func (*ProxyArpDetails) GetCrcString() string { return "5b948673" }
func (*ProxyArpDetails) GetMessageType() api.MessageType {
return api.ReplyMessage
}
@@ -315,9 +315,9 @@ func (m *ProxyArpIntfcEnableDisableReply) Unmarshal(b []byte) error {
func init() { file_arp_binapi_init() }
func file_arp_binapi_init() {
- api.RegisterMessage((*ProxyArpAddDel)(nil), "proxy_arp_add_del_85486cbd")
+ api.RegisterMessage((*ProxyArpAddDel)(nil), "proxy_arp_add_del_1823c3e7")
api.RegisterMessage((*ProxyArpAddDelReply)(nil), "proxy_arp_add_del_reply_e8d4e804")
- api.RegisterMessage((*ProxyArpDetails)(nil), "proxy_arp_details_9228c150")
+ api.RegisterMessage((*ProxyArpDetails)(nil), "proxy_arp_details_5b948673")
api.RegisterMessage((*ProxyArpDump)(nil), "proxy_arp_dump_51077d14")
api.RegisterMessage((*ProxyArpIntfcDetails)(nil), "proxy_arp_intfc_details_f6458e5f")
api.RegisterMessage((*ProxyArpIntfcDump)(nil), "proxy_arp_intfc_dump_51077d14")
diff --git a/binapi/arp/arp_rest.ba.go b/binapi/arp/arp_rest.ba.go
deleted file mode 100644
index 71a07d9..0000000
--- a/binapi/arp/arp_rest.ba.go
+++ /dev/null
@@ -1,60 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package arp
-
-import (
- "encoding/json"
- "io/ioutil"
- "net/http"
-)
-
-func RESTHandler(rpc RPCService) http.Handler {
- mux := http.NewServeMux()
- mux.HandleFunc("/proxy_arp_add_del", func(w http.ResponseWriter, req *http.Request) {
- var request = new(ProxyArpAddDel)
- 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.ProxyArpAddDel(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("/proxy_arp_intfc_enable_disable", func(w http.ResponseWriter, req *http.Request) {
- var request = new(ProxyArpIntfcEnableDisable)
- 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.ProxyArpIntfcEnableDisable(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/arp/arp_rpc.ba.go b/binapi/arp/arp_rpc.ba.go
index 8ccfa75..cff3850 100644
--- a/binapi/arp/arp_rpc.ba.go
+++ b/binapi/arp/arp_rpc.ba.go
@@ -5,12 +5,13 @@ package arp
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 arp.
+// RPCService defines RPC service arp.
type RPCService interface {
ProxyArpAddDel(ctx context.Context, in *ProxyArpAddDel) (*ProxyArpAddDelReply, error)
ProxyArpDump(ctx context.Context, in *ProxyArpDump) (RPCService_ProxyArpDumpClient, error)
@@ -32,7 +33,7 @@ func (c *serviceClient) ProxyArpAddDel(ctx context.Context, in *ProxyArpAddDel)
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) ProxyArpDump(ctx context.Context, in *ProxyArpDump) (RPCService_ProxyArpDumpClient, error) {
@@ -44,7 +45,7 @@ func (c *serviceClient) ProxyArpDump(ctx context.Context, in *ProxyArpDump) (RPC
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
@@ -67,7 +68,11 @@ func (c *serviceClient_ProxyArpDumpClient) Recv() (*ProxyArpDetails, error) {
switch m := msg.(type) {
case *ProxyArpDetails:
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)
@@ -83,7 +88,7 @@ func (c *serviceClient) ProxyArpIntfcDump(ctx context.Context, in *ProxyArpIntfc
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
@@ -106,7 +111,11 @@ func (c *serviceClient_ProxyArpIntfcDumpClient) Recv() (*ProxyArpIntfcDetails, e
switch m := msg.(type) {
case *ProxyArpIntfcDetails:
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)
@@ -119,5 +128,5 @@ func (c *serviceClient) ProxyArpIntfcEnableDisable(ctx context.Context, in *Prox
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}