aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVladimir Lavor <vlavor@cisco.com>2020-09-16 13:44:31 +0200
committerVladimir Lavor <vlavor@cisco.com>2020-09-18 10:41:12 +0200
commit43cd23926d5eec359d4b554a4330e1aa596c76de (patch)
tree344b7d9a19e2ec84b6f7aaa7c7667a8b94d06ab4
parente517439567ad843033257664fdfe90a9173b0aa6 (diff)
binapigen: fix union size
This change fixes calculated byte size of the union composed from another union(s). Change-Id: I596a3c2a585cc42570b1d00dab3a5ad4993dabfa Signed-off-by: Vladimir Lavor <vlavor@cisco.com>
-rw-r--r--binapi/abf/abf.ba.go1
-rw-r--r--binapi/acl/acl.ba.go1
-rw-r--r--binapi/acl_types/acl_types.ba.go1
-rw-r--r--binapi/af_packet/af_packet.ba.go1
-rw-r--r--binapi/arp/arp.ba.go1
-rw-r--r--binapi/avf/avf.ba.go1
-rw-r--r--binapi/bfd/bfd.ba.go1
-rw-r--r--binapi/bier/bier.ba.go1
-rw-r--r--binapi/bond/bond.ba.go1
-rw-r--r--binapi/builtinurl/builtinurl.ba.go1
-rw-r--r--binapi/cdp/cdp.ba.go1
-rw-r--r--binapi/classify/classify.ba.go1
-rw-r--r--binapi/cop/cop.ba.go1
-rw-r--r--binapi/ct6/ct6.ba.go1
-rw-r--r--binapi/dhcp/dhcp.ba.go1
-rw-r--r--binapi/dhcp6_ia_na_client_cp/dhcp6_ia_na_client_cp.ba.go1
-rw-r--r--binapi/dhcp6_pd_client_cp/dhcp6_pd_client_cp.ba.go1
-rw-r--r--binapi/dns/dns.ba.go1
-rw-r--r--binapi/dslite/dslite.ba.go1
-rw-r--r--binapi/ethernet_types/ethernet_types.ba.go1
-rw-r--r--binapi/feature/feature.ba.go1
-rw-r--r--binapi/fib_types/fib_types.ba.go1
-rw-r--r--binapi/flowprobe/flowprobe.ba.go1
-rw-r--r--binapi/gbp/gbp.ba.go1
-rw-r--r--binapi/geneve/geneve.ba.go1
-rw-r--r--binapi/gre/gre.ba.go1
-rw-r--r--binapi/gso/gso.ba.go1
-rw-r--r--binapi/gtpu/gtpu.ba.go1
-rw-r--r--binapi/http_static/http_static.ba.go1
-rw-r--r--binapi/igmp/igmp.ba.go1
-rw-r--r--binapi/ikev2/ikev2.ba.go1
-rw-r--r--binapi/interface/interface.ba.go1
-rw-r--r--binapi/interface_types/interface_types.ba.go1
-rw-r--r--binapi/ioam_cache/ioam_cache.ba.go1
-rw-r--r--binapi/ioam_export/ioam_export.ba.go1
-rw-r--r--binapi/ioam_vxlan_gpe/ioam_vxlan_gpe.ba.go1
-rw-r--r--binapi/ip/ip.ba.go1
-rw-r--r--binapi/ip6_nd/ip6_nd.ba.go1
-rw-r--r--binapi/ip_neighbor/ip_neighbor.ba.go1
-rw-r--r--binapi/ip_types/ip_types.ba.go6
-rw-r--r--binapi/ipfix_export/ipfix_export.ba.go1
-rw-r--r--binapi/ipip/ipip.ba.go1
-rw-r--r--binapi/ipsec/ipsec.ba.go1
-rw-r--r--binapi/ipsec_types/ipsec_types.ba.go1
-rw-r--r--binapi/l2/l2.ba.go1
-rw-r--r--binapi/l2e/l2e.ba.go1
-rw-r--r--binapi/l2tp/l2tp.ba.go1
-rw-r--r--binapi/l3xc/l3xc.ba.go1
-rw-r--r--binapi/lacp/lacp.ba.go1
-rw-r--r--binapi/lb/lb.ba.go1
-rw-r--r--binapi/lb_types/lb_types.ba.go1
-rw-r--r--binapi/lisp/lisp.ba.go99
-rw-r--r--binapi/lisp_gpe/lisp_gpe.ba.go51
-rw-r--r--binapi/lisp_types/lisp_types.ba.go36
-rw-r--r--binapi/lldp/lldp.ba.go1
-rw-r--r--binapi/mactime/mactime.ba.go1
-rw-r--r--binapi/map/map.ba.go1
-rw-r--r--binapi/mdata/mdata.ba.go1
-rw-r--r--binapi/memclnt/memclnt.ba.go1
-rw-r--r--binapi/memif/memif.ba.go1
-rw-r--r--binapi/mfib_types/mfib_types.ba.go1
-rw-r--r--binapi/mpls/mpls.ba.go1
-rw-r--r--binapi/nat/nat.ba.go1
-rw-r--r--binapi/nsh/nsh.ba.go1
-rw-r--r--binapi/nsim/nsim.ba.go1
-rw-r--r--binapi/oddbuf/oddbuf.ba.go1
-rw-r--r--binapi/one/one.ba.go109
-rw-r--r--binapi/p2p_ethernet/p2p_ethernet.ba.go1
-rw-r--r--binapi/pci_types/pci_types.ba.go1
-rw-r--r--binapi/pg/pg.ba.go1
-rw-r--r--binapi/pipe/pipe.ba.go1
-rw-r--r--binapi/policer/policer.ba.go1
-rw-r--r--binapi/policer_types/policer_types.ba.go1
-rw-r--r--binapi/pot/pot.ba.go1
-rw-r--r--binapi/pp2/pp2.ba.go191
-rw-r--r--binapi/pp2/pp2_rest.ba.go60
-rw-r--r--binapi/pp2/pp2_rpc.ba.go41
-rw-r--r--binapi/pppoe/pppoe.ba.go1
-rw-r--r--binapi/punt/punt.ba.go8
-rw-r--r--binapi/qos/qos.ba.go1
-rw-r--r--binapi/rd_cp/rd_cp.ba.go1
-rw-r--r--binapi/rdma/rdma.ba.go1
-rw-r--r--binapi/session/session.ba.go1
-rw-r--r--binapi/span/span.ba.go1
-rw-r--r--binapi/sr/sr.ba.go1
-rw-r--r--binapi/sr_mpls/sr_mpls.ba.go1
-rw-r--r--binapi/sr_types/sr_types.ba.go1
-rw-r--r--binapi/stn/stn.ba.go1
-rw-r--r--binapi/svs/svs.ba.go1
-rw-r--r--binapi/syslog/syslog.ba.go1
-rw-r--r--binapi/tapv2/tapv2.ba.go1
-rw-r--r--binapi/tcp/tcp.ba.go1
-rw-r--r--binapi/teib/teib.ba.go1
-rw-r--r--binapi/tls_openssl/tls_openssl.ba.go1
-rw-r--r--binapi/trace/trace.ba.go1
-rw-r--r--binapi/tunnel_types/tunnel_types.ba.go1
-rw-r--r--binapi/udp/udp.ba.go1
-rw-r--r--binapi/udp_ping/udp_ping.ba.go1
-rw-r--r--binapi/urpf/urpf.ba.go1
-rw-r--r--binapi/vhost_user/vhost_user.ba.go1
-rw-r--r--binapi/virtio/virtio.ba.go1
-rw-r--r--binapi/virtio_types/virtio_types.ba.go1
-rw-r--r--binapi/vmxnet3/vmxnet3.ba.go1
-rw-r--r--binapi/vpe/vpe.ba.go1
-rw-r--r--binapi/vpe_types/vpe_types.ba.go1
-rw-r--r--binapi/vrrp/vrrp.ba.go1
-rw-r--r--binapi/vxlan/vxlan.ba.go1
-rw-r--r--binapi/vxlan_gbp/vxlan_gbp.ba.go1
-rw-r--r--binapi/vxlan_gpe/vxlan_gpe.ba.go1
-rw-r--r--binapi/vxlan_gpe_ioam_export/vxlan_gpe_ioam_export.ba.go1
-rw-r--r--binapigen/generator_test.go106
-rw-r--r--binapigen/types.go64
112 files changed, 404 insertions, 468 deletions
diff --git a/binapi/abf/abf.ba.go b/binapi/abf/abf.ba.go
index 296b4c5..2b28afe 100644
--- a/binapi/abf/abf.ba.go
+++ b/binapi/abf/abf.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/plugins/abf.api.json
// Package abf contains generated bindings for API file abf.api.
//
diff --git a/binapi/acl/acl.ba.go b/binapi/acl/acl.ba.go
index 6c507e6..1f47a01 100644
--- a/binapi/acl/acl.ba.go
+++ b/binapi/acl/acl.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/plugins/acl.api.json
// Package acl contains generated bindings for API file acl.api.
//
diff --git a/binapi/acl_types/acl_types.ba.go b/binapi/acl_types/acl_types.ba.go
index 753701a..0c8efc2 100644
--- a/binapi/acl_types/acl_types.ba.go
+++ b/binapi/acl_types/acl_types.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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/af_packet/af_packet.ba.go b/binapi/af_packet/af_packet.ba.go
index 9367352..750e2ce 100644
--- a/binapi/af_packet/af_packet.ba.go
+++ b/binapi/af_packet/af_packet.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/core/af_packet.api.json
// Package af_packet contains generated bindings for API file af_packet.api.
//
diff --git a/binapi/arp/arp.ba.go b/binapi/arp/arp.ba.go
index c9806df..90ff55b 100644
--- a/binapi/arp/arp.ba.go
+++ b/binapi/arp/arp.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/core/arp.api.json
// Package arp contains generated bindings for API file arp.api.
//
diff --git a/binapi/avf/avf.ba.go b/binapi/avf/avf.ba.go
index 6f93d23..edfa26e 100644
--- a/binapi/avf/avf.ba.go
+++ b/binapi/avf/avf.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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 e5ba5ce..65b828f 100644
--- a/binapi/bfd/bfd.ba.go
+++ b/binapi/bfd/bfd.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/core/bfd.api.json
// Package bfd contains generated bindings for API file bfd.api.
//
diff --git a/binapi/bier/bier.ba.go b/binapi/bier/bier.ba.go
index 089a970..f024d80 100644
--- a/binapi/bier/bier.ba.go
+++ b/binapi/bier/bier.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/core/bier.api.json
// Package bier contains generated bindings for API file bier.api.
//
diff --git a/binapi/bond/bond.ba.go b/binapi/bond/bond.ba.go
index 1896119..c9e7027 100644
--- a/binapi/bond/bond.ba.go
+++ b/binapi/bond/bond.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/core/bond.api.json
// Package bond contains generated bindings for API file bond.api.
//
diff --git a/binapi/builtinurl/builtinurl.ba.go b/binapi/builtinurl/builtinurl.ba.go
index 0ea651b..6b0350d 100644
--- a/binapi/builtinurl/builtinurl.ba.go
+++ b/binapi/builtinurl/builtinurl.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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 9dd71c9..5430d74 100644
--- a/binapi/cdp/cdp.ba.go
+++ b/binapi/cdp/cdp.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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 373e256..16bc4b8 100644
--- a/binapi/classify/classify.ba.go
+++ b/binapi/classify/classify.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/core/classify.api.json
// Package classify contains generated bindings for API file classify.api.
//
diff --git a/binapi/cop/cop.ba.go b/binapi/cop/cop.ba.go
index 675b32c..14f0b11 100644
--- a/binapi/cop/cop.ba.go
+++ b/binapi/cop/cop.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/core/cop.api.json
// Package cop contains generated bindings for API file cop.api.
//
diff --git a/binapi/ct6/ct6.ba.go b/binapi/ct6/ct6.ba.go
index cf34219..5dc6097 100644
--- a/binapi/ct6/ct6.ba.go
+++ b/binapi/ct6/ct6.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/plugins/ct6.api.json
// Package ct6 contains generated bindings for API file ct6.api.
//
diff --git a/binapi/dhcp/dhcp.ba.go b/binapi/dhcp/dhcp.ba.go
index b0ed4cb..4adc88b 100644
--- a/binapi/dhcp/dhcp.ba.go
+++ b/binapi/dhcp/dhcp.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/plugins/dhcp.api.json
// Package dhcp contains generated bindings for API file dhcp.api.
//
diff --git a/binapi/dhcp6_ia_na_client_cp/dhcp6_ia_na_client_cp.ba.go b/binapi/dhcp6_ia_na_client_cp/dhcp6_ia_na_client_cp.ba.go
index cd258b1..4fcb012 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
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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 ab06190..7e4e2bb 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
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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 a30c0b4..fc2324c 100644
--- a/binapi/dns/dns.ba.go
+++ b/binapi/dns/dns.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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 d94de18..efcf240 100644
--- a/binapi/dslite/dslite.ba.go
+++ b/binapi/dslite/dslite.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/plugins/dslite.api.json
// Package dslite contains generated bindings for API file dslite.api.
//
diff --git a/binapi/ethernet_types/ethernet_types.ba.go b/binapi/ethernet_types/ethernet_types.ba.go
index 98bbead..63b1034 100644
--- a/binapi/ethernet_types/ethernet_types.ba.go
+++ b/binapi/ethernet_types/ethernet_types.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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 ec87906..cc54364 100644
--- a/binapi/feature/feature.ba.go
+++ b/binapi/feature/feature.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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_types/fib_types.ba.go b/binapi/fib_types/fib_types.ba.go
index 75e87e9..3194edf 100644
--- a/binapi/fib_types/fib_types.ba.go
+++ b/binapi/fib_types/fib_types.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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/flowprobe/flowprobe.ba.go b/binapi/flowprobe/flowprobe.ba.go
index 92e155b..b158c6d 100644
--- a/binapi/flowprobe/flowprobe.ba.go
+++ b/binapi/flowprobe/flowprobe.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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
index 1ede1ac..066371a 100644
--- a/binapi/gbp/gbp.ba.go
+++ b/binapi/gbp/gbp.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/plugins/gbp.api.json
// Package gbp contains generated bindings for API file gbp.api.
//
diff --git a/binapi/geneve/geneve.ba.go b/binapi/geneve/geneve.ba.go
index e314f0a..fcd512d 100644
--- a/binapi/geneve/geneve.ba.go
+++ b/binapi/geneve/geneve.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/core/geneve.api.json
// Package geneve contains generated bindings for API file geneve.api.
//
diff --git a/binapi/gre/gre.ba.go b/binapi/gre/gre.ba.go
index 1a123bd..9fa68cb 100644
--- a/binapi/gre/gre.ba.go
+++ b/binapi/gre/gre.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/core/gre.api.json
// Package gre contains generated bindings for API file gre.api.
//
diff --git a/binapi/gso/gso.ba.go b/binapi/gso/gso.ba.go
index e492e5d..78e7536 100644
--- a/binapi/gso/gso.ba.go
+++ b/binapi/gso/gso.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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 de7d29f..96ae51f 100644
--- a/binapi/gtpu/gtpu.ba.go
+++ b/binapi/gtpu/gtpu.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/plugins/gtpu.api.json
// Package gtpu contains generated bindings for API file gtpu.api.
//
diff --git a/binapi/http_static/http_static.ba.go b/binapi/http_static/http_static.ba.go
index 5f6397b..2116a8b 100644
--- a/binapi/http_static/http_static.ba.go
+++ b/binapi/http_static/http_static.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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 558d533..a43b599 100644
--- a/binapi/igmp/igmp.ba.go
+++ b/binapi/igmp/igmp.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/plugins/igmp.api.json
// Package igmp contains generated bindings for API file igmp.api.
//
diff --git a/binapi/ikev2/ikev2.ba.go b/binapi/ikev2/ikev2.ba.go
index f76c6c3..5fc68c3 100644
--- a/binapi/ikev2/ikev2.ba.go
+++ b/binapi/ikev2/ikev2.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/plugins/ikev2.api.json
// Package ikev2 contains generated bindings for API file ikev2.api.
//
diff --git a/binapi/interface/interface.ba.go b/binapi/interface/interface.ba.go
index cadb109..822c325 100644
--- a/binapi/interface/interface.ba.go
+++ b/binapi/interface/interface.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/core/interface.api.json
// Package interfaces contains generated bindings for API file interface.api.
//
diff --git a/binapi/interface_types/interface_types.ba.go b/binapi/interface_types/interface_types.ba.go
index 191647a..f7f8c2e 100644
--- a/binapi/interface_types/interface_types.ba.go
+++ b/binapi/interface_types/interface_types.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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 19e8104..2f9f0ef 100644
--- a/binapi/ioam_cache/ioam_cache.ba.go
+++ b/binapi/ioam_cache/ioam_cache.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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 b5176c7..47dd4e2 100644
--- a/binapi/ioam_export/ioam_export.ba.go
+++ b/binapi/ioam_export/ioam_export.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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 2d582cd..7d1bb35 100644
--- a/binapi/ioam_vxlan_gpe/ioam_vxlan_gpe.ba.go
+++ b/binapi/ioam_vxlan_gpe/ioam_vxlan_gpe.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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 628f1e0..b036e9c 100644
--- a/binapi/ip/ip.ba.go
+++ b/binapi/ip/ip.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/core/ip.api.json
// Package ip contains generated bindings for API file ip.api.
//
diff --git a/binapi/ip6_nd/ip6_nd.ba.go b/binapi/ip6_nd/ip6_nd.ba.go
index 48bb86f..a5f308e 100644
--- a/binapi/ip6_nd/ip6_nd.ba.go
+++ b/binapi/ip6_nd/ip6_nd.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/core/ip6_nd.api.json
// Package ip6_nd contains generated bindings for API file ip6_nd.api.
//
diff --git a/binapi/ip_neighbor/ip_neighbor.ba.go b/binapi/ip_neighbor/ip_neighbor.ba.go
index 2ece5ee..3215f5d 100644
--- a/binapi/ip_neighbor/ip_neighbor.ba.go
+++ b/binapi/ip_neighbor/ip_neighbor.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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_types/ip_types.ba.go b/binapi/ip_types/ip_types.ba.go
index a9fc733..90363f8 100644
--- a/binapi/ip_types/ip_types.ba.go
+++ b/binapi/ip_types/ip_types.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/core/ip_types.api.json
// Package ip_types contains generated bindings for API file ip_types.api.
//
@@ -558,8 +559,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/binapi/ipfix_export/ipfix_export.ba.go b/binapi/ipfix_export/ipfix_export.ba.go
index 3a9b754..e173058 100644
--- a/binapi/ipfix_export/ipfix_export.ba.go
+++ b/binapi/ipfix_export/ipfix_export.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/core/ipfix_export.api.json
// Package ipfix_export contains generated bindings for API file ipfix_export.api.
//
diff --git a/binapi/ipip/ipip.ba.go b/binapi/ipip/ipip.ba.go
index aa44f00..05821cb 100644
--- a/binapi/ipip/ipip.ba.go
+++ b/binapi/ipip/ipip.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/core/ipip.api.json
// Package ipip contains generated bindings for API file ipip.api.
//
diff --git a/binapi/ipsec/ipsec.ba.go b/binapi/ipsec/ipsec.ba.go
index bfb757b..b777353 100644
--- a/binapi/ipsec/ipsec.ba.go
+++ b/binapi/ipsec/ipsec.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/core/ipsec.api.json
// Package ipsec contains generated bindings for API file ipsec.api.
//
diff --git a/binapi/ipsec_types/ipsec_types.ba.go b/binapi/ipsec_types/ipsec_types.ba.go
index 407caeb..4e7e29e 100644
--- a/binapi/ipsec_types/ipsec_types.ba.go
+++ b/binapi/ipsec_types/ipsec_types.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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 cc39b49..d924837 100644
--- a/binapi/l2/l2.ba.go
+++ b/binapi/l2/l2.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/core/l2.api.json
// Package l2 contains generated bindings for API file l2.api.
//
diff --git a/binapi/l2e/l2e.ba.go b/binapi/l2e/l2e.ba.go
index edca663..c1b2a76 100644
--- a/binapi/l2e/l2e.ba.go
+++ b/binapi/l2e/l2e.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/plugins/l2e.api.json
// Package l2e contains generated bindings for API file l2e.api.
//
diff --git a/binapi/l2tp/l2tp.ba.go b/binapi/l2tp/l2tp.ba.go
index 57ec0c0..574598e 100644
--- a/binapi/l2tp/l2tp.ba.go
+++ b/binapi/l2tp/l2tp.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/core/l2tp.api.json
// Package l2tp contains generated bindings for API file l2tp.api.
//
diff --git a/binapi/l3xc/l3xc.ba.go b/binapi/l3xc/l3xc.ba.go
index 0a05915..3dbcfba 100644
--- a/binapi/l3xc/l3xc.ba.go
+++ b/binapi/l3xc/l3xc.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/plugins/l3xc.api.json
// Package l3xc contains generated bindings for API file l3xc.api.
//
diff --git a/binapi/lacp/lacp.ba.go b/binapi/lacp/lacp.ba.go
index 5ea6044..f1a9457 100644
--- a/binapi/lacp/lacp.ba.go
+++ b/binapi/lacp/lacp.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/plugins/lacp.api.json
// Package lacp contains generated bindings for API file lacp.api.
//
diff --git a/binapi/lb/lb.ba.go b/binapi/lb/lb.ba.go
index 636c27a..9fdfc7f 100644
--- a/binapi/lb/lb.ba.go
+++ b/binapi/lb/lb.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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_types/lb_types.ba.go b/binapi/lb_types/lb_types.ba.go
index 9752c36..7e41146 100644
--- a/binapi/lb_types/lb_types.ba.go
+++ b/binapi/lb_types/lb_types.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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/lisp/lisp.ba.go b/binapi/lisp/lisp.ba.go
index ca8622a..7be6cca 100644
--- a/binapi/lisp/lisp.ba.go
+++ b/binapi/lisp/lisp.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/core/lisp.api.json
// Package lisp contains generated bindings for API file lisp.api.
//
@@ -90,12 +91,12 @@ func (m *LispAddDelAdjacency) Size() (size int) {
if m == nil {
return 0
}
- size += 1 // m.IsAdd
- size += 4 // m.Vni
- size += 1 // m.Reid.Type
- size += 1 * 6 // m.Reid.Address
- size += 1 // m.Leid.Type
- size += 1 * 6 // m.Leid.Address
+ size += 1 // m.IsAdd
+ size += 4 // m.Vni
+ size += 1 // m.Reid.Type
+ size += 1 * 18 // m.Reid.Address
+ size += 1 // m.Leid.Type
+ size += 1 * 18 // m.Leid.Address
return size
}
func (m *LispAddDelAdjacency) Marshal(b []byte) ([]byte, error) {
@@ -106,9 +107,9 @@ func (m *LispAddDelAdjacency) Marshal(b []byte) ([]byte, error) {
buf.EncodeBool(m.IsAdd)
buf.EncodeUint32(m.Vni)
buf.EncodeUint8(uint8(m.Reid.Type))
- buf.EncodeBytes(m.Reid.Address.XXX_UnionData[:], 6)
+ buf.EncodeBytes(m.Reid.Address.XXX_UnionData[:], 18)
buf.EncodeUint8(uint8(m.Leid.Type))
- buf.EncodeBytes(m.Leid.Address.XXX_UnionData[:], 6)
+ buf.EncodeBytes(m.Leid.Address.XXX_UnionData[:], 18)
return buf.Bytes(), nil
}
func (m *LispAddDelAdjacency) Unmarshal(b []byte) error {
@@ -116,9 +117,9 @@ func (m *LispAddDelAdjacency) Unmarshal(b []byte) error {
m.IsAdd = buf.DecodeBool()
m.Vni = buf.DecodeUint32()
m.Reid.Type = lisp_types.EidType(buf.DecodeUint8())
- copy(m.Reid.Address.XXX_UnionData[:], buf.DecodeBytes(6))
+ copy(m.Reid.Address.XXX_UnionData[:], buf.DecodeBytes(18))
m.Leid.Type = lisp_types.EidType(buf.DecodeUint8())
- copy(m.Leid.Address.XXX_UnionData[:], buf.DecodeBytes(6))
+ copy(m.Leid.Address.XXX_UnionData[:], buf.DecodeBytes(18))
return nil
}
@@ -177,7 +178,7 @@ func (m *LispAddDelLocalEid) Size() (size int) {
}
size += 1 // m.IsAdd
size += 1 // m.Eid.Type
- size += 1 * 6 // m.Eid.Address
+ size += 1 * 18 // m.Eid.Address
size += 64 // m.LocatorSetName
size += 4 // m.Vni
size += 1 // m.Key.ID
@@ -191,7 +192,7 @@ func (m *LispAddDelLocalEid) Marshal(b []byte) ([]byte, error) {
buf := codec.NewBuffer(b)
buf.EncodeBool(m.IsAdd)
buf.EncodeUint8(uint8(m.Eid.Type))
- buf.EncodeBytes(m.Eid.Address.XXX_UnionData[:], 6)
+ buf.EncodeBytes(m.Eid.Address.XXX_UnionData[:], 18)
buf.EncodeString(m.LocatorSetName, 64)
buf.EncodeUint32(m.Vni)
buf.EncodeUint8(uint8(m.Key.ID))
@@ -202,7 +203,7 @@ func (m *LispAddDelLocalEid) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
m.IsAdd = buf.DecodeBool()
m.Eid.Type = lisp_types.EidType(buf.DecodeUint8())
- copy(m.Eid.Address.XXX_UnionData[:], buf.DecodeBytes(6))
+ copy(m.Eid.Address.XXX_UnionData[:], buf.DecodeBytes(18))
m.LocatorSetName = buf.DecodeString(64)
m.Vni = buf.DecodeUint32()
m.Key.ID = lisp_types.HmacKeyID(buf.DecodeUint8())
@@ -674,16 +675,16 @@ func (m *LispAddDelRemoteMapping) Size() (size int) {
if m == nil {
return 0
}
- size += 1 // m.IsAdd
- size += 1 // m.IsSrcDst
- size += 1 // m.DelAll
- size += 4 // m.Vni
- size += 1 // m.Action
- size += 1 // m.Deid.Type
- size += 1 * 6 // m.Deid.Address
- size += 1 // m.Seid.Type
- size += 1 * 6 // m.Seid.Address
- size += 4 // m.RlocNum
+ size += 1 // m.IsAdd
+ size += 1 // m.IsSrcDst
+ size += 1 // m.DelAll
+ size += 4 // m.Vni
+ size += 1 // m.Action
+ size += 1 // m.Deid.Type
+ size += 1 * 18 // m.Deid.Address
+ size += 1 // m.Seid.Type
+ size += 1 * 18 // m.Seid.Address
+ size += 4 // m.RlocNum
for j1 := 0; j1 < len(m.Rlocs); j1++ {
var s1 lisp_types.RemoteLocator
_ = s1
@@ -708,9 +709,9 @@ func (m *LispAddDelRemoteMapping) Marshal(b []byte) ([]byte, error) {
buf.EncodeUint32(m.Vni)
buf.EncodeUint8(m.Action)
buf.EncodeUint8(uint8(m.Deid.Type))
- buf.EncodeBytes(m.Deid.Address.XXX_UnionData[:], 6)
+ buf.EncodeBytes(m.Deid.Address.XXX_UnionData[:], 18)
buf.EncodeUint8(uint8(m.Seid.Type))
- buf.EncodeBytes(m.Seid.Address.XXX_UnionData[:], 6)
+ buf.EncodeBytes(m.Seid.Address.XXX_UnionData[:], 18)
buf.EncodeUint32(uint32(len(m.Rlocs)))
for j0 := 0; j0 < len(m.Rlocs); j0++ {
var v0 lisp_types.RemoteLocator // Rlocs
@@ -732,9 +733,9 @@ func (m *LispAddDelRemoteMapping) Unmarshal(b []byte) error {
m.Vni = buf.DecodeUint32()
m.Action = buf.DecodeUint8()
m.Deid.Type = lisp_types.EidType(buf.DecodeUint8())
- copy(m.Deid.Address.XXX_UnionData[:], buf.DecodeBytes(6))
+ copy(m.Deid.Address.XXX_UnionData[:], buf.DecodeBytes(18))
m.Seid.Type = lisp_types.EidType(buf.DecodeUint8())
- copy(m.Seid.Address.XXX_UnionData[:], buf.DecodeBytes(6))
+ copy(m.Seid.Address.XXX_UnionData[:], buf.DecodeBytes(18))
m.RlocNum = buf.DecodeUint32()
m.Rlocs = make([]lisp_types.RemoteLocator, m.RlocNum)
for j0 := 0; j0 < len(m.Rlocs); j0++ {
@@ -840,10 +841,10 @@ func (m *LispAdjacenciesGetReply) Size() (size int) {
if j1 < len(m.Adjacencies) {
s1 = m.Adjacencies[j1]
}
- size += 1 // s1.Reid.Type
- size += 1 * 6 // s1.Reid.Address
- size += 1 // s1.Leid.Type
- size += 1 * 6 // s1.Leid.Address
+ size += 1 // s1.Reid.Type
+ size += 1 * 18 // s1.Reid.Address
+ size += 1 // s1.Leid.Type
+ size += 1 * 18 // s1.Leid.Address
}
return size
}
@@ -860,9 +861,9 @@ func (m *LispAdjacenciesGetReply) Marshal(b []byte) ([]byte, error) {
v0 = m.Adjacencies[j0]
}
buf.EncodeUint8(uint8(v0.Reid.Type))
- buf.EncodeBytes(v0.Reid.Address.XXX_UnionData[:], 6)
+ buf.EncodeBytes(v0.Reid.Address.XXX_UnionData[:], 18)
buf.EncodeUint8(uint8(v0.Leid.Type))
- buf.EncodeBytes(v0.Leid.Address.XXX_UnionData[:], 6)
+ buf.EncodeBytes(v0.Leid.Address.XXX_UnionData[:], 18)
}
return buf.Bytes(), nil
}
@@ -873,9 +874,9 @@ func (m *LispAdjacenciesGetReply) Unmarshal(b []byte) error {
m.Adjacencies = make([]LispAdjacency, m.Count)
for j0 := 0; j0 < len(m.Adjacencies); j0++ {
m.Adjacencies[j0].Reid.Type = lisp_types.EidType(buf.DecodeUint8())
- copy(m.Adjacencies[j0].Reid.Address.XXX_UnionData[:], buf.DecodeBytes(6))
+ copy(m.Adjacencies[j0].Reid.Address.XXX_UnionData[:], buf.DecodeBytes(18))
m.Adjacencies[j0].Leid.Type = lisp_types.EidType(buf.DecodeUint8())
- copy(m.Adjacencies[j0].Leid.Address.XXX_UnionData[:], buf.DecodeBytes(6))
+ copy(m.Adjacencies[j0].Leid.Address.XXX_UnionData[:], buf.DecodeBytes(18))
}
return nil
}
@@ -989,9 +990,9 @@ func (m *LispEidTableDetails) Size() (size int) {
size += 1 // m.IsSrcDst
size += 4 // m.Vni
size += 1 // m.Deid.Type
- size += 1 * 6 // m.Deid.Address
+ size += 1 * 18 // m.Deid.Address
size += 1 // m.Seid.Type
- size += 1 * 6 // m.Seid.Address
+ size += 1 * 18 // m.Seid.Address
size += 4 // m.TTL
size += 1 // m.Authoritative
size += 1 // m.Key.ID
@@ -1009,9 +1010,9 @@ func (m *LispEidTableDetails) Marshal(b []byte) ([]byte, error) {
buf.EncodeBool(m.IsSrcDst)
buf.EncodeUint32(m.Vni)
buf.EncodeUint8(uint8(m.Deid.Type))
- buf.EncodeBytes(m.Deid.Address.XXX_UnionData[:], 6)
+ buf.EncodeBytes(m.Deid.Address.XXX_UnionData[:], 18)
buf.EncodeUint8(uint8(m.Seid.Type))
- buf.EncodeBytes(m.Seid.Address.XXX_UnionData[:], 6)
+ buf.EncodeBytes(m.Seid.Address.XXX_UnionData[:], 18)
buf.EncodeUint32(m.TTL)
buf.EncodeUint8(m.Authoritative)
buf.EncodeUint8(uint8(m.Key.ID))
@@ -1026,9 +1027,9 @@ func (m *LispEidTableDetails) Unmarshal(b []byte) error {
m.IsSrcDst = buf.DecodeBool()
m.Vni = buf.DecodeUint32()
m.Deid.Type = lisp_types.EidType(buf.DecodeUint8())
- copy(m.Deid.Address.XXX_UnionData[:], buf.DecodeBytes(6))
+ copy(m.Deid.Address.XXX_UnionData[:], buf.DecodeBytes(18))
m.Seid.Type = lisp_types.EidType(buf.DecodeUint8())
- copy(m.Seid.Address.XXX_UnionData[:], buf.DecodeBytes(6))
+ copy(m.Seid.Address.XXX_UnionData[:], buf.DecodeBytes(18))
m.TTL = buf.DecodeUint32()
m.Authoritative = buf.DecodeUint8()
m.Key.ID = lisp_types.HmacKeyID(buf.DecodeUint8())
@@ -1057,12 +1058,12 @@ func (m *LispEidTableDump) Size() (size int) {
if m == nil {
return 0
}
- size += 1 // m.EidSet
- size += 1 // m.PrefixLength
- size += 4 // m.Vni
- size += 1 // m.Eid.Type
- size += 1 * 6 // m.Eid.Address
- size += 1 // m.Filter
+ size += 1 // m.EidSet
+ size += 1 // m.PrefixLength
+ size += 4 // m.Vni
+ size += 1 // m.Eid.Type
+ size += 1 * 18 // m.Eid.Address
+ size += 1 // m.Filter
return size
}
func (m *LispEidTableDump) Marshal(b []byte) ([]byte, error) {
@@ -1074,7 +1075,7 @@ func (m *LispEidTableDump) Marshal(b []byte) ([]byte, error) {
buf.EncodeUint8(m.PrefixLength)
buf.EncodeUint32(m.Vni)
buf.EncodeUint8(uint8(m.Eid.Type))
- buf.EncodeBytes(m.Eid.Address.XXX_UnionData[:], 6)
+ buf.EncodeBytes(m.Eid.Address.XXX_UnionData[:], 18)
buf.EncodeUint8(uint8(m.Filter))
return buf.Bytes(), nil
}
@@ -1084,7 +1085,7 @@ func (m *LispEidTableDump) Unmarshal(b []byte) error {
m.PrefixLength = buf.DecodeUint8()
m.Vni = buf.DecodeUint32()
m.Eid.Type = lisp_types.EidType(buf.DecodeUint8())
- copy(m.Eid.Address.XXX_UnionData[:], buf.DecodeBytes(6))
+ copy(m.Eid.Address.XXX_UnionData[:], buf.DecodeBytes(18))
m.Filter = LispLocatorSetFilter(buf.DecodeUint8())
return nil
}
diff --git a/binapi/lisp_gpe/lisp_gpe.ba.go b/binapi/lisp_gpe/lisp_gpe.ba.go
index 3ae307b..5106c84 100644
--- a/binapi/lisp_gpe/lisp_gpe.ba.go
+++ b/binapi/lisp_gpe/lisp_gpe.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/core/lisp_gpe.api.json
// Package lisp_gpe contains generated bindings for API file lisp_gpe.api.
//
@@ -78,15 +79,15 @@ func (m *GpeAddDelFwdEntry) Size() (size int) {
if m == nil {
return 0
}
- size += 1 // m.IsAdd
- size += 1 // m.RmtEid.Type
- size += 1 * 6 // m.RmtEid.Address
- size += 1 // m.LclEid.Type
- size += 1 * 6 // m.LclEid.Address
- size += 4 // m.Vni
- size += 4 // m.DpTable
- size += 1 // m.Action
- size += 4 // m.LocNum
+ size += 1 // m.IsAdd
+ size += 1 // m.RmtEid.Type
+ size += 1 * 18 // m.RmtEid.Address
+ size += 1 // m.LclEid.Type
+ size += 1 * 18 // m.LclEid.Address
+ size += 4 // m.Vni
+ size += 4 // m.DpTable
+ size += 1 // m.Action
+ size += 4 // m.LocNum
for j1 := 0; j1 < len(m.Locs); j1++ {
var s1 GpeLocator
_ = s1
@@ -106,9 +107,9 @@ func (m *GpeAddDelFwdEntry) Marshal(b []byte) ([]byte, error) {
buf := codec.NewBuffer(b)
buf.EncodeBool(m.IsAdd)
buf.EncodeUint8(uint8(m.RmtEid.Type))
- buf.EncodeBytes(m.RmtEid.Address.XXX_UnionData[:], 6)
+ buf.EncodeBytes(m.RmtEid.Address.XXX_UnionData[:], 18)
buf.EncodeUint8(uint8(m.LclEid.Type))
- buf.EncodeBytes(m.LclEid.Address.XXX_UnionData[:], 6)
+ buf.EncodeBytes(m.LclEid.Address.XXX_UnionData[:], 18)
buf.EncodeUint32(m.Vni)
buf.EncodeUint32(m.DpTable)
buf.EncodeUint8(m.Action)
@@ -128,9 +129,9 @@ func (m *GpeAddDelFwdEntry) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
m.IsAdd = buf.DecodeBool()
m.RmtEid.Type = lisp_types.EidType(buf.DecodeUint8())
- copy(m.RmtEid.Address.XXX_UnionData[:], buf.DecodeBytes(6))
+ copy(m.RmtEid.Address.XXX_UnionData[:], buf.DecodeBytes(18))
m.LclEid.Type = lisp_types.EidType(buf.DecodeUint8())
- copy(m.LclEid.Address.XXX_UnionData[:], buf.DecodeBytes(6))
+ copy(m.LclEid.Address.XXX_UnionData[:], buf.DecodeBytes(18))
m.Vni = buf.DecodeUint32()
m.DpTable = buf.DecodeUint32()
m.Action = buf.DecodeUint8()
@@ -467,14 +468,14 @@ func (m *GpeFwdEntriesGetReply) Size() (size int) {
if j1 < len(m.Entries) {
s1 = m.Entries[j1]
}
- size += 4 // s1.FwdEntryIndex
- size += 4 // s1.DpTable
- size += 1 // s1.Leid.Type
- size += 1 * 6 // s1.Leid.Address
- size += 1 // s1.Reid.Type
- size += 1 * 6 // s1.Reid.Address
- size += 4 // s1.Vni
- size += 1 // s1.Action
+ size += 4 // s1.FwdEntryIndex
+ size += 4 // s1.DpTable
+ size += 1 // s1.Leid.Type
+ size += 1 * 18 // s1.Leid.Address
+ size += 1 // s1.Reid.Type
+ size += 1 * 18 // s1.Reid.Address
+ size += 4 // s1.Vni
+ size += 1 // s1.Action
}
return size
}
@@ -493,9 +494,9 @@ func (m *GpeFwdEntriesGetReply) Marshal(b []byte) ([]byte, error) {
buf.EncodeUint32(v0.FwdEntryIndex)
buf.EncodeUint32(v0.DpTable)
buf.EncodeUint8(uint8(v0.Leid.Type))
- buf.EncodeBytes(v0.Leid.Address.XXX_UnionData[:], 6)
+ buf.EncodeBytes(v0.Leid.Address.XXX_UnionData[:], 18)
buf.EncodeUint8(uint8(v0.Reid.Type))
- buf.EncodeBytes(v0.Reid.Address.XXX_UnionData[:], 6)
+ buf.EncodeBytes(v0.Reid.Address.XXX_UnionData[:], 18)
buf.EncodeUint32(v0.Vni)
buf.EncodeUint8(v0.Action)
}
@@ -510,9 +511,9 @@ func (m *GpeFwdEntriesGetReply) Unmarshal(b []byte) error {
m.Entries[j0].FwdEntryIndex = buf.DecodeUint32()
m.Entries[j0].DpTable = buf.DecodeUint32()
m.Entries[j0].Leid.Type = lisp_types.EidType(buf.DecodeUint8())
- copy(m.Entries[j0].Leid.Address.XXX_UnionData[:], buf.DecodeBytes(6))
+ copy(m.Entries[j0].Leid.Address.XXX_UnionData[:], buf.DecodeBytes(18))
m.Entries[j0].Reid.Type = lisp_types.EidType(buf.DecodeUint8())
- copy(m.Entries[j0].Reid.Address.XXX_UnionData[:], buf.DecodeBytes(6))
+ copy(m.Entries[j0].Reid.Address.XXX_UnionData[:], buf.DecodeBytes(18))
m.Entries[j0].Vni = buf.DecodeUint32()
m.Entries[j0].Action = buf.DecodeUint8()
}
diff --git a/binapi/lisp_types/lisp_types.ba.go b/binapi/lisp_types/lisp_types.ba.go
index 1fddd55..a7302f2 100644
--- a/binapi/lisp_types/lisp_types.ba.go
+++ b/binapi/lisp_types/lisp_types.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/core/lisp_types.api.json
// Package lisp_types contains generated bindings for API file lisp_types.api.
//
@@ -90,8 +91,8 @@ func (x HmacKeyID) String() string {
// Eid defines type 'eid'.
type Eid struct {
- Type EidType `binapi:"eid_type,name=type" json:"type,omitempty"`
- Address EidAddress `binapi:"eid_address,name=address" json:"address,omitempty"`
+ Type EidType `binapi:"eid_type,name=type" json:"type,omitempty"`
+ Address EidAddressUnion `binapi:"eid_address,name=address" json:"address,omitempty"`
}
// HmacKey defines type 'hmac_key'.
@@ -120,25 +121,26 @@ type RemoteLocator struct {
IPAddress ip_types.Address `binapi:"address,name=ip_address" json:"ip_address,omitempty"`
}
-// EidAddress defines union 'eid_address'.
-type EidAddress struct {
- // Prefix *ip_types.Prefix
- // Mac *ethernet_types.MacAddress
- // Nsh *Nsh
- XXX_UnionData [6]byte
+// EidAddressUnion defines union 'eid_address'.
+type EidAddressUnion struct {
+ // EidAddressUnion can be one of:
+ // - Prefix *ip_types.Prefix
+ // - Mac *ethernet_types.MacAddress
+ // - Nsh *Nsh
+ XXX_UnionData [18]byte
}
-func EidAddressPrefix(a ip_types.Prefix) (u EidAddress) {
+func EidAddressUnionPrefix(a ip_types.Prefix) (u EidAddressUnion) {
u.SetPrefix(a)
return
}
-func (u *EidAddress) SetPrefix(a ip_types.Prefix) {
+func (u *EidAddressUnion) SetPrefix(a ip_types.Prefix) {
buf := codec.NewBuffer(u.XXX_UnionData[:])
buf.EncodeUint8(uint8(a.Address.Af))
buf.EncodeBytes(a.Address.Un.XXX_UnionData[:], 16)
buf.EncodeUint8(a.Len)
}
-func (u *EidAddress) GetPrefix() (a ip_types.Prefix) {
+func (u *EidAddressUnion) GetPrefix() (a ip_types.Prefix) {
buf := codec.NewBuffer(u.XXX_UnionData[:])
a.Address.Af = ip_types.AddressFamily(buf.DecodeUint8())
copy(a.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
@@ -146,30 +148,30 @@ func (u *EidAddress) GetPrefix() (a ip_types.Prefix) {
return
}
-func EidAddressMac(a ethernet_types.MacAddress) (u EidAddress) {
+func EidAddressUnionMac(a ethernet_types.MacAddress) (u EidAddressUnion) {
u.SetMac(a)
return
}
-func (u *EidAddress) SetMac(a ethernet_types.MacAddress) {
+func (u *EidAddressUnion) SetMac(a ethernet_types.MacAddress) {
buf := codec.NewBuffer(u.XXX_UnionData[:])
buf.EncodeBytes(a[:], 6)
}
-func (u *EidAddress) GetMac() (a ethernet_types.MacAddress) {
+func (u *EidAddressUnion) GetMac() (a ethernet_types.MacAddress) {
buf := codec.NewBuffer(u.XXX_UnionData[:])
copy(a[:], buf.DecodeBytes(6))
return
}
-func EidAddressNsh(a Nsh) (u EidAddress) {
+func EidAddressUnionNsh(a Nsh) (u EidAddressUnion) {
u.SetNsh(a)
return
}
-func (u *EidAddress) SetNsh(a Nsh) {
+func (u *EidAddressUnion) SetNsh(a Nsh) {
buf := codec.NewBuffer(u.XXX_UnionData[:])
buf.EncodeUint32(a.Spi)
buf.EncodeUint8(a.Si)
}
-func (u *EidAddress) GetNsh() (a Nsh) {
+func (u *EidAddressUnion) GetNsh() (a Nsh) {
buf := codec.NewBuffer(u.XXX_UnionData[:])
a.Spi = buf.DecodeUint32()
a.Si = buf.DecodeUint8()
diff --git a/binapi/lldp/lldp.ba.go b/binapi/lldp/lldp.ba.go
index 1775ecc..a8769b5 100644
--- a/binapi/lldp/lldp.ba.go
+++ b/binapi/lldp/lldp.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/core/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 bfc8da4..deb7472 100644
--- a/binapi/mactime/mactime.ba.go
+++ b/binapi/mactime/mactime.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/plugins/mactime.api.json
// Package mactime contains generated bindings for API file mactime.api.
//
diff --git a/binapi/map/map.ba.go b/binapi/map/map.ba.go
index 6eb6cdc..b906284 100644
--- a/binapi/map/map.ba.go
+++ b/binapi/map/map.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/plugins/map.api.json
// Package maps contains generated bindings for API file map.api.
//
diff --git a/binapi/mdata/mdata.ba.go b/binapi/mdata/mdata.ba.go
index 4a7f74c..d4715f7 100644
--- a/binapi/mdata/mdata.ba.go
+++ b/binapi/mdata/mdata.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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 e262ca8..3bbf88d 100644
--- a/binapi/memclnt/memclnt.ba.go
+++ b/binapi/memclnt/memclnt.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/core/memclnt.api.json
// Package memclnt contains generated bindings for API file memclnt.api.
//
diff --git a/binapi/memif/memif.ba.go b/binapi/memif/memif.ba.go
index f77555c..fddd0ab 100644
--- a/binapi/memif/memif.ba.go
+++ b/binapi/memif/memif.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/plugins/memif.api.json
// Package memif contains generated bindings for API file memif.api.
//
diff --git a/binapi/mfib_types/mfib_types.ba.go b/binapi/mfib_types/mfib_types.ba.go
index 4e90440..1d6ddef 100644
--- a/binapi/mfib_types/mfib_types.ba.go
+++ b/binapi/mfib_types/mfib_types.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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 6c9751c..9443728 100644
--- a/binapi/mpls/mpls.ba.go
+++ b/binapi/mpls/mpls.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/core/mpls.api.json
// Package mpls contains generated bindings for API file mpls.api.
//
diff --git a/binapi/nat/nat.ba.go b/binapi/nat/nat.ba.go
index 16b3d51..c21307f 100644
--- a/binapi/nat/nat.ba.go
+++ b/binapi/nat/nat.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/plugins/nat.api.json
// Package nat contains generated bindings for API file nat.api.
//
diff --git a/binapi/nsh/nsh.ba.go b/binapi/nsh/nsh.ba.go
index 160f7bd..5897a90 100644
--- a/binapi/nsh/nsh.ba.go
+++ b/binapi/nsh/nsh.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/plugins/nsh.api.json
// Package nsh contains generated bindings for API file nsh.api.
//
diff --git a/binapi/nsim/nsim.ba.go b/binapi/nsim/nsim.ba.go
index 5a22c32..fb540ac 100644
--- a/binapi/nsim/nsim.ba.go
+++ b/binapi/nsim/nsim.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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 e28998e..c6f3e21 100644
--- a/binapi/oddbuf/oddbuf.ba.go
+++ b/binapi/oddbuf/oddbuf.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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 e59be59..01a5597 100644
--- a/binapi/one/one.ba.go
+++ b/binapi/one/one.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/core/one.api.json
// Package one contains generated bindings for API file one.api.
//
@@ -129,12 +130,12 @@ func (m *OneAddDelAdjacency) Size() (size int) {
if m == nil {
return 0
}
- size += 1 // m.IsAdd
- size += 4 // m.Vni
- size += 1 // m.Reid.Type
- size += 1 * 6 // m.Reid.Address
- size += 1 // m.Leid.Type
- size += 1 * 6 // m.Leid.Address
+ size += 1 // m.IsAdd
+ size += 4 // m.Vni
+ size += 1 // m.Reid.Type
+ size += 1 * 18 // m.Reid.Address
+ size += 1 // m.Leid.Type
+ size += 1 * 18 // m.Leid.Address
return size
}
func (m *OneAddDelAdjacency) Marshal(b []byte) ([]byte, error) {
@@ -145,9 +146,9 @@ func (m *OneAddDelAdjacency) Marshal(b []byte) ([]byte, error) {
buf.EncodeUint8(m.IsAdd)
buf.EncodeUint32(m.Vni)
buf.EncodeUint8(uint8(m.Reid.Type))
- buf.EncodeBytes(m.Reid.Address.XXX_UnionData[:], 6)
+ buf.EncodeBytes(m.Reid.Address.XXX_UnionData[:], 18)
buf.EncodeUint8(uint8(m.Leid.Type))
- buf.EncodeBytes(m.Leid.Address.XXX_UnionData[:], 6)
+ buf.EncodeBytes(m.Leid.Address.XXX_UnionData[:], 18)
return buf.Bytes(), nil
}
func (m *OneAddDelAdjacency) Unmarshal(b []byte) error {
@@ -155,9 +156,9 @@ func (m *OneAddDelAdjacency) Unmarshal(b []byte) error {
m.IsAdd = buf.DecodeUint8()
m.Vni = buf.DecodeUint32()
m.Reid.Type = lisp_types.EidType(buf.DecodeUint8())
- copy(m.Reid.Address.XXX_UnionData[:], buf.DecodeBytes(6))
+ copy(m.Reid.Address.XXX_UnionData[:], buf.DecodeBytes(18))
m.Leid.Type = lisp_types.EidType(buf.DecodeUint8())
- copy(m.Leid.Address.XXX_UnionData[:], buf.DecodeBytes(6))
+ copy(m.Leid.Address.XXX_UnionData[:], buf.DecodeBytes(18))
return nil
}
@@ -293,7 +294,7 @@ func (m *OneAddDelLocalEid) Size() (size int) {
}
size += 1 // m.IsAdd
size += 1 // m.Eid.Type
- size += 1 * 6 // m.Eid.Address
+ size += 1 * 18 // m.Eid.Address
size += 64 // m.LocatorSetName
size += 4 // m.Vni
size += 1 // m.Key.ID
@@ -307,7 +308,7 @@ func (m *OneAddDelLocalEid) Marshal(b []byte) ([]byte, error) {
buf := codec.NewBuffer(b)
buf.EncodeBool(m.IsAdd)
buf.EncodeUint8(uint8(m.Eid.Type))
- buf.EncodeBytes(m.Eid.Address.XXX_UnionData[:], 6)
+ buf.EncodeBytes(m.Eid.Address.XXX_UnionData[:], 18)
buf.EncodeString(m.LocatorSetName, 64)
buf.EncodeUint32(m.Vni)
buf.EncodeUint8(uint8(m.Key.ID))
@@ -318,7 +319,7 @@ func (m *OneAddDelLocalEid) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
m.IsAdd = buf.DecodeBool()
m.Eid.Type = lisp_types.EidType(buf.DecodeUint8())
- copy(m.Eid.Address.XXX_UnionData[:], buf.DecodeBytes(6))
+ copy(m.Eid.Address.XXX_UnionData[:], buf.DecodeBytes(18))
m.LocatorSetName = buf.DecodeString(64)
m.Vni = buf.DecodeUint32()
m.Key.ID = lisp_types.HmacKeyID(buf.DecodeUint8())
@@ -867,16 +868,16 @@ func (m *OneAddDelRemoteMapping) Size() (size int) {
if m == nil {
return 0
}
- size += 1 // m.IsAdd
- size += 1 // m.IsSrcDst
- size += 1 // m.DelAll
- size += 4 // m.Vni
- size += 1 // m.Action
- size += 1 // m.Deid.Type
- size += 1 * 6 // m.Deid.Address
- size += 1 // m.Seid.Type
- size += 1 * 6 // m.Seid.Address
- size += 4 // m.RlocNum
+ size += 1 // m.IsAdd
+ size += 1 // m.IsSrcDst
+ size += 1 // m.DelAll
+ size += 4 // m.Vni
+ size += 1 // m.Action
+ size += 1 // m.Deid.Type
+ size += 1 * 18 // m.Deid.Address
+ size += 1 // m.Seid.Type
+ size += 1 * 18 // m.Seid.Address
+ size += 4 // m.RlocNum
for j1 := 0; j1 < len(m.Rlocs); j1++ {
var s1 lisp_types.RemoteLocator
_ = s1
@@ -901,9 +902,9 @@ func (m *OneAddDelRemoteMapping) Marshal(b []byte) ([]byte, error) {
buf.EncodeUint32(m.Vni)
buf.EncodeUint8(m.Action)
buf.EncodeUint8(uint8(m.Deid.Type))
- buf.EncodeBytes(m.Deid.Address.XXX_UnionData[:], 6)
+ buf.EncodeBytes(m.Deid.Address.XXX_UnionData[:], 18)
buf.EncodeUint8(uint8(m.Seid.Type))
- buf.EncodeBytes(m.Seid.Address.XXX_UnionData[:], 6)
+ buf.EncodeBytes(m.Seid.Address.XXX_UnionData[:], 18)
buf.EncodeUint32(uint32(len(m.Rlocs)))
for j0 := 0; j0 < len(m.Rlocs); j0++ {
var v0 lisp_types.RemoteLocator // Rlocs
@@ -925,9 +926,9 @@ func (m *OneAddDelRemoteMapping) Unmarshal(b []byte) error {
m.Vni = buf.DecodeUint32()
m.Action = buf.DecodeUint8()
m.Deid.Type = lisp_types.EidType(buf.DecodeUint8())
- copy(m.Deid.Address.XXX_UnionData[:], buf.DecodeBytes(6))
+ copy(m.Deid.Address.XXX_UnionData[:], buf.DecodeBytes(18))
m.Seid.Type = lisp_types.EidType(buf.DecodeUint8())
- copy(m.Seid.Address.XXX_UnionData[:], buf.DecodeBytes(6))
+ copy(m.Seid.Address.XXX_UnionData[:], buf.DecodeBytes(18))
m.RlocNum = buf.DecodeUint32()
m.Rlocs = make([]lisp_types.RemoteLocator, m.RlocNum)
for j0 := 0; j0 < len(m.Rlocs); j0++ {
@@ -1033,10 +1034,10 @@ func (m *OneAdjacenciesGetReply) Size() (size int) {
if j1 < len(m.Adjacencies) {
s1 = m.Adjacencies[j1]
}
- size += 1 // s1.Reid.Type
- size += 1 * 6 // s1.Reid.Address
- size += 1 // s1.Leid.Type
- size += 1 * 6 // s1.Leid.Address
+ size += 1 // s1.Reid.Type
+ size += 1 * 18 // s1.Reid.Address
+ size += 1 // s1.Leid.Type
+ size += 1 * 18 // s1.Leid.Address
}
return size
}
@@ -1053,9 +1054,9 @@ func (m *OneAdjacenciesGetReply) Marshal(b []byte) ([]byte, error) {
v0 = m.Adjacencies[j0]
}
buf.EncodeUint8(uint8(v0.Reid.Type))
- buf.EncodeBytes(v0.Reid.Address.XXX_UnionData[:], 6)
+ buf.EncodeBytes(v0.Reid.Address.XXX_UnionData[:], 18)
buf.EncodeUint8(uint8(v0.Leid.Type))
- buf.EncodeBytes(v0.Leid.Address.XXX_UnionData[:], 6)
+ buf.EncodeBytes(v0.Leid.Address.XXX_UnionData[:], 18)
}
return buf.Bytes(), nil
}
@@ -1066,9 +1067,9 @@ func (m *OneAdjacenciesGetReply) Unmarshal(b []byte) error {
m.Adjacencies = make([]OneAdjacency, m.Count)
for j0 := 0; j0 < len(m.Adjacencies); j0++ {
m.Adjacencies[j0].Reid.Type = lisp_types.EidType(buf.DecodeUint8())
- copy(m.Adjacencies[j0].Reid.Address.XXX_UnionData[:], buf.DecodeBytes(6))
+ copy(m.Adjacencies[j0].Reid.Address.XXX_UnionData[:], buf.DecodeBytes(18))
m.Adjacencies[j0].Leid.Type = lisp_types.EidType(buf.DecodeUint8())
- copy(m.Adjacencies[j0].Leid.Address.XXX_UnionData[:], buf.DecodeBytes(6))
+ copy(m.Adjacencies[j0].Leid.Address.XXX_UnionData[:], buf.DecodeBytes(18))
}
return nil
}
@@ -1182,9 +1183,9 @@ func (m *OneEidTableDetails) Size() (size int) {
size += 1 // m.IsSrcDst
size += 4 // m.Vni
size += 1 // m.Deid.Type
- size += 1 * 6 // m.Deid.Address
+ size += 1 * 18 // m.Deid.Address
size += 1 // m.Seid.Type
- size += 1 * 6 // m.Seid.Address
+ size += 1 * 18 // m.Seid.Address
size += 4 // m.TTL
size += 1 // m.Authoritative
size += 1 // m.Key.ID
@@ -1202,9 +1203,9 @@ func (m *OneEidTableDetails) Marshal(b []byte) ([]byte, error) {
buf.EncodeBool(m.IsSrcDst)
buf.EncodeUint32(m.Vni)
buf.EncodeUint8(uint8(m.Deid.Type))
- buf.EncodeBytes(m.Deid.Address.XXX_UnionData[:], 6)
+ buf.EncodeBytes(m.Deid.Address.XXX_UnionData[:], 18)
buf.EncodeUint8(uint8(m.Seid.Type))
- buf.EncodeBytes(m.Seid.Address.XXX_UnionData[:], 6)
+ buf.EncodeBytes(m.Seid.Address.XXX_UnionData[:], 18)
buf.EncodeUint32(m.TTL)
buf.EncodeUint8(m.Authoritative)
buf.EncodeUint8(uint8(m.Key.ID))
@@ -1219,9 +1220,9 @@ func (m *OneEidTableDetails) Unmarshal(b []byte) error {
m.IsSrcDst = buf.DecodeBool()
m.Vni = buf.DecodeUint32()
m.Deid.Type = lisp_types.EidType(buf.DecodeUint8())
- copy(m.Deid.Address.XXX_UnionData[:], buf.DecodeBytes(6))
+ copy(m.Deid.Address.XXX_UnionData[:], buf.DecodeBytes(18))
m.Seid.Type = lisp_types.EidType(buf.DecodeUint8())
- copy(m.Seid.Address.XXX_UnionData[:], buf.DecodeBytes(6))
+ copy(m.Seid.Address.XXX_UnionData[:], buf.DecodeBytes(18))
m.TTL = buf.DecodeUint32()
m.Authoritative = buf.DecodeUint8()
m.Key.ID = lisp_types.HmacKeyID(buf.DecodeUint8())
@@ -1249,11 +1250,11 @@ func (m *OneEidTableDump) Size() (size int) {
if m == nil {
return 0
}
- size += 1 // m.EidSet
- size += 4 // m.Vni
- size += 1 // m.Eid.Type
- size += 1 * 6 // m.Eid.Address
- size += 4 // m.Filter
+ size += 1 // m.EidSet
+ size += 4 // m.Vni
+ size += 1 // m.Eid.Type
+ size += 1 * 18 // m.Eid.Address
+ size += 4 // m.Filter
return size
}
func (m *OneEidTableDump) Marshal(b []byte) ([]byte, error) {
@@ -1264,7 +1265,7 @@ func (m *OneEidTableDump) Marshal(b []byte) ([]byte, error) {
buf.EncodeBool(m.EidSet)
buf.EncodeUint32(m.Vni)
buf.EncodeUint8(uint8(m.Eid.Type))
- buf.EncodeBytes(m.Eid.Address.XXX_UnionData[:], 6)
+ buf.EncodeBytes(m.Eid.Address.XXX_UnionData[:], 18)
buf.EncodeUint32(uint32(m.Filter))
return buf.Bytes(), nil
}
@@ -1273,7 +1274,7 @@ func (m *OneEidTableDump) Unmarshal(b []byte) error {
m.EidSet = buf.DecodeBool()
m.Vni = buf.DecodeUint32()
m.Eid.Type = lisp_types.EidType(buf.DecodeUint8())
- copy(m.Eid.Address.XXX_UnionData[:], buf.DecodeBytes(6))
+ copy(m.Eid.Address.XXX_UnionData[:], buf.DecodeBytes(18))
m.Filter = OneFilter(buf.DecodeUint32())
return nil
}
@@ -3201,9 +3202,9 @@ func (m *OneStatsDetails) Size() (size int) {
}
size += 4 // m.Vni
size += 1 // m.Deid.Type
- size += 1 * 6 // m.Deid.Address
+ size += 1 * 18 // m.Deid.Address
size += 1 // m.Seid.Type
- size += 1 * 6 // m.Seid.Address
+ size += 1 * 18 // m.Seid.Address
size += 1 // m.Rloc.Af
size += 1 * 16 // m.Rloc.Un
size += 1 // m.Lloc.Af
@@ -3219,9 +3220,9 @@ func (m *OneStatsDetails) Marshal(b []byte) ([]byte, error) {
buf := codec.NewBuffer(b)
buf.EncodeUint32(m.Vni)
buf.EncodeUint8(uint8(m.Deid.Type))
- buf.EncodeBytes(m.Deid.Address.XXX_UnionData[:], 6)
+ buf.EncodeBytes(m.Deid.Address.XXX_UnionData[:], 18)
buf.EncodeUint8(uint8(m.Seid.Type))
- buf.EncodeBytes(m.Seid.Address.XXX_UnionData[:], 6)
+ buf.EncodeBytes(m.Seid.Address.XXX_UnionData[:], 18)
buf.EncodeUint8(uint8(m.Rloc.Af))
buf.EncodeBytes(m.Rloc.Un.XXX_UnionData[:], 16)
buf.EncodeUint8(uint8(m.Lloc.Af))
@@ -3234,9 +3235,9 @@ func (m *OneStatsDetails) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
m.Vni = buf.DecodeUint32()
m.Deid.Type = lisp_types.EidType(buf.DecodeUint8())
- copy(m.Deid.Address.XXX_UnionData[:], buf.DecodeBytes(6))
+ copy(m.Deid.Address.XXX_UnionData[:], buf.DecodeBytes(18))
m.Seid.Type = lisp_types.EidType(buf.DecodeUint8())
- copy(m.Seid.Address.XXX_UnionData[:], buf.DecodeBytes(6))
+ copy(m.Seid.Address.XXX_UnionData[:], buf.DecodeBytes(18))
m.Rloc.Af = ip_types.AddressFamily(buf.DecodeUint8())
copy(m.Rloc.Un.XXX_UnionData[:], buf.DecodeBytes(16))
m.Lloc.Af = ip_types.AddressFamily(buf.DecodeUint8())
diff --git a/binapi/p2p_ethernet/p2p_ethernet.ba.go b/binapi/p2p_ethernet/p2p_ethernet.ba.go
index 4d40c6f..2f76041 100644
--- a/binapi/p2p_ethernet/p2p_ethernet.ba.go
+++ b/binapi/p2p_ethernet/p2p_ethernet.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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 c74ecc2..7b0d00c 100644
--- a/binapi/pci_types/pci_types.ba.go
+++ b/binapi/pci_types/pci_types.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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 d2b26a0..9a522c2 100644
--- a/binapi/pg/pg.ba.go
+++ b/binapi/pg/pg.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/core/pg.api.json
// Package pg contains generated bindings for API file pg.api.
//
diff --git a/binapi/pipe/pipe.ba.go b/binapi/pipe/pipe.ba.go
index 8cc2d62..6123059 100644
--- a/binapi/pipe/pipe.ba.go
+++ b/binapi/pipe/pipe.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/core/pipe.api.json
// Package pipe contains generated bindings for API file pipe.api.
//
diff --git a/binapi/policer/policer.ba.go b/binapi/policer/policer.ba.go
index e86ec0e..1314dce 100644
--- a/binapi/policer/policer.ba.go
+++ b/binapi/policer/policer.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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_types/policer_types.ba.go b/binapi/policer_types/policer_types.ba.go
index a103888..bdb259a 100644
--- a/binapi/policer_types/policer_types.ba.go
+++ b/binapi/policer_types/policer_types.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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 d060394..2c2d1f4 100644
--- a/binapi/pot/pot.ba.go
+++ b/binapi/pot/pot.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/plugins/pot.api.json
// Package pot contains generated bindings for API file pot.api.
//
diff --git a/binapi/pp2/pp2.ba.go b/binapi/pp2/pp2.ba.go
deleted file mode 100644
index ad91739..0000000
--- a/binapi/pp2/pp2.ba.go
+++ /dev/null
@@ -1,191 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.4.0-dev
-// VPP: 20.05-release
-
-// 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 = 0x85d7546b
-)
-
-// 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_rest.ba.go b/binapi/pp2/pp2_rest.ba.go
deleted file mode 100644
index d3e69c0..0000000
--- a/binapi/pp2/pp2_rest.ba.go
+++ /dev/null
@@ -1,60 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package pp2
-
-import (
- "encoding/json"
- "io/ioutil"
- "net/http"
-)
-
-func RESTHandler(rpc RPCService) http.Handler {
- mux := http.NewServeMux()
- mux.HandleFunc("/mrvl_pp2_create", func(w http.ResponseWriter, req *http.Request) {
- var request = new(MrvlPp2Create)
- 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.MrvlPp2Create(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("/mrvl_pp2_delete", func(w http.ResponseWriter, req *http.Request) {
- var request = new(MrvlPp2Delete)
- 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.MrvlPp2Delete(req.Context(), request)
- if err != nil {
- http.Error(w, "request failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- rep, err := json.MarshalIndent(reply, "", " ")
- if err != nil {
- http.Error(w, "marshal failed: "+err.Error(), http.StatusInternalServerError)
- return
- }
- w.Write(rep)
- })
- return http.HandlerFunc(mux.ServeHTTP)
-}
diff --git a/binapi/pp2/pp2_rpc.ba.go b/binapi/pp2/pp2_rpc.ba.go
deleted file mode 100644
index d1f0bf5..0000000
--- a/binapi/pp2/pp2_rpc.ba.go
+++ /dev/null
@@ -1,41 +0,0 @@
-// 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, nil
-}
-
-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, nil
-}
diff --git a/binapi/pppoe/pppoe.ba.go b/binapi/pppoe/pppoe.ba.go
index cb310fb..e01d3b5 100644
--- a/binapi/pppoe/pppoe.ba.go
+++ b/binapi/pppoe/pppoe.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/plugins/pppoe.api.json
// Package pppoe contains generated bindings for API file pppoe.api.
//
diff --git a/binapi/punt/punt.ba.go b/binapi/punt/punt.ba.go
index f8483fc..1a84dbf 100644
--- a/binapi/punt/punt.ba.go
+++ b/binapi/punt/punt.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/core/punt.api.json
// Package punt contains generated bindings for API file punt.api.
//
@@ -95,9 +96,10 @@ type PuntReason struct {
// 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 [4]byte
}
diff --git a/binapi/qos/qos.ba.go b/binapi/qos/qos.ba.go
index 21201f0..285e2c8 100644
--- a/binapi/qos/qos.ba.go
+++ b/binapi/qos/qos.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/core/qos.api.json
// Package qos contains generated bindings for API file qos.api.
//
diff --git a/binapi/rd_cp/rd_cp.ba.go b/binapi/rd_cp/rd_cp.ba.go
index ca35324..8cafa0f 100644
--- a/binapi/rd_cp/rd_cp.ba.go
+++ b/binapi/rd_cp/rd_cp.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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 3dc2f9f..f331fc6 100644
--- a/binapi/rdma/rdma.ba.go
+++ b/binapi/rdma/rdma.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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 3d66275..09a67b0 100644
--- a/binapi/session/session.ba.go
+++ b/binapi/session/session.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/core/session.api.json
// Package session contains generated bindings for API file session.api.
//
diff --git a/binapi/span/span.ba.go b/binapi/span/span.ba.go
index 6cced54..74855b1 100644
--- a/binapi/span/span.ba.go
+++ b/binapi/span/span.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/core/span.api.json
// Package span contains generated bindings for API file span.api.
//
diff --git a/binapi/sr/sr.ba.go b/binapi/sr/sr.ba.go
index ee83937..2b98b8a 100644
--- a/binapi/sr/sr.ba.go
+++ b/binapi/sr/sr.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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_mpls/sr_mpls.ba.go b/binapi/sr_mpls/sr_mpls.ba.go
index 9785405..e6bd9f0 100644
--- a/binapi/sr_mpls/sr_mpls.ba.go
+++ b/binapi/sr_mpls/sr_mpls.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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 8a21c76..7a2007e 100644
--- a/binapi/sr_types/sr_types.ba.go
+++ b/binapi/sr_types/sr_types.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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 035a819..b44adf5 100644
--- a/binapi/stn/stn.ba.go
+++ b/binapi/stn/stn.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/plugins/stn.api.json
// Package stn contains generated bindings for API file stn.api.
//
diff --git a/binapi/svs/svs.ba.go b/binapi/svs/svs.ba.go
index 788864c..911e936 100644
--- a/binapi/svs/svs.ba.go
+++ b/binapi/svs/svs.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/plugins/svs.api.json
// Package svs contains generated bindings for API file svs.api.
//
diff --git a/binapi/syslog/syslog.ba.go b/binapi/syslog/syslog.ba.go
index bb49eae..cf8f754 100644
--- a/binapi/syslog/syslog.ba.go
+++ b/binapi/syslog/syslog.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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 b9443a6..028ff67 100644
--- a/binapi/tapv2/tapv2.ba.go
+++ b/binapi/tapv2/tapv2.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/core/tapv2.api.json
// Package tapv2 contains generated bindings for API file tapv2.api.
//
diff --git a/binapi/tcp/tcp.ba.go b/binapi/tcp/tcp.ba.go
index 06ffcdf..7ae3ecc 100644
--- a/binapi/tcp/tcp.ba.go
+++ b/binapi/tcp/tcp.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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 d4473c7..d37f391 100644
--- a/binapi/teib/teib.ba.go
+++ b/binapi/teib/teib.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/core/teib.api.json
// Package teib contains generated bindings for API file teib.api.
//
diff --git a/binapi/tls_openssl/tls_openssl.ba.go b/binapi/tls_openssl/tls_openssl.ba.go
index 8b8f318..938a9df 100644
--- a/binapi/tls_openssl/tls_openssl.ba.go
+++ b/binapi/tls_openssl/tls_openssl.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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 c360cbd..9bc330b 100644
--- a/binapi/trace/trace.ba.go
+++ b/binapi/trace/trace.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/plugins/trace.api.json
// Package trace contains generated bindings for API file trace.api.
//
diff --git a/binapi/tunnel_types/tunnel_types.ba.go b/binapi/tunnel_types/tunnel_types.ba.go
index ae9f53f..a79ee18 100644
--- a/binapi/tunnel_types/tunnel_types.ba.go
+++ b/binapi/tunnel_types/tunnel_types.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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 52109ca..7795100 100644
--- a/binapi/udp/udp.ba.go
+++ b/binapi/udp/udp.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/core/udp.api.json
// Package udp contains generated bindings for API file udp.api.
//
diff --git a/binapi/udp_ping/udp_ping.ba.go b/binapi/udp_ping/udp_ping.ba.go
index a457715..7247b38 100644
--- a/binapi/udp_ping/udp_ping.ba.go
+++ b/binapi/udp_ping/udp_ping.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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 af7f5b4..e277537 100644
--- a/binapi/urpf/urpf.ba.go
+++ b/binapi/urpf/urpf.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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 f384bac..0ca7119 100644
--- a/binapi/vhost_user/vhost_user.ba.go
+++ b/binapi/vhost_user/vhost_user.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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/virtio/virtio.ba.go b/binapi/virtio/virtio.ba.go
index 133f0ac..b29b52f 100644
--- a/binapi/virtio/virtio.ba.go
+++ b/binapi/virtio/virtio.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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_types/virtio_types.ba.go b/binapi/virtio_types/virtio_types.ba.go
index e8a262d..d78740a 100644
--- a/binapi/virtio_types/virtio_types.ba.go
+++ b/binapi/virtio_types/virtio_types.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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/vmxnet3/vmxnet3.ba.go b/binapi/vmxnet3/vmxnet3.ba.go
index 2abc2a0..77937fa 100644
--- a/binapi/vmxnet3/vmxnet3.ba.go
+++ b/binapi/vmxnet3/vmxnet3.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/plugins/vmxnet3.api.json
// Package vmxnet3 contains generated bindings for API file vmxnet3.api.
//
diff --git a/binapi/vpe/vpe.ba.go b/binapi/vpe/vpe.ba.go
index 594f0c4..046bd68 100644
--- a/binapi/vpe/vpe.ba.go
+++ b/binapi/vpe/vpe.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/core/vpe.api.json
// Package vpe contains generated bindings for API file vpe.api.
//
diff --git a/binapi/vpe_types/vpe_types.ba.go b/binapi/vpe_types/vpe_types.ba.go
index 6a93afd..f1d21b0 100644
--- a/binapi/vpe_types/vpe_types.ba.go
+++ b/binapi/vpe_types/vpe_types.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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 b854828..b00f281 100644
--- a/binapi/vrrp/vrrp.ba.go
+++ b/binapi/vrrp/vrrp.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/plugins/vrrp.api.json
// Package vrrp contains generated bindings for API file vrrp.api.
//
diff --git a/binapi/vxlan/vxlan.ba.go b/binapi/vxlan/vxlan.ba.go
index d4c617f..048b2fa 100644
--- a/binapi/vxlan/vxlan.ba.go
+++ b/binapi/vxlan/vxlan.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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_gbp/vxlan_gbp.ba.go b/binapi/vxlan_gbp/vxlan_gbp.ba.go
index 53554c9..0876906 100644
--- a/binapi/vxlan_gbp/vxlan_gbp.ba.go
+++ b/binapi/vxlan_gbp/vxlan_gbp.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/core/vxlan_gbp.api.json
// Package vxlan_gbp contains generated bindings for API file vxlan_gbp.api.
//
diff --git a/binapi/vxlan_gpe/vxlan_gpe.ba.go b/binapi/vxlan_gpe/vxlan_gpe.ba.go
index d36b98e..0858ada 100644
--- a/binapi/vxlan_gpe/vxlan_gpe.ba.go
+++ b/binapi/vxlan_gpe/vxlan_gpe.ba.go
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-release
+// source: /usr/share/vpp/api/core/vxlan_gpe.api.json
// Package vxlan_gpe contains generated bindings for API file vxlan_gpe.api.
//
diff --git a/binapi/vxlan_gpe_ioam_export/vxlan_gpe_ioam_export.ba.go b/binapi/vxlan_gpe_ioam_export/vxlan_gpe_ioam_export.ba.go
index 099443f..8820fab 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
@@ -2,6 +2,7 @@
// versions:
// binapi-generator: v0.4.0-dev
// VPP: 20.05-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/binapigen/generator_test.go b/binapigen/generator_test.go
index 1dfaca4..7f334a9 100644
--- a/binapigen/generator_test.go
+++ b/binapigen/generator_test.go
@@ -15,6 +15,9 @@
package binapigen
import (
+ "fmt"
+ "git.fd.io/govpp.git/binapigen/vppapi"
+ . "github.com/onsi/gomega"
"testing"
)
@@ -45,10 +48,111 @@ func TestBinapiTypeSizes(t *testing.T) {
}
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
- size := getSizeOfBinapiTypeLength(test.input, 1)
+ size := getSizeOfBinapiBaseType(test.input, 1)
if size != test.expsize {
t.Errorf("expected %d, got %d", test.expsize, size)
}
})
}
}
+
+func TestBinapiUnionSizes(t *testing.T) {
+ RegisterTestingT(t)
+ tests := []struct {
+ testName string
+ input *Union
+ expsize int
+ }{
+ {testName: "union_alias", input: typeTestData{
+ typ: "union", fields: []*typeTestData{{typ: "alias", value: U16},
+ }}.getUnion("union1"), expsize: 2},
+ {testName: "union_enum", input: typeTestData{
+ typ: "union", fields: []*typeTestData{{typ: "enum", value: U32},
+ }}.getUnion("union2"), expsize: 4},
+ {testName: "union_struct", input: typeTestData{
+ typ: "union", fields: []*typeTestData{
+ {typ: "struct", fields: []*typeTestData{{value: U8}, {value: U16}, {value: U32}}},
+ }}.getUnion("union3"), expsize: 7},
+ {testName: "union_structs", input: typeTestData{
+ typ: "union", fields: []*typeTestData{
+ {typ: "struct", fields: []*typeTestData{{value: U8}, {value: BOOL}}},
+ {typ: "struct", fields: []*typeTestData{{value: U16}, {value: U32}}},
+ {typ: "struct", fields: []*typeTestData{{value: U32}, {value: U64}}},
+ }}.getUnion("union4"), expsize: 12},
+ {testName: "union_unions", input: typeTestData{
+ typ: "union", fields: []*typeTestData{
+ {typ: "union", fields: []*typeTestData{
+ {typ: "struct", fields: []*typeTestData{{value: STRING}}},
+ }},
+ {typ: "union", fields: []*typeTestData{
+ {typ: "struct", fields: []*typeTestData{{value: U32}}},
+ }},
+ {typ: "union", fields: []*typeTestData{
+ {typ: "struct", fields: []*typeTestData{{value: U64}}},
+ }},
+ }}.getUnion("union5"), expsize: 8},
+ {testName: "union_combined", input: typeTestData{
+ typ: "union", fields: []*typeTestData{
+ {typ: "alias", value: U8},
+ {typ: "enum", value: U16},
+ {typ: "struct", fields: []*typeTestData{{value: U8}, {value: U16}, {value: U32}}}, // <-
+ {typ: "union", fields: []*typeTestData{
+ {typ: "alias", value: U16},
+ {typ: "enum", value: U16},
+ {typ: "struct", fields: []*typeTestData{{value: U32}}},
+ }},
+ }}.getUnion("union6"), expsize: 7},
+ }
+ for _, test := range tests {
+ t.Run(test.testName, func(t *testing.T) {
+ size := getUnionSize(test.input)
+ Expect(size).To(Equal(test.expsize))
+ })
+ }
+}
+
+// Typed data used for union size evaluation testing.
+type typeTestData struct {
+ typ string
+ value string
+ fields []*typeTestData
+}
+
+func (t typeTestData) getUnion(name string) *Union {
+ return &Union{
+ UnionType: vppapi.UnionType{Name: name},
+ Fields: t.getUnionFields(name),
+ }
+}
+
+func (t typeTestData) getUnionFields(parentName string) (fields []*Field) {
+ for i, field := range t.fields {
+ var (
+ dataType string
+ aliasType *Alias
+ enumType *Enum
+ structType *Struct
+ unionType *Union
+ )
+ switch field.typ {
+ case "alias":
+ aliasType = &Alias{AliasType: vppapi.AliasType{Name: fmt.Sprintf("%s_alias_%d", parentName, i), Type: field.value}}
+ case "enum":
+ enumType = &Enum{EnumType: vppapi.EnumType{Name: fmt.Sprintf("%s_enum_%d", parentName, i), Type: field.value}}
+ case "struct":
+ structType = &Struct{Fields: field.getUnionFields(fmt.Sprintf("%s_struct_%d", parentName, i))}
+ case "union":
+ unionType = field.getUnion(parentName)
+ default:
+ dataType = field.value
+ }
+ fields = append(fields, &Field{
+ Field: vppapi.Field{Name: fmt.Sprintf("%s_field_%d", parentName, i), Type: dataType},
+ TypeAlias: aliasType,
+ TypeEnum: enumType,
+ TypeStruct: structType,
+ TypeUnion: unionType,
+ })
+ }
+ return fields
+}
diff --git a/binapigen/types.go b/binapigen/types.go
index 1d0dae5..addb122 100644
--- a/binapigen/types.go
+++ b/binapigen/types.go
@@ -128,45 +128,59 @@ func getFieldType(g *GenFile, field *Field) string {
return gotype
}
-func getSizeOfBinapiTypeLength(typ string, length int) (size int) {
- if n := BaseTypeSizes[typ]; n > 0 {
- if length > 0 {
- return n * length
- } else {
- return n
+func getUnionSize(union *Union) (maxSize int) {
+ for _, field := range union.Fields {
+ if size, isBaseType := getSizeOfField(field); isBaseType {
+ logrus.Panicf("union %s field %s has unexpected type %q", union.Name, field.Name, field.Type)
+ } else if size > maxSize {
+ maxSize = size
}
}
+ //logf("getUnionSize: %s %+v max=%v", union.Name, union.Fields, maxSize)
return
}
-func getSizeOfType(typ *Struct) (size int) {
+func getSizeOfField(field *Field) (size int, isBaseType bool) {
+ if alias := field.TypeAlias; alias != nil {
+ size = getSizeOfBinapiBaseType(alias.Type, alias.Length)
+ return
+ }
+ if enum := field.TypeEnum; enum != nil {
+ size = getSizeOfBinapiBaseType(enum.Type, field.Length)
+ return
+ }
+ if structType := field.TypeStruct; structType != nil {
+ size = getSizeOfStruct(structType)
+ return
+ }
+ if union := field.TypeUnion; union != nil {
+ size = getUnionSize(union)
+ return
+ }
+ return size, true
+}
+
+func getSizeOfStruct(typ *Struct) (size int) {
for _, field := range typ.Fields {
- if enum := field.TypeEnum; enum != nil {
- size += getSizeOfBinapiTypeLength(enum.Type, field.Length)
+ fieldSize, isBaseType := getSizeOfField(field)
+ if isBaseType {
+ size += getSizeOfBinapiBaseType(field.Type, field.Length)
continue
}
- size += getSizeOfBinapiTypeLength(field.Type, field.Length)
+ size += fieldSize
}
return size
}
-func getUnionSize(union *Union) (maxSize int) {
- for _, field := range union.Fields {
- if typ := field.TypeStruct; typ != nil {
- if size := getSizeOfType(typ); size > maxSize {
- maxSize = size
- }
- continue
- }
- if alias := field.TypeAlias; alias != nil {
- if size := getSizeOfBinapiTypeLength(alias.Type, alias.Length); size > maxSize {
- maxSize = size
- }
- continue
+// Returns size of base type multiplied by length. Length equal to zero
+// returns base type size.
+func getSizeOfBinapiBaseType(typ string, length int) (size int) {
+ if n := BaseTypeSizes[typ]; n > 0 {
+ if length > 1 {
+ return n * length
} else {
- logrus.Panicf("no type or alias found for union %s field type %q", union.Name, field.Type)
+ return n
}
}
- //logf("getUnionSize: %s %+v max=%v", union.Name, union.Fields, maxSize)
return
}