aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Skrzypczak <nathan.skrzypczak@gmail.com>2022-04-27 18:39:03 +0200
committerNathan Skrzypczak <nathan.skrzypczak@gmail.com>2022-05-30 18:49:13 +0200
commit4102c72bce694babd94a481b1201d33895a6f9c5 (patch)
tree1b11238ca4706008c88712f26942dd74ab9c14a6
parenta4112fac7b86fe09650d2bb57969fe46404edd7d (diff)
Update generated binapi to v22.02 & makefile changes
This patch does some small updates to the Makefile. * `make gen-binapi-from-code` is removed, and moves to `gen-binapi-local` * `make build` is patched to build cmd & examples * `make binapi-generator` to build the api-generator without other binaries, as they typically require its output to build. * `make gen-binapi-local` runs the locally built binapi-generator to update the local bindings. It expects ${VPP_DIR} to be set and to point to a local vpp repository checked out with the right version * `make gen-binapi-internal` runs the locally built binapi-generator to update the bindings in `internal/testbinapi/binapi2001` Regarding VPP, notable changes when moving to v22.02 are : - ControlPing moved from vpe to memclnt - CliInband went from vpe to vlib Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com> Change-Id: Ie5cd2d5ded7ecaffd9abc3ca675df40be272b1fa
-rw-r--r--Makefile72
-rw-r--r--binapi/abf/abf.ba.go2
-rw-r--r--binapi/abf/abf_rpc.ba.go10
-rw-r--r--binapi/acl/acl.ba.go150
-rw-r--r--binapi/acl/acl_rpc.ba.go42
-rw-r--r--binapi/acl_types/acl_types.ba.go2
-rw-r--r--binapi/adl/adl.ba.go2
-rw-r--r--binapi/af_packet/af_packet.ba.go112
-rw-r--r--binapi/af_packet/af_packet_rpc.ba.go16
-rw-r--r--binapi/af_xdp/af_xdp.ba.go118
-rw-r--r--binapi/af_xdp/af_xdp_rpc.ba.go10
-rw-r--r--binapi/arp/arp.ba.go2
-rw-r--r--binapi/arp/arp_rpc.ba.go10
-rw-r--r--binapi/arping/arping.ba.go2
-rw-r--r--binapi/avf/avf.ba.go2
-rw-r--r--binapi/bfd/bfd.ba.go2
-rw-r--r--binapi/bfd/bfd_rpc.ba.go10
-rw-r--r--binapi/bier/bier.ba.go2
-rw-r--r--binapi/bier/bier_rpc.ba.go22
-rw-r--r--binapi/bond/bond.ba.go2
-rw-r--r--binapi/bond/bond_rpc.ba.go18
-rw-r--r--binapi/builtinurl/builtinurl.ba.go2
-rw-r--r--binapi/cdp/cdp.ba.go2
-rw-r--r--binapi/classify/classify.ba.go84
-rw-r--r--binapi/classify/classify_rpc.ba.go24
-rw-r--r--binapi/cnat/cnat.ba.go2
-rw-r--r--binapi/cnat/cnat_rpc.ba.go10
-rw-r--r--binapi/crypto/crypto.ba.go2
-rw-r--r--binapi/crypto_sw_scheduler/crypto_sw_scheduler.ba.go2
-rw-r--r--binapi/ct6/ct6.ba.go2
-rw-r--r--binapi/det44/det44.ba.go2
-rw-r--r--binapi/det44/det44_rpc.ba.go22
-rw-r--r--binapi/dhcp/dhcp.ba.go2
-rw-r--r--binapi/dhcp/dhcp_rpc.ba.go10
-rw-r--r--binapi/dhcp6_ia_na_client_cp/dhcp6_ia_na_client_cp.ba.go2
-rw-r--r--binapi/dhcp6_pd_client_cp/dhcp6_pd_client_cp.ba.go2
-rw-r--r--binapi/dns/dns.ba.go2
-rw-r--r--binapi/dslite/dslite.ba.go2
-rw-r--r--binapi/dslite/dslite_rpc.ba.go6
-rw-r--r--binapi/ethernet_types/ethernet_types.ba.go2
-rw-r--r--binapi/feature/feature.ba.go2
-rw-r--r--binapi/fib/fib.ba.go2
-rw-r--r--binapi/fib/fib_rpc.ba.go6
-rw-r--r--binapi/fib_types/fib_types.ba.go2
-rw-r--r--binapi/flow/flow.ba.go2
-rw-r--r--binapi/flow_types/flow_types.ba.go2
-rw-r--r--binapi/flowprobe/flowprobe.ba.go2
-rw-r--r--binapi/gbp/gbp.ba.go2568
-rw-r--r--binapi/gbp/gbp_rpc.ba.go560
-rw-r--r--binapi/geneve/geneve.ba.go2
-rw-r--r--binapi/geneve/geneve_rpc.ba.go6
-rw-r--r--binapi/graph/graph.ba.go2
-rw-r--r--binapi/gre/gre.ba.go2
-rw-r--r--binapi/gre/gre_rpc.ba.go6
-rw-r--r--binapi/gso/gso.ba.go2
-rw-r--r--binapi/gtpu/gtpu.ba.go2
-rw-r--r--binapi/gtpu/gtpu_rpc.ba.go6
-rw-r--r--binapi/http_static/http_static.ba.go2
-rw-r--r--binapi/igmp/igmp.ba.go2
-rw-r--r--binapi/igmp/igmp_rpc.ba.go10
-rw-r--r--binapi/ikev2/ikev2.ba.go2
-rw-r--r--binapi/ikev2/ikev2_rpc.ba.go18
-rw-r--r--binapi/ikev2_types/ikev2_types.ba.go2
-rw-r--r--binapi/interface/interface.ba.go319
-rw-r--r--binapi/interface/interface_rpc.ba.go71
-rw-r--r--binapi/interface_types/interface_types.ba.go2
-rw-r--r--binapi/ioam_cache/ioam_cache.ba.go2
-rw-r--r--binapi/ioam_export/ioam_export.ba.go2
-rw-r--r--binapi/ioam_vxlan_gpe/ioam_vxlan_gpe.ba.go2
-rw-r--r--binapi/ip/ip.ba.go414
-rw-r--r--binapi/ip/ip_rpc.ba.go110
-rw-r--r--binapi/ip6_nd/ip6_nd.ba.go82
-rw-r--r--binapi/ip6_nd/ip6_nd_rpc.ba.go16
-rw-r--r--binapi/ip_neighbor/ip_neighbor.ba.go2
-rw-r--r--binapi/ip_neighbor/ip_neighbor_rpc.ba.go6
-rw-r--r--binapi/ip_types/ip_types.ba.go2
-rw-r--r--binapi/ipfix_export/ipfix_export.ba.go255
-rw-r--r--binapi/ipfix_export/ipfix_export_rpc.ba.go65
-rw-r--r--binapi/ipip/ipip.ba.go2
-rw-r--r--binapi/ipip/ipip_rpc.ba.go6
-rw-r--r--binapi/ipsec/ipsec.ba.go226
-rw-r--r--binapi/ipsec/ipsec_rpc.ba.go58
-rw-r--r--binapi/ipsec_types/ipsec_types.ba.go2
-rw-r--r--binapi/l2/l2.ba.go2
-rw-r--r--binapi/l2/l2_rpc.ba.go18
-rw-r--r--binapi/l2e/l2e.ba.go116
-rw-r--r--binapi/l2e/l2e_rpc.ba.go31
-rw-r--r--binapi/l2tp/l2tp.ba.go2
-rw-r--r--binapi/l2tp/l2tp_rpc.ba.go6
-rw-r--r--binapi/l3xc/l3xc.ba.go2
-rw-r--r--binapi/l3xc/l3xc_rpc.ba.go6
-rw-r--r--binapi/lacp/lacp.ba.go2
-rw-r--r--binapi/lacp/lacp_rpc.ba.go6
-rw-r--r--binapi/lb/lb.ba.go2
-rw-r--r--binapi/lb/lb_rpc.ba.go10
-rw-r--r--binapi/lb_types/lb_types.ba.go2
-rw-r--r--binapi/lcp/lcp.ba.go2
-rw-r--r--binapi/lisp/lisp.ba.go2
-rw-r--r--binapi/lisp/lisp_rpc.ba.go30
-rw-r--r--binapi/lisp_gpe/lisp_gpe.ba.go2
-rw-r--r--binapi/lisp_gpe/lisp_gpe_rpc.ba.go6
-rw-r--r--binapi/lisp_types/lisp_types.ba.go2
-rw-r--r--binapi/lldp/lldp.ba.go2
-rw-r--r--binapi/mactime/mactime.ba.go2
-rw-r--r--binapi/mactime/mactime_rpc.ba.go6
-rw-r--r--binapi/map/map.ba.go2
-rw-r--r--binapi/map/map_rpc.ba.go10
-rw-r--r--binapi/mdata/mdata.ba.go2
-rw-r--r--binapi/memclnt/memclnt.ba.go78
-rw-r--r--binapi/memclnt/memclnt_rpc.ba.go10
-rw-r--r--binapi/memif/memif.ba.go2
-rw-r--r--binapi/memif/memif_rpc.ba.go10
-rw-r--r--binapi/mfib_types/mfib_types.ba.go2
-rw-r--r--binapi/mpls/mpls.ba.go2
-rw-r--r--binapi/mpls/mpls_rpc.ba.go14
-rw-r--r--binapi/mss_clamp/mss_clamp.ba.go2
-rw-r--r--binapi/nat44_ed/nat44_ed.ba.go331
-rw-r--r--binapi/nat44_ed/nat44_ed_rpc.ba.go137
-rw-r--r--binapi/nat44_ei/nat44_ei.ba.go197
-rw-r--r--binapi/nat44_ei/nat44_ei_rpc.ba.go89
-rw-r--r--binapi/nat64/nat64.ba.go2
-rw-r--r--binapi/nat64/nat64_rpc.ba.go22
-rw-r--r--binapi/nat66/nat66.ba.go2
-rw-r--r--binapi/nat66/nat66_rpc.ba.go10
-rw-r--r--binapi/nat_types/nat_types.ba.go2
-rw-r--r--binapi/nsh/nsh.ba.go2
-rw-r--r--binapi/nsh/nsh_rpc.ba.go10
-rw-r--r--binapi/nsim/nsim.ba.go2
-rw-r--r--binapi/oddbuf/oddbuf.ba.go2
-rw-r--r--binapi/one/one.ba.go2
-rw-r--r--binapi/one/one_rpc.ba.go34
-rw-r--r--binapi/p2p_ethernet/p2p_ethernet.ba.go2
-rw-r--r--binapi/pci_types/pci_types.ba.go2
-rw-r--r--binapi/pg/pg.ba.go125
-rw-r--r--binapi/pg/pg_rpc.ba.go10
-rw-r--r--binapi/pipe/pipe.ba.go2
-rw-r--r--binapi/pipe/pipe_rpc.ba.go6
-rw-r--r--binapi/pnat/pnat.ba.go2
-rw-r--r--binapi/policer/policer.ba.go2
-rw-r--r--binapi/policer/policer_rpc.ba.go6
-rw-r--r--binapi/policer_types/policer_types.ba.go2
-rw-r--r--binapi/pot/pot.ba.go2
-rw-r--r--binapi/pot/pot_rpc.ba.go6
-rw-r--r--binapi/pp2/pp2.ba.go192
-rw-r--r--binapi/pp2/pp2_rpc.ba.go41
-rw-r--r--binapi/pppoe/pppoe.ba.go2
-rw-r--r--binapi/pppoe/pppoe_rpc.ba.go6
-rw-r--r--binapi/punt/punt.ba.go2
-rw-r--r--binapi/punt/punt_rpc.ba.go10
-rw-r--r--binapi/qos/qos.ba.go2
-rw-r--r--binapi/qos/qos_rpc.ba.go18
-rw-r--r--binapi/rd_cp/rd_cp.ba.go2
-rw-r--r--binapi/rdma/rdma.ba.go2
-rw-r--r--binapi/session/session.ba.go276
-rw-r--r--binapi/session/session_rpc.ba.go36
-rw-r--r--binapi/span/span.ba.go2
-rw-r--r--binapi/span/span_rpc.ba.go6
-rw-r--r--binapi/sr/sr.ba.go2
-rw-r--r--binapi/sr/sr_rpc.ba.go18
-rw-r--r--binapi/sr_mpls/sr_mpls.ba.go2
-rw-r--r--binapi/sr_types/sr_types.ba.go2
-rw-r--r--binapi/stn/stn.ba.go2
-rw-r--r--binapi/stn/stn_rpc.ba.go6
-rw-r--r--binapi/svs/svs.ba.go2
-rw-r--r--binapi/svs/svs_rpc.ba.go6
-rw-r--r--binapi/syslog/syslog.ba.go2
-rw-r--r--binapi/tapv2/tapv2.ba.go190
-rw-r--r--binapi/tapv2/tapv2_rpc.ba.go16
-rw-r--r--binapi/tcp/tcp.ba.go2
-rw-r--r--binapi/teib/teib.ba.go2
-rw-r--r--binapi/teib/teib_rpc.ba.go6
-rw-r--r--binapi/tls_openssl/tls_openssl.ba.go2
-rw-r--r--binapi/trace/trace.ba.go2
-rw-r--r--binapi/tracedump/tracedump.ba.go2
-rw-r--r--binapi/tunnel_types/tunnel_types.ba.go2
-rw-r--r--binapi/udp/udp.ba.go128
-rw-r--r--binapi/udp/udp_rpc.ba.go16
-rw-r--r--binapi/udp_ping/udp_ping.ba.go2
-rw-r--r--binapi/urpf/urpf.ba.go2
-rw-r--r--binapi/vhost_user/vhost_user.ba.go2
-rw-r--r--binapi/vhost_user/vhost_user_rpc.ba.go6
-rw-r--r--binapi/virtio/virtio.ba.go2
-rw-r--r--binapi/virtio/virtio_rpc.ba.go6
-rw-r--r--binapi/virtio_types/virtio_types.ba.go2
-rw-r--r--binapi/vlib/vlib.ba.go751
-rw-r--r--binapi/vlib/vlib_rpc.ba.go111
-rw-r--r--binapi/vmxnet3/vmxnet3.ba.go2
-rw-r--r--binapi/vmxnet3/vmxnet3_rpc.ba.go10
-rw-r--r--binapi/vpe/vpe.ba.go792
-rw-r--r--binapi/vpe/vpe_http.ba.go204
-rw-r--r--binapi/vpe/vpe_rpc.ba.go105
-rw-r--r--binapi/vpe_types/vpe_types.ba.go2
-rw-r--r--binapi/vrrp/vrrp.ba.go2
-rw-r--r--binapi/vrrp/vrrp_rpc.ba.go14
-rw-r--r--binapi/vxlan/vxlan.ba.go2
-rw-r--r--binapi/vxlan/vxlan_rpc.ba.go10
-rw-r--r--binapi/vxlan_gbp/vxlan_gbp.ba.go374
-rw-r--r--binapi/vxlan_gbp/vxlan_gbp_rpc.ba.go88
-rw-r--r--binapi/vxlan_gpe/vxlan_gpe.ba.go242
-rw-r--r--binapi/vxlan_gpe/vxlan_gpe_rpc.ba.go60
-rw-r--r--binapi/vxlan_gpe_ioam_export/vxlan_gpe_ioam_export.ba.go2
-rw-r--r--binapi/wireguard/wireguard.ba.go231
-rw-r--r--binapi/wireguard/wireguard_rpc.ba.go30
-rw-r--r--cmd/govpp/main.go5
-rw-r--r--cmd/vpp-proxy/main.go5
-rw-r--r--core/connection_test.go76
-rw-r--r--core/trace_test.go6
-rw-r--r--examples/api-trace/api-trace.go5
-rw-r--r--examples/perf-bench/perf-bench.go18
-rw-r--r--examples/stream-client/stream_client.go11
-rw-r--r--internal/testbinapi/binapi2001/abf/abf.ba.go43
-rw-r--r--internal/testbinapi/binapi2001/abf/abf_rpc.ba.go17
-rw-r--r--internal/testbinapi/binapi2001/acl/acl.ba.go2
-rw-r--r--internal/testbinapi/binapi2001/acl/acl_rpc.ba.go47
-rw-r--r--internal/testbinapi/binapi2001/acl_types/acl_types.ba.go8
-rw-r--r--internal/testbinapi/binapi2001/af_packet/af_packet.ba.go11
-rw-r--r--internal/testbinapi/binapi2001/af_packet/af_packet_rpc.ba.go15
-rw-r--r--internal/testbinapi/binapi2001/arp/arp.ba.go47
-rw-r--r--internal/testbinapi/binapi2001/arp/arp_rpc.ba.go17
-rw-r--r--internal/testbinapi/binapi2001/avf/avf.ba.go5
-rw-r--r--internal/testbinapi/binapi2001/avf/avf_rpc.ba.go7
-rw-r--r--internal/testbinapi/binapi2001/bfd/bfd.ba.go43
-rw-r--r--internal/testbinapi/binapi2001/bfd/bfd_rpc.ba.go37
-rw-r--r--internal/testbinapi/binapi2001/bier/bier.ba.go43
-rw-r--r--internal/testbinapi/binapi2001/bier/bier_rpc.ba.go37
-rw-r--r--internal/testbinapi/binapi2001/bond/bond.ba.go11
-rw-r--r--internal/testbinapi/binapi2001/bond/bond_rpc.ba.go23
-rw-r--r--internal/testbinapi/binapi2001/builtinurl/builtinurl.ba.go2
-rw-r--r--internal/testbinapi/binapi2001/builtinurl/builtinurl_rpc.ba.go5
-rw-r--r--internal/testbinapi/binapi2001/cdp/cdp.ba.go2
-rw-r--r--internal/testbinapi/binapi2001/cdp/cdp_rpc.ba.go5
-rw-r--r--internal/testbinapi/binapi2001/classify/classify.ba.go5
-rw-r--r--internal/testbinapi/binapi2001/classify/classify_rpc.ba.go39
-rw-r--r--internal/testbinapi/binapi2001/cop/cop.ba.go5
-rw-r--r--internal/testbinapi/binapi2001/cop/cop_rpc.ba.go7
-rw-r--r--internal/testbinapi/binapi2001/ct6/ct6.ba.go5
-rw-r--r--internal/testbinapi/binapi2001/ct6/ct6_rpc.ba.go5
-rw-r--r--internal/testbinapi/binapi2001/dhcp/dhcp.ba.go47
-rw-r--r--internal/testbinapi/binapi2001/dhcp/dhcp_rpc.ba.go33
-rw-r--r--internal/testbinapi/binapi2001/dhcp6_ia_na_client_cp/dhcp6_ia_na_client_cp.ba.go5
-rw-r--r--internal/testbinapi/binapi2001/dhcp6_ia_na_client_cp/dhcp6_ia_na_client_cp_rpc.ba.go5
-rw-r--r--internal/testbinapi/binapi2001/dhcp6_pd_client_cp/dhcp6_pd_client_cp.ba.go43
-rw-r--r--internal/testbinapi/binapi2001/dhcp6_pd_client_cp/dhcp6_pd_client_cp_rpc.ba.go7
-rw-r--r--internal/testbinapi/binapi2001/dns/dns.ba.go2
-rw-r--r--internal/testbinapi/binapi2001/dns/dns_rpc.ba.go11
-rw-r--r--internal/testbinapi/binapi2001/ethernet_types/ethernet_types.ba.go15
-rw-r--r--internal/testbinapi/binapi2001/feature/feature.ba.go5
-rw-r--r--internal/testbinapi/binapi2001/feature/feature_rpc.ba.go5
-rw-r--r--internal/testbinapi/binapi2001/fib_types/fib_types.ba.go49
-rw-r--r--internal/testbinapi/binapi2001/flowprobe/flowprobe.ba.go5
-rw-r--r--internal/testbinapi/binapi2001/flowprobe/flowprobe_rpc.ba.go7
-rw-r--r--internal/testbinapi/binapi2001/gbp/gbp.ba.go47
-rw-r--r--internal/testbinapi/binapi2001/gbp/gbp_rpc.ba.go69
-rw-r--r--internal/testbinapi/binapi2001/gen.go2
-rw-r--r--internal/testbinapi/binapi2001/geneve/geneve.ba.go47
-rw-r--r--internal/testbinapi/binapi2001/geneve/geneve_rpc.ba.go13
-rw-r--r--internal/testbinapi/binapi2001/gre/gre.ba.go43
-rw-r--r--internal/testbinapi/binapi2001/gre/gre_rpc.ba.go11
-rw-r--r--internal/testbinapi/binapi2001/gso/gso.ba.go5
-rw-r--r--internal/testbinapi/binapi2001/gso/gso_rpc.ba.go5
-rw-r--r--internal/testbinapi/binapi2001/gtpu/gtpu.ba.go43
-rw-r--r--internal/testbinapi/binapi2001/gtpu/gtpu_rpc.ba.go13
-rw-r--r--internal/testbinapi/binapi2001/http_static/http_static.ba.go2
-rw-r--r--internal/testbinapi/binapi2001/http_static/http_static_rpc.ba.go5
-rw-r--r--internal/testbinapi/binapi2001/igmp/igmp.ba.go43
-rw-r--r--internal/testbinapi/binapi2001/igmp/igmp_rpc.ba.go27
-rw-r--r--internal/testbinapi/binapi2001/ikev2/ikev2.ba.go43
-rw-r--r--internal/testbinapi/binapi2001/ikev2/ikev2_rpc.ba.go29
-rw-r--r--internal/testbinapi/binapi2001/interface/interface.ba.go47
-rw-r--r--internal/testbinapi/binapi2001/interface/interface_rpc.ba.go61
-rw-r--r--internal/testbinapi/binapi2001/interface_types/interface_types.ba.go11
-rw-r--r--internal/testbinapi/binapi2001/ioam_cache/ioam_cache.ba.go2
-rw-r--r--internal/testbinapi/binapi2001/ioam_cache/ioam_cache_rpc.ba.go5
-rw-r--r--internal/testbinapi/binapi2001/ioam_export/ioam_export.ba.go43
-rw-r--r--internal/testbinapi/binapi2001/ioam_export/ioam_export_rpc.ba.go5
-rw-r--r--internal/testbinapi/binapi2001/ioam_vxlan_gpe/ioam_vxlan_gpe.ba.go43
-rw-r--r--internal/testbinapi/binapi2001/ioam_vxlan_gpe/ioam_vxlan_gpe_rpc.ba.go15
-rw-r--r--internal/testbinapi/binapi2001/ip/ip.ba.go47
-rw-r--r--internal/testbinapi/binapi2001/ip/ip_rpc.ba.go85
-rw-r--r--internal/testbinapi/binapi2001/ip6_nd/ip6_nd.ba.go43
-rw-r--r--internal/testbinapi/binapi2001/ip6_nd/ip6_nd_rpc.ba.go19
-rw-r--r--internal/testbinapi/binapi2001/ip_neighbor/ip_neighbor.ba.go47
-rw-r--r--internal/testbinapi/binapi2001/ip_neighbor/ip_neighbor_rpc.ba.go15
-rw-r--r--internal/testbinapi/binapi2001/ip_types/ip_types.ba.go49
-rw-r--r--internal/testbinapi/binapi2001/ipfix_export/ipfix_export.ba.go43
-rw-r--r--internal/testbinapi/binapi2001/ipfix_export/ipfix_export_rpc.ba.go25
-rw-r--r--internal/testbinapi/binapi2001/ipip/ipip.ba.go43
-rw-r--r--internal/testbinapi/binapi2001/ipip/ipip_rpc.ba.go17
-rw-r--r--internal/testbinapi/binapi2001/ipip_types/ipip_types.ba.go11
-rw-r--r--internal/testbinapi/binapi2001/ipsec/ipsec.ba.go43
-rw-r--r--internal/testbinapi/binapi2001/ipsec/ipsec_rpc.ba.go47
-rw-r--r--internal/testbinapi/binapi2001/ipsec_types/ipsec_types.ba.go49
-rw-r--r--internal/testbinapi/binapi2001/l2/l2.ba.go47
-rw-r--r--internal/testbinapi/binapi2001/l2/l2_rpc.ba.go65
-rw-r--r--internal/testbinapi/binapi2001/l2e/l2e.ba.go5
-rw-r--r--internal/testbinapi/binapi2001/l2e/l2e_rpc.ba.go5
-rw-r--r--internal/testbinapi/binapi2001/l2tp/l2tp.ba.go47
-rw-r--r--internal/testbinapi/binapi2001/l2tp/l2tp_rpc.ba.go17
-rw-r--r--internal/testbinapi/binapi2001/l3xc/l3xc.ba.go43
-rw-r--r--internal/testbinapi/binapi2001/l3xc/l3xc_rpc.ba.go13
-rw-r--r--internal/testbinapi/binapi2001/lacp/lacp.ba.go11
-rw-r--r--internal/testbinapi/binapi2001/lacp/lacp_rpc.ba.go9
-rw-r--r--internal/testbinapi/binapi2001/lb/lb.ba.go43
-rw-r--r--internal/testbinapi/binapi2001/lb/lb_rpc.ba.go25
-rw-r--r--internal/testbinapi/binapi2001/lb_types/lb_types.ba.go49
-rw-r--r--internal/testbinapi/binapi2001/lisp/lisp.ba.go2
-rw-r--r--internal/testbinapi/binapi2001/lisp/lisp_rpc.ba.go79
-rw-r--r--internal/testbinapi/binapi2001/lisp_gpe/lisp_gpe.ba.go2
-rw-r--r--internal/testbinapi/binapi2001/lisp_gpe/lisp_gpe_rpc.ba.go27
-rw-r--r--internal/testbinapi/binapi2001/lldp/lldp.ba.go2
-rw-r--r--internal/testbinapi/binapi2001/lldp/lldp_rpc.ba.go7
-rw-r--r--internal/testbinapi/binapi2001/mactime/mactime.ba.go11
-rw-r--r--internal/testbinapi/binapi2001/mactime/mactime_rpc.ba.go13
-rw-r--r--internal/testbinapi/binapi2001/map/map.ba.go43
-rw-r--r--internal/testbinapi/binapi2001/map/map_rpc.ba.go39
-rw-r--r--internal/testbinapi/binapi2001/mdata/mdata.ba.go7
-rw-r--r--internal/testbinapi/binapi2001/mdata/mdata_rpc.ba.go5
-rw-r--r--internal/testbinapi/binapi2001/memclnt/memclnt.ba.go2
-rw-r--r--internal/testbinapi/binapi2001/memclnt/memclnt_rpc.ba.go29
-rw-r--r--internal/testbinapi/binapi2001/memif/memif.ba.go11
-rw-r--r--internal/testbinapi/binapi2001/memif/memif_rpc.ba.go19
-rw-r--r--internal/testbinapi/binapi2001/mfib_types/mfib_types.ba.go49
-rw-r--r--internal/testbinapi/binapi2001/mpls/mpls.ba.go43
-rw-r--r--internal/testbinapi/binapi2001/mpls/mpls_rpc.ba.go27
-rw-r--r--internal/testbinapi/binapi2001/nat/nat.ba.go43
-rw-r--r--internal/testbinapi/binapi2001/nat/nat_rpc.ba.go173
-rw-r--r--internal/testbinapi/binapi2001/netmap/netmap.ba.go2
-rw-r--r--internal/testbinapi/binapi2001/netmap/netmap_rpc.ba.go7
-rw-r--r--internal/testbinapi/binapi2001/nhrp/nhrp.ba.go43
-rw-r--r--internal/testbinapi/binapi2001/nhrp/nhrp_rpc.ba.go11
-rw-r--r--internal/testbinapi/binapi2001/nsh/nsh.ba.go5
-rw-r--r--internal/testbinapi/binapi2001/nsh/nsh_rpc.ba.go17
-rw-r--r--internal/testbinapi/binapi2001/nsim/nsim.ba.go5
-rw-r--r--internal/testbinapi/binapi2001/nsim/nsim_rpc.ba.go9
-rw-r--r--internal/testbinapi/binapi2001/oddbuf/oddbuf.ba.go7
-rw-r--r--internal/testbinapi/binapi2001/oddbuf/oddbuf_rpc.ba.go5
-rw-r--r--internal/testbinapi/binapi2001/one/one.ba.go2
-rw-r--r--internal/testbinapi/binapi2001/one/one_rpc.ba.go129
-rw-r--r--internal/testbinapi/binapi2001/p2p_ethernet/p2p_ethernet.ba.go11
-rw-r--r--internal/testbinapi/binapi2001/p2p_ethernet/p2p_ethernet_rpc.ba.go7
-rw-r--r--internal/testbinapi/binapi2001/pci_types/pci_types.ba.go8
-rw-r--r--internal/testbinapi/binapi2001/pg/pg.ba.go2
-rw-r--r--internal/testbinapi/binapi2001/pg/pg_rpc.ba.go9
-rw-r--r--internal/testbinapi/binapi2001/pipe/pipe.ba.go5
-rw-r--r--internal/testbinapi/binapi2001/pipe/pipe_rpc.ba.go13
-rw-r--r--internal/testbinapi/binapi2001/policer/policer.ba.go2
-rw-r--r--internal/testbinapi/binapi2001/policer/policer_rpc.ba.go11
-rw-r--r--internal/testbinapi/binapi2001/pot/pot.ba.go2
-rw-r--r--internal/testbinapi/binapi2001/pot/pot_rpc.ba.go15
-rw-r--r--internal/testbinapi/binapi2001/pppoe/pppoe.ba.go47
-rw-r--r--internal/testbinapi/binapi2001/pppoe/pppoe_rpc.ba.go11
-rw-r--r--internal/testbinapi/binapi2001/punt/punt.ba.go50
-rw-r--r--internal/testbinapi/binapi2001/punt/punt_rpc.ba.go19
-rw-r--r--internal/testbinapi/binapi2001/qos/qos.ba.go43
-rw-r--r--internal/testbinapi/binapi2001/qos/qos_rpc.ba.go31
-rw-r--r--internal/testbinapi/binapi2001/rd_cp/rd_cp.ba.go5
-rw-r--r--internal/testbinapi/binapi2001/rd_cp/rd_cp_rpc.ba.go5
-rw-r--r--internal/testbinapi/binapi2001/rdma/rdma.ba.go5
-rw-r--r--internal/testbinapi/binapi2001/rdma/rdma_rpc.ba.go7
-rw-r--r--internal/testbinapi/binapi2001/sctp/sctp.ba.go2
-rw-r--r--internal/testbinapi/binapi2001/sctp/sctp_rpc.ba.go9
-rw-r--r--internal/testbinapi/binapi2001/session/session.ba.go2
-rw-r--r--internal/testbinapi/binapi2001/session/session_rpc.ba.go51
-rw-r--r--internal/testbinapi/binapi2001/span/span.ba.go2
-rw-r--r--internal/testbinapi/binapi2001/span/span_rpc.ba.go11
-rw-r--r--internal/testbinapi/binapi2001/sr/sr.ba.go2
-rw-r--r--internal/testbinapi/binapi2001/sr/sr_rpc.ba.go31
-rw-r--r--internal/testbinapi/binapi2001/sr_mpls/sr_mpls.ba.go2
-rw-r--r--internal/testbinapi/binapi2001/sr_mpls/sr_mpls_rpc.ba.go13
-rw-r--r--internal/testbinapi/binapi2001/stn/stn.ba.go43
-rw-r--r--internal/testbinapi/binapi2001/stn/stn_rpc.ba.go11
-rw-r--r--internal/testbinapi/binapi2001/svs/svs.ba.go43
-rw-r--r--internal/testbinapi/binapi2001/svs/svs_rpc.ba.go15
-rw-r--r--internal/testbinapi/binapi2001/syslog/syslog.ba.go43
-rw-r--r--internal/testbinapi/binapi2001/syslog/syslog_rpc.ba.go11
-rw-r--r--internal/testbinapi/binapi2001/tapv2/tapv2.ba.go47
-rw-r--r--internal/testbinapi/binapi2001/tapv2/tapv2_rpc.ba.go13
-rw-r--r--internal/testbinapi/binapi2001/tcp/tcp.ba.go43
-rw-r--r--internal/testbinapi/binapi2001/tcp/tcp_rpc.ba.go5
-rw-r--r--internal/testbinapi/binapi2001/tls_openssl/tls_openssl.ba.go2
-rw-r--r--internal/testbinapi/binapi2001/tls_openssl/tls_openssl_rpc.ba.go5
-rw-r--r--internal/testbinapi/binapi2001/trace/trace.ba.go2
-rw-r--r--internal/testbinapi/binapi2001/trace/trace_rpc.ba.go9
-rw-r--r--internal/testbinapi/binapi2001/udp/udp.ba.go43
-rw-r--r--internal/testbinapi/binapi2001/udp/udp_rpc.ba.go13
-rw-r--r--internal/testbinapi/binapi2001/udp_ping/udp_ping.ba.go43
-rw-r--r--internal/testbinapi/binapi2001/udp_ping/udp_ping_rpc.ba.go7
-rw-r--r--internal/testbinapi/binapi2001/vhost_user/vhost_user.ba.go11
-rw-r--r--internal/testbinapi/binapi2001/vhost_user/vhost_user_rpc.ba.go15
-rw-r--r--internal/testbinapi/binapi2001/virtio/virtio.ba.go11
-rw-r--r--internal/testbinapi/binapi2001/virtio/virtio_rpc.ba.go13
-rw-r--r--internal/testbinapi/binapi2001/virtio_types/virtio_types.ba.go11
-rw-r--r--internal/testbinapi/binapi2001/vmxnet3/vmxnet3.ba.go11
-rw-r--r--internal/testbinapi/binapi2001/vmxnet3/vmxnet3_rpc.ba.go13
-rw-r--r--internal/testbinapi/binapi2001/vpe/vpe.ba.go37
-rw-r--r--internal/testbinapi/binapi2001/vpe/vpe_rpc.ba.go33
-rw-r--r--internal/testbinapi/binapi2001/vpe_types/vpe_types.ba.go43
-rw-r--r--internal/testbinapi/binapi2001/vxlan/vxlan.ba.go2
-rw-r--r--internal/testbinapi/binapi2001/vxlan/vxlan_rpc.ba.go15
-rw-r--r--internal/testbinapi/binapi2001/vxlan_gbp/vxlan_gbp.ba.go43
-rw-r--r--internal/testbinapi/binapi2001/vxlan_gbp/vxlan_gbp_rpc.ba.go13
-rw-r--r--internal/testbinapi/binapi2001/vxlan_gpe/vxlan_gpe.ba.go2
-rw-r--r--internal/testbinapi/binapi2001/vxlan_gpe/vxlan_gpe_rpc.ba.go13
-rw-r--r--internal/testbinapi/binapi2001/vxlan_gpe_ioam_export/vxlan_gpe_ioam_export.ba.go43
-rw-r--r--internal/testbinapi/binapi2001/vxlan_gpe_ioam_export/vxlan_gpe_ioam_export_rpc.ba.go5
405 files changed, 9130 insertions, 6518 deletions
diff --git a/Makefile b/Makefile
index 46e04ec..c2342a0 100644
--- a/Makefile
+++ b/Makefile
@@ -12,6 +12,8 @@ BUILD_USER ?= $(shell id -un)
GOVPP_PKG := git.fd.io/govpp.git
+VPP_API_DIR ?= ${VPP_DIR}/build-root/install-vpp-native/vpp/share/vpp/api
+
VERSION_PKG := $(GOVPP_PKG)/internal/version
LDFLAGS = \
-X $(VERSION_PKG).version=$(VERSION) \
@@ -47,62 +49,81 @@ BINAPI_DIR ?= ./binapi
# Binapi generator path
BINAPI_GENERATOR = ./bin/binapi-generator
+INTERNAL_BINAPI_DIR ?= ./internal/testbinapi/binapi2001
+
.DEFAULT_GOAL = help
+check-%:
+ @: $(if $(value $*),,$(error $* is undefined))
+
bin:
- mkdir -p bin
+ @mkdir -p bin
-build: ## Build all
- @echo "# building ${VERSION}"
- go build ${GO_BUILD_ARGS} ./...
+.PHONY: build
+build: cmd examples ## Build all
+.PHONY: cmd
cmd: bin ## Build commands
- go build ${GO_BUILD_ARGS} -o bin ./cmd/...
+ @go build ${GO_BUILD_ARGS} -o bin ./cmd/...
+.PHONY: binapi-generator
+binapi-generator: bin ## Build only the binapi generator
+ @go build ${GO_BUILD_ARGS} -o bin ./cmd/binapi-generator/
+
+.PHONY: examples
examples: bin ## Build examples
- go build ${GO_BUILD_ARGS} -o bin ./examples/...
+ @go build ${GO_BUILD_ARGS} -o bin ./examples/...
+.PHONY: test
test: ## Run unit tests
@echo "# running tests"
go test -tags="${GO_BUILD_TAGS}" ./...
+.PHONY: test-integration
test-integration: ## Run integration tests
@echo "# running integration tests"
go test -tags="integration ${GO_BUILD_TAGS}" ./test/integration
+.PHONY: lint
lint: ## Run code linter
@echo "# running linter"
@golint ./...
+.PHONY: install
install: install-generator install-proxy ## Install all
+.PHONY: install-generator
install-generator: ## Install binapi-generator
@echo "# installing binapi-generator ${VERSION}"
@go install ${GO_BUILD_ARGS} ./cmd/binapi-generator
+.PHONY: install-proxy
install-proxy: ## Install vpp-proxy
@echo "# installing vpp-proxy ${VERSION}"
- go install ${GO_BUILD_ARGS} ./cmd/vpp-proxy
+ @go install ${GO_BUILD_ARGS} ./cmd/vpp-proxy
+.PHONY: generate
generate: generate-binapi ## Generate all
+.PHONY: generate-binapi
generate-binapi: install-generator ## Generate binapi code
@echo "# generating binapi"
- go generate -x "$(BINAPI_DIR)"
-
-gen-binapi-from-code: cmd-binapi-generator
- $(eval VPP_API_DIR := ${VPP_DIR}/build-root/install-vpp-native/vpp/share/vpp/api/)
- @echo "Generating vpp API.json and go bindings"
- @echo "Vpp Directory ${VPP_DIR}"
- @echo "Vpp API files ${VPP_API_DIR}"
- @echo "Go bindings ${BINAPI_DIR}"
- @cd ${VPP_DIR} && make json-api-files
- @${BINAPI_GENERATOR} \
- --input-dir=${VPP_API_DIR} \
- --output-dir=${BINAPI_DIR} \
- --gen rpc,rest \
- --no-source-path-info
-
+ @go generate -x "$(BINAPI_DIR)"
+
+.PHONY: gen-binapi-internal
+gen-binapi-internal:
+ @go generate $(INTERNAL_BINAPI_DIR)
+
+.PHONY: gen-binapi-local
+gen-binapi-local: binapi-generator check-VPP_DIR ## Generate binapi code (using locally cloned VPP)
+ @make -C ${VPP_DIR} json-api-files
+ @find $(BINAPI_DIR)/*/*.ba.go -delete
+ @find $(BINAPI_DIR)/* -type d -delete
+ @./bin/binapi-generator -input-dir=$(VPP_API_DIR) -output-dir=$(BINAPI_DIR) -gen=rpc
+ @./bin/binapi-generator -input-dir=$(VPP_API_DIR) -input-file=$(VPP_API_DIR)/core/vpe.api.json -output-dir=$(BINAPI_DIR) -gen=http
+ @sed -i 's@$(VPP_API_DIR)@/usr/share/vpp/api@g' $(BINAPI_DIR)/*/*.ba.go
+
+.PHONY: gen-binapi-docker
gen-binapi-docker: install-generator ## Generate binapi code (using Docker)
@echo "# generating binapi in docker image ${VPP_IMG}"
$(eval cmds := $(shell go generate -n $(BINAPI_DIR) 2>&1 | tr "\n" ";"))
@@ -115,13 +136,8 @@ gen-binapi-docker: install-generator ## Generate binapi code (using Docker)
"${VPP_IMG}" \
sh -ec "cd $(BINAPI_DIR) && $(cmds)"
+.PHONY: help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
-.PHONY: help \
- build cmd examples clean \
- lint test integration \
- install install-generator install-proxy \
- generate generate-binapi gen-binapi-docker \
- extras
diff --git a/binapi/abf/abf.ba.go b/binapi/abf/abf.ba.go
index b3250f8..f879bf9 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/abf.api.json
// Package abf contains generated bindings for API file abf.api.
diff --git a/binapi/abf/abf_rpc.ba.go b/binapi/abf/abf_rpc.ba.go
index 4ab9e18..7af0d39 100644
--- a/binapi/abf/abf_rpc.ba.go
+++ b/binapi/abf/abf_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service abf.
@@ -46,7 +46,7 @@ func (c *serviceClient) AbfItfAttachDump(ctx context.Context, in *AbfItfAttachDu
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -69,7 +69,7 @@ func (c *serviceClient_AbfItfAttachDumpClient) Recv() (*AbfItfAttachDetails, err
switch m := msg.(type) {
case *AbfItfAttachDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -107,7 +107,7 @@ func (c *serviceClient) AbfPolicyDump(ctx context.Context, in *AbfPolicyDump) (R
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -130,7 +130,7 @@ func (c *serviceClient_AbfPolicyDumpClient) Recv() (*AbfPolicyDetails, error) {
switch m := msg.(type) {
case *AbfPolicyDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/acl/acl.ba.go b/binapi/acl/acl.ba.go
index ee448cb..60e03e7 100644
--- a/binapi/acl/acl.ba.go
+++ b/binapi/acl/acl.ba.go
@@ -1,13 +1,13 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
// binapi-generator: v0.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/acl.api.json
// Package acl contains generated bindings for API file acl.api.
//
// Contents:
-// 38 messages
+// 42 messages
//
package acl
@@ -28,8 +28,8 @@ const _ = api.GoVppAPIPackageIsVersion2
const (
APIFile = "acl"
- APIVersion = "2.0.0"
- VersionCrc = 0x4a805ebc
+ APIVersion = "2.0.1"
+ VersionCrc = 0x5133bba0
)
// ACLAddReplace defines message 'acl_add_replace'.
@@ -1000,6 +1000,140 @@ func (m *ACLPluginGetVersionReply) Unmarshal(b []byte) error {
return nil
}
+// ACLPluginUseHashLookupGet defines message 'acl_plugin_use_hash_lookup_get'.
+// InProgress: the message form may change in the future versions
+type ACLPluginUseHashLookupGet struct{}
+
+func (m *ACLPluginUseHashLookupGet) Reset() { *m = ACLPluginUseHashLookupGet{} }
+func (*ACLPluginUseHashLookupGet) GetMessageName() string { return "acl_plugin_use_hash_lookup_get" }
+func (*ACLPluginUseHashLookupGet) GetCrcString() string { return "51077d14" }
+func (*ACLPluginUseHashLookupGet) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *ACLPluginUseHashLookupGet) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ return size
+}
+func (m *ACLPluginUseHashLookupGet) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ return buf.Bytes(), nil
+}
+func (m *ACLPluginUseHashLookupGet) Unmarshal(b []byte) error {
+ return nil
+}
+
+// ACLPluginUseHashLookupGetReply defines message 'acl_plugin_use_hash_lookup_get_reply'.
+// InProgress: the message form may change in the future versions
+type ACLPluginUseHashLookupGetReply struct {
+ Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
+}
+
+func (m *ACLPluginUseHashLookupGetReply) Reset() { *m = ACLPluginUseHashLookupGetReply{} }
+func (*ACLPluginUseHashLookupGetReply) GetMessageName() string {
+ return "acl_plugin_use_hash_lookup_get_reply"
+}
+func (*ACLPluginUseHashLookupGetReply) GetCrcString() string { return "5392ad31" }
+func (*ACLPluginUseHashLookupGetReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *ACLPluginUseHashLookupGetReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 1 // m.Enable
+ return size
+}
+func (m *ACLPluginUseHashLookupGetReply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeBool(m.Enable)
+ return buf.Bytes(), nil
+}
+func (m *ACLPluginUseHashLookupGetReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Enable = buf.DecodeBool()
+ return nil
+}
+
+// ACLPluginUseHashLookupSet defines message 'acl_plugin_use_hash_lookup_set'.
+// InProgress: the message form may change in the future versions
+type ACLPluginUseHashLookupSet struct {
+ Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
+}
+
+func (m *ACLPluginUseHashLookupSet) Reset() { *m = ACLPluginUseHashLookupSet{} }
+func (*ACLPluginUseHashLookupSet) GetMessageName() string { return "acl_plugin_use_hash_lookup_set" }
+func (*ACLPluginUseHashLookupSet) GetCrcString() string { return "b3e225d2" }
+func (*ACLPluginUseHashLookupSet) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *ACLPluginUseHashLookupSet) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 1 // m.Enable
+ return size
+}
+func (m *ACLPluginUseHashLookupSet) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeBool(m.Enable)
+ return buf.Bytes(), nil
+}
+func (m *ACLPluginUseHashLookupSet) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Enable = buf.DecodeBool()
+ return nil
+}
+
+// ACLPluginUseHashLookupSetReply defines message 'acl_plugin_use_hash_lookup_set_reply'.
+// InProgress: the message form may change in the future versions
+type ACLPluginUseHashLookupSetReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+}
+
+func (m *ACLPluginUseHashLookupSetReply) Reset() { *m = ACLPluginUseHashLookupSetReply{} }
+func (*ACLPluginUseHashLookupSetReply) GetMessageName() string {
+ return "acl_plugin_use_hash_lookup_set_reply"
+}
+func (*ACLPluginUseHashLookupSetReply) GetCrcString() string { return "e8d4e804" }
+func (*ACLPluginUseHashLookupSetReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *ACLPluginUseHashLookupSetReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ return size
+}
+func (m *ACLPluginUseHashLookupSetReply) 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 *ACLPluginUseHashLookupSetReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ return nil
+}
+
// ACLStatsIntfCountersEnable defines message 'acl_stats_intf_counters_enable'.
type ACLStatsIntfCountersEnable struct {
Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
@@ -1723,6 +1857,10 @@ func file_acl_binapi_init() {
api.RegisterMessage((*ACLPluginGetConnTableMaxEntriesReply)(nil), "acl_plugin_get_conn_table_max_entries_reply_7a096d3d")
api.RegisterMessage((*ACLPluginGetVersion)(nil), "acl_plugin_get_version_51077d14")
api.RegisterMessage((*ACLPluginGetVersionReply)(nil), "acl_plugin_get_version_reply_9b32cf86")
+ api.RegisterMessage((*ACLPluginUseHashLookupGet)(nil), "acl_plugin_use_hash_lookup_get_51077d14")
+ api.RegisterMessage((*ACLPluginUseHashLookupGetReply)(nil), "acl_plugin_use_hash_lookup_get_reply_5392ad31")
+ api.RegisterMessage((*ACLPluginUseHashLookupSet)(nil), "acl_plugin_use_hash_lookup_set_b3e225d2")
+ api.RegisterMessage((*ACLPluginUseHashLookupSetReply)(nil), "acl_plugin_use_hash_lookup_set_reply_e8d4e804")
api.RegisterMessage((*ACLStatsIntfCountersEnable)(nil), "acl_stats_intf_counters_enable_b3e225d2")
api.RegisterMessage((*ACLStatsIntfCountersEnableReply)(nil), "acl_stats_intf_counters_enable_reply_e8d4e804")
api.RegisterMessage((*MacipACLAdd)(nil), "macip_acl_add_ce6fbad0")
@@ -1766,6 +1904,10 @@ func AllMessages() []api.Message {
(*ACLPluginGetConnTableMaxEntriesReply)(nil),
(*ACLPluginGetVersion)(nil),
(*ACLPluginGetVersionReply)(nil),
+ (*ACLPluginUseHashLookupGet)(nil),
+ (*ACLPluginUseHashLookupGetReply)(nil),
+ (*ACLPluginUseHashLookupSet)(nil),
+ (*ACLPluginUseHashLookupSetReply)(nil),
(*ACLStatsIntfCountersEnable)(nil),
(*ACLStatsIntfCountersEnableReply)(nil),
(*MacipACLAdd)(nil),
diff --git a/binapi/acl/acl_rpc.ba.go b/binapi/acl/acl_rpc.ba.go
index 62c33e1..e8c3425 100644
--- a/binapi/acl/acl_rpc.ba.go
+++ b/binapi/acl/acl_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service acl.
@@ -24,6 +24,8 @@ type RPCService interface {
ACLPluginControlPing(ctx context.Context, in *ACLPluginControlPing) (*ACLPluginControlPingReply, error)
ACLPluginGetConnTableMaxEntries(ctx context.Context, in *ACLPluginGetConnTableMaxEntries) (*ACLPluginGetConnTableMaxEntriesReply, error)
ACLPluginGetVersion(ctx context.Context, in *ACLPluginGetVersion) (*ACLPluginGetVersionReply, error)
+ ACLPluginUseHashLookupGet(ctx context.Context, in *ACLPluginUseHashLookupGet) (*ACLPluginUseHashLookupGetReply, error)
+ ACLPluginUseHashLookupSet(ctx context.Context, in *ACLPluginUseHashLookupSet) (*ACLPluginUseHashLookupSetReply, error)
ACLStatsIntfCountersEnable(ctx context.Context, in *ACLStatsIntfCountersEnable) (*ACLStatsIntfCountersEnableReply, error)
MacipACLAdd(ctx context.Context, in *MacipACLAdd) (*MacipACLAddReply, error)
MacipACLAddReplace(ctx context.Context, in *MacipACLAddReplace) (*MacipACLAddReplaceReply, error)
@@ -69,7 +71,7 @@ func (c *serviceClient) ACLDump(ctx context.Context, in *ACLDump) (RPCService_AC
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -92,7 +94,7 @@ func (c *serviceClient_ACLDumpClient) Recv() (*ACLDetails, error) {
switch m := msg.(type) {
case *ACLDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -121,7 +123,7 @@ func (c *serviceClient) ACLInterfaceEtypeWhitelistDump(ctx context.Context, in *
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -144,7 +146,7 @@ func (c *serviceClient_ACLInterfaceEtypeWhitelistDumpClient) Recv() (*ACLInterfa
switch m := msg.(type) {
case *ACLInterfaceEtypeWhitelistDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -164,7 +166,7 @@ func (c *serviceClient) ACLInterfaceListDump(ctx context.Context, in *ACLInterfa
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -187,7 +189,7 @@ func (c *serviceClient_ACLInterfaceListDumpClient) Recv() (*ACLInterfaceListDeta
switch m := msg.(type) {
case *ACLInterfaceListDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -243,6 +245,24 @@ func (c *serviceClient) ACLPluginGetVersion(ctx context.Context, in *ACLPluginGe
return out, nil
}
+func (c *serviceClient) ACLPluginUseHashLookupGet(ctx context.Context, in *ACLPluginUseHashLookupGet) (*ACLPluginUseHashLookupGetReply, error) {
+ out := new(ACLPluginUseHashLookupGetReply)
+ err := c.conn.Invoke(ctx, in, out)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *serviceClient) ACLPluginUseHashLookupSet(ctx context.Context, in *ACLPluginUseHashLookupSet) (*ACLPluginUseHashLookupSetReply, error) {
+ out := new(ACLPluginUseHashLookupSetReply)
+ err := c.conn.Invoke(ctx, in, out)
+ if err != nil {
+ return nil, err
+ }
+ return out, api.RetvalToVPPApiError(out.Retval)
+}
+
func (c *serviceClient) ACLStatsIntfCountersEnable(ctx context.Context, in *ACLStatsIntfCountersEnable) (*ACLStatsIntfCountersEnableReply, error) {
out := new(ACLStatsIntfCountersEnableReply)
err := c.conn.Invoke(ctx, in, out)
@@ -288,7 +308,7 @@ func (c *serviceClient) MacipACLDump(ctx context.Context, in *MacipACLDump) (RPC
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -311,7 +331,7 @@ func (c *serviceClient_MacipACLDumpClient) Recv() (*MacipACLDetails, error) {
switch m := msg.(type) {
case *MacipACLDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -349,7 +369,7 @@ func (c *serviceClient) MacipACLInterfaceListDump(ctx context.Context, in *Macip
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -372,7 +392,7 @@ func (c *serviceClient_MacipACLInterfaceListDumpClient) Recv() (*MacipACLInterfa
switch m := msg.(type) {
case *MacipACLInterfaceListDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/acl_types/acl_types.ba.go b/binapi/acl_types/acl_types.ba.go
index a47d803..7e33f51 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 8a7c205..4553d66 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 311a1c2..b2a4590 100644
--- a/binapi/af_packet/af_packet.ba.go
+++ b/binapi/af_packet/af_packet.ba.go
@@ -1,13 +1,13 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
// binapi-generator: v0.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/core/af_packet.api.json
// Package af_packet contains generated bindings for API file af_packet.api.
//
// Contents:
-// 8 messages
+// 10 messages
//
package af_packet
@@ -27,7 +27,7 @@ const _ = api.GoVppAPIPackageIsVersion2
const (
APIFile = "af_packet"
APIVersion = "2.0.0"
- VersionCrc = 0x4191e8ae
+ VersionCrc = 0x589bd50e
)
// AfPacketCreate defines message 'af_packet_create'.
@@ -108,6 +108,108 @@ func (m *AfPacketCreateReply) Unmarshal(b []byte) error {
return nil
}
+// AfPacketCreateV2 defines message 'af_packet_create_v2'.
+type AfPacketCreateV2 struct {
+ HwAddr ethernet_types.MacAddress `binapi:"mac_address,name=hw_addr" json:"hw_addr,omitempty"`
+ UseRandomHwAddr bool `binapi:"bool,name=use_random_hw_addr" json:"use_random_hw_addr,omitempty"`
+ HostIfName string `binapi:"string[64],name=host_if_name" json:"host_if_name,omitempty"`
+ RxFrameSize uint32 `binapi:"u32,name=rx_frame_size" json:"rx_frame_size,omitempty"`
+ TxFrameSize uint32 `binapi:"u32,name=tx_frame_size" json:"tx_frame_size,omitempty"`
+ RxFramesPerBlock uint32 `binapi:"u32,name=rx_frames_per_block" json:"rx_frames_per_block,omitempty"`
+ TxFramesPerBlock uint32 `binapi:"u32,name=tx_frames_per_block" json:"tx_frames_per_block,omitempty"`
+ Flags uint32 `binapi:"u32,name=flags" json:"flags,omitempty"`
+ NumRxQueues uint16 `binapi:"u16,name=num_rx_queues,default=1" json:"num_rx_queues,omitempty"`
+}
+
+func (m *AfPacketCreateV2) Reset() { *m = AfPacketCreateV2{} }
+func (*AfPacketCreateV2) GetMessageName() string { return "af_packet_create_v2" }
+func (*AfPacketCreateV2) GetCrcString() string { return "4aff0436" }
+func (*AfPacketCreateV2) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *AfPacketCreateV2) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 1 * 6 // m.HwAddr
+ size += 1 // m.UseRandomHwAddr
+ size += 64 // m.HostIfName
+ size += 4 // m.RxFrameSize
+ size += 4 // m.TxFrameSize
+ size += 4 // m.RxFramesPerBlock
+ size += 4 // m.TxFramesPerBlock
+ size += 4 // m.Flags
+ size += 2 // m.NumRxQueues
+ return size
+}
+func (m *AfPacketCreateV2) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeBytes(m.HwAddr[:], 6)
+ buf.EncodeBool(m.UseRandomHwAddr)
+ buf.EncodeString(m.HostIfName, 64)
+ buf.EncodeUint32(m.RxFrameSize)
+ buf.EncodeUint32(m.TxFrameSize)
+ buf.EncodeUint32(m.RxFramesPerBlock)
+ buf.EncodeUint32(m.TxFramesPerBlock)
+ buf.EncodeUint32(m.Flags)
+ buf.EncodeUint16(m.NumRxQueues)
+ return buf.Bytes(), nil
+}
+func (m *AfPacketCreateV2) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ copy(m.HwAddr[:], buf.DecodeBytes(6))
+ m.UseRandomHwAddr = buf.DecodeBool()
+ m.HostIfName = buf.DecodeString(64)
+ m.RxFrameSize = buf.DecodeUint32()
+ m.TxFrameSize = buf.DecodeUint32()
+ m.RxFramesPerBlock = buf.DecodeUint32()
+ m.TxFramesPerBlock = buf.DecodeUint32()
+ m.Flags = buf.DecodeUint32()
+ m.NumRxQueues = buf.DecodeUint16()
+ return nil
+}
+
+// AfPacketCreateV2Reply defines message 'af_packet_create_v2_reply'.
+type AfPacketCreateV2Reply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+}
+
+func (m *AfPacketCreateV2Reply) Reset() { *m = AfPacketCreateV2Reply{} }
+func (*AfPacketCreateV2Reply) GetMessageName() string { return "af_packet_create_v2_reply" }
+func (*AfPacketCreateV2Reply) GetCrcString() string { return "5383d31f" }
+func (*AfPacketCreateV2Reply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *AfPacketCreateV2Reply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ size += 4 // m.SwIfIndex
+ return size
+}
+func (m *AfPacketCreateV2Reply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint32(uint32(m.SwIfIndex))
+ return buf.Bytes(), nil
+}
+func (m *AfPacketCreateV2Reply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ return nil
+}
+
// AfPacketDelete defines message 'af_packet_delete'.
type AfPacketDelete struct {
HostIfName string `binapi:"string[64],name=host_if_name" json:"host_if_name,omitempty"`
@@ -314,6 +416,8 @@ func init() { file_af_packet_binapi_init() }
func file_af_packet_binapi_init() {
api.RegisterMessage((*AfPacketCreate)(nil), "af_packet_create_a190415f")
api.RegisterMessage((*AfPacketCreateReply)(nil), "af_packet_create_reply_5383d31f")
+ api.RegisterMessage((*AfPacketCreateV2)(nil), "af_packet_create_v2_4aff0436")
+ api.RegisterMessage((*AfPacketCreateV2Reply)(nil), "af_packet_create_v2_reply_5383d31f")
api.RegisterMessage((*AfPacketDelete)(nil), "af_packet_delete_863fa648")
api.RegisterMessage((*AfPacketDeleteReply)(nil), "af_packet_delete_reply_e8d4e804")
api.RegisterMessage((*AfPacketDetails)(nil), "af_packet_details_58c7c042")
@@ -327,6 +431,8 @@ func AllMessages() []api.Message {
return []api.Message{
(*AfPacketCreate)(nil),
(*AfPacketCreateReply)(nil),
+ (*AfPacketCreateV2)(nil),
+ (*AfPacketCreateV2Reply)(nil),
(*AfPacketDelete)(nil),
(*AfPacketDeleteReply)(nil),
(*AfPacketDetails)(nil),
diff --git a/binapi/af_packet/af_packet_rpc.ba.go b/binapi/af_packet/af_packet_rpc.ba.go
index 27e22fc..3facbca 100644
--- a/binapi/af_packet/af_packet_rpc.ba.go
+++ b/binapi/af_packet/af_packet_rpc.ba.go
@@ -8,12 +8,13 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service af_packet.
type RPCService interface {
AfPacketCreate(ctx context.Context, in *AfPacketCreate) (*AfPacketCreateReply, error)
+ AfPacketCreateV2(ctx context.Context, in *AfPacketCreateV2) (*AfPacketCreateV2Reply, error)
AfPacketDelete(ctx context.Context, in *AfPacketDelete) (*AfPacketDeleteReply, error)
AfPacketDump(ctx context.Context, in *AfPacketDump) (RPCService_AfPacketDumpClient, error)
AfPacketSetL4CksumOffload(ctx context.Context, in *AfPacketSetL4CksumOffload) (*AfPacketSetL4CksumOffloadReply, error)
@@ -36,6 +37,15 @@ func (c *serviceClient) AfPacketCreate(ctx context.Context, in *AfPacketCreate)
return out, api.RetvalToVPPApiError(out.Retval)
}
+func (c *serviceClient) AfPacketCreateV2(ctx context.Context, in *AfPacketCreateV2) (*AfPacketCreateV2Reply, error) {
+ out := new(AfPacketCreateV2Reply)
+ err := c.conn.Invoke(ctx, in, out)
+ if err != nil {
+ return nil, err
+ }
+ return out, api.RetvalToVPPApiError(out.Retval)
+}
+
func (c *serviceClient) AfPacketDelete(ctx context.Context, in *AfPacketDelete) (*AfPacketDeleteReply, error) {
out := new(AfPacketDeleteReply)
err := c.conn.Invoke(ctx, in, out)
@@ -54,7 +64,7 @@ func (c *serviceClient) AfPacketDump(ctx context.Context, in *AfPacketDump) (RPC
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -77,7 +87,7 @@ func (c *serviceClient_AfPacketDumpClient) Recv() (*AfPacketDetails, error) {
switch m := msg.(type) {
case *AfPacketDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/af_xdp/af_xdp.ba.go b/binapi/af_xdp/af_xdp.ba.go
index 3d13157..a4154c8 100644
--- a/binapi/af_xdp/af_xdp.ba.go
+++ b/binapi/af_xdp/af_xdp.ba.go
@@ -1,14 +1,14 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
// binapi-generator: v0.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/af_xdp.api.json
// Package af_xdp contains generated bindings for API file af_xdp.api.
//
// Contents:
// 2 enums
-// 4 messages
+// 6 messages
//
package af_xdp
@@ -28,8 +28,8 @@ const _ = api.GoVppAPIPackageIsVersion2
const (
APIFile = "af_xdp"
- APIVersion = "0.2.0"
- VersionCrc = 0x31450826
+ APIVersion = "1.0.0"
+ VersionCrc = 0x346626ce
)
// AfXdpMode defines enum 'af_xdp_mode'.
@@ -106,7 +106,6 @@ func (x AfXdpFlag) String() string {
}
// AfXdpCreate defines message 'af_xdp_create'.
-// InProgress: the message form may change in the future versions
type AfXdpCreate struct {
HostIf string `binapi:"string[64],name=host_if" json:"host_if,omitempty"`
Name string `binapi:"string[64],name=name" json:"name,omitempty"`
@@ -168,7 +167,6 @@ func (m *AfXdpCreate) Unmarshal(b []byte) error {
}
// AfXdpCreateReply defines message 'af_xdp_create_reply'.
-// InProgress: the message form may change in the future versions
type AfXdpCreateReply struct {
Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
@@ -205,8 +203,109 @@ func (m *AfXdpCreateReply) Unmarshal(b []byte) error {
return nil
}
+// AfXdpCreateV2 defines message 'af_xdp_create_v2'.
+type AfXdpCreateV2 struct {
+ HostIf string `binapi:"string[64],name=host_if" json:"host_if,omitempty"`
+ Name string `binapi:"string[64],name=name" json:"name,omitempty"`
+ RxqNum uint16 `binapi:"u16,name=rxq_num,default=1" json:"rxq_num,omitempty"`
+ RxqSize uint16 `binapi:"u16,name=rxq_size,default=0" json:"rxq_size,omitempty"`
+ TxqSize uint16 `binapi:"u16,name=txq_size,default=0" json:"txq_size,omitempty"`
+ Mode AfXdpMode `binapi:"af_xdp_mode,name=mode,default=0" json:"mode,omitempty"`
+ Flags AfXdpFlag `binapi:"af_xdp_flag,name=flags,default=0" json:"flags,omitempty"`
+ Prog string `binapi:"string[256],name=prog" json:"prog,omitempty"`
+ Namespace string `binapi:"string[64],name=namespace" json:"namespace,omitempty"`
+}
+
+func (m *AfXdpCreateV2) Reset() { *m = AfXdpCreateV2{} }
+func (*AfXdpCreateV2) GetMessageName() string { return "af_xdp_create_v2" }
+func (*AfXdpCreateV2) GetCrcString() string { return "e17ec2eb" }
+func (*AfXdpCreateV2) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *AfXdpCreateV2) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 64 // m.HostIf
+ size += 64 // m.Name
+ size += 2 // m.RxqNum
+ size += 2 // m.RxqSize
+ size += 2 // m.TxqSize
+ size += 4 // m.Mode
+ size += 1 // m.Flags
+ size += 256 // m.Prog
+ size += 64 // m.Namespace
+ return size
+}
+func (m *AfXdpCreateV2) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeString(m.HostIf, 64)
+ buf.EncodeString(m.Name, 64)
+ buf.EncodeUint16(m.RxqNum)
+ buf.EncodeUint16(m.RxqSize)
+ buf.EncodeUint16(m.TxqSize)
+ buf.EncodeUint32(uint32(m.Mode))
+ buf.EncodeUint8(uint8(m.Flags))
+ buf.EncodeString(m.Prog, 256)
+ buf.EncodeString(m.Namespace, 64)
+ return buf.Bytes(), nil
+}
+func (m *AfXdpCreateV2) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.HostIf = buf.DecodeString(64)
+ m.Name = buf.DecodeString(64)
+ m.RxqNum = buf.DecodeUint16()
+ m.RxqSize = buf.DecodeUint16()
+ m.TxqSize = buf.DecodeUint16()
+ m.Mode = AfXdpMode(buf.DecodeUint32())
+ m.Flags = AfXdpFlag(buf.DecodeUint8())
+ m.Prog = buf.DecodeString(256)
+ m.Namespace = buf.DecodeString(64)
+ return nil
+}
+
+// AfXdpCreateV2Reply defines message 'af_xdp_create_v2_reply'.
+type AfXdpCreateV2Reply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+}
+
+func (m *AfXdpCreateV2Reply) Reset() { *m = AfXdpCreateV2Reply{} }
+func (*AfXdpCreateV2Reply) GetMessageName() string { return "af_xdp_create_v2_reply" }
+func (*AfXdpCreateV2Reply) GetCrcString() string { return "5383d31f" }
+func (*AfXdpCreateV2Reply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *AfXdpCreateV2Reply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ size += 4 // m.SwIfIndex
+ return size
+}
+func (m *AfXdpCreateV2Reply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint32(uint32(m.SwIfIndex))
+ return buf.Bytes(), nil
+}
+func (m *AfXdpCreateV2Reply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ return nil
+}
+
// AfXdpDelete defines message 'af_xdp_delete'.
-// InProgress: the message form may change in the future versions
type AfXdpDelete struct {
SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
}
@@ -240,7 +339,6 @@ func (m *AfXdpDelete) Unmarshal(b []byte) error {
}
// AfXdpDeleteReply defines message 'af_xdp_delete_reply'.
-// InProgress: the message form may change in the future versions
type AfXdpDeleteReply struct {
Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
@@ -277,6 +375,8 @@ func init() { file_af_xdp_binapi_init() }
func file_af_xdp_binapi_init() {
api.RegisterMessage((*AfXdpCreate)(nil), "af_xdp_create_21226c99")
api.RegisterMessage((*AfXdpCreateReply)(nil), "af_xdp_create_reply_5383d31f")
+ api.RegisterMessage((*AfXdpCreateV2)(nil), "af_xdp_create_v2_e17ec2eb")
+ api.RegisterMessage((*AfXdpCreateV2Reply)(nil), "af_xdp_create_v2_reply_5383d31f")
api.RegisterMessage((*AfXdpDelete)(nil), "af_xdp_delete_f9e6675e")
api.RegisterMessage((*AfXdpDeleteReply)(nil), "af_xdp_delete_reply_e8d4e804")
}
@@ -286,6 +386,8 @@ func AllMessages() []api.Message {
return []api.Message{
(*AfXdpCreate)(nil),
(*AfXdpCreateReply)(nil),
+ (*AfXdpCreateV2)(nil),
+ (*AfXdpCreateV2Reply)(nil),
(*AfXdpDelete)(nil),
(*AfXdpDeleteReply)(nil),
}
diff --git a/binapi/af_xdp/af_xdp_rpc.ba.go b/binapi/af_xdp/af_xdp_rpc.ba.go
index 8a72f3e..db78488 100644
--- a/binapi/af_xdp/af_xdp_rpc.ba.go
+++ b/binapi/af_xdp/af_xdp_rpc.ba.go
@@ -11,6 +11,7 @@ import (
// RPCService defines RPC service af_xdp.
type RPCService interface {
AfXdpCreate(ctx context.Context, in *AfXdpCreate) (*AfXdpCreateReply, error)
+ AfXdpCreateV2(ctx context.Context, in *AfXdpCreateV2) (*AfXdpCreateV2Reply, error)
AfXdpDelete(ctx context.Context, in *AfXdpDelete) (*AfXdpDeleteReply, error)
}
@@ -31,6 +32,15 @@ func (c *serviceClient) AfXdpCreate(ctx context.Context, in *AfXdpCreate) (*AfXd
return out, api.RetvalToVPPApiError(out.Retval)
}
+func (c *serviceClient) AfXdpCreateV2(ctx context.Context, in *AfXdpCreateV2) (*AfXdpCreateV2Reply, error) {
+ out := new(AfXdpCreateV2Reply)
+ err := c.conn.Invoke(ctx, in, out)
+ if err != nil {
+ return nil, err
+ }
+ return out, api.RetvalToVPPApiError(out.Retval)
+}
+
func (c *serviceClient) AfXdpDelete(ctx context.Context, in *AfXdpDelete) (*AfXdpDeleteReply, error) {
out := new(AfXdpDeleteReply)
err := c.conn.Invoke(ctx, in, out)
diff --git a/binapi/arp/arp.ba.go b/binapi/arp/arp.ba.go
index 7cc96c7..cdf0bfa 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/core/arp.api.json
// Package arp contains generated bindings for API file arp.api.
diff --git a/binapi/arp/arp_rpc.ba.go b/binapi/arp/arp_rpc.ba.go
index d9f38f2..73bbc56 100644
--- a/binapi/arp/arp_rpc.ba.go
+++ b/binapi/arp/arp_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service arp.
@@ -45,7 +45,7 @@ func (c *serviceClient) ProxyArpDump(ctx context.Context, in *ProxyArpDump) (RPC
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -68,7 +68,7 @@ func (c *serviceClient_ProxyArpDumpClient) Recv() (*ProxyArpDetails, error) {
switch m := msg.(type) {
case *ProxyArpDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -88,7 +88,7 @@ func (c *serviceClient) ProxyArpIntfcDump(ctx context.Context, in *ProxyArpIntfc
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -111,7 +111,7 @@ func (c *serviceClient_ProxyArpIntfcDumpClient) Recv() (*ProxyArpIntfcDetails, e
switch m := msg.(type) {
case *ProxyArpIntfcDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/arping/arping.ba.go b/binapi/arping/arping.ba.go
index 8d7ce9f..23a1c65 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 9bc9b79..a984770 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 473caa1..1846328 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/core/bfd.api.json
// Package bfd contains generated bindings for API file bfd.api.
diff --git a/binapi/bfd/bfd_rpc.ba.go b/binapi/bfd/bfd_rpc.ba.go
index b3c2e86..b295bad 100644
--- a/binapi/bfd/bfd_rpc.ba.go
+++ b/binapi/bfd/bfd_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service bfd.
@@ -55,7 +55,7 @@ func (c *serviceClient) BfdAuthKeysDump(ctx context.Context, in *BfdAuthKeysDump
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -78,7 +78,7 @@ func (c *serviceClient_BfdAuthKeysDumpClient) Recv() (*BfdAuthKeysDetails, error
switch m := msg.(type) {
case *BfdAuthKeysDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -170,7 +170,7 @@ func (c *serviceClient) BfdUDPSessionDump(ctx context.Context, in *BfdUDPSession
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -193,7 +193,7 @@ func (c *serviceClient_BfdUDPSessionDumpClient) Recv() (*BfdUDPSessionDetails, e
switch m := msg.(type) {
case *BfdUDPSessionDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/bier/bier.ba.go b/binapi/bier/bier.ba.go
index be06253..bcbc3eb 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/core/bier.api.json
// Package bier contains generated bindings for API file bier.api.
diff --git a/binapi/bier/bier_rpc.ba.go b/binapi/bier/bier_rpc.ba.go
index 5766723..80457e4 100644
--- a/binapi/bier/bier_rpc.ba.go
+++ b/binapi/bier/bier_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service bier.
@@ -52,7 +52,7 @@ func (c *serviceClient) BierDispEntryDump(ctx context.Context, in *BierDispEntry
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -75,7 +75,7 @@ func (c *serviceClient_BierDispEntryDumpClient) Recv() (*BierDispEntryDetails, e
switch m := msg.(type) {
case *BierDispEntryDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -104,7 +104,7 @@ func (c *serviceClient) BierDispTableDump(ctx context.Context, in *BierDispTable
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -127,7 +127,7 @@ func (c *serviceClient_BierDispTableDumpClient) Recv() (*BierDispTableDetails, e
switch m := msg.(type) {
case *BierDispTableDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -165,7 +165,7 @@ func (c *serviceClient) BierImpDump(ctx context.Context, in *BierImpDump) (RPCSe
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -188,7 +188,7 @@ func (c *serviceClient_BierImpDumpClient) Recv() (*BierImpDetails, error) {
switch m := msg.(type) {
case *BierImpDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -217,7 +217,7 @@ func (c *serviceClient) BierRouteDump(ctx context.Context, in *BierRouteDump) (R
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -240,7 +240,7 @@ func (c *serviceClient_BierRouteDumpClient) Recv() (*BierRouteDetails, error) {
switch m := msg.(type) {
case *BierRouteDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -269,7 +269,7 @@ func (c *serviceClient) BierTableDump(ctx context.Context, in *BierTableDump) (R
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -292,7 +292,7 @@ func (c *serviceClient_BierTableDumpClient) Recv() (*BierTableDetails, error) {
switch m := msg.(type) {
case *BierTableDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/bond/bond.ba.go b/binapi/bond/bond.ba.go
index ff795af..9f24058 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/core/bond.api.json
// Package bond contains generated bindings for API file bond.api.
diff --git a/binapi/bond/bond_rpc.ba.go b/binapi/bond/bond_rpc.ba.go
index 55f0e5f..53ae796 100644
--- a/binapi/bond/bond_rpc.ba.go
+++ b/binapi/bond/bond_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service bond.
@@ -107,7 +107,7 @@ func (c *serviceClient) SwBondInterfaceDump(ctx context.Context, in *SwBondInter
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -130,7 +130,7 @@ func (c *serviceClient_SwBondInterfaceDumpClient) Recv() (*SwBondInterfaceDetail
switch m := msg.(type) {
case *SwBondInterfaceDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -150,7 +150,7 @@ func (c *serviceClient) SwInterfaceBondDump(ctx context.Context, in *SwInterface
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -173,7 +173,7 @@ func (c *serviceClient_SwInterfaceBondDumpClient) Recv() (*SwInterfaceBondDetail
switch m := msg.(type) {
case *SwInterfaceBondDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -202,7 +202,7 @@ func (c *serviceClient) SwInterfaceSlaveDump(ctx context.Context, in *SwInterfac
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -225,7 +225,7 @@ func (c *serviceClient_SwInterfaceSlaveDumpClient) Recv() (*SwInterfaceSlaveDeta
switch m := msg.(type) {
case *SwInterfaceSlaveDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -245,7 +245,7 @@ func (c *serviceClient) SwMemberInterfaceDump(ctx context.Context, in *SwMemberI
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -268,7 +268,7 @@ func (c *serviceClient_SwMemberInterfaceDumpClient) Recv() (*SwMemberInterfaceDe
switch m := msg.(type) {
case *SwMemberInterfaceDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/builtinurl/builtinurl.ba.go b/binapi/builtinurl/builtinurl.ba.go
index d3ad5f3..a0cc8c2 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/builtinurl.api.json
// Package builtinurl contains generated bindings for API file builtinurl.api.
diff --git a/binapi/cdp/cdp.ba.go b/binapi/cdp/cdp.ba.go
index 2204d7a..a7f831a 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 5022017..422a757 100644
--- a/binapi/classify/classify.ba.go
+++ b/binapi/classify/classify.ba.go
@@ -1,14 +1,14 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
// binapi-generator: v0.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/core/classify.api.json
// Package classify contains generated bindings for API file classify.api.
//
// Contents:
// 3 enums
-// 40 messages
+// 42 messages
//
package classify
@@ -29,7 +29,7 @@ const _ = api.GoVppAPIPackageIsVersion2
const (
APIFile = "classify"
APIVersion = "3.1.0"
- VersionCrc = 0x24ea656e
+ VersionCrc = 0x532123e1
)
// ClassifyAction defines enum 'classify_action'.
@@ -1827,6 +1827,80 @@ func (m *PolicerClassifySetInterfaceReply) Unmarshal(b []byte) error {
return nil
}
+// PuntACLAddDel defines message 'punt_acl_add_del'.
+type PuntACLAddDel struct {
+ IP4TableIndex uint32 `binapi:"u32,name=ip4_table_index,default=4294967295" json:"ip4_table_index,omitempty"`
+ IP6TableIndex uint32 `binapi:"u32,name=ip6_table_index,default=4294967295" json:"ip6_table_index,omitempty"`
+ IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
+}
+
+func (m *PuntACLAddDel) Reset() { *m = PuntACLAddDel{} }
+func (*PuntACLAddDel) GetMessageName() string { return "punt_acl_add_del" }
+func (*PuntACLAddDel) GetCrcString() string { return "a93bf3a0" }
+func (*PuntACLAddDel) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *PuntACLAddDel) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.IP4TableIndex
+ size += 4 // m.IP6TableIndex
+ size += 1 // m.IsAdd
+ return size
+}
+func (m *PuntACLAddDel) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.IP4TableIndex)
+ buf.EncodeUint32(m.IP6TableIndex)
+ buf.EncodeBool(m.IsAdd)
+ return buf.Bytes(), nil
+}
+func (m *PuntACLAddDel) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.IP4TableIndex = buf.DecodeUint32()
+ m.IP6TableIndex = buf.DecodeUint32()
+ m.IsAdd = buf.DecodeBool()
+ return nil
+}
+
+// PuntACLAddDelReply defines message 'punt_acl_add_del_reply'.
+type PuntACLAddDelReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+}
+
+func (m *PuntACLAddDelReply) Reset() { *m = PuntACLAddDelReply{} }
+func (*PuntACLAddDelReply) GetMessageName() string { return "punt_acl_add_del_reply" }
+func (*PuntACLAddDelReply) GetCrcString() string { return "e8d4e804" }
+func (*PuntACLAddDelReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *PuntACLAddDelReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ return size
+}
+func (m *PuntACLAddDelReply) 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 *PuntACLAddDelReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ return nil
+}
+
func init() { file_classify_binapi_init() }
func file_classify_binapi_init() {
api.RegisterMessage((*ClassifyAddDelSession)(nil), "classify_add_del_session_f20879f0")
@@ -1869,6 +1943,8 @@ func file_classify_binapi_init() {
api.RegisterMessage((*PolicerClassifyDump)(nil), "policer_classify_dump_6bfe6603")
api.RegisterMessage((*PolicerClassifySetInterface)(nil), "policer_classify_set_interface_de7ad708")
api.RegisterMessage((*PolicerClassifySetInterfaceReply)(nil), "policer_classify_set_interface_reply_e8d4e804")
+ api.RegisterMessage((*PuntACLAddDel)(nil), "punt_acl_add_del_a93bf3a0")
+ api.RegisterMessage((*PuntACLAddDelReply)(nil), "punt_acl_add_del_reply_e8d4e804")
}
// Messages returns list of all messages in this module.
@@ -1914,5 +1990,7 @@ func AllMessages() []api.Message {
(*PolicerClassifyDump)(nil),
(*PolicerClassifySetInterface)(nil),
(*PolicerClassifySetInterfaceReply)(nil),
+ (*PuntACLAddDel)(nil),
+ (*PuntACLAddDelReply)(nil),
}
}
diff --git a/binapi/classify/classify_rpc.ba.go b/binapi/classify/classify_rpc.ba.go
index 92034df..0645bc5 100644
--- a/binapi/classify/classify_rpc.ba.go
+++ b/binapi/classify/classify_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service classify.
@@ -33,6 +33,7 @@ type RPCService interface {
OutputACLSetInterface(ctx context.Context, in *OutputACLSetInterface) (*OutputACLSetInterfaceReply, error)
PolicerClassifyDump(ctx context.Context, in *PolicerClassifyDump) (RPCService_PolicerClassifyDumpClient, error)
PolicerClassifySetInterface(ctx context.Context, in *PolicerClassifySetInterface) (*PolicerClassifySetInterfaceReply, error)
+ PuntACLAddDel(ctx context.Context, in *PuntACLAddDel) (*PuntACLAddDelReply, error)
}
type serviceClient struct {
@@ -97,7 +98,7 @@ func (c *serviceClient) ClassifySessionDump(ctx context.Context, in *ClassifySes
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -120,7 +121,7 @@ func (c *serviceClient_ClassifySessionDumpClient) Recv() (*ClassifySessionDetail
switch m := msg.(type) {
case *ClassifySessionDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -212,7 +213,7 @@ func (c *serviceClient) FlowClassifyDump(ctx context.Context, in *FlowClassifyDu
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -235,7 +236,7 @@ func (c *serviceClient_FlowClassifyDumpClient) Recv() (*FlowClassifyDetails, err
switch m := msg.(type) {
case *FlowClassifyDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -282,7 +283,7 @@ func (c *serviceClient) PolicerClassifyDump(ctx context.Context, in *PolicerClas
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -305,7 +306,7 @@ func (c *serviceClient_PolicerClassifyDumpClient) Recv() (*PolicerClassifyDetail
switch m := msg.(type) {
case *PolicerClassifyDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -324,3 +325,12 @@ func (c *serviceClient) PolicerClassifySetInterface(ctx context.Context, in *Pol
}
return out, api.RetvalToVPPApiError(out.Retval)
}
+
+func (c *serviceClient) PuntACLAddDel(ctx context.Context, in *PuntACLAddDel) (*PuntACLAddDelReply, error) {
+ out := new(PuntACLAddDelReply)
+ err := c.conn.Invoke(ctx, in, out)
+ if err != nil {
+ return nil, err
+ }
+ return out, api.RetvalToVPPApiError(out.Retval)
+}
diff --git a/binapi/cnat/cnat.ba.go b/binapi/cnat/cnat.ba.go
index bea0541..a45cee3 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/cnat.api.json
// Package cnat contains generated bindings for API file cnat.api.
diff --git a/binapi/cnat/cnat_rpc.ba.go b/binapi/cnat/cnat_rpc.ba.go
index f239261..551d3fa 100644
--- a/binapi/cnat/cnat_rpc.ba.go
+++ b/binapi/cnat/cnat_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service cnat.
@@ -51,7 +51,7 @@ func (c *serviceClient) CnatSessionDump(ctx context.Context, in *CnatSessionDump
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -74,7 +74,7 @@ func (c *serviceClient_CnatSessionDumpClient) Recv() (*CnatSessionDetails, error
switch m := msg.(type) {
case *CnatSessionDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -148,7 +148,7 @@ func (c *serviceClient) CnatTranslationDump(ctx context.Context, in *CnatTransla
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -171,7 +171,7 @@ func (c *serviceClient_CnatTranslationDumpClient) Recv() (*CnatTranslationDetail
switch m := msg.(type) {
case *CnatTranslationDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/crypto/crypto.ba.go b/binapi/crypto/crypto.ba.go
index 280916f..673fcbe 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 521443b..28dbe8e 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 d35c343..633a7ea 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 e1f826b..207dd4c 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/det44.api.json
// Package det44 contains generated bindings for API file det44.api.
diff --git a/binapi/det44/det44_rpc.ba.go b/binapi/det44/det44_rpc.ba.go
index e943932..89f6bd6 100644
--- a/binapi/det44/det44_rpc.ba.go
+++ b/binapi/det44/det44_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service det44.
@@ -105,7 +105,7 @@ func (c *serviceClient) Det44InterfaceDump(ctx context.Context, in *Det44Interfa
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -128,7 +128,7 @@ func (c *serviceClient_Det44InterfaceDumpClient) Recv() (*Det44InterfaceDetails,
switch m := msg.(type) {
case *Det44InterfaceDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -148,7 +148,7 @@ func (c *serviceClient) Det44MapDump(ctx context.Context, in *Det44MapDump) (RPC
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -171,7 +171,7 @@ func (c *serviceClient_Det44MapDumpClient) Recv() (*Det44MapDetails, error) {
switch m := msg.(type) {
case *Det44MapDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -209,7 +209,7 @@ func (c *serviceClient) Det44SessionDump(ctx context.Context, in *Det44SessionDu
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -232,7 +232,7 @@ func (c *serviceClient_Det44SessionDumpClient) Recv() (*Det44SessionDetails, err
switch m := msg.(type) {
case *Det44SessionDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -297,7 +297,7 @@ func (c *serviceClient) NatDetMapDump(ctx context.Context, in *NatDetMapDump) (R
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -320,7 +320,7 @@ func (c *serviceClient_NatDetMapDumpClient) Recv() (*NatDetMapDetails, error) {
switch m := msg.(type) {
case *NatDetMapDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -349,7 +349,7 @@ func (c *serviceClient) NatDetSessionDump(ctx context.Context, in *NatDetSession
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -372,7 +372,7 @@ func (c *serviceClient_NatDetSessionDumpClient) Recv() (*NatDetSessionDetails, e
switch m := msg.(type) {
case *NatDetSessionDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/dhcp/dhcp.ba.go b/binapi/dhcp/dhcp.ba.go
index b1f6ecc..30d88f6 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/dhcp.api.json
// Package dhcp contains generated bindings for API file dhcp.api.
diff --git a/binapi/dhcp/dhcp_rpc.ba.go b/binapi/dhcp/dhcp_rpc.ba.go
index f4df371..5a21bd3 100644
--- a/binapi/dhcp/dhcp_rpc.ba.go
+++ b/binapi/dhcp/dhcp_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service dhcp.
@@ -90,7 +90,7 @@ func (c *serviceClient) DHCPClientDump(ctx context.Context, in *DHCPClientDump)
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -113,7 +113,7 @@ func (c *serviceClient_DHCPClientDumpClient) Recv() (*DHCPClientDetails, error)
switch m := msg.(type) {
case *DHCPClientDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -160,7 +160,7 @@ func (c *serviceClient) DHCPProxyDump(ctx context.Context, in *DHCPProxyDump) (R
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -183,7 +183,7 @@ func (c *serviceClient_DHCPProxyDumpClient) Recv() (*DHCPProxyDetails, error) {
switch m := msg.(type) {
case *DHCPProxyDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
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 eb98bfd..b3f6522 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 1f842f3..21cda68 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 c50291d..f192857 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 d83e6f3..872459d 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/dslite.api.json
// Package dslite contains generated bindings for API file dslite.api.
diff --git a/binapi/dslite/dslite_rpc.ba.go b/binapi/dslite/dslite_rpc.ba.go
index 6bec82d..18faadc 100644
--- a/binapi/dslite/dslite_rpc.ba.go
+++ b/binapi/dslite/dslite_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service dslite.
@@ -47,7 +47,7 @@ func (c *serviceClient) DsliteAddressDump(ctx context.Context, in *DsliteAddress
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -70,7 +70,7 @@ func (c *serviceClient_DsliteAddressDumpClient) Recv() (*DsliteAddressDetails, e
switch m := msg.(type) {
case *DsliteAddressDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/ethernet_types/ethernet_types.ba.go b/binapi/ethernet_types/ethernet_types.ba.go
index 5730c14..09bb85c 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 65a9d9d..b7f6a34 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 486bd14..34446de 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/core/fib.api.json
// Package fib contains generated bindings for API file fib.api.
diff --git a/binapi/fib/fib_rpc.ba.go b/binapi/fib/fib_rpc.ba.go
index a2bd407..afe810b 100644
--- a/binapi/fib/fib_rpc.ba.go
+++ b/binapi/fib/fib_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service fib.
@@ -43,7 +43,7 @@ func (c *serviceClient) FibSourceDump(ctx context.Context, in *FibSourceDump) (R
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -66,7 +66,7 @@ func (c *serviceClient_FibSourceDumpClient) Recv() (*FibSourceDetails, error) {
switch m := msg.(type) {
case *FibSourceDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/fib_types/fib_types.ba.go b/binapi/fib_types/fib_types.ba.go
index d889400..ec39bf6 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 630efa8..aa03fe8 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 d38037b..949ac13 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 56d94af..a055f89 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/flowprobe.api.json
// Package flowprobe contains generated bindings for API file flowprobe.api.
diff --git a/binapi/gbp/gbp.ba.go b/binapi/gbp/gbp.ba.go
deleted file mode 100644
index 7071d33..0000000
--- a/binapi/gbp/gbp.ba.go
+++ /dev/null
@@ -1,2568 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 21.06-release
-// source: /usr/share/vpp/api/plugins/gbp.api.json
-
-// Package gbp contains generated bindings for API file gbp.api.
-//
-// Contents:
-// 1 alias
-// 7 enums
-// 14 structs
-// 48 messages
-//
-package gbp
-
-import (
- "strconv"
-
- api "git.fd.io/govpp.git/api"
- ethernet_types "git.fd.io/govpp.git/binapi/ethernet_types"
- interface_types "git.fd.io/govpp.git/binapi/interface_types"
- ip_types "git.fd.io/govpp.git/binapi/ip_types"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the GoVPP api package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// GoVPP api package needs to be updated.
-const _ = api.GoVppAPIPackageIsVersion2
-
-const (
- APIFile = "gbp"
- APIVersion = "2.0.0"
- VersionCrc = 0x5b2d93
-)
-
-// GbpBridgeDomainFlags defines enum 'gbp_bridge_domain_flags'.
-type GbpBridgeDomainFlags uint32
-
-const (
- GBP_BD_API_FLAG_NONE GbpBridgeDomainFlags = 0
- GBP_BD_API_FLAG_DO_NOT_LEARN GbpBridgeDomainFlags = 1
- GBP_BD_API_FLAG_UU_FWD_DROP GbpBridgeDomainFlags = 2
- GBP_BD_API_FLAG_MCAST_DROP GbpBridgeDomainFlags = 4
- GBP_BD_API_FLAG_UCAST_ARP GbpBridgeDomainFlags = 8
-)
-
-var (
- GbpBridgeDomainFlags_name = map[uint32]string{
- 0: "GBP_BD_API_FLAG_NONE",
- 1: "GBP_BD_API_FLAG_DO_NOT_LEARN",
- 2: "GBP_BD_API_FLAG_UU_FWD_DROP",
- 4: "GBP_BD_API_FLAG_MCAST_DROP",
- 8: "GBP_BD_API_FLAG_UCAST_ARP",
- }
- GbpBridgeDomainFlags_value = map[string]uint32{
- "GBP_BD_API_FLAG_NONE": 0,
- "GBP_BD_API_FLAG_DO_NOT_LEARN": 1,
- "GBP_BD_API_FLAG_UU_FWD_DROP": 2,
- "GBP_BD_API_FLAG_MCAST_DROP": 4,
- "GBP_BD_API_FLAG_UCAST_ARP": 8,
- }
-)
-
-func (x GbpBridgeDomainFlags) String() string {
- s, ok := GbpBridgeDomainFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := GbpBridgeDomainFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "GbpBridgeDomainFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// GbpEndpointFlags defines enum 'gbp_endpoint_flags'.
-type GbpEndpointFlags uint32
-
-const (
- GBP_API_ENDPOINT_FLAG_NONE GbpEndpointFlags = 0
- GBP_API_ENDPOINT_FLAG_BOUNCE GbpEndpointFlags = 1
- GBP_API_ENDPOINT_FLAG_REMOTE GbpEndpointFlags = 2
- GBP_API_ENDPOINT_FLAG_LEARNT GbpEndpointFlags = 4
- GBP_API_ENDPOINT_FLAG_EXTERNAL GbpEndpointFlags = 8
-)
-
-var (
- GbpEndpointFlags_name = map[uint32]string{
- 0: "GBP_API_ENDPOINT_FLAG_NONE",
- 1: "GBP_API_ENDPOINT_FLAG_BOUNCE",
- 2: "GBP_API_ENDPOINT_FLAG_REMOTE",
- 4: "GBP_API_ENDPOINT_FLAG_LEARNT",
- 8: "GBP_API_ENDPOINT_FLAG_EXTERNAL",
- }
- GbpEndpointFlags_value = map[string]uint32{
- "GBP_API_ENDPOINT_FLAG_NONE": 0,
- "GBP_API_ENDPOINT_FLAG_BOUNCE": 1,
- "GBP_API_ENDPOINT_FLAG_REMOTE": 2,
- "GBP_API_ENDPOINT_FLAG_LEARNT": 4,
- "GBP_API_ENDPOINT_FLAG_EXTERNAL": 8,
- }
-)
-
-func (x GbpEndpointFlags) String() string {
- s, ok := GbpEndpointFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := GbpEndpointFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "GbpEndpointFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// GbpExtItfFlags defines enum 'gbp_ext_itf_flags'.
-type GbpExtItfFlags uint32
-
-const (
- GBP_API_EXT_ITF_F_NONE GbpExtItfFlags = 0
- GBP_API_EXT_ITF_F_ANON GbpExtItfFlags = 1
-)
-
-var (
- GbpExtItfFlags_name = map[uint32]string{
- 0: "GBP_API_EXT_ITF_F_NONE",
- 1: "GBP_API_EXT_ITF_F_ANON",
- }
- GbpExtItfFlags_value = map[string]uint32{
- "GBP_API_EXT_ITF_F_NONE": 0,
- "GBP_API_EXT_ITF_F_ANON": 1,
- }
-)
-
-func (x GbpExtItfFlags) String() string {
- s, ok := GbpExtItfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := GbpExtItfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "GbpExtItfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// GbpHashMode defines enum 'gbp_hash_mode'.
-type GbpHashMode uint32
-
-const (
- GBP_API_HASH_MODE_SRC_IP GbpHashMode = 1
- GBP_API_HASH_MODE_DST_IP GbpHashMode = 2
- GBP_API_HASH_MODE_SYMMETRIC GbpHashMode = 3
-)
-
-var (
- GbpHashMode_name = map[uint32]string{
- 1: "GBP_API_HASH_MODE_SRC_IP",
- 2: "GBP_API_HASH_MODE_DST_IP",
- 3: "GBP_API_HASH_MODE_SYMMETRIC",
- }
- GbpHashMode_value = map[string]uint32{
- "GBP_API_HASH_MODE_SRC_IP": 1,
- "GBP_API_HASH_MODE_DST_IP": 2,
- "GBP_API_HASH_MODE_SYMMETRIC": 3,
- }
-)
-
-func (x GbpHashMode) String() string {
- s, ok := GbpHashMode_name[uint32(x)]
- if ok {
- return s
- }
- return "GbpHashMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// GbpRuleAction defines enum 'gbp_rule_action'.
-type GbpRuleAction uint32
-
-const (
- GBP_API_RULE_PERMIT GbpRuleAction = 1
- GBP_API_RULE_DENY GbpRuleAction = 2
- GBP_API_RULE_REDIRECT GbpRuleAction = 3
-)
-
-var (
- GbpRuleAction_name = map[uint32]string{
- 1: "GBP_API_RULE_PERMIT",
- 2: "GBP_API_RULE_DENY",
- 3: "GBP_API_RULE_REDIRECT",
- }
- GbpRuleAction_value = map[string]uint32{
- "GBP_API_RULE_PERMIT": 1,
- "GBP_API_RULE_DENY": 2,
- "GBP_API_RULE_REDIRECT": 3,
- }
-)
-
-func (x GbpRuleAction) String() string {
- s, ok := GbpRuleAction_name[uint32(x)]
- if ok {
- return s
- }
- return "GbpRuleAction(" + strconv.Itoa(int(x)) + ")"
-}
-
-// GbpSubnetType defines enum 'gbp_subnet_type'.
-type GbpSubnetType uint32
-
-const (
- GBP_API_SUBNET_TRANSPORT GbpSubnetType = 1
- GBP_API_SUBNET_STITCHED_INTERNAL GbpSubnetType = 2
- GBP_API_SUBNET_STITCHED_EXTERNAL GbpSubnetType = 3
- GBP_API_SUBNET_L3_OUT GbpSubnetType = 4
- GBP_API_SUBNET_ANON_L3_OUT GbpSubnetType = 5
-)
-
-var (
- GbpSubnetType_name = map[uint32]string{
- 1: "GBP_API_SUBNET_TRANSPORT",
- 2: "GBP_API_SUBNET_STITCHED_INTERNAL",
- 3: "GBP_API_SUBNET_STITCHED_EXTERNAL",
- 4: "GBP_API_SUBNET_L3_OUT",
- 5: "GBP_API_SUBNET_ANON_L3_OUT",
- }
- GbpSubnetType_value = map[string]uint32{
- "GBP_API_SUBNET_TRANSPORT": 1,
- "GBP_API_SUBNET_STITCHED_INTERNAL": 2,
- "GBP_API_SUBNET_STITCHED_EXTERNAL": 3,
- "GBP_API_SUBNET_L3_OUT": 4,
- "GBP_API_SUBNET_ANON_L3_OUT": 5,
- }
-)
-
-func (x GbpSubnetType) String() string {
- s, ok := GbpSubnetType_name[uint32(x)]
- if ok {
- return s
- }
- return "GbpSubnetType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// GbpVxlanTunnelMode defines enum 'gbp_vxlan_tunnel_mode'.
-type GbpVxlanTunnelMode uint32
-
-const (
- GBP_VXLAN_TUNNEL_MODE_L2 GbpVxlanTunnelMode = 1
- GBP_VXLAN_TUNNEL_MODE_L3 GbpVxlanTunnelMode = 2
-)
-
-var (
- GbpVxlanTunnelMode_name = map[uint32]string{
- 1: "GBP_VXLAN_TUNNEL_MODE_L2",
- 2: "GBP_VXLAN_TUNNEL_MODE_L3",
- }
- GbpVxlanTunnelMode_value = map[string]uint32{
- "GBP_VXLAN_TUNNEL_MODE_L2": 1,
- "GBP_VXLAN_TUNNEL_MODE_L3": 2,
- }
-)
-
-func (x GbpVxlanTunnelMode) String() string {
- s, ok := GbpVxlanTunnelMode_name[uint32(x)]
- if ok {
- return s
- }
- return "GbpVxlanTunnelMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// GbpScope defines alias 'gbp_scope'.
-type GbpScope uint16
-
-// GbpBridgeDomain defines type 'gbp_bridge_domain'.
-type GbpBridgeDomain struct {
- BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
- RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"`
- Flags GbpBridgeDomainFlags `binapi:"gbp_bridge_domain_flags,name=flags" json:"flags,omitempty"`
- BviSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=bvi_sw_if_index" json:"bvi_sw_if_index,omitempty"`
- UuFwdSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=uu_fwd_sw_if_index" json:"uu_fwd_sw_if_index,omitempty"`
- BmFloodSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=bm_flood_sw_if_index" json:"bm_flood_sw_if_index,omitempty"`
-}
-
-// GbpContract defines type 'gbp_contract'.
-type GbpContract struct {
- Scope GbpScope `binapi:"gbp_scope,name=scope" json:"scope,omitempty"`
- Sclass uint16 `binapi:"u16,name=sclass" json:"sclass,omitempty"`
- Dclass uint16 `binapi:"u16,name=dclass" json:"dclass,omitempty"`
- ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
- NEtherTypes uint8 `binapi:"u8,name=n_ether_types" json:"n_ether_types,omitempty"`
- AllowedEthertypes []uint16 `binapi:"u16[16],name=allowed_ethertypes" json:"allowed_ethertypes,omitempty"`
- NRules uint8 `binapi:"u8,name=n_rules" json:"-"`
- Rules []GbpRule `binapi:"gbp_rule[n_rules],name=rules" json:"rules,omitempty"`
-}
-
-// GbpEndpoint defines type 'gbp_endpoint'.
-type GbpEndpoint struct {
- SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Sclass uint16 `binapi:"u16,name=sclass" json:"sclass,omitempty"`
- Flags GbpEndpointFlags `binapi:"gbp_endpoint_flags,name=flags" json:"flags,omitempty"`
- Mac ethernet_types.MacAddress `binapi:"mac_address,name=mac" json:"mac,omitempty"`
- Tun GbpEndpointTun `binapi:"gbp_endpoint_tun,name=tun" json:"tun,omitempty"`
- NIps uint8 `binapi:"u8,name=n_ips" json:"-"`
- Ips []ip_types.Address `binapi:"address[n_ips],name=ips" json:"ips,omitempty"`
-}
-
-// GbpEndpointGroup defines type 'gbp_endpoint_group'.
-type GbpEndpointGroup struct {
- Vnid uint32 `binapi:"u32,name=vnid" json:"vnid,omitempty"`
- Sclass uint16 `binapi:"u16,name=sclass" json:"sclass,omitempty"`
- BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
- RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"`
- UplinkSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=uplink_sw_if_index" json:"uplink_sw_if_index,omitempty"`
- Retention GbpEndpointRetention `binapi:"gbp_endpoint_retention,name=retention" json:"retention,omitempty"`
-}
-
-// GbpEndpointRetention defines type 'gbp_endpoint_retention'.
-type GbpEndpointRetention struct {
- RemoteEpTimeout uint32 `binapi:"u32,name=remote_ep_timeout" json:"remote_ep_timeout,omitempty"`
-}
-
-// GbpEndpointTun defines type 'gbp_endpoint_tun'.
-type GbpEndpointTun struct {
- Src ip_types.Address `binapi:"address,name=src" json:"src,omitempty"`
- Dst ip_types.Address `binapi:"address,name=dst" json:"dst,omitempty"`
-}
-
-// GbpExtItf defines type 'gbp_ext_itf'.
-type GbpExtItf struct {
- SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
- RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"`
- Flags GbpExtItfFlags `binapi:"gbp_ext_itf_flags,name=flags" json:"flags,omitempty"`
-}
-
-// GbpNextHop defines type 'gbp_next_hop'.
-type GbpNextHop struct {
- IP ip_types.Address `binapi:"address,name=ip" json:"ip,omitempty"`
- Mac ethernet_types.MacAddress `binapi:"mac_address,name=mac" json:"mac,omitempty"`
- BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
- RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"`
-}
-
-// GbpNextHopSet defines type 'gbp_next_hop_set'.
-type GbpNextHopSet struct {
- HashMode GbpHashMode `binapi:"gbp_hash_mode,name=hash_mode" json:"hash_mode,omitempty"`
- NNhs uint8 `binapi:"u8,name=n_nhs" json:"n_nhs,omitempty"`
- Nhs [8]GbpNextHop `binapi:"gbp_next_hop[8],name=nhs" json:"nhs,omitempty"`
-}
-
-// GbpRecirc defines type 'gbp_recirc'.
-type GbpRecirc struct {
- SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Sclass uint16 `binapi:"u16,name=sclass" json:"sclass,omitempty"`
- IsExt bool `binapi:"bool,name=is_ext" json:"is_ext,omitempty"`
-}
-
-// GbpRouteDomain defines type 'gbp_route_domain'.
-type GbpRouteDomain struct {
- RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"`
- IP4TableID uint32 `binapi:"u32,name=ip4_table_id" json:"ip4_table_id,omitempty"`
- IP6TableID uint32 `binapi:"u32,name=ip6_table_id" json:"ip6_table_id,omitempty"`
- IP4UuSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=ip4_uu_sw_if_index" json:"ip4_uu_sw_if_index,omitempty"`
- IP6UuSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=ip6_uu_sw_if_index" json:"ip6_uu_sw_if_index,omitempty"`
- Scope GbpScope `binapi:"gbp_scope,name=scope" json:"scope,omitempty"`
-}
-
-// GbpRule defines type 'gbp_rule'.
-type GbpRule struct {
- Action GbpRuleAction `binapi:"gbp_rule_action,name=action" json:"action,omitempty"`
- NhSet GbpNextHopSet `binapi:"gbp_next_hop_set,name=nh_set" json:"nh_set,omitempty"`
-}
-
-// GbpSubnet defines type 'gbp_subnet'.
-type GbpSubnet struct {
- RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"`
- SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
- Sclass uint16 `binapi:"u16,name=sclass,default=4294967295" json:"sclass,omitempty"`
- Type GbpSubnetType `binapi:"gbp_subnet_type,name=type" json:"type,omitempty"`
- Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
-}
-
-// GbpVxlanTunnel defines type 'gbp_vxlan_tunnel'.
-type GbpVxlanTunnel struct {
- Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
- Mode GbpVxlanTunnelMode `binapi:"gbp_vxlan_tunnel_mode,name=mode" json:"mode,omitempty"`
- BdRdID uint32 `binapi:"u32,name=bd_rd_id" json:"bd_rd_id,omitempty"`
- Src ip_types.IP4Address `binapi:"ip4_address,name=src" json:"src,omitempty"`
-}
-
-// GbpBridgeDomainAdd defines message 'gbp_bridge_domain_add'.
-// InProgress: the message form may change in the future versions
-type GbpBridgeDomainAdd struct {
- Bd GbpBridgeDomain `binapi:"gbp_bridge_domain,name=bd" json:"bd,omitempty"`
-}
-
-func (m *GbpBridgeDomainAdd) Reset() { *m = GbpBridgeDomainAdd{} }
-func (*GbpBridgeDomainAdd) GetMessageName() string { return "gbp_bridge_domain_add" }
-func (*GbpBridgeDomainAdd) GetCrcString() string { return "918e8c01" }
-func (*GbpBridgeDomainAdd) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpBridgeDomainAdd) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Bd.BdID
- size += 4 // m.Bd.RdID
- size += 4 // m.Bd.Flags
- size += 4 // m.Bd.BviSwIfIndex
- size += 4 // m.Bd.UuFwdSwIfIndex
- size += 4 // m.Bd.BmFloodSwIfIndex
- return size
-}
-func (m *GbpBridgeDomainAdd) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Bd.BdID)
- buf.EncodeUint32(m.Bd.RdID)
- buf.EncodeUint32(uint32(m.Bd.Flags))
- buf.EncodeUint32(uint32(m.Bd.BviSwIfIndex))
- buf.EncodeUint32(uint32(m.Bd.UuFwdSwIfIndex))
- buf.EncodeUint32(uint32(m.Bd.BmFloodSwIfIndex))
- return buf.Bytes(), nil
-}
-func (m *GbpBridgeDomainAdd) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Bd.BdID = buf.DecodeUint32()
- m.Bd.RdID = buf.DecodeUint32()
- m.Bd.Flags = GbpBridgeDomainFlags(buf.DecodeUint32())
- m.Bd.BviSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
- m.Bd.UuFwdSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
- m.Bd.BmFloodSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// GbpBridgeDomainAddReply defines message 'gbp_bridge_domain_add_reply'.
-// InProgress: the message form may change in the future versions
-type GbpBridgeDomainAddReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *GbpBridgeDomainAddReply) Reset() { *m = GbpBridgeDomainAddReply{} }
-func (*GbpBridgeDomainAddReply) GetMessageName() string { return "gbp_bridge_domain_add_reply" }
-func (*GbpBridgeDomainAddReply) GetCrcString() string { return "e8d4e804" }
-func (*GbpBridgeDomainAddReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpBridgeDomainAddReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *GbpBridgeDomainAddReply) 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 *GbpBridgeDomainAddReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// GbpBridgeDomainDel defines message 'gbp_bridge_domain_del'.
-// InProgress: the message form may change in the future versions
-type GbpBridgeDomainDel struct {
- BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
-}
-
-func (m *GbpBridgeDomainDel) Reset() { *m = GbpBridgeDomainDel{} }
-func (*GbpBridgeDomainDel) GetMessageName() string { return "gbp_bridge_domain_del" }
-func (*GbpBridgeDomainDel) GetCrcString() string { return "c25fdce6" }
-func (*GbpBridgeDomainDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpBridgeDomainDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.BdID
- return size
-}
-func (m *GbpBridgeDomainDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.BdID)
- return buf.Bytes(), nil
-}
-func (m *GbpBridgeDomainDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.BdID = buf.DecodeUint32()
- return nil
-}
-
-// GbpBridgeDomainDelReply defines message 'gbp_bridge_domain_del_reply'.
-// InProgress: the message form may change in the future versions
-type GbpBridgeDomainDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *GbpBridgeDomainDelReply) Reset() { *m = GbpBridgeDomainDelReply{} }
-func (*GbpBridgeDomainDelReply) GetMessageName() string { return "gbp_bridge_domain_del_reply" }
-func (*GbpBridgeDomainDelReply) GetCrcString() string { return "e8d4e804" }
-func (*GbpBridgeDomainDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpBridgeDomainDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *GbpBridgeDomainDelReply) 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 *GbpBridgeDomainDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// GbpBridgeDomainDetails defines message 'gbp_bridge_domain_details'.
-// InProgress: the message form may change in the future versions
-type GbpBridgeDomainDetails struct {
- Bd GbpBridgeDomain `binapi:"gbp_bridge_domain,name=bd" json:"bd,omitempty"`
-}
-
-func (m *GbpBridgeDomainDetails) Reset() { *m = GbpBridgeDomainDetails{} }
-func (*GbpBridgeDomainDetails) GetMessageName() string { return "gbp_bridge_domain_details" }
-func (*GbpBridgeDomainDetails) GetCrcString() string { return "51d51be9" }
-func (*GbpBridgeDomainDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpBridgeDomainDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Bd.BdID
- size += 4 // m.Bd.RdID
- size += 4 // m.Bd.Flags
- size += 4 // m.Bd.BviSwIfIndex
- size += 4 // m.Bd.UuFwdSwIfIndex
- size += 4 // m.Bd.BmFloodSwIfIndex
- return size
-}
-func (m *GbpBridgeDomainDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Bd.BdID)
- buf.EncodeUint32(m.Bd.RdID)
- buf.EncodeUint32(uint32(m.Bd.Flags))
- buf.EncodeUint32(uint32(m.Bd.BviSwIfIndex))
- buf.EncodeUint32(uint32(m.Bd.UuFwdSwIfIndex))
- buf.EncodeUint32(uint32(m.Bd.BmFloodSwIfIndex))
- return buf.Bytes(), nil
-}
-func (m *GbpBridgeDomainDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Bd.BdID = buf.DecodeUint32()
- m.Bd.RdID = buf.DecodeUint32()
- m.Bd.Flags = GbpBridgeDomainFlags(buf.DecodeUint32())
- m.Bd.BviSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
- m.Bd.UuFwdSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
- m.Bd.BmFloodSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// GbpBridgeDomainDump defines message 'gbp_bridge_domain_dump'.
-// InProgress: the message form may change in the future versions
-type GbpBridgeDomainDump struct{}
-
-func (m *GbpBridgeDomainDump) Reset() { *m = GbpBridgeDomainDump{} }
-func (*GbpBridgeDomainDump) GetMessageName() string { return "gbp_bridge_domain_dump" }
-func (*GbpBridgeDomainDump) GetCrcString() string { return "51077d14" }
-func (*GbpBridgeDomainDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpBridgeDomainDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *GbpBridgeDomainDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *GbpBridgeDomainDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// GbpBridgeDomainDumpReply defines message 'gbp_bridge_domain_dump_reply'.
-// InProgress: the message form may change in the future versions
-type GbpBridgeDomainDumpReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *GbpBridgeDomainDumpReply) Reset() { *m = GbpBridgeDomainDumpReply{} }
-func (*GbpBridgeDomainDumpReply) GetMessageName() string { return "gbp_bridge_domain_dump_reply" }
-func (*GbpBridgeDomainDumpReply) GetCrcString() string { return "e8d4e804" }
-func (*GbpBridgeDomainDumpReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpBridgeDomainDumpReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *GbpBridgeDomainDumpReply) 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 *GbpBridgeDomainDumpReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// GbpContractAddDel defines message 'gbp_contract_add_del'.
-// InProgress: the message form may change in the future versions
-type GbpContractAddDel struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- Contract GbpContract `binapi:"gbp_contract,name=contract" json:"contract,omitempty"`
-}
-
-func (m *GbpContractAddDel) Reset() { *m = GbpContractAddDel{} }
-func (*GbpContractAddDel) GetMessageName() string { return "gbp_contract_add_del" }
-func (*GbpContractAddDel) GetCrcString() string { return "aa8d652d" }
-func (*GbpContractAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpContractAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 2 // m.Contract.Scope
- size += 2 // m.Contract.Sclass
- size += 2 // m.Contract.Dclass
- size += 4 // m.Contract.ACLIndex
- size += 1 // m.Contract.NEtherTypes
- size += 2 * 16 // m.Contract.AllowedEthertypes
- size += 1 // m.Contract.NRules
- for j2 := 0; j2 < len(m.Contract.Rules); j2++ {
- var s2 GbpRule
- _ = s2
- if j2 < len(m.Contract.Rules) {
- s2 = m.Contract.Rules[j2]
- }
- size += 4 // s2.Action
- size += 4 // s2.NhSet.HashMode
- size += 1 // s2.NhSet.NNhs
- for j4 := 0; j4 < 8; j4++ {
- size += 1 // s2.NhSet.Nhs[j4].IP.Af
- size += 1 * 16 // s2.NhSet.Nhs[j4].IP.Un
- size += 1 * 6 // s2.NhSet.Nhs[j4].Mac
- size += 4 // s2.NhSet.Nhs[j4].BdID
- size += 4 // s2.NhSet.Nhs[j4].RdID
- }
- }
- return size
-}
-func (m *GbpContractAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeUint16(uint16(m.Contract.Scope))
- buf.EncodeUint16(m.Contract.Sclass)
- buf.EncodeUint16(m.Contract.Dclass)
- buf.EncodeUint32(m.Contract.ACLIndex)
- buf.EncodeUint8(m.Contract.NEtherTypes)
- for i := 0; i < 16; i++ {
- var x uint16
- if i < len(m.Contract.AllowedEthertypes) {
- x = uint16(m.Contract.AllowedEthertypes[i])
- }
- buf.EncodeUint16(x)
- }
- buf.EncodeUint8(uint8(len(m.Contract.Rules)))
- for j1 := 0; j1 < len(m.Contract.Rules); j1++ {
- var v1 GbpRule // Rules
- if j1 < len(m.Contract.Rules) {
- v1 = m.Contract.Rules[j1]
- }
- buf.EncodeUint32(uint32(v1.Action))
- buf.EncodeUint32(uint32(v1.NhSet.HashMode))
- buf.EncodeUint8(v1.NhSet.NNhs)
- for j3 := 0; j3 < 8; j3++ {
- buf.EncodeUint8(uint8(v1.NhSet.Nhs[j3].IP.Af))
- buf.EncodeBytes(v1.NhSet.Nhs[j3].IP.Un.XXX_UnionData[:], 16)
- buf.EncodeBytes(v1.NhSet.Nhs[j3].Mac[:], 6)
- buf.EncodeUint32(v1.NhSet.Nhs[j3].BdID)
- buf.EncodeUint32(v1.NhSet.Nhs[j3].RdID)
- }
- }
- return buf.Bytes(), nil
-}
-func (m *GbpContractAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.Contract.Scope = GbpScope(buf.DecodeUint16())
- m.Contract.Sclass = buf.DecodeUint16()
- m.Contract.Dclass = buf.DecodeUint16()
- m.Contract.ACLIndex = buf.DecodeUint32()
- m.Contract.NEtherTypes = buf.DecodeUint8()
- m.Contract.AllowedEthertypes = make([]uint16, 16)
- for i := 0; i < len(m.Contract.AllowedEthertypes); i++ {
- m.Contract.AllowedEthertypes[i] = buf.DecodeUint16()
- }
- m.Contract.NRules = buf.DecodeUint8()
- m.Contract.Rules = make([]GbpRule, m.Contract.NRules)
- for j1 := 0; j1 < len(m.Contract.Rules); j1++ {
- m.Contract.Rules[j1].Action = GbpRuleAction(buf.DecodeUint32())
- m.Contract.Rules[j1].NhSet.HashMode = GbpHashMode(buf.DecodeUint32())
- m.Contract.Rules[j1].NhSet.NNhs = buf.DecodeUint8()
- for j3 := 0; j3 < 8; j3++ {
- m.Contract.Rules[j1].NhSet.Nhs[j3].IP.Af = ip_types.AddressFamily(buf.DecodeUint8())
- copy(m.Contract.Rules[j1].NhSet.Nhs[j3].IP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- copy(m.Contract.Rules[j1].NhSet.Nhs[j3].Mac[:], buf.DecodeBytes(6))
- m.Contract.Rules[j1].NhSet.Nhs[j3].BdID = buf.DecodeUint32()
- m.Contract.Rules[j1].NhSet.Nhs[j3].RdID = buf.DecodeUint32()
- }
- }
- return nil
-}
-
-// GbpContractAddDelReply defines message 'gbp_contract_add_del_reply'.
-// InProgress: the message form may change in the future versions
-type GbpContractAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
-}
-
-func (m *GbpContractAddDelReply) Reset() { *m = GbpContractAddDelReply{} }
-func (*GbpContractAddDelReply) GetMessageName() string { return "gbp_contract_add_del_reply" }
-func (*GbpContractAddDelReply) GetCrcString() string { return "1992deab" }
-func (*GbpContractAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpContractAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.StatsIndex
- return size
-}
-func (m *GbpContractAddDelReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.StatsIndex)
- return buf.Bytes(), nil
-}
-func (m *GbpContractAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.StatsIndex = buf.DecodeUint32()
- return nil
-}
-
-// GbpContractDetails defines message 'gbp_contract_details'.
-// InProgress: the message form may change in the future versions
-type GbpContractDetails struct {
- Contract GbpContract `binapi:"gbp_contract,name=contract" json:"contract,omitempty"`
-}
-
-func (m *GbpContractDetails) Reset() { *m = GbpContractDetails{} }
-func (*GbpContractDetails) GetMessageName() string { return "gbp_contract_details" }
-func (*GbpContractDetails) GetCrcString() string { return "65dec325" }
-func (*GbpContractDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpContractDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 2 // m.Contract.Scope
- size += 2 // m.Contract.Sclass
- size += 2 // m.Contract.Dclass
- size += 4 // m.Contract.ACLIndex
- size += 1 // m.Contract.NEtherTypes
- size += 2 * 16 // m.Contract.AllowedEthertypes
- size += 1 // m.Contract.NRules
- for j2 := 0; j2 < len(m.Contract.Rules); j2++ {
- var s2 GbpRule
- _ = s2
- if j2 < len(m.Contract.Rules) {
- s2 = m.Contract.Rules[j2]
- }
- size += 4 // s2.Action
- size += 4 // s2.NhSet.HashMode
- size += 1 // s2.NhSet.NNhs
- for j4 := 0; j4 < 8; j4++ {
- size += 1 // s2.NhSet.Nhs[j4].IP.Af
- size += 1 * 16 // s2.NhSet.Nhs[j4].IP.Un
- size += 1 * 6 // s2.NhSet.Nhs[j4].Mac
- size += 4 // s2.NhSet.Nhs[j4].BdID
- size += 4 // s2.NhSet.Nhs[j4].RdID
- }
- }
- return size
-}
-func (m *GbpContractDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint16(uint16(m.Contract.Scope))
- buf.EncodeUint16(m.Contract.Sclass)
- buf.EncodeUint16(m.Contract.Dclass)
- buf.EncodeUint32(m.Contract.ACLIndex)
- buf.EncodeUint8(m.Contract.NEtherTypes)
- for i := 0; i < 16; i++ {
- var x uint16
- if i < len(m.Contract.AllowedEthertypes) {
- x = uint16(m.Contract.AllowedEthertypes[i])
- }
- buf.EncodeUint16(x)
- }
- buf.EncodeUint8(uint8(len(m.Contract.Rules)))
- for j1 := 0; j1 < len(m.Contract.Rules); j1++ {
- var v1 GbpRule // Rules
- if j1 < len(m.Contract.Rules) {
- v1 = m.Contract.Rules[j1]
- }
- buf.EncodeUint32(uint32(v1.Action))
- buf.EncodeUint32(uint32(v1.NhSet.HashMode))
- buf.EncodeUint8(v1.NhSet.NNhs)
- for j3 := 0; j3 < 8; j3++ {
- buf.EncodeUint8(uint8(v1.NhSet.Nhs[j3].IP.Af))
- buf.EncodeBytes(v1.NhSet.Nhs[j3].IP.Un.XXX_UnionData[:], 16)
- buf.EncodeBytes(v1.NhSet.Nhs[j3].Mac[:], 6)
- buf.EncodeUint32(v1.NhSet.Nhs[j3].BdID)
- buf.EncodeUint32(v1.NhSet.Nhs[j3].RdID)
- }
- }
- return buf.Bytes(), nil
-}
-func (m *GbpContractDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Contract.Scope = GbpScope(buf.DecodeUint16())
- m.Contract.Sclass = buf.DecodeUint16()
- m.Contract.Dclass = buf.DecodeUint16()
- m.Contract.ACLIndex = buf.DecodeUint32()
- m.Contract.NEtherTypes = buf.DecodeUint8()
- m.Contract.AllowedEthertypes = make([]uint16, 16)
- for i := 0; i < len(m.Contract.AllowedEthertypes); i++ {
- m.Contract.AllowedEthertypes[i] = buf.DecodeUint16()
- }
- m.Contract.NRules = buf.DecodeUint8()
- m.Contract.Rules = make([]GbpRule, m.Contract.NRules)
- for j1 := 0; j1 < len(m.Contract.Rules); j1++ {
- m.Contract.Rules[j1].Action = GbpRuleAction(buf.DecodeUint32())
- m.Contract.Rules[j1].NhSet.HashMode = GbpHashMode(buf.DecodeUint32())
- m.Contract.Rules[j1].NhSet.NNhs = buf.DecodeUint8()
- for j3 := 0; j3 < 8; j3++ {
- m.Contract.Rules[j1].NhSet.Nhs[j3].IP.Af = ip_types.AddressFamily(buf.DecodeUint8())
- copy(m.Contract.Rules[j1].NhSet.Nhs[j3].IP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- copy(m.Contract.Rules[j1].NhSet.Nhs[j3].Mac[:], buf.DecodeBytes(6))
- m.Contract.Rules[j1].NhSet.Nhs[j3].BdID = buf.DecodeUint32()
- m.Contract.Rules[j1].NhSet.Nhs[j3].RdID = buf.DecodeUint32()
- }
- }
- return nil
-}
-
-// GbpContractDump defines message 'gbp_contract_dump'.
-// InProgress: the message form may change in the future versions
-type GbpContractDump struct{}
-
-func (m *GbpContractDump) Reset() { *m = GbpContractDump{} }
-func (*GbpContractDump) GetMessageName() string { return "gbp_contract_dump" }
-func (*GbpContractDump) GetCrcString() string { return "51077d14" }
-func (*GbpContractDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpContractDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *GbpContractDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *GbpContractDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// GbpEndpointAdd defines message 'gbp_endpoint_add'.
-// InProgress: the message form may change in the future versions
-type GbpEndpointAdd struct {
- Endpoint GbpEndpoint `binapi:"gbp_endpoint,name=endpoint" json:"endpoint,omitempty"`
-}
-
-func (m *GbpEndpointAdd) Reset() { *m = GbpEndpointAdd{} }
-func (*GbpEndpointAdd) GetMessageName() string { return "gbp_endpoint_add" }
-func (*GbpEndpointAdd) GetCrcString() string { return "7b3af7de" }
-func (*GbpEndpointAdd) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpEndpointAdd) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Endpoint.SwIfIndex
- size += 2 // m.Endpoint.Sclass
- size += 4 // m.Endpoint.Flags
- size += 1 * 6 // m.Endpoint.Mac
- size += 1 // m.Endpoint.Tun.Src.Af
- size += 1 * 16 // m.Endpoint.Tun.Src.Un
- size += 1 // m.Endpoint.Tun.Dst.Af
- size += 1 * 16 // m.Endpoint.Tun.Dst.Un
- size += 1 // m.Endpoint.NIps
- for j2 := 0; j2 < len(m.Endpoint.Ips); j2++ {
- var s2 ip_types.Address
- _ = s2
- if j2 < len(m.Endpoint.Ips) {
- s2 = m.Endpoint.Ips[j2]
- }
- size += 1 // s2.Af
- size += 1 * 16 // s2.Un
- }
- return size
-}
-func (m *GbpEndpointAdd) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.Endpoint.SwIfIndex))
- buf.EncodeUint16(m.Endpoint.Sclass)
- buf.EncodeUint32(uint32(m.Endpoint.Flags))
- buf.EncodeBytes(m.Endpoint.Mac[:], 6)
- buf.EncodeUint8(uint8(m.Endpoint.Tun.Src.Af))
- buf.EncodeBytes(m.Endpoint.Tun.Src.Un.XXX_UnionData[:], 16)
- buf.EncodeUint8(uint8(m.Endpoint.Tun.Dst.Af))
- buf.EncodeBytes(m.Endpoint.Tun.Dst.Un.XXX_UnionData[:], 16)
- buf.EncodeUint8(uint8(len(m.Endpoint.Ips)))
- for j1 := 0; j1 < len(m.Endpoint.Ips); j1++ {
- var v1 ip_types.Address // Ips
- if j1 < len(m.Endpoint.Ips) {
- v1 = m.Endpoint.Ips[j1]
- }
- buf.EncodeUint8(uint8(v1.Af))
- buf.EncodeBytes(v1.Un.XXX_UnionData[:], 16)
- }
- return buf.Bytes(), nil
-}
-func (m *GbpEndpointAdd) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Endpoint.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
- m.Endpoint.Sclass = buf.DecodeUint16()
- m.Endpoint.Flags = GbpEndpointFlags(buf.DecodeUint32())
- copy(m.Endpoint.Mac[:], buf.DecodeBytes(6))
- m.Endpoint.Tun.Src.Af = ip_types.AddressFamily(buf.DecodeUint8())
- copy(m.Endpoint.Tun.Src.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Endpoint.Tun.Dst.Af = ip_types.AddressFamily(buf.DecodeUint8())
- copy(m.Endpoint.Tun.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Endpoint.NIps = buf.DecodeUint8()
- m.Endpoint.Ips = make([]ip_types.Address, m.Endpoint.NIps)
- for j1 := 0; j1 < len(m.Endpoint.Ips); j1++ {
- m.Endpoint.Ips[j1].Af = ip_types.AddressFamily(buf.DecodeUint8())
- copy(m.Endpoint.Ips[j1].Un.XXX_UnionData[:], buf.DecodeBytes(16))
- }
- return nil
-}
-
-// GbpEndpointAddReply defines message 'gbp_endpoint_add_reply'.
-// InProgress: the message form may change in the future versions
-type GbpEndpointAddReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- Handle uint32 `binapi:"u32,name=handle" json:"handle,omitempty"`
-}
-
-func (m *GbpEndpointAddReply) Reset() { *m = GbpEndpointAddReply{} }
-func (*GbpEndpointAddReply) GetMessageName() string { return "gbp_endpoint_add_reply" }
-func (*GbpEndpointAddReply) GetCrcString() string { return "1dd3ff3e" }
-func (*GbpEndpointAddReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpEndpointAddReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.Handle
- return size
-}
-func (m *GbpEndpointAddReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.Handle)
- return buf.Bytes(), nil
-}
-func (m *GbpEndpointAddReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.Handle = buf.DecodeUint32()
- return nil
-}
-
-// GbpEndpointDel defines message 'gbp_endpoint_del'.
-// InProgress: the message form may change in the future versions
-type GbpEndpointDel struct {
- Handle uint32 `binapi:"u32,name=handle" json:"handle,omitempty"`
-}
-
-func (m *GbpEndpointDel) Reset() { *m = GbpEndpointDel{} }
-func (*GbpEndpointDel) GetMessageName() string { return "gbp_endpoint_del" }
-func (*GbpEndpointDel) GetCrcString() string { return "b93cd566" }
-func (*GbpEndpointDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpEndpointDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Handle
- return size
-}
-func (m *GbpEndpointDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Handle)
- return buf.Bytes(), nil
-}
-func (m *GbpEndpointDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Handle = buf.DecodeUint32()
- return nil
-}
-
-// GbpEndpointDelReply defines message 'gbp_endpoint_del_reply'.
-// InProgress: the message form may change in the future versions
-type GbpEndpointDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *GbpEndpointDelReply) Reset() { *m = GbpEndpointDelReply{} }
-func (*GbpEndpointDelReply) GetMessageName() string { return "gbp_endpoint_del_reply" }
-func (*GbpEndpointDelReply) GetCrcString() string { return "e8d4e804" }
-func (*GbpEndpointDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpEndpointDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *GbpEndpointDelReply) 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 *GbpEndpointDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// GbpEndpointDetails defines message 'gbp_endpoint_details'.
-// InProgress: the message form may change in the future versions
-type GbpEndpointDetails struct {
- Age float64 `binapi:"f64,name=age" json:"age,omitempty"`
- Handle uint32 `binapi:"u32,name=handle" json:"handle,omitempty"`
- Endpoint GbpEndpoint `binapi:"gbp_endpoint,name=endpoint" json:"endpoint,omitempty"`
-}
-
-func (m *GbpEndpointDetails) Reset() { *m = GbpEndpointDetails{} }
-func (*GbpEndpointDetails) GetMessageName() string { return "gbp_endpoint_details" }
-func (*GbpEndpointDetails) GetCrcString() string { return "8dd8fbd3" }
-func (*GbpEndpointDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpEndpointDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 8 // m.Age
- size += 4 // m.Handle
- size += 4 // m.Endpoint.SwIfIndex
- size += 2 // m.Endpoint.Sclass
- size += 4 // m.Endpoint.Flags
- size += 1 * 6 // m.Endpoint.Mac
- size += 1 // m.Endpoint.Tun.Src.Af
- size += 1 * 16 // m.Endpoint.Tun.Src.Un
- size += 1 // m.Endpoint.Tun.Dst.Af
- size += 1 * 16 // m.Endpoint.Tun.Dst.Un
- size += 1 // m.Endpoint.NIps
- for j2 := 0; j2 < len(m.Endpoint.Ips); j2++ {
- var s2 ip_types.Address
- _ = s2
- if j2 < len(m.Endpoint.Ips) {
- s2 = m.Endpoint.Ips[j2]
- }
- size += 1 // s2.Af
- size += 1 * 16 // s2.Un
- }
- return size
-}
-func (m *GbpEndpointDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeFloat64(m.Age)
- buf.EncodeUint32(m.Handle)
- buf.EncodeUint32(uint32(m.Endpoint.SwIfIndex))
- buf.EncodeUint16(m.Endpoint.Sclass)
- buf.EncodeUint32(uint32(m.Endpoint.Flags))
- buf.EncodeBytes(m.Endpoint.Mac[:], 6)
- buf.EncodeUint8(uint8(m.Endpoint.Tun.Src.Af))
- buf.EncodeBytes(m.Endpoint.Tun.Src.Un.XXX_UnionData[:], 16)
- buf.EncodeUint8(uint8(m.Endpoint.Tun.Dst.Af))
- buf.EncodeBytes(m.Endpoint.Tun.Dst.Un.XXX_UnionData[:], 16)
- buf.EncodeUint8(uint8(len(m.Endpoint.Ips)))
- for j1 := 0; j1 < len(m.Endpoint.Ips); j1++ {
- var v1 ip_types.Address // Ips
- if j1 < len(m.Endpoint.Ips) {
- v1 = m.Endpoint.Ips[j1]
- }
- buf.EncodeUint8(uint8(v1.Af))
- buf.EncodeBytes(v1.Un.XXX_UnionData[:], 16)
- }
- return buf.Bytes(), nil
-}
-func (m *GbpEndpointDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Age = buf.DecodeFloat64()
- m.Handle = buf.DecodeUint32()
- m.Endpoint.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
- m.Endpoint.Sclass = buf.DecodeUint16()
- m.Endpoint.Flags = GbpEndpointFlags(buf.DecodeUint32())
- copy(m.Endpoint.Mac[:], buf.DecodeBytes(6))
- m.Endpoint.Tun.Src.Af = ip_types.AddressFamily(buf.DecodeUint8())
- copy(m.Endpoint.Tun.Src.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Endpoint.Tun.Dst.Af = ip_types.AddressFamily(buf.DecodeUint8())
- copy(m.Endpoint.Tun.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Endpoint.NIps = buf.DecodeUint8()
- m.Endpoint.Ips = make([]ip_types.Address, m.Endpoint.NIps)
- for j1 := 0; j1 < len(m.Endpoint.Ips); j1++ {
- m.Endpoint.Ips[j1].Af = ip_types.AddressFamily(buf.DecodeUint8())
- copy(m.Endpoint.Ips[j1].Un.XXX_UnionData[:], buf.DecodeBytes(16))
- }
- return nil
-}
-
-// GbpEndpointDump defines message 'gbp_endpoint_dump'.
-// InProgress: the message form may change in the future versions
-type GbpEndpointDump struct{}
-
-func (m *GbpEndpointDump) Reset() { *m = GbpEndpointDump{} }
-func (*GbpEndpointDump) GetMessageName() string { return "gbp_endpoint_dump" }
-func (*GbpEndpointDump) GetCrcString() string { return "51077d14" }
-func (*GbpEndpointDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpEndpointDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *GbpEndpointDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *GbpEndpointDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// GbpEndpointGroupAdd defines message 'gbp_endpoint_group_add'.
-// InProgress: the message form may change in the future versions
-type GbpEndpointGroupAdd struct {
- Epg GbpEndpointGroup `binapi:"gbp_endpoint_group,name=epg" json:"epg,omitempty"`
-}
-
-func (m *GbpEndpointGroupAdd) Reset() { *m = GbpEndpointGroupAdd{} }
-func (*GbpEndpointGroupAdd) GetMessageName() string { return "gbp_endpoint_group_add" }
-func (*GbpEndpointGroupAdd) GetCrcString() string { return "301ddf15" }
-func (*GbpEndpointGroupAdd) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpEndpointGroupAdd) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Epg.Vnid
- size += 2 // m.Epg.Sclass
- size += 4 // m.Epg.BdID
- size += 4 // m.Epg.RdID
- size += 4 // m.Epg.UplinkSwIfIndex
- size += 4 // m.Epg.Retention.RemoteEpTimeout
- return size
-}
-func (m *GbpEndpointGroupAdd) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Epg.Vnid)
- buf.EncodeUint16(m.Epg.Sclass)
- buf.EncodeUint32(m.Epg.BdID)
- buf.EncodeUint32(m.Epg.RdID)
- buf.EncodeUint32(uint32(m.Epg.UplinkSwIfIndex))
- buf.EncodeUint32(m.Epg.Retention.RemoteEpTimeout)
- return buf.Bytes(), nil
-}
-func (m *GbpEndpointGroupAdd) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Epg.Vnid = buf.DecodeUint32()
- m.Epg.Sclass = buf.DecodeUint16()
- m.Epg.BdID = buf.DecodeUint32()
- m.Epg.RdID = buf.DecodeUint32()
- m.Epg.UplinkSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
- m.Epg.Retention.RemoteEpTimeout = buf.DecodeUint32()
- return nil
-}
-
-// GbpEndpointGroupAddReply defines message 'gbp_endpoint_group_add_reply'.
-// InProgress: the message form may change in the future versions
-type GbpEndpointGroupAddReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *GbpEndpointGroupAddReply) Reset() { *m = GbpEndpointGroupAddReply{} }
-func (*GbpEndpointGroupAddReply) GetMessageName() string { return "gbp_endpoint_group_add_reply" }
-func (*GbpEndpointGroupAddReply) GetCrcString() string { return "e8d4e804" }
-func (*GbpEndpointGroupAddReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpEndpointGroupAddReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *GbpEndpointGroupAddReply) 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 *GbpEndpointGroupAddReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// GbpEndpointGroupDel defines message 'gbp_endpoint_group_del'.
-// InProgress: the message form may change in the future versions
-type GbpEndpointGroupDel struct {
- Sclass uint16 `binapi:"u16,name=sclass" json:"sclass,omitempty"`
-}
-
-func (m *GbpEndpointGroupDel) Reset() { *m = GbpEndpointGroupDel{} }
-func (*GbpEndpointGroupDel) GetMessageName() string { return "gbp_endpoint_group_del" }
-func (*GbpEndpointGroupDel) GetCrcString() string { return "3436b8b7" }
-func (*GbpEndpointGroupDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpEndpointGroupDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 2 // m.Sclass
- return size
-}
-func (m *GbpEndpointGroupDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint16(m.Sclass)
- return buf.Bytes(), nil
-}
-func (m *GbpEndpointGroupDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Sclass = buf.DecodeUint16()
- return nil
-}
-
-// GbpEndpointGroupDelReply defines message 'gbp_endpoint_group_del_reply'.
-// InProgress: the message form may change in the future versions
-type GbpEndpointGroupDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *GbpEndpointGroupDelReply) Reset() { *m = GbpEndpointGroupDelReply{} }
-func (*GbpEndpointGroupDelReply) GetMessageName() string { return "gbp_endpoint_group_del_reply" }
-func (*GbpEndpointGroupDelReply) GetCrcString() string { return "e8d4e804" }
-func (*GbpEndpointGroupDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpEndpointGroupDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *GbpEndpointGroupDelReply) 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 *GbpEndpointGroupDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// GbpEndpointGroupDetails defines message 'gbp_endpoint_group_details'.
-// InProgress: the message form may change in the future versions
-type GbpEndpointGroupDetails struct {
- Epg GbpEndpointGroup `binapi:"gbp_endpoint_group,name=epg" json:"epg,omitempty"`
-}
-
-func (m *GbpEndpointGroupDetails) Reset() { *m = GbpEndpointGroupDetails{} }
-func (*GbpEndpointGroupDetails) GetMessageName() string { return "gbp_endpoint_group_details" }
-func (*GbpEndpointGroupDetails) GetCrcString() string { return "ab71d723" }
-func (*GbpEndpointGroupDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpEndpointGroupDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Epg.Vnid
- size += 2 // m.Epg.Sclass
- size += 4 // m.Epg.BdID
- size += 4 // m.Epg.RdID
- size += 4 // m.Epg.UplinkSwIfIndex
- size += 4 // m.Epg.Retention.RemoteEpTimeout
- return size
-}
-func (m *GbpEndpointGroupDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Epg.Vnid)
- buf.EncodeUint16(m.Epg.Sclass)
- buf.EncodeUint32(m.Epg.BdID)
- buf.EncodeUint32(m.Epg.RdID)
- buf.EncodeUint32(uint32(m.Epg.UplinkSwIfIndex))
- buf.EncodeUint32(m.Epg.Retention.RemoteEpTimeout)
- return buf.Bytes(), nil
-}
-func (m *GbpEndpointGroupDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Epg.Vnid = buf.DecodeUint32()
- m.Epg.Sclass = buf.DecodeUint16()
- m.Epg.BdID = buf.DecodeUint32()
- m.Epg.RdID = buf.DecodeUint32()
- m.Epg.UplinkSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
- m.Epg.Retention.RemoteEpTimeout = buf.DecodeUint32()
- return nil
-}
-
-// GbpEndpointGroupDump defines message 'gbp_endpoint_group_dump'.
-// InProgress: the message form may change in the future versions
-type GbpEndpointGroupDump struct{}
-
-func (m *GbpEndpointGroupDump) Reset() { *m = GbpEndpointGroupDump{} }
-func (*GbpEndpointGroupDump) GetMessageName() string { return "gbp_endpoint_group_dump" }
-func (*GbpEndpointGroupDump) GetCrcString() string { return "51077d14" }
-func (*GbpEndpointGroupDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpEndpointGroupDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *GbpEndpointGroupDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *GbpEndpointGroupDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// GbpExtItfAddDel defines message 'gbp_ext_itf_add_del'.
-// InProgress: the message form may change in the future versions
-type GbpExtItfAddDel struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- ExtItf GbpExtItf `binapi:"gbp_ext_itf,name=ext_itf" json:"ext_itf,omitempty"`
-}
-
-func (m *GbpExtItfAddDel) Reset() { *m = GbpExtItfAddDel{} }
-func (*GbpExtItfAddDel) GetMessageName() string { return "gbp_ext_itf_add_del" }
-func (*GbpExtItfAddDel) GetCrcString() string { return "7606d0e1" }
-func (*GbpExtItfAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpExtItfAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 4 // m.ExtItf.SwIfIndex
- size += 4 // m.ExtItf.BdID
- size += 4 // m.ExtItf.RdID
- size += 4 // m.ExtItf.Flags
- return size
-}
-func (m *GbpExtItfAddDel) 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.ExtItf.SwIfIndex))
- buf.EncodeUint32(m.ExtItf.BdID)
- buf.EncodeUint32(m.ExtItf.RdID)
- buf.EncodeUint32(uint32(m.ExtItf.Flags))
- return buf.Bytes(), nil
-}
-func (m *GbpExtItfAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.ExtItf.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
- m.ExtItf.BdID = buf.DecodeUint32()
- m.ExtItf.RdID = buf.DecodeUint32()
- m.ExtItf.Flags = GbpExtItfFlags(buf.DecodeUint32())
- return nil
-}
-
-// GbpExtItfAddDelReply defines message 'gbp_ext_itf_add_del_reply'.
-// InProgress: the message form may change in the future versions
-type GbpExtItfAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *GbpExtItfAddDelReply) Reset() { *m = GbpExtItfAddDelReply{} }
-func (*GbpExtItfAddDelReply) GetMessageName() string { return "gbp_ext_itf_add_del_reply" }
-func (*GbpExtItfAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*GbpExtItfAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpExtItfAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *GbpExtItfAddDelReply) 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 *GbpExtItfAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// GbpExtItfDetails defines message 'gbp_ext_itf_details'.
-// InProgress: the message form may change in the future versions
-type GbpExtItfDetails struct {
- ExtItf GbpExtItf `binapi:"gbp_ext_itf,name=ext_itf" json:"ext_itf,omitempty"`
-}
-
-func (m *GbpExtItfDetails) Reset() { *m = GbpExtItfDetails{} }
-func (*GbpExtItfDetails) GetMessageName() string { return "gbp_ext_itf_details" }
-func (*GbpExtItfDetails) GetCrcString() string { return "519c3d3c" }
-func (*GbpExtItfDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpExtItfDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.ExtItf.SwIfIndex
- size += 4 // m.ExtItf.BdID
- size += 4 // m.ExtItf.RdID
- size += 4 // m.ExtItf.Flags
- return size
-}
-func (m *GbpExtItfDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.ExtItf.SwIfIndex))
- buf.EncodeUint32(m.ExtItf.BdID)
- buf.EncodeUint32(m.ExtItf.RdID)
- buf.EncodeUint32(uint32(m.ExtItf.Flags))
- return buf.Bytes(), nil
-}
-func (m *GbpExtItfDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.ExtItf.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
- m.ExtItf.BdID = buf.DecodeUint32()
- m.ExtItf.RdID = buf.DecodeUint32()
- m.ExtItf.Flags = GbpExtItfFlags(buf.DecodeUint32())
- return nil
-}
-
-// GbpExtItfDump defines message 'gbp_ext_itf_dump'.
-// InProgress: the message form may change in the future versions
-type GbpExtItfDump struct{}
-
-func (m *GbpExtItfDump) Reset() { *m = GbpExtItfDump{} }
-func (*GbpExtItfDump) GetMessageName() string { return "gbp_ext_itf_dump" }
-func (*GbpExtItfDump) GetCrcString() string { return "51077d14" }
-func (*GbpExtItfDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpExtItfDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *GbpExtItfDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *GbpExtItfDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// GbpRecircAddDel defines message 'gbp_recirc_add_del'.
-// InProgress: the message form may change in the future versions
-type GbpRecircAddDel struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- Recirc GbpRecirc `binapi:"gbp_recirc,name=recirc" json:"recirc,omitempty"`
-}
-
-func (m *GbpRecircAddDel) Reset() { *m = GbpRecircAddDel{} }
-func (*GbpRecircAddDel) GetMessageName() string { return "gbp_recirc_add_del" }
-func (*GbpRecircAddDel) GetCrcString() string { return "718c69c3" }
-func (*GbpRecircAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpRecircAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 4 // m.Recirc.SwIfIndex
- size += 2 // m.Recirc.Sclass
- size += 1 // m.Recirc.IsExt
- return size
-}
-func (m *GbpRecircAddDel) 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.Recirc.SwIfIndex))
- buf.EncodeUint16(m.Recirc.Sclass)
- buf.EncodeBool(m.Recirc.IsExt)
- return buf.Bytes(), nil
-}
-func (m *GbpRecircAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.Recirc.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
- m.Recirc.Sclass = buf.DecodeUint16()
- m.Recirc.IsExt = buf.DecodeBool()
- return nil
-}
-
-// GbpRecircAddDelReply defines message 'gbp_recirc_add_del_reply'.
-// InProgress: the message form may change in the future versions
-type GbpRecircAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *GbpRecircAddDelReply) Reset() { *m = GbpRecircAddDelReply{} }
-func (*GbpRecircAddDelReply) GetMessageName() string { return "gbp_recirc_add_del_reply" }
-func (*GbpRecircAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*GbpRecircAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpRecircAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *GbpRecircAddDelReply) 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 *GbpRecircAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// GbpRecircDetails defines message 'gbp_recirc_details'.
-// InProgress: the message form may change in the future versions
-type GbpRecircDetails struct {
- Recirc GbpRecirc `binapi:"gbp_recirc,name=recirc" json:"recirc,omitempty"`
-}
-
-func (m *GbpRecircDetails) Reset() { *m = GbpRecircDetails{} }
-func (*GbpRecircDetails) GetMessageName() string { return "gbp_recirc_details" }
-func (*GbpRecircDetails) GetCrcString() string { return "66ecc42e" }
-func (*GbpRecircDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpRecircDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Recirc.SwIfIndex
- size += 2 // m.Recirc.Sclass
- size += 1 // m.Recirc.IsExt
- return size
-}
-func (m *GbpRecircDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.Recirc.SwIfIndex))
- buf.EncodeUint16(m.Recirc.Sclass)
- buf.EncodeBool(m.Recirc.IsExt)
- return buf.Bytes(), nil
-}
-func (m *GbpRecircDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Recirc.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
- m.Recirc.Sclass = buf.DecodeUint16()
- m.Recirc.IsExt = buf.DecodeBool()
- return nil
-}
-
-// GbpRecircDump defines message 'gbp_recirc_dump'.
-// InProgress: the message form may change in the future versions
-type GbpRecircDump struct{}
-
-func (m *GbpRecircDump) Reset() { *m = GbpRecircDump{} }
-func (*GbpRecircDump) GetMessageName() string { return "gbp_recirc_dump" }
-func (*GbpRecircDump) GetCrcString() string { return "51077d14" }
-func (*GbpRecircDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpRecircDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *GbpRecircDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *GbpRecircDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// GbpRouteDomainAdd defines message 'gbp_route_domain_add'.
-// InProgress: the message form may change in the future versions
-type GbpRouteDomainAdd struct {
- Rd GbpRouteDomain `binapi:"gbp_route_domain,name=rd" json:"rd,omitempty"`
-}
-
-func (m *GbpRouteDomainAdd) Reset() { *m = GbpRouteDomainAdd{} }
-func (*GbpRouteDomainAdd) GetMessageName() string { return "gbp_route_domain_add" }
-func (*GbpRouteDomainAdd) GetCrcString() string { return "204c79e1" }
-func (*GbpRouteDomainAdd) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpRouteDomainAdd) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Rd.RdID
- size += 4 // m.Rd.IP4TableID
- size += 4 // m.Rd.IP6TableID
- size += 4 // m.Rd.IP4UuSwIfIndex
- size += 4 // m.Rd.IP6UuSwIfIndex
- size += 2 // m.Rd.Scope
- return size
-}
-func (m *GbpRouteDomainAdd) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Rd.RdID)
- buf.EncodeUint32(m.Rd.IP4TableID)
- buf.EncodeUint32(m.Rd.IP6TableID)
- buf.EncodeUint32(uint32(m.Rd.IP4UuSwIfIndex))
- buf.EncodeUint32(uint32(m.Rd.IP6UuSwIfIndex))
- buf.EncodeUint16(uint16(m.Rd.Scope))
- return buf.Bytes(), nil
-}
-func (m *GbpRouteDomainAdd) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Rd.RdID = buf.DecodeUint32()
- m.Rd.IP4TableID = buf.DecodeUint32()
- m.Rd.IP6TableID = buf.DecodeUint32()
- m.Rd.IP4UuSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
- m.Rd.IP6UuSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
- m.Rd.Scope = GbpScope(buf.DecodeUint16())
- return nil
-}
-
-// GbpRouteDomainAddReply defines message 'gbp_route_domain_add_reply'.
-// InProgress: the message form may change in the future versions
-type GbpRouteDomainAddReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *GbpRouteDomainAddReply) Reset() { *m = GbpRouteDomainAddReply{} }
-func (*GbpRouteDomainAddReply) GetMessageName() string { return "gbp_route_domain_add_reply" }
-func (*GbpRouteDomainAddReply) GetCrcString() string { return "e8d4e804" }
-func (*GbpRouteDomainAddReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpRouteDomainAddReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *GbpRouteDomainAddReply) 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 *GbpRouteDomainAddReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// GbpRouteDomainDel defines message 'gbp_route_domain_del'.
-// InProgress: the message form may change in the future versions
-type GbpRouteDomainDel struct {
- RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"`
-}
-
-func (m *GbpRouteDomainDel) Reset() { *m = GbpRouteDomainDel{} }
-func (*GbpRouteDomainDel) GetMessageName() string { return "gbp_route_domain_del" }
-func (*GbpRouteDomainDel) GetCrcString() string { return "bee4edcd" }
-func (*GbpRouteDomainDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpRouteDomainDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.RdID
- return size
-}
-func (m *GbpRouteDomainDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.RdID)
- return buf.Bytes(), nil
-}
-func (m *GbpRouteDomainDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.RdID = buf.DecodeUint32()
- return nil
-}
-
-// GbpRouteDomainDelReply defines message 'gbp_route_domain_del_reply'.
-// InProgress: the message form may change in the future versions
-type GbpRouteDomainDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *GbpRouteDomainDelReply) Reset() { *m = GbpRouteDomainDelReply{} }
-func (*GbpRouteDomainDelReply) GetMessageName() string { return "gbp_route_domain_del_reply" }
-func (*GbpRouteDomainDelReply) GetCrcString() string { return "e8d4e804" }
-func (*GbpRouteDomainDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpRouteDomainDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *GbpRouteDomainDelReply) 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 *GbpRouteDomainDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// GbpRouteDomainDetails defines message 'gbp_route_domain_details'.
-// InProgress: the message form may change in the future versions
-type GbpRouteDomainDetails struct {
- Rd GbpRouteDomain `binapi:"gbp_route_domain,name=rd" json:"rd,omitempty"`
-}
-
-func (m *GbpRouteDomainDetails) Reset() { *m = GbpRouteDomainDetails{} }
-func (*GbpRouteDomainDetails) GetMessageName() string { return "gbp_route_domain_details" }
-func (*GbpRouteDomainDetails) GetCrcString() string { return "a78bfbca" }
-func (*GbpRouteDomainDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpRouteDomainDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Rd.RdID
- size += 4 // m.Rd.IP4TableID
- size += 4 // m.Rd.IP6TableID
- size += 4 // m.Rd.IP4UuSwIfIndex
- size += 4 // m.Rd.IP6UuSwIfIndex
- size += 2 // m.Rd.Scope
- return size
-}
-func (m *GbpRouteDomainDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Rd.RdID)
- buf.EncodeUint32(m.Rd.IP4TableID)
- buf.EncodeUint32(m.Rd.IP6TableID)
- buf.EncodeUint32(uint32(m.Rd.IP4UuSwIfIndex))
- buf.EncodeUint32(uint32(m.Rd.IP6UuSwIfIndex))
- buf.EncodeUint16(uint16(m.Rd.Scope))
- return buf.Bytes(), nil
-}
-func (m *GbpRouteDomainDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Rd.RdID = buf.DecodeUint32()
- m.Rd.IP4TableID = buf.DecodeUint32()
- m.Rd.IP6TableID = buf.DecodeUint32()
- m.Rd.IP4UuSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
- m.Rd.IP6UuSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
- m.Rd.Scope = GbpScope(buf.DecodeUint16())
- return nil
-}
-
-// GbpRouteDomainDump defines message 'gbp_route_domain_dump'.
-// InProgress: the message form may change in the future versions
-type GbpRouteDomainDump struct{}
-
-func (m *GbpRouteDomainDump) Reset() { *m = GbpRouteDomainDump{} }
-func (*GbpRouteDomainDump) GetMessageName() string { return "gbp_route_domain_dump" }
-func (*GbpRouteDomainDump) GetCrcString() string { return "51077d14" }
-func (*GbpRouteDomainDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpRouteDomainDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *GbpRouteDomainDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *GbpRouteDomainDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// GbpRouteDomainDumpReply defines message 'gbp_route_domain_dump_reply'.
-// InProgress: the message form may change in the future versions
-type GbpRouteDomainDumpReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *GbpRouteDomainDumpReply) Reset() { *m = GbpRouteDomainDumpReply{} }
-func (*GbpRouteDomainDumpReply) GetMessageName() string { return "gbp_route_domain_dump_reply" }
-func (*GbpRouteDomainDumpReply) GetCrcString() string { return "e8d4e804" }
-func (*GbpRouteDomainDumpReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpRouteDomainDumpReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *GbpRouteDomainDumpReply) 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 *GbpRouteDomainDumpReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// GbpSubnetAddDel defines message 'gbp_subnet_add_del'.
-// InProgress: the message form may change in the future versions
-type GbpSubnetAddDel struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- Subnet GbpSubnet `binapi:"gbp_subnet,name=subnet" json:"subnet,omitempty"`
-}
-
-func (m *GbpSubnetAddDel) Reset() { *m = GbpSubnetAddDel{} }
-func (*GbpSubnetAddDel) GetMessageName() string { return "gbp_subnet_add_del" }
-func (*GbpSubnetAddDel) GetCrcString() string { return "a8803c80" }
-func (*GbpSubnetAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpSubnetAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 4 // m.Subnet.RdID
- size += 4 // m.Subnet.SwIfIndex
- size += 2 // m.Subnet.Sclass
- size += 4 // m.Subnet.Type
- size += 1 // m.Subnet.Prefix.Address.Af
- size += 1 * 16 // m.Subnet.Prefix.Address.Un
- size += 1 // m.Subnet.Prefix.Len
- return size
-}
-func (m *GbpSubnetAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeUint32(m.Subnet.RdID)
- buf.EncodeUint32(uint32(m.Subnet.SwIfIndex))
- buf.EncodeUint16(m.Subnet.Sclass)
- buf.EncodeUint32(uint32(m.Subnet.Type))
- buf.EncodeUint8(uint8(m.Subnet.Prefix.Address.Af))
- buf.EncodeBytes(m.Subnet.Prefix.Address.Un.XXX_UnionData[:], 16)
- buf.EncodeUint8(m.Subnet.Prefix.Len)
- return buf.Bytes(), nil
-}
-func (m *GbpSubnetAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.Subnet.RdID = buf.DecodeUint32()
- m.Subnet.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
- m.Subnet.Sclass = buf.DecodeUint16()
- m.Subnet.Type = GbpSubnetType(buf.DecodeUint32())
- m.Subnet.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
- copy(m.Subnet.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Subnet.Prefix.Len = buf.DecodeUint8()
- return nil
-}
-
-// GbpSubnetAddDelReply defines message 'gbp_subnet_add_del_reply'.
-// InProgress: the message form may change in the future versions
-type GbpSubnetAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *GbpSubnetAddDelReply) Reset() { *m = GbpSubnetAddDelReply{} }
-func (*GbpSubnetAddDelReply) GetMessageName() string { return "gbp_subnet_add_del_reply" }
-func (*GbpSubnetAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*GbpSubnetAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpSubnetAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *GbpSubnetAddDelReply) 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 *GbpSubnetAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// GbpSubnetDetails defines message 'gbp_subnet_details'.
-// InProgress: the message form may change in the future versions
-type GbpSubnetDetails struct {
- Subnet GbpSubnet `binapi:"gbp_subnet,name=subnet" json:"subnet,omitempty"`
-}
-
-func (m *GbpSubnetDetails) Reset() { *m = GbpSubnetDetails{} }
-func (*GbpSubnetDetails) GetMessageName() string { return "gbp_subnet_details" }
-func (*GbpSubnetDetails) GetCrcString() string { return "cbc5ca18" }
-func (*GbpSubnetDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpSubnetDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Subnet.RdID
- size += 4 // m.Subnet.SwIfIndex
- size += 2 // m.Subnet.Sclass
- size += 4 // m.Subnet.Type
- size += 1 // m.Subnet.Prefix.Address.Af
- size += 1 * 16 // m.Subnet.Prefix.Address.Un
- size += 1 // m.Subnet.Prefix.Len
- return size
-}
-func (m *GbpSubnetDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Subnet.RdID)
- buf.EncodeUint32(uint32(m.Subnet.SwIfIndex))
- buf.EncodeUint16(m.Subnet.Sclass)
- buf.EncodeUint32(uint32(m.Subnet.Type))
- buf.EncodeUint8(uint8(m.Subnet.Prefix.Address.Af))
- buf.EncodeBytes(m.Subnet.Prefix.Address.Un.XXX_UnionData[:], 16)
- buf.EncodeUint8(m.Subnet.Prefix.Len)
- return buf.Bytes(), nil
-}
-func (m *GbpSubnetDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Subnet.RdID = buf.DecodeUint32()
- m.Subnet.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
- m.Subnet.Sclass = buf.DecodeUint16()
- m.Subnet.Type = GbpSubnetType(buf.DecodeUint32())
- m.Subnet.Prefix.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
- copy(m.Subnet.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Subnet.Prefix.Len = buf.DecodeUint8()
- return nil
-}
-
-// GbpSubnetDump defines message 'gbp_subnet_dump'.
-// InProgress: the message form may change in the future versions
-type GbpSubnetDump struct{}
-
-func (m *GbpSubnetDump) Reset() { *m = GbpSubnetDump{} }
-func (*GbpSubnetDump) GetMessageName() string { return "gbp_subnet_dump" }
-func (*GbpSubnetDump) GetCrcString() string { return "51077d14" }
-func (*GbpSubnetDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpSubnetDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *GbpSubnetDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *GbpSubnetDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// GbpVxlanTunnelAdd defines message 'gbp_vxlan_tunnel_add'.
-// InProgress: the message form may change in the future versions
-type GbpVxlanTunnelAdd struct {
- Tunnel GbpVxlanTunnel `binapi:"gbp_vxlan_tunnel,name=tunnel" json:"tunnel,omitempty"`
-}
-
-func (m *GbpVxlanTunnelAdd) Reset() { *m = GbpVxlanTunnelAdd{} }
-func (*GbpVxlanTunnelAdd) GetMessageName() string { return "gbp_vxlan_tunnel_add" }
-func (*GbpVxlanTunnelAdd) GetCrcString() string { return "3e070b35" }
-func (*GbpVxlanTunnelAdd) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpVxlanTunnelAdd) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Tunnel.Vni
- size += 4 // m.Tunnel.Mode
- size += 4 // m.Tunnel.BdRdID
- size += 1 * 4 // m.Tunnel.Src
- return size
-}
-func (m *GbpVxlanTunnelAdd) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Tunnel.Vni)
- buf.EncodeUint32(uint32(m.Tunnel.Mode))
- buf.EncodeUint32(m.Tunnel.BdRdID)
- buf.EncodeBytes(m.Tunnel.Src[:], 4)
- return buf.Bytes(), nil
-}
-func (m *GbpVxlanTunnelAdd) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Tunnel.Vni = buf.DecodeUint32()
- m.Tunnel.Mode = GbpVxlanTunnelMode(buf.DecodeUint32())
- m.Tunnel.BdRdID = buf.DecodeUint32()
- copy(m.Tunnel.Src[:], buf.DecodeBytes(4))
- return nil
-}
-
-// GbpVxlanTunnelAddReply defines message 'gbp_vxlan_tunnel_add_reply'.
-// InProgress: the message form may change in the future versions
-type GbpVxlanTunnelAddReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *GbpVxlanTunnelAddReply) Reset() { *m = GbpVxlanTunnelAddReply{} }
-func (*GbpVxlanTunnelAddReply) GetMessageName() string { return "gbp_vxlan_tunnel_add_reply" }
-func (*GbpVxlanTunnelAddReply) GetCrcString() string { return "5383d31f" }
-func (*GbpVxlanTunnelAddReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpVxlanTunnelAddReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *GbpVxlanTunnelAddReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- return buf.Bytes(), nil
-}
-func (m *GbpVxlanTunnelAddReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// GbpVxlanTunnelDel defines message 'gbp_vxlan_tunnel_del'.
-// InProgress: the message form may change in the future versions
-type GbpVxlanTunnelDel struct {
- Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
-}
-
-func (m *GbpVxlanTunnelDel) Reset() { *m = GbpVxlanTunnelDel{} }
-func (*GbpVxlanTunnelDel) GetMessageName() string { return "gbp_vxlan_tunnel_del" }
-func (*GbpVxlanTunnelDel) GetCrcString() string { return "8d1f2fe9" }
-func (*GbpVxlanTunnelDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpVxlanTunnelDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Vni
- return size
-}
-func (m *GbpVxlanTunnelDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Vni)
- return buf.Bytes(), nil
-}
-func (m *GbpVxlanTunnelDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Vni = buf.DecodeUint32()
- return nil
-}
-
-// GbpVxlanTunnelDelReply defines message 'gbp_vxlan_tunnel_del_reply'.
-// InProgress: the message form may change in the future versions
-type GbpVxlanTunnelDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *GbpVxlanTunnelDelReply) Reset() { *m = GbpVxlanTunnelDelReply{} }
-func (*GbpVxlanTunnelDelReply) GetMessageName() string { return "gbp_vxlan_tunnel_del_reply" }
-func (*GbpVxlanTunnelDelReply) GetCrcString() string { return "e8d4e804" }
-func (*GbpVxlanTunnelDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpVxlanTunnelDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *GbpVxlanTunnelDelReply) 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 *GbpVxlanTunnelDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// GbpVxlanTunnelDetails defines message 'gbp_vxlan_tunnel_details'.
-// InProgress: the message form may change in the future versions
-type GbpVxlanTunnelDetails struct {
- Tunnel GbpVxlanTunnel `binapi:"gbp_vxlan_tunnel,name=tunnel" json:"tunnel,omitempty"`
-}
-
-func (m *GbpVxlanTunnelDetails) Reset() { *m = GbpVxlanTunnelDetails{} }
-func (*GbpVxlanTunnelDetails) GetMessageName() string { return "gbp_vxlan_tunnel_details" }
-func (*GbpVxlanTunnelDetails) GetCrcString() string { return "65c6c818" }
-func (*GbpVxlanTunnelDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpVxlanTunnelDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Tunnel.Vni
- size += 4 // m.Tunnel.Mode
- size += 4 // m.Tunnel.BdRdID
- size += 1 * 4 // m.Tunnel.Src
- return size
-}
-func (m *GbpVxlanTunnelDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Tunnel.Vni)
- buf.EncodeUint32(uint32(m.Tunnel.Mode))
- buf.EncodeUint32(m.Tunnel.BdRdID)
- buf.EncodeBytes(m.Tunnel.Src[:], 4)
- return buf.Bytes(), nil
-}
-func (m *GbpVxlanTunnelDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Tunnel.Vni = buf.DecodeUint32()
- m.Tunnel.Mode = GbpVxlanTunnelMode(buf.DecodeUint32())
- m.Tunnel.BdRdID = buf.DecodeUint32()
- copy(m.Tunnel.Src[:], buf.DecodeBytes(4))
- return nil
-}
-
-// GbpVxlanTunnelDump defines message 'gbp_vxlan_tunnel_dump'.
-// InProgress: the message form may change in the future versions
-type GbpVxlanTunnelDump struct{}
-
-func (m *GbpVxlanTunnelDump) Reset() { *m = GbpVxlanTunnelDump{} }
-func (*GbpVxlanTunnelDump) GetMessageName() string { return "gbp_vxlan_tunnel_dump" }
-func (*GbpVxlanTunnelDump) GetCrcString() string { return "51077d14" }
-func (*GbpVxlanTunnelDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpVxlanTunnelDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *GbpVxlanTunnelDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *GbpVxlanTunnelDump) Unmarshal(b []byte) error {
- return nil
-}
-
-func init() { file_gbp_binapi_init() }
-func file_gbp_binapi_init() {
- api.RegisterMessage((*GbpBridgeDomainAdd)(nil), "gbp_bridge_domain_add_918e8c01")
- api.RegisterMessage((*GbpBridgeDomainAddReply)(nil), "gbp_bridge_domain_add_reply_e8d4e804")
- api.RegisterMessage((*GbpBridgeDomainDel)(nil), "gbp_bridge_domain_del_c25fdce6")
- api.RegisterMessage((*GbpBridgeDomainDelReply)(nil), "gbp_bridge_domain_del_reply_e8d4e804")
- api.RegisterMessage((*GbpBridgeDomainDetails)(nil), "gbp_bridge_domain_details_51d51be9")
- api.RegisterMessage((*GbpBridgeDomainDump)(nil), "gbp_bridge_domain_dump_51077d14")
- api.RegisterMessage((*GbpBridgeDomainDumpReply)(nil), "gbp_bridge_domain_dump_reply_e8d4e804")
- api.RegisterMessage((*GbpContractAddDel)(nil), "gbp_contract_add_del_aa8d652d")
- api.RegisterMessage((*GbpContractAddDelReply)(nil), "gbp_contract_add_del_reply_1992deab")
- api.RegisterMessage((*GbpContractDetails)(nil), "gbp_contract_details_65dec325")
- api.RegisterMessage((*GbpContractDump)(nil), "gbp_contract_dump_51077d14")
- api.RegisterMessage((*GbpEndpointAdd)(nil), "gbp_endpoint_add_7b3af7de")
- api.RegisterMessage((*GbpEndpointAddReply)(nil), "gbp_endpoint_add_reply_1dd3ff3e")
- api.RegisterMessage((*GbpEndpointDel)(nil), "gbp_endpoint_del_b93cd566")
- api.RegisterMessage((*GbpEndpointDelReply)(nil), "gbp_endpoint_del_reply_e8d4e804")
- api.RegisterMessage((*GbpEndpointDetails)(nil), "gbp_endpoint_details_8dd8fbd3")
- api.RegisterMessage((*GbpEndpointDump)(nil), "gbp_endpoint_dump_51077d14")
- api.RegisterMessage((*GbpEndpointGroupAdd)(nil), "gbp_endpoint_group_add_301ddf15")
- api.RegisterMessage((*GbpEndpointGroupAddReply)(nil), "gbp_endpoint_group_add_reply_e8d4e804")
- api.RegisterMessage((*GbpEndpointGroupDel)(nil), "gbp_endpoint_group_del_3436b8b7")
- api.RegisterMessage((*GbpEndpointGroupDelReply)(nil), "gbp_endpoint_group_del_reply_e8d4e804")
- api.RegisterMessage((*GbpEndpointGroupDetails)(nil), "gbp_endpoint_group_details_ab71d723")
- api.RegisterMessage((*GbpEndpointGroupDump)(nil), "gbp_endpoint_group_dump_51077d14")
- api.RegisterMessage((*GbpExtItfAddDel)(nil), "gbp_ext_itf_add_del_7606d0e1")
- api.RegisterMessage((*GbpExtItfAddDelReply)(nil), "gbp_ext_itf_add_del_reply_e8d4e804")
- api.RegisterMessage((*GbpExtItfDetails)(nil), "gbp_ext_itf_details_519c3d3c")
- api.RegisterMessage((*GbpExtItfDump)(nil), "gbp_ext_itf_dump_51077d14")
- api.RegisterMessage((*GbpRecircAddDel)(nil), "gbp_recirc_add_del_718c69c3")
- api.RegisterMessage((*GbpRecircAddDelReply)(nil), "gbp_recirc_add_del_reply_e8d4e804")
- api.RegisterMessage((*GbpRecircDetails)(nil), "gbp_recirc_details_66ecc42e")
- api.RegisterMessage((*GbpRecircDump)(nil), "gbp_recirc_dump_51077d14")
- api.RegisterMessage((*GbpRouteDomainAdd)(nil), "gbp_route_domain_add_204c79e1")
- api.RegisterMessage((*GbpRouteDomainAddReply)(nil), "gbp_route_domain_add_reply_e8d4e804")
- api.RegisterMessage((*GbpRouteDomainDel)(nil), "gbp_route_domain_del_bee4edcd")
- api.RegisterMessage((*GbpRouteDomainDelReply)(nil), "gbp_route_domain_del_reply_e8d4e804")
- api.RegisterMessage((*GbpRouteDomainDetails)(nil), "gbp_route_domain_details_a78bfbca")
- api.RegisterMessage((*GbpRouteDomainDump)(nil), "gbp_route_domain_dump_51077d14")
- api.RegisterMessage((*GbpRouteDomainDumpReply)(nil), "gbp_route_domain_dump_reply_e8d4e804")
- api.RegisterMessage((*GbpSubnetAddDel)(nil), "gbp_subnet_add_del_a8803c80")
- api.RegisterMessage((*GbpSubnetAddDelReply)(nil), "gbp_subnet_add_del_reply_e8d4e804")
- api.RegisterMessage((*GbpSubnetDetails)(nil), "gbp_subnet_details_cbc5ca18")
- api.RegisterMessage((*GbpSubnetDump)(nil), "gbp_subnet_dump_51077d14")
- api.RegisterMessage((*GbpVxlanTunnelAdd)(nil), "gbp_vxlan_tunnel_add_3e070b35")
- api.RegisterMessage((*GbpVxlanTunnelAddReply)(nil), "gbp_vxlan_tunnel_add_reply_5383d31f")
- api.RegisterMessage((*GbpVxlanTunnelDel)(nil), "gbp_vxlan_tunnel_del_8d1f2fe9")
- api.RegisterMessage((*GbpVxlanTunnelDelReply)(nil), "gbp_vxlan_tunnel_del_reply_e8d4e804")
- api.RegisterMessage((*GbpVxlanTunnelDetails)(nil), "gbp_vxlan_tunnel_details_65c6c818")
- api.RegisterMessage((*GbpVxlanTunnelDump)(nil), "gbp_vxlan_tunnel_dump_51077d14")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*GbpBridgeDomainAdd)(nil),
- (*GbpBridgeDomainAddReply)(nil),
- (*GbpBridgeDomainDel)(nil),
- (*GbpBridgeDomainDelReply)(nil),
- (*GbpBridgeDomainDetails)(nil),
- (*GbpBridgeDomainDump)(nil),
- (*GbpBridgeDomainDumpReply)(nil),
- (*GbpContractAddDel)(nil),
- (*GbpContractAddDelReply)(nil),
- (*GbpContractDetails)(nil),
- (*GbpContractDump)(nil),
- (*GbpEndpointAdd)(nil),
- (*GbpEndpointAddReply)(nil),
- (*GbpEndpointDel)(nil),
- (*GbpEndpointDelReply)(nil),
- (*GbpEndpointDetails)(nil),
- (*GbpEndpointDump)(nil),
- (*GbpEndpointGroupAdd)(nil),
- (*GbpEndpointGroupAddReply)(nil),
- (*GbpEndpointGroupDel)(nil),
- (*GbpEndpointGroupDelReply)(nil),
- (*GbpEndpointGroupDetails)(nil),
- (*GbpEndpointGroupDump)(nil),
- (*GbpExtItfAddDel)(nil),
- (*GbpExtItfAddDelReply)(nil),
- (*GbpExtItfDetails)(nil),
- (*GbpExtItfDump)(nil),
- (*GbpRecircAddDel)(nil),
- (*GbpRecircAddDelReply)(nil),
- (*GbpRecircDetails)(nil),
- (*GbpRecircDump)(nil),
- (*GbpRouteDomainAdd)(nil),
- (*GbpRouteDomainAddReply)(nil),
- (*GbpRouteDomainDel)(nil),
- (*GbpRouteDomainDelReply)(nil),
- (*GbpRouteDomainDetails)(nil),
- (*GbpRouteDomainDump)(nil),
- (*GbpRouteDomainDumpReply)(nil),
- (*GbpSubnetAddDel)(nil),
- (*GbpSubnetAddDelReply)(nil),
- (*GbpSubnetDetails)(nil),
- (*GbpSubnetDump)(nil),
- (*GbpVxlanTunnelAdd)(nil),
- (*GbpVxlanTunnelAddReply)(nil),
- (*GbpVxlanTunnelDel)(nil),
- (*GbpVxlanTunnelDelReply)(nil),
- (*GbpVxlanTunnelDetails)(nil),
- (*GbpVxlanTunnelDump)(nil),
- }
-}
diff --git a/binapi/gbp/gbp_rpc.ba.go b/binapi/gbp/gbp_rpc.ba.go
deleted file mode 100644
index 13544f6..0000000
--- a/binapi/gbp/gbp_rpc.ba.go
+++ /dev/null
@@ -1,560 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package gbp
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
-)
-
-// RPCService defines RPC service gbp.
-type RPCService interface {
- GbpBridgeDomainAdd(ctx context.Context, in *GbpBridgeDomainAdd) (*GbpBridgeDomainAddReply, error)
- GbpBridgeDomainDel(ctx context.Context, in *GbpBridgeDomainDel) (*GbpBridgeDomainDelReply, error)
- GbpBridgeDomainDump(ctx context.Context, in *GbpBridgeDomainDump) (RPCService_GbpBridgeDomainDumpClient, error)
- GbpContractAddDel(ctx context.Context, in *GbpContractAddDel) (*GbpContractAddDelReply, error)
- GbpContractDump(ctx context.Context, in *GbpContractDump) (RPCService_GbpContractDumpClient, error)
- GbpEndpointAdd(ctx context.Context, in *GbpEndpointAdd) (*GbpEndpointAddReply, error)
- GbpEndpointDel(ctx context.Context, in *GbpEndpointDel) (*GbpEndpointDelReply, error)
- GbpEndpointDump(ctx context.Context, in *GbpEndpointDump) (RPCService_GbpEndpointDumpClient, error)
- GbpEndpointGroupAdd(ctx context.Context, in *GbpEndpointGroupAdd) (*GbpEndpointGroupAddReply, error)
- GbpEndpointGroupDel(ctx context.Context, in *GbpEndpointGroupDel) (*GbpEndpointGroupDelReply, error)
- GbpEndpointGroupDump(ctx context.Context, in *GbpEndpointGroupDump) (RPCService_GbpEndpointGroupDumpClient, error)
- GbpExtItfAddDel(ctx context.Context, in *GbpExtItfAddDel) (*GbpExtItfAddDelReply, error)
- GbpExtItfDump(ctx context.Context, in *GbpExtItfDump) (RPCService_GbpExtItfDumpClient, error)
- GbpRecircAddDel(ctx context.Context, in *GbpRecircAddDel) (*GbpRecircAddDelReply, error)
- GbpRecircDump(ctx context.Context, in *GbpRecircDump) (RPCService_GbpRecircDumpClient, error)
- GbpRouteDomainAdd(ctx context.Context, in *GbpRouteDomainAdd) (*GbpRouteDomainAddReply, error)
- GbpRouteDomainDel(ctx context.Context, in *GbpRouteDomainDel) (*GbpRouteDomainDelReply, error)
- GbpRouteDomainDump(ctx context.Context, in *GbpRouteDomainDump) (RPCService_GbpRouteDomainDumpClient, error)
- GbpSubnetAddDel(ctx context.Context, in *GbpSubnetAddDel) (*GbpSubnetAddDelReply, error)
- GbpSubnetDump(ctx context.Context, in *GbpSubnetDump) (RPCService_GbpSubnetDumpClient, error)
- GbpVxlanTunnelAdd(ctx context.Context, in *GbpVxlanTunnelAdd) (*GbpVxlanTunnelAddReply, error)
- GbpVxlanTunnelDel(ctx context.Context, in *GbpVxlanTunnelDel) (*GbpVxlanTunnelDelReply, error)
- GbpVxlanTunnelDump(ctx context.Context, in *GbpVxlanTunnelDump) (RPCService_GbpVxlanTunnelDumpClient, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) GbpBridgeDomainAdd(ctx context.Context, in *GbpBridgeDomainAdd) (*GbpBridgeDomainAddReply, error) {
- out := new(GbpBridgeDomainAddReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GbpBridgeDomainDel(ctx context.Context, in *GbpBridgeDomainDel) (*GbpBridgeDomainDelReply, error) {
- out := new(GbpBridgeDomainDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GbpBridgeDomainDump(ctx context.Context, in *GbpBridgeDomainDump) (RPCService_GbpBridgeDomainDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_GbpBridgeDomainDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_GbpBridgeDomainDumpClient interface {
- Recv() (*GbpBridgeDomainDetails, error)
- api.Stream
-}
-
-type serviceClient_GbpBridgeDomainDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_GbpBridgeDomainDumpClient) Recv() (*GbpBridgeDomainDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *GbpBridgeDomainDetails:
- return m, nil
- case *vpe.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) GbpContractAddDel(ctx context.Context, in *GbpContractAddDel) (*GbpContractAddDelReply, error) {
- out := new(GbpContractAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GbpContractDump(ctx context.Context, in *GbpContractDump) (RPCService_GbpContractDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_GbpContractDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_GbpContractDumpClient interface {
- Recv() (*GbpContractDetails, error)
- api.Stream
-}
-
-type serviceClient_GbpContractDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_GbpContractDumpClient) Recv() (*GbpContractDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *GbpContractDetails:
- return m, nil
- case *vpe.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) GbpEndpointAdd(ctx context.Context, in *GbpEndpointAdd) (*GbpEndpointAddReply, error) {
- out := new(GbpEndpointAddReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GbpEndpointDel(ctx context.Context, in *GbpEndpointDel) (*GbpEndpointDelReply, error) {
- out := new(GbpEndpointDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GbpEndpointDump(ctx context.Context, in *GbpEndpointDump) (RPCService_GbpEndpointDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_GbpEndpointDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_GbpEndpointDumpClient interface {
- Recv() (*GbpEndpointDetails, error)
- api.Stream
-}
-
-type serviceClient_GbpEndpointDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_GbpEndpointDumpClient) Recv() (*GbpEndpointDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *GbpEndpointDetails:
- return m, nil
- case *vpe.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) GbpEndpointGroupAdd(ctx context.Context, in *GbpEndpointGroupAdd) (*GbpEndpointGroupAddReply, error) {
- out := new(GbpEndpointGroupAddReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GbpEndpointGroupDel(ctx context.Context, in *GbpEndpointGroupDel) (*GbpEndpointGroupDelReply, error) {
- out := new(GbpEndpointGroupDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GbpEndpointGroupDump(ctx context.Context, in *GbpEndpointGroupDump) (RPCService_GbpEndpointGroupDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_GbpEndpointGroupDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_GbpEndpointGroupDumpClient interface {
- Recv() (*GbpEndpointGroupDetails, error)
- api.Stream
-}
-
-type serviceClient_GbpEndpointGroupDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_GbpEndpointGroupDumpClient) Recv() (*GbpEndpointGroupDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *GbpEndpointGroupDetails:
- return m, nil
- case *vpe.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) GbpExtItfAddDel(ctx context.Context, in *GbpExtItfAddDel) (*GbpExtItfAddDelReply, error) {
- out := new(GbpExtItfAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GbpExtItfDump(ctx context.Context, in *GbpExtItfDump) (RPCService_GbpExtItfDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_GbpExtItfDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_GbpExtItfDumpClient interface {
- Recv() (*GbpExtItfDetails, error)
- api.Stream
-}
-
-type serviceClient_GbpExtItfDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_GbpExtItfDumpClient) Recv() (*GbpExtItfDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *GbpExtItfDetails:
- return m, nil
- case *vpe.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) GbpRecircAddDel(ctx context.Context, in *GbpRecircAddDel) (*GbpRecircAddDelReply, error) {
- out := new(GbpRecircAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GbpRecircDump(ctx context.Context, in *GbpRecircDump) (RPCService_GbpRecircDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_GbpRecircDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_GbpRecircDumpClient interface {
- Recv() (*GbpRecircDetails, error)
- api.Stream
-}
-
-type serviceClient_GbpRecircDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_GbpRecircDumpClient) Recv() (*GbpRecircDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *GbpRecircDetails:
- return m, nil
- case *vpe.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) GbpRouteDomainAdd(ctx context.Context, in *GbpRouteDomainAdd) (*GbpRouteDomainAddReply, error) {
- out := new(GbpRouteDomainAddReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GbpRouteDomainDel(ctx context.Context, in *GbpRouteDomainDel) (*GbpRouteDomainDelReply, error) {
- out := new(GbpRouteDomainDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GbpRouteDomainDump(ctx context.Context, in *GbpRouteDomainDump) (RPCService_GbpRouteDomainDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_GbpRouteDomainDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_GbpRouteDomainDumpClient interface {
- Recv() (*GbpRouteDomainDetails, error)
- api.Stream
-}
-
-type serviceClient_GbpRouteDomainDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_GbpRouteDomainDumpClient) Recv() (*GbpRouteDomainDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *GbpRouteDomainDetails:
- return m, nil
- case *vpe.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) GbpSubnetAddDel(ctx context.Context, in *GbpSubnetAddDel) (*GbpSubnetAddDelReply, error) {
- out := new(GbpSubnetAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GbpSubnetDump(ctx context.Context, in *GbpSubnetDump) (RPCService_GbpSubnetDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_GbpSubnetDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_GbpSubnetDumpClient interface {
- Recv() (*GbpSubnetDetails, error)
- api.Stream
-}
-
-type serviceClient_GbpSubnetDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_GbpSubnetDumpClient) Recv() (*GbpSubnetDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *GbpSubnetDetails:
- return m, nil
- case *vpe.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) GbpVxlanTunnelAdd(ctx context.Context, in *GbpVxlanTunnelAdd) (*GbpVxlanTunnelAddReply, error) {
- out := new(GbpVxlanTunnelAddReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GbpVxlanTunnelDel(ctx context.Context, in *GbpVxlanTunnelDel) (*GbpVxlanTunnelDelReply, error) {
- out := new(GbpVxlanTunnelDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GbpVxlanTunnelDump(ctx context.Context, in *GbpVxlanTunnelDump) (RPCService_GbpVxlanTunnelDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_GbpVxlanTunnelDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_GbpVxlanTunnelDumpClient interface {
- Recv() (*GbpVxlanTunnelDetails, error)
- api.Stream
-}
-
-type serviceClient_GbpVxlanTunnelDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_GbpVxlanTunnelDumpClient) Recv() (*GbpVxlanTunnelDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *GbpVxlanTunnelDetails:
- return m, nil
- case *vpe.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)
- }
-}
diff --git a/binapi/geneve/geneve.ba.go b/binapi/geneve/geneve.ba.go
index 0811fb3..37d14ac 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/geneve.api.json
// Package geneve contains generated bindings for API file geneve.api.
diff --git a/binapi/geneve/geneve_rpc.ba.go b/binapi/geneve/geneve_rpc.ba.go
index a926667..0e764b0 100644
--- a/binapi/geneve/geneve_rpc.ba.go
+++ b/binapi/geneve/geneve_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service geneve.
@@ -54,7 +54,7 @@ func (c *serviceClient) GeneveTunnelDump(ctx context.Context, in *GeneveTunnelDu
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -77,7 +77,7 @@ func (c *serviceClient_GeneveTunnelDumpClient) Recv() (*GeneveTunnelDetails, err
switch m := msg.(type) {
case *GeneveTunnelDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/graph/graph.ba.go b/binapi/graph/graph.ba.go
index 3d0e539..88f7e23 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 d7721f5..db6669d 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/core/gre.api.json
// Package gre contains generated bindings for API file gre.api.
diff --git a/binapi/gre/gre_rpc.ba.go b/binapi/gre/gre_rpc.ba.go
index 11edd63..914634f 100644
--- a/binapi/gre/gre_rpc.ba.go
+++ b/binapi/gre/gre_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service gre.
@@ -43,7 +43,7 @@ func (c *serviceClient) GreTunnelDump(ctx context.Context, in *GreTunnelDump) (R
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -66,7 +66,7 @@ func (c *serviceClient_GreTunnelDumpClient) Recv() (*GreTunnelDetails, error) {
switch m := msg.(type) {
case *GreTunnelDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/gso/gso.ba.go b/binapi/gso/gso.ba.go
index c074967..dea820e 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 20a5b7f..d7081e1 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/gtpu.api.json
// Package gtpu contains generated bindings for API file gtpu.api.
diff --git a/binapi/gtpu/gtpu_rpc.ba.go b/binapi/gtpu/gtpu_rpc.ba.go
index c7b0f12..57a208f 100644
--- a/binapi/gtpu/gtpu_rpc.ba.go
+++ b/binapi/gtpu/gtpu_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service gtpu.
@@ -55,7 +55,7 @@ func (c *serviceClient) GtpuTunnelDump(ctx context.Context, in *GtpuTunnelDump)
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -78,7 +78,7 @@ func (c *serviceClient_GtpuTunnelDumpClient) Recv() (*GtpuTunnelDetails, error)
switch m := msg.(type) {
case *GtpuTunnelDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/http_static/http_static.ba.go b/binapi/http_static/http_static.ba.go
index 65afaf1..3ad4a75 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/http_static.api.json
// Package http_static contains generated bindings for API file http_static.api.
diff --git a/binapi/igmp/igmp.ba.go b/binapi/igmp/igmp.ba.go
index d8442cd..ca07473 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/igmp.api.json
// Package igmp contains generated bindings for API file igmp.api.
diff --git a/binapi/igmp/igmp_rpc.ba.go b/binapi/igmp/igmp_rpc.ba.go
index 641e2db..4056d09 100644
--- a/binapi/igmp/igmp_rpc.ba.go
+++ b/binapi/igmp/igmp_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service igmp.
@@ -50,7 +50,7 @@ func (c *serviceClient) IgmpDump(ctx context.Context, in *IgmpDump) (RPCService_
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -73,7 +73,7 @@ func (c *serviceClient_IgmpDumpClient) Recv() (*IgmpDetails, error) {
switch m := msg.(type) {
case *IgmpDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -102,7 +102,7 @@ func (c *serviceClient) IgmpGroupPrefixDump(ctx context.Context, in *IgmpGroupPr
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -125,7 +125,7 @@ func (c *serviceClient_IgmpGroupPrefixDumpClient) Recv() (*IgmpGroupPrefixDetail
switch m := msg.(type) {
case *IgmpGroupPrefixDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/ikev2/ikev2.ba.go b/binapi/ikev2/ikev2.ba.go
index 61fd88f..1399d2e 100644
--- a/binapi/ikev2/ikev2.ba.go
+++ b/binapi/ikev2/ikev2.ba.go
@@ -1,7 +1,7 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
// binapi-generator: v0.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/ikev2.api.json
// Package ikev2 contains generated bindings for API file ikev2.api.
diff --git a/binapi/ikev2/ikev2_rpc.ba.go b/binapi/ikev2/ikev2_rpc.ba.go
index b09d700..163b071 100644
--- a/binapi/ikev2/ikev2_rpc.ba.go
+++ b/binapi/ikev2/ikev2_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service ikev2.
@@ -57,7 +57,7 @@ func (c *serviceClient) Ikev2ChildSaDump(ctx context.Context, in *Ikev2ChildSaDu
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -80,7 +80,7 @@ func (c *serviceClient_Ikev2ChildSaDumpClient) Recv() (*Ikev2ChildSaDetails, err
switch m := msg.(type) {
case *Ikev2ChildSaDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -172,7 +172,7 @@ func (c *serviceClient) Ikev2ProfileDump(ctx context.Context, in *Ikev2ProfileDu
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -195,7 +195,7 @@ func (c *serviceClient_Ikev2ProfileDumpClient) Recv() (*Ikev2ProfileDetails, err
switch m := msg.(type) {
case *Ikev2ProfileDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -269,7 +269,7 @@ func (c *serviceClient) Ikev2SaDump(ctx context.Context, in *Ikev2SaDump) (RPCSe
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -292,7 +292,7 @@ func (c *serviceClient_Ikev2SaDumpClient) Recv() (*Ikev2SaDetails, error) {
switch m := msg.(type) {
case *Ikev2SaDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -375,7 +375,7 @@ func (c *serviceClient) Ikev2TrafficSelectorDump(ctx context.Context, in *Ikev2T
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -398,7 +398,7 @@ func (c *serviceClient_Ikev2TrafficSelectorDumpClient) Recv() (*Ikev2TrafficSele
switch m := msg.(type) {
case *Ikev2TrafficSelectorDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/ikev2_types/ikev2_types.ba.go b/binapi/ikev2_types/ikev2_types.ba.go
index adfa502..288f555 100644
--- a/binapi/ikev2_types/ikev2_types.ba.go
+++ b/binapi/ikev2_types/ikev2_types.ba.go
@@ -1,7 +1,7 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
// binapi-generator: v0.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/ikev2_types.api.json
// Package ikev2_types contains generated bindings for API file ikev2_types.api.
diff --git a/binapi/interface/interface.ba.go b/binapi/interface/interface.ba.go
index 7640f17..b137c71 100644
--- a/binapi/interface/interface.ba.go
+++ b/binapi/interface/interface.ba.go
@@ -1,13 +1,13 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
// binapi-generator: v0.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/core/interface.api.json
// Package interfaces contains generated bindings for API file interface.api.
//
// Contents:
-// 59 messages
+// 66 messages
//
package interfaces
@@ -27,8 +27,8 @@ const _ = api.GoVppAPIPackageIsVersion2
const (
APIFile = "interface"
- APIVersion = "3.2.2"
- VersionCrc = 0x29a0076c
+ APIVersion = "3.2.3"
+ VersionCrc = 0x13ab947a
)
// CollectDetailedInterfaceStats defines message 'collect_detailed_interface_stats'.
@@ -1567,6 +1567,78 @@ func (m *SwInterfaceSetFlagsReply) Unmarshal(b []byte) error {
return nil
}
+// SwInterfaceSetInterfaceName defines message 'sw_interface_set_interface_name'.
+type SwInterfaceSetInterfaceName struct {
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ Name string `binapi:"string[64],name=name" json:"name,omitempty"`
+}
+
+func (m *SwInterfaceSetInterfaceName) Reset() { *m = SwInterfaceSetInterfaceName{} }
+func (*SwInterfaceSetInterfaceName) GetMessageName() string { return "sw_interface_set_interface_name" }
+func (*SwInterfaceSetInterfaceName) GetCrcString() string { return "45a1d548" }
+func (*SwInterfaceSetInterfaceName) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *SwInterfaceSetInterfaceName) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.SwIfIndex
+ size += 64 // m.Name
+ return size
+}
+func (m *SwInterfaceSetInterfaceName) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(uint32(m.SwIfIndex))
+ buf.EncodeString(m.Name, 64)
+ return buf.Bytes(), nil
+}
+func (m *SwInterfaceSetInterfaceName) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ m.Name = buf.DecodeString(64)
+ return nil
+}
+
+// SwInterfaceSetInterfaceNameReply defines message 'sw_interface_set_interface_name_reply'.
+type SwInterfaceSetInterfaceNameReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+}
+
+func (m *SwInterfaceSetInterfaceNameReply) Reset() { *m = SwInterfaceSetInterfaceNameReply{} }
+func (*SwInterfaceSetInterfaceNameReply) GetMessageName() string {
+ return "sw_interface_set_interface_name_reply"
+}
+func (*SwInterfaceSetInterfaceNameReply) GetCrcString() string { return "e8d4e804" }
+func (*SwInterfaceSetInterfaceNameReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *SwInterfaceSetInterfaceNameReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ return size
+}
+func (m *SwInterfaceSetInterfaceNameReply) 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 *SwInterfaceSetInterfaceNameReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ return nil
+}
+
// SwInterfaceSetIPDirectedBroadcast defines message 'sw_interface_set_ip_directed_broadcast'.
type SwInterfaceSetIPDirectedBroadcast struct {
SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
@@ -2096,6 +2168,95 @@ func (m *SwInterfaceSetTableReply) Unmarshal(b []byte) error {
return nil
}
+// SwInterfaceSetTxPlacement defines message 'sw_interface_set_tx_placement'.
+type SwInterfaceSetTxPlacement struct {
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ QueueID uint32 `binapi:"u32,name=queue_id" json:"queue_id,omitempty"`
+ ArraySize uint32 `binapi:"u32,name=array_size" json:"-"`
+ Threads []uint32 `binapi:"u32[array_size],name=threads" json:"threads,omitempty"`
+}
+
+func (m *SwInterfaceSetTxPlacement) Reset() { *m = SwInterfaceSetTxPlacement{} }
+func (*SwInterfaceSetTxPlacement) GetMessageName() string { return "sw_interface_set_tx_placement" }
+func (*SwInterfaceSetTxPlacement) GetCrcString() string { return "4e0cd5ff" }
+func (*SwInterfaceSetTxPlacement) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *SwInterfaceSetTxPlacement) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.SwIfIndex
+ size += 4 // m.QueueID
+ size += 4 // m.ArraySize
+ size += 4 * len(m.Threads) // m.Threads
+ return size
+}
+func (m *SwInterfaceSetTxPlacement) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(uint32(m.SwIfIndex))
+ buf.EncodeUint32(m.QueueID)
+ buf.EncodeUint32(uint32(len(m.Threads)))
+ for i := 0; i < len(m.Threads); i++ {
+ var x uint32
+ if i < len(m.Threads) {
+ x = uint32(m.Threads[i])
+ }
+ buf.EncodeUint32(x)
+ }
+ return buf.Bytes(), nil
+}
+func (m *SwInterfaceSetTxPlacement) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ m.QueueID = buf.DecodeUint32()
+ m.ArraySize = buf.DecodeUint32()
+ m.Threads = make([]uint32, m.ArraySize)
+ for i := 0; i < len(m.Threads); i++ {
+ m.Threads[i] = buf.DecodeUint32()
+ }
+ return nil
+}
+
+// SwInterfaceSetTxPlacementReply defines message 'sw_interface_set_tx_placement_reply'.
+type SwInterfaceSetTxPlacementReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+}
+
+func (m *SwInterfaceSetTxPlacementReply) Reset() { *m = SwInterfaceSetTxPlacementReply{} }
+func (*SwInterfaceSetTxPlacementReply) GetMessageName() string {
+ return "sw_interface_set_tx_placement_reply"
+}
+func (*SwInterfaceSetTxPlacementReply) GetCrcString() string { return "e8d4e804" }
+func (*SwInterfaceSetTxPlacementReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *SwInterfaceSetTxPlacementReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ return size
+}
+func (m *SwInterfaceSetTxPlacementReply) 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 *SwInterfaceSetTxPlacementReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ return nil
+}
+
// SwInterfaceSetUnnumbered defines message 'sw_interface_set_unnumbered'.
type SwInterfaceSetUnnumbered struct {
SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
@@ -2246,6 +2407,142 @@ func (m *SwInterfaceTagAddDelReply) Unmarshal(b []byte) error {
return nil
}
+// SwInterfaceTxPlacementDetails defines message 'sw_interface_tx_placement_details'.
+type SwInterfaceTxPlacementDetails struct {
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ QueueID uint32 `binapi:"u32,name=queue_id" json:"queue_id,omitempty"`
+ Shared uint8 `binapi:"u8,name=shared" json:"shared,omitempty"`
+ ArraySize uint32 `binapi:"u32,name=array_size" json:"-"`
+ Threads []uint32 `binapi:"u32[array_size],name=threads" json:"threads,omitempty"`
+}
+
+func (m *SwInterfaceTxPlacementDetails) Reset() { *m = SwInterfaceTxPlacementDetails{} }
+func (*SwInterfaceTxPlacementDetails) GetMessageName() string {
+ return "sw_interface_tx_placement_details"
+}
+func (*SwInterfaceTxPlacementDetails) GetCrcString() string { return "00381a2e" }
+func (*SwInterfaceTxPlacementDetails) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *SwInterfaceTxPlacementDetails) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.SwIfIndex
+ size += 4 // m.QueueID
+ size += 1 // m.Shared
+ size += 4 // m.ArraySize
+ size += 4 * len(m.Threads) // m.Threads
+ return size
+}
+func (m *SwInterfaceTxPlacementDetails) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(uint32(m.SwIfIndex))
+ buf.EncodeUint32(m.QueueID)
+ buf.EncodeUint8(m.Shared)
+ buf.EncodeUint32(uint32(len(m.Threads)))
+ for i := 0; i < len(m.Threads); i++ {
+ var x uint32
+ if i < len(m.Threads) {
+ x = uint32(m.Threads[i])
+ }
+ buf.EncodeUint32(x)
+ }
+ return buf.Bytes(), nil
+}
+func (m *SwInterfaceTxPlacementDetails) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ m.QueueID = buf.DecodeUint32()
+ m.Shared = buf.DecodeUint8()
+ m.ArraySize = buf.DecodeUint32()
+ m.Threads = make([]uint32, m.ArraySize)
+ for i := 0; i < len(m.Threads); i++ {
+ m.Threads[i] = buf.DecodeUint32()
+ }
+ return nil
+}
+
+// SwInterfaceTxPlacementGet defines message 'sw_interface_tx_placement_get'.
+type SwInterfaceTxPlacementGet 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 *SwInterfaceTxPlacementGet) Reset() { *m = SwInterfaceTxPlacementGet{} }
+func (*SwInterfaceTxPlacementGet) GetMessageName() string { return "sw_interface_tx_placement_get" }
+func (*SwInterfaceTxPlacementGet) GetCrcString() string { return "47250981" }
+func (*SwInterfaceTxPlacementGet) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *SwInterfaceTxPlacementGet) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Cursor
+ size += 4 // m.SwIfIndex
+ return size
+}
+func (m *SwInterfaceTxPlacementGet) 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 *SwInterfaceTxPlacementGet) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Cursor = buf.DecodeUint32()
+ m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ return nil
+}
+
+// SwInterfaceTxPlacementGetReply defines message 'sw_interface_tx_placement_get_reply'.
+type SwInterfaceTxPlacementGetReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"`
+}
+
+func (m *SwInterfaceTxPlacementGetReply) Reset() { *m = SwInterfaceTxPlacementGetReply{} }
+func (*SwInterfaceTxPlacementGetReply) GetMessageName() string {
+ return "sw_interface_tx_placement_get_reply"
+}
+func (*SwInterfaceTxPlacementGetReply) GetCrcString() string { return "53b48f5d" }
+func (*SwInterfaceTxPlacementGetReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *SwInterfaceTxPlacementGetReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ size += 4 // m.Cursor
+ return size
+}
+func (m *SwInterfaceTxPlacementGetReply) 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 *SwInterfaceTxPlacementGetReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ m.Cursor = buf.DecodeUint32()
+ return nil
+}
+
// WantInterfaceEvents defines message 'want_interface_events'.
type WantInterfaceEvents struct {
EnableDisable uint32 `binapi:"u32,name=enable_disable" json:"enable_disable,omitempty"`
@@ -2357,6 +2654,8 @@ func file_interfaces_binapi_init() {
api.RegisterMessage((*SwInterfaceRxPlacementDump)(nil), "sw_interface_rx_placement_dump_f9e6675e")
api.RegisterMessage((*SwInterfaceSetFlags)(nil), "sw_interface_set_flags_f5aec1b8")
api.RegisterMessage((*SwInterfaceSetFlagsReply)(nil), "sw_interface_set_flags_reply_e8d4e804")
+ api.RegisterMessage((*SwInterfaceSetInterfaceName)(nil), "sw_interface_set_interface_name_45a1d548")
+ api.RegisterMessage((*SwInterfaceSetInterfaceNameReply)(nil), "sw_interface_set_interface_name_reply_e8d4e804")
api.RegisterMessage((*SwInterfaceSetIPDirectedBroadcast)(nil), "sw_interface_set_ip_directed_broadcast_ae6cfcfb")
api.RegisterMessage((*SwInterfaceSetIPDirectedBroadcastReply)(nil), "sw_interface_set_ip_directed_broadcast_reply_e8d4e804")
api.RegisterMessage((*SwInterfaceSetMacAddress)(nil), "sw_interface_set_mac_address_c536e7eb")
@@ -2371,10 +2670,15 @@ func file_interfaces_binapi_init() {
api.RegisterMessage((*SwInterfaceSetRxPlacementReply)(nil), "sw_interface_set_rx_placement_reply_e8d4e804")
api.RegisterMessage((*SwInterfaceSetTable)(nil), "sw_interface_set_table_df42a577")
api.RegisterMessage((*SwInterfaceSetTableReply)(nil), "sw_interface_set_table_reply_e8d4e804")
+ api.RegisterMessage((*SwInterfaceSetTxPlacement)(nil), "sw_interface_set_tx_placement_4e0cd5ff")
+ api.RegisterMessage((*SwInterfaceSetTxPlacementReply)(nil), "sw_interface_set_tx_placement_reply_e8d4e804")
api.RegisterMessage((*SwInterfaceSetUnnumbered)(nil), "sw_interface_set_unnumbered_154a6439")
api.RegisterMessage((*SwInterfaceSetUnnumberedReply)(nil), "sw_interface_set_unnumbered_reply_e8d4e804")
api.RegisterMessage((*SwInterfaceTagAddDel)(nil), "sw_interface_tag_add_del_426f8bc1")
api.RegisterMessage((*SwInterfaceTagAddDelReply)(nil), "sw_interface_tag_add_del_reply_e8d4e804")
+ api.RegisterMessage((*SwInterfaceTxPlacementDetails)(nil), "sw_interface_tx_placement_details_00381a2e")
+ api.RegisterMessage((*SwInterfaceTxPlacementGet)(nil), "sw_interface_tx_placement_get_47250981")
+ api.RegisterMessage((*SwInterfaceTxPlacementGetReply)(nil), "sw_interface_tx_placement_get_reply_53b48f5d")
api.RegisterMessage((*WantInterfaceEvents)(nil), "want_interface_events_476f5a08")
api.RegisterMessage((*WantInterfaceEventsReply)(nil), "want_interface_events_reply_e8d4e804")
}
@@ -2421,6 +2725,8 @@ func AllMessages() []api.Message {
(*SwInterfaceRxPlacementDump)(nil),
(*SwInterfaceSetFlags)(nil),
(*SwInterfaceSetFlagsReply)(nil),
+ (*SwInterfaceSetInterfaceName)(nil),
+ (*SwInterfaceSetInterfaceNameReply)(nil),
(*SwInterfaceSetIPDirectedBroadcast)(nil),
(*SwInterfaceSetIPDirectedBroadcastReply)(nil),
(*SwInterfaceSetMacAddress)(nil),
@@ -2435,10 +2741,15 @@ func AllMessages() []api.Message {
(*SwInterfaceSetRxPlacementReply)(nil),
(*SwInterfaceSetTable)(nil),
(*SwInterfaceSetTableReply)(nil),
+ (*SwInterfaceSetTxPlacement)(nil),
+ (*SwInterfaceSetTxPlacementReply)(nil),
(*SwInterfaceSetUnnumbered)(nil),
(*SwInterfaceSetUnnumberedReply)(nil),
(*SwInterfaceTagAddDel)(nil),
(*SwInterfaceTagAddDelReply)(nil),
+ (*SwInterfaceTxPlacementDetails)(nil),
+ (*SwInterfaceTxPlacementGet)(nil),
+ (*SwInterfaceTxPlacementGetReply)(nil),
(*WantInterfaceEvents)(nil),
(*WantInterfaceEventsReply)(nil),
}
diff --git a/binapi/interface/interface_rpc.ba.go b/binapi/interface/interface_rpc.ba.go
index b00a7c2..e9ea945 100644
--- a/binapi/interface/interface_rpc.ba.go
+++ b/binapi/interface/interface_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service interface.
@@ -32,6 +32,7 @@ type RPCService interface {
SwInterfaceGetTable(ctx context.Context, in *SwInterfaceGetTable) (*SwInterfaceGetTableReply, error)
SwInterfaceRxPlacementDump(ctx context.Context, in *SwInterfaceRxPlacementDump) (RPCService_SwInterfaceRxPlacementDumpClient, error)
SwInterfaceSetFlags(ctx context.Context, in *SwInterfaceSetFlags) (*SwInterfaceSetFlagsReply, error)
+ SwInterfaceSetInterfaceName(ctx context.Context, in *SwInterfaceSetInterfaceName) (*SwInterfaceSetInterfaceNameReply, error)
SwInterfaceSetIPDirectedBroadcast(ctx context.Context, in *SwInterfaceSetIPDirectedBroadcast) (*SwInterfaceSetIPDirectedBroadcastReply, error)
SwInterfaceSetMacAddress(ctx context.Context, in *SwInterfaceSetMacAddress) (*SwInterfaceSetMacAddressReply, error)
SwInterfaceSetMtu(ctx context.Context, in *SwInterfaceSetMtu) (*SwInterfaceSetMtuReply, error)
@@ -39,8 +40,10 @@ type RPCService interface {
SwInterfaceSetRxMode(ctx context.Context, in *SwInterfaceSetRxMode) (*SwInterfaceSetRxModeReply, error)
SwInterfaceSetRxPlacement(ctx context.Context, in *SwInterfaceSetRxPlacement) (*SwInterfaceSetRxPlacementReply, error)
SwInterfaceSetTable(ctx context.Context, in *SwInterfaceSetTable) (*SwInterfaceSetTableReply, error)
+ SwInterfaceSetTxPlacement(ctx context.Context, in *SwInterfaceSetTxPlacement) (*SwInterfaceSetTxPlacementReply, error)
SwInterfaceSetUnnumbered(ctx context.Context, in *SwInterfaceSetUnnumbered) (*SwInterfaceSetUnnumberedReply, error)
SwInterfaceTagAddDel(ctx context.Context, in *SwInterfaceTagAddDel) (*SwInterfaceTagAddDelReply, error)
+ SwInterfaceTxPlacementGet(ctx context.Context, in *SwInterfaceTxPlacementGet) (RPCService_SwInterfaceTxPlacementGetClient, error)
WantInterfaceEvents(ctx context.Context, in *WantInterfaceEvents) (*WantInterfaceEventsReply, error)
}
@@ -187,7 +190,7 @@ func (c *serviceClient) SwInterfaceDump(ctx context.Context, in *SwInterfaceDump
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -210,7 +213,7 @@ func (c *serviceClient_SwInterfaceDumpClient) Recv() (*SwInterfaceDetails, error
switch m := msg.(type) {
case *SwInterfaceDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -248,7 +251,7 @@ func (c *serviceClient) SwInterfaceRxPlacementDump(ctx context.Context, in *SwIn
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -271,7 +274,7 @@ func (c *serviceClient_SwInterfaceRxPlacementDumpClient) Recv() (*SwInterfaceRxP
switch m := msg.(type) {
case *SwInterfaceRxPlacementDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -291,6 +294,15 @@ func (c *serviceClient) SwInterfaceSetFlags(ctx context.Context, in *SwInterface
return out, api.RetvalToVPPApiError(out.Retval)
}
+func (c *serviceClient) SwInterfaceSetInterfaceName(ctx context.Context, in *SwInterfaceSetInterfaceName) (*SwInterfaceSetInterfaceNameReply, error) {
+ out := new(SwInterfaceSetInterfaceNameReply)
+ err := c.conn.Invoke(ctx, in, out)
+ if err != nil {
+ return nil, err
+ }
+ return out, api.RetvalToVPPApiError(out.Retval)
+}
+
func (c *serviceClient) SwInterfaceSetIPDirectedBroadcast(ctx context.Context, in *SwInterfaceSetIPDirectedBroadcast) (*SwInterfaceSetIPDirectedBroadcastReply, error) {
out := new(SwInterfaceSetIPDirectedBroadcastReply)
err := c.conn.Invoke(ctx, in, out)
@@ -354,6 +366,15 @@ func (c *serviceClient) SwInterfaceSetTable(ctx context.Context, in *SwInterface
return out, api.RetvalToVPPApiError(out.Retval)
}
+func (c *serviceClient) SwInterfaceSetTxPlacement(ctx context.Context, in *SwInterfaceSetTxPlacement) (*SwInterfaceSetTxPlacementReply, error) {
+ out := new(SwInterfaceSetTxPlacementReply)
+ err := c.conn.Invoke(ctx, in, out)
+ if err != nil {
+ return nil, err
+ }
+ return out, api.RetvalToVPPApiError(out.Retval)
+}
+
func (c *serviceClient) SwInterfaceSetUnnumbered(ctx context.Context, in *SwInterfaceSetUnnumbered) (*SwInterfaceSetUnnumberedReply, error) {
out := new(SwInterfaceSetUnnumberedReply)
err := c.conn.Invoke(ctx, in, out)
@@ -372,6 +393,46 @@ func (c *serviceClient) SwInterfaceTagAddDel(ctx context.Context, in *SwInterfac
return out, api.RetvalToVPPApiError(out.Retval)
}
+func (c *serviceClient) SwInterfaceTxPlacementGet(ctx context.Context, in *SwInterfaceTxPlacementGet) (RPCService_SwInterfaceTxPlacementGetClient, error) {
+ stream, err := c.conn.NewStream(ctx)
+ if err != nil {
+ return nil, err
+ }
+ x := &serviceClient_SwInterfaceTxPlacementGetClient{stream}
+ if err := x.Stream.SendMsg(in); err != nil {
+ return nil, err
+ }
+ return x, nil
+}
+
+type RPCService_SwInterfaceTxPlacementGetClient interface {
+ Recv() (*SwInterfaceTxPlacementDetails, error)
+ api.Stream
+}
+
+type serviceClient_SwInterfaceTxPlacementGetClient struct {
+ api.Stream
+}
+
+func (c *serviceClient_SwInterfaceTxPlacementGetClient) Recv() (*SwInterfaceTxPlacementDetails, error) {
+ msg, err := c.Stream.RecvMsg()
+ if err != nil {
+ return nil, err
+ }
+ switch m := msg.(type) {
+ case *SwInterfaceTxPlacementDetails:
+ return m, nil
+ case *SwInterfaceTxPlacementGetReply:
+ 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) WantInterfaceEvents(ctx context.Context, in *WantInterfaceEvents) (*WantInterfaceEventsReply, error) {
out := new(WantInterfaceEventsReply)
err := c.conn.Invoke(ctx, in, out)
diff --git a/binapi/interface_types/interface_types.ba.go b/binapi/interface_types/interface_types.ba.go
index 4430853..585dc6a 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 f6f6abc..d05a6e1 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 544a849..f407471 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 caf4486..1c907dc 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 9545f8a..6ac92e3 100644
--- a/binapi/ip/ip.ba.go
+++ b/binapi/ip/ip.ba.go
@@ -1,15 +1,15 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
// binapi-generator: v0.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/core/ip.api.json
// Package ip contains generated bindings for API file ip.api.
//
// Contents:
// 2 enums
-// 6 structs
-// 81 messages
+// 7 structs
+// 87 messages
//
package ip
@@ -33,8 +33,8 @@ const _ = api.GoVppAPIPackageIsVersion2
const (
APIFile = "ip"
- APIVersion = "3.1.0"
- VersionCrc = 0x972432b4
+ APIVersion = "3.2.0"
+ VersionCrc = 0x557b5866
)
// IPReassType defines enum 'ip_reass_type'.
@@ -180,6 +180,165 @@ type PuntRedirect struct {
Nh ip_types.Address `binapi:"address,name=nh" json:"nh,omitempty"`
}
+// PuntRedirectV2 defines type 'punt_redirect_v2'.
+type PuntRedirectV2 struct {
+ RxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index,default=4294967295" json:"rx_sw_if_index,omitempty"`
+ Af ip_types.AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
+ NPaths uint32 `binapi:"u32,name=n_paths" json:"-"`
+ Paths []fib_types.FibPath `binapi:"fib_path[n_paths],name=paths" json:"paths,omitempty"`
+}
+
+// AddDelIPPuntRedirectV2 defines message 'add_del_ip_punt_redirect_v2'.
+type AddDelIPPuntRedirectV2 struct {
+ IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
+ Punt PuntRedirectV2 `binapi:"punt_redirect_v2,name=punt" json:"punt,omitempty"`
+}
+
+func (m *AddDelIPPuntRedirectV2) Reset() { *m = AddDelIPPuntRedirectV2{} }
+func (*AddDelIPPuntRedirectV2) GetMessageName() string { return "add_del_ip_punt_redirect_v2" }
+func (*AddDelIPPuntRedirectV2) GetCrcString() string { return "9e804227" }
+func (*AddDelIPPuntRedirectV2) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *AddDelIPPuntRedirectV2) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 1 // m.IsAdd
+ size += 4 // m.Punt.RxSwIfIndex
+ size += 1 // m.Punt.Af
+ size += 4 // m.Punt.NPaths
+ for j2 := 0; j2 < len(m.Punt.Paths); j2++ {
+ var s2 fib_types.FibPath
+ _ = s2
+ if j2 < len(m.Punt.Paths) {
+ s2 = m.Punt.Paths[j2]
+ }
+ size += 4 // s2.SwIfIndex
+ size += 4 // s2.TableID
+ size += 4 // s2.RpfID
+ size += 1 // s2.Weight
+ size += 1 // s2.Preference
+ size += 4 // s2.Type
+ size += 4 // s2.Flags
+ size += 4 // s2.Proto
+ size += 1 * 16 // s2.Nh.Address
+ size += 4 // s2.Nh.ViaLabel
+ size += 4 // s2.Nh.ObjID
+ size += 4 // s2.Nh.ClassifyTableIndex
+ size += 1 // s2.NLabels
+ for j3 := 0; j3 < 16; j3++ {
+ size += 1 // s2.LabelStack[j3].IsUniform
+ size += 4 // s2.LabelStack[j3].Label
+ size += 1 // s2.LabelStack[j3].TTL
+ size += 1 // s2.LabelStack[j3].Exp
+ }
+ }
+ return size
+}
+func (m *AddDelIPPuntRedirectV2) 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.Punt.RxSwIfIndex))
+ buf.EncodeUint8(uint8(m.Punt.Af))
+ buf.EncodeUint32(uint32(len(m.Punt.Paths)))
+ for j1 := 0; j1 < len(m.Punt.Paths); j1++ {
+ var v1 fib_types.FibPath // Paths
+ if j1 < len(m.Punt.Paths) {
+ v1 = m.Punt.Paths[j1]
+ }
+ buf.EncodeUint32(v1.SwIfIndex)
+ buf.EncodeUint32(v1.TableID)
+ buf.EncodeUint32(v1.RpfID)
+ buf.EncodeUint8(v1.Weight)
+ buf.EncodeUint8(v1.Preference)
+ buf.EncodeUint32(uint32(v1.Type))
+ buf.EncodeUint32(uint32(v1.Flags))
+ buf.EncodeUint32(uint32(v1.Proto))
+ buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
+ buf.EncodeUint32(v1.Nh.ViaLabel)
+ buf.EncodeUint32(v1.Nh.ObjID)
+ buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
+ buf.EncodeUint8(v1.NLabels)
+ for j2 := 0; j2 < 16; j2++ {
+ buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
+ buf.EncodeUint32(v1.LabelStack[j2].Label)
+ buf.EncodeUint8(v1.LabelStack[j2].TTL)
+ buf.EncodeUint8(v1.LabelStack[j2].Exp)
+ }
+ }
+ return buf.Bytes(), nil
+}
+func (m *AddDelIPPuntRedirectV2) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.IsAdd = buf.DecodeBool()
+ m.Punt.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ m.Punt.Af = ip_types.AddressFamily(buf.DecodeUint8())
+ m.Punt.NPaths = buf.DecodeUint32()
+ m.Punt.Paths = make([]fib_types.FibPath, m.Punt.NPaths)
+ for j1 := 0; j1 < len(m.Punt.Paths); j1++ {
+ m.Punt.Paths[j1].SwIfIndex = buf.DecodeUint32()
+ m.Punt.Paths[j1].TableID = buf.DecodeUint32()
+ m.Punt.Paths[j1].RpfID = buf.DecodeUint32()
+ m.Punt.Paths[j1].Weight = buf.DecodeUint8()
+ m.Punt.Paths[j1].Preference = buf.DecodeUint8()
+ m.Punt.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
+ m.Punt.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
+ m.Punt.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
+ copy(m.Punt.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
+ m.Punt.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
+ m.Punt.Paths[j1].Nh.ObjID = buf.DecodeUint32()
+ m.Punt.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
+ m.Punt.Paths[j1].NLabels = buf.DecodeUint8()
+ for j2 := 0; j2 < 16; j2++ {
+ m.Punt.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
+ m.Punt.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
+ m.Punt.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
+ m.Punt.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
+ }
+ }
+ return nil
+}
+
+// AddDelIPPuntRedirectV2Reply defines message 'add_del_ip_punt_redirect_v2_reply'.
+type AddDelIPPuntRedirectV2Reply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+}
+
+func (m *AddDelIPPuntRedirectV2Reply) Reset() { *m = AddDelIPPuntRedirectV2Reply{} }
+func (*AddDelIPPuntRedirectV2Reply) GetMessageName() string {
+ return "add_del_ip_punt_redirect_v2_reply"
+}
+func (*AddDelIPPuntRedirectV2Reply) GetCrcString() string { return "e8d4e804" }
+func (*AddDelIPPuntRedirectV2Reply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *AddDelIPPuntRedirectV2Reply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ return size
+}
+func (m *AddDelIPPuntRedirectV2Reply) 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 *AddDelIPPuntRedirectV2Reply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ return nil
+}
+
// IoamDisable defines message 'ioam_disable'.
type IoamDisable struct {
ID uint16 `binapi:"u16,name=id" json:"id,omitempty"`
@@ -1438,6 +1597,7 @@ func (m *IPPuntPoliceReply) Unmarshal(b []byte) error {
}
// IPPuntRedirect defines message 'ip_punt_redirect'.
+// Deprecated: the message will be removed in the future versions
type IPPuntRedirect struct {
Punt PuntRedirect `binapi:"punt_redirect,name=punt" json:"punt,omitempty"`
IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
@@ -1563,6 +1723,7 @@ func (m *IPPuntRedirectDump) Unmarshal(b []byte) error {
}
// IPPuntRedirectReply defines message 'ip_punt_redirect_reply'.
+// Deprecated: the message will be removed in the future versions
type IPPuntRedirectReply struct {
Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
@@ -1595,6 +1756,155 @@ func (m *IPPuntRedirectReply) Unmarshal(b []byte) error {
return nil
}
+// IPPuntRedirectV2Details defines message 'ip_punt_redirect_v2_details'.
+type IPPuntRedirectV2Details struct {
+ Punt PuntRedirectV2 `binapi:"punt_redirect_v2,name=punt" json:"punt,omitempty"`
+}
+
+func (m *IPPuntRedirectV2Details) Reset() { *m = IPPuntRedirectV2Details{} }
+func (*IPPuntRedirectV2Details) GetMessageName() string { return "ip_punt_redirect_v2_details" }
+func (*IPPuntRedirectV2Details) GetCrcString() string { return "7ba42e1d" }
+func (*IPPuntRedirectV2Details) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *IPPuntRedirectV2Details) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Punt.RxSwIfIndex
+ size += 1 // m.Punt.Af
+ size += 4 // m.Punt.NPaths
+ for j2 := 0; j2 < len(m.Punt.Paths); j2++ {
+ var s2 fib_types.FibPath
+ _ = s2
+ if j2 < len(m.Punt.Paths) {
+ s2 = m.Punt.Paths[j2]
+ }
+ size += 4 // s2.SwIfIndex
+ size += 4 // s2.TableID
+ size += 4 // s2.RpfID
+ size += 1 // s2.Weight
+ size += 1 // s2.Preference
+ size += 4 // s2.Type
+ size += 4 // s2.Flags
+ size += 4 // s2.Proto
+ size += 1 * 16 // s2.Nh.Address
+ size += 4 // s2.Nh.ViaLabel
+ size += 4 // s2.Nh.ObjID
+ size += 4 // s2.Nh.ClassifyTableIndex
+ size += 1 // s2.NLabels
+ for j3 := 0; j3 < 16; j3++ {
+ size += 1 // s2.LabelStack[j3].IsUniform
+ size += 4 // s2.LabelStack[j3].Label
+ size += 1 // s2.LabelStack[j3].TTL
+ size += 1 // s2.LabelStack[j3].Exp
+ }
+ }
+ return size
+}
+func (m *IPPuntRedirectV2Details) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(uint32(m.Punt.RxSwIfIndex))
+ buf.EncodeUint8(uint8(m.Punt.Af))
+ buf.EncodeUint32(uint32(len(m.Punt.Paths)))
+ for j1 := 0; j1 < len(m.Punt.Paths); j1++ {
+ var v1 fib_types.FibPath // Paths
+ if j1 < len(m.Punt.Paths) {
+ v1 = m.Punt.Paths[j1]
+ }
+ buf.EncodeUint32(v1.SwIfIndex)
+ buf.EncodeUint32(v1.TableID)
+ buf.EncodeUint32(v1.RpfID)
+ buf.EncodeUint8(v1.Weight)
+ buf.EncodeUint8(v1.Preference)
+ buf.EncodeUint32(uint32(v1.Type))
+ buf.EncodeUint32(uint32(v1.Flags))
+ buf.EncodeUint32(uint32(v1.Proto))
+ buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
+ buf.EncodeUint32(v1.Nh.ViaLabel)
+ buf.EncodeUint32(v1.Nh.ObjID)
+ buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
+ buf.EncodeUint8(v1.NLabels)
+ for j2 := 0; j2 < 16; j2++ {
+ buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
+ buf.EncodeUint32(v1.LabelStack[j2].Label)
+ buf.EncodeUint8(v1.LabelStack[j2].TTL)
+ buf.EncodeUint8(v1.LabelStack[j2].Exp)
+ }
+ }
+ return buf.Bytes(), nil
+}
+func (m *IPPuntRedirectV2Details) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Punt.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ m.Punt.Af = ip_types.AddressFamily(buf.DecodeUint8())
+ m.Punt.NPaths = buf.DecodeUint32()
+ m.Punt.Paths = make([]fib_types.FibPath, m.Punt.NPaths)
+ for j1 := 0; j1 < len(m.Punt.Paths); j1++ {
+ m.Punt.Paths[j1].SwIfIndex = buf.DecodeUint32()
+ m.Punt.Paths[j1].TableID = buf.DecodeUint32()
+ m.Punt.Paths[j1].RpfID = buf.DecodeUint32()
+ m.Punt.Paths[j1].Weight = buf.DecodeUint8()
+ m.Punt.Paths[j1].Preference = buf.DecodeUint8()
+ m.Punt.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32())
+ m.Punt.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32())
+ m.Punt.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32())
+ copy(m.Punt.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
+ m.Punt.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
+ m.Punt.Paths[j1].Nh.ObjID = buf.DecodeUint32()
+ m.Punt.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
+ m.Punt.Paths[j1].NLabels = buf.DecodeUint8()
+ for j2 := 0; j2 < 16; j2++ {
+ m.Punt.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
+ m.Punt.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
+ m.Punt.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
+ m.Punt.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
+ }
+ }
+ return nil
+}
+
+// IPPuntRedirectV2Dump defines message 'ip_punt_redirect_v2_dump'.
+type IPPuntRedirectV2Dump struct {
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ Af ip_types.AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
+}
+
+func (m *IPPuntRedirectV2Dump) Reset() { *m = IPPuntRedirectV2Dump{} }
+func (*IPPuntRedirectV2Dump) GetMessageName() string { return "ip_punt_redirect_v2_dump" }
+func (*IPPuntRedirectV2Dump) GetCrcString() string { return "d817a484" }
+func (*IPPuntRedirectV2Dump) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *IPPuntRedirectV2Dump) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.SwIfIndex
+ size += 1 // m.Af
+ return size
+}
+func (m *IPPuntRedirectV2Dump) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(uint32(m.SwIfIndex))
+ buf.EncodeUint8(uint8(m.Af))
+ return buf.Bytes(), nil
+}
+func (m *IPPuntRedirectV2Dump) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ m.Af = ip_types.AddressFamily(buf.DecodeUint8())
+ return nil
+}
+
// IPReassemblyEnableDisable defines message 'ip_reassembly_enable_disable'.
type IPReassemblyEnableDisable struct {
SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
@@ -3150,6 +3460,88 @@ func (m *IPTableAddDelReply) Unmarshal(b []byte) error {
return nil
}
+// IPTableAllocate defines message 'ip_table_allocate'.
+type IPTableAllocate struct {
+ Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
+}
+
+func (m *IPTableAllocate) Reset() { *m = IPTableAllocate{} }
+func (*IPTableAllocate) GetMessageName() string { return "ip_table_allocate" }
+func (*IPTableAllocate) GetCrcString() string { return "b9d2e09e" }
+func (*IPTableAllocate) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *IPTableAllocate) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Table.TableID
+ size += 1 // m.Table.IsIP6
+ size += 64 // m.Table.Name
+ return size
+}
+func (m *IPTableAllocate) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.Table.TableID)
+ buf.EncodeBool(m.Table.IsIP6)
+ buf.EncodeString(m.Table.Name, 64)
+ return buf.Bytes(), nil
+}
+func (m *IPTableAllocate) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Table.TableID = buf.DecodeUint32()
+ m.Table.IsIP6 = buf.DecodeBool()
+ m.Table.Name = buf.DecodeString(64)
+ return nil
+}
+
+// IPTableAllocateReply defines message 'ip_table_allocate_reply'.
+type IPTableAllocateReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
+}
+
+func (m *IPTableAllocateReply) Reset() { *m = IPTableAllocateReply{} }
+func (*IPTableAllocateReply) GetMessageName() string { return "ip_table_allocate_reply" }
+func (*IPTableAllocateReply) GetCrcString() string { return "1728303a" }
+func (*IPTableAllocateReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *IPTableAllocateReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ size += 4 // m.Table.TableID
+ size += 1 // m.Table.IsIP6
+ size += 64 // m.Table.Name
+ return size
+}
+func (m *IPTableAllocateReply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint32(m.Table.TableID)
+ buf.EncodeBool(m.Table.IsIP6)
+ buf.EncodeString(m.Table.Name, 64)
+ return buf.Bytes(), nil
+}
+func (m *IPTableAllocateReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ m.Table.TableID = buf.DecodeUint32()
+ m.Table.IsIP6 = buf.DecodeBool()
+ m.Table.Name = buf.DecodeString(64)
+ return nil
+}
+
// IPTableDetails defines message 'ip_table_details'.
type IPTableDetails struct {
Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
@@ -4054,6 +4446,8 @@ func (m *SwInterfaceIP6SetLinkLocalAddressReply) Unmarshal(b []byte) error {
func init() { file_ip_binapi_init() }
func file_ip_binapi_init() {
+ api.RegisterMessage((*AddDelIPPuntRedirectV2)(nil), "add_del_ip_punt_redirect_v2_9e804227")
+ api.RegisterMessage((*AddDelIPPuntRedirectV2Reply)(nil), "add_del_ip_punt_redirect_v2_reply_e8d4e804")
api.RegisterMessage((*IoamDisable)(nil), "ioam_disable_6b16a45e")
api.RegisterMessage((*IoamDisableReply)(nil), "ioam_disable_reply_e8d4e804")
api.RegisterMessage((*IoamEnable)(nil), "ioam_enable_51ccd868")
@@ -4087,6 +4481,8 @@ func file_ip_binapi_init() {
api.RegisterMessage((*IPPuntRedirectDetails)(nil), "ip_punt_redirect_details_2cef63e7")
api.RegisterMessage((*IPPuntRedirectDump)(nil), "ip_punt_redirect_dump_2d033de4")
api.RegisterMessage((*IPPuntRedirectReply)(nil), "ip_punt_redirect_reply_e8d4e804")
+ api.RegisterMessage((*IPPuntRedirectV2Details)(nil), "ip_punt_redirect_v2_details_7ba42e1d")
+ api.RegisterMessage((*IPPuntRedirectV2Dump)(nil), "ip_punt_redirect_v2_dump_d817a484")
api.RegisterMessage((*IPReassemblyEnableDisable)(nil), "ip_reassembly_enable_disable_eb77968d")
api.RegisterMessage((*IPReassemblyEnableDisableReply)(nil), "ip_reassembly_enable_disable_reply_e8d4e804")
api.RegisterMessage((*IPReassemblyGet)(nil), "ip_reassembly_get_ea13ff63")
@@ -4111,6 +4507,8 @@ func file_ip_binapi_init() {
api.RegisterMessage((*IPSourceAndPortRangeCheckInterfaceAddDelReply)(nil), "ip_source_and_port_range_check_interface_add_del_reply_e8d4e804")
api.RegisterMessage((*IPTableAddDel)(nil), "ip_table_add_del_0ffdaec0")
api.RegisterMessage((*IPTableAddDelReply)(nil), "ip_table_add_del_reply_e8d4e804")
+ api.RegisterMessage((*IPTableAllocate)(nil), "ip_table_allocate_b9d2e09e")
+ api.RegisterMessage((*IPTableAllocateReply)(nil), "ip_table_allocate_reply_1728303a")
api.RegisterMessage((*IPTableDetails)(nil), "ip_table_details_c79fca0f")
api.RegisterMessage((*IPTableDump)(nil), "ip_table_dump_51077d14")
api.RegisterMessage((*IPTableFlush)(nil), "ip_table_flush_b9d2e09e")
@@ -4140,6 +4538,8 @@ func file_ip_binapi_init() {
// Messages returns list of all messages in this module.
func AllMessages() []api.Message {
return []api.Message{
+ (*AddDelIPPuntRedirectV2)(nil),
+ (*AddDelIPPuntRedirectV2Reply)(nil),
(*IoamDisable)(nil),
(*IoamDisableReply)(nil),
(*IoamEnable)(nil),
@@ -4173,6 +4573,8 @@ func AllMessages() []api.Message {
(*IPPuntRedirectDetails)(nil),
(*IPPuntRedirectDump)(nil),
(*IPPuntRedirectReply)(nil),
+ (*IPPuntRedirectV2Details)(nil),
+ (*IPPuntRedirectV2Dump)(nil),
(*IPReassemblyEnableDisable)(nil),
(*IPReassemblyEnableDisableReply)(nil),
(*IPReassemblyGet)(nil),
@@ -4197,6 +4599,8 @@ func AllMessages() []api.Message {
(*IPSourceAndPortRangeCheckInterfaceAddDelReply)(nil),
(*IPTableAddDel)(nil),
(*IPTableAddDelReply)(nil),
+ (*IPTableAllocate)(nil),
+ (*IPTableAllocateReply)(nil),
(*IPTableDetails)(nil),
(*IPTableDump)(nil),
(*IPTableFlush)(nil),
diff --git a/binapi/ip/ip_rpc.ba.go b/binapi/ip/ip_rpc.ba.go
index d40089b..6e78673 100644
--- a/binapi/ip/ip_rpc.ba.go
+++ b/binapi/ip/ip_rpc.ba.go
@@ -8,11 +8,12 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service ip.
type RPCService interface {
+ AddDelIPPuntRedirectV2(ctx context.Context, in *AddDelIPPuntRedirectV2) (*AddDelIPPuntRedirectV2Reply, error)
IoamDisable(ctx context.Context, in *IoamDisable) (*IoamDisableReply, error)
IoamEnable(ctx context.Context, in *IoamEnable) (*IoamEnableReply, error)
IPAddressDump(ctx context.Context, in *IPAddressDump) (RPCService_IPAddressDumpClient, error)
@@ -29,6 +30,7 @@ type RPCService interface {
IPPuntPolice(ctx context.Context, in *IPPuntPolice) (*IPPuntPoliceReply, error)
IPPuntRedirect(ctx context.Context, in *IPPuntRedirect) (*IPPuntRedirectReply, error)
IPPuntRedirectDump(ctx context.Context, in *IPPuntRedirectDump) (RPCService_IPPuntRedirectDumpClient, error)
+ IPPuntRedirectV2Dump(ctx context.Context, in *IPPuntRedirectV2Dump) (RPCService_IPPuntRedirectV2DumpClient, error)
IPReassemblyEnableDisable(ctx context.Context, in *IPReassemblyEnableDisable) (*IPReassemblyEnableDisableReply, error)
IPReassemblyGet(ctx context.Context, in *IPReassemblyGet) (*IPReassemblyGetReply, error)
IPReassemblySet(ctx context.Context, in *IPReassemblySet) (*IPReassemblySetReply, error)
@@ -41,6 +43,7 @@ type RPCService interface {
IPSourceAndPortRangeCheckAddDel(ctx context.Context, in *IPSourceAndPortRangeCheckAddDel) (*IPSourceAndPortRangeCheckAddDelReply, error)
IPSourceAndPortRangeCheckInterfaceAddDel(ctx context.Context, in *IPSourceAndPortRangeCheckInterfaceAddDel) (*IPSourceAndPortRangeCheckInterfaceAddDelReply, error)
IPTableAddDel(ctx context.Context, in *IPTableAddDel) (*IPTableAddDelReply, error)
+ IPTableAllocate(ctx context.Context, in *IPTableAllocate) (*IPTableAllocateReply, error)
IPTableDump(ctx context.Context, in *IPTableDump) (RPCService_IPTableDumpClient, error)
IPTableFlush(ctx context.Context, in *IPTableFlush) (*IPTableFlushReply, error)
IPTableReplaceBegin(ctx context.Context, in *IPTableReplaceBegin) (*IPTableReplaceBeginReply, error)
@@ -63,6 +66,15 @@ func NewServiceClient(conn api.Connection) RPCService {
return &serviceClient{conn}
}
+func (c *serviceClient) AddDelIPPuntRedirectV2(ctx context.Context, in *AddDelIPPuntRedirectV2) (*AddDelIPPuntRedirectV2Reply, error) {
+ out := new(AddDelIPPuntRedirectV2Reply)
+ err := c.conn.Invoke(ctx, in, out)
+ if err != nil {
+ return nil, err
+ }
+ return out, api.RetvalToVPPApiError(out.Retval)
+}
+
func (c *serviceClient) IoamDisable(ctx context.Context, in *IoamDisable) (*IoamDisableReply, error) {
out := new(IoamDisableReply)
err := c.conn.Invoke(ctx, in, out)
@@ -90,7 +102,7 @@ func (c *serviceClient) IPAddressDump(ctx context.Context, in *IPAddressDump) (R
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -113,7 +125,7 @@ func (c *serviceClient_IPAddressDumpClient) Recv() (*IPAddressDetails, error) {
switch m := msg.(type) {
case *IPAddressDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -142,7 +154,7 @@ func (c *serviceClient) IPContainerProxyDump(ctx context.Context, in *IPContaine
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -165,7 +177,7 @@ func (c *serviceClient_IPContainerProxyDumpClient) Recv() (*IPContainerProxyDeta
switch m := msg.(type) {
case *IPContainerProxyDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -185,7 +197,7 @@ func (c *serviceClient) IPDump(ctx context.Context, in *IPDump) (RPCService_IPDu
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -208,7 +220,7 @@ func (c *serviceClient_IPDumpClient) Recv() (*IPDetails, error) {
switch m := msg.(type) {
case *IPDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -237,7 +249,7 @@ func (c *serviceClient) IPMrouteDump(ctx context.Context, in *IPMrouteDump) (RPC
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -260,7 +272,7 @@ func (c *serviceClient_IPMrouteDumpClient) Recv() (*IPMrouteDetails, error) {
switch m := msg.(type) {
case *IPMrouteDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -280,7 +292,7 @@ func (c *serviceClient) IPMtableDump(ctx context.Context, in *IPMtableDump) (RPC
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -303,7 +315,7 @@ func (c *serviceClient_IPMtableDumpClient) Recv() (*IPMtableDetails, error) {
switch m := msg.(type) {
case *IPMtableDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -408,7 +420,7 @@ func (c *serviceClient) IPPuntRedirectDump(ctx context.Context, in *IPPuntRedire
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -431,7 +443,50 @@ func (c *serviceClient_IPPuntRedirectDumpClient) Recv() (*IPPuntRedirectDetails,
switch m := msg.(type) {
case *IPPuntRedirectDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
+ err = c.Stream.Close()
+ if err != nil {
+ return nil, err
+ }
+ return nil, io.EOF
+ default:
+ return nil, fmt.Errorf("unexpected message: %T %v", m, m)
+ }
+}
+
+func (c *serviceClient) IPPuntRedirectV2Dump(ctx context.Context, in *IPPuntRedirectV2Dump) (RPCService_IPPuntRedirectV2DumpClient, error) {
+ stream, err := c.conn.NewStream(ctx)
+ if err != nil {
+ return nil, err
+ }
+ x := &serviceClient_IPPuntRedirectV2DumpClient{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_IPPuntRedirectV2DumpClient interface {
+ Recv() (*IPPuntRedirectV2Details, error)
+ api.Stream
+}
+
+type serviceClient_IPPuntRedirectV2DumpClient struct {
+ api.Stream
+}
+
+func (c *serviceClient_IPPuntRedirectV2DumpClient) Recv() (*IPPuntRedirectV2Details, error) {
+ msg, err := c.Stream.RecvMsg()
+ if err != nil {
+ return nil, err
+ }
+ switch m := msg.(type) {
+ case *IPPuntRedirectV2Details:
+ return m, nil
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -496,7 +551,7 @@ func (c *serviceClient) IPRouteDump(ctx context.Context, in *IPRouteDump) (RPCSe
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -519,7 +574,7 @@ func (c *serviceClient_IPRouteDumpClient) Recv() (*IPRouteDetails, error) {
switch m := msg.(type) {
case *IPRouteDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -557,7 +612,7 @@ func (c *serviceClient) IPRouteV2Dump(ctx context.Context, in *IPRouteV2Dump) (R
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -580,7 +635,7 @@ func (c *serviceClient_IPRouteV2DumpClient) Recv() (*IPRouteV2Details, error) {
switch m := msg.(type) {
case *IPRouteV2Details:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -618,6 +673,15 @@ func (c *serviceClient) IPTableAddDel(ctx context.Context, in *IPTableAddDel) (*
return out, api.RetvalToVPPApiError(out.Retval)
}
+func (c *serviceClient) IPTableAllocate(ctx context.Context, in *IPTableAllocate) (*IPTableAllocateReply, error) {
+ out := new(IPTableAllocateReply)
+ err := c.conn.Invoke(ctx, in, out)
+ if err != nil {
+ return nil, err
+ }
+ return out, api.RetvalToVPPApiError(out.Retval)
+}
+
func (c *serviceClient) IPTableDump(ctx context.Context, in *IPTableDump) (RPCService_IPTableDumpClient, error) {
stream, err := c.conn.NewStream(ctx)
if err != nil {
@@ -627,7 +691,7 @@ func (c *serviceClient) IPTableDump(ctx context.Context, in *IPTableDump) (RPCSe
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -650,7 +714,7 @@ func (c *serviceClient_IPTableDumpClient) Recv() (*IPTableDetails, error) {
switch m := msg.(type) {
case *IPTableDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -697,7 +761,7 @@ func (c *serviceClient) IPUnnumberedDump(ctx context.Context, in *IPUnnumberedDu
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -720,7 +784,7 @@ func (c *serviceClient_IPUnnumberedDumpClient) Recv() (*IPUnnumberedDetails, err
switch m := msg.(type) {
case *IPUnnumberedDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -740,7 +804,7 @@ func (c *serviceClient) MfibSignalDump(ctx context.Context, in *MfibSignalDump)
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -763,7 +827,7 @@ func (c *serviceClient_MfibSignalDumpClient) Recv() (*MfibSignalDetails, error)
switch m := msg.(type) {
case *MfibSignalDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/ip6_nd/ip6_nd.ba.go b/binapi/ip6_nd/ip6_nd.ba.go
index a996a6a..6a86c09 100644
--- a/binapi/ip6_nd/ip6_nd.ba.go
+++ b/binapi/ip6_nd/ip6_nd.ba.go
@@ -1,14 +1,14 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
// binapi-generator: v0.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/core/ip6_nd.api.json
// Package ip6_nd contains generated bindings for API file ip6_nd.api.
//
// Contents:
// 1 struct
-// 13 messages
+// 15 messages
//
package ip6_nd
@@ -28,7 +28,7 @@ const _ = api.GoVppAPIPackageIsVersion2
const (
APIFile = "ip6_nd"
APIVersion = "1.0.0"
- VersionCrc = 0x90f5895b
+ VersionCrc = 0x64750117
)
// IP6RaPrefixInfo defines type 'ip6_ra_prefix_info'.
@@ -277,6 +277,78 @@ func (m *IP6ndProxyDump) Unmarshal(b []byte) error {
return nil
}
+// IP6ndProxyEnableDisable defines message 'ip6nd_proxy_enable_disable'.
+type IP6ndProxyEnableDisable struct {
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ IsEnable bool `binapi:"bool,name=is_enable" json:"is_enable,omitempty"`
+}
+
+func (m *IP6ndProxyEnableDisable) Reset() { *m = IP6ndProxyEnableDisable{} }
+func (*IP6ndProxyEnableDisable) GetMessageName() string { return "ip6nd_proxy_enable_disable" }
+func (*IP6ndProxyEnableDisable) GetCrcString() string { return "7daa1e3a" }
+func (*IP6ndProxyEnableDisable) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *IP6ndProxyEnableDisable) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.SwIfIndex
+ size += 1 // m.IsEnable
+ return size
+}
+func (m *IP6ndProxyEnableDisable) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(uint32(m.SwIfIndex))
+ buf.EncodeBool(m.IsEnable)
+ return buf.Bytes(), nil
+}
+func (m *IP6ndProxyEnableDisable) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ m.IsEnable = buf.DecodeBool()
+ return nil
+}
+
+// IP6ndProxyEnableDisableReply defines message 'ip6nd_proxy_enable_disable_reply'.
+type IP6ndProxyEnableDisableReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+}
+
+func (m *IP6ndProxyEnableDisableReply) Reset() { *m = IP6ndProxyEnableDisableReply{} }
+func (*IP6ndProxyEnableDisableReply) GetMessageName() string {
+ return "ip6nd_proxy_enable_disable_reply"
+}
+func (*IP6ndProxyEnableDisableReply) GetCrcString() string { return "e8d4e804" }
+func (*IP6ndProxyEnableDisableReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *IP6ndProxyEnableDisableReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ return size
+}
+func (m *IP6ndProxyEnableDisableReply) 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 *IP6ndProxyEnableDisableReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ return nil
+}
+
// IP6ndSendRouterSolicitation defines message 'ip6nd_send_router_solicitation'.
type IP6ndSendRouterSolicitation struct {
Irt uint32 `binapi:"u32,name=irt" json:"irt,omitempty"`
@@ -672,6 +744,8 @@ func file_ip6_nd_binapi_init() {
api.RegisterMessage((*IP6ndProxyAddDelReply)(nil), "ip6nd_proxy_add_del_reply_e8d4e804")
api.RegisterMessage((*IP6ndProxyDetails)(nil), "ip6nd_proxy_details_30b9ff4a")
api.RegisterMessage((*IP6ndProxyDump)(nil), "ip6nd_proxy_dump_51077d14")
+ api.RegisterMessage((*IP6ndProxyEnableDisable)(nil), "ip6nd_proxy_enable_disable_7daa1e3a")
+ api.RegisterMessage((*IP6ndProxyEnableDisableReply)(nil), "ip6nd_proxy_enable_disable_reply_e8d4e804")
api.RegisterMessage((*IP6ndSendRouterSolicitation)(nil), "ip6nd_send_router_solicitation_e5de609c")
api.RegisterMessage((*IP6ndSendRouterSolicitationReply)(nil), "ip6nd_send_router_solicitation_reply_e8d4e804")
api.RegisterMessage((*SwInterfaceIP6ndRaConfig)(nil), "sw_interface_ip6nd_ra_config_3eb00b1c")
@@ -690,6 +764,8 @@ func AllMessages() []api.Message {
(*IP6ndProxyAddDelReply)(nil),
(*IP6ndProxyDetails)(nil),
(*IP6ndProxyDump)(nil),
+ (*IP6ndProxyEnableDisable)(nil),
+ (*IP6ndProxyEnableDisableReply)(nil),
(*IP6ndSendRouterSolicitation)(nil),
(*IP6ndSendRouterSolicitationReply)(nil),
(*SwInterfaceIP6ndRaConfig)(nil),
diff --git a/binapi/ip6_nd/ip6_nd_rpc.ba.go b/binapi/ip6_nd/ip6_nd_rpc.ba.go
index 983f8b6..9194de6 100644
--- a/binapi/ip6_nd/ip6_nd_rpc.ba.go
+++ b/binapi/ip6_nd/ip6_nd_rpc.ba.go
@@ -8,13 +8,14 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service ip6_nd.
type RPCService interface {
IP6ndProxyAddDel(ctx context.Context, in *IP6ndProxyAddDel) (*IP6ndProxyAddDelReply, error)
IP6ndProxyDump(ctx context.Context, in *IP6ndProxyDump) (RPCService_IP6ndProxyDumpClient, error)
+ IP6ndProxyEnableDisable(ctx context.Context, in *IP6ndProxyEnableDisable) (*IP6ndProxyEnableDisableReply, error)
IP6ndSendRouterSolicitation(ctx context.Context, in *IP6ndSendRouterSolicitation) (*IP6ndSendRouterSolicitationReply, error)
SwInterfaceIP6ndRaConfig(ctx context.Context, in *SwInterfaceIP6ndRaConfig) (*SwInterfaceIP6ndRaConfigReply, error)
SwInterfaceIP6ndRaPrefix(ctx context.Context, in *SwInterfaceIP6ndRaPrefix) (*SwInterfaceIP6ndRaPrefixReply, error)
@@ -47,7 +48,7 @@ func (c *serviceClient) IP6ndProxyDump(ctx context.Context, in *IP6ndProxyDump)
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -70,7 +71,7 @@ func (c *serviceClient_IP6ndProxyDumpClient) Recv() (*IP6ndProxyDetails, error)
switch m := msg.(type) {
case *IP6ndProxyDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -81,6 +82,15 @@ func (c *serviceClient_IP6ndProxyDumpClient) Recv() (*IP6ndProxyDetails, error)
}
}
+func (c *serviceClient) IP6ndProxyEnableDisable(ctx context.Context, in *IP6ndProxyEnableDisable) (*IP6ndProxyEnableDisableReply, error) {
+ out := new(IP6ndProxyEnableDisableReply)
+ err := c.conn.Invoke(ctx, in, out)
+ if err != nil {
+ return nil, err
+ }
+ return out, api.RetvalToVPPApiError(out.Retval)
+}
+
func (c *serviceClient) IP6ndSendRouterSolicitation(ctx context.Context, in *IP6ndSendRouterSolicitation) (*IP6ndSendRouterSolicitationReply, error) {
out := new(IP6ndSendRouterSolicitationReply)
err := c.conn.Invoke(ctx, in, out)
diff --git a/binapi/ip_neighbor/ip_neighbor.ba.go b/binapi/ip_neighbor/ip_neighbor.ba.go
index e8ce511..195c75a 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/core/ip_neighbor.api.json
// Package ip_neighbor contains generated bindings for API file ip_neighbor.api.
diff --git a/binapi/ip_neighbor/ip_neighbor_rpc.ba.go b/binapi/ip_neighbor/ip_neighbor_rpc.ba.go
index 727c12f..2f53279 100644
--- a/binapi/ip_neighbor/ip_neighbor_rpc.ba.go
+++ b/binapi/ip_neighbor/ip_neighbor_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service ip_neighbor.
@@ -58,7 +58,7 @@ func (c *serviceClient) IPNeighborDump(ctx context.Context, in *IPNeighborDump)
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -81,7 +81,7 @@ func (c *serviceClient_IPNeighborDumpClient) Recv() (*IPNeighborDetails, error)
switch m := msg.(type) {
case *IPNeighborDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/ip_types/ip_types.ba.go b/binapi/ip_types/ip_types.ba.go
index 4b99434..ff679ca 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 5809135..c7c923a 100644
--- a/binapi/ipfix_export/ipfix_export.ba.go
+++ b/binapi/ipfix_export/ipfix_export.ba.go
@@ -1,13 +1,13 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
// binapi-generator: v0.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/core/ipfix_export.api.json
// Package ipfix_export contains generated bindings for API file ipfix_export.api.
//
// Contents:
-// 14 messages
+// 19 messages
//
package ipfix_export
@@ -26,9 +26,142 @@ const _ = api.GoVppAPIPackageIsVersion2
const (
APIFile = "ipfix_export"
APIVersion = "2.0.3"
- VersionCrc = 0x6ae99522
+ VersionCrc = 0x63e0810a
)
+// IpfixAllExporterDetails defines message 'ipfix_all_exporter_details'.
+type IpfixAllExporterDetails struct {
+ CollectorAddress ip_types.Address `binapi:"address,name=collector_address" json:"collector_address,omitempty"`
+ CollectorPort uint16 `binapi:"u16,name=collector_port" json:"collector_port,omitempty"`
+ SrcAddress ip_types.Address `binapi:"address,name=src_address" json:"src_address,omitempty"`
+ VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
+ PathMtu uint32 `binapi:"u32,name=path_mtu" json:"path_mtu,omitempty"`
+ TemplateInterval uint32 `binapi:"u32,name=template_interval" json:"template_interval,omitempty"`
+ UDPChecksum bool `binapi:"bool,name=udp_checksum" json:"udp_checksum,omitempty"`
+}
+
+func (m *IpfixAllExporterDetails) Reset() { *m = IpfixAllExporterDetails{} }
+func (*IpfixAllExporterDetails) GetMessageName() string { return "ipfix_all_exporter_details" }
+func (*IpfixAllExporterDetails) GetCrcString() string { return "0dedbfe4" }
+func (*IpfixAllExporterDetails) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *IpfixAllExporterDetails) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 1 // m.CollectorAddress.Af
+ size += 1 * 16 // m.CollectorAddress.Un
+ size += 2 // m.CollectorPort
+ size += 1 // m.SrcAddress.Af
+ size += 1 * 16 // m.SrcAddress.Un
+ size += 4 // m.VrfID
+ size += 4 // m.PathMtu
+ size += 4 // m.TemplateInterval
+ size += 1 // m.UDPChecksum
+ return size
+}
+func (m *IpfixAllExporterDetails) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint8(uint8(m.CollectorAddress.Af))
+ buf.EncodeBytes(m.CollectorAddress.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint16(m.CollectorPort)
+ buf.EncodeUint8(uint8(m.SrcAddress.Af))
+ buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint32(m.VrfID)
+ buf.EncodeUint32(m.PathMtu)
+ buf.EncodeUint32(m.TemplateInterval)
+ buf.EncodeBool(m.UDPChecksum)
+ return buf.Bytes(), nil
+}
+func (m *IpfixAllExporterDetails) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.CollectorAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
+ copy(m.CollectorAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
+ m.CollectorPort = buf.DecodeUint16()
+ m.SrcAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
+ copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
+ m.VrfID = buf.DecodeUint32()
+ m.PathMtu = buf.DecodeUint32()
+ m.TemplateInterval = buf.DecodeUint32()
+ m.UDPChecksum = buf.DecodeBool()
+ return nil
+}
+
+// IpfixAllExporterGet defines message 'ipfix_all_exporter_get'.
+type IpfixAllExporterGet struct {
+ Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"`
+}
+
+func (m *IpfixAllExporterGet) Reset() { *m = IpfixAllExporterGet{} }
+func (*IpfixAllExporterGet) GetMessageName() string { return "ipfix_all_exporter_get" }
+func (*IpfixAllExporterGet) GetCrcString() string { return "f75ba505" }
+func (*IpfixAllExporterGet) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *IpfixAllExporterGet) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Cursor
+ return size
+}
+func (m *IpfixAllExporterGet) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.Cursor)
+ return buf.Bytes(), nil
+}
+func (m *IpfixAllExporterGet) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Cursor = buf.DecodeUint32()
+ return nil
+}
+
+// IpfixAllExporterGetReply defines message 'ipfix_all_exporter_get_reply'.
+type IpfixAllExporterGetReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"`
+}
+
+func (m *IpfixAllExporterGetReply) Reset() { *m = IpfixAllExporterGetReply{} }
+func (*IpfixAllExporterGetReply) GetMessageName() string { return "ipfix_all_exporter_get_reply" }
+func (*IpfixAllExporterGetReply) GetCrcString() string { return "53b48f5d" }
+func (*IpfixAllExporterGetReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *IpfixAllExporterGetReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ size += 4 // m.Cursor
+ return size
+}
+func (m *IpfixAllExporterGetReply) 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 *IpfixAllExporterGetReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ m.Cursor = buf.DecodeUint32()
+ return nil
+}
+
// IpfixClassifyStreamDetails defines message 'ipfix_classify_stream_details'.
type IpfixClassifyStreamDetails struct {
DomainID uint32 `binapi:"u32,name=domain_id" json:"domain_id,omitempty"`
@@ -241,6 +374,112 @@ func (m *IpfixClassifyTableDump) Unmarshal(b []byte) error {
return nil
}
+// IpfixExporterCreateDelete defines message 'ipfix_exporter_create_delete'.
+type IpfixExporterCreateDelete struct {
+ IsCreate bool `binapi:"bool,name=is_create" json:"is_create,omitempty"`
+ CollectorAddress ip_types.Address `binapi:"address,name=collector_address" json:"collector_address,omitempty"`
+ CollectorPort uint16 `binapi:"u16,name=collector_port" json:"collector_port,omitempty"`
+ SrcAddress ip_types.Address `binapi:"address,name=src_address" json:"src_address,omitempty"`
+ VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
+ PathMtu uint32 `binapi:"u32,name=path_mtu" json:"path_mtu,omitempty"`
+ TemplateInterval uint32 `binapi:"u32,name=template_interval" json:"template_interval,omitempty"`
+ UDPChecksum bool `binapi:"bool,name=udp_checksum" json:"udp_checksum,omitempty"`
+}
+
+func (m *IpfixExporterCreateDelete) Reset() { *m = IpfixExporterCreateDelete{} }
+func (*IpfixExporterCreateDelete) GetMessageName() string { return "ipfix_exporter_create_delete" }
+func (*IpfixExporterCreateDelete) GetCrcString() string { return "0753a768" }
+func (*IpfixExporterCreateDelete) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *IpfixExporterCreateDelete) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 1 // m.IsCreate
+ size += 1 // m.CollectorAddress.Af
+ size += 1 * 16 // m.CollectorAddress.Un
+ size += 2 // m.CollectorPort
+ size += 1 // m.SrcAddress.Af
+ size += 1 * 16 // m.SrcAddress.Un
+ size += 4 // m.VrfID
+ size += 4 // m.PathMtu
+ size += 4 // m.TemplateInterval
+ size += 1 // m.UDPChecksum
+ return size
+}
+func (m *IpfixExporterCreateDelete) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeBool(m.IsCreate)
+ buf.EncodeUint8(uint8(m.CollectorAddress.Af))
+ buf.EncodeBytes(m.CollectorAddress.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint16(m.CollectorPort)
+ buf.EncodeUint8(uint8(m.SrcAddress.Af))
+ buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint32(m.VrfID)
+ buf.EncodeUint32(m.PathMtu)
+ buf.EncodeUint32(m.TemplateInterval)
+ buf.EncodeBool(m.UDPChecksum)
+ return buf.Bytes(), nil
+}
+func (m *IpfixExporterCreateDelete) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.IsCreate = buf.DecodeBool()
+ m.CollectorAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
+ copy(m.CollectorAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
+ m.CollectorPort = buf.DecodeUint16()
+ m.SrcAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
+ copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
+ m.VrfID = buf.DecodeUint32()
+ m.PathMtu = buf.DecodeUint32()
+ m.TemplateInterval = buf.DecodeUint32()
+ m.UDPChecksum = buf.DecodeBool()
+ return nil
+}
+
+// IpfixExporterCreateDeleteReply defines message 'ipfix_exporter_create_delete_reply'.
+type IpfixExporterCreateDeleteReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ StatIndex uint32 `binapi:"u32,name=stat_index" json:"stat_index,omitempty"`
+}
+
+func (m *IpfixExporterCreateDeleteReply) Reset() { *m = IpfixExporterCreateDeleteReply{} }
+func (*IpfixExporterCreateDeleteReply) GetMessageName() string {
+ return "ipfix_exporter_create_delete_reply"
+}
+func (*IpfixExporterCreateDeleteReply) GetCrcString() string { return "9ffac24b" }
+func (*IpfixExporterCreateDeleteReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *IpfixExporterCreateDeleteReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ size += 4 // m.StatIndex
+ return size
+}
+func (m *IpfixExporterCreateDeleteReply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint32(m.StatIndex)
+ return buf.Bytes(), nil
+}
+func (m *IpfixExporterCreateDeleteReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ m.StatIndex = buf.DecodeUint32()
+ return nil
+}
+
// IpfixExporterDetails defines message 'ipfix_exporter_details'.
type IpfixExporterDetails struct {
CollectorAddress ip_types.Address `binapi:"address,name=collector_address" json:"collector_address,omitempty"`
@@ -559,12 +798,17 @@ func (m *SetIpfixExporterReply) Unmarshal(b []byte) error {
func init() { file_ipfix_export_binapi_init() }
func file_ipfix_export_binapi_init() {
+ api.RegisterMessage((*IpfixAllExporterDetails)(nil), "ipfix_all_exporter_details_0dedbfe4")
+ api.RegisterMessage((*IpfixAllExporterGet)(nil), "ipfix_all_exporter_get_f75ba505")
+ api.RegisterMessage((*IpfixAllExporterGetReply)(nil), "ipfix_all_exporter_get_reply_53b48f5d")
api.RegisterMessage((*IpfixClassifyStreamDetails)(nil), "ipfix_classify_stream_details_2903539d")
api.RegisterMessage((*IpfixClassifyStreamDump)(nil), "ipfix_classify_stream_dump_51077d14")
api.RegisterMessage((*IpfixClassifyTableAddDel)(nil), "ipfix_classify_table_add_del_3e449bb9")
api.RegisterMessage((*IpfixClassifyTableAddDelReply)(nil), "ipfix_classify_table_add_del_reply_e8d4e804")
api.RegisterMessage((*IpfixClassifyTableDetails)(nil), "ipfix_classify_table_details_1af8c28c")
api.RegisterMessage((*IpfixClassifyTableDump)(nil), "ipfix_classify_table_dump_51077d14")
+ api.RegisterMessage((*IpfixExporterCreateDelete)(nil), "ipfix_exporter_create_delete_0753a768")
+ api.RegisterMessage((*IpfixExporterCreateDeleteReply)(nil), "ipfix_exporter_create_delete_reply_9ffac24b")
api.RegisterMessage((*IpfixExporterDetails)(nil), "ipfix_exporter_details_0dedbfe4")
api.RegisterMessage((*IpfixExporterDump)(nil), "ipfix_exporter_dump_51077d14")
api.RegisterMessage((*IpfixFlush)(nil), "ipfix_flush_51077d14")
@@ -578,12 +822,17 @@ func file_ipfix_export_binapi_init() {
// Messages returns list of all messages in this module.
func AllMessages() []api.Message {
return []api.Message{
+ (*IpfixAllExporterDetails)(nil),
+ (*IpfixAllExporterGet)(nil),
+ (*IpfixAllExporterGetReply)(nil),
(*IpfixClassifyStreamDetails)(nil),
(*IpfixClassifyStreamDump)(nil),
(*IpfixClassifyTableAddDel)(nil),
(*IpfixClassifyTableAddDelReply)(nil),
(*IpfixClassifyTableDetails)(nil),
(*IpfixClassifyTableDump)(nil),
+ (*IpfixExporterCreateDelete)(nil),
+ (*IpfixExporterCreateDeleteReply)(nil),
(*IpfixExporterDetails)(nil),
(*IpfixExporterDump)(nil),
(*IpfixFlush)(nil),
diff --git a/binapi/ipfix_export/ipfix_export_rpc.ba.go b/binapi/ipfix_export/ipfix_export_rpc.ba.go
index bd4fc13..ba154a5 100644
--- a/binapi/ipfix_export/ipfix_export_rpc.ba.go
+++ b/binapi/ipfix_export/ipfix_export_rpc.ba.go
@@ -8,14 +8,16 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service ipfix_export.
type RPCService interface {
+ IpfixAllExporterGet(ctx context.Context, in *IpfixAllExporterGet) (RPCService_IpfixAllExporterGetClient, error)
IpfixClassifyStreamDump(ctx context.Context, in *IpfixClassifyStreamDump) (RPCService_IpfixClassifyStreamDumpClient, error)
IpfixClassifyTableAddDel(ctx context.Context, in *IpfixClassifyTableAddDel) (*IpfixClassifyTableAddDelReply, error)
IpfixClassifyTableDump(ctx context.Context, in *IpfixClassifyTableDump) (RPCService_IpfixClassifyTableDumpClient, error)
+ IpfixExporterCreateDelete(ctx context.Context, in *IpfixExporterCreateDelete) (*IpfixExporterCreateDeleteReply, error)
IpfixExporterDump(ctx context.Context, in *IpfixExporterDump) (RPCService_IpfixExporterDumpClient, error)
IpfixFlush(ctx context.Context, in *IpfixFlush) (*IpfixFlushReply, error)
SetIpfixClassifyStream(ctx context.Context, in *SetIpfixClassifyStream) (*SetIpfixClassifyStreamReply, error)
@@ -30,6 +32,46 @@ func NewServiceClient(conn api.Connection) RPCService {
return &serviceClient{conn}
}
+func (c *serviceClient) IpfixAllExporterGet(ctx context.Context, in *IpfixAllExporterGet) (RPCService_IpfixAllExporterGetClient, error) {
+ stream, err := c.conn.NewStream(ctx)
+ if err != nil {
+ return nil, err
+ }
+ x := &serviceClient_IpfixAllExporterGetClient{stream}
+ if err := x.Stream.SendMsg(in); err != nil {
+ return nil, err
+ }
+ return x, nil
+}
+
+type RPCService_IpfixAllExporterGetClient interface {
+ Recv() (*IpfixAllExporterDetails, error)
+ api.Stream
+}
+
+type serviceClient_IpfixAllExporterGetClient struct {
+ api.Stream
+}
+
+func (c *serviceClient_IpfixAllExporterGetClient) Recv() (*IpfixAllExporterDetails, error) {
+ msg, err := c.Stream.RecvMsg()
+ if err != nil {
+ return nil, err
+ }
+ switch m := msg.(type) {
+ case *IpfixAllExporterDetails:
+ return m, nil
+ case *IpfixAllExporterGetReply:
+ 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) IpfixClassifyStreamDump(ctx context.Context, in *IpfixClassifyStreamDump) (RPCService_IpfixClassifyStreamDumpClient, error) {
stream, err := c.conn.NewStream(ctx)
if err != nil {
@@ -39,7 +81,7 @@ func (c *serviceClient) IpfixClassifyStreamDump(ctx context.Context, in *IpfixCl
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -62,7 +104,7 @@ func (c *serviceClient_IpfixClassifyStreamDumpClient) Recv() (*IpfixClassifyStre
switch m := msg.(type) {
case *IpfixClassifyStreamDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -91,7 +133,7 @@ func (c *serviceClient) IpfixClassifyTableDump(ctx context.Context, in *IpfixCla
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -114,7 +156,7 @@ func (c *serviceClient_IpfixClassifyTableDumpClient) Recv() (*IpfixClassifyTable
switch m := msg.(type) {
case *IpfixClassifyTableDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -125,6 +167,15 @@ func (c *serviceClient_IpfixClassifyTableDumpClient) Recv() (*IpfixClassifyTable
}
}
+func (c *serviceClient) IpfixExporterCreateDelete(ctx context.Context, in *IpfixExporterCreateDelete) (*IpfixExporterCreateDeleteReply, error) {
+ out := new(IpfixExporterCreateDeleteReply)
+ err := c.conn.Invoke(ctx, in, out)
+ if err != nil {
+ return nil, err
+ }
+ return out, api.RetvalToVPPApiError(out.Retval)
+}
+
func (c *serviceClient) IpfixExporterDump(ctx context.Context, in *IpfixExporterDump) (RPCService_IpfixExporterDumpClient, error) {
stream, err := c.conn.NewStream(ctx)
if err != nil {
@@ -134,7 +185,7 @@ func (c *serviceClient) IpfixExporterDump(ctx context.Context, in *IpfixExporter
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -157,7 +208,7 @@ func (c *serviceClient_IpfixExporterDumpClient) Recv() (*IpfixExporterDetails, e
switch m := msg.(type) {
case *IpfixExporterDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/ipip/ipip.ba.go b/binapi/ipip/ipip.ba.go
index 37b79b4..068ad49 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/core/ipip.api.json
// Package ipip contains generated bindings for API file ipip.api.
diff --git a/binapi/ipip/ipip_rpc.ba.go b/binapi/ipip/ipip_rpc.ba.go
index 318b4c5..e76514e 100644
--- a/binapi/ipip/ipip_rpc.ba.go
+++ b/binapi/ipip/ipip_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service ipip.
@@ -73,7 +73,7 @@ func (c *serviceClient) IpipTunnelDump(ctx context.Context, in *IpipTunnelDump)
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -96,7 +96,7 @@ func (c *serviceClient_IpipTunnelDumpClient) Recv() (*IpipTunnelDetails, error)
switch m := msg.(type) {
case *IpipTunnelDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/ipsec/ipsec.ba.go b/binapi/ipsec/ipsec.ba.go
index 352ee3c..1ef8e6c 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/core/ipsec.api.json
// Package ipsec contains generated bindings for API file ipsec.api.
@@ -9,7 +9,7 @@
// Contents:
// 1 enum
// 3 structs
-// 42 messages
+// 46 messages
//
package ipsec
@@ -32,8 +32,8 @@ const _ = api.GoVppAPIPackageIsVersion2
const (
APIFile = "ipsec"
- APIVersion = "5.0.1"
- VersionCrc = 0x196d64b0
+ APIVersion = "5.0.2"
+ VersionCrc = 0x6b08e91e
)
// IpsecSpdAction defines enum 'ipsec_spd_action'.
@@ -919,6 +919,113 @@ func (m *IpsecSaV3Dump) Unmarshal(b []byte) error {
return nil
}
+// IpsecSadEntryAdd defines message 'ipsec_sad_entry_add'.
+type IpsecSadEntryAdd struct {
+ Entry ipsec_types.IpsecSadEntryV3 `binapi:"ipsec_sad_entry_v3,name=entry" json:"entry,omitempty"`
+}
+
+func (m *IpsecSadEntryAdd) Reset() { *m = IpsecSadEntryAdd{} }
+func (*IpsecSadEntryAdd) GetMessageName() string { return "ipsec_sad_entry_add" }
+func (*IpsecSadEntryAdd) GetCrcString() string { return "50229353" }
+func (*IpsecSadEntryAdd) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *IpsecSadEntryAdd) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Entry.SadID
+ size += 4 // m.Entry.Spi
+ size += 4 // m.Entry.Protocol
+ size += 4 // m.Entry.CryptoAlgorithm
+ size += 1 // m.Entry.CryptoKey.Length
+ size += 1 * 128 // m.Entry.CryptoKey.Data
+ size += 4 // m.Entry.IntegrityAlgorithm
+ size += 1 // m.Entry.IntegrityKey.Length
+ size += 1 * 128 // m.Entry.IntegrityKey.Data
+ size += 4 // m.Entry.Flags
+ size += 4 // m.Entry.Tunnel.Instance
+ size += 1 // m.Entry.Tunnel.Src.Af
+ size += 1 * 16 // m.Entry.Tunnel.Src.Un
+ size += 1 // m.Entry.Tunnel.Dst.Af
+ size += 1 * 16 // m.Entry.Tunnel.Dst.Un
+ size += 4 // m.Entry.Tunnel.SwIfIndex
+ size += 4 // m.Entry.Tunnel.TableID
+ size += 1 // m.Entry.Tunnel.EncapDecapFlags
+ size += 1 // m.Entry.Tunnel.Mode
+ size += 1 // m.Entry.Tunnel.Flags
+ size += 1 // m.Entry.Tunnel.Dscp
+ size += 1 // m.Entry.Tunnel.HopLimit
+ size += 4 // m.Entry.Salt
+ size += 2 // m.Entry.UDPSrcPort
+ size += 2 // m.Entry.UDPDstPort
+ return size
+}
+func (m *IpsecSadEntryAdd) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.Entry.SadID)
+ buf.EncodeUint32(m.Entry.Spi)
+ buf.EncodeUint32(uint32(m.Entry.Protocol))
+ buf.EncodeUint32(uint32(m.Entry.CryptoAlgorithm))
+ buf.EncodeUint8(m.Entry.CryptoKey.Length)
+ buf.EncodeBytes(m.Entry.CryptoKey.Data, 128)
+ buf.EncodeUint32(uint32(m.Entry.IntegrityAlgorithm))
+ buf.EncodeUint8(m.Entry.IntegrityKey.Length)
+ buf.EncodeBytes(m.Entry.IntegrityKey.Data, 128)
+ buf.EncodeUint32(uint32(m.Entry.Flags))
+ buf.EncodeUint32(m.Entry.Tunnel.Instance)
+ buf.EncodeUint8(uint8(m.Entry.Tunnel.Src.Af))
+ buf.EncodeBytes(m.Entry.Tunnel.Src.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint8(uint8(m.Entry.Tunnel.Dst.Af))
+ buf.EncodeBytes(m.Entry.Tunnel.Dst.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint32(uint32(m.Entry.Tunnel.SwIfIndex))
+ buf.EncodeUint32(m.Entry.Tunnel.TableID)
+ buf.EncodeUint8(uint8(m.Entry.Tunnel.EncapDecapFlags))
+ buf.EncodeUint8(uint8(m.Entry.Tunnel.Mode))
+ buf.EncodeUint8(uint8(m.Entry.Tunnel.Flags))
+ buf.EncodeUint8(uint8(m.Entry.Tunnel.Dscp))
+ buf.EncodeUint8(m.Entry.Tunnel.HopLimit)
+ buf.EncodeUint32(m.Entry.Salt)
+ buf.EncodeUint16(m.Entry.UDPSrcPort)
+ buf.EncodeUint16(m.Entry.UDPDstPort)
+ return buf.Bytes(), nil
+}
+func (m *IpsecSadEntryAdd) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Entry.SadID = buf.DecodeUint32()
+ m.Entry.Spi = buf.DecodeUint32()
+ m.Entry.Protocol = ipsec_types.IpsecProto(buf.DecodeUint32())
+ m.Entry.CryptoAlgorithm = ipsec_types.IpsecCryptoAlg(buf.DecodeUint32())
+ m.Entry.CryptoKey.Length = buf.DecodeUint8()
+ m.Entry.CryptoKey.Data = make([]byte, 128)
+ copy(m.Entry.CryptoKey.Data, buf.DecodeBytes(len(m.Entry.CryptoKey.Data)))
+ m.Entry.IntegrityAlgorithm = ipsec_types.IpsecIntegAlg(buf.DecodeUint32())
+ m.Entry.IntegrityKey.Length = buf.DecodeUint8()
+ m.Entry.IntegrityKey.Data = make([]byte, 128)
+ copy(m.Entry.IntegrityKey.Data, buf.DecodeBytes(len(m.Entry.IntegrityKey.Data)))
+ m.Entry.Flags = ipsec_types.IpsecSadFlags(buf.DecodeUint32())
+ m.Entry.Tunnel.Instance = buf.DecodeUint32()
+ m.Entry.Tunnel.Src.Af = ip_types.AddressFamily(buf.DecodeUint8())
+ copy(m.Entry.Tunnel.Src.Un.XXX_UnionData[:], buf.DecodeBytes(16))
+ m.Entry.Tunnel.Dst.Af = ip_types.AddressFamily(buf.DecodeUint8())
+ copy(m.Entry.Tunnel.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
+ m.Entry.Tunnel.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ m.Entry.Tunnel.TableID = buf.DecodeUint32()
+ m.Entry.Tunnel.EncapDecapFlags = tunnel_types.TunnelEncapDecapFlags(buf.DecodeUint8())
+ m.Entry.Tunnel.Mode = tunnel_types.TunnelMode(buf.DecodeUint8())
+ m.Entry.Tunnel.Flags = tunnel_types.TunnelFlags(buf.DecodeUint8())
+ m.Entry.Tunnel.Dscp = ip_types.IPDscp(buf.DecodeUint8())
+ m.Entry.Tunnel.HopLimit = buf.DecodeUint8()
+ m.Entry.Salt = buf.DecodeUint32()
+ m.Entry.UDPSrcPort = buf.DecodeUint16()
+ m.Entry.UDPDstPort = buf.DecodeUint16()
+ return nil
+}
+
// IpsecSadEntryAddDel defines message 'ipsec_sad_entry_add_del'.
// Deprecated: the message will be removed in the future versions
type IpsecSadEntryAddDel struct {
@@ -1329,6 +1436,109 @@ func (m *IpsecSadEntryAddDelV3Reply) Unmarshal(b []byte) error {
return nil
}
+// IpsecSadEntryAddReply defines message 'ipsec_sad_entry_add_reply'.
+type IpsecSadEntryAddReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ StatIndex uint32 `binapi:"u32,name=stat_index" json:"stat_index,omitempty"`
+}
+
+func (m *IpsecSadEntryAddReply) Reset() { *m = IpsecSadEntryAddReply{} }
+func (*IpsecSadEntryAddReply) GetMessageName() string { return "ipsec_sad_entry_add_reply" }
+func (*IpsecSadEntryAddReply) GetCrcString() string { return "9ffac24b" }
+func (*IpsecSadEntryAddReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *IpsecSadEntryAddReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ size += 4 // m.StatIndex
+ return size
+}
+func (m *IpsecSadEntryAddReply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint32(m.StatIndex)
+ return buf.Bytes(), nil
+}
+func (m *IpsecSadEntryAddReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ m.StatIndex = buf.DecodeUint32()
+ return nil
+}
+
+// IpsecSadEntryDel defines message 'ipsec_sad_entry_del'.
+type IpsecSadEntryDel struct {
+ ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
+}
+
+func (m *IpsecSadEntryDel) Reset() { *m = IpsecSadEntryDel{} }
+func (*IpsecSadEntryDel) GetMessageName() string { return "ipsec_sad_entry_del" }
+func (*IpsecSadEntryDel) GetCrcString() string { return "3a91bde5" }
+func (*IpsecSadEntryDel) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *IpsecSadEntryDel) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.ID
+ return size
+}
+func (m *IpsecSadEntryDel) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.ID)
+ return buf.Bytes(), nil
+}
+func (m *IpsecSadEntryDel) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.ID = buf.DecodeUint32()
+ return nil
+}
+
+// IpsecSadEntryDelReply defines message 'ipsec_sad_entry_del_reply'.
+type IpsecSadEntryDelReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+}
+
+func (m *IpsecSadEntryDelReply) Reset() { *m = IpsecSadEntryDelReply{} }
+func (*IpsecSadEntryDelReply) GetMessageName() string { return "ipsec_sad_entry_del_reply" }
+func (*IpsecSadEntryDelReply) GetCrcString() string { return "e8d4e804" }
+func (*IpsecSadEntryDelReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *IpsecSadEntryDelReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ return size
+}
+func (m *IpsecSadEntryDelReply) 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 *IpsecSadEntryDelReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ return nil
+}
+
// IpsecSelectBackend defines message 'ipsec_select_backend'.
type IpsecSelectBackend struct {
Protocol ipsec_types.IpsecProto `binapi:"ipsec_proto,name=protocol" json:"protocol,omitempty"`
@@ -2192,12 +2402,16 @@ func file_ipsec_binapi_init() {
api.RegisterMessage((*IpsecSaV2Dump)(nil), "ipsec_sa_v2_dump_2076c2f4")
api.RegisterMessage((*IpsecSaV3Details)(nil), "ipsec_sa_v3_details_2fc991ee")
api.RegisterMessage((*IpsecSaV3Dump)(nil), "ipsec_sa_v3_dump_2076c2f4")
+ api.RegisterMessage((*IpsecSadEntryAdd)(nil), "ipsec_sad_entry_add_50229353")
api.RegisterMessage((*IpsecSadEntryAddDel)(nil), "ipsec_sad_entry_add_del_ab64b5c6")
api.RegisterMessage((*IpsecSadEntryAddDelReply)(nil), "ipsec_sad_entry_add_del_reply_9ffac24b")
api.RegisterMessage((*IpsecSadEntryAddDelV2)(nil), "ipsec_sad_entry_add_del_v2_aca78b27")
api.RegisterMessage((*IpsecSadEntryAddDelV2Reply)(nil), "ipsec_sad_entry_add_del_v2_reply_9ffac24b")
api.RegisterMessage((*IpsecSadEntryAddDelV3)(nil), "ipsec_sad_entry_add_del_v3_c77ebd92")
api.RegisterMessage((*IpsecSadEntryAddDelV3Reply)(nil), "ipsec_sad_entry_add_del_v3_reply_9ffac24b")
+ api.RegisterMessage((*IpsecSadEntryAddReply)(nil), "ipsec_sad_entry_add_reply_9ffac24b")
+ api.RegisterMessage((*IpsecSadEntryDel)(nil), "ipsec_sad_entry_del_3a91bde5")
+ api.RegisterMessage((*IpsecSadEntryDelReply)(nil), "ipsec_sad_entry_del_reply_e8d4e804")
api.RegisterMessage((*IpsecSelectBackend)(nil), "ipsec_select_backend_5bcfd3b7")
api.RegisterMessage((*IpsecSelectBackendReply)(nil), "ipsec_select_backend_reply_e8d4e804")
api.RegisterMessage((*IpsecSetAsyncMode)(nil), "ipsec_set_async_mode_a6465f7c")
@@ -2239,12 +2453,16 @@ func AllMessages() []api.Message {
(*IpsecSaV2Dump)(nil),
(*IpsecSaV3Details)(nil),
(*IpsecSaV3Dump)(nil),
+ (*IpsecSadEntryAdd)(nil),
(*IpsecSadEntryAddDel)(nil),
(*IpsecSadEntryAddDelReply)(nil),
(*IpsecSadEntryAddDelV2)(nil),
(*IpsecSadEntryAddDelV2Reply)(nil),
(*IpsecSadEntryAddDelV3)(nil),
(*IpsecSadEntryAddDelV3Reply)(nil),
+ (*IpsecSadEntryAddReply)(nil),
+ (*IpsecSadEntryDel)(nil),
+ (*IpsecSadEntryDelReply)(nil),
(*IpsecSelectBackend)(nil),
(*IpsecSelectBackendReply)(nil),
(*IpsecSetAsyncMode)(nil),
diff --git a/binapi/ipsec/ipsec_rpc.ba.go b/binapi/ipsec/ipsec_rpc.ba.go
index faecda6..e0a5ede 100644
--- a/binapi/ipsec/ipsec_rpc.ba.go
+++ b/binapi/ipsec/ipsec_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service ipsec.
@@ -21,9 +21,11 @@ type RPCService interface {
IpsecSaDump(ctx context.Context, in *IpsecSaDump) (RPCService_IpsecSaDumpClient, error)
IpsecSaV2Dump(ctx context.Context, in *IpsecSaV2Dump) (RPCService_IpsecSaV2DumpClient, error)
IpsecSaV3Dump(ctx context.Context, in *IpsecSaV3Dump) (RPCService_IpsecSaV3DumpClient, error)
+ IpsecSadEntryAdd(ctx context.Context, in *IpsecSadEntryAdd) (*IpsecSadEntryAddReply, error)
IpsecSadEntryAddDel(ctx context.Context, in *IpsecSadEntryAddDel) (*IpsecSadEntryAddDelReply, error)
IpsecSadEntryAddDelV2(ctx context.Context, in *IpsecSadEntryAddDelV2) (*IpsecSadEntryAddDelV2Reply, error)
IpsecSadEntryAddDelV3(ctx context.Context, in *IpsecSadEntryAddDelV3) (*IpsecSadEntryAddDelV3Reply, error)
+ IpsecSadEntryDel(ctx context.Context, in *IpsecSadEntryDel) (*IpsecSadEntryDelReply, error)
IpsecSelectBackend(ctx context.Context, in *IpsecSelectBackend) (*IpsecSelectBackendReply, error)
IpsecSetAsyncMode(ctx context.Context, in *IpsecSetAsyncMode) (*IpsecSetAsyncModeReply, error)
IpsecSpdAddDel(ctx context.Context, in *IpsecSpdAddDel) (*IpsecSpdAddDelReply, error)
@@ -53,7 +55,7 @@ func (c *serviceClient) IpsecBackendDump(ctx context.Context, in *IpsecBackendDu
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -76,7 +78,7 @@ func (c *serviceClient_IpsecBackendDumpClient) Recv() (*IpsecBackendDetails, err
switch m := msg.(type) {
case *IpsecBackendDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -123,7 +125,7 @@ func (c *serviceClient) IpsecItfDump(ctx context.Context, in *IpsecItfDump) (RPC
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -146,7 +148,7 @@ func (c *serviceClient_IpsecItfDumpClient) Recv() (*IpsecItfDetails, error) {
switch m := msg.(type) {
case *IpsecItfDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -166,7 +168,7 @@ func (c *serviceClient) IpsecSaDump(ctx context.Context, in *IpsecSaDump) (RPCSe
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -189,7 +191,7 @@ func (c *serviceClient_IpsecSaDumpClient) Recv() (*IpsecSaDetails, error) {
switch m := msg.(type) {
case *IpsecSaDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -209,7 +211,7 @@ func (c *serviceClient) IpsecSaV2Dump(ctx context.Context, in *IpsecSaV2Dump) (R
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -232,7 +234,7 @@ func (c *serviceClient_IpsecSaV2DumpClient) Recv() (*IpsecSaV2Details, error) {
switch m := msg.(type) {
case *IpsecSaV2Details:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -252,7 +254,7 @@ func (c *serviceClient) IpsecSaV3Dump(ctx context.Context, in *IpsecSaV3Dump) (R
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -275,7 +277,7 @@ func (c *serviceClient_IpsecSaV3DumpClient) Recv() (*IpsecSaV3Details, error) {
switch m := msg.(type) {
case *IpsecSaV3Details:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -286,6 +288,15 @@ func (c *serviceClient_IpsecSaV3DumpClient) Recv() (*IpsecSaV3Details, error) {
}
}
+func (c *serviceClient) IpsecSadEntryAdd(ctx context.Context, in *IpsecSadEntryAdd) (*IpsecSadEntryAddReply, error) {
+ out := new(IpsecSadEntryAddReply)
+ err := c.conn.Invoke(ctx, in, out)
+ if err != nil {
+ return nil, err
+ }
+ return out, api.RetvalToVPPApiError(out.Retval)
+}
+
func (c *serviceClient) IpsecSadEntryAddDel(ctx context.Context, in *IpsecSadEntryAddDel) (*IpsecSadEntryAddDelReply, error) {
out := new(IpsecSadEntryAddDelReply)
err := c.conn.Invoke(ctx, in, out)
@@ -313,6 +324,15 @@ func (c *serviceClient) IpsecSadEntryAddDelV3(ctx context.Context, in *IpsecSadE
return out, api.RetvalToVPPApiError(out.Retval)
}
+func (c *serviceClient) IpsecSadEntryDel(ctx context.Context, in *IpsecSadEntryDel) (*IpsecSadEntryDelReply, error) {
+ out := new(IpsecSadEntryDelReply)
+ err := c.conn.Invoke(ctx, in, out)
+ if err != nil {
+ return nil, err
+ }
+ return out, api.RetvalToVPPApiError(out.Retval)
+}
+
func (c *serviceClient) IpsecSelectBackend(ctx context.Context, in *IpsecSelectBackend) (*IpsecSelectBackendReply, error) {
out := new(IpsecSelectBackendReply)
err := c.conn.Invoke(ctx, in, out)
@@ -349,7 +369,7 @@ func (c *serviceClient) IpsecSpdDump(ctx context.Context, in *IpsecSpdDump) (RPC
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -372,7 +392,7 @@ func (c *serviceClient_IpsecSpdDumpClient) Recv() (*IpsecSpdDetails, error) {
switch m := msg.(type) {
case *IpsecSpdDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -401,7 +421,7 @@ func (c *serviceClient) IpsecSpdInterfaceDump(ctx context.Context, in *IpsecSpdI
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -424,7 +444,7 @@ func (c *serviceClient_IpsecSpdInterfaceDumpClient) Recv() (*IpsecSpdInterfaceDe
switch m := msg.(type) {
case *IpsecSpdInterfaceDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -444,7 +464,7 @@ func (c *serviceClient) IpsecSpdsDump(ctx context.Context, in *IpsecSpdsDump) (R
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -467,7 +487,7 @@ func (c *serviceClient_IpsecSpdsDumpClient) Recv() (*IpsecSpdsDetails, error) {
switch m := msg.(type) {
case *IpsecSpdsDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -496,7 +516,7 @@ func (c *serviceClient) IpsecTunnelProtectDump(ctx context.Context, in *IpsecTun
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -519,7 +539,7 @@ func (c *serviceClient_IpsecTunnelProtectDumpClient) Recv() (*IpsecTunnelProtect
switch m := msg.(type) {
case *IpsecTunnelProtectDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/ipsec_types/ipsec_types.ba.go b/binapi/ipsec_types/ipsec_types.ba.go
index 6310ff1..e3281e9 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 cb62c25..7533490 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/core/l2.api.json
// Package l2 contains generated bindings for API file l2.api.
diff --git a/binapi/l2/l2_rpc.ba.go b/binapi/l2/l2_rpc.ba.go
index 588abdd..e64c0b8 100644
--- a/binapi/l2/l2_rpc.ba.go
+++ b/binapi/l2/l2_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service l2.
@@ -71,7 +71,7 @@ func (c *serviceClient) BdIPMacDump(ctx context.Context, in *BdIPMacDump) (RPCSe
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -94,7 +94,7 @@ func (c *serviceClient_BdIPMacDumpClient) Recv() (*BdIPMacDetails, error) {
switch m := msg.(type) {
case *BdIPMacDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -132,7 +132,7 @@ func (c *serviceClient) BridgeDomainDump(ctx context.Context, in *BridgeDomainDu
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -155,7 +155,7 @@ func (c *serviceClient_BridgeDomainDumpClient) Recv() (*BridgeDomainDetails, err
switch m := msg.(type) {
case *BridgeDomainDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -238,7 +238,7 @@ func (c *serviceClient) L2FibTableDump(ctx context.Context, in *L2FibTableDump)
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -261,7 +261,7 @@ func (c *serviceClient_L2FibTableDumpClient) Recv() (*L2FibTableDetails, error)
switch m := msg.(type) {
case *L2FibTableDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -326,7 +326,7 @@ func (c *serviceClient) L2XconnectDump(ctx context.Context, in *L2XconnectDump)
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -349,7 +349,7 @@ func (c *serviceClient_L2XconnectDumpClient) Recv() (*L2XconnectDetails, error)
switch m := msg.(type) {
case *L2XconnectDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/l2e/l2e.ba.go b/binapi/l2e/l2e.ba.go
deleted file mode 100644
index 12a429b..0000000
--- a/binapi/l2e/l2e.ba.go
+++ /dev/null
@@ -1,116 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 21.06-release
-// source: /usr/share/vpp/api/plugins/l2e.api.json
-
-// Package l2e contains generated bindings for API file l2e.api.
-//
-// Contents:
-// 2 messages
-//
-package l2e
-
-import (
- api "git.fd.io/govpp.git/api"
- interface_types "git.fd.io/govpp.git/binapi/interface_types"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the GoVPP api package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// GoVPP api package needs to be updated.
-const _ = api.GoVppAPIPackageIsVersion2
-
-const (
- APIFile = "l2e"
- APIVersion = "1.0.0"
- VersionCrc = 0x6e8abdfb
-)
-
-// L2Emulation defines message 'l2_emulation'.
-// InProgress: the message form may change in the future versions
-type L2Emulation struct {
- SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
-}
-
-func (m *L2Emulation) Reset() { *m = L2Emulation{} }
-func (*L2Emulation) GetMessageName() string { return "l2_emulation" }
-func (*L2Emulation) GetCrcString() string { return "ae6cfcfb" }
-func (*L2Emulation) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *L2Emulation) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.Enable
- return size
-}
-func (m *L2Emulation) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeBool(m.Enable)
- return buf.Bytes(), nil
-}
-func (m *L2Emulation) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
- m.Enable = buf.DecodeBool()
- return nil
-}
-
-// L2EmulationReply defines message 'l2_emulation_reply'.
-// InProgress: the message form may change in the future versions
-type L2EmulationReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *L2EmulationReply) Reset() { *m = L2EmulationReply{} }
-func (*L2EmulationReply) GetMessageName() string { return "l2_emulation_reply" }
-func (*L2EmulationReply) GetCrcString() string { return "e8d4e804" }
-func (*L2EmulationReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *L2EmulationReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *L2EmulationReply) 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 *L2EmulationReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_l2e_binapi_init() }
-func file_l2e_binapi_init() {
- api.RegisterMessage((*L2Emulation)(nil), "l2_emulation_ae6cfcfb")
- api.RegisterMessage((*L2EmulationReply)(nil), "l2_emulation_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*L2Emulation)(nil),
- (*L2EmulationReply)(nil),
- }
-}
diff --git a/binapi/l2e/l2e_rpc.ba.go b/binapi/l2e/l2e_rpc.ba.go
deleted file mode 100644
index 277e04e..0000000
--- a/binapi/l2e/l2e_rpc.ba.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package l2e
-
-import (
- "context"
-
- api "git.fd.io/govpp.git/api"
-)
-
-// RPCService defines RPC service l2e.
-type RPCService interface {
- L2Emulation(ctx context.Context, in *L2Emulation) (*L2EmulationReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) L2Emulation(ctx context.Context, in *L2Emulation) (*L2EmulationReply, error) {
- out := new(L2EmulationReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/binapi/l2tp/l2tp.ba.go b/binapi/l2tp/l2tp.ba.go
index f979e9d..602d527 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/l2tp.api.json
// Package l2tp contains generated bindings for API file l2tp.api.
diff --git a/binapi/l2tp/l2tp_rpc.ba.go b/binapi/l2tp/l2tp_rpc.ba.go
index 0ba01f2..afe5d74 100644
--- a/binapi/l2tp/l2tp_rpc.ba.go
+++ b/binapi/l2tp/l2tp_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service l2tp.
@@ -73,7 +73,7 @@ func (c *serviceClient) SwIfL2tpv3TunnelDump(ctx context.Context, in *SwIfL2tpv3
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -96,7 +96,7 @@ func (c *serviceClient_SwIfL2tpv3TunnelDumpClient) Recv() (*SwIfL2tpv3TunnelDeta
switch m := msg.(type) {
case *SwIfL2tpv3TunnelDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/l3xc/l3xc.ba.go b/binapi/l3xc/l3xc.ba.go
index f74343c..4bb0d18 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/l3xc.api.json
// Package l3xc contains generated bindings for API file l3xc.api.
diff --git a/binapi/l3xc/l3xc_rpc.ba.go b/binapi/l3xc/l3xc_rpc.ba.go
index 06176cb..238a459 100644
--- a/binapi/l3xc/l3xc_rpc.ba.go
+++ b/binapi/l3xc/l3xc_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service l3xc.
@@ -45,7 +45,7 @@ func (c *serviceClient) L3xcDump(ctx context.Context, in *L3xcDump) (RPCService_
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -68,7 +68,7 @@ func (c *serviceClient_L3xcDumpClient) Recv() (*L3xcDetails, error) {
switch m := msg.(type) {
case *L3xcDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/lacp/lacp.ba.go b/binapi/lacp/lacp.ba.go
index d3e25be..a8617b7 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/lacp.api.json
// Package lacp contains generated bindings for API file lacp.api.
diff --git a/binapi/lacp/lacp_rpc.ba.go b/binapi/lacp/lacp_rpc.ba.go
index cce2bd6..5b97ac3 100644
--- a/binapi/lacp/lacp_rpc.ba.go
+++ b/binapi/lacp/lacp_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service lacp.
@@ -33,7 +33,7 @@ func (c *serviceClient) SwInterfaceLacpDump(ctx context.Context, in *SwInterface
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -56,7 +56,7 @@ func (c *serviceClient_SwInterfaceLacpDumpClient) Recv() (*SwInterfaceLacpDetail
switch m := msg.(type) {
case *SwInterfaceLacpDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/lb/lb.ba.go b/binapi/lb/lb.ba.go
index 5f37857..f58876e 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/lb.api.json
// Package lb contains generated bindings for API file lb.api.
diff --git a/binapi/lb/lb_rpc.ba.go b/binapi/lb/lb_rpc.ba.go
index a6034e9..4e6b21f 100644
--- a/binapi/lb/lb_rpc.ba.go
+++ b/binapi/lb/lb_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service lb.
@@ -76,7 +76,7 @@ func (c *serviceClient) LbAsDump(ctx context.Context, in *LbAsDump) (RPCService_
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -99,7 +99,7 @@ func (c *serviceClient_LbAsDumpClient) Recv() (*LbAsDetails, error) {
switch m := msg.(type) {
case *LbAsDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -137,7 +137,7 @@ func (c *serviceClient) LbVipDump(ctx context.Context, in *LbVipDump) (RPCServic
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -160,7 +160,7 @@ func (c *serviceClient_LbVipDumpClient) Recv() (*LbVipDetails, error) {
switch m := msg.(type) {
case *LbVipDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/lb_types/lb_types.ba.go b/binapi/lb_types/lb_types.ba.go
index b4d906b..06b906a 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 980caf6..453bcf8 100644
--- a/binapi/lcp/lcp.ba.go
+++ b/binapi/lcp/lcp.ba.go
@@ -1,7 +1,7 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
// binapi-generator: v0.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/lcp.api.json
// Package lcp contains generated bindings for API file lcp.api.
diff --git a/binapi/lisp/lisp.ba.go b/binapi/lisp/lisp.ba.go
index a89d67d..f94b1b6 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/lisp.api.json
// Package lisp contains generated bindings for API file lisp.api.
diff --git a/binapi/lisp/lisp_rpc.ba.go b/binapi/lisp/lisp_rpc.ba.go
index a675dc7..557f69b 100644
--- a/binapi/lisp/lisp_rpc.ba.go
+++ b/binapi/lisp/lisp_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service lisp.
@@ -152,7 +152,7 @@ func (c *serviceClient) LispEidTableDump(ctx context.Context, in *LispEidTableDu
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -175,7 +175,7 @@ func (c *serviceClient_LispEidTableDumpClient) Recv() (*LispEidTableDetails, err
switch m := msg.(type) {
case *LispEidTableDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -195,7 +195,7 @@ func (c *serviceClient) LispEidTableMapDump(ctx context.Context, in *LispEidTabl
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -218,7 +218,7 @@ func (c *serviceClient_LispEidTableMapDumpClient) Recv() (*LispEidTableMapDetail
switch m := msg.(type) {
case *LispEidTableMapDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -238,7 +238,7 @@ func (c *serviceClient) LispEidTableVniDump(ctx context.Context, in *LispEidTabl
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -261,7 +261,7 @@ func (c *serviceClient_LispEidTableVniDumpClient) Recv() (*LispEidTableVniDetail
switch m := msg.(type) {
case *LispEidTableVniDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -299,7 +299,7 @@ func (c *serviceClient) LispLocatorDump(ctx context.Context, in *LispLocatorDump
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -322,7 +322,7 @@ func (c *serviceClient_LispLocatorDumpClient) Recv() (*LispLocatorDetails, error
switch m := msg.(type) {
case *LispLocatorDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -342,7 +342,7 @@ func (c *serviceClient) LispLocatorSetDump(ctx context.Context, in *LispLocatorS
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -365,7 +365,7 @@ func (c *serviceClient_LispLocatorSetDumpClient) Recv() (*LispLocatorSetDetails,
switch m := msg.(type) {
case *LispLocatorSetDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -403,7 +403,7 @@ func (c *serviceClient) LispMapResolverDump(ctx context.Context, in *LispMapReso
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -426,7 +426,7 @@ func (c *serviceClient_LispMapResolverDumpClient) Recv() (*LispMapResolverDetail
switch m := msg.(type) {
case *LispMapResolverDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -446,7 +446,7 @@ func (c *serviceClient) LispMapServerDump(ctx context.Context, in *LispMapServer
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -469,7 +469,7 @@ func (c *serviceClient_LispMapServerDumpClient) Recv() (*LispMapServerDetails, e
switch m := msg.(type) {
case *LispMapServerDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/lisp_gpe/lisp_gpe.ba.go b/binapi/lisp_gpe/lisp_gpe.ba.go
index 52f3ef1..010c7e8 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/lisp_gpe.api.json
// Package lisp_gpe contains generated bindings for API file lisp_gpe.api.
diff --git a/binapi/lisp_gpe/lisp_gpe_rpc.ba.go b/binapi/lisp_gpe/lisp_gpe_rpc.ba.go
index 3279fc4..8873dd5 100644
--- a/binapi/lisp_gpe/lisp_gpe_rpc.ba.go
+++ b/binapi/lisp_gpe/lisp_gpe_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service lisp_gpe.
@@ -87,7 +87,7 @@ func (c *serviceClient) GpeFwdEntryPathDump(ctx context.Context, in *GpeFwdEntry
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -110,7 +110,7 @@ func (c *serviceClient_GpeFwdEntryPathDumpClient) Recv() (*GpeFwdEntryPathDetail
switch m := msg.(type) {
case *GpeFwdEntryPathDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/lisp_types/lisp_types.ba.go b/binapi/lisp_types/lisp_types.ba.go
index 1d4a252..14b89c7 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 9c21e9c..edac7da 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 f7d8345..82c5559 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/mactime.api.json
// Package mactime contains generated bindings for API file mactime.api.
diff --git a/binapi/mactime/mactime_rpc.ba.go b/binapi/mactime/mactime_rpc.ba.go
index 42efc05..f879b22 100644
--- a/binapi/mactime/mactime_rpc.ba.go
+++ b/binapi/mactime/mactime_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service mactime.
@@ -44,7 +44,7 @@ func (c *serviceClient) MactimeDump(ctx context.Context, in *MactimeDump) (RPCSe
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -67,7 +67,7 @@ func (c *serviceClient_MactimeDumpClient) Recv() (*MactimeDetails, error) {
switch m := msg.(type) {
case *MactimeDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/map/map.ba.go b/binapi/map/map.ba.go
index 908484a..3c5012b 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/map.api.json
// Package maps contains generated bindings for API file map.api.
diff --git a/binapi/map/map_rpc.ba.go b/binapi/map/map_rpc.ba.go
index 8fcb99b..553eeda 100644
--- a/binapi/map/map_rpc.ba.go
+++ b/binapi/map/map_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service map.
@@ -75,7 +75,7 @@ func (c *serviceClient) MapDomainDump(ctx context.Context, in *MapDomainDump) (R
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -98,7 +98,7 @@ func (c *serviceClient_MapDomainDumpClient) Recv() (*MapDomainDetails, error) {
switch m := msg.(type) {
case *MapDomainDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -239,7 +239,7 @@ func (c *serviceClient) MapRuleDump(ctx context.Context, in *MapRuleDump) (RPCSe
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -262,7 +262,7 @@ func (c *serviceClient_MapRuleDumpClient) Recv() (*MapRuleDetails, error) {
switch m := msg.(type) {
case *MapRuleDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/mdata/mdata.ba.go b/binapi/mdata/mdata.ba.go
index f5c58a3..069ef62 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 b1615bd..4e120b6 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/core/memclnt.api.json
// Package memclnt contains generated bindings for API file memclnt.api.
//
// Contents:
// 2 structs
-// 22 messages
+// 24 messages
//
package memclnt
@@ -26,7 +26,7 @@ const _ = api.GoVppAPIPackageIsVersion2
const (
APIFile = "memclnt"
APIVersion = "2.1.0"
- VersionCrc = 0x8d3dd881
+ VersionCrc = 0x230bb938
)
// MessageTableEntry defines type 'message_table_entry'.
@@ -136,6 +136,74 @@ func (m *APIVersionsReply) Unmarshal(b []byte) error {
return nil
}
+// ControlPing defines message 'control_ping'.
+type ControlPing struct{}
+
+func (m *ControlPing) Reset() { *m = ControlPing{} }
+func (*ControlPing) GetMessageName() string { return "control_ping" }
+func (*ControlPing) GetCrcString() string { return "51077d14" }
+func (*ControlPing) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *ControlPing) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ return size
+}
+func (m *ControlPing) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ return buf.Bytes(), nil
+}
+func (m *ControlPing) Unmarshal(b []byte) error {
+ return nil
+}
+
+// ControlPingReply defines message 'control_ping_reply'.
+type ControlPingReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ ClientIndex uint32 `binapi:"u32,name=client_index" json:"client_index,omitempty"`
+ VpePID uint32 `binapi:"u32,name=vpe_pid" json:"vpe_pid,omitempty"`
+}
+
+func (m *ControlPingReply) Reset() { *m = ControlPingReply{} }
+func (*ControlPingReply) GetMessageName() string { return "control_ping_reply" }
+func (*ControlPingReply) GetCrcString() string { return "f6b0b8ca" }
+func (*ControlPingReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *ControlPingReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ size += 4 // m.ClientIndex
+ size += 4 // m.VpePID
+ return size
+}
+func (m *ControlPingReply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint32(m.ClientIndex)
+ buf.EncodeUint32(m.VpePID)
+ return buf.Bytes(), nil
+}
+func (m *ControlPingReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ m.ClientIndex = buf.DecodeUint32()
+ m.VpePID = buf.DecodeUint32()
+ return nil
+}
+
// GetFirstMsgID defines message 'get_first_msg_id'.
type GetFirstMsgID struct {
Name string `binapi:"string[64],name=name" json:"name,omitempty"`
@@ -920,6 +988,8 @@ func init() { file_memclnt_binapi_init() }
func file_memclnt_binapi_init() {
api.RegisterMessage((*APIVersions)(nil), "api_versions_51077d14")
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((*GetFirstMsgID)(nil), "get_first_msg_id_ebf79a66")
api.RegisterMessage((*GetFirstMsgIDReply)(nil), "get_first_msg_id_reply_7d337472")
api.RegisterMessage((*MemclntCreate)(nil), "memclnt_create_9c5e1c2f")
@@ -947,6 +1017,8 @@ func AllMessages() []api.Message {
return []api.Message{
(*APIVersions)(nil),
(*APIVersionsReply)(nil),
+ (*ControlPing)(nil),
+ (*ControlPingReply)(nil),
(*GetFirstMsgID)(nil),
(*GetFirstMsgIDReply)(nil),
(*MemclntCreate)(nil),
diff --git a/binapi/memclnt/memclnt_rpc.ba.go b/binapi/memclnt/memclnt_rpc.ba.go
index 03d32ef..072bdc8 100644
--- a/binapi/memclnt/memclnt_rpc.ba.go
+++ b/binapi/memclnt/memclnt_rpc.ba.go
@@ -11,6 +11,7 @@ import (
// RPCService defines RPC service memclnt.
type RPCService interface {
APIVersions(ctx context.Context, in *APIVersions) (*APIVersionsReply, error)
+ ControlPing(ctx context.Context, in *ControlPing) (*ControlPingReply, error)
GetFirstMsgID(ctx context.Context, in *GetFirstMsgID) (*GetFirstMsgIDReply, error)
MemclntCreate(ctx context.Context, in *MemclntCreate) (*MemclntCreateReply, error)
MemclntDelete(ctx context.Context, in *MemclntDelete) (*MemclntDeleteReply, error)
@@ -42,6 +43,15 @@ func (c *serviceClient) APIVersions(ctx context.Context, in *APIVersions) (*APIV
return out, api.RetvalToVPPApiError(out.Retval)
}
+func (c *serviceClient) ControlPing(ctx context.Context, in *ControlPing) (*ControlPingReply, error) {
+ out := new(ControlPingReply)
+ 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 2bf6ffe..b0944e5 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/memif.api.json
// Package memif contains generated bindings for API file memif.api.
diff --git a/binapi/memif/memif_rpc.ba.go b/binapi/memif/memif_rpc.ba.go
index c4cd3b1..0f7e60a 100644
--- a/binapi/memif/memif_rpc.ba.go
+++ b/binapi/memif/memif_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service memif.
@@ -55,7 +55,7 @@ func (c *serviceClient) MemifDump(ctx context.Context, in *MemifDump) (RPCServic
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -78,7 +78,7 @@ func (c *serviceClient_MemifDumpClient) Recv() (*MemifDetails, error) {
switch m := msg.(type) {
case *MemifDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -107,7 +107,7 @@ func (c *serviceClient) MemifSocketFilenameDump(ctx context.Context, in *MemifSo
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -130,7 +130,7 @@ func (c *serviceClient_MemifSocketFilenameDumpClient) Recv() (*MemifSocketFilena
switch m := msg.(type) {
case *MemifSocketFilenameDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/mfib_types/mfib_types.ba.go b/binapi/mfib_types/mfib_types.ba.go
index 510e4f3..9784984 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 6d1a598..fb12035 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/core/mpls.api.json
// Package mpls contains generated bindings for API file mpls.api.
diff --git a/binapi/mpls/mpls_rpc.ba.go b/binapi/mpls/mpls_rpc.ba.go
index ebde142..d986694 100644
--- a/binapi/mpls/mpls_rpc.ba.go
+++ b/binapi/mpls/mpls_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service mpls.
@@ -58,7 +58,7 @@ func (c *serviceClient) MplsRouteDump(ctx context.Context, in *MplsRouteDump) (R
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -81,7 +81,7 @@ func (c *serviceClient_MplsRouteDumpClient) Recv() (*MplsRouteDetails, error) {
switch m := msg.(type) {
case *MplsRouteDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -110,7 +110,7 @@ func (c *serviceClient) MplsTableDump(ctx context.Context, in *MplsTableDump) (R
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -133,7 +133,7 @@ func (c *serviceClient_MplsTableDumpClient) Recv() (*MplsTableDetails, error) {
switch m := msg.(type) {
case *MplsTableDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -162,7 +162,7 @@ func (c *serviceClient) MplsTunnelDump(ctx context.Context, in *MplsTunnelDump)
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -185,7 +185,7 @@ func (c *serviceClient_MplsTunnelDumpClient) Recv() (*MplsTunnelDetails, error)
switch m := msg.(type) {
case *MplsTunnelDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/mss_clamp/mss_clamp.ba.go b/binapi/mss_clamp/mss_clamp.ba.go
index 45ac765..af76fdb 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 b8aef37..6bc9b75 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/nat44_ed.api.json
// Package nat44_ed contains generated bindings for API file nat44_ed.api.
@@ -9,7 +9,7 @@
// Contents:
// 1 enum
// 1 struct
-// 97 messages
+// 104 messages
//
package nat44_ed
@@ -31,8 +31,8 @@ const _ = api.GoVppAPIPackageIsVersion2
const (
APIFile = "nat44_ed"
- APIVersion = "5.3.0"
- VersionCrc = 0xfd9ae40f
+ APIVersion = "5.4.0"
+ VersionCrc = 0x5697d0ef
)
// Nat44ConfigFlags defines enum 'nat44_config_flags'.
@@ -925,6 +925,187 @@ func (m *Nat44DelUserReply) Unmarshal(b []byte) error {
return nil
}
+// Nat44EdAddDelOutputInterface defines message 'nat44_ed_add_del_output_interface'.
+type Nat44EdAddDelOutputInterface 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"`
+}
+
+func (m *Nat44EdAddDelOutputInterface) Reset() { *m = Nat44EdAddDelOutputInterface{} }
+func (*Nat44EdAddDelOutputInterface) GetMessageName() string {
+ return "nat44_ed_add_del_output_interface"
+}
+func (*Nat44EdAddDelOutputInterface) GetCrcString() string { return "47d6e753" }
+func (*Nat44EdAddDelOutputInterface) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *Nat44EdAddDelOutputInterface) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 1 // m.IsAdd
+ size += 4 // m.SwIfIndex
+ return size
+}
+func (m *Nat44EdAddDelOutputInterface) 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))
+ return buf.Bytes(), nil
+}
+func (m *Nat44EdAddDelOutputInterface) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.IsAdd = buf.DecodeBool()
+ m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ return nil
+}
+
+// Nat44EdAddDelOutputInterfaceReply defines message 'nat44_ed_add_del_output_interface_reply'.
+type Nat44EdAddDelOutputInterfaceReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+}
+
+func (m *Nat44EdAddDelOutputInterfaceReply) Reset() { *m = Nat44EdAddDelOutputInterfaceReply{} }
+func (*Nat44EdAddDelOutputInterfaceReply) GetMessageName() string {
+ return "nat44_ed_add_del_output_interface_reply"
+}
+func (*Nat44EdAddDelOutputInterfaceReply) GetCrcString() string { return "e8d4e804" }
+func (*Nat44EdAddDelOutputInterfaceReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *Nat44EdAddDelOutputInterfaceReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ return size
+}
+func (m *Nat44EdAddDelOutputInterfaceReply) 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 *Nat44EdAddDelOutputInterfaceReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ return nil
+}
+
+// Nat44EdOutputInterfaceDetails defines message 'nat44_ed_output_interface_details'.
+type Nat44EdOutputInterfaceDetails struct {
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+}
+
+func (m *Nat44EdOutputInterfaceDetails) Reset() { *m = Nat44EdOutputInterfaceDetails{} }
+func (*Nat44EdOutputInterfaceDetails) GetMessageName() string {
+ return "nat44_ed_output_interface_details"
+}
+func (*Nat44EdOutputInterfaceDetails) GetCrcString() string { return "0b45011c" }
+func (*Nat44EdOutputInterfaceDetails) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *Nat44EdOutputInterfaceDetails) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.SwIfIndex
+ return size
+}
+func (m *Nat44EdOutputInterfaceDetails) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(uint32(m.SwIfIndex))
+ return buf.Bytes(), nil
+}
+func (m *Nat44EdOutputInterfaceDetails) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ return nil
+}
+
+// Nat44EdOutputInterfaceGet defines message 'nat44_ed_output_interface_get'.
+type Nat44EdOutputInterfaceGet struct {
+ Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"`
+}
+
+func (m *Nat44EdOutputInterfaceGet) Reset() { *m = Nat44EdOutputInterfaceGet{} }
+func (*Nat44EdOutputInterfaceGet) GetMessageName() string { return "nat44_ed_output_interface_get" }
+func (*Nat44EdOutputInterfaceGet) GetCrcString() string { return "f75ba505" }
+func (*Nat44EdOutputInterfaceGet) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *Nat44EdOutputInterfaceGet) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Cursor
+ return size
+}
+func (m *Nat44EdOutputInterfaceGet) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.Cursor)
+ return buf.Bytes(), nil
+}
+func (m *Nat44EdOutputInterfaceGet) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Cursor = buf.DecodeUint32()
+ return nil
+}
+
+// Nat44EdOutputInterfaceGetReply defines message 'nat44_ed_output_interface_get_reply'.
+type Nat44EdOutputInterfaceGetReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"`
+}
+
+func (m *Nat44EdOutputInterfaceGetReply) Reset() { *m = Nat44EdOutputInterfaceGetReply{} }
+func (*Nat44EdOutputInterfaceGetReply) GetMessageName() string {
+ return "nat44_ed_output_interface_get_reply"
+}
+func (*Nat44EdOutputInterfaceGetReply) GetCrcString() string { return "53b48f5d" }
+func (*Nat44EdOutputInterfaceGetReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *Nat44EdOutputInterfaceGetReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ size += 4 // m.Cursor
+ return size
+}
+func (m *Nat44EdOutputInterfaceGetReply) 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 *Nat44EdOutputInterfaceGetReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ m.Cursor = buf.DecodeUint32()
+ return nil
+}
+
// Nat44EdPluginEnableDisable defines message 'nat44_ed_plugin_enable_disable'.
// InProgress: the message form may change in the future versions
type Nat44EdPluginEnableDisable struct {
@@ -1446,6 +1627,7 @@ func (m *Nat44InterfaceAddDelFeatureReply) Unmarshal(b []byte) error {
}
// Nat44InterfaceAddDelOutputFeature defines message 'nat44_interface_add_del_output_feature'.
+// Deprecated: the message will be removed in the future versions
type Nat44InterfaceAddDelOutputFeature struct {
IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
@@ -1489,6 +1671,7 @@ func (m *Nat44InterfaceAddDelOutputFeature) Unmarshal(b []byte) error {
}
// Nat44InterfaceAddDelOutputFeatureReply defines message 'nat44_interface_add_del_output_feature_reply'.
+// Deprecated: the message will be removed in the future versions
type Nat44InterfaceAddDelOutputFeatureReply struct {
Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
@@ -1654,6 +1837,7 @@ func (m *Nat44InterfaceDump) Unmarshal(b []byte) error {
}
// Nat44InterfaceOutputFeatureDetails defines message 'nat44_interface_output_feature_details'.
+// Deprecated: the message will be removed in the future versions
type Nat44InterfaceOutputFeatureDetails struct {
Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
@@ -1693,6 +1877,7 @@ func (m *Nat44InterfaceOutputFeatureDetails) Unmarshal(b []byte) error {
}
// Nat44InterfaceOutputFeatureDump defines message 'nat44_interface_output_feature_dump'.
+// Deprecated: the message will be removed in the future versions
type Nat44InterfaceOutputFeatureDump struct{}
func (m *Nat44InterfaceOutputFeatureDump) Reset() { *m = Nat44InterfaceOutputFeatureDump{} }
@@ -2564,6 +2749,130 @@ func (m *Nat44UserSessionDump) Unmarshal(b []byte) error {
return nil
}
+// Nat44UserSessionV2Details defines message 'nat44_user_session_v2_details'.
+// InProgress: the message form may change in the future versions
+type Nat44UserSessionV2Details struct {
+ OutsideIPAddress ip_types.IP4Address `binapi:"ip4_address,name=outside_ip_address" json:"outside_ip_address,omitempty"`
+ OutsidePort uint16 `binapi:"u16,name=outside_port" json:"outside_port,omitempty"`
+ InsideIPAddress ip_types.IP4Address `binapi:"ip4_address,name=inside_ip_address" json:"inside_ip_address,omitempty"`
+ InsidePort uint16 `binapi:"u16,name=inside_port" json:"inside_port,omitempty"`
+ Protocol uint16 `binapi:"u16,name=protocol" json:"protocol,omitempty"`
+ Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
+ LastHeard uint64 `binapi:"u64,name=last_heard" json:"last_heard,omitempty"`
+ TotalBytes uint64 `binapi:"u64,name=total_bytes" json:"total_bytes,omitempty"`
+ TotalPkts uint32 `binapi:"u32,name=total_pkts" json:"total_pkts,omitempty"`
+ ExtHostAddress ip_types.IP4Address `binapi:"ip4_address,name=ext_host_address" json:"ext_host_address,omitempty"`
+ ExtHostPort uint16 `binapi:"u16,name=ext_host_port" json:"ext_host_port,omitempty"`
+ ExtHostNatAddress ip_types.IP4Address `binapi:"ip4_address,name=ext_host_nat_address" json:"ext_host_nat_address,omitempty"`
+ ExtHostNatPort uint16 `binapi:"u16,name=ext_host_nat_port" json:"ext_host_nat_port,omitempty"`
+ IsTimedOut bool `binapi:"bool,name=is_timed_out" json:"is_timed_out,omitempty"`
+}
+
+func (m *Nat44UserSessionV2Details) Reset() { *m = Nat44UserSessionV2Details{} }
+func (*Nat44UserSessionV2Details) GetMessageName() string { return "nat44_user_session_v2_details" }
+func (*Nat44UserSessionV2Details) GetCrcString() string { return "fd42b729" }
+func (*Nat44UserSessionV2Details) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *Nat44UserSessionV2Details) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 1 * 4 // m.OutsideIPAddress
+ size += 2 // m.OutsidePort
+ size += 1 * 4 // m.InsideIPAddress
+ size += 2 // m.InsidePort
+ size += 2 // m.Protocol
+ size += 1 // m.Flags
+ size += 8 // m.LastHeard
+ size += 8 // m.TotalBytes
+ size += 4 // m.TotalPkts
+ size += 1 * 4 // m.ExtHostAddress
+ size += 2 // m.ExtHostPort
+ size += 1 * 4 // m.ExtHostNatAddress
+ size += 2 // m.ExtHostNatPort
+ size += 1 // m.IsTimedOut
+ return size
+}
+func (m *Nat44UserSessionV2Details) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeBytes(m.OutsideIPAddress[:], 4)
+ buf.EncodeUint16(m.OutsidePort)
+ buf.EncodeBytes(m.InsideIPAddress[:], 4)
+ buf.EncodeUint16(m.InsidePort)
+ buf.EncodeUint16(m.Protocol)
+ buf.EncodeUint8(uint8(m.Flags))
+ buf.EncodeUint64(m.LastHeard)
+ buf.EncodeUint64(m.TotalBytes)
+ buf.EncodeUint32(m.TotalPkts)
+ buf.EncodeBytes(m.ExtHostAddress[:], 4)
+ buf.EncodeUint16(m.ExtHostPort)
+ buf.EncodeBytes(m.ExtHostNatAddress[:], 4)
+ buf.EncodeUint16(m.ExtHostNatPort)
+ buf.EncodeBool(m.IsTimedOut)
+ return buf.Bytes(), nil
+}
+func (m *Nat44UserSessionV2Details) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ copy(m.OutsideIPAddress[:], buf.DecodeBytes(4))
+ m.OutsidePort = buf.DecodeUint16()
+ copy(m.InsideIPAddress[:], buf.DecodeBytes(4))
+ m.InsidePort = buf.DecodeUint16()
+ m.Protocol = buf.DecodeUint16()
+ m.Flags = nat_types.NatConfigFlags(buf.DecodeUint8())
+ m.LastHeard = buf.DecodeUint64()
+ m.TotalBytes = buf.DecodeUint64()
+ m.TotalPkts = buf.DecodeUint32()
+ copy(m.ExtHostAddress[:], buf.DecodeBytes(4))
+ m.ExtHostPort = buf.DecodeUint16()
+ copy(m.ExtHostNatAddress[:], buf.DecodeBytes(4))
+ m.ExtHostNatPort = buf.DecodeUint16()
+ m.IsTimedOut = buf.DecodeBool()
+ return nil
+}
+
+// Nat44UserSessionV2Dump defines message 'nat44_user_session_v2_dump'.
+// InProgress: the message form may change in the future versions
+type Nat44UserSessionV2Dump struct {
+ IPAddress ip_types.IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"`
+ VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
+}
+
+func (m *Nat44UserSessionV2Dump) Reset() { *m = Nat44UserSessionV2Dump{} }
+func (*Nat44UserSessionV2Dump) GetMessageName() string { return "nat44_user_session_v2_dump" }
+func (*Nat44UserSessionV2Dump) GetCrcString() string { return "e1899c98" }
+func (*Nat44UserSessionV2Dump) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *Nat44UserSessionV2Dump) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 1 * 4 // m.IPAddress
+ size += 4 // m.VrfID
+ return size
+}
+func (m *Nat44UserSessionV2Dump) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeBytes(m.IPAddress[:], 4)
+ buf.EncodeUint32(m.VrfID)
+ return buf.Bytes(), nil
+}
+func (m *Nat44UserSessionV2Dump) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ copy(m.IPAddress[:], buf.DecodeBytes(4))
+ m.VrfID = buf.DecodeUint32()
+ return nil
+}
+
// NatControlPing defines message 'nat_control_ping'.
// Deprecated: the message will be removed in the future versions
type NatControlPing struct{}
@@ -4129,6 +4438,11 @@ func file_nat44_ed_binapi_init() {
api.RegisterMessage((*Nat44DelSessionReply)(nil), "nat44_del_session_reply_e8d4e804")
api.RegisterMessage((*Nat44DelUser)(nil), "nat44_del_user_99a9f998")
api.RegisterMessage((*Nat44DelUserReply)(nil), "nat44_del_user_reply_e8d4e804")
+ api.RegisterMessage((*Nat44EdAddDelOutputInterface)(nil), "nat44_ed_add_del_output_interface_47d6e753")
+ api.RegisterMessage((*Nat44EdAddDelOutputInterfaceReply)(nil), "nat44_ed_add_del_output_interface_reply_e8d4e804")
+ api.RegisterMessage((*Nat44EdOutputInterfaceDetails)(nil), "nat44_ed_output_interface_details_0b45011c")
+ api.RegisterMessage((*Nat44EdOutputInterfaceGet)(nil), "nat44_ed_output_interface_get_f75ba505")
+ api.RegisterMessage((*Nat44EdOutputInterfaceGetReply)(nil), "nat44_ed_output_interface_get_reply_53b48f5d")
api.RegisterMessage((*Nat44EdPluginEnableDisable)(nil), "nat44_ed_plugin_enable_disable_be17f8dd")
api.RegisterMessage((*Nat44EdPluginEnableDisableReply)(nil), "nat44_ed_plugin_enable_disable_reply_e8d4e804")
api.RegisterMessage((*Nat44EdSetFqOptions)(nil), "nat44_ed_set_fq_options_2399bd71")
@@ -4169,6 +4483,8 @@ func file_nat44_ed_binapi_init() {
api.RegisterMessage((*Nat44UserDump)(nil), "nat44_user_dump_51077d14")
api.RegisterMessage((*Nat44UserSessionDetails)(nil), "nat44_user_session_details_2cf6e16d")
api.RegisterMessage((*Nat44UserSessionDump)(nil), "nat44_user_session_dump_e1899c98")
+ api.RegisterMessage((*Nat44UserSessionV2Details)(nil), "nat44_user_session_v2_details_fd42b729")
+ api.RegisterMessage((*Nat44UserSessionV2Dump)(nil), "nat44_user_session_v2_dump_e1899c98")
api.RegisterMessage((*NatControlPing)(nil), "nat_control_ping_51077d14")
api.RegisterMessage((*NatControlPingReply)(nil), "nat_control_ping_reply_f6b0b8ca")
api.RegisterMessage((*NatGetAddrAndPortAllocAlg)(nil), "nat_get_addr_and_port_alloc_alg_51077d14")
@@ -4231,6 +4547,11 @@ func AllMessages() []api.Message {
(*Nat44DelSessionReply)(nil),
(*Nat44DelUser)(nil),
(*Nat44DelUserReply)(nil),
+ (*Nat44EdAddDelOutputInterface)(nil),
+ (*Nat44EdAddDelOutputInterfaceReply)(nil),
+ (*Nat44EdOutputInterfaceDetails)(nil),
+ (*Nat44EdOutputInterfaceGet)(nil),
+ (*Nat44EdOutputInterfaceGetReply)(nil),
(*Nat44EdPluginEnableDisable)(nil),
(*Nat44EdPluginEnableDisableReply)(nil),
(*Nat44EdSetFqOptions)(nil),
@@ -4271,6 +4592,8 @@ func AllMessages() []api.Message {
(*Nat44UserDump)(nil),
(*Nat44UserSessionDetails)(nil),
(*Nat44UserSessionDump)(nil),
+ (*Nat44UserSessionV2Details)(nil),
+ (*Nat44UserSessionV2Dump)(nil),
(*NatControlPing)(nil),
(*NatControlPingReply)(nil),
(*NatGetAddrAndPortAllocAlg)(nil),
diff --git a/binapi/nat44_ed/nat44_ed_rpc.ba.go b/binapi/nat44_ed/nat44_ed_rpc.ba.go
index 0df7b2c..820372e 100644
--- a/binapi/nat44_ed/nat44_ed_rpc.ba.go
+++ b/binapi/nat44_ed/nat44_ed_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service nat44_ed.
@@ -22,6 +22,8 @@ type RPCService interface {
Nat44AddressDump(ctx context.Context, in *Nat44AddressDump) (RPCService_Nat44AddressDumpClient, error)
Nat44DelSession(ctx context.Context, in *Nat44DelSession) (*Nat44DelSessionReply, error)
Nat44DelUser(ctx context.Context, in *Nat44DelUser) (*Nat44DelUserReply, error)
+ Nat44EdAddDelOutputInterface(ctx context.Context, in *Nat44EdAddDelOutputInterface) (*Nat44EdAddDelOutputInterfaceReply, error)
+ Nat44EdOutputInterfaceGet(ctx context.Context, in *Nat44EdOutputInterfaceGet) (RPCService_Nat44EdOutputInterfaceGetClient, error)
Nat44EdPluginEnableDisable(ctx context.Context, in *Nat44EdPluginEnableDisable) (*Nat44EdPluginEnableDisableReply, error)
Nat44EdSetFqOptions(ctx context.Context, in *Nat44EdSetFqOptions) (*Nat44EdSetFqOptionsReply, error)
Nat44EdShowFqOptions(ctx context.Context, in *Nat44EdShowFqOptions) (*Nat44EdShowFqOptionsReply, error)
@@ -42,6 +44,7 @@ type RPCService interface {
Nat44StaticMappingDump(ctx context.Context, in *Nat44StaticMappingDump) (RPCService_Nat44StaticMappingDumpClient, error)
Nat44UserDump(ctx context.Context, in *Nat44UserDump) (RPCService_Nat44UserDumpClient, error)
Nat44UserSessionDump(ctx context.Context, in *Nat44UserSessionDump) (RPCService_Nat44UserSessionDumpClient, error)
+ Nat44UserSessionV2Dump(ctx context.Context, in *Nat44UserSessionV2Dump) (RPCService_Nat44UserSessionV2DumpClient, error)
NatControlPing(ctx context.Context, in *NatControlPing) (*NatControlPingReply, error)
NatGetAddrAndPortAllocAlg(ctx context.Context, in *NatGetAddrAndPortAllocAlg) (*NatGetAddrAndPortAllocAlgReply, error)
NatGetMssClamping(ctx context.Context, in *NatGetMssClamping) (*NatGetMssClampingReply, error)
@@ -134,7 +137,7 @@ func (c *serviceClient) Nat44AddressDump(ctx context.Context, in *Nat44AddressDu
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -157,7 +160,7 @@ func (c *serviceClient_Nat44AddressDumpClient) Recv() (*Nat44AddressDetails, err
switch m := msg.(type) {
case *Nat44AddressDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -186,6 +189,55 @@ func (c *serviceClient) Nat44DelUser(ctx context.Context, in *Nat44DelUser) (*Na
return out, api.RetvalToVPPApiError(out.Retval)
}
+func (c *serviceClient) Nat44EdAddDelOutputInterface(ctx context.Context, in *Nat44EdAddDelOutputInterface) (*Nat44EdAddDelOutputInterfaceReply, error) {
+ out := new(Nat44EdAddDelOutputInterfaceReply)
+ err := c.conn.Invoke(ctx, in, out)
+ if err != nil {
+ return nil, err
+ }
+ return out, api.RetvalToVPPApiError(out.Retval)
+}
+
+func (c *serviceClient) Nat44EdOutputInterfaceGet(ctx context.Context, in *Nat44EdOutputInterfaceGet) (RPCService_Nat44EdOutputInterfaceGetClient, error) {
+ stream, err := c.conn.NewStream(ctx)
+ if err != nil {
+ return nil, err
+ }
+ x := &serviceClient_Nat44EdOutputInterfaceGetClient{stream}
+ if err := x.Stream.SendMsg(in); err != nil {
+ return nil, err
+ }
+ return x, nil
+}
+
+type RPCService_Nat44EdOutputInterfaceGetClient interface {
+ Recv() (*Nat44EdOutputInterfaceDetails, error)
+ api.Stream
+}
+
+type serviceClient_Nat44EdOutputInterfaceGetClient struct {
+ api.Stream
+}
+
+func (c *serviceClient_Nat44EdOutputInterfaceGetClient) Recv() (*Nat44EdOutputInterfaceDetails, error) {
+ msg, err := c.Stream.RecvMsg()
+ if err != nil {
+ return nil, err
+ }
+ switch m := msg.(type) {
+ case *Nat44EdOutputInterfaceDetails:
+ return m, nil
+ case *Nat44EdOutputInterfaceGetReply:
+ 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) Nat44EdPluginEnableDisable(ctx context.Context, in *Nat44EdPluginEnableDisable) (*Nat44EdPluginEnableDisableReply, error) {
out := new(Nat44EdPluginEnableDisableReply)
err := c.conn.Invoke(ctx, in, out)
@@ -240,7 +292,7 @@ func (c *serviceClient) Nat44IdentityMappingDump(ctx context.Context, in *Nat44I
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -263,7 +315,7 @@ func (c *serviceClient_Nat44IdentityMappingDumpClient) Recv() (*Nat44IdentityMap
switch m := msg.(type) {
case *Nat44IdentityMappingDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -301,7 +353,7 @@ func (c *serviceClient) Nat44InterfaceAddrDump(ctx context.Context, in *Nat44Int
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -324,7 +376,7 @@ func (c *serviceClient_Nat44InterfaceAddrDumpClient) Recv() (*Nat44InterfaceAddr
switch m := msg.(type) {
case *Nat44InterfaceAddrDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -344,7 +396,7 @@ func (c *serviceClient) Nat44InterfaceDump(ctx context.Context, in *Nat44Interfa
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -367,7 +419,7 @@ func (c *serviceClient_Nat44InterfaceDumpClient) Recv() (*Nat44InterfaceDetails,
switch m := msg.(type) {
case *Nat44InterfaceDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -387,7 +439,7 @@ func (c *serviceClient) Nat44InterfaceOutputFeatureDump(ctx context.Context, in
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -410,7 +462,7 @@ func (c *serviceClient_Nat44InterfaceOutputFeatureDumpClient) Recv() (*Nat44Inte
switch m := msg.(type) {
case *Nat44InterfaceOutputFeatureDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -439,7 +491,7 @@ func (c *serviceClient) Nat44LbStaticMappingDump(ctx context.Context, in *Nat44L
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -462,7 +514,7 @@ func (c *serviceClient_Nat44LbStaticMappingDumpClient) Recv() (*Nat44LbStaticMap
switch m := msg.(type) {
case *Nat44LbStaticMappingDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -518,7 +570,7 @@ func (c *serviceClient) Nat44StaticMappingDump(ctx context.Context, in *Nat44Sta
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -541,7 +593,7 @@ func (c *serviceClient_Nat44StaticMappingDumpClient) Recv() (*Nat44StaticMapping
switch m := msg.(type) {
case *Nat44StaticMappingDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -561,7 +613,7 @@ func (c *serviceClient) Nat44UserDump(ctx context.Context, in *Nat44UserDump) (R
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -584,7 +636,7 @@ func (c *serviceClient_Nat44UserDumpClient) Recv() (*Nat44UserDetails, error) {
switch m := msg.(type) {
case *Nat44UserDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -604,7 +656,7 @@ func (c *serviceClient) Nat44UserSessionDump(ctx context.Context, in *Nat44UserS
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -627,7 +679,50 @@ func (c *serviceClient_Nat44UserSessionDumpClient) Recv() (*Nat44UserSessionDeta
switch m := msg.(type) {
case *Nat44UserSessionDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
+ err = c.Stream.Close()
+ if err != nil {
+ return nil, err
+ }
+ return nil, io.EOF
+ default:
+ return nil, fmt.Errorf("unexpected message: %T %v", m, m)
+ }
+}
+
+func (c *serviceClient) Nat44UserSessionV2Dump(ctx context.Context, in *Nat44UserSessionV2Dump) (RPCService_Nat44UserSessionV2DumpClient, error) {
+ stream, err := c.conn.NewStream(ctx)
+ if err != nil {
+ return nil, err
+ }
+ x := &serviceClient_Nat44UserSessionV2DumpClient{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_Nat44UserSessionV2DumpClient interface {
+ Recv() (*Nat44UserSessionV2Details, error)
+ api.Stream
+}
+
+type serviceClient_Nat44UserSessionV2DumpClient struct {
+ api.Stream
+}
+
+func (c *serviceClient_Nat44UserSessionV2DumpClient) Recv() (*Nat44UserSessionV2Details, error) {
+ msg, err := c.Stream.RecvMsg()
+ if err != nil {
+ return nil, err
+ }
+ switch m := msg.(type) {
+ case *Nat44UserSessionV2Details:
+ return m, nil
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -809,7 +904,7 @@ func (c *serviceClient) NatWorkerDump(ctx context.Context, in *NatWorkerDump) (R
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -832,7 +927,7 @@ func (c *serviceClient_NatWorkerDumpClient) Recv() (*NatWorkerDetails, error) {
switch m := msg.(type) {
case *NatWorkerDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/nat44_ei/nat44_ei.ba.go b/binapi/nat44_ei/nat44_ei.ba.go
index 8f5968b..d69072b 100644
--- a/binapi/nat44_ei/nat44_ei.ba.go
+++ b/binapi/nat44_ei/nat44_ei.ba.go
@@ -1,14 +1,14 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
// binapi-generator: v0.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/nat44_ei.api.json
// Package nat44_ei contains generated bindings for API file nat44_ei.api.
//
// Contents:
// 1 enum
-// 73 messages
+// 78 messages
//
package nat44_ei
@@ -31,7 +31,7 @@ const _ = api.GoVppAPIPackageIsVersion2
const (
APIFile = "nat44_ei"
APIVersion = "1.1.1"
- VersionCrc = 0x62d113ee
+ VersionCrc = 0xfa6ff1f7
)
// Nat44EiConfigFlags defines enum 'nat44_ei_config_flags'.
@@ -358,6 +358,80 @@ func (m *Nat44EiAddDelInterfaceAddrReply) Unmarshal(b []byte) error {
return nil
}
+// Nat44EiAddDelOutputInterface defines message 'nat44_ei_add_del_output_interface'.
+type Nat44EiAddDelOutputInterface 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"`
+}
+
+func (m *Nat44EiAddDelOutputInterface) Reset() { *m = Nat44EiAddDelOutputInterface{} }
+func (*Nat44EiAddDelOutputInterface) GetMessageName() string {
+ return "nat44_ei_add_del_output_interface"
+}
+func (*Nat44EiAddDelOutputInterface) GetCrcString() string { return "47d6e753" }
+func (*Nat44EiAddDelOutputInterface) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *Nat44EiAddDelOutputInterface) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 1 // m.IsAdd
+ size += 4 // m.SwIfIndex
+ return size
+}
+func (m *Nat44EiAddDelOutputInterface) 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))
+ return buf.Bytes(), nil
+}
+func (m *Nat44EiAddDelOutputInterface) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.IsAdd = buf.DecodeBool()
+ m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ return nil
+}
+
+// Nat44EiAddDelOutputInterfaceReply defines message 'nat44_ei_add_del_output_interface_reply'.
+type Nat44EiAddDelOutputInterfaceReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+}
+
+func (m *Nat44EiAddDelOutputInterfaceReply) Reset() { *m = Nat44EiAddDelOutputInterfaceReply{} }
+func (*Nat44EiAddDelOutputInterfaceReply) GetMessageName() string {
+ return "nat44_ei_add_del_output_interface_reply"
+}
+func (*Nat44EiAddDelOutputInterfaceReply) GetCrcString() string { return "e8d4e804" }
+func (*Nat44EiAddDelOutputInterfaceReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *Nat44EiAddDelOutputInterfaceReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ return size
+}
+func (m *Nat44EiAddDelOutputInterfaceReply) 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 *Nat44EiAddDelOutputInterfaceReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ return nil
+}
+
// Nat44EiAddDelStaticMapping defines message 'nat44_ei_add_del_static_mapping'.
// InProgress: the message form may change in the future versions
type Nat44EiAddDelStaticMapping struct {
@@ -1926,6 +2000,113 @@ func (m *Nat44EiIpfixEnableDisableReply) Unmarshal(b []byte) error {
return nil
}
+// Nat44EiOutputInterfaceDetails defines message 'nat44_ei_output_interface_details'.
+type Nat44EiOutputInterfaceDetails struct {
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+}
+
+func (m *Nat44EiOutputInterfaceDetails) Reset() { *m = Nat44EiOutputInterfaceDetails{} }
+func (*Nat44EiOutputInterfaceDetails) GetMessageName() string {
+ return "nat44_ei_output_interface_details"
+}
+func (*Nat44EiOutputInterfaceDetails) GetCrcString() string { return "0b45011c" }
+func (*Nat44EiOutputInterfaceDetails) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *Nat44EiOutputInterfaceDetails) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.SwIfIndex
+ return size
+}
+func (m *Nat44EiOutputInterfaceDetails) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(uint32(m.SwIfIndex))
+ return buf.Bytes(), nil
+}
+func (m *Nat44EiOutputInterfaceDetails) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ return nil
+}
+
+// Nat44EiOutputInterfaceGet defines message 'nat44_ei_output_interface_get'.
+type Nat44EiOutputInterfaceGet struct {
+ Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"`
+}
+
+func (m *Nat44EiOutputInterfaceGet) Reset() { *m = Nat44EiOutputInterfaceGet{} }
+func (*Nat44EiOutputInterfaceGet) GetMessageName() string { return "nat44_ei_output_interface_get" }
+func (*Nat44EiOutputInterfaceGet) GetCrcString() string { return "f75ba505" }
+func (*Nat44EiOutputInterfaceGet) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *Nat44EiOutputInterfaceGet) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Cursor
+ return size
+}
+func (m *Nat44EiOutputInterfaceGet) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.Cursor)
+ return buf.Bytes(), nil
+}
+func (m *Nat44EiOutputInterfaceGet) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Cursor = buf.DecodeUint32()
+ return nil
+}
+
+// Nat44EiOutputInterfaceGetReply defines message 'nat44_ei_output_interface_get_reply'.
+type Nat44EiOutputInterfaceGetReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"`
+}
+
+func (m *Nat44EiOutputInterfaceGetReply) Reset() { *m = Nat44EiOutputInterfaceGetReply{} }
+func (*Nat44EiOutputInterfaceGetReply) GetMessageName() string {
+ return "nat44_ei_output_interface_get_reply"
+}
+func (*Nat44EiOutputInterfaceGetReply) GetCrcString() string { return "53b48f5d" }
+func (*Nat44EiOutputInterfaceGetReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *Nat44EiOutputInterfaceGetReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ size += 4 // m.Cursor
+ return size
+}
+func (m *Nat44EiOutputInterfaceGetReply) 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 *Nat44EiOutputInterfaceGetReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ m.Cursor = buf.DecodeUint32()
+ return nil
+}
+
// Nat44EiPluginEnableDisable defines message 'nat44_ei_plugin_enable_disable'.
// InProgress: the message form may change in the future versions
type Nat44EiPluginEnableDisable struct {
@@ -3021,6 +3202,8 @@ func file_nat44_ei_binapi_init() {
api.RegisterMessage((*Nat44EiAddDelIdentityMappingReply)(nil), "nat44_ei_add_del_identity_mapping_reply_e8d4e804")
api.RegisterMessage((*Nat44EiAddDelInterfaceAddr)(nil), "nat44_ei_add_del_interface_addr_883abbcc")
api.RegisterMessage((*Nat44EiAddDelInterfaceAddrReply)(nil), "nat44_ei_add_del_interface_addr_reply_e8d4e804")
+ api.RegisterMessage((*Nat44EiAddDelOutputInterface)(nil), "nat44_ei_add_del_output_interface_47d6e753")
+ api.RegisterMessage((*Nat44EiAddDelOutputInterfaceReply)(nil), "nat44_ei_add_del_output_interface_reply_e8d4e804")
api.RegisterMessage((*Nat44EiAddDelStaticMapping)(nil), "nat44_ei_add_del_static_mapping_b404b7fe")
api.RegisterMessage((*Nat44EiAddDelStaticMappingReply)(nil), "nat44_ei_add_del_static_mapping_reply_e8d4e804")
api.RegisterMessage((*Nat44EiAddressDetails)(nil), "nat44_ei_address_details_318f1202")
@@ -3062,6 +3245,9 @@ func file_nat44_ei_binapi_init() {
api.RegisterMessage((*Nat44EiInterfaceOutputFeatureDump)(nil), "nat44_ei_interface_output_feature_dump_51077d14")
api.RegisterMessage((*Nat44EiIpfixEnableDisable)(nil), "nat44_ei_ipfix_enable_disable_9af4a2d2")
api.RegisterMessage((*Nat44EiIpfixEnableDisableReply)(nil), "nat44_ei_ipfix_enable_disable_reply_e8d4e804")
+ api.RegisterMessage((*Nat44EiOutputInterfaceDetails)(nil), "nat44_ei_output_interface_details_0b45011c")
+ api.RegisterMessage((*Nat44EiOutputInterfaceGet)(nil), "nat44_ei_output_interface_get_f75ba505")
+ api.RegisterMessage((*Nat44EiOutputInterfaceGetReply)(nil), "nat44_ei_output_interface_get_reply_53b48f5d")
api.RegisterMessage((*Nat44EiPluginEnableDisable)(nil), "nat44_ei_plugin_enable_disable_bf692144")
api.RegisterMessage((*Nat44EiPluginEnableDisableReply)(nil), "nat44_ei_plugin_enable_disable_reply_e8d4e804")
api.RegisterMessage((*Nat44EiSetAddrAndPortAllocAlg)(nil), "nat44_ei_set_addr_and_port_alloc_alg_deeb746f")
@@ -3099,6 +3285,8 @@ func AllMessages() []api.Message {
(*Nat44EiAddDelIdentityMappingReply)(nil),
(*Nat44EiAddDelInterfaceAddr)(nil),
(*Nat44EiAddDelInterfaceAddrReply)(nil),
+ (*Nat44EiAddDelOutputInterface)(nil),
+ (*Nat44EiAddDelOutputInterfaceReply)(nil),
(*Nat44EiAddDelStaticMapping)(nil),
(*Nat44EiAddDelStaticMappingReply)(nil),
(*Nat44EiAddressDetails)(nil),
@@ -3140,6 +3328,9 @@ func AllMessages() []api.Message {
(*Nat44EiInterfaceOutputFeatureDump)(nil),
(*Nat44EiIpfixEnableDisable)(nil),
(*Nat44EiIpfixEnableDisableReply)(nil),
+ (*Nat44EiOutputInterfaceDetails)(nil),
+ (*Nat44EiOutputInterfaceGet)(nil),
+ (*Nat44EiOutputInterfaceGetReply)(nil),
(*Nat44EiPluginEnableDisable)(nil),
(*Nat44EiPluginEnableDisableReply)(nil),
(*Nat44EiSetAddrAndPortAllocAlg)(nil),
diff --git a/binapi/nat44_ei/nat44_ei_rpc.ba.go b/binapi/nat44_ei/nat44_ei_rpc.ba.go
index a20c60f..78b5d3a 100644
--- a/binapi/nat44_ei/nat44_ei_rpc.ba.go
+++ b/binapi/nat44_ei/nat44_ei_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service nat44_ei.
@@ -16,6 +16,7 @@ type RPCService interface {
Nat44EiAddDelAddressRange(ctx context.Context, in *Nat44EiAddDelAddressRange) (*Nat44EiAddDelAddressRangeReply, error)
Nat44EiAddDelIdentityMapping(ctx context.Context, in *Nat44EiAddDelIdentityMapping) (*Nat44EiAddDelIdentityMappingReply, error)
Nat44EiAddDelInterfaceAddr(ctx context.Context, in *Nat44EiAddDelInterfaceAddr) (*Nat44EiAddDelInterfaceAddrReply, error)
+ Nat44EiAddDelOutputInterface(ctx context.Context, in *Nat44EiAddDelOutputInterface) (*Nat44EiAddDelOutputInterfaceReply, error)
Nat44EiAddDelStaticMapping(ctx context.Context, in *Nat44EiAddDelStaticMapping) (*Nat44EiAddDelStaticMappingReply, error)
Nat44EiAddressDump(ctx context.Context, in *Nat44EiAddressDump) (RPCService_Nat44EiAddressDumpClient, error)
Nat44EiDelSession(ctx context.Context, in *Nat44EiDelSession) (*Nat44EiDelSessionReply, error)
@@ -36,6 +37,7 @@ type RPCService interface {
Nat44EiInterfaceDump(ctx context.Context, in *Nat44EiInterfaceDump) (RPCService_Nat44EiInterfaceDumpClient, error)
Nat44EiInterfaceOutputFeatureDump(ctx context.Context, in *Nat44EiInterfaceOutputFeatureDump) (RPCService_Nat44EiInterfaceOutputFeatureDumpClient, error)
Nat44EiIpfixEnableDisable(ctx context.Context, in *Nat44EiIpfixEnableDisable) (*Nat44EiIpfixEnableDisableReply, error)
+ Nat44EiOutputInterfaceGet(ctx context.Context, in *Nat44EiOutputInterfaceGet) (RPCService_Nat44EiOutputInterfaceGetClient, error)
Nat44EiPluginEnableDisable(ctx context.Context, in *Nat44EiPluginEnableDisable) (*Nat44EiPluginEnableDisableReply, error)
Nat44EiSetAddrAndPortAllocAlg(ctx context.Context, in *Nat44EiSetAddrAndPortAllocAlg) (*Nat44EiSetAddrAndPortAllocAlgReply, error)
Nat44EiSetFqOptions(ctx context.Context, in *Nat44EiSetFqOptions) (*Nat44EiSetFqOptionsReply, error)
@@ -86,6 +88,15 @@ func (c *serviceClient) Nat44EiAddDelInterfaceAddr(ctx context.Context, in *Nat4
return out, api.RetvalToVPPApiError(out.Retval)
}
+func (c *serviceClient) Nat44EiAddDelOutputInterface(ctx context.Context, in *Nat44EiAddDelOutputInterface) (*Nat44EiAddDelOutputInterfaceReply, error) {
+ out := new(Nat44EiAddDelOutputInterfaceReply)
+ err := c.conn.Invoke(ctx, in, out)
+ if err != nil {
+ return nil, err
+ }
+ return out, api.RetvalToVPPApiError(out.Retval)
+}
+
func (c *serviceClient) Nat44EiAddDelStaticMapping(ctx context.Context, in *Nat44EiAddDelStaticMapping) (*Nat44EiAddDelStaticMappingReply, error) {
out := new(Nat44EiAddDelStaticMappingReply)
err := c.conn.Invoke(ctx, in, out)
@@ -104,7 +115,7 @@ func (c *serviceClient) Nat44EiAddressDump(ctx context.Context, in *Nat44EiAddre
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -127,7 +138,7 @@ func (c *serviceClient_Nat44EiAddressDumpClient) Recv() (*Nat44EiAddressDetails,
switch m := msg.(type) {
case *Nat44EiAddressDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -246,7 +257,7 @@ func (c *serviceClient) Nat44EiIdentityMappingDump(ctx context.Context, in *Nat4
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -269,7 +280,7 @@ func (c *serviceClient_Nat44EiIdentityMappingDumpClient) Recv() (*Nat44EiIdentit
switch m := msg.(type) {
case *Nat44EiIdentityMappingDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -307,7 +318,7 @@ func (c *serviceClient) Nat44EiInterfaceAddrDump(ctx context.Context, in *Nat44E
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -330,7 +341,7 @@ func (c *serviceClient_Nat44EiInterfaceAddrDumpClient) Recv() (*Nat44EiInterface
switch m := msg.(type) {
case *Nat44EiInterfaceAddrDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -350,7 +361,7 @@ func (c *serviceClient) Nat44EiInterfaceDump(ctx context.Context, in *Nat44EiInt
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -373,7 +384,7 @@ func (c *serviceClient_Nat44EiInterfaceDumpClient) Recv() (*Nat44EiInterfaceDeta
switch m := msg.(type) {
case *Nat44EiInterfaceDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -393,7 +404,7 @@ func (c *serviceClient) Nat44EiInterfaceOutputFeatureDump(ctx context.Context, i
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -416,7 +427,7 @@ func (c *serviceClient_Nat44EiInterfaceOutputFeatureDumpClient) Recv() (*Nat44Ei
switch m := msg.(type) {
case *Nat44EiInterfaceOutputFeatureDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -436,6 +447,46 @@ func (c *serviceClient) Nat44EiIpfixEnableDisable(ctx context.Context, in *Nat44
return out, api.RetvalToVPPApiError(out.Retval)
}
+func (c *serviceClient) Nat44EiOutputInterfaceGet(ctx context.Context, in *Nat44EiOutputInterfaceGet) (RPCService_Nat44EiOutputInterfaceGetClient, error) {
+ stream, err := c.conn.NewStream(ctx)
+ if err != nil {
+ return nil, err
+ }
+ x := &serviceClient_Nat44EiOutputInterfaceGetClient{stream}
+ if err := x.Stream.SendMsg(in); err != nil {
+ return nil, err
+ }
+ return x, nil
+}
+
+type RPCService_Nat44EiOutputInterfaceGetClient interface {
+ Recv() (*Nat44EiOutputInterfaceDetails, error)
+ api.Stream
+}
+
+type serviceClient_Nat44EiOutputInterfaceGetClient struct {
+ api.Stream
+}
+
+func (c *serviceClient_Nat44EiOutputInterfaceGetClient) Recv() (*Nat44EiOutputInterfaceDetails, error) {
+ msg, err := c.Stream.RecvMsg()
+ if err != nil {
+ return nil, err
+ }
+ switch m := msg.(type) {
+ case *Nat44EiOutputInterfaceDetails:
+ return m, nil
+ case *Nat44EiOutputInterfaceGetReply:
+ 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) Nat44EiPluginEnableDisable(ctx context.Context, in *Nat44EiPluginEnableDisable) (*Nat44EiPluginEnableDisableReply, error) {
out := new(Nat44EiPluginEnableDisableReply)
err := c.conn.Invoke(ctx, in, out)
@@ -526,7 +577,7 @@ func (c *serviceClient) Nat44EiStaticMappingDump(ctx context.Context, in *Nat44E
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -549,7 +600,7 @@ func (c *serviceClient_Nat44EiStaticMappingDumpClient) Recv() (*Nat44EiStaticMap
switch m := msg.(type) {
case *Nat44EiStaticMappingDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -569,7 +620,7 @@ func (c *serviceClient) Nat44EiUserDump(ctx context.Context, in *Nat44EiUserDump
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -592,7 +643,7 @@ func (c *serviceClient_Nat44EiUserDumpClient) Recv() (*Nat44EiUserDetails, error
switch m := msg.(type) {
case *Nat44EiUserDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -612,7 +663,7 @@ func (c *serviceClient) Nat44EiUserSessionDump(ctx context.Context, in *Nat44EiU
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -635,7 +686,7 @@ func (c *serviceClient_Nat44EiUserSessionDumpClient) Recv() (*Nat44EiUserSession
switch m := msg.(type) {
case *Nat44EiUserSessionDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -655,7 +706,7 @@ func (c *serviceClient) Nat44EiWorkerDump(ctx context.Context, in *Nat44EiWorker
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -678,7 +729,7 @@ func (c *serviceClient_Nat44EiWorkerDumpClient) Recv() (*Nat44EiWorkerDetails, e
switch m := msg.(type) {
case *Nat44EiWorkerDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/nat64/nat64.ba.go b/binapi/nat64/nat64.ba.go
index 9591dc7..f6bc3ce 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/nat64.api.json
// Package nat64 contains generated bindings for API file nat64.api.
diff --git a/binapi/nat64/nat64_rpc.ba.go b/binapi/nat64/nat64_rpc.ba.go
index baa2ec9..a8fb05e 100644
--- a/binapi/nat64/nat64_rpc.ba.go
+++ b/binapi/nat64/nat64_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service nat64.
@@ -90,7 +90,7 @@ func (c *serviceClient) Nat64BibDump(ctx context.Context, in *Nat64BibDump) (RPC
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -113,7 +113,7 @@ func (c *serviceClient_Nat64BibDumpClient) Recv() (*Nat64BibDetails, error) {
switch m := msg.(type) {
case *Nat64BibDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -142,7 +142,7 @@ func (c *serviceClient) Nat64InterfaceDump(ctx context.Context, in *Nat64Interfa
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -165,7 +165,7 @@ func (c *serviceClient_Nat64InterfaceDumpClient) Recv() (*Nat64InterfaceDetails,
switch m := msg.(type) {
case *Nat64InterfaceDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -194,7 +194,7 @@ func (c *serviceClient) Nat64PoolAddrDump(ctx context.Context, in *Nat64PoolAddr
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -217,7 +217,7 @@ func (c *serviceClient_Nat64PoolAddrDumpClient) Recv() (*Nat64PoolAddrDetails, e
switch m := msg.(type) {
case *Nat64PoolAddrDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -237,7 +237,7 @@ func (c *serviceClient) Nat64PrefixDump(ctx context.Context, in *Nat64PrefixDump
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -260,7 +260,7 @@ func (c *serviceClient_Nat64PrefixDumpClient) Recv() (*Nat64PrefixDetails, error
switch m := msg.(type) {
case *Nat64PrefixDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -289,7 +289,7 @@ func (c *serviceClient) Nat64StDump(ctx context.Context, in *Nat64StDump) (RPCSe
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -312,7 +312,7 @@ func (c *serviceClient_Nat64StDumpClient) Recv() (*Nat64StDetails, error) {
switch m := msg.(type) {
case *Nat64StDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/nat66/nat66.ba.go b/binapi/nat66/nat66.ba.go
index 632c3f9..68ef3ad 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/nat66.api.json
// Package nat66 contains generated bindings for API file nat66.api.
diff --git a/binapi/nat66/nat66_rpc.ba.go b/binapi/nat66/nat66_rpc.ba.go
index 76675df..768519c 100644
--- a/binapi/nat66/nat66_rpc.ba.go
+++ b/binapi/nat66/nat66_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service nat66.
@@ -55,7 +55,7 @@ func (c *serviceClient) Nat66InterfaceDump(ctx context.Context, in *Nat66Interfa
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -78,7 +78,7 @@ func (c *serviceClient_Nat66InterfaceDumpClient) Recv() (*Nat66InterfaceDetails,
switch m := msg.(type) {
case *Nat66InterfaceDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -107,7 +107,7 @@ func (c *serviceClient) Nat66StaticMappingDump(ctx context.Context, in *Nat66Sta
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -130,7 +130,7 @@ func (c *serviceClient_Nat66StaticMappingDumpClient) Recv() (*Nat66StaticMapping
switch m := msg.(type) {
case *Nat66StaticMappingDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/nat_types/nat_types.ba.go b/binapi/nat_types/nat_types.ba.go
index a8f8fbf..ced3962 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/nat_types.api.json
// Package nat_types contains generated bindings for API file nat_types.api.
diff --git a/binapi/nsh/nsh.ba.go b/binapi/nsh/nsh.ba.go
index 3aaf90d..4c4fd85 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/nsh.api.json
// Package nsh contains generated bindings for API file nsh.api.
diff --git a/binapi/nsh/nsh_rpc.ba.go b/binapi/nsh/nsh_rpc.ba.go
index d7dd6aa..6a37c5b 100644
--- a/binapi/nsh/nsh_rpc.ba.go
+++ b/binapi/nsh/nsh_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service nsh.
@@ -54,7 +54,7 @@ func (c *serviceClient) NshEntryDump(ctx context.Context, in *NshEntryDump) (RPC
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -77,7 +77,7 @@ func (c *serviceClient_NshEntryDumpClient) Recv() (*NshEntryDetails, error) {
switch m := msg.(type) {
case *NshEntryDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -97,7 +97,7 @@ func (c *serviceClient) NshMapDump(ctx context.Context, in *NshMapDump) (RPCServ
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -120,7 +120,7 @@ func (c *serviceClient_NshMapDumpClient) Recv() (*NshMapDetails, error) {
switch m := msg.(type) {
case *NshMapDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/nsim/nsim.ba.go b/binapi/nsim/nsim.ba.go
index e7ade5b..a07479f 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 22938cf..a1862ef 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 08ff504..63c1f8a 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/one.api.json
// Package one contains generated bindings for API file one.api.
diff --git a/binapi/one/one_rpc.ba.go b/binapi/one/one_rpc.ba.go
index 9d9ac2f..ac65ca8 100644
--- a/binapi/one/one_rpc.ba.go
+++ b/binapi/one/one_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service one.
@@ -194,7 +194,7 @@ func (c *serviceClient) OneEidTableDump(ctx context.Context, in *OneEidTableDump
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -217,7 +217,7 @@ func (c *serviceClient_OneEidTableDumpClient) Recv() (*OneEidTableDetails, error
switch m := msg.(type) {
case *OneEidTableDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -237,7 +237,7 @@ func (c *serviceClient) OneEidTableMapDump(ctx context.Context, in *OneEidTableM
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -260,7 +260,7 @@ func (c *serviceClient_OneEidTableMapDumpClient) Recv() (*OneEidTableMapDetails,
switch m := msg.(type) {
case *OneEidTableMapDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -280,7 +280,7 @@ func (c *serviceClient) OneEidTableVniDump(ctx context.Context, in *OneEidTableV
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -303,7 +303,7 @@ func (c *serviceClient_OneEidTableVniDumpClient) Recv() (*OneEidTableVniDetails,
switch m := msg.(type) {
case *OneEidTableVniDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -395,7 +395,7 @@ func (c *serviceClient) OneLocatorDump(ctx context.Context, in *OneLocatorDump)
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -418,7 +418,7 @@ func (c *serviceClient_OneLocatorDumpClient) Recv() (*OneLocatorDetails, error)
switch m := msg.(type) {
case *OneLocatorDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -438,7 +438,7 @@ func (c *serviceClient) OneLocatorSetDump(ctx context.Context, in *OneLocatorSet
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -461,7 +461,7 @@ func (c *serviceClient_OneLocatorSetDumpClient) Recv() (*OneLocatorSetDetails, e
switch m := msg.(type) {
case *OneLocatorSetDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -517,7 +517,7 @@ func (c *serviceClient) OneMapResolverDump(ctx context.Context, in *OneMapResolv
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -540,7 +540,7 @@ func (c *serviceClient_OneMapResolverDumpClient) Recv() (*OneMapResolverDetails,
switch m := msg.(type) {
case *OneMapResolverDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -560,7 +560,7 @@ func (c *serviceClient) OneMapServerDump(ctx context.Context, in *OneMapServerDu
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -583,7 +583,7 @@ func (c *serviceClient_OneMapServerDumpClient) Recv() (*OneMapServerDetails, err
switch m := msg.(type) {
case *OneMapServerDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -684,7 +684,7 @@ func (c *serviceClient) OneStatsDump(ctx context.Context, in *OneStatsDump) (RPC
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -707,7 +707,7 @@ func (c *serviceClient_OneStatsDumpClient) Recv() (*OneStatsDetails, error) {
switch m := msg.(type) {
case *OneStatsDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/p2p_ethernet/p2p_ethernet.ba.go b/binapi/p2p_ethernet/p2p_ethernet.ba.go
index 2e43af7..071f58a 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 bbf4c79..025143e 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 7b182ba..67134bd 100644
--- a/binapi/pg/pg.ba.go
+++ b/binapi/pg/pg.ba.go
@@ -1,17 +1,20 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
// binapi-generator: v0.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/core/pg.api.json
// Package pg contains generated bindings for API file pg.api.
//
// Contents:
-// 8 messages
+// 1 enum
+// 10 messages
//
package pg
import (
+ "strconv"
+
api "git.fd.io/govpp.git/api"
interface_types "git.fd.io/govpp.git/binapi/interface_types"
codec "git.fd.io/govpp.git/codec"
@@ -26,9 +29,39 @@ const _ = api.GoVppAPIPackageIsVersion2
const (
APIFile = "pg"
APIVersion = "2.0.0"
- VersionCrc = 0x3a037a0e
+ VersionCrc = 0x32a1ad3b
+)
+
+// PgInterfaceMode defines enum 'pg_interface_mode'.
+type PgInterfaceMode uint8
+
+const (
+ PG_API_MODE_ETHERNET PgInterfaceMode = 0
+ PG_API_MODE_IP4 PgInterfaceMode = 1
+ PG_API_MODE_IP6 PgInterfaceMode = 2
+)
+
+var (
+ PgInterfaceMode_name = map[uint8]string{
+ 0: "PG_API_MODE_ETHERNET",
+ 1: "PG_API_MODE_IP4",
+ 2: "PG_API_MODE_IP6",
+ }
+ PgInterfaceMode_value = map[string]uint8{
+ "PG_API_MODE_ETHERNET": 0,
+ "PG_API_MODE_IP4": 1,
+ "PG_API_MODE_IP6": 2,
+ }
)
+func (x PgInterfaceMode) String() string {
+ s, ok := PgInterfaceMode_name[uint8(x)]
+ if ok {
+ return s
+ }
+ return "PgInterfaceMode(" + strconv.Itoa(int(x)) + ")"
+}
+
// PgCapture defines message 'pg_capture'.
type PgCapture struct {
InterfaceID interface_types.InterfaceIndex `binapi:"interface_index,name=interface_id" json:"interface_id,omitempty"`
@@ -185,6 +218,88 @@ func (m *PgCreateInterfaceReply) Unmarshal(b []byte) error {
return nil
}
+// PgCreateInterfaceV2 defines message 'pg_create_interface_v2'.
+type PgCreateInterfaceV2 struct {
+ InterfaceID interface_types.InterfaceIndex `binapi:"interface_index,name=interface_id" json:"interface_id,omitempty"`
+ GsoEnabled bool `binapi:"bool,name=gso_enabled" json:"gso_enabled,omitempty"`
+ GsoSize uint32 `binapi:"u32,name=gso_size" json:"gso_size,omitempty"`
+ Mode PgInterfaceMode `binapi:"pg_interface_mode,name=mode" json:"mode,omitempty"`
+}
+
+func (m *PgCreateInterfaceV2) Reset() { *m = PgCreateInterfaceV2{} }
+func (*PgCreateInterfaceV2) GetMessageName() string { return "pg_create_interface_v2" }
+func (*PgCreateInterfaceV2) GetCrcString() string { return "8657466a" }
+func (*PgCreateInterfaceV2) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *PgCreateInterfaceV2) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.InterfaceID
+ size += 1 // m.GsoEnabled
+ size += 4 // m.GsoSize
+ size += 1 // m.Mode
+ return size
+}
+func (m *PgCreateInterfaceV2) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(uint32(m.InterfaceID))
+ buf.EncodeBool(m.GsoEnabled)
+ buf.EncodeUint32(m.GsoSize)
+ buf.EncodeUint8(uint8(m.Mode))
+ return buf.Bytes(), nil
+}
+func (m *PgCreateInterfaceV2) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.InterfaceID = interface_types.InterfaceIndex(buf.DecodeUint32())
+ m.GsoEnabled = buf.DecodeBool()
+ m.GsoSize = buf.DecodeUint32()
+ m.Mode = PgInterfaceMode(buf.DecodeUint8())
+ return nil
+}
+
+// PgCreateInterfaceV2Reply defines message 'pg_create_interface_v2_reply'.
+type PgCreateInterfaceV2Reply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+}
+
+func (m *PgCreateInterfaceV2Reply) Reset() { *m = PgCreateInterfaceV2Reply{} }
+func (*PgCreateInterfaceV2Reply) GetMessageName() string { return "pg_create_interface_v2_reply" }
+func (*PgCreateInterfaceV2Reply) GetCrcString() string { return "5383d31f" }
+func (*PgCreateInterfaceV2Reply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *PgCreateInterfaceV2Reply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ size += 4 // m.SwIfIndex
+ return size
+}
+func (m *PgCreateInterfaceV2Reply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint32(uint32(m.SwIfIndex))
+ return buf.Bytes(), nil
+}
+func (m *PgCreateInterfaceV2Reply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ return nil
+}
+
// PgEnableDisable defines message 'pg_enable_disable'.
type PgEnableDisable struct {
IsEnabled bool `binapi:"bool,name=is_enabled,default=true" json:"is_enabled,omitempty"`
@@ -337,6 +452,8 @@ func file_pg_binapi_init() {
api.RegisterMessage((*PgCaptureReply)(nil), "pg_capture_reply_e8d4e804")
api.RegisterMessage((*PgCreateInterface)(nil), "pg_create_interface_b7c893d7")
api.RegisterMessage((*PgCreateInterfaceReply)(nil), "pg_create_interface_reply_5383d31f")
+ api.RegisterMessage((*PgCreateInterfaceV2)(nil), "pg_create_interface_v2_8657466a")
+ api.RegisterMessage((*PgCreateInterfaceV2Reply)(nil), "pg_create_interface_v2_reply_5383d31f")
api.RegisterMessage((*PgEnableDisable)(nil), "pg_enable_disable_01f94f3a")
api.RegisterMessage((*PgEnableDisableReply)(nil), "pg_enable_disable_reply_e8d4e804")
api.RegisterMessage((*PgInterfaceEnableDisableCoalesce)(nil), "pg_interface_enable_disable_coalesce_a2ef99e7")
@@ -350,6 +467,8 @@ func AllMessages() []api.Message {
(*PgCaptureReply)(nil),
(*PgCreateInterface)(nil),
(*PgCreateInterfaceReply)(nil),
+ (*PgCreateInterfaceV2)(nil),
+ (*PgCreateInterfaceV2Reply)(nil),
(*PgEnableDisable)(nil),
(*PgEnableDisableReply)(nil),
(*PgInterfaceEnableDisableCoalesce)(nil),
diff --git a/binapi/pg/pg_rpc.ba.go b/binapi/pg/pg_rpc.ba.go
index 1a46cc3..967958a 100644
--- a/binapi/pg/pg_rpc.ba.go
+++ b/binapi/pg/pg_rpc.ba.go
@@ -12,6 +12,7 @@ import (
type RPCService interface {
PgCapture(ctx context.Context, in *PgCapture) (*PgCaptureReply, error)
PgCreateInterface(ctx context.Context, in *PgCreateInterface) (*PgCreateInterfaceReply, error)
+ PgCreateInterfaceV2(ctx context.Context, in *PgCreateInterfaceV2) (*PgCreateInterfaceV2Reply, error)
PgEnableDisable(ctx context.Context, in *PgEnableDisable) (*PgEnableDisableReply, error)
PgInterfaceEnableDisableCoalesce(ctx context.Context, in *PgInterfaceEnableDisableCoalesce) (*PgInterfaceEnableDisableCoalesceReply, error)
}
@@ -42,6 +43,15 @@ func (c *serviceClient) PgCreateInterface(ctx context.Context, in *PgCreateInter
return out, api.RetvalToVPPApiError(out.Retval)
}
+func (c *serviceClient) PgCreateInterfaceV2(ctx context.Context, in *PgCreateInterfaceV2) (*PgCreateInterfaceV2Reply, error) {
+ out := new(PgCreateInterfaceV2Reply)
+ err := c.conn.Invoke(ctx, in, out)
+ if err != nil {
+ return nil, err
+ }
+ return out, api.RetvalToVPPApiError(out.Retval)
+}
+
func (c *serviceClient) PgEnableDisable(ctx context.Context, in *PgEnableDisable) (*PgEnableDisableReply, error) {
out := new(PgEnableDisableReply)
err := c.conn.Invoke(ctx, in, out)
diff --git a/binapi/pipe/pipe.ba.go b/binapi/pipe/pipe.ba.go
index 57add8c..1a4de91 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/core/pipe.api.json
// Package pipe contains generated bindings for API file pipe.api.
diff --git a/binapi/pipe/pipe_rpc.ba.go b/binapi/pipe/pipe_rpc.ba.go
index 29db1a0..9c2613b 100644
--- a/binapi/pipe/pipe_rpc.ba.go
+++ b/binapi/pipe/pipe_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service pipe.
@@ -53,7 +53,7 @@ func (c *serviceClient) PipeDump(ctx context.Context, in *PipeDump) (RPCService_
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -76,7 +76,7 @@ func (c *serviceClient_PipeDumpClient) Recv() (*PipeDetails, error) {
switch m := msg.(type) {
case *PipeDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/pnat/pnat.ba.go b/binapi/pnat/pnat.ba.go
index e3794f5..b705b4b 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 fa7bc29..642b674 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/core/policer.api.json
// Package policer contains generated bindings for API file policer.api.
diff --git a/binapi/policer/policer_rpc.ba.go b/binapi/policer/policer_rpc.ba.go
index f5e0f89..02b4ca2 100644
--- a/binapi/policer/policer_rpc.ba.go
+++ b/binapi/policer/policer_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service policer.
@@ -54,7 +54,7 @@ func (c *serviceClient) PolicerDump(ctx context.Context, in *PolicerDump) (RPCSe
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -77,7 +77,7 @@ func (c *serviceClient_PolicerDumpClient) Recv() (*PolicerDetails, error) {
switch m := msg.(type) {
case *PolicerDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/policer_types/policer_types.ba.go b/binapi/policer_types/policer_types.ba.go
index 0df1b01..ce617ac 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 16c79d2..913b147 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/pot.api.json
// Package pot contains generated bindings for API file pot.api.
diff --git a/binapi/pot/pot_rpc.ba.go b/binapi/pot/pot_rpc.ba.go
index a468870..2343363 100644
--- a/binapi/pot/pot_rpc.ba.go
+++ b/binapi/pot/pot_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service pot.
@@ -63,7 +63,7 @@ func (c *serviceClient) PotProfileShowConfigDump(ctx context.Context, in *PotPro
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -86,7 +86,7 @@ func (c *serviceClient_PotProfileShowConfigDumpClient) Recv() (*PotProfileShowCo
switch m := msg.(type) {
case *PotProfileShowConfigDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/pp2/pp2.ba.go b/binapi/pp2/pp2.ba.go
new file mode 100644
index 0000000..6778f1f
--- /dev/null
+++ b/binapi/pp2/pp2.ba.go
@@ -0,0 +1,192 @@
+// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
+// versions:
+// binapi-generator: v0.5.0-dev
+// VPP: 22.02-release
+// source: /usr/share/vpp/api/plugins/pp2.api.json
+
+// Package pp2 contains generated bindings for API file pp2.api.
+//
+// Contents:
+// 4 messages
+//
+package pp2
+
+import (
+ api "git.fd.io/govpp.git/api"
+ interface_types "git.fd.io/govpp.git/binapi/interface_types"
+ codec "git.fd.io/govpp.git/codec"
+)
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the GoVPP api package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// GoVPP api package needs to be updated.
+const _ = api.GoVppAPIPackageIsVersion2
+
+const (
+ APIFile = "pp2"
+ APIVersion = "1.0.0"
+ VersionCrc = 0xd7ab5bd7
+)
+
+// MrvlPp2Create defines message 'mrvl_pp2_create'.
+type MrvlPp2Create struct {
+ IfName string `binapi:"string[64],name=if_name" json:"if_name,omitempty"`
+ RxQSz uint16 `binapi:"u16,name=rx_q_sz" json:"rx_q_sz,omitempty"`
+ TxQSz uint16 `binapi:"u16,name=tx_q_sz" json:"tx_q_sz,omitempty"`
+}
+
+func (m *MrvlPp2Create) Reset() { *m = MrvlPp2Create{} }
+func (*MrvlPp2Create) GetMessageName() string { return "mrvl_pp2_create" }
+func (*MrvlPp2Create) GetCrcString() string { return "3a108396" }
+func (*MrvlPp2Create) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *MrvlPp2Create) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 64 // m.IfName
+ size += 2 // m.RxQSz
+ size += 2 // m.TxQSz
+ return size
+}
+func (m *MrvlPp2Create) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeString(m.IfName, 64)
+ buf.EncodeUint16(m.RxQSz)
+ buf.EncodeUint16(m.TxQSz)
+ return buf.Bytes(), nil
+}
+func (m *MrvlPp2Create) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.IfName = buf.DecodeString(64)
+ m.RxQSz = buf.DecodeUint16()
+ m.TxQSz = buf.DecodeUint16()
+ return nil
+}
+
+// MrvlPp2CreateReply defines message 'mrvl_pp2_create_reply'.
+type MrvlPp2CreateReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+}
+
+func (m *MrvlPp2CreateReply) Reset() { *m = MrvlPp2CreateReply{} }
+func (*MrvlPp2CreateReply) GetMessageName() string { return "mrvl_pp2_create_reply" }
+func (*MrvlPp2CreateReply) GetCrcString() string { return "5383d31f" }
+func (*MrvlPp2CreateReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *MrvlPp2CreateReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ size += 4 // m.SwIfIndex
+ return size
+}
+func (m *MrvlPp2CreateReply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint32(uint32(m.SwIfIndex))
+ return buf.Bytes(), nil
+}
+func (m *MrvlPp2CreateReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ return nil
+}
+
+// MrvlPp2Delete defines message 'mrvl_pp2_delete'.
+type MrvlPp2Delete struct {
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+}
+
+func (m *MrvlPp2Delete) Reset() { *m = MrvlPp2Delete{} }
+func (*MrvlPp2Delete) GetMessageName() string { return "mrvl_pp2_delete" }
+func (*MrvlPp2Delete) GetCrcString() string { return "f9e6675e" }
+func (*MrvlPp2Delete) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *MrvlPp2Delete) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.SwIfIndex
+ return size
+}
+func (m *MrvlPp2Delete) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(uint32(m.SwIfIndex))
+ return buf.Bytes(), nil
+}
+func (m *MrvlPp2Delete) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ return nil
+}
+
+// MrvlPp2DeleteReply defines message 'mrvl_pp2_delete_reply'.
+type MrvlPp2DeleteReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+}
+
+func (m *MrvlPp2DeleteReply) Reset() { *m = MrvlPp2DeleteReply{} }
+func (*MrvlPp2DeleteReply) GetMessageName() string { return "mrvl_pp2_delete_reply" }
+func (*MrvlPp2DeleteReply) GetCrcString() string { return "e8d4e804" }
+func (*MrvlPp2DeleteReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *MrvlPp2DeleteReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ return size
+}
+func (m *MrvlPp2DeleteReply) 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 *MrvlPp2DeleteReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ return nil
+}
+
+func init() { file_pp2_binapi_init() }
+func file_pp2_binapi_init() {
+ api.RegisterMessage((*MrvlPp2Create)(nil), "mrvl_pp2_create_3a108396")
+ api.RegisterMessage((*MrvlPp2CreateReply)(nil), "mrvl_pp2_create_reply_5383d31f")
+ api.RegisterMessage((*MrvlPp2Delete)(nil), "mrvl_pp2_delete_f9e6675e")
+ api.RegisterMessage((*MrvlPp2DeleteReply)(nil), "mrvl_pp2_delete_reply_e8d4e804")
+}
+
+// Messages returns list of all messages in this module.
+func AllMessages() []api.Message {
+ return []api.Message{
+ (*MrvlPp2Create)(nil),
+ (*MrvlPp2CreateReply)(nil),
+ (*MrvlPp2Delete)(nil),
+ (*MrvlPp2DeleteReply)(nil),
+ }
+}
diff --git a/binapi/pp2/pp2_rpc.ba.go b/binapi/pp2/pp2_rpc.ba.go
new file mode 100644
index 0000000..d4dfa1c
--- /dev/null
+++ b/binapi/pp2/pp2_rpc.ba.go
@@ -0,0 +1,41 @@
+// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
+
+package pp2
+
+import (
+ "context"
+
+ api "git.fd.io/govpp.git/api"
+)
+
+// RPCService defines RPC service pp2.
+type RPCService interface {
+ MrvlPp2Create(ctx context.Context, in *MrvlPp2Create) (*MrvlPp2CreateReply, error)
+ MrvlPp2Delete(ctx context.Context, in *MrvlPp2Delete) (*MrvlPp2DeleteReply, error)
+}
+
+type serviceClient struct {
+ conn api.Connection
+}
+
+func NewServiceClient(conn api.Connection) RPCService {
+ return &serviceClient{conn}
+}
+
+func (c *serviceClient) MrvlPp2Create(ctx context.Context, in *MrvlPp2Create) (*MrvlPp2CreateReply, error) {
+ out := new(MrvlPp2CreateReply)
+ err := c.conn.Invoke(ctx, in, out)
+ if err != nil {
+ return nil, err
+ }
+ return out, api.RetvalToVPPApiError(out.Retval)
+}
+
+func (c *serviceClient) MrvlPp2Delete(ctx context.Context, in *MrvlPp2Delete) (*MrvlPp2DeleteReply, error) {
+ out := new(MrvlPp2DeleteReply)
+ err := c.conn.Invoke(ctx, in, out)
+ if err != nil {
+ return nil, err
+ }
+ return out, api.RetvalToVPPApiError(out.Retval)
+}
diff --git a/binapi/pppoe/pppoe.ba.go b/binapi/pppoe/pppoe.ba.go
index d0a4865..7e02eba 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/pppoe.api.json
// Package pppoe contains generated bindings for API file pppoe.api.
diff --git a/binapi/pppoe/pppoe_rpc.ba.go b/binapi/pppoe/pppoe_rpc.ba.go
index bb5517e..ac7c63d 100644
--- a/binapi/pppoe/pppoe_rpc.ba.go
+++ b/binapi/pppoe/pppoe_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service pppoe.
@@ -53,7 +53,7 @@ func (c *serviceClient) PppoeSessionDump(ctx context.Context, in *PppoeSessionDu
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -76,7 +76,7 @@ func (c *serviceClient_PppoeSessionDumpClient) Recv() (*PppoeSessionDetails, err
switch m := msg.(type) {
case *PppoeSessionDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/punt/punt.ba.go b/binapi/punt/punt.ba.go
index 466299e..73707c8 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/core/punt.api.json
// Package punt contains generated bindings for API file punt.api.
diff --git a/binapi/punt/punt_rpc.ba.go b/binapi/punt/punt_rpc.ba.go
index d244955..2c1b23d 100644
--- a/binapi/punt/punt_rpc.ba.go
+++ b/binapi/punt/punt_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service punt.
@@ -37,7 +37,7 @@ func (c *serviceClient) PuntReasonDump(ctx context.Context, in *PuntReasonDump)
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -60,7 +60,7 @@ func (c *serviceClient_PuntReasonDumpClient) Recv() (*PuntReasonDetails, error)
switch m := msg.(type) {
case *PuntReasonDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -89,7 +89,7 @@ func (c *serviceClient) PuntSocketDump(ctx context.Context, in *PuntSocketDump)
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -112,7 +112,7 @@ func (c *serviceClient_PuntSocketDumpClient) Recv() (*PuntSocketDetails, error)
switch m := msg.(type) {
case *PuntSocketDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/qos/qos.ba.go b/binapi/qos/qos.ba.go
index db2491a..c95a9aa 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/core/qos.api.json
// Package qos contains generated bindings for API file qos.api.
diff --git a/binapi/qos/qos_rpc.ba.go b/binapi/qos/qos_rpc.ba.go
index 825dc72..6b06437 100644
--- a/binapi/qos/qos_rpc.ba.go
+++ b/binapi/qos/qos_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service qos.
@@ -50,7 +50,7 @@ func (c *serviceClient) QosEgressMapDump(ctx context.Context, in *QosEgressMapDu
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -73,7 +73,7 @@ func (c *serviceClient_QosEgressMapDumpClient) Recv() (*QosEgressMapDetails, err
switch m := msg.(type) {
case *QosEgressMapDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -102,7 +102,7 @@ func (c *serviceClient) QosMarkDump(ctx context.Context, in *QosMarkDump) (RPCSe
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -125,7 +125,7 @@ func (c *serviceClient_QosMarkDumpClient) Recv() (*QosMarkDetails, error) {
switch m := msg.(type) {
case *QosMarkDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -154,7 +154,7 @@ func (c *serviceClient) QosRecordDump(ctx context.Context, in *QosRecordDump) (R
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -177,7 +177,7 @@ func (c *serviceClient_QosRecordDumpClient) Recv() (*QosRecordDetails, error) {
switch m := msg.(type) {
case *QosRecordDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -206,7 +206,7 @@ func (c *serviceClient) QosStoreDump(ctx context.Context, in *QosStoreDump) (RPC
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -229,7 +229,7 @@ func (c *serviceClient_QosStoreDumpClient) Recv() (*QosStoreDetails, error) {
switch m := msg.(type) {
case *QosStoreDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/rd_cp/rd_cp.ba.go b/binapi/rd_cp/rd_cp.ba.go
index 0095229..6af71d3 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 fe29d12..bce53d1 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 ab2328e..e01d2a4 100644
--- a/binapi/session/session.ba.go
+++ b/binapi/session/session.ba.go
@@ -1,14 +1,14 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
// binapi-generator: v0.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/core/session.api.json
// Package session contains generated bindings for API file session.api.
//
// Contents:
// 2 enums
-// 22 messages
+// 28 messages
//
package session
@@ -30,7 +30,7 @@ const _ = api.GoVppAPIPackageIsVersion2
const (
APIFile = "session"
APIVersion = "4.0.0"
- VersionCrc = 0x32fe1c77
+ VersionCrc = 0x44a59e26
)
// SessionRuleScope defines enum 'session_rule_scope'.
@@ -360,6 +360,7 @@ func (m *AppDelCertKeyPairReply) Unmarshal(b []byte) error {
}
// AppNamespaceAddDel defines message 'app_namespace_add_del'.
+// Deprecated: the message will be removed in the future versions
type AppNamespaceAddDel struct {
Secret uint64 `binapi:"u64,name=secret" json:"secret,omitempty"`
SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
@@ -409,6 +410,7 @@ func (m *AppNamespaceAddDel) Unmarshal(b []byte) error {
}
// AppNamespaceAddDelReply defines message 'app_namespace_add_del_reply'.
+// Deprecated: the message will be removed in the future versions
type AppNamespaceAddDelReply struct {
Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
AppnsIndex uint32 `binapi:"u32,name=appns_index" json:"appns_index,omitempty"`
@@ -445,6 +447,194 @@ func (m *AppNamespaceAddDelReply) Unmarshal(b []byte) error {
return nil
}
+// AppNamespaceAddDelV2 defines message 'app_namespace_add_del_v2'.
+type AppNamespaceAddDelV2 struct {
+ Secret uint64 `binapi:"u64,name=secret" json:"secret,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
+ IP4FibID uint32 `binapi:"u32,name=ip4_fib_id" json:"ip4_fib_id,omitempty"`
+ IP6FibID uint32 `binapi:"u32,name=ip6_fib_id" json:"ip6_fib_id,omitempty"`
+ NamespaceID string `binapi:"string[64],name=namespace_id" json:"namespace_id,omitempty"`
+ Netns string `binapi:"string[64],name=netns" json:"netns,omitempty"`
+}
+
+func (m *AppNamespaceAddDelV2) Reset() { *m = AppNamespaceAddDelV2{} }
+func (*AppNamespaceAddDelV2) GetMessageName() string { return "app_namespace_add_del_v2" }
+func (*AppNamespaceAddDelV2) GetCrcString() string { return "ee0755cf" }
+func (*AppNamespaceAddDelV2) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *AppNamespaceAddDelV2) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 8 // m.Secret
+ size += 4 // m.SwIfIndex
+ size += 4 // m.IP4FibID
+ size += 4 // m.IP6FibID
+ size += 64 // m.NamespaceID
+ size += 64 // m.Netns
+ return size
+}
+func (m *AppNamespaceAddDelV2) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint64(m.Secret)
+ buf.EncodeUint32(uint32(m.SwIfIndex))
+ buf.EncodeUint32(m.IP4FibID)
+ buf.EncodeUint32(m.IP6FibID)
+ buf.EncodeString(m.NamespaceID, 64)
+ buf.EncodeString(m.Netns, 64)
+ return buf.Bytes(), nil
+}
+func (m *AppNamespaceAddDelV2) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Secret = buf.DecodeUint64()
+ m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ m.IP4FibID = buf.DecodeUint32()
+ m.IP6FibID = buf.DecodeUint32()
+ m.NamespaceID = buf.DecodeString(64)
+ m.Netns = buf.DecodeString(64)
+ return nil
+}
+
+// AppNamespaceAddDelV2Reply defines message 'app_namespace_add_del_v2_reply'.
+type AppNamespaceAddDelV2Reply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ AppnsIndex uint32 `binapi:"u32,name=appns_index" json:"appns_index,omitempty"`
+}
+
+func (m *AppNamespaceAddDelV2Reply) Reset() { *m = AppNamespaceAddDelV2Reply{} }
+func (*AppNamespaceAddDelV2Reply) GetMessageName() string { return "app_namespace_add_del_v2_reply" }
+func (*AppNamespaceAddDelV2Reply) GetCrcString() string { return "85137120" }
+func (*AppNamespaceAddDelV2Reply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *AppNamespaceAddDelV2Reply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ size += 4 // m.AppnsIndex
+ return size
+}
+func (m *AppNamespaceAddDelV2Reply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint32(m.AppnsIndex)
+ return buf.Bytes(), nil
+}
+func (m *AppNamespaceAddDelV2Reply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ m.AppnsIndex = buf.DecodeUint32()
+ return nil
+}
+
+// AppNamespaceAddDelV3 defines message 'app_namespace_add_del_v3'.
+type AppNamespaceAddDelV3 struct {
+ Secret uint64 `binapi:"u64,name=secret" json:"secret,omitempty"`
+ IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
+ IP4FibID uint32 `binapi:"u32,name=ip4_fib_id" json:"ip4_fib_id,omitempty"`
+ IP6FibID uint32 `binapi:"u32,name=ip6_fib_id" json:"ip6_fib_id,omitempty"`
+ NamespaceID string `binapi:"string[64],name=namespace_id" json:"namespace_id,omitempty"`
+ Netns string `binapi:"string[64],name=netns" json:"netns,omitempty"`
+ SockName string `binapi:"string[],name=sock_name" json:"sock_name,omitempty"`
+}
+
+func (m *AppNamespaceAddDelV3) Reset() { *m = AppNamespaceAddDelV3{} }
+func (*AppNamespaceAddDelV3) GetMessageName() string { return "app_namespace_add_del_v3" }
+func (*AppNamespaceAddDelV3) GetCrcString() string { return "8a7e40a1" }
+func (*AppNamespaceAddDelV3) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *AppNamespaceAddDelV3) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 8 // m.Secret
+ size += 1 // m.IsAdd
+ size += 4 // m.SwIfIndex
+ size += 4 // m.IP4FibID
+ size += 4 // m.IP6FibID
+ size += 64 // m.NamespaceID
+ size += 64 // m.Netns
+ size += 4 + len(m.SockName) // m.SockName
+ return size
+}
+func (m *AppNamespaceAddDelV3) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint64(m.Secret)
+ buf.EncodeBool(m.IsAdd)
+ buf.EncodeUint32(uint32(m.SwIfIndex))
+ buf.EncodeUint32(m.IP4FibID)
+ buf.EncodeUint32(m.IP6FibID)
+ buf.EncodeString(m.NamespaceID, 64)
+ buf.EncodeString(m.Netns, 64)
+ buf.EncodeString(m.SockName, 0)
+ return buf.Bytes(), nil
+}
+func (m *AppNamespaceAddDelV3) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Secret = buf.DecodeUint64()
+ m.IsAdd = buf.DecodeBool()
+ m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ m.IP4FibID = buf.DecodeUint32()
+ m.IP6FibID = buf.DecodeUint32()
+ m.NamespaceID = buf.DecodeString(64)
+ m.Netns = buf.DecodeString(64)
+ m.SockName = buf.DecodeString(0)
+ return nil
+}
+
+// AppNamespaceAddDelV3Reply defines message 'app_namespace_add_del_v3_reply'.
+type AppNamespaceAddDelV3Reply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ AppnsIndex uint32 `binapi:"u32,name=appns_index" json:"appns_index,omitempty"`
+}
+
+func (m *AppNamespaceAddDelV3Reply) Reset() { *m = AppNamespaceAddDelV3Reply{} }
+func (*AppNamespaceAddDelV3Reply) GetMessageName() string { return "app_namespace_add_del_v3_reply" }
+func (*AppNamespaceAddDelV3Reply) GetCrcString() string { return "85137120" }
+func (*AppNamespaceAddDelV3Reply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *AppNamespaceAddDelV3Reply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ size += 4 // m.AppnsIndex
+ return size
+}
+func (m *AppNamespaceAddDelV3Reply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint32(m.AppnsIndex)
+ return buf.Bytes(), nil
+}
+func (m *AppNamespaceAddDelV3Reply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ m.AppnsIndex = buf.DecodeUint32()
+ return nil
+}
+
// AppWorkerAddDel defines message 'app_worker_add_del'.
type AppWorkerAddDel struct {
AppIndex uint32 `binapi:"u32,name=app_index" json:"app_index,omitempty"`
@@ -1045,6 +1235,74 @@ func (m *SessionRulesDump) Unmarshal(b []byte) error {
return nil
}
+// SessionSapiEnableDisable defines message 'session_sapi_enable_disable'.
+type SessionSapiEnableDisable struct {
+ IsEnable bool `binapi:"bool,name=is_enable,default=true" json:"is_enable,omitempty"`
+}
+
+func (m *SessionSapiEnableDisable) Reset() { *m = SessionSapiEnableDisable{} }
+func (*SessionSapiEnableDisable) GetMessageName() string { return "session_sapi_enable_disable" }
+func (*SessionSapiEnableDisable) GetCrcString() string { return "c264d7bf" }
+func (*SessionSapiEnableDisable) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *SessionSapiEnableDisable) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 1 // m.IsEnable
+ return size
+}
+func (m *SessionSapiEnableDisable) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeBool(m.IsEnable)
+ return buf.Bytes(), nil
+}
+func (m *SessionSapiEnableDisable) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.IsEnable = buf.DecodeBool()
+ return nil
+}
+
+// SessionSapiEnableDisableReply defines message 'session_sapi_enable_disable_reply'.
+type SessionSapiEnableDisableReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+}
+
+func (m *SessionSapiEnableDisableReply) Reset() { *m = SessionSapiEnableDisableReply{} }
+func (*SessionSapiEnableDisableReply) GetMessageName() string {
+ return "session_sapi_enable_disable_reply"
+}
+func (*SessionSapiEnableDisableReply) GetCrcString() string { return "e8d4e804" }
+func (*SessionSapiEnableDisableReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *SessionSapiEnableDisableReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ return size
+}
+func (m *SessionSapiEnableDisableReply) 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 *SessionSapiEnableDisableReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ return nil
+}
+
func init() { file_session_binapi_init() }
func file_session_binapi_init() {
api.RegisterMessage((*AppAddCertKeyPair)(nil), "app_add_cert_key_pair_02eb8016")
@@ -1055,6 +1313,10 @@ func file_session_binapi_init() {
api.RegisterMessage((*AppDelCertKeyPairReply)(nil), "app_del_cert_key_pair_reply_e8d4e804")
api.RegisterMessage((*AppNamespaceAddDel)(nil), "app_namespace_add_del_6306aecb")
api.RegisterMessage((*AppNamespaceAddDelReply)(nil), "app_namespace_add_del_reply_85137120")
+ api.RegisterMessage((*AppNamespaceAddDelV2)(nil), "app_namespace_add_del_v2_ee0755cf")
+ api.RegisterMessage((*AppNamespaceAddDelV2Reply)(nil), "app_namespace_add_del_v2_reply_85137120")
+ api.RegisterMessage((*AppNamespaceAddDelV3)(nil), "app_namespace_add_del_v3_8a7e40a1")
+ api.RegisterMessage((*AppNamespaceAddDelV3Reply)(nil), "app_namespace_add_del_v3_reply_85137120")
api.RegisterMessage((*AppWorkerAddDel)(nil), "app_worker_add_del_753253dc")
api.RegisterMessage((*AppWorkerAddDelReply)(nil), "app_worker_add_del_reply_5735ffe7")
api.RegisterMessage((*ApplicationDetach)(nil), "application_detach_51077d14")
@@ -1069,6 +1331,8 @@ func file_session_binapi_init() {
api.RegisterMessage((*SessionRuleAddDelReply)(nil), "session_rule_add_del_reply_e8d4e804")
api.RegisterMessage((*SessionRulesDetails)(nil), "session_rules_details_28d71830")
api.RegisterMessage((*SessionRulesDump)(nil), "session_rules_dump_51077d14")
+ api.RegisterMessage((*SessionSapiEnableDisable)(nil), "session_sapi_enable_disable_c264d7bf")
+ api.RegisterMessage((*SessionSapiEnableDisableReply)(nil), "session_sapi_enable_disable_reply_e8d4e804")
}
// Messages returns list of all messages in this module.
@@ -1082,6 +1346,10 @@ func AllMessages() []api.Message {
(*AppDelCertKeyPairReply)(nil),
(*AppNamespaceAddDel)(nil),
(*AppNamespaceAddDelReply)(nil),
+ (*AppNamespaceAddDelV2)(nil),
+ (*AppNamespaceAddDelV2Reply)(nil),
+ (*AppNamespaceAddDelV3)(nil),
+ (*AppNamespaceAddDelV3Reply)(nil),
(*AppWorkerAddDel)(nil),
(*AppWorkerAddDelReply)(nil),
(*ApplicationDetach)(nil),
@@ -1096,5 +1364,7 @@ func AllMessages() []api.Message {
(*SessionRuleAddDelReply)(nil),
(*SessionRulesDetails)(nil),
(*SessionRulesDump)(nil),
+ (*SessionSapiEnableDisable)(nil),
+ (*SessionSapiEnableDisableReply)(nil),
}
}
diff --git a/binapi/session/session_rpc.ba.go b/binapi/session/session_rpc.ba.go
index cba5890..adad529 100644
--- a/binapi/session/session_rpc.ba.go
+++ b/binapi/session/session_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service session.
@@ -17,6 +17,8 @@ type RPCService interface {
AppAttach(ctx context.Context, in *AppAttach) (*AppAttachReply, error)
AppDelCertKeyPair(ctx context.Context, in *AppDelCertKeyPair) (*AppDelCertKeyPairReply, error)
AppNamespaceAddDel(ctx context.Context, in *AppNamespaceAddDel) (*AppNamespaceAddDelReply, error)
+ AppNamespaceAddDelV2(ctx context.Context, in *AppNamespaceAddDelV2) (*AppNamespaceAddDelV2Reply, error)
+ AppNamespaceAddDelV3(ctx context.Context, in *AppNamespaceAddDelV3) (*AppNamespaceAddDelV3Reply, error)
AppWorkerAddDel(ctx context.Context, in *AppWorkerAddDel) (*AppWorkerAddDelReply, error)
ApplicationDetach(ctx context.Context, in *ApplicationDetach) (*ApplicationDetachReply, error)
ApplicationTLSCertAdd(ctx context.Context, in *ApplicationTLSCertAdd) (*ApplicationTLSCertAddReply, error)
@@ -24,6 +26,7 @@ type RPCService interface {
SessionEnableDisable(ctx context.Context, in *SessionEnableDisable) (*SessionEnableDisableReply, error)
SessionRuleAddDel(ctx context.Context, in *SessionRuleAddDel) (*SessionRuleAddDelReply, error)
SessionRulesDump(ctx context.Context, in *SessionRulesDump) (RPCService_SessionRulesDumpClient, error)
+ SessionSapiEnableDisable(ctx context.Context, in *SessionSapiEnableDisable) (*SessionSapiEnableDisableReply, error)
}
type serviceClient struct {
@@ -70,6 +73,24 @@ func (c *serviceClient) AppNamespaceAddDel(ctx context.Context, in *AppNamespace
return out, api.RetvalToVPPApiError(out.Retval)
}
+func (c *serviceClient) AppNamespaceAddDelV2(ctx context.Context, in *AppNamespaceAddDelV2) (*AppNamespaceAddDelV2Reply, error) {
+ out := new(AppNamespaceAddDelV2Reply)
+ err := c.conn.Invoke(ctx, in, out)
+ if err != nil {
+ return nil, err
+ }
+ return out, api.RetvalToVPPApiError(out.Retval)
+}
+
+func (c *serviceClient) AppNamespaceAddDelV3(ctx context.Context, in *AppNamespaceAddDelV3) (*AppNamespaceAddDelV3Reply, error) {
+ out := new(AppNamespaceAddDelV3Reply)
+ err := c.conn.Invoke(ctx, in, out)
+ if err != nil {
+ return nil, err
+ }
+ return out, api.RetvalToVPPApiError(out.Retval)
+}
+
func (c *serviceClient) AppWorkerAddDel(ctx context.Context, in *AppWorkerAddDel) (*AppWorkerAddDelReply, error) {
out := new(AppWorkerAddDelReply)
err := c.conn.Invoke(ctx, in, out)
@@ -133,7 +154,7 @@ func (c *serviceClient) SessionRulesDump(ctx context.Context, in *SessionRulesDu
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -156,7 +177,7 @@ func (c *serviceClient_SessionRulesDumpClient) Recv() (*SessionRulesDetails, err
switch m := msg.(type) {
case *SessionRulesDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -166,3 +187,12 @@ func (c *serviceClient_SessionRulesDumpClient) Recv() (*SessionRulesDetails, err
return nil, fmt.Errorf("unexpected message: %T %v", m, m)
}
}
+
+func (c *serviceClient) SessionSapiEnableDisable(ctx context.Context, in *SessionSapiEnableDisable) (*SessionSapiEnableDisableReply, error) {
+ out := new(SessionSapiEnableDisableReply)
+ err := c.conn.Invoke(ctx, in, out)
+ if err != nil {
+ return nil, err
+ }
+ return out, api.RetvalToVPPApiError(out.Retval)
+}
diff --git a/binapi/span/span.ba.go b/binapi/span/span.ba.go
index b212805..a61bd03 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/core/span.api.json
// Package span contains generated bindings for API file span.api.
diff --git a/binapi/span/span_rpc.ba.go b/binapi/span/span_rpc.ba.go
index 6cbfb67..9cc4726 100644
--- a/binapi/span/span_rpc.ba.go
+++ b/binapi/span/span_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service span.
@@ -34,7 +34,7 @@ func (c *serviceClient) SwInterfaceSpanDump(ctx context.Context, in *SwInterface
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -57,7 +57,7 @@ func (c *serviceClient_SwInterfaceSpanDumpClient) Recv() (*SwInterfaceSpanDetail
switch m := msg.(type) {
case *SwInterfaceSpanDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/sr/sr.ba.go b/binapi/sr/sr.ba.go
index b728c74..02e47f1 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/core/sr.api.json
// Package sr contains generated bindings for API file sr.api.
diff --git a/binapi/sr/sr_rpc.ba.go b/binapi/sr/sr_rpc.ba.go
index 236f44a..ff8717c 100644
--- a/binapi/sr/sr_rpc.ba.go
+++ b/binapi/sr/sr_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service sr.
@@ -52,7 +52,7 @@ func (c *serviceClient) SrLocalsidsDump(ctx context.Context, in *SrLocalsidsDump
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -75,7 +75,7 @@ func (c *serviceClient_SrLocalsidsDumpClient) Recv() (*SrLocalsidsDetails, error
switch m := msg.(type) {
case *SrLocalsidsDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -95,7 +95,7 @@ func (c *serviceClient) SrPoliciesDump(ctx context.Context, in *SrPoliciesDump)
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -118,7 +118,7 @@ func (c *serviceClient_SrPoliciesDumpClient) Recv() (*SrPoliciesDetails, error)
switch m := msg.(type) {
case *SrPoliciesDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -138,7 +138,7 @@ func (c *serviceClient) SrPoliciesWithSlIndexDump(ctx context.Context, in *SrPol
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -161,7 +161,7 @@ func (c *serviceClient_SrPoliciesWithSlIndexDumpClient) Recv() (*SrPoliciesWithS
switch m := msg.(type) {
case *SrPoliciesWithSlIndexDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -235,7 +235,7 @@ func (c *serviceClient) SrSteeringPolDump(ctx context.Context, in *SrSteeringPol
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -258,7 +258,7 @@ func (c *serviceClient_SrSteeringPolDumpClient) Recv() (*SrSteeringPolDetails, e
switch m := msg.(type) {
case *SrSteeringPolDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/sr_mpls/sr_mpls.ba.go b/binapi/sr_mpls/sr_mpls.ba.go
index b8ada0d..fa1b469 100644
--- a/binapi/sr_mpls/sr_mpls.ba.go
+++ b/binapi/sr_mpls/sr_mpls.ba.go
@@ -1,7 +1,7 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
// binapi-generator: v0.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/core/sr_mpls.api.json
// Package sr_mpls contains generated bindings for API file sr_mpls.api.
diff --git a/binapi/sr_types/sr_types.ba.go b/binapi/sr_types/sr_types.ba.go
index 3cf6a73..1c7003f 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 ebbf802..67446ba 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/stn.api.json
// Package stn contains generated bindings for API file stn.api.
diff --git a/binapi/stn/stn_rpc.ba.go b/binapi/stn/stn_rpc.ba.go
index 475894b..63a3cb5 100644
--- a/binapi/stn/stn_rpc.ba.go
+++ b/binapi/stn/stn_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service stn.
@@ -43,7 +43,7 @@ func (c *serviceClient) StnRulesDump(ctx context.Context, in *StnRulesDump) (RPC
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -66,7 +66,7 @@ func (c *serviceClient_StnRulesDumpClient) Recv() (*StnRulesDetails, error) {
switch m := msg.(type) {
case *StnRulesDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/svs/svs.ba.go b/binapi/svs/svs.ba.go
index a775fff..ba94f37 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/svs.api.json
// Package svs contains generated bindings for API file svs.api.
diff --git a/binapi/svs/svs_rpc.ba.go b/binapi/svs/svs_rpc.ba.go
index ef13882..d9283c0 100644
--- a/binapi/svs/svs_rpc.ba.go
+++ b/binapi/svs/svs_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service svs.
@@ -37,7 +37,7 @@ func (c *serviceClient) SvsDump(ctx context.Context, in *SvsDump) (RPCService_Sv
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -60,7 +60,7 @@ func (c *serviceClient_SvsDumpClient) Recv() (*SvsDetails, error) {
switch m := msg.(type) {
case *SvsDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/syslog/syslog.ba.go b/binapi/syslog/syslog.ba.go
index 0cbaf4a..6f9f78a 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 0732d72..d5fa5ad 100644
--- a/binapi/tapv2/tapv2.ba.go
+++ b/binapi/tapv2/tapv2.ba.go
@@ -1,14 +1,14 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
// binapi-generator: v0.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/core/tapv2.api.json
// Package tapv2 contains generated bindings for API file tapv2.api.
//
// Contents:
// 1 enum
-// 6 messages
+// 8 messages
//
package tapv2
@@ -31,7 +31,7 @@ const _ = api.GoVppAPIPackageIsVersion2
const (
APIFile = "tapv2"
APIVersion = "4.0.0"
- VersionCrc = 0xc20c291f
+ VersionCrc = 0xc2f80dc7
)
// TapFlags defines enum 'tap_flags'.
@@ -394,6 +394,186 @@ func (m *TapCreateV2Reply) Unmarshal(b []byte) error {
return nil
}
+// TapCreateV3 defines message 'tap_create_v3'.
+type TapCreateV3 struct {
+ ID uint32 `binapi:"u32,name=id,default=4294967295" json:"id,omitempty"`
+ UseRandomMac bool `binapi:"bool,name=use_random_mac,default=true" json:"use_random_mac,omitempty"`
+ MacAddress ethernet_types.MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
+ NumRxQueues uint16 `binapi:"u16,name=num_rx_queues,default=1" json:"num_rx_queues,omitempty"`
+ NumTxQueues uint16 `binapi:"u16,name=num_tx_queues,default=1" json:"num_tx_queues,omitempty"`
+ TxRingSz uint16 `binapi:"u16,name=tx_ring_sz,default=256" json:"tx_ring_sz,omitempty"`
+ RxRingSz uint16 `binapi:"u16,name=rx_ring_sz,default=256" json:"rx_ring_sz,omitempty"`
+ HostMtuSet bool `binapi:"bool,name=host_mtu_set" json:"host_mtu_set,omitempty"`
+ HostMtuSize uint32 `binapi:"u32,name=host_mtu_size" json:"host_mtu_size,omitempty"`
+ HostMacAddrSet bool `binapi:"bool,name=host_mac_addr_set" json:"host_mac_addr_set,omitempty"`
+ HostMacAddr ethernet_types.MacAddress `binapi:"mac_address,name=host_mac_addr" json:"host_mac_addr,omitempty"`
+ HostIP4PrefixSet bool `binapi:"bool,name=host_ip4_prefix_set" json:"host_ip4_prefix_set,omitempty"`
+ HostIP4Prefix ip_types.IP4AddressWithPrefix `binapi:"ip4_address_with_prefix,name=host_ip4_prefix" json:"host_ip4_prefix,omitempty"`
+ HostIP6PrefixSet bool `binapi:"bool,name=host_ip6_prefix_set" json:"host_ip6_prefix_set,omitempty"`
+ HostIP6Prefix ip_types.IP6AddressWithPrefix `binapi:"ip6_address_with_prefix,name=host_ip6_prefix" json:"host_ip6_prefix,omitempty"`
+ HostIP4GwSet bool `binapi:"bool,name=host_ip4_gw_set" json:"host_ip4_gw_set,omitempty"`
+ HostIP4Gw ip_types.IP4Address `binapi:"ip4_address,name=host_ip4_gw" json:"host_ip4_gw,omitempty"`
+ HostIP6GwSet bool `binapi:"bool,name=host_ip6_gw_set" json:"host_ip6_gw_set,omitempty"`
+ HostIP6Gw ip_types.IP6Address `binapi:"ip6_address,name=host_ip6_gw" json:"host_ip6_gw,omitempty"`
+ TapFlags TapFlags `binapi:"tap_flags,name=tap_flags" json:"tap_flags,omitempty"`
+ HostNamespaceSet bool `binapi:"bool,name=host_namespace_set" json:"host_namespace_set,omitempty"`
+ HostNamespace string `binapi:"string[64],name=host_namespace" json:"host_namespace,omitempty"`
+ HostIfNameSet bool `binapi:"bool,name=host_if_name_set" json:"host_if_name_set,omitempty"`
+ HostIfName string `binapi:"string[64],name=host_if_name" json:"host_if_name,omitempty"`
+ HostBridgeSet bool `binapi:"bool,name=host_bridge_set" json:"host_bridge_set,omitempty"`
+ HostBridge string `binapi:"string[64],name=host_bridge" json:"host_bridge,omitempty"`
+ Tag string `binapi:"string[],name=tag" json:"tag,omitempty"`
+}
+
+func (m *TapCreateV3) Reset() { *m = TapCreateV3{} }
+func (*TapCreateV3) GetMessageName() string { return "tap_create_v3" }
+func (*TapCreateV3) GetCrcString() string { return "3f3fd1df" }
+func (*TapCreateV3) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *TapCreateV3) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.ID
+ size += 1 // m.UseRandomMac
+ size += 1 * 6 // m.MacAddress
+ size += 2 // m.NumRxQueues
+ size += 2 // m.NumTxQueues
+ size += 2 // m.TxRingSz
+ size += 2 // m.RxRingSz
+ size += 1 // m.HostMtuSet
+ size += 4 // m.HostMtuSize
+ size += 1 // m.HostMacAddrSet
+ size += 1 * 6 // m.HostMacAddr
+ size += 1 // m.HostIP4PrefixSet
+ size += 1 * 4 // m.HostIP4Prefix.Address
+ size += 1 // m.HostIP4Prefix.Len
+ size += 1 // m.HostIP6PrefixSet
+ size += 1 * 16 // m.HostIP6Prefix.Address
+ size += 1 // m.HostIP6Prefix.Len
+ size += 1 // m.HostIP4GwSet
+ size += 1 * 4 // m.HostIP4Gw
+ size += 1 // m.HostIP6GwSet
+ size += 1 * 16 // m.HostIP6Gw
+ size += 4 // m.TapFlags
+ size += 1 // m.HostNamespaceSet
+ size += 64 // m.HostNamespace
+ size += 1 // m.HostIfNameSet
+ size += 64 // m.HostIfName
+ size += 1 // m.HostBridgeSet
+ size += 64 // m.HostBridge
+ size += 4 + len(m.Tag) // m.Tag
+ return size
+}
+func (m *TapCreateV3) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.ID)
+ buf.EncodeBool(m.UseRandomMac)
+ buf.EncodeBytes(m.MacAddress[:], 6)
+ buf.EncodeUint16(m.NumRxQueues)
+ buf.EncodeUint16(m.NumTxQueues)
+ buf.EncodeUint16(m.TxRingSz)
+ buf.EncodeUint16(m.RxRingSz)
+ buf.EncodeBool(m.HostMtuSet)
+ buf.EncodeUint32(m.HostMtuSize)
+ buf.EncodeBool(m.HostMacAddrSet)
+ buf.EncodeBytes(m.HostMacAddr[:], 6)
+ buf.EncodeBool(m.HostIP4PrefixSet)
+ buf.EncodeBytes(m.HostIP4Prefix.Address[:], 4)
+ buf.EncodeUint8(m.HostIP4Prefix.Len)
+ buf.EncodeBool(m.HostIP6PrefixSet)
+ buf.EncodeBytes(m.HostIP6Prefix.Address[:], 16)
+ buf.EncodeUint8(m.HostIP6Prefix.Len)
+ buf.EncodeBool(m.HostIP4GwSet)
+ buf.EncodeBytes(m.HostIP4Gw[:], 4)
+ buf.EncodeBool(m.HostIP6GwSet)
+ buf.EncodeBytes(m.HostIP6Gw[:], 16)
+ buf.EncodeUint32(uint32(m.TapFlags))
+ buf.EncodeBool(m.HostNamespaceSet)
+ buf.EncodeString(m.HostNamespace, 64)
+ buf.EncodeBool(m.HostIfNameSet)
+ buf.EncodeString(m.HostIfName, 64)
+ buf.EncodeBool(m.HostBridgeSet)
+ buf.EncodeString(m.HostBridge, 64)
+ buf.EncodeString(m.Tag, 0)
+ return buf.Bytes(), nil
+}
+func (m *TapCreateV3) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.ID = buf.DecodeUint32()
+ m.UseRandomMac = buf.DecodeBool()
+ copy(m.MacAddress[:], buf.DecodeBytes(6))
+ m.NumRxQueues = buf.DecodeUint16()
+ m.NumTxQueues = buf.DecodeUint16()
+ m.TxRingSz = buf.DecodeUint16()
+ m.RxRingSz = buf.DecodeUint16()
+ m.HostMtuSet = buf.DecodeBool()
+ m.HostMtuSize = buf.DecodeUint32()
+ m.HostMacAddrSet = buf.DecodeBool()
+ copy(m.HostMacAddr[:], buf.DecodeBytes(6))
+ m.HostIP4PrefixSet = buf.DecodeBool()
+ copy(m.HostIP4Prefix.Address[:], buf.DecodeBytes(4))
+ m.HostIP4Prefix.Len = buf.DecodeUint8()
+ m.HostIP6PrefixSet = buf.DecodeBool()
+ copy(m.HostIP6Prefix.Address[:], buf.DecodeBytes(16))
+ m.HostIP6Prefix.Len = buf.DecodeUint8()
+ m.HostIP4GwSet = buf.DecodeBool()
+ copy(m.HostIP4Gw[:], buf.DecodeBytes(4))
+ m.HostIP6GwSet = buf.DecodeBool()
+ copy(m.HostIP6Gw[:], buf.DecodeBytes(16))
+ m.TapFlags = TapFlags(buf.DecodeUint32())
+ m.HostNamespaceSet = buf.DecodeBool()
+ m.HostNamespace = buf.DecodeString(64)
+ m.HostIfNameSet = buf.DecodeBool()
+ m.HostIfName = buf.DecodeString(64)
+ m.HostBridgeSet = buf.DecodeBool()
+ m.HostBridge = buf.DecodeString(64)
+ m.Tag = buf.DecodeString(0)
+ return nil
+}
+
+// TapCreateV3Reply defines message 'tap_create_v3_reply'.
+type TapCreateV3Reply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+}
+
+func (m *TapCreateV3Reply) Reset() { *m = TapCreateV3Reply{} }
+func (*TapCreateV3Reply) GetMessageName() string { return "tap_create_v3_reply" }
+func (*TapCreateV3Reply) GetCrcString() string { return "5383d31f" }
+func (*TapCreateV3Reply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *TapCreateV3Reply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ size += 4 // m.SwIfIndex
+ return size
+}
+func (m *TapCreateV3Reply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint32(uint32(m.SwIfIndex))
+ return buf.Bytes(), nil
+}
+func (m *TapCreateV3Reply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ return nil
+}
+
// TapDeleteV2 defines message 'tap_delete_v2'.
type TapDeleteV2 struct {
SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
@@ -466,6 +646,8 @@ func file_tapv2_binapi_init() {
api.RegisterMessage((*SwInterfaceTapV2Dump)(nil), "sw_interface_tap_v2_dump_f9e6675e")
api.RegisterMessage((*TapCreateV2)(nil), "tap_create_v2_2d0d6570")
api.RegisterMessage((*TapCreateV2Reply)(nil), "tap_create_v2_reply_5383d31f")
+ api.RegisterMessage((*TapCreateV3)(nil), "tap_create_v3_3f3fd1df")
+ api.RegisterMessage((*TapCreateV3Reply)(nil), "tap_create_v3_reply_5383d31f")
api.RegisterMessage((*TapDeleteV2)(nil), "tap_delete_v2_f9e6675e")
api.RegisterMessage((*TapDeleteV2Reply)(nil), "tap_delete_v2_reply_e8d4e804")
}
@@ -477,6 +659,8 @@ func AllMessages() []api.Message {
(*SwInterfaceTapV2Dump)(nil),
(*TapCreateV2)(nil),
(*TapCreateV2Reply)(nil),
+ (*TapCreateV3)(nil),
+ (*TapCreateV3Reply)(nil),
(*TapDeleteV2)(nil),
(*TapDeleteV2Reply)(nil),
}
diff --git a/binapi/tapv2/tapv2_rpc.ba.go b/binapi/tapv2/tapv2_rpc.ba.go
index e7144ba..d3c0a9c 100644
--- a/binapi/tapv2/tapv2_rpc.ba.go
+++ b/binapi/tapv2/tapv2_rpc.ba.go
@@ -8,13 +8,14 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service tapv2.
type RPCService interface {
SwInterfaceTapV2Dump(ctx context.Context, in *SwInterfaceTapV2Dump) (RPCService_SwInterfaceTapV2DumpClient, error)
TapCreateV2(ctx context.Context, in *TapCreateV2) (*TapCreateV2Reply, error)
+ TapCreateV3(ctx context.Context, in *TapCreateV3) (*TapCreateV3Reply, error)
TapDeleteV2(ctx context.Context, in *TapDeleteV2) (*TapDeleteV2Reply, error)
}
@@ -35,7 +36,7 @@ func (c *serviceClient) SwInterfaceTapV2Dump(ctx context.Context, in *SwInterfac
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -58,7 +59,7 @@ func (c *serviceClient_SwInterfaceTapV2DumpClient) Recv() (*SwInterfaceTapV2Deta
switch m := msg.(type) {
case *SwInterfaceTapV2Details:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -78,6 +79,15 @@ func (c *serviceClient) TapCreateV2(ctx context.Context, in *TapCreateV2) (*TapC
return out, api.RetvalToVPPApiError(out.Retval)
}
+func (c *serviceClient) TapCreateV3(ctx context.Context, in *TapCreateV3) (*TapCreateV3Reply, error) {
+ out := new(TapCreateV3Reply)
+ err := c.conn.Invoke(ctx, in, out)
+ if err != nil {
+ return nil, err
+ }
+ return out, api.RetvalToVPPApiError(out.Retval)
+}
+
func (c *serviceClient) TapDeleteV2(ctx context.Context, in *TapDeleteV2) (*TapDeleteV2Reply, error) {
out := new(TapDeleteV2Reply)
err := c.conn.Invoke(ctx, in, out)
diff --git a/binapi/tcp/tcp.ba.go b/binapi/tcp/tcp.ba.go
index d9bae70..bd36086 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 45647f6..0432a2a 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/core/teib.api.json
// Package teib contains generated bindings for API file teib.api.
diff --git a/binapi/teib/teib_rpc.ba.go b/binapi/teib/teib_rpc.ba.go
index 74d71b4..6edb4aa 100644
--- a/binapi/teib/teib_rpc.ba.go
+++ b/binapi/teib/teib_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service teib.
@@ -34,7 +34,7 @@ func (c *serviceClient) TeibDump(ctx context.Context, in *TeibDump) (RPCService_
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -57,7 +57,7 @@ func (c *serviceClient_TeibDumpClient) Recv() (*TeibDetails, error) {
switch m := msg.(type) {
case *TeibDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/tls_openssl/tls_openssl.ba.go b/binapi/tls_openssl/tls_openssl.ba.go
index f77fdd6..0ec8db3 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 43577d5..f9399d5 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 c6241a6..e730e04 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/tracedump.api.json
// Package tracedump contains generated bindings for API file tracedump.api.
diff --git a/binapi/tunnel_types/tunnel_types.ba.go b/binapi/tunnel_types/tunnel_types.ba.go
index 26ea41d..6f26412 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 ae14837..844c9c7 100644
--- a/binapi/udp/udp.ba.go
+++ b/binapi/udp/udp.ba.go
@@ -1,18 +1,21 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
// binapi-generator: v0.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/core/udp.api.json
// Package udp contains generated bindings for API file udp.api.
//
// Contents:
-// 1 struct
-// 6 messages
+// 1 enum
+// 2 structs
+// 8 messages
//
package udp
import (
+ "strconv"
+
api "git.fd.io/govpp.git/api"
ip_types "git.fd.io/govpp.git/binapi/ip_types"
codec "git.fd.io/govpp.git/codec"
@@ -27,9 +30,46 @@ const _ = api.GoVppAPIPackageIsVersion2
const (
APIFile = "udp"
APIVersion = "1.1.0"
- VersionCrc = 0x65e4a4b3
+ VersionCrc = 0x2d3db5fa
+)
+
+// UDPDecapNextProto defines enum 'udp_decap_next_proto'.
+type UDPDecapNextProto uint32
+
+const (
+ UDP_API_DECAP_PROTO_IP4 UDPDecapNextProto = 1
+ UDP_API_DECAP_PROTO_IP6 UDPDecapNextProto = 2
+ UDP_API_DECAP_PROTO_MPLS UDPDecapNextProto = 3
)
+var (
+ UDPDecapNextProto_name = map[uint32]string{
+ 1: "UDP_API_DECAP_PROTO_IP4",
+ 2: "UDP_API_DECAP_PROTO_IP6",
+ 3: "UDP_API_DECAP_PROTO_MPLS",
+ }
+ UDPDecapNextProto_value = map[string]uint32{
+ "UDP_API_DECAP_PROTO_IP4": 1,
+ "UDP_API_DECAP_PROTO_IP6": 2,
+ "UDP_API_DECAP_PROTO_MPLS": 3,
+ }
+)
+
+func (x UDPDecapNextProto) String() string {
+ s, ok := UDPDecapNextProto_name[uint32(x)]
+ if ok {
+ return s
+ }
+ return "UDPDecapNextProto(" + strconv.Itoa(int(x)) + ")"
+}
+
+// UDPDecap defines type 'udp_decap'.
+type UDPDecap struct {
+ IsIP4 uint8 `binapi:"u8,name=is_ip4" json:"is_ip4,omitempty"`
+ Port uint16 `binapi:"u16,name=port" json:"port,omitempty"`
+ NextProto UDPDecapNextProto `binapi:"udp_decap_next_proto,name=next_proto" json:"next_proto,omitempty"`
+}
+
// UDPEncap defines type 'udp_encap'.
type UDPEncap struct {
TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
@@ -40,6 +80,82 @@ type UDPEncap struct {
ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
}
+// UDPDecapAddDel defines message 'udp_decap_add_del'.
+type UDPDecapAddDel struct {
+ IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
+ UDPDecap UDPDecap `binapi:"udp_decap,name=udp_decap" json:"udp_decap,omitempty"`
+}
+
+func (m *UDPDecapAddDel) Reset() { *m = UDPDecapAddDel{} }
+func (*UDPDecapAddDel) GetMessageName() string { return "udp_decap_add_del" }
+func (*UDPDecapAddDel) GetCrcString() string { return "d155c6ac" }
+func (*UDPDecapAddDel) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *UDPDecapAddDel) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 1 // m.IsAdd
+ size += 1 // m.UDPDecap.IsIP4
+ size += 2 // m.UDPDecap.Port
+ size += 4 // m.UDPDecap.NextProto
+ return size
+}
+func (m *UDPDecapAddDel) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeBool(m.IsAdd)
+ buf.EncodeUint8(m.UDPDecap.IsIP4)
+ buf.EncodeUint16(m.UDPDecap.Port)
+ buf.EncodeUint32(uint32(m.UDPDecap.NextProto))
+ return buf.Bytes(), nil
+}
+func (m *UDPDecapAddDel) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.IsAdd = buf.DecodeBool()
+ m.UDPDecap.IsIP4 = buf.DecodeUint8()
+ m.UDPDecap.Port = buf.DecodeUint16()
+ m.UDPDecap.NextProto = UDPDecapNextProto(buf.DecodeUint32())
+ return nil
+}
+
+// UDPDecapAddDelReply defines message 'udp_decap_add_del_reply'.
+type UDPDecapAddDelReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+}
+
+func (m *UDPDecapAddDelReply) Reset() { *m = UDPDecapAddDelReply{} }
+func (*UDPDecapAddDelReply) GetMessageName() string { return "udp_decap_add_del_reply" }
+func (*UDPDecapAddDelReply) GetCrcString() string { return "e8d4e804" }
+func (*UDPDecapAddDelReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *UDPDecapAddDelReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ return size
+}
+func (m *UDPDecapAddDelReply) 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 *UDPDecapAddDelReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ return nil
+}
+
// UDPEncapAdd defines message 'udp_encap_add'.
type UDPEncapAdd struct {
UDPEncap UDPEncap `binapi:"udp_encap,name=udp_encap" json:"udp_encap,omitempty"`
@@ -280,6 +396,8 @@ func (m *UDPEncapDump) Unmarshal(b []byte) error {
func init() { file_udp_binapi_init() }
func file_udp_binapi_init() {
+ api.RegisterMessage((*UDPDecapAddDel)(nil), "udp_decap_add_del_d155c6ac")
+ api.RegisterMessage((*UDPDecapAddDelReply)(nil), "udp_decap_add_del_reply_e8d4e804")
api.RegisterMessage((*UDPEncapAdd)(nil), "udp_encap_add_f74a60b1")
api.RegisterMessage((*UDPEncapAddReply)(nil), "udp_encap_add_reply_e2fc8294")
api.RegisterMessage((*UDPEncapDel)(nil), "udp_encap_del_3a91bde5")
@@ -291,6 +409,8 @@ func file_udp_binapi_init() {
// Messages returns list of all messages in this module.
func AllMessages() []api.Message {
return []api.Message{
+ (*UDPDecapAddDel)(nil),
+ (*UDPDecapAddDelReply)(nil),
(*UDPEncapAdd)(nil),
(*UDPEncapAddReply)(nil),
(*UDPEncapDel)(nil),
diff --git a/binapi/udp/udp_rpc.ba.go b/binapi/udp/udp_rpc.ba.go
index d2a8bd0..34a1b5a 100644
--- a/binapi/udp/udp_rpc.ba.go
+++ b/binapi/udp/udp_rpc.ba.go
@@ -8,11 +8,12 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service udp.
type RPCService interface {
+ UDPDecapAddDel(ctx context.Context, in *UDPDecapAddDel) (*UDPDecapAddDelReply, error)
UDPEncapAdd(ctx context.Context, in *UDPEncapAdd) (*UDPEncapAddReply, error)
UDPEncapDel(ctx context.Context, in *UDPEncapDel) (*UDPEncapDelReply, error)
UDPEncapDump(ctx context.Context, in *UDPEncapDump) (RPCService_UDPEncapDumpClient, error)
@@ -26,6 +27,15 @@ func NewServiceClient(conn api.Connection) RPCService {
return &serviceClient{conn}
}
+func (c *serviceClient) UDPDecapAddDel(ctx context.Context, in *UDPDecapAddDel) (*UDPDecapAddDelReply, error) {
+ out := new(UDPDecapAddDelReply)
+ err := c.conn.Invoke(ctx, in, out)
+ if err != nil {
+ return nil, err
+ }
+ return out, api.RetvalToVPPApiError(out.Retval)
+}
+
func (c *serviceClient) UDPEncapAdd(ctx context.Context, in *UDPEncapAdd) (*UDPEncapAddReply, error) {
out := new(UDPEncapAddReply)
err := c.conn.Invoke(ctx, in, out)
@@ -53,7 +63,7 @@ func (c *serviceClient) UDPEncapDump(ctx context.Context, in *UDPEncapDump) (RPC
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -76,7 +86,7 @@ func (c *serviceClient_UDPEncapDumpClient) Recv() (*UDPEncapDetails, error) {
switch m := msg.(type) {
case *UDPEncapDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/udp_ping/udp_ping.ba.go b/binapi/udp_ping/udp_ping.ba.go
index c9971be..402036a 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 47db00f..3ffd682 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 91ea635..d7b18a2 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/core/vhost_user.api.json
// Package vhost_user contains generated bindings for API file vhost_user.api.
diff --git a/binapi/vhost_user/vhost_user_rpc.ba.go b/binapi/vhost_user/vhost_user_rpc.ba.go
index c985c1b..5e08bb4 100644
--- a/binapi/vhost_user/vhost_user_rpc.ba.go
+++ b/binapi/vhost_user/vhost_user_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service vhost_user.
@@ -83,7 +83,7 @@ func (c *serviceClient) SwInterfaceVhostUserDump(ctx context.Context, in *SwInte
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -106,7 +106,7 @@ func (c *serviceClient_SwInterfaceVhostUserDumpClient) Recv() (*SwInterfaceVhost
switch m := msg.(type) {
case *SwInterfaceVhostUserDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/virtio/virtio.ba.go b/binapi/virtio/virtio.ba.go
index 0453ea9..817e979 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/core/virtio.api.json
// Package virtio contains generated bindings for API file virtio.api.
diff --git a/binapi/virtio/virtio_rpc.ba.go b/binapi/virtio/virtio_rpc.ba.go
index 0dde254..e8a67e2 100644
--- a/binapi/virtio/virtio_rpc.ba.go
+++ b/binapi/virtio/virtio_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service virtio.
@@ -36,7 +36,7 @@ func (c *serviceClient) SwInterfaceVirtioPciDump(ctx context.Context, in *SwInte
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -59,7 +59,7 @@ func (c *serviceClient_SwInterfaceVirtioPciDumpClient) Recv() (*SwInterfaceVirti
switch m := msg.(type) {
case *SwInterfaceVirtioPciDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/virtio_types/virtio_types.ba.go b/binapi/virtio_types/virtio_types.ba.go
index 5393694..e6b4c76 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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
new file mode 100644
index 0000000..4818076
--- /dev/null
+++ b/binapi/vlib/vlib.ba.go
@@ -0,0 +1,751 @@
+// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
+// versions:
+// binapi-generator: v0.5.0-dev
+// VPP: 22.02-release
+// source: /usr/share/vpp/api/core/vlib.api.json
+
+// Package vlib contains generated bindings for API file vlib.api.
+//
+// Contents:
+// 1 struct
+// 18 messages
+//
+package vlib
+
+import (
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
+)
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the GoVPP api package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// GoVPP api package needs to be updated.
+const _ = api.GoVppAPIPackageIsVersion2
+
+const (
+ APIFile = "vlib"
+ APIVersion = "1.0.0"
+ VersionCrc = 0x9a9e84e4
+)
+
+// ThreadData defines type 'thread_data'.
+type ThreadData struct {
+ ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
+ Name string `binapi:"string[64],name=name" json:"name,omitempty"`
+ Type string `binapi:"string[64],name=type" json:"type,omitempty"`
+ PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
+ CPUID uint32 `binapi:"u32,name=cpu_id" json:"cpu_id,omitempty"`
+ Core uint32 `binapi:"u32,name=core" json:"core,omitempty"`
+ CPUSocket uint32 `binapi:"u32,name=cpu_socket" json:"cpu_socket,omitempty"`
+}
+
+// AddNodeNext defines message 'add_node_next'.
+type AddNodeNext struct {
+ NodeName string `binapi:"string[64],name=node_name" json:"node_name,omitempty"`
+ NextName string `binapi:"string[64],name=next_name" json:"next_name,omitempty"`
+}
+
+func (m *AddNodeNext) Reset() { *m = AddNodeNext{} }
+func (*AddNodeNext) GetMessageName() string { return "add_node_next" }
+func (*AddNodeNext) GetCrcString() string { return "2457116d" }
+func (*AddNodeNext) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *AddNodeNext) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 64 // m.NodeName
+ size += 64 // m.NextName
+ return size
+}
+func (m *AddNodeNext) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeString(m.NodeName, 64)
+ buf.EncodeString(m.NextName, 64)
+ return buf.Bytes(), nil
+}
+func (m *AddNodeNext) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.NodeName = buf.DecodeString(64)
+ m.NextName = buf.DecodeString(64)
+ return nil
+}
+
+// AddNodeNextReply defines message 'add_node_next_reply'.
+type AddNodeNextReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ NextIndex uint32 `binapi:"u32,name=next_index" json:"next_index,omitempty"`
+}
+
+func (m *AddNodeNextReply) Reset() { *m = AddNodeNextReply{} }
+func (*AddNodeNextReply) GetMessageName() string { return "add_node_next_reply" }
+func (*AddNodeNextReply) GetCrcString() string { return "2ed75f32" }
+func (*AddNodeNextReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *AddNodeNextReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ size += 4 // m.NextIndex
+ return size
+}
+func (m *AddNodeNextReply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint32(m.NextIndex)
+ return buf.Bytes(), nil
+}
+func (m *AddNodeNextReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ m.NextIndex = buf.DecodeUint32()
+ return nil
+}
+
+// Cli defines message 'cli'.
+type Cli struct {
+ CmdInShmem uint64 `binapi:"u64,name=cmd_in_shmem" json:"cmd_in_shmem,omitempty"`
+}
+
+func (m *Cli) Reset() { *m = Cli{} }
+func (*Cli) GetMessageName() string { return "cli" }
+func (*Cli) GetCrcString() string { return "23bfbfff" }
+func (*Cli) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *Cli) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 8 // m.CmdInShmem
+ return size
+}
+func (m *Cli) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint64(m.CmdInShmem)
+ return buf.Bytes(), nil
+}
+func (m *Cli) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.CmdInShmem = buf.DecodeUint64()
+ return nil
+}
+
+// CliInband defines message 'cli_inband'.
+type CliInband struct {
+ Cmd string `binapi:"string[],name=cmd" json:"cmd,omitempty"`
+}
+
+func (m *CliInband) Reset() { *m = CliInband{} }
+func (*CliInband) GetMessageName() string { return "cli_inband" }
+func (*CliInband) GetCrcString() string { return "f8377302" }
+func (*CliInband) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *CliInband) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 + len(m.Cmd) // m.Cmd
+ return size
+}
+func (m *CliInband) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeString(m.Cmd, 0)
+ return buf.Bytes(), nil
+}
+func (m *CliInband) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Cmd = buf.DecodeString(0)
+ return nil
+}
+
+// CliInbandReply defines message 'cli_inband_reply'.
+type CliInbandReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ Reply string `binapi:"string[],name=reply" json:"reply,omitempty"`
+}
+
+func (m *CliInbandReply) Reset() { *m = CliInbandReply{} }
+func (*CliInbandReply) GetMessageName() string { return "cli_inband_reply" }
+func (*CliInbandReply) GetCrcString() string { return "05879051" }
+func (*CliInbandReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *CliInbandReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ size += 4 + len(m.Reply) // m.Reply
+ return size
+}
+func (m *CliInbandReply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeString(m.Reply, 0)
+ return buf.Bytes(), nil
+}
+func (m *CliInbandReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ m.Reply = buf.DecodeString(0)
+ return nil
+}
+
+// CliReply defines message 'cli_reply'.
+type CliReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ ReplyInShmem uint64 `binapi:"u64,name=reply_in_shmem" json:"reply_in_shmem,omitempty"`
+}
+
+func (m *CliReply) Reset() { *m = CliReply{} }
+func (*CliReply) GetMessageName() string { return "cli_reply" }
+func (*CliReply) GetCrcString() string { return "06d68297" }
+func (*CliReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *CliReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ size += 8 // m.ReplyInShmem
+ return size
+}
+func (m *CliReply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint64(m.ReplyInShmem)
+ return buf.Bytes(), nil
+}
+func (m *CliReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ m.ReplyInShmem = buf.DecodeUint64()
+ return nil
+}
+
+// GetF64EndianValue defines message 'get_f64_endian_value'.
+type GetF64EndianValue struct {
+ F64One float64 `binapi:"f64,name=f64_one,default=1" json:"f64_one,omitempty"`
+}
+
+func (m *GetF64EndianValue) Reset() { *m = GetF64EndianValue{} }
+func (*GetF64EndianValue) GetMessageName() string { return "get_f64_endian_value" }
+func (*GetF64EndianValue) GetCrcString() string { return "809fcd44" }
+func (*GetF64EndianValue) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *GetF64EndianValue) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 8 // m.F64One
+ return size
+}
+func (m *GetF64EndianValue) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeFloat64(m.F64One)
+ return buf.Bytes(), nil
+}
+func (m *GetF64EndianValue) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.F64One = buf.DecodeFloat64()
+ return nil
+}
+
+// GetF64EndianValueReply defines message 'get_f64_endian_value_reply'.
+type GetF64EndianValueReply struct {
+ Retval uint32 `binapi:"u32,name=retval" json:"retval,omitempty"`
+ F64OneResult float64 `binapi:"f64,name=f64_one_result" json:"f64_one_result,omitempty"`
+}
+
+func (m *GetF64EndianValueReply) Reset() { *m = GetF64EndianValueReply{} }
+func (*GetF64EndianValueReply) GetMessageName() string { return "get_f64_endian_value_reply" }
+func (*GetF64EndianValueReply) GetCrcString() string { return "7e02e404" }
+func (*GetF64EndianValueReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *GetF64EndianValueReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ size += 8 // m.F64OneResult
+ return size
+}
+func (m *GetF64EndianValueReply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.Retval)
+ buf.EncodeFloat64(m.F64OneResult)
+ return buf.Bytes(), nil
+}
+func (m *GetF64EndianValueReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeUint32()
+ m.F64OneResult = buf.DecodeFloat64()
+ return nil
+}
+
+// GetF64IncrementByOne defines message 'get_f64_increment_by_one'.
+type GetF64IncrementByOne struct {
+ F64Value float64 `binapi:"f64,name=f64_value,default=1" json:"f64_value,omitempty"`
+}
+
+func (m *GetF64IncrementByOne) Reset() { *m = GetF64IncrementByOne{} }
+func (*GetF64IncrementByOne) GetMessageName() string { return "get_f64_increment_by_one" }
+func (*GetF64IncrementByOne) GetCrcString() string { return "b64f027e" }
+func (*GetF64IncrementByOne) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *GetF64IncrementByOne) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 8 // m.F64Value
+ return size
+}
+func (m *GetF64IncrementByOne) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeFloat64(m.F64Value)
+ return buf.Bytes(), nil
+}
+func (m *GetF64IncrementByOne) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.F64Value = buf.DecodeFloat64()
+ return nil
+}
+
+// GetF64IncrementByOneReply defines message 'get_f64_increment_by_one_reply'.
+type GetF64IncrementByOneReply struct {
+ Retval uint32 `binapi:"u32,name=retval" json:"retval,omitempty"`
+ F64Value float64 `binapi:"f64,name=f64_value" json:"f64_value,omitempty"`
+}
+
+func (m *GetF64IncrementByOneReply) Reset() { *m = GetF64IncrementByOneReply{} }
+func (*GetF64IncrementByOneReply) GetMessageName() string { return "get_f64_increment_by_one_reply" }
+func (*GetF64IncrementByOneReply) GetCrcString() string { return "d25dbaa3" }
+func (*GetF64IncrementByOneReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *GetF64IncrementByOneReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ size += 8 // m.F64Value
+ return size
+}
+func (m *GetF64IncrementByOneReply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.Retval)
+ buf.EncodeFloat64(m.F64Value)
+ return buf.Bytes(), nil
+}
+func (m *GetF64IncrementByOneReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeUint32()
+ m.F64Value = buf.DecodeFloat64()
+ return nil
+}
+
+// GetNextIndex defines message 'get_next_index'.
+type GetNextIndex struct {
+ NodeName string `binapi:"string[64],name=node_name" json:"node_name,omitempty"`
+ NextName string `binapi:"string[64],name=next_name" json:"next_name,omitempty"`
+}
+
+func (m *GetNextIndex) Reset() { *m = GetNextIndex{} }
+func (*GetNextIndex) GetMessageName() string { return "get_next_index" }
+func (*GetNextIndex) GetCrcString() string { return "2457116d" }
+func (*GetNextIndex) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *GetNextIndex) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 64 // m.NodeName
+ size += 64 // m.NextName
+ return size
+}
+func (m *GetNextIndex) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeString(m.NodeName, 64)
+ buf.EncodeString(m.NextName, 64)
+ return buf.Bytes(), nil
+}
+func (m *GetNextIndex) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.NodeName = buf.DecodeString(64)
+ m.NextName = buf.DecodeString(64)
+ return nil
+}
+
+// GetNextIndexReply defines message 'get_next_index_reply'.
+type GetNextIndexReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ NextIndex uint32 `binapi:"u32,name=next_index" json:"next_index,omitempty"`
+}
+
+func (m *GetNextIndexReply) Reset() { *m = GetNextIndexReply{} }
+func (*GetNextIndexReply) GetMessageName() string { return "get_next_index_reply" }
+func (*GetNextIndexReply) GetCrcString() string { return "2ed75f32" }
+func (*GetNextIndexReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *GetNextIndexReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ size += 4 // m.NextIndex
+ return size
+}
+func (m *GetNextIndexReply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint32(m.NextIndex)
+ return buf.Bytes(), nil
+}
+func (m *GetNextIndexReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ m.NextIndex = buf.DecodeUint32()
+ return nil
+}
+
+// GetNodeGraph defines message 'get_node_graph'.
+type GetNodeGraph struct{}
+
+func (m *GetNodeGraph) Reset() { *m = GetNodeGraph{} }
+func (*GetNodeGraph) GetMessageName() string { return "get_node_graph" }
+func (*GetNodeGraph) GetCrcString() string { return "51077d14" }
+func (*GetNodeGraph) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *GetNodeGraph) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ return size
+}
+func (m *GetNodeGraph) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ return buf.Bytes(), nil
+}
+func (m *GetNodeGraph) Unmarshal(b []byte) error {
+ return nil
+}
+
+// GetNodeGraphReply defines message 'get_node_graph_reply'.
+type GetNodeGraphReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ ReplyInShmem uint64 `binapi:"u64,name=reply_in_shmem" json:"reply_in_shmem,omitempty"`
+}
+
+func (m *GetNodeGraphReply) Reset() { *m = GetNodeGraphReply{} }
+func (*GetNodeGraphReply) GetMessageName() string { return "get_node_graph_reply" }
+func (*GetNodeGraphReply) GetCrcString() string { return "06d68297" }
+func (*GetNodeGraphReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *GetNodeGraphReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ size += 8 // m.ReplyInShmem
+ return size
+}
+func (m *GetNodeGraphReply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint64(m.ReplyInShmem)
+ return buf.Bytes(), nil
+}
+func (m *GetNodeGraphReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ m.ReplyInShmem = buf.DecodeUint64()
+ return nil
+}
+
+// GetNodeIndex defines message 'get_node_index'.
+type GetNodeIndex struct {
+ NodeName string `binapi:"string[64],name=node_name" json:"node_name,omitempty"`
+}
+
+func (m *GetNodeIndex) Reset() { *m = GetNodeIndex{} }
+func (*GetNodeIndex) GetMessageName() string { return "get_node_index" }
+func (*GetNodeIndex) GetCrcString() string { return "f1984c64" }
+func (*GetNodeIndex) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *GetNodeIndex) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 64 // m.NodeName
+ return size
+}
+func (m *GetNodeIndex) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeString(m.NodeName, 64)
+ return buf.Bytes(), nil
+}
+func (m *GetNodeIndex) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.NodeName = buf.DecodeString(64)
+ return nil
+}
+
+// GetNodeIndexReply defines message 'get_node_index_reply'.
+type GetNodeIndexReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ NodeIndex uint32 `binapi:"u32,name=node_index" json:"node_index,omitempty"`
+}
+
+func (m *GetNodeIndexReply) Reset() { *m = GetNodeIndexReply{} }
+func (*GetNodeIndexReply) GetMessageName() string { return "get_node_index_reply" }
+func (*GetNodeIndexReply) GetCrcString() string { return "a8600b89" }
+func (*GetNodeIndexReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *GetNodeIndexReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ size += 4 // m.NodeIndex
+ return size
+}
+func (m *GetNodeIndexReply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint32(m.NodeIndex)
+ return buf.Bytes(), nil
+}
+func (m *GetNodeIndexReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ m.NodeIndex = buf.DecodeUint32()
+ return nil
+}
+
+// ShowThreads defines message 'show_threads'.
+type ShowThreads struct{}
+
+func (m *ShowThreads) Reset() { *m = ShowThreads{} }
+func (*ShowThreads) GetMessageName() string { return "show_threads" }
+func (*ShowThreads) GetCrcString() string { return "51077d14" }
+func (*ShowThreads) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *ShowThreads) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ return size
+}
+func (m *ShowThreads) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ return buf.Bytes(), nil
+}
+func (m *ShowThreads) Unmarshal(b []byte) error {
+ return nil
+}
+
+// ShowThreadsReply defines message 'show_threads_reply'.
+type ShowThreadsReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ Count uint32 `binapi:"u32,name=count" json:"-"`
+ ThreadData []ThreadData `binapi:"thread_data[count],name=thread_data" json:"thread_data,omitempty"`
+}
+
+func (m *ShowThreadsReply) Reset() { *m = ShowThreadsReply{} }
+func (*ShowThreadsReply) GetMessageName() string { return "show_threads_reply" }
+func (*ShowThreadsReply) GetCrcString() string { return "efd78e83" }
+func (*ShowThreadsReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *ShowThreadsReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ size += 4 // m.Count
+ for j1 := 0; j1 < len(m.ThreadData); j1++ {
+ var s1 ThreadData
+ _ = s1
+ if j1 < len(m.ThreadData) {
+ s1 = m.ThreadData[j1]
+ }
+ size += 4 // s1.ID
+ size += 64 // s1.Name
+ size += 64 // s1.Type
+ size += 4 // s1.PID
+ size += 4 // s1.CPUID
+ size += 4 // s1.Core
+ size += 4 // s1.CPUSocket
+ }
+ return size
+}
+func (m *ShowThreadsReply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint32(uint32(len(m.ThreadData)))
+ for j0 := 0; j0 < len(m.ThreadData); j0++ {
+ var v0 ThreadData // ThreadData
+ if j0 < len(m.ThreadData) {
+ v0 = m.ThreadData[j0]
+ }
+ buf.EncodeUint32(v0.ID)
+ buf.EncodeString(v0.Name, 64)
+ buf.EncodeString(v0.Type, 64)
+ buf.EncodeUint32(v0.PID)
+ buf.EncodeUint32(v0.CPUID)
+ buf.EncodeUint32(v0.Core)
+ buf.EncodeUint32(v0.CPUSocket)
+ }
+ return buf.Bytes(), nil
+}
+func (m *ShowThreadsReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ m.Count = buf.DecodeUint32()
+ m.ThreadData = make([]ThreadData, m.Count)
+ for j0 := 0; j0 < len(m.ThreadData); j0++ {
+ m.ThreadData[j0].ID = buf.DecodeUint32()
+ m.ThreadData[j0].Name = buf.DecodeString(64)
+ m.ThreadData[j0].Type = buf.DecodeString(64)
+ m.ThreadData[j0].PID = buf.DecodeUint32()
+ m.ThreadData[j0].CPUID = buf.DecodeUint32()
+ m.ThreadData[j0].Core = buf.DecodeUint32()
+ m.ThreadData[j0].CPUSocket = buf.DecodeUint32()
+ }
+ return nil
+}
+
+func init() { file_vlib_binapi_init() }
+func file_vlib_binapi_init() {
+ api.RegisterMessage((*AddNodeNext)(nil), "add_node_next_2457116d")
+ api.RegisterMessage((*AddNodeNextReply)(nil), "add_node_next_reply_2ed75f32")
+ api.RegisterMessage((*Cli)(nil), "cli_23bfbfff")
+ api.RegisterMessage((*CliInband)(nil), "cli_inband_f8377302")
+ api.RegisterMessage((*CliInbandReply)(nil), "cli_inband_reply_05879051")
+ api.RegisterMessage((*CliReply)(nil), "cli_reply_06d68297")
+ api.RegisterMessage((*GetF64EndianValue)(nil), "get_f64_endian_value_809fcd44")
+ api.RegisterMessage((*GetF64EndianValueReply)(nil), "get_f64_endian_value_reply_7e02e404")
+ api.RegisterMessage((*GetF64IncrementByOne)(nil), "get_f64_increment_by_one_b64f027e")
+ api.RegisterMessage((*GetF64IncrementByOneReply)(nil), "get_f64_increment_by_one_reply_d25dbaa3")
+ api.RegisterMessage((*GetNextIndex)(nil), "get_next_index_2457116d")
+ api.RegisterMessage((*GetNextIndexReply)(nil), "get_next_index_reply_2ed75f32")
+ api.RegisterMessage((*GetNodeGraph)(nil), "get_node_graph_51077d14")
+ api.RegisterMessage((*GetNodeGraphReply)(nil), "get_node_graph_reply_06d68297")
+ api.RegisterMessage((*GetNodeIndex)(nil), "get_node_index_f1984c64")
+ api.RegisterMessage((*GetNodeIndexReply)(nil), "get_node_index_reply_a8600b89")
+ api.RegisterMessage((*ShowThreads)(nil), "show_threads_51077d14")
+ api.RegisterMessage((*ShowThreadsReply)(nil), "show_threads_reply_efd78e83")
+}
+
+// Messages returns list of all messages in this module.
+func AllMessages() []api.Message {
+ return []api.Message{
+ (*AddNodeNext)(nil),
+ (*AddNodeNextReply)(nil),
+ (*Cli)(nil),
+ (*CliInband)(nil),
+ (*CliInbandReply)(nil),
+ (*CliReply)(nil),
+ (*GetF64EndianValue)(nil),
+ (*GetF64EndianValueReply)(nil),
+ (*GetF64IncrementByOne)(nil),
+ (*GetF64IncrementByOneReply)(nil),
+ (*GetNextIndex)(nil),
+ (*GetNextIndexReply)(nil),
+ (*GetNodeGraph)(nil),
+ (*GetNodeGraphReply)(nil),
+ (*GetNodeIndex)(nil),
+ (*GetNodeIndexReply)(nil),
+ (*ShowThreads)(nil),
+ (*ShowThreadsReply)(nil),
+ }
+}
diff --git a/binapi/vlib/vlib_rpc.ba.go b/binapi/vlib/vlib_rpc.ba.go
new file mode 100644
index 0000000..75e696e
--- /dev/null
+++ b/binapi/vlib/vlib_rpc.ba.go
@@ -0,0 +1,111 @@
+// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
+
+package vlib
+
+import (
+ "context"
+
+ api "git.fd.io/govpp.git/api"
+)
+
+// RPCService defines RPC service vlib.
+type RPCService interface {
+ AddNodeNext(ctx context.Context, in *AddNodeNext) (*AddNodeNextReply, error)
+ Cli(ctx context.Context, in *Cli) (*CliReply, error)
+ CliInband(ctx context.Context, in *CliInband) (*CliInbandReply, error)
+ GetF64EndianValue(ctx context.Context, in *GetF64EndianValue) (*GetF64EndianValueReply, error)
+ GetF64IncrementByOne(ctx context.Context, in *GetF64IncrementByOne) (*GetF64IncrementByOneReply, error)
+ GetNextIndex(ctx context.Context, in *GetNextIndex) (*GetNextIndexReply, error)
+ GetNodeGraph(ctx context.Context, in *GetNodeGraph) (*GetNodeGraphReply, error)
+ GetNodeIndex(ctx context.Context, in *GetNodeIndex) (*GetNodeIndexReply, error)
+ ShowThreads(ctx context.Context, in *ShowThreads) (*ShowThreadsReply, error)
+}
+
+type serviceClient struct {
+ conn api.Connection
+}
+
+func NewServiceClient(conn api.Connection) RPCService {
+ return &serviceClient{conn}
+}
+
+func (c *serviceClient) AddNodeNext(ctx context.Context, in *AddNodeNext) (*AddNodeNextReply, error) {
+ out := new(AddNodeNextReply)
+ err := c.conn.Invoke(ctx, in, out)
+ if err != nil {
+ return nil, err
+ }
+ return out, api.RetvalToVPPApiError(out.Retval)
+}
+
+func (c *serviceClient) Cli(ctx context.Context, in *Cli) (*CliReply, error) {
+ out := new(CliReply)
+ err := c.conn.Invoke(ctx, in, out)
+ if err != nil {
+ return nil, err
+ }
+ return out, api.RetvalToVPPApiError(out.Retval)
+}
+
+func (c *serviceClient) CliInband(ctx context.Context, in *CliInband) (*CliInbandReply, error) {
+ out := new(CliInbandReply)
+ err := c.conn.Invoke(ctx, in, out)
+ if err != nil {
+ return nil, err
+ }
+ return out, api.RetvalToVPPApiError(out.Retval)
+}
+
+func (c *serviceClient) GetF64EndianValue(ctx context.Context, in *GetF64EndianValue) (*GetF64EndianValueReply, error) {
+ out := new(GetF64EndianValueReply)
+ err := c.conn.Invoke(ctx, in, out)
+ if err != nil {
+ return nil, err
+ }
+ return out, api.RetvalToVPPApiError(int32(out.Retval))
+}
+
+func (c *serviceClient) GetF64IncrementByOne(ctx context.Context, in *GetF64IncrementByOne) (*GetF64IncrementByOneReply, error) {
+ out := new(GetF64IncrementByOneReply)
+ err := c.conn.Invoke(ctx, in, out)
+ if err != nil {
+ return nil, err
+ }
+ return out, api.RetvalToVPPApiError(int32(out.Retval))
+}
+
+func (c *serviceClient) GetNextIndex(ctx context.Context, in *GetNextIndex) (*GetNextIndexReply, error) {
+ out := new(GetNextIndexReply)
+ err := c.conn.Invoke(ctx, in, out)
+ if err != nil {
+ return nil, err
+ }
+ return out, api.RetvalToVPPApiError(out.Retval)
+}
+
+func (c *serviceClient) GetNodeGraph(ctx context.Context, in *GetNodeGraph) (*GetNodeGraphReply, error) {
+ out := new(GetNodeGraphReply)
+ err := c.conn.Invoke(ctx, in, out)
+ if err != nil {
+ return nil, err
+ }
+ return out, api.RetvalToVPPApiError(out.Retval)
+}
+
+func (c *serviceClient) GetNodeIndex(ctx context.Context, in *GetNodeIndex) (*GetNodeIndexReply, error) {
+ out := new(GetNodeIndexReply)
+ err := c.conn.Invoke(ctx, in, out)
+ if err != nil {
+ return nil, err
+ }
+ return out, api.RetvalToVPPApiError(out.Retval)
+}
+
+func (c *serviceClient) ShowThreads(ctx context.Context, in *ShowThreads) (*ShowThreadsReply, error) {
+ out := new(ShowThreadsReply)
+ err := c.conn.Invoke(ctx, in, out)
+ if err != nil {
+ return nil, err
+ }
+ return out, api.RetvalToVPPApiError(out.Retval)
+}
diff --git a/binapi/vmxnet3/vmxnet3.ba.go b/binapi/vmxnet3/vmxnet3.ba.go
index 7196f3f..a0f0683 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/vmxnet3.api.json
// Package vmxnet3 contains generated bindings for API file vmxnet3.api.
diff --git a/binapi/vmxnet3/vmxnet3_rpc.ba.go b/binapi/vmxnet3/vmxnet3_rpc.ba.go
index eabc00c..3e0f8a3 100644
--- a/binapi/vmxnet3/vmxnet3_rpc.ba.go
+++ b/binapi/vmxnet3/vmxnet3_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service vmxnet3.
@@ -36,7 +36,7 @@ func (c *serviceClient) SwVmxnet3InterfaceDump(ctx context.Context, in *SwVmxnet
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -59,7 +59,7 @@ func (c *serviceClient_SwVmxnet3InterfaceDumpClient) Recv() (*SwVmxnet3Interface
switch m := msg.(type) {
case *SwVmxnet3InterfaceDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -97,7 +97,7 @@ func (c *serviceClient) Vmxnet3Dump(ctx context.Context, in *Vmxnet3Dump) (RPCSe
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -120,7 +120,7 @@ func (c *serviceClient_Vmxnet3DumpClient) Recv() (*Vmxnet3Details, error) {
switch m := msg.(type) {
case *Vmxnet3Details:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/vpe/vpe.ba.go b/binapi/vpe/vpe.ba.go
index a270a48..5f64772 100644
--- a/binapi/vpe/vpe.ba.go
+++ b/binapi/vpe/vpe.ba.go
@@ -1,14 +1,13 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
// binapi-generator: v0.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/core/vpe.api.json
// Package vpe contains generated bindings for API file vpe.api.
//
// Contents:
-// 1 struct
-// 26 messages
+// 6 messages
//
package vpe
@@ -26,651 +25,10 @@ const _ = api.GoVppAPIPackageIsVersion2
const (
APIFile = "vpe"
- APIVersion = "1.6.1"
- VersionCrc = 0x40364e00
+ APIVersion = "1.7.0"
+ VersionCrc = 0xbbfa7484
)
-// ThreadData defines type 'thread_data'.
-type ThreadData struct {
- ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
- Name string `binapi:"string[64],name=name" json:"name,omitempty"`
- Type string `binapi:"string[64],name=type" json:"type,omitempty"`
- PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
- CPUID uint32 `binapi:"u32,name=cpu_id" json:"cpu_id,omitempty"`
- Core uint32 `binapi:"u32,name=core" json:"core,omitempty"`
- CPUSocket uint32 `binapi:"u32,name=cpu_socket" json:"cpu_socket,omitempty"`
-}
-
-// AddNodeNext defines message 'add_node_next'.
-type AddNodeNext struct {
- NodeName string `binapi:"string[64],name=node_name" json:"node_name,omitempty"`
- NextName string `binapi:"string[64],name=next_name" json:"next_name,omitempty"`
-}
-
-func (m *AddNodeNext) Reset() { *m = AddNodeNext{} }
-func (*AddNodeNext) GetMessageName() string { return "add_node_next" }
-func (*AddNodeNext) GetCrcString() string { return "2457116d" }
-func (*AddNodeNext) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *AddNodeNext) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 64 // m.NodeName
- size += 64 // m.NextName
- return size
-}
-func (m *AddNodeNext) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeString(m.NodeName, 64)
- buf.EncodeString(m.NextName, 64)
- return buf.Bytes(), nil
-}
-func (m *AddNodeNext) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.NodeName = buf.DecodeString(64)
- m.NextName = buf.DecodeString(64)
- return nil
-}
-
-// AddNodeNextReply defines message 'add_node_next_reply'.
-type AddNodeNextReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- NextIndex uint32 `binapi:"u32,name=next_index" json:"next_index,omitempty"`
-}
-
-func (m *AddNodeNextReply) Reset() { *m = AddNodeNextReply{} }
-func (*AddNodeNextReply) GetMessageName() string { return "add_node_next_reply" }
-func (*AddNodeNextReply) GetCrcString() string { return "2ed75f32" }
-func (*AddNodeNextReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *AddNodeNextReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.NextIndex
- return size
-}
-func (m *AddNodeNextReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.NextIndex)
- return buf.Bytes(), nil
-}
-func (m *AddNodeNextReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.NextIndex = buf.DecodeUint32()
- return nil
-}
-
-// Cli defines message 'cli'.
-type Cli struct {
- CmdInShmem uint64 `binapi:"u64,name=cmd_in_shmem" json:"cmd_in_shmem,omitempty"`
-}
-
-func (m *Cli) Reset() { *m = Cli{} }
-func (*Cli) GetMessageName() string { return "cli" }
-func (*Cli) GetCrcString() string { return "23bfbfff" }
-func (*Cli) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Cli) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 8 // m.CmdInShmem
- return size
-}
-func (m *Cli) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint64(m.CmdInShmem)
- return buf.Bytes(), nil
-}
-func (m *Cli) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.CmdInShmem = buf.DecodeUint64()
- return nil
-}
-
-// CliInband defines message 'cli_inband'.
-type CliInband struct {
- Cmd string `binapi:"string[],name=cmd" json:"cmd,omitempty"`
-}
-
-func (m *CliInband) Reset() { *m = CliInband{} }
-func (*CliInband) GetMessageName() string { return "cli_inband" }
-func (*CliInband) GetCrcString() string { return "f8377302" }
-func (*CliInband) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *CliInband) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 + len(m.Cmd) // m.Cmd
- return size
-}
-func (m *CliInband) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeString(m.Cmd, 0)
- return buf.Bytes(), nil
-}
-func (m *CliInband) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Cmd = buf.DecodeString(0)
- return nil
-}
-
-// CliInbandReply defines message 'cli_inband_reply'.
-type CliInbandReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- Reply string `binapi:"string[],name=reply" json:"reply,omitempty"`
-}
-
-func (m *CliInbandReply) Reset() { *m = CliInbandReply{} }
-func (*CliInbandReply) GetMessageName() string { return "cli_inband_reply" }
-func (*CliInbandReply) GetCrcString() string { return "05879051" }
-func (*CliInbandReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *CliInbandReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 + len(m.Reply) // m.Reply
- return size
-}
-func (m *CliInbandReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeString(m.Reply, 0)
- return buf.Bytes(), nil
-}
-func (m *CliInbandReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.Reply = buf.DecodeString(0)
- return nil
-}
-
-// CliReply defines message 'cli_reply'.
-type CliReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- ReplyInShmem uint64 `binapi:"u64,name=reply_in_shmem" json:"reply_in_shmem,omitempty"`
-}
-
-func (m *CliReply) Reset() { *m = CliReply{} }
-func (*CliReply) GetMessageName() string { return "cli_reply" }
-func (*CliReply) GetCrcString() string { return "06d68297" }
-func (*CliReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *CliReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 8 // m.ReplyInShmem
- return size
-}
-func (m *CliReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint64(m.ReplyInShmem)
- return buf.Bytes(), nil
-}
-func (m *CliReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.ReplyInShmem = buf.DecodeUint64()
- return nil
-}
-
-// ControlPing defines message 'control_ping'.
-type ControlPing struct{}
-
-func (m *ControlPing) Reset() { *m = ControlPing{} }
-func (*ControlPing) GetMessageName() string { return "control_ping" }
-func (*ControlPing) GetCrcString() string { return "51077d14" }
-func (*ControlPing) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ControlPing) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *ControlPing) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *ControlPing) Unmarshal(b []byte) error {
- return nil
-}
-
-// ControlPingReply defines message 'control_ping_reply'.
-type ControlPingReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- ClientIndex uint32 `binapi:"u32,name=client_index" json:"client_index,omitempty"`
- VpePID uint32 `binapi:"u32,name=vpe_pid" json:"vpe_pid,omitempty"`
-}
-
-func (m *ControlPingReply) Reset() { *m = ControlPingReply{} }
-func (*ControlPingReply) GetMessageName() string { return "control_ping_reply" }
-func (*ControlPingReply) GetCrcString() string { return "f6b0b8ca" }
-func (*ControlPingReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ControlPingReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.ClientIndex
- size += 4 // m.VpePID
- return size
-}
-func (m *ControlPingReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.ClientIndex)
- buf.EncodeUint32(m.VpePID)
- return buf.Bytes(), nil
-}
-func (m *ControlPingReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.ClientIndex = buf.DecodeUint32()
- m.VpePID = buf.DecodeUint32()
- return nil
-}
-
-// GetF64EndianValue defines message 'get_f64_endian_value'.
-type GetF64EndianValue struct {
- F64One float64 `binapi:"f64,name=f64_one,default=1" json:"f64_one,omitempty"`
-}
-
-func (m *GetF64EndianValue) Reset() { *m = GetF64EndianValue{} }
-func (*GetF64EndianValue) GetMessageName() string { return "get_f64_endian_value" }
-func (*GetF64EndianValue) GetCrcString() string { return "809fcd44" }
-func (*GetF64EndianValue) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GetF64EndianValue) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 8 // m.F64One
- return size
-}
-func (m *GetF64EndianValue) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeFloat64(m.F64One)
- return buf.Bytes(), nil
-}
-func (m *GetF64EndianValue) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.F64One = buf.DecodeFloat64()
- return nil
-}
-
-// GetF64EndianValueReply defines message 'get_f64_endian_value_reply'.
-type GetF64EndianValueReply struct {
- Retval uint32 `binapi:"u32,name=retval" json:"retval,omitempty"`
- F64OneResult float64 `binapi:"f64,name=f64_one_result" json:"f64_one_result,omitempty"`
-}
-
-func (m *GetF64EndianValueReply) Reset() { *m = GetF64EndianValueReply{} }
-func (*GetF64EndianValueReply) GetMessageName() string { return "get_f64_endian_value_reply" }
-func (*GetF64EndianValueReply) GetCrcString() string { return "7e02e404" }
-func (*GetF64EndianValueReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GetF64EndianValueReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 8 // m.F64OneResult
- return size
-}
-func (m *GetF64EndianValueReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Retval)
- buf.EncodeFloat64(m.F64OneResult)
- return buf.Bytes(), nil
-}
-func (m *GetF64EndianValueReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeUint32()
- m.F64OneResult = buf.DecodeFloat64()
- return nil
-}
-
-// GetF64IncrementByOne defines message 'get_f64_increment_by_one'.
-type GetF64IncrementByOne struct {
- F64Value float64 `binapi:"f64,name=f64_value,default=1" json:"f64_value,omitempty"`
-}
-
-func (m *GetF64IncrementByOne) Reset() { *m = GetF64IncrementByOne{} }
-func (*GetF64IncrementByOne) GetMessageName() string { return "get_f64_increment_by_one" }
-func (*GetF64IncrementByOne) GetCrcString() string { return "b64f027e" }
-func (*GetF64IncrementByOne) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GetF64IncrementByOne) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 8 // m.F64Value
- return size
-}
-func (m *GetF64IncrementByOne) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeFloat64(m.F64Value)
- return buf.Bytes(), nil
-}
-func (m *GetF64IncrementByOne) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.F64Value = buf.DecodeFloat64()
- return nil
-}
-
-// GetF64IncrementByOneReply defines message 'get_f64_increment_by_one_reply'.
-type GetF64IncrementByOneReply struct {
- Retval uint32 `binapi:"u32,name=retval" json:"retval,omitempty"`
- F64Value float64 `binapi:"f64,name=f64_value" json:"f64_value,omitempty"`
-}
-
-func (m *GetF64IncrementByOneReply) Reset() { *m = GetF64IncrementByOneReply{} }
-func (*GetF64IncrementByOneReply) GetMessageName() string { return "get_f64_increment_by_one_reply" }
-func (*GetF64IncrementByOneReply) GetCrcString() string { return "d25dbaa3" }
-func (*GetF64IncrementByOneReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GetF64IncrementByOneReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 8 // m.F64Value
- return size
-}
-func (m *GetF64IncrementByOneReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Retval)
- buf.EncodeFloat64(m.F64Value)
- return buf.Bytes(), nil
-}
-func (m *GetF64IncrementByOneReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeUint32()
- m.F64Value = buf.DecodeFloat64()
- return nil
-}
-
-// GetNextIndex defines message 'get_next_index'.
-type GetNextIndex struct {
- NodeName string `binapi:"string[64],name=node_name" json:"node_name,omitempty"`
- NextName string `binapi:"string[64],name=next_name" json:"next_name,omitempty"`
-}
-
-func (m *GetNextIndex) Reset() { *m = GetNextIndex{} }
-func (*GetNextIndex) GetMessageName() string { return "get_next_index" }
-func (*GetNextIndex) GetCrcString() string { return "2457116d" }
-func (*GetNextIndex) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GetNextIndex) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 64 // m.NodeName
- size += 64 // m.NextName
- return size
-}
-func (m *GetNextIndex) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeString(m.NodeName, 64)
- buf.EncodeString(m.NextName, 64)
- return buf.Bytes(), nil
-}
-func (m *GetNextIndex) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.NodeName = buf.DecodeString(64)
- m.NextName = buf.DecodeString(64)
- return nil
-}
-
-// GetNextIndexReply defines message 'get_next_index_reply'.
-type GetNextIndexReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- NextIndex uint32 `binapi:"u32,name=next_index" json:"next_index,omitempty"`
-}
-
-func (m *GetNextIndexReply) Reset() { *m = GetNextIndexReply{} }
-func (*GetNextIndexReply) GetMessageName() string { return "get_next_index_reply" }
-func (*GetNextIndexReply) GetCrcString() string { return "2ed75f32" }
-func (*GetNextIndexReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GetNextIndexReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.NextIndex
- return size
-}
-func (m *GetNextIndexReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.NextIndex)
- return buf.Bytes(), nil
-}
-func (m *GetNextIndexReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.NextIndex = buf.DecodeUint32()
- return nil
-}
-
-// GetNodeGraph defines message 'get_node_graph'.
-type GetNodeGraph struct{}
-
-func (m *GetNodeGraph) Reset() { *m = GetNodeGraph{} }
-func (*GetNodeGraph) GetMessageName() string { return "get_node_graph" }
-func (*GetNodeGraph) GetCrcString() string { return "51077d14" }
-func (*GetNodeGraph) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GetNodeGraph) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *GetNodeGraph) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *GetNodeGraph) Unmarshal(b []byte) error {
- return nil
-}
-
-// GetNodeGraphReply defines message 'get_node_graph_reply'.
-type GetNodeGraphReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- ReplyInShmem uint64 `binapi:"u64,name=reply_in_shmem" json:"reply_in_shmem,omitempty"`
-}
-
-func (m *GetNodeGraphReply) Reset() { *m = GetNodeGraphReply{} }
-func (*GetNodeGraphReply) GetMessageName() string { return "get_node_graph_reply" }
-func (*GetNodeGraphReply) GetCrcString() string { return "06d68297" }
-func (*GetNodeGraphReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GetNodeGraphReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 8 // m.ReplyInShmem
- return size
-}
-func (m *GetNodeGraphReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint64(m.ReplyInShmem)
- return buf.Bytes(), nil
-}
-func (m *GetNodeGraphReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.ReplyInShmem = buf.DecodeUint64()
- return nil
-}
-
-// GetNodeIndex defines message 'get_node_index'.
-type GetNodeIndex struct {
- NodeName string `binapi:"string[64],name=node_name" json:"node_name,omitempty"`
-}
-
-func (m *GetNodeIndex) Reset() { *m = GetNodeIndex{} }
-func (*GetNodeIndex) GetMessageName() string { return "get_node_index" }
-func (*GetNodeIndex) GetCrcString() string { return "f1984c64" }
-func (*GetNodeIndex) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GetNodeIndex) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 64 // m.NodeName
- return size
-}
-func (m *GetNodeIndex) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeString(m.NodeName, 64)
- return buf.Bytes(), nil
-}
-func (m *GetNodeIndex) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.NodeName = buf.DecodeString(64)
- return nil
-}
-
-// GetNodeIndexReply defines message 'get_node_index_reply'.
-type GetNodeIndexReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- NodeIndex uint32 `binapi:"u32,name=node_index" json:"node_index,omitempty"`
-}
-
-func (m *GetNodeIndexReply) Reset() { *m = GetNodeIndexReply{} }
-func (*GetNodeIndexReply) GetMessageName() string { return "get_node_index_reply" }
-func (*GetNodeIndexReply) GetCrcString() string { return "a8600b89" }
-func (*GetNodeIndexReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GetNodeIndexReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.NodeIndex
- return size
-}
-func (m *GetNodeIndexReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.NodeIndex)
- return buf.Bytes(), nil
-}
-func (m *GetNodeIndexReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.NodeIndex = buf.DecodeUint32()
- return nil
-}
-
// LogDetails defines message 'log_details'.
type LogDetails struct {
Timestamp vpe_types.Timestamp `binapi:"timestamp,name=timestamp" json:"timestamp,omitempty"`
@@ -749,108 +107,6 @@ func (m *LogDump) Unmarshal(b []byte) error {
return nil
}
-// ShowThreads defines message 'show_threads'.
-type ShowThreads struct{}
-
-func (m *ShowThreads) Reset() { *m = ShowThreads{} }
-func (*ShowThreads) GetMessageName() string { return "show_threads" }
-func (*ShowThreads) GetCrcString() string { return "51077d14" }
-func (*ShowThreads) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ShowThreads) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *ShowThreads) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *ShowThreads) Unmarshal(b []byte) error {
- return nil
-}
-
-// ShowThreadsReply defines message 'show_threads_reply'.
-type ShowThreadsReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- Count uint32 `binapi:"u32,name=count" json:"-"`
- ThreadData []ThreadData `binapi:"thread_data[count],name=thread_data" json:"thread_data,omitempty"`
-}
-
-func (m *ShowThreadsReply) Reset() { *m = ShowThreadsReply{} }
-func (*ShowThreadsReply) GetMessageName() string { return "show_threads_reply" }
-func (*ShowThreadsReply) GetCrcString() string { return "efd78e83" }
-func (*ShowThreadsReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ShowThreadsReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.Count
- for j1 := 0; j1 < len(m.ThreadData); j1++ {
- var s1 ThreadData
- _ = s1
- if j1 < len(m.ThreadData) {
- s1 = m.ThreadData[j1]
- }
- size += 4 // s1.ID
- size += 64 // s1.Name
- size += 64 // s1.Type
- size += 4 // s1.PID
- size += 4 // s1.CPUID
- size += 4 // s1.Core
- size += 4 // s1.CPUSocket
- }
- return size
-}
-func (m *ShowThreadsReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(uint32(len(m.ThreadData)))
- for j0 := 0; j0 < len(m.ThreadData); j0++ {
- var v0 ThreadData // ThreadData
- if j0 < len(m.ThreadData) {
- v0 = m.ThreadData[j0]
- }
- buf.EncodeUint32(v0.ID)
- buf.EncodeString(v0.Name, 64)
- buf.EncodeString(v0.Type, 64)
- buf.EncodeUint32(v0.PID)
- buf.EncodeUint32(v0.CPUID)
- buf.EncodeUint32(v0.Core)
- buf.EncodeUint32(v0.CPUSocket)
- }
- return buf.Bytes(), nil
-}
-func (m *ShowThreadsReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.Count = buf.DecodeUint32()
- m.ThreadData = make([]ThreadData, m.Count)
- for j0 := 0; j0 < len(m.ThreadData); j0++ {
- m.ThreadData[j0].ID = buf.DecodeUint32()
- m.ThreadData[j0].Name = buf.DecodeString(64)
- m.ThreadData[j0].Type = buf.DecodeString(64)
- m.ThreadData[j0].PID = buf.DecodeUint32()
- m.ThreadData[j0].CPUID = buf.DecodeUint32()
- m.ThreadData[j0].Core = buf.DecodeUint32()
- m.ThreadData[j0].CPUSocket = buf.DecodeUint32()
- }
- return nil
-}
-
// ShowVersion defines message 'show_version'.
type ShowVersion struct{}
@@ -993,28 +249,8 @@ func (m *ShowVpeSystemTimeReply) Unmarshal(b []byte) error {
func init() { file_vpe_binapi_init() }
func file_vpe_binapi_init() {
- api.RegisterMessage((*AddNodeNext)(nil), "add_node_next_2457116d")
- api.RegisterMessage((*AddNodeNextReply)(nil), "add_node_next_reply_2ed75f32")
- api.RegisterMessage((*Cli)(nil), "cli_23bfbfff")
- api.RegisterMessage((*CliInband)(nil), "cli_inband_f8377302")
- api.RegisterMessage((*CliInbandReply)(nil), "cli_inband_reply_05879051")
- api.RegisterMessage((*CliReply)(nil), "cli_reply_06d68297")
- api.RegisterMessage((*ControlPing)(nil), "control_ping_51077d14")
- api.RegisterMessage((*ControlPingReply)(nil), "control_ping_reply_f6b0b8ca")
- api.RegisterMessage((*GetF64EndianValue)(nil), "get_f64_endian_value_809fcd44")
- api.RegisterMessage((*GetF64EndianValueReply)(nil), "get_f64_endian_value_reply_7e02e404")
- api.RegisterMessage((*GetF64IncrementByOne)(nil), "get_f64_increment_by_one_b64f027e")
- api.RegisterMessage((*GetF64IncrementByOneReply)(nil), "get_f64_increment_by_one_reply_d25dbaa3")
- api.RegisterMessage((*GetNextIndex)(nil), "get_next_index_2457116d")
- api.RegisterMessage((*GetNextIndexReply)(nil), "get_next_index_reply_2ed75f32")
- api.RegisterMessage((*GetNodeGraph)(nil), "get_node_graph_51077d14")
- api.RegisterMessage((*GetNodeGraphReply)(nil), "get_node_graph_reply_06d68297")
- api.RegisterMessage((*GetNodeIndex)(nil), "get_node_index_f1984c64")
- api.RegisterMessage((*GetNodeIndexReply)(nil), "get_node_index_reply_a8600b89")
api.RegisterMessage((*LogDetails)(nil), "log_details_03d61cc0")
api.RegisterMessage((*LogDump)(nil), "log_dump_6ab31753")
- api.RegisterMessage((*ShowThreads)(nil), "show_threads_51077d14")
- api.RegisterMessage((*ShowThreadsReply)(nil), "show_threads_reply_efd78e83")
api.RegisterMessage((*ShowVersion)(nil), "show_version_51077d14")
api.RegisterMessage((*ShowVersionReply)(nil), "show_version_reply_c919bde1")
api.RegisterMessage((*ShowVpeSystemTime)(nil), "show_vpe_system_time_51077d14")
@@ -1024,28 +260,8 @@ func file_vpe_binapi_init() {
// Messages returns list of all messages in this module.
func AllMessages() []api.Message {
return []api.Message{
- (*AddNodeNext)(nil),
- (*AddNodeNextReply)(nil),
- (*Cli)(nil),
- (*CliInband)(nil),
- (*CliInbandReply)(nil),
- (*CliReply)(nil),
- (*ControlPing)(nil),
- (*ControlPingReply)(nil),
- (*GetF64EndianValue)(nil),
- (*GetF64EndianValueReply)(nil),
- (*GetF64IncrementByOne)(nil),
- (*GetF64IncrementByOneReply)(nil),
- (*GetNextIndex)(nil),
- (*GetNextIndexReply)(nil),
- (*GetNodeGraph)(nil),
- (*GetNodeGraphReply)(nil),
- (*GetNodeIndex)(nil),
- (*GetNodeIndexReply)(nil),
(*LogDetails)(nil),
(*LogDump)(nil),
- (*ShowThreads)(nil),
- (*ShowThreadsReply)(nil),
(*ShowVersion)(nil),
(*ShowVersionReply)(nil),
(*ShowVpeSystemTime)(nil),
diff --git a/binapi/vpe/vpe_http.ba.go b/binapi/vpe/vpe_http.ba.go
index 8998c9e..cf66380 100644
--- a/binapi/vpe/vpe_http.ba.go
+++ b/binapi/vpe/vpe_http.ba.go
@@ -4,215 +4,11 @@ package vpe
import (
"encoding/json"
- "io/ioutil"
"net/http"
)
func HTTPHandler(rpc RPCService) http.Handler {
mux := http.NewServeMux()
- mux.HandleFunc("/add_node_next", func(w http.ResponseWriter, req *http.Request) {
- var request = new(AddNodeNext)
- b, err := ioutil.ReadAll(req.Body)
- if err != nil {
- http.Error(w, "read body failed", http.StatusBadRequest)
- return
- }
- if err := json.Unmarshal(b, request); err != nil {
- http.Error(w, "unmarshal data failed", http.StatusBadRequest)
- return
- }
- reply, err := rpc.AddNodeNext(req.Context(), request)
- if err != nil {
- http.Error(w, "request failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- rep, err := json.MarshalIndent(reply, "", " ")
- if err != nil {
- http.Error(w, "marshal failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- w.Write(rep)
- })
- mux.HandleFunc("/cli", func(w http.ResponseWriter, req *http.Request) {
- var request = new(Cli)
- b, err := ioutil.ReadAll(req.Body)
- if err != nil {
- http.Error(w, "read body failed", http.StatusBadRequest)
- return
- }
- if err := json.Unmarshal(b, request); err != nil {
- http.Error(w, "unmarshal data failed", http.StatusBadRequest)
- return
- }
- reply, err := rpc.Cli(req.Context(), request)
- if err != nil {
- http.Error(w, "request failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- rep, err := json.MarshalIndent(reply, "", " ")
- if err != nil {
- http.Error(w, "marshal failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- w.Write(rep)
- })
- mux.HandleFunc("/cli_inband", func(w http.ResponseWriter, req *http.Request) {
- var request = new(CliInband)
- b, err := ioutil.ReadAll(req.Body)
- if err != nil {
- http.Error(w, "read body failed", http.StatusBadRequest)
- return
- }
- if err := json.Unmarshal(b, request); err != nil {
- http.Error(w, "unmarshal data failed", http.StatusBadRequest)
- return
- }
- reply, err := rpc.CliInband(req.Context(), request)
- if err != nil {
- http.Error(w, "request failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- rep, err := json.MarshalIndent(reply, "", " ")
- if err != nil {
- http.Error(w, "marshal failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- w.Write(rep)
- })
- mux.HandleFunc("/control_ping", func(w http.ResponseWriter, req *http.Request) {
- var request = new(ControlPing)
- reply, err := rpc.ControlPing(req.Context(), request)
- if err != nil {
- http.Error(w, "request failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- rep, err := json.MarshalIndent(reply, "", " ")
- if err != nil {
- http.Error(w, "marshal failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- w.Write(rep)
- })
- mux.HandleFunc("/get_f64_endian_value", func(w http.ResponseWriter, req *http.Request) {
- var request = new(GetF64EndianValue)
- b, err := ioutil.ReadAll(req.Body)
- if err != nil {
- http.Error(w, "read body failed", http.StatusBadRequest)
- return
- }
- if err := json.Unmarshal(b, request); err != nil {
- http.Error(w, "unmarshal data failed", http.StatusBadRequest)
- return
- }
- reply, err := rpc.GetF64EndianValue(req.Context(), request)
- if err != nil {
- http.Error(w, "request failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- rep, err := json.MarshalIndent(reply, "", " ")
- if err != nil {
- http.Error(w, "marshal failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- w.Write(rep)
- })
- mux.HandleFunc("/get_f64_increment_by_one", func(w http.ResponseWriter, req *http.Request) {
- var request = new(GetF64IncrementByOne)
- b, err := ioutil.ReadAll(req.Body)
- if err != nil {
- http.Error(w, "read body failed", http.StatusBadRequest)
- return
- }
- if err := json.Unmarshal(b, request); err != nil {
- http.Error(w, "unmarshal data failed", http.StatusBadRequest)
- return
- }
- reply, err := rpc.GetF64IncrementByOne(req.Context(), request)
- if err != nil {
- http.Error(w, "request failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- rep, err := json.MarshalIndent(reply, "", " ")
- if err != nil {
- http.Error(w, "marshal failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- w.Write(rep)
- })
- mux.HandleFunc("/get_next_index", func(w http.ResponseWriter, req *http.Request) {
- var request = new(GetNextIndex)
- b, err := ioutil.ReadAll(req.Body)
- if err != nil {
- http.Error(w, "read body failed", http.StatusBadRequest)
- return
- }
- if err := json.Unmarshal(b, request); err != nil {
- http.Error(w, "unmarshal data failed", http.StatusBadRequest)
- return
- }
- reply, err := rpc.GetNextIndex(req.Context(), request)
- if err != nil {
- http.Error(w, "request failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- rep, err := json.MarshalIndent(reply, "", " ")
- if err != nil {
- http.Error(w, "marshal failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- w.Write(rep)
- })
- mux.HandleFunc("/get_node_graph", func(w http.ResponseWriter, req *http.Request) {
- var request = new(GetNodeGraph)
- reply, err := rpc.GetNodeGraph(req.Context(), request)
- if err != nil {
- http.Error(w, "request failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- rep, err := json.MarshalIndent(reply, "", " ")
- if err != nil {
- http.Error(w, "marshal failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- w.Write(rep)
- })
- mux.HandleFunc("/get_node_index", func(w http.ResponseWriter, req *http.Request) {
- var request = new(GetNodeIndex)
- b, err := ioutil.ReadAll(req.Body)
- if err != nil {
- http.Error(w, "read body failed", http.StatusBadRequest)
- return
- }
- if err := json.Unmarshal(b, request); err != nil {
- http.Error(w, "unmarshal data failed", http.StatusBadRequest)
- return
- }
- reply, err := rpc.GetNodeIndex(req.Context(), request)
- if err != nil {
- http.Error(w, "request failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- rep, err := json.MarshalIndent(reply, "", " ")
- if err != nil {
- http.Error(w, "marshal failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- w.Write(rep)
- })
- mux.HandleFunc("/show_threads", func(w http.ResponseWriter, req *http.Request) {
- var request = new(ShowThreads)
- reply, err := rpc.ShowThreads(req.Context(), request)
- if err != nil {
- http.Error(w, "request failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- rep, err := json.MarshalIndent(reply, "", " ")
- if err != nil {
- http.Error(w, "marshal failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- w.Write(rep)
- })
mux.HandleFunc("/show_version", func(w http.ResponseWriter, req *http.Request) {
var request = new(ShowVersion)
reply, err := rpc.ShowVersion(req.Context(), request)
diff --git a/binapi/vpe/vpe_rpc.ba.go b/binapi/vpe/vpe_rpc.ba.go
index 557a397..76894f0 100644
--- a/binapi/vpe/vpe_rpc.ba.go
+++ b/binapi/vpe/vpe_rpc.ba.go
@@ -8,21 +8,12 @@ import (
"io"
api "git.fd.io/govpp.git/api"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service vpe.
type RPCService interface {
- AddNodeNext(ctx context.Context, in *AddNodeNext) (*AddNodeNextReply, error)
- Cli(ctx context.Context, in *Cli) (*CliReply, error)
- CliInband(ctx context.Context, in *CliInband) (*CliInbandReply, error)
- ControlPing(ctx context.Context, in *ControlPing) (*ControlPingReply, error)
- GetF64EndianValue(ctx context.Context, in *GetF64EndianValue) (*GetF64EndianValueReply, error)
- GetF64IncrementByOne(ctx context.Context, in *GetF64IncrementByOne) (*GetF64IncrementByOneReply, error)
- GetNextIndex(ctx context.Context, in *GetNextIndex) (*GetNextIndexReply, error)
- GetNodeGraph(ctx context.Context, in *GetNodeGraph) (*GetNodeGraphReply, error)
- GetNodeIndex(ctx context.Context, in *GetNodeIndex) (*GetNodeIndexReply, error)
LogDump(ctx context.Context, in *LogDump) (RPCService_LogDumpClient, error)
- ShowThreads(ctx context.Context, in *ShowThreads) (*ShowThreadsReply, error)
ShowVersion(ctx context.Context, in *ShowVersion) (*ShowVersionReply, error)
ShowVpeSystemTime(ctx context.Context, in *ShowVpeSystemTime) (*ShowVpeSystemTimeReply, error)
}
@@ -35,87 +26,6 @@ func NewServiceClient(conn api.Connection) RPCService {
return &serviceClient{conn}
}
-func (c *serviceClient) AddNodeNext(ctx context.Context, in *AddNodeNext) (*AddNodeNextReply, error) {
- out := new(AddNodeNextReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) Cli(ctx context.Context, in *Cli) (*CliReply, error) {
- out := new(CliReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) CliInband(ctx context.Context, in *CliInband) (*CliInbandReply, error) {
- out := new(CliInbandReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) ControlPing(ctx context.Context, in *ControlPing) (*ControlPingReply, error) {
- out := new(ControlPingReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GetF64EndianValue(ctx context.Context, in *GetF64EndianValue) (*GetF64EndianValueReply, error) {
- out := new(GetF64EndianValueReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(int32(out.Retval))
-}
-
-func (c *serviceClient) GetF64IncrementByOne(ctx context.Context, in *GetF64IncrementByOne) (*GetF64IncrementByOneReply, error) {
- out := new(GetF64IncrementByOneReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(int32(out.Retval))
-}
-
-func (c *serviceClient) GetNextIndex(ctx context.Context, in *GetNextIndex) (*GetNextIndexReply, error) {
- out := new(GetNextIndexReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GetNodeGraph(ctx context.Context, in *GetNodeGraph) (*GetNodeGraphReply, error) {
- out := new(GetNodeGraphReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GetNodeIndex(ctx context.Context, in *GetNodeIndex) (*GetNodeIndexReply, error) {
- out := new(GetNodeIndexReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
func (c *serviceClient) LogDump(ctx context.Context, in *LogDump) (RPCService_LogDumpClient, error) {
stream, err := c.conn.NewStream(ctx)
if err != nil {
@@ -125,7 +35,7 @@ func (c *serviceClient) LogDump(ctx context.Context, in *LogDump) (RPCService_Lo
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -148,7 +58,7 @@ func (c *serviceClient_LogDumpClient) Recv() (*LogDetails, error) {
switch m := msg.(type) {
case *LogDetails:
return m, nil
- case *ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -159,15 +69,6 @@ func (c *serviceClient_LogDumpClient) Recv() (*LogDetails, error) {
}
}
-func (c *serviceClient) ShowThreads(ctx context.Context, in *ShowThreads) (*ShowThreadsReply, error) {
- out := new(ShowThreadsReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
func (c *serviceClient) ShowVersion(ctx context.Context, in *ShowVersion) (*ShowVersionReply, error) {
out := new(ShowVersionReply)
err := c.conn.Invoke(ctx, in, out)
diff --git a/binapi/vpe_types/vpe_types.ba.go b/binapi/vpe_types/vpe_types.ba.go
index 5560b99..f1022cc 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 ab80960..99ae4ab 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/vrrp.api.json
// Package vrrp contains generated bindings for API file vrrp.api.
diff --git a/binapi/vrrp/vrrp_rpc.ba.go b/binapi/vrrp/vrrp_rpc.ba.go
index 023854a..f3153b5 100644
--- a/binapi/vrrp/vrrp_rpc.ba.go
+++ b/binapi/vrrp/vrrp_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service vrrp.
@@ -49,7 +49,7 @@ func (c *serviceClient) VrrpVrDump(ctx context.Context, in *VrrpVrDump) (RPCServ
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -72,7 +72,7 @@ func (c *serviceClient_VrrpVrDumpClient) Recv() (*VrrpVrDetails, error) {
switch m := msg.(type) {
case *VrrpVrDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -92,7 +92,7 @@ func (c *serviceClient) VrrpVrPeerDump(ctx context.Context, in *VrrpVrPeerDump)
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -115,7 +115,7 @@ func (c *serviceClient_VrrpVrPeerDumpClient) Recv() (*VrrpVrPeerDetails, error)
switch m := msg.(type) {
case *VrrpVrPeerDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -162,7 +162,7 @@ func (c *serviceClient) VrrpVrTrackIfDump(ctx context.Context, in *VrrpVrTrackIf
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -185,7 +185,7 @@ func (c *serviceClient_VrrpVrTrackIfDumpClient) Recv() (*VrrpVrTrackIfDetails, e
switch m := msg.(type) {
case *VrrpVrTrackIfDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/vxlan/vxlan.ba.go b/binapi/vxlan/vxlan.ba.go
index b1e90cf..bfef7ad 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/core/vxlan.api.json
// Package vxlan contains generated bindings for API file vxlan.api.
diff --git a/binapi/vxlan/vxlan_rpc.ba.go b/binapi/vxlan/vxlan_rpc.ba.go
index 8aa61f9..3765a87 100644
--- a/binapi/vxlan/vxlan_rpc.ba.go
+++ b/binapi/vxlan/vxlan_rpc.ba.go
@@ -8,7 +8,7 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service vxlan.
@@ -84,7 +84,7 @@ func (c *serviceClient) VxlanTunnelDump(ctx context.Context, in *VxlanTunnelDump
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -107,7 +107,7 @@ func (c *serviceClient_VxlanTunnelDumpClient) Recv() (*VxlanTunnelDetails, error
switch m := msg.(type) {
case *VxlanTunnelDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -127,7 +127,7 @@ func (c *serviceClient) VxlanTunnelV2Dump(ctx context.Context, in *VxlanTunnelV2
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -150,7 +150,7 @@ func (c *serviceClient_VxlanTunnelV2DumpClient) Recv() (*VxlanTunnelV2Details, e
switch m := msg.(type) {
case *VxlanTunnelV2Details:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/binapi/vxlan_gbp/vxlan_gbp.ba.go b/binapi/vxlan_gbp/vxlan_gbp.ba.go
deleted file mode 100644
index a1f14b4..0000000
--- a/binapi/vxlan_gbp/vxlan_gbp.ba.go
+++ /dev/null
@@ -1,374 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 21.06-release
-// source: /usr/share/vpp/api/core/vxlan_gbp.api.json
-
-// Package vxlan_gbp contains generated bindings for API file vxlan_gbp.api.
-//
-// Contents:
-// 1 enum
-// 1 struct
-// 6 messages
-//
-package vxlan_gbp
-
-import (
- "strconv"
-
- api "git.fd.io/govpp.git/api"
- interface_types "git.fd.io/govpp.git/binapi/interface_types"
- ip_types "git.fd.io/govpp.git/binapi/ip_types"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the GoVPP api package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// GoVPP api package needs to be updated.
-const _ = api.GoVppAPIPackageIsVersion2
-
-const (
- APIFile = "vxlan_gbp"
- APIVersion = "1.1.1"
- VersionCrc = 0xb40203a1
-)
-
-// VxlanGbpAPITunnelMode defines enum 'vxlan_gbp_api_tunnel_mode'.
-type VxlanGbpAPITunnelMode uint32
-
-const (
- VXLAN_GBP_API_TUNNEL_MODE_L2 VxlanGbpAPITunnelMode = 1
- VXLAN_GBP_API_TUNNEL_MODE_L3 VxlanGbpAPITunnelMode = 2
-)
-
-var (
- VxlanGbpAPITunnelMode_name = map[uint32]string{
- 1: "VXLAN_GBP_API_TUNNEL_MODE_L2",
- 2: "VXLAN_GBP_API_TUNNEL_MODE_L3",
- }
- VxlanGbpAPITunnelMode_value = map[string]uint32{
- "VXLAN_GBP_API_TUNNEL_MODE_L2": 1,
- "VXLAN_GBP_API_TUNNEL_MODE_L3": 2,
- }
-)
-
-func (x VxlanGbpAPITunnelMode) String() string {
- s, ok := VxlanGbpAPITunnelMode_name[uint32(x)]
- if ok {
- return s
- }
- return "VxlanGbpAPITunnelMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// VxlanGbpTunnel defines type 'vxlan_gbp_tunnel'.
-type VxlanGbpTunnel struct {
- Instance uint32 `binapi:"u32,name=instance" json:"instance,omitempty"`
- Src ip_types.Address `binapi:"address,name=src" json:"src,omitempty"`
- Dst ip_types.Address `binapi:"address,name=dst" json:"dst,omitempty"`
- McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
- EncapTableID uint32 `binapi:"u32,name=encap_table_id" json:"encap_table_id,omitempty"`
- Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
- SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Mode VxlanGbpAPITunnelMode `binapi:"vxlan_gbp_api_tunnel_mode,name=mode" json:"mode,omitempty"`
-}
-
-// SwInterfaceSetVxlanGbpBypass defines message 'sw_interface_set_vxlan_gbp_bypass'.
-// InProgress: the message form may change in the future versions
-type SwInterfaceSetVxlanGbpBypass struct {
- SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
- Enable bool `binapi:"bool,name=enable,default=true" json:"enable,omitempty"`
-}
-
-func (m *SwInterfaceSetVxlanGbpBypass) Reset() { *m = SwInterfaceSetVxlanGbpBypass{} }
-func (*SwInterfaceSetVxlanGbpBypass) GetMessageName() string {
- return "sw_interface_set_vxlan_gbp_bypass"
-}
-func (*SwInterfaceSetVxlanGbpBypass) GetCrcString() string { return "65247409" }
-func (*SwInterfaceSetVxlanGbpBypass) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceSetVxlanGbpBypass) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.IsIPv6
- size += 1 // m.Enable
- return size
-}
-func (m *SwInterfaceSetVxlanGbpBypass) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeBool(m.IsIPv6)
- buf.EncodeBool(m.Enable)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceSetVxlanGbpBypass) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
- m.IsIPv6 = buf.DecodeBool()
- m.Enable = buf.DecodeBool()
- return nil
-}
-
-// SwInterfaceSetVxlanGbpBypassReply defines message 'sw_interface_set_vxlan_gbp_bypass_reply'.
-// InProgress: the message form may change in the future versions
-type SwInterfaceSetVxlanGbpBypassReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SwInterfaceSetVxlanGbpBypassReply) Reset() { *m = SwInterfaceSetVxlanGbpBypassReply{} }
-func (*SwInterfaceSetVxlanGbpBypassReply) GetMessageName() string {
- return "sw_interface_set_vxlan_gbp_bypass_reply"
-}
-func (*SwInterfaceSetVxlanGbpBypassReply) GetCrcString() string { return "e8d4e804" }
-func (*SwInterfaceSetVxlanGbpBypassReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SwInterfaceSetVxlanGbpBypassReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SwInterfaceSetVxlanGbpBypassReply) 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 *SwInterfaceSetVxlanGbpBypassReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// VxlanGbpTunnelAddDel defines message 'vxlan_gbp_tunnel_add_del'.
-// InProgress: the message form may change in the future versions
-type VxlanGbpTunnelAddDel struct {
- IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
- Tunnel VxlanGbpTunnel `binapi:"vxlan_gbp_tunnel,name=tunnel" json:"tunnel,omitempty"`
-}
-
-func (m *VxlanGbpTunnelAddDel) Reset() { *m = VxlanGbpTunnelAddDel{} }
-func (*VxlanGbpTunnelAddDel) GetMessageName() string { return "vxlan_gbp_tunnel_add_del" }
-func (*VxlanGbpTunnelAddDel) GetCrcString() string { return "6c743427" }
-func (*VxlanGbpTunnelAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *VxlanGbpTunnelAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 4 // m.Tunnel.Instance
- size += 1 // m.Tunnel.Src.Af
- size += 1 * 16 // m.Tunnel.Src.Un
- size += 1 // m.Tunnel.Dst.Af
- size += 1 * 16 // m.Tunnel.Dst.Un
- size += 4 // m.Tunnel.McastSwIfIndex
- size += 4 // m.Tunnel.EncapTableID
- size += 4 // m.Tunnel.Vni
- size += 4 // m.Tunnel.SwIfIndex
- size += 4 // m.Tunnel.Mode
- return size
-}
-func (m *VxlanGbpTunnelAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeUint32(m.Tunnel.Instance)
- buf.EncodeUint8(uint8(m.Tunnel.Src.Af))
- buf.EncodeBytes(m.Tunnel.Src.Un.XXX_UnionData[:], 16)
- buf.EncodeUint8(uint8(m.Tunnel.Dst.Af))
- buf.EncodeBytes(m.Tunnel.Dst.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.Tunnel.McastSwIfIndex))
- buf.EncodeUint32(m.Tunnel.EncapTableID)
- buf.EncodeUint32(m.Tunnel.Vni)
- buf.EncodeUint32(uint32(m.Tunnel.SwIfIndex))
- buf.EncodeUint32(uint32(m.Tunnel.Mode))
- return buf.Bytes(), nil
-}
-func (m *VxlanGbpTunnelAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.Tunnel.Instance = buf.DecodeUint32()
- m.Tunnel.Src.Af = ip_types.AddressFamily(buf.DecodeUint8())
- copy(m.Tunnel.Src.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Tunnel.Dst.Af = ip_types.AddressFamily(buf.DecodeUint8())
- copy(m.Tunnel.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Tunnel.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
- m.Tunnel.EncapTableID = buf.DecodeUint32()
- m.Tunnel.Vni = buf.DecodeUint32()
- m.Tunnel.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
- m.Tunnel.Mode = VxlanGbpAPITunnelMode(buf.DecodeUint32())
- return nil
-}
-
-// VxlanGbpTunnelAddDelReply defines message 'vxlan_gbp_tunnel_add_del_reply'.
-// InProgress: the message form may change in the future versions
-type VxlanGbpTunnelAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *VxlanGbpTunnelAddDelReply) Reset() { *m = VxlanGbpTunnelAddDelReply{} }
-func (*VxlanGbpTunnelAddDelReply) GetMessageName() string { return "vxlan_gbp_tunnel_add_del_reply" }
-func (*VxlanGbpTunnelAddDelReply) GetCrcString() string { return "5383d31f" }
-func (*VxlanGbpTunnelAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *VxlanGbpTunnelAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *VxlanGbpTunnelAddDelReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- return buf.Bytes(), nil
-}
-func (m *VxlanGbpTunnelAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// VxlanGbpTunnelDetails defines message 'vxlan_gbp_tunnel_details'.
-// InProgress: the message form may change in the future versions
-type VxlanGbpTunnelDetails struct {
- Tunnel VxlanGbpTunnel `binapi:"vxlan_gbp_tunnel,name=tunnel" json:"tunnel,omitempty"`
-}
-
-func (m *VxlanGbpTunnelDetails) Reset() { *m = VxlanGbpTunnelDetails{} }
-func (*VxlanGbpTunnelDetails) GetMessageName() string { return "vxlan_gbp_tunnel_details" }
-func (*VxlanGbpTunnelDetails) GetCrcString() string { return "66e94a89" }
-func (*VxlanGbpTunnelDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *VxlanGbpTunnelDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Tunnel.Instance
- size += 1 // m.Tunnel.Src.Af
- size += 1 * 16 // m.Tunnel.Src.Un
- size += 1 // m.Tunnel.Dst.Af
- size += 1 * 16 // m.Tunnel.Dst.Un
- size += 4 // m.Tunnel.McastSwIfIndex
- size += 4 // m.Tunnel.EncapTableID
- size += 4 // m.Tunnel.Vni
- size += 4 // m.Tunnel.SwIfIndex
- size += 4 // m.Tunnel.Mode
- return size
-}
-func (m *VxlanGbpTunnelDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Tunnel.Instance)
- buf.EncodeUint8(uint8(m.Tunnel.Src.Af))
- buf.EncodeBytes(m.Tunnel.Src.Un.XXX_UnionData[:], 16)
- buf.EncodeUint8(uint8(m.Tunnel.Dst.Af))
- buf.EncodeBytes(m.Tunnel.Dst.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.Tunnel.McastSwIfIndex))
- buf.EncodeUint32(m.Tunnel.EncapTableID)
- buf.EncodeUint32(m.Tunnel.Vni)
- buf.EncodeUint32(uint32(m.Tunnel.SwIfIndex))
- buf.EncodeUint32(uint32(m.Tunnel.Mode))
- return buf.Bytes(), nil
-}
-func (m *VxlanGbpTunnelDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Tunnel.Instance = buf.DecodeUint32()
- m.Tunnel.Src.Af = ip_types.AddressFamily(buf.DecodeUint8())
- copy(m.Tunnel.Src.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Tunnel.Dst.Af = ip_types.AddressFamily(buf.DecodeUint8())
- copy(m.Tunnel.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Tunnel.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
- m.Tunnel.EncapTableID = buf.DecodeUint32()
- m.Tunnel.Vni = buf.DecodeUint32()
- m.Tunnel.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
- m.Tunnel.Mode = VxlanGbpAPITunnelMode(buf.DecodeUint32())
- return nil
-}
-
-// VxlanGbpTunnelDump defines message 'vxlan_gbp_tunnel_dump'.
-// InProgress: the message form may change in the future versions
-type VxlanGbpTunnelDump struct {
- SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
-}
-
-func (m *VxlanGbpTunnelDump) Reset() { *m = VxlanGbpTunnelDump{} }
-func (*VxlanGbpTunnelDump) GetMessageName() string { return "vxlan_gbp_tunnel_dump" }
-func (*VxlanGbpTunnelDump) GetCrcString() string { return "f9e6675e" }
-func (*VxlanGbpTunnelDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *VxlanGbpTunnelDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *VxlanGbpTunnelDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- return buf.Bytes(), nil
-}
-func (m *VxlanGbpTunnelDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-func init() { file_vxlan_gbp_binapi_init() }
-func file_vxlan_gbp_binapi_init() {
- api.RegisterMessage((*SwInterfaceSetVxlanGbpBypass)(nil), "sw_interface_set_vxlan_gbp_bypass_65247409")
- api.RegisterMessage((*SwInterfaceSetVxlanGbpBypassReply)(nil), "sw_interface_set_vxlan_gbp_bypass_reply_e8d4e804")
- api.RegisterMessage((*VxlanGbpTunnelAddDel)(nil), "vxlan_gbp_tunnel_add_del_6c743427")
- api.RegisterMessage((*VxlanGbpTunnelAddDelReply)(nil), "vxlan_gbp_tunnel_add_del_reply_5383d31f")
- api.RegisterMessage((*VxlanGbpTunnelDetails)(nil), "vxlan_gbp_tunnel_details_66e94a89")
- api.RegisterMessage((*VxlanGbpTunnelDump)(nil), "vxlan_gbp_tunnel_dump_f9e6675e")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*SwInterfaceSetVxlanGbpBypass)(nil),
- (*SwInterfaceSetVxlanGbpBypassReply)(nil),
- (*VxlanGbpTunnelAddDel)(nil),
- (*VxlanGbpTunnelAddDelReply)(nil),
- (*VxlanGbpTunnelDetails)(nil),
- (*VxlanGbpTunnelDump)(nil),
- }
-}
diff --git a/binapi/vxlan_gbp/vxlan_gbp_rpc.ba.go b/binapi/vxlan_gbp/vxlan_gbp_rpc.ba.go
deleted file mode 100644
index 90aec0e..0000000
--- a/binapi/vxlan_gbp/vxlan_gbp_rpc.ba.go
+++ /dev/null
@@ -1,88 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package vxlan_gbp
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
-)
-
-// RPCService defines RPC service vxlan_gbp.
-type RPCService interface {
- SwInterfaceSetVxlanGbpBypass(ctx context.Context, in *SwInterfaceSetVxlanGbpBypass) (*SwInterfaceSetVxlanGbpBypassReply, error)
- VxlanGbpTunnelAddDel(ctx context.Context, in *VxlanGbpTunnelAddDel) (*VxlanGbpTunnelAddDelReply, error)
- VxlanGbpTunnelDump(ctx context.Context, in *VxlanGbpTunnelDump) (RPCService_VxlanGbpTunnelDumpClient, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) SwInterfaceSetVxlanGbpBypass(ctx context.Context, in *SwInterfaceSetVxlanGbpBypass) (*SwInterfaceSetVxlanGbpBypassReply, error) {
- out := new(SwInterfaceSetVxlanGbpBypassReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) VxlanGbpTunnelAddDel(ctx context.Context, in *VxlanGbpTunnelAddDel) (*VxlanGbpTunnelAddDelReply, error) {
- out := new(VxlanGbpTunnelAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) VxlanGbpTunnelDump(ctx context.Context, in *VxlanGbpTunnelDump) (RPCService_VxlanGbpTunnelDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_VxlanGbpTunnelDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_VxlanGbpTunnelDumpClient interface {
- Recv() (*VxlanGbpTunnelDetails, error)
- api.Stream
-}
-
-type serviceClient_VxlanGbpTunnelDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_VxlanGbpTunnelDumpClient) Recv() (*VxlanGbpTunnelDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *VxlanGbpTunnelDetails:
- return m, nil
- case *vpe.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)
- }
-}
diff --git a/binapi/vxlan_gpe/vxlan_gpe.ba.go b/binapi/vxlan_gpe/vxlan_gpe.ba.go
index aa68eb5..e07ad3a 100644
--- a/binapi/vxlan_gpe/vxlan_gpe.ba.go
+++ b/binapi/vxlan_gpe/vxlan_gpe.ba.go
@@ -1,13 +1,13 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
// binapi-generator: v0.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/core/vxlan_gpe.api.json
// Package vxlan_gpe contains generated bindings for API file vxlan_gpe.api.
//
// Contents:
-// 6 messages
+// 10 messages
//
package vxlan_gpe
@@ -26,8 +26,8 @@ const _ = api.GoVppAPIPackageIsVersion2
const (
APIFile = "vxlan_gpe"
- APIVersion = "2.0.0"
- VersionCrc = 0x7a970d0b
+ APIVersion = "2.1.0"
+ VersionCrc = 0x3bc06278
)
// SwInterfaceSetVxlanGpeBypass defines message 'sw_interface_set_vxlan_gpe_bypass'.
@@ -212,6 +212,120 @@ func (m *VxlanGpeAddDelTunnelReply) Unmarshal(b []byte) error {
return nil
}
+// VxlanGpeAddDelTunnelV2 defines message 'vxlan_gpe_add_del_tunnel_v2'.
+type VxlanGpeAddDelTunnelV2 struct {
+ Local ip_types.Address `binapi:"address,name=local" json:"local,omitempty"`
+ Remote ip_types.Address `binapi:"address,name=remote" json:"remote,omitempty"`
+ LocalPort uint16 `binapi:"u16,name=local_port" json:"local_port,omitempty"`
+ RemotePort uint16 `binapi:"u16,name=remote_port" json:"remote_port,omitempty"`
+ McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
+ EncapVrfID uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
+ DecapVrfID uint32 `binapi:"u32,name=decap_vrf_id" json:"decap_vrf_id,omitempty"`
+ Protocol ip_types.IPProto `binapi:"ip_proto,name=protocol" json:"protocol,omitempty"`
+ Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
+ IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
+}
+
+func (m *VxlanGpeAddDelTunnelV2) Reset() { *m = VxlanGpeAddDelTunnelV2{} }
+func (*VxlanGpeAddDelTunnelV2) GetMessageName() string { return "vxlan_gpe_add_del_tunnel_v2" }
+func (*VxlanGpeAddDelTunnelV2) GetCrcString() string { return "d62fdb35" }
+func (*VxlanGpeAddDelTunnelV2) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *VxlanGpeAddDelTunnelV2) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 1 // m.Local.Af
+ size += 1 * 16 // m.Local.Un
+ size += 1 // m.Remote.Af
+ size += 1 * 16 // m.Remote.Un
+ size += 2 // m.LocalPort
+ size += 2 // m.RemotePort
+ size += 4 // m.McastSwIfIndex
+ size += 4 // m.EncapVrfID
+ size += 4 // m.DecapVrfID
+ size += 1 // m.Protocol
+ size += 4 // m.Vni
+ size += 1 // m.IsAdd
+ return size
+}
+func (m *VxlanGpeAddDelTunnelV2) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint8(uint8(m.Local.Af))
+ buf.EncodeBytes(m.Local.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint8(uint8(m.Remote.Af))
+ buf.EncodeBytes(m.Remote.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint16(m.LocalPort)
+ buf.EncodeUint16(m.RemotePort)
+ buf.EncodeUint32(uint32(m.McastSwIfIndex))
+ buf.EncodeUint32(m.EncapVrfID)
+ buf.EncodeUint32(m.DecapVrfID)
+ buf.EncodeUint8(uint8(m.Protocol))
+ buf.EncodeUint32(m.Vni)
+ buf.EncodeBool(m.IsAdd)
+ return buf.Bytes(), nil
+}
+func (m *VxlanGpeAddDelTunnelV2) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Local.Af = ip_types.AddressFamily(buf.DecodeUint8())
+ copy(m.Local.Un.XXX_UnionData[:], buf.DecodeBytes(16))
+ m.Remote.Af = ip_types.AddressFamily(buf.DecodeUint8())
+ copy(m.Remote.Un.XXX_UnionData[:], buf.DecodeBytes(16))
+ m.LocalPort = buf.DecodeUint16()
+ m.RemotePort = buf.DecodeUint16()
+ m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ m.EncapVrfID = buf.DecodeUint32()
+ m.DecapVrfID = buf.DecodeUint32()
+ m.Protocol = ip_types.IPProto(buf.DecodeUint8())
+ m.Vni = buf.DecodeUint32()
+ m.IsAdd = buf.DecodeBool()
+ return nil
+}
+
+// VxlanGpeAddDelTunnelV2Reply defines message 'vxlan_gpe_add_del_tunnel_v2_reply'.
+type VxlanGpeAddDelTunnelV2Reply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+}
+
+func (m *VxlanGpeAddDelTunnelV2Reply) Reset() { *m = VxlanGpeAddDelTunnelV2Reply{} }
+func (*VxlanGpeAddDelTunnelV2Reply) GetMessageName() string {
+ return "vxlan_gpe_add_del_tunnel_v2_reply"
+}
+func (*VxlanGpeAddDelTunnelV2Reply) GetCrcString() string { return "5383d31f" }
+func (*VxlanGpeAddDelTunnelV2Reply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *VxlanGpeAddDelTunnelV2Reply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ size += 4 // m.SwIfIndex
+ return size
+}
+func (m *VxlanGpeAddDelTunnelV2Reply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint32(uint32(m.SwIfIndex))
+ return buf.Bytes(), nil
+}
+func (m *VxlanGpeAddDelTunnelV2Reply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ return nil
+}
+
// VxlanGpeTunnelDetails defines message 'vxlan_gpe_tunnel_details'.
type VxlanGpeTunnelDetails struct {
SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
@@ -316,14 +430,130 @@ func (m *VxlanGpeTunnelDump) Unmarshal(b []byte) error {
return nil
}
+// VxlanGpeTunnelV2Details defines message 'vxlan_gpe_tunnel_v2_details'.
+type VxlanGpeTunnelV2Details struct {
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ Local ip_types.Address `binapi:"address,name=local" json:"local,omitempty"`
+ Remote ip_types.Address `binapi:"address,name=remote" json:"remote,omitempty"`
+ LocalPort uint16 `binapi:"u16,name=local_port" json:"local_port,omitempty"`
+ RemotePort uint16 `binapi:"u16,name=remote_port" json:"remote_port,omitempty"`
+ Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
+ Protocol ip_types.IPProto `binapi:"ip_proto,name=protocol" json:"protocol,omitempty"`
+ McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
+ EncapVrfID uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
+ DecapVrfID uint32 `binapi:"u32,name=decap_vrf_id" json:"decap_vrf_id,omitempty"`
+ IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
+}
+
+func (m *VxlanGpeTunnelV2Details) Reset() { *m = VxlanGpeTunnelV2Details{} }
+func (*VxlanGpeTunnelV2Details) GetMessageName() string { return "vxlan_gpe_tunnel_v2_details" }
+func (*VxlanGpeTunnelV2Details) GetCrcString() string { return "06be4870" }
+func (*VxlanGpeTunnelV2Details) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *VxlanGpeTunnelV2Details) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.SwIfIndex
+ size += 1 // m.Local.Af
+ size += 1 * 16 // m.Local.Un
+ size += 1 // m.Remote.Af
+ size += 1 * 16 // m.Remote.Un
+ size += 2 // m.LocalPort
+ size += 2 // m.RemotePort
+ size += 4 // m.Vni
+ size += 1 // m.Protocol
+ size += 4 // m.McastSwIfIndex
+ size += 4 // m.EncapVrfID
+ size += 4 // m.DecapVrfID
+ size += 1 // m.IsIPv6
+ return size
+}
+func (m *VxlanGpeTunnelV2Details) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(uint32(m.SwIfIndex))
+ buf.EncodeUint8(uint8(m.Local.Af))
+ buf.EncodeBytes(m.Local.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint8(uint8(m.Remote.Af))
+ buf.EncodeBytes(m.Remote.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint16(m.LocalPort)
+ buf.EncodeUint16(m.RemotePort)
+ buf.EncodeUint32(m.Vni)
+ buf.EncodeUint8(uint8(m.Protocol))
+ buf.EncodeUint32(uint32(m.McastSwIfIndex))
+ buf.EncodeUint32(m.EncapVrfID)
+ buf.EncodeUint32(m.DecapVrfID)
+ buf.EncodeBool(m.IsIPv6)
+ return buf.Bytes(), nil
+}
+func (m *VxlanGpeTunnelV2Details) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ m.Local.Af = ip_types.AddressFamily(buf.DecodeUint8())
+ copy(m.Local.Un.XXX_UnionData[:], buf.DecodeBytes(16))
+ m.Remote.Af = ip_types.AddressFamily(buf.DecodeUint8())
+ copy(m.Remote.Un.XXX_UnionData[:], buf.DecodeBytes(16))
+ m.LocalPort = buf.DecodeUint16()
+ m.RemotePort = buf.DecodeUint16()
+ m.Vni = buf.DecodeUint32()
+ m.Protocol = ip_types.IPProto(buf.DecodeUint8())
+ m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ m.EncapVrfID = buf.DecodeUint32()
+ m.DecapVrfID = buf.DecodeUint32()
+ m.IsIPv6 = buf.DecodeBool()
+ return nil
+}
+
+// VxlanGpeTunnelV2Dump defines message 'vxlan_gpe_tunnel_v2_dump'.
+type VxlanGpeTunnelV2Dump struct {
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+}
+
+func (m *VxlanGpeTunnelV2Dump) Reset() { *m = VxlanGpeTunnelV2Dump{} }
+func (*VxlanGpeTunnelV2Dump) GetMessageName() string { return "vxlan_gpe_tunnel_v2_dump" }
+func (*VxlanGpeTunnelV2Dump) GetCrcString() string { return "f9e6675e" }
+func (*VxlanGpeTunnelV2Dump) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *VxlanGpeTunnelV2Dump) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.SwIfIndex
+ return size
+}
+func (m *VxlanGpeTunnelV2Dump) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(uint32(m.SwIfIndex))
+ return buf.Bytes(), nil
+}
+func (m *VxlanGpeTunnelV2Dump) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ return nil
+}
+
func init() { file_vxlan_gpe_binapi_init() }
func file_vxlan_gpe_binapi_init() {
api.RegisterMessage((*SwInterfaceSetVxlanGpeBypass)(nil), "sw_interface_set_vxlan_gpe_bypass_65247409")
api.RegisterMessage((*SwInterfaceSetVxlanGpeBypassReply)(nil), "sw_interface_set_vxlan_gpe_bypass_reply_e8d4e804")
api.RegisterMessage((*VxlanGpeAddDelTunnel)(nil), "vxlan_gpe_add_del_tunnel_a645b2b0")
api.RegisterMessage((*VxlanGpeAddDelTunnelReply)(nil), "vxlan_gpe_add_del_tunnel_reply_5383d31f")
+ api.RegisterMessage((*VxlanGpeAddDelTunnelV2)(nil), "vxlan_gpe_add_del_tunnel_v2_d62fdb35")
+ api.RegisterMessage((*VxlanGpeAddDelTunnelV2Reply)(nil), "vxlan_gpe_add_del_tunnel_v2_reply_5383d31f")
api.RegisterMessage((*VxlanGpeTunnelDetails)(nil), "vxlan_gpe_tunnel_details_0968fc8b")
api.RegisterMessage((*VxlanGpeTunnelDump)(nil), "vxlan_gpe_tunnel_dump_f9e6675e")
+ api.RegisterMessage((*VxlanGpeTunnelV2Details)(nil), "vxlan_gpe_tunnel_v2_details_06be4870")
+ api.RegisterMessage((*VxlanGpeTunnelV2Dump)(nil), "vxlan_gpe_tunnel_v2_dump_f9e6675e")
}
// Messages returns list of all messages in this module.
@@ -333,7 +563,11 @@ func AllMessages() []api.Message {
(*SwInterfaceSetVxlanGpeBypassReply)(nil),
(*VxlanGpeAddDelTunnel)(nil),
(*VxlanGpeAddDelTunnelReply)(nil),
+ (*VxlanGpeAddDelTunnelV2)(nil),
+ (*VxlanGpeAddDelTunnelV2Reply)(nil),
(*VxlanGpeTunnelDetails)(nil),
(*VxlanGpeTunnelDump)(nil),
+ (*VxlanGpeTunnelV2Details)(nil),
+ (*VxlanGpeTunnelV2Dump)(nil),
}
}
diff --git a/binapi/vxlan_gpe/vxlan_gpe_rpc.ba.go b/binapi/vxlan_gpe/vxlan_gpe_rpc.ba.go
index c5010c7..5234a7d 100644
--- a/binapi/vxlan_gpe/vxlan_gpe_rpc.ba.go
+++ b/binapi/vxlan_gpe/vxlan_gpe_rpc.ba.go
@@ -8,14 +8,16 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service vxlan_gpe.
type RPCService interface {
SwInterfaceSetVxlanGpeBypass(ctx context.Context, in *SwInterfaceSetVxlanGpeBypass) (*SwInterfaceSetVxlanGpeBypassReply, error)
VxlanGpeAddDelTunnel(ctx context.Context, in *VxlanGpeAddDelTunnel) (*VxlanGpeAddDelTunnelReply, error)
+ VxlanGpeAddDelTunnelV2(ctx context.Context, in *VxlanGpeAddDelTunnelV2) (*VxlanGpeAddDelTunnelV2Reply, error)
VxlanGpeTunnelDump(ctx context.Context, in *VxlanGpeTunnelDump) (RPCService_VxlanGpeTunnelDumpClient, error)
+ VxlanGpeTunnelV2Dump(ctx context.Context, in *VxlanGpeTunnelV2Dump) (RPCService_VxlanGpeTunnelV2DumpClient, error)
}
type serviceClient struct {
@@ -44,6 +46,15 @@ func (c *serviceClient) VxlanGpeAddDelTunnel(ctx context.Context, in *VxlanGpeAd
return out, api.RetvalToVPPApiError(out.Retval)
}
+func (c *serviceClient) VxlanGpeAddDelTunnelV2(ctx context.Context, in *VxlanGpeAddDelTunnelV2) (*VxlanGpeAddDelTunnelV2Reply, error) {
+ out := new(VxlanGpeAddDelTunnelV2Reply)
+ err := c.conn.Invoke(ctx, in, out)
+ if err != nil {
+ return nil, err
+ }
+ return out, api.RetvalToVPPApiError(out.Retval)
+}
+
func (c *serviceClient) VxlanGpeTunnelDump(ctx context.Context, in *VxlanGpeTunnelDump) (RPCService_VxlanGpeTunnelDumpClient, error) {
stream, err := c.conn.NewStream(ctx)
if err != nil {
@@ -53,7 +64,7 @@ func (c *serviceClient) VxlanGpeTunnelDump(ctx context.Context, in *VxlanGpeTunn
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -76,7 +87,50 @@ func (c *serviceClient_VxlanGpeTunnelDumpClient) Recv() (*VxlanGpeTunnelDetails,
switch m := msg.(type) {
case *VxlanGpeTunnelDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
+ err = c.Stream.Close()
+ if err != nil {
+ return nil, err
+ }
+ return nil, io.EOF
+ default:
+ return nil, fmt.Errorf("unexpected message: %T %v", m, m)
+ }
+}
+
+func (c *serviceClient) VxlanGpeTunnelV2Dump(ctx context.Context, in *VxlanGpeTunnelV2Dump) (RPCService_VxlanGpeTunnelV2DumpClient, error) {
+ stream, err := c.conn.NewStream(ctx)
+ if err != nil {
+ return nil, err
+ }
+ x := &serviceClient_VxlanGpeTunnelV2DumpClient{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_VxlanGpeTunnelV2DumpClient interface {
+ Recv() (*VxlanGpeTunnelV2Details, error)
+ api.Stream
+}
+
+type serviceClient_VxlanGpeTunnelV2DumpClient struct {
+ api.Stream
+}
+
+func (c *serviceClient_VxlanGpeTunnelV2DumpClient) Recv() (*VxlanGpeTunnelV2Details, error) {
+ msg, err := c.Stream.RecvMsg()
+ if err != nil {
+ return nil, err
+ }
+ switch m := msg.(type) {
+ case *VxlanGpeTunnelV2Details:
+ return m, nil
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
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 58277d0..b0be21a 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/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 8bfd735..01a9375 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.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/plugins/wireguard.api.json
// Package wireguard contains generated bindings for API file wireguard.api.
@@ -9,7 +9,7 @@
// Contents:
// 1 enum
// 2 structs
-// 12 messages
+// 17 messages
//
package wireguard
@@ -31,7 +31,7 @@ const _ = api.GoVppAPIPackageIsVersion2
const (
APIFile = "wireguard"
APIVersion = "0.1.0"
- VersionCrc = 0x1e1d4252
+ VersionCrc = 0xb58de7e
)
// WireguardPeerFlags defines enum 'wireguard_peer_flags'.
@@ -39,14 +39,17 @@ type WireguardPeerFlags uint8
const (
WIREGUARD_PEER_STATUS_DEAD WireguardPeerFlags = 1
+ WIREGUARD_PEER_ESTABLISHED WireguardPeerFlags = 2
)
var (
WireguardPeerFlags_name = map[uint8]string{
1: "WIREGUARD_PEER_STATUS_DEAD",
+ 2: "WIREGUARD_PEER_ESTABLISHED",
}
WireguardPeerFlags_value = map[string]uint8{
"WIREGUARD_PEER_STATUS_DEAD": 1,
+ "WIREGUARD_PEER_ESTABLISHED": 2,
}
)
@@ -100,6 +103,156 @@ type WireguardPeer struct {
AllowedIps []ip_types.Prefix `binapi:"prefix[n_allowed_ips],name=allowed_ips" json:"allowed_ips,omitempty"`
}
+// WantWireguardPeerEvents defines message 'want_wireguard_peer_events'.
+// InProgress: the message form may change in the future versions
+type WantWireguardPeerEvents struct {
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
+ PeerIndex uint32 `binapi:"u32,name=peer_index,default=4294967295" json:"peer_index,omitempty"`
+ EnableDisable uint32 `binapi:"u32,name=enable_disable" json:"enable_disable,omitempty"`
+ PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
+}
+
+func (m *WantWireguardPeerEvents) Reset() { *m = WantWireguardPeerEvents{} }
+func (*WantWireguardPeerEvents) GetMessageName() string { return "want_wireguard_peer_events" }
+func (*WantWireguardPeerEvents) GetCrcString() string { return "3bc666c8" }
+func (*WantWireguardPeerEvents) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *WantWireguardPeerEvents) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.SwIfIndex
+ size += 4 // m.PeerIndex
+ size += 4 // m.EnableDisable
+ size += 4 // m.PID
+ return size
+}
+func (m *WantWireguardPeerEvents) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(uint32(m.SwIfIndex))
+ buf.EncodeUint32(m.PeerIndex)
+ buf.EncodeUint32(m.EnableDisable)
+ buf.EncodeUint32(m.PID)
+ return buf.Bytes(), nil
+}
+func (m *WantWireguardPeerEvents) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ m.PeerIndex = buf.DecodeUint32()
+ m.EnableDisable = buf.DecodeUint32()
+ m.PID = buf.DecodeUint32()
+ return nil
+}
+
+// WantWireguardPeerEventsReply defines message 'want_wireguard_peer_events_reply'.
+// InProgress: the message form may change in the future versions
+type WantWireguardPeerEventsReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+}
+
+func (m *WantWireguardPeerEventsReply) Reset() { *m = WantWireguardPeerEventsReply{} }
+func (*WantWireguardPeerEventsReply) GetMessageName() string {
+ return "want_wireguard_peer_events_reply"
+}
+func (*WantWireguardPeerEventsReply) GetCrcString() string { return "e8d4e804" }
+func (*WantWireguardPeerEventsReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *WantWireguardPeerEventsReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ return size
+}
+func (m *WantWireguardPeerEventsReply) 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 *WantWireguardPeerEventsReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ return nil
+}
+
+// WgSetAsyncMode defines message 'wg_set_async_mode'.
+// InProgress: the message form may change in the future versions
+type WgSetAsyncMode struct {
+ AsyncEnable bool `binapi:"bool,name=async_enable" json:"async_enable,omitempty"`
+}
+
+func (m *WgSetAsyncMode) Reset() { *m = WgSetAsyncMode{} }
+func (*WgSetAsyncMode) GetMessageName() string { return "wg_set_async_mode" }
+func (*WgSetAsyncMode) GetCrcString() string { return "a6465f7c" }
+func (*WgSetAsyncMode) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *WgSetAsyncMode) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 1 // m.AsyncEnable
+ return size
+}
+func (m *WgSetAsyncMode) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeBool(m.AsyncEnable)
+ return buf.Bytes(), nil
+}
+func (m *WgSetAsyncMode) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.AsyncEnable = buf.DecodeBool()
+ return nil
+}
+
+// WgSetAsyncModeReply defines message 'wg_set_async_mode_reply'.
+// InProgress: the message form may change in the future versions
+type WgSetAsyncModeReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+}
+
+func (m *WgSetAsyncModeReply) Reset() { *m = WgSetAsyncModeReply{} }
+func (*WgSetAsyncModeReply) GetMessageName() string { return "wg_set_async_mode_reply" }
+func (*WgSetAsyncModeReply) GetCrcString() string { return "e8d4e804" }
+func (*WgSetAsyncModeReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *WgSetAsyncModeReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ return size
+}
+func (m *WgSetAsyncModeReply) 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 *WgSetAsyncModeReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ return nil
+}
+
// WireguardInterfaceCreate defines message 'wireguard_interface_create'.
// InProgress: the message form may change in the future versions
type WireguardInterfaceCreate struct {
@@ -368,7 +521,7 @@ type WireguardPeerAdd struct {
func (m *WireguardPeerAdd) Reset() { *m = WireguardPeerAdd{} }
func (*WireguardPeerAdd) GetMessageName() string { return "wireguard_peer_add" }
-func (*WireguardPeerAdd) GetCrcString() string { return "ed792326" }
+func (*WireguardPeerAdd) GetCrcString() string { return "aedf8d59" }
func (*WireguardPeerAdd) GetMessageType() api.MessageType {
return api.RequestMessage
}
@@ -482,6 +635,48 @@ func (m *WireguardPeerAddReply) Unmarshal(b []byte) error {
return nil
}
+// WireguardPeerEvent defines message 'wireguard_peer_event'.
+// InProgress: the message form may change in the future versions
+type WireguardPeerEvent struct {
+ PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
+ PeerIndex uint32 `binapi:"u32,name=peer_index" json:"peer_index,omitempty"`
+ Flags WireguardPeerFlags `binapi:"wireguard_peer_flags,name=flags" json:"flags,omitempty"`
+}
+
+func (m *WireguardPeerEvent) Reset() { *m = WireguardPeerEvent{} }
+func (*WireguardPeerEvent) GetMessageName() string { return "wireguard_peer_event" }
+func (*WireguardPeerEvent) GetCrcString() string { return "4e1b5d67" }
+func (*WireguardPeerEvent) GetMessageType() api.MessageType {
+ return api.EventMessage
+}
+
+func (m *WireguardPeerEvent) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.PID
+ size += 4 // m.PeerIndex
+ size += 1 // m.Flags
+ return size
+}
+func (m *WireguardPeerEvent) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.PID)
+ buf.EncodeUint32(m.PeerIndex)
+ buf.EncodeUint8(uint8(m.Flags))
+ return buf.Bytes(), nil
+}
+func (m *WireguardPeerEvent) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.PID = buf.DecodeUint32()
+ m.PeerIndex = buf.DecodeUint32()
+ m.Flags = WireguardPeerFlags(buf.DecodeUint8())
+ return nil
+}
+
// WireguardPeerRemove defines message 'wireguard_peer_remove'.
// InProgress: the message form may change in the future versions
type WireguardPeerRemove struct {
@@ -558,7 +753,7 @@ type WireguardPeersDetails struct {
func (m *WireguardPeersDetails) Reset() { *m = WireguardPeersDetails{} }
func (*WireguardPeersDetails) GetMessageName() string { return "wireguard_peers_details" }
-func (*WireguardPeersDetails) GetCrcString() string { return "2097f740" }
+func (*WireguardPeersDetails) GetCrcString() string { return "29269d0e" }
func (*WireguardPeersDetails) GetMessageType() api.MessageType {
return api.ReplyMessage
}
@@ -636,11 +831,13 @@ func (m *WireguardPeersDetails) Unmarshal(b []byte) error {
// WireguardPeersDump defines message 'wireguard_peers_dump'.
// InProgress: the message form may change in the future versions
-type WireguardPeersDump struct{}
+type WireguardPeersDump struct {
+ PeerIndex uint32 `binapi:"u32,name=peer_index,default=4294967295" json:"peer_index,omitempty"`
+}
func (m *WireguardPeersDump) Reset() { *m = WireguardPeersDump{} }
func (*WireguardPeersDump) GetMessageName() string { return "wireguard_peers_dump" }
-func (*WireguardPeersDump) GetCrcString() string { return "51077d14" }
+func (*WireguardPeersDump) GetCrcString() string { return "3b74607a" }
func (*WireguardPeersDump) GetMessageType() api.MessageType {
return api.RequestMessage
}
@@ -649,6 +846,7 @@ func (m *WireguardPeersDump) Size() (size int) {
if m == nil {
return 0
}
+ size += 4 // m.PeerIndex
return size
}
func (m *WireguardPeersDump) Marshal(b []byte) ([]byte, error) {
@@ -656,31 +854,43 @@ func (m *WireguardPeersDump) Marshal(b []byte) ([]byte, error) {
b = make([]byte, m.Size())
}
buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.PeerIndex)
return buf.Bytes(), nil
}
func (m *WireguardPeersDump) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.PeerIndex = buf.DecodeUint32()
return nil
}
func init() { file_wireguard_binapi_init() }
func file_wireguard_binapi_init() {
+ api.RegisterMessage((*WantWireguardPeerEvents)(nil), "want_wireguard_peer_events_3bc666c8")
+ api.RegisterMessage((*WantWireguardPeerEventsReply)(nil), "want_wireguard_peer_events_reply_e8d4e804")
+ api.RegisterMessage((*WgSetAsyncMode)(nil), "wg_set_async_mode_a6465f7c")
+ api.RegisterMessage((*WgSetAsyncModeReply)(nil), "wg_set_async_mode_reply_e8d4e804")
api.RegisterMessage((*WireguardInterfaceCreate)(nil), "wireguard_interface_create_a530137e")
api.RegisterMessage((*WireguardInterfaceCreateReply)(nil), "wireguard_interface_create_reply_5383d31f")
api.RegisterMessage((*WireguardInterfaceDelete)(nil), "wireguard_interface_delete_f9e6675e")
api.RegisterMessage((*WireguardInterfaceDeleteReply)(nil), "wireguard_interface_delete_reply_e8d4e804")
api.RegisterMessage((*WireguardInterfaceDetails)(nil), "wireguard_interface_details_0dd4865d")
api.RegisterMessage((*WireguardInterfaceDump)(nil), "wireguard_interface_dump_2c954158")
- api.RegisterMessage((*WireguardPeerAdd)(nil), "wireguard_peer_add_ed792326")
+ api.RegisterMessage((*WireguardPeerAdd)(nil), "wireguard_peer_add_aedf8d59")
api.RegisterMessage((*WireguardPeerAddReply)(nil), "wireguard_peer_add_reply_084a0cd3")
+ api.RegisterMessage((*WireguardPeerEvent)(nil), "wireguard_peer_event_4e1b5d67")
api.RegisterMessage((*WireguardPeerRemove)(nil), "wireguard_peer_remove_3b74607a")
api.RegisterMessage((*WireguardPeerRemoveReply)(nil), "wireguard_peer_remove_reply_e8d4e804")
- api.RegisterMessage((*WireguardPeersDetails)(nil), "wireguard_peers_details_2097f740")
- api.RegisterMessage((*WireguardPeersDump)(nil), "wireguard_peers_dump_51077d14")
+ api.RegisterMessage((*WireguardPeersDetails)(nil), "wireguard_peers_details_29269d0e")
+ api.RegisterMessage((*WireguardPeersDump)(nil), "wireguard_peers_dump_3b74607a")
}
// Messages returns list of all messages in this module.
func AllMessages() []api.Message {
return []api.Message{
+ (*WantWireguardPeerEvents)(nil),
+ (*WantWireguardPeerEventsReply)(nil),
+ (*WgSetAsyncMode)(nil),
+ (*WgSetAsyncModeReply)(nil),
(*WireguardInterfaceCreate)(nil),
(*WireguardInterfaceCreateReply)(nil),
(*WireguardInterfaceDelete)(nil),
@@ -689,6 +899,7 @@ func AllMessages() []api.Message {
(*WireguardInterfaceDump)(nil),
(*WireguardPeerAdd)(nil),
(*WireguardPeerAddReply)(nil),
+ (*WireguardPeerEvent)(nil),
(*WireguardPeerRemove)(nil),
(*WireguardPeerRemoveReply)(nil),
(*WireguardPeersDetails)(nil),
diff --git a/binapi/wireguard/wireguard_rpc.ba.go b/binapi/wireguard/wireguard_rpc.ba.go
index 9d3a024..7463391 100644
--- a/binapi/wireguard/wireguard_rpc.ba.go
+++ b/binapi/wireguard/wireguard_rpc.ba.go
@@ -8,11 +8,13 @@ import (
"io"
api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
)
// RPCService defines RPC service wireguard.
type RPCService interface {
+ WantWireguardPeerEvents(ctx context.Context, in *WantWireguardPeerEvents) (*WantWireguardPeerEventsReply, error)
+ WgSetAsyncMode(ctx context.Context, in *WgSetAsyncMode) (*WgSetAsyncModeReply, error)
WireguardInterfaceCreate(ctx context.Context, in *WireguardInterfaceCreate) (*WireguardInterfaceCreateReply, error)
WireguardInterfaceDelete(ctx context.Context, in *WireguardInterfaceDelete) (*WireguardInterfaceDeleteReply, error)
WireguardInterfaceDump(ctx context.Context, in *WireguardInterfaceDump) (RPCService_WireguardInterfaceDumpClient, error)
@@ -29,6 +31,24 @@ func NewServiceClient(conn api.Connection) RPCService {
return &serviceClient{conn}
}
+func (c *serviceClient) WantWireguardPeerEvents(ctx context.Context, in *WantWireguardPeerEvents) (*WantWireguardPeerEventsReply, error) {
+ out := new(WantWireguardPeerEventsReply)
+ err := c.conn.Invoke(ctx, in, out)
+ if err != nil {
+ return nil, err
+ }
+ return out, api.RetvalToVPPApiError(out.Retval)
+}
+
+func (c *serviceClient) WgSetAsyncMode(ctx context.Context, in *WgSetAsyncMode) (*WgSetAsyncModeReply, error) {
+ out := new(WgSetAsyncModeReply)
+ err := c.conn.Invoke(ctx, in, out)
+ if err != nil {
+ return nil, err
+ }
+ return out, api.RetvalToVPPApiError(out.Retval)
+}
+
func (c *serviceClient) WireguardInterfaceCreate(ctx context.Context, in *WireguardInterfaceCreate) (*WireguardInterfaceCreateReply, error) {
out := new(WireguardInterfaceCreateReply)
err := c.conn.Invoke(ctx, in, out)
@@ -56,7 +76,7 @@ func (c *serviceClient) WireguardInterfaceDump(ctx context.Context, in *Wireguar
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -79,7 +99,7 @@ func (c *serviceClient_WireguardInterfaceDumpClient) Recv() (*WireguardInterface
switch m := msg.(type) {
case *WireguardInterfaceDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
@@ -117,7 +137,7 @@ func (c *serviceClient) WireguardPeersDump(ctx context.Context, in *WireguardPee
if err := x.Stream.SendMsg(in); err != nil {
return nil, err
}
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil {
return nil, err
}
return x, nil
@@ -140,7 +160,7 @@ func (c *serviceClient_WireguardPeersDumpClient) Recv() (*WireguardPeersDetails,
switch m := msg.(type) {
case *WireguardPeersDetails:
return m, nil
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
err = c.Stream.Close()
if err != nil {
return nil, err
diff --git a/cmd/govpp/main.go b/cmd/govpp/main.go
index 1c6b905..ebc15a5 100644
--- a/cmd/govpp/main.go
+++ b/cmd/govpp/main.go
@@ -30,6 +30,7 @@ import (
"git.fd.io/govpp.git"
"git.fd.io/govpp.git/adapter/socketclient"
+ "git.fd.io/govpp.git/binapi/vlib"
"git.fd.io/govpp.git/binapi/vpe"
"git.fd.io/govpp.git/binapigen"
"git.fd.io/govpp.git/binapigen/vppapi"
@@ -154,8 +155,8 @@ func sendCLI(args []string) {
log.Fatal(err)
}
- client := vpe.NewServiceClient(conn)
- reply, err := client.CliInband(context.Background(), &vpe.CliInband{
+ client := vlib.NewServiceClient(conn)
+ reply, err := client.CliInband(context.Background(), &vlib.CliInband{
Cmd: cmd,
})
if err != nil {
diff --git a/cmd/vpp-proxy/main.go b/cmd/vpp-proxy/main.go
index 3c85bcf..ac74294 100644
--- a/cmd/vpp-proxy/main.go
+++ b/cmd/vpp-proxy/main.go
@@ -23,6 +23,7 @@ import (
"git.fd.io/govpp.git/adapter/statsclient"
"git.fd.io/govpp.git/api"
interfaces "git.fd.io/govpp.git/binapi/interface"
+ "git.fd.io/govpp.git/binapi/vlib"
"git.fd.io/govpp.git/binapi/vpe"
_ "git.fd.io/govpp.git/core"
"git.fd.io/govpp.git/proxy"
@@ -93,8 +94,8 @@ func runClient() {
panic(err)
}
- req := &vpe.CliInband{Cmd: "show version"}
- reply := new(vpe.CliInbandReply)
+ req := &vlib.CliInband{Cmd: "show version"}
+ reply := new(vlib.CliInbandReply)
if err := binapiChannel.SendRequest(req).ReceiveReply(reply); err != nil {
log.Fatalln("binapi request failed:", err)
}
diff --git a/core/connection_test.go b/core/connection_test.go
index 81b145c..d2f0590 100644
--- a/core/connection_test.go
+++ b/core/connection_test.go
@@ -25,7 +25,7 @@ import (
"git.fd.io/govpp.git/binapi/ethernet_types"
interfaces "git.fd.io/govpp.git/binapi/interface"
"git.fd.io/govpp.git/binapi/interface_types"
- "git.fd.io/govpp.git/binapi/vpe"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
"git.fd.io/govpp.git/codec"
"git.fd.io/govpp.git/core"
)
@@ -108,7 +108,7 @@ func TestAsyncConnectionProcessesVppTimeout(t *testing.T) {
// make control ping reply fail so that connection.healthCheckLoop()
// initiates reconnection.
- ctx.mockVpp.MockReply(&vpe.ControlPingReply{
+ ctx.mockVpp.MockReply(&memclnt.ControlPingReply{
Retval: -1,
})
time.Sleep(time.Duration(1+core.HealthCheckThreshold) * (core.HealthCheckInterval + 2*core.HealthCheckReplyTimeout))
@@ -130,11 +130,11 @@ func TestCodec(t *testing.T) {
Expect(msg1.MacAddress).To(BeEquivalentTo(ethernet_types.MacAddress{1, 2, 3, 4, 5, 6}))
// reply
- data, err = msgCodec.EncodeMsg(&vpe.ControlPingReply{Retval: 55}, 22)
+ data, err = msgCodec.EncodeMsg(&memclnt.ControlPingReply{Retval: 55}, 22)
Expect(err).ShouldNot(HaveOccurred())
Expect(data).ShouldNot(BeEmpty())
- msg2 := &vpe.ControlPingReply{}
+ msg2 := &memclnt.ControlPingReply{}
err = msgCodec.DecodeMsg(data, msg2)
Expect(err).ShouldNot(HaveOccurred())
Expect(msg2.Retval).To(BeEquivalentTo(55))
@@ -157,7 +157,7 @@ func TestCodecNegative(t *testing.T) {
Expect(err.Error()).To(ContainSubstring("nil message"))
// nil data for decoding
- err = msgCodec.DecodeMsg(nil, &vpe.ControlPingReply{})
+ err = msgCodec.DecodeMsg(nil, &memclnt.ControlPingReply{})
Expect(err).Should(HaveOccurred())
Expect(err.Error()).To(ContainSubstring("panic"))
}
@@ -168,13 +168,13 @@ func TestSimpleRequestsWithSequenceNumbers(t *testing.T) {
var reqCtx []api.RequestCtx
for i := 0; i < 10; i++ {
- ctx.mockVpp.MockReply(&vpe.ControlPingReply{})
- req := &vpe.ControlPing{}
+ ctx.mockVpp.MockReply(&memclnt.ControlPingReply{})
+ req := &memclnt.ControlPing{}
reqCtx = append(reqCtx, ctx.ch.SendRequest(req))
}
for i := 0; i < 10; i++ {
- reply := &vpe.ControlPingReply{}
+ reply := &memclnt.ControlPingReply{}
err := reqCtx[i].ReceiveReply(reply)
Expect(err).ShouldNot(HaveOccurred())
}
@@ -189,7 +189,7 @@ func TestMultiRequestsWithSequenceNumbers(t *testing.T) {
msgs = append(msgs, &interfaces.SwInterfaceDetails{SwIfIndex: interface_types.InterfaceIndex(i)})
}
ctx.mockVpp.MockReply(msgs...)
- ctx.mockVpp.MockReply(&vpe.ControlPingReply{})
+ ctx.mockVpp.MockReply(&memclnt.ControlPingReply{})
// send multipart request
reqCtx := ctx.ch.SendMultiRequest(&interfaces.SwInterfaceDump{})
@@ -221,15 +221,15 @@ func TestSimpleRequestWithTimeout(t *testing.T) {
// reply for a previous timeouted requests to be ignored
ctx.mockVpp.MockReplyWithContext(mock.MsgWithContext{
- Msg: &vpe.ControlPingReply{},
+ Msg: &memclnt.ControlPingReply{},
SeqNum: 0,
})
// send reply later
- req1 := &vpe.ControlPing{}
+ req1 := &memclnt.ControlPing{}
reqCtx1 := ctx.ch.SendRequest(req1)
- reply := &vpe.ControlPingReply{}
+ reply := &memclnt.ControlPingReply{}
err := reqCtx1.ReceiveReply(reply)
Expect(err).ToNot(BeNil())
Expect(err.Error()).To(HavePrefix("no reply received within the timeout period"))
@@ -237,21 +237,21 @@ func TestSimpleRequestWithTimeout(t *testing.T) {
ctx.mockVpp.MockReplyWithContext(
// reply for the previous request
mock.MsgWithContext{
- Msg: &vpe.ControlPingReply{},
+ Msg: &memclnt.ControlPingReply{},
SeqNum: 1,
},
// reply for the next request
mock.MsgWithContext{
- Msg: &vpe.ControlPingReply{},
+ Msg: &memclnt.ControlPingReply{},
SeqNum: 2,
})
// next request
- req2 := &vpe.ControlPing{}
+ req2 := &memclnt.ControlPing{}
reqCtx2 := ctx.ch.SendRequest(req2)
// second request should ignore the first reply and return the second one
- reply = &vpe.ControlPingReply{}
+ reply = &memclnt.ControlPingReply{}
err = reqCtx2.ReceiveReply(reply)
Expect(err).To(BeNil())
}
@@ -261,34 +261,34 @@ func TestSimpleRequestsWithMissingReply(t *testing.T) {
defer ctx.teardownTest()
// request without reply
- req1 := &vpe.ControlPing{}
+ req1 := &memclnt.ControlPing{}
reqCtx1 := ctx.ch.SendRequest(req1)
// another request without reply
- req2 := &vpe.ControlPing{}
+ req2 := &memclnt.ControlPing{}
reqCtx2 := ctx.ch.SendRequest(req2)
// third request with reply
ctx.mockVpp.MockReplyWithContext(mock.MsgWithContext{
- Msg: &vpe.ControlPingReply{},
+ Msg: &memclnt.ControlPingReply{},
SeqNum: 3,
})
- req3 := &vpe.ControlPing{}
+ req3 := &memclnt.ControlPing{}
reqCtx3 := ctx.ch.SendRequest(req3)
// the first two should fail, but not consume reply for the 3rd
- reply := &vpe.ControlPingReply{}
+ reply := &memclnt.ControlPingReply{}
err := reqCtx1.ReceiveReply(reply)
Expect(err).ToNot(BeNil())
Expect(err.Error()).To(Equal("missing binary API reply with sequence number: 1"))
- reply = &vpe.ControlPingReply{}
+ reply = &memclnt.ControlPingReply{}
err = reqCtx2.ReceiveReply(reply)
Expect(err).ToNot(BeNil())
Expect(err.Error()).To(Equal("missing binary API reply with sequence number: 2"))
// the second request should succeed
- reply = &vpe.ControlPingReply{}
+ reply = &memclnt.ControlPingReply{}
err = reqCtx3.ReceiveReply(reply)
Expect(err).To(BeNil())
}
@@ -299,9 +299,9 @@ func TestMultiRequestsWithErrors(t *testing.T) {
// replies for a previous timeouted requests to be ignored
msgs := []mock.MsgWithContext{
- {Msg: &vpe.ControlPingReply{}, SeqNum: 0xffff - 1},
- {Msg: &vpe.ControlPingReply{}, SeqNum: 0xffff},
- {Msg: &vpe.ControlPingReply{}, SeqNum: 0},
+ {Msg: &memclnt.ControlPingReply{}, SeqNum: 0xffff - 1},
+ {Msg: &memclnt.ControlPingReply{}, SeqNum: 0xffff},
+ {Msg: &memclnt.ControlPingReply{}, SeqNum: 0},
}
for i := 0; i < 10; i++ {
msgs = append(msgs, mock.MsgWithContext{
@@ -314,7 +314,7 @@ func TestMultiRequestsWithErrors(t *testing.T) {
// reply for a next request
msgs = append(msgs, mock.MsgWithContext{
- Msg: &vpe.ControlPingReply{},
+ Msg: &memclnt.ControlPingReply{},
SeqNum: 2,
})
@@ -346,8 +346,8 @@ func TestMultiRequestsWithErrors(t *testing.T) {
Expect(err.Error()).To(Equal("missing binary API reply with sequence number: 1"))
// reply for the second request has not been consumed
- reqCtx2 := ctx.ch.SendRequest(&vpe.ControlPing{})
- reply2 := &vpe.ControlPingReply{}
+ reqCtx2 := ctx.ch.SendRequest(&memclnt.ControlPing{})
+ reply2 := &memclnt.ControlPingReply{}
err = reqCtx2.ReceiveReply(reply2)
Expect(err).To(BeNil())
}
@@ -360,23 +360,23 @@ func TestRequestsOrdering(t *testing.T) {
// some replies will get thrown away
// first request
- ctx.mockVpp.MockReply(&vpe.ControlPingReply{})
- req1 := &vpe.ControlPing{}
+ ctx.mockVpp.MockReply(&memclnt.ControlPingReply{})
+ req1 := &memclnt.ControlPing{}
reqCtx1 := ctx.ch.SendRequest(req1)
// second request
- ctx.mockVpp.MockReply(&vpe.ControlPingReply{})
- req2 := &vpe.ControlPing{}
+ ctx.mockVpp.MockReply(&memclnt.ControlPingReply{})
+ req2 := &memclnt.ControlPing{}
reqCtx2 := ctx.ch.SendRequest(req2)
// if reply for the second request is read first, the reply for the first
// request gets thrown away.
- reply2 := &vpe.ControlPingReply{}
+ reply2 := &memclnt.ControlPingReply{}
err := reqCtx2.ReceiveReply(reply2)
Expect(err).To(BeNil())
// first request has already been considered closed
- reply1 := &vpe.ControlPingReply{}
+ reply1 := &memclnt.ControlPingReply{}
err = reqCtx1.ReceiveReply(reply1)
Expect(err).ToNot(BeNil())
Expect(err.Error()).To(HavePrefix("no reply received within the timeout period"))
@@ -391,12 +391,12 @@ func TestCycleOverSetOfSequenceNumbers(t *testing.T) {
for i := 0; i < numIters+30; i++ {
if i < numIters {
- ctx.mockVpp.MockReply(&vpe.ControlPingReply{})
- req := &vpe.ControlPing{}
+ ctx.mockVpp.MockReply(&memclnt.ControlPingReply{})
+ req := &memclnt.ControlPing{}
reqCtx[i] = ctx.ch.SendRequest(req)
}
if i > 30 {
- reply := &vpe.ControlPingReply{}
+ reply := &memclnt.ControlPingReply{}
err := reqCtx[i-30].ReceiveReply(reply)
Expect(err).ShouldNot(HaveOccurred())
}
diff --git a/core/trace_test.go b/core/trace_test.go
index 1a29e7a..edeaa34 100644
--- a/core/trace_test.go
+++ b/core/trace_test.go
@@ -5,8 +5,8 @@ import (
interfaces "git.fd.io/govpp.git/binapi/interface"
"git.fd.io/govpp.git/binapi/ip"
"git.fd.io/govpp.git/binapi/l2"
+ memclnt "git.fd.io/govpp.git/binapi/memclnt"
"git.fd.io/govpp.git/binapi/memif"
- "git.fd.io/govpp.git/binapi/vpe"
"git.fd.io/govpp.git/core"
. "github.com/onsi/gomega"
"strings"
@@ -78,7 +78,7 @@ func TestMultiRequestTraceEnabled(t *testing.T) {
&interfaces.SwInterfaceDetails{
SwIfIndex: 3,
},
- &vpe.ControlPingReply{},
+ &memclnt.ControlPingReply{},
}
ctx.mockVpp.MockReply(reply...)
@@ -109,7 +109,7 @@ func TestMultiRequestTraceEnabled(t *testing.T) {
if i == 0 {
Expect(request[0].GetMessageName()).To(Equal(entry.Message.GetMessageName()))
} else if i == len(traced)-1 {
- msg := vpe.ControlPing{}
+ msg := memclnt.ControlPing{}
Expect(msg.GetMessageName()).To(Equal(entry.Message.GetMessageName()))
} else {
Expect(reply[i-1].GetMessageName()).To(Equal(entry.Message.GetMessageName()))
diff --git a/examples/api-trace/api-trace.go b/examples/api-trace/api-trace.go
index 3a78c7b..1978c17 100644
--- a/examples/api-trace/api-trace.go
+++ b/examples/api-trace/api-trace.go
@@ -26,6 +26,7 @@ import (
interfaces "git.fd.io/govpp.git/binapi/interface"
"git.fd.io/govpp.git/binapi/interface_types"
"git.fd.io/govpp.git/binapi/ip_types"
+ "git.fd.io/govpp.git/binapi/memclnt"
"git.fd.io/govpp.git/binapi/vpe"
"git.fd.io/govpp.git/core"
"log"
@@ -318,7 +319,7 @@ func invokeInterfaceDump(c api.Connection) {
fmt.Printf("ERROR: %v\n", err)
return
}
- if err := s.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err := s.SendMsg(&memclnt.ControlPing{}); err != nil {
fmt.Printf("ERROR: %v\n", err)
return
}
@@ -331,7 +332,7 @@ func invokeInterfaceDump(c api.Connection) {
switch msg := reply.(type) {
case *interfaces.SwInterfaceDetails:
fmt.Printf(" - retrieved interface: %v (idx: %d)\n", msg.InterfaceName, msg.SwIfIndex)
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
return
}
}
diff --git a/examples/perf-bench/perf-bench.go b/examples/perf-bench/perf-bench.go
index 6472068..f7a9857 100644
--- a/examples/perf-bench/perf-bench.go
+++ b/examples/perf-bench/perf-bench.go
@@ -30,7 +30,7 @@ import (
"git.fd.io/govpp.git/adapter/socketclient"
"git.fd.io/govpp.git/adapter/statsclient"
"git.fd.io/govpp.git/api"
- "git.fd.io/govpp.git/binapi/vpe"
+ "git.fd.io/govpp.git/binapi/memclnt"
"git.fd.io/govpp.git/core"
)
@@ -117,8 +117,8 @@ func syncTest(ch api.Channel, cnt int) {
fmt.Printf("Running synchronous perf test with %d requests...\n", cnt)
for i := 0; i < cnt; i++ {
- req := &vpe.ControlPing{}
- reply := &vpe.ControlPingReply{}
+ req := &memclnt.ControlPing{}
+ reply := &memclnt.ControlPingReply{}
if err := ch.SendRequest(req).ReceiveReply(reply); err != nil {
log.Fatalln("Error in reply:", err)
@@ -134,12 +134,12 @@ func syncTest2(conn api.Connection, cnt int) {
log.Fatalln("Error NewStream:", err)
}
for i := 0; i < cnt; i++ {
- if err := stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err := stream.SendMsg(&memclnt.ControlPing{}); err != nil {
log.Fatalln("Error SendMsg:", err)
}
if msg, err := stream.RecvMsg(); err != nil {
log.Fatalln("Error RecvMsg:", err)
- } else if _, ok := msg.(*vpe.ControlPingReply); ok {
+ } else if _, ok := msg.(*memclnt.ControlPingReply); ok {
// ok
} else {
log.Fatalf("unexpected reply: %v", msg.GetMessageName())
@@ -154,14 +154,14 @@ func asyncTest(ch api.Channel, cnt int) {
go func() {
for i := 0; i < cnt; i++ {
- ctxChan <- ch.SendRequest(&vpe.ControlPing{})
+ ctxChan <- ch.SendRequest(&memclnt.ControlPing{})
}
close(ctxChan)
fmt.Printf("Sending asynchronous requests finished\n")
}()
for ctx := range ctxChan {
- reply := &vpe.ControlPingReply{}
+ reply := &memclnt.ControlPingReply{}
if err := ctx.ReceiveReply(reply); err != nil {
log.Fatalln("Error in reply:", err)
}
@@ -179,7 +179,7 @@ func asyncTest2(conn api.Connection, cnt int) {
if err != nil {
log.Fatalln("Error NewStream:", err)
}
- if err := stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err := stream.SendMsg(&memclnt.ControlPing{}); err != nil {
log.Fatalln("Error SendMsg:", err)
}
ctxChan <- stream
@@ -191,7 +191,7 @@ func asyncTest2(conn api.Connection, cnt int) {
for ctx := range ctxChan {
if msg, err := ctx.RecvMsg(); err != nil {
log.Fatalln("Error RecvMsg:", err)
- } else if _, ok := msg.(*vpe.ControlPingReply); ok {
+ } else if _, ok := msg.(*memclnt.ControlPingReply); ok {
// ok
} else {
log.Fatalf("unexpected reply: %v", msg.GetMessageName())
diff --git a/examples/stream-client/stream_client.go b/examples/stream-client/stream_client.go
index f4af859..3a826e5 100644
--- a/examples/stream-client/stream_client.go
+++ b/examples/stream-client/stream_client.go
@@ -32,6 +32,7 @@ import (
"git.fd.io/govpp.git/binapi/ip"
"git.fd.io/govpp.git/binapi/ip_types"
"git.fd.io/govpp.git/binapi/mactime"
+ "git.fd.io/govpp.git/binapi/memclnt"
"git.fd.io/govpp.git/binapi/vpe"
"git.fd.io/govpp.git/core"
)
@@ -157,7 +158,7 @@ func interfaceDumpStream(stream api.Stream) {
logError(err, "SwInterfaceDump sending message")
return
}
- if err := stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err := stream.SendMsg(&memclnt.ControlPing{}); err != nil {
logError(err, "ControlPing sending message")
return
}
@@ -174,7 +175,7 @@ Loop:
case *interfaces.SwInterfaceDetails:
fmt.Printf(" - SwInterfaceDetails: %+v\n", msg)
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
fmt.Printf(" - ControlPingReply: %+v\n", msg)
break Loop
@@ -227,7 +228,7 @@ func ipAddressDumpStream(stream api.Stream, index interface_types.InterfaceIndex
logError(err, "IPAddressDump sending message")
return
}
- if err := stream.SendMsg(&vpe.ControlPing{}); err != nil {
+ if err := stream.SendMsg(&memclnt.ControlPing{}); err != nil {
logError(err, "ControlPing sending sending message")
return
}
@@ -244,7 +245,7 @@ Loop:
case *ip.IPAddressDetails:
fmt.Printf(" - IPAddressDetails: %+v\n", msg)
- case *vpe.ControlPingReply:
+ case *memclnt.ControlPingReply:
fmt.Printf(" - ControlPingReply: %+v\n", msg)
break Loop
@@ -260,7 +261,7 @@ Loop:
// Mactime dump uses MactimeDumpReply message as an end of the stream
// notification instead of the control ping.
-func mactimeDump(stream api.Stream, ) {
+func mactimeDump(stream api.Stream) {
fmt.Println("Sending mactime dump..")
if err := stream.SendMsg(&mactime.MactimeDump{}); err != nil {
diff --git a/internal/testbinapi/binapi2001/abf/abf.ba.go b/internal/testbinapi/binapi2001/abf/abf.ba.go
index a7b67bd..ce80c2f 100644
--- a/internal/testbinapi/binapi2001/abf/abf.ba.go
+++ b/internal/testbinapi/binapi2001/abf/abf.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/abf.api.json
@@ -17,11 +17,12 @@ package abf
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -640,12 +641,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -674,12 +678,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -708,12 +715,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -753,6 +763,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -765,8 +779,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -776,12 +791,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -855,18 +873,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -909,18 +931,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -971,6 +997,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -981,13 +1008,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -1005,8 +1035,9 @@ type PrefixMatcher struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/abf/abf_rpc.ba.go b/internal/testbinapi/binapi2001/abf/abf_rpc.ba.go
index 0d98cfc..c59d448 100644
--- a/internal/testbinapi/binapi2001/abf/abf_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/abf/abf_rpc.ba.go
@@ -5,12 +5,13 @@ package abf
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service abf.
+// RPCService defines RPC service abf.
type RPCService interface {
AbfItfAttachAddDel(ctx context.Context, in *AbfItfAttachAddDel) (*AbfItfAttachAddDelReply, error)
AbfItfAttachDump(ctx context.Context, in *AbfItfAttachDump) (RPCService_AbfItfAttachDumpClient, error)
@@ -33,7 +34,7 @@ func (c *serviceClient) AbfItfAttachAddDel(ctx context.Context, in *AbfItfAttach
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) AbfItfAttachDump(ctx context.Context, in *AbfItfAttachDump) (RPCService_AbfItfAttachDumpClient, error) {
@@ -69,6 +70,10 @@ func (c *serviceClient_AbfItfAttachDumpClient) Recv() (*AbfItfAttachDetails, err
case *AbfItfAttachDetails:
return m, nil
case *vpe.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)
@@ -90,7 +95,7 @@ func (c *serviceClient) AbfPolicyAddDel(ctx context.Context, in *AbfPolicyAddDel
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) AbfPolicyDump(ctx context.Context, in *AbfPolicyDump) (RPCService_AbfPolicyDumpClient, error) {
@@ -126,6 +131,10 @@ func (c *serviceClient_AbfPolicyDumpClient) Recv() (*AbfPolicyDetails, error) {
case *AbfPolicyDetails:
return m, nil
case *vpe.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)
diff --git a/internal/testbinapi/binapi2001/acl/acl.ba.go b/internal/testbinapi/binapi2001/acl/acl.ba.go
index 091f63a..f21b2ae 100644
--- a/internal/testbinapi/binapi2001/acl/acl.ba.go
+++ b/internal/testbinapi/binapi2001/acl/acl.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/acl.api.json
diff --git a/internal/testbinapi/binapi2001/acl/acl_rpc.ba.go b/internal/testbinapi/binapi2001/acl/acl_rpc.ba.go
index 5e23fef..ecaa865 100644
--- a/internal/testbinapi/binapi2001/acl/acl_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/acl/acl_rpc.ba.go
@@ -5,12 +5,13 @@ package acl
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service acl.
+// RPCService defines RPC service acl.
type RPCService interface {
ACLAddReplace(ctx context.Context, in *ACLAddReplace) (*ACLAddReplaceReply, error)
ACLDel(ctx context.Context, in *ACLDel) (*ACLDelReply, error)
@@ -47,7 +48,7 @@ func (c *serviceClient) ACLAddReplace(ctx context.Context, in *ACLAddReplace) (*
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) ACLDel(ctx context.Context, in *ACLDel) (*ACLDelReply, error) {
@@ -56,7 +57,7 @@ func (c *serviceClient) ACLDel(ctx context.Context, in *ACLDel) (*ACLDelReply, e
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) ACLDump(ctx context.Context, in *ACLDump) (RPCService_ACLDumpClient, error) {
@@ -92,6 +93,10 @@ func (c *serviceClient_ACLDumpClient) Recv() (*ACLDetails, error) {
case *ACLDetails:
return m, nil
case *vpe.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)
@@ -104,7 +109,7 @@ func (c *serviceClient) ACLInterfaceAddDel(ctx context.Context, in *ACLInterface
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) ACLInterfaceEtypeWhitelistDump(ctx context.Context, in *ACLInterfaceEtypeWhitelistDump) (RPCService_ACLInterfaceEtypeWhitelistDumpClient, error) {
@@ -140,6 +145,10 @@ func (c *serviceClient_ACLInterfaceEtypeWhitelistDumpClient) Recv() (*ACLInterfa
case *ACLInterfaceEtypeWhitelistDetails:
return m, nil
case *vpe.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)
@@ -179,6 +188,10 @@ func (c *serviceClient_ACLInterfaceListDumpClient) Recv() (*ACLInterfaceListDeta
case *ACLInterfaceListDetails:
return m, nil
case *vpe.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)
@@ -191,7 +204,7 @@ func (c *serviceClient) ACLInterfaceSetACLList(ctx context.Context, in *ACLInter
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) ACLInterfaceSetEtypeWhitelist(ctx context.Context, in *ACLInterfaceSetEtypeWhitelist) (*ACLInterfaceSetEtypeWhitelistReply, error) {
@@ -200,7 +213,7 @@ func (c *serviceClient) ACLInterfaceSetEtypeWhitelist(ctx context.Context, in *A
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) ACLPluginControlPing(ctx context.Context, in *ACLPluginControlPing) (*ACLPluginControlPingReply, error) {
@@ -209,7 +222,7 @@ func (c *serviceClient) ACLPluginControlPing(ctx context.Context, in *ACLPluginC
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) ACLPluginGetConnTableMaxEntries(ctx context.Context, in *ACLPluginGetConnTableMaxEntries) (*ACLPluginGetConnTableMaxEntriesReply, error) {
@@ -236,7 +249,7 @@ func (c *serviceClient) ACLStatsIntfCountersEnable(ctx context.Context, in *ACLS
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) MacipACLAdd(ctx context.Context, in *MacipACLAdd) (*MacipACLAddReply, error) {
@@ -245,7 +258,7 @@ func (c *serviceClient) MacipACLAdd(ctx context.Context, in *MacipACLAdd) (*Maci
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) MacipACLAddReplace(ctx context.Context, in *MacipACLAddReplace) (*MacipACLAddReplaceReply, error) {
@@ -254,7 +267,7 @@ func (c *serviceClient) MacipACLAddReplace(ctx context.Context, in *MacipACLAddR
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) MacipACLDel(ctx context.Context, in *MacipACLDel) (*MacipACLDelReply, error) {
@@ -263,7 +276,7 @@ func (c *serviceClient) MacipACLDel(ctx context.Context, in *MacipACLDel) (*Maci
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) MacipACLDump(ctx context.Context, in *MacipACLDump) (RPCService_MacipACLDumpClient, error) {
@@ -299,6 +312,10 @@ func (c *serviceClient_MacipACLDumpClient) Recv() (*MacipACLDetails, error) {
case *MacipACLDetails:
return m, nil
case *vpe.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)
@@ -311,7 +328,7 @@ func (c *serviceClient) MacipACLInterfaceAddDel(ctx context.Context, in *MacipAC
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) MacipACLInterfaceGet(ctx context.Context, in *MacipACLInterfaceGet) (*MacipACLInterfaceGetReply, error) {
@@ -356,6 +373,10 @@ func (c *serviceClient_MacipACLInterfaceListDumpClient) Recv() (*MacipACLInterfa
case *MacipACLInterfaceListDetails:
return m, nil
case *vpe.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)
diff --git a/internal/testbinapi/binapi2001/acl_types/acl_types.ba.go b/internal/testbinapi/binapi2001/acl_types/acl_types.ba.go
index 6f8d39d..e5ae659 100644
--- a/internal/testbinapi/binapi2001/acl_types/acl_types.ba.go
+++ b/internal/testbinapi/binapi2001/acl_types/acl_types.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/acl_types.api.json
@@ -21,6 +21,12 @@ import (
// GoVPP api package needs to be updated.
const _ = api.GoVppAPIPackageIsVersion2
+const (
+ APIFile = "acl_types"
+ APIVersion = ""
+ VersionCrc = 0x1803336d
+)
+
// ACLRule defines type 'acl_rule'.
type ACLRule struct {
IsPermit uint8 `binapi:"u8,name=is_permit" json:"is_permit,omitempty"`
diff --git a/internal/testbinapi/binapi2001/af_packet/af_packet.ba.go b/internal/testbinapi/binapi2001/af_packet/af_packet.ba.go
index ff82ee7..a3a8183 100644
--- a/internal/testbinapi/binapi2001/af_packet/af_packet.ba.go
+++ b/internal/testbinapi/binapi2001/af_packet/af_packet.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/af_packet.api.json
@@ -14,10 +14,11 @@
package af_packet
import (
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -298,15 +299,19 @@ func ParseMacAddress(s string) (MacAddress, error) {
copy(macaddr[:], mac[:])
return macaddr, nil
}
+
func (x MacAddress) ToMAC() net.HardwareAddr {
return net.HardwareAddr(x[:])
}
+
func (x MacAddress) String() string {
return x.ToMAC().String()
}
+
func (x *MacAddress) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *MacAddress) UnmarshalText(text []byte) error {
mac, err := ParseMacAddress(string(text))
if err != nil {
diff --git a/internal/testbinapi/binapi2001/af_packet/af_packet_rpc.ba.go b/internal/testbinapi/binapi2001/af_packet/af_packet_rpc.ba.go
index 4b0fc7c..19355ab 100644
--- a/internal/testbinapi/binapi2001/af_packet/af_packet_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/af_packet/af_packet_rpc.ba.go
@@ -5,12 +5,13 @@ package af_packet
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service af_packet.
+// RPCService defines RPC service af_packet.
type RPCService interface {
AfPacketCreate(ctx context.Context, in *AfPacketCreate) (*AfPacketCreateReply, error)
AfPacketDelete(ctx context.Context, in *AfPacketDelete) (*AfPacketDeleteReply, error)
@@ -32,7 +33,7 @@ func (c *serviceClient) AfPacketCreate(ctx context.Context, in *AfPacketCreate)
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) AfPacketDelete(ctx context.Context, in *AfPacketDelete) (*AfPacketDeleteReply, error) {
@@ -41,7 +42,7 @@ func (c *serviceClient) AfPacketDelete(ctx context.Context, in *AfPacketDelete)
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) AfPacketDump(ctx context.Context, in *AfPacketDump) (RPCService_AfPacketDumpClient, error) {
@@ -77,6 +78,10 @@ func (c *serviceClient_AfPacketDumpClient) Recv() (*AfPacketDetails, error) {
case *AfPacketDetails:
return m, nil
case *vpe.ControlPingReply:
+ err = c.Stream.Close()
+ if err != nil {
+ return nil, err
+ }
return nil, io.EOF
default:
return nil, fmt.Errorf("unexpected message: %T %v", m, m)
@@ -89,5 +94,5 @@ func (c *serviceClient) AfPacketSetL4CksumOffload(ctx context.Context, in *AfPac
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/arp/arp.ba.go b/internal/testbinapi/binapi2001/arp/arp.ba.go
index 988cfb3..04b0e26 100644
--- a/internal/testbinapi/binapi2001/arp/arp.ba.go
+++ b/internal/testbinapi/binapi2001/arp/arp.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/arp.api.json
@@ -17,11 +17,12 @@ package arp
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -498,12 +499,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -532,12 +536,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -566,12 +573,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -596,15 +606,19 @@ func ParseMacAddress(s string) (MacAddress, error) {
copy(macaddr[:], mac[:])
return macaddr, nil
}
+
func (x MacAddress) ToMAC() net.HardwareAddr {
return net.HardwareAddr(x[:])
}
+
func (x MacAddress) String() string {
return x.ToMAC().String()
}
+
func (x *MacAddress) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *MacAddress) UnmarshalText(text []byte) error {
mac, err := ParseMacAddress(string(text))
if err != nil {
@@ -625,6 +639,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -637,8 +655,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -648,12 +667,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -696,18 +718,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -750,18 +776,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -812,6 +842,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -822,13 +853,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -853,8 +887,9 @@ type ProxyArp struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/arp/arp_rpc.ba.go b/internal/testbinapi/binapi2001/arp/arp_rpc.ba.go
index 77e6a26..79b7ed8 100644
--- a/internal/testbinapi/binapi2001/arp/arp_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/arp/arp_rpc.ba.go
@@ -5,12 +5,13 @@ package arp
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service arp.
+// RPCService defines RPC service arp.
type RPCService interface {
ProxyArpAddDel(ctx context.Context, in *ProxyArpAddDel) (*ProxyArpAddDelReply, error)
ProxyArpDump(ctx context.Context, in *ProxyArpDump) (RPCService_ProxyArpDumpClient, error)
@@ -32,7 +33,7 @@ func (c *serviceClient) ProxyArpAddDel(ctx context.Context, in *ProxyArpAddDel)
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) ProxyArpDump(ctx context.Context, in *ProxyArpDump) (RPCService_ProxyArpDumpClient, error) {
@@ -68,6 +69,10 @@ func (c *serviceClient_ProxyArpDumpClient) Recv() (*ProxyArpDetails, error) {
case *ProxyArpDetails:
return m, nil
case *vpe.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)
@@ -107,6 +112,10 @@ func (c *serviceClient_ProxyArpIntfcDumpClient) Recv() (*ProxyArpIntfcDetails, e
case *ProxyArpIntfcDetails:
return m, nil
case *vpe.ControlPingReply:
+ err = c.Stream.Close()
+ if err != nil {
+ return nil, err
+ }
return nil, io.EOF
default:
return nil, fmt.Errorf("unexpected message: %T %v", m, m)
@@ -119,5 +128,5 @@ func (c *serviceClient) ProxyArpIntfcEnableDisable(ctx context.Context, in *Prox
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/avf/avf.ba.go b/internal/testbinapi/binapi2001/avf/avf.ba.go
index 06b17e5..da63230 100644
--- a/internal/testbinapi/binapi2001/avf/avf.ba.go
+++ b/internal/testbinapi/binapi2001/avf/avf.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/avf.api.json
@@ -14,9 +14,10 @@
package avf
import (
+ "strconv"
+
api "git.fd.io/govpp.git/api"
codec "git.fd.io/govpp.git/codec"
- "strconv"
)
// This is a compile-time assertion to ensure that this generated file
diff --git a/internal/testbinapi/binapi2001/avf/avf_rpc.ba.go b/internal/testbinapi/binapi2001/avf/avf_rpc.ba.go
index 90f854e..5747834 100644
--- a/internal/testbinapi/binapi2001/avf/avf_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/avf/avf_rpc.ba.go
@@ -4,10 +4,11 @@ package avf
import (
"context"
+
api "git.fd.io/govpp.git/api"
)
-// RPCService defines RPC service avf.
+// RPCService defines RPC service avf.
type RPCService interface {
AvfCreate(ctx context.Context, in *AvfCreate) (*AvfCreateReply, error)
AvfDelete(ctx context.Context, in *AvfDelete) (*AvfDeleteReply, error)
@@ -27,7 +28,7 @@ func (c *serviceClient) AvfCreate(ctx context.Context, in *AvfCreate) (*AvfCreat
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) AvfDelete(ctx context.Context, in *AvfDelete) (*AvfDeleteReply, error) {
@@ -36,5 +37,5 @@ func (c *serviceClient) AvfDelete(ctx context.Context, in *AvfDelete) (*AvfDelet
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/bfd/bfd.ba.go b/internal/testbinapi/binapi2001/bfd/bfd.ba.go
index 236c511..f83cc33 100644
--- a/internal/testbinapi/binapi2001/bfd/bfd.ba.go
+++ b/internal/testbinapi/binapi2001/bfd/bfd.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/bfd.api.json
@@ -17,11 +17,12 @@ package bfd
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -531,12 +532,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -565,12 +569,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -599,12 +606,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -628,6 +638,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -640,8 +654,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -651,12 +666,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -699,18 +717,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -753,18 +775,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -815,6 +841,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -825,13 +852,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -849,8 +879,9 @@ type PrefixMatcher struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/bfd/bfd_rpc.ba.go b/internal/testbinapi/binapi2001/bfd/bfd_rpc.ba.go
index 214b2a3..a9a9472 100644
--- a/internal/testbinapi/binapi2001/bfd/bfd_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/bfd/bfd_rpc.ba.go
@@ -5,12 +5,13 @@ package bfd
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service bfd.
+// RPCService defines RPC service bfd.
type RPCService interface {
BfdAuthDelKey(ctx context.Context, in *BfdAuthDelKey) (*BfdAuthDelKeyReply, error)
BfdAuthKeysDump(ctx context.Context, in *BfdAuthKeysDump) (RPCService_BfdAuthKeysDumpClient, error)
@@ -42,7 +43,7 @@ func (c *serviceClient) BfdAuthDelKey(ctx context.Context, in *BfdAuthDelKey) (*
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) BfdAuthKeysDump(ctx context.Context, in *BfdAuthKeysDump) (RPCService_BfdAuthKeysDumpClient, error) {
@@ -78,6 +79,10 @@ func (c *serviceClient_BfdAuthKeysDumpClient) Recv() (*BfdAuthKeysDetails, error
case *BfdAuthKeysDetails:
return m, nil
case *vpe.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)
@@ -90,7 +95,7 @@ func (c *serviceClient) BfdAuthSetKey(ctx context.Context, in *BfdAuthSetKey) (*
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) BfdUDPAdd(ctx context.Context, in *BfdUDPAdd) (*BfdUDPAddReply, error) {
@@ -99,7 +104,7 @@ func (c *serviceClient) BfdUDPAdd(ctx context.Context, in *BfdUDPAdd) (*BfdUDPAd
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) BfdUDPAuthActivate(ctx context.Context, in *BfdUDPAuthActivate) (*BfdUDPAuthActivateReply, error) {
@@ -108,7 +113,7 @@ func (c *serviceClient) BfdUDPAuthActivate(ctx context.Context, in *BfdUDPAuthAc
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) BfdUDPAuthDeactivate(ctx context.Context, in *BfdUDPAuthDeactivate) (*BfdUDPAuthDeactivateReply, error) {
@@ -117,7 +122,7 @@ func (c *serviceClient) BfdUDPAuthDeactivate(ctx context.Context, in *BfdUDPAuth
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) BfdUDPDel(ctx context.Context, in *BfdUDPDel) (*BfdUDPDelReply, error) {
@@ -126,7 +131,7 @@ func (c *serviceClient) BfdUDPDel(ctx context.Context, in *BfdUDPDel) (*BfdUDPDe
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) BfdUDPDelEchoSource(ctx context.Context, in *BfdUDPDelEchoSource) (*BfdUDPDelEchoSourceReply, error) {
@@ -135,7 +140,7 @@ func (c *serviceClient) BfdUDPDelEchoSource(ctx context.Context, in *BfdUDPDelEc
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) BfdUDPGetEchoSource(ctx context.Context, in *BfdUDPGetEchoSource) (*BfdUDPGetEchoSourceReply, error) {
@@ -144,7 +149,7 @@ func (c *serviceClient) BfdUDPGetEchoSource(ctx context.Context, in *BfdUDPGetEc
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) BfdUDPMod(ctx context.Context, in *BfdUDPMod) (*BfdUDPModReply, error) {
@@ -153,7 +158,7 @@ func (c *serviceClient) BfdUDPMod(ctx context.Context, in *BfdUDPMod) (*BfdUDPMo
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) BfdUDPSessionDump(ctx context.Context, in *BfdUDPSessionDump) (RPCService_BfdUDPSessionDumpClient, error) {
@@ -189,6 +194,10 @@ func (c *serviceClient_BfdUDPSessionDumpClient) Recv() (*BfdUDPSessionDetails, e
case *BfdUDPSessionDetails:
return m, nil
case *vpe.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)
@@ -201,7 +210,7 @@ func (c *serviceClient) BfdUDPSessionSetFlags(ctx context.Context, in *BfdUDPSes
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) BfdUDPSetEchoSource(ctx context.Context, in *BfdUDPSetEchoSource) (*BfdUDPSetEchoSourceReply, error) {
@@ -210,7 +219,7 @@ func (c *serviceClient) BfdUDPSetEchoSource(ctx context.Context, in *BfdUDPSetEc
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) WantBfdEvents(ctx context.Context, in *WantBfdEvents) (*WantBfdEventsReply, error) {
@@ -219,5 +228,5 @@ func (c *serviceClient) WantBfdEvents(ctx context.Context, in *WantBfdEvents) (*
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/bier/bier.ba.go b/internal/testbinapi/binapi2001/bier/bier.ba.go
index 238aa23..ed46a97 100644
--- a/internal/testbinapi/binapi2001/bier/bier.ba.go
+++ b/internal/testbinapi/binapi2001/bier/bier.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/bier.api.json
@@ -17,11 +17,12 @@ package bier
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -389,12 +390,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -420,12 +424,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -454,12 +461,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -483,6 +493,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -495,8 +509,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -506,12 +521,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -600,18 +618,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -654,18 +676,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -716,6 +742,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -726,13 +753,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -750,8 +780,9 @@ type PrefixMatcher struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/bier/bier_rpc.ba.go b/internal/testbinapi/binapi2001/bier/bier_rpc.ba.go
index ae6d90f..a16cb9b 100644
--- a/internal/testbinapi/binapi2001/bier/bier_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/bier/bier_rpc.ba.go
@@ -5,12 +5,13 @@ package bier
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service bier.
+// RPCService defines RPC service bier.
type RPCService interface {
BierDispEntryAddDel(ctx context.Context, in *BierDispEntryAddDel) (*BierDispEntryAddDelReply, error)
BierDispEntryDump(ctx context.Context, in *BierDispEntryDump) (RPCService_BierDispEntryDumpClient, error)
@@ -39,7 +40,7 @@ func (c *serviceClient) BierDispEntryAddDel(ctx context.Context, in *BierDispEnt
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) BierDispEntryDump(ctx context.Context, in *BierDispEntryDump) (RPCService_BierDispEntryDumpClient, error) {
@@ -75,6 +76,10 @@ func (c *serviceClient_BierDispEntryDumpClient) Recv() (*BierDispEntryDetails, e
case *BierDispEntryDetails:
return m, nil
case *vpe.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)
@@ -87,7 +92,7 @@ func (c *serviceClient) BierDispTableAddDel(ctx context.Context, in *BierDispTab
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) BierDispTableDump(ctx context.Context, in *BierDispTableDump) (RPCService_BierDispTableDumpClient, error) {
@@ -123,6 +128,10 @@ func (c *serviceClient_BierDispTableDumpClient) Recv() (*BierDispTableDetails, e
case *BierDispTableDetails:
return m, nil
case *vpe.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)
@@ -135,7 +144,7 @@ func (c *serviceClient) BierImpAdd(ctx context.Context, in *BierImpAdd) (*BierIm
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) BierImpDel(ctx context.Context, in *BierImpDel) (*BierImpDelReply, error) {
@@ -144,7 +153,7 @@ func (c *serviceClient) BierImpDel(ctx context.Context, in *BierImpDel) (*BierIm
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) BierImpDump(ctx context.Context, in *BierImpDump) (RPCService_BierImpDumpClient, error) {
@@ -180,6 +189,10 @@ func (c *serviceClient_BierImpDumpClient) Recv() (*BierImpDetails, error) {
case *BierImpDetails:
return m, nil
case *vpe.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)
@@ -192,7 +205,7 @@ func (c *serviceClient) BierRouteAddDel(ctx context.Context, in *BierRouteAddDel
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) BierRouteDump(ctx context.Context, in *BierRouteDump) (RPCService_BierRouteDumpClient, error) {
@@ -228,6 +241,10 @@ func (c *serviceClient_BierRouteDumpClient) Recv() (*BierRouteDetails, error) {
case *BierRouteDetails:
return m, nil
case *vpe.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)
@@ -240,7 +257,7 @@ func (c *serviceClient) BierTableAddDel(ctx context.Context, in *BierTableAddDel
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) BierTableDump(ctx context.Context, in *BierTableDump) (RPCService_BierTableDumpClient, error) {
@@ -276,6 +293,10 @@ func (c *serviceClient_BierTableDumpClient) Recv() (*BierTableDetails, error) {
case *BierTableDetails:
return m, nil
case *vpe.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)
diff --git a/internal/testbinapi/binapi2001/bond/bond.ba.go b/internal/testbinapi/binapi2001/bond/bond.ba.go
index acee8b8..38e81cb 100644
--- a/internal/testbinapi/binapi2001/bond/bond.ba.go
+++ b/internal/testbinapi/binapi2001/bond/bond.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/bond.api.json
@@ -14,10 +14,11 @@
package bond
import (
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -373,15 +374,19 @@ func ParseMacAddress(s string) (MacAddress, error) {
copy(macaddr[:], mac[:])
return macaddr, nil
}
+
func (x MacAddress) ToMAC() net.HardwareAddr {
return net.HardwareAddr(x[:])
}
+
func (x MacAddress) String() string {
return x.ToMAC().String()
}
+
func (x *MacAddress) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *MacAddress) UnmarshalText(text []byte) error {
mac, err := ParseMacAddress(string(text))
if err != nil {
diff --git a/internal/testbinapi/binapi2001/bond/bond_rpc.ba.go b/internal/testbinapi/binapi2001/bond/bond_rpc.ba.go
index e59e0b0..d9625d9 100644
--- a/internal/testbinapi/binapi2001/bond/bond_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/bond/bond_rpc.ba.go
@@ -5,12 +5,13 @@ package bond
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service bond.
+// RPCService defines RPC service bond.
type RPCService interface {
BondCreate(ctx context.Context, in *BondCreate) (*BondCreateReply, error)
BondDelete(ctx context.Context, in *BondDelete) (*BondDeleteReply, error)
@@ -35,7 +36,7 @@ func (c *serviceClient) BondCreate(ctx context.Context, in *BondCreate) (*BondCr
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) BondDelete(ctx context.Context, in *BondDelete) (*BondDeleteReply, error) {
@@ -44,7 +45,7 @@ func (c *serviceClient) BondDelete(ctx context.Context, in *BondDelete) (*BondDe
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) BondDetachSlave(ctx context.Context, in *BondDetachSlave) (*BondDetachSlaveReply, error) {
@@ -53,7 +54,7 @@ func (c *serviceClient) BondDetachSlave(ctx context.Context, in *BondDetachSlave
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) BondEnslave(ctx context.Context, in *BondEnslave) (*BondEnslaveReply, error) {
@@ -62,7 +63,7 @@ func (c *serviceClient) BondEnslave(ctx context.Context, in *BondEnslave) (*Bond
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SwInterfaceBondDump(ctx context.Context, in *SwInterfaceBondDump) (RPCService_SwInterfaceBondDumpClient, error) {
@@ -98,6 +99,10 @@ func (c *serviceClient_SwInterfaceBondDumpClient) Recv() (*SwInterfaceBondDetail
case *SwInterfaceBondDetails:
return m, nil
case *vpe.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)
@@ -110,7 +115,7 @@ func (c *serviceClient) SwInterfaceSetBondWeight(ctx context.Context, in *SwInte
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SwInterfaceSlaveDump(ctx context.Context, in *SwInterfaceSlaveDump) (RPCService_SwInterfaceSlaveDumpClient, error) {
@@ -146,6 +151,10 @@ func (c *serviceClient_SwInterfaceSlaveDumpClient) Recv() (*SwInterfaceSlaveDeta
case *SwInterfaceSlaveDetails:
return m, nil
case *vpe.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)
diff --git a/internal/testbinapi/binapi2001/builtinurl/builtinurl.ba.go b/internal/testbinapi/binapi2001/builtinurl/builtinurl.ba.go
index 5488027..c0f59e9 100644
--- a/internal/testbinapi/binapi2001/builtinurl/builtinurl.ba.go
+++ b/internal/testbinapi/binapi2001/builtinurl/builtinurl.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/builtinurl.api.json
diff --git a/internal/testbinapi/binapi2001/builtinurl/builtinurl_rpc.ba.go b/internal/testbinapi/binapi2001/builtinurl/builtinurl_rpc.ba.go
index 6857de2..f44e843 100644
--- a/internal/testbinapi/binapi2001/builtinurl/builtinurl_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/builtinurl/builtinurl_rpc.ba.go
@@ -4,10 +4,11 @@ package builtinurl
import (
"context"
+
api "git.fd.io/govpp.git/api"
)
-// RPCService defines RPC service builtinurl.
+// RPCService defines RPC service builtinurl.
type RPCService interface {
BuiltinurlEnable(ctx context.Context, in *BuiltinurlEnable) (*BuiltinurlEnableReply, error)
}
@@ -26,5 +27,5 @@ func (c *serviceClient) BuiltinurlEnable(ctx context.Context, in *BuiltinurlEnab
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/cdp/cdp.ba.go b/internal/testbinapi/binapi2001/cdp/cdp.ba.go
index 295be82..ef5c91b 100644
--- a/internal/testbinapi/binapi2001/cdp/cdp.ba.go
+++ b/internal/testbinapi/binapi2001/cdp/cdp.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/cdp.api.json
diff --git a/internal/testbinapi/binapi2001/cdp/cdp_rpc.ba.go b/internal/testbinapi/binapi2001/cdp/cdp_rpc.ba.go
index a910833..8eac86c 100644
--- a/internal/testbinapi/binapi2001/cdp/cdp_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/cdp/cdp_rpc.ba.go
@@ -4,10 +4,11 @@ package cdp
import (
"context"
+
api "git.fd.io/govpp.git/api"
)
-// RPCService defines RPC service cdp.
+// RPCService defines RPC service cdp.
type RPCService interface {
CdpEnableDisable(ctx context.Context, in *CdpEnableDisable) (*CdpEnableDisableReply, error)
}
@@ -26,5 +27,5 @@ func (c *serviceClient) CdpEnableDisable(ctx context.Context, in *CdpEnableDisab
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/classify/classify.ba.go b/internal/testbinapi/binapi2001/classify/classify.ba.go
index 9ec195e..b542382 100644
--- a/internal/testbinapi/binapi2001/classify/classify.ba.go
+++ b/internal/testbinapi/binapi2001/classify/classify.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/classify.api.json
@@ -14,9 +14,10 @@
package classify
import (
+ "strconv"
+
api "git.fd.io/govpp.git/api"
codec "git.fd.io/govpp.git/codec"
- "strconv"
)
// This is a compile-time assertion to ensure that this generated file
diff --git a/internal/testbinapi/binapi2001/classify/classify_rpc.ba.go b/internal/testbinapi/binapi2001/classify/classify_rpc.ba.go
index fd2fcff..a2b6564 100644
--- a/internal/testbinapi/binapi2001/classify/classify_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/classify/classify_rpc.ba.go
@@ -5,12 +5,13 @@ package classify
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service classify.
+// RPCService defines RPC service classify.
type RPCService interface {
ClassifyAddDelSession(ctx context.Context, in *ClassifyAddDelSession) (*ClassifyAddDelSessionReply, error)
ClassifyAddDelTable(ctx context.Context, in *ClassifyAddDelTable) (*ClassifyAddDelTableReply, error)
@@ -42,7 +43,7 @@ func (c *serviceClient) ClassifyAddDelSession(ctx context.Context, in *ClassifyA
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) ClassifyAddDelTable(ctx context.Context, in *ClassifyAddDelTable) (*ClassifyAddDelTableReply, error) {
@@ -51,7 +52,7 @@ func (c *serviceClient) ClassifyAddDelTable(ctx context.Context, in *ClassifyAdd
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) ClassifySessionDump(ctx context.Context, in *ClassifySessionDump) (RPCService_ClassifySessionDumpClient, error) {
@@ -87,6 +88,10 @@ func (c *serviceClient_ClassifySessionDumpClient) Recv() (*ClassifySessionDetail
case *ClassifySessionDetails:
return m, nil
case *vpe.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)
@@ -99,7 +104,7 @@ func (c *serviceClient) ClassifySetInterfaceIPTable(ctx context.Context, in *Cla
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) ClassifySetInterfaceL2Tables(ctx context.Context, in *ClassifySetInterfaceL2Tables) (*ClassifySetInterfaceL2TablesReply, error) {
@@ -108,7 +113,7 @@ func (c *serviceClient) ClassifySetInterfaceL2Tables(ctx context.Context, in *Cl
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) ClassifyTableByInterface(ctx context.Context, in *ClassifyTableByInterface) (*ClassifyTableByInterfaceReply, error) {
@@ -117,7 +122,7 @@ func (c *serviceClient) ClassifyTableByInterface(ctx context.Context, in *Classi
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) ClassifyTableIds(ctx context.Context, in *ClassifyTableIds) (*ClassifyTableIdsReply, error) {
@@ -126,7 +131,7 @@ func (c *serviceClient) ClassifyTableIds(ctx context.Context, in *ClassifyTableI
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) ClassifyTableInfo(ctx context.Context, in *ClassifyTableInfo) (*ClassifyTableInfoReply, error) {
@@ -135,7 +140,7 @@ func (c *serviceClient) ClassifyTableInfo(ctx context.Context, in *ClassifyTable
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) FlowClassifyDump(ctx context.Context, in *FlowClassifyDump) (RPCService_FlowClassifyDumpClient, error) {
@@ -171,6 +176,10 @@ func (c *serviceClient_FlowClassifyDumpClient) Recv() (*FlowClassifyDetails, err
case *FlowClassifyDetails:
return m, nil
case *vpe.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)
@@ -183,7 +192,7 @@ func (c *serviceClient) FlowClassifySetInterface(ctx context.Context, in *FlowCl
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) InputACLSetInterface(ctx context.Context, in *InputACLSetInterface) (*InputACLSetInterfaceReply, error) {
@@ -192,7 +201,7 @@ func (c *serviceClient) InputACLSetInterface(ctx context.Context, in *InputACLSe
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) OutputACLSetInterface(ctx context.Context, in *OutputACLSetInterface) (*OutputACLSetInterfaceReply, error) {
@@ -201,7 +210,7 @@ func (c *serviceClient) OutputACLSetInterface(ctx context.Context, in *OutputACL
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) PolicerClassifyDump(ctx context.Context, in *PolicerClassifyDump) (RPCService_PolicerClassifyDumpClient, error) {
@@ -237,6 +246,10 @@ func (c *serviceClient_PolicerClassifyDumpClient) Recv() (*PolicerClassifyDetail
case *PolicerClassifyDetails:
return m, nil
case *vpe.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)
@@ -249,5 +262,5 @@ func (c *serviceClient) PolicerClassifySetInterface(ctx context.Context, in *Pol
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/cop/cop.ba.go b/internal/testbinapi/binapi2001/cop/cop.ba.go
index a65e454..d05b727 100644
--- a/internal/testbinapi/binapi2001/cop/cop.ba.go
+++ b/internal/testbinapi/binapi2001/cop/cop.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/cop.api.json
@@ -14,9 +14,10 @@
package cop
import (
+ "strconv"
+
api "git.fd.io/govpp.git/api"
codec "git.fd.io/govpp.git/codec"
- "strconv"
)
// This is a compile-time assertion to ensure that this generated file
diff --git a/internal/testbinapi/binapi2001/cop/cop_rpc.ba.go b/internal/testbinapi/binapi2001/cop/cop_rpc.ba.go
index 9f6f84e..120613d 100644
--- a/internal/testbinapi/binapi2001/cop/cop_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/cop/cop_rpc.ba.go
@@ -4,10 +4,11 @@ package cop
import (
"context"
+
api "git.fd.io/govpp.git/api"
)
-// RPCService defines RPC service cop.
+// RPCService defines RPC service cop.
type RPCService interface {
CopInterfaceEnableDisable(ctx context.Context, in *CopInterfaceEnableDisable) (*CopInterfaceEnableDisableReply, error)
CopWhitelistEnableDisable(ctx context.Context, in *CopWhitelistEnableDisable) (*CopWhitelistEnableDisableReply, error)
@@ -27,7 +28,7 @@ func (c *serviceClient) CopInterfaceEnableDisable(ctx context.Context, in *CopIn
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) CopWhitelistEnableDisable(ctx context.Context, in *CopWhitelistEnableDisable) (*CopWhitelistEnableDisableReply, error) {
@@ -36,5 +37,5 @@ func (c *serviceClient) CopWhitelistEnableDisable(ctx context.Context, in *CopWh
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/ct6/ct6.ba.go b/internal/testbinapi/binapi2001/ct6/ct6.ba.go
index d8edfbd..80727b8 100644
--- a/internal/testbinapi/binapi2001/ct6/ct6.ba.go
+++ b/internal/testbinapi/binapi2001/ct6/ct6.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/ct6.api.json
@@ -14,9 +14,10 @@
package ct6
import (
+ "strconv"
+
api "git.fd.io/govpp.git/api"
codec "git.fd.io/govpp.git/codec"
- "strconv"
)
// This is a compile-time assertion to ensure that this generated file
diff --git a/internal/testbinapi/binapi2001/ct6/ct6_rpc.ba.go b/internal/testbinapi/binapi2001/ct6/ct6_rpc.ba.go
index 888fd32..fcae22d 100644
--- a/internal/testbinapi/binapi2001/ct6/ct6_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/ct6/ct6_rpc.ba.go
@@ -4,10 +4,11 @@ package ct6
import (
"context"
+
api "git.fd.io/govpp.git/api"
)
-// RPCService defines RPC service ct6.
+// RPCService defines RPC service ct6.
type RPCService interface {
Ct6EnableDisable(ctx context.Context, in *Ct6EnableDisable) (*Ct6EnableDisableReply, error)
}
@@ -26,5 +27,5 @@ func (c *serviceClient) Ct6EnableDisable(ctx context.Context, in *Ct6EnableDisab
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/dhcp/dhcp.ba.go b/internal/testbinapi/binapi2001/dhcp/dhcp.ba.go
index f75e7ed..a84d4da 100644
--- a/internal/testbinapi/binapi2001/dhcp/dhcp.ba.go
+++ b/internal/testbinapi/binapi2001/dhcp/dhcp.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/dhcp.api.json
@@ -17,11 +17,12 @@ package dhcp
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -621,12 +622,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -655,12 +659,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -689,12 +696,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -719,15 +729,19 @@ func ParseMacAddress(s string) (MacAddress, error) {
copy(macaddr[:], mac[:])
return macaddr, nil
}
+
func (x MacAddress) ToMAC() net.HardwareAddr {
return net.HardwareAddr(x[:])
}
+
func (x MacAddress) String() string {
return x.ToMAC().String()
}
+
func (x *MacAddress) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *MacAddress) UnmarshalText(text []byte) error {
mac, err := ParseMacAddress(string(text))
if err != nil {
@@ -748,6 +762,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -760,8 +778,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -771,12 +790,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -869,18 +891,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -923,18 +949,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -985,6 +1015,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -995,13 +1026,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -1019,8 +1053,9 @@ type PrefixMatcher struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/dhcp/dhcp_rpc.ba.go b/internal/testbinapi/binapi2001/dhcp/dhcp_rpc.ba.go
index ae59820..25918a0 100644
--- a/internal/testbinapi/binapi2001/dhcp/dhcp_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/dhcp/dhcp_rpc.ba.go
@@ -5,12 +5,13 @@ package dhcp
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service dhcp.
+// RPCService defines RPC service dhcp.
type RPCService interface {
DHCP6ClientsEnableDisable(ctx context.Context, in *DHCP6ClientsEnableDisable) (*DHCP6ClientsEnableDisableReply, error)
DHCP6DuidLlSet(ctx context.Context, in *DHCP6DuidLlSet) (*DHCP6DuidLlSetReply, error)
@@ -41,7 +42,7 @@ func (c *serviceClient) DHCP6ClientsEnableDisable(ctx context.Context, in *DHCP6
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) DHCP6DuidLlSet(ctx context.Context, in *DHCP6DuidLlSet) (*DHCP6DuidLlSetReply, error) {
@@ -50,7 +51,7 @@ func (c *serviceClient) DHCP6DuidLlSet(ctx context.Context, in *DHCP6DuidLlSet)
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) DHCP6PdSendClientMessage(ctx context.Context, in *DHCP6PdSendClientMessage) (*DHCP6PdSendClientMessageReply, error) {
@@ -59,7 +60,7 @@ func (c *serviceClient) DHCP6PdSendClientMessage(ctx context.Context, in *DHCP6P
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) DHCP6SendClientMessage(ctx context.Context, in *DHCP6SendClientMessage) (*DHCP6SendClientMessageReply, error) {
@@ -68,7 +69,7 @@ func (c *serviceClient) DHCP6SendClientMessage(ctx context.Context, in *DHCP6Sen
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) DHCPClientConfig(ctx context.Context, in *DHCPClientConfig) (*DHCPClientConfigReply, error) {
@@ -77,7 +78,7 @@ func (c *serviceClient) DHCPClientConfig(ctx context.Context, in *DHCPClientConf
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) DHCPClientDump(ctx context.Context, in *DHCPClientDump) (RPCService_DHCPClientDumpClient, error) {
@@ -113,6 +114,10 @@ func (c *serviceClient_DHCPClientDumpClient) Recv() (*DHCPClientDetails, error)
case *DHCPClientDetails:
return m, nil
case *vpe.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)
@@ -125,7 +130,7 @@ func (c *serviceClient) DHCPPluginControlPing(ctx context.Context, in *DHCPPlugi
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) DHCPPluginGetVersion(ctx context.Context, in *DHCPPluginGetVersion) (*DHCPPluginGetVersionReply, error) {
@@ -143,7 +148,7 @@ func (c *serviceClient) DHCPProxyConfig(ctx context.Context, in *DHCPProxyConfig
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) DHCPProxyDump(ctx context.Context, in *DHCPProxyDump) (RPCService_DHCPProxyDumpClient, error) {
@@ -179,6 +184,10 @@ func (c *serviceClient_DHCPProxyDumpClient) Recv() (*DHCPProxyDetails, error) {
case *DHCPProxyDetails:
return m, nil
case *vpe.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)
@@ -191,7 +200,7 @@ func (c *serviceClient) DHCPProxySetVss(ctx context.Context, in *DHCPProxySetVss
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) WantDHCP6PdReplyEvents(ctx context.Context, in *WantDHCP6PdReplyEvents) (*WantDHCP6PdReplyEventsReply, error) {
@@ -200,7 +209,7 @@ func (c *serviceClient) WantDHCP6PdReplyEvents(ctx context.Context, in *WantDHCP
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) WantDHCP6ReplyEvents(ctx context.Context, in *WantDHCP6ReplyEvents) (*WantDHCP6ReplyEventsReply, error) {
@@ -209,5 +218,5 @@ func (c *serviceClient) WantDHCP6ReplyEvents(ctx context.Context, in *WantDHCP6R
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/dhcp6_ia_na_client_cp/dhcp6_ia_na_client_cp.ba.go b/internal/testbinapi/binapi2001/dhcp6_ia_na_client_cp/dhcp6_ia_na_client_cp.ba.go
index 12059b2..7d25a0d 100644
--- a/internal/testbinapi/binapi2001/dhcp6_ia_na_client_cp/dhcp6_ia_na_client_cp.ba.go
+++ b/internal/testbinapi/binapi2001/dhcp6_ia_na_client_cp/dhcp6_ia_na_client_cp.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/dhcp6_ia_na_client_cp.api.json
@@ -14,9 +14,10 @@
package dhcp6_ia_na_client_cp
import (
+ "strconv"
+
api "git.fd.io/govpp.git/api"
codec "git.fd.io/govpp.git/codec"
- "strconv"
)
// This is a compile-time assertion to ensure that this generated file
diff --git a/internal/testbinapi/binapi2001/dhcp6_ia_na_client_cp/dhcp6_ia_na_client_cp_rpc.ba.go b/internal/testbinapi/binapi2001/dhcp6_ia_na_client_cp/dhcp6_ia_na_client_cp_rpc.ba.go
index b975236..3fbf238 100644
--- a/internal/testbinapi/binapi2001/dhcp6_ia_na_client_cp/dhcp6_ia_na_client_cp_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/dhcp6_ia_na_client_cp/dhcp6_ia_na_client_cp_rpc.ba.go
@@ -4,10 +4,11 @@ package dhcp6_ia_na_client_cp
import (
"context"
+
api "git.fd.io/govpp.git/api"
)
-// RPCService defines RPC service dhcp6_ia_na_client_cp.
+// RPCService defines RPC service dhcp6_ia_na_client_cp.
type RPCService interface {
DHCP6ClientEnableDisable(ctx context.Context, in *DHCP6ClientEnableDisable) (*DHCP6ClientEnableDisableReply, error)
}
@@ -26,5 +27,5 @@ func (c *serviceClient) DHCP6ClientEnableDisable(ctx context.Context, in *DHCP6C
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/dhcp6_pd_client_cp/dhcp6_pd_client_cp.ba.go b/internal/testbinapi/binapi2001/dhcp6_pd_client_cp/dhcp6_pd_client_cp.ba.go
index 9f9ba1d..0dc6920 100644
--- a/internal/testbinapi/binapi2001/dhcp6_pd_client_cp/dhcp6_pd_client_cp.ba.go
+++ b/internal/testbinapi/binapi2001/dhcp6_pd_client_cp/dhcp6_pd_client_cp.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/dhcp6_pd_client_cp.api.json
@@ -17,11 +17,12 @@ package dhcp6_pd_client_cp
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -498,12 +499,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -532,12 +536,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -566,12 +573,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -595,6 +605,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -607,8 +621,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -618,12 +633,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -666,18 +684,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -720,18 +742,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -782,6 +808,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -792,13 +819,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -816,8 +846,9 @@ type PrefixMatcher struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/dhcp6_pd_client_cp/dhcp6_pd_client_cp_rpc.ba.go b/internal/testbinapi/binapi2001/dhcp6_pd_client_cp/dhcp6_pd_client_cp_rpc.ba.go
index 7199e5a..f531408 100644
--- a/internal/testbinapi/binapi2001/dhcp6_pd_client_cp/dhcp6_pd_client_cp_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/dhcp6_pd_client_cp/dhcp6_pd_client_cp_rpc.ba.go
@@ -4,10 +4,11 @@ package dhcp6_pd_client_cp
import (
"context"
+
api "git.fd.io/govpp.git/api"
)
-// RPCService defines RPC service dhcp6_pd_client_cp.
+// RPCService defines RPC service dhcp6_pd_client_cp.
type RPCService interface {
DHCP6PdClientEnableDisable(ctx context.Context, in *DHCP6PdClientEnableDisable) (*DHCP6PdClientEnableDisableReply, error)
IP6AddDelAddressUsingPrefix(ctx context.Context, in *IP6AddDelAddressUsingPrefix) (*IP6AddDelAddressUsingPrefixReply, error)
@@ -27,7 +28,7 @@ func (c *serviceClient) DHCP6PdClientEnableDisable(ctx context.Context, in *DHCP
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IP6AddDelAddressUsingPrefix(ctx context.Context, in *IP6AddDelAddressUsingPrefix) (*IP6AddDelAddressUsingPrefixReply, error) {
@@ -36,5 +37,5 @@ func (c *serviceClient) IP6AddDelAddressUsingPrefix(ctx context.Context, in *IP6
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/dns/dns.ba.go b/internal/testbinapi/binapi2001/dns/dns.ba.go
index c7a86e7..f6161df 100644
--- a/internal/testbinapi/binapi2001/dns/dns.ba.go
+++ b/internal/testbinapi/binapi2001/dns/dns.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/dns.api.json
diff --git a/internal/testbinapi/binapi2001/dns/dns_rpc.ba.go b/internal/testbinapi/binapi2001/dns/dns_rpc.ba.go
index 57760ab..deb5be8 100644
--- a/internal/testbinapi/binapi2001/dns/dns_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/dns/dns_rpc.ba.go
@@ -4,10 +4,11 @@ package dns
import (
"context"
+
api "git.fd.io/govpp.git/api"
)
-// RPCService defines RPC service dns.
+// RPCService defines RPC service dns.
type RPCService interface {
DNSEnableDisable(ctx context.Context, in *DNSEnableDisable) (*DNSEnableDisableReply, error)
DNSNameServerAddDel(ctx context.Context, in *DNSNameServerAddDel) (*DNSNameServerAddDelReply, error)
@@ -29,7 +30,7 @@ func (c *serviceClient) DNSEnableDisable(ctx context.Context, in *DNSEnableDisab
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) DNSNameServerAddDel(ctx context.Context, in *DNSNameServerAddDel) (*DNSNameServerAddDelReply, error) {
@@ -38,7 +39,7 @@ func (c *serviceClient) DNSNameServerAddDel(ctx context.Context, in *DNSNameServ
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) DNSResolveIP(ctx context.Context, in *DNSResolveIP) (*DNSResolveIPReply, error) {
@@ -47,7 +48,7 @@ func (c *serviceClient) DNSResolveIP(ctx context.Context, in *DNSResolveIP) (*DN
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) DNSResolveName(ctx context.Context, in *DNSResolveName) (*DNSResolveNameReply, error) {
@@ -56,5 +57,5 @@ func (c *serviceClient) DNSResolveName(ctx context.Context, in *DNSResolveName)
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/ethernet_types/ethernet_types.ba.go b/internal/testbinapi/binapi2001/ethernet_types/ethernet_types.ba.go
index bd6cdcd..6cb13ae 100644
--- a/internal/testbinapi/binapi2001/ethernet_types/ethernet_types.ba.go
+++ b/internal/testbinapi/binapi2001/ethernet_types/ethernet_types.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/ethernet_types.api.json
@@ -12,8 +12,9 @@
package ethernet_types
import (
- api "git.fd.io/govpp.git/api"
"net"
+
+ api "git.fd.io/govpp.git/api"
)
// This is a compile-time assertion to ensure that this generated file
@@ -22,6 +23,12 @@ import (
// GoVPP api package needs to be updated.
const _ = api.GoVppAPIPackageIsVersion2
+const (
+ APIFile = "ethernet_types"
+ APIVersion = ""
+ VersionCrc = 0xd4ff2808
+)
+
// MacAddress defines alias 'mac_address'.
type MacAddress [6]uint8
@@ -34,15 +41,19 @@ func ParseMacAddress(s string) (MacAddress, error) {
copy(macaddr[:], mac[:])
return macaddr, nil
}
+
func (x MacAddress) ToMAC() net.HardwareAddr {
return net.HardwareAddr(x[:])
}
+
func (x MacAddress) String() string {
return x.ToMAC().String()
}
+
func (x *MacAddress) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *MacAddress) UnmarshalText(text []byte) error {
mac, err := ParseMacAddress(string(text))
if err != nil {
diff --git a/internal/testbinapi/binapi2001/feature/feature.ba.go b/internal/testbinapi/binapi2001/feature/feature.ba.go
index 8ceca10..33f8f14 100644
--- a/internal/testbinapi/binapi2001/feature/feature.ba.go
+++ b/internal/testbinapi/binapi2001/feature/feature.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/feature.api.json
@@ -14,9 +14,10 @@
package feature
import (
+ "strconv"
+
api "git.fd.io/govpp.git/api"
codec "git.fd.io/govpp.git/codec"
- "strconv"
)
// This is a compile-time assertion to ensure that this generated file
diff --git a/internal/testbinapi/binapi2001/feature/feature_rpc.ba.go b/internal/testbinapi/binapi2001/feature/feature_rpc.ba.go
index cd91188..811934b 100644
--- a/internal/testbinapi/binapi2001/feature/feature_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/feature/feature_rpc.ba.go
@@ -4,10 +4,11 @@ package feature
import (
"context"
+
api "git.fd.io/govpp.git/api"
)
-// RPCService defines RPC service feature.
+// RPCService defines RPC service feature.
type RPCService interface {
FeatureEnableDisable(ctx context.Context, in *FeatureEnableDisable) (*FeatureEnableDisableReply, error)
}
@@ -26,5 +27,5 @@ func (c *serviceClient) FeatureEnableDisable(ctx context.Context, in *FeatureEna
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/fib_types/fib_types.ba.go b/internal/testbinapi/binapi2001/fib_types/fib_types.ba.go
index 16fe5b8..b965cc8 100644
--- a/internal/testbinapi/binapi2001/fib_types/fib_types.ba.go
+++ b/internal/testbinapi/binapi2001/fib_types/fib_types.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/fib_types.api.json
@@ -16,11 +16,12 @@ package fib_types
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -29,6 +30,12 @@ import (
// GoVPP api package needs to be updated.
const _ = api.GoVppAPIPackageIsVersion2
+const (
+ APIFile = "fib_types"
+ APIVersion = "2.0.0"
+ VersionCrc = 0x57387845
+)
+
// AddressFamily defines enum 'address_family'.
type AddressFamily uint32
@@ -382,12 +389,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -413,12 +423,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -447,12 +460,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -476,6 +492,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -488,8 +508,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -499,12 +520,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -578,18 +602,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -632,18 +660,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -694,6 +726,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -704,13 +737,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -728,8 +764,9 @@ type PrefixMatcher struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/flowprobe/flowprobe.ba.go b/internal/testbinapi/binapi2001/flowprobe/flowprobe.ba.go
index fc610eb..158242a 100644
--- a/internal/testbinapi/binapi2001/flowprobe/flowprobe.ba.go
+++ b/internal/testbinapi/binapi2001/flowprobe/flowprobe.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/flowprobe.api.json
@@ -14,9 +14,10 @@
package flowprobe
import (
+ "strconv"
+
api "git.fd.io/govpp.git/api"
codec "git.fd.io/govpp.git/codec"
- "strconv"
)
// This is a compile-time assertion to ensure that this generated file
diff --git a/internal/testbinapi/binapi2001/flowprobe/flowprobe_rpc.ba.go b/internal/testbinapi/binapi2001/flowprobe/flowprobe_rpc.ba.go
index 42c6887..3b0178d 100644
--- a/internal/testbinapi/binapi2001/flowprobe/flowprobe_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/flowprobe/flowprobe_rpc.ba.go
@@ -4,10 +4,11 @@ package flowprobe
import (
"context"
+
api "git.fd.io/govpp.git/api"
)
-// RPCService defines RPC service flowprobe.
+// RPCService defines RPC service flowprobe.
type RPCService interface {
FlowprobeParams(ctx context.Context, in *FlowprobeParams) (*FlowprobeParamsReply, error)
FlowprobeTxInterfaceAddDel(ctx context.Context, in *FlowprobeTxInterfaceAddDel) (*FlowprobeTxInterfaceAddDelReply, error)
@@ -27,7 +28,7 @@ func (c *serviceClient) FlowprobeParams(ctx context.Context, in *FlowprobeParams
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) FlowprobeTxInterfaceAddDel(ctx context.Context, in *FlowprobeTxInterfaceAddDel) (*FlowprobeTxInterfaceAddDelReply, error) {
@@ -36,5 +37,5 @@ func (c *serviceClient) FlowprobeTxInterfaceAddDel(ctx context.Context, in *Flow
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/gbp/gbp.ba.go b/internal/testbinapi/binapi2001/gbp/gbp.ba.go
index 1f00396..27df8b5 100644
--- a/internal/testbinapi/binapi2001/gbp/gbp.ba.go
+++ b/internal/testbinapi/binapi2001/gbp/gbp.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/gbp.api.json
@@ -17,11 +17,12 @@ package gbp
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -777,12 +778,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -814,12 +818,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -848,12 +855,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -878,15 +888,19 @@ func ParseMacAddress(s string) (MacAddress, error) {
copy(macaddr[:], mac[:])
return macaddr, nil
}
+
func (x MacAddress) ToMAC() net.HardwareAddr {
return net.HardwareAddr(x[:])
}
+
func (x MacAddress) String() string {
return x.ToMAC().String()
}
+
func (x *MacAddress) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *MacAddress) UnmarshalText(text []byte) error {
mac, err := ParseMacAddress(string(text))
if err != nil {
@@ -907,6 +921,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -919,8 +937,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -930,12 +949,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -1095,18 +1117,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -1149,18 +1175,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -1211,6 +1241,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -1221,13 +1252,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -1245,8 +1279,9 @@ type PrefixMatcher struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/gbp/gbp_rpc.ba.go b/internal/testbinapi/binapi2001/gbp/gbp_rpc.ba.go
index bad1f79..cd62e3a 100644
--- a/internal/testbinapi/binapi2001/gbp/gbp_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/gbp/gbp_rpc.ba.go
@@ -5,12 +5,13 @@ package gbp
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service gbp.
+// RPCService defines RPC service gbp.
type RPCService interface {
GbpBridgeDomainAdd(ctx context.Context, in *GbpBridgeDomainAdd) (*GbpBridgeDomainAddReply, error)
GbpBridgeDomainDel(ctx context.Context, in *GbpBridgeDomainDel) (*GbpBridgeDomainDelReply, error)
@@ -51,7 +52,7 @@ func (c *serviceClient) GbpBridgeDomainAdd(ctx context.Context, in *GbpBridgeDom
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) GbpBridgeDomainDel(ctx context.Context, in *GbpBridgeDomainDel) (*GbpBridgeDomainDelReply, error) {
@@ -60,7 +61,7 @@ func (c *serviceClient) GbpBridgeDomainDel(ctx context.Context, in *GbpBridgeDom
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) GbpBridgeDomainDump(ctx context.Context, in *GbpBridgeDomainDump) (RPCService_GbpBridgeDomainDumpClient, error) {
@@ -96,6 +97,10 @@ func (c *serviceClient_GbpBridgeDomainDumpClient) Recv() (*GbpBridgeDomainDetail
case *GbpBridgeDomainDetails:
return m, nil
case *vpe.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)
@@ -108,7 +113,7 @@ func (c *serviceClient) GbpContractAddDel(ctx context.Context, in *GbpContractAd
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) GbpContractDump(ctx context.Context, in *GbpContractDump) (RPCService_GbpContractDumpClient, error) {
@@ -144,6 +149,10 @@ func (c *serviceClient_GbpContractDumpClient) Recv() (*GbpContractDetails, error
case *GbpContractDetails:
return m, nil
case *vpe.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)
@@ -156,7 +165,7 @@ func (c *serviceClient) GbpEndpointAdd(ctx context.Context, in *GbpEndpointAdd)
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) GbpEndpointDel(ctx context.Context, in *GbpEndpointDel) (*GbpEndpointDelReply, error) {
@@ -165,7 +174,7 @@ func (c *serviceClient) GbpEndpointDel(ctx context.Context, in *GbpEndpointDel)
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) GbpEndpointDump(ctx context.Context, in *GbpEndpointDump) (RPCService_GbpEndpointDumpClient, error) {
@@ -201,6 +210,10 @@ func (c *serviceClient_GbpEndpointDumpClient) Recv() (*GbpEndpointDetails, error
case *GbpEndpointDetails:
return m, nil
case *vpe.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)
@@ -213,7 +226,7 @@ func (c *serviceClient) GbpEndpointGroupAdd(ctx context.Context, in *GbpEndpoint
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) GbpEndpointGroupDel(ctx context.Context, in *GbpEndpointGroupDel) (*GbpEndpointGroupDelReply, error) {
@@ -222,7 +235,7 @@ func (c *serviceClient) GbpEndpointGroupDel(ctx context.Context, in *GbpEndpoint
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) GbpEndpointGroupDump(ctx context.Context, in *GbpEndpointGroupDump) (RPCService_GbpEndpointGroupDumpClient, error) {
@@ -258,6 +271,10 @@ func (c *serviceClient_GbpEndpointGroupDumpClient) Recv() (*GbpEndpointGroupDeta
case *GbpEndpointGroupDetails:
return m, nil
case *vpe.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)
@@ -270,7 +287,7 @@ func (c *serviceClient) GbpExtItfAddDel(ctx context.Context, in *GbpExtItfAddDel
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) GbpExtItfDump(ctx context.Context, in *GbpExtItfDump) (RPCService_GbpExtItfDumpClient, error) {
@@ -306,6 +323,10 @@ func (c *serviceClient_GbpExtItfDumpClient) Recv() (*GbpExtItfDetails, error) {
case *GbpExtItfDetails:
return m, nil
case *vpe.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)
@@ -318,7 +339,7 @@ func (c *serviceClient) GbpRecircAddDel(ctx context.Context, in *GbpRecircAddDel
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) GbpRecircDump(ctx context.Context, in *GbpRecircDump) (RPCService_GbpRecircDumpClient, error) {
@@ -354,6 +375,10 @@ func (c *serviceClient_GbpRecircDumpClient) Recv() (*GbpRecircDetails, error) {
case *GbpRecircDetails:
return m, nil
case *vpe.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)
@@ -366,7 +391,7 @@ func (c *serviceClient) GbpRouteDomainAdd(ctx context.Context, in *GbpRouteDomai
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) GbpRouteDomainDel(ctx context.Context, in *GbpRouteDomainDel) (*GbpRouteDomainDelReply, error) {
@@ -375,7 +400,7 @@ func (c *serviceClient) GbpRouteDomainDel(ctx context.Context, in *GbpRouteDomai
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) GbpRouteDomainDump(ctx context.Context, in *GbpRouteDomainDump) (RPCService_GbpRouteDomainDumpClient, error) {
@@ -411,6 +436,10 @@ func (c *serviceClient_GbpRouteDomainDumpClient) Recv() (*GbpRouteDomainDetails,
case *GbpRouteDomainDetails:
return m, nil
case *vpe.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)
@@ -423,7 +452,7 @@ func (c *serviceClient) GbpSubnetAddDel(ctx context.Context, in *GbpSubnetAddDel
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) GbpSubnetDump(ctx context.Context, in *GbpSubnetDump) (RPCService_GbpSubnetDumpClient, error) {
@@ -459,6 +488,10 @@ func (c *serviceClient_GbpSubnetDumpClient) Recv() (*GbpSubnetDetails, error) {
case *GbpSubnetDetails:
return m, nil
case *vpe.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)
@@ -471,7 +504,7 @@ func (c *serviceClient) GbpVxlanTunnelAdd(ctx context.Context, in *GbpVxlanTunne
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) GbpVxlanTunnelDel(ctx context.Context, in *GbpVxlanTunnelDel) (*GbpVxlanTunnelDelReply, error) {
@@ -480,7 +513,7 @@ func (c *serviceClient) GbpVxlanTunnelDel(ctx context.Context, in *GbpVxlanTunne
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) GbpVxlanTunnelDump(ctx context.Context, in *GbpVxlanTunnelDump) (RPCService_GbpVxlanTunnelDumpClient, error) {
@@ -516,6 +549,10 @@ func (c *serviceClient_GbpVxlanTunnelDumpClient) Recv() (*GbpVxlanTunnelDetails,
case *GbpVxlanTunnelDetails:
return m, nil
case *vpe.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)
diff --git a/internal/testbinapi/binapi2001/gen.go b/internal/testbinapi/binapi2001/gen.go
index 1a348e3..60b8e97 100644
--- a/internal/testbinapi/binapi2001/gen.go
+++ b/internal/testbinapi/binapi2001/gen.go
@@ -14,4 +14,4 @@
package binapi2001
-//go:generate env VPP_VERSION=20.01 binapi-generator -input-dir=.vppapi -output-dir=.
+//go:generate env VPP_VERSION=20.01 ../../../bin/binapi-generator -input-dir=.vppapi -output-dir=.
diff --git a/internal/testbinapi/binapi2001/geneve/geneve.ba.go b/internal/testbinapi/binapi2001/geneve/geneve.ba.go
index e79def2..fda3441 100644
--- a/internal/testbinapi/binapi2001/geneve/geneve.ba.go
+++ b/internal/testbinapi/binapi2001/geneve/geneve.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/geneve.api.json
@@ -17,11 +17,12 @@ package geneve
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -498,12 +499,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -532,12 +536,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -566,12 +573,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -596,15 +606,19 @@ func ParseMacAddress(s string) (MacAddress, error) {
copy(macaddr[:], mac[:])
return macaddr, nil
}
+
func (x MacAddress) ToMAC() net.HardwareAddr {
return net.HardwareAddr(x[:])
}
+
func (x MacAddress) String() string {
return x.ToMAC().String()
}
+
func (x *MacAddress) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *MacAddress) UnmarshalText(text []byte) error {
mac, err := ParseMacAddress(string(text))
if err != nil {
@@ -625,6 +639,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -637,8 +655,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -648,12 +667,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -696,18 +718,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -750,18 +776,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -812,6 +842,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -822,13 +853,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -846,8 +880,9 @@ type PrefixMatcher struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/geneve/geneve_rpc.ba.go b/internal/testbinapi/binapi2001/geneve/geneve_rpc.ba.go
index fe78712..f96c316 100644
--- a/internal/testbinapi/binapi2001/geneve/geneve_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/geneve/geneve_rpc.ba.go
@@ -5,12 +5,13 @@ package geneve
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service geneve.
+// RPCService defines RPC service geneve.
type RPCService interface {
GeneveAddDelTunnel(ctx context.Context, in *GeneveAddDelTunnel) (*GeneveAddDelTunnelReply, error)
GeneveTunnelDump(ctx context.Context, in *GeneveTunnelDump) (RPCService_GeneveTunnelDumpClient, error)
@@ -31,7 +32,7 @@ func (c *serviceClient) GeneveAddDelTunnel(ctx context.Context, in *GeneveAddDel
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) GeneveTunnelDump(ctx context.Context, in *GeneveTunnelDump) (RPCService_GeneveTunnelDumpClient, error) {
@@ -67,6 +68,10 @@ func (c *serviceClient_GeneveTunnelDumpClient) Recv() (*GeneveTunnelDetails, err
case *GeneveTunnelDetails:
return m, nil
case *vpe.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)
@@ -79,5 +84,5 @@ func (c *serviceClient) SwInterfaceSetGeneveBypass(ctx context.Context, in *SwIn
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/gre/gre.ba.go b/internal/testbinapi/binapi2001/gre/gre.ba.go
index 78d3720..0eeb82c 100644
--- a/internal/testbinapi/binapi2001/gre/gre.ba.go
+++ b/internal/testbinapi/binapi2001/gre/gre.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/gre.api.json
@@ -17,11 +17,12 @@ package gre
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -555,12 +556,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -589,12 +593,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -623,12 +630,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -652,6 +662,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -664,8 +678,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -675,12 +690,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -735,18 +753,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -789,18 +811,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -851,6 +877,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -861,13 +888,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -885,8 +915,9 @@ type PrefixMatcher struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/gre/gre_rpc.ba.go b/internal/testbinapi/binapi2001/gre/gre_rpc.ba.go
index 8ea9820..6237740 100644
--- a/internal/testbinapi/binapi2001/gre/gre_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/gre/gre_rpc.ba.go
@@ -5,12 +5,13 @@ package gre
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service gre.
+// RPCService defines RPC service gre.
type RPCService interface {
GreTunnelAddDel(ctx context.Context, in *GreTunnelAddDel) (*GreTunnelAddDelReply, error)
GreTunnelDump(ctx context.Context, in *GreTunnelDump) (RPCService_GreTunnelDumpClient, error)
@@ -30,7 +31,7 @@ func (c *serviceClient) GreTunnelAddDel(ctx context.Context, in *GreTunnelAddDel
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) GreTunnelDump(ctx context.Context, in *GreTunnelDump) (RPCService_GreTunnelDumpClient, error) {
@@ -66,6 +67,10 @@ func (c *serviceClient_GreTunnelDumpClient) Recv() (*GreTunnelDetails, error) {
case *GreTunnelDetails:
return m, nil
case *vpe.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)
diff --git a/internal/testbinapi/binapi2001/gso/gso.ba.go b/internal/testbinapi/binapi2001/gso/gso.ba.go
index 374191b..ed33544 100644
--- a/internal/testbinapi/binapi2001/gso/gso.ba.go
+++ b/internal/testbinapi/binapi2001/gso/gso.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/gso.api.json
@@ -14,9 +14,10 @@
package gso
import (
+ "strconv"
+
api "git.fd.io/govpp.git/api"
codec "git.fd.io/govpp.git/codec"
- "strconv"
)
// This is a compile-time assertion to ensure that this generated file
diff --git a/internal/testbinapi/binapi2001/gso/gso_rpc.ba.go b/internal/testbinapi/binapi2001/gso/gso_rpc.ba.go
index d955acc..0d3ed10 100644
--- a/internal/testbinapi/binapi2001/gso/gso_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/gso/gso_rpc.ba.go
@@ -4,10 +4,11 @@ package gso
import (
"context"
+
api "git.fd.io/govpp.git/api"
)
-// RPCService defines RPC service gso.
+// RPCService defines RPC service gso.
type RPCService interface {
FeatureGsoEnableDisable(ctx context.Context, in *FeatureGsoEnableDisable) (*FeatureGsoEnableDisableReply, error)
}
@@ -26,5 +27,5 @@ func (c *serviceClient) FeatureGsoEnableDisable(ctx context.Context, in *Feature
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/gtpu/gtpu.ba.go b/internal/testbinapi/binapi2001/gtpu/gtpu.ba.go
index dd4b8c8..53b65d0 100644
--- a/internal/testbinapi/binapi2001/gtpu/gtpu.ba.go
+++ b/internal/testbinapi/binapi2001/gtpu/gtpu.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/gtpu.api.json
@@ -17,11 +17,12 @@ package gtpu
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -498,12 +499,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -532,12 +536,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -566,12 +573,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -595,6 +605,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -607,8 +621,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -618,12 +633,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -666,18 +684,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -720,18 +742,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -782,6 +808,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -792,13 +819,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -816,8 +846,9 @@ type PrefixMatcher struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/gtpu/gtpu_rpc.ba.go b/internal/testbinapi/binapi2001/gtpu/gtpu_rpc.ba.go
index 6cc1d23..8328e6b 100644
--- a/internal/testbinapi/binapi2001/gtpu/gtpu_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/gtpu/gtpu_rpc.ba.go
@@ -5,12 +5,13 @@ package gtpu
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service gtpu.
+// RPCService defines RPC service gtpu.
type RPCService interface {
GtpuAddDelTunnel(ctx context.Context, in *GtpuAddDelTunnel) (*GtpuAddDelTunnelReply, error)
GtpuTunnelDump(ctx context.Context, in *GtpuTunnelDump) (RPCService_GtpuTunnelDumpClient, error)
@@ -31,7 +32,7 @@ func (c *serviceClient) GtpuAddDelTunnel(ctx context.Context, in *GtpuAddDelTunn
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) GtpuTunnelDump(ctx context.Context, in *GtpuTunnelDump) (RPCService_GtpuTunnelDumpClient, error) {
@@ -67,6 +68,10 @@ func (c *serviceClient_GtpuTunnelDumpClient) Recv() (*GtpuTunnelDetails, error)
case *GtpuTunnelDetails:
return m, nil
case *vpe.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)
@@ -79,5 +84,5 @@ func (c *serviceClient) SwInterfaceSetGtpuBypass(ctx context.Context, in *SwInte
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/http_static/http_static.ba.go b/internal/testbinapi/binapi2001/http_static/http_static.ba.go
index b302380..bdd9c5b 100644
--- a/internal/testbinapi/binapi2001/http_static/http_static.ba.go
+++ b/internal/testbinapi/binapi2001/http_static/http_static.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/http_static.api.json
diff --git a/internal/testbinapi/binapi2001/http_static/http_static_rpc.ba.go b/internal/testbinapi/binapi2001/http_static/http_static_rpc.ba.go
index 415313d..12bd4c1 100644
--- a/internal/testbinapi/binapi2001/http_static/http_static_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/http_static/http_static_rpc.ba.go
@@ -4,10 +4,11 @@ package http_static
import (
"context"
+
api "git.fd.io/govpp.git/api"
)
-// RPCService defines RPC service http_static.
+// RPCService defines RPC service http_static.
type RPCService interface {
HTTPStaticEnable(ctx context.Context, in *HTTPStaticEnable) (*HTTPStaticEnableReply, error)
}
@@ -26,5 +27,5 @@ func (c *serviceClient) HTTPStaticEnable(ctx context.Context, in *HTTPStaticEnab
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/igmp/igmp.ba.go b/internal/testbinapi/binapi2001/igmp/igmp.ba.go
index 5482411..0612a4b 100644
--- a/internal/testbinapi/binapi2001/igmp/igmp.ba.go
+++ b/internal/testbinapi/binapi2001/igmp/igmp.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/igmp.api.json
@@ -17,11 +17,12 @@ package igmp
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -552,12 +553,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -586,12 +590,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -620,12 +627,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -649,6 +659,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -661,8 +675,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -672,12 +687,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -735,18 +753,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -789,18 +811,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -851,6 +877,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -861,13 +888,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -885,8 +915,9 @@ type PrefixMatcher struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/igmp/igmp_rpc.ba.go b/internal/testbinapi/binapi2001/igmp/igmp_rpc.ba.go
index 7258577..b79fdc2 100644
--- a/internal/testbinapi/binapi2001/igmp/igmp_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/igmp/igmp_rpc.ba.go
@@ -5,12 +5,13 @@ package igmp
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service igmp.
+// RPCService defines RPC service igmp.
type RPCService interface {
IgmpClearInterface(ctx context.Context, in *IgmpClearInterface) (*IgmpClearInterfaceReply, error)
IgmpDump(ctx context.Context, in *IgmpDump) (RPCService_IgmpDumpClient, error)
@@ -37,7 +38,7 @@ func (c *serviceClient) IgmpClearInterface(ctx context.Context, in *IgmpClearInt
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IgmpDump(ctx context.Context, in *IgmpDump) (RPCService_IgmpDumpClient, error) {
@@ -73,6 +74,10 @@ func (c *serviceClient_IgmpDumpClient) Recv() (*IgmpDetails, error) {
case *IgmpDetails:
return m, nil
case *vpe.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)
@@ -85,7 +90,7 @@ func (c *serviceClient) IgmpEnableDisable(ctx context.Context, in *IgmpEnableDis
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IgmpGroupPrefixDump(ctx context.Context, in *IgmpGroupPrefixDump) (RPCService_IgmpGroupPrefixDumpClient, error) {
@@ -121,6 +126,10 @@ func (c *serviceClient_IgmpGroupPrefixDumpClient) Recv() (*IgmpGroupPrefixDetail
case *IgmpGroupPrefixDetails:
return m, nil
case *vpe.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)
@@ -133,7 +142,7 @@ func (c *serviceClient) IgmpGroupPrefixSet(ctx context.Context, in *IgmpGroupPre
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IgmpListen(ctx context.Context, in *IgmpListen) (*IgmpListenReply, error) {
@@ -142,7 +151,7 @@ func (c *serviceClient) IgmpListen(ctx context.Context, in *IgmpListen) (*IgmpLi
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IgmpProxyDeviceAddDel(ctx context.Context, in *IgmpProxyDeviceAddDel) (*IgmpProxyDeviceAddDelReply, error) {
@@ -151,7 +160,7 @@ func (c *serviceClient) IgmpProxyDeviceAddDel(ctx context.Context, in *IgmpProxy
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IgmpProxyDeviceAddDelInterface(ctx context.Context, in *IgmpProxyDeviceAddDelInterface) (*IgmpProxyDeviceAddDelInterfaceReply, error) {
@@ -160,7 +169,7 @@ func (c *serviceClient) IgmpProxyDeviceAddDelInterface(ctx context.Context, in *
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) WantIgmpEvents(ctx context.Context, in *WantIgmpEvents) (*WantIgmpEventsReply, error) {
@@ -169,5 +178,5 @@ func (c *serviceClient) WantIgmpEvents(ctx context.Context, in *WantIgmpEvents)
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/ikev2/ikev2.ba.go b/internal/testbinapi/binapi2001/ikev2/ikev2.ba.go
index f7ad3c8..578cdc4 100644
--- a/internal/testbinapi/binapi2001/ikev2/ikev2.ba.go
+++ b/internal/testbinapi/binapi2001/ikev2/ikev2.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/ikev2.api.json
@@ -17,11 +17,12 @@ package ikev2
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -498,12 +499,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -532,12 +536,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -566,12 +573,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -595,6 +605,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -607,8 +621,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -618,12 +633,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -666,18 +684,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -720,18 +742,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -782,6 +808,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -792,13 +819,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -816,8 +846,9 @@ type PrefixMatcher struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/ikev2/ikev2_rpc.ba.go b/internal/testbinapi/binapi2001/ikev2/ikev2_rpc.ba.go
index 5cac5d4..41c0e61 100644
--- a/internal/testbinapi/binapi2001/ikev2/ikev2_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/ikev2/ikev2_rpc.ba.go
@@ -4,10 +4,11 @@ package ikev2
import (
"context"
+
api "git.fd.io/govpp.git/api"
)
-// RPCService defines RPC service ikev2.
+// RPCService defines RPC service ikev2.
type RPCService interface {
Ikev2InitiateDelChildSa(ctx context.Context, in *Ikev2InitiateDelChildSa) (*Ikev2InitiateDelChildSaReply, error)
Ikev2InitiateDelIkeSa(ctx context.Context, in *Ikev2InitiateDelIkeSa) (*Ikev2InitiateDelIkeSaReply, error)
@@ -39,7 +40,7 @@ func (c *serviceClient) Ikev2InitiateDelChildSa(ctx context.Context, in *Ikev2In
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) Ikev2InitiateDelIkeSa(ctx context.Context, in *Ikev2InitiateDelIkeSa) (*Ikev2InitiateDelIkeSaReply, error) {
@@ -48,7 +49,7 @@ func (c *serviceClient) Ikev2InitiateDelIkeSa(ctx context.Context, in *Ikev2Init
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) Ikev2InitiateRekeyChildSa(ctx context.Context, in *Ikev2InitiateRekeyChildSa) (*Ikev2InitiateRekeyChildSaReply, error) {
@@ -57,7 +58,7 @@ func (c *serviceClient) Ikev2InitiateRekeyChildSa(ctx context.Context, in *Ikev2
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) Ikev2InitiateSaInit(ctx context.Context, in *Ikev2InitiateSaInit) (*Ikev2InitiateSaInitReply, error) {
@@ -66,7 +67,7 @@ func (c *serviceClient) Ikev2InitiateSaInit(ctx context.Context, in *Ikev2Initia
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) Ikev2PluginGetVersion(ctx context.Context, in *Ikev2PluginGetVersion) (*Ikev2PluginGetVersionReply, error) {
@@ -84,7 +85,7 @@ func (c *serviceClient) Ikev2ProfileAddDel(ctx context.Context, in *Ikev2Profile
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) Ikev2ProfileSetAuth(ctx context.Context, in *Ikev2ProfileSetAuth) (*Ikev2ProfileSetAuthReply, error) {
@@ -93,7 +94,7 @@ func (c *serviceClient) Ikev2ProfileSetAuth(ctx context.Context, in *Ikev2Profil
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) Ikev2ProfileSetID(ctx context.Context, in *Ikev2ProfileSetID) (*Ikev2ProfileSetIDReply, error) {
@@ -102,7 +103,7 @@ func (c *serviceClient) Ikev2ProfileSetID(ctx context.Context, in *Ikev2ProfileS
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) Ikev2ProfileSetTs(ctx context.Context, in *Ikev2ProfileSetTs) (*Ikev2ProfileSetTsReply, error) {
@@ -111,7 +112,7 @@ func (c *serviceClient) Ikev2ProfileSetTs(ctx context.Context, in *Ikev2ProfileS
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) Ikev2SetEspTransforms(ctx context.Context, in *Ikev2SetEspTransforms) (*Ikev2SetEspTransformsReply, error) {
@@ -120,7 +121,7 @@ func (c *serviceClient) Ikev2SetEspTransforms(ctx context.Context, in *Ikev2SetE
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) Ikev2SetIkeTransforms(ctx context.Context, in *Ikev2SetIkeTransforms) (*Ikev2SetIkeTransformsReply, error) {
@@ -129,7 +130,7 @@ func (c *serviceClient) Ikev2SetIkeTransforms(ctx context.Context, in *Ikev2SetI
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) Ikev2SetLocalKey(ctx context.Context, in *Ikev2SetLocalKey) (*Ikev2SetLocalKeyReply, error) {
@@ -138,7 +139,7 @@ func (c *serviceClient) Ikev2SetLocalKey(ctx context.Context, in *Ikev2SetLocalK
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) Ikev2SetResponder(ctx context.Context, in *Ikev2SetResponder) (*Ikev2SetResponderReply, error) {
@@ -147,7 +148,7 @@ func (c *serviceClient) Ikev2SetResponder(ctx context.Context, in *Ikev2SetRespo
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) Ikev2SetSaLifetime(ctx context.Context, in *Ikev2SetSaLifetime) (*Ikev2SetSaLifetimeReply, error) {
@@ -156,5 +157,5 @@ func (c *serviceClient) Ikev2SetSaLifetime(ctx context.Context, in *Ikev2SetSaLi
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/interface/interface.ba.go b/internal/testbinapi/binapi2001/interface/interface.ba.go
index 94a33b8..a28c261 100644
--- a/internal/testbinapi/binapi2001/interface/interface.ba.go
+++ b/internal/testbinapi/binapi2001/interface/interface.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/interface.api.json
@@ -17,11 +17,12 @@ package interfaces
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -498,12 +499,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -532,12 +536,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -566,12 +573,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -596,15 +606,19 @@ func ParseMacAddress(s string) (MacAddress, error) {
copy(macaddr[:], mac[:])
return macaddr, nil
}
+
func (x MacAddress) ToMAC() net.HardwareAddr {
return net.HardwareAddr(x[:])
}
+
func (x MacAddress) String() string {
return x.ToMAC().String()
}
+
func (x *MacAddress) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *MacAddress) UnmarshalText(text []byte) error {
mac, err := ParseMacAddress(string(text))
if err != nil {
@@ -625,6 +639,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -637,8 +655,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -648,12 +667,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -696,18 +718,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -750,18 +776,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -812,6 +842,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -822,13 +853,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -846,8 +880,9 @@ type PrefixMatcher struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/interface/interface_rpc.ba.go b/internal/testbinapi/binapi2001/interface/interface_rpc.ba.go
index f12e6eb..d7ae7c5 100644
--- a/internal/testbinapi/binapi2001/interface/interface_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/interface/interface_rpc.ba.go
@@ -5,12 +5,13 @@ package interfaces
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service interface.
+// RPCService defines RPC service interface.
type RPCService interface {
CollectDetailedInterfaceStats(ctx context.Context, in *CollectDetailedInterfaceStats) (*CollectDetailedInterfaceStatsReply, error)
CreateLoopback(ctx context.Context, in *CreateLoopback) (*CreateLoopbackReply, error)
@@ -54,7 +55,7 @@ func (c *serviceClient) CollectDetailedInterfaceStats(ctx context.Context, in *C
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) CreateLoopback(ctx context.Context, in *CreateLoopback) (*CreateLoopbackReply, error) {
@@ -63,7 +64,7 @@ func (c *serviceClient) CreateLoopback(ctx context.Context, in *CreateLoopback)
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) CreateLoopbackInstance(ctx context.Context, in *CreateLoopbackInstance) (*CreateLoopbackInstanceReply, error) {
@@ -72,7 +73,7 @@ func (c *serviceClient) CreateLoopbackInstance(ctx context.Context, in *CreateLo
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) CreateSubif(ctx context.Context, in *CreateSubif) (*CreateSubifReply, error) {
@@ -81,7 +82,7 @@ func (c *serviceClient) CreateSubif(ctx context.Context, in *CreateSubif) (*Crea
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) CreateVlanSubif(ctx context.Context, in *CreateVlanSubif) (*CreateVlanSubifReply, error) {
@@ -90,7 +91,7 @@ func (c *serviceClient) CreateVlanSubif(ctx context.Context, in *CreateVlanSubif
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) DeleteLoopback(ctx context.Context, in *DeleteLoopback) (*DeleteLoopbackReply, error) {
@@ -99,7 +100,7 @@ func (c *serviceClient) DeleteLoopback(ctx context.Context, in *DeleteLoopback)
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) DeleteSubif(ctx context.Context, in *DeleteSubif) (*DeleteSubifReply, error) {
@@ -108,7 +109,7 @@ func (c *serviceClient) DeleteSubif(ctx context.Context, in *DeleteSubif) (*Dele
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) HwInterfaceSetMtu(ctx context.Context, in *HwInterfaceSetMtu) (*HwInterfaceSetMtuReply, error) {
@@ -117,7 +118,7 @@ func (c *serviceClient) HwInterfaceSetMtu(ctx context.Context, in *HwInterfaceSe
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) InterfaceNameRenumber(ctx context.Context, in *InterfaceNameRenumber) (*InterfaceNameRenumberReply, error) {
@@ -126,7 +127,7 @@ func (c *serviceClient) InterfaceNameRenumber(ctx context.Context, in *Interface
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SwInterfaceAddDelAddress(ctx context.Context, in *SwInterfaceAddDelAddress) (*SwInterfaceAddDelAddressReply, error) {
@@ -135,7 +136,7 @@ func (c *serviceClient) SwInterfaceAddDelAddress(ctx context.Context, in *SwInte
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SwInterfaceAddDelMacAddress(ctx context.Context, in *SwInterfaceAddDelMacAddress) (*SwInterfaceAddDelMacAddressReply, error) {
@@ -144,7 +145,7 @@ func (c *serviceClient) SwInterfaceAddDelMacAddress(ctx context.Context, in *SwI
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SwInterfaceClearStats(ctx context.Context, in *SwInterfaceClearStats) (*SwInterfaceClearStatsReply, error) {
@@ -153,7 +154,7 @@ func (c *serviceClient) SwInterfaceClearStats(ctx context.Context, in *SwInterfa
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SwInterfaceDump(ctx context.Context, in *SwInterfaceDump) (RPCService_SwInterfaceDumpClient, error) {
@@ -189,6 +190,10 @@ func (c *serviceClient_SwInterfaceDumpClient) Recv() (*SwInterfaceDetails, error
case *SwInterfaceDetails:
return m, nil
case *vpe.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)
@@ -201,7 +206,7 @@ func (c *serviceClient) SwInterfaceGetMacAddress(ctx context.Context, in *SwInte
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SwInterfaceGetTable(ctx context.Context, in *SwInterfaceGetTable) (*SwInterfaceGetTableReply, error) {
@@ -210,7 +215,7 @@ func (c *serviceClient) SwInterfaceGetTable(ctx context.Context, in *SwInterface
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SwInterfaceRxPlacementDump(ctx context.Context, in *SwInterfaceRxPlacementDump) (RPCService_SwInterfaceRxPlacementDumpClient, error) {
@@ -246,6 +251,10 @@ func (c *serviceClient_SwInterfaceRxPlacementDumpClient) Recv() (*SwInterfaceRxP
case *SwInterfaceRxPlacementDetails:
return m, nil
case *vpe.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)
@@ -258,7 +267,7 @@ func (c *serviceClient) SwInterfaceSetFlags(ctx context.Context, in *SwInterface
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SwInterfaceSetIPDirectedBroadcast(ctx context.Context, in *SwInterfaceSetIPDirectedBroadcast) (*SwInterfaceSetIPDirectedBroadcastReply, error) {
@@ -267,7 +276,7 @@ func (c *serviceClient) SwInterfaceSetIPDirectedBroadcast(ctx context.Context, i
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SwInterfaceSetMacAddress(ctx context.Context, in *SwInterfaceSetMacAddress) (*SwInterfaceSetMacAddressReply, error) {
@@ -276,7 +285,7 @@ func (c *serviceClient) SwInterfaceSetMacAddress(ctx context.Context, in *SwInte
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SwInterfaceSetMtu(ctx context.Context, in *SwInterfaceSetMtu) (*SwInterfaceSetMtuReply, error) {
@@ -285,7 +294,7 @@ func (c *serviceClient) SwInterfaceSetMtu(ctx context.Context, in *SwInterfaceSe
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SwInterfaceSetRxMode(ctx context.Context, in *SwInterfaceSetRxMode) (*SwInterfaceSetRxModeReply, error) {
@@ -294,7 +303,7 @@ func (c *serviceClient) SwInterfaceSetRxMode(ctx context.Context, in *SwInterfac
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SwInterfaceSetRxPlacement(ctx context.Context, in *SwInterfaceSetRxPlacement) (*SwInterfaceSetRxPlacementReply, error) {
@@ -303,7 +312,7 @@ func (c *serviceClient) SwInterfaceSetRxPlacement(ctx context.Context, in *SwInt
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SwInterfaceSetTable(ctx context.Context, in *SwInterfaceSetTable) (*SwInterfaceSetTableReply, error) {
@@ -312,7 +321,7 @@ func (c *serviceClient) SwInterfaceSetTable(ctx context.Context, in *SwInterface
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SwInterfaceSetUnnumbered(ctx context.Context, in *SwInterfaceSetUnnumbered) (*SwInterfaceSetUnnumberedReply, error) {
@@ -321,7 +330,7 @@ func (c *serviceClient) SwInterfaceSetUnnumbered(ctx context.Context, in *SwInte
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SwInterfaceTagAddDel(ctx context.Context, in *SwInterfaceTagAddDel) (*SwInterfaceTagAddDelReply, error) {
@@ -330,7 +339,7 @@ func (c *serviceClient) SwInterfaceTagAddDel(ctx context.Context, in *SwInterfac
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) WantInterfaceEvents(ctx context.Context, in *WantInterfaceEvents) (*WantInterfaceEventsReply, error) {
@@ -339,5 +348,5 @@ func (c *serviceClient) WantInterfaceEvents(ctx context.Context, in *WantInterfa
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/interface_types/interface_types.ba.go b/internal/testbinapi/binapi2001/interface_types/interface_types.ba.go
index c4ba91d..14e2766 100644
--- a/internal/testbinapi/binapi2001/interface_types/interface_types.ba.go
+++ b/internal/testbinapi/binapi2001/interface_types/interface_types.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/interface_types.api.json
@@ -13,8 +13,9 @@
package interface_types
import (
- api "git.fd.io/govpp.git/api"
"strconv"
+
+ api "git.fd.io/govpp.git/api"
)
// This is a compile-time assertion to ensure that this generated file
@@ -23,6 +24,12 @@ import (
// GoVPP api package needs to be updated.
const _ = api.GoVppAPIPackageIsVersion2
+const (
+ APIFile = "interface_types"
+ APIVersion = ""
+ VersionCrc = 0xc97be83d
+)
+
// IfStatusFlags defines enum 'if_status_flags'.
type IfStatusFlags uint32
diff --git a/internal/testbinapi/binapi2001/ioam_cache/ioam_cache.ba.go b/internal/testbinapi/binapi2001/ioam_cache/ioam_cache.ba.go
index 4a453c7..c409cc9 100644
--- a/internal/testbinapi/binapi2001/ioam_cache/ioam_cache.ba.go
+++ b/internal/testbinapi/binapi2001/ioam_cache/ioam_cache.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/ioam_cache.api.json
diff --git a/internal/testbinapi/binapi2001/ioam_cache/ioam_cache_rpc.ba.go b/internal/testbinapi/binapi2001/ioam_cache/ioam_cache_rpc.ba.go
index 33a721f..9847365 100644
--- a/internal/testbinapi/binapi2001/ioam_cache/ioam_cache_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/ioam_cache/ioam_cache_rpc.ba.go
@@ -4,10 +4,11 @@ package ioam_cache
import (
"context"
+
api "git.fd.io/govpp.git/api"
)
-// RPCService defines RPC service ioam_cache.
+// RPCService defines RPC service ioam_cache.
type RPCService interface {
IoamCacheIP6EnableDisable(ctx context.Context, in *IoamCacheIP6EnableDisable) (*IoamCacheIP6EnableDisableReply, error)
}
@@ -26,5 +27,5 @@ func (c *serviceClient) IoamCacheIP6EnableDisable(ctx context.Context, in *IoamC
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/ioam_export/ioam_export.ba.go b/internal/testbinapi/binapi2001/ioam_export/ioam_export.ba.go
index 5a1fef6..044b8e2 100644
--- a/internal/testbinapi/binapi2001/ioam_export/ioam_export.ba.go
+++ b/internal/testbinapi/binapi2001/ioam_export/ioam_export.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/ioam_export.api.json
@@ -17,11 +17,12 @@ package ioam_export
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -247,12 +248,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -278,12 +282,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -312,12 +319,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -341,6 +351,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -353,8 +367,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -364,12 +379,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -412,18 +430,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -466,18 +488,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -528,6 +554,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -538,13 +565,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -562,8 +592,9 @@ type PrefixMatcher struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/ioam_export/ioam_export_rpc.ba.go b/internal/testbinapi/binapi2001/ioam_export/ioam_export_rpc.ba.go
index 584a563..0e0da2e 100644
--- a/internal/testbinapi/binapi2001/ioam_export/ioam_export_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/ioam_export/ioam_export_rpc.ba.go
@@ -4,10 +4,11 @@ package ioam_export
import (
"context"
+
api "git.fd.io/govpp.git/api"
)
-// RPCService defines RPC service ioam_export.
+// RPCService defines RPC service ioam_export.
type RPCService interface {
IoamExportIP6EnableDisable(ctx context.Context, in *IoamExportIP6EnableDisable) (*IoamExportIP6EnableDisableReply, error)
}
@@ -26,5 +27,5 @@ func (c *serviceClient) IoamExportIP6EnableDisable(ctx context.Context, in *Ioam
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/ioam_vxlan_gpe/ioam_vxlan_gpe.ba.go b/internal/testbinapi/binapi2001/ioam_vxlan_gpe/ioam_vxlan_gpe.ba.go
index cac19f6..7ee44bc 100644
--- a/internal/testbinapi/binapi2001/ioam_vxlan_gpe/ioam_vxlan_gpe.ba.go
+++ b/internal/testbinapi/binapi2001/ioam_vxlan_gpe/ioam_vxlan_gpe.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/ioam_vxlan_gpe.api.json
@@ -17,11 +17,12 @@ package ioam_vxlan_gpe
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -247,12 +248,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -278,12 +282,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -312,12 +319,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -341,6 +351,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -353,8 +367,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -364,12 +379,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -412,18 +430,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -466,18 +488,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -528,6 +554,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -538,13 +565,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -562,8 +592,9 @@ type PrefixMatcher struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/ioam_vxlan_gpe/ioam_vxlan_gpe_rpc.ba.go b/internal/testbinapi/binapi2001/ioam_vxlan_gpe/ioam_vxlan_gpe_rpc.ba.go
index e06b33a..19bdbb2 100644
--- a/internal/testbinapi/binapi2001/ioam_vxlan_gpe/ioam_vxlan_gpe_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/ioam_vxlan_gpe/ioam_vxlan_gpe_rpc.ba.go
@@ -4,10 +4,11 @@ package ioam_vxlan_gpe
import (
"context"
+
api "git.fd.io/govpp.git/api"
)
-// RPCService defines RPC service ioam_vxlan_gpe.
+// RPCService defines RPC service ioam_vxlan_gpe.
type RPCService interface {
VxlanGpeIoamDisable(ctx context.Context, in *VxlanGpeIoamDisable) (*VxlanGpeIoamDisableReply, error)
VxlanGpeIoamEnable(ctx context.Context, in *VxlanGpeIoamEnable) (*VxlanGpeIoamEnableReply, error)
@@ -31,7 +32,7 @@ func (c *serviceClient) VxlanGpeIoamDisable(ctx context.Context, in *VxlanGpeIoa
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) VxlanGpeIoamEnable(ctx context.Context, in *VxlanGpeIoamEnable) (*VxlanGpeIoamEnableReply, error) {
@@ -40,7 +41,7 @@ func (c *serviceClient) VxlanGpeIoamEnable(ctx context.Context, in *VxlanGpeIoam
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) VxlanGpeIoamTransitDisable(ctx context.Context, in *VxlanGpeIoamTransitDisable) (*VxlanGpeIoamTransitDisableReply, error) {
@@ -49,7 +50,7 @@ func (c *serviceClient) VxlanGpeIoamTransitDisable(ctx context.Context, in *Vxla
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) VxlanGpeIoamTransitEnable(ctx context.Context, in *VxlanGpeIoamTransitEnable) (*VxlanGpeIoamTransitEnableReply, error) {
@@ -58,7 +59,7 @@ func (c *serviceClient) VxlanGpeIoamTransitEnable(ctx context.Context, in *Vxlan
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) VxlanGpeIoamVniDisable(ctx context.Context, in *VxlanGpeIoamVniDisable) (*VxlanGpeIoamVniDisableReply, error) {
@@ -67,7 +68,7 @@ func (c *serviceClient) VxlanGpeIoamVniDisable(ctx context.Context, in *VxlanGpe
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) VxlanGpeIoamVniEnable(ctx context.Context, in *VxlanGpeIoamVniEnable) (*VxlanGpeIoamVniEnableReply, error) {
@@ -76,5 +77,5 @@ func (c *serviceClient) VxlanGpeIoamVniEnable(ctx context.Context, in *VxlanGpeI
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/ip/ip.ba.go b/internal/testbinapi/binapi2001/ip/ip.ba.go
index 1b0b6b2..2480300 100644
--- a/internal/testbinapi/binapi2001/ip/ip.ba.go
+++ b/internal/testbinapi/binapi2001/ip/ip.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/ip.api.json
@@ -17,11 +17,12 @@ package ip
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -725,12 +726,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -759,12 +763,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -793,12 +800,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -823,15 +833,19 @@ func ParseMacAddress(s string) (MacAddress, error) {
copy(macaddr[:], mac[:])
return macaddr, nil
}
+
func (x MacAddress) ToMAC() net.HardwareAddr {
return net.HardwareAddr(x[:])
}
+
func (x MacAddress) String() string {
return x.ToMAC().String()
}
+
func (x *MacAddress) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *MacAddress) UnmarshalText(text []byte) error {
mac, err := ParseMacAddress(string(text))
if err != nil {
@@ -852,6 +866,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -864,8 +882,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -875,12 +894,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -954,18 +976,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -1008,18 +1034,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -1102,6 +1132,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -1112,13 +1143,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -1143,8 +1177,9 @@ type PuntRedirect struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/ip/ip_rpc.ba.go b/internal/testbinapi/binapi2001/ip/ip_rpc.ba.go
index 88dbb6b..26f72c2 100644
--- a/internal/testbinapi/binapi2001/ip/ip_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/ip/ip_rpc.ba.go
@@ -5,12 +5,13 @@ package ip
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service ip.
+// RPCService defines RPC service ip.
type RPCService interface {
IoamDisable(ctx context.Context, in *IoamDisable) (*IoamDisableReply, error)
IoamEnable(ctx context.Context, in *IoamEnable) (*IoamEnableReply, error)
@@ -58,7 +59,7 @@ func (c *serviceClient) IoamDisable(ctx context.Context, in *IoamDisable) (*Ioam
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IoamEnable(ctx context.Context, in *IoamEnable) (*IoamEnableReply, error) {
@@ -67,7 +68,7 @@ func (c *serviceClient) IoamEnable(ctx context.Context, in *IoamEnable) (*IoamEn
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IPAddressDump(ctx context.Context, in *IPAddressDump) (RPCService_IPAddressDumpClient, error) {
@@ -103,6 +104,10 @@ func (c *serviceClient_IPAddressDumpClient) Recv() (*IPAddressDetails, error) {
case *IPAddressDetails:
return m, nil
case *vpe.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)
@@ -115,7 +120,7 @@ func (c *serviceClient) IPContainerProxyAddDel(ctx context.Context, in *IPContai
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IPContainerProxyDump(ctx context.Context, in *IPContainerProxyDump) (RPCService_IPContainerProxyDumpClient, error) {
@@ -151,6 +156,10 @@ func (c *serviceClient_IPContainerProxyDumpClient) Recv() (*IPContainerProxyDeta
case *IPContainerProxyDetails:
return m, nil
case *vpe.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)
@@ -190,6 +199,10 @@ func (c *serviceClient_IPDumpClient) Recv() (*IPDetails, error) {
case *IPDetails:
return m, nil
case *vpe.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)
@@ -202,7 +215,7 @@ func (c *serviceClient) IPMrouteAddDel(ctx context.Context, in *IPMrouteAddDel)
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IPMrouteDump(ctx context.Context, in *IPMrouteDump) (RPCService_IPMrouteDumpClient, error) {
@@ -238,6 +251,10 @@ func (c *serviceClient_IPMrouteDumpClient) Recv() (*IPMrouteDetails, error) {
case *IPMrouteDetails:
return m, nil
case *vpe.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)
@@ -277,6 +294,10 @@ func (c *serviceClient_IPMtableDumpClient) Recv() (*IPMtableDetails, error) {
case *IPMtableDetails:
return m, nil
case *vpe.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)
@@ -289,7 +310,7 @@ func (c *serviceClient) IPPuntPolice(ctx context.Context, in *IPPuntPolice) (*IP
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IPPuntRedirect(ctx context.Context, in *IPPuntRedirect) (*IPPuntRedirectReply, error) {
@@ -298,7 +319,7 @@ func (c *serviceClient) IPPuntRedirect(ctx context.Context, in *IPPuntRedirect)
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IPPuntRedirectDump(ctx context.Context, in *IPPuntRedirectDump) (RPCService_IPPuntRedirectDumpClient, error) {
@@ -334,6 +355,10 @@ func (c *serviceClient_IPPuntRedirectDumpClient) Recv() (*IPPuntRedirectDetails,
case *IPPuntRedirectDetails:
return m, nil
case *vpe.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)
@@ -346,7 +371,7 @@ func (c *serviceClient) IPReassemblyEnableDisable(ctx context.Context, in *IPRea
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IPReassemblyGet(ctx context.Context, in *IPReassemblyGet) (*IPReassemblyGetReply, error) {
@@ -355,7 +380,7 @@ func (c *serviceClient) IPReassemblyGet(ctx context.Context, in *IPReassemblyGet
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IPReassemblySet(ctx context.Context, in *IPReassemblySet) (*IPReassemblySetReply, error) {
@@ -364,7 +389,7 @@ func (c *serviceClient) IPReassemblySet(ctx context.Context, in *IPReassemblySet
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IPRouteAddDel(ctx context.Context, in *IPRouteAddDel) (*IPRouteAddDelReply, error) {
@@ -373,7 +398,7 @@ func (c *serviceClient) IPRouteAddDel(ctx context.Context, in *IPRouteAddDel) (*
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IPRouteDump(ctx context.Context, in *IPRouteDump) (RPCService_IPRouteDumpClient, error) {
@@ -409,6 +434,10 @@ func (c *serviceClient_IPRouteDumpClient) Recv() (*IPRouteDetails, error) {
case *IPRouteDetails:
return m, nil
case *vpe.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)
@@ -421,7 +450,7 @@ func (c *serviceClient) IPSourceAndPortRangeCheckAddDel(ctx context.Context, in
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IPSourceAndPortRangeCheckInterfaceAddDel(ctx context.Context, in *IPSourceAndPortRangeCheckInterfaceAddDel) (*IPSourceAndPortRangeCheckInterfaceAddDelReply, error) {
@@ -430,7 +459,7 @@ func (c *serviceClient) IPSourceAndPortRangeCheckInterfaceAddDel(ctx context.Con
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IPSourceCheckInterfaceAddDel(ctx context.Context, in *IPSourceCheckInterfaceAddDel) (*IPSourceCheckInterfaceAddDelReply, error) {
@@ -439,7 +468,7 @@ func (c *serviceClient) IPSourceCheckInterfaceAddDel(ctx context.Context, in *IP
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IPTableAddDel(ctx context.Context, in *IPTableAddDel) (*IPTableAddDelReply, error) {
@@ -448,7 +477,7 @@ func (c *serviceClient) IPTableAddDel(ctx context.Context, in *IPTableAddDel) (*
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IPTableDump(ctx context.Context, in *IPTableDump) (RPCService_IPTableDumpClient, error) {
@@ -484,6 +513,10 @@ func (c *serviceClient_IPTableDumpClient) Recv() (*IPTableDetails, error) {
case *IPTableDetails:
return m, nil
case *vpe.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)
@@ -496,7 +529,7 @@ func (c *serviceClient) IPTableFlush(ctx context.Context, in *IPTableFlush) (*IP
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IPTableReplaceBegin(ctx context.Context, in *IPTableReplaceBegin) (*IPTableReplaceBeginReply, error) {
@@ -505,7 +538,7 @@ func (c *serviceClient) IPTableReplaceBegin(ctx context.Context, in *IPTableRepl
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IPTableReplaceEnd(ctx context.Context, in *IPTableReplaceEnd) (*IPTableReplaceEndReply, error) {
@@ -514,7 +547,7 @@ func (c *serviceClient) IPTableReplaceEnd(ctx context.Context, in *IPTableReplac
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IPUnnumberedDump(ctx context.Context, in *IPUnnumberedDump) (RPCService_IPUnnumberedDumpClient, error) {
@@ -550,6 +583,10 @@ func (c *serviceClient_IPUnnumberedDumpClient) Recv() (*IPUnnumberedDetails, err
case *IPUnnumberedDetails:
return m, nil
case *vpe.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)
@@ -589,6 +626,10 @@ func (c *serviceClient_MfibSignalDumpClient) Recv() (*MfibSignalDetails, error)
case *MfibSignalDetails:
return m, nil
case *vpe.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)
@@ -601,7 +642,7 @@ func (c *serviceClient) SetIPFlowHash(ctx context.Context, in *SetIPFlowHash) (*
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SwInterfaceIP6EnableDisable(ctx context.Context, in *SwInterfaceIP6EnableDisable) (*SwInterfaceIP6EnableDisableReply, error) {
@@ -610,7 +651,7 @@ func (c *serviceClient) SwInterfaceIP6EnableDisable(ctx context.Context, in *SwI
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SwInterfaceIP6SetLinkLocalAddress(ctx context.Context, in *SwInterfaceIP6SetLinkLocalAddress) (*SwInterfaceIP6SetLinkLocalAddressReply, error) {
@@ -619,5 +660,5 @@ func (c *serviceClient) SwInterfaceIP6SetLinkLocalAddress(ctx context.Context, i
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/ip6_nd/ip6_nd.ba.go b/internal/testbinapi/binapi2001/ip6_nd/ip6_nd.ba.go
index e21f2d3..bae32c7 100644
--- a/internal/testbinapi/binapi2001/ip6_nd/ip6_nd.ba.go
+++ b/internal/testbinapi/binapi2001/ip6_nd/ip6_nd.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/ip6_nd.api.json
@@ -17,11 +17,12 @@ package ip6_nd
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -498,12 +499,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -532,12 +536,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -566,12 +573,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -595,6 +605,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -607,8 +621,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -618,12 +633,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -666,18 +684,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -720,18 +742,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -790,6 +816,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -800,13 +827,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -824,8 +854,9 @@ type PrefixMatcher struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/ip6_nd/ip6_nd_rpc.ba.go b/internal/testbinapi/binapi2001/ip6_nd/ip6_nd_rpc.ba.go
index e4840db..1d18c7d 100644
--- a/internal/testbinapi/binapi2001/ip6_nd/ip6_nd_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/ip6_nd/ip6_nd_rpc.ba.go
@@ -5,12 +5,13 @@ package ip6_nd
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service ip6_nd.
+// RPCService defines RPC service ip6_nd.
type RPCService interface {
IP6ndProxyAddDel(ctx context.Context, in *IP6ndProxyAddDel) (*IP6ndProxyAddDelReply, error)
IP6ndProxyDump(ctx context.Context, in *IP6ndProxyDump) (RPCService_IP6ndProxyDumpClient, error)
@@ -34,7 +35,7 @@ func (c *serviceClient) IP6ndProxyAddDel(ctx context.Context, in *IP6ndProxyAddD
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IP6ndProxyDump(ctx context.Context, in *IP6ndProxyDump) (RPCService_IP6ndProxyDumpClient, error) {
@@ -70,6 +71,10 @@ func (c *serviceClient_IP6ndProxyDumpClient) Recv() (*IP6ndProxyDetails, error)
case *IP6ndProxyDetails:
return m, nil
case *vpe.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)
@@ -82,7 +87,7 @@ func (c *serviceClient) IP6ndSendRouterSolicitation(ctx context.Context, in *IP6
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SwInterfaceIP6ndRaConfig(ctx context.Context, in *SwInterfaceIP6ndRaConfig) (*SwInterfaceIP6ndRaConfigReply, error) {
@@ -91,7 +96,7 @@ func (c *serviceClient) SwInterfaceIP6ndRaConfig(ctx context.Context, in *SwInte
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SwInterfaceIP6ndRaPrefix(ctx context.Context, in *SwInterfaceIP6ndRaPrefix) (*SwInterfaceIP6ndRaPrefixReply, error) {
@@ -100,7 +105,7 @@ func (c *serviceClient) SwInterfaceIP6ndRaPrefix(ctx context.Context, in *SwInte
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) WantIP6RaEvents(ctx context.Context, in *WantIP6RaEvents) (*WantIP6RaEventsReply, error) {
@@ -109,5 +114,5 @@ func (c *serviceClient) WantIP6RaEvents(ctx context.Context, in *WantIP6RaEvents
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/ip_neighbor/ip_neighbor.ba.go b/internal/testbinapi/binapi2001/ip_neighbor/ip_neighbor.ba.go
index 93def01..6e88503 100644
--- a/internal/testbinapi/binapi2001/ip_neighbor/ip_neighbor.ba.go
+++ b/internal/testbinapi/binapi2001/ip_neighbor/ip_neighbor.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/ip_neighbor.api.json
@@ -17,11 +17,12 @@ package ip_neighbor
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -547,12 +548,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -581,12 +585,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -615,12 +622,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -645,15 +655,19 @@ func ParseMacAddress(s string) (MacAddress, error) {
copy(macaddr[:], mac[:])
return macaddr, nil
}
+
func (x MacAddress) ToMAC() net.HardwareAddr {
return net.HardwareAddr(x[:])
}
+
func (x MacAddress) String() string {
return x.ToMAC().String()
}
+
func (x *MacAddress) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *MacAddress) UnmarshalText(text []byte) error {
mac, err := ParseMacAddress(string(text))
if err != nil {
@@ -674,6 +688,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -686,8 +704,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -697,12 +716,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -745,18 +767,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -799,18 +825,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -869,6 +899,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -879,13 +910,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -903,8 +937,9 @@ type PrefixMatcher struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/ip_neighbor/ip_neighbor_rpc.ba.go b/internal/testbinapi/binapi2001/ip_neighbor/ip_neighbor_rpc.ba.go
index 89a64d6..9cab182 100644
--- a/internal/testbinapi/binapi2001/ip_neighbor/ip_neighbor_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/ip_neighbor/ip_neighbor_rpc.ba.go
@@ -5,12 +5,13 @@ package ip_neighbor
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service ip_neighbor.
+// RPCService defines RPC service ip_neighbor.
type RPCService interface {
IPNeighborAddDel(ctx context.Context, in *IPNeighborAddDel) (*IPNeighborAddDelReply, error)
IPNeighborConfig(ctx context.Context, in *IPNeighborConfig) (*IPNeighborConfigReply, error)
@@ -32,7 +33,7 @@ func (c *serviceClient) IPNeighborAddDel(ctx context.Context, in *IPNeighborAddD
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IPNeighborConfig(ctx context.Context, in *IPNeighborConfig) (*IPNeighborConfigReply, error) {
@@ -41,7 +42,7 @@ func (c *serviceClient) IPNeighborConfig(ctx context.Context, in *IPNeighborConf
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IPNeighborDump(ctx context.Context, in *IPNeighborDump) (RPCService_IPNeighborDumpClient, error) {
@@ -77,6 +78,10 @@ func (c *serviceClient_IPNeighborDumpClient) Recv() (*IPNeighborDetails, error)
case *IPNeighborDetails:
return m, nil
case *vpe.ControlPingReply:
+ err = c.Stream.Close()
+ if err != nil {
+ return nil, err
+ }
return nil, io.EOF
default:
return nil, fmt.Errorf("unexpected message: %T %v", m, m)
@@ -89,5 +94,5 @@ func (c *serviceClient) WantIPNeighborEvents(ctx context.Context, in *WantIPNeig
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/ip_types/ip_types.ba.go b/internal/testbinapi/binapi2001/ip_types/ip_types.ba.go
index 67d02c9..b302df0 100644
--- a/internal/testbinapi/binapi2001/ip_types/ip_types.ba.go
+++ b/internal/testbinapi/binapi2001/ip_types/ip_types.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/ip_types.api.json
@@ -16,11 +16,12 @@ package ip_types
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -29,6 +30,12 @@ import (
// GoVPP api package needs to be updated.
const _ = api.GoVppAPIPackageIsVersion2
+const (
+ APIFile = "ip_types"
+ APIVersion = "3.0.0"
+ VersionCrc = 0x80424562
+)
+
// AddressFamily defines enum 'address_family'.
type AddressFamily uint32
@@ -240,12 +247,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -271,12 +281,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -305,12 +318,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -334,6 +350,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -346,8 +366,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -357,12 +378,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -405,18 +429,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -459,18 +487,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -521,6 +553,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -531,13 +564,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -555,8 +591,9 @@ type PrefixMatcher struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/ipfix_export/ipfix_export.ba.go b/internal/testbinapi/binapi2001/ipfix_export/ipfix_export.ba.go
index 12b020b..ee75bbf 100644
--- a/internal/testbinapi/binapi2001/ipfix_export/ipfix_export.ba.go
+++ b/internal/testbinapi/binapi2001/ipfix_export/ipfix_export.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/ipfix_export.api.json
@@ -17,11 +17,12 @@ package ipfix_export
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -247,12 +248,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -278,12 +282,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -312,12 +319,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -341,6 +351,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -353,8 +367,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -364,12 +379,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -412,18 +430,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -466,18 +488,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -528,6 +554,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -538,13 +565,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -562,8 +592,9 @@ type PrefixMatcher struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/ipfix_export/ipfix_export_rpc.ba.go b/internal/testbinapi/binapi2001/ipfix_export/ipfix_export_rpc.ba.go
index 0189d4d..c0de49b 100644
--- a/internal/testbinapi/binapi2001/ipfix_export/ipfix_export_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/ipfix_export/ipfix_export_rpc.ba.go
@@ -5,12 +5,13 @@ package ipfix_export
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service ipfix_export.
+// RPCService defines RPC service ipfix_export.
type RPCService interface {
IpfixClassifyStreamDump(ctx context.Context, in *IpfixClassifyStreamDump) (RPCService_IpfixClassifyStreamDumpClient, error)
IpfixClassifyTableAddDel(ctx context.Context, in *IpfixClassifyTableAddDel) (*IpfixClassifyTableAddDelReply, error)
@@ -62,6 +63,10 @@ func (c *serviceClient_IpfixClassifyStreamDumpClient) Recv() (*IpfixClassifyStre
case *IpfixClassifyStreamDetails:
return m, nil
case *vpe.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)
@@ -74,7 +79,7 @@ func (c *serviceClient) IpfixClassifyTableAddDel(ctx context.Context, in *IpfixC
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IpfixClassifyTableDump(ctx context.Context, in *IpfixClassifyTableDump) (RPCService_IpfixClassifyTableDumpClient, error) {
@@ -110,6 +115,10 @@ func (c *serviceClient_IpfixClassifyTableDumpClient) Recv() (*IpfixClassifyTable
case *IpfixClassifyTableDetails:
return m, nil
case *vpe.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)
@@ -149,6 +158,10 @@ func (c *serviceClient_IpfixExporterDumpClient) Recv() (*IpfixExporterDetails, e
case *IpfixExporterDetails:
return m, nil
case *vpe.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)
@@ -161,7 +174,7 @@ func (c *serviceClient) IpfixFlush(ctx context.Context, in *IpfixFlush) (*IpfixF
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SetIpfixClassifyStream(ctx context.Context, in *SetIpfixClassifyStream) (*SetIpfixClassifyStreamReply, error) {
@@ -170,7 +183,7 @@ func (c *serviceClient) SetIpfixClassifyStream(ctx context.Context, in *SetIpfix
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SetIpfixExporter(ctx context.Context, in *SetIpfixExporter) (*SetIpfixExporterReply, error) {
@@ -179,5 +192,5 @@ func (c *serviceClient) SetIpfixExporter(ctx context.Context, in *SetIpfixExport
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/ipip/ipip.ba.go b/internal/testbinapi/binapi2001/ipip/ipip.ba.go
index e345dc7..6118a82 100644
--- a/internal/testbinapi/binapi2001/ipip/ipip.ba.go
+++ b/internal/testbinapi/binapi2001/ipip/ipip.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/ipip.api.json
@@ -17,11 +17,12 @@ package ipip
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -556,12 +557,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -590,12 +594,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -624,12 +631,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -653,6 +663,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -665,8 +679,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -676,12 +691,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -724,18 +742,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -778,18 +800,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -851,6 +877,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -861,13 +888,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -885,8 +915,9 @@ type PrefixMatcher struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/ipip/ipip_rpc.ba.go b/internal/testbinapi/binapi2001/ipip/ipip_rpc.ba.go
index 66acb4e..27666ae 100644
--- a/internal/testbinapi/binapi2001/ipip/ipip_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/ipip/ipip_rpc.ba.go
@@ -5,12 +5,13 @@ package ipip
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service ipip.
+// RPCService defines RPC service ipip.
type RPCService interface {
Ipip6rdAddTunnel(ctx context.Context, in *Ipip6rdAddTunnel) (*Ipip6rdAddTunnelReply, error)
Ipip6rdDelTunnel(ctx context.Context, in *Ipip6rdDelTunnel) (*Ipip6rdDelTunnelReply, error)
@@ -33,7 +34,7 @@ func (c *serviceClient) Ipip6rdAddTunnel(ctx context.Context, in *Ipip6rdAddTunn
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) Ipip6rdDelTunnel(ctx context.Context, in *Ipip6rdDelTunnel) (*Ipip6rdDelTunnelReply, error) {
@@ -42,7 +43,7 @@ func (c *serviceClient) Ipip6rdDelTunnel(ctx context.Context, in *Ipip6rdDelTunn
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IpipAddTunnel(ctx context.Context, in *IpipAddTunnel) (*IpipAddTunnelReply, error) {
@@ -51,7 +52,7 @@ func (c *serviceClient) IpipAddTunnel(ctx context.Context, in *IpipAddTunnel) (*
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IpipDelTunnel(ctx context.Context, in *IpipDelTunnel) (*IpipDelTunnelReply, error) {
@@ -60,7 +61,7 @@ func (c *serviceClient) IpipDelTunnel(ctx context.Context, in *IpipDelTunnel) (*
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IpipTunnelDump(ctx context.Context, in *IpipTunnelDump) (RPCService_IpipTunnelDumpClient, error) {
@@ -96,6 +97,10 @@ func (c *serviceClient_IpipTunnelDumpClient) Recv() (*IpipTunnelDetails, error)
case *IpipTunnelDetails:
return m, nil
case *vpe.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)
diff --git a/internal/testbinapi/binapi2001/ipip_types/ipip_types.ba.go b/internal/testbinapi/binapi2001/ipip_types/ipip_types.ba.go
index 62d42d7..a345908 100644
--- a/internal/testbinapi/binapi2001/ipip_types/ipip_types.ba.go
+++ b/internal/testbinapi/binapi2001/ipip_types/ipip_types.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/ipip_types.api.json
@@ -12,8 +12,9 @@
package ipip_types
import (
- api "git.fd.io/govpp.git/api"
"strconv"
+
+ api "git.fd.io/govpp.git/api"
)
// This is a compile-time assertion to ensure that this generated file
@@ -22,6 +23,12 @@ import (
// GoVPP api package needs to be updated.
const _ = api.GoVppAPIPackageIsVersion2
+const (
+ APIFile = "ipip_types"
+ APIVersion = ""
+ VersionCrc = 0xa2a8fa8d
+)
+
// IpipTunnelFlags defines enum 'ipip_tunnel_flags'.
type IpipTunnelFlags uint8
diff --git a/internal/testbinapi/binapi2001/ipsec/ipsec.ba.go b/internal/testbinapi/binapi2001/ipsec/ipsec.ba.go
index b1c0079..68aab51 100644
--- a/internal/testbinapi/binapi2001/ipsec/ipsec.ba.go
+++ b/internal/testbinapi/binapi2001/ipsec/ipsec.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/ipsec.api.json
@@ -17,11 +17,12 @@ package ipsec
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -715,12 +716,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -749,12 +753,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -783,12 +790,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -812,6 +822,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -824,8 +838,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -835,12 +850,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -883,18 +901,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -937,18 +959,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -1047,6 +1073,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -1057,13 +1084,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -1081,8 +1111,9 @@ type PrefixMatcher struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/ipsec/ipsec_rpc.ba.go b/internal/testbinapi/binapi2001/ipsec/ipsec_rpc.ba.go
index c14df44..d2ccabb 100644
--- a/internal/testbinapi/binapi2001/ipsec/ipsec_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/ipsec/ipsec_rpc.ba.go
@@ -5,12 +5,13 @@ package ipsec
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service ipsec.
+// RPCService defines RPC service ipsec.
type RPCService interface {
IpsecBackendDump(ctx context.Context, in *IpsecBackendDump) (RPCService_IpsecBackendDumpClient, error)
IpsecInterfaceAddDelSpd(ctx context.Context, in *IpsecInterfaceAddDelSpd) (*IpsecInterfaceAddDelSpdReply, error)
@@ -70,6 +71,10 @@ func (c *serviceClient_IpsecBackendDumpClient) Recv() (*IpsecBackendDetails, err
case *IpsecBackendDetails:
return m, nil
case *vpe.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)
@@ -82,7 +87,7 @@ func (c *serviceClient) IpsecInterfaceAddDelSpd(ctx context.Context, in *IpsecIn
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IpsecSaDump(ctx context.Context, in *IpsecSaDump) (RPCService_IpsecSaDumpClient, error) {
@@ -118,6 +123,10 @@ func (c *serviceClient_IpsecSaDumpClient) Recv() (*IpsecSaDetails, error) {
case *IpsecSaDetails:
return m, nil
case *vpe.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)
@@ -130,7 +139,7 @@ func (c *serviceClient) IpsecSadEntryAddDel(ctx context.Context, in *IpsecSadEnt
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IpsecSelectBackend(ctx context.Context, in *IpsecSelectBackend) (*IpsecSelectBackendReply, error) {
@@ -139,7 +148,7 @@ func (c *serviceClient) IpsecSelectBackend(ctx context.Context, in *IpsecSelectB
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IpsecSpdAddDel(ctx context.Context, in *IpsecSpdAddDel) (*IpsecSpdAddDelReply, error) {
@@ -148,7 +157,7 @@ func (c *serviceClient) IpsecSpdAddDel(ctx context.Context, in *IpsecSpdAddDel)
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IpsecSpdDump(ctx context.Context, in *IpsecSpdDump) (RPCService_IpsecSpdDumpClient, error) {
@@ -184,6 +193,10 @@ func (c *serviceClient_IpsecSpdDumpClient) Recv() (*IpsecSpdDetails, error) {
case *IpsecSpdDetails:
return m, nil
case *vpe.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)
@@ -196,7 +209,7 @@ func (c *serviceClient) IpsecSpdEntryAddDel(ctx context.Context, in *IpsecSpdEnt
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IpsecSpdInterfaceDump(ctx context.Context, in *IpsecSpdInterfaceDump) (RPCService_IpsecSpdInterfaceDumpClient, error) {
@@ -232,6 +245,10 @@ func (c *serviceClient_IpsecSpdInterfaceDumpClient) Recv() (*IpsecSpdInterfaceDe
case *IpsecSpdInterfaceDetails:
return m, nil
case *vpe.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)
@@ -271,6 +288,10 @@ func (c *serviceClient_IpsecSpdsDumpClient) Recv() (*IpsecSpdsDetails, error) {
case *IpsecSpdsDetails:
return m, nil
case *vpe.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)
@@ -283,7 +304,7 @@ func (c *serviceClient) IpsecTunnelIfAddDel(ctx context.Context, in *IpsecTunnel
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IpsecTunnelIfSetSa(ctx context.Context, in *IpsecTunnelIfSetSa) (*IpsecTunnelIfSetSaReply, error) {
@@ -292,7 +313,7 @@ func (c *serviceClient) IpsecTunnelIfSetSa(ctx context.Context, in *IpsecTunnelI
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IpsecTunnelProtectDel(ctx context.Context, in *IpsecTunnelProtectDel) (*IpsecTunnelProtectDelReply, error) {
@@ -301,7 +322,7 @@ func (c *serviceClient) IpsecTunnelProtectDel(ctx context.Context, in *IpsecTunn
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) IpsecTunnelProtectDump(ctx context.Context, in *IpsecTunnelProtectDump) (RPCService_IpsecTunnelProtectDumpClient, error) {
@@ -337,6 +358,10 @@ func (c *serviceClient_IpsecTunnelProtectDumpClient) Recv() (*IpsecTunnelProtect
case *IpsecTunnelProtectDetails:
return m, nil
case *vpe.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)
@@ -349,5 +374,5 @@ func (c *serviceClient) IpsecTunnelProtectUpdate(ctx context.Context, in *IpsecT
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/ipsec_types/ipsec_types.ba.go b/internal/testbinapi/binapi2001/ipsec_types/ipsec_types.ba.go
index 9123fc4..a55ac08 100644
--- a/internal/testbinapi/binapi2001/ipsec_types/ipsec_types.ba.go
+++ b/internal/testbinapi/binapi2001/ipsec_types/ipsec_types.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/ipsec_types.api.json
@@ -16,11 +16,12 @@ package ipsec_types
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -29,6 +30,12 @@ import (
// GoVPP api package needs to be updated.
const _ = api.GoVppAPIPackageIsVersion2
+const (
+ APIFile = "ipsec_types"
+ APIVersion = "3.0.0"
+ VersionCrc = 0x6e9f4c73
+)
+
// AddressFamily defines enum 'address_family'.
type AddressFamily uint32
@@ -424,12 +431,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -455,12 +465,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -489,12 +502,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -518,6 +534,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -530,8 +550,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -541,12 +562,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -589,18 +613,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -643,18 +671,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -727,6 +759,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -737,13 +770,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -761,8 +797,9 @@ type PrefixMatcher struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/l2/l2.ba.go b/internal/testbinapi/binapi2001/l2/l2.ba.go
index d4af668..9eee598 100644
--- a/internal/testbinapi/binapi2001/l2/l2.ba.go
+++ b/internal/testbinapi/binapi2001/l2/l2.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/l2.api.json
@@ -17,11 +17,12 @@ package l2
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -589,12 +590,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -623,12 +627,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -657,12 +664,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -687,15 +697,19 @@ func ParseMacAddress(s string) (MacAddress, error) {
copy(macaddr[:], mac[:])
return macaddr, nil
}
+
func (x MacAddress) ToMAC() net.HardwareAddr {
return net.HardwareAddr(x[:])
}
+
func (x MacAddress) String() string {
return x.ToMAC().String()
}
+
func (x *MacAddress) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *MacAddress) UnmarshalText(text []byte) error {
mac, err := ParseMacAddress(string(text))
if err != nil {
@@ -716,6 +730,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -728,8 +746,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -739,12 +758,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -801,18 +823,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -855,18 +881,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -925,6 +955,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -935,13 +966,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -959,8 +993,9 @@ type PrefixMatcher struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/l2/l2_rpc.ba.go b/internal/testbinapi/binapi2001/l2/l2_rpc.ba.go
index 7f8f246..106ca97 100644
--- a/internal/testbinapi/binapi2001/l2/l2_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/l2/l2_rpc.ba.go
@@ -5,12 +5,13 @@ package l2
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service l2.
+// RPCService defines RPC service l2.
type RPCService interface {
BdIPMacAddDel(ctx context.Context, in *BdIPMacAddDel) (*BdIPMacAddDelReply, error)
BdIPMacDump(ctx context.Context, in *BdIPMacDump) (RPCService_BdIPMacDumpClient, error)
@@ -54,7 +55,7 @@ func (c *serviceClient) BdIPMacAddDel(ctx context.Context, in *BdIPMacAddDel) (*
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) BdIPMacDump(ctx context.Context, in *BdIPMacDump) (RPCService_BdIPMacDumpClient, error) {
@@ -90,6 +91,10 @@ func (c *serviceClient_BdIPMacDumpClient) Recv() (*BdIPMacDetails, error) {
case *BdIPMacDetails:
return m, nil
case *vpe.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)
@@ -102,7 +107,7 @@ func (c *serviceClient) BdIPMacFlush(ctx context.Context, in *BdIPMacFlush) (*Bd
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) BridgeDomainAddDel(ctx context.Context, in *BridgeDomainAddDel) (*BridgeDomainAddDelReply, error) {
@@ -111,7 +116,7 @@ func (c *serviceClient) BridgeDomainAddDel(ctx context.Context, in *BridgeDomain
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) BridgeDomainDump(ctx context.Context, in *BridgeDomainDump) (RPCService_BridgeDomainDumpClient, error) {
@@ -147,6 +152,10 @@ func (c *serviceClient_BridgeDomainDumpClient) Recv() (*BridgeDomainDetails, err
case *BridgeDomainDetails:
return m, nil
case *vpe.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)
@@ -159,7 +168,7 @@ func (c *serviceClient) BridgeDomainSetMacAge(ctx context.Context, in *BridgeDom
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) BridgeFlags(ctx context.Context, in *BridgeFlags) (*BridgeFlagsReply, error) {
@@ -168,7 +177,7 @@ func (c *serviceClient) BridgeFlags(ctx context.Context, in *BridgeFlags) (*Brid
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) BviCreate(ctx context.Context, in *BviCreate) (*BviCreateReply, error) {
@@ -177,7 +186,7 @@ func (c *serviceClient) BviCreate(ctx context.Context, in *BviCreate) (*BviCreat
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) BviDelete(ctx context.Context, in *BviDelete) (*BviDeleteReply, error) {
@@ -186,7 +195,7 @@ func (c *serviceClient) BviDelete(ctx context.Context, in *BviDelete) (*BviDelet
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) L2FibClearTable(ctx context.Context, in *L2FibClearTable) (*L2FibClearTableReply, error) {
@@ -195,7 +204,7 @@ func (c *serviceClient) L2FibClearTable(ctx context.Context, in *L2FibClearTable
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) L2FibTableDump(ctx context.Context, in *L2FibTableDump) (RPCService_L2FibTableDumpClient, error) {
@@ -231,6 +240,10 @@ func (c *serviceClient_L2FibTableDumpClient) Recv() (*L2FibTableDetails, error)
case *L2FibTableDetails:
return m, nil
case *vpe.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)
@@ -243,7 +256,7 @@ func (c *serviceClient) L2Flags(ctx context.Context, in *L2Flags) (*L2FlagsReply
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) L2InterfaceEfpFilter(ctx context.Context, in *L2InterfaceEfpFilter) (*L2InterfaceEfpFilterReply, error) {
@@ -252,7 +265,7 @@ func (c *serviceClient) L2InterfaceEfpFilter(ctx context.Context, in *L2Interfac
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) L2InterfacePbbTagRewrite(ctx context.Context, in *L2InterfacePbbTagRewrite) (*L2InterfacePbbTagRewriteReply, error) {
@@ -261,7 +274,7 @@ func (c *serviceClient) L2InterfacePbbTagRewrite(ctx context.Context, in *L2Inte
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) L2InterfaceVlanTagRewrite(ctx context.Context, in *L2InterfaceVlanTagRewrite) (*L2InterfaceVlanTagRewriteReply, error) {
@@ -270,7 +283,7 @@ func (c *serviceClient) L2InterfaceVlanTagRewrite(ctx context.Context, in *L2Int
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) L2PatchAddDel(ctx context.Context, in *L2PatchAddDel) (*L2PatchAddDelReply, error) {
@@ -279,7 +292,7 @@ func (c *serviceClient) L2PatchAddDel(ctx context.Context, in *L2PatchAddDel) (*
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) L2XconnectDump(ctx context.Context, in *L2XconnectDump) (RPCService_L2XconnectDumpClient, error) {
@@ -315,6 +328,10 @@ func (c *serviceClient_L2XconnectDumpClient) Recv() (*L2XconnectDetails, error)
case *L2XconnectDetails:
return m, nil
case *vpe.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)
@@ -327,7 +344,7 @@ func (c *serviceClient) L2fibAddDel(ctx context.Context, in *L2fibAddDel) (*L2fi
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) L2fibFlushAll(ctx context.Context, in *L2fibFlushAll) (*L2fibFlushAllReply, error) {
@@ -336,7 +353,7 @@ func (c *serviceClient) L2fibFlushAll(ctx context.Context, in *L2fibFlushAll) (*
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) L2fibFlushBd(ctx context.Context, in *L2fibFlushBd) (*L2fibFlushBdReply, error) {
@@ -345,7 +362,7 @@ func (c *serviceClient) L2fibFlushBd(ctx context.Context, in *L2fibFlushBd) (*L2
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) L2fibFlushInt(ctx context.Context, in *L2fibFlushInt) (*L2fibFlushIntReply, error) {
@@ -354,7 +371,7 @@ func (c *serviceClient) L2fibFlushInt(ctx context.Context, in *L2fibFlushInt) (*
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SwInterfaceSetL2Bridge(ctx context.Context, in *SwInterfaceSetL2Bridge) (*SwInterfaceSetL2BridgeReply, error) {
@@ -363,7 +380,7 @@ func (c *serviceClient) SwInterfaceSetL2Bridge(ctx context.Context, in *SwInterf
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SwInterfaceSetL2Xconnect(ctx context.Context, in *SwInterfaceSetL2Xconnect) (*SwInterfaceSetL2XconnectReply, error) {
@@ -372,7 +389,7 @@ func (c *serviceClient) SwInterfaceSetL2Xconnect(ctx context.Context, in *SwInte
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SwInterfaceSetVpath(ctx context.Context, in *SwInterfaceSetVpath) (*SwInterfaceSetVpathReply, error) {
@@ -381,7 +398,7 @@ func (c *serviceClient) SwInterfaceSetVpath(ctx context.Context, in *SwInterface
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) WantL2ArpTermEvents(ctx context.Context, in *WantL2ArpTermEvents) (*WantL2ArpTermEventsReply, error) {
@@ -390,7 +407,7 @@ func (c *serviceClient) WantL2ArpTermEvents(ctx context.Context, in *WantL2ArpTe
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) WantL2MacsEvents(ctx context.Context, in *WantL2MacsEvents) (*WantL2MacsEventsReply, error) {
@@ -399,5 +416,5 @@ func (c *serviceClient) WantL2MacsEvents(ctx context.Context, in *WantL2MacsEven
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/l2e/l2e.ba.go b/internal/testbinapi/binapi2001/l2e/l2e.ba.go
index 02680bb..ef750b9 100644
--- a/internal/testbinapi/binapi2001/l2e/l2e.ba.go
+++ b/internal/testbinapi/binapi2001/l2e/l2e.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/l2e.api.json
@@ -14,9 +14,10 @@
package l2e
import (
+ "strconv"
+
api "git.fd.io/govpp.git/api"
codec "git.fd.io/govpp.git/codec"
- "strconv"
)
// This is a compile-time assertion to ensure that this generated file
diff --git a/internal/testbinapi/binapi2001/l2e/l2e_rpc.ba.go b/internal/testbinapi/binapi2001/l2e/l2e_rpc.ba.go
index e589d28..277e04e 100644
--- a/internal/testbinapi/binapi2001/l2e/l2e_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/l2e/l2e_rpc.ba.go
@@ -4,10 +4,11 @@ package l2e
import (
"context"
+
api "git.fd.io/govpp.git/api"
)
-// RPCService defines RPC service l2e.
+// RPCService defines RPC service l2e.
type RPCService interface {
L2Emulation(ctx context.Context, in *L2Emulation) (*L2EmulationReply, error)
}
@@ -26,5 +27,5 @@ func (c *serviceClient) L2Emulation(ctx context.Context, in *L2Emulation) (*L2Em
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/l2tp/l2tp.ba.go b/internal/testbinapi/binapi2001/l2tp/l2tp.ba.go
index 402bb21..3aea952 100644
--- a/internal/testbinapi/binapi2001/l2tp/l2tp.ba.go
+++ b/internal/testbinapi/binapi2001/l2tp/l2tp.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/l2tp.api.json
@@ -17,11 +17,12 @@ package l2tp
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -528,12 +529,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -562,12 +566,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -596,12 +603,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -626,15 +636,19 @@ func ParseMacAddress(s string) (MacAddress, error) {
copy(macaddr[:], mac[:])
return macaddr, nil
}
+
func (x MacAddress) ToMAC() net.HardwareAddr {
return net.HardwareAddr(x[:])
}
+
func (x MacAddress) String() string {
return x.ToMAC().String()
}
+
func (x *MacAddress) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *MacAddress) UnmarshalText(text []byte) error {
mac, err := ParseMacAddress(string(text))
if err != nil {
@@ -655,6 +669,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -667,8 +685,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -678,12 +697,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -726,18 +748,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -780,18 +806,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -842,6 +872,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -852,13 +883,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -876,8 +910,9 @@ type PrefixMatcher struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/l2tp/l2tp_rpc.ba.go b/internal/testbinapi/binapi2001/l2tp/l2tp_rpc.ba.go
index 49db4ce..f0b1e59 100644
--- a/internal/testbinapi/binapi2001/l2tp/l2tp_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/l2tp/l2tp_rpc.ba.go
@@ -5,12 +5,13 @@ package l2tp
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service l2tp.
+// RPCService defines RPC service l2tp.
type RPCService interface {
L2tpv3CreateTunnel(ctx context.Context, in *L2tpv3CreateTunnel) (*L2tpv3CreateTunnelReply, error)
L2tpv3InterfaceEnableDisable(ctx context.Context, in *L2tpv3InterfaceEnableDisable) (*L2tpv3InterfaceEnableDisableReply, error)
@@ -33,7 +34,7 @@ func (c *serviceClient) L2tpv3CreateTunnel(ctx context.Context, in *L2tpv3Create
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) L2tpv3InterfaceEnableDisable(ctx context.Context, in *L2tpv3InterfaceEnableDisable) (*L2tpv3InterfaceEnableDisableReply, error) {
@@ -42,7 +43,7 @@ func (c *serviceClient) L2tpv3InterfaceEnableDisable(ctx context.Context, in *L2
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) L2tpv3SetLookupKey(ctx context.Context, in *L2tpv3SetLookupKey) (*L2tpv3SetLookupKeyReply, error) {
@@ -51,7 +52,7 @@ func (c *serviceClient) L2tpv3SetLookupKey(ctx context.Context, in *L2tpv3SetLoo
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) L2tpv3SetTunnelCookies(ctx context.Context, in *L2tpv3SetTunnelCookies) (*L2tpv3SetTunnelCookiesReply, error) {
@@ -60,7 +61,7 @@ func (c *serviceClient) L2tpv3SetTunnelCookies(ctx context.Context, in *L2tpv3Se
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SwIfL2tpv3TunnelDump(ctx context.Context, in *SwIfL2tpv3TunnelDump) (RPCService_SwIfL2tpv3TunnelDumpClient, error) {
@@ -96,6 +97,10 @@ func (c *serviceClient_SwIfL2tpv3TunnelDumpClient) Recv() (*SwIfL2tpv3TunnelDeta
case *SwIfL2tpv3TunnelDetails:
return m, nil
case *vpe.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)
diff --git a/internal/testbinapi/binapi2001/l3xc/l3xc.ba.go b/internal/testbinapi/binapi2001/l3xc/l3xc.ba.go
index 82948f2..27aa4c6 100644
--- a/internal/testbinapi/binapi2001/l3xc/l3xc.ba.go
+++ b/internal/testbinapi/binapi2001/l3xc/l3xc.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/l3xc.api.json
@@ -17,11 +17,12 @@ package l3xc
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -640,12 +641,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -674,12 +678,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -708,12 +715,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -737,6 +747,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -749,8 +763,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -760,12 +775,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -839,18 +857,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -893,18 +915,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -963,6 +989,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -973,13 +1000,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -997,8 +1027,9 @@ type PrefixMatcher struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/l3xc/l3xc_rpc.ba.go b/internal/testbinapi/binapi2001/l3xc/l3xc_rpc.ba.go
index b25727e..9f4c8a7 100644
--- a/internal/testbinapi/binapi2001/l3xc/l3xc_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/l3xc/l3xc_rpc.ba.go
@@ -5,12 +5,13 @@ package l3xc
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service l3xc.
+// RPCService defines RPC service l3xc.
type RPCService interface {
L3xcDel(ctx context.Context, in *L3xcDel) (*L3xcDelReply, error)
L3xcDump(ctx context.Context, in *L3xcDump) (RPCService_L3xcDumpClient, error)
@@ -32,7 +33,7 @@ func (c *serviceClient) L3xcDel(ctx context.Context, in *L3xcDel) (*L3xcDelReply
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) L3xcDump(ctx context.Context, in *L3xcDump) (RPCService_L3xcDumpClient, error) {
@@ -68,6 +69,10 @@ func (c *serviceClient_L3xcDumpClient) Recv() (*L3xcDetails, error) {
case *L3xcDetails:
return m, nil
case *vpe.ControlPingReply:
+ err = c.Stream.Close()
+ if err != nil {
+ return nil, err
+ }
return nil, io.EOF
default:
return nil, fmt.Errorf("unexpected message: %T %v", m, m)
@@ -89,5 +94,5 @@ func (c *serviceClient) L3xcUpdate(ctx context.Context, in *L3xcUpdate) (*L3xcUp
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/lacp/lacp.ba.go b/internal/testbinapi/binapi2001/lacp/lacp.ba.go
index a2b5a9e..848079b 100644
--- a/internal/testbinapi/binapi2001/lacp/lacp.ba.go
+++ b/internal/testbinapi/binapi2001/lacp/lacp.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/lacp.api.json
@@ -14,10 +14,11 @@
package lacp
import (
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -298,15 +299,19 @@ func ParseMacAddress(s string) (MacAddress, error) {
copy(macaddr[:], mac[:])
return macaddr, nil
}
+
func (x MacAddress) ToMAC() net.HardwareAddr {
return net.HardwareAddr(x[:])
}
+
func (x MacAddress) String() string {
return x.ToMAC().String()
}
+
func (x *MacAddress) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *MacAddress) UnmarshalText(text []byte) error {
mac, err := ParseMacAddress(string(text))
if err != nil {
diff --git a/internal/testbinapi/binapi2001/lacp/lacp_rpc.ba.go b/internal/testbinapi/binapi2001/lacp/lacp_rpc.ba.go
index f983ccb..a2176a9 100644
--- a/internal/testbinapi/binapi2001/lacp/lacp_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/lacp/lacp_rpc.ba.go
@@ -5,12 +5,13 @@ package lacp
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service lacp.
+// RPCService defines RPC service lacp.
type RPCService interface {
SwInterfaceLacpDump(ctx context.Context, in *SwInterfaceLacpDump) (RPCService_SwInterfaceLacpDumpClient, error)
}
@@ -56,6 +57,10 @@ func (c *serviceClient_SwInterfaceLacpDumpClient) Recv() (*SwInterfaceLacpDetail
case *SwInterfaceLacpDetails:
return m, nil
case *vpe.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)
diff --git a/internal/testbinapi/binapi2001/lb/lb.ba.go b/internal/testbinapi/binapi2001/lb/lb.ba.go
index 348a150..12536bb 100644
--- a/internal/testbinapi/binapi2001/lb/lb.ba.go
+++ b/internal/testbinapi/binapi2001/lb/lb.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/lb.api.json
@@ -17,11 +17,12 @@ package lb
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -675,12 +676,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -709,12 +713,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -743,12 +750,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -772,6 +782,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -784,8 +798,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -795,12 +810,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -843,18 +861,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -897,18 +919,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -966,6 +992,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -976,13 +1003,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -1000,8 +1030,9 @@ type PrefixMatcher struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/lb/lb_rpc.ba.go b/internal/testbinapi/binapi2001/lb/lb_rpc.ba.go
index 3375e9c..43c0c4b 100644
--- a/internal/testbinapi/binapi2001/lb/lb_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/lb/lb_rpc.ba.go
@@ -5,12 +5,13 @@ package lb
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service lb.
+// RPCService defines RPC service lb.
type RPCService interface {
LbAddDelAs(ctx context.Context, in *LbAddDelAs) (*LbAddDelAsReply, error)
LbAddDelIntfNat4(ctx context.Context, in *LbAddDelIntfNat4) (*LbAddDelIntfNat4Reply, error)
@@ -36,7 +37,7 @@ func (c *serviceClient) LbAddDelAs(ctx context.Context, in *LbAddDelAs) (*LbAddD
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) LbAddDelIntfNat4(ctx context.Context, in *LbAddDelIntfNat4) (*LbAddDelIntfNat4Reply, error) {
@@ -45,7 +46,7 @@ func (c *serviceClient) LbAddDelIntfNat4(ctx context.Context, in *LbAddDelIntfNa
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) LbAddDelIntfNat6(ctx context.Context, in *LbAddDelIntfNat6) (*LbAddDelIntfNat6Reply, error) {
@@ -54,7 +55,7 @@ func (c *serviceClient) LbAddDelIntfNat6(ctx context.Context, in *LbAddDelIntfNa
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) LbAddDelVip(ctx context.Context, in *LbAddDelVip) (*LbAddDelVipReply, error) {
@@ -63,7 +64,7 @@ func (c *serviceClient) LbAddDelVip(ctx context.Context, in *LbAddDelVip) (*LbAd
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) LbAsDump(ctx context.Context, in *LbAsDump) (RPCService_LbAsDumpClient, error) {
@@ -99,6 +100,10 @@ func (c *serviceClient_LbAsDumpClient) Recv() (*LbAsDetails, error) {
case *LbAsDetails:
return m, nil
case *vpe.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)
@@ -111,7 +116,7 @@ func (c *serviceClient) LbConf(ctx context.Context, in *LbConf) (*LbConfReply, e
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) LbFlushVip(ctx context.Context, in *LbFlushVip) (*LbFlushVipReply, error) {
@@ -120,7 +125,7 @@ func (c *serviceClient) LbFlushVip(ctx context.Context, in *LbFlushVip) (*LbFlus
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) LbVipDump(ctx context.Context, in *LbVipDump) (RPCService_LbVipDumpClient, error) {
@@ -156,6 +161,10 @@ func (c *serviceClient_LbVipDumpClient) Recv() (*LbVipDetails, error) {
case *LbVipDetails:
return m, nil
case *vpe.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)
diff --git a/internal/testbinapi/binapi2001/lb_types/lb_types.ba.go b/internal/testbinapi/binapi2001/lb_types/lb_types.ba.go
index 48aa105..a2ac411 100644
--- a/internal/testbinapi/binapi2001/lb_types/lb_types.ba.go
+++ b/internal/testbinapi/binapi2001/lb_types/lb_types.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/lb_types.api.json
@@ -16,11 +16,12 @@ package lb_types
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -29,6 +30,12 @@ import (
// GoVPP api package needs to be updated.
const _ = api.GoVppAPIPackageIsVersion2
+const (
+ APIFile = "lb_types"
+ APIVersion = ""
+ VersionCrc = 0xd04207f3
+)
+
// AddressFamily defines enum 'address_family'.
type AddressFamily uint32
@@ -417,12 +424,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -448,12 +458,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -482,12 +495,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -511,6 +527,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -523,8 +543,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -534,12 +555,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -582,18 +606,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -636,18 +664,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -705,6 +737,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -715,13 +748,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -739,8 +775,9 @@ type PrefixMatcher struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/lisp/lisp.ba.go b/internal/testbinapi/binapi2001/lisp/lisp.ba.go
index 20a7d42..dd605c7 100644
--- a/internal/testbinapi/binapi2001/lisp/lisp.ba.go
+++ b/internal/testbinapi/binapi2001/lisp/lisp.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/lisp.api.json
diff --git a/internal/testbinapi/binapi2001/lisp/lisp_rpc.ba.go b/internal/testbinapi/binapi2001/lisp/lisp_rpc.ba.go
index a8fbddd..5c9c632 100644
--- a/internal/testbinapi/binapi2001/lisp/lisp_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/lisp/lisp_rpc.ba.go
@@ -5,12 +5,13 @@ package lisp
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service lisp.
+// RPCService defines RPC service lisp.
type RPCService interface {
LispAddDelAdjacency(ctx context.Context, in *LispAddDelAdjacency) (*LispAddDelAdjacencyReply, error)
LispAddDelLocalEid(ctx context.Context, in *LispAddDelLocalEid) (*LispAddDelLocalEidReply, error)
@@ -58,7 +59,7 @@ func (c *serviceClient) LispAddDelAdjacency(ctx context.Context, in *LispAddDelA
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) LispAddDelLocalEid(ctx context.Context, in *LispAddDelLocalEid) (*LispAddDelLocalEidReply, error) {
@@ -67,7 +68,7 @@ func (c *serviceClient) LispAddDelLocalEid(ctx context.Context, in *LispAddDelLo
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) LispAddDelLocator(ctx context.Context, in *LispAddDelLocator) (*LispAddDelLocatorReply, error) {
@@ -76,7 +77,7 @@ func (c *serviceClient) LispAddDelLocator(ctx context.Context, in *LispAddDelLoc
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) LispAddDelLocatorSet(ctx context.Context, in *LispAddDelLocatorSet) (*LispAddDelLocatorSetReply, error) {
@@ -85,7 +86,7 @@ func (c *serviceClient) LispAddDelLocatorSet(ctx context.Context, in *LispAddDel
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) LispAddDelMapRequestItrRlocs(ctx context.Context, in *LispAddDelMapRequestItrRlocs) (*LispAddDelMapRequestItrRlocsReply, error) {
@@ -94,7 +95,7 @@ func (c *serviceClient) LispAddDelMapRequestItrRlocs(ctx context.Context, in *Li
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) LispAddDelMapResolver(ctx context.Context, in *LispAddDelMapResolver) (*LispAddDelMapResolverReply, error) {
@@ -103,7 +104,7 @@ func (c *serviceClient) LispAddDelMapResolver(ctx context.Context, in *LispAddDe
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) LispAddDelMapServer(ctx context.Context, in *LispAddDelMapServer) (*LispAddDelMapServerReply, error) {
@@ -112,7 +113,7 @@ func (c *serviceClient) LispAddDelMapServer(ctx context.Context, in *LispAddDelM
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) LispAddDelRemoteMapping(ctx context.Context, in *LispAddDelRemoteMapping) (*LispAddDelRemoteMappingReply, error) {
@@ -121,7 +122,7 @@ func (c *serviceClient) LispAddDelRemoteMapping(ctx context.Context, in *LispAdd
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) LispAdjacenciesGet(ctx context.Context, in *LispAdjacenciesGet) (*LispAdjacenciesGetReply, error) {
@@ -130,7 +131,7 @@ func (c *serviceClient) LispAdjacenciesGet(ctx context.Context, in *LispAdjacenc
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) LispEidTableAddDelMap(ctx context.Context, in *LispEidTableAddDelMap) (*LispEidTableAddDelMapReply, error) {
@@ -139,7 +140,7 @@ func (c *serviceClient) LispEidTableAddDelMap(ctx context.Context, in *LispEidTa
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) LispEidTableDump(ctx context.Context, in *LispEidTableDump) (RPCService_LispEidTableDumpClient, error) {
@@ -175,6 +176,10 @@ func (c *serviceClient_LispEidTableDumpClient) Recv() (*LispEidTableDetails, err
case *LispEidTableDetails:
return m, nil
case *vpe.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)
@@ -214,6 +219,10 @@ func (c *serviceClient_LispEidTableMapDumpClient) Recv() (*LispEidTableMapDetail
case *LispEidTableMapDetails:
return m, nil
case *vpe.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)
@@ -253,6 +262,10 @@ func (c *serviceClient_LispEidTableVniDumpClient) Recv() (*LispEidTableVniDetail
case *LispEidTableVniDetails:
return m, nil
case *vpe.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)
@@ -265,7 +278,7 @@ func (c *serviceClient) LispEnableDisable(ctx context.Context, in *LispEnableDis
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) LispGetMapRequestItrRlocs(ctx context.Context, in *LispGetMapRequestItrRlocs) (*LispGetMapRequestItrRlocsReply, error) {
@@ -274,7 +287,7 @@ func (c *serviceClient) LispGetMapRequestItrRlocs(ctx context.Context, in *LispG
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) LispLocatorDump(ctx context.Context, in *LispLocatorDump) (RPCService_LispLocatorDumpClient, error) {
@@ -310,6 +323,10 @@ func (c *serviceClient_LispLocatorDumpClient) Recv() (*LispLocatorDetails, error
case *LispLocatorDetails:
return m, nil
case *vpe.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)
@@ -349,6 +366,10 @@ func (c *serviceClient_LispLocatorSetDumpClient) Recv() (*LispLocatorSetDetails,
case *LispLocatorSetDetails:
return m, nil
case *vpe.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)
@@ -361,7 +382,7 @@ func (c *serviceClient) LispMapRegisterEnableDisable(ctx context.Context, in *Li
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) LispMapRequestMode(ctx context.Context, in *LispMapRequestMode) (*LispMapRequestModeReply, error) {
@@ -370,7 +391,7 @@ func (c *serviceClient) LispMapRequestMode(ctx context.Context, in *LispMapReque
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) LispMapResolverDump(ctx context.Context, in *LispMapResolverDump) (RPCService_LispMapResolverDumpClient, error) {
@@ -406,6 +427,10 @@ func (c *serviceClient_LispMapResolverDumpClient) Recv() (*LispMapResolverDetail
case *LispMapResolverDetails:
return m, nil
case *vpe.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)
@@ -445,6 +470,10 @@ func (c *serviceClient_LispMapServerDumpClient) Recv() (*LispMapServerDetails, e
case *LispMapServerDetails:
return m, nil
case *vpe.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)
@@ -457,7 +486,7 @@ func (c *serviceClient) LispPitrSetLocatorSet(ctx context.Context, in *LispPitrS
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) LispRlocProbeEnableDisable(ctx context.Context, in *LispRlocProbeEnableDisable) (*LispRlocProbeEnableDisableReply, error) {
@@ -466,7 +495,7 @@ func (c *serviceClient) LispRlocProbeEnableDisable(ctx context.Context, in *Lisp
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) LispUsePetr(ctx context.Context, in *LispUsePetr) (*LispUsePetrReply, error) {
@@ -475,7 +504,7 @@ func (c *serviceClient) LispUsePetr(ctx context.Context, in *LispUsePetr) (*Lisp
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) ShowLispMapRegisterState(ctx context.Context, in *ShowLispMapRegisterState) (*ShowLispMapRegisterStateReply, error) {
@@ -484,7 +513,7 @@ func (c *serviceClient) ShowLispMapRegisterState(ctx context.Context, in *ShowLi
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) ShowLispMapRequestMode(ctx context.Context, in *ShowLispMapRequestMode) (*ShowLispMapRequestModeReply, error) {
@@ -493,7 +522,7 @@ func (c *serviceClient) ShowLispMapRequestMode(ctx context.Context, in *ShowLisp
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) ShowLispPitr(ctx context.Context, in *ShowLispPitr) (*ShowLispPitrReply, error) {
@@ -502,7 +531,7 @@ func (c *serviceClient) ShowLispPitr(ctx context.Context, in *ShowLispPitr) (*Sh
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) ShowLispRlocProbeState(ctx context.Context, in *ShowLispRlocProbeState) (*ShowLispRlocProbeStateReply, error) {
@@ -511,7 +540,7 @@ func (c *serviceClient) ShowLispRlocProbeState(ctx context.Context, in *ShowLisp
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) ShowLispStatus(ctx context.Context, in *ShowLispStatus) (*ShowLispStatusReply, error) {
@@ -520,7 +549,7 @@ func (c *serviceClient) ShowLispStatus(ctx context.Context, in *ShowLispStatus)
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) ShowLispUsePetr(ctx context.Context, in *ShowLispUsePetr) (*ShowLispUsePetrReply, error) {
@@ -529,5 +558,5 @@ func (c *serviceClient) ShowLispUsePetr(ctx context.Context, in *ShowLispUsePetr
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/lisp_gpe/lisp_gpe.ba.go b/internal/testbinapi/binapi2001/lisp_gpe/lisp_gpe.ba.go
index 3dd5ab6..f46aa92 100644
--- a/internal/testbinapi/binapi2001/lisp_gpe/lisp_gpe.ba.go
+++ b/internal/testbinapi/binapi2001/lisp_gpe/lisp_gpe.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/lisp_gpe.api.json
diff --git a/internal/testbinapi/binapi2001/lisp_gpe/lisp_gpe_rpc.ba.go b/internal/testbinapi/binapi2001/lisp_gpe/lisp_gpe_rpc.ba.go
index e81bf7c..5fc0c95 100644
--- a/internal/testbinapi/binapi2001/lisp_gpe/lisp_gpe_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/lisp_gpe/lisp_gpe_rpc.ba.go
@@ -5,12 +5,13 @@ package lisp_gpe
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service lisp_gpe.
+// RPCService defines RPC service lisp_gpe.
type RPCService interface {
GpeAddDelFwdEntry(ctx context.Context, in *GpeAddDelFwdEntry) (*GpeAddDelFwdEntryReply, error)
GpeAddDelIface(ctx context.Context, in *GpeAddDelIface) (*GpeAddDelIfaceReply, error)
@@ -38,7 +39,7 @@ func (c *serviceClient) GpeAddDelFwdEntry(ctx context.Context, in *GpeAddDelFwdE
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) GpeAddDelIface(ctx context.Context, in *GpeAddDelIface) (*GpeAddDelIfaceReply, error) {
@@ -47,7 +48,7 @@ func (c *serviceClient) GpeAddDelIface(ctx context.Context, in *GpeAddDelIface)
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) GpeAddDelNativeFwdRpath(ctx context.Context, in *GpeAddDelNativeFwdRpath) (*GpeAddDelNativeFwdRpathReply, error) {
@@ -56,7 +57,7 @@ func (c *serviceClient) GpeAddDelNativeFwdRpath(ctx context.Context, in *GpeAddD
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) GpeEnableDisable(ctx context.Context, in *GpeEnableDisable) (*GpeEnableDisableReply, error) {
@@ -65,7 +66,7 @@ func (c *serviceClient) GpeEnableDisable(ctx context.Context, in *GpeEnableDisab
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) GpeFwdEntriesGet(ctx context.Context, in *GpeFwdEntriesGet) (*GpeFwdEntriesGetReply, error) {
@@ -74,7 +75,7 @@ func (c *serviceClient) GpeFwdEntriesGet(ctx context.Context, in *GpeFwdEntriesG
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) GpeFwdEntryPathDump(ctx context.Context, in *GpeFwdEntryPathDump) (RPCService_GpeFwdEntryPathDumpClient, error) {
@@ -110,6 +111,10 @@ func (c *serviceClient_GpeFwdEntryPathDumpClient) Recv() (*GpeFwdEntryPathDetail
case *GpeFwdEntryPathDetails:
return m, nil
case *vpe.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)
@@ -122,7 +127,7 @@ func (c *serviceClient) GpeFwdEntryVnisGet(ctx context.Context, in *GpeFwdEntryV
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) GpeGetEncapMode(ctx context.Context, in *GpeGetEncapMode) (*GpeGetEncapModeReply, error) {
@@ -131,7 +136,7 @@ func (c *serviceClient) GpeGetEncapMode(ctx context.Context, in *GpeGetEncapMode
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) GpeNativeFwdRpathsGet(ctx context.Context, in *GpeNativeFwdRpathsGet) (*GpeNativeFwdRpathsGetReply, error) {
@@ -140,7 +145,7 @@ func (c *serviceClient) GpeNativeFwdRpathsGet(ctx context.Context, in *GpeNative
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) GpeSetEncapMode(ctx context.Context, in *GpeSetEncapMode) (*GpeSetEncapModeReply, error) {
@@ -149,5 +154,5 @@ func (c *serviceClient) GpeSetEncapMode(ctx context.Context, in *GpeSetEncapMode
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/lldp/lldp.ba.go b/internal/testbinapi/binapi2001/lldp/lldp.ba.go
index 767087e..0bca38e 100644
--- a/internal/testbinapi/binapi2001/lldp/lldp.ba.go
+++ b/internal/testbinapi/binapi2001/lldp/lldp.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/lldp.api.json
diff --git a/internal/testbinapi/binapi2001/lldp/lldp_rpc.ba.go b/internal/testbinapi/binapi2001/lldp/lldp_rpc.ba.go
index 9d5eb85..d9fdbc5 100644
--- a/internal/testbinapi/binapi2001/lldp/lldp_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/lldp/lldp_rpc.ba.go
@@ -4,10 +4,11 @@ package lldp
import (
"context"
+
api "git.fd.io/govpp.git/api"
)
-// RPCService defines RPC service lldp.
+// RPCService defines RPC service lldp.
type RPCService interface {
LldpConfig(ctx context.Context, in *LldpConfig) (*LldpConfigReply, error)
SwInterfaceSetLldp(ctx context.Context, in *SwInterfaceSetLldp) (*SwInterfaceSetLldpReply, error)
@@ -27,7 +28,7 @@ func (c *serviceClient) LldpConfig(ctx context.Context, in *LldpConfig) (*LldpCo
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SwInterfaceSetLldp(ctx context.Context, in *SwInterfaceSetLldp) (*SwInterfaceSetLldpReply, error) {
@@ -36,5 +37,5 @@ func (c *serviceClient) SwInterfaceSetLldp(ctx context.Context, in *SwInterfaceS
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/mactime/mactime.ba.go b/internal/testbinapi/binapi2001/mactime/mactime.ba.go
index 2824cf2..699d329 100644
--- a/internal/testbinapi/binapi2001/mactime/mactime.ba.go
+++ b/internal/testbinapi/binapi2001/mactime/mactime.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/mactime.api.json
@@ -15,10 +15,11 @@
package mactime
import (
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -299,15 +300,19 @@ func ParseMacAddress(s string) (MacAddress, error) {
copy(macaddr[:], mac[:])
return macaddr, nil
}
+
func (x MacAddress) ToMAC() net.HardwareAddr {
return net.HardwareAddr(x[:])
}
+
func (x MacAddress) String() string {
return x.ToMAC().String()
}
+
func (x *MacAddress) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *MacAddress) UnmarshalText(text []byte) error {
mac, err := ParseMacAddress(string(text))
if err != nil {
diff --git a/internal/testbinapi/binapi2001/mactime/mactime_rpc.ba.go b/internal/testbinapi/binapi2001/mactime/mactime_rpc.ba.go
index 4e17e54..89630da 100644
--- a/internal/testbinapi/binapi2001/mactime/mactime_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/mactime/mactime_rpc.ba.go
@@ -5,12 +5,13 @@ package mactime
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service mactime.
+// RPCService defines RPC service mactime.
type RPCService interface {
MactimeAddDelRange(ctx context.Context, in *MactimeAddDelRange) (*MactimeAddDelRangeReply, error)
MactimeDump(ctx context.Context, in *MactimeDump) (RPCService_MactimeDumpClient, error)
@@ -31,7 +32,7 @@ func (c *serviceClient) MactimeAddDelRange(ctx context.Context, in *MactimeAddDe
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) MactimeDump(ctx context.Context, in *MactimeDump) (RPCService_MactimeDumpClient, error) {
@@ -67,6 +68,10 @@ func (c *serviceClient_MactimeDumpClient) Recv() (*MactimeDetails, error) {
case *MactimeDetails:
return m, nil
case *vpe.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)
@@ -79,5 +84,5 @@ func (c *serviceClient) MactimeEnableDisable(ctx context.Context, in *MactimeEna
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/map/map.ba.go b/internal/testbinapi/binapi2001/map/map.ba.go
index 3e132ad..b5dc558 100644
--- a/internal/testbinapi/binapi2001/map/map.ba.go
+++ b/internal/testbinapi/binapi2001/map/map.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/map.api.json
@@ -17,11 +17,12 @@ package maps
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -498,12 +499,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -532,12 +536,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -566,12 +573,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -595,6 +605,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -607,8 +621,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -618,12 +633,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -666,18 +684,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -720,18 +742,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -782,6 +808,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -792,13 +819,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -816,8 +846,9 @@ type PrefixMatcher struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/map/map_rpc.ba.go b/internal/testbinapi/binapi2001/map/map_rpc.ba.go
index 2aa851c..bfc48e7 100644
--- a/internal/testbinapi/binapi2001/map/map_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/map/map_rpc.ba.go
@@ -5,12 +5,13 @@ package maps
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service map.
+// RPCService defines RPC service map.
type RPCService interface {
MapAddDelRule(ctx context.Context, in *MapAddDelRule) (*MapAddDelRuleReply, error)
MapAddDomain(ctx context.Context, in *MapAddDomain) (*MapAddDomainReply, error)
@@ -43,7 +44,7 @@ func (c *serviceClient) MapAddDelRule(ctx context.Context, in *MapAddDelRule) (*
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) MapAddDomain(ctx context.Context, in *MapAddDomain) (*MapAddDomainReply, error) {
@@ -52,7 +53,7 @@ func (c *serviceClient) MapAddDomain(ctx context.Context, in *MapAddDomain) (*Ma
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) MapDelDomain(ctx context.Context, in *MapDelDomain) (*MapDelDomainReply, error) {
@@ -61,7 +62,7 @@ func (c *serviceClient) MapDelDomain(ctx context.Context, in *MapDelDomain) (*Ma
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) MapDomainDump(ctx context.Context, in *MapDomainDump) (RPCService_MapDomainDumpClient, error) {
@@ -97,6 +98,10 @@ func (c *serviceClient_MapDomainDumpClient) Recv() (*MapDomainDetails, error) {
case *MapDomainDetails:
return m, nil
case *vpe.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)
@@ -109,7 +114,7 @@ func (c *serviceClient) MapIfEnableDisable(ctx context.Context, in *MapIfEnableD
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) MapParamAddDelPreResolve(ctx context.Context, in *MapParamAddDelPreResolve) (*MapParamAddDelPreResolveReply, error) {
@@ -118,7 +123,7 @@ func (c *serviceClient) MapParamAddDelPreResolve(ctx context.Context, in *MapPar
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) MapParamGet(ctx context.Context, in *MapParamGet) (*MapParamGetReply, error) {
@@ -127,7 +132,7 @@ func (c *serviceClient) MapParamGet(ctx context.Context, in *MapParamGet) (*MapP
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) MapParamSetFragmentation(ctx context.Context, in *MapParamSetFragmentation) (*MapParamSetFragmentationReply, error) {
@@ -136,7 +141,7 @@ func (c *serviceClient) MapParamSetFragmentation(ctx context.Context, in *MapPar
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) MapParamSetICMP(ctx context.Context, in *MapParamSetICMP) (*MapParamSetICMPReply, error) {
@@ -145,7 +150,7 @@ func (c *serviceClient) MapParamSetICMP(ctx context.Context, in *MapParamSetICMP
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) MapParamSetICMP6(ctx context.Context, in *MapParamSetICMP6) (*MapParamSetICMP6Reply, error) {
@@ -154,7 +159,7 @@ func (c *serviceClient) MapParamSetICMP6(ctx context.Context, in *MapParamSetICM
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) MapParamSetSecurityCheck(ctx context.Context, in *MapParamSetSecurityCheck) (*MapParamSetSecurityCheckReply, error) {
@@ -163,7 +168,7 @@ func (c *serviceClient) MapParamSetSecurityCheck(ctx context.Context, in *MapPar
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) MapParamSetTCP(ctx context.Context, in *MapParamSetTCP) (*MapParamSetTCPReply, error) {
@@ -172,7 +177,7 @@ func (c *serviceClient) MapParamSetTCP(ctx context.Context, in *MapParamSetTCP)
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) MapParamSetTrafficClass(ctx context.Context, in *MapParamSetTrafficClass) (*MapParamSetTrafficClassReply, error) {
@@ -181,7 +186,7 @@ func (c *serviceClient) MapParamSetTrafficClass(ctx context.Context, in *MapPara
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) MapRuleDump(ctx context.Context, in *MapRuleDump) (RPCService_MapRuleDumpClient, error) {
@@ -217,6 +222,10 @@ func (c *serviceClient_MapRuleDumpClient) Recv() (*MapRuleDetails, error) {
case *MapRuleDetails:
return m, nil
case *vpe.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)
@@ -229,5 +238,5 @@ func (c *serviceClient) MapSummaryStats(ctx context.Context, in *MapSummaryStats
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/mdata/mdata.ba.go b/internal/testbinapi/binapi2001/mdata/mdata.ba.go
index 3a79b3e..d7e8ee2 100644
--- a/internal/testbinapi/binapi2001/mdata/mdata.ba.go
+++ b/internal/testbinapi/binapi2001/mdata/mdata.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/mdata.api.json
@@ -14,9 +14,10 @@
package mdata
import (
+ "strconv"
+
api "git.fd.io/govpp.git/api"
codec "git.fd.io/govpp.git/codec"
- "strconv"
)
// This is a compile-time assertion to ensure that this generated file
@@ -286,6 +287,7 @@ func (x SubIfFlags) String() string {
type InterfaceIndex uint32
// MdataEnableDisable defines message 'mdata_enable_disable'.
+// InProgress: the message form may change in the future versions
type MdataEnableDisable struct {
EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
}
@@ -319,6 +321,7 @@ func (m *MdataEnableDisable) Unmarshal(b []byte) error {
}
// MdataEnableDisableReply defines message 'mdata_enable_disable_reply'.
+// InProgress: the message form may change in the future versions
type MdataEnableDisableReply struct {
Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
diff --git a/internal/testbinapi/binapi2001/mdata/mdata_rpc.ba.go b/internal/testbinapi/binapi2001/mdata/mdata_rpc.ba.go
index 08e05d5..8ae8748 100644
--- a/internal/testbinapi/binapi2001/mdata/mdata_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/mdata/mdata_rpc.ba.go
@@ -4,10 +4,11 @@ package mdata
import (
"context"
+
api "git.fd.io/govpp.git/api"
)
-// RPCService defines RPC service mdata.
+// RPCService defines RPC service mdata.
type RPCService interface {
MdataEnableDisable(ctx context.Context, in *MdataEnableDisable) (*MdataEnableDisableReply, error)
}
@@ -26,5 +27,5 @@ func (c *serviceClient) MdataEnableDisable(ctx context.Context, in *MdataEnableD
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/memclnt/memclnt.ba.go b/internal/testbinapi/binapi2001/memclnt/memclnt.ba.go
index 4c6edf8..f2c8136 100644
--- a/internal/testbinapi/binapi2001/memclnt/memclnt.ba.go
+++ b/internal/testbinapi/binapi2001/memclnt/memclnt.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/memclnt.api.json
diff --git a/internal/testbinapi/binapi2001/memclnt/memclnt_rpc.ba.go b/internal/testbinapi/binapi2001/memclnt/memclnt_rpc.ba.go
index ec60156..03d32ef 100644
--- a/internal/testbinapi/binapi2001/memclnt/memclnt_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/memclnt/memclnt_rpc.ba.go
@@ -4,10 +4,11 @@ package memclnt
import (
"context"
+
api "git.fd.io/govpp.git/api"
)
-// RPCService defines RPC service memclnt.
+// RPCService defines RPC service memclnt.
type RPCService interface {
APIVersions(ctx context.Context, in *APIVersions) (*APIVersionsReply, error)
GetFirstMsgID(ctx context.Context, in *GetFirstMsgID) (*GetFirstMsgIDReply, error)
@@ -38,7 +39,7 @@ func (c *serviceClient) APIVersions(ctx context.Context, in *APIVersions) (*APIV
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) GetFirstMsgID(ctx context.Context, in *GetFirstMsgID) (*GetFirstMsgIDReply, error) {
@@ -47,7 +48,7 @@ func (c *serviceClient) GetFirstMsgID(ctx context.Context, in *GetFirstMsgID) (*
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) MemclntCreate(ctx context.Context, in *MemclntCreate) (*MemclntCreateReply, error) {
@@ -74,7 +75,7 @@ func (c *serviceClient) MemclntKeepalive(ctx context.Context, in *MemclntKeepali
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) MemclntReadTimeout(ctx context.Context, in *MemclntReadTimeout) error {
@@ -86,6 +87,10 @@ func (c *serviceClient) MemclntReadTimeout(ctx context.Context, in *MemclntReadT
if err != nil {
return err
}
+ err = stream.Close()
+ if err != nil {
+ return err
+ }
return nil
}
@@ -98,6 +103,10 @@ func (c *serviceClient) MemclntRxThreadSuspend(ctx context.Context, in *MemclntR
if err != nil {
return err
}
+ err = stream.Close()
+ if err != nil {
+ return err
+ }
return nil
}
@@ -107,7 +116,7 @@ func (c *serviceClient) RPCCall(ctx context.Context, in *RPCCall) (*RPCCallReply
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) RxThreadExit(ctx context.Context, in *RxThreadExit) error {
@@ -119,6 +128,10 @@ func (c *serviceClient) RxThreadExit(ctx context.Context, in *RxThreadExit) erro
if err != nil {
return err
}
+ err = stream.Close()
+ if err != nil {
+ return err
+ }
return nil
}
@@ -128,7 +141,7 @@ func (c *serviceClient) SockInitShm(ctx context.Context, in *SockInitShm) (*Sock
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SockclntCreate(ctx context.Context, in *SockclntCreate) (*SockclntCreateReply, error) {
@@ -158,5 +171,9 @@ func (c *serviceClient) TracePluginMsgIds(ctx context.Context, in *TracePluginMs
if err != nil {
return err
}
+ err = stream.Close()
+ if err != nil {
+ return err
+ }
return nil
}
diff --git a/internal/testbinapi/binapi2001/memif/memif.ba.go b/internal/testbinapi/binapi2001/memif/memif.ba.go
index d3a0963..e1e9178 100644
--- a/internal/testbinapi/binapi2001/memif/memif.ba.go
+++ b/internal/testbinapi/binapi2001/memif/memif.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/memif.api.json
@@ -14,10 +14,11 @@
package memif
import (
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -355,15 +356,19 @@ func ParseMacAddress(s string) (MacAddress, error) {
copy(macaddr[:], mac[:])
return macaddr, nil
}
+
func (x MacAddress) ToMAC() net.HardwareAddr {
return net.HardwareAddr(x[:])
}
+
func (x MacAddress) String() string {
return x.ToMAC().String()
}
+
func (x *MacAddress) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *MacAddress) UnmarshalText(text []byte) error {
mac, err := ParseMacAddress(string(text))
if err != nil {
diff --git a/internal/testbinapi/binapi2001/memif/memif_rpc.ba.go b/internal/testbinapi/binapi2001/memif/memif_rpc.ba.go
index 8e6c7bc..e086d64 100644
--- a/internal/testbinapi/binapi2001/memif/memif_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/memif/memif_rpc.ba.go
@@ -5,12 +5,13 @@ package memif
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service memif.
+// RPCService defines RPC service memif.
type RPCService interface {
MemifCreate(ctx context.Context, in *MemifCreate) (*MemifCreateReply, error)
MemifDelete(ctx context.Context, in *MemifDelete) (*MemifDeleteReply, error)
@@ -33,7 +34,7 @@ func (c *serviceClient) MemifCreate(ctx context.Context, in *MemifCreate) (*Memi
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) MemifDelete(ctx context.Context, in *MemifDelete) (*MemifDeleteReply, error) {
@@ -42,7 +43,7 @@ func (c *serviceClient) MemifDelete(ctx context.Context, in *MemifDelete) (*Memi
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) MemifDump(ctx context.Context, in *MemifDump) (RPCService_MemifDumpClient, error) {
@@ -78,6 +79,10 @@ func (c *serviceClient_MemifDumpClient) Recv() (*MemifDetails, error) {
case *MemifDetails:
return m, nil
case *vpe.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)
@@ -90,7 +95,7 @@ func (c *serviceClient) MemifSocketFilenameAddDel(ctx context.Context, in *Memif
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) MemifSocketFilenameDump(ctx context.Context, in *MemifSocketFilenameDump) (RPCService_MemifSocketFilenameDumpClient, error) {
@@ -126,6 +131,10 @@ func (c *serviceClient_MemifSocketFilenameDumpClient) Recv() (*MemifSocketFilena
case *MemifSocketFilenameDetails:
return m, nil
case *vpe.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)
diff --git a/internal/testbinapi/binapi2001/mfib_types/mfib_types.ba.go b/internal/testbinapi/binapi2001/mfib_types/mfib_types.ba.go
index 2283f8b..cc79850 100644
--- a/internal/testbinapi/binapi2001/mfib_types/mfib_types.ba.go
+++ b/internal/testbinapi/binapi2001/mfib_types/mfib_types.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/mfib_types.api.json
@@ -16,11 +16,12 @@ package mfib_types
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -29,6 +30,12 @@ import (
// GoVPP api package needs to be updated.
const _ = api.GoVppAPIPackageIsVersion2
+const (
+ APIFile = "mfib_types"
+ APIVersion = ""
+ VersionCrc = 0xba024d84
+)
+
// AddressFamily defines enum 'address_family'.
type AddressFamily uint32
@@ -440,12 +447,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -471,12 +481,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -505,12 +518,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -534,6 +550,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -546,8 +566,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -557,12 +578,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -636,18 +660,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -690,18 +718,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -758,6 +790,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -768,13 +801,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -792,8 +828,9 @@ type PrefixMatcher struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/mpls/mpls.ba.go b/internal/testbinapi/binapi2001/mpls/mpls.ba.go
index 11ab34b..15c1f46 100644
--- a/internal/testbinapi/binapi2001/mpls/mpls.ba.go
+++ b/internal/testbinapi/binapi2001/mpls/mpls.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/mpls.api.json
@@ -17,11 +17,12 @@ package mpls
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -640,12 +641,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -674,12 +678,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -708,12 +715,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -737,6 +747,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -749,8 +763,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -760,12 +775,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -839,18 +857,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -893,18 +915,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -982,6 +1008,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -992,13 +1019,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -1016,8 +1046,9 @@ type PrefixMatcher struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/mpls/mpls_rpc.ba.go b/internal/testbinapi/binapi2001/mpls/mpls_rpc.ba.go
index 422e185..79cf550 100644
--- a/internal/testbinapi/binapi2001/mpls/mpls_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/mpls/mpls_rpc.ba.go
@@ -5,12 +5,13 @@ package mpls
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service mpls.
+// RPCService defines RPC service mpls.
type RPCService interface {
MplsIPBindUnbind(ctx context.Context, in *MplsIPBindUnbind) (*MplsIPBindUnbindReply, error)
MplsRouteAddDel(ctx context.Context, in *MplsRouteAddDel) (*MplsRouteAddDelReply, error)
@@ -36,7 +37,7 @@ func (c *serviceClient) MplsIPBindUnbind(ctx context.Context, in *MplsIPBindUnbi
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) MplsRouteAddDel(ctx context.Context, in *MplsRouteAddDel) (*MplsRouteAddDelReply, error) {
@@ -45,7 +46,7 @@ func (c *serviceClient) MplsRouteAddDel(ctx context.Context, in *MplsRouteAddDel
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) MplsRouteDump(ctx context.Context, in *MplsRouteDump) (RPCService_MplsRouteDumpClient, error) {
@@ -81,6 +82,10 @@ func (c *serviceClient_MplsRouteDumpClient) Recv() (*MplsRouteDetails, error) {
case *MplsRouteDetails:
return m, nil
case *vpe.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)
@@ -93,7 +98,7 @@ func (c *serviceClient) MplsTableAddDel(ctx context.Context, in *MplsTableAddDel
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) MplsTableDump(ctx context.Context, in *MplsTableDump) (RPCService_MplsTableDumpClient, error) {
@@ -129,6 +134,10 @@ func (c *serviceClient_MplsTableDumpClient) Recv() (*MplsTableDetails, error) {
case *MplsTableDetails:
return m, nil
case *vpe.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)
@@ -141,7 +150,7 @@ func (c *serviceClient) MplsTunnelAddDel(ctx context.Context, in *MplsTunnelAddD
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) MplsTunnelDump(ctx context.Context, in *MplsTunnelDump) (RPCService_MplsTunnelDumpClient, error) {
@@ -177,6 +186,10 @@ func (c *serviceClient_MplsTunnelDumpClient) Recv() (*MplsTunnelDetails, error)
case *MplsTunnelDetails:
return m, nil
case *vpe.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)
@@ -189,5 +202,5 @@ func (c *serviceClient) SwInterfaceSetMplsEnable(ctx context.Context, in *SwInte
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/nat/nat.ba.go b/internal/testbinapi/binapi2001/nat/nat.ba.go
index e6ef501..fd3bc20 100644
--- a/internal/testbinapi/binapi2001/nat/nat.ba.go
+++ b/internal/testbinapi/binapi2001/nat/nat.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/nat.api.json
@@ -17,11 +17,12 @@ package nat
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -604,12 +605,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -638,12 +642,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -672,12 +679,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -701,6 +711,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -713,8 +727,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -724,12 +739,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -772,18 +790,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -826,18 +848,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -896,6 +922,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -906,13 +933,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -930,8 +960,9 @@ type PrefixMatcher struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/nat/nat_rpc.ba.go b/internal/testbinapi/binapi2001/nat/nat_rpc.ba.go
index f6069ec..32d74c2 100644
--- a/internal/testbinapi/binapi2001/nat/nat_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/nat/nat_rpc.ba.go
@@ -5,12 +5,13 @@ package nat
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service nat.
+// RPCService defines RPC service nat.
type RPCService interface {
DsliteAddDelPoolAddrRange(ctx context.Context, in *DsliteAddDelPoolAddrRange) (*DsliteAddDelPoolAddrRangeReply, error)
DsliteAddressDump(ctx context.Context, in *DsliteAddressDump) (RPCService_DsliteAddressDumpClient, error)
@@ -93,7 +94,7 @@ func (c *serviceClient) DsliteAddDelPoolAddrRange(ctx context.Context, in *Dslit
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) DsliteAddressDump(ctx context.Context, in *DsliteAddressDump) (RPCService_DsliteAddressDumpClient, error) {
@@ -129,6 +130,10 @@ func (c *serviceClient_DsliteAddressDumpClient) Recv() (*DsliteAddressDetails, e
case *DsliteAddressDetails:
return m, nil
case *vpe.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)
@@ -141,7 +146,7 @@ func (c *serviceClient) DsliteGetAftrAddr(ctx context.Context, in *DsliteGetAftr
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) DsliteGetB4Addr(ctx context.Context, in *DsliteGetB4Addr) (*DsliteGetB4AddrReply, error) {
@@ -150,7 +155,7 @@ func (c *serviceClient) DsliteGetB4Addr(ctx context.Context, in *DsliteGetB4Addr
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) DsliteSetAftrAddr(ctx context.Context, in *DsliteSetAftrAddr) (*DsliteSetAftrAddrReply, error) {
@@ -159,7 +164,7 @@ func (c *serviceClient) DsliteSetAftrAddr(ctx context.Context, in *DsliteSetAftr
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) DsliteSetB4Addr(ctx context.Context, in *DsliteSetB4Addr) (*DsliteSetB4AddrReply, error) {
@@ -168,7 +173,7 @@ func (c *serviceClient) DsliteSetB4Addr(ctx context.Context, in *DsliteSetB4Addr
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) Nat44AddDelAddressRange(ctx context.Context, in *Nat44AddDelAddressRange) (*Nat44AddDelAddressRangeReply, error) {
@@ -177,7 +182,7 @@ func (c *serviceClient) Nat44AddDelAddressRange(ctx context.Context, in *Nat44Ad
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) Nat44AddDelIdentityMapping(ctx context.Context, in *Nat44AddDelIdentityMapping) (*Nat44AddDelIdentityMappingReply, error) {
@@ -186,7 +191,7 @@ func (c *serviceClient) Nat44AddDelIdentityMapping(ctx context.Context, in *Nat4
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) Nat44AddDelInterfaceAddr(ctx context.Context, in *Nat44AddDelInterfaceAddr) (*Nat44AddDelInterfaceAddrReply, error) {
@@ -195,7 +200,7 @@ func (c *serviceClient) Nat44AddDelInterfaceAddr(ctx context.Context, in *Nat44A
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) Nat44AddDelLbStaticMapping(ctx context.Context, in *Nat44AddDelLbStaticMapping) (*Nat44AddDelLbStaticMappingReply, error) {
@@ -204,7 +209,7 @@ func (c *serviceClient) Nat44AddDelLbStaticMapping(ctx context.Context, in *Nat4
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) Nat44AddDelStaticMapping(ctx context.Context, in *Nat44AddDelStaticMapping) (*Nat44AddDelStaticMappingReply, error) {
@@ -213,7 +218,7 @@ func (c *serviceClient) Nat44AddDelStaticMapping(ctx context.Context, in *Nat44A
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) Nat44AddressDump(ctx context.Context, in *Nat44AddressDump) (RPCService_Nat44AddressDumpClient, error) {
@@ -249,6 +254,10 @@ func (c *serviceClient_Nat44AddressDumpClient) Recv() (*Nat44AddressDetails, err
case *Nat44AddressDetails:
return m, nil
case *vpe.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)
@@ -261,7 +270,7 @@ func (c *serviceClient) Nat44DelSession(ctx context.Context, in *Nat44DelSession
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) Nat44ForwardingEnableDisable(ctx context.Context, in *Nat44ForwardingEnableDisable) (*Nat44ForwardingEnableDisableReply, error) {
@@ -270,7 +279,7 @@ func (c *serviceClient) Nat44ForwardingEnableDisable(ctx context.Context, in *Na
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) Nat44ForwardingIsEnabled(ctx context.Context, in *Nat44ForwardingIsEnabled) (*Nat44ForwardingIsEnabledReply, error) {
@@ -315,6 +324,10 @@ func (c *serviceClient_Nat44IdentityMappingDumpClient) Recv() (*Nat44IdentityMap
case *Nat44IdentityMappingDetails:
return m, nil
case *vpe.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)
@@ -327,7 +340,7 @@ func (c *serviceClient) Nat44InterfaceAddDelFeature(ctx context.Context, in *Nat
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) Nat44InterfaceAddDelOutputFeature(ctx context.Context, in *Nat44InterfaceAddDelOutputFeature) (*Nat44InterfaceAddDelOutputFeatureReply, error) {
@@ -336,7 +349,7 @@ func (c *serviceClient) Nat44InterfaceAddDelOutputFeature(ctx context.Context, i
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) Nat44InterfaceAddrDump(ctx context.Context, in *Nat44InterfaceAddrDump) (RPCService_Nat44InterfaceAddrDumpClient, error) {
@@ -372,6 +385,10 @@ func (c *serviceClient_Nat44InterfaceAddrDumpClient) Recv() (*Nat44InterfaceAddr
case *Nat44InterfaceAddrDetails:
return m, nil
case *vpe.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)
@@ -411,6 +428,10 @@ func (c *serviceClient_Nat44InterfaceDumpClient) Recv() (*Nat44InterfaceDetails,
case *Nat44InterfaceDetails:
return m, nil
case *vpe.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)
@@ -450,6 +471,10 @@ func (c *serviceClient_Nat44InterfaceOutputFeatureDumpClient) Recv() (*Nat44Inte
case *Nat44InterfaceOutputFeatureDetails:
return m, nil
case *vpe.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)
@@ -462,7 +487,7 @@ func (c *serviceClient) Nat44LbStaticMappingAddDelLocal(ctx context.Context, in
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) Nat44LbStaticMappingDump(ctx context.Context, in *Nat44LbStaticMappingDump) (RPCService_Nat44LbStaticMappingDumpClient, error) {
@@ -498,6 +523,10 @@ func (c *serviceClient_Nat44LbStaticMappingDumpClient) Recv() (*Nat44LbStaticMap
case *Nat44LbStaticMappingDetails:
return m, nil
case *vpe.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)
@@ -537,6 +566,10 @@ func (c *serviceClient_Nat44StaticMappingDumpClient) Recv() (*Nat44StaticMapping
case *Nat44StaticMappingDetails:
return m, nil
case *vpe.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)
@@ -576,6 +609,10 @@ func (c *serviceClient_Nat44UserDumpClient) Recv() (*Nat44UserDetails, error) {
case *Nat44UserDetails:
return m, nil
case *vpe.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)
@@ -615,6 +652,10 @@ func (c *serviceClient_Nat44UserSessionDumpClient) Recv() (*Nat44UserSessionDeta
case *Nat44UserSessionDetails:
return m, nil
case *vpe.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)
@@ -627,7 +668,7 @@ func (c *serviceClient) Nat64AddDelInterface(ctx context.Context, in *Nat64AddDe
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) Nat64AddDelInterfaceAddr(ctx context.Context, in *Nat64AddDelInterfaceAddr) (*Nat64AddDelInterfaceAddrReply, error) {
@@ -636,7 +677,7 @@ func (c *serviceClient) Nat64AddDelInterfaceAddr(ctx context.Context, in *Nat64A
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) Nat64AddDelPoolAddrRange(ctx context.Context, in *Nat64AddDelPoolAddrRange) (*Nat64AddDelPoolAddrRangeReply, error) {
@@ -645,7 +686,7 @@ func (c *serviceClient) Nat64AddDelPoolAddrRange(ctx context.Context, in *Nat64A
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) Nat64AddDelPrefix(ctx context.Context, in *Nat64AddDelPrefix) (*Nat64AddDelPrefixReply, error) {
@@ -654,7 +695,7 @@ func (c *serviceClient) Nat64AddDelPrefix(ctx context.Context, in *Nat64AddDelPr
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) Nat64AddDelStaticBib(ctx context.Context, in *Nat64AddDelStaticBib) (*Nat64AddDelStaticBibReply, error) {
@@ -663,7 +704,7 @@ func (c *serviceClient) Nat64AddDelStaticBib(ctx context.Context, in *Nat64AddDe
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) Nat64BibDump(ctx context.Context, in *Nat64BibDump) (RPCService_Nat64BibDumpClient, error) {
@@ -699,6 +740,10 @@ func (c *serviceClient_Nat64BibDumpClient) Recv() (*Nat64BibDetails, error) {
case *Nat64BibDetails:
return m, nil
case *vpe.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)
@@ -738,6 +783,10 @@ func (c *serviceClient_Nat64InterfaceDumpClient) Recv() (*Nat64InterfaceDetails,
case *Nat64InterfaceDetails:
return m, nil
case *vpe.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)
@@ -777,6 +826,10 @@ func (c *serviceClient_Nat64PoolAddrDumpClient) Recv() (*Nat64PoolAddrDetails, e
case *Nat64PoolAddrDetails:
return m, nil
case *vpe.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)
@@ -816,6 +869,10 @@ func (c *serviceClient_Nat64PrefixDumpClient) Recv() (*Nat64PrefixDetails, error
case *Nat64PrefixDetails:
return m, nil
case *vpe.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)
@@ -855,6 +912,10 @@ func (c *serviceClient_Nat64StDumpClient) Recv() (*Nat64StDetails, error) {
case *Nat64StDetails:
return m, nil
case *vpe.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)
@@ -867,7 +928,7 @@ func (c *serviceClient) Nat66AddDelInterface(ctx context.Context, in *Nat66AddDe
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) Nat66AddDelStaticMapping(ctx context.Context, in *Nat66AddDelStaticMapping) (*Nat66AddDelStaticMappingReply, error) {
@@ -876,7 +937,7 @@ func (c *serviceClient) Nat66AddDelStaticMapping(ctx context.Context, in *Nat66A
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) Nat66InterfaceDump(ctx context.Context, in *Nat66InterfaceDump) (RPCService_Nat66InterfaceDumpClient, error) {
@@ -912,6 +973,10 @@ func (c *serviceClient_Nat66InterfaceDumpClient) Recv() (*Nat66InterfaceDetails,
case *Nat66InterfaceDetails:
return m, nil
case *vpe.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)
@@ -951,6 +1016,10 @@ func (c *serviceClient_Nat66StaticMappingDumpClient) Recv() (*Nat66StaticMapping
case *Nat66StaticMappingDetails:
return m, nil
case *vpe.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)
@@ -963,7 +1032,7 @@ func (c *serviceClient) NatControlPing(ctx context.Context, in *NatControlPing)
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) NatDetAddDelMap(ctx context.Context, in *NatDetAddDelMap) (*NatDetAddDelMapReply, error) {
@@ -972,7 +1041,7 @@ func (c *serviceClient) NatDetAddDelMap(ctx context.Context, in *NatDetAddDelMap
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) NatDetCloseSessionIn(ctx context.Context, in *NatDetCloseSessionIn) (*NatDetCloseSessionInReply, error) {
@@ -981,7 +1050,7 @@ func (c *serviceClient) NatDetCloseSessionIn(ctx context.Context, in *NatDetClos
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) NatDetCloseSessionOut(ctx context.Context, in *NatDetCloseSessionOut) (*NatDetCloseSessionOutReply, error) {
@@ -990,7 +1059,7 @@ func (c *serviceClient) NatDetCloseSessionOut(ctx context.Context, in *NatDetClo
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) NatDetForward(ctx context.Context, in *NatDetForward) (*NatDetForwardReply, error) {
@@ -999,7 +1068,7 @@ func (c *serviceClient) NatDetForward(ctx context.Context, in *NatDetForward) (*
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) NatDetMapDump(ctx context.Context, in *NatDetMapDump) (RPCService_NatDetMapDumpClient, error) {
@@ -1035,6 +1104,10 @@ func (c *serviceClient_NatDetMapDumpClient) Recv() (*NatDetMapDetails, error) {
case *NatDetMapDetails:
return m, nil
case *vpe.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)
@@ -1047,7 +1120,7 @@ func (c *serviceClient) NatDetReverse(ctx context.Context, in *NatDetReverse) (*
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) NatDetSessionDump(ctx context.Context, in *NatDetSessionDump) (RPCService_NatDetSessionDumpClient, error) {
@@ -1083,6 +1156,10 @@ func (c *serviceClient_NatDetSessionDumpClient) Recv() (*NatDetSessionDetails, e
case *NatDetSessionDetails:
return m, nil
case *vpe.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)
@@ -1095,7 +1172,7 @@ func (c *serviceClient) NatGetAddrAndPortAllocAlg(ctx context.Context, in *NatGe
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) NatGetMssClamping(ctx context.Context, in *NatGetMssClamping) (*NatGetMssClampingReply, error) {
@@ -1104,7 +1181,7 @@ func (c *serviceClient) NatGetMssClamping(ctx context.Context, in *NatGetMssClam
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) NatGetTimeouts(ctx context.Context, in *NatGetTimeouts) (*NatGetTimeoutsReply, error) {
@@ -1113,7 +1190,7 @@ func (c *serviceClient) NatGetTimeouts(ctx context.Context, in *NatGetTimeouts)
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) NatHaFlush(ctx context.Context, in *NatHaFlush) (*NatHaFlushReply, error) {
@@ -1122,7 +1199,7 @@ func (c *serviceClient) NatHaFlush(ctx context.Context, in *NatHaFlush) (*NatHaF
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) NatHaGetFailover(ctx context.Context, in *NatHaGetFailover) (*NatHaGetFailoverReply, error) {
@@ -1131,7 +1208,7 @@ func (c *serviceClient) NatHaGetFailover(ctx context.Context, in *NatHaGetFailov
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) NatHaGetListener(ctx context.Context, in *NatHaGetListener) (*NatHaGetListenerReply, error) {
@@ -1140,7 +1217,7 @@ func (c *serviceClient) NatHaGetListener(ctx context.Context, in *NatHaGetListen
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) NatHaResync(ctx context.Context, in *NatHaResync) (*NatHaResyncReply, error) {
@@ -1149,7 +1226,7 @@ func (c *serviceClient) NatHaResync(ctx context.Context, in *NatHaResync) (*NatH
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) NatHaSetFailover(ctx context.Context, in *NatHaSetFailover) (*NatHaSetFailoverReply, error) {
@@ -1158,7 +1235,7 @@ func (c *serviceClient) NatHaSetFailover(ctx context.Context, in *NatHaSetFailov
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) NatHaSetListener(ctx context.Context, in *NatHaSetListener) (*NatHaSetListenerReply, error) {
@@ -1167,7 +1244,7 @@ func (c *serviceClient) NatHaSetListener(ctx context.Context, in *NatHaSetListen
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) NatIpfixEnableDisable(ctx context.Context, in *NatIpfixEnableDisable) (*NatIpfixEnableDisableReply, error) {
@@ -1176,7 +1253,7 @@ func (c *serviceClient) NatIpfixEnableDisable(ctx context.Context, in *NatIpfixE
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) NatSetAddrAndPortAllocAlg(ctx context.Context, in *NatSetAddrAndPortAllocAlg) (*NatSetAddrAndPortAllocAlgReply, error) {
@@ -1185,7 +1262,7 @@ func (c *serviceClient) NatSetAddrAndPortAllocAlg(ctx context.Context, in *NatSe
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) NatSetLogLevel(ctx context.Context, in *NatSetLogLevel) (*NatSetLogLevelReply, error) {
@@ -1194,7 +1271,7 @@ func (c *serviceClient) NatSetLogLevel(ctx context.Context, in *NatSetLogLevel)
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) NatSetMssClamping(ctx context.Context, in *NatSetMssClamping) (*NatSetMssClampingReply, error) {
@@ -1203,7 +1280,7 @@ func (c *serviceClient) NatSetMssClamping(ctx context.Context, in *NatSetMssClam
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) NatSetTimeouts(ctx context.Context, in *NatSetTimeouts) (*NatSetTimeoutsReply, error) {
@@ -1212,7 +1289,7 @@ func (c *serviceClient) NatSetTimeouts(ctx context.Context, in *NatSetTimeouts)
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) NatSetWorkers(ctx context.Context, in *NatSetWorkers) (*NatSetWorkersReply, error) {
@@ -1221,7 +1298,7 @@ func (c *serviceClient) NatSetWorkers(ctx context.Context, in *NatSetWorkers) (*
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) NatShowConfig(ctx context.Context, in *NatShowConfig) (*NatShowConfigReply, error) {
@@ -1230,7 +1307,7 @@ func (c *serviceClient) NatShowConfig(ctx context.Context, in *NatShowConfig) (*
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) NatWorkerDump(ctx context.Context, in *NatWorkerDump) (RPCService_NatWorkerDumpClient, error) {
@@ -1266,6 +1343,10 @@ func (c *serviceClient_NatWorkerDumpClient) Recv() (*NatWorkerDetails, error) {
case *NatWorkerDetails:
return m, nil
case *vpe.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)
diff --git a/internal/testbinapi/binapi2001/netmap/netmap.ba.go b/internal/testbinapi/binapi2001/netmap/netmap.ba.go
index 0934ce6..99a81dc 100644
--- a/internal/testbinapi/binapi2001/netmap/netmap.ba.go
+++ b/internal/testbinapi/binapi2001/netmap/netmap.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/netmap.api.json
diff --git a/internal/testbinapi/binapi2001/netmap/netmap_rpc.ba.go b/internal/testbinapi/binapi2001/netmap/netmap_rpc.ba.go
index 366bed0..9746ff7 100644
--- a/internal/testbinapi/binapi2001/netmap/netmap_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/netmap/netmap_rpc.ba.go
@@ -4,10 +4,11 @@ package netmap
import (
"context"
+
api "git.fd.io/govpp.git/api"
)
-// RPCService defines RPC service netmap.
+// RPCService defines RPC service netmap.
type RPCService interface {
NetmapCreate(ctx context.Context, in *NetmapCreate) (*NetmapCreateReply, error)
NetmapDelete(ctx context.Context, in *NetmapDelete) (*NetmapDeleteReply, error)
@@ -27,7 +28,7 @@ func (c *serviceClient) NetmapCreate(ctx context.Context, in *NetmapCreate) (*Ne
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) NetmapDelete(ctx context.Context, in *NetmapDelete) (*NetmapDeleteReply, error) {
@@ -36,5 +37,5 @@ func (c *serviceClient) NetmapDelete(ctx context.Context, in *NetmapDelete) (*Ne
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/nhrp/nhrp.ba.go b/internal/testbinapi/binapi2001/nhrp/nhrp.ba.go
index 0dd5c4c..7d326b7 100644
--- a/internal/testbinapi/binapi2001/nhrp/nhrp.ba.go
+++ b/internal/testbinapi/binapi2001/nhrp/nhrp.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/nhrp.api.json
@@ -17,11 +17,12 @@ package nhrp
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -498,12 +499,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -532,12 +536,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -566,12 +573,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -595,6 +605,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -607,8 +621,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -618,12 +633,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -666,18 +684,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -720,18 +742,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -790,6 +816,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -800,13 +827,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -824,8 +854,9 @@ type PrefixMatcher struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/nhrp/nhrp_rpc.ba.go b/internal/testbinapi/binapi2001/nhrp/nhrp_rpc.ba.go
index 841bda4..8b7261c 100644
--- a/internal/testbinapi/binapi2001/nhrp/nhrp_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/nhrp/nhrp_rpc.ba.go
@@ -5,12 +5,13 @@ package nhrp
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service nhrp.
+// RPCService defines RPC service nhrp.
type RPCService interface {
NhrpDump(ctx context.Context, in *NhrpDump) (RPCService_NhrpDumpClient, error)
NhrpEntryAddDel(ctx context.Context, in *NhrpEntryAddDel) (*NhrpEntryAddDelReply, error)
@@ -57,6 +58,10 @@ func (c *serviceClient_NhrpDumpClient) Recv() (*NhrpDetails, error) {
case *NhrpDetails:
return m, nil
case *vpe.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)
@@ -69,5 +74,5 @@ func (c *serviceClient) NhrpEntryAddDel(ctx context.Context, in *NhrpEntryAddDel
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/nsh/nsh.ba.go b/internal/testbinapi/binapi2001/nsh/nsh.ba.go
index 75cb38a..c6d20be 100644
--- a/internal/testbinapi/binapi2001/nsh/nsh.ba.go
+++ b/internal/testbinapi/binapi2001/nsh/nsh.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/nsh.api.json
@@ -14,9 +14,10 @@
package nsh
import (
+ "strconv"
+
api "git.fd.io/govpp.git/api"
codec "git.fd.io/govpp.git/codec"
- "strconv"
)
// This is a compile-time assertion to ensure that this generated file
diff --git a/internal/testbinapi/binapi2001/nsh/nsh_rpc.ba.go b/internal/testbinapi/binapi2001/nsh/nsh_rpc.ba.go
index 0c34e58..6399b32 100644
--- a/internal/testbinapi/binapi2001/nsh/nsh_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/nsh/nsh_rpc.ba.go
@@ -5,12 +5,13 @@ package nsh
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service nsh.
+// RPCService defines RPC service nsh.
type RPCService interface {
NshAddDelEntry(ctx context.Context, in *NshAddDelEntry) (*NshAddDelEntryReply, error)
NshAddDelMap(ctx context.Context, in *NshAddDelMap) (*NshAddDelMapReply, error)
@@ -32,7 +33,7 @@ func (c *serviceClient) NshAddDelEntry(ctx context.Context, in *NshAddDelEntry)
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) NshAddDelMap(ctx context.Context, in *NshAddDelMap) (*NshAddDelMapReply, error) {
@@ -41,7 +42,7 @@ func (c *serviceClient) NshAddDelMap(ctx context.Context, in *NshAddDelMap) (*Ns
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) NshEntryDump(ctx context.Context, in *NshEntryDump) (RPCService_NshEntryDumpClient, error) {
@@ -77,6 +78,10 @@ func (c *serviceClient_NshEntryDumpClient) Recv() (*NshEntryDetails, error) {
case *NshEntryDetails:
return m, nil
case *vpe.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)
@@ -116,6 +121,10 @@ func (c *serviceClient_NshMapDumpClient) Recv() (*NshMapDetails, error) {
case *NshMapDetails:
return m, nil
case *vpe.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)
diff --git a/internal/testbinapi/binapi2001/nsim/nsim.ba.go b/internal/testbinapi/binapi2001/nsim/nsim.ba.go
index 4955164..009d4bd 100644
--- a/internal/testbinapi/binapi2001/nsim/nsim.ba.go
+++ b/internal/testbinapi/binapi2001/nsim/nsim.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/nsim.api.json
@@ -14,9 +14,10 @@
package nsim
import (
+ "strconv"
+
api "git.fd.io/govpp.git/api"
codec "git.fd.io/govpp.git/codec"
- "strconv"
)
// This is a compile-time assertion to ensure that this generated file
diff --git a/internal/testbinapi/binapi2001/nsim/nsim_rpc.ba.go b/internal/testbinapi/binapi2001/nsim/nsim_rpc.ba.go
index f35e6b3..d46b1ef 100644
--- a/internal/testbinapi/binapi2001/nsim/nsim_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/nsim/nsim_rpc.ba.go
@@ -4,10 +4,11 @@ package nsim
import (
"context"
+
api "git.fd.io/govpp.git/api"
)
-// RPCService defines RPC service nsim.
+// RPCService defines RPC service nsim.
type RPCService interface {
NsimConfigure(ctx context.Context, in *NsimConfigure) (*NsimConfigureReply, error)
NsimCrossConnectEnableDisable(ctx context.Context, in *NsimCrossConnectEnableDisable) (*NsimCrossConnectEnableDisableReply, error)
@@ -28,7 +29,7 @@ func (c *serviceClient) NsimConfigure(ctx context.Context, in *NsimConfigure) (*
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) NsimCrossConnectEnableDisable(ctx context.Context, in *NsimCrossConnectEnableDisable) (*NsimCrossConnectEnableDisableReply, error) {
@@ -37,7 +38,7 @@ func (c *serviceClient) NsimCrossConnectEnableDisable(ctx context.Context, in *N
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) NsimOutputFeatureEnableDisable(ctx context.Context, in *NsimOutputFeatureEnableDisable) (*NsimOutputFeatureEnableDisableReply, error) {
@@ -46,5 +47,5 @@ func (c *serviceClient) NsimOutputFeatureEnableDisable(ctx context.Context, in *
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/oddbuf/oddbuf.ba.go b/internal/testbinapi/binapi2001/oddbuf/oddbuf.ba.go
index c2b3e5e..281960f 100644
--- a/internal/testbinapi/binapi2001/oddbuf/oddbuf.ba.go
+++ b/internal/testbinapi/binapi2001/oddbuf/oddbuf.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/oddbuf.api.json
@@ -14,9 +14,10 @@
package oddbuf
import (
+ "strconv"
+
api "git.fd.io/govpp.git/api"
codec "git.fd.io/govpp.git/codec"
- "strconv"
)
// This is a compile-time assertion to ensure that this generated file
@@ -286,6 +287,7 @@ func (x SubIfFlags) String() string {
type InterfaceIndex uint32
// OddbufEnableDisable defines message 'oddbuf_enable_disable'.
+// InProgress: the message form may change in the future versions
type OddbufEnableDisable struct {
EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
@@ -323,6 +325,7 @@ func (m *OddbufEnableDisable) Unmarshal(b []byte) error {
}
// OddbufEnableDisableReply defines message 'oddbuf_enable_disable_reply'.
+// InProgress: the message form may change in the future versions
type OddbufEnableDisableReply struct {
Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}
diff --git a/internal/testbinapi/binapi2001/oddbuf/oddbuf_rpc.ba.go b/internal/testbinapi/binapi2001/oddbuf/oddbuf_rpc.ba.go
index a8c245e..f7c0164 100644
--- a/internal/testbinapi/binapi2001/oddbuf/oddbuf_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/oddbuf/oddbuf_rpc.ba.go
@@ -4,10 +4,11 @@ package oddbuf
import (
"context"
+
api "git.fd.io/govpp.git/api"
)
-// RPCService defines RPC service oddbuf.
+// RPCService defines RPC service oddbuf.
type RPCService interface {
OddbufEnableDisable(ctx context.Context, in *OddbufEnableDisable) (*OddbufEnableDisableReply, error)
}
@@ -26,5 +27,5 @@ func (c *serviceClient) OddbufEnableDisable(ctx context.Context, in *OddbufEnabl
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/one/one.ba.go b/internal/testbinapi/binapi2001/one/one.ba.go
index a121d94..83a4d17 100644
--- a/internal/testbinapi/binapi2001/one/one.ba.go
+++ b/internal/testbinapi/binapi2001/one/one.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/one.api.json
diff --git a/internal/testbinapi/binapi2001/one/one_rpc.ba.go b/internal/testbinapi/binapi2001/one/one_rpc.ba.go
index 1b18bdf..9d01e5f 100644
--- a/internal/testbinapi/binapi2001/one/one_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/one/one_rpc.ba.go
@@ -5,12 +5,13 @@ package one
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service one.
+// RPCService defines RPC service one.
type RPCService interface {
OneAddDelAdjacency(ctx context.Context, in *OneAddDelAdjacency) (*OneAddDelAdjacencyReply, error)
OneAddDelL2ArpEntry(ctx context.Context, in *OneAddDelL2ArpEntry) (*OneAddDelL2ArpEntryReply, error)
@@ -82,7 +83,7 @@ func (c *serviceClient) OneAddDelAdjacency(ctx context.Context, in *OneAddDelAdj
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) OneAddDelL2ArpEntry(ctx context.Context, in *OneAddDelL2ArpEntry) (*OneAddDelL2ArpEntryReply, error) {
@@ -91,7 +92,7 @@ func (c *serviceClient) OneAddDelL2ArpEntry(ctx context.Context, in *OneAddDelL2
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) OneAddDelLocalEid(ctx context.Context, in *OneAddDelLocalEid) (*OneAddDelLocalEidReply, error) {
@@ -100,7 +101,7 @@ func (c *serviceClient) OneAddDelLocalEid(ctx context.Context, in *OneAddDelLoca
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) OneAddDelLocator(ctx context.Context, in *OneAddDelLocator) (*OneAddDelLocatorReply, error) {
@@ -109,7 +110,7 @@ func (c *serviceClient) OneAddDelLocator(ctx context.Context, in *OneAddDelLocat
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) OneAddDelLocatorSet(ctx context.Context, in *OneAddDelLocatorSet) (*OneAddDelLocatorSetReply, error) {
@@ -118,7 +119,7 @@ func (c *serviceClient) OneAddDelLocatorSet(ctx context.Context, in *OneAddDelLo
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) OneAddDelMapRequestItrRlocs(ctx context.Context, in *OneAddDelMapRequestItrRlocs) (*OneAddDelMapRequestItrRlocsReply, error) {
@@ -127,7 +128,7 @@ func (c *serviceClient) OneAddDelMapRequestItrRlocs(ctx context.Context, in *One
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) OneAddDelMapResolver(ctx context.Context, in *OneAddDelMapResolver) (*OneAddDelMapResolverReply, error) {
@@ -136,7 +137,7 @@ func (c *serviceClient) OneAddDelMapResolver(ctx context.Context, in *OneAddDelM
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) OneAddDelMapServer(ctx context.Context, in *OneAddDelMapServer) (*OneAddDelMapServerReply, error) {
@@ -145,7 +146,7 @@ func (c *serviceClient) OneAddDelMapServer(ctx context.Context, in *OneAddDelMap
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) OneAddDelNdpEntry(ctx context.Context, in *OneAddDelNdpEntry) (*OneAddDelNdpEntryReply, error) {
@@ -154,7 +155,7 @@ func (c *serviceClient) OneAddDelNdpEntry(ctx context.Context, in *OneAddDelNdpE
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) OneAddDelRemoteMapping(ctx context.Context, in *OneAddDelRemoteMapping) (*OneAddDelRemoteMappingReply, error) {
@@ -163,7 +164,7 @@ func (c *serviceClient) OneAddDelRemoteMapping(ctx context.Context, in *OneAddDe
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) OneAdjacenciesGet(ctx context.Context, in *OneAdjacenciesGet) (*OneAdjacenciesGetReply, error) {
@@ -172,7 +173,7 @@ func (c *serviceClient) OneAdjacenciesGet(ctx context.Context, in *OneAdjacencie
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) OneEidTableAddDelMap(ctx context.Context, in *OneEidTableAddDelMap) (*OneEidTableAddDelMapReply, error) {
@@ -181,7 +182,7 @@ func (c *serviceClient) OneEidTableAddDelMap(ctx context.Context, in *OneEidTabl
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) OneEidTableDump(ctx context.Context, in *OneEidTableDump) (RPCService_OneEidTableDumpClient, error) {
@@ -217,6 +218,10 @@ func (c *serviceClient_OneEidTableDumpClient) Recv() (*OneEidTableDetails, error
case *OneEidTableDetails:
return m, nil
case *vpe.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)
@@ -256,6 +261,10 @@ func (c *serviceClient_OneEidTableMapDumpClient) Recv() (*OneEidTableMapDetails,
case *OneEidTableMapDetails:
return m, nil
case *vpe.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)
@@ -295,6 +304,10 @@ func (c *serviceClient_OneEidTableVniDumpClient) Recv() (*OneEidTableVniDetails,
case *OneEidTableVniDetails:
return m, nil
case *vpe.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)
@@ -307,7 +320,7 @@ func (c *serviceClient) OneEnableDisable(ctx context.Context, in *OneEnableDisab
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) OneEnableDisablePetrMode(ctx context.Context, in *OneEnableDisablePetrMode) (*OneEnableDisablePetrModeReply, error) {
@@ -316,7 +329,7 @@ func (c *serviceClient) OneEnableDisablePetrMode(ctx context.Context, in *OneEna
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) OneEnableDisablePitrMode(ctx context.Context, in *OneEnableDisablePitrMode) (*OneEnableDisablePitrModeReply, error) {
@@ -325,7 +338,7 @@ func (c *serviceClient) OneEnableDisablePitrMode(ctx context.Context, in *OneEna
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) OneEnableDisableXtrMode(ctx context.Context, in *OneEnableDisableXtrMode) (*OneEnableDisableXtrModeReply, error) {
@@ -334,7 +347,7 @@ func (c *serviceClient) OneEnableDisableXtrMode(ctx context.Context, in *OneEnab
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) OneGetMapRequestItrRlocs(ctx context.Context, in *OneGetMapRequestItrRlocs) (*OneGetMapRequestItrRlocsReply, error) {
@@ -343,7 +356,7 @@ func (c *serviceClient) OneGetMapRequestItrRlocs(ctx context.Context, in *OneGet
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) OneGetTransportProtocol(ctx context.Context, in *OneGetTransportProtocol) (*OneGetTransportProtocolReply, error) {
@@ -352,7 +365,7 @@ func (c *serviceClient) OneGetTransportProtocol(ctx context.Context, in *OneGetT
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) OneL2ArpBdGet(ctx context.Context, in *OneL2ArpBdGet) (*OneL2ArpBdGetReply, error) {
@@ -361,7 +374,7 @@ func (c *serviceClient) OneL2ArpBdGet(ctx context.Context, in *OneL2ArpBdGet) (*
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) OneL2ArpEntriesGet(ctx context.Context, in *OneL2ArpEntriesGet) (*OneL2ArpEntriesGetReply, error) {
@@ -370,7 +383,7 @@ func (c *serviceClient) OneL2ArpEntriesGet(ctx context.Context, in *OneL2ArpEntr
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) OneLocatorDump(ctx context.Context, in *OneLocatorDump) (RPCService_OneLocatorDumpClient, error) {
@@ -406,6 +419,10 @@ func (c *serviceClient_OneLocatorDumpClient) Recv() (*OneLocatorDetails, error)
case *OneLocatorDetails:
return m, nil
case *vpe.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)
@@ -445,6 +462,10 @@ func (c *serviceClient_OneLocatorSetDumpClient) Recv() (*OneLocatorSetDetails, e
case *OneLocatorSetDetails:
return m, nil
case *vpe.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)
@@ -457,7 +478,7 @@ func (c *serviceClient) OneMapRegisterEnableDisable(ctx context.Context, in *One
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) OneMapRegisterFallbackThreshold(ctx context.Context, in *OneMapRegisterFallbackThreshold) (*OneMapRegisterFallbackThresholdReply, error) {
@@ -466,7 +487,7 @@ func (c *serviceClient) OneMapRegisterFallbackThreshold(ctx context.Context, in
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) OneMapRegisterSetTTL(ctx context.Context, in *OneMapRegisterSetTTL) (*OneMapRegisterSetTTLReply, error) {
@@ -475,7 +496,7 @@ func (c *serviceClient) OneMapRegisterSetTTL(ctx context.Context, in *OneMapRegi
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) OneMapRequestMode(ctx context.Context, in *OneMapRequestMode) (*OneMapRequestModeReply, error) {
@@ -484,7 +505,7 @@ func (c *serviceClient) OneMapRequestMode(ctx context.Context, in *OneMapRequest
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) OneMapResolverDump(ctx context.Context, in *OneMapResolverDump) (RPCService_OneMapResolverDumpClient, error) {
@@ -520,6 +541,10 @@ func (c *serviceClient_OneMapResolverDumpClient) Recv() (*OneMapResolverDetails,
case *OneMapResolverDetails:
return m, nil
case *vpe.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)
@@ -559,6 +584,10 @@ func (c *serviceClient_OneMapServerDumpClient) Recv() (*OneMapServerDetails, err
case *OneMapServerDetails:
return m, nil
case *vpe.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)
@@ -571,7 +600,7 @@ func (c *serviceClient) OneNdpBdGet(ctx context.Context, in *OneNdpBdGet) (*OneN
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) OneNdpEntriesGet(ctx context.Context, in *OneNdpEntriesGet) (*OneNdpEntriesGetReply, error) {
@@ -580,7 +609,7 @@ func (c *serviceClient) OneNdpEntriesGet(ctx context.Context, in *OneNdpEntriesG
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) OneNshSetLocatorSet(ctx context.Context, in *OneNshSetLocatorSet) (*OneNshSetLocatorSetReply, error) {
@@ -589,7 +618,7 @@ func (c *serviceClient) OneNshSetLocatorSet(ctx context.Context, in *OneNshSetLo
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) OnePitrSetLocatorSet(ctx context.Context, in *OnePitrSetLocatorSet) (*OnePitrSetLocatorSetReply, error) {
@@ -598,7 +627,7 @@ func (c *serviceClient) OnePitrSetLocatorSet(ctx context.Context, in *OnePitrSet
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) OneRlocProbeEnableDisable(ctx context.Context, in *OneRlocProbeEnableDisable) (*OneRlocProbeEnableDisableReply, error) {
@@ -607,7 +636,7 @@ func (c *serviceClient) OneRlocProbeEnableDisable(ctx context.Context, in *OneRl
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) OneSetTransportProtocol(ctx context.Context, in *OneSetTransportProtocol) (*OneSetTransportProtocolReply, error) {
@@ -616,7 +645,7 @@ func (c *serviceClient) OneSetTransportProtocol(ctx context.Context, in *OneSetT
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) OneShowPetrMode(ctx context.Context, in *OneShowPetrMode) (*OneShowPetrModeReply, error) {
@@ -625,7 +654,7 @@ func (c *serviceClient) OneShowPetrMode(ctx context.Context, in *OneShowPetrMode
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) OneShowPitrMode(ctx context.Context, in *OneShowPitrMode) (*OneShowPitrModeReply, error) {
@@ -634,7 +663,7 @@ func (c *serviceClient) OneShowPitrMode(ctx context.Context, in *OneShowPitrMode
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) OneShowXtrMode(ctx context.Context, in *OneShowXtrMode) (*OneShowXtrModeReply, error) {
@@ -643,7 +672,7 @@ func (c *serviceClient) OneShowXtrMode(ctx context.Context, in *OneShowXtrMode)
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) OneStatsDump(ctx context.Context, in *OneStatsDump) (RPCService_OneStatsDumpClient, error) {
@@ -679,6 +708,10 @@ func (c *serviceClient_OneStatsDumpClient) Recv() (*OneStatsDetails, error) {
case *OneStatsDetails:
return m, nil
case *vpe.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)
@@ -691,7 +724,7 @@ func (c *serviceClient) OneStatsEnableDisable(ctx context.Context, in *OneStatsE
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) OneStatsFlush(ctx context.Context, in *OneStatsFlush) (*OneStatsFlushReply, error) {
@@ -700,7 +733,7 @@ func (c *serviceClient) OneStatsFlush(ctx context.Context, in *OneStatsFlush) (*
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) OneUsePetr(ctx context.Context, in *OneUsePetr) (*OneUsePetrReply, error) {
@@ -709,7 +742,7 @@ func (c *serviceClient) OneUsePetr(ctx context.Context, in *OneUsePetr) (*OneUse
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) ShowOneMapRegisterFallbackThreshold(ctx context.Context, in *ShowOneMapRegisterFallbackThreshold) (*ShowOneMapRegisterFallbackThresholdReply, error) {
@@ -718,7 +751,7 @@ func (c *serviceClient) ShowOneMapRegisterFallbackThreshold(ctx context.Context,
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) ShowOneMapRegisterState(ctx context.Context, in *ShowOneMapRegisterState) (*ShowOneMapRegisterStateReply, error) {
@@ -727,7 +760,7 @@ func (c *serviceClient) ShowOneMapRegisterState(ctx context.Context, in *ShowOne
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) ShowOneMapRegisterTTL(ctx context.Context, in *ShowOneMapRegisterTTL) (*ShowOneMapRegisterTTLReply, error) {
@@ -736,7 +769,7 @@ func (c *serviceClient) ShowOneMapRegisterTTL(ctx context.Context, in *ShowOneMa
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) ShowOneMapRequestMode(ctx context.Context, in *ShowOneMapRequestMode) (*ShowOneMapRequestModeReply, error) {
@@ -745,7 +778,7 @@ func (c *serviceClient) ShowOneMapRequestMode(ctx context.Context, in *ShowOneMa
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) ShowOneNshMapping(ctx context.Context, in *ShowOneNshMapping) (*ShowOneNshMappingReply, error) {
@@ -754,7 +787,7 @@ func (c *serviceClient) ShowOneNshMapping(ctx context.Context, in *ShowOneNshMap
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) ShowOnePitr(ctx context.Context, in *ShowOnePitr) (*ShowOnePitrReply, error) {
@@ -763,7 +796,7 @@ func (c *serviceClient) ShowOnePitr(ctx context.Context, in *ShowOnePitr) (*Show
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) ShowOneRlocProbeState(ctx context.Context, in *ShowOneRlocProbeState) (*ShowOneRlocProbeStateReply, error) {
@@ -772,7 +805,7 @@ func (c *serviceClient) ShowOneRlocProbeState(ctx context.Context, in *ShowOneRl
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) ShowOneStatsEnableDisable(ctx context.Context, in *ShowOneStatsEnableDisable) (*ShowOneStatsEnableDisableReply, error) {
@@ -781,7 +814,7 @@ func (c *serviceClient) ShowOneStatsEnableDisable(ctx context.Context, in *ShowO
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) ShowOneStatus(ctx context.Context, in *ShowOneStatus) (*ShowOneStatusReply, error) {
@@ -790,7 +823,7 @@ func (c *serviceClient) ShowOneStatus(ctx context.Context, in *ShowOneStatus) (*
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) ShowOneUsePetr(ctx context.Context, in *ShowOneUsePetr) (*ShowOneUsePetrReply, error) {
@@ -799,5 +832,5 @@ func (c *serviceClient) ShowOneUsePetr(ctx context.Context, in *ShowOneUsePetr)
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/p2p_ethernet/p2p_ethernet.ba.go b/internal/testbinapi/binapi2001/p2p_ethernet/p2p_ethernet.ba.go
index bf0096b..fdf488c 100644
--- a/internal/testbinapi/binapi2001/p2p_ethernet/p2p_ethernet.ba.go
+++ b/internal/testbinapi/binapi2001/p2p_ethernet/p2p_ethernet.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/p2p_ethernet.api.json
@@ -14,10 +14,11 @@
package p2p_ethernet
import (
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -298,15 +299,19 @@ func ParseMacAddress(s string) (MacAddress, error) {
copy(macaddr[:], mac[:])
return macaddr, nil
}
+
func (x MacAddress) ToMAC() net.HardwareAddr {
return net.HardwareAddr(x[:])
}
+
func (x MacAddress) String() string {
return x.ToMAC().String()
}
+
func (x *MacAddress) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *MacAddress) UnmarshalText(text []byte) error {
mac, err := ParseMacAddress(string(text))
if err != nil {
diff --git a/internal/testbinapi/binapi2001/p2p_ethernet/p2p_ethernet_rpc.ba.go b/internal/testbinapi/binapi2001/p2p_ethernet/p2p_ethernet_rpc.ba.go
index ed1e012..c96d6a5 100644
--- a/internal/testbinapi/binapi2001/p2p_ethernet/p2p_ethernet_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/p2p_ethernet/p2p_ethernet_rpc.ba.go
@@ -4,10 +4,11 @@ package p2p_ethernet
import (
"context"
+
api "git.fd.io/govpp.git/api"
)
-// RPCService defines RPC service p2p_ethernet.
+// RPCService defines RPC service p2p_ethernet.
type RPCService interface {
P2pEthernetAdd(ctx context.Context, in *P2pEthernetAdd) (*P2pEthernetAddReply, error)
P2pEthernetDel(ctx context.Context, in *P2pEthernetDel) (*P2pEthernetDelReply, error)
@@ -27,7 +28,7 @@ func (c *serviceClient) P2pEthernetAdd(ctx context.Context, in *P2pEthernetAdd)
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) P2pEthernetDel(ctx context.Context, in *P2pEthernetDel) (*P2pEthernetDelReply, error) {
@@ -36,5 +37,5 @@ func (c *serviceClient) P2pEthernetDel(ctx context.Context, in *P2pEthernetDel)
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/pci_types/pci_types.ba.go b/internal/testbinapi/binapi2001/pci_types/pci_types.ba.go
index c529a67..d4ea7b2 100644
--- a/internal/testbinapi/binapi2001/pci_types/pci_types.ba.go
+++ b/internal/testbinapi/binapi2001/pci_types/pci_types.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/pci_types.api.json
@@ -21,6 +21,12 @@ import (
// GoVPP api package needs to be updated.
const _ = api.GoVppAPIPackageIsVersion2
+const (
+ APIFile = "pci_types"
+ APIVersion = "1.0.0"
+ VersionCrc = 0x5d418665
+)
+
// PciAddress defines type 'pci_address'.
type PciAddress struct {
Domain uint16 `binapi:"u16,name=domain" json:"domain,omitempty"`
diff --git a/internal/testbinapi/binapi2001/pg/pg.ba.go b/internal/testbinapi/binapi2001/pg/pg.ba.go
index 283ed12..1e304c4 100644
--- a/internal/testbinapi/binapi2001/pg/pg.ba.go
+++ b/internal/testbinapi/binapi2001/pg/pg.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/pg.api.json
diff --git a/internal/testbinapi/binapi2001/pg/pg_rpc.ba.go b/internal/testbinapi/binapi2001/pg/pg_rpc.ba.go
index 1d905d0..697f684 100644
--- a/internal/testbinapi/binapi2001/pg/pg_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/pg/pg_rpc.ba.go
@@ -4,10 +4,11 @@ package pg
import (
"context"
+
api "git.fd.io/govpp.git/api"
)
-// RPCService defines RPC service pg.
+// RPCService defines RPC service pg.
type RPCService interface {
PgCapture(ctx context.Context, in *PgCapture) (*PgCaptureReply, error)
PgCreateInterface(ctx context.Context, in *PgCreateInterface) (*PgCreateInterfaceReply, error)
@@ -28,7 +29,7 @@ func (c *serviceClient) PgCapture(ctx context.Context, in *PgCapture) (*PgCaptur
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) PgCreateInterface(ctx context.Context, in *PgCreateInterface) (*PgCreateInterfaceReply, error) {
@@ -37,7 +38,7 @@ func (c *serviceClient) PgCreateInterface(ctx context.Context, in *PgCreateInter
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) PgEnableDisable(ctx context.Context, in *PgEnableDisable) (*PgEnableDisableReply, error) {
@@ -46,5 +47,5 @@ func (c *serviceClient) PgEnableDisable(ctx context.Context, in *PgEnableDisable
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/pipe/pipe.ba.go b/internal/testbinapi/binapi2001/pipe/pipe.ba.go
index 66f044c..da324cb 100644
--- a/internal/testbinapi/binapi2001/pipe/pipe.ba.go
+++ b/internal/testbinapi/binapi2001/pipe/pipe.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/pipe.api.json
@@ -14,9 +14,10 @@
package pipe
import (
+ "strconv"
+
api "git.fd.io/govpp.git/api"
codec "git.fd.io/govpp.git/codec"
- "strconv"
)
// This is a compile-time assertion to ensure that this generated file
diff --git a/internal/testbinapi/binapi2001/pipe/pipe_rpc.ba.go b/internal/testbinapi/binapi2001/pipe/pipe_rpc.ba.go
index ce2037d..3f2dbc9 100644
--- a/internal/testbinapi/binapi2001/pipe/pipe_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/pipe/pipe_rpc.ba.go
@@ -5,12 +5,13 @@ package pipe
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service pipe.
+// RPCService defines RPC service pipe.
type RPCService interface {
PipeCreate(ctx context.Context, in *PipeCreate) (*PipeCreateReply, error)
PipeDelete(ctx context.Context, in *PipeDelete) (*PipeDeleteReply, error)
@@ -31,7 +32,7 @@ func (c *serviceClient) PipeCreate(ctx context.Context, in *PipeCreate) (*PipeCr
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) PipeDelete(ctx context.Context, in *PipeDelete) (*PipeDeleteReply, error) {
@@ -40,7 +41,7 @@ func (c *serviceClient) PipeDelete(ctx context.Context, in *PipeDelete) (*PipeDe
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) PipeDump(ctx context.Context, in *PipeDump) (RPCService_PipeDumpClient, error) {
@@ -76,6 +77,10 @@ func (c *serviceClient_PipeDumpClient) Recv() (*PipeDetails, error) {
case *PipeDetails:
return m, nil
case *vpe.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)
diff --git a/internal/testbinapi/binapi2001/policer/policer.ba.go b/internal/testbinapi/binapi2001/policer/policer.ba.go
index d5bf1d4..3c8577b 100644
--- a/internal/testbinapi/binapi2001/policer/policer.ba.go
+++ b/internal/testbinapi/binapi2001/policer/policer.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/policer.api.json
diff --git a/internal/testbinapi/binapi2001/policer/policer_rpc.ba.go b/internal/testbinapi/binapi2001/policer/policer_rpc.ba.go
index 3a2008e..64422fb 100644
--- a/internal/testbinapi/binapi2001/policer/policer_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/policer/policer_rpc.ba.go
@@ -5,12 +5,13 @@ package policer
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service policer.
+// RPCService defines RPC service policer.
type RPCService interface {
PolicerAddDel(ctx context.Context, in *PolicerAddDel) (*PolicerAddDelReply, error)
PolicerDump(ctx context.Context, in *PolicerDump) (RPCService_PolicerDumpClient, error)
@@ -30,7 +31,7 @@ func (c *serviceClient) PolicerAddDel(ctx context.Context, in *PolicerAddDel) (*
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) PolicerDump(ctx context.Context, in *PolicerDump) (RPCService_PolicerDumpClient, error) {
@@ -66,6 +67,10 @@ func (c *serviceClient_PolicerDumpClient) Recv() (*PolicerDetails, error) {
case *PolicerDetails:
return m, nil
case *vpe.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)
diff --git a/internal/testbinapi/binapi2001/pot/pot.ba.go b/internal/testbinapi/binapi2001/pot/pot.ba.go
index 17f1c4d..d7fdfa9 100644
--- a/internal/testbinapi/binapi2001/pot/pot.ba.go
+++ b/internal/testbinapi/binapi2001/pot/pot.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/pot.api.json
diff --git a/internal/testbinapi/binapi2001/pot/pot_rpc.ba.go b/internal/testbinapi/binapi2001/pot/pot_rpc.ba.go
index 7194482..83adca6 100644
--- a/internal/testbinapi/binapi2001/pot/pot_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/pot/pot_rpc.ba.go
@@ -5,12 +5,13 @@ package pot
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service pot.
+// RPCService defines RPC service pot.
type RPCService interface {
PotProfileActivate(ctx context.Context, in *PotProfileActivate) (*PotProfileActivateReply, error)
PotProfileAdd(ctx context.Context, in *PotProfileAdd) (*PotProfileAddReply, error)
@@ -32,7 +33,7 @@ func (c *serviceClient) PotProfileActivate(ctx context.Context, in *PotProfileAc
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) PotProfileAdd(ctx context.Context, in *PotProfileAdd) (*PotProfileAddReply, error) {
@@ -41,7 +42,7 @@ func (c *serviceClient) PotProfileAdd(ctx context.Context, in *PotProfileAdd) (*
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) PotProfileDel(ctx context.Context, in *PotProfileDel) (*PotProfileDelReply, error) {
@@ -50,7 +51,7 @@ func (c *serviceClient) PotProfileDel(ctx context.Context, in *PotProfileDel) (*
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) PotProfileShowConfigDump(ctx context.Context, in *PotProfileShowConfigDump) (RPCService_PotProfileShowConfigDumpClient, error) {
@@ -86,6 +87,10 @@ func (c *serviceClient_PotProfileShowConfigDumpClient) Recv() (*PotProfileShowCo
case *PotProfileShowConfigDetails:
return m, nil
case *vpe.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)
diff --git a/internal/testbinapi/binapi2001/pppoe/pppoe.ba.go b/internal/testbinapi/binapi2001/pppoe/pppoe.ba.go
index 281bbe0..3c8d027 100644
--- a/internal/testbinapi/binapi2001/pppoe/pppoe.ba.go
+++ b/internal/testbinapi/binapi2001/pppoe/pppoe.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/pppoe.api.json
@@ -17,11 +17,12 @@ package pppoe
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -498,12 +499,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -532,12 +536,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -566,12 +573,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -596,15 +606,19 @@ func ParseMacAddress(s string) (MacAddress, error) {
copy(macaddr[:], mac[:])
return macaddr, nil
}
+
func (x MacAddress) ToMAC() net.HardwareAddr {
return net.HardwareAddr(x[:])
}
+
func (x MacAddress) String() string {
return x.ToMAC().String()
}
+
func (x *MacAddress) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *MacAddress) UnmarshalText(text []byte) error {
mac, err := ParseMacAddress(string(text))
if err != nil {
@@ -625,6 +639,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -637,8 +655,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -648,12 +667,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -696,18 +718,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -750,18 +776,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -812,6 +842,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -822,13 +853,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -846,8 +880,9 @@ type PrefixMatcher struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/pppoe/pppoe_rpc.ba.go b/internal/testbinapi/binapi2001/pppoe/pppoe_rpc.ba.go
index 7feaf6f..09d7112 100644
--- a/internal/testbinapi/binapi2001/pppoe/pppoe_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/pppoe/pppoe_rpc.ba.go
@@ -5,12 +5,13 @@ package pppoe
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service pppoe.
+// RPCService defines RPC service pppoe.
type RPCService interface {
PppoeAddDelSession(ctx context.Context, in *PppoeAddDelSession) (*PppoeAddDelSessionReply, error)
PppoeSessionDump(ctx context.Context, in *PppoeSessionDump) (RPCService_PppoeSessionDumpClient, error)
@@ -30,7 +31,7 @@ func (c *serviceClient) PppoeAddDelSession(ctx context.Context, in *PppoeAddDelS
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) PppoeSessionDump(ctx context.Context, in *PppoeSessionDump) (RPCService_PppoeSessionDumpClient, error) {
@@ -66,6 +67,10 @@ func (c *serviceClient_PppoeSessionDumpClient) Recv() (*PppoeSessionDetails, err
case *PppoeSessionDetails:
return m, nil
case *vpe.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)
diff --git a/internal/testbinapi/binapi2001/punt/punt.ba.go b/internal/testbinapi/binapi2001/punt/punt.ba.go
index 285aaf1..e10832f 100644
--- a/internal/testbinapi/binapi2001/punt/punt.ba.go
+++ b/internal/testbinapi/binapi2001/punt/punt.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/punt.api.json
@@ -17,11 +17,12 @@ package punt
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -277,12 +278,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -308,12 +312,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -342,12 +349,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -371,6 +381,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -383,8 +397,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -394,12 +409,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -442,18 +460,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -496,18 +518,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -558,6 +584,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -568,13 +595,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -622,8 +652,9 @@ type PuntReason struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
@@ -657,9 +688,10 @@ func (u *AddressUnion) GetIP6() (a IP6Address) {
// PuntUnion defines union 'punt_union'.
type PuntUnion struct {
- // Exception *PuntException
- // L4 *PuntL4
- // IPProto *PuntIPProto
+ // PuntUnion can be one of:
+ // - Exception *PuntException
+ // - L4 *PuntL4
+ // - IPProto *PuntIPProto
XXX_UnionData [10]byte
}
diff --git a/internal/testbinapi/binapi2001/punt/punt_rpc.ba.go b/internal/testbinapi/binapi2001/punt/punt_rpc.ba.go
index c55a0af..337eeb7 100644
--- a/internal/testbinapi/binapi2001/punt/punt_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/punt/punt_rpc.ba.go
@@ -5,12 +5,13 @@ package punt
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service punt.
+// RPCService defines RPC service punt.
type RPCService interface {
PuntReasonDump(ctx context.Context, in *PuntReasonDump) (RPCService_PuntReasonDumpClient, error)
PuntSocketDeregister(ctx context.Context, in *PuntSocketDeregister) (*PuntSocketDeregisterReply, error)
@@ -60,6 +61,10 @@ func (c *serviceClient_PuntReasonDumpClient) Recv() (*PuntReasonDetails, error)
case *PuntReasonDetails:
return m, nil
case *vpe.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)
@@ -72,7 +77,7 @@ func (c *serviceClient) PuntSocketDeregister(ctx context.Context, in *PuntSocket
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) PuntSocketDump(ctx context.Context, in *PuntSocketDump) (RPCService_PuntSocketDumpClient, error) {
@@ -108,6 +113,10 @@ func (c *serviceClient_PuntSocketDumpClient) Recv() (*PuntSocketDetails, error)
case *PuntSocketDetails:
return m, nil
case *vpe.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)
@@ -120,7 +129,7 @@ func (c *serviceClient) PuntSocketRegister(ctx context.Context, in *PuntSocketRe
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SetPunt(ctx context.Context, in *SetPunt) (*SetPuntReply, error) {
@@ -129,5 +138,5 @@ func (c *serviceClient) SetPunt(ctx context.Context, in *SetPunt) (*SetPuntReply
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/qos/qos.ba.go b/internal/testbinapi/binapi2001/qos/qos.ba.go
index 5414145..d91fccb 100644
--- a/internal/testbinapi/binapi2001/qos/qos.ba.go
+++ b/internal/testbinapi/binapi2001/qos/qos.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/qos.api.json
@@ -17,11 +17,12 @@ package qos
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -531,12 +532,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -565,12 +569,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -599,12 +606,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -628,6 +638,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -640,8 +654,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -651,12 +666,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -699,18 +717,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -753,18 +775,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -815,6 +841,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -825,13 +852,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -880,8 +910,9 @@ type QosStore struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/qos/qos_rpc.ba.go b/internal/testbinapi/binapi2001/qos/qos_rpc.ba.go
index ed5909c..2334c62 100644
--- a/internal/testbinapi/binapi2001/qos/qos_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/qos/qos_rpc.ba.go
@@ -5,12 +5,13 @@ package qos
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service qos.
+// RPCService defines RPC service qos.
type RPCService interface {
QosEgressMapDelete(ctx context.Context, in *QosEgressMapDelete) (*QosEgressMapDeleteReply, error)
QosEgressMapDump(ctx context.Context, in *QosEgressMapDump) (RPCService_QosEgressMapDumpClient, error)
@@ -37,7 +38,7 @@ func (c *serviceClient) QosEgressMapDelete(ctx context.Context, in *QosEgressMap
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) QosEgressMapDump(ctx context.Context, in *QosEgressMapDump) (RPCService_QosEgressMapDumpClient, error) {
@@ -73,6 +74,10 @@ func (c *serviceClient_QosEgressMapDumpClient) Recv() (*QosEgressMapDetails, err
case *QosEgressMapDetails:
return m, nil
case *vpe.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)
@@ -85,7 +90,7 @@ func (c *serviceClient) QosEgressMapUpdate(ctx context.Context, in *QosEgressMap
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) QosMarkDump(ctx context.Context, in *QosMarkDump) (RPCService_QosMarkDumpClient, error) {
@@ -121,6 +126,10 @@ func (c *serviceClient_QosMarkDumpClient) Recv() (*QosMarkDetails, error) {
case *QosMarkDetails:
return m, nil
case *vpe.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)
@@ -133,7 +142,7 @@ func (c *serviceClient) QosMarkEnableDisable(ctx context.Context, in *QosMarkEna
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) QosRecordDump(ctx context.Context, in *QosRecordDump) (RPCService_QosRecordDumpClient, error) {
@@ -169,6 +178,10 @@ func (c *serviceClient_QosRecordDumpClient) Recv() (*QosRecordDetails, error) {
case *QosRecordDetails:
return m, nil
case *vpe.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)
@@ -181,7 +194,7 @@ func (c *serviceClient) QosRecordEnableDisable(ctx context.Context, in *QosRecor
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) QosStoreDump(ctx context.Context, in *QosStoreDump) (RPCService_QosStoreDumpClient, error) {
@@ -217,6 +230,10 @@ func (c *serviceClient_QosStoreDumpClient) Recv() (*QosStoreDetails, error) {
case *QosStoreDetails:
return m, nil
case *vpe.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)
@@ -229,5 +246,5 @@ func (c *serviceClient) QosStoreEnableDisable(ctx context.Context, in *QosStoreE
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/rd_cp/rd_cp.ba.go b/internal/testbinapi/binapi2001/rd_cp/rd_cp.ba.go
index db3579d..92fa94c 100644
--- a/internal/testbinapi/binapi2001/rd_cp/rd_cp.ba.go
+++ b/internal/testbinapi/binapi2001/rd_cp/rd_cp.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/rd_cp.api.json
@@ -14,9 +14,10 @@
package rd_cp
import (
+ "strconv"
+
api "git.fd.io/govpp.git/api"
codec "git.fd.io/govpp.git/codec"
- "strconv"
)
// This is a compile-time assertion to ensure that this generated file
diff --git a/internal/testbinapi/binapi2001/rd_cp/rd_cp_rpc.ba.go b/internal/testbinapi/binapi2001/rd_cp/rd_cp_rpc.ba.go
index af7ba12..56b2c18 100644
--- a/internal/testbinapi/binapi2001/rd_cp/rd_cp_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/rd_cp/rd_cp_rpc.ba.go
@@ -4,10 +4,11 @@ package rd_cp
import (
"context"
+
api "git.fd.io/govpp.git/api"
)
-// RPCService defines RPC service rd_cp.
+// RPCService defines RPC service rd_cp.
type RPCService interface {
IP6NdAddressAutoconfig(ctx context.Context, in *IP6NdAddressAutoconfig) (*IP6NdAddressAutoconfigReply, error)
}
@@ -26,5 +27,5 @@ func (c *serviceClient) IP6NdAddressAutoconfig(ctx context.Context, in *IP6NdAdd
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/rdma/rdma.ba.go b/internal/testbinapi/binapi2001/rdma/rdma.ba.go
index fcbf2c2..79c738a 100644
--- a/internal/testbinapi/binapi2001/rdma/rdma.ba.go
+++ b/internal/testbinapi/binapi2001/rdma/rdma.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/rdma.api.json
@@ -14,9 +14,10 @@
package rdma
import (
+ "strconv"
+
api "git.fd.io/govpp.git/api"
codec "git.fd.io/govpp.git/codec"
- "strconv"
)
// This is a compile-time assertion to ensure that this generated file
diff --git a/internal/testbinapi/binapi2001/rdma/rdma_rpc.ba.go b/internal/testbinapi/binapi2001/rdma/rdma_rpc.ba.go
index 850f04a..489297d 100644
--- a/internal/testbinapi/binapi2001/rdma/rdma_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/rdma/rdma_rpc.ba.go
@@ -4,10 +4,11 @@ package rdma
import (
"context"
+
api "git.fd.io/govpp.git/api"
)
-// RPCService defines RPC service rdma.
+// RPCService defines RPC service rdma.
type RPCService interface {
RdmaCreate(ctx context.Context, in *RdmaCreate) (*RdmaCreateReply, error)
RdmaDelete(ctx context.Context, in *RdmaDelete) (*RdmaDeleteReply, error)
@@ -27,7 +28,7 @@ func (c *serviceClient) RdmaCreate(ctx context.Context, in *RdmaCreate) (*RdmaCr
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) RdmaDelete(ctx context.Context, in *RdmaDelete) (*RdmaDeleteReply, error) {
@@ -36,5 +37,5 @@ func (c *serviceClient) RdmaDelete(ctx context.Context, in *RdmaDelete) (*RdmaDe
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/sctp/sctp.ba.go b/internal/testbinapi/binapi2001/sctp/sctp.ba.go
index 61aeab6..c06e76e 100644
--- a/internal/testbinapi/binapi2001/sctp/sctp.ba.go
+++ b/internal/testbinapi/binapi2001/sctp/sctp.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/sctp.api.json
diff --git a/internal/testbinapi/binapi2001/sctp/sctp_rpc.ba.go b/internal/testbinapi/binapi2001/sctp/sctp_rpc.ba.go
index d5aa970..7e75326 100644
--- a/internal/testbinapi/binapi2001/sctp/sctp_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/sctp/sctp_rpc.ba.go
@@ -4,10 +4,11 @@ package sctp
import (
"context"
+
api "git.fd.io/govpp.git/api"
)
-// RPCService defines RPC service sctp.
+// RPCService defines RPC service sctp.
type RPCService interface {
SctpAddSrcDstConnection(ctx context.Context, in *SctpAddSrcDstConnection) (*SctpAddSrcDstConnectionReply, error)
SctpConfig(ctx context.Context, in *SctpConfig) (*SctpConfigReply, error)
@@ -28,7 +29,7 @@ func (c *serviceClient) SctpAddSrcDstConnection(ctx context.Context, in *SctpAdd
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SctpConfig(ctx context.Context, in *SctpConfig) (*SctpConfigReply, error) {
@@ -37,7 +38,7 @@ func (c *serviceClient) SctpConfig(ctx context.Context, in *SctpConfig) (*SctpCo
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SctpDelSrcDstConnection(ctx context.Context, in *SctpDelSrcDstConnection) (*SctpDelSrcDstConnectionReply, error) {
@@ -46,5 +47,5 @@ func (c *serviceClient) SctpDelSrcDstConnection(ctx context.Context, in *SctpDel
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/session/session.ba.go b/internal/testbinapi/binapi2001/session/session.ba.go
index 7f5af5c..b6d5706 100644
--- a/internal/testbinapi/binapi2001/session/session.ba.go
+++ b/internal/testbinapi/binapi2001/session/session.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/session.api.json
diff --git a/internal/testbinapi/binapi2001/session/session_rpc.ba.go b/internal/testbinapi/binapi2001/session/session_rpc.ba.go
index 519aa06..9910c24 100644
--- a/internal/testbinapi/binapi2001/session/session_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/session/session_rpc.ba.go
@@ -5,12 +5,13 @@ package session
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service session.
+// RPCService defines RPC service session.
type RPCService interface {
AppAddCertKeyPair(ctx context.Context, in *AppAddCertKeyPair) (*AppAddCertKeyPairReply, error)
AppAttach(ctx context.Context, in *AppAttach) (*AppAttachReply, error)
@@ -50,7 +51,7 @@ func (c *serviceClient) AppAddCertKeyPair(ctx context.Context, in *AppAddCertKey
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) AppAttach(ctx context.Context, in *AppAttach) (*AppAttachReply, error) {
@@ -59,7 +60,7 @@ func (c *serviceClient) AppAttach(ctx context.Context, in *AppAttach) (*AppAttac
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) AppCutThroughRegistrationAdd(ctx context.Context, in *AppCutThroughRegistrationAdd) (*AppCutThroughRegistrationAddReply, error) {
@@ -68,7 +69,7 @@ func (c *serviceClient) AppCutThroughRegistrationAdd(ctx context.Context, in *Ap
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) AppDelCertKeyPair(ctx context.Context, in *AppDelCertKeyPair) (*AppDelCertKeyPairReply, error) {
@@ -77,7 +78,7 @@ func (c *serviceClient) AppDelCertKeyPair(ctx context.Context, in *AppDelCertKey
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) AppNamespaceAddDel(ctx context.Context, in *AppNamespaceAddDel) (*AppNamespaceAddDelReply, error) {
@@ -86,7 +87,7 @@ func (c *serviceClient) AppNamespaceAddDel(ctx context.Context, in *AppNamespace
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) AppWorkerAddDel(ctx context.Context, in *AppWorkerAddDel) (*AppWorkerAddDelReply, error) {
@@ -95,7 +96,7 @@ func (c *serviceClient) AppWorkerAddDel(ctx context.Context, in *AppWorkerAddDel
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) ApplicationAttach(ctx context.Context, in *ApplicationAttach) (*ApplicationAttachReply, error) {
@@ -104,7 +105,7 @@ func (c *serviceClient) ApplicationAttach(ctx context.Context, in *ApplicationAt
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) ApplicationDetach(ctx context.Context, in *ApplicationDetach) (*ApplicationDetachReply, error) {
@@ -113,7 +114,7 @@ func (c *serviceClient) ApplicationDetach(ctx context.Context, in *ApplicationDe
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) ApplicationTLSCertAdd(ctx context.Context, in *ApplicationTLSCertAdd) (*ApplicationTLSCertAddReply, error) {
@@ -122,7 +123,7 @@ func (c *serviceClient) ApplicationTLSCertAdd(ctx context.Context, in *Applicati
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) ApplicationTLSKeyAdd(ctx context.Context, in *ApplicationTLSKeyAdd) (*ApplicationTLSKeyAddReply, error) {
@@ -131,7 +132,7 @@ func (c *serviceClient) ApplicationTLSKeyAdd(ctx context.Context, in *Applicatio
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) BindSock(ctx context.Context, in *BindSock) (*BindSockReply, error) {
@@ -140,7 +141,7 @@ func (c *serviceClient) BindSock(ctx context.Context, in *BindSock) (*BindSockRe
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) BindURI(ctx context.Context, in *BindURI) (*BindURIReply, error) {
@@ -149,7 +150,7 @@ func (c *serviceClient) BindURI(ctx context.Context, in *BindURI) (*BindURIReply
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) ConnectSock(ctx context.Context, in *ConnectSock) (*ConnectSockReply, error) {
@@ -158,7 +159,7 @@ func (c *serviceClient) ConnectSock(ctx context.Context, in *ConnectSock) (*Conn
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) ConnectURI(ctx context.Context, in *ConnectURI) (*ConnectURIReply, error) {
@@ -167,7 +168,7 @@ func (c *serviceClient) ConnectURI(ctx context.Context, in *ConnectURI) (*Connec
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) DisconnectSession(ctx context.Context, in *DisconnectSession) (*DisconnectSessionReply, error) {
@@ -176,7 +177,7 @@ func (c *serviceClient) DisconnectSession(ctx context.Context, in *DisconnectSes
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) MapAnotherSegment(ctx context.Context, in *MapAnotherSegment) (*MapAnotherSegmentReply, error) {
@@ -185,7 +186,7 @@ func (c *serviceClient) MapAnotherSegment(ctx context.Context, in *MapAnotherSeg
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SessionEnableDisable(ctx context.Context, in *SessionEnableDisable) (*SessionEnableDisableReply, error) {
@@ -194,7 +195,7 @@ func (c *serviceClient) SessionEnableDisable(ctx context.Context, in *SessionEna
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SessionRuleAddDel(ctx context.Context, in *SessionRuleAddDel) (*SessionRuleAddDelReply, error) {
@@ -203,7 +204,7 @@ func (c *serviceClient) SessionRuleAddDel(ctx context.Context, in *SessionRuleAd
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SessionRulesDump(ctx context.Context, in *SessionRulesDump) (RPCService_SessionRulesDumpClient, error) {
@@ -239,6 +240,10 @@ func (c *serviceClient_SessionRulesDumpClient) Recv() (*SessionRulesDetails, err
case *SessionRulesDetails:
return m, nil
case *vpe.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)
@@ -251,7 +256,7 @@ func (c *serviceClient) UnbindSock(ctx context.Context, in *UnbindSock) (*Unbind
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) UnbindURI(ctx context.Context, in *UnbindURI) (*UnbindURIReply, error) {
@@ -260,7 +265,7 @@ func (c *serviceClient) UnbindURI(ctx context.Context, in *UnbindURI) (*UnbindUR
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) UnmapSegment(ctx context.Context, in *UnmapSegment) (*UnmapSegmentReply, error) {
@@ -269,5 +274,5 @@ func (c *serviceClient) UnmapSegment(ctx context.Context, in *UnmapSegment) (*Un
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/span/span.ba.go b/internal/testbinapi/binapi2001/span/span.ba.go
index 31e9044..f7ef2a3 100644
--- a/internal/testbinapi/binapi2001/span/span.ba.go
+++ b/internal/testbinapi/binapi2001/span/span.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/span.api.json
diff --git a/internal/testbinapi/binapi2001/span/span_rpc.ba.go b/internal/testbinapi/binapi2001/span/span_rpc.ba.go
index 44f5c73..bea9950 100644
--- a/internal/testbinapi/binapi2001/span/span_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/span/span_rpc.ba.go
@@ -5,12 +5,13 @@ package span
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service span.
+// RPCService defines RPC service span.
type RPCService interface {
SwInterfaceSpanDump(ctx context.Context, in *SwInterfaceSpanDump) (RPCService_SwInterfaceSpanDumpClient, error)
SwInterfaceSpanEnableDisable(ctx context.Context, in *SwInterfaceSpanEnableDisable) (*SwInterfaceSpanEnableDisableReply, error)
@@ -57,6 +58,10 @@ func (c *serviceClient_SwInterfaceSpanDumpClient) Recv() (*SwInterfaceSpanDetail
case *SwInterfaceSpanDetails:
return m, nil
case *vpe.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)
@@ -69,5 +74,5 @@ func (c *serviceClient) SwInterfaceSpanEnableDisable(ctx context.Context, in *Sw
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/sr/sr.ba.go b/internal/testbinapi/binapi2001/sr/sr.ba.go
index 1a13b5a..a8d63b9 100644
--- a/internal/testbinapi/binapi2001/sr/sr.ba.go
+++ b/internal/testbinapi/binapi2001/sr/sr.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/sr.api.json
diff --git a/internal/testbinapi/binapi2001/sr/sr_rpc.ba.go b/internal/testbinapi/binapi2001/sr/sr_rpc.ba.go
index 51adb98..843a400 100644
--- a/internal/testbinapi/binapi2001/sr/sr_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/sr/sr_rpc.ba.go
@@ -5,12 +5,13 @@ package sr
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service sr.
+// RPCService defines RPC service sr.
type RPCService interface {
SrLocalsidAddDel(ctx context.Context, in *SrLocalsidAddDel) (*SrLocalsidAddDelReply, error)
SrLocalsidsDump(ctx context.Context, in *SrLocalsidsDump) (RPCService_SrLocalsidsDumpClient, error)
@@ -38,7 +39,7 @@ func (c *serviceClient) SrLocalsidAddDel(ctx context.Context, in *SrLocalsidAddD
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SrLocalsidsDump(ctx context.Context, in *SrLocalsidsDump) (RPCService_SrLocalsidsDumpClient, error) {
@@ -74,6 +75,10 @@ func (c *serviceClient_SrLocalsidsDumpClient) Recv() (*SrLocalsidsDetails, error
case *SrLocalsidsDetails:
return m, nil
case *vpe.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)
@@ -113,6 +118,10 @@ func (c *serviceClient_SrPoliciesDumpClient) Recv() (*SrPoliciesDetails, error)
case *SrPoliciesDetails:
return m, nil
case *vpe.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)
@@ -125,7 +134,7 @@ func (c *serviceClient) SrPolicyAdd(ctx context.Context, in *SrPolicyAdd) (*SrPo
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SrPolicyDel(ctx context.Context, in *SrPolicyDel) (*SrPolicyDelReply, error) {
@@ -134,7 +143,7 @@ func (c *serviceClient) SrPolicyDel(ctx context.Context, in *SrPolicyDel) (*SrPo
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SrPolicyMod(ctx context.Context, in *SrPolicyMod) (*SrPolicyModReply, error) {
@@ -143,7 +152,7 @@ func (c *serviceClient) SrPolicyMod(ctx context.Context, in *SrPolicyMod) (*SrPo
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SrSetEncapHopLimit(ctx context.Context, in *SrSetEncapHopLimit) (*SrSetEncapHopLimitReply, error) {
@@ -152,7 +161,7 @@ func (c *serviceClient) SrSetEncapHopLimit(ctx context.Context, in *SrSetEncapHo
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SrSetEncapSource(ctx context.Context, in *SrSetEncapSource) (*SrSetEncapSourceReply, error) {
@@ -161,7 +170,7 @@ func (c *serviceClient) SrSetEncapSource(ctx context.Context, in *SrSetEncapSour
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SrSteeringAddDel(ctx context.Context, in *SrSteeringAddDel) (*SrSteeringAddDelReply, error) {
@@ -170,7 +179,7 @@ func (c *serviceClient) SrSteeringAddDel(ctx context.Context, in *SrSteeringAddD
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SrSteeringPolDump(ctx context.Context, in *SrSteeringPolDump) (RPCService_SrSteeringPolDumpClient, error) {
@@ -206,6 +215,10 @@ func (c *serviceClient_SrSteeringPolDumpClient) Recv() (*SrSteeringPolDetails, e
case *SrSteeringPolDetails:
return m, nil
case *vpe.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)
diff --git a/internal/testbinapi/binapi2001/sr_mpls/sr_mpls.ba.go b/internal/testbinapi/binapi2001/sr_mpls/sr_mpls.ba.go
index 2c8f388..f2e73a2 100644
--- a/internal/testbinapi/binapi2001/sr_mpls/sr_mpls.ba.go
+++ b/internal/testbinapi/binapi2001/sr_mpls/sr_mpls.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/sr_mpls.api.json
diff --git a/internal/testbinapi/binapi2001/sr_mpls/sr_mpls_rpc.ba.go b/internal/testbinapi/binapi2001/sr_mpls/sr_mpls_rpc.ba.go
index 8669e70..556d32e 100644
--- a/internal/testbinapi/binapi2001/sr_mpls/sr_mpls_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/sr_mpls/sr_mpls_rpc.ba.go
@@ -4,10 +4,11 @@ package sr_mpls
import (
"context"
+
api "git.fd.io/govpp.git/api"
)
-// RPCService defines RPC service sr_mpls.
+// RPCService defines RPC service sr_mpls.
type RPCService interface {
SrMplsPolicyAdd(ctx context.Context, in *SrMplsPolicyAdd) (*SrMplsPolicyAddReply, error)
SrMplsPolicyAssignEndpointColor(ctx context.Context, in *SrMplsPolicyAssignEndpointColor) (*SrMplsPolicyAssignEndpointColorReply, error)
@@ -30,7 +31,7 @@ func (c *serviceClient) SrMplsPolicyAdd(ctx context.Context, in *SrMplsPolicyAdd
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SrMplsPolicyAssignEndpointColor(ctx context.Context, in *SrMplsPolicyAssignEndpointColor) (*SrMplsPolicyAssignEndpointColorReply, error) {
@@ -39,7 +40,7 @@ func (c *serviceClient) SrMplsPolicyAssignEndpointColor(ctx context.Context, in
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SrMplsPolicyDel(ctx context.Context, in *SrMplsPolicyDel) (*SrMplsPolicyDelReply, error) {
@@ -48,7 +49,7 @@ func (c *serviceClient) SrMplsPolicyDel(ctx context.Context, in *SrMplsPolicyDel
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SrMplsPolicyMod(ctx context.Context, in *SrMplsPolicyMod) (*SrMplsPolicyModReply, error) {
@@ -57,7 +58,7 @@ func (c *serviceClient) SrMplsPolicyMod(ctx context.Context, in *SrMplsPolicyMod
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SrMplsSteeringAddDel(ctx context.Context, in *SrMplsSteeringAddDel) (*SrMplsSteeringAddDelReply, error) {
@@ -66,5 +67,5 @@ func (c *serviceClient) SrMplsSteeringAddDel(ctx context.Context, in *SrMplsStee
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/stn/stn.ba.go b/internal/testbinapi/binapi2001/stn/stn.ba.go
index 25b7dcd..8e9d7dc 100644
--- a/internal/testbinapi/binapi2001/stn/stn.ba.go
+++ b/internal/testbinapi/binapi2001/stn/stn.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/stn.api.json
@@ -17,11 +17,12 @@ package stn
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -498,12 +499,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -532,12 +536,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -566,12 +573,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -595,6 +605,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -607,8 +621,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -618,12 +633,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -666,18 +684,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -720,18 +742,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -782,6 +808,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -792,13 +819,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -816,8 +846,9 @@ type PrefixMatcher struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/stn/stn_rpc.ba.go b/internal/testbinapi/binapi2001/stn/stn_rpc.ba.go
index b638e8e..80639a7 100644
--- a/internal/testbinapi/binapi2001/stn/stn_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/stn/stn_rpc.ba.go
@@ -5,12 +5,13 @@ package stn
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service stn.
+// RPCService defines RPC service stn.
type RPCService interface {
StnAddDelRule(ctx context.Context, in *StnAddDelRule) (*StnAddDelRuleReply, error)
StnRulesDump(ctx context.Context, in *StnRulesDump) (RPCService_StnRulesDumpClient, error)
@@ -30,7 +31,7 @@ func (c *serviceClient) StnAddDelRule(ctx context.Context, in *StnAddDelRule) (*
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) StnRulesDump(ctx context.Context, in *StnRulesDump) (RPCService_StnRulesDumpClient, error) {
@@ -66,6 +67,10 @@ func (c *serviceClient_StnRulesDumpClient) Recv() (*StnRulesDetails, error) {
case *StnRulesDetails:
return m, nil
case *vpe.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)
diff --git a/internal/testbinapi/binapi2001/svs/svs.ba.go b/internal/testbinapi/binapi2001/svs/svs.ba.go
index 7c3d7c6..9e5db42 100644
--- a/internal/testbinapi/binapi2001/svs/svs.ba.go
+++ b/internal/testbinapi/binapi2001/svs/svs.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/svs.api.json
@@ -17,11 +17,12 @@ package svs
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -498,12 +499,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -532,12 +536,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -566,12 +573,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -595,6 +605,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -607,8 +621,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -618,12 +633,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -666,18 +684,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -720,18 +742,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -782,6 +808,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -792,13 +819,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -816,8 +846,9 @@ type PrefixMatcher struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/svs/svs_rpc.ba.go b/internal/testbinapi/binapi2001/svs/svs_rpc.ba.go
index 7b4b13a..c69c02b 100644
--- a/internal/testbinapi/binapi2001/svs/svs_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/svs/svs_rpc.ba.go
@@ -5,12 +5,13 @@ package svs
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service svs.
+// RPCService defines RPC service svs.
type RPCService interface {
SvsDump(ctx context.Context, in *SvsDump) (RPCService_SvsDumpClient, error)
SvsEnableDisable(ctx context.Context, in *SvsEnableDisable) (*SvsEnableDisableReply, error)
@@ -60,6 +61,10 @@ func (c *serviceClient_SvsDumpClient) Recv() (*SvsDetails, error) {
case *SvsDetails:
return m, nil
case *vpe.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)
@@ -72,7 +77,7 @@ func (c *serviceClient) SvsEnableDisable(ctx context.Context, in *SvsEnableDisab
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SvsPluginGetVersion(ctx context.Context, in *SvsPluginGetVersion) (*SvsPluginGetVersionReply, error) {
@@ -90,7 +95,7 @@ func (c *serviceClient) SvsRouteAddDel(ctx context.Context, in *SvsRouteAddDel)
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SvsTableAddDel(ctx context.Context, in *SvsTableAddDel) (*SvsTableAddDelReply, error) {
@@ -99,5 +104,5 @@ func (c *serviceClient) SvsTableAddDel(ctx context.Context, in *SvsTableAddDel)
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/syslog/syslog.ba.go b/internal/testbinapi/binapi2001/syslog/syslog.ba.go
index c9fd0f7..0136824 100644
--- a/internal/testbinapi/binapi2001/syslog/syslog.ba.go
+++ b/internal/testbinapi/binapi2001/syslog/syslog.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/syslog.api.json
@@ -17,11 +17,12 @@ package syslog
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -292,12 +293,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -323,12 +327,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -357,12 +364,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -386,6 +396,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -398,8 +412,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -409,12 +424,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -457,18 +475,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -511,18 +533,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -573,6 +599,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -583,13 +610,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -607,8 +637,9 @@ type PrefixMatcher struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/syslog/syslog_rpc.ba.go b/internal/testbinapi/binapi2001/syslog/syslog_rpc.ba.go
index a1f4a27..da005b3 100644
--- a/internal/testbinapi/binapi2001/syslog/syslog_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/syslog/syslog_rpc.ba.go
@@ -4,10 +4,11 @@ package syslog
import (
"context"
+
api "git.fd.io/govpp.git/api"
)
-// RPCService defines RPC service syslog.
+// RPCService defines RPC service syslog.
type RPCService interface {
SyslogGetFilter(ctx context.Context, in *SyslogGetFilter) (*SyslogGetFilterReply, error)
SyslogGetSender(ctx context.Context, in *SyslogGetSender) (*SyslogGetSenderReply, error)
@@ -29,7 +30,7 @@ func (c *serviceClient) SyslogGetFilter(ctx context.Context, in *SyslogGetFilter
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SyslogGetSender(ctx context.Context, in *SyslogGetSender) (*SyslogGetSenderReply, error) {
@@ -38,7 +39,7 @@ func (c *serviceClient) SyslogGetSender(ctx context.Context, in *SyslogGetSender
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SyslogSetFilter(ctx context.Context, in *SyslogSetFilter) (*SyslogSetFilterReply, error) {
@@ -47,7 +48,7 @@ func (c *serviceClient) SyslogSetFilter(ctx context.Context, in *SyslogSetFilter
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SyslogSetSender(ctx context.Context, in *SyslogSetSender) (*SyslogSetSenderReply, error) {
@@ -56,5 +57,5 @@ func (c *serviceClient) SyslogSetSender(ctx context.Context, in *SyslogSetSender
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/tapv2/tapv2.ba.go b/internal/testbinapi/binapi2001/tapv2/tapv2.ba.go
index 36898ea..d81c09f 100644
--- a/internal/testbinapi/binapi2001/tapv2/tapv2.ba.go
+++ b/internal/testbinapi/binapi2001/tapv2/tapv2.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/tapv2.api.json
@@ -17,11 +17,12 @@ package tapv2
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -544,12 +545,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -578,12 +582,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -612,12 +619,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -642,15 +652,19 @@ func ParseMacAddress(s string) (MacAddress, error) {
copy(macaddr[:], mac[:])
return macaddr, nil
}
+
func (x MacAddress) ToMAC() net.HardwareAddr {
return net.HardwareAddr(x[:])
}
+
func (x MacAddress) String() string {
return x.ToMAC().String()
}
+
func (x *MacAddress) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *MacAddress) UnmarshalText(text []byte) error {
mac, err := ParseMacAddress(string(text))
if err != nil {
@@ -671,6 +685,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -683,8 +701,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -694,12 +713,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -742,18 +764,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -796,18 +822,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -858,6 +888,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -868,13 +899,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -892,8 +926,9 @@ type PrefixMatcher struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/tapv2/tapv2_rpc.ba.go b/internal/testbinapi/binapi2001/tapv2/tapv2_rpc.ba.go
index b6c5349..785ef24 100644
--- a/internal/testbinapi/binapi2001/tapv2/tapv2_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/tapv2/tapv2_rpc.ba.go
@@ -5,12 +5,13 @@ package tapv2
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service tapv2.
+// RPCService defines RPC service tapv2.
type RPCService interface {
SwInterfaceTapV2Dump(ctx context.Context, in *SwInterfaceTapV2Dump) (RPCService_SwInterfaceTapV2DumpClient, error)
TapCreateV2(ctx context.Context, in *TapCreateV2) (*TapCreateV2Reply, error)
@@ -58,6 +59,10 @@ func (c *serviceClient_SwInterfaceTapV2DumpClient) Recv() (*SwInterfaceTapV2Deta
case *SwInterfaceTapV2Details:
return m, nil
case *vpe.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)
@@ -70,7 +75,7 @@ func (c *serviceClient) TapCreateV2(ctx context.Context, in *TapCreateV2) (*TapC
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) TapDeleteV2(ctx context.Context, in *TapDeleteV2) (*TapDeleteV2Reply, error) {
@@ -79,5 +84,5 @@ func (c *serviceClient) TapDeleteV2(ctx context.Context, in *TapDeleteV2) (*TapD
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/tcp/tcp.ba.go b/internal/testbinapi/binapi2001/tcp/tcp.ba.go
index 05fcf37..48fe539 100644
--- a/internal/testbinapi/binapi2001/tcp/tcp.ba.go
+++ b/internal/testbinapi/binapi2001/tcp/tcp.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/tcp.api.json
@@ -17,11 +17,12 @@ package tcp
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -247,12 +248,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -278,12 +282,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -312,12 +319,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -341,6 +351,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -353,8 +367,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -364,12 +379,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -412,18 +430,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -466,18 +488,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -528,6 +554,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -538,13 +565,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -562,8 +592,9 @@ type PrefixMatcher struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/tcp/tcp_rpc.ba.go b/internal/testbinapi/binapi2001/tcp/tcp_rpc.ba.go
index 8be3619..2d045f7 100644
--- a/internal/testbinapi/binapi2001/tcp/tcp_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/tcp/tcp_rpc.ba.go
@@ -4,10 +4,11 @@ package tcp
import (
"context"
+
api "git.fd.io/govpp.git/api"
)
-// RPCService defines RPC service tcp.
+// RPCService defines RPC service tcp.
type RPCService interface {
TCPConfigureSrcAddresses(ctx context.Context, in *TCPConfigureSrcAddresses) (*TCPConfigureSrcAddressesReply, error)
}
@@ -26,5 +27,5 @@ func (c *serviceClient) TCPConfigureSrcAddresses(ctx context.Context, in *TCPCon
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/tls_openssl/tls_openssl.ba.go b/internal/testbinapi/binapi2001/tls_openssl/tls_openssl.ba.go
index 96a66c0..743521c 100644
--- a/internal/testbinapi/binapi2001/tls_openssl/tls_openssl.ba.go
+++ b/internal/testbinapi/binapi2001/tls_openssl/tls_openssl.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/tls_openssl.api.json
diff --git a/internal/testbinapi/binapi2001/tls_openssl/tls_openssl_rpc.ba.go b/internal/testbinapi/binapi2001/tls_openssl/tls_openssl_rpc.ba.go
index 2575bf2..57ef26d 100644
--- a/internal/testbinapi/binapi2001/tls_openssl/tls_openssl_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/tls_openssl/tls_openssl_rpc.ba.go
@@ -4,10 +4,11 @@ package tls_openssl
import (
"context"
+
api "git.fd.io/govpp.git/api"
)
-// RPCService defines RPC service tls_openssl.
+// RPCService defines RPC service tls_openssl.
type RPCService interface {
TLSOpensslSetEngine(ctx context.Context, in *TLSOpensslSetEngine) (*TLSOpensslSetEngineReply, error)
}
@@ -26,5 +27,5 @@ func (c *serviceClient) TLSOpensslSetEngine(ctx context.Context, in *TLSOpensslS
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/trace/trace.ba.go b/internal/testbinapi/binapi2001/trace/trace.ba.go
index 210021d..1902e78 100644
--- a/internal/testbinapi/binapi2001/trace/trace.ba.go
+++ b/internal/testbinapi/binapi2001/trace/trace.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/trace.api.json
diff --git a/internal/testbinapi/binapi2001/trace/trace_rpc.ba.go b/internal/testbinapi/binapi2001/trace/trace_rpc.ba.go
index f0f2ca7..e3f1eca 100644
--- a/internal/testbinapi/binapi2001/trace/trace_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/trace/trace_rpc.ba.go
@@ -4,10 +4,11 @@ package trace
import (
"context"
+
api "git.fd.io/govpp.git/api"
)
-// RPCService defines RPC service trace.
+// RPCService defines RPC service trace.
type RPCService interface {
TraceProfileAdd(ctx context.Context, in *TraceProfileAdd) (*TraceProfileAddReply, error)
TraceProfileDel(ctx context.Context, in *TraceProfileDel) (*TraceProfileDelReply, error)
@@ -28,7 +29,7 @@ func (c *serviceClient) TraceProfileAdd(ctx context.Context, in *TraceProfileAdd
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) TraceProfileDel(ctx context.Context, in *TraceProfileDel) (*TraceProfileDelReply, error) {
@@ -37,7 +38,7 @@ func (c *serviceClient) TraceProfileDel(ctx context.Context, in *TraceProfileDel
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) TraceProfileShowConfig(ctx context.Context, in *TraceProfileShowConfig) (*TraceProfileShowConfigReply, error) {
@@ -46,5 +47,5 @@ func (c *serviceClient) TraceProfileShowConfig(ctx context.Context, in *TracePro
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/udp/udp.ba.go b/internal/testbinapi/binapi2001/udp/udp.ba.go
index 31cb6ed..6c4dabe 100644
--- a/internal/testbinapi/binapi2001/udp/udp.ba.go
+++ b/internal/testbinapi/binapi2001/udp/udp.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/udp.api.json
@@ -17,11 +17,12 @@ package udp
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -247,12 +248,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -278,12 +282,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -312,12 +319,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -341,6 +351,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -353,8 +367,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -364,12 +379,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -412,18 +430,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -466,18 +488,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -528,6 +554,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -538,13 +565,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -572,8 +602,9 @@ type UDPEncap struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/udp/udp_rpc.ba.go b/internal/testbinapi/binapi2001/udp/udp_rpc.ba.go
index 4057867..8c138fb 100644
--- a/internal/testbinapi/binapi2001/udp/udp_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/udp/udp_rpc.ba.go
@@ -5,12 +5,13 @@ package udp
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service udp.
+// RPCService defines RPC service udp.
type RPCService interface {
UDPEncapAdd(ctx context.Context, in *UDPEncapAdd) (*UDPEncapAddReply, error)
UDPEncapDel(ctx context.Context, in *UDPEncapDel) (*UDPEncapDelReply, error)
@@ -31,7 +32,7 @@ func (c *serviceClient) UDPEncapAdd(ctx context.Context, in *UDPEncapAdd) (*UDPE
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) UDPEncapDel(ctx context.Context, in *UDPEncapDel) (*UDPEncapDelReply, error) {
@@ -40,7 +41,7 @@ func (c *serviceClient) UDPEncapDel(ctx context.Context, in *UDPEncapDel) (*UDPE
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) UDPEncapDump(ctx context.Context, in *UDPEncapDump) (RPCService_UDPEncapDumpClient, error) {
@@ -76,6 +77,10 @@ func (c *serviceClient_UDPEncapDumpClient) Recv() (*UDPEncapDetails, error) {
case *UDPEncapDetails:
return m, nil
case *vpe.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)
diff --git a/internal/testbinapi/binapi2001/udp_ping/udp_ping.ba.go b/internal/testbinapi/binapi2001/udp_ping/udp_ping.ba.go
index 2b8ccad..6187a67 100644
--- a/internal/testbinapi/binapi2001/udp_ping/udp_ping.ba.go
+++ b/internal/testbinapi/binapi2001/udp_ping/udp_ping.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/udp_ping.api.json
@@ -17,11 +17,12 @@ package udp_ping
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -247,12 +248,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -278,12 +282,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -312,12 +319,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -341,6 +351,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -353,8 +367,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -364,12 +379,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -412,18 +430,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -466,18 +488,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -528,6 +554,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -538,13 +565,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -562,8 +592,9 @@ type PrefixMatcher struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/udp_ping/udp_ping_rpc.ba.go b/internal/testbinapi/binapi2001/udp_ping/udp_ping_rpc.ba.go
index eae0ab4..3b01ff7 100644
--- a/internal/testbinapi/binapi2001/udp_ping/udp_ping_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/udp_ping/udp_ping_rpc.ba.go
@@ -4,10 +4,11 @@ package udp_ping
import (
"context"
+
api "git.fd.io/govpp.git/api"
)
-// RPCService defines RPC service udp_ping.
+// RPCService defines RPC service udp_ping.
type RPCService interface {
UDPPingAddDel(ctx context.Context, in *UDPPingAddDel) (*UDPPingAddDelReply, error)
UDPPingExport(ctx context.Context, in *UDPPingExport) (*UDPPingExportReply, error)
@@ -27,7 +28,7 @@ func (c *serviceClient) UDPPingAddDel(ctx context.Context, in *UDPPingAddDel) (*
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) UDPPingExport(ctx context.Context, in *UDPPingExport) (*UDPPingExportReply, error) {
@@ -36,5 +37,5 @@ func (c *serviceClient) UDPPingExport(ctx context.Context, in *UDPPingExport) (*
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/vhost_user/vhost_user.ba.go b/internal/testbinapi/binapi2001/vhost_user/vhost_user.ba.go
index cd5a64a..a3aa648 100644
--- a/internal/testbinapi/binapi2001/vhost_user/vhost_user.ba.go
+++ b/internal/testbinapi/binapi2001/vhost_user/vhost_user.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/vhost_user.api.json
@@ -14,10 +14,11 @@
package vhost_user
import (
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -391,15 +392,19 @@ func ParseMacAddress(s string) (MacAddress, error) {
copy(macaddr[:], mac[:])
return macaddr, nil
}
+
func (x MacAddress) ToMAC() net.HardwareAddr {
return net.HardwareAddr(x[:])
}
+
func (x MacAddress) String() string {
return x.ToMAC().String()
}
+
func (x *MacAddress) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *MacAddress) UnmarshalText(text []byte) error {
mac, err := ParseMacAddress(string(text))
if err != nil {
diff --git a/internal/testbinapi/binapi2001/vhost_user/vhost_user_rpc.ba.go b/internal/testbinapi/binapi2001/vhost_user/vhost_user_rpc.ba.go
index 91132eb..dcb13ff 100644
--- a/internal/testbinapi/binapi2001/vhost_user/vhost_user_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/vhost_user/vhost_user_rpc.ba.go
@@ -5,12 +5,13 @@ package vhost_user
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service vhost_user.
+// RPCService defines RPC service vhost_user.
type RPCService interface {
CreateVhostUserIf(ctx context.Context, in *CreateVhostUserIf) (*CreateVhostUserIfReply, error)
DeleteVhostUserIf(ctx context.Context, in *DeleteVhostUserIf) (*DeleteVhostUserIfReply, error)
@@ -32,7 +33,7 @@ func (c *serviceClient) CreateVhostUserIf(ctx context.Context, in *CreateVhostUs
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) DeleteVhostUserIf(ctx context.Context, in *DeleteVhostUserIf) (*DeleteVhostUserIfReply, error) {
@@ -41,7 +42,7 @@ func (c *serviceClient) DeleteVhostUserIf(ctx context.Context, in *DeleteVhostUs
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) ModifyVhostUserIf(ctx context.Context, in *ModifyVhostUserIf) (*ModifyVhostUserIfReply, error) {
@@ -50,7 +51,7 @@ func (c *serviceClient) ModifyVhostUserIf(ctx context.Context, in *ModifyVhostUs
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) SwInterfaceVhostUserDump(ctx context.Context, in *SwInterfaceVhostUserDump) (RPCService_SwInterfaceVhostUserDumpClient, error) {
@@ -86,6 +87,10 @@ func (c *serviceClient_SwInterfaceVhostUserDumpClient) Recv() (*SwInterfaceVhost
case *SwInterfaceVhostUserDetails:
return m, nil
case *vpe.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)
diff --git a/internal/testbinapi/binapi2001/virtio/virtio.ba.go b/internal/testbinapi/binapi2001/virtio/virtio.ba.go
index e4b9c08..ad56fd4 100644
--- a/internal/testbinapi/binapi2001/virtio/virtio.ba.go
+++ b/internal/testbinapi/binapi2001/virtio/virtio.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/virtio.api.json
@@ -15,10 +15,11 @@
package virtio
import (
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -299,15 +300,19 @@ func ParseMacAddress(s string) (MacAddress, error) {
copy(macaddr[:], mac[:])
return macaddr, nil
}
+
func (x MacAddress) ToMAC() net.HardwareAddr {
return net.HardwareAddr(x[:])
}
+
func (x MacAddress) String() string {
return x.ToMAC().String()
}
+
func (x *MacAddress) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *MacAddress) UnmarshalText(text []byte) error {
mac, err := ParseMacAddress(string(text))
if err != nil {
diff --git a/internal/testbinapi/binapi2001/virtio/virtio_rpc.ba.go b/internal/testbinapi/binapi2001/virtio/virtio_rpc.ba.go
index 86f86fe..bcb5e21 100644
--- a/internal/testbinapi/binapi2001/virtio/virtio_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/virtio/virtio_rpc.ba.go
@@ -5,12 +5,13 @@ package virtio
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service virtio.
+// RPCService defines RPC service virtio.
type RPCService interface {
SwInterfaceVirtioPciDump(ctx context.Context, in *SwInterfaceVirtioPciDump) (RPCService_SwInterfaceVirtioPciDumpClient, error)
VirtioPciCreate(ctx context.Context, in *VirtioPciCreate) (*VirtioPciCreateReply, error)
@@ -58,6 +59,10 @@ func (c *serviceClient_SwInterfaceVirtioPciDumpClient) Recv() (*SwInterfaceVirti
case *SwInterfaceVirtioPciDetails:
return m, nil
case *vpe.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)
@@ -70,7 +75,7 @@ func (c *serviceClient) VirtioPciCreate(ctx context.Context, in *VirtioPciCreate
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) VirtioPciDelete(ctx context.Context, in *VirtioPciDelete) (*VirtioPciDeleteReply, error) {
@@ -79,5 +84,5 @@ func (c *serviceClient) VirtioPciDelete(ctx context.Context, in *VirtioPciDelete
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/virtio_types/virtio_types.ba.go b/internal/testbinapi/binapi2001/virtio_types/virtio_types.ba.go
index 3715966..753ee5e 100644
--- a/internal/testbinapi/binapi2001/virtio_types/virtio_types.ba.go
+++ b/internal/testbinapi/binapi2001/virtio_types/virtio_types.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/virtio_types.api.json
@@ -12,8 +12,9 @@
package virtio_types
import (
- api "git.fd.io/govpp.git/api"
"strconv"
+
+ api "git.fd.io/govpp.git/api"
)
// This is a compile-time assertion to ensure that this generated file
@@ -22,6 +23,12 @@ import (
// GoVPP api package needs to be updated.
const _ = api.GoVppAPIPackageIsVersion2
+const (
+ APIFile = "virtio_types"
+ APIVersion = "1.0.0"
+ VersionCrc = 0x7a70a44e
+)
+
// VirtioNetFeaturesFirst32 defines enum 'virtio_net_features_first_32'.
type VirtioNetFeaturesFirst32 uint32
diff --git a/internal/testbinapi/binapi2001/vmxnet3/vmxnet3.ba.go b/internal/testbinapi/binapi2001/vmxnet3/vmxnet3.ba.go
index 7986818..d048166 100644
--- a/internal/testbinapi/binapi2001/vmxnet3/vmxnet3.ba.go
+++ b/internal/testbinapi/binapi2001/vmxnet3/vmxnet3.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/vmxnet3.api.json
@@ -15,10 +15,11 @@
package vmxnet3
import (
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -299,15 +300,19 @@ func ParseMacAddress(s string) (MacAddress, error) {
copy(macaddr[:], mac[:])
return macaddr, nil
}
+
func (x MacAddress) ToMAC() net.HardwareAddr {
return net.HardwareAddr(x[:])
}
+
func (x MacAddress) String() string {
return x.ToMAC().String()
}
+
func (x *MacAddress) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *MacAddress) UnmarshalText(text []byte) error {
mac, err := ParseMacAddress(string(text))
if err != nil {
diff --git a/internal/testbinapi/binapi2001/vmxnet3/vmxnet3_rpc.ba.go b/internal/testbinapi/binapi2001/vmxnet3/vmxnet3_rpc.ba.go
index 4d072ce..7a85512 100644
--- a/internal/testbinapi/binapi2001/vmxnet3/vmxnet3_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/vmxnet3/vmxnet3_rpc.ba.go
@@ -5,12 +5,13 @@ package vmxnet3
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service vmxnet3.
+// RPCService defines RPC service vmxnet3.
type RPCService interface {
Vmxnet3Create(ctx context.Context, in *Vmxnet3Create) (*Vmxnet3CreateReply, error)
Vmxnet3Delete(ctx context.Context, in *Vmxnet3Delete) (*Vmxnet3DeleteReply, error)
@@ -31,7 +32,7 @@ func (c *serviceClient) Vmxnet3Create(ctx context.Context, in *Vmxnet3Create) (*
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) Vmxnet3Delete(ctx context.Context, in *Vmxnet3Delete) (*Vmxnet3DeleteReply, error) {
@@ -40,7 +41,7 @@ func (c *serviceClient) Vmxnet3Delete(ctx context.Context, in *Vmxnet3Delete) (*
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) Vmxnet3Dump(ctx context.Context, in *Vmxnet3Dump) (RPCService_Vmxnet3DumpClient, error) {
@@ -76,6 +77,10 @@ func (c *serviceClient_Vmxnet3DumpClient) Recv() (*Vmxnet3Details, error) {
case *Vmxnet3Details:
return m, nil
case *vpe.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)
diff --git a/internal/testbinapi/binapi2001/vpe/vpe.ba.go b/internal/testbinapi/binapi2001/vpe/vpe.ba.go
index f970104..34842fb 100644
--- a/internal/testbinapi/binapi2001/vpe/vpe.ba.go
+++ b/internal/testbinapi/binapi2001/vpe/vpe.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/vpe.api.json
@@ -15,9 +15,11 @@
package vpe
import (
+ "strconv"
+ "time"
+
api "git.fd.io/govpp.git/api"
codec "git.fd.io/govpp.git/codec"
- "strconv"
)
// This is a compile-time assertion to ensure that this generated file
@@ -86,6 +88,37 @@ type Timedelta float64
// Timestamp defines alias 'timestamp'.
type Timestamp float64
+func NewTimestamp(t time.Time) Timestamp {
+ sec := int64(t.Unix())
+ nsec := int32(t.Nanosecond())
+ ns := float64(sec) + float64(nsec/1e9)
+ return Timestamp(ns)
+}
+
+func (x Timestamp) ToTime() time.Time {
+ ns := int64(x * 1e9)
+ sec := ns / 1e9
+ nsec := ns % 1e9
+ return time.Unix(sec, nsec)
+}
+
+func (x Timestamp) String() string {
+ return x.ToTime().String()
+}
+
+func (x *Timestamp) MarshalText() ([]byte, error) {
+ return []byte(x.ToTime().Format(time.RFC3339Nano)), nil
+}
+
+func (x *Timestamp) UnmarshalText(text []byte) error {
+ t, err := time.Parse(time.RFC3339Nano, string(text))
+ if err != nil {
+ return err
+ }
+ *x = NewTimestamp(t)
+ return nil
+}
+
// ThreadData defines type 'thread_data'.
type ThreadData struct {
ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
diff --git a/internal/testbinapi/binapi2001/vpe/vpe_rpc.ba.go b/internal/testbinapi/binapi2001/vpe/vpe_rpc.ba.go
index dfa669f..557a397 100644
--- a/internal/testbinapi/binapi2001/vpe/vpe_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/vpe/vpe_rpc.ba.go
@@ -5,11 +5,12 @@ package vpe
import (
"context"
"fmt"
- api "git.fd.io/govpp.git/api"
"io"
+
+ api "git.fd.io/govpp.git/api"
)
-// RPCService defines RPC service vpe.
+// RPCService defines RPC service vpe.
type RPCService interface {
AddNodeNext(ctx context.Context, in *AddNodeNext) (*AddNodeNextReply, error)
Cli(ctx context.Context, in *Cli) (*CliReply, error)
@@ -40,7 +41,7 @@ func (c *serviceClient) AddNodeNext(ctx context.Context, in *AddNodeNext) (*AddN
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) Cli(ctx context.Context, in *Cli) (*CliReply, error) {
@@ -49,7 +50,7 @@ func (c *serviceClient) Cli(ctx context.Context, in *Cli) (*CliReply, error) {
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) CliInband(ctx context.Context, in *CliInband) (*CliInbandReply, error) {
@@ -58,7 +59,7 @@ func (c *serviceClient) CliInband(ctx context.Context, in *CliInband) (*CliInban
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) ControlPing(ctx context.Context, in *ControlPing) (*ControlPingReply, error) {
@@ -67,7 +68,7 @@ func (c *serviceClient) ControlPing(ctx context.Context, in *ControlPing) (*Cont
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) GetF64EndianValue(ctx context.Context, in *GetF64EndianValue) (*GetF64EndianValueReply, error) {
@@ -76,7 +77,7 @@ func (c *serviceClient) GetF64EndianValue(ctx context.Context, in *GetF64EndianV
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(int32(out.Retval))
}
func (c *serviceClient) GetF64IncrementByOne(ctx context.Context, in *GetF64IncrementByOne) (*GetF64IncrementByOneReply, error) {
@@ -85,7 +86,7 @@ func (c *serviceClient) GetF64IncrementByOne(ctx context.Context, in *GetF64Incr
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(int32(out.Retval))
}
func (c *serviceClient) GetNextIndex(ctx context.Context, in *GetNextIndex) (*GetNextIndexReply, error) {
@@ -94,7 +95,7 @@ func (c *serviceClient) GetNextIndex(ctx context.Context, in *GetNextIndex) (*Ge
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) GetNodeGraph(ctx context.Context, in *GetNodeGraph) (*GetNodeGraphReply, error) {
@@ -103,7 +104,7 @@ func (c *serviceClient) GetNodeGraph(ctx context.Context, in *GetNodeGraph) (*Ge
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) GetNodeIndex(ctx context.Context, in *GetNodeIndex) (*GetNodeIndexReply, error) {
@@ -112,7 +113,7 @@ func (c *serviceClient) GetNodeIndex(ctx context.Context, in *GetNodeIndex) (*Ge
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) LogDump(ctx context.Context, in *LogDump) (RPCService_LogDumpClient, error) {
@@ -148,6 +149,10 @@ func (c *serviceClient_LogDumpClient) Recv() (*LogDetails, error) {
case *LogDetails:
return m, nil
case *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)
@@ -160,7 +165,7 @@ func (c *serviceClient) ShowThreads(ctx context.Context, in *ShowThreads) (*Show
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) ShowVersion(ctx context.Context, in *ShowVersion) (*ShowVersionReply, error) {
@@ -169,7 +174,7 @@ func (c *serviceClient) ShowVersion(ctx context.Context, in *ShowVersion) (*Show
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) ShowVpeSystemTime(ctx context.Context, in *ShowVpeSystemTime) (*ShowVpeSystemTimeReply, error) {
@@ -178,5 +183,5 @@ func (c *serviceClient) ShowVpeSystemTime(ctx context.Context, in *ShowVpeSystem
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
diff --git a/internal/testbinapi/binapi2001/vpe_types/vpe_types.ba.go b/internal/testbinapi/binapi2001/vpe_types/vpe_types.ba.go
index 280005e..140995d 100644
--- a/internal/testbinapi/binapi2001/vpe_types/vpe_types.ba.go
+++ b/internal/testbinapi/binapi2001/vpe_types/vpe_types.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/vpe_types.api.json
@@ -14,8 +14,10 @@
package vpe_types
import (
- api "git.fd.io/govpp.git/api"
"strconv"
+ "time"
+
+ api "git.fd.io/govpp.git/api"
)
// This is a compile-time assertion to ensure that this generated file
@@ -24,6 +26,12 @@ import (
// GoVPP api package needs to be updated.
const _ = api.GoVppAPIPackageIsVersion2
+const (
+ APIFile = "vpe_types"
+ APIVersion = ""
+ VersionCrc = 0x3369988d
+)
+
// LogLevel defines enum 'log_level'.
type LogLevel uint32
@@ -78,6 +86,37 @@ type Timedelta float64
// Timestamp defines alias 'timestamp'.
type Timestamp float64
+func NewTimestamp(t time.Time) Timestamp {
+ sec := int64(t.Unix())
+ nsec := int32(t.Nanosecond())
+ ns := float64(sec) + float64(nsec/1e9)
+ return Timestamp(ns)
+}
+
+func (x Timestamp) ToTime() time.Time {
+ ns := int64(x * 1e9)
+ sec := ns / 1e9
+ nsec := ns % 1e9
+ return time.Unix(sec, nsec)
+}
+
+func (x Timestamp) String() string {
+ return x.ToTime().String()
+}
+
+func (x *Timestamp) MarshalText() ([]byte, error) {
+ return []byte(x.ToTime().Format(time.RFC3339Nano)), nil
+}
+
+func (x *Timestamp) UnmarshalText(text []byte) error {
+ t, err := time.Parse(time.RFC3339Nano, string(text))
+ if err != nil {
+ return err
+ }
+ *x = NewTimestamp(t)
+ return nil
+}
+
// Version defines type 'version'.
type Version struct {
Major uint32 `binapi:"u32,name=major" json:"major,omitempty"`
diff --git a/internal/testbinapi/binapi2001/vxlan/vxlan.ba.go b/internal/testbinapi/binapi2001/vxlan/vxlan.ba.go
index 04a9541..b3582c9 100644
--- a/internal/testbinapi/binapi2001/vxlan/vxlan.ba.go
+++ b/internal/testbinapi/binapi2001/vxlan/vxlan.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/vxlan.api.json
diff --git a/internal/testbinapi/binapi2001/vxlan/vxlan_rpc.ba.go b/internal/testbinapi/binapi2001/vxlan/vxlan_rpc.ba.go
index 0d56593..a80b8b6 100644
--- a/internal/testbinapi/binapi2001/vxlan/vxlan_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/vxlan/vxlan_rpc.ba.go
@@ -5,12 +5,13 @@ package vxlan
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service vxlan.
+// RPCService defines RPC service vxlan.
type RPCService interface {
SwInterfaceSetVxlanBypass(ctx context.Context, in *SwInterfaceSetVxlanBypass) (*SwInterfaceSetVxlanBypassReply, error)
VxlanAddDelTunnel(ctx context.Context, in *VxlanAddDelTunnel) (*VxlanAddDelTunnelReply, error)
@@ -32,7 +33,7 @@ func (c *serviceClient) SwInterfaceSetVxlanBypass(ctx context.Context, in *SwInt
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) VxlanAddDelTunnel(ctx context.Context, in *VxlanAddDelTunnel) (*VxlanAddDelTunnelReply, error) {
@@ -41,7 +42,7 @@ func (c *serviceClient) VxlanAddDelTunnel(ctx context.Context, in *VxlanAddDelTu
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) VxlanOffloadRx(ctx context.Context, in *VxlanOffloadRx) (*VxlanOffloadRxReply, error) {
@@ -50,7 +51,7 @@ func (c *serviceClient) VxlanOffloadRx(ctx context.Context, in *VxlanOffloadRx)
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) VxlanTunnelDump(ctx context.Context, in *VxlanTunnelDump) (RPCService_VxlanTunnelDumpClient, error) {
@@ -86,6 +87,10 @@ func (c *serviceClient_VxlanTunnelDumpClient) Recv() (*VxlanTunnelDetails, error
case *VxlanTunnelDetails:
return m, nil
case *vpe.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)
diff --git a/internal/testbinapi/binapi2001/vxlan_gbp/vxlan_gbp.ba.go b/internal/testbinapi/binapi2001/vxlan_gbp/vxlan_gbp.ba.go
index 85fc2c8..a28a882 100644
--- a/internal/testbinapi/binapi2001/vxlan_gbp/vxlan_gbp.ba.go
+++ b/internal/testbinapi/binapi2001/vxlan_gbp/vxlan_gbp.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/vxlan_gbp.api.json
@@ -17,11 +17,12 @@ package vxlan_gbp
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -525,12 +526,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -559,12 +563,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -593,12 +600,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -622,6 +632,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -634,8 +648,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -645,12 +660,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -693,18 +711,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -747,18 +769,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -809,6 +835,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -819,13 +846,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -855,8 +885,9 @@ type VxlanGbpTunnel struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/vxlan_gbp/vxlan_gbp_rpc.ba.go b/internal/testbinapi/binapi2001/vxlan_gbp/vxlan_gbp_rpc.ba.go
index e2ec338..c975099 100644
--- a/internal/testbinapi/binapi2001/vxlan_gbp/vxlan_gbp_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/vxlan_gbp/vxlan_gbp_rpc.ba.go
@@ -5,12 +5,13 @@ package vxlan_gbp
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service vxlan_gbp.
+// RPCService defines RPC service vxlan_gbp.
type RPCService interface {
SwInterfaceSetVxlanGbpBypass(ctx context.Context, in *SwInterfaceSetVxlanGbpBypass) (*SwInterfaceSetVxlanGbpBypassReply, error)
VxlanGbpTunnelAddDel(ctx context.Context, in *VxlanGbpTunnelAddDel) (*VxlanGbpTunnelAddDelReply, error)
@@ -31,7 +32,7 @@ func (c *serviceClient) SwInterfaceSetVxlanGbpBypass(ctx context.Context, in *Sw
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) VxlanGbpTunnelAddDel(ctx context.Context, in *VxlanGbpTunnelAddDel) (*VxlanGbpTunnelAddDelReply, error) {
@@ -40,7 +41,7 @@ func (c *serviceClient) VxlanGbpTunnelAddDel(ctx context.Context, in *VxlanGbpTu
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) VxlanGbpTunnelDump(ctx context.Context, in *VxlanGbpTunnelDump) (RPCService_VxlanGbpTunnelDumpClient, error) {
@@ -76,6 +77,10 @@ func (c *serviceClient_VxlanGbpTunnelDumpClient) Recv() (*VxlanGbpTunnelDetails,
case *VxlanGbpTunnelDetails:
return m, nil
case *vpe.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)
diff --git a/internal/testbinapi/binapi2001/vxlan_gpe/vxlan_gpe.ba.go b/internal/testbinapi/binapi2001/vxlan_gpe/vxlan_gpe.ba.go
index 105fa77..f9c4d11 100644
--- a/internal/testbinapi/binapi2001/vxlan_gpe/vxlan_gpe.ba.go
+++ b/internal/testbinapi/binapi2001/vxlan_gpe/vxlan_gpe.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/core/vxlan_gpe.api.json
diff --git a/internal/testbinapi/binapi2001/vxlan_gpe/vxlan_gpe_rpc.ba.go b/internal/testbinapi/binapi2001/vxlan_gpe/vxlan_gpe_rpc.ba.go
index 3cb05d5..8c3f496 100644
--- a/internal/testbinapi/binapi2001/vxlan_gpe/vxlan_gpe_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/vxlan_gpe/vxlan_gpe_rpc.ba.go
@@ -5,12 +5,13 @@ package vxlan_gpe
import (
"context"
"fmt"
+ "io"
+
api "git.fd.io/govpp.git/api"
vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
- "io"
)
-// RPCService defines RPC service vxlan_gpe.
+// RPCService defines RPC service vxlan_gpe.
type RPCService interface {
SwInterfaceSetVxlanGpeBypass(ctx context.Context, in *SwInterfaceSetVxlanGpeBypass) (*SwInterfaceSetVxlanGpeBypassReply, error)
VxlanGpeAddDelTunnel(ctx context.Context, in *VxlanGpeAddDelTunnel) (*VxlanGpeAddDelTunnelReply, error)
@@ -31,7 +32,7 @@ func (c *serviceClient) SwInterfaceSetVxlanGpeBypass(ctx context.Context, in *Sw
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) VxlanGpeAddDelTunnel(ctx context.Context, in *VxlanGpeAddDelTunnel) (*VxlanGpeAddDelTunnelReply, error) {
@@ -40,7 +41,7 @@ func (c *serviceClient) VxlanGpeAddDelTunnel(ctx context.Context, in *VxlanGpeAd
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}
func (c *serviceClient) VxlanGpeTunnelDump(ctx context.Context, in *VxlanGpeTunnelDump) (RPCService_VxlanGpeTunnelDumpClient, error) {
@@ -76,6 +77,10 @@ func (c *serviceClient_VxlanGpeTunnelDumpClient) Recv() (*VxlanGpeTunnelDetails,
case *VxlanGpeTunnelDetails:
return m, nil
case *vpe.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)
diff --git a/internal/testbinapi/binapi2001/vxlan_gpe_ioam_export/vxlan_gpe_ioam_export.ba.go b/internal/testbinapi/binapi2001/vxlan_gpe_ioam_export/vxlan_gpe_ioam_export.ba.go
index a70fdd1..e9c81c1 100644
--- a/internal/testbinapi/binapi2001/vxlan_gpe_ioam_export/vxlan_gpe_ioam_export.ba.go
+++ b/internal/testbinapi/binapi2001/vxlan_gpe_ioam_export/vxlan_gpe_ioam_export.ba.go
@@ -1,6 +1,6 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
-// binapi-generator: v0.4.0-dev
+// binapi-generator: v0.5.0-dev
// VPP: 20.01
// source: .vppapi/plugins/vxlan_gpe_ioam_export.api.json
@@ -17,11 +17,12 @@ package vxlan_gpe_ioam_export
import (
"fmt"
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
"net"
"strconv"
"strings"
+
+ api "git.fd.io/govpp.git/api"
+ codec "git.fd.io/govpp.git/codec"
)
// This is a compile-time assertion to ensure that this generated file
@@ -247,12 +248,15 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
}
return AddressWithPrefix(prefix), nil
}
+
func (x AddressWithPrefix) String() string {
return Prefix(x).String()
}
+
func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
prefix, err := ParseAddressWithPrefix(string(text))
if err != nil {
@@ -278,12 +282,15 @@ func ParseIP4Address(s string) (IP4Address, error) {
func (x IP4Address) ToIP() net.IP {
return net.IP(x[:]).To4()
}
+
func (x IP4Address) String() string {
return x.ToIP().String()
}
+
func (x *IP4Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP4Address(string(text))
if err != nil {
@@ -312,12 +319,15 @@ func ParseIP6Address(s string) (IP6Address, error) {
func (x IP6Address) ToIP() net.IP {
return net.IP(x[:]).To16()
}
+
func (x IP6Address) String() string {
return x.ToIP().String()
}
+
func (x *IP6Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Address) UnmarshalText(text []byte) error {
ipaddr, err := ParseIP6Address(string(text))
if err != nil {
@@ -341,6 +351,10 @@ func ParseAddress(s string) (Address, error) {
if ip == nil {
return Address{}, fmt.Errorf("invalid address: %s", s)
}
+ return AddressFromIP(ip), nil
+}
+
+func AddressFromIP(ip net.IP) Address {
var addr Address
if ip.To4() == nil {
addr.Af = ADDRESS_IP6
@@ -353,8 +367,9 @@ func ParseAddress(s string) (Address, error) {
copy(ip4[:], ip.To4())
addr.Un.SetIP4(ip4)
}
- return addr, nil
+ return addr
}
+
func (x Address) ToIP() net.IP {
if x.Af == ADDRESS_IP6 {
ip6 := x.Un.GetIP6()
@@ -364,12 +379,15 @@ func (x Address) ToIP() net.IP {
return net.IP(ip4[:]).To4()
}
}
+
func (x Address) String() string {
return x.ToIP().String()
}
+
func (x *Address) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Address) UnmarshalText(text []byte) error {
addr, err := ParseAddress(string(text))
if err != nil {
@@ -412,18 +430,22 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
}
return prefix, nil
}
+
func (x IP4Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 32)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP4Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP4Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP4Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP4Prefix(string(text))
if err != nil {
@@ -466,18 +488,22 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
}
return prefix, nil
}
+
func (x IP6Prefix) ToIPNet() *net.IPNet {
mask := net.CIDRMask(int(x.Len), 128)
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x IP6Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *IP6Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *IP6Prefix) UnmarshalText(text []byte) error {
prefix, err := ParseIP6Prefix(string(text))
if err != nil {
@@ -528,6 +554,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) {
}
return prefix, nil
}
+
func (x Prefix) ToIPNet() *net.IPNet {
var mask net.IPMask
if x.Address.Af == ADDRESS_IP4 {
@@ -538,13 +565,16 @@ func (x Prefix) ToIPNet() *net.IPNet {
ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
return ipnet
}
+
func (x Prefix) String() string {
ip := x.Address.String()
return ip + "/" + strconv.Itoa(int(x.Len))
}
+
func (x *Prefix) MarshalText() ([]byte, error) {
return []byte(x.String()), nil
}
+
func (x *Prefix) UnmarshalText(text []byte) error {
prefix, err := ParsePrefix(string(text))
if err != nil {
@@ -562,8 +592,9 @@ type PrefixMatcher struct {
// AddressUnion defines union 'address_union'.
type AddressUnion struct {
- // IP4 *IP4Address
- // IP6 *IP6Address
+ // AddressUnion can be one of:
+ // - IP4 *IP4Address
+ // - IP6 *IP6Address
XXX_UnionData [16]byte
}
diff --git a/internal/testbinapi/binapi2001/vxlan_gpe_ioam_export/vxlan_gpe_ioam_export_rpc.ba.go b/internal/testbinapi/binapi2001/vxlan_gpe_ioam_export/vxlan_gpe_ioam_export_rpc.ba.go
index ce35b62..f688803 100644
--- a/internal/testbinapi/binapi2001/vxlan_gpe_ioam_export/vxlan_gpe_ioam_export_rpc.ba.go
+++ b/internal/testbinapi/binapi2001/vxlan_gpe_ioam_export/vxlan_gpe_ioam_export_rpc.ba.go
@@ -4,10 +4,11 @@ package vxlan_gpe_ioam_export
import (
"context"
+
api "git.fd.io/govpp.git/api"
)
-// RPCService defines RPC service vxlan_gpe_ioam_export.
+// RPCService defines RPC service vxlan_gpe_ioam_export.
type RPCService interface {
VxlanGpeIoamExportEnableDisable(ctx context.Context, in *VxlanGpeIoamExportEnableDisable) (*VxlanGpeIoamExportEnableDisableReply, error)
}
@@ -26,5 +27,5 @@ func (c *serviceClient) VxlanGpeIoamExportEnableDisable(ctx context.Context, in
if err != nil {
return nil, err
}
- return out, nil
+ return out, api.RetvalToVPPApiError(out.Retval)
}