binapigen: fix union size 84/28884/2
authorVladimir Lavor <vlavor@cisco.com>
Wed, 16 Sep 2020 11:44:31 +0000 (13:44 +0200)
committerVladimir Lavor <vlavor@cisco.com>
Fri, 18 Sep 2020 08:41:12 +0000 (10:41 +0200)
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>
112 files changed:
binapi/abf/abf.ba.go
binapi/acl/acl.ba.go
binapi/acl_types/acl_types.ba.go
binapi/af_packet/af_packet.ba.go
binapi/arp/arp.ba.go
binapi/avf/avf.ba.go
binapi/bfd/bfd.ba.go
binapi/bier/bier.ba.go
binapi/bond/bond.ba.go
binapi/builtinurl/builtinurl.ba.go
binapi/cdp/cdp.ba.go
binapi/classify/classify.ba.go
binapi/cop/cop.ba.go
binapi/ct6/ct6.ba.go
binapi/dhcp/dhcp.ba.go
binapi/dhcp6_ia_na_client_cp/dhcp6_ia_na_client_cp.ba.go
binapi/dhcp6_pd_client_cp/dhcp6_pd_client_cp.ba.go
binapi/dns/dns.ba.go
binapi/dslite/dslite.ba.go
binapi/ethernet_types/ethernet_types.ba.go
binapi/feature/feature.ba.go
binapi/fib_types/fib_types.ba.go
binapi/flowprobe/flowprobe.ba.go
binapi/gbp/gbp.ba.go
binapi/geneve/geneve.ba.go
binapi/gre/gre.ba.go
binapi/gso/gso.ba.go
binapi/gtpu/gtpu.ba.go
binapi/http_static/http_static.ba.go
binapi/igmp/igmp.ba.go
binapi/ikev2/ikev2.ba.go
binapi/interface/interface.ba.go
binapi/interface_types/interface_types.ba.go
binapi/ioam_cache/ioam_cache.ba.go
binapi/ioam_export/ioam_export.ba.go
binapi/ioam_vxlan_gpe/ioam_vxlan_gpe.ba.go
binapi/ip/ip.ba.go
binapi/ip6_nd/ip6_nd.ba.go
binapi/ip_neighbor/ip_neighbor.ba.go
binapi/ip_types/ip_types.ba.go
binapi/ipfix_export/ipfix_export.ba.go
binapi/ipip/ipip.ba.go
binapi/ipsec/ipsec.ba.go
binapi/ipsec_types/ipsec_types.ba.go
binapi/l2/l2.ba.go
binapi/l2e/l2e.ba.go
binapi/l2tp/l2tp.ba.go
binapi/l3xc/l3xc.ba.go
binapi/lacp/lacp.ba.go
binapi/lb/lb.ba.go
binapi/lb_types/lb_types.ba.go
binapi/lisp/lisp.ba.go
binapi/lisp_gpe/lisp_gpe.ba.go
binapi/lisp_types/lisp_types.ba.go
binapi/lldp/lldp.ba.go
binapi/mactime/mactime.ba.go
binapi/map/map.ba.go
binapi/mdata/mdata.ba.go
binapi/memclnt/memclnt.ba.go
binapi/memif/memif.ba.go
binapi/mfib_types/mfib_types.ba.go
binapi/mpls/mpls.ba.go
binapi/nat/nat.ba.go
binapi/nsh/nsh.ba.go
binapi/nsim/nsim.ba.go
binapi/oddbuf/oddbuf.ba.go
binapi/one/one.ba.go
binapi/p2p_ethernet/p2p_ethernet.ba.go
binapi/pci_types/pci_types.ba.go
binapi/pg/pg.ba.go
binapi/pipe/pipe.ba.go
binapi/policer/policer.ba.go
binapi/policer_types/policer_types.ba.go
binapi/pot/pot.ba.go
binapi/pp2/pp2.ba.go [deleted file]
binapi/pp2/pp2_rest.ba.go [deleted file]
binapi/pp2/pp2_rpc.ba.go [deleted file]
binapi/pppoe/pppoe.ba.go
binapi/punt/punt.ba.go
binapi/qos/qos.ba.go
binapi/rd_cp/rd_cp.ba.go
binapi/rdma/rdma.ba.go
binapi/session/session.ba.go
binapi/span/span.ba.go
binapi/sr/sr.ba.go
binapi/sr_mpls/sr_mpls.ba.go
binapi/sr_types/sr_types.ba.go
binapi/stn/stn.ba.go
binapi/svs/svs.ba.go
binapi/syslog/syslog.ba.go
binapi/tapv2/tapv2.ba.go
binapi/tcp/tcp.ba.go
binapi/teib/teib.ba.go
binapi/tls_openssl/tls_openssl.ba.go
binapi/trace/trace.ba.go
binapi/tunnel_types/tunnel_types.ba.go
binapi/udp/udp.ba.go
binapi/udp_ping/udp_ping.ba.go
binapi/urpf/urpf.ba.go
binapi/vhost_user/vhost_user.ba.go
binapi/virtio/virtio.ba.go
binapi/virtio_types/virtio_types.ba.go
binapi/vmxnet3/vmxnet3.ba.go
binapi/vpe/vpe.ba.go
binapi/vpe_types/vpe_types.ba.go
binapi/vrrp/vrrp.ba.go
binapi/vxlan/vxlan.ba.go
binapi/vxlan_gbp/vxlan_gbp.ba.go
binapi/vxlan_gpe/vxlan_gpe.ba.go
binapi/vxlan_gpe_ioam_export/vxlan_gpe_ioam_export.ba.go
binapigen/generator_test.go
binapigen/types.go

index 296b4c5..2b28afe 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package abf contains generated bindings for API file abf.api.
 //
index 6c507e6..1f47a01 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package acl contains generated bindings for API file acl.api.
 //
index 753701a..0c8efc2 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package acl_types contains generated bindings for API file acl_types.api.
 //
index 9367352..750e2ce 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package af_packet contains generated bindings for API file af_packet.api.
 //
index c9806df..90ff55b 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package arp contains generated bindings for API file arp.api.
 //
index 6f93d23..edfa26e 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package avf contains generated bindings for API file avf.api.
 //
index e5ba5ce..65b828f 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package bfd contains generated bindings for API file bfd.api.
 //
index 089a970..f024d80 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package bier contains generated bindings for API file bier.api.
 //
index 1896119..c9e7027 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package bond contains generated bindings for API file bond.api.
 //
index 0ea651b..6b0350d 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package builtinurl contains generated bindings for API file builtinurl.api.
 //
index 9dd71c9..5430d74 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package cdp contains generated bindings for API file cdp.api.
 //
index 373e256..16bc4b8 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package classify contains generated bindings for API file classify.api.
 //
index 675b32c..14f0b11 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package cop contains generated bindings for API file cop.api.
 //
index cf34219..5dc6097 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package ct6 contains generated bindings for API file ct6.api.
 //
index b0ed4cb..4adc88b 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package dhcp contains generated bindings for API file dhcp.api.
 //
index cd258b1..4fcb012 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package dhcp6_ia_na_client_cp contains generated bindings for API file dhcp6_ia_na_client_cp.api.
 //
index ab06190..7e4e2bb 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package dhcp6_pd_client_cp contains generated bindings for API file dhcp6_pd_client_cp.api.
 //
index a30c0b4..fc2324c 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package dns contains generated bindings for API file dns.api.
 //
index d94de18..efcf240 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package dslite contains generated bindings for API file dslite.api.
 //
index 98bbead..63b1034 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package ethernet_types contains generated bindings for API file ethernet_types.api.
 //
index ec87906..cc54364 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package feature contains generated bindings for API file feature.api.
 //
index 75e87e9..3194edf 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package fib_types contains generated bindings for API file fib_types.api.
 //
index 92e155b..b158c6d 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package flowprobe contains generated bindings for API file flowprobe.api.
 //
index 1ede1ac..066371a 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package gbp contains generated bindings for API file gbp.api.
 //
index e314f0a..fcd512d 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package geneve contains generated bindings for API file geneve.api.
 //
index 1a123bd..9fa68cb 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package gre contains generated bindings for API file gre.api.
 //
index e492e5d..78e7536 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package gso contains generated bindings for API file gso.api.
 //
index de7d29f..96ae51f 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package gtpu contains generated bindings for API file gtpu.api.
 //
index 5f6397b..2116a8b 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package http_static contains generated bindings for API file http_static.api.
 //
index 558d533..a43b599 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package igmp contains generated bindings for API file igmp.api.
 //
index f76c6c3..5fc68c3 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package ikev2 contains generated bindings for API file ikev2.api.
 //
index cadb109..822c325 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package interfaces contains generated bindings for API file interface.api.
 //
index 191647a..f7f8c2e 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package interface_types contains generated bindings for API file interface_types.api.
 //
index 19e8104..2f9f0ef 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package ioam_cache contains generated bindings for API file ioam_cache.api.
 //
index b5176c7..47dd4e2 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package ioam_export contains generated bindings for API file ioam_export.api.
 //
index 2d582cd..7d1bb35 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package ioam_vxlan_gpe contains generated bindings for API file ioam_vxlan_gpe.api.
 //
index 628f1e0..b036e9c 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package ip contains generated bindings for API file ip.api.
 //
index 48bb86f..a5f308e 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package ip6_nd contains generated bindings for API file ip6_nd.api.
 //
index 2ece5ee..3215f5d 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package ip_neighbor contains generated bindings for API file ip_neighbor.api.
 //
index a9fc733..90363f8 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // 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 {
 
 // 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
 }
 
        XXX_UnionData [16]byte
 }
 
index 3a9b754..e173058 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package ipfix_export contains generated bindings for API file ipfix_export.api.
 //
index aa44f00..05821cb 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package ipip contains generated bindings for API file ipip.api.
 //
index bfb757b..b777353 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package ipsec contains generated bindings for API file ipsec.api.
 //
index 407caeb..4e7e29e 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package ipsec_types contains generated bindings for API file ipsec_types.api.
 //
index cc39b49..d924837 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package l2 contains generated bindings for API file l2.api.
 //
index edca663..c1b2a76 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package l2e contains generated bindings for API file l2e.api.
 //
index 57ec0c0..574598e 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package l2tp contains generated bindings for API file l2tp.api.
 //
index 0a05915..3dbcfba 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package l3xc contains generated bindings for API file l3xc.api.
 //
index 5ea6044..f1a9457 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package lacp contains generated bindings for API file lacp.api.
 //
index 636c27a..9fdfc7f 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package lb contains generated bindings for API file lb.api.
 //
index 9752c36..7e41146 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package lb_types contains generated bindings for API file lb_types.api.
 //
index ca8622a..7be6cca 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // 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
        }
        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) {
        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.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.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 {
        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())
        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())
        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
 }
 
        return nil
 }
 
@@ -177,7 +178,7 @@ func (m *LispAddDelLocalEid) Size() (size int) {
        }
        size += 1      // m.IsAdd
        size += 1      // m.Eid.Type
        }
        size += 1      // m.IsAdd
        size += 1      // m.Eid.Type
-       size += 1 *  // m.Eid.Address
+       size += 1 * 18 // m.Eid.Address
        size += 64     // m.LocatorSetName
        size += 4      // m.Vni
        size += 1      // m.Key.ID
        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 := 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))
        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())
        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())
        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
        }
        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
        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.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.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
        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())
        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())
        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++ {
        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]
                }
                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
 }
        }
        return size
 }
@@ -860,9 +861,9 @@ func (m *LispAdjacenciesGetReply) Marshal(b []byte) ([]byte, error) {
                        v0 = m.Adjacencies[j0]
                }
                buf.EncodeUint8(uint8(v0.Reid.Type))
                        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.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
 }
        }
        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())
        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())
                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
 }
        }
        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      // m.IsSrcDst
        size += 4      // m.Vni
        size += 1      // m.Deid.Type
-       size += 1 *  // m.Deid.Address
+       size += 1 * 18 // m.Deid.Address
        size += 1      // m.Seid.Type
        size += 1      // m.Seid.Type
-       size += 1 *  // m.Seid.Address
+       size += 1 * 18 // m.Seid.Address
        size += 4      // m.TTL
        size += 1      // m.Authoritative
        size += 1      // m.Key.ID
        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.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.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))
        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())
        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())
        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())
        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
        }
        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) {
        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.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
 }
        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())
        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
 }
        m.Filter = LispLocatorSetFilter(buf.DecodeUint8())
        return nil
 }
index 3ae307b..5106c84 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // 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
        }
        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
        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 := 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.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)
        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())
        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())
        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()
        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]
                }
                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
 }
        }
        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.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.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)
        }
                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())
                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())
                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()
        }
                m.Entries[j0].Vni = buf.DecodeUint32()
                m.Entries[j0].Action = buf.DecodeUint8()
        }
index 1fddd55..a7302f2 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // 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 {
 
 // 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'.
 }
 
 // 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"`
 }
 
        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
 }
        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)
 }
        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))
        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
 }
 
        return
 }
 
-func EidAddressMac(a ethernet_types.MacAddress) (u EidAddress) {
+func EidAddressUnionMac(a ethernet_types.MacAddress) (u EidAddressUnion) {
        u.SetMac(a)
        return
 }
        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)
 }
        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
 }
 
        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
 }
        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)
 }
        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()
        buf := codec.NewBuffer(u.XXX_UnionData[:])
        a.Spi = buf.DecodeUint32()
        a.Si = buf.DecodeUint8()
index 1775ecc..a8769b5 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package lldp contains generated bindings for API file lldp.api.
 //
index bfc8da4..deb7472 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package mactime contains generated bindings for API file mactime.api.
 //
index 6eb6cdc..b906284 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package maps contains generated bindings for API file map.api.
 //
index 4a7f74c..d4715f7 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package mdata contains generated bindings for API file mdata.api.
 //
index e262ca8..3bbf88d 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package memclnt contains generated bindings for API file memclnt.api.
 //
index f77555c..fddd0ab 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package memif contains generated bindings for API file memif.api.
 //
index 4e90440..1d6ddef 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package mfib_types contains generated bindings for API file mfib_types.api.
 //
index 6c9751c..9443728 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package mpls contains generated bindings for API file mpls.api.
 //
index 16b3d51..c21307f 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package nat contains generated bindings for API file nat.api.
 //
index 160f7bd..5897a90 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package nsh contains generated bindings for API file nsh.api.
 //
index 5a22c32..fb540ac 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package nsim contains generated bindings for API file nsim.api.
 //
index e28998e..c6f3e21 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package oddbuf contains generated bindings for API file oddbuf.api.
 //
index e59be59..01a5597 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // 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
        }
        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) {
        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.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.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 {
        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())
        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())
        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
 }
 
        return nil
 }
 
@@ -293,7 +294,7 @@ func (m *OneAddDelLocalEid) Size() (size int) {
        }
        size += 1      // m.IsAdd
        size += 1      // m.Eid.Type
        }
        size += 1      // m.IsAdd
        size += 1      // m.Eid.Type
-       size += 1 *  // m.Eid.Address
+       size += 1 * 18 // m.Eid.Address
        size += 64     // m.LocatorSetName
        size += 4      // m.Vni
        size += 1      // m.Key.ID
        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 := 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))
        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())
        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())
        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
        }
        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
        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.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.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
        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())
        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())
        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++ {
        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]
                }
                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
 }
        }
        return size
 }
@@ -1053,9 +1054,9 @@ func (m *OneAdjacenciesGetReply) Marshal(b []byte) ([]byte, error) {
                        v0 = m.Adjacencies[j0]
                }
                buf.EncodeUint8(uint8(v0.Reid.Type))
                        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.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
 }
        }
        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())
        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())
                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
 }
        }
        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      // m.IsSrcDst
        size += 4      // m.Vni
        size += 1      // m.Deid.Type
-       size += 1 *  // m.Deid.Address
+       size += 1 * 18 // m.Deid.Address
        size += 1      // m.Seid.Type
        size += 1      // m.Seid.Type
-       size += 1 *  // m.Seid.Address
+       size += 1 * 18 // m.Seid.Address
        size += 4      // m.TTL
        size += 1      // m.Authoritative
        size += 1      // m.Key.ID
        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.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.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))
        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())
        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())
        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())
        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
        }
        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) {
        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.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
 }
        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())
        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
 }
        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 += 4      // m.Vni
        size += 1      // m.Deid.Type
-       size += 1 *  // m.Deid.Address
+       size += 1 * 18 // m.Deid.Address
        size += 1      // m.Seid.Type
        size += 1      // m.Seid.Type
-       size += 1 *  // 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
        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 := 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.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))
        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())
        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())
        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())
        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())
index 4d40c6f..2f76041 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package p2p_ethernet contains generated bindings for API file p2p_ethernet.api.
 //
index c74ecc2..7b0d00c 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package pci_types contains generated bindings for API file pci_types.api.
 //
index d2b26a0..9a522c2 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package pg contains generated bindings for API file pg.api.
 //
index 8cc2d62..6123059 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package pipe contains generated bindings for API file pipe.api.
 //
index e86ec0e..1314dce 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package policer contains generated bindings for API file policer.api.
 //
index a103888..bdb259a 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package policer_types contains generated bindings for API file policer_types.api.
 //
index d060394..2c2d1f4 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // 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 (file)
index ad91739..0000000
+++ /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 (file)
index d3e69c0..0000000
+++ /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 (file)
index d1f0bf5..0000000
+++ /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
-}
index cb310fb..e01d3b5 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package pppoe contains generated bindings for API file pppoe.api.
 //
index f8483fc..1a84dbf 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // 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 {
 
 // 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
 }
 
        XXX_UnionData [4]byte
 }
 
index 21201f0..285e2c8 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package qos contains generated bindings for API file qos.api.
 //
index ca35324..8cafa0f 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package rd_cp contains generated bindings for API file rd_cp.api.
 //
index 3dc2f9f..f331fc6 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package rdma contains generated bindings for API file rdma.api.
 //
index 3d66275..09a67b0 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package session contains generated bindings for API file session.api.
 //
index 6cced54..74855b1 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package span contains generated bindings for API file span.api.
 //
index ee83937..2b98b8a 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package sr contains generated bindings for API file sr.api.
 //
index 9785405..e6bd9f0 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package sr_mpls contains generated bindings for API file sr_mpls.api.
 //
index 8a21c76..7a2007e 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package sr_types contains generated bindings for API file sr_types.api.
 //
index 035a819..b44adf5 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package stn contains generated bindings for API file stn.api.
 //
index 788864c..911e936 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package svs contains generated bindings for API file svs.api.
 //
index bb49eae..cf8f754 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package syslog contains generated bindings for API file syslog.api.
 //
index b9443a6..028ff67 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package tapv2 contains generated bindings for API file tapv2.api.
 //
index 06ffcdf..7ae3ecc 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package tcp contains generated bindings for API file tcp.api.
 //
index d4473c7..d37f391 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package teib contains generated bindings for API file teib.api.
 //
index 8b8f318..938a9df 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package tls_openssl contains generated bindings for API file tls_openssl.api.
 //
index c360cbd..9bc330b 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package trace contains generated bindings for API file trace.api.
 //
index ae9f53f..a79ee18 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package tunnel_types contains generated bindings for API file tunnel_types.api.
 //
index 52109ca..7795100 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package udp contains generated bindings for API file udp.api.
 //
index a457715..7247b38 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package udp_ping contains generated bindings for API file udp_ping.api.
 //
index af7f5b4..e277537 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package urpf contains generated bindings for API file urpf.api.
 //
index f384bac..0ca7119 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package vhost_user contains generated bindings for API file vhost_user.api.
 //
index 133f0ac..b29b52f 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package virtio contains generated bindings for API file virtio.api.
 //
index e8a262d..d78740a 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package virtio_types contains generated bindings for API file virtio_types.api.
 //
index 2abc2a0..77937fa 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package vmxnet3 contains generated bindings for API file vmxnet3.api.
 //
index 594f0c4..046bd68 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package vpe contains generated bindings for API file vpe.api.
 //
index 6a93afd..f1d21b0 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package vpe_types contains generated bindings for API file vpe_types.api.
 //
index b854828..b00f281 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package vrrp contains generated bindings for API file vrrp.api.
 //
index d4c617f..048b2fa 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package vxlan contains generated bindings for API file vxlan.api.
 //
index 53554c9..0876906 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package vxlan_gbp contains generated bindings for API file vxlan_gbp.api.
 //
index d36b98e..0858ada 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package vxlan_gpe contains generated bindings for API file vxlan_gpe.api.
 //
index 099443f..8820fab 100644 (file)
@@ -2,6 +2,7 @@
 // versions:
 //  binapi-generator: v0.4.0-dev
 //  VPP:              20.05-release
 // 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.
 //
 
 // Package vxlan_gpe_ioam_export contains generated bindings for API file vxlan_gpe_ioam_export.api.
 //
index 1dfaca4..7f334a9 100644 (file)
@@ -15,6 +15,9 @@
 package binapigen
 
 import (
 package binapigen
 
 import (
+       "fmt"
+       "git.fd.io/govpp.git/binapigen/vppapi"
+       . "github.com/onsi/gomega"
        "testing"
 )
 
        "testing"
 )
 
@@ -45,10 +48,111 @@ func TestBinapiTypeSizes(t *testing.T) {
        }
        for _, test := range tests {
                t.Run(test.name, func(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)
                        }
                })
        }
 }
                        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
+}
index 1d0dae5..addb122 100644 (file)
@@ -128,45 +128,59 @@ func getFieldType(g *GenFile, field *Field) string {
        return gotype
 }
 
        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
 }
 
        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 {
        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
                }
                        continue
                }
-               size += getSizeOfBinapiTypeLength(field.Type, field.Length)
+               size += fieldSize
        }
        return size
 }
 
        }
        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 {
                } 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
 }
        return
 }