aboutsummaryrefslogtreecommitdiffstats
path: root/binapi/ipip
diff options
context:
space:
mode:
Diffstat (limited to 'binapi/ipip')
-rw-r--r--binapi/ipip/ipip.ba.go30
-rw-r--r--binapi/ipip/ipip_rest.ba.go106
-rw-r--r--binapi/ipip/ipip_rpc.ba.go23
3 files changed, 29 insertions, 130 deletions
diff --git a/binapi/ipip/ipip.ba.go b/binapi/ipip/ipip.ba.go
index 05821cb..8b3c1f3 100644
--- a/binapi/ipip/ipip.ba.go
+++ b/binapi/ipip/ipip.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/ipip.api.json
// Package ipip contains generated bindings for API file ipip.api.
@@ -13,11 +13,11 @@
package ipip
import (
- api "git.fd.io/govpp.git/api"
- interface_types "git.fd.io/govpp.git/binapi/interface_types"
- ip_types "git.fd.io/govpp.git/binapi/ip_types"
- tunnel_types "git.fd.io/govpp.git/binapi/tunnel_types"
- codec "git.fd.io/govpp.git/codec"
+ api "go.fd.io/govpp/api"
+ interface_types "go.fd.io/govpp/binapi/interface_types"
+ ip_types "go.fd.io/govpp/binapi/ip_types"
+ tunnel_types "go.fd.io/govpp/binapi/tunnel_types"
+ codec "go.fd.io/govpp/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -28,8 +28,8 @@ const _ = api.GoVppAPIPackageIsVersion2
const (
APIFile = "ipip"
- APIVersion = "2.0.1"
- VersionCrc = 0xa095e728
+ APIVersion = "2.0.2"
+ VersionCrc = 0x4609caba
)
// IpipTunnel defines type 'ipip_tunnel'.
@@ -57,7 +57,7 @@ type Ipip6rdAddTunnel struct {
func (m *Ipip6rdAddTunnel) Reset() { *m = Ipip6rdAddTunnel{} }
func (*Ipip6rdAddTunnel) GetMessageName() string { return "ipip_6rd_add_tunnel" }
-func (*Ipip6rdAddTunnel) GetCrcString() string { return "56e93cc0" }
+func (*Ipip6rdAddTunnel) GetCrcString() string { return "b9ec1863" }
func (*Ipip6rdAddTunnel) GetMessageType() api.MessageType {
return api.RequestMessage
}
@@ -217,7 +217,7 @@ type IpipAddTunnel struct {
func (m *IpipAddTunnel) Reset() { *m = IpipAddTunnel{} }
func (*IpipAddTunnel) GetMessageName() string { return "ipip_add_tunnel" }
-func (*IpipAddTunnel) GetCrcString() string { return "a9decfcd" }
+func (*IpipAddTunnel) GetCrcString() string { return "2ac399f5" }
func (*IpipAddTunnel) GetMessageType() api.MessageType {
return api.RequestMessage
}
@@ -380,7 +380,7 @@ type IpipTunnelDetails struct {
func (m *IpipTunnelDetails) Reset() { *m = IpipTunnelDetails{} }
func (*IpipTunnelDetails) GetMessageName() string { return "ipip_tunnel_details" }
-func (*IpipTunnelDetails) GetCrcString() string { return "53236d75" }
+func (*IpipTunnelDetails) GetCrcString() string { return "d31cb34e" }
func (*IpipTunnelDetails) GetMessageType() api.MessageType {
return api.ReplyMessage
}
@@ -468,15 +468,15 @@ func (m *IpipTunnelDump) Unmarshal(b []byte) error {
func init() { file_ipip_binapi_init() }
func file_ipip_binapi_init() {
- api.RegisterMessage((*Ipip6rdAddTunnel)(nil), "ipip_6rd_add_tunnel_56e93cc0")
+ api.RegisterMessage((*Ipip6rdAddTunnel)(nil), "ipip_6rd_add_tunnel_b9ec1863")
api.RegisterMessage((*Ipip6rdAddTunnelReply)(nil), "ipip_6rd_add_tunnel_reply_5383d31f")
api.RegisterMessage((*Ipip6rdDelTunnel)(nil), "ipip_6rd_del_tunnel_f9e6675e")
api.RegisterMessage((*Ipip6rdDelTunnelReply)(nil), "ipip_6rd_del_tunnel_reply_e8d4e804")
- api.RegisterMessage((*IpipAddTunnel)(nil), "ipip_add_tunnel_a9decfcd")
+ api.RegisterMessage((*IpipAddTunnel)(nil), "ipip_add_tunnel_2ac399f5")
api.RegisterMessage((*IpipAddTunnelReply)(nil), "ipip_add_tunnel_reply_5383d31f")
api.RegisterMessage((*IpipDelTunnel)(nil), "ipip_del_tunnel_f9e6675e")
api.RegisterMessage((*IpipDelTunnelReply)(nil), "ipip_del_tunnel_reply_e8d4e804")
- api.RegisterMessage((*IpipTunnelDetails)(nil), "ipip_tunnel_details_53236d75")
+ api.RegisterMessage((*IpipTunnelDetails)(nil), "ipip_tunnel_details_d31cb34e")
api.RegisterMessage((*IpipTunnelDump)(nil), "ipip_tunnel_dump_f9e6675e")
}
diff --git a/binapi/ipip/ipip_rest.ba.go b/binapi/ipip/ipip_rest.ba.go
deleted file mode 100644
index 63fe220..0000000
--- a/binapi/ipip/ipip_rest.ba.go
+++ /dev/null
@@ -1,106 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package ipip
-
-import (
- "encoding/json"
- "io/ioutil"
- "net/http"
-)
-
-func RESTHandler(rpc RPCService) http.Handler {
- mux := http.NewServeMux()
- mux.HandleFunc("/ipip_6rd_add_tunnel", func(w http.ResponseWriter, req *http.Request) {
- var request = new(Ipip6rdAddTunnel)
- 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.Ipip6rdAddTunnel(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("/ipip_6rd_del_tunnel", func(w http.ResponseWriter, req *http.Request) {
- var request = new(Ipip6rdDelTunnel)
- 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.Ipip6rdDelTunnel(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("/ipip_add_tunnel", func(w http.ResponseWriter, req *http.Request) {
- var request = new(IpipAddTunnel)
- 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.IpipAddTunnel(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("/ipip_del_tunnel", func(w http.ResponseWriter, req *http.Request) {
- var request = new(IpipDelTunnel)
- 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.IpipDelTunnel(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/ipip/ipip_rpc.ba.go b/binapi/ipip/ipip_rpc.ba.go
index bab3b22..54fd4cd 100644
--- a/binapi/ipip/ipip_rpc.ba.go
+++ b/binapi/ipip/ipip_rpc.ba.go
@@ -5,12 +5,13 @@ package ipip
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 ipip.
+// RPCService defines RPC service ipip.
type RPCService interface {
Ipip6rdAddTunnel(ctx context.Context, in *Ipip6rdAddTunnel) (*Ipip6rdAddTunnelReply, error)
Ipip6rdDelTunnel(ctx context.Context, in *Ipip6rdDelTunnel) (*Ipip6rdDelTunnelReply, error)
@@ -33,7 +34,7 @@ func (c *serviceClient) Ipip6rdAddTunnel(ctx context.Context, in *Ipip6rdAddTunn
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) Ipip6rdDelTunnel(ctx context.Context, in *Ipip6rdDelTunnel) (*Ipip6rdDelTunnelReply, error) {
@@ -42,7 +43,7 @@ func (c *serviceClient) Ipip6rdDelTunnel(ctx context.Context, in *Ipip6rdDelTunn
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IpipAddTunnel(ctx context.Context, in *IpipAddTunnel) (*IpipAddTunnelReply, error) {
@@ -51,7 +52,7 @@ func (c *serviceClient) IpipAddTunnel(ctx context.Context, in *IpipAddTunnel) (*
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IpipDelTunnel(ctx context.Context, in *IpipDelTunnel) (*IpipDelTunnelReply, error) {
@@ -60,7 +61,7 @@ func (c *serviceClient) IpipDelTunnel(ctx context.Context, in *IpipDelTunnel) (*
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IpipTunnelDump(ctx context.Context, in *IpipTunnelDump) (RPCService_IpipTunnelDumpClient, error) {
@@ -72,7 +73,7 @@ func (c *serviceClient) IpipTunnelDump(ctx context.Context, in *IpipTunnelDump)
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
@@ -95,7 +96,11 @@ func (c *serviceClient_IpipTunnelDumpClient) Recv() (*IpipTunnelDetails, error)
switch m := msg.(type) {
case *IpipTunnelDetails:
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)