aboutsummaryrefslogtreecommitdiffstats
path: root/binapi/l3xc
diff options
context:
space:
mode:
Diffstat (limited to 'binapi/l3xc')
-rw-r--r--binapi/l3xc/l3xc.ba.go24
-rw-r--r--binapi/l3xc/l3xc_rest.ba.go74
-rw-r--r--binapi/l3xc/l3xc_rpc.ba.go19
3 files changed, 24 insertions, 93 deletions
diff --git a/binapi/l3xc/l3xc.ba.go b/binapi/l3xc/l3xc.ba.go
index 3dbcfba..77c323b 100644
--- a/binapi/l3xc/l3xc.ba.go
+++ b/binapi/l3xc/l3xc.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/plugins/l3xc.api.json
// Package l3xc contains generated bindings for API file l3xc.api.
@@ -13,11 +13,11 @@
package l3xc
import (
- api "git.fd.io/govpp.git/api"
- fib_types "git.fd.io/govpp.git/binapi/fib_types"
- interface_types "git.fd.io/govpp.git/binapi/interface_types"
- _ "git.fd.io/govpp.git/binapi/ip_types"
- codec "git.fd.io/govpp.git/codec"
+ api "go.fd.io/govpp/api"
+ fib_types "go.fd.io/govpp/binapi/fib_types"
+ interface_types "go.fd.io/govpp/binapi/interface_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 = "l3xc"
APIVersion = "1.0.1"
- VersionCrc = 0xaf18effb
+ VersionCrc = 0x520bfc6e
)
// L3xc defines type 'l3xc'.
@@ -117,7 +117,7 @@ type L3xcDetails struct {
func (m *L3xcDetails) Reset() { *m = L3xcDetails{} }
func (*L3xcDetails) GetMessageName() string { return "l3xc_details" }
-func (*L3xcDetails) GetCrcString() string { return "d4f69627" }
+func (*L3xcDetails) GetCrcString() string { return "bc5bf852" }
func (*L3xcDetails) GetMessageType() api.MessageType {
return api.ReplyMessage
}
@@ -326,7 +326,7 @@ type L3xcUpdate struct {
func (m *L3xcUpdate) Reset() { *m = L3xcUpdate{} }
func (*L3xcUpdate) GetMessageName() string { return "l3xc_update" }
-func (*L3xcUpdate) GetCrcString() string { return "0787b1d3" }
+func (*L3xcUpdate) GetCrcString() string { return "e96aabdf" }
func (*L3xcUpdate) GetMessageType() api.MessageType {
return api.RequestMessage
}
@@ -472,11 +472,11 @@ func init() { file_l3xc_binapi_init() }
func file_l3xc_binapi_init() {
api.RegisterMessage((*L3xcDel)(nil), "l3xc_del_e7dbef91")
api.RegisterMessage((*L3xcDelReply)(nil), "l3xc_del_reply_e8d4e804")
- api.RegisterMessage((*L3xcDetails)(nil), "l3xc_details_d4f69627")
+ api.RegisterMessage((*L3xcDetails)(nil), "l3xc_details_bc5bf852")
api.RegisterMessage((*L3xcDump)(nil), "l3xc_dump_f9e6675e")
api.RegisterMessage((*L3xcPluginGetVersion)(nil), "l3xc_plugin_get_version_51077d14")
api.RegisterMessage((*L3xcPluginGetVersionReply)(nil), "l3xc_plugin_get_version_reply_9b32cf86")
- api.RegisterMessage((*L3xcUpdate)(nil), "l3xc_update_0787b1d3")
+ api.RegisterMessage((*L3xcUpdate)(nil), "l3xc_update_e96aabdf")
api.RegisterMessage((*L3xcUpdateReply)(nil), "l3xc_update_reply_1992deab")
}
diff --git a/binapi/l3xc/l3xc_rest.ba.go b/binapi/l3xc/l3xc_rest.ba.go
deleted file mode 100644
index 2b2c9ba..0000000
--- a/binapi/l3xc/l3xc_rest.ba.go
+++ /dev/null
@@ -1,74 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package l3xc
-
-import (
- "encoding/json"
- "io/ioutil"
- "net/http"
-)
-
-func RESTHandler(rpc RPCService) http.Handler {
- mux := http.NewServeMux()
- mux.HandleFunc("/l3xc_del", func(w http.ResponseWriter, req *http.Request) {
- var request = new(L3xcDel)
- 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.L3xcDel(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("/l3xc_plugin_get_version", func(w http.ResponseWriter, req *http.Request) {
- var request = new(L3xcPluginGetVersion)
- reply, err := rpc.L3xcPluginGetVersion(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("/l3xc_update", func(w http.ResponseWriter, req *http.Request) {
- var request = new(L3xcUpdate)
- 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.L3xcUpdate(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/l3xc/l3xc_rpc.ba.go b/binapi/l3xc/l3xc_rpc.ba.go
index 74940a2..8128e71 100644
--- a/binapi/l3xc/l3xc_rpc.ba.go
+++ b/binapi/l3xc/l3xc_rpc.ba.go
@@ -5,12 +5,13 @@ package l3xc
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 l3xc.
+// RPCService defines RPC service l3xc.
type RPCService interface {
L3xcDel(ctx context.Context, in *L3xcDel) (*L3xcDelReply, error)
L3xcDump(ctx context.Context, in *L3xcDump) (RPCService_L3xcDumpClient, error)
@@ -32,7 +33,7 @@ func (c *serviceClient) L3xcDel(ctx context.Context, in *L3xcDel) (*L3xcDelReply
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) L3xcDump(ctx context.Context, in *L3xcDump) (RPCService_L3xcDumpClient, error) {
@@ -44,7 +45,7 @@ func (c *serviceClient) L3xcDump(ctx context.Context, in *L3xcDump) (RPCService_
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_L3xcDumpClient) Recv() (*L3xcDetails, error) {
switch m := msg.(type) {
case *L3xcDetails:
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)
@@ -89,5 +94,5 @@ func (c *serviceClient) L3xcUpdate(ctx context.Context, in *L3xcUpdate) (*L3xcUp
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}