diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0f56cf22..b554acd9 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -68,7 +68,7 @@ jobs: matrix: go: [ '1.22' ] env: - VERSION: v0.10.0 + VERSION: v0.11.0 runs-on: ubuntu-latest steps: - name: "Checkout" diff --git a/CHANGELOG.md b/CHANGELOG.md index ecc0591f..0b85a7a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,27 @@ This file lists changes for the GoVPP releases. - --> +## 0.11.0 + +> _19 September 2024_ + +### Changes + +- Minor changes (#223) +- Add well-known reply timeout error (#234) + +### GoMemif + +- Gomemif improvemets (#228) +- Improves gomemif library (#216) + +### CI + +- Add Release workflow with goreleaser (#202) +- Add Login to ghcr step to release Workflow (#212) +- Extras integration testing (#233) +- lint: check markdown files (#238) + ## 0.10.0 > _03 April 2024_ diff --git a/Dockerfile b/Dockerfile index c92a0e2a..c0e9759f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG VPP_VERSION=v24.02 +ARG VPP_VERSION=v24.06 ARG UBUNTU_VERSION=22.04 FROM ubuntu:${UBUNTU_VERSION} as vppbuild diff --git a/Makefile b/Makefile index 6e6bfe80..5e93b17a 100644 --- a/Makefile +++ b/Makefile @@ -43,7 +43,7 @@ endif # Package cloud repo for VPP. VPP_REPO ?= release # VPP Docker image to use for api generation (gen-binapi-docker) -VPP_IMG ?= ligato/vpp-base:24.02-release +VPP_IMG ?= ligato/vpp-base:24.06-release # Local VPP directory used for binary api generation (gen-binapi-from-code) VPP_DIR ?= # Target directory for generated go api bindings diff --git a/binapi/abf/abf.ba.go b/binapi/abf/abf.ba.go index e1407b79..50db96e1 100644 --- a/binapi/abf/abf.ba.go +++ b/binapi/abf/abf.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/abf.api.json // Package abf contains generated bindings for API file abf.api. diff --git a/binapi/acl/acl.ba.go b/binapi/acl/acl.ba.go index d543eec4..baa63209 100644 --- a/binapi/acl/acl.ba.go +++ b/binapi/acl/acl.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/acl.api.json // Package acl contains generated bindings for API file acl.api. diff --git a/binapi/acl_types/acl_types.ba.go b/binapi/acl_types/acl_types.ba.go index ead5bce9..3e120625 100644 --- a/binapi/acl_types/acl_types.ba.go +++ b/binapi/acl_types/acl_types.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/acl_types.api.json // Package acl_types contains generated bindings for API file acl_types.api. diff --git a/binapi/adl/adl.ba.go b/binapi/adl/adl.ba.go index f1d3856a..716b429b 100644 --- a/binapi/adl/adl.ba.go +++ b/binapi/adl/adl.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/adl.api.json // Package adl contains generated bindings for API file adl.api. diff --git a/binapi/af_packet/af_packet.ba.go b/binapi/af_packet/af_packet.ba.go index e4cd322b..eb10ce50 100644 --- a/binapi/af_packet/af_packet.ba.go +++ b/binapi/af_packet/af_packet.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/af_packet.api.json // Package af_packet contains generated bindings for API file af_packet.api. diff --git a/binapi/af_xdp/af_xdp.ba.go b/binapi/af_xdp/af_xdp.ba.go index 205bc3c1..8d994b51 100644 --- a/binapi/af_xdp/af_xdp.ba.go +++ b/binapi/af_xdp/af_xdp.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/af_xdp.api.json // Package af_xdp contains generated bindings for API file af_xdp.api. diff --git a/binapi/arp/arp.ba.go b/binapi/arp/arp.ba.go index f5a2458e..9e8b6d5c 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.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/arp.api.json // Package arp contains generated bindings for API file arp.api. diff --git a/binapi/arping/arping.ba.go b/binapi/arping/arping.ba.go index f0755e79..46478ed8 100644 --- a/binapi/arping/arping.ba.go +++ b/binapi/arping/arping.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/arping.api.json // Package arping contains generated bindings for API file arping.api. diff --git a/binapi/avf/avf.ba.go b/binapi/avf/avf.ba.go index f8e1caff..25ed7255 100644 --- a/binapi/avf/avf.ba.go +++ b/binapi/avf/avf.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/avf.api.json // Package avf contains generated bindings for API file avf.api. diff --git a/binapi/bfd/bfd.ba.go b/binapi/bfd/bfd.ba.go index f192d580..f5d2cb8f 100644 --- a/binapi/bfd/bfd.ba.go +++ b/binapi/bfd/bfd.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/bfd.api.json // Package bfd contains generated bindings for API file bfd.api. diff --git a/binapi/bier/bier.ba.go b/binapi/bier/bier.ba.go index 2d49dad0..5f03c365 100644 --- a/binapi/bier/bier.ba.go +++ b/binapi/bier/bier.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/bier.api.json // Package bier contains generated bindings for API file bier.api. diff --git a/binapi/bond/bond.ba.go b/binapi/bond/bond.ba.go index a3061a60..c5aeb9d4 100644 --- a/binapi/bond/bond.ba.go +++ b/binapi/bond/bond.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/bond.api.json // Package bond contains generated bindings for API file bond.api. diff --git a/binapi/bpf_trace_filter/bpf_trace_filter.ba.go b/binapi/bpf_trace_filter/bpf_trace_filter.ba.go index 85edcaee..2c485bd9 100644 --- a/binapi/bpf_trace_filter/bpf_trace_filter.ba.go +++ b/binapi/bpf_trace_filter/bpf_trace_filter.ba.go @@ -1,13 +1,13 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/bpf_trace_filter.api.json // Package bpf_trace_filter contains generated bindings for API file bpf_trace_filter.api. // // Contents: -// - 2 messages +// - 4 messages package bpf_trace_filter import ( @@ -24,7 +24,7 @@ const _ = api.GoVppAPIPackageIsVersion2 const ( APIFile = "bpf_trace_filter" APIVersion = "0.1.0" - VersionCrc = 0x79160184 + VersionCrc = 0xb682a79a ) // /* @@ -113,10 +113,86 @@ func (m *BpfTraceFilterSetReply) Unmarshal(b []byte) error { return nil } +// BpfTraceFilterSetV2 defines message 'bpf_trace_filter_set_v2'. +type BpfTraceFilterSetV2 struct { + IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` + Optimize bool `binapi:"bool,name=optimize,default=true" json:"optimize,omitempty"` + Filter string `binapi:"string[],name=filter" json:"filter,omitempty"` +} + +func (m *BpfTraceFilterSetV2) Reset() { *m = BpfTraceFilterSetV2{} } +func (*BpfTraceFilterSetV2) GetMessageName() string { return "bpf_trace_filter_set_v2" } +func (*BpfTraceFilterSetV2) GetCrcString() string { return "5615acbf" } +func (*BpfTraceFilterSetV2) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *BpfTraceFilterSetV2) Size() (size int) { + if m == nil { + return 0 + } + size += 1 // m.IsAdd + size += 1 // m.Optimize + size += 4 + len(m.Filter) // m.Filter + return size +} +func (m *BpfTraceFilterSetV2) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBool(m.IsAdd) + buf.EncodeBool(m.Optimize) + buf.EncodeString(m.Filter, 0) + return buf.Bytes(), nil +} +func (m *BpfTraceFilterSetV2) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.IsAdd = buf.DecodeBool() + m.Optimize = buf.DecodeBool() + m.Filter = buf.DecodeString(0) + return nil +} + +// BpfTraceFilterSetV2Reply defines message 'bpf_trace_filter_set_v2_reply'. +type BpfTraceFilterSetV2Reply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *BpfTraceFilterSetV2Reply) Reset() { *m = BpfTraceFilterSetV2Reply{} } +func (*BpfTraceFilterSetV2Reply) GetMessageName() string { return "bpf_trace_filter_set_v2_reply" } +func (*BpfTraceFilterSetV2Reply) GetCrcString() string { return "e8d4e804" } +func (*BpfTraceFilterSetV2Reply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *BpfTraceFilterSetV2Reply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *BpfTraceFilterSetV2Reply) 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 *BpfTraceFilterSetV2Reply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + func init() { file_bpf_trace_filter_binapi_init() } func file_bpf_trace_filter_binapi_init() { api.RegisterMessage((*BpfTraceFilterSet)(nil), "bpf_trace_filter_set_3171346e") api.RegisterMessage((*BpfTraceFilterSetReply)(nil), "bpf_trace_filter_set_reply_e8d4e804") + api.RegisterMessage((*BpfTraceFilterSetV2)(nil), "bpf_trace_filter_set_v2_5615acbf") + api.RegisterMessage((*BpfTraceFilterSetV2Reply)(nil), "bpf_trace_filter_set_v2_reply_e8d4e804") } // Messages returns list of all messages in this module. @@ -124,5 +200,7 @@ func AllMessages() []api.Message { return []api.Message{ (*BpfTraceFilterSet)(nil), (*BpfTraceFilterSetReply)(nil), + (*BpfTraceFilterSetV2)(nil), + (*BpfTraceFilterSetV2Reply)(nil), } } diff --git a/binapi/bpf_trace_filter/bpf_trace_filter_rpc.ba.go b/binapi/bpf_trace_filter/bpf_trace_filter_rpc.ba.go index 8d68e5b3..02f9f7eb 100644 --- a/binapi/bpf_trace_filter/bpf_trace_filter_rpc.ba.go +++ b/binapi/bpf_trace_filter/bpf_trace_filter_rpc.ba.go @@ -11,6 +11,7 @@ import ( // RPCService defines RPC service bpf_trace_filter. type RPCService interface { BpfTraceFilterSet(ctx context.Context, in *BpfTraceFilterSet) (*BpfTraceFilterSetReply, error) + BpfTraceFilterSetV2(ctx context.Context, in *BpfTraceFilterSetV2) (*BpfTraceFilterSetV2Reply, error) } type serviceClient struct { @@ -29,3 +30,12 @@ func (c *serviceClient) BpfTraceFilterSet(ctx context.Context, in *BpfTraceFilte } return out, api.RetvalToVPPApiError(out.Retval) } + +func (c *serviceClient) BpfTraceFilterSetV2(ctx context.Context, in *BpfTraceFilterSetV2) (*BpfTraceFilterSetV2Reply, error) { + out := new(BpfTraceFilterSetV2Reply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, api.RetvalToVPPApiError(out.Retval) +} diff --git a/binapi/builtinurl/builtinurl.ba.go b/binapi/builtinurl/builtinurl.ba.go index 4496294d..233c086f 100644 --- a/binapi/builtinurl/builtinurl.ba.go +++ b/binapi/builtinurl/builtinurl.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/builtinurl.api.json // Package builtinurl contains generated bindings for API file builtinurl.api. @@ -32,6 +32,7 @@ const ( // - sw_if_index - interface handle // // BuiltinurlEnable defines message 'builtinurl_enable'. +// Deprecated: incorporated in http_static plugin type BuiltinurlEnable struct{} func (m *BuiltinurlEnable) Reset() { *m = BuiltinurlEnable{} } @@ -59,6 +60,7 @@ func (m *BuiltinurlEnable) Unmarshal(b []byte) error { } // BuiltinurlEnableReply defines message 'builtinurl_enable_reply'. +// Deprecated: incorporated in http_static plugin type BuiltinurlEnableReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } diff --git a/binapi/cdp/cdp.ba.go b/binapi/cdp/cdp.ba.go index 8fa08096..3c8a59ba 100644 --- a/binapi/cdp/cdp.ba.go +++ b/binapi/cdp/cdp.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/cdp.api.json // Package cdp contains generated bindings for API file cdp.api. diff --git a/binapi/classify/classify.ba.go b/binapi/classify/classify.ba.go index 4c65afeb..aab50f3e 100644 --- a/binapi/classify/classify.ba.go +++ b/binapi/classify/classify.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/classify.api.json // Package classify contains generated bindings for API file classify.api. diff --git a/binapi/cnat/cnat.ba.go b/binapi/cnat/cnat.ba.go index d4569f98..f6ed4e26 100644 --- a/binapi/cnat/cnat.ba.go +++ b/binapi/cnat/cnat.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/cnat.api.json // Package cnat contains generated bindings for API file cnat.api. diff --git a/binapi/crypto/crypto.ba.go b/binapi/crypto/crypto.ba.go index c9aec6a8..22612373 100644 --- a/binapi/crypto/crypto.ba.go +++ b/binapi/crypto/crypto.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/crypto.api.json // Package crypto contains generated bindings for API file crypto.api. diff --git a/binapi/crypto_sw_scheduler/crypto_sw_scheduler.ba.go b/binapi/crypto_sw_scheduler/crypto_sw_scheduler.ba.go index 34193f96..9c3a3b31 100644 --- a/binapi/crypto_sw_scheduler/crypto_sw_scheduler.ba.go +++ b/binapi/crypto_sw_scheduler/crypto_sw_scheduler.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/crypto_sw_scheduler.api.json // Package crypto_sw_scheduler contains generated bindings for API file crypto_sw_scheduler.api. diff --git a/binapi/ct6/ct6.ba.go b/binapi/ct6/ct6.ba.go index 3265a930..d20c8e25 100644 --- a/binapi/ct6/ct6.ba.go +++ b/binapi/ct6/ct6.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/ct6.api.json // Package ct6 contains generated bindings for API file ct6.api. diff --git a/binapi/det44/det44.ba.go b/binapi/det44/det44.ba.go index 1807477f..40e47b0f 100644 --- a/binapi/det44/det44.ba.go +++ b/binapi/det44/det44.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/det44.api.json // Package det44 contains generated bindings for API file det44.api. diff --git a/binapi/dev/dev.ba.go b/binapi/dev/dev.ba.go index f463d97a..ca962443 100644 --- a/binapi/dev/dev.ba.go +++ b/binapi/dev/dev.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/dev.api.json // Package dev contains generated bindings for API file dev.api. diff --git a/binapi/dhcp/dhcp.ba.go b/binapi/dhcp/dhcp.ba.go index a1a04d8d..798ec689 100644 --- a/binapi/dhcp/dhcp.ba.go +++ b/binapi/dhcp/dhcp.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/dhcp.api.json // Package dhcp contains generated bindings for API file dhcp.api. diff --git a/binapi/dhcp6_ia_na_client_cp/dhcp6_ia_na_client_cp.ba.go b/binapi/dhcp6_ia_na_client_cp/dhcp6_ia_na_client_cp.ba.go index 844a6f6a..7b9de51e 100644 --- a/binapi/dhcp6_ia_na_client_cp/dhcp6_ia_na_client_cp.ba.go +++ b/binapi/dhcp6_ia_na_client_cp/dhcp6_ia_na_client_cp.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/dhcp6_ia_na_client_cp.api.json // Package dhcp6_ia_na_client_cp contains generated bindings for API file dhcp6_ia_na_client_cp.api. diff --git a/binapi/dhcp6_pd_client_cp/dhcp6_pd_client_cp.ba.go b/binapi/dhcp6_pd_client_cp/dhcp6_pd_client_cp.ba.go index df393517..b2ec29a9 100644 --- a/binapi/dhcp6_pd_client_cp/dhcp6_pd_client_cp.ba.go +++ b/binapi/dhcp6_pd_client_cp/dhcp6_pd_client_cp.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/dhcp6_pd_client_cp.api.json // Package dhcp6_pd_client_cp contains generated bindings for API file dhcp6_pd_client_cp.api. diff --git a/binapi/dns/dns.ba.go b/binapi/dns/dns.ba.go index bcc4a362..15d377fd 100644 --- a/binapi/dns/dns.ba.go +++ b/binapi/dns/dns.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/dns.api.json // Package dns contains generated bindings for API file dns.api. diff --git a/binapi/dslite/dslite.ba.go b/binapi/dslite/dslite.ba.go index 979e3fa2..fe9ed631 100644 --- a/binapi/dslite/dslite.ba.go +++ b/binapi/dslite/dslite.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/dslite.api.json // Package dslite contains generated bindings for API file dslite.api. diff --git a/binapi/ethernet_types/ethernet_types.ba.go b/binapi/ethernet_types/ethernet_types.ba.go index 112cc813..4c1105ce 100644 --- a/binapi/ethernet_types/ethernet_types.ba.go +++ b/binapi/ethernet_types/ethernet_types.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/ethernet_types.api.json // Package ethernet_types contains generated bindings for API file ethernet_types.api. diff --git a/binapi/feature/feature.ba.go b/binapi/feature/feature.ba.go index 68512443..dde1a03c 100644 --- a/binapi/feature/feature.ba.go +++ b/binapi/feature/feature.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/feature.api.json // Package feature contains generated bindings for API file feature.api. diff --git a/binapi/fib/fib.ba.go b/binapi/fib/fib.ba.go index f90ed556..71d13d24 100644 --- a/binapi/fib/fib.ba.go +++ b/binapi/fib/fib.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/fib.api.json // Package fib contains generated bindings for API file fib.api. diff --git a/binapi/fib_types/fib_types.ba.go b/binapi/fib_types/fib_types.ba.go index 0ae48f06..2c263c6e 100644 --- a/binapi/fib_types/fib_types.ba.go +++ b/binapi/fib_types/fib_types.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/fib_types.api.json // Package fib_types contains generated bindings for API file fib_types.api. diff --git a/binapi/flow/flow.ba.go b/binapi/flow/flow.ba.go index 131eda9a..49f79134 100644 --- a/binapi/flow/flow.ba.go +++ b/binapi/flow/flow.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/flow.api.json // Package flow contains generated bindings for API file flow.api. diff --git a/binapi/flow_types/flow_types.ba.go b/binapi/flow_types/flow_types.ba.go index 3f8170c8..04b1cb87 100644 --- a/binapi/flow_types/flow_types.ba.go +++ b/binapi/flow_types/flow_types.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/flow_types.api.json // Package flow_types contains generated bindings for API file flow_types.api. diff --git a/binapi/flowprobe/flowprobe.ba.go b/binapi/flowprobe/flowprobe.ba.go index d682e2fd..6593b8eb 100644 --- a/binapi/flowprobe/flowprobe.ba.go +++ b/binapi/flowprobe/flowprobe.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/flowprobe.api.json // Package flowprobe contains generated bindings for API file flowprobe.api. diff --git a/binapi/geneve/geneve.ba.go b/binapi/geneve/geneve.ba.go index 67cbf41f..14c669a5 100644 --- a/binapi/geneve/geneve.ba.go +++ b/binapi/geneve/geneve.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/geneve.api.json // Package geneve contains generated bindings for API file geneve.api. diff --git a/binapi/graph/graph.ba.go b/binapi/graph/graph.ba.go index ab42021b..ed28c7a0 100644 --- a/binapi/graph/graph.ba.go +++ b/binapi/graph/graph.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/graph.api.json // Package graph contains generated bindings for API file graph.api. diff --git a/binapi/gre/gre.ba.go b/binapi/gre/gre.ba.go index bd067efd..d7d38f8a 100644 --- a/binapi/gre/gre.ba.go +++ b/binapi/gre/gre.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/gre.api.json // Package gre contains generated bindings for API file gre.api. diff --git a/binapi/gso/gso.ba.go b/binapi/gso/gso.ba.go index eb9ffc87..bd4bac4e 100644 --- a/binapi/gso/gso.ba.go +++ b/binapi/gso/gso.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/gso.api.json // Package gso contains generated bindings for API file gso.api. diff --git a/binapi/gtpu/gtpu.ba.go b/binapi/gtpu/gtpu.ba.go index 7fad4362..a8b97a4f 100644 --- a/binapi/gtpu/gtpu.ba.go +++ b/binapi/gtpu/gtpu.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/gtpu.api.json // Package gtpu contains generated bindings for API file gtpu.api. diff --git a/binapi/http_static/http_static.ba.go b/binapi/http_static/http_static.ba.go index ac1bca24..1e5d5fcc 100644 --- a/binapi/http_static/http_static.ba.go +++ b/binapi/http_static/http_static.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/http_static.api.json // Package http_static contains generated bindings for API file http_static.api. diff --git a/binapi/idpf/idpf.ba.go b/binapi/idpf/idpf.ba.go index 1f48d9dc..62a59e00 100644 --- a/binapi/idpf/idpf.ba.go +++ b/binapi/idpf/idpf.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/idpf.api.json // Package idpf contains generated bindings for API file idpf.api. diff --git a/binapi/igmp/igmp.ba.go b/binapi/igmp/igmp.ba.go index 515bb6ab..36d7e495 100644 --- a/binapi/igmp/igmp.ba.go +++ b/binapi/igmp/igmp.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/igmp.api.json // Package igmp contains generated bindings for API file igmp.api. diff --git a/binapi/ikev2/ikev2.ba.go b/binapi/ikev2/ikev2.ba.go index 72df568c..ed5a621c 100644 --- a/binapi/ikev2/ikev2.ba.go +++ b/binapi/ikev2/ikev2.ba.go @@ -1,13 +1,13 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/ikev2.api.json // Package ikev2 contains generated bindings for API file ikev2.api. // // Contents: -// - 50 messages +// - 56 messages package ikev2 import ( @@ -27,7 +27,7 @@ const _ = api.GoVppAPIPackageIsVersion2 const ( APIFile = "ikev2" APIVersion = "1.0.1" - VersionCrc = 0x8eb2437c + VersionCrc = 0x388d5d85 ) // Child SA details @@ -35,7 +35,6 @@ const ( // - child_sa - child SA data // // Ikev2ChildSaDetails defines message 'ikev2_child_sa_details'. -// InProgress: the message form may change in the future versions type Ikev2ChildSaDetails struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` ChildSa ikev2_types.Ikev2ChildSa `binapi:"ikev2_child_sa,name=child_sa" json:"child_sa,omitempty"` @@ -188,7 +187,6 @@ func (m *Ikev2ChildSaDetails) Unmarshal(b []byte) error { // - sa_index - index of specific sa // // Ikev2ChildSaDump defines message 'ikev2_child_sa_dump'. -// InProgress: the message form may change in the future versions type Ikev2ChildSaDump struct { SaIndex uint32 `binapi:"u32,name=sa_index" json:"sa_index,omitempty"` } @@ -221,6 +219,200 @@ func (m *Ikev2ChildSaDump) Unmarshal(b []byte) error { return nil } +// Child SA details +// - retval - return code +// - child_sa - child SA data +// +// Ikev2ChildSaV2Details defines message 'ikev2_child_sa_v2_details'. +// InProgress: the message form may change in the future versions +type Ikev2ChildSaV2Details struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` + ChildSa ikev2_types.Ikev2ChildSaV2 `binapi:"ikev2_child_sa_v2,name=child_sa" json:"child_sa,omitempty"` +} + +func (m *Ikev2ChildSaV2Details) Reset() { *m = Ikev2ChildSaV2Details{} } +func (*Ikev2ChildSaV2Details) GetMessageName() string { return "ikev2_child_sa_v2_details" } +func (*Ikev2ChildSaV2Details) GetCrcString() string { return "1db62aa2" } +func (*Ikev2ChildSaV2Details) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Ikev2ChildSaV2Details) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + size += 4 // m.ChildSa.SaIndex + size += 4 // m.ChildSa.ChildSaIndex + size += 4 // m.ChildSa.ISpi + size += 4 // m.ChildSa.RSpi + size += 1 * 64 // m.ChildSa.Keys.SkD + size += 1 // m.ChildSa.Keys.SkDLen + size += 1 * 64 // m.ChildSa.Keys.SkAi + size += 1 // m.ChildSa.Keys.SkAiLen + size += 1 * 64 // m.ChildSa.Keys.SkAr + size += 1 // m.ChildSa.Keys.SkArLen + size += 1 * 64 // m.ChildSa.Keys.SkEi + size += 1 // m.ChildSa.Keys.SkEiLen + size += 1 * 64 // m.ChildSa.Keys.SkEr + size += 1 // m.ChildSa.Keys.SkErLen + size += 1 * 64 // m.ChildSa.Keys.SkPi + size += 1 // m.ChildSa.Keys.SkPiLen + size += 1 * 64 // m.ChildSa.Keys.SkPr + size += 1 // m.ChildSa.Keys.SkPrLen + size += 1 // m.ChildSa.Encryption.TransformType + size += 2 // m.ChildSa.Encryption.TransformID + size += 2 // m.ChildSa.Encryption.KeyLen + size += 2 // m.ChildSa.Encryption.KeyTrunc + size += 2 // m.ChildSa.Encryption.BlockSize + size += 1 // m.ChildSa.Encryption.DhGroup + size += 1 // m.ChildSa.Integrity.TransformType + size += 2 // m.ChildSa.Integrity.TransformID + size += 2 // m.ChildSa.Integrity.KeyLen + size += 2 // m.ChildSa.Integrity.KeyTrunc + size += 2 // m.ChildSa.Integrity.BlockSize + size += 1 // m.ChildSa.Integrity.DhGroup + size += 1 // m.ChildSa.Esn.TransformType + size += 2 // m.ChildSa.Esn.TransformID + size += 2 // m.ChildSa.Esn.KeyLen + size += 2 // m.ChildSa.Esn.KeyTrunc + size += 2 // m.ChildSa.Esn.BlockSize + size += 1 // m.ChildSa.Esn.DhGroup + size += 8 // m.ChildSa.Uptime + return size +} +func (m *Ikev2ChildSaV2Details) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + buf.EncodeUint32(m.ChildSa.SaIndex) + buf.EncodeUint32(m.ChildSa.ChildSaIndex) + buf.EncodeUint32(m.ChildSa.ISpi) + buf.EncodeUint32(m.ChildSa.RSpi) + buf.EncodeBytes(m.ChildSa.Keys.SkD, 64) + buf.EncodeUint8(m.ChildSa.Keys.SkDLen) + buf.EncodeBytes(m.ChildSa.Keys.SkAi, 64) + buf.EncodeUint8(m.ChildSa.Keys.SkAiLen) + buf.EncodeBytes(m.ChildSa.Keys.SkAr, 64) + buf.EncodeUint8(m.ChildSa.Keys.SkArLen) + buf.EncodeBytes(m.ChildSa.Keys.SkEi, 64) + buf.EncodeUint8(m.ChildSa.Keys.SkEiLen) + buf.EncodeBytes(m.ChildSa.Keys.SkEr, 64) + buf.EncodeUint8(m.ChildSa.Keys.SkErLen) + buf.EncodeBytes(m.ChildSa.Keys.SkPi, 64) + buf.EncodeUint8(m.ChildSa.Keys.SkPiLen) + buf.EncodeBytes(m.ChildSa.Keys.SkPr, 64) + buf.EncodeUint8(m.ChildSa.Keys.SkPrLen) + buf.EncodeUint8(m.ChildSa.Encryption.TransformType) + buf.EncodeUint16(m.ChildSa.Encryption.TransformID) + buf.EncodeUint16(m.ChildSa.Encryption.KeyLen) + buf.EncodeUint16(m.ChildSa.Encryption.KeyTrunc) + buf.EncodeUint16(m.ChildSa.Encryption.BlockSize) + buf.EncodeUint8(m.ChildSa.Encryption.DhGroup) + buf.EncodeUint8(m.ChildSa.Integrity.TransformType) + buf.EncodeUint16(m.ChildSa.Integrity.TransformID) + buf.EncodeUint16(m.ChildSa.Integrity.KeyLen) + buf.EncodeUint16(m.ChildSa.Integrity.KeyTrunc) + buf.EncodeUint16(m.ChildSa.Integrity.BlockSize) + buf.EncodeUint8(m.ChildSa.Integrity.DhGroup) + buf.EncodeUint8(m.ChildSa.Esn.TransformType) + buf.EncodeUint16(m.ChildSa.Esn.TransformID) + buf.EncodeUint16(m.ChildSa.Esn.KeyLen) + buf.EncodeUint16(m.ChildSa.Esn.KeyTrunc) + buf.EncodeUint16(m.ChildSa.Esn.BlockSize) + buf.EncodeUint8(m.ChildSa.Esn.DhGroup) + buf.EncodeFloat64(m.ChildSa.Uptime) + return buf.Bytes(), nil +} +func (m *Ikev2ChildSaV2Details) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + m.ChildSa.SaIndex = buf.DecodeUint32() + m.ChildSa.ChildSaIndex = buf.DecodeUint32() + m.ChildSa.ISpi = buf.DecodeUint32() + m.ChildSa.RSpi = buf.DecodeUint32() + m.ChildSa.Keys.SkD = make([]byte, 64) + copy(m.ChildSa.Keys.SkD, buf.DecodeBytes(len(m.ChildSa.Keys.SkD))) + m.ChildSa.Keys.SkDLen = buf.DecodeUint8() + m.ChildSa.Keys.SkAi = make([]byte, 64) + copy(m.ChildSa.Keys.SkAi, buf.DecodeBytes(len(m.ChildSa.Keys.SkAi))) + m.ChildSa.Keys.SkAiLen = buf.DecodeUint8() + m.ChildSa.Keys.SkAr = make([]byte, 64) + copy(m.ChildSa.Keys.SkAr, buf.DecodeBytes(len(m.ChildSa.Keys.SkAr))) + m.ChildSa.Keys.SkArLen = buf.DecodeUint8() + m.ChildSa.Keys.SkEi = make([]byte, 64) + copy(m.ChildSa.Keys.SkEi, buf.DecodeBytes(len(m.ChildSa.Keys.SkEi))) + m.ChildSa.Keys.SkEiLen = buf.DecodeUint8() + m.ChildSa.Keys.SkEr = make([]byte, 64) + copy(m.ChildSa.Keys.SkEr, buf.DecodeBytes(len(m.ChildSa.Keys.SkEr))) + m.ChildSa.Keys.SkErLen = buf.DecodeUint8() + m.ChildSa.Keys.SkPi = make([]byte, 64) + copy(m.ChildSa.Keys.SkPi, buf.DecodeBytes(len(m.ChildSa.Keys.SkPi))) + m.ChildSa.Keys.SkPiLen = buf.DecodeUint8() + m.ChildSa.Keys.SkPr = make([]byte, 64) + copy(m.ChildSa.Keys.SkPr, buf.DecodeBytes(len(m.ChildSa.Keys.SkPr))) + m.ChildSa.Keys.SkPrLen = buf.DecodeUint8() + m.ChildSa.Encryption.TransformType = buf.DecodeUint8() + m.ChildSa.Encryption.TransformID = buf.DecodeUint16() + m.ChildSa.Encryption.KeyLen = buf.DecodeUint16() + m.ChildSa.Encryption.KeyTrunc = buf.DecodeUint16() + m.ChildSa.Encryption.BlockSize = buf.DecodeUint16() + m.ChildSa.Encryption.DhGroup = buf.DecodeUint8() + m.ChildSa.Integrity.TransformType = buf.DecodeUint8() + m.ChildSa.Integrity.TransformID = buf.DecodeUint16() + m.ChildSa.Integrity.KeyLen = buf.DecodeUint16() + m.ChildSa.Integrity.KeyTrunc = buf.DecodeUint16() + m.ChildSa.Integrity.BlockSize = buf.DecodeUint16() + m.ChildSa.Integrity.DhGroup = buf.DecodeUint8() + m.ChildSa.Esn.TransformType = buf.DecodeUint8() + m.ChildSa.Esn.TransformID = buf.DecodeUint16() + m.ChildSa.Esn.KeyLen = buf.DecodeUint16() + m.ChildSa.Esn.KeyTrunc = buf.DecodeUint16() + m.ChildSa.Esn.BlockSize = buf.DecodeUint16() + m.ChildSa.Esn.DhGroup = buf.DecodeUint8() + m.ChildSa.Uptime = buf.DecodeFloat64() + return nil +} + +// Dump child SA of specific SA +// - sa_index - index of specific sa +// +// Ikev2ChildSaV2Dump defines message 'ikev2_child_sa_v2_dump'. +// InProgress: the message form may change in the future versions +type Ikev2ChildSaV2Dump struct { + SaIndex uint32 `binapi:"u32,name=sa_index" json:"sa_index,omitempty"` +} + +func (m *Ikev2ChildSaV2Dump) Reset() { *m = Ikev2ChildSaV2Dump{} } +func (*Ikev2ChildSaV2Dump) GetMessageName() string { return "ikev2_child_sa_v2_dump" } +func (*Ikev2ChildSaV2Dump) GetCrcString() string { return "01eab609" } +func (*Ikev2ChildSaV2Dump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Ikev2ChildSaV2Dump) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.SaIndex + return size +} +func (m *Ikev2ChildSaV2Dump) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.SaIndex) + return buf.Bytes(), nil +} +func (m *Ikev2ChildSaV2Dump) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.SaIndex = buf.DecodeUint32() + return nil +} + // IKEv2: Initiate the delete Child SA exchange // - ispi - Child SA initiator SPI // @@ -1556,7 +1748,6 @@ func (m *Ikev2ProfileSetUDPEncapReply) Unmarshal(b []byte) error { // - sa - SA data // // Ikev2SaDetails defines message 'ikev2_sa_details'. -// InProgress: the message form may change in the future versions type Ikev2SaDetails struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` Sa ikev2_types.Ikev2Sa `binapi:"ikev2_sa,name=sa" json:"sa,omitempty"` @@ -1773,7 +1964,6 @@ func (m *Ikev2SaDetails) Unmarshal(b []byte) error { // Dump all SAs // Ikev2SaDump defines message 'ikev2_sa_dump'. -// InProgress: the message form may change in the future versions type Ikev2SaDump struct{} func (m *Ikev2SaDump) Reset() { *m = Ikev2SaDump{} } @@ -1800,6 +1990,511 @@ func (m *Ikev2SaDump) Unmarshal(b []byte) error { return nil } +// Details about IKE SA +// - retval - return code +// - sa - SA data +// +// Ikev2SaV2Details defines message 'ikev2_sa_v2_details'. +type Ikev2SaV2Details struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` + Sa ikev2_types.Ikev2SaV2 `binapi:"ikev2_sa_v2,name=sa" json:"sa,omitempty"` +} + +func (m *Ikev2SaV2Details) Reset() { *m = Ikev2SaV2Details{} } +func (*Ikev2SaV2Details) GetMessageName() string { return "ikev2_sa_v2_details" } +func (*Ikev2SaV2Details) GetCrcString() string { return "a616e604" } +func (*Ikev2SaV2Details) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Ikev2SaV2Details) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + size += 4 // m.Sa.SaIndex + size += 64 // m.Sa.ProfileName + size += 4 // m.Sa.State + size += 8 // m.Sa.Ispi + size += 8 // m.Sa.Rspi + size += 1 // m.Sa.Iaddr.Af + size += 1 * 16 // m.Sa.Iaddr.Un + size += 1 // m.Sa.Raddr.Af + size += 1 * 16 // m.Sa.Raddr.Un + size += 1 * 64 // m.Sa.Keys.SkD + size += 1 // m.Sa.Keys.SkDLen + size += 1 * 64 // m.Sa.Keys.SkAi + size += 1 // m.Sa.Keys.SkAiLen + size += 1 * 64 // m.Sa.Keys.SkAr + size += 1 // m.Sa.Keys.SkArLen + size += 1 * 64 // m.Sa.Keys.SkEi + size += 1 // m.Sa.Keys.SkEiLen + size += 1 * 64 // m.Sa.Keys.SkEr + size += 1 // m.Sa.Keys.SkErLen + size += 1 * 64 // m.Sa.Keys.SkPi + size += 1 // m.Sa.Keys.SkPiLen + size += 1 * 64 // m.Sa.Keys.SkPr + size += 1 // m.Sa.Keys.SkPrLen + size += 1 // m.Sa.IID.Type + size += 1 // m.Sa.IID.DataLen + size += 64 // m.Sa.IID.Data + size += 1 // m.Sa.RID.Type + size += 1 // m.Sa.RID.DataLen + size += 64 // m.Sa.RID.Data + size += 1 // m.Sa.Encryption.TransformType + size += 2 // m.Sa.Encryption.TransformID + size += 2 // m.Sa.Encryption.KeyLen + size += 2 // m.Sa.Encryption.KeyTrunc + size += 2 // m.Sa.Encryption.BlockSize + size += 1 // m.Sa.Encryption.DhGroup + size += 1 // m.Sa.Integrity.TransformType + size += 2 // m.Sa.Integrity.TransformID + size += 2 // m.Sa.Integrity.KeyLen + size += 2 // m.Sa.Integrity.KeyTrunc + size += 2 // m.Sa.Integrity.BlockSize + size += 1 // m.Sa.Integrity.DhGroup + size += 1 // m.Sa.Prf.TransformType + size += 2 // m.Sa.Prf.TransformID + size += 2 // m.Sa.Prf.KeyLen + size += 2 // m.Sa.Prf.KeyTrunc + size += 2 // m.Sa.Prf.BlockSize + size += 1 // m.Sa.Prf.DhGroup + size += 1 // m.Sa.Dh.TransformType + size += 2 // m.Sa.Dh.TransformID + size += 2 // m.Sa.Dh.KeyLen + size += 2 // m.Sa.Dh.KeyTrunc + size += 2 // m.Sa.Dh.BlockSize + size += 1 // m.Sa.Dh.DhGroup + size += 2 // m.Sa.Stats.NKeepalives + size += 2 // m.Sa.Stats.NRekeyReq + size += 2 // m.Sa.Stats.NSaInitReq + size += 2 // m.Sa.Stats.NSaAuthReq + size += 2 // m.Sa.Stats.NRetransmit + size += 2 // m.Sa.Stats.NInitSaRetransmit + return size +} +func (m *Ikev2SaV2Details) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + buf.EncodeUint32(m.Sa.SaIndex) + buf.EncodeString(m.Sa.ProfileName, 64) + buf.EncodeUint32(uint32(m.Sa.State)) + buf.EncodeUint64(m.Sa.Ispi) + buf.EncodeUint64(m.Sa.Rspi) + buf.EncodeUint8(uint8(m.Sa.Iaddr.Af)) + buf.EncodeBytes(m.Sa.Iaddr.Un.XXX_UnionData[:], 16) + buf.EncodeUint8(uint8(m.Sa.Raddr.Af)) + buf.EncodeBytes(m.Sa.Raddr.Un.XXX_UnionData[:], 16) + buf.EncodeBytes(m.Sa.Keys.SkD, 64) + buf.EncodeUint8(m.Sa.Keys.SkDLen) + buf.EncodeBytes(m.Sa.Keys.SkAi, 64) + buf.EncodeUint8(m.Sa.Keys.SkAiLen) + buf.EncodeBytes(m.Sa.Keys.SkAr, 64) + buf.EncodeUint8(m.Sa.Keys.SkArLen) + buf.EncodeBytes(m.Sa.Keys.SkEi, 64) + buf.EncodeUint8(m.Sa.Keys.SkEiLen) + buf.EncodeBytes(m.Sa.Keys.SkEr, 64) + buf.EncodeUint8(m.Sa.Keys.SkErLen) + buf.EncodeBytes(m.Sa.Keys.SkPi, 64) + buf.EncodeUint8(m.Sa.Keys.SkPiLen) + buf.EncodeBytes(m.Sa.Keys.SkPr, 64) + buf.EncodeUint8(m.Sa.Keys.SkPrLen) + buf.EncodeUint8(m.Sa.IID.Type) + buf.EncodeUint8(m.Sa.IID.DataLen) + buf.EncodeString(m.Sa.IID.Data, 64) + buf.EncodeUint8(m.Sa.RID.Type) + buf.EncodeUint8(m.Sa.RID.DataLen) + buf.EncodeString(m.Sa.RID.Data, 64) + buf.EncodeUint8(m.Sa.Encryption.TransformType) + buf.EncodeUint16(m.Sa.Encryption.TransformID) + buf.EncodeUint16(m.Sa.Encryption.KeyLen) + buf.EncodeUint16(m.Sa.Encryption.KeyTrunc) + buf.EncodeUint16(m.Sa.Encryption.BlockSize) + buf.EncodeUint8(m.Sa.Encryption.DhGroup) + buf.EncodeUint8(m.Sa.Integrity.TransformType) + buf.EncodeUint16(m.Sa.Integrity.TransformID) + buf.EncodeUint16(m.Sa.Integrity.KeyLen) + buf.EncodeUint16(m.Sa.Integrity.KeyTrunc) + buf.EncodeUint16(m.Sa.Integrity.BlockSize) + buf.EncodeUint8(m.Sa.Integrity.DhGroup) + buf.EncodeUint8(m.Sa.Prf.TransformType) + buf.EncodeUint16(m.Sa.Prf.TransformID) + buf.EncodeUint16(m.Sa.Prf.KeyLen) + buf.EncodeUint16(m.Sa.Prf.KeyTrunc) + buf.EncodeUint16(m.Sa.Prf.BlockSize) + buf.EncodeUint8(m.Sa.Prf.DhGroup) + buf.EncodeUint8(m.Sa.Dh.TransformType) + buf.EncodeUint16(m.Sa.Dh.TransformID) + buf.EncodeUint16(m.Sa.Dh.KeyLen) + buf.EncodeUint16(m.Sa.Dh.KeyTrunc) + buf.EncodeUint16(m.Sa.Dh.BlockSize) + buf.EncodeUint8(m.Sa.Dh.DhGroup) + buf.EncodeUint16(m.Sa.Stats.NKeepalives) + buf.EncodeUint16(m.Sa.Stats.NRekeyReq) + buf.EncodeUint16(m.Sa.Stats.NSaInitReq) + buf.EncodeUint16(m.Sa.Stats.NSaAuthReq) + buf.EncodeUint16(m.Sa.Stats.NRetransmit) + buf.EncodeUint16(m.Sa.Stats.NInitSaRetransmit) + return buf.Bytes(), nil +} +func (m *Ikev2SaV2Details) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + m.Sa.SaIndex = buf.DecodeUint32() + m.Sa.ProfileName = buf.DecodeString(64) + m.Sa.State = ikev2_types.Ikev2State(buf.DecodeUint32()) + m.Sa.Ispi = buf.DecodeUint64() + m.Sa.Rspi = buf.DecodeUint64() + m.Sa.Iaddr.Af = ip_types.AddressFamily(buf.DecodeUint8()) + copy(m.Sa.Iaddr.Un.XXX_UnionData[:], buf.DecodeBytes(16)) + m.Sa.Raddr.Af = ip_types.AddressFamily(buf.DecodeUint8()) + copy(m.Sa.Raddr.Un.XXX_UnionData[:], buf.DecodeBytes(16)) + m.Sa.Keys.SkD = make([]byte, 64) + copy(m.Sa.Keys.SkD, buf.DecodeBytes(len(m.Sa.Keys.SkD))) + m.Sa.Keys.SkDLen = buf.DecodeUint8() + m.Sa.Keys.SkAi = make([]byte, 64) + copy(m.Sa.Keys.SkAi, buf.DecodeBytes(len(m.Sa.Keys.SkAi))) + m.Sa.Keys.SkAiLen = buf.DecodeUint8() + m.Sa.Keys.SkAr = make([]byte, 64) + copy(m.Sa.Keys.SkAr, buf.DecodeBytes(len(m.Sa.Keys.SkAr))) + m.Sa.Keys.SkArLen = buf.DecodeUint8() + m.Sa.Keys.SkEi = make([]byte, 64) + copy(m.Sa.Keys.SkEi, buf.DecodeBytes(len(m.Sa.Keys.SkEi))) + m.Sa.Keys.SkEiLen = buf.DecodeUint8() + m.Sa.Keys.SkEr = make([]byte, 64) + copy(m.Sa.Keys.SkEr, buf.DecodeBytes(len(m.Sa.Keys.SkEr))) + m.Sa.Keys.SkErLen = buf.DecodeUint8() + m.Sa.Keys.SkPi = make([]byte, 64) + copy(m.Sa.Keys.SkPi, buf.DecodeBytes(len(m.Sa.Keys.SkPi))) + m.Sa.Keys.SkPiLen = buf.DecodeUint8() + m.Sa.Keys.SkPr = make([]byte, 64) + copy(m.Sa.Keys.SkPr, buf.DecodeBytes(len(m.Sa.Keys.SkPr))) + m.Sa.Keys.SkPrLen = buf.DecodeUint8() + m.Sa.IID.Type = buf.DecodeUint8() + m.Sa.IID.DataLen = buf.DecodeUint8() + m.Sa.IID.Data = buf.DecodeString(64) + m.Sa.RID.Type = buf.DecodeUint8() + m.Sa.RID.DataLen = buf.DecodeUint8() + m.Sa.RID.Data = buf.DecodeString(64) + m.Sa.Encryption.TransformType = buf.DecodeUint8() + m.Sa.Encryption.TransformID = buf.DecodeUint16() + m.Sa.Encryption.KeyLen = buf.DecodeUint16() + m.Sa.Encryption.KeyTrunc = buf.DecodeUint16() + m.Sa.Encryption.BlockSize = buf.DecodeUint16() + m.Sa.Encryption.DhGroup = buf.DecodeUint8() + m.Sa.Integrity.TransformType = buf.DecodeUint8() + m.Sa.Integrity.TransformID = buf.DecodeUint16() + m.Sa.Integrity.KeyLen = buf.DecodeUint16() + m.Sa.Integrity.KeyTrunc = buf.DecodeUint16() + m.Sa.Integrity.BlockSize = buf.DecodeUint16() + m.Sa.Integrity.DhGroup = buf.DecodeUint8() + m.Sa.Prf.TransformType = buf.DecodeUint8() + m.Sa.Prf.TransformID = buf.DecodeUint16() + m.Sa.Prf.KeyLen = buf.DecodeUint16() + m.Sa.Prf.KeyTrunc = buf.DecodeUint16() + m.Sa.Prf.BlockSize = buf.DecodeUint16() + m.Sa.Prf.DhGroup = buf.DecodeUint8() + m.Sa.Dh.TransformType = buf.DecodeUint8() + m.Sa.Dh.TransformID = buf.DecodeUint16() + m.Sa.Dh.KeyLen = buf.DecodeUint16() + m.Sa.Dh.KeyTrunc = buf.DecodeUint16() + m.Sa.Dh.BlockSize = buf.DecodeUint16() + m.Sa.Dh.DhGroup = buf.DecodeUint8() + m.Sa.Stats.NKeepalives = buf.DecodeUint16() + m.Sa.Stats.NRekeyReq = buf.DecodeUint16() + m.Sa.Stats.NSaInitReq = buf.DecodeUint16() + m.Sa.Stats.NSaAuthReq = buf.DecodeUint16() + m.Sa.Stats.NRetransmit = buf.DecodeUint16() + m.Sa.Stats.NInitSaRetransmit = buf.DecodeUint16() + return nil +} + +// Dump all SAs +// Ikev2SaV2Dump defines message 'ikev2_sa_v2_dump'. +type Ikev2SaV2Dump struct{} + +func (m *Ikev2SaV2Dump) Reset() { *m = Ikev2SaV2Dump{} } +func (*Ikev2SaV2Dump) GetMessageName() string { return "ikev2_sa_v2_dump" } +func (*Ikev2SaV2Dump) GetCrcString() string { return "51077d14" } +func (*Ikev2SaV2Dump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Ikev2SaV2Dump) Size() (size int) { + if m == nil { + return 0 + } + return size +} +func (m *Ikev2SaV2Dump) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + return buf.Bytes(), nil +} +func (m *Ikev2SaV2Dump) Unmarshal(b []byte) error { + return nil +} + +// Details about IKE SA +// - retval - return code +// - sa - SA data +// +// Ikev2SaV3Details defines message 'ikev2_sa_v3_details'. +// InProgress: the message form may change in the future versions +type Ikev2SaV3Details struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` + Sa ikev2_types.Ikev2SaV3 `binapi:"ikev2_sa_v3,name=sa" json:"sa,omitempty"` +} + +func (m *Ikev2SaV3Details) Reset() { *m = Ikev2SaV3Details{} } +func (*Ikev2SaV3Details) GetMessageName() string { return "ikev2_sa_v3_details" } +func (*Ikev2SaV3Details) GetCrcString() string { return "85c9a941" } +func (*Ikev2SaV3Details) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Ikev2SaV3Details) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + size += 4 // m.Sa.SaIndex + size += 64 // m.Sa.ProfileName + size += 4 // m.Sa.State + size += 8 // m.Sa.Ispi + size += 8 // m.Sa.Rspi + size += 1 // m.Sa.Iaddr.Af + size += 1 * 16 // m.Sa.Iaddr.Un + size += 1 // m.Sa.Raddr.Af + size += 1 * 16 // m.Sa.Raddr.Un + size += 1 * 64 // m.Sa.Keys.SkD + size += 1 // m.Sa.Keys.SkDLen + size += 1 * 64 // m.Sa.Keys.SkAi + size += 1 // m.Sa.Keys.SkAiLen + size += 1 * 64 // m.Sa.Keys.SkAr + size += 1 // m.Sa.Keys.SkArLen + size += 1 * 64 // m.Sa.Keys.SkEi + size += 1 // m.Sa.Keys.SkEiLen + size += 1 * 64 // m.Sa.Keys.SkEr + size += 1 // m.Sa.Keys.SkErLen + size += 1 * 64 // m.Sa.Keys.SkPi + size += 1 // m.Sa.Keys.SkPiLen + size += 1 * 64 // m.Sa.Keys.SkPr + size += 1 // m.Sa.Keys.SkPrLen + size += 1 // m.Sa.IID.Type + size += 1 // m.Sa.IID.DataLen + size += 64 // m.Sa.IID.Data + size += 1 // m.Sa.RID.Type + size += 1 // m.Sa.RID.DataLen + size += 64 // m.Sa.RID.Data + size += 1 // m.Sa.Encryption.TransformType + size += 2 // m.Sa.Encryption.TransformID + size += 2 // m.Sa.Encryption.KeyLen + size += 2 // m.Sa.Encryption.KeyTrunc + size += 2 // m.Sa.Encryption.BlockSize + size += 1 // m.Sa.Encryption.DhGroup + size += 1 // m.Sa.Integrity.TransformType + size += 2 // m.Sa.Integrity.TransformID + size += 2 // m.Sa.Integrity.KeyLen + size += 2 // m.Sa.Integrity.KeyTrunc + size += 2 // m.Sa.Integrity.BlockSize + size += 1 // m.Sa.Integrity.DhGroup + size += 1 // m.Sa.Prf.TransformType + size += 2 // m.Sa.Prf.TransformID + size += 2 // m.Sa.Prf.KeyLen + size += 2 // m.Sa.Prf.KeyTrunc + size += 2 // m.Sa.Prf.BlockSize + size += 1 // m.Sa.Prf.DhGroup + size += 1 // m.Sa.Dh.TransformType + size += 2 // m.Sa.Dh.TransformID + size += 2 // m.Sa.Dh.KeyLen + size += 2 // m.Sa.Dh.KeyTrunc + size += 2 // m.Sa.Dh.BlockSize + size += 1 // m.Sa.Dh.DhGroup + size += 2 // m.Sa.Stats.NKeepalives + size += 2 // m.Sa.Stats.NRekeyReq + size += 2 // m.Sa.Stats.NSaInitReq + size += 2 // m.Sa.Stats.NSaAuthReq + size += 2 // m.Sa.Stats.NRetransmit + size += 2 // m.Sa.Stats.NInitSaRetransmit + size += 8 // m.Sa.Uptime + return size +} +func (m *Ikev2SaV3Details) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + buf.EncodeUint32(m.Sa.SaIndex) + buf.EncodeString(m.Sa.ProfileName, 64) + buf.EncodeUint32(uint32(m.Sa.State)) + buf.EncodeUint64(m.Sa.Ispi) + buf.EncodeUint64(m.Sa.Rspi) + buf.EncodeUint8(uint8(m.Sa.Iaddr.Af)) + buf.EncodeBytes(m.Sa.Iaddr.Un.XXX_UnionData[:], 16) + buf.EncodeUint8(uint8(m.Sa.Raddr.Af)) + buf.EncodeBytes(m.Sa.Raddr.Un.XXX_UnionData[:], 16) + buf.EncodeBytes(m.Sa.Keys.SkD, 64) + buf.EncodeUint8(m.Sa.Keys.SkDLen) + buf.EncodeBytes(m.Sa.Keys.SkAi, 64) + buf.EncodeUint8(m.Sa.Keys.SkAiLen) + buf.EncodeBytes(m.Sa.Keys.SkAr, 64) + buf.EncodeUint8(m.Sa.Keys.SkArLen) + buf.EncodeBytes(m.Sa.Keys.SkEi, 64) + buf.EncodeUint8(m.Sa.Keys.SkEiLen) + buf.EncodeBytes(m.Sa.Keys.SkEr, 64) + buf.EncodeUint8(m.Sa.Keys.SkErLen) + buf.EncodeBytes(m.Sa.Keys.SkPi, 64) + buf.EncodeUint8(m.Sa.Keys.SkPiLen) + buf.EncodeBytes(m.Sa.Keys.SkPr, 64) + buf.EncodeUint8(m.Sa.Keys.SkPrLen) + buf.EncodeUint8(m.Sa.IID.Type) + buf.EncodeUint8(m.Sa.IID.DataLen) + buf.EncodeString(m.Sa.IID.Data, 64) + buf.EncodeUint8(m.Sa.RID.Type) + buf.EncodeUint8(m.Sa.RID.DataLen) + buf.EncodeString(m.Sa.RID.Data, 64) + buf.EncodeUint8(m.Sa.Encryption.TransformType) + buf.EncodeUint16(m.Sa.Encryption.TransformID) + buf.EncodeUint16(m.Sa.Encryption.KeyLen) + buf.EncodeUint16(m.Sa.Encryption.KeyTrunc) + buf.EncodeUint16(m.Sa.Encryption.BlockSize) + buf.EncodeUint8(m.Sa.Encryption.DhGroup) + buf.EncodeUint8(m.Sa.Integrity.TransformType) + buf.EncodeUint16(m.Sa.Integrity.TransformID) + buf.EncodeUint16(m.Sa.Integrity.KeyLen) + buf.EncodeUint16(m.Sa.Integrity.KeyTrunc) + buf.EncodeUint16(m.Sa.Integrity.BlockSize) + buf.EncodeUint8(m.Sa.Integrity.DhGroup) + buf.EncodeUint8(m.Sa.Prf.TransformType) + buf.EncodeUint16(m.Sa.Prf.TransformID) + buf.EncodeUint16(m.Sa.Prf.KeyLen) + buf.EncodeUint16(m.Sa.Prf.KeyTrunc) + buf.EncodeUint16(m.Sa.Prf.BlockSize) + buf.EncodeUint8(m.Sa.Prf.DhGroup) + buf.EncodeUint8(m.Sa.Dh.TransformType) + buf.EncodeUint16(m.Sa.Dh.TransformID) + buf.EncodeUint16(m.Sa.Dh.KeyLen) + buf.EncodeUint16(m.Sa.Dh.KeyTrunc) + buf.EncodeUint16(m.Sa.Dh.BlockSize) + buf.EncodeUint8(m.Sa.Dh.DhGroup) + buf.EncodeUint16(m.Sa.Stats.NKeepalives) + buf.EncodeUint16(m.Sa.Stats.NRekeyReq) + buf.EncodeUint16(m.Sa.Stats.NSaInitReq) + buf.EncodeUint16(m.Sa.Stats.NSaAuthReq) + buf.EncodeUint16(m.Sa.Stats.NRetransmit) + buf.EncodeUint16(m.Sa.Stats.NInitSaRetransmit) + buf.EncodeFloat64(m.Sa.Uptime) + return buf.Bytes(), nil +} +func (m *Ikev2SaV3Details) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + m.Sa.SaIndex = buf.DecodeUint32() + m.Sa.ProfileName = buf.DecodeString(64) + m.Sa.State = ikev2_types.Ikev2State(buf.DecodeUint32()) + m.Sa.Ispi = buf.DecodeUint64() + m.Sa.Rspi = buf.DecodeUint64() + m.Sa.Iaddr.Af = ip_types.AddressFamily(buf.DecodeUint8()) + copy(m.Sa.Iaddr.Un.XXX_UnionData[:], buf.DecodeBytes(16)) + m.Sa.Raddr.Af = ip_types.AddressFamily(buf.DecodeUint8()) + copy(m.Sa.Raddr.Un.XXX_UnionData[:], buf.DecodeBytes(16)) + m.Sa.Keys.SkD = make([]byte, 64) + copy(m.Sa.Keys.SkD, buf.DecodeBytes(len(m.Sa.Keys.SkD))) + m.Sa.Keys.SkDLen = buf.DecodeUint8() + m.Sa.Keys.SkAi = make([]byte, 64) + copy(m.Sa.Keys.SkAi, buf.DecodeBytes(len(m.Sa.Keys.SkAi))) + m.Sa.Keys.SkAiLen = buf.DecodeUint8() + m.Sa.Keys.SkAr = make([]byte, 64) + copy(m.Sa.Keys.SkAr, buf.DecodeBytes(len(m.Sa.Keys.SkAr))) + m.Sa.Keys.SkArLen = buf.DecodeUint8() + m.Sa.Keys.SkEi = make([]byte, 64) + copy(m.Sa.Keys.SkEi, buf.DecodeBytes(len(m.Sa.Keys.SkEi))) + m.Sa.Keys.SkEiLen = buf.DecodeUint8() + m.Sa.Keys.SkEr = make([]byte, 64) + copy(m.Sa.Keys.SkEr, buf.DecodeBytes(len(m.Sa.Keys.SkEr))) + m.Sa.Keys.SkErLen = buf.DecodeUint8() + m.Sa.Keys.SkPi = make([]byte, 64) + copy(m.Sa.Keys.SkPi, buf.DecodeBytes(len(m.Sa.Keys.SkPi))) + m.Sa.Keys.SkPiLen = buf.DecodeUint8() + m.Sa.Keys.SkPr = make([]byte, 64) + copy(m.Sa.Keys.SkPr, buf.DecodeBytes(len(m.Sa.Keys.SkPr))) + m.Sa.Keys.SkPrLen = buf.DecodeUint8() + m.Sa.IID.Type = buf.DecodeUint8() + m.Sa.IID.DataLen = buf.DecodeUint8() + m.Sa.IID.Data = buf.DecodeString(64) + m.Sa.RID.Type = buf.DecodeUint8() + m.Sa.RID.DataLen = buf.DecodeUint8() + m.Sa.RID.Data = buf.DecodeString(64) + m.Sa.Encryption.TransformType = buf.DecodeUint8() + m.Sa.Encryption.TransformID = buf.DecodeUint16() + m.Sa.Encryption.KeyLen = buf.DecodeUint16() + m.Sa.Encryption.KeyTrunc = buf.DecodeUint16() + m.Sa.Encryption.BlockSize = buf.DecodeUint16() + m.Sa.Encryption.DhGroup = buf.DecodeUint8() + m.Sa.Integrity.TransformType = buf.DecodeUint8() + m.Sa.Integrity.TransformID = buf.DecodeUint16() + m.Sa.Integrity.KeyLen = buf.DecodeUint16() + m.Sa.Integrity.KeyTrunc = buf.DecodeUint16() + m.Sa.Integrity.BlockSize = buf.DecodeUint16() + m.Sa.Integrity.DhGroup = buf.DecodeUint8() + m.Sa.Prf.TransformType = buf.DecodeUint8() + m.Sa.Prf.TransformID = buf.DecodeUint16() + m.Sa.Prf.KeyLen = buf.DecodeUint16() + m.Sa.Prf.KeyTrunc = buf.DecodeUint16() + m.Sa.Prf.BlockSize = buf.DecodeUint16() + m.Sa.Prf.DhGroup = buf.DecodeUint8() + m.Sa.Dh.TransformType = buf.DecodeUint8() + m.Sa.Dh.TransformID = buf.DecodeUint16() + m.Sa.Dh.KeyLen = buf.DecodeUint16() + m.Sa.Dh.KeyTrunc = buf.DecodeUint16() + m.Sa.Dh.BlockSize = buf.DecodeUint16() + m.Sa.Dh.DhGroup = buf.DecodeUint8() + m.Sa.Stats.NKeepalives = buf.DecodeUint16() + m.Sa.Stats.NRekeyReq = buf.DecodeUint16() + m.Sa.Stats.NSaInitReq = buf.DecodeUint16() + m.Sa.Stats.NSaAuthReq = buf.DecodeUint16() + m.Sa.Stats.NRetransmit = buf.DecodeUint16() + m.Sa.Stats.NInitSaRetransmit = buf.DecodeUint16() + m.Sa.Uptime = buf.DecodeFloat64() + return nil +} + +// Dump all SAs +// Ikev2SaV3Dump defines message 'ikev2_sa_v3_dump'. +// InProgress: the message form may change in the future versions +type Ikev2SaV3Dump struct{} + +func (m *Ikev2SaV3Dump) Reset() { *m = Ikev2SaV3Dump{} } +func (*Ikev2SaV3Dump) GetMessageName() string { return "ikev2_sa_v3_dump" } +func (*Ikev2SaV3Dump) GetCrcString() string { return "51077d14" } +func (*Ikev2SaV3Dump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Ikev2SaV3Dump) Size() (size int) { + if m == nil { + return 0 + } + return size +} +func (m *Ikev2SaV3Dump) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + return buf.Bytes(), nil +} +func (m *Ikev2SaV3Dump) Unmarshal(b []byte) error { + return nil +} + // IKEv2: Set IKEv2 ESP transforms in SA_INIT proposal (RFC 7296) // - name - IKEv2 profile name // - tr - ESP transforms @@ -2489,6 +3184,8 @@ func init() { file_ikev2_binapi_init() } func file_ikev2_binapi_init() { api.RegisterMessage((*Ikev2ChildSaDetails)(nil), "ikev2_child_sa_details_ff67741f") api.RegisterMessage((*Ikev2ChildSaDump)(nil), "ikev2_child_sa_dump_01eab609") + api.RegisterMessage((*Ikev2ChildSaV2Details)(nil), "ikev2_child_sa_v2_details_1db62aa2") + api.RegisterMessage((*Ikev2ChildSaV2Dump)(nil), "ikev2_child_sa_v2_dump_01eab609") api.RegisterMessage((*Ikev2InitiateDelChildSa)(nil), "ikev2_initiate_del_child_sa_7f004d2e") api.RegisterMessage((*Ikev2InitiateDelChildSaReply)(nil), "ikev2_initiate_del_child_sa_reply_e8d4e804") api.RegisterMessage((*Ikev2InitiateDelIkeSa)(nil), "ikev2_initiate_del_ike_sa_8d125bdd") @@ -2521,6 +3218,10 @@ func file_ikev2_binapi_init() { api.RegisterMessage((*Ikev2ProfileSetUDPEncapReply)(nil), "ikev2_profile_set_udp_encap_reply_e8d4e804") api.RegisterMessage((*Ikev2SaDetails)(nil), "ikev2_sa_details_937c22d5") api.RegisterMessage((*Ikev2SaDump)(nil), "ikev2_sa_dump_51077d14") + api.RegisterMessage((*Ikev2SaV2Details)(nil), "ikev2_sa_v2_details_a616e604") + api.RegisterMessage((*Ikev2SaV2Dump)(nil), "ikev2_sa_v2_dump_51077d14") + api.RegisterMessage((*Ikev2SaV3Details)(nil), "ikev2_sa_v3_details_85c9a941") + api.RegisterMessage((*Ikev2SaV3Dump)(nil), "ikev2_sa_v3_dump_51077d14") api.RegisterMessage((*Ikev2SetEspTransforms)(nil), "ikev2_set_esp_transforms_a63dc205") api.RegisterMessage((*Ikev2SetEspTransformsReply)(nil), "ikev2_set_esp_transforms_reply_e8d4e804") api.RegisterMessage((*Ikev2SetIkeTransforms)(nil), "ikev2_set_ike_transforms_076d7378") @@ -2544,6 +3245,8 @@ func AllMessages() []api.Message { return []api.Message{ (*Ikev2ChildSaDetails)(nil), (*Ikev2ChildSaDump)(nil), + (*Ikev2ChildSaV2Details)(nil), + (*Ikev2ChildSaV2Dump)(nil), (*Ikev2InitiateDelChildSa)(nil), (*Ikev2InitiateDelChildSaReply)(nil), (*Ikev2InitiateDelIkeSa)(nil), @@ -2576,6 +3279,10 @@ func AllMessages() []api.Message { (*Ikev2ProfileSetUDPEncapReply)(nil), (*Ikev2SaDetails)(nil), (*Ikev2SaDump)(nil), + (*Ikev2SaV2Details)(nil), + (*Ikev2SaV2Dump)(nil), + (*Ikev2SaV3Details)(nil), + (*Ikev2SaV3Dump)(nil), (*Ikev2SetEspTransforms)(nil), (*Ikev2SetEspTransformsReply)(nil), (*Ikev2SetIkeTransforms)(nil), diff --git a/binapi/ikev2/ikev2_rpc.ba.go b/binapi/ikev2/ikev2_rpc.ba.go index 28ac7809..1771b01a 100644 --- a/binapi/ikev2/ikev2_rpc.ba.go +++ b/binapi/ikev2/ikev2_rpc.ba.go @@ -14,6 +14,7 @@ import ( // RPCService defines RPC service ikev2. type RPCService interface { Ikev2ChildSaDump(ctx context.Context, in *Ikev2ChildSaDump) (RPCService_Ikev2ChildSaDumpClient, error) + Ikev2ChildSaV2Dump(ctx context.Context, in *Ikev2ChildSaV2Dump) (RPCService_Ikev2ChildSaV2DumpClient, error) Ikev2InitiateDelChildSa(ctx context.Context, in *Ikev2InitiateDelChildSa) (*Ikev2InitiateDelChildSaReply, error) Ikev2InitiateDelIkeSa(ctx context.Context, in *Ikev2InitiateDelIkeSa) (*Ikev2InitiateDelIkeSaReply, error) Ikev2InitiateRekeyChildSa(ctx context.Context, in *Ikev2InitiateRekeyChildSa) (*Ikev2InitiateRekeyChildSaReply, error) @@ -30,6 +31,8 @@ type RPCService interface { Ikev2ProfileSetTs(ctx context.Context, in *Ikev2ProfileSetTs) (*Ikev2ProfileSetTsReply, error) Ikev2ProfileSetUDPEncap(ctx context.Context, in *Ikev2ProfileSetUDPEncap) (*Ikev2ProfileSetUDPEncapReply, error) Ikev2SaDump(ctx context.Context, in *Ikev2SaDump) (RPCService_Ikev2SaDumpClient, error) + Ikev2SaV2Dump(ctx context.Context, in *Ikev2SaV2Dump) (RPCService_Ikev2SaV2DumpClient, error) + Ikev2SaV3Dump(ctx context.Context, in *Ikev2SaV3Dump) (RPCService_Ikev2SaV3DumpClient, error) Ikev2SetEspTransforms(ctx context.Context, in *Ikev2SetEspTransforms) (*Ikev2SetEspTransformsReply, error) Ikev2SetIkeTransforms(ctx context.Context, in *Ikev2SetIkeTransforms) (*Ikev2SetIkeTransformsReply, error) Ikev2SetLocalKey(ctx context.Context, in *Ikev2SetLocalKey) (*Ikev2SetLocalKeyReply, error) @@ -91,6 +94,49 @@ func (c *serviceClient_Ikev2ChildSaDumpClient) Recv() (*Ikev2ChildSaDetails, err } } +func (c *serviceClient) Ikev2ChildSaV2Dump(ctx context.Context, in *Ikev2ChildSaV2Dump) (RPCService_Ikev2ChildSaV2DumpClient, error) { + stream, err := c.conn.NewStream(ctx) + if err != nil { + return nil, err + } + x := &serviceClient_Ikev2ChildSaV2DumpClient{stream} + if err := x.Stream.SendMsg(in); err != nil { + return nil, err + } + if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil { + return nil, err + } + return x, nil +} + +type RPCService_Ikev2ChildSaV2DumpClient interface { + Recv() (*Ikev2ChildSaV2Details, error) + api.Stream +} + +type serviceClient_Ikev2ChildSaV2DumpClient struct { + api.Stream +} + +func (c *serviceClient_Ikev2ChildSaV2DumpClient) Recv() (*Ikev2ChildSaV2Details, error) { + msg, err := c.Stream.RecvMsg() + if err != nil { + return nil, err + } + switch m := msg.(type) { + case *Ikev2ChildSaV2Details: + return m, nil + 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) + } +} + func (c *serviceClient) Ikev2InitiateDelChildSa(ctx context.Context, in *Ikev2InitiateDelChildSa) (*Ikev2InitiateDelChildSaReply, error) { out := new(Ikev2InitiateDelChildSaReply) err := c.conn.Invoke(ctx, in, out) @@ -303,6 +349,92 @@ func (c *serviceClient_Ikev2SaDumpClient) Recv() (*Ikev2SaDetails, error) { } } +func (c *serviceClient) Ikev2SaV2Dump(ctx context.Context, in *Ikev2SaV2Dump) (RPCService_Ikev2SaV2DumpClient, error) { + stream, err := c.conn.NewStream(ctx) + if err != nil { + return nil, err + } + x := &serviceClient_Ikev2SaV2DumpClient{stream} + if err := x.Stream.SendMsg(in); err != nil { + return nil, err + } + if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil { + return nil, err + } + return x, nil +} + +type RPCService_Ikev2SaV2DumpClient interface { + Recv() (*Ikev2SaV2Details, error) + api.Stream +} + +type serviceClient_Ikev2SaV2DumpClient struct { + api.Stream +} + +func (c *serviceClient_Ikev2SaV2DumpClient) Recv() (*Ikev2SaV2Details, error) { + msg, err := c.Stream.RecvMsg() + if err != nil { + return nil, err + } + switch m := msg.(type) { + case *Ikev2SaV2Details: + return m, nil + 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) + } +} + +func (c *serviceClient) Ikev2SaV3Dump(ctx context.Context, in *Ikev2SaV3Dump) (RPCService_Ikev2SaV3DumpClient, error) { + stream, err := c.conn.NewStream(ctx) + if err != nil { + return nil, err + } + x := &serviceClient_Ikev2SaV3DumpClient{stream} + if err := x.Stream.SendMsg(in); err != nil { + return nil, err + } + if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil { + return nil, err + } + return x, nil +} + +type RPCService_Ikev2SaV3DumpClient interface { + Recv() (*Ikev2SaV3Details, error) + api.Stream +} + +type serviceClient_Ikev2SaV3DumpClient struct { + api.Stream +} + +func (c *serviceClient_Ikev2SaV3DumpClient) Recv() (*Ikev2SaV3Details, error) { + msg, err := c.Stream.RecvMsg() + if err != nil { + return nil, err + } + switch m := msg.(type) { + case *Ikev2SaV3Details: + return m, nil + 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) + } +} + func (c *serviceClient) Ikev2SetEspTransforms(ctx context.Context, in *Ikev2SetEspTransforms) (*Ikev2SetEspTransformsReply, error) { out := new(Ikev2SetEspTransformsReply) err := c.conn.Invoke(ctx, in, out) diff --git a/binapi/ikev2_types/ikev2_types.ba.go b/binapi/ikev2_types/ikev2_types.ba.go index 60ade8fb..d1ddf527 100644 --- a/binapi/ikev2_types/ikev2_types.ba.go +++ b/binapi/ikev2_types/ikev2_types.ba.go @@ -1,16 +1,19 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/ikev2_types.api.json // Package ikev2_types contains generated bindings for API file ikev2_types.api. // // Contents: -// - 12 structs +// - 1 enum +// - 15 structs package ikev2_types import ( + "strconv" + api "go.fd.io/govpp/api" interface_types "go.fd.io/govpp/binapi/interface_types" ip_types "go.fd.io/govpp/binapi/ip_types" @@ -25,9 +28,54 @@ const _ = api.GoVppAPIPackageIsVersion2 const ( APIFile = "ikev2_types" APIVersion = "1.0.0" - VersionCrc = 0xe7510e + VersionCrc = 0x64c72418 +) + +// Ikev2State defines enum 'ikev2_state'. +type Ikev2State uint32 + +const ( + UNKNOWN Ikev2State = 0 + SA_INIT Ikev2State = 1 + DELETED Ikev2State = 2 + AUTH_FAILED Ikev2State = 3 + AUTHENTICATED Ikev2State = 4 + NOTIFY_AND_DELETE Ikev2State = 5 + TS_UNACCEPTABLE Ikev2State = 6 + NO_PROPOSAL_CHOSEN Ikev2State = 7 +) + +var ( + Ikev2State_name = map[uint32]string{ + 0: "UNKNOWN", + 1: "SA_INIT", + 2: "DELETED", + 3: "AUTH_FAILED", + 4: "AUTHENTICATED", + 5: "NOTIFY_AND_DELETE", + 6: "TS_UNACCEPTABLE", + 7: "NO_PROPOSAL_CHOSEN", + } + Ikev2State_value = map[string]uint32{ + "UNKNOWN": 0, + "SA_INIT": 1, + "DELETED": 2, + "AUTH_FAILED": 3, + "AUTHENTICATED": 4, + "NOTIFY_AND_DELETE": 5, + "TS_UNACCEPTABLE": 6, + "NO_PROPOSAL_CHOSEN": 7, + } ) +func (x Ikev2State) String() string { + s, ok := Ikev2State_name[uint32(x)] + if ok { + return s + } + return "Ikev2State(" + strconv.Itoa(int(x)) + ")" +} + // Ikev2Auth defines type 'ikev2_auth'. type Ikev2Auth struct { Method uint8 `binapi:"u8,name=method" json:"method,omitempty"` @@ -48,6 +96,19 @@ type Ikev2ChildSa struct { Esn Ikev2SaTransform `binapi:"ikev2_sa_transform,name=esn" json:"esn,omitempty"` } +// Ikev2ChildSaV2 defines type 'ikev2_child_sa_v2'. +type Ikev2ChildSaV2 struct { + SaIndex uint32 `binapi:"u32,name=sa_index" json:"sa_index,omitempty"` + ChildSaIndex uint32 `binapi:"u32,name=child_sa_index" json:"child_sa_index,omitempty"` + ISpi uint32 `binapi:"u32,name=i_spi" json:"i_spi,omitempty"` + RSpi uint32 `binapi:"u32,name=r_spi" json:"r_spi,omitempty"` + Keys Ikev2Keys `binapi:"ikev2_keys,name=keys" json:"keys,omitempty"` + Encryption Ikev2SaTransform `binapi:"ikev2_sa_transform,name=encryption" json:"encryption,omitempty"` + Integrity Ikev2SaTransform `binapi:"ikev2_sa_transform,name=integrity" json:"integrity,omitempty"` + Esn Ikev2SaTransform `binapi:"ikev2_sa_transform,name=esn" json:"esn,omitempty"` + Uptime float64 `binapi:"f64,name=uptime" json:"uptime,omitempty"` +} + // Ikev2EspTransforms defines type 'ikev2_esp_transforms'. type Ikev2EspTransforms struct { CryptoAlg uint8 `binapi:"u8,name=crypto_alg" json:"crypto_alg,omitempty"` @@ -153,6 +214,45 @@ type Ikev2SaTransform struct { DhGroup uint8 `binapi:"u8,name=dh_group" json:"dh_group,omitempty"` } +// Ikev2SaV2 defines type 'ikev2_sa_v2'. +type Ikev2SaV2 struct { + SaIndex uint32 `binapi:"u32,name=sa_index" json:"sa_index,omitempty"` + ProfileName string `binapi:"string[64],name=profile_name" json:"profile_name,omitempty"` + State Ikev2State `binapi:"ikev2_state,name=state" json:"state,omitempty"` + Ispi uint64 `binapi:"u64,name=ispi" json:"ispi,omitempty"` + Rspi uint64 `binapi:"u64,name=rspi" json:"rspi,omitempty"` + Iaddr ip_types.Address `binapi:"address,name=iaddr" json:"iaddr,omitempty"` + Raddr ip_types.Address `binapi:"address,name=raddr" json:"raddr,omitempty"` + Keys Ikev2Keys `binapi:"ikev2_keys,name=keys" json:"keys,omitempty"` + IID Ikev2ID `binapi:"ikev2_id,name=i_id" json:"i_id,omitempty"` + RID Ikev2ID `binapi:"ikev2_id,name=r_id" json:"r_id,omitempty"` + Encryption Ikev2SaTransform `binapi:"ikev2_sa_transform,name=encryption" json:"encryption,omitempty"` + Integrity Ikev2SaTransform `binapi:"ikev2_sa_transform,name=integrity" json:"integrity,omitempty"` + Prf Ikev2SaTransform `binapi:"ikev2_sa_transform,name=prf" json:"prf,omitempty"` + Dh Ikev2SaTransform `binapi:"ikev2_sa_transform,name=dh" json:"dh,omitempty"` + Stats Ikev2SaStats `binapi:"ikev2_sa_stats,name=stats" json:"stats,omitempty"` +} + +// Ikev2SaV3 defines type 'ikev2_sa_v3'. +type Ikev2SaV3 struct { + SaIndex uint32 `binapi:"u32,name=sa_index" json:"sa_index,omitempty"` + ProfileName string `binapi:"string[64],name=profile_name" json:"profile_name,omitempty"` + State Ikev2State `binapi:"ikev2_state,name=state" json:"state,omitempty"` + Ispi uint64 `binapi:"u64,name=ispi" json:"ispi,omitempty"` + Rspi uint64 `binapi:"u64,name=rspi" json:"rspi,omitempty"` + Iaddr ip_types.Address `binapi:"address,name=iaddr" json:"iaddr,omitempty"` + Raddr ip_types.Address `binapi:"address,name=raddr" json:"raddr,omitempty"` + Keys Ikev2Keys `binapi:"ikev2_keys,name=keys" json:"keys,omitempty"` + IID Ikev2ID `binapi:"ikev2_id,name=i_id" json:"i_id,omitempty"` + RID Ikev2ID `binapi:"ikev2_id,name=r_id" json:"r_id,omitempty"` + Encryption Ikev2SaTransform `binapi:"ikev2_sa_transform,name=encryption" json:"encryption,omitempty"` + Integrity Ikev2SaTransform `binapi:"ikev2_sa_transform,name=integrity" json:"integrity,omitempty"` + Prf Ikev2SaTransform `binapi:"ikev2_sa_transform,name=prf" json:"prf,omitempty"` + Dh Ikev2SaTransform `binapi:"ikev2_sa_transform,name=dh" json:"dh,omitempty"` + Stats Ikev2SaStats `binapi:"ikev2_sa_stats,name=stats" json:"stats,omitempty"` + Uptime float64 `binapi:"f64,name=uptime" json:"uptime,omitempty"` +} + // Ikev2Ts defines type 'ikev2_ts'. type Ikev2Ts struct { SaIndex uint32 `binapi:"u32,name=sa_index" json:"sa_index,omitempty"` diff --git a/binapi/interface/interface.ba.go b/binapi/interface/interface.ba.go index 110bdb6d..58084ab6 100644 --- a/binapi/interface/interface.ba.go +++ b/binapi/interface/interface.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/interface.api.json // Package interfaces contains generated bindings for API file interface.api. diff --git a/binapi/interface_types/interface_types.ba.go b/binapi/interface_types/interface_types.ba.go index d95a1a94..78f6fe37 100644 --- a/binapi/interface_types/interface_types.ba.go +++ b/binapi/interface_types/interface_types.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/interface_types.api.json // Package interface_types contains generated bindings for API file interface_types.api. diff --git a/binapi/ioam_cache/ioam_cache.ba.go b/binapi/ioam_cache/ioam_cache.ba.go index e8807fc3..b74f1744 100644 --- a/binapi/ioam_cache/ioam_cache.ba.go +++ b/binapi/ioam_cache/ioam_cache.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/ioam_cache.api.json // Package ioam_cache contains generated bindings for API file ioam_cache.api. diff --git a/binapi/ioam_export/ioam_export.ba.go b/binapi/ioam_export/ioam_export.ba.go index d0ee6ef8..f56dd81e 100644 --- a/binapi/ioam_export/ioam_export.ba.go +++ b/binapi/ioam_export/ioam_export.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/ioam_export.api.json // Package ioam_export contains generated bindings for API file ioam_export.api. diff --git a/binapi/ioam_vxlan_gpe/ioam_vxlan_gpe.ba.go b/binapi/ioam_vxlan_gpe/ioam_vxlan_gpe.ba.go index 1f70bd61..c1934b88 100644 --- a/binapi/ioam_vxlan_gpe/ioam_vxlan_gpe.ba.go +++ b/binapi/ioam_vxlan_gpe/ioam_vxlan_gpe.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/ioam_vxlan_gpe.api.json // Package ioam_vxlan_gpe contains generated bindings for API file ioam_vxlan_gpe.api. diff --git a/binapi/ip/ip.ba.go b/binapi/ip/ip.ba.go index faf12e0f..019ff235 100644 --- a/binapi/ip/ip.ba.go +++ b/binapi/ip/ip.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/ip.api.json // Package ip contains generated bindings for API file ip.api. diff --git a/binapi/ip6_nd/ip6_nd.ba.go b/binapi/ip6_nd/ip6_nd.ba.go index 169dabf8..26936025 100644 --- a/binapi/ip6_nd/ip6_nd.ba.go +++ b/binapi/ip6_nd/ip6_nd.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/ip6_nd.api.json // Package ip6_nd contains generated bindings for API file ip6_nd.api. diff --git a/binapi/ip_neighbor/ip_neighbor.ba.go b/binapi/ip_neighbor/ip_neighbor.ba.go index a125512b..25a2d50b 100644 --- a/binapi/ip_neighbor/ip_neighbor.ba.go +++ b/binapi/ip_neighbor/ip_neighbor.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/ip_neighbor.api.json // Package ip_neighbor contains generated bindings for API file ip_neighbor.api. diff --git a/binapi/ip_session_redirect/ip_session_redirect.ba.go b/binapi/ip_session_redirect/ip_session_redirect.ba.go index e0f53f50..b6eedc6d 100644 --- a/binapi/ip_session_redirect/ip_session_redirect.ba.go +++ b/binapi/ip_session_redirect/ip_session_redirect.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/ip_session_redirect.api.json // Package ip_session_redirect contains generated bindings for API file ip_session_redirect.api. diff --git a/binapi/ip_types/ip_types.ba.go b/binapi/ip_types/ip_types.ba.go index b76ca0b2..af1a6c42 100644 --- a/binapi/ip_types/ip_types.ba.go +++ b/binapi/ip_types/ip_types.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/ip_types.api.json // Package ip_types contains generated bindings for API file ip_types.api. diff --git a/binapi/ipfix_export/ipfix_export.ba.go b/binapi/ipfix_export/ipfix_export.ba.go index 5eb4c4b1..359ba610 100644 --- a/binapi/ipfix_export/ipfix_export.ba.go +++ b/binapi/ipfix_export/ipfix_export.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/ipfix_export.api.json // Package ipfix_export contains generated bindings for API file ipfix_export.api. diff --git a/binapi/ipip/ipip.ba.go b/binapi/ipip/ipip.ba.go index e4002116..5bece62d 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.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/ipip.api.json // Package ipip contains generated bindings for API file ipip.api. diff --git a/binapi/ipsec/ipsec.ba.go b/binapi/ipsec/ipsec.ba.go index f43da879..71ac96bd 100644 --- a/binapi/ipsec/ipsec.ba.go +++ b/binapi/ipsec/ipsec.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/ipsec.api.json // Package ipsec contains generated bindings for API file ipsec.api. diff --git a/binapi/ipsec_types/ipsec_types.ba.go b/binapi/ipsec_types/ipsec_types.ba.go index e0de3a22..e2fc10c4 100644 --- a/binapi/ipsec_types/ipsec_types.ba.go +++ b/binapi/ipsec_types/ipsec_types.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/ipsec_types.api.json // Package ipsec_types contains generated bindings for API file ipsec_types.api. diff --git a/binapi/l2/l2.ba.go b/binapi/l2/l2.ba.go index 4fbdf9ef..3a09c40a 100644 --- a/binapi/l2/l2.ba.go +++ b/binapi/l2/l2.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/l2.api.json // Package l2 contains generated bindings for API file l2.api. diff --git a/binapi/l2tp/l2tp.ba.go b/binapi/l2tp/l2tp.ba.go index 20951481..33f5b851 100644 --- a/binapi/l2tp/l2tp.ba.go +++ b/binapi/l2tp/l2tp.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/l2tp.api.json // Package l2tp contains generated bindings for API file l2tp.api. diff --git a/binapi/l3xc/l3xc.ba.go b/binapi/l3xc/l3xc.ba.go index 3a9debf2..0af682da 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.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/l3xc.api.json // Package l3xc contains generated bindings for API file l3xc.api. diff --git a/binapi/lacp/lacp.ba.go b/binapi/lacp/lacp.ba.go index 1658290e..2094eaf1 100644 --- a/binapi/lacp/lacp.ba.go +++ b/binapi/lacp/lacp.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/lacp.api.json // Package lacp contains generated bindings for API file lacp.api. diff --git a/binapi/lb/lb.ba.go b/binapi/lb/lb.ba.go index f6a11f6b..a503aa06 100644 --- a/binapi/lb/lb.ba.go +++ b/binapi/lb/lb.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/lb.api.json // Package lb contains generated bindings for API file lb.api. diff --git a/binapi/lb_types/lb_types.ba.go b/binapi/lb_types/lb_types.ba.go index c9787c58..05fb924f 100644 --- a/binapi/lb_types/lb_types.ba.go +++ b/binapi/lb_types/lb_types.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/lb_types.api.json // Package lb_types contains generated bindings for API file lb_types.api. diff --git a/binapi/lcp/lcp.ba.go b/binapi/lcp/lcp.ba.go index 66b4c5a8..f29724a6 100644 --- a/binapi/lcp/lcp.ba.go +++ b/binapi/lcp/lcp.ba.go @@ -1,14 +1,14 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/lcp.api.json // Package lcp contains generated bindings for API file lcp.api. // // Contents: // - 1 enum -// - 15 messages +// - 19 messages package lcp import ( @@ -28,7 +28,7 @@ const _ = api.GoVppAPIPackageIsVersion2 const ( APIFile = "lcp" APIVersion = "1.0.0" - VersionCrc = 0x64780a3 + VersionCrc = 0x9ae8ba3b ) // LcpItfHostType defines enum 'lcp_itf_host_type'. @@ -373,6 +373,98 @@ func (m *LcpItfPairAddDelV2Reply) Unmarshal(b []byte) error { return nil } +// LcpItfPairAddDelV3 defines message 'lcp_itf_pair_add_del_v3'. +// InProgress: the message form may change in the future versions +type LcpItfPairAddDelV3 struct { + IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` + SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` + HostIfName string `binapi:"string[16],name=host_if_name" json:"host_if_name,omitempty"` + HostIfType LcpItfHostType `binapi:"lcp_itf_host_type,name=host_if_type" json:"host_if_type,omitempty"` + Netns string `binapi:"string[32],name=netns" json:"netns,omitempty"` +} + +func (m *LcpItfPairAddDelV3) Reset() { *m = LcpItfPairAddDelV3{} } +func (*LcpItfPairAddDelV3) GetMessageName() string { return "lcp_itf_pair_add_del_v3" } +func (*LcpItfPairAddDelV3) GetCrcString() string { return "40482b80" } +func (*LcpItfPairAddDelV3) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *LcpItfPairAddDelV3) Size() (size int) { + if m == nil { + return 0 + } + size += 1 // m.IsAdd + size += 4 // m.SwIfIndex + size += 16 // m.HostIfName + size += 1 // m.HostIfType + size += 32 // m.Netns + return size +} +func (m *LcpItfPairAddDelV3) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBool(m.IsAdd) + buf.EncodeUint32(uint32(m.SwIfIndex)) + buf.EncodeString(m.HostIfName, 16) + buf.EncodeUint8(uint8(m.HostIfType)) + buf.EncodeString(m.Netns, 32) + return buf.Bytes(), nil +} +func (m *LcpItfPairAddDelV3) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.IsAdd = buf.DecodeBool() + m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + m.HostIfName = buf.DecodeString(16) + m.HostIfType = LcpItfHostType(buf.DecodeUint8()) + m.Netns = buf.DecodeString(32) + return nil +} + +// LcpItfPairAddDelV3Reply defines message 'lcp_itf_pair_add_del_v3_reply'. +// InProgress: the message form may change in the future versions +type LcpItfPairAddDelV3Reply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` + VifIndex uint32 `binapi:"u32,name=vif_index" json:"vif_index,omitempty"` + HostSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=host_sw_if_index" json:"host_sw_if_index,omitempty"` +} + +func (m *LcpItfPairAddDelV3Reply) Reset() { *m = LcpItfPairAddDelV3Reply{} } +func (*LcpItfPairAddDelV3Reply) GetMessageName() string { return "lcp_itf_pair_add_del_v3_reply" } +func (*LcpItfPairAddDelV3Reply) GetCrcString() string { return "c2502663" } +func (*LcpItfPairAddDelV3Reply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *LcpItfPairAddDelV3Reply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + size += 4 // m.VifIndex + size += 4 // m.HostSwIfIndex + return size +} +func (m *LcpItfPairAddDelV3Reply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + buf.EncodeUint32(m.VifIndex) + buf.EncodeUint32(uint32(m.HostSwIfIndex)) + return buf.Bytes(), nil +} +func (m *LcpItfPairAddDelV3Reply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + m.VifIndex = buf.DecodeUint32() + m.HostSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + return nil +} + // Linux Control Plane interface pair dump response // - phy_sw_if_index - VPP's sw_if_index for the PHY // - host_sw_if_index - VPP's sw_if_index for the host tap @@ -508,6 +600,80 @@ func (m *LcpItfPairGetReply) Unmarshal(b []byte) error { return nil } +// LcpItfPairGetV2 defines message 'lcp_itf_pair_get_v2'. +type LcpItfPairGetV2 struct { + Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"` + SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` +} + +func (m *LcpItfPairGetV2) Reset() { *m = LcpItfPairGetV2{} } +func (*LcpItfPairGetV2) GetMessageName() string { return "lcp_itf_pair_get_v2" } +func (*LcpItfPairGetV2) GetCrcString() string { return "47250981" } +func (*LcpItfPairGetV2) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *LcpItfPairGetV2) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Cursor + size += 4 // m.SwIfIndex + return size +} +func (m *LcpItfPairGetV2) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.Cursor) + buf.EncodeUint32(uint32(m.SwIfIndex)) + return buf.Bytes(), nil +} +func (m *LcpItfPairGetV2) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Cursor = buf.DecodeUint32() + m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + return nil +} + +// LcpItfPairGetV2Reply defines message 'lcp_itf_pair_get_v2_reply'. +type LcpItfPairGetV2Reply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` + Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"` +} + +func (m *LcpItfPairGetV2Reply) Reset() { *m = LcpItfPairGetV2Reply{} } +func (*LcpItfPairGetV2Reply) GetMessageName() string { return "lcp_itf_pair_get_v2_reply" } +func (*LcpItfPairGetV2Reply) GetCrcString() string { return "53b48f5d" } +func (*LcpItfPairGetV2Reply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *LcpItfPairGetV2Reply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + size += 4 // m.Cursor + return size +} +func (m *LcpItfPairGetV2Reply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + buf.EncodeUint32(m.Cursor) + return buf.Bytes(), nil +} +func (m *LcpItfPairGetV2Reply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + m.Cursor = buf.DecodeUint32() + return nil +} + // Replace end/begin // LcpItfPairReplaceBegin defines message 'lcp_itf_pair_replace_begin'. type LcpItfPairReplaceBegin struct{} @@ -641,9 +807,13 @@ func file_lcp_binapi_init() { api.RegisterMessage((*LcpItfPairAddDelReply)(nil), "lcp_itf_pair_add_del_reply_e8d4e804") api.RegisterMessage((*LcpItfPairAddDelV2)(nil), "lcp_itf_pair_add_del_v2_40482b80") api.RegisterMessage((*LcpItfPairAddDelV2Reply)(nil), "lcp_itf_pair_add_del_v2_reply_39452f52") + api.RegisterMessage((*LcpItfPairAddDelV3)(nil), "lcp_itf_pair_add_del_v3_40482b80") + api.RegisterMessage((*LcpItfPairAddDelV3Reply)(nil), "lcp_itf_pair_add_del_v3_reply_c2502663") api.RegisterMessage((*LcpItfPairDetails)(nil), "lcp_itf_pair_details_8b5481af") api.RegisterMessage((*LcpItfPairGet)(nil), "lcp_itf_pair_get_f75ba505") api.RegisterMessage((*LcpItfPairGetReply)(nil), "lcp_itf_pair_get_reply_53b48f5d") + api.RegisterMessage((*LcpItfPairGetV2)(nil), "lcp_itf_pair_get_v2_47250981") + api.RegisterMessage((*LcpItfPairGetV2Reply)(nil), "lcp_itf_pair_get_v2_reply_53b48f5d") api.RegisterMessage((*LcpItfPairReplaceBegin)(nil), "lcp_itf_pair_replace_begin_51077d14") api.RegisterMessage((*LcpItfPairReplaceBeginReply)(nil), "lcp_itf_pair_replace_begin_reply_e8d4e804") api.RegisterMessage((*LcpItfPairReplaceEnd)(nil), "lcp_itf_pair_replace_end_51077d14") @@ -661,9 +831,13 @@ func AllMessages() []api.Message { (*LcpItfPairAddDelReply)(nil), (*LcpItfPairAddDelV2)(nil), (*LcpItfPairAddDelV2Reply)(nil), + (*LcpItfPairAddDelV3)(nil), + (*LcpItfPairAddDelV3Reply)(nil), (*LcpItfPairDetails)(nil), (*LcpItfPairGet)(nil), (*LcpItfPairGetReply)(nil), + (*LcpItfPairGetV2)(nil), + (*LcpItfPairGetV2Reply)(nil), (*LcpItfPairReplaceBegin)(nil), (*LcpItfPairReplaceBeginReply)(nil), (*LcpItfPairReplaceEnd)(nil), diff --git a/binapi/lcp/lcp_rpc.ba.go b/binapi/lcp/lcp_rpc.ba.go index cabaa55c..6b77e8c1 100644 --- a/binapi/lcp/lcp_rpc.ba.go +++ b/binapi/lcp/lcp_rpc.ba.go @@ -16,7 +16,9 @@ type RPCService interface { LcpDefaultNsSet(ctx context.Context, in *LcpDefaultNsSet) (*LcpDefaultNsSetReply, error) LcpItfPairAddDel(ctx context.Context, in *LcpItfPairAddDel) (*LcpItfPairAddDelReply, error) LcpItfPairAddDelV2(ctx context.Context, in *LcpItfPairAddDelV2) (*LcpItfPairAddDelV2Reply, error) + LcpItfPairAddDelV3(ctx context.Context, in *LcpItfPairAddDelV3) (*LcpItfPairAddDelV3Reply, error) LcpItfPairGet(ctx context.Context, in *LcpItfPairGet) (RPCService_LcpItfPairGetClient, error) + LcpItfPairGetV2(ctx context.Context, in *LcpItfPairGetV2) (RPCService_LcpItfPairGetV2Client, error) LcpItfPairReplaceBegin(ctx context.Context, in *LcpItfPairReplaceBegin) (*LcpItfPairReplaceBeginReply, error) LcpItfPairReplaceEnd(ctx context.Context, in *LcpItfPairReplaceEnd) (*LcpItfPairReplaceEndReply, error) } @@ -65,6 +67,15 @@ func (c *serviceClient) LcpItfPairAddDelV2(ctx context.Context, in *LcpItfPairAd return out, api.RetvalToVPPApiError(out.Retval) } +func (c *serviceClient) LcpItfPairAddDelV3(ctx context.Context, in *LcpItfPairAddDelV3) (*LcpItfPairAddDelV3Reply, error) { + out := new(LcpItfPairAddDelV3Reply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, api.RetvalToVPPApiError(out.Retval) +} + func (c *serviceClient) LcpItfPairGet(ctx context.Context, in *LcpItfPairGet) (RPCService_LcpItfPairGetClient, error) { stream, err := c.conn.NewStream(ctx) if err != nil { @@ -109,6 +120,50 @@ func (c *serviceClient_LcpItfPairGetClient) Recv() (*LcpItfPairDetails, *LcpItfP } } +func (c *serviceClient) LcpItfPairGetV2(ctx context.Context, in *LcpItfPairGetV2) (RPCService_LcpItfPairGetV2Client, error) { + stream, err := c.conn.NewStream(ctx) + if err != nil { + return nil, err + } + x := &serviceClient_LcpItfPairGetV2Client{stream} + if err := x.Stream.SendMsg(in); err != nil { + return nil, err + } + return x, nil +} + +type RPCService_LcpItfPairGetV2Client interface { + Recv() (*LcpItfPairDetails, *LcpItfPairGetV2Reply, error) + api.Stream +} + +type serviceClient_LcpItfPairGetV2Client struct { + api.Stream +} + +func (c *serviceClient_LcpItfPairGetV2Client) Recv() (*LcpItfPairDetails, *LcpItfPairGetV2Reply, error) { + msg, err := c.Stream.RecvMsg() + if err != nil { + return nil, nil, err + } + switch m := msg.(type) { + case *LcpItfPairDetails: + return m, nil, nil + case *LcpItfPairGetV2Reply: + if err := api.RetvalToVPPApiError(m.Retval); err != nil { + c.Stream.Close() + return nil, m, err + } + err = c.Stream.Close() + if err != nil { + return nil, m, err + } + return nil, m, io.EOF + default: + return nil, nil, fmt.Errorf("unexpected message: %T %v", m, m) + } +} + func (c *serviceClient) LcpItfPairReplaceBegin(ctx context.Context, in *LcpItfPairReplaceBegin) (*LcpItfPairReplaceBeginReply, error) { out := new(LcpItfPairReplaceBeginReply) err := c.conn.Invoke(ctx, in, out) diff --git a/binapi/lisp/lisp.ba.go b/binapi/lisp/lisp.ba.go index c8f2775a..c13833fd 100644 --- a/binapi/lisp/lisp.ba.go +++ b/binapi/lisp/lisp.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/lisp.api.json // Package lisp contains generated bindings for API file lisp.api. diff --git a/binapi/lisp_gpe/lisp_gpe.ba.go b/binapi/lisp_gpe/lisp_gpe.ba.go index dc493a5a..7bf3df7b 100644 --- a/binapi/lisp_gpe/lisp_gpe.ba.go +++ b/binapi/lisp_gpe/lisp_gpe.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/lisp_gpe.api.json // Package lisp_gpe contains generated bindings for API file lisp_gpe.api. diff --git a/binapi/lisp_types/lisp_types.ba.go b/binapi/lisp_types/lisp_types.ba.go index 10095529..9f245522 100644 --- a/binapi/lisp_types/lisp_types.ba.go +++ b/binapi/lisp_types/lisp_types.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/lisp_types.api.json // Package lisp_types contains generated bindings for API file lisp_types.api. diff --git a/binapi/lldp/lldp.ba.go b/binapi/lldp/lldp.ba.go index abc3cfc0..adf0043d 100644 --- a/binapi/lldp/lldp.ba.go +++ b/binapi/lldp/lldp.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/lldp.api.json // Package lldp contains generated bindings for API file lldp.api. diff --git a/binapi/mactime/mactime.ba.go b/binapi/mactime/mactime.ba.go index c20b5f23..398e6f90 100644 --- a/binapi/mactime/mactime.ba.go +++ b/binapi/mactime/mactime.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/mactime.api.json // Package mactime contains generated bindings for API file mactime.api. diff --git a/binapi/map/map.ba.go b/binapi/map/map.ba.go index 8af759ad..d9fe168a 100644 --- a/binapi/map/map.ba.go +++ b/binapi/map/map.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/map.api.json // Package maps contains generated bindings for API file map.api. diff --git a/binapi/mdata/mdata.ba.go b/binapi/mdata/mdata.ba.go index a8a23968..5e0f4b4f 100644 --- a/binapi/mdata/mdata.ba.go +++ b/binapi/mdata/mdata.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/mdata.api.json // Package mdata contains generated bindings for API file mdata.api. diff --git a/binapi/memclnt/memclnt.ba.go b/binapi/memclnt/memclnt.ba.go index 06b98038..b1c9744c 100644 --- a/binapi/memclnt/memclnt.ba.go +++ b/binapi/memclnt/memclnt.ba.go @@ -1,14 +1,14 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/memclnt.api.json // Package memclnt contains generated bindings for API file memclnt.api. // // Contents: // - 2 structs -// - 26 messages +// - 28 messages package memclnt import ( @@ -25,7 +25,7 @@ const _ = api.GoVppAPIPackageIsVersion2 const ( APIFile = "memclnt" APIVersion = "2.1.0" - VersionCrc = 0x21d36234 + VersionCrc = 0xb197c551 ) // MessageTableEntry defines type 'message_table_entry'. @@ -211,6 +211,70 @@ func (m *ControlPingReply) Unmarshal(b []byte) error { return nil } +// GetAPIJSON defines message 'get_api_json'. +type GetAPIJSON struct{} + +func (m *GetAPIJSON) Reset() { *m = GetAPIJSON{} } +func (*GetAPIJSON) GetMessageName() string { return "get_api_json" } +func (*GetAPIJSON) GetCrcString() string { return "51077d14" } +func (*GetAPIJSON) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *GetAPIJSON) Size() (size int) { + if m == nil { + return 0 + } + return size +} +func (m *GetAPIJSON) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + return buf.Bytes(), nil +} +func (m *GetAPIJSON) Unmarshal(b []byte) error { + return nil +} + +// GetAPIJSONReply defines message 'get_api_json_reply'. +type GetAPIJSONReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` + JSON string `binapi:"string[],name=json" json:"json,omitempty"` +} + +func (m *GetAPIJSONReply) Reset() { *m = GetAPIJSONReply{} } +func (*GetAPIJSONReply) GetMessageName() string { return "get_api_json_reply" } +func (*GetAPIJSONReply) GetCrcString() string { return "ea715b59" } +func (*GetAPIJSONReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *GetAPIJSONReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + size += 4 + len(m.JSON) // m.JSON + return size +} +func (m *GetAPIJSONReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + buf.EncodeString(m.JSON, 0) + return buf.Bytes(), nil +} +func (m *GetAPIJSONReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + m.JSON = buf.DecodeString(0) + return nil +} + // /* // - Lookup message-ID base by name // @@ -1141,6 +1205,8 @@ func file_memclnt_binapi_init() { api.RegisterMessage((*APIVersionsReply)(nil), "api_versions_reply_5f0d99d6") api.RegisterMessage((*ControlPing)(nil), "control_ping_51077d14") api.RegisterMessage((*ControlPingReply)(nil), "control_ping_reply_f6b0b8ca") + api.RegisterMessage((*GetAPIJSON)(nil), "get_api_json_51077d14") + api.RegisterMessage((*GetAPIJSONReply)(nil), "get_api_json_reply_ea715b59") api.RegisterMessage((*GetFirstMsgID)(nil), "get_first_msg_id_ebf79a66") api.RegisterMessage((*GetFirstMsgIDReply)(nil), "get_first_msg_id_reply_7d337472") api.RegisterMessage((*MemclntCreate)(nil), "memclnt_create_9c5e1c2f") @@ -1172,6 +1238,8 @@ func AllMessages() []api.Message { (*APIVersionsReply)(nil), (*ControlPing)(nil), (*ControlPingReply)(nil), + (*GetAPIJSON)(nil), + (*GetAPIJSONReply)(nil), (*GetFirstMsgID)(nil), (*GetFirstMsgIDReply)(nil), (*MemclntCreate)(nil), diff --git a/binapi/memclnt/memclnt_rpc.ba.go b/binapi/memclnt/memclnt_rpc.ba.go index c8efe37e..fb2028e3 100644 --- a/binapi/memclnt/memclnt_rpc.ba.go +++ b/binapi/memclnt/memclnt_rpc.ba.go @@ -12,6 +12,7 @@ import ( type RPCService interface { APIVersions(ctx context.Context, in *APIVersions) (*APIVersionsReply, error) ControlPing(ctx context.Context, in *ControlPing) (*ControlPingReply, error) + GetAPIJSON(ctx context.Context, in *GetAPIJSON) (*GetAPIJSONReply, error) GetFirstMsgID(ctx context.Context, in *GetFirstMsgID) (*GetFirstMsgIDReply, error) MemclntCreate(ctx context.Context, in *MemclntCreate) (*MemclntCreateReply, error) MemclntCreateV2(ctx context.Context, in *MemclntCreateV2) (*MemclntCreateV2Reply, error) @@ -53,6 +54,15 @@ func (c *serviceClient) ControlPing(ctx context.Context, in *ControlPing) (*Cont return out, api.RetvalToVPPApiError(out.Retval) } +func (c *serviceClient) GetAPIJSON(ctx context.Context, in *GetAPIJSON) (*GetAPIJSONReply, error) { + out := new(GetAPIJSONReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, api.RetvalToVPPApiError(out.Retval) +} + func (c *serviceClient) GetFirstMsgID(ctx context.Context, in *GetFirstMsgID) (*GetFirstMsgIDReply, error) { out := new(GetFirstMsgIDReply) err := c.conn.Invoke(ctx, in, out) diff --git a/binapi/memif/memif.ba.go b/binapi/memif/memif.ba.go index 3015385e..e8c5369b 100644 --- a/binapi/memif/memif.ba.go +++ b/binapi/memif/memif.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/memif.api.json // Package memif contains generated bindings for API file memif.api. diff --git a/binapi/mfib_types/mfib_types.ba.go b/binapi/mfib_types/mfib_types.ba.go index 50dc8e66..7217a2be 100644 --- a/binapi/mfib_types/mfib_types.ba.go +++ b/binapi/mfib_types/mfib_types.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/mfib_types.api.json // Package mfib_types contains generated bindings for API file mfib_types.api. diff --git a/binapi/mpls/mpls.ba.go b/binapi/mpls/mpls.ba.go index 6c461432..5248fc88 100644 --- a/binapi/mpls/mpls.ba.go +++ b/binapi/mpls/mpls.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/mpls.api.json // Package mpls contains generated bindings for API file mpls.api. diff --git a/binapi/mss_clamp/mss_clamp.ba.go b/binapi/mss_clamp/mss_clamp.ba.go index 7e5f33fd..873a01fb 100644 --- a/binapi/mss_clamp/mss_clamp.ba.go +++ b/binapi/mss_clamp/mss_clamp.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/mss_clamp.api.json // Package mss_clamp contains generated bindings for API file mss_clamp.api. diff --git a/binapi/nat44_ed/nat44_ed.ba.go b/binapi/nat44_ed/nat44_ed.ba.go index 79dc2bdb..8e991bd7 100644 --- a/binapi/nat44_ed/nat44_ed.ba.go +++ b/binapi/nat44_ed/nat44_ed.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/nat44_ed.api.json // Package nat44_ed contains generated bindings for API file nat44_ed.api. diff --git a/binapi/nat44_ei/nat44_ei.ba.go b/binapi/nat44_ei/nat44_ei.ba.go index c5b2117d..7056b4c5 100644 --- a/binapi/nat44_ei/nat44_ei.ba.go +++ b/binapi/nat44_ei/nat44_ei.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/nat44_ei.api.json // Package nat44_ei contains generated bindings for API file nat44_ei.api. diff --git a/binapi/nat64/nat64.ba.go b/binapi/nat64/nat64.ba.go index bb07b912..2497ada9 100644 --- a/binapi/nat64/nat64.ba.go +++ b/binapi/nat64/nat64.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/nat64.api.json // Package nat64 contains generated bindings for API file nat64.api. diff --git a/binapi/nat66/nat66.ba.go b/binapi/nat66/nat66.ba.go index aafb3033..f615c540 100644 --- a/binapi/nat66/nat66.ba.go +++ b/binapi/nat66/nat66.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/nat66.api.json // Package nat66 contains generated bindings for API file nat66.api. diff --git a/binapi/nat_types/nat_types.ba.go b/binapi/nat_types/nat_types.ba.go index d6980f52..367e4598 100644 --- a/binapi/nat_types/nat_types.ba.go +++ b/binapi/nat_types/nat_types.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/nat_types.api.json // Package nat_types contains generated bindings for API file nat_types.api. diff --git a/binapi/npt66/npt66.ba.go b/binapi/npt66/npt66.ba.go index f2fd80da..6406cbb8 100644 --- a/binapi/npt66/npt66.ba.go +++ b/binapi/npt66/npt66.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/npt66.api.json // Package npt66 contains generated bindings for API file npt66.api. diff --git a/binapi/nsh/nsh.ba.go b/binapi/nsh/nsh.ba.go index 23fb2390..dc0fb483 100644 --- a/binapi/nsh/nsh.ba.go +++ b/binapi/nsh/nsh.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/nsh.api.json // Package nsh contains generated bindings for API file nsh.api. diff --git a/binapi/nsim/nsim.ba.go b/binapi/nsim/nsim.ba.go index 9244e544..96e163b3 100644 --- a/binapi/nsim/nsim.ba.go +++ b/binapi/nsim/nsim.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/nsim.api.json // Package nsim contains generated bindings for API file nsim.api. diff --git a/binapi/oddbuf/oddbuf.ba.go b/binapi/oddbuf/oddbuf.ba.go index 0c84457e..501b1a50 100644 --- a/binapi/oddbuf/oddbuf.ba.go +++ b/binapi/oddbuf/oddbuf.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/oddbuf.api.json // Package oddbuf contains generated bindings for API file oddbuf.api. diff --git a/binapi/one/one.ba.go b/binapi/one/one.ba.go index 8c10c0f5..318ee7aa 100644 --- a/binapi/one/one.ba.go +++ b/binapi/one/one.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/one.api.json // Package one contains generated bindings for API file one.api. diff --git a/binapi/p2p_ethernet/p2p_ethernet.ba.go b/binapi/p2p_ethernet/p2p_ethernet.ba.go index 63cc8075..a58cf4cb 100644 --- a/binapi/p2p_ethernet/p2p_ethernet.ba.go +++ b/binapi/p2p_ethernet/p2p_ethernet.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/p2p_ethernet.api.json // Package p2p_ethernet contains generated bindings for API file p2p_ethernet.api. diff --git a/binapi/pci_types/pci_types.ba.go b/binapi/pci_types/pci_types.ba.go index 2a14fcc5..d9d6e317 100644 --- a/binapi/pci_types/pci_types.ba.go +++ b/binapi/pci_types/pci_types.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/pci_types.api.json // Package pci_types contains generated bindings for API file pci_types.api. diff --git a/binapi/pg/pg.ba.go b/binapi/pg/pg.ba.go index 208eb774..216a8775 100644 --- a/binapi/pg/pg.ba.go +++ b/binapi/pg/pg.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/pg.api.json // Package pg contains generated bindings for API file pg.api. diff --git a/binapi/ping/ping.ba.go b/binapi/ping/ping.ba.go index 4da49482..ef90ca75 100644 --- a/binapi/ping/ping.ba.go +++ b/binapi/ping/ping.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/ping.api.json // Package ping contains generated bindings for API file ping.api. diff --git a/binapi/pipe/pipe.ba.go b/binapi/pipe/pipe.ba.go index 932a8c24..95c215c5 100644 --- a/binapi/pipe/pipe.ba.go +++ b/binapi/pipe/pipe.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/pipe.api.json // Package pipe contains generated bindings for API file pipe.api. diff --git a/binapi/pnat/pnat.ba.go b/binapi/pnat/pnat.ba.go index feefe005..4555084a 100644 --- a/binapi/pnat/pnat.ba.go +++ b/binapi/pnat/pnat.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/pnat.api.json // Package pnat contains generated bindings for API file pnat.api. diff --git a/binapi/policer/policer.ba.go b/binapi/policer/policer.ba.go index 375885b5..f797495c 100644 --- a/binapi/policer/policer.ba.go +++ b/binapi/policer/policer.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/policer.api.json // Package policer contains generated bindings for API file policer.api. diff --git a/binapi/policer_types/policer_types.ba.go b/binapi/policer_types/policer_types.ba.go index 14b7af98..afcc9013 100644 --- a/binapi/policer_types/policer_types.ba.go +++ b/binapi/policer_types/policer_types.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/policer_types.api.json // Package policer_types contains generated bindings for API file policer_types.api. diff --git a/binapi/pot/pot.ba.go b/binapi/pot/pot.ba.go index 4dcaf026..9a712d3e 100644 --- a/binapi/pot/pot.ba.go +++ b/binapi/pot/pot.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/pot.api.json // Package pot contains generated bindings for API file pot.api. diff --git a/binapi/pppoe/pppoe.ba.go b/binapi/pppoe/pppoe.ba.go index a37fa459..7be7109d 100644 --- a/binapi/pppoe/pppoe.ba.go +++ b/binapi/pppoe/pppoe.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/pppoe.api.json // Package pppoe contains generated bindings for API file pppoe.api. diff --git a/binapi/punt/punt.ba.go b/binapi/punt/punt.ba.go index 374fcc33..2ba5dfcf 100644 --- a/binapi/punt/punt.ba.go +++ b/binapi/punt/punt.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/punt.api.json // Package punt contains generated bindings for API file punt.api. diff --git a/binapi/qos/qos.ba.go b/binapi/qos/qos.ba.go index 3156444f..5f70bdb8 100644 --- a/binapi/qos/qos.ba.go +++ b/binapi/qos/qos.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/qos.api.json // Package qos contains generated bindings for API file qos.api. diff --git a/binapi/rd_cp/rd_cp.ba.go b/binapi/rd_cp/rd_cp.ba.go index 2494c86f..cd183895 100644 --- a/binapi/rd_cp/rd_cp.ba.go +++ b/binapi/rd_cp/rd_cp.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/rd_cp.api.json // Package rd_cp contains generated bindings for API file rd_cp.api. diff --git a/binapi/rdma/rdma.ba.go b/binapi/rdma/rdma.ba.go index bbb73cd2..52a43e54 100644 --- a/binapi/rdma/rdma.ba.go +++ b/binapi/rdma/rdma.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/rdma.api.json // Package rdma contains generated bindings for API file rdma.api. diff --git a/binapi/session/session.ba.go b/binapi/session/session.ba.go index 2dcdc43a..6ed1a10e 100644 --- a/binapi/session/session.ba.go +++ b/binapi/session/session.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/session.api.json // Package session contains generated bindings for API file session.api. diff --git a/binapi/span/span.ba.go b/binapi/span/span.ba.go index e6b3f4d4..8099f027 100644 --- a/binapi/span/span.ba.go +++ b/binapi/span/span.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/span.api.json // Package span contains generated bindings for API file span.api. diff --git a/binapi/sr/sr.ba.go b/binapi/sr/sr.ba.go index 2a6989a6..ac82adba 100644 --- a/binapi/sr/sr.ba.go +++ b/binapi/sr/sr.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/sr.api.json // Package sr contains generated bindings for API file sr.api. diff --git a/binapi/sr_mobile/sr_mobile.ba.go b/binapi/sr_mobile/sr_mobile.ba.go index bac660f8..651fde2b 100644 --- a/binapi/sr_mobile/sr_mobile.ba.go +++ b/binapi/sr_mobile/sr_mobile.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/sr_mobile.api.json // Package sr_mobile contains generated bindings for API file sr_mobile.api. diff --git a/binapi/sr_mobile_types/sr_mobile_types.ba.go b/binapi/sr_mobile_types/sr_mobile_types.ba.go index 1e21d944..a6f10e53 100644 --- a/binapi/sr_mobile_types/sr_mobile_types.ba.go +++ b/binapi/sr_mobile_types/sr_mobile_types.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/sr_mobile_types.api.json // Package sr_mobile_types contains generated bindings for API file sr_mobile_types.api. diff --git a/binapi/sr_mpls/sr_mpls.ba.go b/binapi/sr_mpls/sr_mpls.ba.go index c8329ca2..c71f5fc2 100644 --- a/binapi/sr_mpls/sr_mpls.ba.go +++ b/binapi/sr_mpls/sr_mpls.ba.go @@ -1,8 +1,8 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release -// source: core/sr_mpls.api.json +// binapi-generator: v0.11.0 +// VPP: 24.06-release +// source: plugins/sr_mpls.api.json // Package sr_mpls contains generated bindings for API file sr_mpls.api. // diff --git a/binapi/sr_pt/sr_pt.ba.go b/binapi/sr_pt/sr_pt.ba.go index 42ae93a8..b19fe090 100644 --- a/binapi/sr_pt/sr_pt.ba.go +++ b/binapi/sr_pt/sr_pt.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/sr_pt.api.json // Package sr_pt contains generated bindings for API file sr_pt.api. diff --git a/binapi/sr_types/sr_types.ba.go b/binapi/sr_types/sr_types.ba.go index 1dda3469..fd570eea 100644 --- a/binapi/sr_types/sr_types.ba.go +++ b/binapi/sr_types/sr_types.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/sr_types.api.json // Package sr_types contains generated bindings for API file sr_types.api. diff --git a/binapi/stn/stn.ba.go b/binapi/stn/stn.ba.go index 808325b0..71d8a2e4 100644 --- a/binapi/stn/stn.ba.go +++ b/binapi/stn/stn.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/stn.api.json // Package stn contains generated bindings for API file stn.api. diff --git a/binapi/svs/svs.ba.go b/binapi/svs/svs.ba.go index a262a916..62785b3e 100644 --- a/binapi/svs/svs.ba.go +++ b/binapi/svs/svs.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/svs.api.json // Package svs contains generated bindings for API file svs.api. diff --git a/binapi/syslog/syslog.ba.go b/binapi/syslog/syslog.ba.go index 31e2119a..e07cc136 100644 --- a/binapi/syslog/syslog.ba.go +++ b/binapi/syslog/syslog.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/syslog.api.json // Package syslog contains generated bindings for API file syslog.api. diff --git a/binapi/tapv2/tapv2.ba.go b/binapi/tapv2/tapv2.ba.go index 282cc476..566e9ccc 100644 --- a/binapi/tapv2/tapv2.ba.go +++ b/binapi/tapv2/tapv2.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/tapv2.api.json // Package tapv2 contains generated bindings for API file tapv2.api. diff --git a/binapi/tcp/tcp.ba.go b/binapi/tcp/tcp.ba.go index 4654c927..a8726add 100644 --- a/binapi/tcp/tcp.ba.go +++ b/binapi/tcp/tcp.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/tcp.api.json // Package tcp contains generated bindings for API file tcp.api. diff --git a/binapi/teib/teib.ba.go b/binapi/teib/teib.ba.go index fa02d452..f4ab8518 100644 --- a/binapi/teib/teib.ba.go +++ b/binapi/teib/teib.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/teib.api.json // Package teib contains generated bindings for API file teib.api. diff --git a/binapi/tls_openssl/tls_openssl.ba.go b/binapi/tls_openssl/tls_openssl.ba.go index 2c3fe20b..b4cf1f9e 100644 --- a/binapi/tls_openssl/tls_openssl.ba.go +++ b/binapi/tls_openssl/tls_openssl.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/tls_openssl.api.json // Package tls_openssl contains generated bindings for API file tls_openssl.api. diff --git a/binapi/trace/trace.ba.go b/binapi/trace/trace.ba.go index 4fa42b60..7945e824 100644 --- a/binapi/trace/trace.ba.go +++ b/binapi/trace/trace.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/trace.api.json // Package trace contains generated bindings for API file trace.api. diff --git a/binapi/tracedump/tracedump.ba.go b/binapi/tracedump/tracedump.ba.go index 9bb4d31d..d127c45b 100644 --- a/binapi/tracedump/tracedump.ba.go +++ b/binapi/tracedump/tracedump.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/tracedump.api.json // Package tracedump contains generated bindings for API file tracedump.api. diff --git a/binapi/tracenode/tracenode.ba.go b/binapi/tracenode/tracenode.ba.go index baebffda..ea426859 100644 --- a/binapi/tracenode/tracenode.ba.go +++ b/binapi/tracenode/tracenode.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/tracenode.api.json // Package tracenode contains generated bindings for API file tracenode.api. diff --git a/binapi/tunnel_types/tunnel_types.ba.go b/binapi/tunnel_types/tunnel_types.ba.go index 40d5ff2c..841549a7 100644 --- a/binapi/tunnel_types/tunnel_types.ba.go +++ b/binapi/tunnel_types/tunnel_types.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/tunnel_types.api.json // Package tunnel_types contains generated bindings for API file tunnel_types.api. diff --git a/binapi/udp/udp.ba.go b/binapi/udp/udp.ba.go index be1abe3d..8a48d763 100644 --- a/binapi/udp/udp.ba.go +++ b/binapi/udp/udp.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/udp.api.json // Package udp contains generated bindings for API file udp.api. diff --git a/binapi/udp_ping/udp_ping.ba.go b/binapi/udp_ping/udp_ping.ba.go index 2c722bf1..5329fa25 100644 --- a/binapi/udp_ping/udp_ping.ba.go +++ b/binapi/udp_ping/udp_ping.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/udp_ping.api.json // Package udp_ping contains generated bindings for API file udp_ping.api. diff --git a/binapi/urpf/urpf.ba.go b/binapi/urpf/urpf.ba.go index 808e49f5..6aa957f6 100644 --- a/binapi/urpf/urpf.ba.go +++ b/binapi/urpf/urpf.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/urpf.api.json // Package urpf contains generated bindings for API file urpf.api. diff --git a/binapi/vhost_user/vhost_user.ba.go b/binapi/vhost_user/vhost_user.ba.go index 8d2b9fcf..7008c2b2 100644 --- a/binapi/vhost_user/vhost_user.ba.go +++ b/binapi/vhost_user/vhost_user.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/vhost_user.api.json // Package vhost_user contains generated bindings for API file vhost_user.api. diff --git a/binapi/virtio/virtio.ba.go b/binapi/virtio/virtio.ba.go index 9d9b20a1..b2e29e5a 100644 --- a/binapi/virtio/virtio.ba.go +++ b/binapi/virtio/virtio.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/virtio.api.json // Package virtio contains generated bindings for API file virtio.api. diff --git a/binapi/virtio_types/virtio_types.ba.go b/binapi/virtio_types/virtio_types.ba.go index a783a224..7ee8ed9a 100644 --- a/binapi/virtio_types/virtio_types.ba.go +++ b/binapi/virtio_types/virtio_types.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/virtio_types.api.json // Package virtio_types contains generated bindings for API file virtio_types.api. diff --git a/binapi/vlib/vlib.ba.go b/binapi/vlib/vlib.ba.go index d200418e..16bc6f8f 100644 --- a/binapi/vlib/vlib.ba.go +++ b/binapi/vlib/vlib.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/vlib.api.json // Package vlib contains generated bindings for API file vlib.api. diff --git a/binapi/vmxnet3/vmxnet3.ba.go b/binapi/vmxnet3/vmxnet3.ba.go index 4bcb7c11..5c7d2a0f 100644 --- a/binapi/vmxnet3/vmxnet3.ba.go +++ b/binapi/vmxnet3/vmxnet3.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/vmxnet3.api.json // Package vmxnet3 contains generated bindings for API file vmxnet3.api. diff --git a/binapi/vpe/vpe.ba.go b/binapi/vpe/vpe.ba.go index 249c6b8a..cf8e7b04 100644 --- a/binapi/vpe/vpe.ba.go +++ b/binapi/vpe/vpe.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/vpe.api.json // Package vpe contains generated bindings for API file vpe.api. diff --git a/binapi/vpe_types/vpe_types.ba.go b/binapi/vpe_types/vpe_types.ba.go index 613c06e8..41de59e5 100644 --- a/binapi/vpe_types/vpe_types.ba.go +++ b/binapi/vpe_types/vpe_types.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/vpe_types.api.json // Package vpe_types contains generated bindings for API file vpe_types.api. diff --git a/binapi/vrrp/vrrp.ba.go b/binapi/vrrp/vrrp.ba.go index 23cb09df..023d7cb2 100644 --- a/binapi/vrrp/vrrp.ba.go +++ b/binapi/vrrp/vrrp.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/vrrp.api.json // Package vrrp contains generated bindings for API file vrrp.api. diff --git a/binapi/vxlan/vxlan.ba.go b/binapi/vxlan/vxlan.ba.go index f6e65db9..e70ef605 100644 --- a/binapi/vxlan/vxlan.ba.go +++ b/binapi/vxlan/vxlan.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/vxlan.api.json // Package vxlan contains generated bindings for API file vxlan.api. diff --git a/binapi/vxlan_gpe/vxlan_gpe.ba.go b/binapi/vxlan_gpe/vxlan_gpe.ba.go index 9e0f339a..f9c15ed5 100644 --- a/binapi/vxlan_gpe/vxlan_gpe.ba.go +++ b/binapi/vxlan_gpe/vxlan_gpe.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: core/vxlan_gpe.api.json // Package vxlan_gpe contains generated bindings for API file vxlan_gpe.api. diff --git a/binapi/vxlan_gpe_ioam_export/vxlan_gpe_ioam_export.ba.go b/binapi/vxlan_gpe_ioam_export/vxlan_gpe_ioam_export.ba.go index 4c641994..d9101f1d 100644 --- a/binapi/vxlan_gpe_ioam_export/vxlan_gpe_ioam_export.ba.go +++ b/binapi/vxlan_gpe_ioam_export/vxlan_gpe_ioam_export.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/vxlan_gpe_ioam_export.api.json // Package vxlan_gpe_ioam_export contains generated bindings for API file vxlan_gpe_ioam_export.api. diff --git a/binapi/wireguard/wireguard.ba.go b/binapi/wireguard/wireguard.ba.go index f7a3491c..7a312940 100644 --- a/binapi/wireguard/wireguard.ba.go +++ b/binapi/wireguard/wireguard.ba.go @@ -1,7 +1,7 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.10.0 -// VPP: 24.02-release +// binapi-generator: v0.11.0 +// VPP: 24.06-release // source: plugins/wireguard.api.json // Package wireguard contains generated bindings for API file wireguard.api. diff --git a/internal/version/version.go b/internal/version/version.go index 1b8cd053..22abd602 100644 --- a/internal/version/version.go +++ b/internal/version/version.go @@ -27,7 +27,7 @@ const ( Major = 0 Minor = 11 Patch = 0 - PreRelease = "dev" + PreRelease = "" ) // String formats the version string using semver format. @@ -44,7 +44,7 @@ func String() string { // even with bare go build/install. var ( name = "govpp" - version = "v0.11.0-dev" + version = "v0.11.0" commit = "unknown" branch = "HEAD" buildStamp = "" diff --git a/test/integration/binapi_test.go b/test/integration/binapi_test.go index 446b0cec..a812baaf 100644 --- a/test/integration/binapi_test.go +++ b/test/integration/binapi_test.go @@ -15,37 +15,57 @@ package integration import ( - "context" "io" "testing" interfaces "go.fd.io/govpp/binapi/interface" + "go.fd.io/govpp/binapi/memclnt" "go.fd.io/govpp/binapi/vpe" "go.fd.io/govpp/test/vpptesting" ) -// TestVersion tests that getting VPP version works. +// TestVersion tests getting VPP version works. func TestVersion(t *testing.T) { test := vpptesting.SetupVPP(t) + ctx := test.Context - vpeRPC := vpe.NewServiceClient(test.Conn) + c := vpe.NewServiceClient(test.Conn) - versionInfo, err := vpeRPC.ShowVersion(context.Background(), &vpe.ShowVersion{}) + reply, err := c.ShowVersion(ctx, &vpe.ShowVersion{}) if err != nil { t.Fatalf("getting version failed: %v", err) } - t.Logf("VPP version: %v", versionInfo.Version) - if versionInfo.Version == "" { + t.Logf("VPP version: %v", reply.Version) + if reply.Version == "" { t.Fatal("expected VPP version to not be empty") } } -// TestInterfacesLoopback tests that creating a loopback interface works and returns +// TestAPIJSON tests getting VPP API JSON. +func TestAPIJSON(t *testing.T) { + test := vpptesting.SetupVPP(t) + ctx := test.Context + + if test.VPPVersion() < "24.06" { + t.Skip("memclnt.GetAPIJSON is not supported in VPP < 24.06") + } + + c := memclnt.NewServiceClient(test.Conn) + + reply, err := c.GetAPIJSON(ctx, &memclnt.GetAPIJSON{}) + if err != nil { + t.Fatalf("getting version failed: %v", err) + } + + t.Logf("JSON:\n%s", reply.JSON) +} + +// TestInterfacesLoopback tests creating a loopback interface works and returns // non-zero ID and that the interface will be listed in interface dump. func TestInterfacesLoopback(t *testing.T) { test := vpptesting.SetupVPP(t) - ctx := context.Background() + ctx := test.Context ifacesRPC := interfaces.NewServiceClient(test.Conn) diff --git a/test/vpptesting/vpptest.go b/test/vpptesting/vpptest.go index d57259c7..d8263184 100644 --- a/test/vpptesting/vpptest.go +++ b/test/vpptesting/vpptest.go @@ -26,6 +26,7 @@ import ( "github.com/mitchellh/go-ps" "github.com/sirupsen/logrus" + "go.fd.io/govpp/binapi/vpe" "go.fd.io/govpp/adapter/socketclient" "go.fd.io/govpp/adapter/statsclient" @@ -62,6 +63,7 @@ type TestCtx struct { statsConn *govppcore.StatsConnection memclntRPC memclnt.RPCService vlibRPC vlib.RPCService + version string } func SetupVPP(t testing.TB) (tc *TestCtx) { @@ -117,6 +119,7 @@ func SetupVPP(t testing.TB) (tc *TestCtx) { memclntRPC := memclnt.NewServiceClient(conn) vlibRPC := vlib.NewServiceClient(conn) + vpeRPC := vpe.NewServiceClient(conn) // send ping vpeInfo, err := memclntRPC.ControlPing(context.Background(), &memclnt.ControlPing{}) @@ -130,6 +133,12 @@ func SetupVPP(t testing.TB) (tc *TestCtx) { t.Fatalf("expected VPP PID to be %v, got %v", vppPID, vpeInfo.VpePID) } + // get version + versionInfo, err := vpeRPC.ShowVersion(context.Background(), &vpe.ShowVersion{}) + if err != nil { + t.Fatalf("getting vpp version failed: %v", err) + } + go func() { q := make(chan struct{}) t.Cleanup(func() { @@ -155,6 +164,7 @@ func SetupVPP(t testing.TB) (tc *TestCtx) { Conn: conn, memclntRPC: memclntRPC, vlibRPC: vlibRPC, + version: versionInfo.Version, } } @@ -173,6 +183,10 @@ func vppAlreadyRunning() error { return nil } +func (ctx *TestCtx) VPPVersion() string { + return ctx.version +} + func (ctx *TestCtx) StatsConn() *govppcore.StatsConnection { if ctx.statsConn != nil { return ctx.statsConn