aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Skrzypczak <nathan.skrzypczak@gmail.com>2022-05-30 17:18:34 +0200
committerNathan Skrzypczak <nathan.skrzypczak@gmail.com>2022-05-30 18:49:43 +0200
commite9567fa8c853dda16c54afbd2ba99b7263fa37f1 (patch)
treef722a72f13cccdd9f13bdaff200e734849ee0853
parent4102c72bce694babd94a481b1201d33895a6f9c5 (diff)
binapi: remove internal/testbinapi
This patch is a proposal to remove the necessity to version two versions of the generated api. We would rely on `./binapi/` for 'internal' logic, making the dependancy on VPP a bit stronger, but removing a folder and a .json file we don't upgrade regularly. Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com> Change-Id: I99063ed571eb193271b3cda805d692155ac90f61
-rw-r--r--Makefile8
-rw-r--r--binapigen/generate.go2
-rw-r--r--cmd/binapi-generator/main.go2
-rw-r--r--codec/marshaler_test.go5
-rw-r--r--govpp.go2
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/VPP_VERSION1
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/af_packet.api.json367
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/arp.api.json648
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/bfd.api.json1254
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/bier.api.json1086
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/bond.api.json620
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/classify.api.json1154
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/cop.api.json277
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/ethernet_types.api.json15
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/feature.api.json228
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/fib_types.api.json482
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/geneve.api.json649
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/gre.api.json617
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/gso.api.json218
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/interface.api.json1902
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/interface_types.api.json167
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/ip.api.json3219
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/ip6_nd.api.json912
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/ip_neighbor.api.json736
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/ip_types.api.json298
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/ipfix_export.api.json664
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/ipip.api.json764
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/ipip_types.api.json41
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/ipsec.api.json1580
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/ipsec_types.api.json493
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/l2.api.json2015
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/l2tp.api.json767
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/lisp.api.json1704
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/lisp_gpe.api.json630
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/lldp.api.json133
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/memclnt.api.json595
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/mfib_types.api.json786
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/mpls.api.json1378
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/netmap.api.json119
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/nhrp.api.json561
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/one.api.json2867
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/p2p_ethernet.api.json277
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/pci_types.api.json32
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/pg.api.json183
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/pipe.api.json319
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/policer.api.json264
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/punt.api.json629
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/qos.api.json956
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/rd_cp.api.json222
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/session.api.json1372
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/span.api.json125
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/sr.api.json656
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/sr_mpls.api.json324
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/syslog.api.json542
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/tapv2.api.json775
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/tcp.api.json351
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/udp.api.json457
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/vhost_user.api.json528
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/virtio.api.json365
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/virtio_types.api.json93
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/vpe.api.json772
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/vpe_types.api.json86
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/vxlan.api.json275
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/vxlan_gbp.api.json656
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/core/vxlan_gpe.api.json224
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/abf.api.json1161
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/acl.api.json1095
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/acl_types.api.json98
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/avf.api.json277
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/builtinurl.api.json53
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/cdp.api.json57
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/ct6.api.json222
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/dhcp.api.json1581
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/dhcp6_ia_na_client_cp.api.json218
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/dhcp6_pd_client_cp.api.json563
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/dns.api.json224
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/flowprobe.api.json309
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/gbp.api.json1930
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/gtpu.api.json645
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/http_static.api.json79
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/igmp.api.json969
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/ikev2.api.json1187
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/ioam_cache.api.json57
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/ioam_export.api.json351
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/ioam_vxlan_gpe.api.json594
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/l2e.api.json218
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/l3xc.api.json841
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/lacp.api.json289
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/lb.api.json1090
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/lb_types.api.json437
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/mactime.api.json424
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/map.api.json1283
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/mdata.api.json214
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/memif.api.json516
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/nat.api.json4157
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/nsh.api.json499
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/nsim.api.json324
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/oddbuf.api.json218
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/pot.api.json258
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/pppoe.api.json590
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/rdma.api.json313
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/sctp.api.json175
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/stn.api.json550
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/svs.api.json707
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/tls_openssl.api.json72
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/trace.api.json171
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/udp_ping.api.json423
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/vmxnet3.api.json418
-rw-r--r--internal/testbinapi/binapi2001/.vppapi/plugins/vxlan_gpe_ioam_export.api.json351
-rw-r--r--internal/testbinapi/binapi2001/abf/abf.ba.go1600
-rw-r--r--internal/testbinapi/binapi2001/abf/abf_rpc.ba.go142
-rw-r--r--internal/testbinapi/binapi2001/acl/acl.ba.go1822
-rw-r--r--internal/testbinapi/binapi2001/acl/acl_rpc.ba.go384
-rw-r--r--internal/testbinapi/binapi2001/acl_types/acl_types.ba.go55
-rw-r--r--internal/testbinapi/binapi2001/af_packet/af_packet.ba.go628
-rw-r--r--internal/testbinapi/binapi2001/af_packet/af_packet_rpc.ba.go98
-rw-r--r--internal/testbinapi/binapi2001/arp/arp.ba.go1222
-rw-r--r--internal/testbinapi/binapi2001/arp/arp_rpc.ba.go132
-rw-r--r--internal/testbinapi/binapi2001/avf/avf.ba.go457
-rw-r--r--internal/testbinapi/binapi2001/avf/avf_rpc.ba.go41
-rw-r--r--internal/testbinapi/binapi2001/bfd/bfd.ba.go2111
-rw-r--r--internal/testbinapi/binapi2001/bfd/bfd_rpc.ba.go232
-rw-r--r--internal/testbinapi/binapi2001/bier/bier.ba.go2011
-rw-r--r--internal/testbinapi/binapi2001/bier/bier_rpc.ba.go304
-rw-r--r--internal/testbinapi/binapi2001/bond/bond.ba.go981
-rw-r--r--internal/testbinapi/binapi2001/bond/bond_rpc.ba.go162
-rw-r--r--internal/testbinapi/binapi2001/builtinurl/builtinurl.ba.go103
-rw-r--r--internal/testbinapi/binapi2001/builtinurl/builtinurl_rpc.ba.go31
-rw-r--r--internal/testbinapi/binapi2001/cdp/cdp.ba.go109
-rw-r--r--internal/testbinapi/binapi2001/cdp/cdp_rpc.ba.go31
-rw-r--r--internal/testbinapi/binapi2001/classify/classify.ba.go1662
-rw-r--r--internal/testbinapi/binapi2001/classify/classify_rpc.ba.go266
-rw-r--r--internal/testbinapi/binapi2001/cop/cop.ba.go461
-rw-r--r--internal/testbinapi/binapi2001/cop/cop_rpc.ba.go41
-rw-r--r--internal/testbinapi/binapi2001/ct6/ct6.ba.go375
-rw-r--r--internal/testbinapi/binapi2001/ct6/ct6_rpc.ba.go31
-rw-r--r--internal/testbinapi/binapi2001/dhcp/dhcp.ba.go2641
-rw-r--r--internal/testbinapi/binapi2001/dhcp/dhcp_rpc.ba.go222
-rw-r--r--internal/testbinapi/binapi2001/dhcp6_ia_na_client_cp/dhcp6_ia_na_client_cp.ba.go373
-rw-r--r--internal/testbinapi/binapi2001/dhcp6_ia_na_client_cp/dhcp6_ia_na_client_cp_rpc.ba.go31
-rw-r--r--internal/testbinapi/binapi2001/dhcp6_pd_client_cp/dhcp6_pd_client_cp.ba.go1060
-rw-r--r--internal/testbinapi/binapi2001/dhcp6_pd_client_cp/dhcp6_pd_client_cp_rpc.ba.go41
-rw-r--r--internal/testbinapi/binapi2001/dns/dns.ba.go357
-rw-r--r--internal/testbinapi/binapi2001/dns/dns_rpc.ba.go61
-rw-r--r--internal/testbinapi/binapi2001/ethernet_types/ethernet_types.ba.go64
-rw-r--r--internal/testbinapi/binapi2001/feature/feature.ba.go379
-rw-r--r--internal/testbinapi/binapi2001/feature/feature_rpc.ba.go31
-rw-r--r--internal/testbinapi/binapi2001/fib_types/fib_types.ba.go799
-rw-r--r--internal/testbinapi/binapi2001/flowprobe/flowprobe.ba.go553
-rw-r--r--internal/testbinapi/binapi2001/flowprobe/flowprobe_rpc.ba.go41
-rw-r--r--internal/testbinapi/binapi2001/gbp/gbp.ba.go3398
-rw-r--r--internal/testbinapi/binapi2001/gbp/gbp_rpc.ba.go560
-rw-r--r--internal/testbinapi/binapi2001/gen.go17
-rw-r--r--internal/testbinapi/binapi2001/geneve/geneve.ba.go1209
-rw-r--r--internal/testbinapi/binapi2001/geneve/geneve_rpc.ba.go88
-rw-r--r--internal/testbinapi/binapi2001/gre/gre.ba.go1162
-rw-r--r--internal/testbinapi/binapi2001/gre/gre_rpc.ba.go78
-rw-r--r--internal/testbinapi/binapi2001/gso/gso.ba.go373
-rw-r--r--internal/testbinapi/binapi2001/gso/gso_rpc.ba.go31
-rw-r--r--internal/testbinapi/binapi2001/gtpu/gtpu.ba.go1175
-rw-r--r--internal/testbinapi/binapi2001/gtpu/gtpu_rpc.ba.go88
-rw-r--r--internal/testbinapi/binapi2001/http_static/http_static.ba.go129
-rw-r--r--internal/testbinapi/binapi2001/http_static/http_static_rpc.ba.go31
-rw-r--r--internal/testbinapi/binapi2001/igmp/igmp.ba.go1717
-rw-r--r--internal/testbinapi/binapi2001/igmp/igmp_rpc.ba.go182
-rw-r--r--internal/testbinapi/binapi2001/ikev2/ikev2.ba.go1992
-rw-r--r--internal/testbinapi/binapi2001/ikev2/ikev2_rpc.ba.go161
-rw-r--r--internal/testbinapi/binapi2001/interface/interface.ba.go3118
-rw-r--r--internal/testbinapi/binapi2001/interface/interface_rpc.ba.go352
-rw-r--r--internal/testbinapi/binapi2001/interface_types/interface_types.ba.go285
-rw-r--r--internal/testbinapi/binapi2001/ioam_cache/ioam_cache.ba.go111
-rw-r--r--internal/testbinapi/binapi2001/ioam_cache/ioam_cache_rpc.ba.go31
-rw-r--r--internal/testbinapi/binapi2001/ioam_export/ioam_export.ba.go717
-rw-r--r--internal/testbinapi/binapi2001/ioam_export/ioam_export_rpc.ba.go31
-rw-r--r--internal/testbinapi/binapi2001/ioam_vxlan_gpe/ioam_vxlan_gpe.ba.go1117
-rw-r--r--internal/testbinapi/binapi2001/ioam_vxlan_gpe/ioam_vxlan_gpe_rpc.ba.go81
-rw-r--r--internal/testbinapi/binapi2001/ip/ip.ba.go4066
-rw-r--r--internal/testbinapi/binapi2001/ip/ip_rpc.ba.go664
-rw-r--r--internal/testbinapi/binapi2001/ip6_nd/ip6_nd.ba.go1551
-rw-r--r--internal/testbinapi/binapi2001/ip6_nd/ip6_nd_rpc.ba.go118
-rw-r--r--internal/testbinapi/binapi2001/ip_neighbor/ip_neighbor.ba.go1376
-rw-r--r--internal/testbinapi/binapi2001/ip_neighbor/ip_neighbor_rpc.ba.go98
-rw-r--r--internal/testbinapi/binapi2001/ip_types/ip_types.ba.go626
-rw-r--r--internal/testbinapi/binapi2001/ipfix_export/ipfix_export.ba.go1193
-rw-r--r--internal/testbinapi/binapi2001/ipfix_export/ipfix_export_rpc.ba.go196
-rw-r--r--internal/testbinapi/binapi2001/ipip/ipip.ba.go1396
-rw-r--r--internal/testbinapi/binapi2001/ipip/ipip_rpc.ba.go108
-rw-r--r--internal/testbinapi/binapi2001/ipip_types/ipip_types.ba.go88
-rw-r--r--internal/testbinapi/binapi2001/ipsec/ipsec.ba.go2621
-rw-r--r--internal/testbinapi/binapi2001/ipsec/ipsec_rpc.ba.go378
-rw-r--r--internal/testbinapi/binapi2001/ipsec_types/ipsec_types.ba.go832
-rw-r--r--internal/testbinapi/binapi2001/l2/l2.ba.go3285
-rw-r--r--internal/testbinapi/binapi2001/l2/l2_rpc.ba.go420
-rw-r--r--internal/testbinapi/binapi2001/l2e/l2e.ba.go371
-rw-r--r--internal/testbinapi/binapi2001/l2e/l2e_rpc.ba.go31
-rw-r--r--internal/testbinapi/binapi2001/l2tp/l2tp.ba.go1400
-rw-r--r--internal/testbinapi/binapi2001/l2tp/l2tp_rpc.ba.go108
-rw-r--r--internal/testbinapi/binapi2001/l3xc/l3xc.ba.go1516
-rw-r--r--internal/testbinapi/binapi2001/l3xc/l3xc_rpc.ba.go98
-rw-r--r--internal/testbinapi/binapi2001/lacp/lacp.ba.go468
-rw-r--r--internal/testbinapi/binapi2001/lacp/lacp_rpc.ba.go68
-rw-r--r--internal/testbinapi/binapi2001/lb/lb.ba.go1834
-rw-r--r--internal/testbinapi/binapi2001/lb/lb_rpc.ba.go172
-rw-r--r--internal/testbinapi/binapi2001/lb_types/lb_types.ba.go810
-rw-r--r--internal/testbinapi/binapi2001/lisp/lisp.ba.go2568
-rw-r--r--internal/testbinapi/binapi2001/lisp/lisp_rpc.ba.go562
-rw-r--r--internal/testbinapi/binapi2001/lisp_gpe/lisp_gpe.ba.go979
-rw-r--r--internal/testbinapi/binapi2001/lisp_gpe/lisp_gpe_rpc.ba.go158
-rw-r--r--internal/testbinapi/binapi2001/lldp/lldp.ba.go212
-rw-r--r--internal/testbinapi/binapi2001/lldp/lldp_rpc.ba.go41
-rw-r--r--internal/testbinapi/binapi2001/mactime/mactime.ba.go700
-rw-r--r--internal/testbinapi/binapi2001/mactime/mactime_rpc.ba.go88
-rw-r--r--internal/testbinapi/binapi2001/map/map.ba.go2164
-rw-r--r--internal/testbinapi/binapi2001/map/map_rpc.ba.go242
-rw-r--r--internal/testbinapi/binapi2001/mdata/mdata.ba.go369
-rw-r--r--internal/testbinapi/binapi2001/mdata/mdata_rpc.ba.go31
-rw-r--r--internal/testbinapi/binapi2001/memclnt/memclnt.ba.go971
-rw-r--r--internal/testbinapi/binapi2001/memclnt/memclnt_rpc.ba.go179
-rw-r--r--internal/testbinapi/binapi2001/memif/memif.ba.go825
-rw-r--r--internal/testbinapi/binapi2001/memif/memif_rpc.ba.go142
-rw-r--r--internal/testbinapi/binapi2001/mfib_types/mfib_types.ba.go863
-rw-r--r--internal/testbinapi/binapi2001/mpls/mpls.ba.go2056
-rw-r--r--internal/testbinapi/binapi2001/mpls/mpls_rpc.ba.go206
-rw-r--r--internal/testbinapi/binapi2001/nat/nat.ba.go6409
-rw-r--r--internal/testbinapi/binapi2001/nat/nat_rpc.ba.go1354
-rw-r--r--internal/testbinapi/binapi2001/netmap/netmap.ba.go198
-rw-r--r--internal/testbinapi/binapi2001/netmap/netmap_rpc.ba.go41
-rw-r--r--internal/testbinapi/binapi2001/nhrp/nhrp.ba.go1067
-rw-r--r--internal/testbinapi/binapi2001/nhrp/nhrp_rpc.ba.go78
-rw-r--r--internal/testbinapi/binapi2001/nsh/nsh.ba.go731
-rw-r--r--internal/testbinapi/binapi2001/nsh/nsh_rpc.ba.go132
-rw-r--r--internal/testbinapi/binapi2001/nsim/nsim.ba.go539
-rw-r--r--internal/testbinapi/binapi2001/nsim/nsim_rpc.ba.go51
-rw-r--r--internal/testbinapi/binapi2001/oddbuf/oddbuf.ba.go373
-rw-r--r--internal/testbinapi/binapi2001/oddbuf/oddbuf_rpc.ba.go31
-rw-r--r--internal/testbinapi/binapi2001/one/one.ba.go4408
-rw-r--r--internal/testbinapi/binapi2001/one/one_rpc.ba.go836
-rw-r--r--internal/testbinapi/binapi2001/p2p_ethernet/p2p_ethernet.ba.go488
-rw-r--r--internal/testbinapi/binapi2001/p2p_ethernet/p2p_ethernet_rpc.ba.go41
-rw-r--r--internal/testbinapi/binapi2001/pci_types/pci_types.ba.go36
-rw-r--r--internal/testbinapi/binapi2001/pg/pg.ba.go287
-rw-r--r--internal/testbinapi/binapi2001/pg/pg_rpc.ba.go51
-rw-r--r--internal/testbinapi/binapi2001/pipe/pipe.ba.go533
-rw-r--r--internal/testbinapi/binapi2001/pipe/pipe_rpc.ba.go88
-rw-r--r--internal/testbinapi/binapi2001/policer/policer.ba.go342
-rw-r--r--internal/testbinapi/binapi2001/policer/policer_rpc.ba.go78
-rw-r--r--internal/testbinapi/binapi2001/pot/pot.ba.go387
-rw-r--r--internal/testbinapi/binapi2001/pot/pot_rpc.ba.go98
-rw-r--r--internal/testbinapi/binapi2001/pppoe/pppoe.ba.go1115
-rw-r--r--internal/testbinapi/binapi2001/pppoe/pppoe_rpc.ba.go78
-rw-r--r--internal/testbinapi/binapi2001/punt/punt.ba.go1142
-rw-r--r--internal/testbinapi/binapi2001/punt/punt_rpc.ba.go142
-rw-r--r--internal/testbinapi/binapi2001/qos/qos.ba.go1664
-rw-r--r--internal/testbinapi/binapi2001/qos/qos_rpc.ba.go250
-rw-r--r--internal/testbinapi/binapi2001/rd_cp/rd_cp.ba.go375
-rw-r--r--internal/testbinapi/binapi2001/rd_cp/rd_cp_rpc.ba.go31
-rw-r--r--internal/testbinapi/binapi2001/rdma/rdma.ba.go491
-rw-r--r--internal/testbinapi/binapi2001/rdma/rdma_rpc.ba.go41
-rw-r--r--internal/testbinapi/binapi2001/sctp/sctp.ba.go285
-rw-r--r--internal/testbinapi/binapi2001/sctp/sctp_rpc.ba.go51
-rw-r--r--internal/testbinapi/binapi2001/session/session.ba.go2026
-rw-r--r--internal/testbinapi/binapi2001/session/session_rpc.ba.go278
-rw-r--r--internal/testbinapi/binapi2001/span/span.ba.go207
-rw-r--r--internal/testbinapi/binapi2001/span/span_rpc.ba.go78
-rw-r--r--internal/testbinapi/binapi2001/sr/sr.ba.go985
-rw-r--r--internal/testbinapi/binapi2001/sr/sr_rpc.ba.go226
-rw-r--r--internal/testbinapi/binapi2001/sr_mpls/sr_mpls.ba.go502
-rw-r--r--internal/testbinapi/binapi2001/sr_mpls/sr_mpls_rpc.ba.go71
-rw-r--r--internal/testbinapi/binapi2001/stn/stn.ba.go1043
-rw-r--r--internal/testbinapi/binapi2001/stn/stn_rpc.ba.go78
-rw-r--r--internal/testbinapi/binapi2001/svs/svs.ba.go1279
-rw-r--r--internal/testbinapi/binapi2001/svs/svs_rpc.ba.go108
-rw-r--r--internal/testbinapi/binapi2001/syslog/syslog.ba.go990
-rw-r--r--internal/testbinapi/binapi2001/syslog/syslog_rpc.ba.go61
-rw-r--r--internal/testbinapi/binapi2001/tapv2/tapv2.ba.go1345
-rw-r--r--internal/testbinapi/binapi2001/tapv2/tapv2_rpc.ba.go88
-rw-r--r--internal/testbinapi/binapi2001/tcp/tcp.ba.go723
-rw-r--r--internal/testbinapi/binapi2001/tcp/tcp_rpc.ba.go31
-rw-r--r--internal/testbinapi/binapi2001/tls_openssl/tls_openssl.ba.go124
-rw-r--r--internal/testbinapi/binapi2001/tls_openssl/tls_openssl_rpc.ba.go31
-rw-r--r--internal/testbinapi/binapi2001/trace/trace.ba.go273
-rw-r--r--internal/testbinapi/binapi2001/trace/trace_rpc.ba.go51
-rw-r--r--internal/testbinapi/binapi2001/udp/udp.ba.go897
-rw-r--r--internal/testbinapi/binapi2001/udp/udp_rpc.ba.go88
-rw-r--r--internal/testbinapi/binapi2001/udp_ping/udp_ping.ba.go820
-rw-r--r--internal/testbinapi/binapi2001/udp_ping/udp_ping_rpc.ba.go41
-rw-r--r--internal/testbinapi/binapi2001/vhost_user/vhost_user.ba.go797
-rw-r--r--internal/testbinapi/binapi2001/vhost_user/vhost_user_rpc.ba.go98
-rw-r--r--internal/testbinapi/binapi2001/virtio/virtio.ba.go607
-rw-r--r--internal/testbinapi/binapi2001/virtio/virtio_rpc.ba.go88
-rw-r--r--internal/testbinapi/binapi2001/virtio_types/virtio_types.ba.go123
-rw-r--r--internal/testbinapi/binapi2001/vmxnet3/vmxnet3.ba.go682
-rw-r--r--internal/testbinapi/binapi2001/vmxnet3/vmxnet3_rpc.ba.go88
-rw-r--r--internal/testbinapi/binapi2001/vpe/vpe.ba.go1159
-rw-r--r--internal/testbinapi/binapi2001/vpe/vpe_rpc.ba.go187
-rw-r--r--internal/testbinapi/binapi2001/vpe_types/vpe_types.ba.go127
-rw-r--r--internal/testbinapi/binapi2001/vxlan/vxlan.ba.go409
-rw-r--r--internal/testbinapi/binapi2001/vxlan/vxlan_rpc.ba.go98
-rw-r--r--internal/testbinapi/binapi2001/vxlan_gbp/vxlan_gbp.ba.go1214
-rw-r--r--internal/testbinapi/binapi2001/vxlan_gbp/vxlan_gbp_rpc.ba.go88
-rw-r--r--internal/testbinapi/binapi2001/vxlan_gpe/vxlan_gpe.ba.go333
-rw-r--r--internal/testbinapi/binapi2001/vxlan_gpe/vxlan_gpe_rpc.ba.go88
-rw-r--r--internal/testbinapi/binapi2001/vxlan_gpe_ioam_export/vxlan_gpe_ioam_export.ba.go719
-rw-r--r--internal/testbinapi/binapi2001/vxlan_gpe_ioam_export/vxlan_gpe_ioam_export_rpc.ba.go31
-rw-r--r--version/version.go (renamed from internal/version/version.go)0
305 files changed, 7 insertions, 189999 deletions
diff --git a/Makefile b/Makefile
index c2342a0..6fc229b 100644
--- a/Makefile
+++ b/Makefile
@@ -14,7 +14,7 @@ GOVPP_PKG := git.fd.io/govpp.git
VPP_API_DIR ?= ${VPP_DIR}/build-root/install-vpp-native/vpp/share/vpp/api
-VERSION_PKG := $(GOVPP_PKG)/internal/version
+VERSION_PKG := $(GOVPP_PKG)/version
LDFLAGS = \
-X $(VERSION_PKG).version=$(VERSION) \
-X $(VERSION_PKG).commitHash=$(COMMIT) \
@@ -49,8 +49,6 @@ BINAPI_DIR ?= ./binapi
# Binapi generator path
BINAPI_GENERATOR = ./bin/binapi-generator
-INTERNAL_BINAPI_DIR ?= ./internal/testbinapi/binapi2001
-
.DEFAULT_GOAL = help
check-%:
@@ -110,10 +108,6 @@ generate-binapi: install-generator ## Generate binapi code
@echo "# generating binapi"
@go generate -x "$(BINAPI_DIR)"
-.PHONY: gen-binapi-internal
-gen-binapi-internal:
- @go generate $(INTERNAL_BINAPI_DIR)
-
.PHONY: gen-binapi-local
gen-binapi-local: binapi-generator check-VPP_DIR ## Generate binapi code (using locally cloned VPP)
@make -C ${VPP_DIR} json-api-files
diff --git a/binapigen/generate.go b/binapigen/generate.go
index 37f7bc4..b72af11 100644
--- a/binapigen/generate.go
+++ b/binapigen/generate.go
@@ -21,7 +21,7 @@ import (
"strconv"
"strings"
- "git.fd.io/govpp.git/internal/version"
+ "git.fd.io/govpp.git/version"
)
// library dependencies
diff --git a/cmd/binapi-generator/main.go b/cmd/binapi-generator/main.go
index a730df4..85ef0eb 100644
--- a/cmd/binapi-generator/main.go
+++ b/cmd/binapi-generator/main.go
@@ -26,7 +26,7 @@ import (
"git.fd.io/govpp.git/binapigen"
"git.fd.io/govpp.git/binapigen/vppapi"
- "git.fd.io/govpp.git/internal/version"
+ "git.fd.io/govpp.git/version"
)
func init() {
diff --git a/codec/marshaler_test.go b/codec/marshaler_test.go
index 985dd31..9600c55 100644
--- a/codec/marshaler_test.go
+++ b/codec/marshaler_test.go
@@ -23,7 +23,8 @@ import (
"git.fd.io/govpp.git/binapi/ip_types"
"git.fd.io/govpp.git/binapi/sr"
"git.fd.io/govpp.git/codec"
- interfaces "git.fd.io/govpp.git/internal/testbinapi/binapi2001/interface"
+ interfaces "git.fd.io/govpp.git/binapi/interface"
+ "git.fd.io/govpp.git/binapi/interface_types"
)
// CliInband represents VPP binary API message 'cli_inband'.
@@ -101,7 +102,7 @@ func TestWrapperDecode(t *testing.T) {
func TestNewCodecEncodeDecode4(t *testing.T) {
m := &interfaces.SwInterfaceSetRxMode{
- Mode: interfaces.RX_MODE_API_POLLING,
+ Mode: interface_types.RX_MODE_API_POLLING,
QueueID: 70000,
QueueIDValid: true,
SwIfIndex: 300,
diff --git a/govpp.go b/govpp.go
index 0ca020a..a9c26a7 100644
--- a/govpp.go
+++ b/govpp.go
@@ -20,7 +20,7 @@ import (
"git.fd.io/govpp.git/adapter"
"git.fd.io/govpp.git/adapter/socketclient"
"git.fd.io/govpp.git/core"
- "git.fd.io/govpp.git/internal/version"
+ "git.fd.io/govpp.git/version"
)
// Connect connects to the VPP API using a new adapter instance created with NewVppAPIAdapter.
diff --git a/internal/testbinapi/binapi2001/.vppapi/VPP_VERSION b/internal/testbinapi/binapi2001/.vppapi/VPP_VERSION
deleted file mode 100644
index b38ff33..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/VPP_VERSION
+++ /dev/null
@@ -1 +0,0 @@
-20.01-45~g7a071e370~b63 \ No newline at end of file
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/af_packet.api.json b/internal/testbinapi/binapi2001/.vppapi/core/af_packet.api.json
deleted file mode 100644
index 158e7ec..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/af_packet.api.json
+++ /dev/null
@@ -1,367 +0,0 @@
-{
- "types": [],
- "messages": [
- [
- "af_packet_create",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_mac_address_t",
- "hw_addr"
- ],
- [
- "bool",
- "use_random_hw_addr"
- ],
- [
- "string",
- "host_if_name",
- 64
- ],
- {
- "crc": "0xa190415f"
- }
- ],
- [
- "af_packet_create_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0x5383d31f"
- }
- ],
- [
- "af_packet_delete",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "string",
- "host_if_name",
- 64
- ],
- {
- "crc": "0x863fa648"
- }
- ],
- [
- "af_packet_delete_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "af_packet_set_l4_cksum_offload",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "bool",
- "set"
- ],
- {
- "crc": "0x319cd5c8"
- }
- ],
- [
- "af_packet_set_l4_cksum_offload_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "af_packet_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "af_packet_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "string",
- "host_if_name",
- 64
- ],
- {
- "crc": "0x58c7c042"
- }
- ]
- ],
- "unions": [],
- "enums": [
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "af_packet_create": {
- "reply": "af_packet_create_reply"
- },
- "af_packet_delete": {
- "reply": "af_packet_delete_reply"
- },
- "af_packet_set_l4_cksum_offload": {
- "reply": "af_packet_set_l4_cksum_offload_reply"
- },
- "af_packet_dump": {
- "reply": "af_packet_details",
- "stream": true
- }
- },
- "options": {
- "version": "2.0.0"
- },
- "aliases": {
- "interface_index": {
- "type": "u32"
- },
- "mac_address": {
- "type": "u8",
- "length": 6
- }
- },
- "vl_api_version": "0xba745e20"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/arp.api.json b/internal/testbinapi/binapi2001/.vppapi/core/arp.api.json
deleted file mode 100644
index 597c705..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/arp.api.json
+++ /dev/null
@@ -1,648 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ],
- [
- "proxy_arp",
- [
- "u32",
- "table_id"
- ],
- [
- "vl_api_ip4_address_t",
- "low"
- ],
- [
- "vl_api_ip4_address_t",
- "hi"
- ]
- ]
- ],
- "messages": [
- [
- "proxy_arp_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "vl_api_proxy_arp_t",
- "proxy"
- ],
- {
- "crc": "0x85486cbd"
- }
- ],
- [
- "proxy_arp_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "proxy_arp_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "proxy_arp_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_proxy_arp_t",
- "proxy"
- ],
- {
- "crc": "0x9228c150"
- }
- ],
- [
- "proxy_arp_intfc_enable_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "bool",
- "enable"
- ],
- {
- "crc": "0xae6cfcfb"
- }
- ],
- [
- "proxy_arp_intfc_enable_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "proxy_arp_intfc_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "proxy_arp_intfc_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- {
- "crc": "0xf6458e5f"
- }
- ]
- ],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "proxy_arp_add_del": {
- "reply": "proxy_arp_add_del_reply"
- },
- "proxy_arp_dump": {
- "reply": "proxy_arp_details",
- "stream": true
- },
- "proxy_arp_intfc_enable_disable": {
- "reply": "proxy_arp_intfc_enable_disable_reply"
- },
- "proxy_arp_intfc_dump": {
- "reply": "proxy_arp_intfc_details",
- "stream": true
- }
- },
- "options": {
- "version": "1.0.0"
- },
- "aliases": {
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- },
- "mac_address": {
- "type": "u8",
- "length": 6
- },
- "interface_index": {
- "type": "u32"
- }
- },
- "vl_api_version": "0xa818aaf3"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/bfd.api.json b/internal/testbinapi/binapi2001/.vppapi/core/bfd.api.json
deleted file mode 100644
index 390a0ca..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/bfd.api.json
+++ /dev/null
@@ -1,1254 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ]
- ],
- "messages": [
- [
- "bfd_udp_set_echo_source",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0xf9e6675e"
- }
- ],
- [
- "bfd_udp_set_echo_source_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "bfd_udp_del_echo_source",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "bfd_udp_del_echo_source_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "bfd_udp_get_echo_source",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "bfd_udp_get_echo_source_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "bool",
- "is_set"
- ],
- [
- "bool",
- "have_usable_ip4"
- ],
- [
- "vl_api_ip4_address_t",
- "ip4_addr"
- ],
- [
- "bool",
- "have_usable_ip6"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6_addr"
- ],
- {
- "crc": "0x1e00cfce"
- }
- ],
- [
- "bfd_udp_add",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "u32",
- "desired_min_tx"
- ],
- [
- "u32",
- "required_min_rx"
- ],
- [
- "vl_api_address_t",
- "local_addr"
- ],
- [
- "vl_api_address_t",
- "peer_addr"
- ],
- [
- "u8",
- "detect_mult"
- ],
- [
- "bool",
- "is_authenticated"
- ],
- [
- "u8",
- "bfd_key_id"
- ],
- [
- "u32",
- "conf_key_id"
- ],
- {
- "crc": "0x7a6d1185"
- }
- ],
- [
- "bfd_udp_add_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "bfd_udp_mod",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "u32",
- "desired_min_tx"
- ],
- [
- "u32",
- "required_min_rx"
- ],
- [
- "vl_api_address_t",
- "local_addr"
- ],
- [
- "vl_api_address_t",
- "peer_addr"
- ],
- [
- "u8",
- "detect_mult"
- ],
- {
- "crc": "0x783a3ff6"
- }
- ],
- [
- "bfd_udp_mod_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "bfd_udp_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "vl_api_address_t",
- "local_addr"
- ],
- [
- "vl_api_address_t",
- "peer_addr"
- ],
- {
- "crc": "0x8096514d"
- }
- ],
- [
- "bfd_udp_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "bfd_udp_session_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "bfd_udp_session_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "vl_api_address_t",
- "local_addr"
- ],
- [
- "vl_api_address_t",
- "peer_addr"
- ],
- [
- "vl_api_bfd_state_t",
- "state"
- ],
- [
- "bool",
- "is_authenticated"
- ],
- [
- "u8",
- "bfd_key_id"
- ],
- [
- "u32",
- "conf_key_id"
- ],
- [
- "u32",
- "required_min_rx"
- ],
- [
- "u32",
- "desired_min_tx"
- ],
- [
- "u8",
- "detect_mult"
- ],
- {
- "crc": "0x60653c02"
- }
- ],
- [
- "bfd_udp_session_set_flags",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "vl_api_address_t",
- "local_addr"
- ],
- [
- "vl_api_address_t",
- "peer_addr"
- ],
- [
- "vl_api_if_status_flags_t",
- "flags"
- ],
- {
- "crc": "0xcf313851"
- }
- ],
- [
- "bfd_udp_session_set_flags_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "want_bfd_events",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "enable_disable"
- ],
- [
- "u32",
- "pid"
- ],
- {
- "crc": "0xc5e2af94"
- }
- ],
- [
- "want_bfd_events_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "bfd_auth_set_key",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "conf_key_id"
- ],
- [
- "u8",
- "key_len"
- ],
- [
- "u8",
- "auth_type"
- ],
- [
- "u8",
- "key",
- 20
- ],
- {
- "crc": "0x690b8877"
- }
- ],
- [
- "bfd_auth_set_key_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "bfd_auth_del_key",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "conf_key_id"
- ],
- {
- "crc": "0x65310b22"
- }
- ],
- [
- "bfd_auth_del_key_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "bfd_auth_keys_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "bfd_auth_keys_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "conf_key_id"
- ],
- [
- "u32",
- "use_count"
- ],
- [
- "u8",
- "auth_type"
- ],
- {
- "crc": "0x84130e9f"
- }
- ],
- [
- "bfd_udp_auth_activate",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "vl_api_address_t",
- "local_addr"
- ],
- [
- "vl_api_address_t",
- "peer_addr"
- ],
- [
- "bool",
- "is_delayed"
- ],
- [
- "u8",
- "bfd_key_id"
- ],
- [
- "u32",
- "conf_key_id"
- ],
- {
- "crc": "0x493ee0ec"
- }
- ],
- [
- "bfd_udp_auth_activate_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "bfd_udp_auth_deactivate",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "vl_api_address_t",
- "local_addr"
- ],
- [
- "vl_api_address_t",
- "peer_addr"
- ],
- [
- "bool",
- "is_delayed"
- ],
- {
- "crc": "0x99978c32"
- }
- ],
- [
- "bfd_udp_auth_deactivate_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "bfd_state",
- [
- "BFD_STATE_API_ADMIN_DOWN",
- 0
- ],
- [
- "BFD_STATE_API_DOWN",
- 1
- ],
- [
- "BFD_STATE_API_INIT",
- 2
- ],
- [
- "BFD_STATE_API_UP",
- 3
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "bfd_udp_set_echo_source": {
- "reply": "bfd_udp_set_echo_source_reply"
- },
- "bfd_udp_del_echo_source": {
- "reply": "bfd_udp_del_echo_source_reply"
- },
- "bfd_udp_get_echo_source": {
- "reply": "bfd_udp_get_echo_source_reply"
- },
- "bfd_udp_add": {
- "reply": "bfd_udp_add_reply"
- },
- "bfd_udp_mod": {
- "reply": "bfd_udp_mod_reply"
- },
- "bfd_udp_del": {
- "reply": "bfd_udp_del_reply"
- },
- "bfd_udp_session_dump": {
- "reply": "bfd_udp_session_details",
- "stream": true
- },
- "bfd_udp_session_set_flags": {
- "reply": "bfd_udp_session_set_flags_reply"
- },
- "want_bfd_events": {
- "reply": "want_bfd_events_reply"
- },
- "bfd_auth_set_key": {
- "reply": "bfd_auth_set_key_reply"
- },
- "bfd_auth_del_key": {
- "reply": "bfd_auth_del_key_reply"
- },
- "bfd_auth_keys_dump": {
- "reply": "bfd_auth_keys_details",
- "stream": true
- },
- "bfd_udp_auth_activate": {
- "reply": "bfd_udp_auth_activate_reply"
- },
- "bfd_udp_auth_deactivate": {
- "reply": "bfd_udp_auth_deactivate_reply"
- }
- },
- "options": {
- "version": "2.0.0"
- },
- "aliases": {
- "interface_index": {
- "type": "u32"
- },
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- }
- },
- "vl_api_version": "0xfd792c8c"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/bier.api.json b/internal/testbinapi/binapi2001/.vppapi/core/bier.api.json
deleted file mode 100644
index 02937e7..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/bier.api.json
+++ /dev/null
@@ -1,1086 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ],
- [
- "fib_mpls_label",
- [
- "u8",
- "is_uniform"
- ],
- [
- "u32",
- "label"
- ],
- [
- "u8",
- "ttl"
- ],
- [
- "u8",
- "exp"
- ]
- ],
- [
- "fib_path_nh",
- [
- "vl_api_address_union_t",
- "address"
- ],
- [
- "u32",
- "via_label"
- ],
- [
- "u32",
- "obj_id"
- ],
- [
- "u32",
- "classify_table_index"
- ]
- ],
- [
- "fib_path",
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u32",
- "table_id"
- ],
- [
- "u32",
- "rpf_id"
- ],
- [
- "u8",
- "weight"
- ],
- [
- "u8",
- "preference"
- ],
- [
- "vl_api_fib_path_type_t",
- "type"
- ],
- [
- "vl_api_fib_path_flags_t",
- "flags"
- ],
- [
- "vl_api_fib_path_nh_proto_t",
- "proto"
- ],
- [
- "vl_api_fib_path_nh_t",
- "nh"
- ],
- [
- "u8",
- "n_labels"
- ],
- [
- "vl_api_fib_mpls_label_t",
- "label_stack",
- 16
- ]
- ],
- [
- "bier_table_id",
- [
- "u8",
- "bt_set"
- ],
- [
- "u8",
- "bt_sub_domain"
- ],
- [
- "u8",
- "bt_hdr_len_id"
- ]
- ],
- [
- "bier_route",
- [
- "u32",
- "br_bp"
- ],
- [
- "vl_api_bier_table_id_t",
- "br_tbl_id"
- ],
- [
- "u8",
- "br_n_paths"
- ],
- [
- "vl_api_fib_path_t",
- "br_paths",
- 0,
- "br_n_paths"
- ]
- ]
- ],
- "messages": [
- [
- "bier_table_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_bier_table_id_t",
- "bt_tbl_id"
- ],
- [
- "u32",
- "bt_label"
- ],
- [
- "bool",
- "bt_is_add"
- ],
- {
- "crc": "0x35e59209"
- }
- ],
- [
- "bier_table_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "bier_table_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "bier_table_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "bt_label"
- ],
- [
- "vl_api_bier_table_id_t",
- "bt_tbl_id"
- ],
- {
- "crc": "0xfc44a9dd"
- }
- ],
- [
- "bier_route_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "br_is_add"
- ],
- [
- "bool",
- "br_is_replace"
- ],
- [
- "vl_api_bier_route_t",
- "br_route"
- ],
- {
- "crc": "0xf29edca0"
- }
- ],
- [
- "bier_route_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "bier_route_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_bier_table_id_t",
- "br_tbl_id"
- ],
- {
- "crc": "0x38339846"
- }
- ],
- [
- "bier_route_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_bier_route_t",
- "br_route"
- ],
- {
- "crc": "0x39ee6a56"
- }
- ],
- [
- "bier_imp_add",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_bier_table_id_t",
- "bi_tbl_id"
- ],
- [
- "u16",
- "bi_src"
- ],
- [
- "u8",
- "bi_n_bytes"
- ],
- [
- "u8",
- "bi_bytes",
- 0,
- "bi_n_bytes"
- ],
- {
- "crc": "0x3856dc3d"
- }
- ],
- [
- "bier_imp_add_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "bi_index"
- ],
- {
- "crc": "0xd49c5793"
- }
- ],
- [
- "bier_imp_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "bi_index"
- ],
- {
- "crc": "0x7d45edf6"
- }
- ],
- [
- "bier_imp_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "bier_imp_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "bier_imp_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_bier_table_id_t",
- "bi_tbl_id"
- ],
- [
- "u16",
- "bi_src"
- ],
- [
- "u8",
- "bi_n_bytes"
- ],
- [
- "u8",
- "bi_bytes",
- 0,
- "bi_n_bytes"
- ],
- {
- "crc": "0xb76192df"
- }
- ],
- [
- "bier_disp_table_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "bdt_tbl_id"
- ],
- [
- "bool",
- "bdt_is_add"
- ],
- {
- "crc": "0x889657ac"
- }
- ],
- [
- "bier_disp_table_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "bier_disp_table_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "bier_disp_table_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "bdt_tbl_id"
- ],
- {
- "crc": "0xd27942c0"
- }
- ],
- [
- "bier_disp_entry_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u16",
- "bde_bp"
- ],
- [
- "u32",
- "bde_tbl_id"
- ],
- [
- "bool",
- "bde_is_add"
- ],
- [
- "u8",
- "bde_payload_proto"
- ],
- [
- "u8",
- "bde_n_paths"
- ],
- [
- "vl_api_fib_path_t",
- "bde_paths",
- 0,
- "bde_n_paths"
- ],
- {
- "crc": "0x648323eb"
- }
- ],
- [
- "bier_disp_entry_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "bier_disp_entry_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "bde_tbl_id"
- ],
- {
- "crc": "0xb5fa54ad"
- }
- ],
- [
- "bier_disp_entry_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u16",
- "bde_bp"
- ],
- [
- "u32",
- "bde_tbl_id"
- ],
- [
- "bool",
- "bde_is_add"
- ],
- [
- "u8",
- "bde_payload_proto"
- ],
- [
- "u8",
- "bde_n_paths"
- ],
- [
- "vl_api_fib_path_t",
- "bde_paths",
- 0,
- "bde_n_paths"
- ],
- {
- "crc": "0xe5b039a9"
- }
- ]
- ],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "fib_path_nh_proto",
- [
- "FIB_API_PATH_NH_PROTO_IP4",
- 0
- ],
- [
- "FIB_API_PATH_NH_PROTO_IP6",
- 1
- ],
- [
- "FIB_API_PATH_NH_PROTO_MPLS",
- 2
- ],
- [
- "FIB_API_PATH_NH_PROTO_ETHERNET",
- 3
- ],
- [
- "FIB_API_PATH_NH_PROTO_BIER",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "fib_path_flags",
- [
- "FIB_API_PATH_FLAG_NONE",
- 0
- ],
- [
- "FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED",
- 1
- ],
- [
- "FIB_API_PATH_FLAG_RESOLVE_VIA_HOST",
- 2
- ],
- [
- "FIB_API_PATH_FLAG_POP_PW_CW",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "fib_path_type",
- [
- "FIB_API_PATH_TYPE_NORMAL",
- 0
- ],
- [
- "FIB_API_PATH_TYPE_LOCAL",
- 1
- ],
- [
- "FIB_API_PATH_TYPE_DROP",
- 2
- ],
- [
- "FIB_API_PATH_TYPE_UDP_ENCAP",
- 3
- ],
- [
- "FIB_API_PATH_TYPE_BIER_IMP",
- 4
- ],
- [
- "FIB_API_PATH_TYPE_ICMP_UNREACH",
- 5
- ],
- [
- "FIB_API_PATH_TYPE_ICMP_PROHIBIT",
- 6
- ],
- [
- "FIB_API_PATH_TYPE_SOURCE_LOOKUP",
- 7
- ],
- [
- "FIB_API_PATH_TYPE_DVR",
- 8
- ],
- [
- "FIB_API_PATH_TYPE_INTERFACE_RX",
- 9
- ],
- [
- "FIB_API_PATH_TYPE_CLASSIFY",
- 10
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "bier_table_add_del": {
- "reply": "bier_table_add_del_reply"
- },
- "bier_table_dump": {
- "reply": "bier_table_details",
- "stream": true
- },
- "bier_route_add_del": {
- "reply": "bier_route_add_del_reply"
- },
- "bier_route_dump": {
- "reply": "bier_route_details",
- "stream": true
- },
- "bier_imp_add": {
- "reply": "bier_imp_add_reply"
- },
- "bier_imp_del": {
- "reply": "bier_imp_del_reply"
- },
- "bier_imp_dump": {
- "reply": "bier_imp_details",
- "stream": true
- },
- "bier_disp_table_add_del": {
- "reply": "bier_disp_table_add_del_reply"
- },
- "bier_disp_table_dump": {
- "reply": "bier_disp_table_details",
- "stream": true
- },
- "bier_disp_entry_add_del": {
- "reply": "bier_disp_entry_add_del_reply"
- },
- "bier_disp_entry_dump": {
- "reply": "bier_disp_entry_details",
- "stream": true
- }
- },
- "options": {
- "version": "1.2.1"
- },
- "aliases": {
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- }
- },
- "vl_api_version": "0x27c878c4"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/bond.api.json b/internal/testbinapi/binapi2001/.vppapi/core/bond.api.json
deleted file mode 100644
index 5eefc92..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/bond.api.json
+++ /dev/null
@@ -1,620 +0,0 @@
-{
- "types": [],
- "messages": [
- [
- "bond_create",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "id"
- ],
- [
- "bool",
- "use_custom_mac"
- ],
- [
- "vl_api_mac_address_t",
- "mac_address"
- ],
- [
- "vl_api_bond_mode_t",
- "mode"
- ],
- [
- "vl_api_bond_lb_algo_t",
- "lb"
- ],
- [
- "bool",
- "numa_only"
- ],
- {
- "crc": "0x48883c7e"
- }
- ],
- [
- "bond_create_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0x5383d31f"
- }
- ],
- [
- "bond_delete",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0xf9e6675e"
- }
- ],
- [
- "bond_delete_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "bond_enslave",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "vl_api_interface_index_t",
- "bond_sw_if_index"
- ],
- [
- "bool",
- "is_passive"
- ],
- [
- "bool",
- "is_long_timeout"
- ],
- {
- "crc": "0x076ecfa7"
- }
- ],
- [
- "bond_enslave_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "bond_detach_slave",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0xf9e6675e"
- }
- ],
- [
- "bond_detach_slave_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "sw_interface_bond_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "sw_interface_bond_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "u32",
- "id"
- ],
- [
- "vl_api_bond_mode_t",
- "mode"
- ],
- [
- "vl_api_bond_lb_algo_t",
- "lb"
- ],
- [
- "bool",
- "numa_only"
- ],
- [
- "u32",
- "active_slaves"
- ],
- [
- "u32",
- "slaves"
- ],
- [
- "string",
- "interface_name",
- 64
- ],
- {
- "crc": "0xf5ef2106"
- }
- ],
- [
- "sw_interface_slave_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0xf9e6675e"
- }
- ],
- [
- "sw_interface_slave_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "string",
- "interface_name",
- 64
- ],
- [
- "bool",
- "is_passive"
- ],
- [
- "bool",
- "is_long_timeout"
- ],
- [
- "bool",
- "is_local_numa"
- ],
- [
- "u32",
- "weight"
- ],
- {
- "crc": "0x3c4a0e23"
- }
- ],
- [
- "sw_interface_set_bond_weight",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "u32",
- "weight"
- ],
- {
- "crc": "0xdeb510a0"
- }
- ],
- [
- "sw_interface_set_bond_weight_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [],
- "enums": [
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "bond_mode",
- [
- "BOND_API_MODE_ROUND_ROBIN",
- 1
- ],
- [
- "BOND_API_MODE_ACTIVE_BACKUP",
- 2
- ],
- [
- "BOND_API_MODE_XOR",
- 3
- ],
- [
- "BOND_API_MODE_BROADCAST",
- 4
- ],
- [
- "BOND_API_MODE_LACP",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "bond_lb_algo",
- [
- "BOND_API_LB_ALGO_L2",
- 0
- ],
- [
- "BOND_API_LB_ALGO_L34",
- 1
- ],
- [
- "BOND_API_LB_ALGO_L23",
- 2
- ],
- [
- "BOND_API_LB_ALGO_RR",
- 3
- ],
- [
- "BOND_API_LB_ALGO_BC",
- 4
- ],
- [
- "BOND_API_LB_ALGO_AB",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "bond_create": {
- "reply": "bond_create_reply"
- },
- "bond_delete": {
- "reply": "bond_delete_reply"
- },
- "bond_enslave": {
- "reply": "bond_enslave_reply"
- },
- "bond_detach_slave": {
- "reply": "bond_detach_slave_reply"
- },
- "sw_interface_bond_dump": {
- "reply": "sw_interface_bond_details",
- "stream": true
- },
- "sw_interface_slave_dump": {
- "reply": "sw_interface_slave_details",
- "stream": true
- },
- "sw_interface_set_bond_weight": {
- "reply": "sw_interface_set_bond_weight_reply"
- }
- },
- "options": {
- "version": "2.0.0"
- },
- "aliases": {
- "interface_index": {
- "type": "u32"
- },
- "mac_address": {
- "type": "u8",
- "length": 6
- }
- },
- "vl_api_version": "0x69f583ad"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/classify.api.json b/internal/testbinapi/binapi2001/.vppapi/core/classify.api.json
deleted file mode 100644
index 0b6bf84..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/classify.api.json
+++ /dev/null
@@ -1,1154 +0,0 @@
-{
- "types": [],
- "messages": [
- [
- "classify_add_del_table",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "bool",
- "del_chain"
- ],
- [
- "u32",
- "table_index",
- {
- "default": 4294967295
- }
- ],
- [
- "u32",
- "nbuckets",
- {
- "default": 2
- }
- ],
- [
- "u32",
- "memory_size",
- {
- "default": 2097152
- }
- ],
- [
- "u32",
- "skip_n_vectors",
- {
- "default": 0
- }
- ],
- [
- "u32",
- "match_n_vectors",
- {
- "default": 1
- }
- ],
- [
- "u32",
- "next_table_index",
- {
- "default": 4294967295
- }
- ],
- [
- "u32",
- "miss_next_index",
- {
- "default": 4294967295
- }
- ],
- [
- "u8",
- "current_data_flag",
- {
- "default": 0
- }
- ],
- [
- "i16",
- "current_data_offset",
- {
- "default": 0
- }
- ],
- [
- "u32",
- "mask_len"
- ],
- [
- "u8",
- "mask",
- 0,
- "mask_len"
- ],
- {
- "crc": "0x6849e39e"
- }
- ],
- [
- "classify_add_del_table_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "new_table_index"
- ],
- [
- "u32",
- "skip_n_vectors"
- ],
- [
- "u32",
- "match_n_vectors"
- ],
- {
- "crc": "0x05486349"
- }
- ],
- [
- "classify_add_del_session",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "u32",
- "table_index"
- ],
- [
- "u32",
- "hit_next_index",
- {
- "default": 4294967295
- }
- ],
- [
- "u32",
- "opaque_index",
- {
- "default": 4294967295
- }
- ],
- [
- "i32",
- "advance",
- {
- "default": 0
- }
- ],
- [
- "vl_api_classify_action_t",
- "action",
- {
- "default": 0
- }
- ],
- [
- "u32",
- "metadata",
- {
- "default": 0
- }
- ],
- [
- "u32",
- "match_len"
- ],
- [
- "u8",
- "match",
- 0,
- "match_len"
- ],
- {
- "crc": "0xf20879f0"
- }
- ],
- [
- "classify_add_del_session_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "policer_classify_set_interface",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "u32",
- "ip4_table_index"
- ],
- [
- "u32",
- "ip6_table_index"
- ],
- [
- "u32",
- "l2_table_index"
- ],
- [
- "bool",
- "is_add"
- ],
- {
- "crc": "0xde7ad708"
- }
- ],
- [
- "policer_classify_set_interface_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "policer_classify_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_policer_classify_table_t",
- "type"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0x6bfe6603"
- }
- ],
- [
- "policer_classify_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "u32",
- "table_index"
- ],
- {
- "crc": "0xdfd08765"
- }
- ],
- [
- "classify_table_ids",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "classify_table_ids_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "count"
- ],
- [
- "u32",
- "ids",
- 0,
- "count"
- ],
- {
- "crc": "0xd1d20e1d"
- }
- ],
- [
- "classify_table_by_interface",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0xf9e6675e"
- }
- ],
- [
- "classify_table_by_interface_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "u32",
- "l2_table_id"
- ],
- [
- "u32",
- "ip4_table_id"
- ],
- [
- "u32",
- "ip6_table_id"
- ],
- {
- "crc": "0xed4197db"
- }
- ],
- [
- "classify_table_info",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "table_id"
- ],
- {
- "crc": "0x0cca2cd9"
- }
- ],
- [
- "classify_table_info_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "table_id"
- ],
- [
- "u32",
- "nbuckets"
- ],
- [
- "u32",
- "match_n_vectors"
- ],
- [
- "u32",
- "skip_n_vectors"
- ],
- [
- "u32",
- "active_sessions"
- ],
- [
- "u32",
- "next_table_index"
- ],
- [
- "u32",
- "miss_next_index"
- ],
- [
- "u32",
- "mask_length"
- ],
- [
- "u8",
- "mask",
- 0,
- "mask_length"
- ],
- {
- "crc": "0x4a573c0e"
- }
- ],
- [
- "classify_session_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "table_id"
- ],
- {
- "crc": "0x0cca2cd9"
- }
- ],
- [
- "classify_session_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "table_id"
- ],
- [
- "u32",
- "hit_next_index"
- ],
- [
- "i32",
- "advance"
- ],
- [
- "u32",
- "opaque_index"
- ],
- [
- "u32",
- "match_length"
- ],
- [
- "u8",
- "match",
- 0,
- "match_length"
- ],
- {
- "crc": "0x60e3ef94"
- }
- ],
- [
- "flow_classify_set_interface",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "u32",
- "ip4_table_index"
- ],
- [
- "u32",
- "ip6_table_index"
- ],
- [
- "bool",
- "is_add"
- ],
- {
- "crc": "0xb6192f1c"
- }
- ],
- [
- "flow_classify_set_interface_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "flow_classify_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_flow_classify_table_t",
- "type"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0x8a6ad43d"
- }
- ],
- [
- "flow_classify_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "u32",
- "table_index"
- ],
- {
- "crc": "0xdfd08765"
- }
- ],
- [
- "classify_set_interface_ip_table",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_ipv6"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "u32",
- "table_index"
- ],
- {
- "crc": "0xe0b097c7"
- }
- ],
- [
- "classify_set_interface_ip_table_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "classify_set_interface_l2_tables",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "u32",
- "ip4_table_index"
- ],
- [
- "u32",
- "ip6_table_index"
- ],
- [
- "u32",
- "other_table_index"
- ],
- [
- "bool",
- "is_input"
- ],
- {
- "crc": "0x5a6ddf65"
- }
- ],
- [
- "classify_set_interface_l2_tables_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "input_acl_set_interface",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "u32",
- "ip4_table_index"
- ],
- [
- "u32",
- "ip6_table_index"
- ],
- [
- "u32",
- "l2_table_index"
- ],
- [
- "bool",
- "is_add"
- ],
- {
- "crc": "0xde7ad708"
- }
- ],
- [
- "input_acl_set_interface_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "output_acl_set_interface",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "u32",
- "ip4_table_index"
- ],
- [
- "u32",
- "ip6_table_index"
- ],
- [
- "u32",
- "l2_table_index"
- ],
- [
- "bool",
- "is_add"
- ],
- {
- "crc": "0xde7ad708"
- }
- ],
- [
- "output_acl_set_interface_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [],
- "enums": [
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "classify_action",
- [
- "CLASSIFY_API_ACTION_NONE",
- 0
- ],
- [
- "CLASSIFY_API_ACTION_SET_IP4_FIB_INDEX",
- 1
- ],
- [
- "CLASSIFY_API_ACTION_SET_IP6_FIB_INDEX",
- 2
- ],
- [
- "CLASSIFY_API_ACTION_SET_METADATA",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "policer_classify_table",
- [
- "POLICER_CLASSIFY_API_TABLE_IP4",
- 1
- ],
- [
- "POLICER_CLASSIFY_API_TABLE_IP6",
- 2
- ],
- [
- "POLICER_CLASSIFY_API_TABLE_L2",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "flow_classify_table",
- [
- "FLOW_CLASSIFY_API_TABLE_IP4",
- 1
- ],
- [
- "FLOW_CLASSIFY_API_TABLE_IP6",
- 2
- ],
- {
- "enumtype": "u8"
- }
- ]
- ],
- "services": {
- "classify_add_del_table": {
- "reply": "classify_add_del_table_reply"
- },
- "classify_add_del_session": {
- "reply": "classify_add_del_session_reply"
- },
- "policer_classify_set_interface": {
- "reply": "policer_classify_set_interface_reply"
- },
- "policer_classify_dump": {
- "reply": "policer_classify_details",
- "stream": true
- },
- "classify_table_ids": {
- "reply": "classify_table_ids_reply"
- },
- "classify_table_by_interface": {
- "reply": "classify_table_by_interface_reply"
- },
- "classify_table_info": {
- "reply": "classify_table_info_reply"
- },
- "classify_session_dump": {
- "reply": "classify_session_details",
- "stream": true
- },
- "flow_classify_set_interface": {
- "reply": "flow_classify_set_interface_reply"
- },
- "flow_classify_dump": {
- "reply": "flow_classify_details",
- "stream": true
- },
- "classify_set_interface_ip_table": {
- "reply": "classify_set_interface_ip_table_reply"
- },
- "classify_set_interface_l2_tables": {
- "reply": "classify_set_interface_l2_tables_reply"
- },
- "input_acl_set_interface": {
- "reply": "input_acl_set_interface_reply"
- },
- "output_acl_set_interface": {
- "reply": "output_acl_set_interface_reply"
- }
- },
- "options": {
- "version": "3.0.0"
- },
- "aliases": {
- "interface_index": {
- "type": "u32"
- }
- },
- "vl_api_version": "0x13587952"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/cop.api.json b/internal/testbinapi/binapi2001/.vppapi/core/cop.api.json
deleted file mode 100644
index 2ebf76b..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/cop.api.json
+++ /dev/null
@@ -1,277 +0,0 @@
-{
- "types": [],
- "messages": [
- [
- "cop_interface_enable_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "bool",
- "enable_disable"
- ],
- {
- "crc": "0x5501adee"
- }
- ],
- [
- "cop_interface_enable_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "cop_whitelist_enable_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "u32",
- "fib_id"
- ],
- [
- "bool",
- "ip4"
- ],
- [
- "bool",
- "ip6"
- ],
- [
- "bool",
- "default_cop"
- ],
- {
- "crc": "0xdebe13ea"
- }
- ],
- [
- "cop_whitelist_enable_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [],
- "enums": [
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "cop_interface_enable_disable": {
- "reply": "cop_interface_enable_disable_reply"
- },
- "cop_whitelist_enable_disable": {
- "reply": "cop_whitelist_enable_disable_reply"
- }
- },
- "options": {
- "version": "1.0.1"
- },
- "aliases": {
- "interface_index": {
- "type": "u32"
- }
- },
- "vl_api_version": "0x59bc1ad8"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/ethernet_types.api.json b/internal/testbinapi/binapi2001/.vppapi/core/ethernet_types.api.json
deleted file mode 100644
index f945773..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/ethernet_types.api.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "types": [],
- "messages": [],
- "unions": [],
- "enums": [],
- "services": {},
- "options": {},
- "aliases": {
- "mac_address": {
- "type": "u8",
- "length": 6
- }
- },
- "vl_api_version": "0xd4ff2808"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/feature.api.json b/internal/testbinapi/binapi2001/.vppapi/core/feature.api.json
deleted file mode 100644
index d338012..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/feature.api.json
+++ /dev/null
@@ -1,228 +0,0 @@
-{
- "types": [],
- "messages": [
- [
- "feature_enable_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "bool",
- "enable"
- ],
- [
- "string",
- "arc_name",
- 64
- ],
- [
- "string",
- "feature_name",
- 64
- ],
- {
- "crc": "0x7531c862"
- }
- ],
- [
- "feature_enable_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [],
- "enums": [
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "feature_enable_disable": {
- "reply": "feature_enable_disable_reply"
- }
- },
- "options": {
- "version": "1.0.2"
- },
- "aliases": {
- "interface_index": {
- "type": "u32"
- }
- },
- "vl_api_version": "0x3696c431"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/fib_types.api.json b/internal/testbinapi/binapi2001/.vppapi/core/fib_types.api.json
deleted file mode 100644
index 5b71845..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/fib_types.api.json
+++ /dev/null
@@ -1,482 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ],
- [
- "fib_mpls_label",
- [
- "u8",
- "is_uniform"
- ],
- [
- "u32",
- "label"
- ],
- [
- "u8",
- "ttl"
- ],
- [
- "u8",
- "exp"
- ]
- ],
- [
- "fib_path_nh",
- [
- "vl_api_address_union_t",
- "address"
- ],
- [
- "u32",
- "via_label"
- ],
- [
- "u32",
- "obj_id"
- ],
- [
- "u32",
- "classify_table_index"
- ]
- ],
- [
- "fib_path",
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u32",
- "table_id"
- ],
- [
- "u32",
- "rpf_id"
- ],
- [
- "u8",
- "weight"
- ],
- [
- "u8",
- "preference"
- ],
- [
- "vl_api_fib_path_type_t",
- "type"
- ],
- [
- "vl_api_fib_path_flags_t",
- "flags"
- ],
- [
- "vl_api_fib_path_nh_proto_t",
- "proto"
- ],
- [
- "vl_api_fib_path_nh_t",
- "nh"
- ],
- [
- "u8",
- "n_labels"
- ],
- [
- "vl_api_fib_mpls_label_t",
- "label_stack",
- 16
- ]
- ]
- ],
- "messages": [],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "fib_path_nh_proto",
- [
- "FIB_API_PATH_NH_PROTO_IP4",
- 0
- ],
- [
- "FIB_API_PATH_NH_PROTO_IP6",
- 1
- ],
- [
- "FIB_API_PATH_NH_PROTO_MPLS",
- 2
- ],
- [
- "FIB_API_PATH_NH_PROTO_ETHERNET",
- 3
- ],
- [
- "FIB_API_PATH_NH_PROTO_BIER",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "fib_path_flags",
- [
- "FIB_API_PATH_FLAG_NONE",
- 0
- ],
- [
- "FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED",
- 1
- ],
- [
- "FIB_API_PATH_FLAG_RESOLVE_VIA_HOST",
- 2
- ],
- [
- "FIB_API_PATH_FLAG_POP_PW_CW",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "fib_path_type",
- [
- "FIB_API_PATH_TYPE_NORMAL",
- 0
- ],
- [
- "FIB_API_PATH_TYPE_LOCAL",
- 1
- ],
- [
- "FIB_API_PATH_TYPE_DROP",
- 2
- ],
- [
- "FIB_API_PATH_TYPE_UDP_ENCAP",
- 3
- ],
- [
- "FIB_API_PATH_TYPE_BIER_IMP",
- 4
- ],
- [
- "FIB_API_PATH_TYPE_ICMP_UNREACH",
- 5
- ],
- [
- "FIB_API_PATH_TYPE_ICMP_PROHIBIT",
- 6
- ],
- [
- "FIB_API_PATH_TYPE_SOURCE_LOOKUP",
- 7
- ],
- [
- "FIB_API_PATH_TYPE_DVR",
- 8
- ],
- [
- "FIB_API_PATH_TYPE_INTERFACE_RX",
- 9
- ],
- [
- "FIB_API_PATH_TYPE_CLASSIFY",
- 10
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {},
- "options": {
- "version": "2.0.0"
- },
- "aliases": {
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- }
- },
- "vl_api_version": "0x57387845"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/geneve.api.json b/internal/testbinapi/binapi2001/.vppapi/core/geneve.api.json
deleted file mode 100644
index 773f245..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/geneve.api.json
+++ /dev/null
@@ -1,649 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ]
- ],
- "messages": [
- [
- "geneve_add_del_tunnel",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "vl_api_address_t",
- "local_address"
- ],
- [
- "vl_api_address_t",
- "remote_address"
- ],
- [
- "vl_api_interface_index_t",
- "mcast_sw_if_index"
- ],
- [
- "u32",
- "encap_vrf_id"
- ],
- [
- "u32",
- "decap_next_index"
- ],
- [
- "u32",
- "vni"
- ],
- {
- "crc": "0x976693b5"
- }
- ],
- [
- "geneve_add_del_tunnel_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0x5383d31f"
- }
- ],
- [
- "geneve_tunnel_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0xf9e6675e"
- }
- ],
- [
- "geneve_tunnel_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "vl_api_address_t",
- "src_address"
- ],
- [
- "vl_api_address_t",
- "dst_address"
- ],
- [
- "vl_api_interface_index_t",
- "mcast_sw_if_index"
- ],
- [
- "u32",
- "encap_vrf_id"
- ],
- [
- "u32",
- "decap_next_index"
- ],
- [
- "u32",
- "vni"
- ],
- {
- "crc": "0xe27e2748"
- }
- ],
- [
- "sw_interface_set_geneve_bypass",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "bool",
- "is_ipv6"
- ],
- [
- "bool",
- "enable"
- ],
- {
- "crc": "0x65247409"
- }
- ],
- [
- "sw_interface_set_geneve_bypass_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "geneve_add_del_tunnel": {
- "reply": "geneve_add_del_tunnel_reply"
- },
- "geneve_tunnel_dump": {
- "reply": "geneve_tunnel_details",
- "stream": true
- },
- "sw_interface_set_geneve_bypass": {
- "reply": "sw_interface_set_geneve_bypass_reply"
- }
- },
- "options": {
- "version": "2.0.0"
- },
- "aliases": {
- "interface_index": {
- "type": "u32"
- },
- "mac_address": {
- "type": "u8",
- "length": 6
- },
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- }
- },
- "vl_api_version": "0x46ee8ab6"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/gre.api.json b/internal/testbinapi/binapi2001/.vppapi/core/gre.api.json
deleted file mode 100644
index 49cd2c1..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/gre.api.json
+++ /dev/null
@@ -1,617 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ],
- [
- "gre_tunnel",
- [
- "vl_api_gre_tunnel_type_t",
- "type"
- ],
- [
- "vl_api_gre_tunnel_mode_t",
- "mode"
- ],
- [
- "u16",
- "session_id"
- ],
- [
- "u32",
- "instance"
- ],
- [
- "u32",
- "outer_table_id"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "vl_api_address_t",
- "src"
- ],
- [
- "vl_api_address_t",
- "dst"
- ]
- ]
- ],
- "messages": [
- [
- "gre_tunnel_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "vl_api_gre_tunnel_t",
- "tunnel"
- ],
- {
- "crc": "0xf9c4059d"
- }
- ],
- [
- "gre_tunnel_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0x5383d31f"
- }
- ],
- [
- "gre_tunnel_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0xf9e6675e"
- }
- ],
- [
- "gre_tunnel_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_gre_tunnel_t",
- "tunnel"
- ],
- {
- "crc": "0x066f8369"
- }
- ]
- ],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "gre_tunnel_type",
- [
- "GRE_API_TUNNEL_TYPE_L3",
- 0
- ],
- [
- "GRE_API_TUNNEL_TYPE_TEB",
- 1
- ],
- [
- "GRE_API_TUNNEL_TYPE_ERSPAN",
- 2
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "gre_tunnel_mode",
- [
- "GRE_API_TUNNEL_MODE_P2P",
- 1
- ],
- [
- "GRE_API_TUNNEL_MODE_MP",
- 2
- ],
- {
- "enumtype": "u8"
- }
- ]
- ],
- "services": {
- "gre_tunnel_add_del": {
- "reply": "gre_tunnel_add_del_reply"
- },
- "gre_tunnel_dump": {
- "reply": "gre_tunnel_details",
- "stream": true
- }
- },
- "options": {
- "version": "2.0.1"
- },
- "aliases": {
- "interface_index": {
- "type": "u32"
- },
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- }
- },
- "vl_api_version": "0xb7663194"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/gso.api.json b/internal/testbinapi/binapi2001/.vppapi/core/gso.api.json
deleted file mode 100644
index 8cf67fe..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/gso.api.json
+++ /dev/null
@@ -1,218 +0,0 @@
-{
- "types": [],
- "messages": [
- [
- "feature_gso_enable_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "bool",
- "enable_disable"
- ],
- {
- "crc": "0x5501adee"
- }
- ],
- [
- "feature_gso_enable_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [],
- "enums": [
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "feature_gso_enable_disable": {
- "reply": "feature_gso_enable_disable_reply"
- }
- },
- "options": {
- "version": "1.0.0"
- },
- "aliases": {
- "interface_index": {
- "type": "u32"
- }
- },
- "vl_api_version": "0xecb22d44"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/interface.api.json b/internal/testbinapi/binapi2001/.vppapi/core/interface.api.json
deleted file mode 100644
index 31ed913..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/interface.api.json
+++ /dev/null
@@ -1,1902 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ]
- ],
- "messages": [
- [
- "sw_interface_set_flags",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "vl_api_if_status_flags_t",
- "flags"
- ],
- {
- "crc": "0x6a2b491a"
- }
- ],
- [
- "sw_interface_set_flags_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "hw_interface_set_mtu",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "u16",
- "mtu"
- ],
- {
- "crc": "0xe6746899"
- }
- ],
- [
- "hw_interface_set_mtu_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "sw_interface_set_mtu",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "u32",
- "mtu",
- 4
- ],
- {
- "crc": "0x5cbe85e5"
- }
- ],
- [
- "sw_interface_set_mtu_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "sw_interface_set_ip_directed_broadcast",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "bool",
- "enable"
- ],
- {
- "crc": "0xae6cfcfb"
- }
- ],
- [
- "sw_interface_set_ip_directed_broadcast_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "sw_interface_event",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "pid"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "vl_api_if_status_flags_t",
- "flags"
- ],
- [
- "bool",
- "deleted"
- ],
- {
- "crc": "0xf709f78d"
- }
- ],
- [
- "want_interface_events",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "enable_disable"
- ],
- [
- "u32",
- "pid"
- ],
- {
- "crc": "0x476f5a08"
- }
- ],
- [
- "want_interface_events_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "sw_interface_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "u32",
- "sup_sw_if_index"
- ],
- [
- "vl_api_mac_address_t",
- "l2_address"
- ],
- [
- "vl_api_if_status_flags_t",
- "flags"
- ],
- [
- "vl_api_if_type_t",
- "type"
- ],
- [
- "vl_api_link_duplex_t",
- "link_duplex"
- ],
- [
- "u32",
- "link_speed"
- ],
- [
- "u16",
- "link_mtu"
- ],
- [
- "u32",
- "mtu",
- 4
- ],
- [
- "u32",
- "sub_id"
- ],
- [
- "u8",
- "sub_number_of_tags"
- ],
- [
- "u16",
- "sub_outer_vlan_id"
- ],
- [
- "u16",
- "sub_inner_vlan_id"
- ],
- [
- "vl_api_sub_if_flags_t",
- "sub_if_flags"
- ],
- [
- "u32",
- "vtr_op"
- ],
- [
- "u32",
- "vtr_push_dot1q"
- ],
- [
- "u32",
- "vtr_tag1"
- ],
- [
- "u32",
- "vtr_tag2"
- ],
- [
- "u16",
- "outer_tag"
- ],
- [
- "vl_api_mac_address_t",
- "b_dmac"
- ],
- [
- "vl_api_mac_address_t",
- "b_smac"
- ],
- [
- "u16",
- "b_vlanid"
- ],
- [
- "u32",
- "i_sid"
- ],
- [
- "string",
- "interface_name",
- 64
- ],
- [
- "string",
- "interface_dev_type",
- 64
- ],
- [
- "string",
- "tag",
- 64
- ],
- {
- "crc": "0x17b69fa2"
- }
- ],
- [
- "sw_interface_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index",
- {
- "default": 4294967295
- }
- ],
- [
- "bool",
- "name_filter_valid"
- ],
- [
- "string",
- "name_filter",
- 0
- ],
- {
- "crc": "0xaa610c27"
- }
- ],
- [
- "sw_interface_add_del_address",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "bool",
- "del_all"
- ],
- [
- "vl_api_address_with_prefix_t",
- "prefix"
- ],
- {
- "crc": "0x5803d5c4"
- }
- ],
- [
- "sw_interface_add_del_address_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "sw_interface_set_table",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "bool",
- "is_ipv6"
- ],
- [
- "u32",
- "vrf_id"
- ],
- {
- "crc": "0xdf42a577"
- }
- ],
- [
- "sw_interface_set_table_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "sw_interface_get_table",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "bool",
- "is_ipv6"
- ],
- {
- "crc": "0x2d033de4"
- }
- ],
- [
- "sw_interface_get_table_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "vrf_id"
- ],
- {
- "crc": "0xa6eb0109"
- }
- ],
- [
- "sw_interface_set_unnumbered",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "vl_api_interface_index_t",
- "unnumbered_sw_if_index"
- ],
- [
- "bool",
- "is_add"
- ],
- {
- "crc": "0x938ef33b"
- }
- ],
- [
- "sw_interface_set_unnumbered_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "sw_interface_clear_stats",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0xf9e6675e"
- }
- ],
- [
- "sw_interface_clear_stats_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "sw_interface_tag_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "string",
- "tag",
- 64
- ],
- {
- "crc": "0x426f8bc1"
- }
- ],
- [
- "sw_interface_tag_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "sw_interface_add_del_mac_address",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- [
- "vl_api_mac_address_t",
- "addr"
- ],
- [
- "u8",
- "is_add"
- ],
- {
- "crc": "0x638bb9f4"
- }
- ],
- [
- "sw_interface_add_del_mac_address_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "sw_interface_set_mac_address",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "vl_api_mac_address_t",
- "mac_address"
- ],
- {
- "crc": "0x6aca746a"
- }
- ],
- [
- "sw_interface_set_mac_address_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "sw_interface_get_mac_address",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0xf9e6675e"
- }
- ],
- [
- "sw_interface_get_mac_address_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "vl_api_mac_address_t",
- "mac_address"
- ],
- {
- "crc": "0x40ef2c08"
- }
- ],
- [
- "sw_interface_set_rx_mode",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "bool",
- "queue_id_valid"
- ],
- [
- "u32",
- "queue_id"
- ],
- [
- "vl_api_rx_mode_t",
- "mode"
- ],
- {
- "crc": "0x780f5cee"
- }
- ],
- [
- "sw_interface_set_rx_mode_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "sw_interface_set_rx_placement",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "u32",
- "queue_id"
- ],
- [
- "u32",
- "worker_id"
- ],
- [
- "bool",
- "is_main"
- ],
- {
- "crc": "0xdb65f3c9"
- }
- ],
- [
- "sw_interface_set_rx_placement_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "sw_interface_rx_placement_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0xf9e6675e"
- }
- ],
- [
- "sw_interface_rx_placement_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "u32",
- "queue_id"
- ],
- [
- "u32",
- "worker_id"
- ],
- [
- "vl_api_rx_mode_t",
- "mode"
- ],
- {
- "crc": "0xf6d7d024"
- }
- ],
- [
- "interface_name_renumber",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "u32",
- "new_show_dev_instance"
- ],
- {
- "crc": "0x2b8858b8"
- }
- ],
- [
- "interface_name_renumber_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "create_subif",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "u32",
- "sub_id"
- ],
- [
- "vl_api_sub_if_flags_t",
- "sub_if_flags"
- ],
- [
- "u16",
- "outer_vlan_id"
- ],
- [
- "u16",
- "inner_vlan_id"
- ],
- {
- "crc": "0xcb371063"
- }
- ],
- [
- "create_subif_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0x5383d31f"
- }
- ],
- [
- "create_vlan_subif",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "u32",
- "vlan_id"
- ],
- {
- "crc": "0xaf34ac8b"
- }
- ],
- [
- "create_vlan_subif_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0x5383d31f"
- }
- ],
- [
- "delete_subif",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0xf9e6675e"
- }
- ],
- [
- "delete_subif_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "create_loopback",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_mac_address_t",
- "mac_address"
- ],
- {
- "crc": "0x42bb5d22"
- }
- ],
- [
- "create_loopback_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0x5383d31f"
- }
- ],
- [
- "create_loopback_instance",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_mac_address_t",
- "mac_address"
- ],
- [
- "bool",
- "is_specified"
- ],
- [
- "u32",
- "user_instance"
- ],
- {
- "crc": "0xd36a3ee2"
- }
- ],
- [
- "create_loopback_instance_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0x5383d31f"
- }
- ],
- [
- "delete_loopback",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0xf9e6675e"
- }
- ],
- [
- "delete_loopback_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "collect_detailed_interface_stats",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "bool",
- "enable_disable"
- ],
- {
- "crc": "0x5501adee"
- }
- ],
- [
- "collect_detailed_interface_stats_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "want_interface_events": {
- "reply": "want_interface_events_reply",
- "events": [
- "sw_interface_event"
- ]
- },
- "sw_interface_set_flags": {
- "reply": "sw_interface_set_flags_reply"
- },
- "hw_interface_set_mtu": {
- "reply": "hw_interface_set_mtu_reply"
- },
- "sw_interface_set_mtu": {
- "reply": "sw_interface_set_mtu_reply"
- },
- "sw_interface_set_ip_directed_broadcast": {
- "reply": "sw_interface_set_ip_directed_broadcast_reply"
- },
- "sw_interface_dump": {
- "reply": "sw_interface_details",
- "stream": true
- },
- "sw_interface_add_del_address": {
- "reply": "sw_interface_add_del_address_reply"
- },
- "sw_interface_set_table": {
- "reply": "sw_interface_set_table_reply"
- },
- "sw_interface_get_table": {
- "reply": "sw_interface_get_table_reply"
- },
- "sw_interface_set_unnumbered": {
- "reply": "sw_interface_set_unnumbered_reply"
- },
- "sw_interface_clear_stats": {
- "reply": "sw_interface_clear_stats_reply"
- },
- "sw_interface_tag_add_del": {
- "reply": "sw_interface_tag_add_del_reply"
- },
- "sw_interface_add_del_mac_address": {
- "reply": "sw_interface_add_del_mac_address_reply"
- },
- "sw_interface_set_mac_address": {
- "reply": "sw_interface_set_mac_address_reply"
- },
- "sw_interface_get_mac_address": {
- "reply": "sw_interface_get_mac_address_reply"
- },
- "sw_interface_set_rx_mode": {
- "reply": "sw_interface_set_rx_mode_reply"
- },
- "sw_interface_set_rx_placement": {
- "reply": "sw_interface_set_rx_placement_reply"
- },
- "sw_interface_rx_placement_dump": {
- "reply": "sw_interface_rx_placement_details",
- "stream": true
- },
- "interface_name_renumber": {
- "reply": "interface_name_renumber_reply"
- },
- "create_subif": {
- "reply": "create_subif_reply"
- },
- "create_vlan_subif": {
- "reply": "create_vlan_subif_reply"
- },
- "delete_subif": {
- "reply": "delete_subif_reply"
- },
- "create_loopback": {
- "reply": "create_loopback_reply"
- },
- "create_loopback_instance": {
- "reply": "create_loopback_instance_reply"
- },
- "delete_loopback": {
- "reply": "delete_loopback_reply"
- },
- "collect_detailed_interface_stats": {
- "reply": "collect_detailed_interface_stats_reply"
- }
- },
- "options": {
- "version": "3.2.2"
- },
- "aliases": {
- "interface_index": {
- "type": "u32"
- },
- "mac_address": {
- "type": "u8",
- "length": 6
- },
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- }
- },
- "vl_api_version": "0xfebc3ffa"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/interface_types.api.json b/internal/testbinapi/binapi2001/.vppapi/core/interface_types.api.json
deleted file mode 100644
index 0facb3a..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/interface_types.api.json
+++ /dev/null
@@ -1,167 +0,0 @@
-{
- "types": [],
- "messages": [],
- "unions": [],
- "enums": [
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {},
- "options": {},
- "aliases": {
- "interface_index": {
- "type": "u32"
- }
- },
- "vl_api_version": "0xc97be83d"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/ip.api.json b/internal/testbinapi/binapi2001/.vppapi/core/ip.api.json
deleted file mode 100644
index 66f0284..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/ip.api.json
+++ /dev/null
@@ -1,3219 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ],
- [
- "fib_mpls_label",
- [
- "u8",
- "is_uniform"
- ],
- [
- "u32",
- "label"
- ],
- [
- "u8",
- "ttl"
- ],
- [
- "u8",
- "exp"
- ]
- ],
- [
- "fib_path_nh",
- [
- "vl_api_address_union_t",
- "address"
- ],
- [
- "u32",
- "via_label"
- ],
- [
- "u32",
- "obj_id"
- ],
- [
- "u32",
- "classify_table_index"
- ]
- ],
- [
- "fib_path",
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u32",
- "table_id"
- ],
- [
- "u32",
- "rpf_id"
- ],
- [
- "u8",
- "weight"
- ],
- [
- "u8",
- "preference"
- ],
- [
- "vl_api_fib_path_type_t",
- "type"
- ],
- [
- "vl_api_fib_path_flags_t",
- "flags"
- ],
- [
- "vl_api_fib_path_nh_proto_t",
- "proto"
- ],
- [
- "vl_api_fib_path_nh_t",
- "nh"
- ],
- [
- "u8",
- "n_labels"
- ],
- [
- "vl_api_fib_mpls_label_t",
- "label_stack",
- 16
- ]
- ],
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ],
- [
- "fib_mpls_label",
- [
- "u8",
- "is_uniform"
- ],
- [
- "u32",
- "label"
- ],
- [
- "u8",
- "ttl"
- ],
- [
- "u8",
- "exp"
- ]
- ],
- [
- "fib_path_nh",
- [
- "vl_api_address_union_t",
- "address"
- ],
- [
- "u32",
- "via_label"
- ],
- [
- "u32",
- "obj_id"
- ],
- [
- "u32",
- "classify_table_index"
- ]
- ],
- [
- "fib_path",
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u32",
- "table_id"
- ],
- [
- "u32",
- "rpf_id"
- ],
- [
- "u8",
- "weight"
- ],
- [
- "u8",
- "preference"
- ],
- [
- "vl_api_fib_path_type_t",
- "type"
- ],
- [
- "vl_api_fib_path_flags_t",
- "flags"
- ],
- [
- "vl_api_fib_path_nh_proto_t",
- "proto"
- ],
- [
- "vl_api_fib_path_nh_t",
- "nh"
- ],
- [
- "u8",
- "n_labels"
- ],
- [
- "vl_api_fib_mpls_label_t",
- "label_stack",
- 16
- ]
- ],
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ],
- [
- "mfib_path",
- [
- "vl_api_mfib_itf_flags_t",
- "itf_flags"
- ],
- [
- "vl_api_fib_path_t",
- "path"
- ]
- ],
- [
- "ip_table",
- [
- "u32",
- "table_id"
- ],
- [
- "bool",
- "is_ip6"
- ],
- [
- "string",
- "name",
- 64
- ]
- ],
- [
- "ip_route",
- [
- "u32",
- "table_id"
- ],
- [
- "u32",
- "stats_index"
- ],
- [
- "vl_api_prefix_t",
- "prefix"
- ],
- [
- "u8",
- "n_paths"
- ],
- [
- "vl_api_fib_path_t",
- "paths",
- 0,
- "n_paths"
- ]
- ],
- [
- "ip_mroute",
- [
- "u32",
- "table_id"
- ],
- [
- "u32",
- "entry_flags"
- ],
- [
- "u32",
- "rpf_id"
- ],
- [
- "vl_api_mprefix_t",
- "prefix"
- ],
- [
- "u8",
- "n_paths"
- ],
- [
- "vl_api_mfib_path_t",
- "paths",
- 0,
- "n_paths"
- ]
- ],
- [
- "punt_redirect",
- [
- "vl_api_interface_index_t",
- "rx_sw_if_index"
- ],
- [
- "vl_api_interface_index_t",
- "tx_sw_if_index"
- ],
- [
- "vl_api_address_t",
- "nh"
- ]
- ]
- ],
- "messages": [
- [
- "ip_table_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add",
- {
- "default": "true"
- }
- ],
- [
- "vl_api_ip_table_t",
- "table"
- ],
- {
- "crc": "0x0ffdaec0"
- }
- ],
- [
- "ip_table_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "ip_table_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "ip_table_replace_begin",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ip_table_t",
- "table"
- ],
- {
- "crc": "0xb9d2e09e"
- }
- ],
- [
- "ip_table_replace_begin_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "ip_table_replace_end",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ip_table_t",
- "table"
- ],
- {
- "crc": "0xb9d2e09e"
- }
- ],
- [
- "ip_table_replace_end_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "ip_table_flush",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ip_table_t",
- "table"
- ],
- {
- "crc": "0xb9d2e09e"
- }
- ],
- [
- "ip_table_flush_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "ip_table_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ip_table_t",
- "table"
- ],
- {
- "crc": "0xc79fca0f"
- }
- ],
- [
- "ip_route_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add",
- {
- "default": "true"
- }
- ],
- [
- "bool",
- "is_multipath"
- ],
- [
- "vl_api_ip_route_t",
- "route"
- ],
- {
- "crc": "0xc1ff832d"
- }
- ],
- [
- "ip_route_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "stats_index"
- ],
- {
- "crc": "0x1992deab"
- }
- ],
- [
- "ip_route_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ip_table_t",
- "table"
- ],
- {
- "crc": "0xb9d2e09e"
- }
- ],
- [
- "ip_route_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ip_route_t",
- "route"
- ],
- {
- "crc": "0xd1ffaae1"
- }
- ],
- [
- "set_ip_flow_hash",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "vrf_id"
- ],
- [
- "bool",
- "is_ipv6"
- ],
- [
- "bool",
- "src"
- ],
- [
- "bool",
- "dst"
- ],
- [
- "bool",
- "sport"
- ],
- [
- "bool",
- "dport"
- ],
- [
- "bool",
- "proto"
- ],
- [
- "bool",
- "reverse"
- ],
- [
- "bool",
- "symmetric"
- ],
- {
- "crc": "0x084ee09e"
- }
- ],
- [
- "set_ip_flow_hash_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "sw_interface_ip6_enable_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "bool",
- "enable"
- ],
- {
- "crc": "0xae6cfcfb"
- }
- ],
- [
- "sw_interface_ip6_enable_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "ip_mtable_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "ip_mtable_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ip_table_t",
- "table"
- ],
- {
- "crc": "0xb9d2e09e"
- }
- ],
- [
- "ip_mroute_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add",
- {
- "default": "true"
- }
- ],
- [
- "bool",
- "is_multipath"
- ],
- [
- "vl_api_ip_mroute_t",
- "route"
- ],
- {
- "crc": "0xf6627d17"
- }
- ],
- [
- "ip_mroute_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "stats_index"
- ],
- {
- "crc": "0x1992deab"
- }
- ],
- [
- "ip_mroute_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ip_table_t",
- "table"
- ],
- {
- "crc": "0xb9d2e09e"
- }
- ],
- [
- "ip_mroute_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ip_mroute_t",
- "route"
- ],
- {
- "crc": "0xc1cb4b44"
- }
- ],
- [
- "ip_address_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "vl_api_address_with_prefix_t",
- "prefix"
- ],
- {
- "crc": "0xb1199745"
- }
- ],
- [
- "ip_address_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "bool",
- "is_ipv6"
- ],
- {
- "crc": "0x2d033de4"
- }
- ],
- [
- "ip_unnumbered_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "vl_api_interface_index_t",
- "ip_sw_if_index"
- ],
- {
- "crc": "0xaa12a483"
- }
- ],
- [
- "ip_unnumbered_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0xf9e6675e"
- }
- ],
- [
- "ip_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "bool",
- "is_ipv6"
- ],
- {
- "crc": "0xeb152d07"
- }
- ],
- [
- "ip_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_ipv6"
- ],
- {
- "crc": "0x98d231ca"
- }
- ],
- [
- "mfib_signal_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "mfib_signal_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "u32",
- "table_id"
- ],
- [
- "vl_api_mprefix_t",
- "prefix"
- ],
- [
- "u16",
- "ip_packet_len"
- ],
- [
- "u8",
- "ip_packet_data",
- 256
- ],
- {
- "crc": "0x64398a9a"
- }
- ],
- [
- "ip_punt_police",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "policer_index"
- ],
- [
- "bool",
- "is_add",
- {
- "default": "true"
- }
- ],
- [
- "bool",
- "is_ip6"
- ],
- {
- "crc": "0xdb867cea"
- }
- ],
- [
- "ip_punt_police_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "ip_punt_redirect",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_punt_redirect_t",
- "punt"
- ],
- [
- "bool",
- "is_add",
- {
- "default": "true"
- }
- ],
- {
- "crc": "0xa9a5592c"
- }
- ],
- [
- "ip_punt_redirect_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "ip_punt_redirect_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "bool",
- "is_ipv6"
- ],
- {
- "crc": "0x2d033de4"
- }
- ],
- [
- "ip_punt_redirect_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_punt_redirect_t",
- "punt"
- ],
- {
- "crc": "0x3924f5d3"
- }
- ],
- [
- "ip_container_proxy_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_prefix_t",
- "pfx"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "bool",
- "is_add",
- {
- "default": "true"
- }
- ],
- {
- "crc": "0x91189f40"
- }
- ],
- [
- "ip_container_proxy_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "ip_container_proxy_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "ip_container_proxy_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "vl_api_prefix_t",
- "prefix"
- ],
- {
- "crc": "0x0ee460e8"
- }
- ],
- [
- "ip_source_and_port_range_check_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add",
- {
- "default": "true"
- }
- ],
- [
- "vl_api_prefix_t",
- "prefix"
- ],
- [
- "u8",
- "number_of_ranges"
- ],
- [
- "u16",
- "low_ports",
- 32
- ],
- [
- "u16",
- "high_ports",
- 32
- ],
- [
- "u32",
- "vrf_id"
- ],
- {
- "crc": "0x8bfc76f2"
- }
- ],
- [
- "ip_source_and_port_range_check_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "ip_source_and_port_range_check_interface_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add",
- {
- "default": "true"
- }
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "u32",
- "tcp_in_vrf_id"
- ],
- [
- "u32",
- "tcp_out_vrf_id"
- ],
- [
- "u32",
- "udp_in_vrf_id"
- ],
- [
- "u32",
- "udp_out_vrf_id"
- ],
- {
- "crc": "0xe1ba8987"
- }
- ],
- [
- "ip_source_and_port_range_check_interface_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "ip_source_check_interface_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add",
- {
- "default": "true"
- }
- ],
- [
- "bool",
- "loose"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0x6612356b"
- }
- ],
- [
- "ip_source_check_interface_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "sw_interface_ip6_set_link_local_address",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "vl_api_ip6_address_t",
- "ip"
- ],
- {
- "crc": "0x2931d9fa"
- }
- ],
- [
- "sw_interface_ip6_set_link_local_address_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "ioam_enable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u16",
- "id"
- ],
- [
- "bool",
- "seqno"
- ],
- [
- "bool",
- "analyse"
- ],
- [
- "bool",
- "pot_enable"
- ],
- [
- "bool",
- "trace_enable"
- ],
- [
- "u32",
- "node_id"
- ],
- {
- "crc": "0x51ccd868"
- }
- ],
- [
- "ioam_enable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "ioam_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u16",
- "id"
- ],
- {
- "crc": "0x6b16a45e"
- }
- ],
- [
- "ioam_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "ip_reassembly_set",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "timeout_ms"
- ],
- [
- "u32",
- "max_reassemblies"
- ],
- [
- "u32",
- "max_reassembly_length"
- ],
- [
- "u32",
- "expire_walk_interval_ms"
- ],
- [
- "bool",
- "is_ip6"
- ],
- [
- "vl_api_ip_reass_type_t",
- "type"
- ],
- {
- "crc": "0x16467d25"
- }
- ],
- [
- "ip_reassembly_set_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "ip_reassembly_get",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_ip6"
- ],
- [
- "vl_api_ip_reass_type_t",
- "type"
- ],
- {
- "crc": "0xea13ff63"
- }
- ],
- [
- "ip_reassembly_get_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "timeout_ms"
- ],
- [
- "u32",
- "max_reassemblies"
- ],
- [
- "u32",
- "max_reassembly_length"
- ],
- [
- "u32",
- "expire_walk_interval_ms"
- ],
- [
- "bool",
- "is_ip6"
- ],
- {
- "crc": "0xd5eb8d34"
- }
- ],
- [
- "ip_reassembly_enable_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "bool",
- "enable_ip4"
- ],
- [
- "bool",
- "enable_ip6"
- ],
- [
- "vl_api_ip_reass_type_t",
- "type"
- ],
- {
- "crc": "0x885c85a6"
- }
- ],
- [
- "ip_reassembly_enable_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ],
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ],
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "fib_path_nh_proto",
- [
- "FIB_API_PATH_NH_PROTO_IP4",
- 0
- ],
- [
- "FIB_API_PATH_NH_PROTO_IP6",
- 1
- ],
- [
- "FIB_API_PATH_NH_PROTO_MPLS",
- 2
- ],
- [
- "FIB_API_PATH_NH_PROTO_ETHERNET",
- 3
- ],
- [
- "FIB_API_PATH_NH_PROTO_BIER",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "fib_path_flags",
- [
- "FIB_API_PATH_FLAG_NONE",
- 0
- ],
- [
- "FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED",
- 1
- ],
- [
- "FIB_API_PATH_FLAG_RESOLVE_VIA_HOST",
- 2
- ],
- [
- "FIB_API_PATH_FLAG_POP_PW_CW",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "fib_path_type",
- [
- "FIB_API_PATH_TYPE_NORMAL",
- 0
- ],
- [
- "FIB_API_PATH_TYPE_LOCAL",
- 1
- ],
- [
- "FIB_API_PATH_TYPE_DROP",
- 2
- ],
- [
- "FIB_API_PATH_TYPE_UDP_ENCAP",
- 3
- ],
- [
- "FIB_API_PATH_TYPE_BIER_IMP",
- 4
- ],
- [
- "FIB_API_PATH_TYPE_ICMP_UNREACH",
- 5
- ],
- [
- "FIB_API_PATH_TYPE_ICMP_PROHIBIT",
- 6
- ],
- [
- "FIB_API_PATH_TYPE_SOURCE_LOOKUP",
- 7
- ],
- [
- "FIB_API_PATH_TYPE_DVR",
- 8
- ],
- [
- "FIB_API_PATH_TYPE_INTERFACE_RX",
- 9
- ],
- [
- "FIB_API_PATH_TYPE_CLASSIFY",
- 10
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "fib_path_nh_proto",
- [
- "FIB_API_PATH_NH_PROTO_IP4",
- 0
- ],
- [
- "FIB_API_PATH_NH_PROTO_IP6",
- 1
- ],
- [
- "FIB_API_PATH_NH_PROTO_MPLS",
- 2
- ],
- [
- "FIB_API_PATH_NH_PROTO_ETHERNET",
- 3
- ],
- [
- "FIB_API_PATH_NH_PROTO_BIER",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "fib_path_flags",
- [
- "FIB_API_PATH_FLAG_NONE",
- 0
- ],
- [
- "FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED",
- 1
- ],
- [
- "FIB_API_PATH_FLAG_RESOLVE_VIA_HOST",
- 2
- ],
- [
- "FIB_API_PATH_FLAG_POP_PW_CW",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "fib_path_type",
- [
- "FIB_API_PATH_TYPE_NORMAL",
- 0
- ],
- [
- "FIB_API_PATH_TYPE_LOCAL",
- 1
- ],
- [
- "FIB_API_PATH_TYPE_DROP",
- 2
- ],
- [
- "FIB_API_PATH_TYPE_UDP_ENCAP",
- 3
- ],
- [
- "FIB_API_PATH_TYPE_BIER_IMP",
- 4
- ],
- [
- "FIB_API_PATH_TYPE_ICMP_UNREACH",
- 5
- ],
- [
- "FIB_API_PATH_TYPE_ICMP_PROHIBIT",
- 6
- ],
- [
- "FIB_API_PATH_TYPE_SOURCE_LOOKUP",
- 7
- ],
- [
- "FIB_API_PATH_TYPE_DVR",
- 8
- ],
- [
- "FIB_API_PATH_TYPE_INTERFACE_RX",
- 9
- ],
- [
- "FIB_API_PATH_TYPE_CLASSIFY",
- 10
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mfib_itf_flags",
- [
- "MFIB_API_ITF_FLAG_NONE",
- 0
- ],
- [
- "MFIB_API_ITF_FLAG_NEGATE_SIGNAL",
- 1
- ],
- [
- "MFIB_API_ITF_FLAG_ACCEPT",
- 2
- ],
- [
- "MFIB_API_ITF_FLAG_FORWARD",
- 4
- ],
- [
- "MFIB_API_ITF_FLAG_SIGNAL_PRESENT",
- 8
- ],
- [
- "MFIB_API_ITF_FLAG_DONT_PRESERVE",
- 16
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_reass_type",
- [
- "IP_REASS_TYPE_FULL",
- 0
- ],
- [
- "IP_REASS_TYPE_SHALLOW_VIRTUAL",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "ip_table_add_del": {
- "reply": "ip_table_add_del_reply"
- },
- "ip_table_dump": {
- "reply": "ip_table_details",
- "stream": true
- },
- "ip_table_replace_begin": {
- "reply": "ip_table_replace_begin_reply"
- },
- "ip_table_replace_end": {
- "reply": "ip_table_replace_end_reply"
- },
- "ip_table_flush": {
- "reply": "ip_table_flush_reply"
- },
- "ip_route_add_del": {
- "reply": "ip_route_add_del_reply"
- },
- "ip_route_dump": {
- "reply": "ip_route_details",
- "stream": true
- },
- "set_ip_flow_hash": {
- "reply": "set_ip_flow_hash_reply"
- },
- "sw_interface_ip6_enable_disable": {
- "reply": "sw_interface_ip6_enable_disable_reply"
- },
- "ip_mtable_dump": {
- "reply": "ip_mtable_details",
- "stream": true
- },
- "ip_mroute_add_del": {
- "reply": "ip_mroute_add_del_reply"
- },
- "ip_mroute_dump": {
- "reply": "ip_mroute_details",
- "stream": true
- },
- "ip_address_dump": {
- "reply": "ip_address_details",
- "stream": true
- },
- "ip_unnumbered_dump": {
- "reply": "ip_unnumbered_details",
- "stream": true
- },
- "ip_dump": {
- "reply": "ip_details",
- "stream": true
- },
- "mfib_signal_dump": {
- "reply": "mfib_signal_details",
- "stream": true
- },
- "ip_punt_police": {
- "reply": "ip_punt_police_reply"
- },
- "ip_punt_redirect": {
- "reply": "ip_punt_redirect_reply"
- },
- "ip_punt_redirect_dump": {
- "reply": "ip_punt_redirect_details",
- "stream": true
- },
- "ip_container_proxy_add_del": {
- "reply": "ip_container_proxy_add_del_reply"
- },
- "ip_container_proxy_dump": {
- "reply": "ip_container_proxy_details",
- "stream": true
- },
- "ip_source_and_port_range_check_add_del": {
- "reply": "ip_source_and_port_range_check_add_del_reply"
- },
- "ip_source_and_port_range_check_interface_add_del": {
- "reply": "ip_source_and_port_range_check_interface_add_del_reply"
- },
- "ip_source_check_interface_add_del": {
- "reply": "ip_source_check_interface_add_del_reply"
- },
- "sw_interface_ip6_set_link_local_address": {
- "reply": "sw_interface_ip6_set_link_local_address_reply"
- },
- "ioam_enable": {
- "reply": "ioam_enable_reply"
- },
- "ioam_disable": {
- "reply": "ioam_disable_reply"
- },
- "ip_reassembly_set": {
- "reply": "ip_reassembly_set_reply"
- },
- "ip_reassembly_get": {
- "reply": "ip_reassembly_get_reply"
- },
- "ip_reassembly_enable_disable": {
- "reply": "ip_reassembly_enable_disable_reply"
- }
- },
- "options": {
- "version": "3.0.1"
- },
- "aliases": {
- "interface_index": {
- "type": "u32"
- },
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- },
- "mac_address": {
- "type": "u8",
- "length": 6
- }
- },
- "vl_api_version": "0xfc3fea46"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/ip6_nd.api.json b/internal/testbinapi/binapi2001/.vppapi/core/ip6_nd.api.json
deleted file mode 100644
index a6f3070..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/ip6_nd.api.json
+++ /dev/null
@@ -1,912 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ],
- [
- "ip6_ra_prefix_info",
- [
- "vl_api_prefix_t",
- "prefix"
- ],
- [
- "u8",
- "flags"
- ],
- [
- "u32",
- "valid_time"
- ],
- [
- "u32",
- "preferred_time"
- ]
- ]
- ],
- "messages": [
- [
- "sw_interface_ip6nd_ra_config",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "u8",
- "suppress"
- ],
- [
- "u8",
- "managed"
- ],
- [
- "u8",
- "other"
- ],
- [
- "u8",
- "ll_option"
- ],
- [
- "u8",
- "send_unicast"
- ],
- [
- "u8",
- "cease"
- ],
- [
- "bool",
- "is_no"
- ],
- [
- "u8",
- "default_router"
- ],
- [
- "u32",
- "max_interval"
- ],
- [
- "u32",
- "min_interval"
- ],
- [
- "u32",
- "lifetime"
- ],
- [
- "u32",
- "initial_count"
- ],
- [
- "u32",
- "initial_interval"
- ],
- {
- "crc": "0x3eb00b1c"
- }
- ],
- [
- "sw_interface_ip6nd_ra_config_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "sw_interface_ip6nd_ra_prefix",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "vl_api_prefix_t",
- "prefix"
- ],
- [
- "bool",
- "use_default"
- ],
- [
- "bool",
- "no_advertise"
- ],
- [
- "bool",
- "off_link"
- ],
- [
- "bool",
- "no_autoconfig"
- ],
- [
- "bool",
- "no_onlink"
- ],
- [
- "bool",
- "is_no"
- ],
- [
- "u32",
- "val_lifetime"
- ],
- [
- "u32",
- "pref_lifetime"
- ],
- {
- "crc": "0xe098785f"
- }
- ],
- [
- "sw_interface_ip6nd_ra_prefix_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "ip6nd_proxy_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "vl_api_ip6_address_t",
- "ip"
- ],
- {
- "crc": "0x3fdf6659"
- }
- ],
- [
- "ip6nd_proxy_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "ip6nd_proxy_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "vl_api_ip6_address_t",
- "ip"
- ],
- {
- "crc": "0xd35be8ff"
- }
- ],
- [
- "ip6nd_proxy_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "ip6nd_send_router_solicitation",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "irt"
- ],
- [
- "u32",
- "mrt"
- ],
- [
- "u32",
- "mrc"
- ],
- [
- "u32",
- "mrd"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "bool",
- "stop"
- ],
- {
- "crc": "0xe5de609c"
- }
- ],
- [
- "ip6nd_send_router_solicitation_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "want_ip6_ra_events",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "enable"
- ],
- [
- "u32",
- "pid"
- ],
- {
- "crc": "0x3ec6d6c2"
- }
- ],
- [
- "want_ip6_ra_events_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "ip6_ra_event",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "pid"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "vl_api_ip6_address_t",
- "router_addr"
- ],
- [
- "u8",
- "current_hop_limit"
- ],
- [
- "u8",
- "flags"
- ],
- [
- "u16",
- "router_lifetime_in_sec"
- ],
- [
- "u32",
- "neighbor_reachable_time_in_msec"
- ],
- [
- "u32",
- "time_in_msec_between_retransmitted_neighbor_solicitations"
- ],
- [
- "u32",
- "n_prefixes"
- ],
- [
- "vl_api_ip6_ra_prefix_info_t",
- "prefixes",
- 0,
- "n_prefixes"
- ],
- {
- "crc": "0x47e8cfbe"
- }
- ]
- ],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "want_ip6_ra_events": {
- "reply": "want_ip6_ra_events_reply",
- "events": [
- "ip6_ra_event"
- ]
- },
- "sw_interface_ip6nd_ra_config": {
- "reply": "sw_interface_ip6nd_ra_config_reply"
- },
- "sw_interface_ip6nd_ra_prefix": {
- "reply": "sw_interface_ip6nd_ra_prefix_reply"
- },
- "ip6nd_proxy_add_del": {
- "reply": "ip6nd_proxy_add_del_reply"
- },
- "ip6nd_proxy_dump": {
- "reply": "ip6nd_proxy_details",
- "stream": true
- },
- "ip6nd_send_router_solicitation": {
- "reply": "ip6nd_send_router_solicitation_reply"
- }
- },
- "options": {
- "version": "1.0.0"
- },
- "aliases": {
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- },
- "interface_index": {
- "type": "u32"
- }
- },
- "vl_api_version": "0xbb8ff0e9"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/ip_neighbor.api.json b/internal/testbinapi/binapi2001/.vppapi/core/ip_neighbor.api.json
deleted file mode 100644
index b4a2dcd..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/ip_neighbor.api.json
+++ /dev/null
@@ -1,736 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ],
- [
- "ip_neighbor",
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "vl_api_ip_neighbor_flags_t",
- "flags"
- ],
- [
- "vl_api_mac_address_t",
- "mac_address"
- ],
- [
- "vl_api_address_t",
- "ip_address"
- ]
- ]
- ],
- "messages": [
- [
- "ip_neighbor_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "vl_api_ip_neighbor_t",
- "neighbor"
- ],
- {
- "crc": "0x105518b6"
- }
- ],
- [
- "ip_neighbor_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "stats_index"
- ],
- {
- "crc": "0x1992deab"
- }
- ],
- [
- "ip_neighbor_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index",
- {
- "default": 4294967295
- }
- ],
- [
- "vl_api_address_family_t",
- "af"
- ],
- {
- "crc": "0xcd831298"
- }
- ],
- [
- "ip_neighbor_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ip_neighbor_t",
- "neighbor"
- ],
- {
- "crc": "0x59121ce9"
- }
- ],
- [
- "ip_neighbor_config",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u32",
- "max_number"
- ],
- [
- "u32",
- "max_age"
- ],
- [
- "bool",
- "recycle"
- ],
- {
- "crc": "0xf4a5cf44"
- }
- ],
- [
- "ip_neighbor_config_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "want_ip_neighbor_events",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "enable"
- ],
- [
- "u32",
- "pid"
- ],
- [
- "vl_api_address_t",
- "ip"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index",
- {
- "default": 4294967295
- }
- ],
- {
- "crc": "0x1a312870"
- }
- ],
- [
- "want_ip_neighbor_events_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "ip_neighbor_event",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "pid"
- ],
- [
- "vl_api_ip_neighbor_t",
- "neighbor"
- ],
- {
- "crc": "0x83933131"
- }
- ]
- ],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_neighbor_flags",
- [
- "IP_API_NEIGHBOR_FLAG_NONE",
- 0
- ],
- [
- "IP_API_NEIGHBOR_FLAG_STATIC",
- 1
- ],
- [
- "IP_API_NEIGHBOR_FLAG_NO_FIB_ENTRY",
- 2
- ],
- {
- "enumtype": "u8"
- }
- ]
- ],
- "services": {
- "want_ip_neighbor_events": {
- "reply": "want_ip_neighbor_events_reply",
- "events": [
- "ip_neighbor_event"
- ]
- },
- "ip_neighbor_add_del": {
- "reply": "ip_neighbor_add_del_reply"
- },
- "ip_neighbor_dump": {
- "reply": "ip_neighbor_details",
- "stream": true
- },
- "ip_neighbor_config": {
- "reply": "ip_neighbor_config_reply"
- }
- },
- "options": {
- "version": "1.0.0"
- },
- "aliases": {
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- },
- "mac_address": {
- "type": "u8",
- "length": 6
- },
- "interface_index": {
- "type": "u32"
- }
- },
- "vl_api_version": "0xdae37c55"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/ip_types.api.json b/internal/testbinapi/binapi2001/.vppapi/core/ip_types.api.json
deleted file mode 100644
index b15946c..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/ip_types.api.json
+++ /dev/null
@@ -1,298 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ]
- ],
- "messages": [],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {},
- "options": {
- "version": "3.0.0"
- },
- "aliases": {
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- }
- },
- "vl_api_version": "0x80424562"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/ipfix_export.api.json b/internal/testbinapi/binapi2001/.vppapi/core/ipfix_export.api.json
deleted file mode 100644
index e7620d3..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/ipfix_export.api.json
+++ /dev/null
@@ -1,664 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ]
- ],
- "messages": [
- [
- "set_ipfix_exporter",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_address_t",
- "collector_address"
- ],
- [
- "u16",
- "collector_port"
- ],
- [
- "vl_api_address_t",
- "src_address"
- ],
- [
- "u32",
- "vrf_id"
- ],
- [
- "u32",
- "path_mtu"
- ],
- [
- "u32",
- "template_interval"
- ],
- [
- "bool",
- "udp_checksum"
- ],
- {
- "crc": "0x69284e07"
- }
- ],
- [
- "set_ipfix_exporter_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "ipfix_exporter_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "ipfix_exporter_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_address_t",
- "collector_address"
- ],
- [
- "u16",
- "collector_port"
- ],
- [
- "vl_api_address_t",
- "src_address"
- ],
- [
- "u32",
- "vrf_id"
- ],
- [
- "u32",
- "path_mtu"
- ],
- [
- "u32",
- "template_interval"
- ],
- [
- "bool",
- "udp_checksum"
- ],
- {
- "crc": "0x11e07413"
- }
- ],
- [
- "set_ipfix_classify_stream",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "domain_id"
- ],
- [
- "u16",
- "src_port"
- ],
- {
- "crc": "0xc9cbe053"
- }
- ],
- [
- "set_ipfix_classify_stream_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "ipfix_classify_stream_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "ipfix_classify_stream_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "domain_id"
- ],
- [
- "u16",
- "src_port"
- ],
- {
- "crc": "0x2903539d"
- }
- ],
- [
- "ipfix_classify_table_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "table_id"
- ],
- [
- "vl_api_address_family_t",
- "ip_version"
- ],
- [
- "vl_api_ip_proto_t",
- "transport_protocol"
- ],
- [
- "bool",
- "is_add"
- ],
- {
- "crc": "0x5118bc5e"
- }
- ],
- [
- "ipfix_classify_table_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "ipfix_classify_table_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "ipfix_classify_table_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "table_id"
- ],
- [
- "vl_api_address_family_t",
- "ip_version"
- ],
- [
- "vl_api_ip_proto_t",
- "transport_protocol"
- ],
- {
- "crc": "0x7c8351ec"
- }
- ],
- [
- "ipfix_flush",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "ipfix_flush_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "set_ipfix_exporter": {
- "reply": "set_ipfix_exporter_reply"
- },
- "ipfix_exporter_dump": {
- "reply": "ipfix_exporter_details",
- "stream": true
- },
- "set_ipfix_classify_stream": {
- "reply": "set_ipfix_classify_stream_reply"
- },
- "ipfix_classify_stream_dump": {
- "reply": "ipfix_classify_stream_details",
- "stream": true
- },
- "ipfix_classify_table_add_del": {
- "reply": "ipfix_classify_table_add_del_reply"
- },
- "ipfix_classify_table_dump": {
- "reply": "ipfix_classify_table_details",
- "stream": true
- },
- "ipfix_flush": {
- "reply": "ipfix_flush_reply"
- }
- },
- "options": {
- "version": "2.0.1"
- },
- "aliases": {
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- }
- },
- "vl_api_version": "0xee6ea488"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/ipip.api.json b/internal/testbinapi/binapi2001/.vppapi/core/ipip.api.json
deleted file mode 100644
index 47b62eb..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/ipip.api.json
+++ /dev/null
@@ -1,764 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ],
- [
- "ipip_tunnel",
- [
- "u32",
- "instance"
- ],
- [
- "vl_api_address_t",
- "src"
- ],
- [
- "vl_api_address_t",
- "dst"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "u32",
- "table_id"
- ],
- [
- "vl_api_ipip_tunnel_flags_t",
- "flags"
- ],
- [
- "vl_api_ip_dscp_t",
- "dscp"
- ]
- ]
- ],
- "messages": [
- [
- "ipip_add_tunnel",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ipip_tunnel_t",
- "tunnel"
- ],
- {
- "crc": "0xef93caab"
- }
- ],
- [
- "ipip_add_tunnel_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0x5383d31f"
- }
- ],
- [
- "ipip_del_tunnel",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0xf9e6675e"
- }
- ],
- [
- "ipip_del_tunnel_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "ipip_6rd_add_tunnel",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "ip6_table_id"
- ],
- [
- "u32",
- "ip4_table_id"
- ],
- [
- "vl_api_ip6_prefix_t",
- "ip6_prefix"
- ],
- [
- "vl_api_ip4_prefix_t",
- "ip4_prefix"
- ],
- [
- "vl_api_ip4_address_t",
- "ip4_src"
- ],
- [
- "bool",
- "security_check"
- ],
- [
- "u8",
- "tc_tos"
- ],
- {
- "crc": "0x56e93cc0"
- }
- ],
- [
- "ipip_6rd_add_tunnel_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0x5383d31f"
- }
- ],
- [
- "ipip_6rd_del_tunnel",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0xf9e6675e"
- }
- ],
- [
- "ipip_6rd_del_tunnel_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "ipip_tunnel_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0xf9e6675e"
- }
- ],
- [
- "ipip_tunnel_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ipip_tunnel_t",
- "tunnel"
- ],
- {
- "crc": "0x7f7b5b85"
- }
- ]
- ],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ipip_tunnel_flags",
- [
- "IPIP_TUNNEL_API_FLAG_NONE",
- 0
- ],
- [
- "IPIP_TUNNEL_API_FLAG_ENCAP_COPY_DF",
- 1
- ],
- [
- "IPIP_TUNNEL_API_FLAG_ENCAP_SET_DF",
- 2
- ],
- [
- "IPIP_TUNNEL_API_FLAG_ENCAP_COPY_DSCP",
- 4
- ],
- [
- "IPIP_TUNNEL_API_FLAG_ENCAP_COPY_ECN",
- 8
- ],
- [
- "IPIP_TUNNEL_API_FLAG_DECAP_COPY_ECN",
- 16
- ],
- {
- "enumtype": "u8"
- }
- ]
- ],
- "services": {
- "ipip_add_tunnel": {
- "reply": "ipip_add_tunnel_reply"
- },
- "ipip_del_tunnel": {
- "reply": "ipip_del_tunnel_reply"
- },
- "ipip_6rd_add_tunnel": {
- "reply": "ipip_6rd_add_tunnel_reply"
- },
- "ipip_6rd_del_tunnel": {
- "reply": "ipip_6rd_del_tunnel_reply"
- },
- "ipip_tunnel_dump": {
- "reply": "ipip_tunnel_details",
- "stream": true
- }
- },
- "options": {
- "version": "2.0.0"
- },
- "aliases": {
- "interface_index": {
- "type": "u32"
- },
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- }
- },
- "vl_api_version": "0xf108649c"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/ipip_types.api.json b/internal/testbinapi/binapi2001/.vppapi/core/ipip_types.api.json
deleted file mode 100644
index ccded2e..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/ipip_types.api.json
+++ /dev/null
@@ -1,41 +0,0 @@
-{
- "types": [],
- "messages": [],
- "unions": [],
- "enums": [
- [
- "ipip_tunnel_flags",
- [
- "IPIP_TUNNEL_API_FLAG_NONE",
- 0
- ],
- [
- "IPIP_TUNNEL_API_FLAG_ENCAP_COPY_DF",
- 1
- ],
- [
- "IPIP_TUNNEL_API_FLAG_ENCAP_SET_DF",
- 2
- ],
- [
- "IPIP_TUNNEL_API_FLAG_ENCAP_COPY_DSCP",
- 4
- ],
- [
- "IPIP_TUNNEL_API_FLAG_ENCAP_COPY_ECN",
- 8
- ],
- [
- "IPIP_TUNNEL_API_FLAG_DECAP_COPY_ECN",
- 16
- ],
- {
- "enumtype": "u8"
- }
- ]
- ],
- "services": {},
- "options": {},
- "aliases": {},
- "vl_api_version": "0xa2a8fa8d"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/ipsec.api.json b/internal/testbinapi/binapi2001/.vppapi/core/ipsec.api.json
deleted file mode 100644
index 49c933e..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/ipsec.api.json
+++ /dev/null
@@ -1,1580 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ],
- [
- "key",
- [
- "u8",
- "length"
- ],
- [
- "u8",
- "data",
- 128
- ]
- ],
- [
- "ipsec_sad_entry",
- [
- "u32",
- "sad_id"
- ],
- [
- "u32",
- "spi"
- ],
- [
- "vl_api_ipsec_proto_t",
- "protocol"
- ],
- [
- "vl_api_ipsec_crypto_alg_t",
- "crypto_algorithm"
- ],
- [
- "vl_api_key_t",
- "crypto_key"
- ],
- [
- "vl_api_ipsec_integ_alg_t",
- "integrity_algorithm"
- ],
- [
- "vl_api_key_t",
- "integrity_key"
- ],
- [
- "vl_api_ipsec_sad_flags_t",
- "flags"
- ],
- [
- "vl_api_address_t",
- "tunnel_src"
- ],
- [
- "vl_api_address_t",
- "tunnel_dst"
- ],
- [
- "u32",
- "tx_table_id"
- ],
- [
- "u32",
- "salt"
- ]
- ],
- [
- "ipsec_spd_entry",
- [
- "u32",
- "spd_id"
- ],
- [
- "i32",
- "priority"
- ],
- [
- "u8",
- "is_outbound"
- ],
- [
- "u32",
- "sa_id"
- ],
- [
- "vl_api_ipsec_spd_action_t",
- "policy"
- ],
- [
- "u8",
- "protocol"
- ],
- [
- "vl_api_address_t",
- "remote_address_start"
- ],
- [
- "vl_api_address_t",
- "remote_address_stop"
- ],
- [
- "vl_api_address_t",
- "local_address_start"
- ],
- [
- "vl_api_address_t",
- "local_address_stop"
- ],
- [
- "u16",
- "remote_port_start"
- ],
- [
- "u16",
- "remote_port_stop"
- ],
- [
- "u16",
- "local_port_start"
- ],
- [
- "u16",
- "local_port_stop"
- ]
- ],
- [
- "ipsec_tunnel_protect",
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "u32",
- "sa_out"
- ],
- [
- "u8",
- "n_sa_in"
- ],
- [
- "u32",
- "sa_in",
- 0,
- "n_sa_in"
- ]
- ]
- ],
- "messages": [
- [
- "ipsec_spd_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_add"
- ],
- [
- "u32",
- "spd_id"
- ],
- {
- "crc": "0x9ffdf5da"
- }
- ],
- [
- "ipsec_spd_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "ipsec_interface_add_del_spd",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_add"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u32",
- "spd_id"
- ],
- {
- "crc": "0x1e3b8286"
- }
- ],
- [
- "ipsec_interface_add_del_spd_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "ipsec_spd_entry_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_add"
- ],
- [
- "vl_api_ipsec_spd_entry_t",
- "entry"
- ],
- {
- "crc": "0xdb217840"
- }
- ],
- [
- "ipsec_spd_entry_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "stat_index"
- ],
- {
- "crc": "0x9ffac24b"
- }
- ],
- [
- "ipsec_spds_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "ipsec_spds_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "spd_id"
- ],
- [
- "u32",
- "npolicies"
- ],
- {
- "crc": "0xa04bb254"
- }
- ],
- [
- "ipsec_spd_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "spd_id"
- ],
- [
- "u32",
- "sa_id"
- ],
- {
- "crc": "0xafefbf7d"
- }
- ],
- [
- "ipsec_spd_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ipsec_spd_entry_t",
- "entry"
- ],
- {
- "crc": "0x021e2c20"
- }
- ],
- [
- "ipsec_sad_entry_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_add"
- ],
- [
- "vl_api_ipsec_sad_entry_t",
- "entry"
- ],
- {
- "crc": "0xa25ab61e"
- }
- ],
- [
- "ipsec_sad_entry_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "stat_index"
- ],
- {
- "crc": "0x9ffac24b"
- }
- ],
- [
- "ipsec_tunnel_protect_update",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ipsec_tunnel_protect_t",
- "tunnel"
- ],
- {
- "crc": "0xeccbc177"
- }
- ],
- [
- "ipsec_tunnel_protect_update_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "ipsec_tunnel_protect_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0xf9e6675e"
- }
- ],
- [
- "ipsec_tunnel_protect_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "ipsec_tunnel_protect_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0xf9e6675e"
- }
- ],
- [
- "ipsec_tunnel_protect_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ipsec_tunnel_protect_t",
- "tun"
- ],
- {
- "crc": "0x7520eefe"
- }
- ],
- [
- "ipsec_spd_interface_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "spd_index"
- ],
- [
- "u8",
- "spd_index_valid"
- ],
- {
- "crc": "0x8971de19"
- }
- ],
- [
- "ipsec_spd_interface_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "spd_index"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- {
- "crc": "0x2c54296d"
- }
- ],
- [
- "ipsec_tunnel_if_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_add"
- ],
- [
- "u8",
- "esn"
- ],
- [
- "u8",
- "anti_replay"
- ],
- [
- "vl_api_address_t",
- "local_ip"
- ],
- [
- "vl_api_address_t",
- "remote_ip"
- ],
- [
- "u32",
- "local_spi"
- ],
- [
- "u32",
- "remote_spi"
- ],
- [
- "u8",
- "crypto_alg"
- ],
- [
- "u8",
- "local_crypto_key_len"
- ],
- [
- "u8",
- "local_crypto_key",
- 128
- ],
- [
- "u8",
- "remote_crypto_key_len"
- ],
- [
- "u8",
- "remote_crypto_key",
- 128
- ],
- [
- "u8",
- "integ_alg"
- ],
- [
- "u8",
- "local_integ_key_len"
- ],
- [
- "u8",
- "local_integ_key",
- 128
- ],
- [
- "u8",
- "remote_integ_key_len"
- ],
- [
- "u8",
- "remote_integ_key",
- 128
- ],
- [
- "u8",
- "renumber"
- ],
- [
- "u32",
- "show_instance"
- ],
- [
- "u8",
- "udp_encap"
- ],
- [
- "u32",
- "tx_table_id"
- ],
- [
- "u32",
- "salt"
- ],
- {
- "crc": "0xd5a98274"
- }
- ],
- [
- "ipsec_tunnel_if_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- {
- "crc": "0xfda5941f"
- }
- ],
- [
- "ipsec_sa_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "sa_id"
- ],
- {
- "crc": "0x2076c2f4"
- }
- ],
- [
- "ipsec_sa_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ipsec_sad_entry_t",
- "entry"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u32",
- "salt"
- ],
- [
- "u64",
- "seq_outbound"
- ],
- [
- "u64",
- "last_seq_inbound"
- ],
- [
- "u64",
- "replay_window"
- ],
- [
- "u64",
- "total_data_size"
- ],
- {
- "crc": "0x9c8d829a"
- }
- ],
- [
- "ipsec_tunnel_if_set_sa",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u32",
- "sa_id"
- ],
- [
- "u8",
- "is_outbound"
- ],
- {
- "crc": "0x6ab567f2"
- }
- ],
- [
- "ipsec_tunnel_if_set_sa_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "ipsec_backend_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "ipsec_backend_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "name",
- 128
- ],
- [
- "vl_api_ipsec_proto_t",
- "protocol"
- ],
- [
- "u8",
- "index"
- ],
- [
- "u8",
- "active"
- ],
- {
- "crc": "0x7700751c"
- }
- ],
- [
- "ipsec_select_backend",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ipsec_proto_t",
- "protocol"
- ],
- [
- "u8",
- "index"
- ],
- {
- "crc": "0x4fd24836"
- }
- ],
- [
- "ipsec_select_backend_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ipsec_crypto_alg",
- [
- "IPSEC_API_CRYPTO_ALG_NONE",
- 0
- ],
- [
- "IPSEC_API_CRYPTO_ALG_AES_CBC_128",
- 1
- ],
- [
- "IPSEC_API_CRYPTO_ALG_AES_CBC_192",
- 2
- ],
- [
- "IPSEC_API_CRYPTO_ALG_AES_CBC_256",
- 3
- ],
- [
- "IPSEC_API_CRYPTO_ALG_AES_CTR_128",
- 4
- ],
- [
- "IPSEC_API_CRYPTO_ALG_AES_CTR_192",
- 5
- ],
- [
- "IPSEC_API_CRYPTO_ALG_AES_CTR_256",
- 6
- ],
- [
- "IPSEC_API_CRYPTO_ALG_AES_GCM_128",
- 7
- ],
- [
- "IPSEC_API_CRYPTO_ALG_AES_GCM_192",
- 8
- ],
- [
- "IPSEC_API_CRYPTO_ALG_AES_GCM_256",
- 9
- ],
- [
- "IPSEC_API_CRYPTO_ALG_DES_CBC",
- 10
- ],
- [
- "IPSEC_API_CRYPTO_ALG_3DES_CBC",
- 11
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ipsec_integ_alg",
- [
- "IPSEC_API_INTEG_ALG_NONE",
- 0
- ],
- [
- "IPSEC_API_INTEG_ALG_MD5_96",
- 1
- ],
- [
- "IPSEC_API_INTEG_ALG_SHA1_96",
- 2
- ],
- [
- "IPSEC_API_INTEG_ALG_SHA_256_96",
- 3
- ],
- [
- "IPSEC_API_INTEG_ALG_SHA_256_128",
- 4
- ],
- [
- "IPSEC_API_INTEG_ALG_SHA_384_192",
- 5
- ],
- [
- "IPSEC_API_INTEG_ALG_SHA_512_256",
- 6
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ipsec_sad_flags",
- [
- "IPSEC_API_SAD_FLAG_NONE",
- 0
- ],
- [
- "IPSEC_API_SAD_FLAG_USE_ESN",
- 1
- ],
- [
- "IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY",
- 2
- ],
- [
- "IPSEC_API_SAD_FLAG_IS_TUNNEL",
- 4
- ],
- [
- "IPSEC_API_SAD_FLAG_IS_TUNNEL_V6",
- 8
- ],
- [
- "IPSEC_API_SAD_FLAG_UDP_ENCAP",
- 16
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ipsec_proto",
- [
- "IPSEC_API_PROTO_ESP",
- 1
- ],
- [
- "IPSEC_API_PROTO_AH",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ipsec_spd_action",
- [
- "IPSEC_API_SPD_ACTION_BYPASS",
- 0
- ],
- [
- "IPSEC_API_SPD_ACTION_DISCARD",
- 1
- ],
- [
- "IPSEC_API_SPD_ACTION_RESOLVE",
- 2
- ],
- [
- "IPSEC_API_SPD_ACTION_PROTECT",
- 3
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "ipsec_spd_add_del": {
- "reply": "ipsec_spd_add_del_reply"
- },
- "ipsec_interface_add_del_spd": {
- "reply": "ipsec_interface_add_del_spd_reply"
- },
- "ipsec_spd_entry_add_del": {
- "reply": "ipsec_spd_entry_add_del_reply"
- },
- "ipsec_spds_dump": {
- "reply": "ipsec_spds_details",
- "stream": true
- },
- "ipsec_spd_dump": {
- "reply": "ipsec_spd_details",
- "stream": true
- },
- "ipsec_sad_entry_add_del": {
- "reply": "ipsec_sad_entry_add_del_reply"
- },
- "ipsec_tunnel_protect_update": {
- "reply": "ipsec_tunnel_protect_update_reply"
- },
- "ipsec_tunnel_protect_del": {
- "reply": "ipsec_tunnel_protect_del_reply"
- },
- "ipsec_tunnel_protect_dump": {
- "reply": "ipsec_tunnel_protect_details",
- "stream": true
- },
- "ipsec_spd_interface_dump": {
- "reply": "ipsec_spd_interface_details",
- "stream": true
- },
- "ipsec_tunnel_if_add_del": {
- "reply": "ipsec_tunnel_if_add_del_reply"
- },
- "ipsec_sa_dump": {
- "reply": "ipsec_sa_details",
- "stream": true
- },
- "ipsec_tunnel_if_set_sa": {
- "reply": "ipsec_tunnel_if_set_sa_reply"
- },
- "ipsec_backend_dump": {
- "reply": "ipsec_backend_details",
- "stream": true
- },
- "ipsec_select_backend": {
- "reply": "ipsec_select_backend_reply"
- }
- },
- "options": {
- "version": "3.0.0"
- },
- "aliases": {
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- },
- "interface_index": {
- "type": "u32"
- }
- },
- "vl_api_version": "0x5a59fef9"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/ipsec_types.api.json b/internal/testbinapi/binapi2001/.vppapi/core/ipsec_types.api.json
deleted file mode 100644
index a64bbcb..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/ipsec_types.api.json
+++ /dev/null
@@ -1,493 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ],
- [
- "key",
- [
- "u8",
- "length"
- ],
- [
- "u8",
- "data",
- 128
- ]
- ],
- [
- "ipsec_sad_entry",
- [
- "u32",
- "sad_id"
- ],
- [
- "u32",
- "spi"
- ],
- [
- "vl_api_ipsec_proto_t",
- "protocol"
- ],
- [
- "vl_api_ipsec_crypto_alg_t",
- "crypto_algorithm"
- ],
- [
- "vl_api_key_t",
- "crypto_key"
- ],
- [
- "vl_api_ipsec_integ_alg_t",
- "integrity_algorithm"
- ],
- [
- "vl_api_key_t",
- "integrity_key"
- ],
- [
- "vl_api_ipsec_sad_flags_t",
- "flags"
- ],
- [
- "vl_api_address_t",
- "tunnel_src"
- ],
- [
- "vl_api_address_t",
- "tunnel_dst"
- ],
- [
- "u32",
- "tx_table_id"
- ],
- [
- "u32",
- "salt"
- ]
- ]
- ],
- "messages": [],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ipsec_crypto_alg",
- [
- "IPSEC_API_CRYPTO_ALG_NONE",
- 0
- ],
- [
- "IPSEC_API_CRYPTO_ALG_AES_CBC_128",
- 1
- ],
- [
- "IPSEC_API_CRYPTO_ALG_AES_CBC_192",
- 2
- ],
- [
- "IPSEC_API_CRYPTO_ALG_AES_CBC_256",
- 3
- ],
- [
- "IPSEC_API_CRYPTO_ALG_AES_CTR_128",
- 4
- ],
- [
- "IPSEC_API_CRYPTO_ALG_AES_CTR_192",
- 5
- ],
- [
- "IPSEC_API_CRYPTO_ALG_AES_CTR_256",
- 6
- ],
- [
- "IPSEC_API_CRYPTO_ALG_AES_GCM_128",
- 7
- ],
- [
- "IPSEC_API_CRYPTO_ALG_AES_GCM_192",
- 8
- ],
- [
- "IPSEC_API_CRYPTO_ALG_AES_GCM_256",
- 9
- ],
- [
- "IPSEC_API_CRYPTO_ALG_DES_CBC",
- 10
- ],
- [
- "IPSEC_API_CRYPTO_ALG_3DES_CBC",
- 11
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ipsec_integ_alg",
- [
- "IPSEC_API_INTEG_ALG_NONE",
- 0
- ],
- [
- "IPSEC_API_INTEG_ALG_MD5_96",
- 1
- ],
- [
- "IPSEC_API_INTEG_ALG_SHA1_96",
- 2
- ],
- [
- "IPSEC_API_INTEG_ALG_SHA_256_96",
- 3
- ],
- [
- "IPSEC_API_INTEG_ALG_SHA_256_128",
- 4
- ],
- [
- "IPSEC_API_INTEG_ALG_SHA_384_192",
- 5
- ],
- [
- "IPSEC_API_INTEG_ALG_SHA_512_256",
- 6
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ipsec_sad_flags",
- [
- "IPSEC_API_SAD_FLAG_NONE",
- 0
- ],
- [
- "IPSEC_API_SAD_FLAG_USE_ESN",
- 1
- ],
- [
- "IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY",
- 2
- ],
- [
- "IPSEC_API_SAD_FLAG_IS_TUNNEL",
- 4
- ],
- [
- "IPSEC_API_SAD_FLAG_IS_TUNNEL_V6",
- 8
- ],
- [
- "IPSEC_API_SAD_FLAG_UDP_ENCAP",
- 16
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ipsec_proto",
- [
- "IPSEC_API_PROTO_ESP",
- 1
- ],
- [
- "IPSEC_API_PROTO_AH",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {},
- "options": {
- "version": "3.0.0"
- },
- "aliases": {
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- }
- },
- "vl_api_version": "0x6e9f4c73"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/l2.api.json b/internal/testbinapi/binapi2001/.vppapi/core/l2.api.json
deleted file mode 100644
index 686e316..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/l2.api.json
+++ /dev/null
@@ -1,2015 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ],
- [
- "mac_entry",
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u8",
- "mac_addr",
- 6
- ],
- [
- "u8",
- "action"
- ],
- [
- "u8",
- "flags"
- ]
- ],
- [
- "bridge_domain_sw_if",
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u8",
- "shg"
- ]
- ],
- [
- "bd_ip_mac",
- [
- "u32",
- "bd_id"
- ],
- [
- "vl_api_address_t",
- "ip"
- ],
- [
- "vl_api_mac_address_t",
- "mac"
- ]
- ]
- ],
- "messages": [
- [
- "l2_xconnect_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "rx_sw_if_index"
- ],
- [
- "u32",
- "tx_sw_if_index"
- ],
- {
- "crc": "0x722e2378"
- }
- ],
- [
- "l2_xconnect_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "l2_fib_table_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "bd_id"
- ],
- [
- "u8",
- "mac",
- 6
- ],
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u8",
- "static_mac"
- ],
- [
- "u8",
- "filter_mac"
- ],
- [
- "u8",
- "bvi_mac"
- ],
- {
- "crc": "0xc7392706"
- }
- ],
- [
- "l2_fib_table_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "bd_id"
- ],
- {
- "crc": "0xc25fdce6"
- }
- ],
- [
- "l2_fib_clear_table",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "l2_fib_clear_table_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "l2fib_flush_all",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "l2fib_flush_all_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "l2fib_flush_bd",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "bd_id"
- ],
- {
- "crc": "0xc25fdce6"
- }
- ],
- [
- "l2fib_flush_bd_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "l2fib_flush_int",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- {
- "crc": "0x529cb13f"
- }
- ],
- [
- "l2fib_flush_int_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "l2fib_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "mac",
- 6
- ],
- [
- "u32",
- "bd_id"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u8",
- "is_add"
- ],
- [
- "u8",
- "static_mac"
- ],
- [
- "u8",
- "filter_mac"
- ],
- [
- "u8",
- "bvi_mac"
- ],
- {
- "crc": "0x34ced3eb"
- }
- ],
- [
- "l2fib_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "want_l2_macs_events",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "learn_limit"
- ],
- [
- "u8",
- "scan_delay"
- ],
- [
- "u8",
- "max_macs_in_event"
- ],
- [
- "bool",
- "enable_disable"
- ],
- [
- "u32",
- "pid"
- ],
- {
- "crc": "0x9aabdfde"
- }
- ],
- [
- "want_l2_macs_events_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "l2_macs_event",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "pid"
- ],
- [
- "u32",
- "n_macs"
- ],
- [
- "vl_api_mac_entry_t",
- "mac",
- 0,
- "n_macs"
- ],
- {
- "crc": "0xafc74a60"
- }
- ],
- [
- "l2_flags",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u8",
- "is_set"
- ],
- [
- "u32",
- "feature_bitmap"
- ],
- {
- "crc": "0x0e889fb9"
- }
- ],
- [
- "l2_flags_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "resulting_feature_bitmap"
- ],
- {
- "crc": "0x29b2a2b3"
- }
- ],
- [
- "bridge_domain_set_mac_age",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "bd_id"
- ],
- [
- "u8",
- "mac_age"
- ],
- {
- "crc": "0xb537ad7b"
- }
- ],
- [
- "bridge_domain_set_mac_age_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "bridge_domain_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "bd_id"
- ],
- [
- "u8",
- "flood"
- ],
- [
- "u8",
- "uu_flood"
- ],
- [
- "u8",
- "forward"
- ],
- [
- "u8",
- "learn"
- ],
- [
- "u8",
- "arp_term"
- ],
- [
- "u8",
- "arp_ufwd"
- ],
- [
- "u8",
- "mac_age"
- ],
- [
- "u8",
- "bd_tag",
- 64
- ],
- [
- "u8",
- "is_add"
- ],
- {
- "crc": "0xc6360720"
- }
- ],
- [
- "bridge_domain_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "bridge_domain_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "bd_id"
- ],
- {
- "crc": "0xc25fdce6"
- }
- ],
- [
- "bridge_domain_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "bd_id"
- ],
- [
- "u8",
- "flood"
- ],
- [
- "u8",
- "uu_flood"
- ],
- [
- "u8",
- "forward"
- ],
- [
- "u8",
- "learn"
- ],
- [
- "u8",
- "arp_term"
- ],
- [
- "u8",
- "arp_ufwd"
- ],
- [
- "u8",
- "mac_age"
- ],
- [
- "u8",
- "bd_tag",
- 64
- ],
- [
- "u32",
- "bvi_sw_if_index"
- ],
- [
- "u32",
- "uu_fwd_sw_if_index"
- ],
- [
- "u32",
- "n_sw_ifs"
- ],
- [
- "vl_api_bridge_domain_sw_if_t",
- "sw_if_details",
- 0,
- "n_sw_ifs"
- ],
- {
- "crc": "0x748c854a"
- }
- ],
- [
- "bridge_flags",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "bd_id"
- ],
- [
- "u8",
- "is_set"
- ],
- [
- "vl_api_bd_flags_t",
- "flags"
- ],
- {
- "crc": "0x2eb9b76c"
- }
- ],
- [
- "bridge_flags_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "resulting_feature_bitmap"
- ],
- {
- "crc": "0x29b2a2b3"
- }
- ],
- [
- "l2_interface_vlan_tag_rewrite",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u32",
- "vtr_op"
- ],
- [
- "u32",
- "push_dot1q"
- ],
- [
- "u32",
- "tag1"
- ],
- [
- "u32",
- "tag2"
- ],
- {
- "crc": "0xb90be6b4"
- }
- ],
- [
- "l2_interface_vlan_tag_rewrite_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "l2_interface_pbb_tag_rewrite",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u32",
- "vtr_op"
- ],
- [
- "u16",
- "outer_tag"
- ],
- [
- "u8",
- "b_dmac",
- 6
- ],
- [
- "u8",
- "b_smac",
- 6
- ],
- [
- "u16",
- "b_vlanid"
- ],
- [
- "u32",
- "i_sid"
- ],
- {
- "crc": "0x6cf815f9"
- }
- ],
- [
- "l2_interface_pbb_tag_rewrite_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "l2_patch_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "rx_sw_if_index"
- ],
- [
- "u32",
- "tx_sw_if_index"
- ],
- [
- "u8",
- "is_add"
- ],
- {
- "crc": "0x62506e63"
- }
- ],
- [
- "l2_patch_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "sw_interface_set_l2_xconnect",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "rx_sw_if_index"
- ],
- [
- "u32",
- "tx_sw_if_index"
- ],
- [
- "u8",
- "enable"
- ],
- {
- "crc": "0x95de3988"
- }
- ],
- [
- "sw_interface_set_l2_xconnect_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "sw_interface_set_l2_bridge",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "rx_sw_if_index"
- ],
- [
- "u32",
- "bd_id"
- ],
- [
- "vl_api_l2_port_type_t",
- "port_type"
- ],
- [
- "u8",
- "shg"
- ],
- [
- "u8",
- "enable"
- ],
- {
- "crc": "0x5579f809"
- }
- ],
- [
- "sw_interface_set_l2_bridge_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "bd_ip_mac_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_add"
- ],
- [
- "vl_api_bd_ip_mac_t",
- "entry"
- ],
- {
- "crc": "0x25bf4063"
- }
- ],
- [
- "bd_ip_mac_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "bd_ip_mac_flush",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "bd_id"
- ],
- {
- "crc": "0xc25fdce6"
- }
- ],
- [
- "bd_ip_mac_flush_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "bd_ip_mac_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_bd_ip_mac_t",
- "entry"
- ],
- {
- "crc": "0xa52f8044"
- }
- ],
- [
- "bd_ip_mac_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "bd_id"
- ],
- {
- "crc": "0xc25fdce6"
- }
- ],
- [
- "l2_interface_efp_filter",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u8",
- "enable_disable"
- ],
- {
- "crc": "0x69d24598"
- }
- ],
- [
- "l2_interface_efp_filter_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "sw_interface_set_vpath",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u8",
- "enable"
- ],
- {
- "crc": "0xa36fadc0"
- }
- ],
- [
- "sw_interface_set_vpath_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "bvi_create",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_mac_address_t",
- "mac"
- ],
- [
- "u32",
- "user_instance"
- ],
- {
- "crc": "0xf5398559"
- }
- ],
- [
- "bvi_create_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- {
- "crc": "0xfda5941f"
- }
- ],
- [
- "bvi_delete",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- {
- "crc": "0x529cb13f"
- }
- ],
- [
- "bvi_delete_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "want_l2_arp_term_events",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "enable"
- ],
- [
- "u32",
- "pid"
- ],
- {
- "crc": "0x3ec6d6c2"
- }
- ],
- [
- "want_l2_arp_term_events_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "l2_arp_term_event",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "pid"
- ],
- [
- "vl_api_address_t",
- "ip"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "vl_api_mac_address_t",
- "mac"
- ],
- {
- "crc": "0x85ff71ea"
- }
- ]
- ],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "bd_flags",
- [
- "BRIDGE_API_FLAG_NONE",
- 0
- ],
- [
- "BRIDGE_API_FLAG_LEARN",
- 1
- ],
- [
- "BRIDGE_API_FLAG_FWD",
- 2
- ],
- [
- "BRIDGE_API_FLAG_FLOOD",
- 4
- ],
- [
- "BRIDGE_API_FLAG_UU_FLOOD",
- 8
- ],
- [
- "BRIDGE_API_FLAG_ARP_TERM",
- 16
- ],
- [
- "BRIDGE_API_FLAG_ARP_UFWD",
- 32
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "l2_port_type",
- [
- "L2_API_PORT_TYPE_NORMAL",
- 0
- ],
- [
- "L2_API_PORT_TYPE_BVI",
- 1
- ],
- [
- "L2_API_PORT_TYPE_UU_FWD",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "want_l2_macs_events": {
- "reply": "want_l2_macs_events_reply",
- "events": [
- "l2_macs_event"
- ]
- },
- "want_l2_arp_term_events": {
- "reply": "want_l2_arp_term_events_reply",
- "events": [
- "l2_arp_term_event"
- ]
- },
- "l2_xconnect_dump": {
- "reply": "l2_xconnect_details",
- "stream": true
- },
- "l2_fib_table_dump": {
- "reply": "l2_fib_table_details",
- "stream": true
- },
- "l2_fib_clear_table": {
- "reply": "l2_fib_clear_table_reply"
- },
- "l2fib_flush_all": {
- "reply": "l2fib_flush_all_reply"
- },
- "l2fib_flush_bd": {
- "reply": "l2fib_flush_bd_reply"
- },
- "l2fib_flush_int": {
- "reply": "l2fib_flush_int_reply"
- },
- "l2fib_add_del": {
- "reply": "l2fib_add_del_reply"
- },
- "l2_flags": {
- "reply": "l2_flags_reply"
- },
- "bridge_domain_set_mac_age": {
- "reply": "bridge_domain_set_mac_age_reply"
- },
- "bridge_domain_add_del": {
- "reply": "bridge_domain_add_del_reply"
- },
- "bridge_domain_dump": {
- "reply": "bridge_domain_details",
- "stream": true
- },
- "bridge_flags": {
- "reply": "bridge_flags_reply"
- },
- "l2_interface_vlan_tag_rewrite": {
- "reply": "l2_interface_vlan_tag_rewrite_reply"
- },
- "l2_interface_pbb_tag_rewrite": {
- "reply": "l2_interface_pbb_tag_rewrite_reply"
- },
- "l2_patch_add_del": {
- "reply": "l2_patch_add_del_reply"
- },
- "sw_interface_set_l2_xconnect": {
- "reply": "sw_interface_set_l2_xconnect_reply"
- },
- "sw_interface_set_l2_bridge": {
- "reply": "sw_interface_set_l2_bridge_reply"
- },
- "bd_ip_mac_add_del": {
- "reply": "bd_ip_mac_add_del_reply"
- },
- "bd_ip_mac_flush": {
- "reply": "bd_ip_mac_flush_reply"
- },
- "bd_ip_mac_dump": {
- "reply": "bd_ip_mac_details",
- "stream": true
- },
- "l2_interface_efp_filter": {
- "reply": "l2_interface_efp_filter_reply"
- },
- "sw_interface_set_vpath": {
- "reply": "sw_interface_set_vpath_reply"
- },
- "bvi_create": {
- "reply": "bvi_create_reply"
- },
- "bvi_delete": {
- "reply": "bvi_delete_reply"
- }
- },
- "options": {
- "version": "2.2.2"
- },
- "aliases": {
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- },
- "mac_address": {
- "type": "u8",
- "length": 6
- },
- "interface_index": {
- "type": "u32"
- }
- },
- "vl_api_version": "0x2e148df3"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/l2tp.api.json b/internal/testbinapi/binapi2001/.vppapi/core/l2tp.api.json
deleted file mode 100644
index 6cb9d6b..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/l2tp.api.json
+++ /dev/null
@@ -1,767 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ]
- ],
- "messages": [
- [
- "l2tpv3_create_tunnel",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_address_t",
- "client_address"
- ],
- [
- "vl_api_address_t",
- "our_address"
- ],
- [
- "u32",
- "local_session_id"
- ],
- [
- "u32",
- "remote_session_id"
- ],
- [
- "u64",
- "local_cookie"
- ],
- [
- "u64",
- "remote_cookie"
- ],
- [
- "bool",
- "l2_sublayer_present"
- ],
- [
- "u32",
- "encap_vrf_id"
- ],
- {
- "crc": "0x596892cb"
- }
- ],
- [
- "l2tpv3_create_tunnel_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0x5383d31f"
- }
- ],
- [
- "l2tpv3_set_tunnel_cookies",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "u64",
- "new_local_cookie"
- ],
- [
- "u64",
- "new_remote_cookie"
- ],
- {
- "crc": "0xb3f4faf7"
- }
- ],
- [
- "l2tpv3_set_tunnel_cookies_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "sw_if_l2tpv3_tunnel_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "string",
- "interface_name",
- 64
- ],
- [
- "vl_api_address_t",
- "client_address"
- ],
- [
- "vl_api_address_t",
- "our_address"
- ],
- [
- "u32",
- "local_session_id"
- ],
- [
- "u32",
- "remote_session_id"
- ],
- [
- "u64",
- "local_cookie",
- 2
- ],
- [
- "u64",
- "remote_cookie"
- ],
- [
- "bool",
- "l2_sublayer_present"
- ],
- {
- "crc": "0x1dab5c7e"
- }
- ],
- [
- "sw_if_l2tpv3_tunnel_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "l2tpv3_interface_enable_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "enable_disable"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0x3865946c"
- }
- ],
- [
- "l2tpv3_interface_enable_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "l2tpv3_set_lookup_key",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_l2t_lookup_key_t",
- "key"
- ],
- {
- "crc": "0xc9892c86"
- }
- ],
- [
- "l2tpv3_set_lookup_key_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "l2t_lookup_key",
- [
- "L2T_LOOKUP_KEY_API_SRC_ADDR",
- 0
- ],
- [
- "L2T_LOOKUP_KEY_API_DST_ADDR",
- 1
- ],
- [
- "L2T_LOOKUP_KEY_API_SESSION_ID",
- 2
- ],
- {
- "enumtype": "u8"
- }
- ]
- ],
- "services": {
- "l2tpv3_create_tunnel": {
- "reply": "l2tpv3_create_tunnel_reply"
- },
- "l2tpv3_set_tunnel_cookies": {
- "reply": "l2tpv3_set_tunnel_cookies_reply"
- },
- "sw_if_l2tpv3_tunnel_dump": {
- "reply": "sw_if_l2tpv3_tunnel_details",
- "stream": true
- },
- "l2tpv3_interface_enable_disable": {
- "reply": "l2tpv3_interface_enable_disable_reply"
- },
- "l2tpv3_set_lookup_key": {
- "reply": "l2tpv3_set_lookup_key_reply"
- }
- },
- "options": {
- "version": "2.0.0"
- },
- "aliases": {
- "interface_index": {
- "type": "u32"
- },
- "mac_address": {
- "type": "u8",
- "length": 6
- },
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- }
- },
- "vl_api_version": "0x1ecf7730"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/lisp.api.json b/internal/testbinapi/binapi2001/.vppapi/core/lisp.api.json
deleted file mode 100644
index 1d6884a..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/lisp.api.json
+++ /dev/null
@@ -1,1704 +0,0 @@
-{
- "types": [
- [
- "local_locator",
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u8",
- "priority"
- ],
- [
- "u8",
- "weight"
- ]
- ],
- [
- "remote_locator",
- [
- "u8",
- "is_ip4"
- ],
- [
- "u8",
- "priority"
- ],
- [
- "u8",
- "weight"
- ],
- [
- "u8",
- "addr",
- 16
- ]
- ],
- [
- "lisp_adjacency",
- [
- "u8",
- "eid_type"
- ],
- [
- "u8",
- "reid",
- 16
- ],
- [
- "u8",
- "leid",
- 16
- ],
- [
- "u8",
- "reid_prefix_len"
- ],
- [
- "u8",
- "leid_prefix_len"
- ]
- ]
- ],
- "messages": [
- [
- "lisp_add_del_locator_set",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_add"
- ],
- [
- "u8",
- "locator_set_name",
- 64
- ],
- [
- "u32",
- "locator_num"
- ],
- [
- "vl_api_local_locator_t",
- "locators",
- 0,
- "locator_num"
- ],
- {
- "crc": "0x06968e38"
- }
- ],
- [
- "lisp_add_del_locator_set_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "ls_index"
- ],
- {
- "crc": "0xb6666db4"
- }
- ],
- [
- "lisp_add_del_locator",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_add"
- ],
- [
- "u8",
- "locator_set_name",
- 64
- ],
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u8",
- "priority"
- ],
- [
- "u8",
- "weight"
- ],
- {
- "crc": "0x006a4240"
- }
- ],
- [
- "lisp_add_del_locator_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "lisp_add_del_local_eid",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_add"
- ],
- [
- "u8",
- "eid_type"
- ],
- [
- "u8",
- "eid",
- 16
- ],
- [
- "u8",
- "prefix_len"
- ],
- [
- "u8",
- "locator_set_name",
- 64
- ],
- [
- "u32",
- "vni"
- ],
- [
- "u16",
- "key_id"
- ],
- [
- "u8",
- "key",
- 64
- ],
- {
- "crc": "0xe6d00717"
- }
- ],
- [
- "lisp_add_del_local_eid_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "lisp_add_del_map_server",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_add"
- ],
- [
- "u8",
- "is_ipv6"
- ],
- [
- "u8",
- "ip_address",
- 16
- ],
- {
- "crc": "0x0ebcd37d"
- }
- ],
- [
- "lisp_add_del_map_server_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "lisp_add_del_map_resolver",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_add"
- ],
- [
- "u8",
- "is_ipv6"
- ],
- [
- "u8",
- "ip_address",
- 16
- ],
- {
- "crc": "0x0ebcd37d"
- }
- ],
- [
- "lisp_add_del_map_resolver_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "lisp_enable_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_en"
- ],
- {
- "crc": "0xeb0e943b"
- }
- ],
- [
- "lisp_enable_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "lisp_pitr_set_locator_set",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_add"
- ],
- [
- "u8",
- "ls_name",
- 64
- ],
- {
- "crc": "0x7aa022dd"
- }
- ],
- [
- "lisp_pitr_set_locator_set_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "lisp_use_petr",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_ip4"
- ],
- [
- "u8",
- "address",
- 16
- ],
- [
- "u8",
- "is_add"
- ],
- {
- "crc": "0x6910787d"
- }
- ],
- [
- "lisp_use_petr_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "show_lisp_use_petr",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "show_lisp_use_petr_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u8",
- "status"
- ],
- [
- "u8",
- "is_ip4"
- ],
- [
- "u8",
- "address",
- 16
- ],
- {
- "crc": "0x1eb21916"
- }
- ],
- [
- "show_lisp_rloc_probe_state",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "show_lisp_rloc_probe_state_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u8",
- "is_enabled"
- ],
- {
- "crc": "0x14304fbc"
- }
- ],
- [
- "lisp_rloc_probe_enable_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_enabled"
- ],
- {
- "crc": "0x294103d1"
- }
- ],
- [
- "lisp_rloc_probe_enable_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "lisp_map_register_enable_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_enabled"
- ],
- {
- "crc": "0x294103d1"
- }
- ],
- [
- "lisp_map_register_enable_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "show_lisp_map_register_state",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "show_lisp_map_register_state_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u8",
- "is_enabled"
- ],
- {
- "crc": "0x14304fbc"
- }
- ],
- [
- "lisp_map_request_mode",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "mode"
- ],
- {
- "crc": "0xf3f93ce9"
- }
- ],
- [
- "lisp_map_request_mode_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "show_lisp_map_request_mode",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "show_lisp_map_request_mode_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u8",
- "mode"
- ],
- {
- "crc": "0xd423107c"
- }
- ],
- [
- "lisp_add_del_remote_mapping",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_add"
- ],
- [
- "u8",
- "is_src_dst"
- ],
- [
- "u8",
- "del_all"
- ],
- [
- "u32",
- "vni"
- ],
- [
- "u8",
- "action"
- ],
- [
- "u8",
- "eid_type"
- ],
- [
- "u8",
- "eid",
- 16
- ],
- [
- "u8",
- "eid_len"
- ],
- [
- "u8",
- "seid",
- 16
- ],
- [
- "u8",
- "seid_len"
- ],
- [
- "u32",
- "rloc_num"
- ],
- [
- "vl_api_remote_locator_t",
- "rlocs",
- 0,
- "rloc_num"
- ],
- {
- "crc": "0xb879c3a9"
- }
- ],
- [
- "lisp_add_del_remote_mapping_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "lisp_add_del_adjacency",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_add"
- ],
- [
- "u32",
- "vni"
- ],
- [
- "u8",
- "eid_type"
- ],
- [
- "u8",
- "reid",
- 16
- ],
- [
- "u8",
- "leid",
- 16
- ],
- [
- "u8",
- "reid_len"
- ],
- [
- "u8",
- "leid_len"
- ],
- {
- "crc": "0xf047390d"
- }
- ],
- [
- "lisp_add_del_adjacency_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "lisp_add_del_map_request_itr_rlocs",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_add"
- ],
- [
- "u8",
- "locator_set_name",
- 64
- ],
- {
- "crc": "0xc7c6cb2f"
- }
- ],
- [
- "lisp_add_del_map_request_itr_rlocs_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "lisp_eid_table_add_del_map",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_add"
- ],
- [
- "u32",
- "vni"
- ],
- [
- "u32",
- "dp_table"
- ],
- [
- "u8",
- "is_l2"
- ],
- {
- "crc": "0x59e9975e"
- }
- ],
- [
- "lisp_eid_table_add_del_map_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "lisp_locator_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "ls_index"
- ],
- [
- "u8",
- "ls_name",
- 64
- ],
- [
- "u8",
- "is_index_set"
- ],
- {
- "crc": "0xf27d5050"
- }
- ],
- [
- "lisp_locator_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "local"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u8",
- "is_ipv6"
- ],
- [
- "u8",
- "ip_address",
- 16
- ],
- [
- "u8",
- "priority"
- ],
- [
- "u8",
- "weight"
- ],
- {
- "crc": "0xb3988a30"
- }
- ],
- [
- "lisp_locator_set_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "ls_index"
- ],
- [
- "u8",
- "ls_name",
- 64
- ],
- {
- "crc": "0x6b846882"
- }
- ],
- [
- "lisp_locator_set_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "filter"
- ],
- {
- "crc": "0xc79e8ab0"
- }
- ],
- [
- "lisp_eid_table_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "locator_set_index"
- ],
- [
- "u8",
- "action"
- ],
- [
- "u8",
- "is_local"
- ],
- [
- "u8",
- "eid_type"
- ],
- [
- "u8",
- "is_src_dst"
- ],
- [
- "u32",
- "vni"
- ],
- [
- "u8",
- "eid",
- 16
- ],
- [
- "u8",
- "eid_prefix_len"
- ],
- [
- "u8",
- "seid",
- 16
- ],
- [
- "u8",
- "seid_prefix_len"
- ],
- [
- "u32",
- "ttl"
- ],
- [
- "u8",
- "authoritative"
- ],
- [
- "u16",
- "key_id"
- ],
- [
- "u8",
- "key",
- 64
- ],
- {
- "crc": "0xdcd9f414"
- }
- ],
- [
- "lisp_eid_table_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "eid_set"
- ],
- [
- "u8",
- "prefix_length"
- ],
- [
- "u32",
- "vni"
- ],
- [
- "u8",
- "eid_type"
- ],
- [
- "u8",
- "eid",
- 16
- ],
- [
- "u8",
- "filter"
- ],
- {
- "crc": "0xe0df64da"
- }
- ],
- [
- "lisp_adjacencies_get_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "count"
- ],
- [
- "vl_api_lisp_adjacency_t",
- "adjacencies",
- 0,
- "count"
- ],
- {
- "crc": "0xada0f464"
- }
- ],
- [
- "lisp_adjacencies_get",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "vni"
- ],
- {
- "crc": "0x8d1f2fe9"
- }
- ],
- [
- "lisp_eid_table_map_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "vni"
- ],
- [
- "u32",
- "dp_table"
- ],
- {
- "crc": "0x0b6859e2"
- }
- ],
- [
- "lisp_eid_table_map_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_l2"
- ],
- {
- "crc": "0x67c54650"
- }
- ],
- [
- "lisp_eid_table_vni_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "lisp_eid_table_vni_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "vni"
- ],
- {
- "crc": "0x64abc01e"
- }
- ],
- [
- "lisp_map_resolver_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_ipv6"
- ],
- [
- "u8",
- "ip_address",
- 16
- ],
- {
- "crc": "0x60a5f5ca"
- }
- ],
- [
- "lisp_map_resolver_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "lisp_map_server_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_ipv6"
- ],
- [
- "u8",
- "ip_address",
- 16
- ],
- {
- "crc": "0x60a5f5ca"
- }
- ],
- [
- "lisp_map_server_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "show_lisp_status",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "show_lisp_status_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u8",
- "feature_status"
- ],
- [
- "u8",
- "gpe_status"
- ],
- {
- "crc": "0xddcf48ef"
- }
- ],
- [
- "lisp_get_map_request_itr_rlocs",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "lisp_get_map_request_itr_rlocs_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u8",
- "locator_set_name",
- 64
- ],
- {
- "crc": "0x9f56f6f7"
- }
- ],
- [
- "show_lisp_pitr",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "show_lisp_pitr_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u8",
- "status"
- ],
- [
- "u8",
- "locator_set_name",
- 64
- ],
- {
- "crc": "0xdca512cc"
- }
- ]
- ],
- "unions": [],
- "enums": [],
- "services": {
- "lisp_add_del_locator_set": {
- "reply": "lisp_add_del_locator_set_reply"
- },
- "lisp_add_del_locator": {
- "reply": "lisp_add_del_locator_reply"
- },
- "lisp_add_del_local_eid": {
- "reply": "lisp_add_del_local_eid_reply"
- },
- "lisp_add_del_map_server": {
- "reply": "lisp_add_del_map_server_reply"
- },
- "lisp_add_del_map_resolver": {
- "reply": "lisp_add_del_map_resolver_reply"
- },
- "lisp_enable_disable": {
- "reply": "lisp_enable_disable_reply"
- },
- "lisp_pitr_set_locator_set": {
- "reply": "lisp_pitr_set_locator_set_reply"
- },
- "lisp_use_petr": {
- "reply": "lisp_use_petr_reply"
- },
- "show_lisp_use_petr": {
- "reply": "show_lisp_use_petr_reply"
- },
- "show_lisp_rloc_probe_state": {
- "reply": "show_lisp_rloc_probe_state_reply"
- },
- "lisp_rloc_probe_enable_disable": {
- "reply": "lisp_rloc_probe_enable_disable_reply"
- },
- "lisp_map_register_enable_disable": {
- "reply": "lisp_map_register_enable_disable_reply"
- },
- "show_lisp_map_register_state": {
- "reply": "show_lisp_map_register_state_reply"
- },
- "lisp_map_request_mode": {
- "reply": "lisp_map_request_mode_reply"
- },
- "show_lisp_map_request_mode": {
- "reply": "show_lisp_map_request_mode_reply"
- },
- "lisp_add_del_remote_mapping": {
- "reply": "lisp_add_del_remote_mapping_reply"
- },
- "lisp_add_del_adjacency": {
- "reply": "lisp_add_del_adjacency_reply"
- },
- "lisp_add_del_map_request_itr_rlocs": {
- "reply": "lisp_add_del_map_request_itr_rlocs_reply"
- },
- "lisp_eid_table_add_del_map": {
- "reply": "lisp_eid_table_add_del_map_reply"
- },
- "lisp_locator_dump": {
- "reply": "lisp_locator_details",
- "stream": true
- },
- "lisp_locator_set_dump": {
- "reply": "lisp_locator_set_details",
- "stream": true
- },
- "lisp_eid_table_dump": {
- "reply": "lisp_eid_table_details",
- "stream": true
- },
- "lisp_adjacencies_get": {
- "reply": "lisp_adjacencies_get_reply"
- },
- "lisp_eid_table_map_dump": {
- "reply": "lisp_eid_table_map_details",
- "stream": true
- },
- "lisp_eid_table_vni_dump": {
- "reply": "lisp_eid_table_vni_details",
- "stream": true
- },
- "lisp_map_resolver_dump": {
- "reply": "lisp_map_resolver_details",
- "stream": true
- },
- "lisp_map_server_dump": {
- "reply": "lisp_map_server_details",
- "stream": true
- },
- "show_lisp_status": {
- "reply": "show_lisp_status_reply"
- },
- "lisp_get_map_request_itr_rlocs": {
- "reply": "lisp_get_map_request_itr_rlocs_reply"
- },
- "show_lisp_pitr": {
- "reply": "show_lisp_pitr_reply"
- }
- },
- "options": {
- "version": "1.0.0"
- },
- "aliases": {},
- "vl_api_version": "0x681568f8"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/lisp_gpe.api.json b/internal/testbinapi/binapi2001/.vppapi/core/lisp_gpe.api.json
deleted file mode 100644
index bf6eb9a..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/lisp_gpe.api.json
+++ /dev/null
@@ -1,630 +0,0 @@
-{
- "types": [
- [
- "gpe_locator",
- [
- "u8",
- "is_ip4"
- ],
- [
- "u8",
- "weight"
- ],
- [
- "u8",
- "addr",
- 16
- ]
- ],
- [
- "gpe_fwd_entry",
- [
- "u32",
- "fwd_entry_index"
- ],
- [
- "u32",
- "dp_table"
- ],
- [
- "u8",
- "eid_type"
- ],
- [
- "u8",
- "leid_prefix_len"
- ],
- [
- "u8",
- "reid_prefix_len"
- ],
- [
- "u8",
- "leid",
- 16
- ],
- [
- "u8",
- "reid",
- 16
- ],
- [
- "u32",
- "vni"
- ],
- [
- "u8",
- "action"
- ]
- ],
- [
- "gpe_native_fwd_rpath",
- [
- "u32",
- "fib_index"
- ],
- [
- "u32",
- "nh_sw_if_index"
- ],
- [
- "u8",
- "is_ip4"
- ],
- [
- "u8",
- "nh_addr",
- 16
- ]
- ]
- ],
- "messages": [
- [
- "gpe_add_del_fwd_entry",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_add"
- ],
- [
- "u8",
- "eid_type"
- ],
- [
- "u8",
- "rmt_eid",
- 16
- ],
- [
- "u8",
- "lcl_eid",
- 16
- ],
- [
- "u8",
- "rmt_len"
- ],
- [
- "u8",
- "lcl_len"
- ],
- [
- "u32",
- "vni"
- ],
- [
- "u32",
- "dp_table"
- ],
- [
- "u8",
- "action"
- ],
- [
- "u32",
- "loc_num"
- ],
- [
- "vl_api_gpe_locator_t",
- "locs",
- 0,
- "loc_num"
- ],
- {
- "crc": "0xafbf857a"
- }
- ],
- [
- "gpe_add_del_fwd_entry_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "fwd_entry_index"
- ],
- {
- "crc": "0xefe5f176"
- }
- ],
- [
- "gpe_enable_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_en"
- ],
- {
- "crc": "0xeb0e943b"
- }
- ],
- [
- "gpe_enable_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "gpe_add_del_iface",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_add"
- ],
- [
- "u8",
- "is_l2"
- ],
- [
- "u32",
- "dp_table"
- ],
- [
- "u32",
- "vni"
- ],
- {
- "crc": "0x42d6b533"
- }
- ],
- [
- "gpe_add_del_iface_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "gpe_fwd_entry_vnis_get",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "gpe_fwd_entry_vnis_get_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "count"
- ],
- [
- "u32",
- "vnis",
- 0,
- "count"
- ],
- {
- "crc": "0xaa70da20"
- }
- ],
- [
- "gpe_fwd_entries_get",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "vni"
- ],
- {
- "crc": "0x8d1f2fe9"
- }
- ],
- [
- "gpe_fwd_entries_get_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "count"
- ],
- [
- "vl_api_gpe_fwd_entry_t",
- "entries",
- 0,
- "count"
- ],
- {
- "crc": "0x07b02c34"
- }
- ],
- [
- "gpe_fwd_entry_path_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "fwd_entry_index"
- ],
- {
- "crc": "0x39bce980"
- }
- ],
- [
- "gpe_fwd_entry_path_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_gpe_locator_t",
- "lcl_loc"
- ],
- [
- "vl_api_gpe_locator_t",
- "rmt_loc"
- ],
- {
- "crc": "0xa9bdc1f1"
- }
- ],
- [
- "gpe_set_encap_mode",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "mode"
- ],
- {
- "crc": "0xf3f93ce9"
- }
- ],
- [
- "gpe_set_encap_mode_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "gpe_get_encap_mode",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "gpe_get_encap_mode_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u8",
- "encap_mode"
- ],
- {
- "crc": "0x36e3f7ca"
- }
- ],
- [
- "gpe_add_del_native_fwd_rpath",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_add"
- ],
- [
- "u32",
- "table_id"
- ],
- [
- "u32",
- "nh_sw_if_index"
- ],
- [
- "u8",
- "is_ip4"
- ],
- [
- "u8",
- "nh_addr",
- 16
- ],
- {
- "crc": "0xbfc42b8f"
- }
- ],
- [
- "gpe_add_del_native_fwd_rpath_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "gpe_native_fwd_rpaths_get",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_ip4"
- ],
- {
- "crc": "0xc5e0d91b"
- }
- ],
- [
- "gpe_native_fwd_rpaths_get_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "count"
- ],
- [
- "vl_api_gpe_native_fwd_rpath_t",
- "entries",
- 0,
- "count"
- ],
- {
- "crc": "0x1e4536e3"
- }
- ]
- ],
- "unions": [],
- "enums": [],
- "services": {
- "gpe_add_del_fwd_entry": {
- "reply": "gpe_add_del_fwd_entry_reply"
- },
- "gpe_enable_disable": {
- "reply": "gpe_enable_disable_reply"
- },
- "gpe_add_del_iface": {
- "reply": "gpe_add_del_iface_reply"
- },
- "gpe_fwd_entry_vnis_get": {
- "reply": "gpe_fwd_entry_vnis_get_reply"
- },
- "gpe_fwd_entries_get": {
- "reply": "gpe_fwd_entries_get_reply"
- },
- "gpe_fwd_entry_path_dump": {
- "reply": "gpe_fwd_entry_path_details",
- "stream": true
- },
- "gpe_set_encap_mode": {
- "reply": "gpe_set_encap_mode_reply"
- },
- "gpe_get_encap_mode": {
- "reply": "gpe_get_encap_mode_reply"
- },
- "gpe_add_del_native_fwd_rpath": {
- "reply": "gpe_add_del_native_fwd_rpath_reply"
- },
- "gpe_native_fwd_rpaths_get": {
- "reply": "gpe_native_fwd_rpaths_get_reply"
- }
- },
- "options": {
- "version": "1.0.0"
- },
- "aliases": {},
- "vl_api_version": "0x9396c80c"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/lldp.api.json b/internal/testbinapi/binapi2001/.vppapi/core/lldp.api.json
deleted file mode 100644
index 9dbd66b..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/lldp.api.json
+++ /dev/null
@@ -1,133 +0,0 @@
-{
- "types": [],
- "messages": [
- [
- "lldp_config",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "system_name",
- 256
- ],
- [
- "u32",
- "tx_hold"
- ],
- [
- "u32",
- "tx_interval"
- ],
- {
- "crc": "0x2410286f"
- }
- ],
- [
- "lldp_config_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "sw_interface_set_lldp",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u8",
- "port_desc",
- 256
- ],
- [
- "u8",
- "mgmt_ip4",
- 4
- ],
- [
- "u8",
- "mgmt_ip6",
- 16
- ],
- [
- "u8",
- "mgmt_oid",
- 128
- ],
- [
- "u8",
- "enable"
- ],
- {
- "crc": "0x2d85d156"
- }
- ],
- [
- "sw_interface_set_lldp_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [],
- "enums": [],
- "services": {
- "lldp_config": {
- "reply": "lldp_config_reply"
- },
- "sw_interface_set_lldp": {
- "reply": "sw_interface_set_lldp_reply"
- }
- },
- "options": {
- "version": "1.0.0"
- },
- "aliases": {},
- "vl_api_version": "0xabb21dd0"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/memclnt.api.json b/internal/testbinapi/binapi2001/.vppapi/core/memclnt.api.json
deleted file mode 100644
index 746707e..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/memclnt.api.json
+++ /dev/null
@@ -1,595 +0,0 @@
-{
- "types": [
- [
- "module_version",
- [
- "u32",
- "major"
- ],
- [
- "u32",
- "minor"
- ],
- [
- "u32",
- "patch"
- ],
- [
- "string",
- "name",
- 64
- ]
- ],
- [
- "message_table_entry",
- [
- "u16",
- "index"
- ],
- [
- "string",
- "name",
- 64
- ]
- ]
- ],
- "messages": [
- [
- "memclnt_create",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "ctx_quota"
- ],
- [
- "u64",
- "input_queue"
- ],
- [
- "string",
- "name",
- 64
- ],
- [
- "u32",
- "api_versions",
- 8
- ],
- {
- "crc": "0x9c5e1c2f"
- }
- ],
- [
- "memclnt_create_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "response"
- ],
- [
- "u64",
- "handle"
- ],
- [
- "u32",
- "index"
- ],
- [
- "u64",
- "message_table"
- ],
- {
- "crc": "0x42ec4560"
- }
- ],
- [
- "memclnt_delete",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "index"
- ],
- [
- "u64",
- "handle"
- ],
- [
- "bool",
- "do_cleanup"
- ],
- {
- "crc": "0x7e1c04e3"
- }
- ],
- [
- "memclnt_delete_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "i32",
- "response"
- ],
- [
- "u64",
- "handle"
- ],
- {
- "crc": "0x3d3b6312"
- }
- ],
- [
- "rx_thread_exit",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u8",
- "dummy"
- ],
- {
- "crc": "0xc3a3a452"
- }
- ],
- [
- "memclnt_rx_thread_suspend",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u8",
- "dummy"
- ],
- {
- "crc": "0xc3a3a452"
- }
- ],
- [
- "memclnt_read_timeout",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u8",
- "dummy"
- ],
- {
- "crc": "0xc3a3a452"
- }
- ],
- [
- "rpc_call",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u64",
- "function"
- ],
- [
- "u8",
- "multicast"
- ],
- [
- "u8",
- "need_barrier_sync"
- ],
- [
- "u8",
- "send_reply"
- ],
- [
- "u32",
- "data_len"
- ],
- [
- "u8",
- "data",
- 0,
- "data_len"
- ],
- {
- "crc": "0x7e8a2c95"
- }
- ],
- [
- "rpc_call_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "get_first_msg_id",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "string",
- "name",
- 64
- ],
- {
- "crc": "0xebf79a66"
- }
- ],
- [
- "get_first_msg_id_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u16",
- "first_msg_id"
- ],
- {
- "crc": "0x7d337472"
- }
- ],
- [
- "api_versions",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "api_versions_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "count"
- ],
- [
- "vl_api_module_version_t",
- "api_versions",
- 0,
- "count"
- ],
- {
- "crc": "0x5f0d99d6"
- }
- ],
- [
- "trace_plugin_msg_ids",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "string",
- "plugin_name",
- 128
- ],
- [
- "u16",
- "first_msg_id"
- ],
- [
- "u16",
- "last_msg_id"
- ],
- {
- "crc": "0xf476d3ce"
- }
- ],
- [
- "sockclnt_create",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "string",
- "name",
- 64
- ],
- {
- "crc": "0x455fb9c4"
- }
- ],
- [
- "sockclnt_create_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "response"
- ],
- [
- "u32",
- "index"
- ],
- [
- "u16",
- "count"
- ],
- [
- "vl_api_message_table_entry_t",
- "message_table",
- 0,
- "count"
- ],
- {
- "crc": "0x35166268"
- }
- ],
- [
- "sockclnt_delete",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "index"
- ],
- {
- "crc": "0x8ac76db6"
- }
- ],
- [
- "sockclnt_delete_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "response"
- ],
- {
- "crc": "0x8f38b1ee"
- }
- ],
- [
- "sock_init_shm",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "requested_size"
- ],
- [
- "u8",
- "nitems"
- ],
- [
- "u64",
- "configs",
- 0,
- "nitems"
- ],
- {
- "crc": "0x51646d92"
- }
- ],
- [
- "sock_init_shm_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "memclnt_keepalive",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "memclnt_keepalive_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [],
- "enums": [],
- "services": {
- "memclnt_rx_thread_suspend": {
- "reply": "null"
- },
- "memclnt_read_timeout": {
- "reply": "null"
- },
- "rx_thread_exit": {
- "reply": "null"
- },
- "trace_plugin_msg_ids": {
- "reply": "null"
- },
- "memclnt_create": {
- "reply": "memclnt_create_reply"
- },
- "memclnt_delete": {
- "reply": "memclnt_delete_reply"
- },
- "rpc_call": {
- "reply": "rpc_call_reply"
- },
- "get_first_msg_id": {
- "reply": "get_first_msg_id_reply"
- },
- "api_versions": {
- "reply": "api_versions_reply"
- },
- "sockclnt_create": {
- "reply": "sockclnt_create_reply"
- },
- "sockclnt_delete": {
- "reply": "sockclnt_delete_reply"
- },
- "sock_init_shm": {
- "reply": "sock_init_shm_reply"
- },
- "memclnt_keepalive": {
- "reply": "memclnt_keepalive_reply"
- }
- },
- "options": {
- "version": "2.1.0"
- },
- "aliases": {},
- "vl_api_version": "0x8d3dd881"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/mfib_types.api.json b/internal/testbinapi/binapi2001/.vppapi/core/mfib_types.api.json
deleted file mode 100644
index a33b76f..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/mfib_types.api.json
+++ /dev/null
@@ -1,786 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ],
- [
- "fib_mpls_label",
- [
- "u8",
- "is_uniform"
- ],
- [
- "u32",
- "label"
- ],
- [
- "u8",
- "ttl"
- ],
- [
- "u8",
- "exp"
- ]
- ],
- [
- "fib_path_nh",
- [
- "vl_api_address_union_t",
- "address"
- ],
- [
- "u32",
- "via_label"
- ],
- [
- "u32",
- "obj_id"
- ],
- [
- "u32",
- "classify_table_index"
- ]
- ],
- [
- "fib_path",
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u32",
- "table_id"
- ],
- [
- "u32",
- "rpf_id"
- ],
- [
- "u8",
- "weight"
- ],
- [
- "u8",
- "preference"
- ],
- [
- "vl_api_fib_path_type_t",
- "type"
- ],
- [
- "vl_api_fib_path_flags_t",
- "flags"
- ],
- [
- "vl_api_fib_path_nh_proto_t",
- "proto"
- ],
- [
- "vl_api_fib_path_nh_t",
- "nh"
- ],
- [
- "u8",
- "n_labels"
- ],
- [
- "vl_api_fib_mpls_label_t",
- "label_stack",
- 16
- ]
- ],
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ],
- [
- "mfib_path",
- [
- "vl_api_mfib_itf_flags_t",
- "itf_flags"
- ],
- [
- "vl_api_fib_path_t",
- "path"
- ]
- ]
- ],
- "messages": [],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ],
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "fib_path_nh_proto",
- [
- "FIB_API_PATH_NH_PROTO_IP4",
- 0
- ],
- [
- "FIB_API_PATH_NH_PROTO_IP6",
- 1
- ],
- [
- "FIB_API_PATH_NH_PROTO_MPLS",
- 2
- ],
- [
- "FIB_API_PATH_NH_PROTO_ETHERNET",
- 3
- ],
- [
- "FIB_API_PATH_NH_PROTO_BIER",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "fib_path_flags",
- [
- "FIB_API_PATH_FLAG_NONE",
- 0
- ],
- [
- "FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED",
- 1
- ],
- [
- "FIB_API_PATH_FLAG_RESOLVE_VIA_HOST",
- 2
- ],
- [
- "FIB_API_PATH_FLAG_POP_PW_CW",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "fib_path_type",
- [
- "FIB_API_PATH_TYPE_NORMAL",
- 0
- ],
- [
- "FIB_API_PATH_TYPE_LOCAL",
- 1
- ],
- [
- "FIB_API_PATH_TYPE_DROP",
- 2
- ],
- [
- "FIB_API_PATH_TYPE_UDP_ENCAP",
- 3
- ],
- [
- "FIB_API_PATH_TYPE_BIER_IMP",
- 4
- ],
- [
- "FIB_API_PATH_TYPE_ICMP_UNREACH",
- 5
- ],
- [
- "FIB_API_PATH_TYPE_ICMP_PROHIBIT",
- 6
- ],
- [
- "FIB_API_PATH_TYPE_SOURCE_LOOKUP",
- 7
- ],
- [
- "FIB_API_PATH_TYPE_DVR",
- 8
- ],
- [
- "FIB_API_PATH_TYPE_INTERFACE_RX",
- 9
- ],
- [
- "FIB_API_PATH_TYPE_CLASSIFY",
- 10
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mfib_itf_flags",
- [
- "MFIB_API_ITF_FLAG_NONE",
- 0
- ],
- [
- "MFIB_API_ITF_FLAG_NEGATE_SIGNAL",
- 1
- ],
- [
- "MFIB_API_ITF_FLAG_ACCEPT",
- 2
- ],
- [
- "MFIB_API_ITF_FLAG_FORWARD",
- 4
- ],
- [
- "MFIB_API_ITF_FLAG_SIGNAL_PRESENT",
- 8
- ],
- [
- "MFIB_API_ITF_FLAG_DONT_PRESERVE",
- 16
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {},
- "options": {},
- "aliases": {
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- }
- },
- "vl_api_version": "0xba024d84"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/mpls.api.json b/internal/testbinapi/binapi2001/.vppapi/core/mpls.api.json
deleted file mode 100644
index a9797ba..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/mpls.api.json
+++ /dev/null
@@ -1,1378 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ],
- [
- "fib_mpls_label",
- [
- "u8",
- "is_uniform"
- ],
- [
- "u32",
- "label"
- ],
- [
- "u8",
- "ttl"
- ],
- [
- "u8",
- "exp"
- ]
- ],
- [
- "fib_path_nh",
- [
- "vl_api_address_union_t",
- "address"
- ],
- [
- "u32",
- "via_label"
- ],
- [
- "u32",
- "obj_id"
- ],
- [
- "u32",
- "classify_table_index"
- ]
- ],
- [
- "fib_path",
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u32",
- "table_id"
- ],
- [
- "u32",
- "rpf_id"
- ],
- [
- "u8",
- "weight"
- ],
- [
- "u8",
- "preference"
- ],
- [
- "vl_api_fib_path_type_t",
- "type"
- ],
- [
- "vl_api_fib_path_flags_t",
- "flags"
- ],
- [
- "vl_api_fib_path_nh_proto_t",
- "proto"
- ],
- [
- "vl_api_fib_path_nh_t",
- "nh"
- ],
- [
- "u8",
- "n_labels"
- ],
- [
- "vl_api_fib_mpls_label_t",
- "label_stack",
- 16
- ]
- ],
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ],
- [
- "mpls_tunnel",
- [
- "vl_api_interface_index_t",
- "mt_sw_if_index"
- ],
- [
- "u32",
- "mt_tunnel_index"
- ],
- [
- "bool",
- "mt_l2_only"
- ],
- [
- "bool",
- "mt_is_multicast"
- ],
- [
- "u8",
- "mt_n_paths"
- ],
- [
- "vl_api_fib_path_t",
- "mt_paths",
- 0,
- "mt_n_paths"
- ]
- ],
- [
- "mpls_table",
- [
- "u32",
- "mt_table_id"
- ],
- [
- "string",
- "mt_name",
- 64
- ]
- ],
- [
- "mpls_route",
- [
- "u32",
- "mr_table_id"
- ],
- [
- "u32",
- "mr_label"
- ],
- [
- "u8",
- "mr_eos"
- ],
- [
- "u8",
- "mr_eos_proto"
- ],
- [
- "bool",
- "mr_is_multicast"
- ],
- [
- "u8",
- "mr_n_paths"
- ],
- [
- "vl_api_fib_path_t",
- "mr_paths",
- 0,
- "mr_n_paths"
- ]
- ]
- ],
- "messages": [
- [
- "mpls_ip_bind_unbind",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "mb_mpls_table_id"
- ],
- [
- "u32",
- "mb_label"
- ],
- [
- "u32",
- "mb_ip_table_id"
- ],
- [
- "bool",
- "mb_is_bind"
- ],
- [
- "vl_api_prefix_t",
- "mb_prefix"
- ],
- {
- "crc": "0x48249a27"
- }
- ],
- [
- "mpls_ip_bind_unbind_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "mpls_tunnel_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "mt_is_add",
- {
- "default": "true"
- }
- ],
- [
- "vl_api_mpls_tunnel_t",
- "mt_tunnel"
- ],
- {
- "crc": "0x0de2478e"
- }
- ],
- [
- "mpls_tunnel_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "u32",
- "tunnel_index"
- ],
- {
- "crc": "0xafb01472"
- }
- ],
- [
- "mpls_tunnel_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0xf9e6675e"
- }
- ],
- [
- "mpls_tunnel_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_mpls_tunnel_t",
- "mt_tunnel"
- ],
- {
- "crc": "0xbdc55cce"
- }
- ],
- [
- "mpls_table_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "mt_is_add",
- {
- "default": "true"
- }
- ],
- [
- "vl_api_mpls_table_t",
- "mt_table"
- ],
- {
- "crc": "0x57817512"
- }
- ],
- [
- "mpls_table_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "mpls_table_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "mpls_table_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_mpls_table_t",
- "mt_table"
- ],
- {
- "crc": "0xf03ecdc8"
- }
- ],
- [
- "mpls_route_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "mr_is_add"
- ],
- [
- "bool",
- "mr_is_multipath"
- ],
- [
- "vl_api_mpls_route_t",
- "mr_route"
- ],
- {
- "crc": "0x343cff54"
- }
- ],
- [
- "mpls_route_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "stats_index"
- ],
- {
- "crc": "0x1992deab"
- }
- ],
- [
- "mpls_route_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_mpls_table_t",
- "table"
- ],
- {
- "crc": "0x935fdefa"
- }
- ],
- [
- "mpls_route_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_mpls_route_t",
- "mr_route"
- ],
- {
- "crc": "0xd0ac384c"
- }
- ],
- [
- "sw_interface_set_mpls_enable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "bool",
- "enable",
- {
- "default": "true"
- }
- ],
- {
- "crc": "0xae6cfcfb"
- }
- ],
- [
- "sw_interface_set_mpls_enable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ],
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "fib_path_nh_proto",
- [
- "FIB_API_PATH_NH_PROTO_IP4",
- 0
- ],
- [
- "FIB_API_PATH_NH_PROTO_IP6",
- 1
- ],
- [
- "FIB_API_PATH_NH_PROTO_MPLS",
- 2
- ],
- [
- "FIB_API_PATH_NH_PROTO_ETHERNET",
- 3
- ],
- [
- "FIB_API_PATH_NH_PROTO_BIER",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "fib_path_flags",
- [
- "FIB_API_PATH_FLAG_NONE",
- 0
- ],
- [
- "FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED",
- 1
- ],
- [
- "FIB_API_PATH_FLAG_RESOLVE_VIA_HOST",
- 2
- ],
- [
- "FIB_API_PATH_FLAG_POP_PW_CW",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "fib_path_type",
- [
- "FIB_API_PATH_TYPE_NORMAL",
- 0
- ],
- [
- "FIB_API_PATH_TYPE_LOCAL",
- 1
- ],
- [
- "FIB_API_PATH_TYPE_DROP",
- 2
- ],
- [
- "FIB_API_PATH_TYPE_UDP_ENCAP",
- 3
- ],
- [
- "FIB_API_PATH_TYPE_BIER_IMP",
- 4
- ],
- [
- "FIB_API_PATH_TYPE_ICMP_UNREACH",
- 5
- ],
- [
- "FIB_API_PATH_TYPE_ICMP_PROHIBIT",
- 6
- ],
- [
- "FIB_API_PATH_TYPE_SOURCE_LOOKUP",
- 7
- ],
- [
- "FIB_API_PATH_TYPE_DVR",
- 8
- ],
- [
- "FIB_API_PATH_TYPE_INTERFACE_RX",
- 9
- ],
- [
- "FIB_API_PATH_TYPE_CLASSIFY",
- 10
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "mpls_ip_bind_unbind": {
- "reply": "mpls_ip_bind_unbind_reply"
- },
- "mpls_tunnel_add_del": {
- "reply": "mpls_tunnel_add_del_reply"
- },
- "mpls_tunnel_dump": {
- "reply": "mpls_tunnel_details",
- "stream": true
- },
- "mpls_table_add_del": {
- "reply": "mpls_table_add_del_reply"
- },
- "mpls_table_dump": {
- "reply": "mpls_table_details",
- "stream": true
- },
- "mpls_route_add_del": {
- "reply": "mpls_route_add_del_reply"
- },
- "mpls_route_dump": {
- "reply": "mpls_route_details",
- "stream": true
- },
- "sw_interface_set_mpls_enable": {
- "reply": "sw_interface_set_mpls_enable_reply"
- }
- },
- "options": {
- "version": "1.1.1"
- },
- "aliases": {
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- },
- "interface_index": {
- "type": "u32"
- }
- },
- "vl_api_version": "0xfe593e14"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/netmap.api.json b/internal/testbinapi/binapi2001/.vppapi/core/netmap.api.json
deleted file mode 100644
index 4dbd80c..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/netmap.api.json
+++ /dev/null
@@ -1,119 +0,0 @@
-{
- "types": [],
- "messages": [
- [
- "netmap_create",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "netmap_if_name",
- 64
- ],
- [
- "u8",
- "hw_addr",
- 6
- ],
- [
- "u8",
- "use_random_hw_addr"
- ],
- [
- "u8",
- "is_pipe"
- ],
- [
- "u8",
- "is_master"
- ],
- {
- "crc": "0x5299044e"
- }
- ],
- [
- "netmap_create_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "netmap_delete",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "netmap_if_name",
- 64
- ],
- {
- "crc": "0xa8b6c201"
- }
- ],
- [
- "netmap_delete_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [],
- "enums": [],
- "services": {
- "netmap_create": {
- "reply": "netmap_create_reply"
- },
- "netmap_delete": {
- "reply": "netmap_delete_reply"
- }
- },
- "options": {
- "version": "1.0.0"
- },
- "aliases": {},
- "vl_api_version": "0x40e7a84f"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/nhrp.api.json b/internal/testbinapi/binapi2001/.vppapi/core/nhrp.api.json
deleted file mode 100644
index d307086..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/nhrp.api.json
+++ /dev/null
@@ -1,561 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ],
- [
- "nhrp_entry",
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "vl_api_address_t",
- "peer"
- ],
- [
- "vl_api_address_t",
- "nh"
- ],
- [
- "u32",
- "nh_table_id"
- ]
- ]
- ],
- "messages": [
- [
- "nhrp_entry_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_add"
- ],
- [
- "vl_api_nhrp_entry_t",
- "entry"
- ],
- {
- "crc": "0x5a47c531"
- }
- ],
- [
- "nhrp_entry_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "nhrp_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "nhrp_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_nhrp_entry_t",
- "entry"
- ],
- {
- "crc": "0xe351c50a"
- }
- ]
- ],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "nhrp_entry_add_del": {
- "reply": "nhrp_entry_add_del_reply"
- },
- "nhrp_dump": {
- "reply": "nhrp_details",
- "stream": true
- }
- },
- "options": {
- "version": "1.0.0"
- },
- "aliases": {
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- },
- "interface_index": {
- "type": "u32"
- }
- },
- "vl_api_version": "0xfb0453b2"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/one.api.json b/internal/testbinapi/binapi2001/.vppapi/core/one.api.json
deleted file mode 100644
index 6d3dcc4..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/one.api.json
+++ /dev/null
@@ -1,2867 +0,0 @@
-{
- "types": [
- [
- "one_local_locator",
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u8",
- "priority"
- ],
- [
- "u8",
- "weight"
- ]
- ],
- [
- "one_remote_locator",
- [
- "u8",
- "is_ip4"
- ],
- [
- "u8",
- "priority"
- ],
- [
- "u8",
- "weight"
- ],
- [
- "u8",
- "addr",
- 16
- ]
- ],
- [
- "one_l2_arp_entry",
- [
- "u8",
- "mac",
- 6
- ],
- [
- "u32",
- "ip4"
- ]
- ],
- [
- "one_ndp_entry",
- [
- "u8",
- "mac",
- 6
- ],
- [
- "u8",
- "ip6",
- 16
- ]
- ],
- [
- "one_adjacency",
- [
- "u8",
- "eid_type"
- ],
- [
- "u8",
- "reid",
- 16
- ],
- [
- "u8",
- "leid",
- 16
- ],
- [
- "u8",
- "reid_prefix_len"
- ],
- [
- "u8",
- "leid_prefix_len"
- ]
- ]
- ],
- "messages": [
- [
- "one_add_del_locator_set",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_add"
- ],
- [
- "u8",
- "locator_set_name",
- 64
- ],
- [
- "u32",
- "locator_num"
- ],
- [
- "vl_api_one_local_locator_t",
- "locators",
- 0,
- "locator_num"
- ],
- {
- "crc": "0x2e73b050"
- }
- ],
- [
- "one_add_del_locator_set_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "ls_index"
- ],
- {
- "crc": "0xb6666db4"
- }
- ],
- [
- "one_add_del_locator",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_add"
- ],
- [
- "u8",
- "locator_set_name",
- 64
- ],
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u8",
- "priority"
- ],
- [
- "u8",
- "weight"
- ],
- {
- "crc": "0x006a4240"
- }
- ],
- [
- "one_add_del_locator_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "one_add_del_local_eid",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_add"
- ],
- [
- "u8",
- "eid_type"
- ],
- [
- "u8",
- "eid",
- 16
- ],
- [
- "u8",
- "prefix_len"
- ],
- [
- "u8",
- "locator_set_name",
- 64
- ],
- [
- "u32",
- "vni"
- ],
- [
- "u16",
- "key_id"
- ],
- [
- "u8",
- "key",
- 64
- ],
- {
- "crc": "0xe6d00717"
- }
- ],
- [
- "one_add_del_local_eid_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "one_map_register_set_ttl",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "ttl"
- ],
- {
- "crc": "0xdd59f1f3"
- }
- ],
- [
- "one_map_register_set_ttl_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "show_one_map_register_ttl",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "show_one_map_register_ttl_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "ttl"
- ],
- {
- "crc": "0xfa83dd66"
- }
- ],
- [
- "one_add_del_map_server",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_add"
- ],
- [
- "u8",
- "is_ipv6"
- ],
- [
- "u8",
- "ip_address",
- 16
- ],
- {
- "crc": "0x0ebcd37d"
- }
- ],
- [
- "one_add_del_map_server_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "one_add_del_map_resolver",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_add"
- ],
- [
- "u8",
- "is_ipv6"
- ],
- [
- "u8",
- "ip_address",
- 16
- ],
- {
- "crc": "0x0ebcd37d"
- }
- ],
- [
- "one_add_del_map_resolver_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "one_enable_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_en"
- ],
- {
- "crc": "0xeb0e943b"
- }
- ],
- [
- "one_enable_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "one_nsh_set_locator_set",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_add"
- ],
- [
- "u8",
- "ls_name",
- 64
- ],
- {
- "crc": "0x7aa022dd"
- }
- ],
- [
- "one_nsh_set_locator_set_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "one_pitr_set_locator_set",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_add"
- ],
- [
- "u8",
- "ls_name",
- 64
- ],
- {
- "crc": "0x7aa022dd"
- }
- ],
- [
- "one_pitr_set_locator_set_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "one_use_petr",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_ip4"
- ],
- [
- "u8",
- "address",
- 16
- ],
- [
- "u8",
- "is_add"
- ],
- {
- "crc": "0x6910787d"
- }
- ],
- [
- "one_use_petr_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "show_one_use_petr",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "show_one_use_petr_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u8",
- "status"
- ],
- [
- "u8",
- "is_ip4"
- ],
- [
- "u8",
- "address",
- 16
- ],
- {
- "crc": "0x1eb21916"
- }
- ],
- [
- "show_one_rloc_probe_state",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "show_one_rloc_probe_state_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u8",
- "is_enabled"
- ],
- {
- "crc": "0x14304fbc"
- }
- ],
- [
- "one_rloc_probe_enable_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_enabled"
- ],
- {
- "crc": "0x294103d1"
- }
- ],
- [
- "one_rloc_probe_enable_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "one_map_register_enable_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_enabled"
- ],
- {
- "crc": "0x294103d1"
- }
- ],
- [
- "one_map_register_enable_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "show_one_map_register_state",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "show_one_map_register_state_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u8",
- "is_enabled"
- ],
- {
- "crc": "0x14304fbc"
- }
- ],
- [
- "one_map_request_mode",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "mode"
- ],
- {
- "crc": "0xf3f93ce9"
- }
- ],
- [
- "one_map_request_mode_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "show_one_map_request_mode",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "show_one_map_request_mode_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u8",
- "mode"
- ],
- {
- "crc": "0xd423107c"
- }
- ],
- [
- "one_add_del_remote_mapping",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_add"
- ],
- [
- "u8",
- "is_src_dst"
- ],
- [
- "u8",
- "del_all"
- ],
- [
- "u32",
- "vni"
- ],
- [
- "u8",
- "action"
- ],
- [
- "u8",
- "eid_type"
- ],
- [
- "u8",
- "eid",
- 16
- ],
- [
- "u8",
- "eid_len"
- ],
- [
- "u8",
- "seid",
- 16
- ],
- [
- "u8",
- "seid_len"
- ],
- [
- "u32",
- "rloc_num"
- ],
- [
- "vl_api_one_remote_locator_t",
- "rlocs",
- 0,
- "rloc_num"
- ],
- {
- "crc": "0x0b2010ec"
- }
- ],
- [
- "one_add_del_remote_mapping_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "one_add_del_l2_arp_entry",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_add"
- ],
- [
- "u8",
- "mac",
- 6
- ],
- [
- "u32",
- "bd"
- ],
- [
- "u32",
- "ip4"
- ],
- {
- "crc": "0xa95cc2d7"
- }
- ],
- [
- "one_add_del_l2_arp_entry_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "one_l2_arp_entries_get",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "bd"
- ],
- {
- "crc": "0x4d418cf4"
- }
- ],
- [
- "one_l2_arp_entries_get_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "count"
- ],
- [
- "vl_api_one_l2_arp_entry_t",
- "entries",
- 0,
- "count"
- ],
- {
- "crc": "0x88e54ded"
- }
- ],
- [
- "one_add_del_ndp_entry",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_add"
- ],
- [
- "u8",
- "mac",
- 6
- ],
- [
- "u32",
- "bd"
- ],
- [
- "u8",
- "ip6",
- 16
- ],
- {
- "crc": "0xe9468fe3"
- }
- ],
- [
- "one_add_del_ndp_entry_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "one_ndp_entries_get",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "bd"
- ],
- {
- "crc": "0x4d418cf4"
- }
- ],
- [
- "one_ndp_entries_get_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "count"
- ],
- [
- "vl_api_one_ndp_entry_t",
- "entries",
- 0,
- "count"
- ],
- {
- "crc": "0xd0822f37"
- }
- ],
- [
- "one_set_transport_protocol",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "protocol"
- ],
- {
- "crc": "0x07b6b85f"
- }
- ],
- [
- "one_set_transport_protocol_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "one_get_transport_protocol",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "one_get_transport_protocol_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u8",
- "protocol"
- ],
- {
- "crc": "0x62a28eb3"
- }
- ],
- [
- "one_ndp_bd_get",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "one_ndp_bd_get_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "count"
- ],
- [
- "u32",
- "bridge_domains",
- 0,
- "count"
- ],
- {
- "crc": "0x221ac888"
- }
- ],
- [
- "one_l2_arp_bd_get",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "one_l2_arp_bd_get_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "count"
- ],
- [
- "u32",
- "bridge_domains",
- 0,
- "count"
- ],
- {
- "crc": "0x221ac888"
- }
- ],
- [
- "one_add_del_adjacency",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_add"
- ],
- [
- "u32",
- "vni"
- ],
- [
- "u8",
- "eid_type"
- ],
- [
- "u8",
- "reid",
- 16
- ],
- [
- "u8",
- "leid",
- 16
- ],
- [
- "u8",
- "reid_len"
- ],
- [
- "u8",
- "leid_len"
- ],
- {
- "crc": "0xf047390d"
- }
- ],
- [
- "one_add_del_adjacency_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "one_add_del_map_request_itr_rlocs",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_add"
- ],
- [
- "u8",
- "locator_set_name",
- 64
- ],
- {
- "crc": "0xc7c6cb2f"
- }
- ],
- [
- "one_add_del_map_request_itr_rlocs_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "one_eid_table_add_del_map",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_add"
- ],
- [
- "u32",
- "vni"
- ],
- [
- "u32",
- "dp_table"
- ],
- [
- "u8",
- "is_l2"
- ],
- {
- "crc": "0x59e9975e"
- }
- ],
- [
- "one_eid_table_add_del_map_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "one_locator_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "ls_index"
- ],
- [
- "u8",
- "ls_name",
- 64
- ],
- [
- "u8",
- "is_index_set"
- ],
- {
- "crc": "0xf27d5050"
- }
- ],
- [
- "one_locator_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "local"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u8",
- "is_ipv6"
- ],
- [
- "u8",
- "ip_address",
- 16
- ],
- [
- "u8",
- "priority"
- ],
- [
- "u8",
- "weight"
- ],
- {
- "crc": "0xb3988a30"
- }
- ],
- [
- "one_locator_set_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "ls_index"
- ],
- [
- "u8",
- "ls_name",
- 64
- ],
- {
- "crc": "0x6b846882"
- }
- ],
- [
- "one_locator_set_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "filter"
- ],
- {
- "crc": "0xc79e8ab0"
- }
- ],
- [
- "one_eid_table_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "locator_set_index"
- ],
- [
- "u8",
- "action"
- ],
- [
- "u8",
- "is_local"
- ],
- [
- "u8",
- "eid_type"
- ],
- [
- "u8",
- "is_src_dst"
- ],
- [
- "u32",
- "vni"
- ],
- [
- "u8",
- "eid",
- 16
- ],
- [
- "u8",
- "eid_prefix_len"
- ],
- [
- "u8",
- "seid",
- 16
- ],
- [
- "u8",
- "seid_prefix_len"
- ],
- [
- "u32",
- "ttl"
- ],
- [
- "u8",
- "authoritative"
- ],
- [
- "u16",
- "key_id"
- ],
- [
- "u8",
- "key",
- 64
- ],
- {
- "crc": "0xdcd9f414"
- }
- ],
- [
- "one_eid_table_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "eid_set"
- ],
- [
- "u8",
- "prefix_length"
- ],
- [
- "u32",
- "vni"
- ],
- [
- "u8",
- "eid_type"
- ],
- [
- "u8",
- "eid",
- 16
- ],
- [
- "u8",
- "filter"
- ],
- {
- "crc": "0xe0df64da"
- }
- ],
- [
- "one_adjacencies_get_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "count"
- ],
- [
- "vl_api_one_adjacency_t",
- "adjacencies",
- 0,
- "count"
- ],
- {
- "crc": "0x60a3c592"
- }
- ],
- [
- "one_adjacencies_get",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "vni"
- ],
- {
- "crc": "0x8d1f2fe9"
- }
- ],
- [
- "one_eid_table_map_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "vni"
- ],
- [
- "u32",
- "dp_table"
- ],
- {
- "crc": "0x0b6859e2"
- }
- ],
- [
- "one_eid_table_map_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_l2"
- ],
- {
- "crc": "0x67c54650"
- }
- ],
- [
- "one_eid_table_vni_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "one_eid_table_vni_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "vni"
- ],
- {
- "crc": "0x64abc01e"
- }
- ],
- [
- "one_map_resolver_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_ipv6"
- ],
- [
- "u8",
- "ip_address",
- 16
- ],
- {
- "crc": "0x60a5f5ca"
- }
- ],
- [
- "one_map_resolver_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "one_map_server_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_ipv6"
- ],
- [
- "u8",
- "ip_address",
- 16
- ],
- {
- "crc": "0x60a5f5ca"
- }
- ],
- [
- "one_map_server_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "show_one_status",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "show_one_status_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u8",
- "feature_status"
- ],
- [
- "u8",
- "gpe_status"
- ],
- {
- "crc": "0xddcf48ef"
- }
- ],
- [
- "one_get_map_request_itr_rlocs",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "one_get_map_request_itr_rlocs_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u8",
- "locator_set_name",
- 64
- ],
- {
- "crc": "0x9f56f6f7"
- }
- ],
- [
- "show_one_nsh_mapping",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "show_one_nsh_mapping_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u8",
- "is_set"
- ],
- [
- "u8",
- "locator_set_name",
- 64
- ],
- {
- "crc": "0xf2ff364e"
- }
- ],
- [
- "show_one_pitr",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "show_one_pitr_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u8",
- "status"
- ],
- [
- "u8",
- "locator_set_name",
- 64
- ],
- {
- "crc": "0xdca512cc"
- }
- ],
- [
- "one_stats_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "one_stats_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "vni"
- ],
- [
- "u8",
- "eid_type"
- ],
- [
- "u8",
- "deid",
- 16
- ],
- [
- "u8",
- "seid",
- 16
- ],
- [
- "u8",
- "deid_pref_len"
- ],
- [
- "u8",
- "seid_pref_len"
- ],
- [
- "u8",
- "is_ip4"
- ],
- [
- "u8",
- "rloc",
- 16
- ],
- [
- "u8",
- "lloc",
- 16
- ],
- [
- "u32",
- "pkt_count"
- ],
- [
- "u32",
- "bytes"
- ],
- {
- "crc": "0xe1a34a05"
- }
- ],
- [
- "one_stats_flush",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "one_stats_flush_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "one_stats_enable_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_en"
- ],
- {
- "crc": "0xeb0e943b"
- }
- ],
- [
- "one_stats_enable_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "show_one_stats_enable_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "show_one_stats_enable_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u8",
- "is_en"
- ],
- {
- "crc": "0x6b4c29dc"
- }
- ],
- [
- "one_map_register_fallback_threshold",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "value"
- ],
- {
- "crc": "0xf7d4a475"
- }
- ],
- [
- "one_map_register_fallback_threshold_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "show_one_map_register_fallback_threshold",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "show_one_map_register_fallback_threshold_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "value"
- ],
- {
- "crc": "0xc93a9113"
- }
- ],
- [
- "one_enable_disable_xtr_mode",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_en"
- ],
- {
- "crc": "0xeb0e943b"
- }
- ],
- [
- "one_enable_disable_xtr_mode_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "one_show_xtr_mode",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "one_show_xtr_mode_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u8",
- "is_en"
- ],
- {
- "crc": "0x6b4c29dc"
- }
- ],
- [
- "one_enable_disable_petr_mode",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_en"
- ],
- {
- "crc": "0xeb0e943b"
- }
- ],
- [
- "one_enable_disable_petr_mode_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "one_show_petr_mode",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "one_show_petr_mode_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u8",
- "is_en"
- ],
- {
- "crc": "0x6b4c29dc"
- }
- ],
- [
- "one_enable_disable_pitr_mode",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_en"
- ],
- {
- "crc": "0xeb0e943b"
- }
- ],
- [
- "one_enable_disable_pitr_mode_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "one_show_pitr_mode",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "one_show_pitr_mode_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u8",
- "is_en"
- ],
- {
- "crc": "0x6b4c29dc"
- }
- ]
- ],
- "unions": [],
- "enums": [],
- "services": {
- "one_add_del_locator_set": {
- "reply": "one_add_del_locator_set_reply"
- },
- "one_add_del_locator": {
- "reply": "one_add_del_locator_reply"
- },
- "one_add_del_local_eid": {
- "reply": "one_add_del_local_eid_reply"
- },
- "one_map_register_set_ttl": {
- "reply": "one_map_register_set_ttl_reply"
- },
- "show_one_map_register_ttl": {
- "reply": "show_one_map_register_ttl_reply"
- },
- "one_add_del_map_server": {
- "reply": "one_add_del_map_server_reply"
- },
- "one_add_del_map_resolver": {
- "reply": "one_add_del_map_resolver_reply"
- },
- "one_enable_disable": {
- "reply": "one_enable_disable_reply"
- },
- "one_nsh_set_locator_set": {
- "reply": "one_nsh_set_locator_set_reply"
- },
- "one_pitr_set_locator_set": {
- "reply": "one_pitr_set_locator_set_reply"
- },
- "one_use_petr": {
- "reply": "one_use_petr_reply"
- },
- "show_one_use_petr": {
- "reply": "show_one_use_petr_reply"
- },
- "show_one_rloc_probe_state": {
- "reply": "show_one_rloc_probe_state_reply"
- },
- "one_rloc_probe_enable_disable": {
- "reply": "one_rloc_probe_enable_disable_reply"
- },
- "one_map_register_enable_disable": {
- "reply": "one_map_register_enable_disable_reply"
- },
- "show_one_map_register_state": {
- "reply": "show_one_map_register_state_reply"
- },
- "one_map_request_mode": {
- "reply": "one_map_request_mode_reply"
- },
- "show_one_map_request_mode": {
- "reply": "show_one_map_request_mode_reply"
- },
- "one_add_del_remote_mapping": {
- "reply": "one_add_del_remote_mapping_reply"
- },
- "one_add_del_l2_arp_entry": {
- "reply": "one_add_del_l2_arp_entry_reply"
- },
- "one_l2_arp_entries_get": {
- "reply": "one_l2_arp_entries_get_reply"
- },
- "one_add_del_ndp_entry": {
- "reply": "one_add_del_ndp_entry_reply"
- },
- "one_ndp_entries_get": {
- "reply": "one_ndp_entries_get_reply"
- },
- "one_set_transport_protocol": {
- "reply": "one_set_transport_protocol_reply"
- },
- "one_get_transport_protocol": {
- "reply": "one_get_transport_protocol_reply"
- },
- "one_ndp_bd_get": {
- "reply": "one_ndp_bd_get_reply"
- },
- "one_l2_arp_bd_get": {
- "reply": "one_l2_arp_bd_get_reply"
- },
- "one_add_del_adjacency": {
- "reply": "one_add_del_adjacency_reply"
- },
- "one_add_del_map_request_itr_rlocs": {
- "reply": "one_add_del_map_request_itr_rlocs_reply"
- },
- "one_eid_table_add_del_map": {
- "reply": "one_eid_table_add_del_map_reply"
- },
- "one_locator_dump": {
- "reply": "one_locator_details",
- "stream": true
- },
- "one_locator_set_dump": {
- "reply": "one_locator_set_details",
- "stream": true
- },
- "one_eid_table_dump": {
- "reply": "one_eid_table_details",
- "stream": true
- },
- "one_adjacencies_get": {
- "reply": "one_adjacencies_get_reply"
- },
- "one_eid_table_map_dump": {
- "reply": "one_eid_table_map_details",
- "stream": true
- },
- "one_eid_table_vni_dump": {
- "reply": "one_eid_table_vni_details",
- "stream": true
- },
- "one_map_resolver_dump": {
- "reply": "one_map_resolver_details",
- "stream": true
- },
- "one_map_server_dump": {
- "reply": "one_map_server_details",
- "stream": true
- },
- "show_one_status": {
- "reply": "show_one_status_reply"
- },
- "one_get_map_request_itr_rlocs": {
- "reply": "one_get_map_request_itr_rlocs_reply"
- },
- "show_one_nsh_mapping": {
- "reply": "show_one_nsh_mapping_reply"
- },
- "show_one_pitr": {
- "reply": "show_one_pitr_reply"
- },
- "one_stats_dump": {
- "reply": "one_stats_details",
- "stream": true
- },
- "one_stats_flush": {
- "reply": "one_stats_flush_reply"
- },
- "one_stats_enable_disable": {
- "reply": "one_stats_enable_disable_reply"
- },
- "show_one_stats_enable_disable": {
- "reply": "show_one_stats_enable_disable_reply"
- },
- "one_map_register_fallback_threshold": {
- "reply": "one_map_register_fallback_threshold_reply"
- },
- "show_one_map_register_fallback_threshold": {
- "reply": "show_one_map_register_fallback_threshold_reply"
- },
- "one_enable_disable_xtr_mode": {
- "reply": "one_enable_disable_xtr_mode_reply"
- },
- "one_show_xtr_mode": {
- "reply": "one_show_xtr_mode_reply"
- },
- "one_enable_disable_petr_mode": {
- "reply": "one_enable_disable_petr_mode_reply"
- },
- "one_show_petr_mode": {
- "reply": "one_show_petr_mode_reply"
- },
- "one_enable_disable_pitr_mode": {
- "reply": "one_enable_disable_pitr_mode_reply"
- },
- "one_show_pitr_mode": {
- "reply": "one_show_pitr_mode_reply"
- }
- },
- "options": {
- "version": "1.0.0"
- },
- "aliases": {},
- "vl_api_version": "0xde9891c3"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/p2p_ethernet.api.json b/internal/testbinapi/binapi2001/.vppapi/core/p2p_ethernet.api.json
deleted file mode 100644
index 0ab4f51..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/p2p_ethernet.api.json
+++ /dev/null
@@ -1,277 +0,0 @@
-{
- "types": [],
- "messages": [
- [
- "p2p_ethernet_add",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "parent_if_index"
- ],
- [
- "u32",
- "subif_id"
- ],
- [
- "vl_api_mac_address_t",
- "remote_mac"
- ],
- {
- "crc": "0xeeb8e717"
- }
- ],
- [
- "p2p_ethernet_add_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0x5383d31f"
- }
- ],
- [
- "p2p_ethernet_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "parent_if_index"
- ],
- [
- "vl_api_mac_address_t",
- "remote_mac"
- ],
- {
- "crc": "0x0b62c386"
- }
- ],
- [
- "p2p_ethernet_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [],
- "enums": [
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "p2p_ethernet_add": {
- "reply": "p2p_ethernet_add_reply"
- },
- "p2p_ethernet_del": {
- "reply": "p2p_ethernet_del_reply"
- }
- },
- "options": {
- "version": "1.0.0"
- },
- "aliases": {
- "interface_index": {
- "type": "u32"
- },
- "mac_address": {
- "type": "u8",
- "length": 6
- }
- },
- "vl_api_version": "0x282f1ed1"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/pci_types.api.json b/internal/testbinapi/binapi2001/.vppapi/core/pci_types.api.json
deleted file mode 100644
index 079c508..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/pci_types.api.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
- "types": [
- [
- "pci_address",
- [
- "u16",
- "domain"
- ],
- [
- "u8",
- "bus"
- ],
- [
- "u8",
- "slot"
- ],
- [
- "u8",
- "function"
- ]
- ]
- ],
- "messages": [],
- "unions": [],
- "enums": [],
- "services": {},
- "options": {
- "version": "1.0.0"
- },
- "aliases": {},
- "vl_api_version": "0x5d418665"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/pg.api.json b/internal/testbinapi/binapi2001/.vppapi/core/pg.api.json
deleted file mode 100644
index 6b41f7d..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/pg.api.json
+++ /dev/null
@@ -1,183 +0,0 @@
-{
- "types": [],
- "messages": [
- [
- "pg_create_interface",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "interface_id"
- ],
- [
- "u8",
- "gso_enabled"
- ],
- [
- "u32",
- "gso_size"
- ],
- {
- "crc": "0xb1ecff05"
- }
- ],
- [
- "pg_create_interface_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- {
- "crc": "0xfda5941f"
- }
- ],
- [
- "pg_capture",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "interface_id"
- ],
- [
- "u8",
- "is_enabled"
- ],
- [
- "u32",
- "count"
- ],
- [
- "u32",
- "pcap_name_length"
- ],
- [
- "u8",
- "pcap_file_name",
- 0,
- "pcap_name_length"
- ],
- {
- "crc": "0x453da78d"
- }
- ],
- [
- "pg_capture_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "pg_enable_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_enabled"
- ],
- [
- "u32",
- "stream_name_length"
- ],
- [
- "u8",
- "stream_name",
- 0,
- "stream_name_length"
- ],
- {
- "crc": "0x0cb71d10"
- }
- ],
- [
- "pg_enable_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [],
- "enums": [],
- "services": {
- "pg_create_interface": {
- "reply": "pg_create_interface_reply"
- },
- "pg_capture": {
- "reply": "pg_capture_reply"
- },
- "pg_enable_disable": {
- "reply": "pg_enable_disable_reply"
- }
- },
- "options": {
- "version": "1.1.0"
- },
- "aliases": {},
- "vl_api_version": "0x2583e07b"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/pipe.api.json b/internal/testbinapi/binapi2001/.vppapi/core/pipe.api.json
deleted file mode 100644
index 973f56d..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/pipe.api.json
+++ /dev/null
@@ -1,319 +0,0 @@
-{
- "types": [],
- "messages": [
- [
- "pipe_create",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_specified"
- ],
- [
- "u32",
- "user_instance"
- ],
- {
- "crc": "0xbb263bd3"
- }
- ],
- [
- "pipe_create_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "vl_api_interface_index_t",
- "pipe_sw_if_index",
- 2
- ],
- {
- "crc": "0xd4c2c2b3"
- }
- ],
- [
- "pipe_delete",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0xf9e6675e"
- }
- ],
- [
- "pipe_delete_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "pipe_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "pipe_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "vl_api_interface_index_t",
- "pipe_sw_if_index",
- 2
- ],
- [
- "u32",
- "instance"
- ],
- {
- "crc": "0x43ac107a"
- }
- ]
- ],
- "unions": [],
- "enums": [
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "pipe_create": {
- "reply": "pipe_create_reply"
- },
- "pipe_delete": {
- "reply": "pipe_delete_reply"
- },
- "pipe_dump": {
- "reply": "pipe_details",
- "stream": true
- }
- },
- "options": {
- "version": "1.0.1"
- },
- "aliases": {
- "interface_index": {
- "type": "u32"
- }
- },
- "vl_api_version": "0x1d68f11"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/policer.api.json b/internal/testbinapi/binapi2001/.vppapi/core/policer.api.json
deleted file mode 100644
index 1a3f2ba..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/policer.api.json
+++ /dev/null
@@ -1,264 +0,0 @@
-{
- "types": [],
- "messages": [
- [
- "policer_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_add"
- ],
- [
- "u8",
- "name",
- 64
- ],
- [
- "u32",
- "cir"
- ],
- [
- "u32",
- "eir"
- ],
- [
- "u64",
- "cb"
- ],
- [
- "u64",
- "eb"
- ],
- [
- "u8",
- "rate_type"
- ],
- [
- "u8",
- "round_type"
- ],
- [
- "u8",
- "type"
- ],
- [
- "u8",
- "color_aware"
- ],
- [
- "u8",
- "conform_action_type"
- ],
- [
- "u8",
- "conform_dscp"
- ],
- [
- "u8",
- "exceed_action_type"
- ],
- [
- "u8",
- "exceed_dscp"
- ],
- [
- "u8",
- "violate_action_type"
- ],
- [
- "u8",
- "violate_dscp"
- ],
- {
- "crc": "0xdfea2be8"
- }
- ],
- [
- "policer_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "policer_index"
- ],
- {
- "crc": "0xa177cef2"
- }
- ],
- [
- "policer_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "match_name_valid"
- ],
- [
- "u8",
- "match_name",
- 64
- ],
- {
- "crc": "0x8be04d34"
- }
- ],
- [
- "policer_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "name",
- 64
- ],
- [
- "u32",
- "cir"
- ],
- [
- "u32",
- "eir"
- ],
- [
- "u64",
- "cb"
- ],
- [
- "u64",
- "eb"
- ],
- [
- "u8",
- "rate_type"
- ],
- [
- "u8",
- "round_type"
- ],
- [
- "u8",
- "type"
- ],
- [
- "u8",
- "conform_action_type"
- ],
- [
- "u8",
- "conform_dscp"
- ],
- [
- "u8",
- "exceed_action_type"
- ],
- [
- "u8",
- "exceed_dscp"
- ],
- [
- "u8",
- "violate_action_type"
- ],
- [
- "u8",
- "violate_dscp"
- ],
- [
- "u8",
- "single_rate"
- ],
- [
- "u8",
- "color_aware"
- ],
- [
- "u32",
- "scale"
- ],
- [
- "u32",
- "cir_tokens_per_period"
- ],
- [
- "u32",
- "pir_tokens_per_period"
- ],
- [
- "u32",
- "current_limit"
- ],
- [
- "u32",
- "current_bucket"
- ],
- [
- "u32",
- "extended_limit"
- ],
- [
- "u32",
- "extended_bucket"
- ],
- [
- "u64",
- "last_update_time"
- ],
- {
- "crc": "0xff2765f0"
- }
- ]
- ],
- "unions": [],
- "enums": [],
- "services": {
- "policer_add_del": {
- "reply": "policer_add_del_reply"
- },
- "policer_dump": {
- "reply": "policer_details",
- "stream": true
- }
- },
- "options": {
- "version": "1.0.0"
- },
- "aliases": {},
- "vl_api_version": "0x4218ed4f"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/punt.api.json b/internal/testbinapi/binapi2001/.vppapi/core/punt.api.json
deleted file mode 100644
index 2ca291d..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/punt.api.json
+++ /dev/null
@@ -1,629 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ],
- [
- "punt_l4",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_ip_proto_t",
- "protocol"
- ],
- [
- "u16",
- "port"
- ]
- ],
- [
- "punt_ip_proto",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_ip_proto_t",
- "protocol"
- ]
- ],
- [
- "punt_exception",
- [
- "u32",
- "id"
- ]
- ],
- [
- "punt",
- [
- "vl_api_punt_type_t",
- "type"
- ],
- [
- "vl_api_punt_union_t",
- "punt"
- ]
- ],
- [
- "punt_reason",
- [
- "u32",
- "id"
- ],
- [
- "string",
- "name",
- 0
- ]
- ]
- ],
- "messages": [
- [
- "set_punt",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "vl_api_punt_t",
- "punt"
- ],
- {
- "crc": "0x83799618"
- }
- ],
- [
- "set_punt_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "punt_socket_register",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "header_version"
- ],
- [
- "vl_api_punt_t",
- "punt"
- ],
- [
- "string",
- "pathname",
- 108
- ],
- {
- "crc": "0xc8cd10fa"
- }
- ],
- [
- "punt_socket_register_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "string",
- "pathname",
- 108
- ],
- {
- "crc": "0xbd30ae90"
- }
- ],
- [
- "punt_socket_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_punt_type_t",
- "type"
- ],
- {
- "crc": "0x52974935"
- }
- ],
- [
- "punt_socket_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_punt_t",
- "punt"
- ],
- [
- "string",
- "pathname",
- 108
- ],
- {
- "crc": "0x1de0ce75"
- }
- ],
- [
- "punt_socket_deregister",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_punt_t",
- "punt"
- ],
- {
- "crc": "0x98a444f4"
- }
- ],
- [
- "punt_socket_deregister_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "punt_reason_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_punt_reason_t",
- "reason"
- ],
- {
- "crc": "0x5c0dd4fe"
- }
- ],
- [
- "punt_reason_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_punt_reason_t",
- "reason"
- ],
- {
- "crc": "0x2c9d4a40"
- }
- ]
- ],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ],
- [
- "punt_union",
- [
- "vl_api_punt_exception_t",
- "exception"
- ],
- [
- "vl_api_punt_l4_t",
- "l4"
- ],
- [
- "vl_api_punt_ip_proto_t",
- "ip_proto"
- ]
- ]
- ],
- "enums": [
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "punt_type",
- [
- "PUNT_API_TYPE_L4",
- 1
- ],
- [
- "PUNT_API_TYPE_IP_PROTO",
- 2
- ],
- [
- "PUNT_API_TYPE_EXCEPTION",
- 3
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "set_punt": {
- "reply": "set_punt_reply"
- },
- "punt_socket_register": {
- "reply": "punt_socket_register_reply"
- },
- "punt_socket_dump": {
- "reply": "punt_socket_details",
- "stream": true
- },
- "punt_socket_deregister": {
- "reply": "punt_socket_deregister_reply"
- },
- "punt_reason_dump": {
- "reply": "punt_reason_details",
- "stream": true
- }
- },
- "options": {
- "version": "2.2.1"
- },
- "aliases": {
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- }
- },
- "vl_api_version": "0x51716f7f"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/qos.api.json b/internal/testbinapi/binapi2001/.vppapi/core/qos.api.json
deleted file mode 100644
index 81a5f07..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/qos.api.json
+++ /dev/null
@@ -1,956 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ],
- [
- "qos_store",
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "vl_api_qos_source_t",
- "input_source"
- ],
- [
- "u8",
- "value"
- ]
- ],
- [
- "qos_record",
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "vl_api_qos_source_t",
- "input_source"
- ]
- ],
- [
- "qos_egress_map_row",
- [
- "u8",
- "outputs",
- 256
- ]
- ],
- [
- "qos_egress_map",
- [
- "u32",
- "id"
- ],
- [
- "vl_api_qos_egress_map_row_t",
- "rows",
- 4
- ]
- ],
- [
- "qos_mark",
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u32",
- "map_id"
- ],
- [
- "vl_api_qos_source_t",
- "output_source"
- ]
- ]
- ],
- "messages": [
- [
- "qos_store_enable_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "enable",
- {
- "default": "true"
- }
- ],
- [
- "vl_api_qos_store_t",
- "store"
- ],
- {
- "crc": "0x3507235e"
- }
- ],
- [
- "qos_store_enable_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "qos_store_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "qos_store_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_qos_store_t",
- "store"
- ],
- {
- "crc": "0x038a6d48"
- }
- ],
- [
- "qos_record_enable_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "enable",
- {
- "default": "true"
- }
- ],
- [
- "vl_api_qos_record_t",
- "record"
- ],
- {
- "crc": "0x25b33f88"
- }
- ],
- [
- "qos_record_enable_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "qos_record_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "qos_record_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_qos_record_t",
- "record"
- ],
- {
- "crc": "0x4956ccdd"
- }
- ],
- [
- "qos_egress_map_update",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_qos_egress_map_t",
- "map"
- ],
- {
- "crc": "0x6d1c065f"
- }
- ],
- [
- "qos_egress_map_update_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "qos_egress_map_delete",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "id"
- ],
- {
- "crc": "0x3a91bde5"
- }
- ],
- [
- "qos_egress_map_delete_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "qos_egress_map_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "qos_egress_map_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_qos_egress_map_t",
- "map"
- ],
- {
- "crc": "0x46c5653c"
- }
- ],
- [
- "qos_mark_enable_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "enable",
- {
- "default": "true"
- }
- ],
- [
- "vl_api_qos_mark_t",
- "mark"
- ],
- {
- "crc": "0x1a010f74"
- }
- ],
- [
- "qos_mark_enable_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "qos_mark_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0xf9e6675e"
- }
- ],
- [
- "qos_mark_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_qos_mark_t",
- "mark"
- ],
- {
- "crc": "0x89fe81a9"
- }
- ],
- [
- "qos_mark_details_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "qos_source",
- [
- "QOS_API_SOURCE_EXT",
- 0
- ],
- [
- "QOS_API_SOURCE_VLAN",
- 1
- ],
- [
- "QOS_API_SOURCE_MPLS",
- 2
- ],
- [
- "QOS_API_SOURCE_IP",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ]
- ],
- "services": {
- "qos_store_enable_disable": {
- "reply": "qos_store_enable_disable_reply"
- },
- "qos_store_dump": {
- "reply": "qos_store_details",
- "stream": true
- },
- "qos_record_enable_disable": {
- "reply": "qos_record_enable_disable_reply"
- },
- "qos_record_dump": {
- "reply": "qos_record_details",
- "stream": true
- },
- "qos_egress_map_update": {
- "reply": "qos_egress_map_update_reply"
- },
- "qos_egress_map_delete": {
- "reply": "qos_egress_map_delete_reply"
- },
- "qos_egress_map_dump": {
- "reply": "qos_egress_map_details",
- "stream": true
- },
- "qos_mark_enable_disable": {
- "reply": "qos_mark_enable_disable_reply"
- },
- "qos_mark_dump": {
- "reply": "qos_mark_details",
- "stream": true
- }
- },
- "options": {
- "version": "1.1.1"
- },
- "aliases": {
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- },
- "interface_index": {
- "type": "u32"
- }
- },
- "vl_api_version": "0x86291f7f"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/rd_cp.api.json b/internal/testbinapi/binapi2001/.vppapi/core/rd_cp.api.json
deleted file mode 100644
index 87bb44d..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/rd_cp.api.json
+++ /dev/null
@@ -1,222 +0,0 @@
-{
- "types": [],
- "messages": [
- [
- "ip6_nd_address_autoconfig",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "bool",
- "enable"
- ],
- [
- "bool",
- "install_default_routes"
- ],
- {
- "crc": "0x9e14a4a7"
- }
- ],
- [
- "ip6_nd_address_autoconfig_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [],
- "enums": [
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "ip6_nd_address_autoconfig": {
- "reply": "ip6_nd_address_autoconfig_reply"
- }
- },
- "options": {
- "version": "1.0.1"
- },
- "aliases": {
- "interface_index": {
- "type": "u32"
- }
- },
- "vl_api_version": "0x5269dfb9"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/session.api.json b/internal/testbinapi/binapi2001/.vppapi/core/session.api.json
deleted file mode 100644
index 11a2ebf..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/session.api.json
+++ /dev/null
@@ -1,1372 +0,0 @@
-{
- "types": [],
- "messages": [
- [
- "application_attach",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "initial_segment_size"
- ],
- [
- "u64",
- "options",
- 16
- ],
- [
- "u8",
- "namespace_id_len"
- ],
- [
- "u8",
- "namespace_id",
- 64
- ],
- {
- "crc": "0x81d4f974"
- }
- ],
- [
- "application_attach_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u64",
- "app_event_queue_address"
- ],
- [
- "u8",
- "n_fds"
- ],
- [
- "u8",
- "fd_flags"
- ],
- [
- "u32",
- "segment_size"
- ],
- [
- "u8",
- "segment_name_length"
- ],
- [
- "u8",
- "segment_name",
- 128
- ],
- [
- "u32",
- "app_index"
- ],
- [
- "u64",
- "segment_handle"
- ],
- {
- "crc": "0x581866e8"
- }
- ],
- [
- "app_attach",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u64",
- "options",
- 16
- ],
- [
- "u8",
- "namespace_id_len"
- ],
- [
- "u8",
- "namespace_id",
- 64
- ],
- {
- "crc": "0xed08f4bd"
- }
- ],
- [
- "app_attach_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u64",
- "app_mq"
- ],
- [
- "u64",
- "vpp_ctrl_mq"
- ],
- [
- "u8",
- "vpp_ctrl_mq_thread"
- ],
- [
- "u32",
- "app_index"
- ],
- [
- "u8",
- "n_fds"
- ],
- [
- "u8",
- "fd_flags"
- ],
- [
- "u32",
- "segment_size"
- ],
- [
- "u8",
- "segment_name_length"
- ],
- [
- "u8",
- "segment_name",
- 128
- ],
- [
- "u64",
- "segment_handle"
- ],
- {
- "crc": "0x0112f647"
- }
- ],
- [
- "app_add_cert_key_pair",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u16",
- "cert_len"
- ],
- [
- "u16",
- "certkey_len"
- ],
- [
- "u8",
- "certkey",
- 0,
- "certkey_len"
- ],
- {
- "crc": "0x02eb8016"
- }
- ],
- [
- "app_add_cert_key_pair_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "index"
- ],
- {
- "crc": "0xb42958d0"
- }
- ],
- [
- "app_del_cert_key_pair",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "index"
- ],
- {
- "crc": "0x8ac76db6"
- }
- ],
- [
- "app_del_cert_key_pair_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "application_tls_cert_add",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "app_index"
- ],
- [
- "u16",
- "cert_len"
- ],
- [
- "u8",
- "cert",
- 0,
- "cert_len"
- ],
- {
- "crc": "0x3f5cfe45"
- }
- ],
- [
- "application_tls_cert_add_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "application_tls_key_add",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "app_index"
- ],
- [
- "u16",
- "key_len"
- ],
- [
- "u8",
- "key",
- 0,
- "key_len"
- ],
- {
- "crc": "0x5eaf70cd"
- }
- ],
- [
- "application_tls_key_add_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "application_detach",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "application_detach_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "map_another_segment",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "fd_flags"
- ],
- [
- "u32",
- "segment_size"
- ],
- [
- "u8",
- "segment_name",
- 128
- ],
- [
- "u64",
- "segment_handle"
- ],
- {
- "crc": "0xdc2d630b"
- }
- ],
- [
- "map_another_segment_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "unmap_segment",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u64",
- "segment_handle"
- ],
- {
- "crc": "0xf77096f6"
- }
- ],
- [
- "unmap_segment_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "bind_uri",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "accept_cookie"
- ],
- [
- "u8",
- "uri",
- 128
- ],
- {
- "crc": "0xfae140cb"
- }
- ],
- [
- "bind_uri_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "unbind_uri",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "uri",
- 128
- ],
- {
- "crc": "0x294cf07d"
- }
- ],
- [
- "unbind_uri_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "connect_uri",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u64",
- "client_queue_address"
- ],
- [
- "u64",
- "options",
- 16
- ],
- [
- "u8",
- "uri",
- 128
- ],
- {
- "crc": "0xa36143d6"
- }
- ],
- [
- "connect_uri_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "disconnect_session",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u64",
- "handle"
- ],
- {
- "crc": "0x7279205b"
- }
- ],
- [
- "disconnect_session_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u64",
- "handle"
- ],
- {
- "crc": "0xd6960a03"
- }
- ],
- [
- "bind_sock",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "wrk_index"
- ],
- [
- "u32",
- "vrf"
- ],
- [
- "u8",
- "is_ip4"
- ],
- [
- "u8",
- "ip",
- 16
- ],
- [
- "u16",
- "port"
- ],
- [
- "u8",
- "proto"
- ],
- [
- "u64",
- "options",
- 16
- ],
- {
- "crc": "0x0394633f"
- }
- ],
- [
- "bind_sock_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "unbind_sock",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "wrk_index"
- ],
- [
- "u64",
- "handle"
- ],
- {
- "crc": "0x08880908"
- }
- ],
- [
- "unbind_sock_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "connect_sock",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "wrk_index"
- ],
- [
- "u64",
- "client_queue_address"
- ],
- [
- "u64",
- "options",
- 16
- ],
- [
- "u32",
- "vrf"
- ],
- [
- "u8",
- "is_ip4"
- ],
- [
- "u8",
- "ip",
- 16
- ],
- [
- "u16",
- "port"
- ],
- [
- "u8",
- "proto"
- ],
- [
- "u64",
- "parent_handle"
- ],
- [
- "u8",
- "hostname_len"
- ],
- [
- "u8",
- "hostname",
- 0,
- "hostname_len"
- ],
- {
- "crc": "0xd2b460ca"
- }
- ],
- [
- "connect_sock_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "app_cut_through_registration_add",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u64",
- "evt_q_address"
- ],
- [
- "u64",
- "peer_evt_q_address"
- ],
- [
- "u32",
- "wrk_index"
- ],
- [
- "u8",
- "n_fds"
- ],
- [
- "u8",
- "fd_flags"
- ],
- {
- "crc": "0x6d73b1b9"
- }
- ],
- [
- "app_cut_through_registration_add_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "app_worker_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "app_index"
- ],
- [
- "u32",
- "wrk_index"
- ],
- [
- "u8",
- "is_add"
- ],
- {
- "crc": "0x6d2b2279"
- }
- ],
- [
- "app_worker_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "wrk_index"
- ],
- [
- "u64",
- "app_event_queue_address"
- ],
- [
- "u8",
- "n_fds"
- ],
- [
- "u8",
- "fd_flags"
- ],
- [
- "u8",
- "segment_name_length"
- ],
- [
- "u8",
- "segment_name",
- 128
- ],
- [
- "u64",
- "segment_handle"
- ],
- [
- "u8",
- "is_add"
- ],
- {
- "crc": "0x56b21abc"
- }
- ],
- [
- "session_enable_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_enable"
- ],
- {
- "crc": "0x30ac9be7"
- }
- ],
- [
- "session_enable_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "app_namespace_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u64",
- "secret"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u32",
- "ip4_fib_id"
- ],
- [
- "u32",
- "ip6_fib_id"
- ],
- [
- "u8",
- "namespace_id_len"
- ],
- [
- "u8",
- "namespace_id",
- 64
- ],
- {
- "crc": "0xdd074c65"
- }
- ],
- [
- "app_namespace_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "appns_index"
- ],
- {
- "crc": "0x85137120"
- }
- ],
- [
- "session_rule_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "transport_proto"
- ],
- [
- "u8",
- "is_ip4"
- ],
- [
- "u8",
- "lcl_ip",
- 16
- ],
- [
- "u8",
- "lcl_plen"
- ],
- [
- "u8",
- "rmt_ip",
- 16
- ],
- [
- "u8",
- "rmt_plen"
- ],
- [
- "u16",
- "lcl_port"
- ],
- [
- "u16",
- "rmt_port"
- ],
- [
- "u32",
- "action_index"
- ],
- [
- "u8",
- "is_add"
- ],
- [
- "u32",
- "appns_index"
- ],
- [
- "u8",
- "scope"
- ],
- [
- "u8",
- "tag",
- 64
- ],
- {
- "crc": "0x4ab2eb06"
- }
- ],
- [
- "session_rule_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "session_rules_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "session_rules_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "transport_proto"
- ],
- [
- "u8",
- "is_ip4"
- ],
- [
- "u8",
- "lcl_ip",
- 16
- ],
- [
- "u8",
- "lcl_plen"
- ],
- [
- "u8",
- "rmt_ip",
- 16
- ],
- [
- "u8",
- "rmt_plen"
- ],
- [
- "u16",
- "lcl_port"
- ],
- [
- "u16",
- "rmt_port"
- ],
- [
- "u32",
- "action_index"
- ],
- [
- "u32",
- "appns_index"
- ],
- [
- "u8",
- "scope"
- ],
- [
- "u8",
- "tag",
- 64
- ],
- {
- "crc": "0xa52b0e96"
- }
- ]
- ],
- "unions": [],
- "enums": [],
- "services": {
- "application_attach": {
- "reply": "application_attach_reply"
- },
- "app_attach": {
- "reply": "app_attach_reply"
- },
- "app_add_cert_key_pair": {
- "reply": "app_add_cert_key_pair_reply"
- },
- "app_del_cert_key_pair": {
- "reply": "app_del_cert_key_pair_reply"
- },
- "application_tls_cert_add": {
- "reply": "application_tls_cert_add_reply"
- },
- "application_tls_key_add": {
- "reply": "application_tls_key_add_reply"
- },
- "application_detach": {
- "reply": "application_detach_reply"
- },
- "map_another_segment": {
- "reply": "map_another_segment_reply"
- },
- "unmap_segment": {
- "reply": "unmap_segment_reply"
- },
- "bind_uri": {
- "reply": "bind_uri_reply"
- },
- "unbind_uri": {
- "reply": "unbind_uri_reply"
- },
- "connect_uri": {
- "reply": "connect_uri_reply"
- },
- "disconnect_session": {
- "reply": "disconnect_session_reply"
- },
- "bind_sock": {
- "reply": "bind_sock_reply"
- },
- "unbind_sock": {
- "reply": "unbind_sock_reply"
- },
- "connect_sock": {
- "reply": "connect_sock_reply"
- },
- "app_cut_through_registration_add": {
- "reply": "app_cut_through_registration_add_reply"
- },
- "app_worker_add_del": {
- "reply": "app_worker_add_del_reply"
- },
- "session_enable_disable": {
- "reply": "session_enable_disable_reply"
- },
- "app_namespace_add_del": {
- "reply": "app_namespace_add_del_reply"
- },
- "session_rule_add_del": {
- "reply": "session_rule_add_del_reply"
- },
- "session_rules_dump": {
- "reply": "session_rules_details",
- "stream": true
- }
- },
- "options": {
- "version": "1.7.0"
- },
- "aliases": {},
- "vl_api_version": "0xdf888b15"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/span.api.json b/internal/testbinapi/binapi2001/.vppapi/core/span.api.json
deleted file mode 100644
index 0063d9b..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/span.api.json
+++ /dev/null
@@ -1,125 +0,0 @@
-{
- "types": [],
- "messages": [
- [
- "sw_interface_span_enable_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "sw_if_index_from"
- ],
- [
- "u32",
- "sw_if_index_to"
- ],
- [
- "u8",
- "state"
- ],
- [
- "u8",
- "is_l2"
- ],
- {
- "crc": "0x7216258d"
- }
- ],
- [
- "sw_interface_span_enable_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "sw_interface_span_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_l2"
- ],
- {
- "crc": "0x67c54650"
- }
- ],
- [
- "sw_interface_span_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "sw_if_index_from"
- ],
- [
- "u32",
- "sw_if_index_to"
- ],
- [
- "u8",
- "state"
- ],
- [
- "u8",
- "is_l2"
- ],
- {
- "crc": "0x23966371"
- }
- ]
- ],
- "unions": [],
- "enums": [],
- "services": {
- "sw_interface_span_enable_disable": {
- "reply": "sw_interface_span_enable_disable_reply"
- },
- "sw_interface_span_dump": {
- "reply": "sw_interface_span_details",
- "stream": true
- }
- },
- "options": {
- "version": "1.0.0"
- },
- "aliases": {},
- "vl_api_version": "0x10769b5"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/sr.api.json b/internal/testbinapi/binapi2001/.vppapi/core/sr.api.json
deleted file mode 100644
index 8f51656..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/sr.api.json
+++ /dev/null
@@ -1,656 +0,0 @@
-{
- "types": [
- [
- "srv6_sid",
- [
- "u8",
- "addr",
- 16
- ]
- ],
- [
- "srv6_sid_list",
- [
- "u8",
- "num_sids"
- ],
- [
- "u32",
- "weight"
- ],
- [
- "vl_api_srv6_sid_t",
- "sids",
- 16
- ]
- ],
- [
- "sr_ip6_address",
- [
- "u8",
- "data",
- 16
- ]
- ]
- ],
- "messages": [
- [
- "sr_localsid_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_del"
- ],
- [
- "vl_api_srv6_sid_t",
- "localsid"
- ],
- [
- "u8",
- "end_psp"
- ],
- [
- "u8",
- "behavior"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u32",
- "vlan_index"
- ],
- [
- "u32",
- "fib_table"
- ],
- [
- "u8",
- "nh_addr6",
- 16
- ],
- [
- "u8",
- "nh_addr4",
- 4
- ],
- {
- "crc": "0xb30489eb"
- }
- ],
- [
- "sr_localsid_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "sr_policy_add",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "bsid_addr",
- 16
- ],
- [
- "u32",
- "weight"
- ],
- [
- "u8",
- "is_encap"
- ],
- [
- "u8",
- "type"
- ],
- [
- "u32",
- "fib_table"
- ],
- [
- "vl_api_srv6_sid_list_t",
- "sids"
- ],
- {
- "crc": "0x4b6e2484"
- }
- ],
- [
- "sr_policy_add_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "sr_policy_mod",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "bsid_addr",
- 16
- ],
- [
- "u32",
- "sr_policy_index"
- ],
- [
- "u32",
- "fib_table"
- ],
- [
- "u8",
- "operation"
- ],
- [
- "u32",
- "sl_index"
- ],
- [
- "u32",
- "weight"
- ],
- [
- "vl_api_srv6_sid_list_t",
- "sids"
- ],
- {
- "crc": "0xc1dfaee0"
- }
- ],
- [
- "sr_policy_mod_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "sr_policy_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_srv6_sid_t",
- "bsid_addr"
- ],
- [
- "u32",
- "sr_policy_index"
- ],
- {
- "crc": "0xe4133171"
- }
- ],
- [
- "sr_policy_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "sr_set_encap_source",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "encaps_source",
- 16
- ],
- {
- "crc": "0xd05bb4de"
- }
- ],
- [
- "sr_set_encap_source_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "sr_set_encap_hop_limit",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "hop_limit"
- ],
- {
- "crc": "0xaa75d7d0"
- }
- ],
- [
- "sr_set_encap_hop_limit_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "sr_steering_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_del"
- ],
- [
- "u8",
- "bsid_addr",
- 16
- ],
- [
- "u32",
- "sr_policy_index"
- ],
- [
- "u32",
- "table_id"
- ],
- [
- "u8",
- "prefix_addr",
- 16
- ],
- [
- "u32",
- "mask_width"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u8",
- "traffic_type"
- ],
- {
- "crc": "0x28b5dcab"
- }
- ],
- [
- "sr_steering_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "sr_localsids_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "sr_localsids_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_srv6_sid_t",
- "addr"
- ],
- [
- "u8",
- "end_psp"
- ],
- [
- "u16",
- "behavior"
- ],
- [
- "u32",
- "fib_table"
- ],
- [
- "u32",
- "vlan_index"
- ],
- [
- "u8",
- "xconnect_nh_addr6",
- 16
- ],
- [
- "u8",
- "xconnect_nh_addr4",
- 4
- ],
- [
- "u32",
- "xconnect_iface_or_vrf_table"
- ],
- {
- "crc": "0x0791babc"
- }
- ],
- [
- "sr_policies_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "sr_policies_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_srv6_sid_t",
- "bsid"
- ],
- [
- "u8",
- "type"
- ],
- [
- "u8",
- "is_encap"
- ],
- [
- "u32",
- "fib_table"
- ],
- [
- "u8",
- "num_sid_lists"
- ],
- [
- "vl_api_srv6_sid_list_t",
- "sid_lists",
- 0,
- "num_sid_lists"
- ],
- {
- "crc": "0x5087f460"
- }
- ],
- [
- "sr_steering_pol_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "sr_steering_pol_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "traffic_type"
- ],
- [
- "u32",
- "fib_table"
- ],
- [
- "u8",
- "prefix_addr",
- 16
- ],
- [
- "u32",
- "mask_width"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- [
- "vl_api_srv6_sid_t",
- "bsid"
- ],
- {
- "crc": "0x5627d483"
- }
- ]
- ],
- "unions": [],
- "enums": [],
- "services": {
- "sr_localsid_add_del": {
- "reply": "sr_localsid_add_del_reply"
- },
- "sr_policy_add": {
- "reply": "sr_policy_add_reply"
- },
- "sr_policy_mod": {
- "reply": "sr_policy_mod_reply"
- },
- "sr_policy_del": {
- "reply": "sr_policy_del_reply"
- },
- "sr_set_encap_source": {
- "reply": "sr_set_encap_source_reply"
- },
- "sr_set_encap_hop_limit": {
- "reply": "sr_set_encap_hop_limit_reply"
- },
- "sr_steering_add_del": {
- "reply": "sr_steering_add_del_reply"
- },
- "sr_localsids_dump": {
- "reply": "sr_localsids_details",
- "stream": true
- },
- "sr_policies_dump": {
- "reply": "sr_policies_details",
- "stream": true
- },
- "sr_steering_pol_dump": {
- "reply": "sr_steering_pol_details",
- "stream": true
- }
- },
- "options": {
- "version": "1.2.0"
- },
- "aliases": {},
- "vl_api_version": "0xbf277f96"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/sr_mpls.api.json b/internal/testbinapi/binapi2001/.vppapi/core/sr_mpls.api.json
deleted file mode 100644
index 6fc2497..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/sr_mpls.api.json
+++ /dev/null
@@ -1,324 +0,0 @@
-{
- "types": [],
- "messages": [
- [
- "sr_mpls_policy_add",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "bsid"
- ],
- [
- "u32",
- "weight"
- ],
- [
- "u8",
- "type"
- ],
- [
- "u8",
- "n_segments"
- ],
- [
- "u32",
- "segments",
- 0,
- "n_segments"
- ],
- {
- "crc": "0x6f5b21cc"
- }
- ],
- [
- "sr_mpls_policy_add_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "sr_mpls_policy_mod",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "bsid"
- ],
- [
- "u8",
- "operation"
- ],
- [
- "u32",
- "sl_index"
- ],
- [
- "u32",
- "weight"
- ],
- [
- "u8",
- "n_segments"
- ],
- [
- "u32",
- "segments",
- 0,
- "n_segments"
- ],
- {
- "crc": "0x09d338ac"
- }
- ],
- [
- "sr_mpls_policy_mod_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "sr_mpls_policy_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "bsid"
- ],
- {
- "crc": "0xe29d34fa"
- }
- ],
- [
- "sr_mpls_policy_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "sr_mpls_steering_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_del"
- ],
- [
- "u32",
- "bsid"
- ],
- [
- "u32",
- "table_id"
- ],
- [
- "u8",
- "prefix_addr",
- 16
- ],
- [
- "u32",
- "mask_width"
- ],
- [
- "u8",
- "traffic_type"
- ],
- [
- "u8",
- "next_hop",
- 16
- ],
- [
- "u8",
- "nh_type"
- ],
- [
- "u32",
- "color"
- ],
- [
- "u8",
- "co_bits"
- ],
- [
- "u32",
- "vpn_label"
- ],
- {
- "crc": "0x1591f94a"
- }
- ],
- [
- "sr_mpls_steering_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "sr_mpls_policy_assign_endpoint_color",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "bsid"
- ],
- [
- "u8",
- "endpoint",
- 16
- ],
- [
- "u8",
- "endpoint_type"
- ],
- [
- "u32",
- "color"
- ],
- {
- "crc": "0x6c82a6da"
- }
- ],
- [
- "sr_mpls_policy_assign_endpoint_color_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [],
- "enums": [],
- "services": {
- "sr_mpls_policy_add": {
- "reply": "sr_mpls_policy_add_reply"
- },
- "sr_mpls_policy_mod": {
- "reply": "sr_mpls_policy_mod_reply"
- },
- "sr_mpls_policy_del": {
- "reply": "sr_mpls_policy_del_reply"
- },
- "sr_mpls_steering_add_del": {
- "reply": "sr_mpls_steering_add_del_reply"
- },
- "sr_mpls_policy_assign_endpoint_color": {
- "reply": "sr_mpls_policy_assign_endpoint_color_reply"
- }
- },
- "options": {
- "version": "1.0.0"
- },
- "aliases": {},
- "vl_api_version": "0x933a0861"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/syslog.api.json b/internal/testbinapi/binapi2001/.vppapi/core/syslog.api.json
deleted file mode 100644
index 93923b5..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/syslog.api.json
+++ /dev/null
@@ -1,542 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ]
- ],
- "messages": [
- [
- "syslog_set_sender",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ip4_address_t",
- "src_address"
- ],
- [
- "vl_api_ip4_address_t",
- "collector_address"
- ],
- [
- "u16",
- "collector_port"
- ],
- [
- "u32",
- "vrf_id"
- ],
- [
- "u32",
- "max_msg_size"
- ],
- {
- "crc": "0xbb641285"
- }
- ],
- [
- "syslog_set_sender_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "syslog_get_sender",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "syslog_get_sender_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "vl_api_ip4_address_t",
- "src_address"
- ],
- [
- "vl_api_ip4_address_t",
- "collector_address"
- ],
- [
- "u16",
- "collector_port"
- ],
- [
- "u32",
- "vrf_id"
- ],
- [
- "u32",
- "max_msg_size"
- ],
- {
- "crc": "0xd3da60ac"
- }
- ],
- [
- "syslog_set_filter",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_syslog_severity_t",
- "severity"
- ],
- {
- "crc": "0x571348c3"
- }
- ],
- [
- "syslog_set_filter_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "syslog_get_filter",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "syslog_get_filter_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "vl_api_syslog_severity_t",
- "severity"
- ],
- {
- "crc": "0xeb1833f8"
- }
- ]
- ],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "syslog_severity",
- [
- "SYSLOG_API_SEVERITY_EMERG",
- 0
- ],
- [
- "SYSLOG_API_SEVERITY_ALERT",
- 1
- ],
- [
- "SYSLOG_API_SEVERITY_CRIT",
- 2
- ],
- [
- "SYSLOG_API_SEVERITY_ERR",
- 3
- ],
- [
- "SYSLOG_API_SEVERITY_WARN",
- 4
- ],
- [
- "SYSLOG_API_SEVERITY_NOTICE",
- 5
- ],
- [
- "SYSLOG_API_SEVERITY_INFO",
- 6
- ],
- [
- "SYSLOG_API_SEVERITY_DBG",
- 7
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "syslog_set_sender": {
- "reply": "syslog_set_sender_reply"
- },
- "syslog_get_sender": {
- "reply": "syslog_get_sender_reply"
- },
- "syslog_set_filter": {
- "reply": "syslog_set_filter_reply"
- },
- "syslog_get_filter": {
- "reply": "syslog_get_filter_reply"
- }
- },
- "options": {
- "version": "1.0.0"
- },
- "aliases": {
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- }
- },
- "vl_api_version": "0xb0790f43"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/tapv2.api.json b/internal/testbinapi/binapi2001/.vppapi/core/tapv2.api.json
deleted file mode 100644
index c36b943..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/tapv2.api.json
+++ /dev/null
@@ -1,775 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ]
- ],
- "messages": [
- [
- "tap_create_v2",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "id",
- {
- "default": 4294967295
- }
- ],
- [
- "bool",
- "use_random_mac",
- {
- "default": "true"
- }
- ],
- [
- "vl_api_mac_address_t",
- "mac_address"
- ],
- [
- "u8",
- "num_rx_queues",
- {
- "default": 1
- }
- ],
- [
- "u16",
- "tx_ring_sz"
- ],
- [
- "u16",
- "rx_ring_sz"
- ],
- [
- "bool",
- "host_mtu_set"
- ],
- [
- "u32",
- "host_mtu_size"
- ],
- [
- "bool",
- "host_mac_addr_set"
- ],
- [
- "vl_api_mac_address_t",
- "host_mac_addr"
- ],
- [
- "bool",
- "host_ip4_prefix_set"
- ],
- [
- "vl_api_ip4_address_with_prefix_t",
- "host_ip4_prefix"
- ],
- [
- "bool",
- "host_ip6_prefix_set"
- ],
- [
- "vl_api_ip6_address_with_prefix_t",
- "host_ip6_prefix"
- ],
- [
- "bool",
- "host_ip4_gw_set"
- ],
- [
- "vl_api_ip4_address_t",
- "host_ip4_gw"
- ],
- [
- "bool",
- "host_ip6_gw_set"
- ],
- [
- "vl_api_ip6_address_t",
- "host_ip6_gw"
- ],
- [
- "vl_api_tap_flags_t",
- "tap_flags"
- ],
- [
- "bool",
- "host_namespace_set"
- ],
- [
- "string",
- "host_namespace",
- 64
- ],
- [
- "bool",
- "host_if_name_set"
- ],
- [
- "string",
- "host_if_name",
- 64
- ],
- [
- "bool",
- "host_bridge_set"
- ],
- [
- "string",
- "host_bridge",
- 64
- ],
- [
- "string",
- "tag",
- 0
- ],
- {
- "crc": "0x445835fd"
- }
- ],
- [
- "tap_create_v2_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0x5383d31f"
- }
- ],
- [
- "tap_delete_v2",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0xf9e6675e"
- }
- ],
- [
- "tap_delete_v2_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "sw_interface_tap_v2_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index",
- {
- "default": 4294967295
- }
- ],
- {
- "crc": "0xf9e6675e"
- }
- ],
- [
- "sw_interface_tap_v2_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u32",
- "id"
- ],
- [
- "u16",
- "tx_ring_sz"
- ],
- [
- "u16",
- "rx_ring_sz"
- ],
- [
- "u32",
- "host_mtu_size"
- ],
- [
- "vl_api_mac_address_t",
- "host_mac_addr"
- ],
- [
- "vl_api_ip4_address_with_prefix_t",
- "host_ip4_prefix"
- ],
- [
- "vl_api_ip6_address_with_prefix_t",
- "host_ip6_prefix"
- ],
- [
- "vl_api_tap_flags_t",
- "tap_flags"
- ],
- [
- "string",
- "dev_name",
- 64
- ],
- [
- "string",
- "host_if_name",
- 64
- ],
- [
- "string",
- "host_namespace",
- 64
- ],
- [
- "string",
- "host_bridge",
- 64
- ],
- {
- "crc": "0xe53c16de"
- }
- ]
- ],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "tap_flags",
- [
- "TAP_FLAG_GSO",
- 1
- ],
- [
- "TAP_FLAG_CSUM_OFFLOAD",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "tap_create_v2": {
- "reply": "tap_create_v2_reply"
- },
- "tap_delete_v2": {
- "reply": "tap_delete_v2_reply"
- },
- "sw_interface_tap_v2_dump": {
- "reply": "sw_interface_tap_v2_details",
- "stream": true
- }
- },
- "options": {
- "version": "3.0.0"
- },
- "aliases": {
- "interface_index": {
- "type": "u32"
- },
- "mac_address": {
- "type": "u8",
- "length": 6
- },
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- }
- },
- "vl_api_version": "0x7d58f9a4"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/tcp.api.json b/internal/testbinapi/binapi2001/.vppapi/core/tcp.api.json
deleted file mode 100644
index 97223c6..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/tcp.api.json
+++ /dev/null
@@ -1,351 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ]
- ],
- "messages": [
- [
- "tcp_configure_src_addresses",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "vrf_id"
- ],
- [
- "vl_api_address_t",
- "first_address"
- ],
- [
- "vl_api_address_t",
- "last_address"
- ],
- {
- "crc": "0x4b02b946"
- }
- ],
- [
- "tcp_configure_src_addresses_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "tcp_configure_src_addresses": {
- "reply": "tcp_configure_src_addresses_reply"
- }
- },
- "options": {
- "version": "2.0.0"
- },
- "aliases": {
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- }
- },
- "vl_api_version": "0x4d731ac5"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/udp.api.json b/internal/testbinapi/binapi2001/.vppapi/core/udp.api.json
deleted file mode 100644
index 9aa3f52..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/udp.api.json
+++ /dev/null
@@ -1,457 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ],
- [
- "udp_encap",
- [
- "u32",
- "table_id"
- ],
- [
- "u16",
- "src_port"
- ],
- [
- "u16",
- "dst_port"
- ],
- [
- "vl_api_address_t",
- "src_ip"
- ],
- [
- "vl_api_address_t",
- "dst_ip"
- ],
- [
- "u32",
- "id"
- ]
- ]
- ],
- "messages": [
- [
- "udp_encap_add",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_udp_encap_t",
- "udp_encap"
- ],
- {
- "crc": "0x61d5fc48"
- }
- ],
- [
- "udp_encap_add_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "id"
- ],
- {
- "crc": "0xe2fc8294"
- }
- ],
- [
- "udp_encap_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "id"
- ],
- {
- "crc": "0x3a91bde5"
- }
- ],
- [
- "udp_encap_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "udp_encap_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "udp_encap_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_udp_encap_t",
- "udp_encap"
- ],
- {
- "crc": "0x87c82821"
- }
- ]
- ],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "udp_encap_add": {
- "reply": "udp_encap_add_reply"
- },
- "udp_encap_del": {
- "reply": "udp_encap_del_reply"
- },
- "udp_encap_dump": {
- "reply": "udp_encap_details",
- "stream": true
- }
- },
- "options": {
- "version": "1.1.0"
- },
- "aliases": {
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- }
- },
- "vl_api_version": "0xa6b4c475"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/vhost_user.api.json b/internal/testbinapi/binapi2001/.vppapi/core/vhost_user.api.json
deleted file mode 100644
index 839ade2..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/vhost_user.api.json
+++ /dev/null
@@ -1,528 +0,0 @@
-{
- "types": [],
- "messages": [
- [
- "create_vhost_user_if",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_server"
- ],
- [
- "string",
- "sock_filename",
- 256
- ],
- [
- "bool",
- "renumber"
- ],
- [
- "bool",
- "disable_mrg_rxbuf"
- ],
- [
- "bool",
- "disable_indirect_desc"
- ],
- [
- "bool",
- "enable_gso"
- ],
- [
- "u32",
- "custom_dev_instance"
- ],
- [
- "bool",
- "use_custom_mac"
- ],
- [
- "vl_api_mac_address_t",
- "mac_address"
- ],
- [
- "string",
- "tag",
- 64
- ],
- {
- "crc": "0x591ee951"
- }
- ],
- [
- "create_vhost_user_if_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0x5383d31f"
- }
- ],
- [
- "modify_vhost_user_if",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "bool",
- "is_server"
- ],
- [
- "string",
- "sock_filename",
- 256
- ],
- [
- "bool",
- "renumber"
- ],
- [
- "bool",
- "enable_gso"
- ],
- [
- "u32",
- "custom_dev_instance"
- ],
- {
- "crc": "0xfcfeaf16"
- }
- ],
- [
- "modify_vhost_user_if_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "delete_vhost_user_if",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0xf9e6675e"
- }
- ],
- [
- "delete_vhost_user_if_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "sw_interface_vhost_user_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "string",
- "interface_name",
- 64
- ],
- [
- "u32",
- "virtio_net_hdr_sz"
- ],
- [
- "vl_api_virtio_net_features_first_32_t",
- "features_first_32"
- ],
- [
- "vl_api_virtio_net_features_last_32_t",
- "features_last_32"
- ],
- [
- "bool",
- "is_server"
- ],
- [
- "string",
- "sock_filename",
- 256
- ],
- [
- "u32",
- "num_regions"
- ],
- [
- "i32",
- "sock_errno"
- ],
- {
- "crc": "0x98530df1"
- }
- ],
- [
- "sw_interface_vhost_user_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index",
- {
- "default": 4294967295
- }
- ],
- {
- "crc": "0xf9e6675e"
- }
- ]
- ],
- "unions": [],
- "enums": [
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "virtio_net_features_first_32",
- [
- "VIRTIO_NET_F_API_CSUM",
- 1
- ],
- [
- "VIRTIO_NET_F_API_GUEST_CSUM",
- 2
- ],
- [
- "VIRTIO_NET_F_API_GUEST_TSO4",
- 128
- ],
- [
- "VIRTIO_NET_F_API_GUEST_TSO6",
- 256
- ],
- [
- "VIRTIO_NET_F_API_GUEST_UFO",
- 1024
- ],
- [
- "VIRTIO_NET_F_API_HOST_TSO4",
- 2048
- ],
- [
- "VIRTIO_NET_F_API_HOST_TSO6",
- 4096
- ],
- [
- "VIRTIO_NET_F_API_HOST_UFO",
- 16384
- ],
- [
- "VIRTIO_NET_F_API_MRG_RXBUF",
- 32768
- ],
- [
- "VIRTIO_NET_F_API_CTRL_VQ",
- 131072
- ],
- [
- "VIRTIO_NET_F_API_GUEST_ANNOUNCE",
- 2097152
- ],
- [
- "VIRTIO_NET_F_API_MQ",
- 4194304
- ],
- [
- "VHOST_F_API_LOG_ALL",
- 67108864
- ],
- [
- "VIRTIO_F_API_ANY_LAYOUT",
- 134217728
- ],
- [
- "VIRTIO_F_API_INDIRECT_DESC",
- 268435456
- ],
- [
- "VHOST_USER_F_API_PROTOCOL_FEATURES",
- 1073741824
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "virtio_net_features_last_32",
- [
- "VIRTIO_F_API_VERSION_1",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "create_vhost_user_if": {
- "reply": "create_vhost_user_if_reply"
- },
- "modify_vhost_user_if": {
- "reply": "modify_vhost_user_if_reply"
- },
- "delete_vhost_user_if": {
- "reply": "delete_vhost_user_if_reply"
- },
- "sw_interface_vhost_user_dump": {
- "reply": "sw_interface_vhost_user_details",
- "stream": true
- }
- },
- "options": {
- "version": "4.0.0"
- },
- "aliases": {
- "interface_index": {
- "type": "u32"
- },
- "mac_address": {
- "type": "u8",
- "length": 6
- }
- },
- "vl_api_version": "0xb547a33d"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/virtio.api.json b/internal/testbinapi/binapi2001/.vppapi/core/virtio.api.json
deleted file mode 100644
index eb3a12c..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/virtio.api.json
+++ /dev/null
@@ -1,365 +0,0 @@
-{
- "types": [
- [
- "pci_address",
- [
- "u16",
- "domain"
- ],
- [
- "u8",
- "bus"
- ],
- [
- "u8",
- "slot"
- ],
- [
- "u8",
- "function"
- ]
- ]
- ],
- "messages": [
- [
- "virtio_pci_create",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_pci_address_t",
- "pci_addr"
- ],
- [
- "bool",
- "use_random_mac"
- ],
- [
- "vl_api_mac_address_t",
- "mac_address"
- ],
- [
- "bool",
- "gso_enabled"
- ],
- [
- "bool",
- "checksum_offload_enabled"
- ],
- [
- "u64",
- "features"
- ],
- {
- "crc": "0xa9f1370c"
- }
- ],
- [
- "virtio_pci_create_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0x5383d31f"
- }
- ],
- [
- "virtio_pci_delete",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0xf9e6675e"
- }
- ],
- [
- "virtio_pci_delete_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "sw_interface_virtio_pci_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "sw_interface_virtio_pci_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "vl_api_pci_address_t",
- "pci_addr"
- ],
- [
- "vl_api_mac_address_t",
- "mac_addr"
- ],
- [
- "u16",
- "tx_ring_sz"
- ],
- [
- "u16",
- "rx_ring_sz"
- ],
- [
- "u64",
- "features"
- ],
- {
- "crc": "0x16187f3a"
- }
- ]
- ],
- "unions": [],
- "enums": [
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "virtio_pci_create": {
- "reply": "virtio_pci_create_reply"
- },
- "virtio_pci_delete": {
- "reply": "virtio_pci_delete_reply"
- },
- "sw_interface_virtio_pci_dump": {
- "reply": "sw_interface_virtio_pci_details",
- "stream": true
- }
- },
- "options": {
- "version": "2.0.0"
- },
- "aliases": {
- "interface_index": {
- "type": "u32"
- },
- "mac_address": {
- "type": "u8",
- "length": 6
- }
- },
- "vl_api_version": "0xb64fcf02"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/virtio_types.api.json b/internal/testbinapi/binapi2001/.vppapi/core/virtio_types.api.json
deleted file mode 100644
index a4cc4cf..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/virtio_types.api.json
+++ /dev/null
@@ -1,93 +0,0 @@
-{
- "types": [],
- "messages": [],
- "unions": [],
- "enums": [
- [
- "virtio_net_features_first_32",
- [
- "VIRTIO_NET_F_API_CSUM",
- 1
- ],
- [
- "VIRTIO_NET_F_API_GUEST_CSUM",
- 2
- ],
- [
- "VIRTIO_NET_F_API_GUEST_TSO4",
- 128
- ],
- [
- "VIRTIO_NET_F_API_GUEST_TSO6",
- 256
- ],
- [
- "VIRTIO_NET_F_API_GUEST_UFO",
- 1024
- ],
- [
- "VIRTIO_NET_F_API_HOST_TSO4",
- 2048
- ],
- [
- "VIRTIO_NET_F_API_HOST_TSO6",
- 4096
- ],
- [
- "VIRTIO_NET_F_API_HOST_UFO",
- 16384
- ],
- [
- "VIRTIO_NET_F_API_MRG_RXBUF",
- 32768
- ],
- [
- "VIRTIO_NET_F_API_CTRL_VQ",
- 131072
- ],
- [
- "VIRTIO_NET_F_API_GUEST_ANNOUNCE",
- 2097152
- ],
- [
- "VIRTIO_NET_F_API_MQ",
- 4194304
- ],
- [
- "VHOST_F_API_LOG_ALL",
- 67108864
- ],
- [
- "VIRTIO_F_API_ANY_LAYOUT",
- 134217728
- ],
- [
- "VIRTIO_F_API_INDIRECT_DESC",
- 268435456
- ],
- [
- "VHOST_USER_F_API_PROTOCOL_FEATURES",
- 1073741824
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "virtio_net_features_last_32",
- [
- "VIRTIO_F_API_VERSION_1",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {},
- "options": {
- "version": "1.0.0"
- },
- "aliases": {},
- "vl_api_version": "0x7a70a44e"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/vpe.api.json b/internal/testbinapi/binapi2001/.vppapi/core/vpe.api.json
deleted file mode 100644
index ba487d2..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/vpe.api.json
+++ /dev/null
@@ -1,772 +0,0 @@
-{
- "types": [
- [
- "version",
- [
- "u32",
- "major"
- ],
- [
- "u32",
- "minor"
- ],
- [
- "u32",
- "patch"
- ],
- [
- "u8",
- "pre_release",
- 17
- ],
- [
- "u8",
- "build_metadata",
- 17
- ]
- ],
- [
- "thread_data",
- [
- "u32",
- "id"
- ],
- [
- "u8",
- "name",
- 64
- ],
- [
- "u8",
- "type",
- 64
- ],
- [
- "u32",
- "pid"
- ],
- [
- "u32",
- "cpu_id"
- ],
- [
- "u32",
- "core"
- ],
- [
- "u32",
- "cpu_socket"
- ]
- ]
- ],
- "messages": [
- [
- "control_ping",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "control_ping_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "vpe_pid"
- ],
- {
- "crc": "0xf6b0b8ca"
- }
- ],
- [
- "cli",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u64",
- "cmd_in_shmem"
- ],
- {
- "crc": "0x23bfbfff"
- }
- ],
- [
- "cli_inband",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "string",
- "cmd",
- 0
- ],
- {
- "crc": "0xf8377302"
- }
- ],
- [
- "cli_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u64",
- "reply_in_shmem"
- ],
- {
- "crc": "0x06d68297"
- }
- ],
- [
- "cli_inband_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "string",
- "reply",
- 0
- ],
- {
- "crc": "0x05879051"
- }
- ],
- [
- "get_node_index",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "node_name",
- 64
- ],
- {
- "crc": "0x6c9a495d"
- }
- ],
- [
- "get_node_index_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "node_index"
- ],
- {
- "crc": "0xa8600b89"
- }
- ],
- [
- "add_node_next",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "node_name",
- 64
- ],
- [
- "u8",
- "next_name",
- 64
- ],
- {
- "crc": "0x9ab92f7a"
- }
- ],
- [
- "add_node_next_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "next_index"
- ],
- {
- "crc": "0x2ed75f32"
- }
- ],
- [
- "show_version",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "show_version_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "string",
- "program",
- 32
- ],
- [
- "string",
- "version",
- 32
- ],
- [
- "string",
- "build_date",
- 32
- ],
- [
- "string",
- "build_directory",
- 256
- ],
- {
- "crc": "0xc919bde1"
- }
- ],
- [
- "show_threads",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "show_threads_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "count"
- ],
- [
- "vl_api_thread_data_t",
- "thread_data",
- 0,
- "count"
- ],
- {
- "crc": "0xf5e0b66f"
- }
- ],
- [
- "get_node_graph",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "get_node_graph_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u64",
- "reply_in_shmem"
- ],
- {
- "crc": "0x06d68297"
- }
- ],
- [
- "get_next_index",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "node_name",
- 64
- ],
- [
- "u8",
- "next_name",
- 64
- ],
- {
- "crc": "0x9ab92f7a"
- }
- ],
- [
- "get_next_index_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "next_index"
- ],
- {
- "crc": "0x2ed75f32"
- }
- ],
- [
- "log_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_timestamp_t",
- "start_timestamp"
- ],
- {
- "crc": "0x6ab31753"
- }
- ],
- [
- "log_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_timestamp_t",
- "timestamp"
- ],
- [
- "vl_api_log_level_t",
- "level"
- ],
- [
- "string",
- "msg_class",
- 32
- ],
- [
- "string",
- "message",
- 256
- ],
- {
- "crc": "0x255827a1"
- }
- ],
- [
- "show_vpe_system_time",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "show_vpe_system_time_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "vl_api_timestamp_t",
- "vpe_system_time"
- ],
- {
- "crc": "0x7ffd8193"
- }
- ],
- [
- "get_f64_endian_value",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "f64",
- "f64_one",
- {
- "default": 1.0
- }
- ],
- {
- "crc": "0x809fcd44"
- }
- ],
- [
- "get_f64_endian_value_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "retval"
- ],
- [
- "f64",
- "f64_one_result"
- ],
- {
- "crc": "0x7e02e404"
- }
- ],
- [
- "get_f64_increment_by_one",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "f64",
- "f64_value",
- {
- "default": 1.0
- }
- ],
- {
- "crc": "0xb64f027e"
- }
- ],
- [
- "get_f64_increment_by_one_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "retval"
- ],
- [
- "f64",
- "f64_value"
- ],
- {
- "crc": "0xd25dbaa3"
- }
- ]
- ],
- "unions": [],
- "enums": [
- [
- "log_level",
- [
- "VPE_API_LOG_LEVEL_EMERG",
- 0
- ],
- [
- "VPE_API_LOG_LEVEL_ALERT",
- 1
- ],
- [
- "VPE_API_LOG_LEVEL_CRIT",
- 2
- ],
- [
- "VPE_API_LOG_LEVEL_ERR",
- 3
- ],
- [
- "VPE_API_LOG_LEVEL_WARNING",
- 4
- ],
- [
- "VPE_API_LOG_LEVEL_NOTICE",
- 5
- ],
- [
- "VPE_API_LOG_LEVEL_INFO",
- 6
- ],
- [
- "VPE_API_LOG_LEVEL_DEBUG",
- 7
- ],
- [
- "VPE_API_LOG_LEVEL_DISABLED",
- 8
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "control_ping": {
- "reply": "control_ping_reply"
- },
- "cli": {
- "reply": "cli_reply"
- },
- "cli_inband": {
- "reply": "cli_inband_reply"
- },
- "get_node_index": {
- "reply": "get_node_index_reply"
- },
- "add_node_next": {
- "reply": "add_node_next_reply"
- },
- "show_version": {
- "reply": "show_version_reply"
- },
- "show_threads": {
- "reply": "show_threads_reply"
- },
- "get_node_graph": {
- "reply": "get_node_graph_reply"
- },
- "get_next_index": {
- "reply": "get_next_index_reply"
- },
- "log_dump": {
- "reply": "log_details",
- "stream": true
- },
- "show_vpe_system_time": {
- "reply": "show_vpe_system_time_reply"
- },
- "get_f64_endian_value": {
- "reply": "get_f64_endian_value_reply"
- },
- "get_f64_increment_by_one": {
- "reply": "get_f64_increment_by_one_reply"
- }
- },
- "options": {
- "version": "1.6.0"
- },
- "aliases": {
- "timestamp": {
- "type": "f64"
- },
- "timedelta": {
- "type": "f64"
- }
- },
- "vl_api_version": "0xc6c0bcf6"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/vpe_types.api.json b/internal/testbinapi/binapi2001/.vppapi/core/vpe_types.api.json
deleted file mode 100644
index 5463cc4..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/vpe_types.api.json
+++ /dev/null
@@ -1,86 +0,0 @@
-{
- "types": [
- [
- "version",
- [
- "u32",
- "major"
- ],
- [
- "u32",
- "minor"
- ],
- [
- "u32",
- "patch"
- ],
- [
- "u8",
- "pre_release",
- 17
- ],
- [
- "u8",
- "build_metadata",
- 17
- ]
- ]
- ],
- "messages": [],
- "unions": [],
- "enums": [
- [
- "log_level",
- [
- "VPE_API_LOG_LEVEL_EMERG",
- 0
- ],
- [
- "VPE_API_LOG_LEVEL_ALERT",
- 1
- ],
- [
- "VPE_API_LOG_LEVEL_CRIT",
- 2
- ],
- [
- "VPE_API_LOG_LEVEL_ERR",
- 3
- ],
- [
- "VPE_API_LOG_LEVEL_WARNING",
- 4
- ],
- [
- "VPE_API_LOG_LEVEL_NOTICE",
- 5
- ],
- [
- "VPE_API_LOG_LEVEL_INFO",
- 6
- ],
- [
- "VPE_API_LOG_LEVEL_DEBUG",
- 7
- ],
- [
- "VPE_API_LOG_LEVEL_DISABLED",
- 8
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {},
- "options": {},
- "aliases": {
- "timestamp": {
- "type": "f64"
- },
- "timedelta": {
- "type": "f64"
- }
- },
- "vl_api_version": "0x3369988d"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/vxlan.api.json b/internal/testbinapi/binapi2001/.vppapi/core/vxlan.api.json
deleted file mode 100644
index 8cdf8a7..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/vxlan.api.json
+++ /dev/null
@@ -1,275 +0,0 @@
-{
- "types": [],
- "messages": [
- [
- "vxlan_add_del_tunnel",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_add"
- ],
- [
- "u8",
- "is_ipv6"
- ],
- [
- "u32",
- "instance"
- ],
- [
- "u8",
- "src_address",
- 16
- ],
- [
- "u8",
- "dst_address",
- 16
- ],
- [
- "u32",
- "mcast_sw_if_index"
- ],
- [
- "u32",
- "encap_vrf_id"
- ],
- [
- "u32",
- "decap_next_index"
- ],
- [
- "u32",
- "vni"
- ],
- {
- "crc": "0x00f4bdd0"
- }
- ],
- [
- "vxlan_add_del_tunnel_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- {
- "crc": "0xfda5941f"
- }
- ],
- [
- "vxlan_tunnel_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- {
- "crc": "0x529cb13f"
- }
- ],
- [
- "vxlan_tunnel_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u32",
- "instance"
- ],
- [
- "u8",
- "src_address",
- 16
- ],
- [
- "u8",
- "dst_address",
- 16
- ],
- [
- "u32",
- "mcast_sw_if_index"
- ],
- [
- "u32",
- "encap_vrf_id"
- ],
- [
- "u32",
- "decap_next_index"
- ],
- [
- "u32",
- "vni"
- ],
- [
- "u8",
- "is_ipv6"
- ],
- {
- "crc": "0xce38e127"
- }
- ],
- [
- "sw_interface_set_vxlan_bypass",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u8",
- "is_ipv6"
- ],
- [
- "u8",
- "enable"
- ],
- {
- "crc": "0xe74ca095"
- }
- ],
- [
- "sw_interface_set_vxlan_bypass_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "vxlan_offload_rx",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "hw_if_index"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u8",
- "enable"
- ],
- {
- "crc": "0xf0b08786"
- }
- ],
- [
- "vxlan_offload_rx_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [],
- "enums": [],
- "services": {
- "vxlan_add_del_tunnel": {
- "reply": "vxlan_add_del_tunnel_reply"
- },
- "vxlan_tunnel_dump": {
- "reply": "vxlan_tunnel_details",
- "stream": true
- },
- "sw_interface_set_vxlan_bypass": {
- "reply": "sw_interface_set_vxlan_bypass_reply"
- },
- "vxlan_offload_rx": {
- "reply": "vxlan_offload_rx_reply"
- }
- },
- "options": {
- "version": "1.1.0"
- },
- "aliases": {},
- "vl_api_version": "0xa95aa271"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/vxlan_gbp.api.json b/internal/testbinapi/binapi2001/.vppapi/core/vxlan_gbp.api.json
deleted file mode 100644
index 52feb9b..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/vxlan_gbp.api.json
+++ /dev/null
@@ -1,656 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ],
- [
- "vxlan_gbp_tunnel",
- [
- "u32",
- "instance"
- ],
- [
- "vl_api_address_t",
- "src"
- ],
- [
- "vl_api_address_t",
- "dst"
- ],
- [
- "vl_api_interface_index_t",
- "mcast_sw_if_index"
- ],
- [
- "u32",
- "encap_table_id"
- ],
- [
- "u32",
- "vni"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "vl_api_vxlan_gbp_api_tunnel_mode_t",
- "mode"
- ]
- ]
- ],
- "messages": [
- [
- "vxlan_gbp_tunnel_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add",
- {
- "default": "true"
- }
- ],
- [
- "vl_api_vxlan_gbp_tunnel_t",
- "tunnel"
- ],
- {
- "crc": "0x8c819166"
- }
- ],
- [
- "vxlan_gbp_tunnel_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0x5383d31f"
- }
- ],
- [
- "vxlan_gbp_tunnel_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0xf9e6675e"
- }
- ],
- [
- "vxlan_gbp_tunnel_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_vxlan_gbp_tunnel_t",
- "tunnel"
- ],
- {
- "crc": "0x1da24016"
- }
- ],
- [
- "sw_interface_set_vxlan_gbp_bypass",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "bool",
- "is_ipv6"
- ],
- [
- "bool",
- "enable",
- {
- "default": "true"
- }
- ],
- {
- "crc": "0x65247409"
- }
- ],
- [
- "sw_interface_set_vxlan_gbp_bypass_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "vxlan_gbp_api_tunnel_mode",
- [
- "VXLAN_GBP_API_TUNNEL_MODE_L2",
- 1
- ],
- [
- "VXLAN_GBP_API_TUNNEL_MODE_L3",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "vxlan_gbp_tunnel_add_del": {
- "reply": "vxlan_gbp_tunnel_add_del_reply"
- },
- "vxlan_gbp_tunnel_dump": {
- "reply": "vxlan_gbp_tunnel_details",
- "stream": true
- },
- "sw_interface_set_vxlan_gbp_bypass": {
- "reply": "sw_interface_set_vxlan_gbp_bypass_reply"
- }
- },
- "options": {
- "version": "1.1.1"
- },
- "aliases": {
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- },
- "interface_index": {
- "type": "u32"
- }
- },
- "vl_api_version": "0xdc218362"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/core/vxlan_gpe.api.json b/internal/testbinapi/binapi2001/.vppapi/core/vxlan_gpe.api.json
deleted file mode 100644
index f1ff47d..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/core/vxlan_gpe.api.json
+++ /dev/null
@@ -1,224 +0,0 @@
-{
- "types": [],
- "messages": [
- [
- "vxlan_gpe_add_del_tunnel",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_ipv6"
- ],
- [
- "u8",
- "local",
- 16
- ],
- [
- "u8",
- "remote",
- 16
- ],
- [
- "u32",
- "mcast_sw_if_index"
- ],
- [
- "u32",
- "encap_vrf_id"
- ],
- [
- "u32",
- "decap_vrf_id"
- ],
- [
- "u8",
- "protocol"
- ],
- [
- "u32",
- "vni"
- ],
- [
- "u8",
- "is_add"
- ],
- {
- "crc": "0xd15850ba"
- }
- ],
- [
- "vxlan_gpe_add_del_tunnel_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- {
- "crc": "0xfda5941f"
- }
- ],
- [
- "vxlan_gpe_tunnel_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- {
- "crc": "0x529cb13f"
- }
- ],
- [
- "vxlan_gpe_tunnel_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u8",
- "local",
- 16
- ],
- [
- "u8",
- "remote",
- 16
- ],
- [
- "u32",
- "vni"
- ],
- [
- "u8",
- "protocol"
- ],
- [
- "u32",
- "mcast_sw_if_index"
- ],
- [
- "u32",
- "encap_vrf_id"
- ],
- [
- "u32",
- "decap_vrf_id"
- ],
- [
- "u8",
- "is_ipv6"
- ],
- {
- "crc": "0x2673fbfa"
- }
- ],
- [
- "sw_interface_set_vxlan_gpe_bypass",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u8",
- "is_ipv6"
- ],
- [
- "u8",
- "enable"
- ],
- {
- "crc": "0xe74ca095"
- }
- ],
- [
- "sw_interface_set_vxlan_gpe_bypass_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [],
- "enums": [],
- "services": {
- "vxlan_gpe_add_del_tunnel": {
- "reply": "vxlan_gpe_add_del_tunnel_reply"
- },
- "vxlan_gpe_tunnel_dump": {
- "reply": "vxlan_gpe_tunnel_details",
- "stream": true
- },
- "sw_interface_set_vxlan_gpe_bypass": {
- "reply": "sw_interface_set_vxlan_gpe_bypass_reply"
- }
- },
- "options": {
- "version": "1.0.0"
- },
- "aliases": {},
- "vl_api_version": "0x25bfb55d"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/abf.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/abf.api.json
deleted file mode 100644
index 3f6f1e2..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/abf.api.json
+++ /dev/null
@@ -1,1161 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ],
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ],
- [
- "fib_mpls_label",
- [
- "u8",
- "is_uniform"
- ],
- [
- "u32",
- "label"
- ],
- [
- "u8",
- "ttl"
- ],
- [
- "u8",
- "exp"
- ]
- ],
- [
- "fib_path_nh",
- [
- "vl_api_address_union_t",
- "address"
- ],
- [
- "u32",
- "via_label"
- ],
- [
- "u32",
- "obj_id"
- ],
- [
- "u32",
- "classify_table_index"
- ]
- ],
- [
- "fib_path",
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u32",
- "table_id"
- ],
- [
- "u32",
- "rpf_id"
- ],
- [
- "u8",
- "weight"
- ],
- [
- "u8",
- "preference"
- ],
- [
- "vl_api_fib_path_type_t",
- "type"
- ],
- [
- "vl_api_fib_path_flags_t",
- "flags"
- ],
- [
- "vl_api_fib_path_nh_proto_t",
- "proto"
- ],
- [
- "vl_api_fib_path_nh_t",
- "nh"
- ],
- [
- "u8",
- "n_labels"
- ],
- [
- "vl_api_fib_mpls_label_t",
- "label_stack",
- 16
- ]
- ],
- [
- "abf_policy",
- [
- "u32",
- "policy_id"
- ],
- [
- "u32",
- "acl_index"
- ],
- [
- "u8",
- "n_paths"
- ],
- [
- "vl_api_fib_path_t",
- "paths",
- 0,
- "n_paths"
- ]
- ],
- [
- "abf_itf_attach",
- [
- "u32",
- "policy_id"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "u32",
- "priority"
- ],
- [
- "bool",
- "is_ipv6"
- ]
- ]
- ],
- "messages": [
- [
- "abf_plugin_get_version",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "abf_plugin_get_version_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "major"
- ],
- [
- "u32",
- "minor"
- ],
- {
- "crc": "0x9b32cf86"
- }
- ],
- [
- "abf_policy_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "vl_api_abf_policy_t",
- "policy"
- ],
- {
- "crc": "0xee66f93e"
- }
- ],
- [
- "abf_policy_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "abf_policy_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_abf_policy_t",
- "policy"
- ],
- {
- "crc": "0x6769e504"
- }
- ],
- [
- "abf_policy_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "abf_itf_attach_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "vl_api_abf_itf_attach_t",
- "attach"
- ],
- {
- "crc": "0x25c8621b"
- }
- ],
- [
- "abf_itf_attach_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "abf_itf_attach_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_abf_itf_attach_t",
- "attach"
- ],
- {
- "crc": "0x7819523e"
- }
- ],
- [
- "abf_itf_attach_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ]
- ],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ],
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "fib_path_nh_proto",
- [
- "FIB_API_PATH_NH_PROTO_IP4",
- 0
- ],
- [
- "FIB_API_PATH_NH_PROTO_IP6",
- 1
- ],
- [
- "FIB_API_PATH_NH_PROTO_MPLS",
- 2
- ],
- [
- "FIB_API_PATH_NH_PROTO_ETHERNET",
- 3
- ],
- [
- "FIB_API_PATH_NH_PROTO_BIER",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "fib_path_flags",
- [
- "FIB_API_PATH_FLAG_NONE",
- 0
- ],
- [
- "FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED",
- 1
- ],
- [
- "FIB_API_PATH_FLAG_RESOLVE_VIA_HOST",
- 2
- ],
- [
- "FIB_API_PATH_FLAG_POP_PW_CW",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "fib_path_type",
- [
- "FIB_API_PATH_TYPE_NORMAL",
- 0
- ],
- [
- "FIB_API_PATH_TYPE_LOCAL",
- 1
- ],
- [
- "FIB_API_PATH_TYPE_DROP",
- 2
- ],
- [
- "FIB_API_PATH_TYPE_UDP_ENCAP",
- 3
- ],
- [
- "FIB_API_PATH_TYPE_BIER_IMP",
- 4
- ],
- [
- "FIB_API_PATH_TYPE_ICMP_UNREACH",
- 5
- ],
- [
- "FIB_API_PATH_TYPE_ICMP_PROHIBIT",
- 6
- ],
- [
- "FIB_API_PATH_TYPE_SOURCE_LOOKUP",
- 7
- ],
- [
- "FIB_API_PATH_TYPE_DVR",
- 8
- ],
- [
- "FIB_API_PATH_TYPE_INTERFACE_RX",
- 9
- ],
- [
- "FIB_API_PATH_TYPE_CLASSIFY",
- 10
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "abf_plugin_get_version": {
- "reply": "abf_plugin_get_version_reply"
- },
- "abf_policy_add_del": {
- "reply": "abf_policy_add_del_reply"
- },
- "abf_policy_dump": {
- "reply": "abf_policy_details",
- "stream": true
- },
- "abf_itf_attach_add_del": {
- "reply": "abf_itf_attach_add_del_reply"
- },
- "abf_itf_attach_dump": {
- "reply": "abf_itf_attach_details",
- "stream": true
- }
- },
- "options": {
- "version": "1.0.0"
- },
- "aliases": {
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- },
- "interface_index": {
- "type": "u32"
- }
- },
- "vl_api_version": "0xc2e5c644"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/acl.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/acl.api.json
deleted file mode 100644
index eeb7f10..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/acl.api.json
+++ /dev/null
@@ -1,1095 +0,0 @@
-{
- "types": [
- [
- "acl_rule",
- [
- "u8",
- "is_permit"
- ],
- [
- "u8",
- "is_ipv6"
- ],
- [
- "u8",
- "src_ip_addr",
- 16
- ],
- [
- "u8",
- "src_ip_prefix_len"
- ],
- [
- "u8",
- "dst_ip_addr",
- 16
- ],
- [
- "u8",
- "dst_ip_prefix_len"
- ],
- [
- "u8",
- "proto"
- ],
- [
- "u16",
- "srcport_or_icmptype_first"
- ],
- [
- "u16",
- "srcport_or_icmptype_last"
- ],
- [
- "u16",
- "dstport_or_icmpcode_first"
- ],
- [
- "u16",
- "dstport_or_icmpcode_last"
- ],
- [
- "u8",
- "tcp_flags_mask"
- ],
- [
- "u8",
- "tcp_flags_value"
- ]
- ],
- [
- "macip_acl_rule",
- [
- "u8",
- "is_permit"
- ],
- [
- "u8",
- "is_ipv6"
- ],
- [
- "u8",
- "src_mac",
- 6
- ],
- [
- "u8",
- "src_mac_mask",
- 6
- ],
- [
- "u8",
- "src_ip_addr",
- 16
- ],
- [
- "u8",
- "src_ip_prefix_len"
- ]
- ]
- ],
- "messages": [
- [
- "acl_plugin_get_version",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "acl_plugin_get_version_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "major"
- ],
- [
- "u32",
- "minor"
- ],
- {
- "crc": "0x9b32cf86"
- }
- ],
- [
- "acl_plugin_control_ping",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "acl_plugin_control_ping_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "vpe_pid"
- ],
- {
- "crc": "0xf6b0b8ca"
- }
- ],
- [
- "acl_plugin_get_conn_table_max_entries",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "acl_plugin_get_conn_table_max_entries_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u64",
- "conn_table_max_entries"
- ],
- {
- "crc": "0x7a096d3d"
- }
- ],
- [
- "acl_add_replace",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "acl_index"
- ],
- [
- "u8",
- "tag",
- 64
- ],
- [
- "u32",
- "count"
- ],
- [
- "vl_api_acl_rule_t",
- "r",
- 0,
- "count"
- ],
- {
- "crc": "0x13bc8539"
- }
- ],
- [
- "acl_add_replace_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "acl_index"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xac407b0c"
- }
- ],
- [
- "acl_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "acl_index"
- ],
- {
- "crc": "0xef34fea4"
- }
- ],
- [
- "acl_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "acl_interface_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_add"
- ],
- [
- "u8",
- "is_input"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u32",
- "acl_index"
- ],
- {
- "crc": "0x0b2aedd1"
- }
- ],
- [
- "acl_interface_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "acl_interface_set_acl_list",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u8",
- "count"
- ],
- [
- "u8",
- "n_input"
- ],
- [
- "u32",
- "acls",
- 0,
- "count"
- ],
- {
- "crc": "0x8baece38"
- }
- ],
- [
- "acl_interface_set_acl_list_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "acl_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "acl_index"
- ],
- {
- "crc": "0xef34fea4"
- }
- ],
- [
- "acl_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "acl_index"
- ],
- [
- "u8",
- "tag",
- 64
- ],
- [
- "u32",
- "count"
- ],
- [
- "vl_api_acl_rule_t",
- "r",
- 0,
- "count"
- ],
- {
- "crc": "0xf89d7a88"
- }
- ],
- [
- "acl_interface_list_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- {
- "crc": "0x529cb13f"
- }
- ],
- [
- "acl_interface_list_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u8",
- "count"
- ],
- [
- "u8",
- "n_input"
- ],
- [
- "u32",
- "acls",
- 0,
- "count"
- ],
- {
- "crc": "0xd5e80809"
- }
- ],
- [
- "macip_acl_add",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "tag",
- 64
- ],
- [
- "u32",
- "count"
- ],
- [
- "vl_api_macip_acl_rule_t",
- "r",
- 0,
- "count"
- ],
- {
- "crc": "0x0c680ca5"
- }
- ],
- [
- "macip_acl_add_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "acl_index"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xac407b0c"
- }
- ],
- [
- "macip_acl_add_replace",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "acl_index"
- ],
- [
- "u8",
- "tag",
- 64
- ],
- [
- "u32",
- "count"
- ],
- [
- "vl_api_macip_acl_rule_t",
- "r",
- 0,
- "count"
- ],
- {
- "crc": "0xd3d313e7"
- }
- ],
- [
- "macip_acl_add_replace_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "acl_index"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xac407b0c"
- }
- ],
- [
- "macip_acl_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "acl_index"
- ],
- {
- "crc": "0xef34fea4"
- }
- ],
- [
- "macip_acl_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "macip_acl_interface_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_add"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u32",
- "acl_index"
- ],
- {
- "crc": "0x6a6be97c"
- }
- ],
- [
- "macip_acl_interface_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "macip_acl_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "acl_index"
- ],
- {
- "crc": "0xef34fea4"
- }
- ],
- [
- "macip_acl_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "acl_index"
- ],
- [
- "u8",
- "tag",
- 64
- ],
- [
- "u32",
- "count"
- ],
- [
- "vl_api_macip_acl_rule_t",
- "r",
- 0,
- "count"
- ],
- {
- "crc": "0xe164e69a"
- }
- ],
- [
- "macip_acl_interface_get",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "macip_acl_interface_get_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "count"
- ],
- [
- "u32",
- "acls",
- 0,
- "count"
- ],
- {
- "crc": "0xaccf9b05"
- }
- ],
- [
- "macip_acl_interface_list_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- {
- "crc": "0x529cb13f"
- }
- ],
- [
- "macip_acl_interface_list_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u8",
- "count"
- ],
- [
- "u32",
- "acls",
- 0,
- "count"
- ],
- {
- "crc": "0x29783fa0"
- }
- ],
- [
- "acl_interface_set_etype_whitelist",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u8",
- "count"
- ],
- [
- "u8",
- "n_input"
- ],
- [
- "u16",
- "whitelist",
- 0,
- "count"
- ],
- {
- "crc": "0xf515efc5"
- }
- ],
- [
- "acl_interface_set_etype_whitelist_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "acl_interface_etype_whitelist_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- {
- "crc": "0x529cb13f"
- }
- ],
- [
- "acl_interface_etype_whitelist_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u8",
- "count"
- ],
- [
- "u8",
- "n_input"
- ],
- [
- "u16",
- "whitelist",
- 0,
- "count"
- ],
- {
- "crc": "0x6a5d4e81"
- }
- ],
- [
- "acl_stats_intf_counters_enable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "enable"
- ],
- {
- "crc": "0xb3e225d2"
- }
- ],
- [
- "acl_stats_intf_counters_enable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [],
- "enums": [],
- "services": {
- "acl_plugin_get_version": {
- "reply": "acl_plugin_get_version_reply"
- },
- "acl_plugin_control_ping": {
- "reply": "acl_plugin_control_ping_reply"
- },
- "acl_plugin_get_conn_table_max_entries": {
- "reply": "acl_plugin_get_conn_table_max_entries_reply"
- },
- "acl_add_replace": {
- "reply": "acl_add_replace_reply"
- },
- "acl_del": {
- "reply": "acl_del_reply"
- },
- "acl_interface_add_del": {
- "reply": "acl_interface_add_del_reply"
- },
- "acl_interface_set_acl_list": {
- "reply": "acl_interface_set_acl_list_reply"
- },
- "acl_dump": {
- "reply": "acl_details",
- "stream": true
- },
- "acl_interface_list_dump": {
- "reply": "acl_interface_list_details",
- "stream": true
- },
- "macip_acl_add": {
- "reply": "macip_acl_add_reply"
- },
- "macip_acl_add_replace": {
- "reply": "macip_acl_add_replace_reply"
- },
- "macip_acl_del": {
- "reply": "macip_acl_del_reply"
- },
- "macip_acl_interface_add_del": {
- "reply": "macip_acl_interface_add_del_reply"
- },
- "macip_acl_dump": {
- "reply": "macip_acl_details",
- "stream": true
- },
- "macip_acl_interface_get": {
- "reply": "macip_acl_interface_get_reply"
- },
- "macip_acl_interface_list_dump": {
- "reply": "macip_acl_interface_list_details",
- "stream": true
- },
- "acl_interface_set_etype_whitelist": {
- "reply": "acl_interface_set_etype_whitelist_reply"
- },
- "acl_interface_etype_whitelist_dump": {
- "reply": "acl_interface_etype_whitelist_details",
- "stream": true
- },
- "acl_stats_intf_counters_enable": {
- "reply": "acl_stats_intf_counters_enable_reply"
- }
- },
- "options": {
- "version": "1.0.1"
- },
- "aliases": {},
- "vl_api_version": "0x11c5c1e5"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/acl_types.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/acl_types.api.json
deleted file mode 100644
index b82a43e..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/acl_types.api.json
+++ /dev/null
@@ -1,98 +0,0 @@
-{
- "types": [
- [
- "acl_rule",
- [
- "u8",
- "is_permit"
- ],
- [
- "u8",
- "is_ipv6"
- ],
- [
- "u8",
- "src_ip_addr",
- 16
- ],
- [
- "u8",
- "src_ip_prefix_len"
- ],
- [
- "u8",
- "dst_ip_addr",
- 16
- ],
- [
- "u8",
- "dst_ip_prefix_len"
- ],
- [
- "u8",
- "proto"
- ],
- [
- "u16",
- "srcport_or_icmptype_first"
- ],
- [
- "u16",
- "srcport_or_icmptype_last"
- ],
- [
- "u16",
- "dstport_or_icmpcode_first"
- ],
- [
- "u16",
- "dstport_or_icmpcode_last"
- ],
- [
- "u8",
- "tcp_flags_mask"
- ],
- [
- "u8",
- "tcp_flags_value"
- ]
- ],
- [
- "macip_acl_rule",
- [
- "u8",
- "is_permit"
- ],
- [
- "u8",
- "is_ipv6"
- ],
- [
- "u8",
- "src_mac",
- 6
- ],
- [
- "u8",
- "src_mac_mask",
- 6
- ],
- [
- "u8",
- "src_ip_addr",
- 16
- ],
- [
- "u8",
- "src_ip_prefix_len"
- ]
- ]
- ],
- "messages": [],
- "unions": [],
- "enums": [],
- "services": {},
- "options": {},
- "aliases": {},
- "vl_api_version": "0x1803336d"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/avf.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/avf.api.json
deleted file mode 100644
index f741f29..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/avf.api.json
+++ /dev/null
@@ -1,277 +0,0 @@
-{
- "types": [],
- "messages": [
- [
- "avf_create",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "pci_addr"
- ],
- [
- "i32",
- "enable_elog"
- ],
- [
- "u16",
- "rxq_num"
- ],
- [
- "u16",
- "rxq_size"
- ],
- [
- "u16",
- "txq_size"
- ],
- {
- "crc": "0xdaab8ae2"
- }
- ],
- [
- "avf_create_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0x5383d31f"
- }
- ],
- [
- "avf_delete",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0xf9e6675e"
- }
- ],
- [
- "avf_delete_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [],
- "enums": [
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "avf_create": {
- "reply": "avf_create_reply"
- },
- "avf_delete": {
- "reply": "avf_delete_reply"
- }
- },
- "options": {
- "version": "1.0.0"
- },
- "aliases": {
- "interface_index": {
- "type": "u32"
- }
- },
- "vl_api_version": "0xb7c68e1d"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/builtinurl.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/builtinurl.api.json
deleted file mode 100644
index 355a7d7..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/builtinurl.api.json
+++ /dev/null
@@ -1,53 +0,0 @@
-{
- "types": [],
- "messages": [
- [
- "builtinurl_enable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "builtinurl_enable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [],
- "enums": [],
- "services": {
- "builtinurl_enable": {
- "reply": "builtinurl_enable_reply"
- }
- },
- "options": {
- "version": "1.0.0"
- },
- "aliases": {},
- "vl_api_version": "0x25045d63"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/cdp.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/cdp.api.json
deleted file mode 100644
index 30f861f..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/cdp.api.json
+++ /dev/null
@@ -1,57 +0,0 @@
-{
- "types": [],
- "messages": [
- [
- "cdp_enable_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "enable_disable"
- ],
- {
- "crc": "0x2e7b47df"
- }
- ],
- [
- "cdp_enable_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [],
- "enums": [],
- "services": {
- "cdp_enable_disable": {
- "reply": "cdp_enable_disable_reply"
- }
- },
- "options": {
- "version": "1.0.0"
- },
- "aliases": {},
- "vl_api_version": "0x8cfa825e"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/ct6.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/ct6.api.json
deleted file mode 100644
index 77bcc69..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/ct6.api.json
+++ /dev/null
@@ -1,222 +0,0 @@
-{
- "types": [],
- "messages": [
- [
- "ct6_enable_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "enable_disable"
- ],
- [
- "bool",
- "is_inside"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0x5d02ac02"
- }
- ],
- [
- "ct6_enable_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [],
- "enums": [
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "ct6_enable_disable": {
- "reply": "ct6_enable_disable_reply"
- }
- },
- "options": {
- "version": "1.0.0"
- },
- "aliases": {
- "interface_index": {
- "type": "u32"
- }
- },
- "vl_api_version": "0xb294742c"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/dhcp.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/dhcp.api.json
deleted file mode 100644
index 6f74182..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/dhcp.api.json
+++ /dev/null
@@ -1,1581 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ],
- [
- "dhcp_client",
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "string",
- "hostname",
- 64
- ],
- [
- "u8",
- "id",
- 64
- ],
- [
- "bool",
- "want_dhcp_event"
- ],
- [
- "bool",
- "set_broadcast_flag"
- ],
- [
- "vl_api_ip_dscp_t",
- "dscp"
- ],
- [
- "u32",
- "pid"
- ]
- ],
- [
- "domain_server",
- [
- "vl_api_address_t",
- "address"
- ]
- ],
- [
- "dhcp_lease",
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "vl_api_dhcp_client_state_t",
- "state"
- ],
- [
- "bool",
- "is_ipv6"
- ],
- [
- "string",
- "hostname",
- 64
- ],
- [
- "u8",
- "mask_width"
- ],
- [
- "vl_api_address_t",
- "host_address"
- ],
- [
- "vl_api_address_t",
- "router_address"
- ],
- [
- "vl_api_mac_address_t",
- "host_mac"
- ],
- [
- "u8",
- "count"
- ],
- [
- "vl_api_domain_server_t",
- "domain_server",
- 0,
- "count"
- ]
- ],
- [
- "dhcp_server",
- [
- "u32",
- "server_vrf_id"
- ],
- [
- "vl_api_address_t",
- "dhcp_server"
- ]
- ],
- [
- "dhcp6_address_info",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u32",
- "valid_time"
- ],
- [
- "u32",
- "preferred_time"
- ]
- ],
- [
- "dhcp6_pd_prefix_info",
- [
- "vl_api_ip6_prefix_t",
- "prefix"
- ],
- [
- "u32",
- "valid_time"
- ],
- [
- "u32",
- "preferred_time"
- ]
- ]
- ],
- "messages": [
- [
- "dhcp_plugin_get_version",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "dhcp_plugin_get_version_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "major"
- ],
- [
- "u32",
- "minor"
- ],
- {
- "crc": "0x9b32cf86"
- }
- ],
- [
- "dhcp_plugin_control_ping",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "dhcp_plugin_control_ping_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "vpe_pid"
- ],
- {
- "crc": "0xf6b0b8ca"
- }
- ],
- [
- "dhcp_proxy_config",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "rx_vrf_id"
- ],
- [
- "u32",
- "server_vrf_id"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "vl_api_address_t",
- "dhcp_server"
- ],
- [
- "vl_api_address_t",
- "dhcp_src_address"
- ],
- {
- "crc": "0x6767230e"
- }
- ],
- [
- "dhcp_proxy_config_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "dhcp_proxy_set_vss",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "tbl_id"
- ],
- [
- "vl_api_vss_type_t",
- "vss_type"
- ],
- [
- "string",
- "vpn_ascii_id",
- 129
- ],
- [
- "u32",
- "oui"
- ],
- [
- "u32",
- "vpn_index"
- ],
- [
- "bool",
- "is_ipv6"
- ],
- [
- "bool",
- "is_add"
- ],
- {
- "crc": "0x50537301"
- }
- ],
- [
- "dhcp_proxy_set_vss_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "dhcp_client_config",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "vl_api_dhcp_client_t",
- "client"
- ],
- {
- "crc": "0x959b80a3"
- }
- ],
- [
- "dhcp_client_config_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "dhcp_compl_event",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "pid"
- ],
- [
- "vl_api_dhcp_lease_t",
- "lease"
- ],
- {
- "crc": "0xe908fd1d"
- }
- ],
- [
- "dhcp_client_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "dhcp_client_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_dhcp_client_t",
- "client"
- ],
- [
- "vl_api_dhcp_lease_t",
- "lease"
- ],
- {
- "crc": "0xacd82f5a"
- }
- ],
- [
- "dhcp_proxy_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_ip6"
- ],
- {
- "crc": "0x5c5b063f"
- }
- ],
- [
- "dhcp_proxy_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "rx_vrf_id"
- ],
- [
- "u32",
- "vss_oui"
- ],
- [
- "u32",
- "vss_fib_id"
- ],
- [
- "vl_api_vss_type_t",
- "vss_type"
- ],
- [
- "bool",
- "is_ipv6"
- ],
- [
- "string",
- "vss_vpn_ascii_id",
- 129
- ],
- [
- "vl_api_address_t",
- "dhcp_src_address"
- ],
- [
- "u8",
- "count"
- ],
- [
- "vl_api_dhcp_server_t",
- "servers",
- 0,
- "count"
- ],
- {
- "crc": "0xce16f044"
- }
- ],
- [
- "dhcp6_duid_ll_set",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "duid_ll",
- 10
- ],
- {
- "crc": "0x0f6ca323"
- }
- ],
- [
- "dhcp6_duid_ll_set_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "dhcp6_clients_enable_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "enable"
- ],
- {
- "crc": "0xb3e225d2"
- }
- ],
- [
- "dhcp6_clients_enable_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "dhcp6_send_client_message",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "u32",
- "server_index"
- ],
- [
- "u32",
- "irt"
- ],
- [
- "u32",
- "mrt"
- ],
- [
- "u32",
- "mrc"
- ],
- [
- "u32",
- "mrd"
- ],
- [
- "bool",
- "stop"
- ],
- [
- "vl_api_dhcpv6_msg_type_t",
- "msg_type"
- ],
- [
- "u32",
- "T1"
- ],
- [
- "u32",
- "T2"
- ],
- [
- "u32",
- "n_addresses"
- ],
- [
- "vl_api_dhcp6_address_info_t",
- "addresses",
- 0,
- "n_addresses"
- ],
- {
- "crc": "0xf6f14ef0"
- }
- ],
- [
- "dhcp6_send_client_message_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "dhcp6_pd_send_client_message",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "u32",
- "server_index"
- ],
- [
- "u32",
- "irt"
- ],
- [
- "u32",
- "mrt"
- ],
- [
- "u32",
- "mrc"
- ],
- [
- "u32",
- "mrd"
- ],
- [
- "bool",
- "stop"
- ],
- [
- "vl_api_dhcpv6_msg_type_t",
- "msg_type"
- ],
- [
- "u32",
- "T1"
- ],
- [
- "u32",
- "T2"
- ],
- [
- "u32",
- "n_prefixes"
- ],
- [
- "vl_api_dhcp6_pd_prefix_info_t",
- "prefixes",
- 0,
- "n_prefixes"
- ],
- {
- "crc": "0x064badb8"
- }
- ],
- [
- "dhcp6_pd_send_client_message_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "want_dhcp6_reply_events",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "enable_disable"
- ],
- [
- "u32",
- "pid"
- ],
- {
- "crc": "0x05b454b5"
- }
- ],
- [
- "want_dhcp6_reply_events_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "want_dhcp6_pd_reply_events",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "enable_disable"
- ],
- [
- "u32",
- "pid"
- ],
- {
- "crc": "0xc5e2af94"
- }
- ],
- [
- "want_dhcp6_pd_reply_events_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "dhcp6_reply_event",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "pid"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "u32",
- "server_index"
- ],
- [
- "vl_api_dhcpv6_msg_type_t",
- "msg_type"
- ],
- [
- "u32",
- "T1"
- ],
- [
- "u32",
- "T2"
- ],
- [
- "u16",
- "inner_status_code"
- ],
- [
- "u16",
- "status_code"
- ],
- [
- "u8",
- "preference"
- ],
- [
- "u32",
- "n_addresses"
- ],
- [
- "vl_api_dhcp6_address_info_t",
- "addresses",
- 0,
- "n_addresses"
- ],
- {
- "crc": "0x9f3af9e5"
- }
- ],
- [
- "dhcp6_pd_reply_event",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "pid"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "u32",
- "server_index"
- ],
- [
- "vl_api_dhcpv6_msg_type_t",
- "msg_type"
- ],
- [
- "u32",
- "T1"
- ],
- [
- "u32",
- "T2"
- ],
- [
- "u16",
- "inner_status_code"
- ],
- [
- "u16",
- "status_code"
- ],
- [
- "u8",
- "preference"
- ],
- [
- "u32",
- "n_prefixes"
- ],
- [
- "vl_api_dhcp6_pd_prefix_info_t",
- "prefixes",
- 0,
- "n_prefixes"
- ],
- {
- "crc": "0xcb3e462b"
- }
- ]
- ],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "vss_type",
- [
- "VSS_TYPE_API_ASCII",
- 0
- ],
- [
- "VSS_TYPE_API_VPN_ID",
- 1
- ],
- [
- "VSS_TYPE_API_INVALID",
- 123
- ],
- [
- "VSS_TYPE_API_DEFAULT",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "dhcp_client_state",
- [
- "DHCP_CLIENT_STATE_API_DISCOVER",
- 1
- ],
- [
- "DHCP_CLIENT_STATE_API_REQUEST",
- 2
- ],
- [
- "DHCP_CLIENT_STATE_API_BOUND",
- 3
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "dhcpv6_msg_type",
- [
- "DHCPV6_MSG_API_SOLICIT",
- 1
- ],
- [
- "DHCPV6_MSG_API_ADVERTISE",
- 2
- ],
- [
- "DHCPV6_MSG_API_REQUEST",
- 3
- ],
- [
- "DHCPV6_MSG_API_CONFIRM",
- 4
- ],
- [
- "DHCPV6_MSG_API_RENEW",
- 5
- ],
- [
- "DHCPV6_MSG_API_REBIND",
- 6
- ],
- [
- "DHCPV6_MSG_API_REPLY",
- 7
- ],
- [
- "DHCPV6_MSG_API_RELEASE",
- 8
- ],
- [
- "DHCPV6_MSG_API_DECLINE",
- 9
- ],
- [
- "DHCPV6_MSG_API_RECONFIGURE",
- 10
- ],
- [
- "DHCPV6_MSG_API_INFORMATION_REQUEST",
- 11
- ],
- [
- "DHCPV6_MSG_API_RELAY_FORW",
- 12
- ],
- [
- "DHCPV6_MSG_API_RELAY_REPL",
- 13
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "dhcp_client_config": {
- "reply": "dhcp_client_config_reply",
- "events": [
- "dhcp_compl_event"
- ]
- },
- "want_dhcp6_reply_events": {
- "reply": "want_dhcp6_reply_events_reply",
- "events": [
- "dhcp6_reply_event"
- ]
- },
- "want_dhcp6_pd_reply_events": {
- "reply": "want_dhcp6_pd_reply_events_reply",
- "events": [
- "dhcp6_pd_reply_event"
- ]
- },
- "dhcp_plugin_get_version": {
- "reply": "dhcp_plugin_get_version_reply"
- },
- "dhcp_plugin_control_ping": {
- "reply": "dhcp_plugin_control_ping_reply"
- },
- "dhcp_proxy_config": {
- "reply": "dhcp_proxy_config_reply"
- },
- "dhcp_proxy_set_vss": {
- "reply": "dhcp_proxy_set_vss_reply"
- },
- "dhcp_client_dump": {
- "reply": "dhcp_client_details",
- "stream": true
- },
- "dhcp_proxy_dump": {
- "reply": "dhcp_proxy_details",
- "stream": true
- },
- "dhcp6_duid_ll_set": {
- "reply": "dhcp6_duid_ll_set_reply"
- },
- "dhcp6_clients_enable_disable": {
- "reply": "dhcp6_clients_enable_disable_reply"
- },
- "dhcp6_send_client_message": {
- "reply": "dhcp6_send_client_message_reply"
- },
- "dhcp6_pd_send_client_message": {
- "reply": "dhcp6_pd_send_client_message_reply"
- }
- },
- "options": {
- "version": "3.0.1"
- },
- "aliases": {
- "interface_index": {
- "type": "u32"
- },
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- },
- "mac_address": {
- "type": "u8",
- "length": 6
- }
- },
- "vl_api_version": "0x96a5f046"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/dhcp6_ia_na_client_cp.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/dhcp6_ia_na_client_cp.api.json
deleted file mode 100644
index 00fdbe5..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/dhcp6_ia_na_client_cp.api.json
+++ /dev/null
@@ -1,218 +0,0 @@
-{
- "types": [],
- "messages": [
- [
- "dhcp6_client_enable_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "bool",
- "enable"
- ],
- {
- "crc": "0xae6cfcfb"
- }
- ],
- [
- "dhcp6_client_enable_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [],
- "enums": [
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "dhcp6_client_enable_disable": {
- "reply": "dhcp6_client_enable_disable_reply"
- }
- },
- "options": {
- "version": "1.0.1"
- },
- "aliases": {
- "interface_index": {
- "type": "u32"
- }
- },
- "vl_api_version": "0x541d3edd"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/dhcp6_pd_client_cp.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/dhcp6_pd_client_cp.api.json
deleted file mode 100644
index e4dcc62..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/dhcp6_pd_client_cp.api.json
+++ /dev/null
@@ -1,563 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ]
- ],
- "messages": [
- [
- "dhcp6_pd_client_enable_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "string",
- "prefix_group",
- 64
- ],
- [
- "bool",
- "enable"
- ],
- {
- "crc": "0xa75a0772"
- }
- ],
- [
- "dhcp6_pd_client_enable_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "ip6_add_del_address_using_prefix",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "string",
- "prefix_group",
- 64
- ],
- [
- "vl_api_ip6_address_with_prefix_t",
- "address_with_prefix"
- ],
- [
- "bool",
- "is_add"
- ],
- {
- "crc": "0x9b3d11e0"
- }
- ],
- [
- "ip6_add_del_address_using_prefix_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "dhcp6_pd_client_enable_disable": {
- "reply": "dhcp6_pd_client_enable_disable_reply"
- },
- "ip6_add_del_address_using_prefix": {
- "reply": "ip6_add_del_address_using_prefix_reply"
- }
- },
- "options": {
- "version": "2.0.0"
- },
- "aliases": {
- "interface_index": {
- "type": "u32"
- },
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- }
- },
- "vl_api_version": "0xb44ae848"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/dns.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/dns.api.json
deleted file mode 100644
index 493a07b..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/dns.api.json
+++ /dev/null
@@ -1,224 +0,0 @@
-{
- "types": [],
- "messages": [
- [
- "dns_enable_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "enable"
- ],
- {
- "crc": "0x8050327d"
- }
- ],
- [
- "dns_enable_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "dns_name_server_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_ip6"
- ],
- [
- "u8",
- "is_add"
- ],
- [
- "u8",
- "server_address",
- 16
- ],
- {
- "crc": "0x3bb05d8c"
- }
- ],
- [
- "dns_name_server_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "dns_resolve_name",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "name",
- 256
- ],
- {
- "crc": "0xc6566676"
- }
- ],
- [
- "dns_resolve_name_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u8",
- "ip4_set"
- ],
- [
- "u8",
- "ip6_set"
- ],
- [
- "u8",
- "ip4_address",
- 4
- ],
- [
- "u8",
- "ip6_address",
- 16
- ],
- {
- "crc": "0xc2d758c3"
- }
- ],
- [
- "dns_resolve_ip",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_ip6"
- ],
- [
- "u8",
- "address",
- 16
- ],
- {
- "crc": "0xae96a1a3"
- }
- ],
- [
- "dns_resolve_ip_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u8",
- "name",
- 256
- ],
- {
- "crc": "0x49ed78d6"
- }
- ]
- ],
- "unions": [],
- "enums": [],
- "services": {
- "dns_enable_disable": {
- "reply": "dns_enable_disable_reply"
- },
- "dns_name_server_add_del": {
- "reply": "dns_name_server_add_del_reply"
- },
- "dns_resolve_name": {
- "reply": "dns_resolve_name_reply"
- },
- "dns_resolve_ip": {
- "reply": "dns_resolve_ip_reply"
- }
- },
- "options": {
- "version": "1.0.0"
- },
- "aliases": {},
- "vl_api_version": "0x269575cd"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/flowprobe.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/flowprobe.api.json
deleted file mode 100644
index f23376f..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/flowprobe.api.json
+++ /dev/null
@@ -1,309 +0,0 @@
-{
- "types": [],
- "messages": [
- [
- "flowprobe_tx_interface_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "vl_api_flowprobe_which_flags_t",
- "which"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0xb782c976"
- }
- ],
- [
- "flowprobe_tx_interface_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "flowprobe_params",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_flowprobe_record_flags_t",
- "record_flags"
- ],
- [
- "u32",
- "active_timer"
- ],
- [
- "u32",
- "passive_timer"
- ],
- {
- "crc": "0xbaa46c09"
- }
- ],
- [
- "flowprobe_params_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [],
- "enums": [
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "flowprobe_which_flags",
- [
- "FLOWPROBE_WHICH_FLAG_IP4",
- 1
- ],
- [
- "FLOWPROBE_WHICH_FLAG_L2",
- 2
- ],
- [
- "FLOWPROBE_WHICH_FLAG_IP6",
- 4
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "flowprobe_record_flags",
- [
- "FLOWPROBE_RECORD_FLAG_L2",
- 1
- ],
- [
- "FLOWPROBE_RECORD_FLAG_L3",
- 2
- ],
- [
- "FLOWPROBE_RECORD_FLAG_L4",
- 4
- ],
- {
- "enumtype": "u8"
- }
- ]
- ],
- "services": {
- "flowprobe_tx_interface_add_del": {
- "reply": "flowprobe_tx_interface_add_del_reply"
- },
- "flowprobe_params": {
- "reply": "flowprobe_params_reply"
- }
- },
- "options": {
- "version": "1.0.0"
- },
- "aliases": {
- "interface_index": {
- "type": "u32"
- }
- },
- "vl_api_version": "0xbb4dfc0d"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/gbp.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/gbp.api.json
deleted file mode 100644
index 455cfa2..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/gbp.api.json
+++ /dev/null
@@ -1,1930 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ],
- [
- "gbp_bridge_domain",
- [
- "u32",
- "bd_id"
- ],
- [
- "u32",
- "rd_id"
- ],
- [
- "vl_api_gbp_bridge_domain_flags_t",
- "flags"
- ],
- [
- "vl_api_interface_index_t",
- "bvi_sw_if_index"
- ],
- [
- "vl_api_interface_index_t",
- "uu_fwd_sw_if_index"
- ],
- [
- "vl_api_interface_index_t",
- "bm_flood_sw_if_index"
- ]
- ],
- [
- "gbp_route_domain",
- [
- "u32",
- "rd_id"
- ],
- [
- "u32",
- "ip4_table_id"
- ],
- [
- "u32",
- "ip6_table_id"
- ],
- [
- "vl_api_interface_index_t",
- "ip4_uu_sw_if_index"
- ],
- [
- "vl_api_interface_index_t",
- "ip6_uu_sw_if_index"
- ],
- [
- "vl_api_gbp_scope_t",
- "scope"
- ]
- ],
- [
- "gbp_endpoint_tun",
- [
- "vl_api_address_t",
- "src"
- ],
- [
- "vl_api_address_t",
- "dst"
- ]
- ],
- [
- "gbp_endpoint",
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "u16",
- "sclass"
- ],
- [
- "vl_api_gbp_endpoint_flags_t",
- "flags"
- ],
- [
- "vl_api_mac_address_t",
- "mac"
- ],
- [
- "vl_api_gbp_endpoint_tun_t",
- "tun"
- ],
- [
- "u8",
- "n_ips"
- ],
- [
- "vl_api_address_t",
- "ips",
- 0,
- "n_ips"
- ]
- ],
- [
- "gbp_endpoint_retention",
- [
- "u32",
- "remote_ep_timeout"
- ]
- ],
- [
- "gbp_endpoint_group",
- [
- "u32",
- "vnid"
- ],
- [
- "u16",
- "sclass"
- ],
- [
- "u32",
- "bd_id"
- ],
- [
- "u32",
- "rd_id"
- ],
- [
- "vl_api_interface_index_t",
- "uplink_sw_if_index"
- ],
- [
- "vl_api_gbp_endpoint_retention_t",
- "retention"
- ]
- ],
- [
- "gbp_recirc",
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "u16",
- "sclass"
- ],
- [
- "bool",
- "is_ext"
- ]
- ],
- [
- "gbp_subnet",
- [
- "u32",
- "rd_id"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "u16",
- "sclass"
- ],
- [
- "vl_api_gbp_subnet_type_t",
- "type"
- ],
- [
- "vl_api_prefix_t",
- "prefix"
- ]
- ],
- [
- "gbp_next_hop",
- [
- "vl_api_address_t",
- "ip"
- ],
- [
- "vl_api_mac_address_t",
- "mac"
- ],
- [
- "u32",
- "bd_id"
- ],
- [
- "u32",
- "rd_id"
- ]
- ],
- [
- "gbp_next_hop_set",
- [
- "vl_api_gbp_hash_mode_t",
- "hash_mode"
- ],
- [
- "u8",
- "n_nhs"
- ],
- [
- "vl_api_gbp_next_hop_t",
- "nhs",
- 8
- ]
- ],
- [
- "gbp_rule",
- [
- "vl_api_gbp_rule_action_t",
- "action"
- ],
- [
- "vl_api_gbp_next_hop_set_t",
- "nh_set"
- ]
- ],
- [
- "gbp_contract",
- [
- "vl_api_gbp_scope_t",
- "scope"
- ],
- [
- "u16",
- "sclass"
- ],
- [
- "u16",
- "dclass"
- ],
- [
- "u32",
- "acl_index"
- ],
- [
- "u8",
- "n_ether_types"
- ],
- [
- "u16",
- "allowed_ethertypes",
- 16
- ],
- [
- "u8",
- "n_rules"
- ],
- [
- "vl_api_gbp_rule_t",
- "rules",
- 0,
- "n_rules"
- ]
- ],
- [
- "gbp_vxlan_tunnel",
- [
- "u32",
- "vni"
- ],
- [
- "vl_api_gbp_vxlan_tunnel_mode_t",
- "mode"
- ],
- [
- "u32",
- "bd_rd_id"
- ],
- [
- "vl_api_ip4_address_t",
- "src"
- ]
- ],
- [
- "gbp_ext_itf",
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "u32",
- "bd_id"
- ],
- [
- "u32",
- "rd_id"
- ],
- [
- "vl_api_gbp_ext_itf_flags_t",
- "flags"
- ]
- ]
- ],
- "messages": [
- [
- "gbp_bridge_domain_add",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_gbp_bridge_domain_t",
- "bd"
- ],
- {
- "crc": "0x8454bfdf"
- }
- ],
- [
- "gbp_bridge_domain_add_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "gbp_bridge_domain_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "bd_id"
- ],
- {
- "crc": "0xc25fdce6"
- }
- ],
- [
- "gbp_bridge_domain_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "gbp_bridge_domain_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "gbp_bridge_domain_dump_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "gbp_bridge_domain_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_gbp_bridge_domain_t",
- "bd"
- ],
- {
- "crc": "0x2acd15f9"
- }
- ],
- [
- "gbp_route_domain_add",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_gbp_route_domain_t",
- "rd"
- ],
- {
- "crc": "0x2d0afe38"
- }
- ],
- [
- "gbp_route_domain_add_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "gbp_route_domain_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "rd_id"
- ],
- {
- "crc": "0xbee4edcd"
- }
- ],
- [
- "gbp_route_domain_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "gbp_route_domain_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "gbp_route_domain_dump_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "gbp_route_domain_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_gbp_route_domain_t",
- "rd"
- ],
- {
- "crc": "0x8ab11375"
- }
- ],
- [
- "gbp_endpoint_add",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_gbp_endpoint_t",
- "endpoint"
- ],
- {
- "crc": "0x9ce16d5a"
- }
- ],
- [
- "gbp_endpoint_add_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "handle"
- ],
- {
- "crc": "0x1dd3ff3e"
- }
- ],
- [
- "gbp_endpoint_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "handle"
- ],
- {
- "crc": "0xb93cd566"
- }
- ],
- [
- "gbp_endpoint_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "gbp_endpoint_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "gbp_endpoint_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "f64",
- "age"
- ],
- [
- "u32",
- "handle"
- ],
- [
- "vl_api_gbp_endpoint_t",
- "endpoint"
- ],
- {
- "crc": "0x08aecb60"
- }
- ],
- [
- "gbp_endpoint_group_add",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_gbp_endpoint_group_t",
- "epg"
- ],
- {
- "crc": "0x8e0f4054"
- }
- ],
- [
- "gbp_endpoint_group_add_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "gbp_endpoint_group_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u16",
- "sclass"
- ],
- {
- "crc": "0x3436b8b7"
- }
- ],
- [
- "gbp_endpoint_group_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "gbp_endpoint_group_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "gbp_endpoint_group_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_gbp_endpoint_group_t",
- "epg"
- ],
- {
- "crc": "0x8f38292c"
- }
- ],
- [
- "gbp_recirc_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "vl_api_gbp_recirc_t",
- "recirc"
- ],
- {
- "crc": "0x718c69c3"
- }
- ],
- [
- "gbp_recirc_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "gbp_recirc_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "gbp_recirc_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_gbp_recirc_t",
- "recirc"
- ],
- {
- "crc": "0x66ecc42e"
- }
- ],
- [
- "gbp_subnet_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "vl_api_gbp_subnet_t",
- "subnet"
- ],
- {
- "crc": "0x888aca35"
- }
- ],
- [
- "gbp_subnet_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "gbp_subnet_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "gbp_subnet_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_gbp_subnet_t",
- "subnet"
- ],
- {
- "crc": "0x4ed84156"
- }
- ],
- [
- "gbp_contract_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "vl_api_gbp_contract_t",
- "contract"
- ],
- {
- "crc": "0x553e275b"
- }
- ],
- [
- "gbp_contract_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "stats_index"
- ],
- {
- "crc": "0x1992deab"
- }
- ],
- [
- "gbp_contract_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "gbp_contract_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_gbp_contract_t",
- "contract"
- ],
- {
- "crc": "0x2a18db6e"
- }
- ],
- [
- "gbp_vxlan_tunnel_add",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_gbp_vxlan_tunnel_t",
- "tunnel"
- ],
- {
- "crc": "0x3e070b35"
- }
- ],
- [
- "gbp_vxlan_tunnel_add_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0x5383d31f"
- }
- ],
- [
- "gbp_vxlan_tunnel_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "vni"
- ],
- {
- "crc": "0x8d1f2fe9"
- }
- ],
- [
- "gbp_vxlan_tunnel_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "gbp_vxlan_tunnel_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "gbp_vxlan_tunnel_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_gbp_vxlan_tunnel_t",
- "tunnel"
- ],
- {
- "crc": "0x65c6c818"
- }
- ],
- [
- "gbp_ext_itf_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "vl_api_gbp_ext_itf_t",
- "ext_itf"
- ],
- {
- "crc": "0x12ed5700"
- }
- ],
- [
- "gbp_ext_itf_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "gbp_ext_itf_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "gbp_ext_itf_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_gbp_ext_itf_t",
- "ext_itf"
- ],
- {
- "crc": "0x408a45c0"
- }
- ]
- ],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "gbp_bridge_domain_flags",
- [
- "GBP_BD_API_FLAG_NONE",
- 0
- ],
- [
- "GBP_BD_API_FLAG_DO_NOT_LEARN",
- 1
- ],
- [
- "GBP_BD_API_FLAG_UU_FWD_DROP",
- 2
- ],
- [
- "GBP_BD_API_FLAG_MCAST_DROP",
- 4
- ],
- [
- "GBP_BD_API_FLAG_UCAST_ARP",
- 8
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "gbp_endpoint_flags",
- [
- "GBP_API_ENDPOINT_FLAG_NONE",
- 0
- ],
- [
- "GBP_API_ENDPOINT_FLAG_BOUNCE",
- 1
- ],
- [
- "GBP_API_ENDPOINT_FLAG_REMOTE",
- 2
- ],
- [
- "GBP_API_ENDPOINT_FLAG_LEARNT",
- 4
- ],
- [
- "GBP_API_ENDPOINT_FLAG_EXTERNAL",
- 8
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "gbp_subnet_type",
- [
- "GBP_API_SUBNET_TRANSPORT",
- 1
- ],
- [
- "GBP_API_SUBNET_STITCHED_INTERNAL",
- 2
- ],
- [
- "GBP_API_SUBNET_STITCHED_EXTERNAL",
- 3
- ],
- [
- "GBP_API_SUBNET_L3_OUT",
- 4
- ],
- [
- "GBP_API_SUBNET_ANON_L3_OUT",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "gbp_hash_mode",
- [
- "GBP_API_HASH_MODE_SRC_IP",
- 1
- ],
- [
- "GBP_API_HASH_MODE_DST_IP",
- 2
- ],
- [
- "GBP_API_HASH_MODE_SYMMETRIC",
- 3
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "gbp_rule_action",
- [
- "GBP_API_RULE_PERMIT",
- 1
- ],
- [
- "GBP_API_RULE_DENY",
- 2
- ],
- [
- "GBP_API_RULE_REDIRECT",
- 3
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "gbp_vxlan_tunnel_mode",
- [
- "GBP_VXLAN_TUNNEL_MODE_L2",
- 1
- ],
- [
- "GBP_VXLAN_TUNNEL_MODE_L3",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "gbp_ext_itf_flags",
- [
- "GBP_API_EXT_ITF_F_NONE",
- 0
- ],
- [
- "GBP_API_EXT_ITF_F_ANON",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "gbp_bridge_domain_add": {
- "reply": "gbp_bridge_domain_add_reply"
- },
- "gbp_bridge_domain_del": {
- "reply": "gbp_bridge_domain_del_reply"
- },
- "gbp_bridge_domain_dump": {
- "reply": "gbp_bridge_domain_details",
- "stream": true
- },
- "gbp_route_domain_add": {
- "reply": "gbp_route_domain_add_reply"
- },
- "gbp_route_domain_del": {
- "reply": "gbp_route_domain_del_reply"
- },
- "gbp_route_domain_dump": {
- "reply": "gbp_route_domain_details",
- "stream": true
- },
- "gbp_endpoint_add": {
- "reply": "gbp_endpoint_add_reply"
- },
- "gbp_endpoint_del": {
- "reply": "gbp_endpoint_del_reply"
- },
- "gbp_endpoint_dump": {
- "reply": "gbp_endpoint_details",
- "stream": true
- },
- "gbp_endpoint_group_add": {
- "reply": "gbp_endpoint_group_add_reply"
- },
- "gbp_endpoint_group_del": {
- "reply": "gbp_endpoint_group_del_reply"
- },
- "gbp_endpoint_group_dump": {
- "reply": "gbp_endpoint_group_details",
- "stream": true
- },
- "gbp_recirc_add_del": {
- "reply": "gbp_recirc_add_del_reply"
- },
- "gbp_recirc_dump": {
- "reply": "gbp_recirc_details",
- "stream": true
- },
- "gbp_subnet_add_del": {
- "reply": "gbp_subnet_add_del_reply"
- },
- "gbp_subnet_dump": {
- "reply": "gbp_subnet_details",
- "stream": true
- },
- "gbp_contract_add_del": {
- "reply": "gbp_contract_add_del_reply"
- },
- "gbp_contract_dump": {
- "reply": "gbp_contract_details",
- "stream": true
- },
- "gbp_vxlan_tunnel_add": {
- "reply": "gbp_vxlan_tunnel_add_reply"
- },
- "gbp_vxlan_tunnel_del": {
- "reply": "gbp_vxlan_tunnel_del_reply"
- },
- "gbp_vxlan_tunnel_dump": {
- "reply": "gbp_vxlan_tunnel_details",
- "stream": true
- },
- "gbp_ext_itf_add_del": {
- "reply": "gbp_ext_itf_add_del_reply"
- },
- "gbp_ext_itf_dump": {
- "reply": "gbp_ext_itf_details",
- "stream": true
- }
- },
- "options": {
- "version": "2.0.0"
- },
- "aliases": {
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- },
- "mac_address": {
- "type": "u8",
- "length": 6
- },
- "interface_index": {
- "type": "u32"
- },
- "gbp_scope": {
- "type": "u16"
- }
- },
- "vl_api_version": "0xa891d6ff"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/gtpu.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/gtpu.api.json
deleted file mode 100644
index 63cee32..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/gtpu.api.json
+++ /dev/null
@@ -1,645 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ]
- ],
- "messages": [
- [
- "gtpu_add_del_tunnel",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "vl_api_address_t",
- "src_address"
- ],
- [
- "vl_api_address_t",
- "dst_address"
- ],
- [
- "vl_api_interface_index_t",
- "mcast_sw_if_index"
- ],
- [
- "u32",
- "encap_vrf_id"
- ],
- [
- "u32",
- "decap_next_index"
- ],
- [
- "u32",
- "teid"
- ],
- {
- "crc": "0x9a26a51c"
- }
- ],
- [
- "gtpu_add_del_tunnel_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0x5383d31f"
- }
- ],
- [
- "gtpu_tunnel_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0xf9e6675e"
- }
- ],
- [
- "gtpu_tunnel_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "vl_api_address_t",
- "src_address"
- ],
- [
- "vl_api_address_t",
- "dst_address"
- ],
- [
- "vl_api_interface_index_t",
- "mcast_sw_if_index"
- ],
- [
- "u32",
- "encap_vrf_id"
- ],
- [
- "u32",
- "decap_next_index"
- ],
- [
- "u32",
- "teid"
- ],
- {
- "crc": "0xa4d81a09"
- }
- ],
- [
- "sw_interface_set_gtpu_bypass",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "bool",
- "is_ipv6"
- ],
- [
- "bool",
- "enable"
- ],
- {
- "crc": "0x65247409"
- }
- ],
- [
- "sw_interface_set_gtpu_bypass_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "gtpu_add_del_tunnel": {
- "reply": "gtpu_add_del_tunnel_reply"
- },
- "gtpu_tunnel_dump": {
- "reply": "gtpu_tunnel_details",
- "stream": true
- },
- "sw_interface_set_gtpu_bypass": {
- "reply": "sw_interface_set_gtpu_bypass_reply"
- }
- },
- "options": {
- "version": "2.0.0"
- },
- "aliases": {
- "interface_index": {
- "type": "u32"
- },
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- }
- },
- "vl_api_version": "0x6305cc01"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/http_static.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/http_static.api.json
deleted file mode 100644
index 5bd9315..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/http_static.api.json
+++ /dev/null
@@ -1,79 +0,0 @@
-{
- "types": [],
- "messages": [
- [
- "http_static_enable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "fifo_size"
- ],
- [
- "u32",
- "cache_size_limit"
- ],
- [
- "u32",
- "prealloc_fifos"
- ],
- [
- "u32",
- "private_segment_size"
- ],
- [
- "string",
- "www_root",
- 256
- ],
- [
- "string",
- "uri",
- 256
- ],
- {
- "crc": "0x075f8292"
- }
- ],
- [
- "http_static_enable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [],
- "enums": [],
- "services": {
- "http_static_enable": {
- "reply": "http_static_enable_reply"
- }
- },
- "options": {
- "version": "2.1.0"
- },
- "aliases": {},
- "vl_api_version": "0xd29e72e9"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/igmp.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/igmp.api.json
deleted file mode 100644
index 80a5120..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/igmp.api.json
+++ /dev/null
@@ -1,969 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ],
- [
- "igmp_group",
- [
- "vl_api_filter_mode_t",
- "filter"
- ],
- [
- "u8",
- "n_srcs"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "vl_api_ip4_address_t",
- "gaddr"
- ],
- [
- "vl_api_ip4_address_t",
- "saddrs",
- 0,
- "n_srcs"
- ]
- ],
- [
- "group_prefix",
- [
- "vl_api_group_prefix_type_t",
- "type"
- ],
- [
- "vl_api_prefix_t",
- "prefix"
- ]
- ]
- ],
- "messages": [
- [
- "igmp_listen",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_igmp_group_t",
- "group"
- ],
- {
- "crc": "0x3f93a51a"
- }
- ],
- [
- "igmp_listen_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "igmp_enable_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "enable"
- ],
- [
- "u8",
- "mode"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0xb1edfb96"
- }
- ],
- [
- "igmp_enable_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "igmp_proxy_device_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "add"
- ],
- [
- "u32",
- "vrf_id"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0x0b9be9ce"
- }
- ],
- [
- "igmp_proxy_device_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "igmp_proxy_device_add_del_interface",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "add"
- ],
- [
- "u32",
- "vrf_id"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0x1a9ec24a"
- }
- ],
- [
- "igmp_proxy_device_add_del_interface_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "igmp_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0xf9e6675e"
- }
- ],
- [
- "igmp_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "vl_api_ip4_address_t",
- "saddr"
- ],
- [
- "vl_api_ip4_address_t",
- "gaddr"
- ],
- {
- "crc": "0x52f12a89"
- }
- ],
- [
- "igmp_clear_interface",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0xf9e6675e"
- }
- ],
- [
- "igmp_clear_interface_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "want_igmp_events",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "enable"
- ],
- [
- "u32",
- "pid"
- ],
- {
- "crc": "0xcfaccc1f"
- }
- ],
- [
- "want_igmp_events_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "igmp_event",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "vl_api_filter_mode_t",
- "filter"
- ],
- [
- "vl_api_ip4_address_t",
- "saddr"
- ],
- [
- "vl_api_ip4_address_t",
- "gaddr"
- ],
- {
- "crc": "0xd7696eaf"
- }
- ],
- [
- "igmp_group_prefix_set",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_group_prefix_t",
- "gp"
- ],
- {
- "crc": "0xd4f20ac5"
- }
- ],
- [
- "igmp_group_prefix_set_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "igmp_group_prefix_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "igmp_group_prefix_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_group_prefix_t",
- "gp"
- ],
- {
- "crc": "0xc3b3c526"
- }
- ]
- ],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "filter_mode",
- [
- "EXCLUDE",
- 0
- ],
- [
- "INCLUDE",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "group_prefix_type",
- [
- "ASM",
- 0
- ],
- [
- "SSM",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "want_igmp_events": {
- "reply": "want_igmp_events_reply",
- "events": [
- "igmp_event"
- ]
- },
- "igmp_listen": {
- "reply": "igmp_listen_reply"
- },
- "igmp_enable_disable": {
- "reply": "igmp_enable_disable_reply"
- },
- "igmp_proxy_device_add_del": {
- "reply": "igmp_proxy_device_add_del_reply"
- },
- "igmp_proxy_device_add_del_interface": {
- "reply": "igmp_proxy_device_add_del_interface_reply"
- },
- "igmp_dump": {
- "reply": "igmp_details",
- "stream": true
- },
- "igmp_clear_interface": {
- "reply": "igmp_clear_interface_reply"
- },
- "igmp_group_prefix_set": {
- "reply": "igmp_group_prefix_set_reply"
- },
- "igmp_group_prefix_dump": {
- "reply": "igmp_group_prefix_details",
- "stream": true
- }
- },
- "options": {
- "version": "1.0.0"
- },
- "aliases": {
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- },
- "interface_index": {
- "type": "u32"
- }
- },
- "vl_api_version": "0xfd1fef7b"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/ikev2.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/ikev2.api.json
deleted file mode 100644
index 84c8259..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/ikev2.api.json
+++ /dev/null
@@ -1,1187 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ]
- ],
- "messages": [
- [
- "ikev2_plugin_get_version",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "ikev2_plugin_get_version_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "major"
- ],
- [
- "u32",
- "minor"
- ],
- {
- "crc": "0x9b32cf86"
- }
- ],
- [
- "ikev2_profile_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "string",
- "name",
- 64
- ],
- [
- "bool",
- "is_add"
- ],
- {
- "crc": "0x2c925b55"
- }
- ],
- [
- "ikev2_profile_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "ikev2_profile_set_auth",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "string",
- "name",
- 64
- ],
- [
- "u8",
- "auth_method"
- ],
- [
- "bool",
- "is_hex"
- ],
- [
- "u32",
- "data_len"
- ],
- [
- "u8",
- "data",
- 0,
- "data_len"
- ],
- {
- "crc": "0x642c97cd"
- }
- ],
- [
- "ikev2_profile_set_auth_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "ikev2_profile_set_id",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "string",
- "name",
- 64
- ],
- [
- "bool",
- "is_local"
- ],
- [
- "u8",
- "id_type"
- ],
- [
- "u32",
- "data_len"
- ],
- [
- "u8",
- "data",
- 0,
- "data_len"
- ],
- {
- "crc": "0x4d7e2418"
- }
- ],
- [
- "ikev2_profile_set_id_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "ikev2_profile_set_ts",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "string",
- "name",
- 64
- ],
- [
- "bool",
- "is_local"
- ],
- [
- "u8",
- "proto"
- ],
- [
- "u16",
- "start_port"
- ],
- [
- "u16",
- "end_port"
- ],
- [
- "u32",
- "start_addr"
- ],
- [
- "u32",
- "end_addr"
- ],
- {
- "crc": "0x64d55c16"
- }
- ],
- [
- "ikev2_profile_set_ts_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "ikev2_set_local_key",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "key_file",
- 256
- ],
- {
- "crc": "0xe4996cd5"
- }
- ],
- [
- "ikev2_set_local_key_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "ikev2_set_responder",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "string",
- "name",
- 64
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- {
- "crc": "0xf0d3dc80"
- }
- ],
- [
- "ikev2_set_responder_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "ikev2_set_ike_transforms",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "string",
- "name",
- 64
- ],
- [
- "u32",
- "crypto_alg"
- ],
- [
- "u32",
- "crypto_key_size"
- ],
- [
- "u32",
- "integ_alg"
- ],
- [
- "u32",
- "dh_group"
- ],
- {
- "crc": "0x936a1a37"
- }
- ],
- [
- "ikev2_set_ike_transforms_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "ikev2_set_esp_transforms",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "string",
- "name",
- 64
- ],
- [
- "u32",
- "crypto_alg"
- ],
- [
- "u32",
- "crypto_key_size"
- ],
- [
- "u32",
- "integ_alg"
- ],
- [
- "u32",
- "dh_group"
- ],
- {
- "crc": "0x936a1a37"
- }
- ],
- [
- "ikev2_set_esp_transforms_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "ikev2_set_sa_lifetime",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "string",
- "name",
- 64
- ],
- [
- "u64",
- "lifetime"
- ],
- [
- "u32",
- "lifetime_jitter"
- ],
- [
- "u32",
- "handover"
- ],
- [
- "u64",
- "lifetime_maxdata"
- ],
- {
- "crc": "0x7039feaa"
- }
- ],
- [
- "ikev2_set_sa_lifetime_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "ikev2_initiate_sa_init",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "string",
- "name",
- 64
- ],
- {
- "crc": "0xebf79a66"
- }
- ],
- [
- "ikev2_initiate_sa_init_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "ikev2_initiate_del_ike_sa",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u64",
- "ispi"
- ],
- {
- "crc": "0x8d125bdd"
- }
- ],
- [
- "ikev2_initiate_del_ike_sa_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "ikev2_initiate_del_child_sa",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "ispi"
- ],
- {
- "crc": "0x7f004d2e"
- }
- ],
- [
- "ikev2_initiate_del_child_sa_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "ikev2_initiate_rekey_child_sa",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "ispi"
- ],
- {
- "crc": "0x7f004d2e"
- }
- ],
- [
- "ikev2_initiate_rekey_child_sa_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "ikev2_plugin_get_version": {
- "reply": "ikev2_plugin_get_version_reply"
- },
- "ikev2_profile_add_del": {
- "reply": "ikev2_profile_add_del_reply"
- },
- "ikev2_profile_set_auth": {
- "reply": "ikev2_profile_set_auth_reply"
- },
- "ikev2_profile_set_id": {
- "reply": "ikev2_profile_set_id_reply"
- },
- "ikev2_profile_set_ts": {
- "reply": "ikev2_profile_set_ts_reply"
- },
- "ikev2_set_local_key": {
- "reply": "ikev2_set_local_key_reply"
- },
- "ikev2_set_responder": {
- "reply": "ikev2_set_responder_reply"
- },
- "ikev2_set_ike_transforms": {
- "reply": "ikev2_set_ike_transforms_reply"
- },
- "ikev2_set_esp_transforms": {
- "reply": "ikev2_set_esp_transforms_reply"
- },
- "ikev2_set_sa_lifetime": {
- "reply": "ikev2_set_sa_lifetime_reply"
- },
- "ikev2_initiate_sa_init": {
- "reply": "ikev2_initiate_sa_init_reply"
- },
- "ikev2_initiate_del_ike_sa": {
- "reply": "ikev2_initiate_del_ike_sa_reply"
- },
- "ikev2_initiate_del_child_sa": {
- "reply": "ikev2_initiate_del_child_sa_reply"
- },
- "ikev2_initiate_rekey_child_sa": {
- "reply": "ikev2_initiate_rekey_child_sa_reply"
- }
- },
- "options": {
- "version": "1.0.1"
- },
- "aliases": {
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- },
- "interface_index": {
- "type": "u32"
- }
- },
- "vl_api_version": "0x4eab5d22"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/ioam_cache.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/ioam_cache.api.json
deleted file mode 100644
index bf9bdeb..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/ioam_cache.api.json
+++ /dev/null
@@ -1,57 +0,0 @@
-{
- "types": [],
- "messages": [
- [
- "ioam_cache_ip6_enable_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_disable"
- ],
- {
- "crc": "0x47705c03"
- }
- ],
- [
- "ioam_cache_ip6_enable_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [],
- "enums": [],
- "services": {
- "ioam_cache_ip6_enable_disable": {
- "reply": "ioam_cache_ip6_enable_disable_reply"
- }
- },
- "options": {
- "version": "1.0.0"
- },
- "aliases": {},
- "vl_api_version": "0xd0a0cf20"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/ioam_export.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/ioam_export.api.json
deleted file mode 100644
index aedd65d..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/ioam_export.api.json
+++ /dev/null
@@ -1,351 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ]
- ],
- "messages": [
- [
- "ioam_export_ip6_enable_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_disable"
- ],
- [
- "vl_api_ip4_address_t",
- "collector_address"
- ],
- [
- "vl_api_ip4_address_t",
- "src_address"
- ],
- {
- "crc": "0xe4d4ebfa"
- }
- ],
- [
- "ioam_export_ip6_enable_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "ioam_export_ip6_enable_disable": {
- "reply": "ioam_export_ip6_enable_disable_reply"
- }
- },
- "options": {
- "version": "1.0.0"
- },
- "aliases": {
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- }
- },
- "vl_api_version": "0xc6fdb83f"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/ioam_vxlan_gpe.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/ioam_vxlan_gpe.api.json
deleted file mode 100644
index 0bc2f0a..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/ioam_vxlan_gpe.api.json
+++ /dev/null
@@ -1,594 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ]
- ],
- "messages": [
- [
- "vxlan_gpe_ioam_enable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u16",
- "id"
- ],
- [
- "u8",
- "trace_ppc"
- ],
- [
- "bool",
- "pow_enable"
- ],
- [
- "bool",
- "trace_enable"
- ],
- {
- "crc": "0x2481bef7"
- }
- ],
- [
- "vxlan_gpe_ioam_enable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "vxlan_gpe_ioam_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u16",
- "id"
- ],
- {
- "crc": "0x6b16a45e"
- }
- ],
- [
- "vxlan_gpe_ioam_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "vxlan_gpe_ioam_vni_enable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "vni"
- ],
- [
- "vl_api_address_t",
- "local"
- ],
- [
- "vl_api_address_t",
- "remote"
- ],
- {
- "crc": "0x997161fb"
- }
- ],
- [
- "vxlan_gpe_ioam_vni_enable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "vxlan_gpe_ioam_vni_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "vni"
- ],
- [
- "vl_api_address_t",
- "local"
- ],
- [
- "vl_api_address_t",
- "remote"
- ],
- {
- "crc": "0x997161fb"
- }
- ],
- [
- "vxlan_gpe_ioam_vni_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "vxlan_gpe_ioam_transit_enable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "outer_fib_index"
- ],
- [
- "vl_api_address_t",
- "dst_addr"
- ],
- {
- "crc": "0x553f5b7b"
- }
- ],
- [
- "vxlan_gpe_ioam_transit_enable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "vxlan_gpe_ioam_transit_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "outer_fib_index"
- ],
- [
- "vl_api_address_t",
- "dst_addr"
- ],
- {
- "crc": "0x553f5b7b"
- }
- ],
- [
- "vxlan_gpe_ioam_transit_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "vxlan_gpe_ioam_enable": {
- "reply": "vxlan_gpe_ioam_enable_reply"
- },
- "vxlan_gpe_ioam_disable": {
- "reply": "vxlan_gpe_ioam_disable_reply"
- },
- "vxlan_gpe_ioam_vni_enable": {
- "reply": "vxlan_gpe_ioam_vni_enable_reply"
- },
- "vxlan_gpe_ioam_vni_disable": {
- "reply": "vxlan_gpe_ioam_vni_disable_reply"
- },
- "vxlan_gpe_ioam_transit_enable": {
- "reply": "vxlan_gpe_ioam_transit_enable_reply"
- },
- "vxlan_gpe_ioam_transit_disable": {
- "reply": "vxlan_gpe_ioam_transit_disable_reply"
- }
- },
- "options": {
- "version": "1.0.0"
- },
- "aliases": {
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- }
- },
- "vl_api_version": "0xf80eb923"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/l2e.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/l2e.api.json
deleted file mode 100644
index b1168f7..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/l2e.api.json
+++ /dev/null
@@ -1,218 +0,0 @@
-{
- "types": [],
- "messages": [
- [
- "l2_emulation",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "bool",
- "enable"
- ],
- {
- "crc": "0xae6cfcfb"
- }
- ],
- [
- "l2_emulation_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [],
- "enums": [
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "l2_emulation": {
- "reply": "l2_emulation_reply"
- }
- },
- "options": {
- "version": "1.0.0"
- },
- "aliases": {
- "interface_index": {
- "type": "u32"
- }
- },
- "vl_api_version": "0x541d3edd"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/l3xc.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/l3xc.api.json
deleted file mode 100644
index bec72fb..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/l3xc.api.json
+++ /dev/null
@@ -1,841 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ],
- [
- "fib_mpls_label",
- [
- "u8",
- "is_uniform"
- ],
- [
- "u32",
- "label"
- ],
- [
- "u8",
- "ttl"
- ],
- [
- "u8",
- "exp"
- ]
- ],
- [
- "fib_path_nh",
- [
- "vl_api_address_union_t",
- "address"
- ],
- [
- "u32",
- "via_label"
- ],
- [
- "u32",
- "obj_id"
- ],
- [
- "u32",
- "classify_table_index"
- ]
- ],
- [
- "fib_path",
- [
- "u32",
- "sw_if_index"
- ],
- [
- "u32",
- "table_id"
- ],
- [
- "u32",
- "rpf_id"
- ],
- [
- "u8",
- "weight"
- ],
- [
- "u8",
- "preference"
- ],
- [
- "vl_api_fib_path_type_t",
- "type"
- ],
- [
- "vl_api_fib_path_flags_t",
- "flags"
- ],
- [
- "vl_api_fib_path_nh_proto_t",
- "proto"
- ],
- [
- "vl_api_fib_path_nh_t",
- "nh"
- ],
- [
- "u8",
- "n_labels"
- ],
- [
- "vl_api_fib_mpls_label_t",
- "label_stack",
- 16
- ]
- ],
- [
- "l3xc",
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "bool",
- "is_ip6"
- ],
- [
- "u8",
- "n_paths"
- ],
- [
- "vl_api_fib_path_t",
- "paths",
- 0,
- "n_paths"
- ]
- ]
- ],
- "messages": [
- [
- "l3xc_plugin_get_version",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "l3xc_plugin_get_version_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "major"
- ],
- [
- "u32",
- "minor"
- ],
- {
- "crc": "0x9b32cf86"
- }
- ],
- [
- "l3xc_update",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_l3xc_t",
- "l3xc"
- ],
- {
- "crc": "0x0787b1d3"
- }
- ],
- [
- "l3xc_update_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "stats_index"
- ],
- {
- "crc": "0x1992deab"
- }
- ],
- [
- "l3xc_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "bool",
- "is_ip6"
- ],
- {
- "crc": "0xe7dbef91"
- }
- ],
- [
- "l3xc_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "l3xc_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0xf9e6675e"
- }
- ],
- [
- "l3xc_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_l3xc_t",
- "l3xc"
- ],
- {
- "crc": "0xd4f69627"
- }
- ]
- ],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "fib_path_nh_proto",
- [
- "FIB_API_PATH_NH_PROTO_IP4",
- 0
- ],
- [
- "FIB_API_PATH_NH_PROTO_IP6",
- 1
- ],
- [
- "FIB_API_PATH_NH_PROTO_MPLS",
- 2
- ],
- [
- "FIB_API_PATH_NH_PROTO_ETHERNET",
- 3
- ],
- [
- "FIB_API_PATH_NH_PROTO_BIER",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "fib_path_flags",
- [
- "FIB_API_PATH_FLAG_NONE",
- 0
- ],
- [
- "FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED",
- 1
- ],
- [
- "FIB_API_PATH_FLAG_RESOLVE_VIA_HOST",
- 2
- ],
- [
- "FIB_API_PATH_FLAG_POP_PW_CW",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "fib_path_type",
- [
- "FIB_API_PATH_TYPE_NORMAL",
- 0
- ],
- [
- "FIB_API_PATH_TYPE_LOCAL",
- 1
- ],
- [
- "FIB_API_PATH_TYPE_DROP",
- 2
- ],
- [
- "FIB_API_PATH_TYPE_UDP_ENCAP",
- 3
- ],
- [
- "FIB_API_PATH_TYPE_BIER_IMP",
- 4
- ],
- [
- "FIB_API_PATH_TYPE_ICMP_UNREACH",
- 5
- ],
- [
- "FIB_API_PATH_TYPE_ICMP_PROHIBIT",
- 6
- ],
- [
- "FIB_API_PATH_TYPE_SOURCE_LOOKUP",
- 7
- ],
- [
- "FIB_API_PATH_TYPE_DVR",
- 8
- ],
- [
- "FIB_API_PATH_TYPE_INTERFACE_RX",
- 9
- ],
- [
- "FIB_API_PATH_TYPE_CLASSIFY",
- 10
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "l3xc_plugin_get_version": {
- "reply": "l3xc_plugin_get_version_reply"
- },
- "l3xc_update": {
- "reply": "l3xc_update_reply"
- },
- "l3xc_del": {
- "reply": "l3xc_del_reply"
- },
- "l3xc_dump": {
- "reply": "l3xc_details",
- "stream": true
- }
- },
- "options": {
- "version": "1.0.1"
- },
- "aliases": {
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- },
- "interface_index": {
- "type": "u32"
- }
- },
- "vl_api_version": "0x80b00c99"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/lacp.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/lacp.api.json
deleted file mode 100644
index ca7599b..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/lacp.api.json
+++ /dev/null
@@ -1,289 +0,0 @@
-{
- "types": [],
- "messages": [
- [
- "sw_interface_lacp_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "sw_interface_lacp_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "string",
- "interface_name",
- 64
- ],
- [
- "u32",
- "rx_state"
- ],
- [
- "u32",
- "tx_state"
- ],
- [
- "u32",
- "mux_state"
- ],
- [
- "u32",
- "ptx_state"
- ],
- [
- "string",
- "bond_interface_name",
- 64
- ],
- [
- "u16",
- "actor_system_priority"
- ],
- [
- "vl_api_mac_address_t",
- "actor_system"
- ],
- [
- "u16",
- "actor_key"
- ],
- [
- "u16",
- "actor_port_priority"
- ],
- [
- "u16",
- "actor_port_number"
- ],
- [
- "u8",
- "actor_state"
- ],
- [
- "u16",
- "partner_system_priority"
- ],
- [
- "vl_api_mac_address_t",
- "partner_system"
- ],
- [
- "u16",
- "partner_key"
- ],
- [
- "u16",
- "partner_port_priority"
- ],
- [
- "u16",
- "partner_port_number"
- ],
- [
- "u8",
- "partner_state"
- ],
- {
- "crc": "0x745ae0ba"
- }
- ]
- ],
- "unions": [],
- "enums": [
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "sw_interface_lacp_dump": {
- "reply": "sw_interface_lacp_details",
- "stream": true
- }
- },
- "options": {
- "version": "2.0.0"
- },
- "aliases": {
- "mac_address": {
- "type": "u8",
- "length": 6
- },
- "interface_index": {
- "type": "u32"
- }
- },
- "vl_api_version": "0x930086a4"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/lb.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/lb.api.json
deleted file mode 100644
index ae9b8d0..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/lb.api.json
+++ /dev/null
@@ -1,1090 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ],
- [
- "lb_vip",
- [
- "vl_api_address_with_prefix_t",
- "pfx"
- ],
- [
- "vl_api_ip_proto_t",
- "protocol"
- ],
- [
- "u16",
- "port"
- ]
- ]
- ],
- "messages": [
- [
- "lb_conf",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ip4_address_t",
- "ip4_src_address"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6_src_address"
- ],
- [
- "u32",
- "sticky_buckets_per_core"
- ],
- [
- "u32",
- "flow_timeout"
- ],
- {
- "crc": "0x22ddb739"
- }
- ],
- [
- "lb_conf_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "lb_add_del_vip",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_address_with_prefix_t",
- "pfx"
- ],
- [
- "u8",
- "protocol",
- {
- "default": 255
- }
- ],
- [
- "u16",
- "port"
- ],
- [
- "vl_api_lb_encap_type_t",
- "encap"
- ],
- [
- "u8",
- "dscp"
- ],
- [
- "vl_api_lb_srv_type_t",
- "type"
- ],
- [
- "u16",
- "target_port"
- ],
- [
- "u16",
- "node_port"
- ],
- [
- "u32",
- "new_flows_table_length",
- {
- "default": 1024
- }
- ],
- [
- "bool",
- "is_del"
- ],
- {
- "crc": "0xd15b7ddc"
- }
- ],
- [
- "lb_add_del_vip_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "lb_add_del_as",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_address_with_prefix_t",
- "pfx"
- ],
- [
- "u8",
- "protocol",
- {
- "default": 255
- }
- ],
- [
- "u16",
- "port"
- ],
- [
- "vl_api_address_t",
- "as_address"
- ],
- [
- "bool",
- "is_del"
- ],
- [
- "bool",
- "is_flush"
- ],
- {
- "crc": "0x78628987"
- }
- ],
- [
- "lb_add_del_as_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "lb_flush_vip",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_address_with_prefix_t",
- "pfx"
- ],
- [
- "u8",
- "protocol"
- ],
- [
- "u16",
- "port"
- ],
- {
- "crc": "0x1063f819"
- }
- ],
- [
- "lb_flush_vip_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "lb_vip_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_address_with_prefix_t",
- "pfx"
- ],
- [
- "vl_api_prefix_matcher_t",
- "pfx_matcher"
- ],
- [
- "u8",
- "protocol",
- {
- "default": 255
- }
- ],
- [
- "u16",
- "port"
- ],
- {
- "crc": "0xc7bcb124"
- }
- ],
- [
- "lb_vip_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_lb_vip_t",
- "vip"
- ],
- [
- "vl_api_lb_encap_type_t",
- "encap"
- ],
- [
- "vl_api_ip_dscp_t",
- "dscp"
- ],
- [
- "vl_api_lb_srv_type_t",
- "srv_type"
- ],
- [
- "u16",
- "target_port"
- ],
- [
- "u16",
- "flow_table_length"
- ],
- {
- "crc": "0x08f39bed"
- }
- ],
- [
- "lb_as_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_address_with_prefix_t",
- "pfx"
- ],
- [
- "u8",
- "protocol"
- ],
- [
- "u16",
- "port"
- ],
- {
- "crc": "0x1063f819"
- }
- ],
- [
- "lb_as_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_lb_vip_t",
- "vip"
- ],
- [
- "vl_api_address_t",
- "app_srv"
- ],
- [
- "u8",
- "flags"
- ],
- [
- "u32",
- "in_use_since"
- ],
- {
- "crc": "0x9c39f60e"
- }
- ],
- [
- "lb_add_del_intf_nat4",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0x47d6e753"
- }
- ],
- [
- "lb_add_del_intf_nat4_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "lb_add_del_intf_nat6",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0x47d6e753"
- }
- ],
- [
- "lb_add_del_intf_nat6_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "lb_srv_type",
- [
- "LB_API_SRV_TYPE_CLUSTERIP",
- 0
- ],
- [
- "LB_API_SRV_TYPE_NODEPORT",
- 1
- ],
- [
- "LB_API_SRV_N_TYPES",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "lb_encap_type",
- [
- "LB_API_ENCAP_TYPE_GRE4",
- 0
- ],
- [
- "LB_API_ENCAP_TYPE_GRE6",
- 1
- ],
- [
- "LB_API_ENCAP_TYPE_L3DSR",
- 2
- ],
- [
- "LB_API_ENCAP_TYPE_NAT4",
- 3
- ],
- [
- "LB_API_ENCAP_TYPE_NAT6",
- 4
- ],
- [
- "LB_API_ENCAP_N_TYPES",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "lb_lkp_type_t",
- [
- "LB_API_LKP_SAME_IP_PORT",
- 0
- ],
- [
- "LB_API_LKP_DIFF_IP_PORT",
- 1
- ],
- [
- "LB_API_LKP_ALL_PORT_IP",
- 2
- ],
- [
- "LB_API_LKP_N_TYPES",
- 3
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "lb_vip_type",
- [
- "LB_API_VIP_TYPE_IP6_GRE6",
- 0
- ],
- [
- "LB_API_VIP_TYPE_IP6_GRE4",
- 1
- ],
- [
- "LB_API_VIP_TYPE_IP4_GRE6",
- 2
- ],
- [
- "LB_API_VIP_TYPE_IP4_GRE4",
- 3
- ],
- [
- "LB_API_VIP_TYPE_IP4_L3DSR",
- 4
- ],
- [
- "LB_API_VIP_TYPE_IP4_NAT4",
- 5
- ],
- [
- "LB_API_VIP_TYPE_IP6_NAT6",
- 6
- ],
- [
- "LB_API_VIP_N_TYPES",
- 7
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "lb_nat_protocol",
- [
- "LB_API_NAT_PROTOCOL_UDP",
- 6
- ],
- [
- "LB_API_NAT_PROTOCOL_TCP",
- 23
- ],
- [
- "LB_API_NAT_PROTOCOL_ANY",
- 4294967295
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "lb_conf": {
- "reply": "lb_conf_reply"
- },
- "lb_add_del_vip": {
- "reply": "lb_add_del_vip_reply"
- },
- "lb_add_del_as": {
- "reply": "lb_add_del_as_reply"
- },
- "lb_flush_vip": {
- "reply": "lb_flush_vip_reply"
- },
- "lb_vip_dump": {
- "reply": "lb_vip_details",
- "stream": true
- },
- "lb_as_dump": {
- "reply": "lb_as_details",
- "stream": true
- },
- "lb_add_del_intf_nat4": {
- "reply": "lb_add_del_intf_nat4_reply"
- },
- "lb_add_del_intf_nat6": {
- "reply": "lb_add_del_intf_nat6_reply"
- }
- },
- "options": {
- "version": "1.0.0"
- },
- "aliases": {
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- },
- "interface_index": {
- "type": "u32"
- }
- },
- "vl_api_version": "0x76c36b4c"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/lb_types.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/lb_types.api.json
deleted file mode 100644
index 0f7f714..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/lb_types.api.json
+++ /dev/null
@@ -1,437 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ],
- [
- "lb_vip",
- [
- "vl_api_address_with_prefix_t",
- "pfx"
- ],
- [
- "vl_api_ip_proto_t",
- "protocol"
- ],
- [
- "u16",
- "port"
- ]
- ]
- ],
- "messages": [],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "lb_srv_type",
- [
- "LB_API_SRV_TYPE_CLUSTERIP",
- 0
- ],
- [
- "LB_API_SRV_TYPE_NODEPORT",
- 1
- ],
- [
- "LB_API_SRV_N_TYPES",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "lb_encap_type",
- [
- "LB_API_ENCAP_TYPE_GRE4",
- 0
- ],
- [
- "LB_API_ENCAP_TYPE_GRE6",
- 1
- ],
- [
- "LB_API_ENCAP_TYPE_L3DSR",
- 2
- ],
- [
- "LB_API_ENCAP_TYPE_NAT4",
- 3
- ],
- [
- "LB_API_ENCAP_TYPE_NAT6",
- 4
- ],
- [
- "LB_API_ENCAP_N_TYPES",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "lb_lkp_type_t",
- [
- "LB_API_LKP_SAME_IP_PORT",
- 0
- ],
- [
- "LB_API_LKP_DIFF_IP_PORT",
- 1
- ],
- [
- "LB_API_LKP_ALL_PORT_IP",
- 2
- ],
- [
- "LB_API_LKP_N_TYPES",
- 3
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "lb_vip_type",
- [
- "LB_API_VIP_TYPE_IP6_GRE6",
- 0
- ],
- [
- "LB_API_VIP_TYPE_IP6_GRE4",
- 1
- ],
- [
- "LB_API_VIP_TYPE_IP4_GRE6",
- 2
- ],
- [
- "LB_API_VIP_TYPE_IP4_GRE4",
- 3
- ],
- [
- "LB_API_VIP_TYPE_IP4_L3DSR",
- 4
- ],
- [
- "LB_API_VIP_TYPE_IP4_NAT4",
- 5
- ],
- [
- "LB_API_VIP_TYPE_IP6_NAT6",
- 6
- ],
- [
- "LB_API_VIP_N_TYPES",
- 7
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "lb_nat_protocol",
- [
- "LB_API_NAT_PROTOCOL_UDP",
- 6
- ],
- [
- "LB_API_NAT_PROTOCOL_TCP",
- 23
- ],
- [
- "LB_API_NAT_PROTOCOL_ANY",
- 4294967295
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {},
- "options": {},
- "aliases": {
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- }
- },
- "vl_api_version": "0xd04207f3"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/mactime.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/mactime.api.json
deleted file mode 100644
index 97c348f..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/mactime.api.json
+++ /dev/null
@@ -1,424 +0,0 @@
-{
- "types": [
- [
- "time_range",
- [
- "f64",
- "start"
- ],
- [
- "f64",
- "end"
- ]
- ],
- [
- "mactime_time_range",
- [
- "f64",
- "start"
- ],
- [
- "f64",
- "end"
- ]
- ]
- ],
- "messages": [
- [
- "mactime_enable_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "enable_disable"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0x3865946c"
- }
- ],
- [
- "mactime_enable_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "mactime_add_del_range",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "bool",
- "drop"
- ],
- [
- "bool",
- "allow"
- ],
- [
- "u8",
- "allow_quota"
- ],
- [
- "bool",
- "no_udp_10001"
- ],
- [
- "u64",
- "data_quota"
- ],
- [
- "vl_api_mac_address_t",
- "mac_address"
- ],
- [
- "string",
- "device_name",
- 64
- ],
- [
- "u32",
- "count"
- ],
- [
- "vl_api_time_range_t",
- "ranges",
- 0,
- "count"
- ],
- {
- "crc": "0x101858ef"
- }
- ],
- [
- "mactime_add_del_range_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "mactime_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "my_table_epoch"
- ],
- {
- "crc": "0x8f454e23"
- }
- ],
- [
- "mactime_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "pool_index"
- ],
- [
- "vl_api_mac_address_t",
- "mac_address"
- ],
- [
- "u64",
- "data_quota"
- ],
- [
- "u64",
- "data_used_in_range"
- ],
- [
- "u32",
- "flags"
- ],
- [
- "string",
- "device_name",
- 64
- ],
- [
- "u32",
- "nranges"
- ],
- [
- "vl_api_mactime_time_range_t",
- "ranges",
- 0,
- "nranges"
- ],
- {
- "crc": "0x44921c06"
- }
- ],
- [
- "mactime_dump_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "table_epoch"
- ],
- {
- "crc": "0x49bcc753"
- }
- ]
- ],
- "unions": [],
- "enums": [
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "mactime_enable_disable": {
- "reply": "mactime_enable_disable_reply"
- },
- "mactime_add_del_range": {
- "reply": "mactime_add_del_range_reply"
- },
- "mactime_dump": {
- "reply": "mactime_details",
- "stream": true
- }
- },
- "options": {
- "version": "2.0.0"
- },
- "aliases": {
- "mac_address": {
- "type": "u8",
- "length": 6
- },
- "interface_index": {
- "type": "u32"
- }
- },
- "vl_api_version": "0xd32f01e0"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/map.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/map.api.json
deleted file mode 100644
index 065092a..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/map.api.json
+++ /dev/null
@@ -1,1283 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ]
- ],
- "messages": [
- [
- "map_add_domain",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ip6_prefix_t",
- "ip6_prefix"
- ],
- [
- "vl_api_ip4_prefix_t",
- "ip4_prefix"
- ],
- [
- "vl_api_ip6_prefix_t",
- "ip6_src"
- ],
- [
- "u8",
- "ea_bits_len"
- ],
- [
- "u8",
- "psid_offset"
- ],
- [
- "u8",
- "psid_length"
- ],
- [
- "u16",
- "mtu"
- ],
- [
- "string",
- "tag",
- 64
- ],
- {
- "crc": "0x7a5a18c9"
- }
- ],
- [
- "map_add_domain_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "index"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0x3e6d4e2c"
- }
- ],
- [
- "map_del_domain",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "index"
- ],
- {
- "crc": "0x8ac76db6"
- }
- ],
- [
- "map_del_domain_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "map_add_del_rule",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "index"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6_dst"
- ],
- [
- "u16",
- "psid"
- ],
- {
- "crc": "0xc65b32f7"
- }
- ],
- [
- "map_add_del_rule_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "map_domain_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "map_domain_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "domain_index"
- ],
- [
- "vl_api_ip6_prefix_t",
- "ip6_prefix"
- ],
- [
- "vl_api_ip4_prefix_t",
- "ip4_prefix"
- ],
- [
- "vl_api_ip6_prefix_t",
- "ip6_src"
- ],
- [
- "u8",
- "ea_bits_len"
- ],
- [
- "u8",
- "psid_offset"
- ],
- [
- "u8",
- "psid_length"
- ],
- [
- "u8",
- "flags"
- ],
- [
- "u16",
- "mtu"
- ],
- [
- "string",
- "tag",
- 64
- ],
- {
- "crc": "0xfc1859dd"
- }
- ],
- [
- "map_rule_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "domain_index"
- ],
- {
- "crc": "0xe43e6ff6"
- }
- ],
- [
- "map_rule_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6_dst"
- ],
- [
- "u16",
- "psid"
- ],
- {
- "crc": "0xc7cbeea5"
- }
- ],
- [
- "map_if_enable_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "bool",
- "is_enable"
- ],
- [
- "bool",
- "is_translation"
- ],
- {
- "crc": "0x59bb32f4"
- }
- ],
- [
- "map_if_enable_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "map_summary_stats",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "map_summary_stats_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u64",
- "total_bindings"
- ],
- [
- "u64",
- "total_pkts",
- 2
- ],
- [
- "u64",
- "total_bytes",
- 2
- ],
- [
- "u64",
- "total_ip4_fragments"
- ],
- [
- "u64",
- "total_security_check",
- 2
- ],
- {
- "crc": "0x0e4ace0e"
- }
- ],
- [
- "map_param_set_fragmentation",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "inner"
- ],
- [
- "bool",
- "ignore_df"
- ],
- {
- "crc": "0x9ff54d90"
- }
- ],
- [
- "map_param_set_fragmentation_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "map_param_set_icmp",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ip4_address_t",
- "ip4_err_relay_src"
- ],
- {
- "crc": "0x58210cbf"
- }
- ],
- [
- "map_param_set_icmp_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "map_param_set_icmp6",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "enable_unreachable"
- ],
- {
- "crc": "0x5d01f8c1"
- }
- ],
- [
- "map_param_set_icmp6_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "map_param_add_del_pre_resolve",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "vl_api_ip4_address_t",
- "ip4_nh_address"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6_nh_address"
- ],
- {
- "crc": "0x17008c66"
- }
- ],
- [
- "map_param_add_del_pre_resolve_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "map_param_set_security_check",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "enable"
- ],
- [
- "bool",
- "fragments"
- ],
- {
- "crc": "0x6abe9836"
- }
- ],
- [
- "map_param_set_security_check_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "map_param_set_traffic_class",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "copy"
- ],
- [
- "u8",
- "tc_class"
- ],
- {
- "crc": "0x9cac455c"
- }
- ],
- [
- "map_param_set_traffic_class_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "map_param_set_tcp",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u16",
- "tcp_mss"
- ],
- {
- "crc": "0x87a825d9"
- }
- ],
- [
- "map_param_set_tcp_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "map_param_get",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "map_param_get_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u8",
- "frag_inner"
- ],
- [
- "u8",
- "frag_ignore_df"
- ],
- [
- "vl_api_ip4_address_t",
- "icmp_ip4_err_relay_src"
- ],
- [
- "bool",
- "icmp6_enable_unreachable"
- ],
- [
- "vl_api_ip4_address_t",
- "ip4_nh_address"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6_nh_address"
- ],
- [
- "u16",
- "ip4_lifetime_ms"
- ],
- [
- "u16",
- "ip4_pool_size"
- ],
- [
- "u32",
- "ip4_buffers"
- ],
- [
- "f64",
- "ip4_ht_ratio"
- ],
- [
- "bool",
- "sec_check_enable"
- ],
- [
- "bool",
- "sec_check_fragments"
- ],
- [
- "bool",
- "tc_copy"
- ],
- [
- "u8",
- "tc_class"
- ],
- {
- "crc": "0x28092156"
- }
- ]
- ],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "map_add_domain": {
- "reply": "map_add_domain_reply"
- },
- "map_del_domain": {
- "reply": "map_del_domain_reply"
- },
- "map_add_del_rule": {
- "reply": "map_add_del_rule_reply"
- },
- "map_domain_dump": {
- "reply": "map_domain_details",
- "stream": true
- },
- "map_rule_dump": {
- "reply": "map_rule_details",
- "stream": true
- },
- "map_if_enable_disable": {
- "reply": "map_if_enable_disable_reply"
- },
- "map_summary_stats": {
- "reply": "map_summary_stats_reply"
- },
- "map_param_set_fragmentation": {
- "reply": "map_param_set_fragmentation_reply"
- },
- "map_param_set_icmp": {
- "reply": "map_param_set_icmp_reply"
- },
- "map_param_set_icmp6": {
- "reply": "map_param_set_icmp6_reply"
- },
- "map_param_add_del_pre_resolve": {
- "reply": "map_param_add_del_pre_resolve_reply"
- },
- "map_param_set_security_check": {
- "reply": "map_param_set_security_check_reply"
- },
- "map_param_set_traffic_class": {
- "reply": "map_param_set_traffic_class_reply"
- },
- "map_param_set_tcp": {
- "reply": "map_param_set_tcp_reply"
- },
- "map_param_get": {
- "reply": "map_param_get_reply"
- }
- },
- "options": {
- "version": "4.1.1"
- },
- "aliases": {
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- },
- "interface_index": {
- "type": "u32"
- }
- },
- "vl_api_version": "0x42c84657"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/mdata.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/mdata.api.json
deleted file mode 100644
index 1f4b23e..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/mdata.api.json
+++ /dev/null
@@ -1,214 +0,0 @@
-{
- "types": [],
- "messages": [
- [
- "mdata_enable_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "enable_disable"
- ],
- {
- "crc": "0x2e7b47df"
- }
- ],
- [
- "mdata_enable_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [],
- "enums": [
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "mdata_enable_disable": {
- "reply": "mdata_enable_disable_reply"
- }
- },
- "options": {
- "version": "0.1.0"
- },
- "aliases": {
- "interface_index": {
- "type": "u32"
- }
- },
- "vl_api_version": "0x68055b0c"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/memif.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/memif.api.json
deleted file mode 100644
index 193e0a1..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/memif.api.json
+++ /dev/null
@@ -1,516 +0,0 @@
-{
- "types": [],
- "messages": [
- [
- "memif_socket_filename_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "u32",
- "socket_id"
- ],
- [
- "string",
- "socket_filename",
- 108
- ],
- {
- "crc": "0xa2ce1a10"
- }
- ],
- [
- "memif_socket_filename_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "memif_create",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_memif_role_t",
- "role"
- ],
- [
- "vl_api_memif_mode_t",
- "mode"
- ],
- [
- "u8",
- "rx_queues"
- ],
- [
- "u8",
- "tx_queues"
- ],
- [
- "u32",
- "id"
- ],
- [
- "u32",
- "socket_id"
- ],
- [
- "u32",
- "ring_size"
- ],
- [
- "u16",
- "buffer_size"
- ],
- [
- "bool",
- "no_zero_copy"
- ],
- [
- "vl_api_mac_address_t",
- "hw_addr"
- ],
- [
- "string",
- "secret",
- 24
- ],
- {
- "crc": "0xb1b25061"
- }
- ],
- [
- "memif_create_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0x5383d31f"
- }
- ],
- [
- "memif_delete",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0xf9e6675e"
- }
- ],
- [
- "memif_delete_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "memif_socket_filename_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "socket_id"
- ],
- [
- "string",
- "socket_filename",
- 108
- ],
- {
- "crc": "0x7ff326f7"
- }
- ],
- [
- "memif_socket_filename_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "memif_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "vl_api_mac_address_t",
- "hw_addr"
- ],
- [
- "u32",
- "id"
- ],
- [
- "vl_api_memif_role_t",
- "role"
- ],
- [
- "vl_api_memif_mode_t",
- "mode"
- ],
- [
- "bool",
- "zero_copy"
- ],
- [
- "u32",
- "socket_id"
- ],
- [
- "u32",
- "ring_size"
- ],
- [
- "u16",
- "buffer_size"
- ],
- [
- "vl_api_if_status_flags_t",
- "flags"
- ],
- [
- "string",
- "if_name",
- 64
- ],
- {
- "crc": "0xd0382c4c"
- }
- ],
- [
- "memif_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ]
- ],
- "unions": [],
- "enums": [
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "memif_role",
- [
- "MEMIF_ROLE_API_MASTER",
- 0
- ],
- [
- "MEMIF_ROLE_API_SLAVE",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "memif_mode",
- [
- "MEMIF_MODE_API_ETHERNET",
- 0
- ],
- [
- "MEMIF_MODE_API_IP",
- 1
- ],
- [
- "MEMIF_MODE_API_PUNT_INJECT",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "memif_socket_filename_add_del": {
- "reply": "memif_socket_filename_add_del_reply"
- },
- "memif_create": {
- "reply": "memif_create_reply"
- },
- "memif_delete": {
- "reply": "memif_delete_reply"
- },
- "memif_socket_filename_dump": {
- "reply": "memif_socket_filename_details",
- "stream": true
- },
- "memif_dump": {
- "reply": "memif_details",
- "stream": true
- }
- },
- "options": {
- "version": "3.0.0"
- },
- "aliases": {
- "interface_index": {
- "type": "u32"
- },
- "mac_address": {
- "type": "u8",
- "length": 6
- }
- },
- "vl_api_version": "0x88dc56c9"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/nat.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/nat.api.json
deleted file mode 100644
index f3382b9..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/nat.api.json
+++ /dev/null
@@ -1,4157 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ],
- [
- "nat44_lb_addr_port",
- [
- "vl_api_ip4_address_t",
- "addr"
- ],
- [
- "u16",
- "port"
- ],
- [
- "u8",
- "probability"
- ],
- [
- "u32",
- "vrf_id"
- ]
- ]
- ],
- "messages": [
- [
- "nat_control_ping",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "nat_control_ping_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "vpe_pid"
- ],
- {
- "crc": "0xf6b0b8ca"
- }
- ],
- [
- "nat_show_config",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "nat_show_config_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "bool",
- "static_mapping_only"
- ],
- [
- "bool",
- "static_mapping_connection_tracking"
- ],
- [
- "bool",
- "deterministic"
- ],
- [
- "bool",
- "endpoint_dependent"
- ],
- [
- "bool",
- "out2in_dpo"
- ],
- [
- "bool",
- "dslite_ce"
- ],
- [
- "u32",
- "translation_buckets"
- ],
- [
- "u32",
- "translation_memory_size"
- ],
- [
- "u32",
- "user_buckets"
- ],
- [
- "u32",
- "user_memory_size"
- ],
- [
- "u32",
- "max_translations_per_user"
- ],
- [
- "u32",
- "outside_vrf_id"
- ],
- [
- "u32",
- "inside_vrf_id"
- ],
- [
- "u32",
- "nat64_bib_buckets"
- ],
- [
- "u32",
- "nat64_bib_memory_size"
- ],
- [
- "u32",
- "nat64_st_buckets"
- ],
- [
- "u32",
- "nat64_st_memory_size"
- ],
- {
- "crc": "0x006a0786"
- }
- ],
- [
- "nat_set_log_level",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_nat_log_level_t",
- "log_level"
- ],
- {
- "crc": "0x70076bfe"
- }
- ],
- [
- "nat_set_log_level_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "nat_set_workers",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u64",
- "worker_mask"
- ],
- {
- "crc": "0xda926638"
- }
- ],
- [
- "nat_set_workers_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "nat_worker_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "nat_worker_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "worker_index"
- ],
- [
- "u32",
- "lcore_id"
- ],
- [
- "string",
- "name",
- 64
- ],
- {
- "crc": "0x84bf06fc"
- }
- ],
- [
- "nat_ipfix_enable_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "domain_id"
- ],
- [
- "u16",
- "src_port"
- ],
- [
- "bool",
- "enable"
- ],
- {
- "crc": "0x9af4a2d2"
- }
- ],
- [
- "nat_ipfix_enable_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "nat_set_timeouts",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "udp"
- ],
- [
- "u32",
- "tcp_established"
- ],
- [
- "u32",
- "tcp_transitory"
- ],
- [
- "u32",
- "icmp"
- ],
- {
- "crc": "0xd4746b16"
- }
- ],
- [
- "nat_set_timeouts_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "nat_get_timeouts",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "nat_get_timeouts_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "udp"
- ],
- [
- "u32",
- "tcp_established"
- ],
- [
- "u32",
- "tcp_transitory"
- ],
- [
- "u32",
- "icmp"
- ],
- {
- "crc": "0x3c4df4e1"
- }
- ],
- [
- "nat_set_addr_and_port_alloc_alg",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "alg"
- ],
- [
- "u8",
- "psid_offset"
- ],
- [
- "u8",
- "psid_length"
- ],
- [
- "u16",
- "psid"
- ],
- [
- "u16",
- "start_port"
- ],
- [
- "u16",
- "end_port"
- ],
- {
- "crc": "0xdeeb746f"
- }
- ],
- [
- "nat_set_addr_and_port_alloc_alg_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "nat_get_addr_and_port_alloc_alg",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "nat_get_addr_and_port_alloc_alg_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u8",
- "alg"
- ],
- [
- "u8",
- "psid_offset"
- ],
- [
- "u8",
- "psid_length"
- ],
- [
- "u16",
- "psid"
- ],
- [
- "u16",
- "start_port"
- ],
- [
- "u16",
- "end_port"
- ],
- {
- "crc": "0x3607a7d0"
- }
- ],
- [
- "nat_set_mss_clamping",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u16",
- "mss_value"
- ],
- [
- "bool",
- "enable"
- ],
- {
- "crc": "0x25e90abb"
- }
- ],
- [
- "nat_set_mss_clamping_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "nat_get_mss_clamping",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "nat_get_mss_clamping_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u16",
- "mss_value"
- ],
- [
- "bool",
- "enable"
- ],
- {
- "crc": "0x1c0b2a78"
- }
- ],
- [
- "nat_ha_set_listener",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ip4_address_t",
- "ip_address"
- ],
- [
- "u16",
- "port"
- ],
- [
- "u32",
- "path_mtu"
- ],
- {
- "crc": "0xe4a8cb4e"
- }
- ],
- [
- "nat_ha_set_listener_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "nat_ha_set_failover",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ip4_address_t",
- "ip_address"
- ],
- [
- "u16",
- "port"
- ],
- [
- "u32",
- "session_refresh_interval"
- ],
- {
- "crc": "0x718246af"
- }
- ],
- [
- "nat_ha_set_failover_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "nat_ha_get_listener",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "nat_ha_get_listener_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "vl_api_ip4_address_t",
- "ip_address"
- ],
- [
- "u16",
- "port"
- ],
- [
- "u32",
- "path_mtu"
- ],
- {
- "crc": "0x123ea41f"
- }
- ],
- [
- "nat_ha_get_failover",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "nat_ha_get_failover_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "vl_api_ip4_address_t",
- "ip_address"
- ],
- [
- "u16",
- "port"
- ],
- [
- "u32",
- "session_refresh_interval"
- ],
- {
- "crc": "0xa67d8752"
- }
- ],
- [
- "nat_ha_flush",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "nat_ha_flush_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "nat_ha_resync",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "want_resync_event"
- ],
- [
- "u32",
- "pid"
- ],
- {
- "crc": "0xc8ab9e03"
- }
- ],
- [
- "nat_ha_resync_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "nat_ha_resync_completed_event",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "pid"
- ],
- [
- "u32",
- "missed_count"
- ],
- {
- "crc": "0xfdc598fb"
- }
- ],
- [
- "nat44_add_del_address_range",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ip4_address_t",
- "first_ip_address"
- ],
- [
- "vl_api_ip4_address_t",
- "last_ip_address"
- ],
- [
- "u32",
- "vrf_id"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "vl_api_nat_config_flags_t",
- "flags"
- ],
- {
- "crc": "0xd4c7568c"
- }
- ],
- [
- "nat44_add_del_address_range_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "nat44_address_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "nat44_address_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ip4_address_t",
- "ip_address"
- ],
- [
- "vl_api_nat_config_flags_t",
- "flags"
- ],
- [
- "u32",
- "vrf_id"
- ],
- {
- "crc": "0x45410ac4"
- }
- ],
- [
- "nat44_interface_add_del_feature",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "vl_api_nat_config_flags_t",
- "flags"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0xf3699b83"
- }
- ],
- [
- "nat44_interface_add_del_feature_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "nat44_interface_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "nat44_interface_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_nat_config_flags_t",
- "flags"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0x5d286289"
- }
- ],
- [
- "nat44_interface_add_del_output_feature",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "vl_api_nat_config_flags_t",
- "flags"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0xf3699b83"
- }
- ],
- [
- "nat44_interface_add_del_output_feature_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "nat44_interface_output_feature_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "nat44_interface_output_feature_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_nat_config_flags_t",
- "flags"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0x5d286289"
- }
- ],
- [
- "nat44_add_del_static_mapping",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "vl_api_nat_config_flags_t",
- "flags"
- ],
- [
- "vl_api_ip4_address_t",
- "local_ip_address"
- ],
- [
- "vl_api_ip4_address_t",
- "external_ip_address"
- ],
- [
- "u8",
- "protocol"
- ],
- [
- "u16",
- "local_port"
- ],
- [
- "u16",
- "external_port"
- ],
- [
- "vl_api_interface_index_t",
- "external_sw_if_index"
- ],
- [
- "u32",
- "vrf_id"
- ],
- [
- "string",
- "tag",
- 64
- ],
- {
- "crc": "0xe165e83b"
- }
- ],
- [
- "nat44_add_del_static_mapping_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "nat44_static_mapping_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "nat44_static_mapping_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_nat_config_flags_t",
- "flags"
- ],
- [
- "vl_api_ip4_address_t",
- "local_ip_address"
- ],
- [
- "vl_api_ip4_address_t",
- "external_ip_address"
- ],
- [
- "u8",
- "protocol"
- ],
- [
- "u16",
- "local_port"
- ],
- [
- "u16",
- "external_port"
- ],
- [
- "vl_api_interface_index_t",
- "external_sw_if_index"
- ],
- [
- "u32",
- "vrf_id"
- ],
- [
- "string",
- "tag",
- 64
- ],
- {
- "crc": "0x1a433ef7"
- }
- ],
- [
- "nat44_add_del_identity_mapping",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "vl_api_nat_config_flags_t",
- "flags"
- ],
- [
- "vl_api_ip4_address_t",
- "ip_address"
- ],
- [
- "u8",
- "protocol"
- ],
- [
- "u16",
- "port"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "u32",
- "vrf_id"
- ],
- [
- "string",
- "tag",
- 64
- ],
- {
- "crc": "0x8e12743f"
- }
- ],
- [
- "nat44_add_del_identity_mapping_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "nat44_identity_mapping_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "nat44_identity_mapping_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_nat_config_flags_t",
- "flags"
- ],
- [
- "vl_api_ip4_address_t",
- "ip_address"
- ],
- [
- "u8",
- "protocol"
- ],
- [
- "u16",
- "port"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "u32",
- "vrf_id"
- ],
- [
- "string",
- "tag",
- 64
- ],
- {
- "crc": "0x36d21351"
- }
- ],
- [
- "nat44_add_del_interface_addr",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "vl_api_nat_config_flags_t",
- "flags"
- ],
- {
- "crc": "0xfc835325"
- }
- ],
- [
- "nat44_add_del_interface_addr_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "nat44_interface_addr_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "nat44_interface_addr_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "vl_api_nat_config_flags_t",
- "flags"
- ],
- {
- "crc": "0x3e687514"
- }
- ],
- [
- "nat44_user_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "nat44_user_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "vrf_id"
- ],
- [
- "vl_api_ip4_address_t",
- "ip_address"
- ],
- [
- "u32",
- "nsessions"
- ],
- [
- "u32",
- "nstaticsessions"
- ],
- {
- "crc": "0x355896c2"
- }
- ],
- [
- "nat44_user_session_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ip4_address_t",
- "ip_address"
- ],
- [
- "u32",
- "vrf_id"
- ],
- {
- "crc": "0xe1899c98"
- }
- ],
- [
- "nat44_user_session_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ip4_address_t",
- "outside_ip_address"
- ],
- [
- "u16",
- "outside_port"
- ],
- [
- "vl_api_ip4_address_t",
- "inside_ip_address"
- ],
- [
- "u16",
- "inside_port"
- ],
- [
- "u16",
- "protocol"
- ],
- [
- "vl_api_nat_config_flags_t",
- "flags"
- ],
- [
- "u64",
- "last_heard"
- ],
- [
- "u64",
- "total_bytes"
- ],
- [
- "u32",
- "total_pkts"
- ],
- [
- "vl_api_ip4_address_t",
- "ext_host_address"
- ],
- [
- "u16",
- "ext_host_port"
- ],
- [
- "vl_api_ip4_address_t",
- "ext_host_nat_address"
- ],
- [
- "u16",
- "ext_host_nat_port"
- ],
- {
- "crc": "0x1965fd69"
- }
- ],
- [
- "nat44_add_del_lb_static_mapping",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "vl_api_nat_config_flags_t",
- "flags"
- ],
- [
- "vl_api_ip4_address_t",
- "external_addr"
- ],
- [
- "u16",
- "external_port"
- ],
- [
- "u8",
- "protocol"
- ],
- [
- "u32",
- "affinity"
- ],
- [
- "string",
- "tag",
- 64
- ],
- [
- "u32",
- "local_num"
- ],
- [
- "vl_api_nat44_lb_addr_port_t",
- "locals",
- 0,
- "local_num"
- ],
- {
- "crc": "0x53b24611"
- }
- ],
- [
- "nat44_add_del_lb_static_mapping_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "nat44_lb_static_mapping_add_del_local",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "vl_api_ip4_address_t",
- "external_addr"
- ],
- [
- "u16",
- "external_port"
- ],
- [
- "u8",
- "protocol"
- ],
- [
- "vl_api_nat44_lb_addr_port_t",
- "local"
- ],
- {
- "crc": "0x2910a151"
- }
- ],
- [
- "nat44_lb_static_mapping_add_del_local_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "nat44_lb_static_mapping_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "nat44_lb_static_mapping_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ip4_address_t",
- "external_addr"
- ],
- [
- "u16",
- "external_port"
- ],
- [
- "u8",
- "protocol"
- ],
- [
- "vl_api_nat_config_flags_t",
- "flags"
- ],
- [
- "u32",
- "affinity"
- ],
- [
- "string",
- "tag",
- 64
- ],
- [
- "u32",
- "local_num"
- ],
- [
- "vl_api_nat44_lb_addr_port_t",
- "locals",
- 0,
- "local_num"
- ],
- {
- "crc": "0x2267b9e8"
- }
- ],
- [
- "nat44_del_session",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "protocol"
- ],
- [
- "u16",
- "port"
- ],
- [
- "u32",
- "vrf_id"
- ],
- [
- "vl_api_nat_config_flags_t",
- "flags"
- ],
- [
- "vl_api_ip4_address_t",
- "ext_host_address"
- ],
- [
- "u16",
- "ext_host_port"
- ],
- {
- "crc": "0x4c49c387"
- }
- ],
- [
- "nat44_del_session_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "nat44_forwarding_enable_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "enable"
- ],
- {
- "crc": "0xb3e225d2"
- }
- ],
- [
- "nat44_forwarding_enable_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "nat44_forwarding_is_enabled",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "nat44_forwarding_is_enabled_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "enabled"
- ],
- {
- "crc": "0x46924a06"
- }
- ],
- [
- "nat_det_add_del_map",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "vl_api_ip4_address_t",
- "in_addr"
- ],
- [
- "u8",
- "in_plen"
- ],
- [
- "vl_api_ip4_address_t",
- "out_addr"
- ],
- [
- "u8",
- "out_plen"
- ],
- {
- "crc": "0x112fde05"
- }
- ],
- [
- "nat_det_add_del_map_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "nat_det_forward",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ip4_address_t",
- "in_addr"
- ],
- {
- "crc": "0x7f8a89cd"
- }
- ],
- [
- "nat_det_forward_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u16",
- "out_port_lo"
- ],
- [
- "u16",
- "out_port_hi"
- ],
- [
- "vl_api_ip4_address_t",
- "out_addr"
- ],
- {
- "crc": "0xa8ccbdc0"
- }
- ],
- [
- "nat_det_reverse",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u16",
- "out_port"
- ],
- [
- "vl_api_ip4_address_t",
- "out_addr"
- ],
- {
- "crc": "0xa7573fe1"
- }
- ],
- [
- "nat_det_reverse_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "vl_api_ip4_address_t",
- "in_addr"
- ],
- {
- "crc": "0x34066d48"
- }
- ],
- [
- "nat_det_map_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "nat_det_map_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ip4_address_t",
- "in_addr"
- ],
- [
- "u8",
- "in_plen"
- ],
- [
- "vl_api_ip4_address_t",
- "out_addr"
- ],
- [
- "u8",
- "out_plen"
- ],
- [
- "u32",
- "sharing_ratio"
- ],
- [
- "u16",
- "ports_per_host"
- ],
- [
- "u32",
- "ses_num"
- ],
- {
- "crc": "0x88000ee1"
- }
- ],
- [
- "nat_det_close_session_out",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ip4_address_t",
- "out_addr"
- ],
- [
- "u16",
- "out_port"
- ],
- [
- "vl_api_ip4_address_t",
- "ext_addr"
- ],
- [
- "u16",
- "ext_port"
- ],
- {
- "crc": "0xc1b6cbfb"
- }
- ],
- [
- "nat_det_close_session_out_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "nat_det_close_session_in",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ip4_address_t",
- "in_addr"
- ],
- [
- "u16",
- "in_port"
- ],
- [
- "vl_api_ip4_address_t",
- "ext_addr"
- ],
- [
- "u16",
- "ext_port"
- ],
- {
- "crc": "0x0a10ef64"
- }
- ],
- [
- "nat_det_close_session_in_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "nat_det_session_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ip4_address_t",
- "user_addr"
- ],
- {
- "crc": "0xe45a3af7"
- }
- ],
- [
- "nat_det_session_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u16",
- "in_port"
- ],
- [
- "vl_api_ip4_address_t",
- "ext_addr"
- ],
- [
- "u16",
- "ext_port"
- ],
- [
- "u16",
- "out_port"
- ],
- [
- "u8",
- "state"
- ],
- [
- "u32",
- "expire"
- ],
- {
- "crc": "0x27f3c171"
- }
- ],
- [
- "nat64_add_del_pool_addr_range",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ip4_address_t",
- "start_addr"
- ],
- [
- "vl_api_ip4_address_t",
- "end_addr"
- ],
- [
- "u32",
- "vrf_id"
- ],
- [
- "bool",
- "is_add"
- ],
- {
- "crc": "0x21234ef3"
- }
- ],
- [
- "nat64_add_del_pool_addr_range_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "nat64_pool_addr_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "nat64_pool_addr_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u32",
- "vrf_id"
- ],
- {
- "crc": "0x9bb99cdb"
- }
- ],
- [
- "nat64_add_del_interface",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "vl_api_nat_config_flags_t",
- "flags"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0xf3699b83"
- }
- ],
- [
- "nat64_add_del_interface_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "nat64_interface_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "nat64_interface_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_nat_config_flags_t",
- "flags"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0x5d286289"
- }
- ],
- [
- "nat64_add_del_static_bib",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ip6_address_t",
- "i_addr"
- ],
- [
- "vl_api_ip4_address_t",
- "o_addr"
- ],
- [
- "u16",
- "i_port"
- ],
- [
- "u16",
- "o_port"
- ],
- [
- "u32",
- "vrf_id"
- ],
- [
- "u8",
- "proto"
- ],
- [
- "bool",
- "is_add"
- ],
- {
- "crc": "0x90fae58a"
- }
- ],
- [
- "nat64_add_del_static_bib_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "nat64_bib_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "proto"
- ],
- {
- "crc": "0xcfcb6b75"
- }
- ],
- [
- "nat64_bib_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ip6_address_t",
- "i_addr"
- ],
- [
- "vl_api_ip4_address_t",
- "o_addr"
- ],
- [
- "u16",
- "i_port"
- ],
- [
- "u16",
- "o_port"
- ],
- [
- "u32",
- "vrf_id"
- ],
- [
- "u8",
- "proto"
- ],
- [
- "vl_api_nat_config_flags_t",
- "flags"
- ],
- [
- "u32",
- "ses_num"
- ],
- {
- "crc": "0x62c8541d"
- }
- ],
- [
- "nat64_st_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "proto"
- ],
- {
- "crc": "0xcfcb6b75"
- }
- ],
- [
- "nat64_st_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ip6_address_t",
- "il_addr"
- ],
- [
- "vl_api_ip4_address_t",
- "ol_addr"
- ],
- [
- "u16",
- "il_port"
- ],
- [
- "u16",
- "ol_port"
- ],
- [
- "vl_api_ip6_address_t",
- "ir_addr"
- ],
- [
- "vl_api_ip4_address_t",
- "or_addr"
- ],
- [
- "u16",
- "r_port"
- ],
- [
- "u32",
- "vrf_id"
- ],
- [
- "u8",
- "proto"
- ],
- {
- "crc": "0xc770d620"
- }
- ],
- [
- "nat64_add_del_prefix",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ip6_prefix_t",
- "prefix"
- ],
- [
- "u32",
- "vrf_id"
- ],
- [
- "bool",
- "is_add"
- ],
- {
- "crc": "0x727b2f4c"
- }
- ],
- [
- "nat64_add_del_prefix_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "nat64_prefix_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "nat64_prefix_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ip6_prefix_t",
- "prefix"
- ],
- [
- "u32",
- "vrf_id"
- ],
- {
- "crc": "0x20568de3"
- }
- ],
- [
- "nat64_add_del_interface_addr",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0x47d6e753"
- }
- ],
- [
- "nat64_add_del_interface_addr_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "dslite_add_del_pool_addr_range",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ip4_address_t",
- "start_addr"
- ],
- [
- "vl_api_ip4_address_t",
- "end_addr"
- ],
- [
- "bool",
- "is_add"
- ],
- {
- "crc": "0xc448457a"
- }
- ],
- [
- "dslite_add_del_pool_addr_range_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "dslite_address_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "dslite_address_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ip4_address_t",
- "ip_address"
- ],
- {
- "crc": "0xec26d648"
- }
- ],
- [
- "dslite_set_aftr_addr",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ip4_address_t",
- "ip4_addr"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6_addr"
- ],
- {
- "crc": "0x1e955f8d"
- }
- ],
- [
- "dslite_set_aftr_addr_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "dslite_get_aftr_addr",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "dslite_get_aftr_addr_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "vl_api_ip4_address_t",
- "ip4_addr"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6_addr"
- ],
- {
- "crc": "0x38e30db1"
- }
- ],
- [
- "dslite_set_b4_addr",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ip4_address_t",
- "ip4_addr"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6_addr"
- ],
- {
- "crc": "0x1e955f8d"
- }
- ],
- [
- "dslite_set_b4_addr_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "dslite_get_b4_addr",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "dslite_get_b4_addr_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "vl_api_ip4_address_t",
- "ip4_addr"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6_addr"
- ],
- {
- "crc": "0x38e30db1"
- }
- ],
- [
- "nat66_add_del_interface",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "vl_api_nat_config_flags_t",
- "flags"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0xf3699b83"
- }
- ],
- [
- "nat66_add_del_interface_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "nat66_interface_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "nat66_interface_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_nat_config_flags_t",
- "flags"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0x5d286289"
- }
- ],
- [
- "nat66_add_del_static_mapping",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "vl_api_ip6_address_t",
- "local_ip_address"
- ],
- [
- "vl_api_ip6_address_t",
- "external_ip_address"
- ],
- [
- "u32",
- "vrf_id"
- ],
- {
- "crc": "0xfb64e50b"
- }
- ],
- [
- "nat66_add_del_static_mapping_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "nat66_static_mapping_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "nat66_static_mapping_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_ip6_address_t",
- "local_ip_address"
- ],
- [
- "vl_api_ip6_address_t",
- "external_ip_address"
- ],
- [
- "u32",
- "vrf_id"
- ],
- [
- "u64",
- "total_bytes"
- ],
- [
- "u64",
- "total_pkts"
- ],
- {
- "crc": "0x5c568448"
- }
- ]
- ],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "nat_config_flags",
- [
- "NAT_IS_NONE",
- 0
- ],
- [
- "NAT_IS_TWICE_NAT",
- 1
- ],
- [
- "NAT_IS_SELF_TWICE_NAT",
- 2
- ],
- [
- "NAT_IS_OUT2IN_ONLY",
- 4
- ],
- [
- "NAT_IS_ADDR_ONLY",
- 8
- ],
- [
- "NAT_IS_OUTSIDE",
- 16
- ],
- [
- "NAT_IS_INSIDE",
- 32
- ],
- [
- "NAT_IS_STATIC",
- 64
- ],
- [
- "NAT_IS_EXT_HOST_VALID",
- 128
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "nat_log_level",
- [
- "NAT_LOG_NONE",
- 0
- ],
- [
- "NAT_LOG_ERROR",
- 1
- ],
- [
- "NAT_LOG_WARNING",
- 2
- ],
- [
- "NAT_LOG_NOTICE",
- 3
- ],
- [
- "NAT_LOG_INFO",
- 4
- ],
- [
- "NAT_LOG_DEBUG",
- 5
- ],
- {
- "enumtype": "u8"
- }
- ]
- ],
- "services": {
- "nat_ha_resync": {
- "reply": "nat_ha_resync_reply",
- "events": [
- "nat_ha_resync_completed_event"
- ]
- },
- "nat_control_ping": {
- "reply": "nat_control_ping_reply"
- },
- "nat_show_config": {
- "reply": "nat_show_config_reply"
- },
- "nat_set_log_level": {
- "reply": "nat_set_log_level_reply"
- },
- "nat_set_workers": {
- "reply": "nat_set_workers_reply"
- },
- "nat_worker_dump": {
- "reply": "nat_worker_details",
- "stream": true
- },
- "nat_ipfix_enable_disable": {
- "reply": "nat_ipfix_enable_disable_reply"
- },
- "nat_set_timeouts": {
- "reply": "nat_set_timeouts_reply"
- },
- "nat_get_timeouts": {
- "reply": "nat_get_timeouts_reply"
- },
- "nat_set_addr_and_port_alloc_alg": {
- "reply": "nat_set_addr_and_port_alloc_alg_reply"
- },
- "nat_get_addr_and_port_alloc_alg": {
- "reply": "nat_get_addr_and_port_alloc_alg_reply"
- },
- "nat_set_mss_clamping": {
- "reply": "nat_set_mss_clamping_reply"
- },
- "nat_get_mss_clamping": {
- "reply": "nat_get_mss_clamping_reply"
- },
- "nat_ha_set_listener": {
- "reply": "nat_ha_set_listener_reply"
- },
- "nat_ha_set_failover": {
- "reply": "nat_ha_set_failover_reply"
- },
- "nat_ha_get_listener": {
- "reply": "nat_ha_get_listener_reply"
- },
- "nat_ha_get_failover": {
- "reply": "nat_ha_get_failover_reply"
- },
- "nat_ha_flush": {
- "reply": "nat_ha_flush_reply"
- },
- "nat44_add_del_address_range": {
- "reply": "nat44_add_del_address_range_reply"
- },
- "nat44_address_dump": {
- "reply": "nat44_address_details",
- "stream": true
- },
- "nat44_interface_add_del_feature": {
- "reply": "nat44_interface_add_del_feature_reply"
- },
- "nat44_interface_dump": {
- "reply": "nat44_interface_details",
- "stream": true
- },
- "nat44_interface_add_del_output_feature": {
- "reply": "nat44_interface_add_del_output_feature_reply"
- },
- "nat44_interface_output_feature_dump": {
- "reply": "nat44_interface_output_feature_details",
- "stream": true
- },
- "nat44_add_del_static_mapping": {
- "reply": "nat44_add_del_static_mapping_reply"
- },
- "nat44_static_mapping_dump": {
- "reply": "nat44_static_mapping_details",
- "stream": true
- },
- "nat44_add_del_identity_mapping": {
- "reply": "nat44_add_del_identity_mapping_reply"
- },
- "nat44_identity_mapping_dump": {
- "reply": "nat44_identity_mapping_details",
- "stream": true
- },
- "nat44_add_del_interface_addr": {
- "reply": "nat44_add_del_interface_addr_reply"
- },
- "nat44_interface_addr_dump": {
- "reply": "nat44_interface_addr_details",
- "stream": true
- },
- "nat44_user_dump": {
- "reply": "nat44_user_details",
- "stream": true
- },
- "nat44_user_session_dump": {
- "reply": "nat44_user_session_details",
- "stream": true
- },
- "nat44_add_del_lb_static_mapping": {
- "reply": "nat44_add_del_lb_static_mapping_reply"
- },
- "nat44_lb_static_mapping_add_del_local": {
- "reply": "nat44_lb_static_mapping_add_del_local_reply"
- },
- "nat44_lb_static_mapping_dump": {
- "reply": "nat44_lb_static_mapping_details",
- "stream": true
- },
- "nat44_del_session": {
- "reply": "nat44_del_session_reply"
- },
- "nat44_forwarding_enable_disable": {
- "reply": "nat44_forwarding_enable_disable_reply"
- },
- "nat44_forwarding_is_enabled": {
- "reply": "nat44_forwarding_is_enabled_reply"
- },
- "nat_det_add_del_map": {
- "reply": "nat_det_add_del_map_reply"
- },
- "nat_det_forward": {
- "reply": "nat_det_forward_reply"
- },
- "nat_det_reverse": {
- "reply": "nat_det_reverse_reply"
- },
- "nat_det_map_dump": {
- "reply": "nat_det_map_details",
- "stream": true
- },
- "nat_det_close_session_out": {
- "reply": "nat_det_close_session_out_reply"
- },
- "nat_det_close_session_in": {
- "reply": "nat_det_close_session_in_reply"
- },
- "nat_det_session_dump": {
- "reply": "nat_det_session_details",
- "stream": true
- },
- "nat64_add_del_pool_addr_range": {
- "reply": "nat64_add_del_pool_addr_range_reply"
- },
- "nat64_pool_addr_dump": {
- "reply": "nat64_pool_addr_details",
- "stream": true
- },
- "nat64_add_del_interface": {
- "reply": "nat64_add_del_interface_reply"
- },
- "nat64_interface_dump": {
- "reply": "nat64_interface_details",
- "stream": true
- },
- "nat64_add_del_static_bib": {
- "reply": "nat64_add_del_static_bib_reply"
- },
- "nat64_bib_dump": {
- "reply": "nat64_bib_details",
- "stream": true
- },
- "nat64_st_dump": {
- "reply": "nat64_st_details",
- "stream": true
- },
- "nat64_add_del_prefix": {
- "reply": "nat64_add_del_prefix_reply"
- },
- "nat64_prefix_dump": {
- "reply": "nat64_prefix_details",
- "stream": true
- },
- "nat64_add_del_interface_addr": {
- "reply": "nat64_add_del_interface_addr_reply"
- },
- "dslite_add_del_pool_addr_range": {
- "reply": "dslite_add_del_pool_addr_range_reply"
- },
- "dslite_address_dump": {
- "reply": "dslite_address_details",
- "stream": true
- },
- "dslite_set_aftr_addr": {
- "reply": "dslite_set_aftr_addr_reply"
- },
- "dslite_get_aftr_addr": {
- "reply": "dslite_get_aftr_addr_reply"
- },
- "dslite_set_b4_addr": {
- "reply": "dslite_set_b4_addr_reply"
- },
- "dslite_get_b4_addr": {
- "reply": "dslite_get_b4_addr_reply"
- },
- "nat66_add_del_interface": {
- "reply": "nat66_add_del_interface_reply"
- },
- "nat66_interface_dump": {
- "reply": "nat66_interface_details",
- "stream": true
- },
- "nat66_add_del_static_mapping": {
- "reply": "nat66_add_del_static_mapping_reply"
- },
- "nat66_static_mapping_dump": {
- "reply": "nat66_static_mapping_details",
- "stream": true
- }
- },
- "options": {
- "version": "5.2.0"
- },
- "aliases": {
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- },
- "interface_index": {
- "type": "u32"
- }
- },
- "vl_api_version": "0xef1a1c94"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/nsh.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/nsh.api.json
deleted file mode 100644
index fd8e422..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/nsh.api.json
+++ /dev/null
@@ -1,499 +0,0 @@
-{
- "types": [],
- "messages": [
- [
- "nsh_add_del_entry",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "u32",
- "nsp_nsi"
- ],
- [
- "u8",
- "md_type"
- ],
- [
- "u8",
- "ver_o_c"
- ],
- [
- "u8",
- "ttl"
- ],
- [
- "u8",
- "length"
- ],
- [
- "u8",
- "next_protocol"
- ],
- [
- "u32",
- "c1"
- ],
- [
- "u32",
- "c2"
- ],
- [
- "u32",
- "c3"
- ],
- [
- "u32",
- "c4"
- ],
- [
- "u8",
- "tlv_length"
- ],
- [
- "u8",
- "tlv",
- 248
- ],
- {
- "crc": "0x7dea480b"
- }
- ],
- [
- "nsh_add_del_entry_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "entry_index"
- ],
- {
- "crc": "0x6296a9eb"
- }
- ],
- [
- "nsh_entry_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "entry_index"
- ],
- {
- "crc": "0xcdaf8ccb"
- }
- ],
- [
- "nsh_entry_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "entry_index"
- ],
- [
- "u32",
- "nsp_nsi"
- ],
- [
- "u8",
- "md_type"
- ],
- [
- "u8",
- "ver_o_c"
- ],
- [
- "u8",
- "ttl"
- ],
- [
- "u8",
- "length"
- ],
- [
- "u8",
- "next_protocol"
- ],
- [
- "u32",
- "c1"
- ],
- [
- "u32",
- "c2"
- ],
- [
- "u32",
- "c3"
- ],
- [
- "u32",
- "c4"
- ],
- [
- "u8",
- "tlv_length"
- ],
- [
- "u8",
- "tlv",
- 248
- ],
- {
- "crc": "0x046fb556"
- }
- ],
- [
- "nsh_add_del_map",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "u32",
- "nsp_nsi"
- ],
- [
- "u32",
- "mapped_nsp_nsi"
- ],
- [
- "u32",
- "nsh_action"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "vl_api_interface_index_t",
- "rx_sw_if_index"
- ],
- [
- "u32",
- "next_node"
- ],
- {
- "crc": "0x898d857d"
- }
- ],
- [
- "nsh_add_del_map_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u32",
- "map_index"
- ],
- {
- "crc": "0xb2b127ef"
- }
- ],
- [
- "nsh_map_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "map_index"
- ],
- {
- "crc": "0x8fc06b82"
- }
- ],
- [
- "nsh_map_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "map_index"
- ],
- [
- "u32",
- "nsp_nsi"
- ],
- [
- "u32",
- "mapped_nsp_nsi"
- ],
- [
- "u32",
- "nsh_action"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "vl_api_interface_index_t",
- "rx_sw_if_index"
- ],
- [
- "u32",
- "next_node"
- ],
- {
- "crc": "0xb34ac8a1"
- }
- ]
- ],
- "unions": [],
- "enums": [
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "nsh_add_del_entry": {
- "reply": "nsh_add_del_entry_reply"
- },
- "nsh_entry_dump": {
- "reply": "nsh_entry_details",
- "stream": true
- },
- "nsh_add_del_map": {
- "reply": "nsh_add_del_map_reply"
- },
- "nsh_map_dump": {
- "reply": "nsh_map_details",
- "stream": true
- }
- },
- "options": {
- "version": "1.0.0"
- },
- "aliases": {
- "interface_index": {
- "type": "u32"
- }
- },
- "vl_api_version": "0xac2c8897"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/nsim.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/nsim.api.json
deleted file mode 100644
index 1e1e9fa..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/nsim.api.json
+++ /dev/null
@@ -1,324 +0,0 @@
-{
- "types": [],
- "messages": [
- [
- "nsim_cross_connect_enable_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "enable_disable"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index0"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index1"
- ],
- {
- "crc": "0x16f70bdf"
- }
- ],
- [
- "nsim_cross_connect_enable_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "nsim_output_feature_enable_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "enable_disable"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0x3865946c"
- }
- ],
- [
- "nsim_output_feature_enable_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "nsim_configure",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "delay_in_usec"
- ],
- [
- "u32",
- "average_packet_size"
- ],
- [
- "u64",
- "bandwidth_in_bits_per_second"
- ],
- [
- "u32",
- "packets_per_drop"
- ],
- {
- "crc": "0x16ed400f"
- }
- ],
- [
- "nsim_configure_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [],
- "enums": [
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "nsim_cross_connect_enable_disable": {
- "reply": "nsim_cross_connect_enable_disable_reply"
- },
- "nsim_output_feature_enable_disable": {
- "reply": "nsim_output_feature_enable_disable_reply"
- },
- "nsim_configure": {
- "reply": "nsim_configure_reply"
- }
- },
- "options": {
- "version": "2.1.1"
- },
- "aliases": {
- "interface_index": {
- "type": "u32"
- }
- },
- "vl_api_version": "0xd61e346f"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/oddbuf.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/oddbuf.api.json
deleted file mode 100644
index da2baa5..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/oddbuf.api.json
+++ /dev/null
@@ -1,218 +0,0 @@
-{
- "types": [],
- "messages": [
- [
- "oddbuf_enable_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "enable_disable"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0x3865946c"
- }
- ],
- [
- "oddbuf_enable_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [],
- "enums": [
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "oddbuf_enable_disable": {
- "reply": "oddbuf_enable_disable_reply"
- }
- },
- "options": {
- "version": "0.1.0"
- },
- "aliases": {
- "interface_index": {
- "type": "u32"
- }
- },
- "vl_api_version": "0x570f3132"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/pot.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/pot.api.json
deleted file mode 100644
index c15eed4..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/pot.api.json
+++ /dev/null
@@ -1,258 +0,0 @@
-{
- "types": [],
- "messages": [
- [
- "pot_profile_add",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "id"
- ],
- [
- "u8",
- "validator"
- ],
- [
- "u64",
- "secret_key"
- ],
- [
- "u64",
- "secret_share"
- ],
- [
- "u64",
- "prime"
- ],
- [
- "u8",
- "max_bits"
- ],
- [
- "u64",
- "lpc"
- ],
- [
- "u64",
- "polynomial_public"
- ],
- [
- "string",
- "list_name",
- 0
- ],
- {
- "crc": "0xad5da3a3"
- }
- ],
- [
- "pot_profile_add_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "pot_profile_activate",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "id"
- ],
- [
- "string",
- "list_name",
- 0
- ],
- {
- "crc": "0x0770af98"
- }
- ],
- [
- "pot_profile_activate_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "pot_profile_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "string",
- "list_name",
- 0
- ],
- {
- "crc": "0xcd63f53b"
- }
- ],
- [
- "pot_profile_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "pot_profile_show_config_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "id"
- ],
- {
- "crc": "0x005b7d59"
- }
- ],
- [
- "pot_profile_show_config_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u8",
- "id"
- ],
- [
- "u8",
- "validator"
- ],
- [
- "u64",
- "secret_key"
- ],
- [
- "u64",
- "secret_share"
- ],
- [
- "u64",
- "prime"
- ],
- [
- "u64",
- "bit_mask"
- ],
- [
- "u64",
- "lpc"
- ],
- [
- "u64",
- "polynomial_public"
- ],
- {
- "crc": "0xb7ce0618"
- }
- ]
- ],
- "unions": [],
- "enums": [],
- "services": {
- "pot_profile_add": {
- "reply": "pot_profile_add_reply"
- },
- "pot_profile_activate": {
- "reply": "pot_profile_activate_reply"
- },
- "pot_profile_del": {
- "reply": "pot_profile_del_reply"
- },
- "pot_profile_show_config_dump": {
- "reply": "pot_profile_show_config_details",
- "stream": true
- }
- },
- "options": {
- "version": "1.0.0"
- },
- "aliases": {},
- "vl_api_version": "0xa9d8e55c"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/pppoe.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/pppoe.api.json
deleted file mode 100644
index c34bf3a..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/pppoe.api.json
+++ /dev/null
@@ -1,590 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ]
- ],
- "messages": [
- [
- "pppoe_add_del_session",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "u16",
- "session_id"
- ],
- [
- "vl_api_address_t",
- "client_ip"
- ],
- [
- "u32",
- "decap_vrf_id"
- ],
- [
- "vl_api_mac_address_t",
- "client_mac"
- ],
- {
- "crc": "0x46ace853"
- }
- ],
- [
- "pppoe_add_del_session_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0x5383d31f"
- }
- ],
- [
- "pppoe_session_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0xf9e6675e"
- }
- ],
- [
- "pppoe_session_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "u16",
- "session_id"
- ],
- [
- "vl_api_address_t",
- "client_ip"
- ],
- [
- "vl_api_interface_index_t",
- "encap_if_index"
- ],
- [
- "u32",
- "decap_vrf_id"
- ],
- [
- "vl_api_mac_address_t",
- "local_mac"
- ],
- [
- "vl_api_mac_address_t",
- "client_mac"
- ],
- {
- "crc": "0x332bc742"
- }
- ]
- ],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "pppoe_add_del_session": {
- "reply": "pppoe_add_del_session_reply"
- },
- "pppoe_session_dump": {
- "reply": "pppoe_session_details",
- "stream": true
- }
- },
- "options": {
- "version": "2.0.0"
- },
- "aliases": {
- "interface_index": {
- "type": "u32"
- },
- "mac_address": {
- "type": "u8",
- "length": 6
- },
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- }
- },
- "vl_api_version": "0xb83e4d5f"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/rdma.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/rdma.api.json
deleted file mode 100644
index 692e604..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/rdma.api.json
+++ /dev/null
@@ -1,313 +0,0 @@
-{
- "types": [],
- "messages": [
- [
- "rdma_create",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "string",
- "host_if",
- 64
- ],
- [
- "string",
- "name",
- 64
- ],
- [
- "u16",
- "rxq_num",
- {
- "default": 1
- }
- ],
- [
- "u16",
- "rxq_size",
- {
- "default": 1024
- }
- ],
- [
- "u16",
- "txq_size",
- {
- "default": 1024
- }
- ],
- [
- "vl_api_rdma_mode_t",
- "mode",
- {
- "default": 0
- }
- ],
- {
- "crc": "0x076fe418"
- }
- ],
- [
- "rdma_create_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0x5383d31f"
- }
- ],
- [
- "rdma_delete",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0xf9e6675e"
- }
- ],
- [
- "rdma_delete_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [],
- "enums": [
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rdma_mode",
- [
- "RDMA_API_MODE_AUTO",
- 0
- ],
- [
- "RDMA_API_MODE_IBV",
- 1
- ],
- [
- "RDMA_API_MODE_DV",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "rdma_create": {
- "reply": "rdma_create_reply"
- },
- "rdma_delete": {
- "reply": "rdma_delete_reply"
- }
- },
- "options": {
- "version": "1.0.0"
- },
- "aliases": {
- "interface_index": {
- "type": "u32"
- }
- },
- "vl_api_version": "0x5ce233e0"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/sctp.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/sctp.api.json
deleted file mode 100644
index 170ef26..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/sctp.api.json
+++ /dev/null
@@ -1,175 +0,0 @@
-{
- "types": [],
- "messages": [
- [
- "sctp_add_src_dst_connection",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_ipv6"
- ],
- [
- "u32",
- "vrf_id"
- ],
- [
- "u8",
- "src_address",
- 16
- ],
- [
- "u8",
- "dst_address",
- 16
- ],
- {
- "crc": "0x45c59b2f"
- }
- ],
- [
- "sctp_add_src_dst_connection_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "sctp_del_src_dst_connection",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "is_ipv6"
- ],
- [
- "u32",
- "vrf_id"
- ],
- [
- "u8",
- "src_address",
- 16
- ],
- [
- "u8",
- "dst_address",
- 16
- ],
- {
- "crc": "0x45c59b2f"
- }
- ],
- [
- "sctp_del_src_dst_connection_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "sctp_config",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "never_delay_sack"
- ],
- [
- "u8",
- "never_bundle"
- ],
- {
- "crc": "0x7617eced"
- }
- ],
- [
- "sctp_config_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [],
- "enums": [],
- "services": {
- "sctp_add_src_dst_connection": {
- "reply": "sctp_add_src_dst_connection_reply"
- },
- "sctp_del_src_dst_connection": {
- "reply": "sctp_del_src_dst_connection_reply"
- },
- "sctp_config": {
- "reply": "sctp_config_reply"
- }
- },
- "options": {
- "version": "1.0.0"
- },
- "aliases": {},
- "vl_api_version": "0x35f411c4"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/stn.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/stn.api.json
deleted file mode 100644
index abb385e..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/stn.api.json
+++ /dev/null
@@ -1,550 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ]
- ],
- "messages": [
- [
- "stn_add_del_rule",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_address_t",
- "ip_address"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "bool",
- "is_add"
- ],
- {
- "crc": "0x53f751e6"
- }
- ],
- [
- "stn_add_del_rule_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "stn_rules_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "stn_rules_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_address_t",
- "ip_address"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0xb0f6606c"
- }
- ]
- ],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "stn_add_del_rule": {
- "reply": "stn_add_del_rule_reply"
- },
- "stn_rules_dump": {
- "reply": "stn_rules_details",
- "stream": true
- }
- },
- "options": {
- "version": "2.0.0"
- },
- "aliases": {
- "interface_index": {
- "type": "u32"
- },
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- }
- },
- "vl_api_version": "0x619d8f3"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/svs.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/svs.api.json
deleted file mode 100644
index 942d112..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/svs.api.json
+++ /dev/null
@@ -1,707 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ]
- ],
- "messages": [
- [
- "svs_plugin_get_version",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "svs_plugin_get_version_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "major"
- ],
- [
- "u32",
- "minor"
- ],
- {
- "crc": "0x9b32cf86"
- }
- ],
- [
- "svs_table_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u32",
- "table_id"
- ],
- {
- "crc": "0x7d21cb2a"
- }
- ],
- [
- "svs_table_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "svs_route_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_add"
- ],
- [
- "vl_api_prefix_t",
- "prefix"
- ],
- [
- "u32",
- "table_id"
- ],
- [
- "u32",
- "source_table_id"
- ],
- {
- "crc": "0xd39e31fc"
- }
- ],
- [
- "svs_route_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "svs_enable_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_enable"
- ],
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u32",
- "table_id"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0x634b89d2"
- }
- ],
- [
- "svs_enable_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "svs_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "svs_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "table_id"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "vl_api_address_family_t",
- "af"
- ],
- {
- "crc": "0xb8523d64"
- }
- ]
- ],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "svs_plugin_get_version": {
- "reply": "svs_plugin_get_version_reply"
- },
- "svs_table_add_del": {
- "reply": "svs_table_add_del_reply"
- },
- "svs_route_add_del": {
- "reply": "svs_route_add_del_reply"
- },
- "svs_enable_disable": {
- "reply": "svs_enable_disable_reply"
- },
- "svs_dump": {
- "reply": "svs_details",
- "stream": true
- }
- },
- "options": {
- "version": "1.0.0"
- },
- "aliases": {
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- },
- "interface_index": {
- "type": "u32"
- }
- },
- "vl_api_version": "0xf870d4cb"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/tls_openssl.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/tls_openssl.api.json
deleted file mode 100644
index 1d9b9e6..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/tls_openssl.api.json
+++ /dev/null
@@ -1,72 +0,0 @@
-{
- "types": [],
- "messages": [
- [
- "tls_openssl_set_engine",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "async_enable"
- ],
- [
- "u8",
- "engine",
- 64
- ],
- [
- "u8",
- "algorithm",
- 64
- ],
- [
- "u8",
- "ciphers",
- 64
- ],
- {
- "crc": "0xe34d95c1"
- }
- ],
- [
- "tls_openssl_set_engine_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [],
- "enums": [],
- "services": {
- "tls_openssl_set_engine": {
- "reply": "tls_openssl_set_engine_reply"
- }
- },
- "options": {
- "version": "2.0.0"
- },
- "aliases": {},
- "vl_api_version": "0x7386fbcd"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/trace.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/trace.api.json
deleted file mode 100644
index b6d5e68..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/trace.api.json
+++ /dev/null
@@ -1,171 +0,0 @@
-{
- "types": [],
- "messages": [
- [
- "trace_profile_add",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u8",
- "trace_type"
- ],
- [
- "u8",
- "num_elts"
- ],
- [
- "u8",
- "trace_tsp"
- ],
- [
- "u32",
- "node_id"
- ],
- [
- "u32",
- "app_data"
- ],
- {
- "crc": "0xde08aa6d"
- }
- ],
- [
- "trace_profile_add_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "trace_profile_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "trace_profile_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "trace_profile_show_config",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ],
- [
- "trace_profile_show_config_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "u8",
- "trace_type"
- ],
- [
- "u8",
- "num_elts"
- ],
- [
- "u8",
- "trace_tsp"
- ],
- [
- "u32",
- "node_id"
- ],
- [
- "u32",
- "app_data"
- ],
- {
- "crc": "0x0f1d374c"
- }
- ]
- ],
- "unions": [],
- "enums": [],
- "services": {
- "trace_profile_add": {
- "reply": "trace_profile_add_reply"
- },
- "trace_profile_del": {
- "reply": "trace_profile_del_reply"
- },
- "trace_profile_show_config": {
- "reply": "trace_profile_show_config_reply"
- }
- },
- "options": {
- "version": "1.0.0"
- },
- "aliases": {},
- "vl_api_version": "0x397cbf90"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/udp_ping.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/udp_ping.api.json
deleted file mode 100644
index 8881a39..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/udp_ping.api.json
+++ /dev/null
@@ -1,423 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ]
- ],
- "messages": [
- [
- "udp_ping_add_del",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_address_t",
- "src_ip_address"
- ],
- [
- "vl_api_address_t",
- "dst_ip_address"
- ],
- [
- "u16",
- "start_src_port"
- ],
- [
- "u16",
- "end_src_port"
- ],
- [
- "u16",
- "start_dst_port"
- ],
- [
- "u16",
- "end_dst_port"
- ],
- [
- "u16",
- "interval"
- ],
- [
- "u8",
- "dis"
- ],
- [
- "u8",
- "fault_det"
- ],
- [
- "u8",
- "reserve",
- 3
- ],
- {
- "crc": "0xc692b188"
- }
- ],
- [
- "udp_ping_add_del_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "udp_ping_export",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "enable"
- ],
- {
- "crc": "0xb3e225d2"
- }
- ],
- [
- "udp_ping_export_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "udp_ping_add_del": {
- "reply": "udp_ping_add_del_reply"
- },
- "udp_ping_export": {
- "reply": "udp_ping_export_reply"
- }
- },
- "options": {
- "version": "3.0.0"
- },
- "aliases": {
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- }
- },
- "vl_api_version": "0x5a416f51"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/vmxnet3.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/vmxnet3.api.json
deleted file mode 100644
index a0d4768..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/vmxnet3.api.json
+++ /dev/null
@@ -1,418 +0,0 @@
-{
- "types": [
- [
- "vmxnet3_tx_list",
- [
- "u16",
- "tx_qsize"
- ],
- [
- "u16",
- "tx_next"
- ],
- [
- "u16",
- "tx_produce"
- ],
- [
- "u16",
- "tx_consume"
- ]
- ],
- [
- "vmxnet3_rx_list",
- [
- "u16",
- "rx_qsize"
- ],
- [
- "u16",
- "rx_fill",
- 2
- ],
- [
- "u16",
- "rx_next"
- ],
- [
- "u16",
- "rx_produce",
- 2
- ],
- [
- "u16",
- "rx_consume",
- 2
- ]
- ]
- ],
- "messages": [
- [
- "vmxnet3_create",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "u32",
- "pci_addr"
- ],
- [
- "i32",
- "enable_elog"
- ],
- [
- "u16",
- "rxq_size"
- ],
- [
- "u16",
- "rxq_num"
- ],
- [
- "u16",
- "txq_size"
- ],
- [
- "u16",
- "txq_num"
- ],
- [
- "u8",
- "bind"
- ],
- [
- "bool",
- "enable_gso"
- ],
- {
- "crc": "0x71a07314"
- }
- ],
- [
- "vmxnet3_create_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0x5383d31f"
- }
- ],
- [
- "vmxnet3_delete",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- {
- "crc": "0xf9e6675e"
- }
- ],
- [
- "vmxnet3_delete_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ],
- [
- "vmxnet3_details",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "vl_api_interface_index_t",
- "sw_if_index"
- ],
- [
- "string",
- "if_name",
- 64
- ],
- [
- "vl_api_mac_address_t",
- "hw_addr"
- ],
- [
- "u32",
- "pci_addr"
- ],
- [
- "u8",
- "version"
- ],
- [
- "bool",
- "admin_up_down"
- ],
- [
- "u8",
- "rx_count"
- ],
- [
- "vl_api_vmxnet3_rx_list_t",
- "rx_list",
- 16
- ],
- [
- "u8",
- "tx_count"
- ],
- [
- "vl_api_vmxnet3_tx_list_t",
- "tx_list",
- 8
- ],
- {
- "crc": "0x829ba055"
- }
- ],
- [
- "vmxnet3_dump",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- {
- "crc": "0x51077d14"
- }
- ]
- ],
- "unions": [],
- "enums": [
- [
- "if_status_flags",
- [
- "IF_STATUS_API_FLAG_ADMIN_UP",
- 1
- ],
- [
- "IF_STATUS_API_FLAG_LINK_UP",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "mtu_proto",
- [
- "MTU_PROTO_API_L3",
- 1
- ],
- [
- "MTU_PROTO_API_IP4",
- 2
- ],
- [
- "MTU_PROTO_API_IP6",
- 3
- ],
- [
- "MTU_PROTO_API_MPLS",
- 4
- ],
- [
- "MTU_PROTO_API_N",
- 5
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "link_duplex",
- [
- "LINK_DUPLEX_API_UNKNOWN",
- 0
- ],
- [
- "LINK_DUPLEX_API_HALF",
- 1
- ],
- [
- "LINK_DUPLEX_API_FULL",
- 2
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "sub_if_flags",
- [
- "SUB_IF_API_FLAG_NO_TAGS",
- 1
- ],
- [
- "SUB_IF_API_FLAG_ONE_TAG",
- 2
- ],
- [
- "SUB_IF_API_FLAG_TWO_TAGS",
- 4
- ],
- [
- "SUB_IF_API_FLAG_DOT1AD",
- 8
- ],
- [
- "SUB_IF_API_FLAG_EXACT_MATCH",
- 16
- ],
- [
- "SUB_IF_API_FLAG_DEFAULT",
- 32
- ],
- [
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 64
- ],
- [
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 128
- ],
- [
- "SUB_IF_API_FLAG_MASK_VNET",
- 254
- ],
- [
- "SUB_IF_API_FLAG_DOT1AH",
- 256
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "rx_mode",
- [
- "RX_MODE_API_UNKNOWN",
- 0
- ],
- [
- "RX_MODE_API_POLLING",
- 1
- ],
- [
- "RX_MODE_API_INTERRUPT",
- 2
- ],
- [
- "RX_MODE_API_ADAPTIVE",
- 3
- ],
- [
- "RX_MODE_API_DEFAULT",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "if_type",
- [
- "IF_API_TYPE_HARDWARE",
- 1
- ],
- [
- "IF_API_TYPE_SUB",
- 2
- ],
- [
- "IF_API_TYPE_P2P",
- 3
- ],
- [
- "IF_API_TYPE_PIPE",
- 4
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "vmxnet3_create": {
- "reply": "vmxnet3_create_reply"
- },
- "vmxnet3_delete": {
- "reply": "vmxnet3_delete_reply"
- },
- "vmxnet3_dump": {
- "reply": "vmxnet3_details",
- "stream": true
- }
- },
- "options": {
- "version": "1.1.0"
- },
- "aliases": {
- "interface_index": {
- "type": "u32"
- },
- "mac_address": {
- "type": "u8",
- "length": 6
- }
- },
- "vl_api_version": "0xe89a60f7"
-}
diff --git a/internal/testbinapi/binapi2001/.vppapi/plugins/vxlan_gpe_ioam_export.api.json b/internal/testbinapi/binapi2001/.vppapi/plugins/vxlan_gpe_ioam_export.api.json
deleted file mode 100644
index 18acecb..0000000
--- a/internal/testbinapi/binapi2001/.vppapi/plugins/vxlan_gpe_ioam_export.api.json
+++ /dev/null
@@ -1,351 +0,0 @@
-{
- "types": [
- [
- "address",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "vl_api_address_union_t",
- "un"
- ]
- ],
- [
- "prefix",
- [
- "vl_api_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "mprefix",
- [
- "vl_api_address_family_t",
- "af"
- ],
- [
- "u16",
- "grp_address_length"
- ],
- [
- "vl_api_address_union_t",
- "grp_address"
- ],
- [
- "vl_api_address_union_t",
- "src_address"
- ]
- ],
- [
- "ip6_prefix",
- [
- "vl_api_ip6_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "ip4_prefix",
- [
- "vl_api_ip4_address_t",
- "address"
- ],
- [
- "u8",
- "len"
- ]
- ],
- [
- "prefix_matcher",
- [
- "u8",
- "le"
- ],
- [
- "u8",
- "ge"
- ]
- ]
- ],
- "messages": [
- [
- "vxlan_gpe_ioam_export_enable_disable",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "client_index"
- ],
- [
- "u32",
- "context"
- ],
- [
- "bool",
- "is_disable"
- ],
- [
- "vl_api_ip4_address_t",
- "collector_address"
- ],
- [
- "vl_api_ip4_address_t",
- "src_address"
- ],
- {
- "crc": "0xe4d4ebfa"
- }
- ],
- [
- "vxlan_gpe_ioam_export_enable_disable_reply",
- [
- "u16",
- "_vl_msg_id"
- ],
- [
- "u32",
- "context"
- ],
- [
- "i32",
- "retval"
- ],
- {
- "crc": "0xe8d4e804"
- }
- ]
- ],
- "unions": [
- [
- "address_union",
- [
- "vl_api_ip4_address_t",
- "ip4"
- ],
- [
- "vl_api_ip6_address_t",
- "ip6"
- ]
- ]
- ],
- "enums": [
- [
- "address_family",
- [
- "ADDRESS_IP4",
- 0
- ],
- [
- "ADDRESS_IP6",
- 1
- ],
- {
- "enumtype": "u32"
- }
- ],
- [
- "ip_ecn",
- [
- "IP_API_ECN_NONE",
- 0
- ],
- [
- "IP_API_ECN_ECT0",
- 1
- ],
- [
- "IP_API_ECN_ECT1",
- 2
- ],
- [
- "IP_API_ECN_CE",
- 3
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_dscp",
- [
- "IP_API_DSCP_CS0",
- 0
- ],
- [
- "IP_API_DSCP_CS1",
- 8
- ],
- [
- "IP_API_DSCP_AF11",
- 10
- ],
- [
- "IP_API_DSCP_AF12",
- 12
- ],
- [
- "IP_API_DSCP_AF13",
- 14
- ],
- [
- "IP_API_DSCP_CS2",
- 16
- ],
- [
- "IP_API_DSCP_AF21",
- 18
- ],
- [
- "IP_API_DSCP_AF22",
- 20
- ],
- [
- "IP_API_DSCP_AF23",
- 22
- ],
- [
- "IP_API_DSCP_CS3",
- 24
- ],
- [
- "IP_API_DSCP_AF31",
- 26
- ],
- [
- "IP_API_DSCP_AF32",
- 28
- ],
- [
- "IP_API_DSCP_AF33",
- 30
- ],
- [
- "IP_API_DSCP_CS4",
- 32
- ],
- [
- "IP_API_DSCP_AF41",
- 34
- ],
- [
- "IP_API_DSCP_AF42",
- 36
- ],
- [
- "IP_API_DSCP_AF43",
- 38
- ],
- [
- "IP_API_DSCP_CS5",
- 40
- ],
- [
- "IP_API_DSCP_EF",
- 46
- ],
- [
- "IP_API_DSCP_CS6",
- 48
- ],
- [
- "IP_API_DSCP_CS7",
- 50
- ],
- {
- "enumtype": "u8"
- }
- ],
- [
- "ip_proto",
- [
- "IP_API_PROTO_HOPOPT",
- 0
- ],
- [
- "IP_API_PROTO_ICMP",
- 1
- ],
- [
- "IP_API_PROTO_IGMP",
- 2
- ],
- [
- "IP_API_PROTO_TCP",
- 6
- ],
- [
- "IP_API_PROTO_UDP",
- 17
- ],
- [
- "IP_API_PROTO_GRE",
- 47
- ],
- [
- "IP_API_PROTO_AH",
- 50
- ],
- [
- "IP_API_PROTO_ESP",
- 51
- ],
- [
- "IP_API_PROTO_EIGRP",
- 88
- ],
- [
- "IP_API_PROTO_OSPF",
- 89
- ],
- [
- "IP_API_PROTO_SCTP",
- 132
- ],
- [
- "IP_API_PROTO_RESERVED",
- 255
- ],
- {
- "enumtype": "u32"
- }
- ]
- ],
- "services": {
- "vxlan_gpe_ioam_export_enable_disable": {
- "reply": "vxlan_gpe_ioam_export_enable_disable_reply"
- }
- },
- "options": {
- "version": "1.0.0"
- },
- "aliases": {
- "ip4_address": {
- "type": "u8",
- "length": 4
- },
- "ip6_address": {
- "type": "u8",
- "length": 16
- },
- "address_with_prefix": {
- "type": "vl_api_prefix_t"
- },
- "ip4_address_with_prefix": {
- "type": "vl_api_ip4_prefix_t"
- },
- "ip6_address_with_prefix": {
- "type": "vl_api_ip6_prefix_t"
- }
- },
- "vl_api_version": "0xc6fdb83f"
-}
diff --git a/internal/testbinapi/binapi2001/abf/abf.ba.go b/internal/testbinapi/binapi2001/abf/abf.ba.go
deleted file mode 100644
index ce80c2f..0000000
--- a/internal/testbinapi/binapi2001/abf/abf.ba.go
+++ /dev/null
@@ -1,1600 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/plugins/abf.api.json
-
-// Package abf contains generated bindings for API file abf.api.
-//
-// Contents:
-// 6 aliases
-// 13 enums
-// 11 structs
-// 1 union
-// 10 messages
-//
-package abf
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "abf"
- APIVersion = "1.0.0"
- VersionCrc = 0xc2e5c644
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// FibPathFlags defines enum 'fib_path_flags'.
-type FibPathFlags uint32
-
-const (
- FIB_API_PATH_FLAG_NONE FibPathFlags = 0
- FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED FibPathFlags = 1
- FIB_API_PATH_FLAG_RESOLVE_VIA_HOST FibPathFlags = 2
- FIB_API_PATH_FLAG_POP_PW_CW FibPathFlags = 4
-)
-
-var (
- FibPathFlags_name = map[uint32]string{
- 0: "FIB_API_PATH_FLAG_NONE",
- 1: "FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED",
- 2: "FIB_API_PATH_FLAG_RESOLVE_VIA_HOST",
- 4: "FIB_API_PATH_FLAG_POP_PW_CW",
- }
- FibPathFlags_value = map[string]uint32{
- "FIB_API_PATH_FLAG_NONE": 0,
- "FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED": 1,
- "FIB_API_PATH_FLAG_RESOLVE_VIA_HOST": 2,
- "FIB_API_PATH_FLAG_POP_PW_CW": 4,
- }
-)
-
-func (x FibPathFlags) String() string {
- s, ok := FibPathFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := FibPathFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "FibPathFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// FibPathNhProto defines enum 'fib_path_nh_proto'.
-type FibPathNhProto uint32
-
-const (
- FIB_API_PATH_NH_PROTO_IP4 FibPathNhProto = 0
- FIB_API_PATH_NH_PROTO_IP6 FibPathNhProto = 1
- FIB_API_PATH_NH_PROTO_MPLS FibPathNhProto = 2
- FIB_API_PATH_NH_PROTO_ETHERNET FibPathNhProto = 3
- FIB_API_PATH_NH_PROTO_BIER FibPathNhProto = 4
-)
-
-var (
- FibPathNhProto_name = map[uint32]string{
- 0: "FIB_API_PATH_NH_PROTO_IP4",
- 1: "FIB_API_PATH_NH_PROTO_IP6",
- 2: "FIB_API_PATH_NH_PROTO_MPLS",
- 3: "FIB_API_PATH_NH_PROTO_ETHERNET",
- 4: "FIB_API_PATH_NH_PROTO_BIER",
- }
- FibPathNhProto_value = map[string]uint32{
- "FIB_API_PATH_NH_PROTO_IP4": 0,
- "FIB_API_PATH_NH_PROTO_IP6": 1,
- "FIB_API_PATH_NH_PROTO_MPLS": 2,
- "FIB_API_PATH_NH_PROTO_ETHERNET": 3,
- "FIB_API_PATH_NH_PROTO_BIER": 4,
- }
-)
-
-func (x FibPathNhProto) String() string {
- s, ok := FibPathNhProto_name[uint32(x)]
- if ok {
- return s
- }
- return "FibPathNhProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// FibPathType defines enum 'fib_path_type'.
-type FibPathType uint32
-
-const (
- FIB_API_PATH_TYPE_NORMAL FibPathType = 0
- FIB_API_PATH_TYPE_LOCAL FibPathType = 1
- FIB_API_PATH_TYPE_DROP FibPathType = 2
- FIB_API_PATH_TYPE_UDP_ENCAP FibPathType = 3
- FIB_API_PATH_TYPE_BIER_IMP FibPathType = 4
- FIB_API_PATH_TYPE_ICMP_UNREACH FibPathType = 5
- FIB_API_PATH_TYPE_ICMP_PROHIBIT FibPathType = 6
- FIB_API_PATH_TYPE_SOURCE_LOOKUP FibPathType = 7
- FIB_API_PATH_TYPE_DVR FibPathType = 8
- FIB_API_PATH_TYPE_INTERFACE_RX FibPathType = 9
- FIB_API_PATH_TYPE_CLASSIFY FibPathType = 10
-)
-
-var (
- FibPathType_name = map[uint32]string{
- 0: "FIB_API_PATH_TYPE_NORMAL",
- 1: "FIB_API_PATH_TYPE_LOCAL",
- 2: "FIB_API_PATH_TYPE_DROP",
- 3: "FIB_API_PATH_TYPE_UDP_ENCAP",
- 4: "FIB_API_PATH_TYPE_BIER_IMP",
- 5: "FIB_API_PATH_TYPE_ICMP_UNREACH",
- 6: "FIB_API_PATH_TYPE_ICMP_PROHIBIT",
- 7: "FIB_API_PATH_TYPE_SOURCE_LOOKUP",
- 8: "FIB_API_PATH_TYPE_DVR",
- 9: "FIB_API_PATH_TYPE_INTERFACE_RX",
- 10: "FIB_API_PATH_TYPE_CLASSIFY",
- }
- FibPathType_value = map[string]uint32{
- "FIB_API_PATH_TYPE_NORMAL": 0,
- "FIB_API_PATH_TYPE_LOCAL": 1,
- "FIB_API_PATH_TYPE_DROP": 2,
- "FIB_API_PATH_TYPE_UDP_ENCAP": 3,
- "FIB_API_PATH_TYPE_BIER_IMP": 4,
- "FIB_API_PATH_TYPE_ICMP_UNREACH": 5,
- "FIB_API_PATH_TYPE_ICMP_PROHIBIT": 6,
- "FIB_API_PATH_TYPE_SOURCE_LOOKUP": 7,
- "FIB_API_PATH_TYPE_DVR": 8,
- "FIB_API_PATH_TYPE_INTERFACE_RX": 9,
- "FIB_API_PATH_TYPE_CLASSIFY": 10,
- }
-)
-
-func (x FibPathType) String() string {
- s, ok := FibPathType_name[uint32(x)]
- if ok {
- return s
- }
- return "FibPathType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// AbfItfAttach defines type 'abf_itf_attach'.
-type AbfItfAttach struct {
- PolicyID uint32 `binapi:"u32,name=policy_id" json:"policy_id,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Priority uint32 `binapi:"u32,name=priority" json:"priority,omitempty"`
- IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
-}
-
-// AbfPolicy defines type 'abf_policy'.
-type AbfPolicy struct {
- PolicyID uint32 `binapi:"u32,name=policy_id" json:"policy_id,omitempty"`
- ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
- NPaths uint8 `binapi:"u8,name=n_paths" json:"-"`
- Paths []FibPath `binapi:"fib_path[n_paths],name=paths" json:"paths,omitempty"`
-}
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// FibMplsLabel defines type 'fib_mpls_label'.
-type FibMplsLabel struct {
- IsUniform uint8 `binapi:"u8,name=is_uniform" json:"is_uniform,omitempty"`
- Label uint32 `binapi:"u32,name=label" json:"label,omitempty"`
- TTL uint8 `binapi:"u8,name=ttl" json:"ttl,omitempty"`
- Exp uint8 `binapi:"u8,name=exp" json:"exp,omitempty"`
-}
-
-// FibPath defines type 'fib_path'.
-type FibPath struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
- RpfID uint32 `binapi:"u32,name=rpf_id" json:"rpf_id,omitempty"`
- Weight uint8 `binapi:"u8,name=weight" json:"weight,omitempty"`
- Preference uint8 `binapi:"u8,name=preference" json:"preference,omitempty"`
- Type FibPathType `binapi:"fib_path_type,name=type" json:"type,omitempty"`
- Flags FibPathFlags `binapi:"fib_path_flags,name=flags" json:"flags,omitempty"`
- Proto FibPathNhProto `binapi:"fib_path_nh_proto,name=proto" json:"proto,omitempty"`
- Nh FibPathNh `binapi:"fib_path_nh,name=nh" json:"nh,omitempty"`
- NLabels uint8 `binapi:"u8,name=n_labels" json:"n_labels,omitempty"`
- LabelStack [16]FibMplsLabel `binapi:"fib_mpls_label[16],name=label_stack" json:"label_stack,omitempty"`
-}
-
-// FibPathNh defines type 'fib_path_nh'.
-type FibPathNh struct {
- Address AddressUnion `binapi:"address_union,name=address" json:"address,omitempty"`
- ViaLabel uint32 `binapi:"u32,name=via_label" json:"via_label,omitempty"`
- ObjID uint32 `binapi:"u32,name=obj_id" json:"obj_id,omitempty"`
- ClassifyTableIndex uint32 `binapi:"u32,name=classify_table_index" json:"classify_table_index,omitempty"`
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
-
-// AbfItfAttachAddDel defines message 'abf_itf_attach_add_del'.
-type AbfItfAttachAddDel struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- Attach AbfItfAttach `binapi:"abf_itf_attach,name=attach" json:"attach,omitempty"`
-}
-
-func (m *AbfItfAttachAddDel) Reset() { *m = AbfItfAttachAddDel{} }
-func (*AbfItfAttachAddDel) GetMessageName() string { return "abf_itf_attach_add_del" }
-func (*AbfItfAttachAddDel) GetCrcString() string { return "25c8621b" }
-func (*AbfItfAttachAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *AbfItfAttachAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 4 // m.Attach.PolicyID
- size += 4 // m.Attach.SwIfIndex
- size += 4 // m.Attach.Priority
- size += 1 // m.Attach.IsIPv6
- return size
-}
-func (m *AbfItfAttachAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeUint32(m.Attach.PolicyID)
- buf.EncodeUint32(uint32(m.Attach.SwIfIndex))
- buf.EncodeUint32(m.Attach.Priority)
- buf.EncodeBool(m.Attach.IsIPv6)
- return buf.Bytes(), nil
-}
-func (m *AbfItfAttachAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.Attach.PolicyID = buf.DecodeUint32()
- m.Attach.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Attach.Priority = buf.DecodeUint32()
- m.Attach.IsIPv6 = buf.DecodeBool()
- return nil
-}
-
-// AbfItfAttachAddDelReply defines message 'abf_itf_attach_add_del_reply'.
-type AbfItfAttachAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *AbfItfAttachAddDelReply) Reset() { *m = AbfItfAttachAddDelReply{} }
-func (*AbfItfAttachAddDelReply) GetMessageName() string { return "abf_itf_attach_add_del_reply" }
-func (*AbfItfAttachAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*AbfItfAttachAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *AbfItfAttachAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *AbfItfAttachAddDelReply) 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 *AbfItfAttachAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// AbfItfAttachDetails defines message 'abf_itf_attach_details'.
-type AbfItfAttachDetails struct {
- Attach AbfItfAttach `binapi:"abf_itf_attach,name=attach" json:"attach,omitempty"`
-}
-
-func (m *AbfItfAttachDetails) Reset() { *m = AbfItfAttachDetails{} }
-func (*AbfItfAttachDetails) GetMessageName() string { return "abf_itf_attach_details" }
-func (*AbfItfAttachDetails) GetCrcString() string { return "7819523e" }
-func (*AbfItfAttachDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *AbfItfAttachDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Attach.PolicyID
- size += 4 // m.Attach.SwIfIndex
- size += 4 // m.Attach.Priority
- size += 1 // m.Attach.IsIPv6
- return size
-}
-func (m *AbfItfAttachDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Attach.PolicyID)
- buf.EncodeUint32(uint32(m.Attach.SwIfIndex))
- buf.EncodeUint32(m.Attach.Priority)
- buf.EncodeBool(m.Attach.IsIPv6)
- return buf.Bytes(), nil
-}
-func (m *AbfItfAttachDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Attach.PolicyID = buf.DecodeUint32()
- m.Attach.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Attach.Priority = buf.DecodeUint32()
- m.Attach.IsIPv6 = buf.DecodeBool()
- return nil
-}
-
-// AbfItfAttachDump defines message 'abf_itf_attach_dump'.
-type AbfItfAttachDump struct{}
-
-func (m *AbfItfAttachDump) Reset() { *m = AbfItfAttachDump{} }
-func (*AbfItfAttachDump) GetMessageName() string { return "abf_itf_attach_dump" }
-func (*AbfItfAttachDump) GetCrcString() string { return "51077d14" }
-func (*AbfItfAttachDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *AbfItfAttachDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *AbfItfAttachDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *AbfItfAttachDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// AbfPluginGetVersion defines message 'abf_plugin_get_version'.
-type AbfPluginGetVersion struct{}
-
-func (m *AbfPluginGetVersion) Reset() { *m = AbfPluginGetVersion{} }
-func (*AbfPluginGetVersion) GetMessageName() string { return "abf_plugin_get_version" }
-func (*AbfPluginGetVersion) GetCrcString() string { return "51077d14" }
-func (*AbfPluginGetVersion) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *AbfPluginGetVersion) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *AbfPluginGetVersion) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *AbfPluginGetVersion) Unmarshal(b []byte) error {
- return nil
-}
-
-// AbfPluginGetVersionReply defines message 'abf_plugin_get_version_reply'.
-type AbfPluginGetVersionReply struct {
- Major uint32 `binapi:"u32,name=major" json:"major,omitempty"`
- Minor uint32 `binapi:"u32,name=minor" json:"minor,omitempty"`
-}
-
-func (m *AbfPluginGetVersionReply) Reset() { *m = AbfPluginGetVersionReply{} }
-func (*AbfPluginGetVersionReply) GetMessageName() string { return "abf_plugin_get_version_reply" }
-func (*AbfPluginGetVersionReply) GetCrcString() string { return "9b32cf86" }
-func (*AbfPluginGetVersionReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *AbfPluginGetVersionReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Major
- size += 4 // m.Minor
- return size
-}
-func (m *AbfPluginGetVersionReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Major)
- buf.EncodeUint32(m.Minor)
- return buf.Bytes(), nil
-}
-func (m *AbfPluginGetVersionReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Major = buf.DecodeUint32()
- m.Minor = buf.DecodeUint32()
- return nil
-}
-
-// AbfPolicyAddDel defines message 'abf_policy_add_del'.
-type AbfPolicyAddDel struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- Policy AbfPolicy `binapi:"abf_policy,name=policy" json:"policy,omitempty"`
-}
-
-func (m *AbfPolicyAddDel) Reset() { *m = AbfPolicyAddDel{} }
-func (*AbfPolicyAddDel) GetMessageName() string { return "abf_policy_add_del" }
-func (*AbfPolicyAddDel) GetCrcString() string { return "ee66f93e" }
-func (*AbfPolicyAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *AbfPolicyAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 4 // m.Policy.PolicyID
- size += 4 // m.Policy.ACLIndex
- size += 1 // m.Policy.NPaths
- for j2 := 0; j2 < len(m.Policy.Paths); j2++ {
- var s2 FibPath
- _ = s2
- if j2 < len(m.Policy.Paths) {
- s2 = m.Policy.Paths[j2]
- }
- size += 4 // s2.SwIfIndex
- size += 4 // s2.TableID
- size += 4 // s2.RpfID
- size += 1 // s2.Weight
- size += 1 // s2.Preference
- size += 4 // s2.Type
- size += 4 // s2.Flags
- size += 4 // s2.Proto
- size += 1 * 16 // s2.Nh.Address
- size += 4 // s2.Nh.ViaLabel
- size += 4 // s2.Nh.ObjID
- size += 4 // s2.Nh.ClassifyTableIndex
- size += 1 // s2.NLabels
- for j3 := 0; j3 < 16; j3++ {
- size += 1 // s2.LabelStack[j3].IsUniform
- size += 4 // s2.LabelStack[j3].Label
- size += 1 // s2.LabelStack[j3].TTL
- size += 1 // s2.LabelStack[j3].Exp
- }
- }
- return size
-}
-func (m *AbfPolicyAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeUint32(m.Policy.PolicyID)
- buf.EncodeUint32(m.Policy.ACLIndex)
- buf.EncodeUint8(uint8(len(m.Policy.Paths)))
- for j1 := 0; j1 < len(m.Policy.Paths); j1++ {
- var v1 FibPath // Paths
- if j1 < len(m.Policy.Paths) {
- v1 = m.Policy.Paths[j1]
- }
- buf.EncodeUint32(v1.SwIfIndex)
- buf.EncodeUint32(v1.TableID)
- buf.EncodeUint32(v1.RpfID)
- buf.EncodeUint8(v1.Weight)
- buf.EncodeUint8(v1.Preference)
- buf.EncodeUint32(uint32(v1.Type))
- buf.EncodeUint32(uint32(v1.Flags))
- buf.EncodeUint32(uint32(v1.Proto))
- buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
- buf.EncodeUint32(v1.Nh.ViaLabel)
- buf.EncodeUint32(v1.Nh.ObjID)
- buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
- buf.EncodeUint8(v1.NLabels)
- for j2 := 0; j2 < 16; j2++ {
- buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
- buf.EncodeUint32(v1.LabelStack[j2].Label)
- buf.EncodeUint8(v1.LabelStack[j2].TTL)
- buf.EncodeUint8(v1.LabelStack[j2].Exp)
- }
- }
- return buf.Bytes(), nil
-}
-func (m *AbfPolicyAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.Policy.PolicyID = buf.DecodeUint32()
- m.Policy.ACLIndex = buf.DecodeUint32()
- m.Policy.NPaths = buf.DecodeUint8()
- m.Policy.Paths = make([]FibPath, m.Policy.NPaths)
- for j1 := 0; j1 < len(m.Policy.Paths); j1++ {
- m.Policy.Paths[j1].SwIfIndex = buf.DecodeUint32()
- m.Policy.Paths[j1].TableID = buf.DecodeUint32()
- m.Policy.Paths[j1].RpfID = buf.DecodeUint32()
- m.Policy.Paths[j1].Weight = buf.DecodeUint8()
- m.Policy.Paths[j1].Preference = buf.DecodeUint8()
- m.Policy.Paths[j1].Type = FibPathType(buf.DecodeUint32())
- m.Policy.Paths[j1].Flags = FibPathFlags(buf.DecodeUint32())
- m.Policy.Paths[j1].Proto = FibPathNhProto(buf.DecodeUint32())
- copy(m.Policy.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Policy.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
- m.Policy.Paths[j1].Nh.ObjID = buf.DecodeUint32()
- m.Policy.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
- m.Policy.Paths[j1].NLabels = buf.DecodeUint8()
- for j2 := 0; j2 < 16; j2++ {
- m.Policy.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
- m.Policy.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
- m.Policy.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
- m.Policy.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
- }
- }
- return nil
-}
-
-// AbfPolicyAddDelReply defines message 'abf_policy_add_del_reply'.
-type AbfPolicyAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *AbfPolicyAddDelReply) Reset() { *m = AbfPolicyAddDelReply{} }
-func (*AbfPolicyAddDelReply) GetMessageName() string { return "abf_policy_add_del_reply" }
-func (*AbfPolicyAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*AbfPolicyAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *AbfPolicyAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *AbfPolicyAddDelReply) 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 *AbfPolicyAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// AbfPolicyDetails defines message 'abf_policy_details'.
-type AbfPolicyDetails struct {
- Policy AbfPolicy `binapi:"abf_policy,name=policy" json:"policy,omitempty"`
-}
-
-func (m *AbfPolicyDetails) Reset() { *m = AbfPolicyDetails{} }
-func (*AbfPolicyDetails) GetMessageName() string { return "abf_policy_details" }
-func (*AbfPolicyDetails) GetCrcString() string { return "6769e504" }
-func (*AbfPolicyDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *AbfPolicyDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Policy.PolicyID
- size += 4 // m.Policy.ACLIndex
- size += 1 // m.Policy.NPaths
- for j2 := 0; j2 < len(m.Policy.Paths); j2++ {
- var s2 FibPath
- _ = s2
- if j2 < len(m.Policy.Paths) {
- s2 = m.Policy.Paths[j2]
- }
- size += 4 // s2.SwIfIndex
- size += 4 // s2.TableID
- size += 4 // s2.RpfID
- size += 1 // s2.Weight
- size += 1 // s2.Preference
- size += 4 // s2.Type
- size += 4 // s2.Flags
- size += 4 // s2.Proto
- size += 1 * 16 // s2.Nh.Address
- size += 4 // s2.Nh.ViaLabel
- size += 4 // s2.Nh.ObjID
- size += 4 // s2.Nh.ClassifyTableIndex
- size += 1 // s2.NLabels
- for j3 := 0; j3 < 16; j3++ {
- size += 1 // s2.LabelStack[j3].IsUniform
- size += 4 // s2.LabelStack[j3].Label
- size += 1 // s2.LabelStack[j3].TTL
- size += 1 // s2.LabelStack[j3].Exp
- }
- }
- return size
-}
-func (m *AbfPolicyDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Policy.PolicyID)
- buf.EncodeUint32(m.Policy.ACLIndex)
- buf.EncodeUint8(uint8(len(m.Policy.Paths)))
- for j1 := 0; j1 < len(m.Policy.Paths); j1++ {
- var v1 FibPath // Paths
- if j1 < len(m.Policy.Paths) {
- v1 = m.Policy.Paths[j1]
- }
- buf.EncodeUint32(v1.SwIfIndex)
- buf.EncodeUint32(v1.TableID)
- buf.EncodeUint32(v1.RpfID)
- buf.EncodeUint8(v1.Weight)
- buf.EncodeUint8(v1.Preference)
- buf.EncodeUint32(uint32(v1.Type))
- buf.EncodeUint32(uint32(v1.Flags))
- buf.EncodeUint32(uint32(v1.Proto))
- buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
- buf.EncodeUint32(v1.Nh.ViaLabel)
- buf.EncodeUint32(v1.Nh.ObjID)
- buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
- buf.EncodeUint8(v1.NLabels)
- for j2 := 0; j2 < 16; j2++ {
- buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
- buf.EncodeUint32(v1.LabelStack[j2].Label)
- buf.EncodeUint8(v1.LabelStack[j2].TTL)
- buf.EncodeUint8(v1.LabelStack[j2].Exp)
- }
- }
- return buf.Bytes(), nil
-}
-func (m *AbfPolicyDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Policy.PolicyID = buf.DecodeUint32()
- m.Policy.ACLIndex = buf.DecodeUint32()
- m.Policy.NPaths = buf.DecodeUint8()
- m.Policy.Paths = make([]FibPath, m.Policy.NPaths)
- for j1 := 0; j1 < len(m.Policy.Paths); j1++ {
- m.Policy.Paths[j1].SwIfIndex = buf.DecodeUint32()
- m.Policy.Paths[j1].TableID = buf.DecodeUint32()
- m.Policy.Paths[j1].RpfID = buf.DecodeUint32()
- m.Policy.Paths[j1].Weight = buf.DecodeUint8()
- m.Policy.Paths[j1].Preference = buf.DecodeUint8()
- m.Policy.Paths[j1].Type = FibPathType(buf.DecodeUint32())
- m.Policy.Paths[j1].Flags = FibPathFlags(buf.DecodeUint32())
- m.Policy.Paths[j1].Proto = FibPathNhProto(buf.DecodeUint32())
- copy(m.Policy.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Policy.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
- m.Policy.Paths[j1].Nh.ObjID = buf.DecodeUint32()
- m.Policy.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
- m.Policy.Paths[j1].NLabels = buf.DecodeUint8()
- for j2 := 0; j2 < 16; j2++ {
- m.Policy.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
- m.Policy.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
- m.Policy.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
- m.Policy.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
- }
- }
- return nil
-}
-
-// AbfPolicyDump defines message 'abf_policy_dump'.
-type AbfPolicyDump struct{}
-
-func (m *AbfPolicyDump) Reset() { *m = AbfPolicyDump{} }
-func (*AbfPolicyDump) GetMessageName() string { return "abf_policy_dump" }
-func (*AbfPolicyDump) GetCrcString() string { return "51077d14" }
-func (*AbfPolicyDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *AbfPolicyDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *AbfPolicyDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *AbfPolicyDump) Unmarshal(b []byte) error {
- return nil
-}
-
-func init() { file_abf_binapi_init() }
-func file_abf_binapi_init() {
- api.RegisterMessage((*AbfItfAttachAddDel)(nil), "abf_itf_attach_add_del_25c8621b")
- api.RegisterMessage((*AbfItfAttachAddDelReply)(nil), "abf_itf_attach_add_del_reply_e8d4e804")
- api.RegisterMessage((*AbfItfAttachDetails)(nil), "abf_itf_attach_details_7819523e")
- api.RegisterMessage((*AbfItfAttachDump)(nil), "abf_itf_attach_dump_51077d14")
- api.RegisterMessage((*AbfPluginGetVersion)(nil), "abf_plugin_get_version_51077d14")
- api.RegisterMessage((*AbfPluginGetVersionReply)(nil), "abf_plugin_get_version_reply_9b32cf86")
- api.RegisterMessage((*AbfPolicyAddDel)(nil), "abf_policy_add_del_ee66f93e")
- api.RegisterMessage((*AbfPolicyAddDelReply)(nil), "abf_policy_add_del_reply_e8d4e804")
- api.RegisterMessage((*AbfPolicyDetails)(nil), "abf_policy_details_6769e504")
- api.RegisterMessage((*AbfPolicyDump)(nil), "abf_policy_dump_51077d14")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*AbfItfAttachAddDel)(nil),
- (*AbfItfAttachAddDelReply)(nil),
- (*AbfItfAttachDetails)(nil),
- (*AbfItfAttachDump)(nil),
- (*AbfPluginGetVersion)(nil),
- (*AbfPluginGetVersionReply)(nil),
- (*AbfPolicyAddDel)(nil),
- (*AbfPolicyAddDelReply)(nil),
- (*AbfPolicyDetails)(nil),
- (*AbfPolicyDump)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/abf/abf_rpc.ba.go b/internal/testbinapi/binapi2001/abf/abf_rpc.ba.go
deleted file mode 100644
index c59d448..0000000
--- a/internal/testbinapi/binapi2001/abf/abf_rpc.ba.go
+++ /dev/null
@@ -1,142 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package abf
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service abf.
-type RPCService interface {
- AbfItfAttachAddDel(ctx context.Context, in *AbfItfAttachAddDel) (*AbfItfAttachAddDelReply, error)
- AbfItfAttachDump(ctx context.Context, in *AbfItfAttachDump) (RPCService_AbfItfAttachDumpClient, error)
- AbfPluginGetVersion(ctx context.Context, in *AbfPluginGetVersion) (*AbfPluginGetVersionReply, error)
- AbfPolicyAddDel(ctx context.Context, in *AbfPolicyAddDel) (*AbfPolicyAddDelReply, error)
- AbfPolicyDump(ctx context.Context, in *AbfPolicyDump) (RPCService_AbfPolicyDumpClient, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) AbfItfAttachAddDel(ctx context.Context, in *AbfItfAttachAddDel) (*AbfItfAttachAddDelReply, error) {
- out := new(AbfItfAttachAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) AbfItfAttachDump(ctx context.Context, in *AbfItfAttachDump) (RPCService_AbfItfAttachDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_AbfItfAttachDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_AbfItfAttachDumpClient interface {
- Recv() (*AbfItfAttachDetails, error)
- api.Stream
-}
-
-type serviceClient_AbfItfAttachDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_AbfItfAttachDumpClient) Recv() (*AbfItfAttachDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *AbfItfAttachDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) AbfPluginGetVersion(ctx context.Context, in *AbfPluginGetVersion) (*AbfPluginGetVersionReply, error) {
- out := new(AbfPluginGetVersionReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) AbfPolicyAddDel(ctx context.Context, in *AbfPolicyAddDel) (*AbfPolicyAddDelReply, error) {
- out := new(AbfPolicyAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) AbfPolicyDump(ctx context.Context, in *AbfPolicyDump) (RPCService_AbfPolicyDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_AbfPolicyDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_AbfPolicyDumpClient interface {
- Recv() (*AbfPolicyDetails, error)
- api.Stream
-}
-
-type serviceClient_AbfPolicyDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_AbfPolicyDumpClient) Recv() (*AbfPolicyDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *AbfPolicyDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
diff --git a/internal/testbinapi/binapi2001/acl/acl.ba.go b/internal/testbinapi/binapi2001/acl/acl.ba.go
deleted file mode 100644
index f21b2ae..0000000
--- a/internal/testbinapi/binapi2001/acl/acl.ba.go
+++ /dev/null
@@ -1,1822 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/plugins/acl.api.json
-
-// Package acl contains generated bindings for API file acl.api.
-//
-// Contents:
-// 2 structs
-// 38 messages
-//
-package acl
-
-import (
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the GoVPP api package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// GoVPP api package needs to be updated.
-const _ = api.GoVppAPIPackageIsVersion2
-
-const (
- APIFile = "acl"
- APIVersion = "1.0.1"
- VersionCrc = 0x11c5c1e5
-)
-
-// ACLRule defines type 'acl_rule'.
-type ACLRule struct {
- IsPermit uint8 `binapi:"u8,name=is_permit" json:"is_permit,omitempty"`
- IsIPv6 uint8 `binapi:"u8,name=is_ipv6" json:"is_ipv6,omitempty"`
- SrcIPAddr []byte `binapi:"u8[16],name=src_ip_addr" json:"src_ip_addr,omitempty"`
- SrcIPPrefixLen uint8 `binapi:"u8,name=src_ip_prefix_len" json:"src_ip_prefix_len,omitempty"`
- DstIPAddr []byte `binapi:"u8[16],name=dst_ip_addr" json:"dst_ip_addr,omitempty"`
- DstIPPrefixLen uint8 `binapi:"u8,name=dst_ip_prefix_len" json:"dst_ip_prefix_len,omitempty"`
- Proto uint8 `binapi:"u8,name=proto" json:"proto,omitempty"`
- SrcportOrIcmptypeFirst uint16 `binapi:"u16,name=srcport_or_icmptype_first" json:"srcport_or_icmptype_first,omitempty"`
- SrcportOrIcmptypeLast uint16 `binapi:"u16,name=srcport_or_icmptype_last" json:"srcport_or_icmptype_last,omitempty"`
- DstportOrIcmpcodeFirst uint16 `binapi:"u16,name=dstport_or_icmpcode_first" json:"dstport_or_icmpcode_first,omitempty"`
- DstportOrIcmpcodeLast uint16 `binapi:"u16,name=dstport_or_icmpcode_last" json:"dstport_or_icmpcode_last,omitempty"`
- TCPFlagsMask uint8 `binapi:"u8,name=tcp_flags_mask" json:"tcp_flags_mask,omitempty"`
- TCPFlagsValue uint8 `binapi:"u8,name=tcp_flags_value" json:"tcp_flags_value,omitempty"`
-}
-
-// MacipACLRule defines type 'macip_acl_rule'.
-type MacipACLRule struct {
- IsPermit uint8 `binapi:"u8,name=is_permit" json:"is_permit,omitempty"`
- IsIPv6 uint8 `binapi:"u8,name=is_ipv6" json:"is_ipv6,omitempty"`
- SrcMac []byte `binapi:"u8[6],name=src_mac" json:"src_mac,omitempty"`
- SrcMacMask []byte `binapi:"u8[6],name=src_mac_mask" json:"src_mac_mask,omitempty"`
- SrcIPAddr []byte `binapi:"u8[16],name=src_ip_addr" json:"src_ip_addr,omitempty"`
- SrcIPPrefixLen uint8 `binapi:"u8,name=src_ip_prefix_len" json:"src_ip_prefix_len,omitempty"`
-}
-
-// ACLAddReplace defines message 'acl_add_replace'.
-type ACLAddReplace struct {
- ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
- Tag []byte `binapi:"u8[64],name=tag" json:"tag,omitempty"`
- Count uint32 `binapi:"u32,name=count" json:"-"`
- R []ACLRule `binapi:"acl_rule[count],name=r" json:"r,omitempty"`
-}
-
-func (m *ACLAddReplace) Reset() { *m = ACLAddReplace{} }
-func (*ACLAddReplace) GetMessageName() string { return "acl_add_replace" }
-func (*ACLAddReplace) GetCrcString() string { return "13bc8539" }
-func (*ACLAddReplace) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ACLAddReplace) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.ACLIndex
- size += 1 * 64 // m.Tag
- size += 4 // m.Count
- for j1 := 0; j1 < len(m.R); j1++ {
- var s1 ACLRule
- _ = s1
- if j1 < len(m.R) {
- s1 = m.R[j1]
- }
- size += 1 // s1.IsPermit
- size += 1 // s1.IsIPv6
- size += 1 * 16 // s1.SrcIPAddr
- size += 1 // s1.SrcIPPrefixLen
- size += 1 * 16 // s1.DstIPAddr
- size += 1 // s1.DstIPPrefixLen
- size += 1 // s1.Proto
- size += 2 // s1.SrcportOrIcmptypeFirst
- size += 2 // s1.SrcportOrIcmptypeLast
- size += 2 // s1.DstportOrIcmpcodeFirst
- size += 2 // s1.DstportOrIcmpcodeLast
- size += 1 // s1.TCPFlagsMask
- size += 1 // s1.TCPFlagsValue
- }
- return size
-}
-func (m *ACLAddReplace) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.ACLIndex)
- buf.EncodeBytes(m.Tag, 64)
- buf.EncodeUint32(uint32(len(m.R)))
- for j0 := 0; j0 < len(m.R); j0++ {
- var v0 ACLRule // R
- if j0 < len(m.R) {
- v0 = m.R[j0]
- }
- buf.EncodeUint8(v0.IsPermit)
- buf.EncodeUint8(v0.IsIPv6)
- buf.EncodeBytes(v0.SrcIPAddr, 16)
- buf.EncodeUint8(v0.SrcIPPrefixLen)
- buf.EncodeBytes(v0.DstIPAddr, 16)
- buf.EncodeUint8(v0.DstIPPrefixLen)
- buf.EncodeUint8(v0.Proto)
- buf.EncodeUint16(v0.SrcportOrIcmptypeFirst)
- buf.EncodeUint16(v0.SrcportOrIcmptypeLast)
- buf.EncodeUint16(v0.DstportOrIcmpcodeFirst)
- buf.EncodeUint16(v0.DstportOrIcmpcodeLast)
- buf.EncodeUint8(v0.TCPFlagsMask)
- buf.EncodeUint8(v0.TCPFlagsValue)
- }
- return buf.Bytes(), nil
-}
-func (m *ACLAddReplace) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.ACLIndex = buf.DecodeUint32()
- m.Tag = make([]byte, 64)
- copy(m.Tag, buf.DecodeBytes(len(m.Tag)))
- m.Count = buf.DecodeUint32()
- m.R = make([]ACLRule, m.Count)
- for j0 := 0; j0 < len(m.R); j0++ {
- m.R[j0].IsPermit = buf.DecodeUint8()
- m.R[j0].IsIPv6 = buf.DecodeUint8()
- m.R[j0].SrcIPAddr = make([]byte, 16)
- copy(m.R[j0].SrcIPAddr, buf.DecodeBytes(len(m.R[j0].SrcIPAddr)))
- m.R[j0].SrcIPPrefixLen = buf.DecodeUint8()
- m.R[j0].DstIPAddr = make([]byte, 16)
- copy(m.R[j0].DstIPAddr, buf.DecodeBytes(len(m.R[j0].DstIPAddr)))
- m.R[j0].DstIPPrefixLen = buf.DecodeUint8()
- m.R[j0].Proto = buf.DecodeUint8()
- m.R[j0].SrcportOrIcmptypeFirst = buf.DecodeUint16()
- m.R[j0].SrcportOrIcmptypeLast = buf.DecodeUint16()
- m.R[j0].DstportOrIcmpcodeFirst = buf.DecodeUint16()
- m.R[j0].DstportOrIcmpcodeLast = buf.DecodeUint16()
- m.R[j0].TCPFlagsMask = buf.DecodeUint8()
- m.R[j0].TCPFlagsValue = buf.DecodeUint8()
- }
- return nil
-}
-
-// ACLAddReplaceReply defines message 'acl_add_replace_reply'.
-type ACLAddReplaceReply struct {
- ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *ACLAddReplaceReply) Reset() { *m = ACLAddReplaceReply{} }
-func (*ACLAddReplaceReply) GetMessageName() string { return "acl_add_replace_reply" }
-func (*ACLAddReplaceReply) GetCrcString() string { return "ac407b0c" }
-func (*ACLAddReplaceReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ACLAddReplaceReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.ACLIndex
- size += 4 // m.Retval
- return size
-}
-func (m *ACLAddReplaceReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.ACLIndex)
- buf.EncodeInt32(m.Retval)
- return buf.Bytes(), nil
-}
-func (m *ACLAddReplaceReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.ACLIndex = buf.DecodeUint32()
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// ACLDel defines message 'acl_del'.
-type ACLDel struct {
- ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
-}
-
-func (m *ACLDel) Reset() { *m = ACLDel{} }
-func (*ACLDel) GetMessageName() string { return "acl_del" }
-func (*ACLDel) GetCrcString() string { return "ef34fea4" }
-func (*ACLDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ACLDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.ACLIndex
- return size
-}
-func (m *ACLDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.ACLIndex)
- return buf.Bytes(), nil
-}
-func (m *ACLDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.ACLIndex = buf.DecodeUint32()
- return nil
-}
-
-// ACLDelReply defines message 'acl_del_reply'.
-type ACLDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *ACLDelReply) Reset() { *m = ACLDelReply{} }
-func (*ACLDelReply) GetMessageName() string { return "acl_del_reply" }
-func (*ACLDelReply) GetCrcString() string { return "e8d4e804" }
-func (*ACLDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ACLDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *ACLDelReply) 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 *ACLDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// ACLDetails defines message 'acl_details'.
-type ACLDetails struct {
- ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
- Tag []byte `binapi:"u8[64],name=tag" json:"tag,omitempty"`
- Count uint32 `binapi:"u32,name=count" json:"-"`
- R []ACLRule `binapi:"acl_rule[count],name=r" json:"r,omitempty"`
-}
-
-func (m *ACLDetails) Reset() { *m = ACLDetails{} }
-func (*ACLDetails) GetMessageName() string { return "acl_details" }
-func (*ACLDetails) GetCrcString() string { return "f89d7a88" }
-func (*ACLDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ACLDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.ACLIndex
- size += 1 * 64 // m.Tag
- size += 4 // m.Count
- for j1 := 0; j1 < len(m.R); j1++ {
- var s1 ACLRule
- _ = s1
- if j1 < len(m.R) {
- s1 = m.R[j1]
- }
- size += 1 // s1.IsPermit
- size += 1 // s1.IsIPv6
- size += 1 * 16 // s1.SrcIPAddr
- size += 1 // s1.SrcIPPrefixLen
- size += 1 * 16 // s1.DstIPAddr
- size += 1 // s1.DstIPPrefixLen
- size += 1 // s1.Proto
- size += 2 // s1.SrcportOrIcmptypeFirst
- size += 2 // s1.SrcportOrIcmptypeLast
- size += 2 // s1.DstportOrIcmpcodeFirst
- size += 2 // s1.DstportOrIcmpcodeLast
- size += 1 // s1.TCPFlagsMask
- size += 1 // s1.TCPFlagsValue
- }
- return size
-}
-func (m *ACLDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.ACLIndex)
- buf.EncodeBytes(m.Tag, 64)
- buf.EncodeUint32(uint32(len(m.R)))
- for j0 := 0; j0 < len(m.R); j0++ {
- var v0 ACLRule // R
- if j0 < len(m.R) {
- v0 = m.R[j0]
- }
- buf.EncodeUint8(v0.IsPermit)
- buf.EncodeUint8(v0.IsIPv6)
- buf.EncodeBytes(v0.SrcIPAddr, 16)
- buf.EncodeUint8(v0.SrcIPPrefixLen)
- buf.EncodeBytes(v0.DstIPAddr, 16)
- buf.EncodeUint8(v0.DstIPPrefixLen)
- buf.EncodeUint8(v0.Proto)
- buf.EncodeUint16(v0.SrcportOrIcmptypeFirst)
- buf.EncodeUint16(v0.SrcportOrIcmptypeLast)
- buf.EncodeUint16(v0.DstportOrIcmpcodeFirst)
- buf.EncodeUint16(v0.DstportOrIcmpcodeLast)
- buf.EncodeUint8(v0.TCPFlagsMask)
- buf.EncodeUint8(v0.TCPFlagsValue)
- }
- return buf.Bytes(), nil
-}
-func (m *ACLDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.ACLIndex = buf.DecodeUint32()
- m.Tag = make([]byte, 64)
- copy(m.Tag, buf.DecodeBytes(len(m.Tag)))
- m.Count = buf.DecodeUint32()
- m.R = make([]ACLRule, m.Count)
- for j0 := 0; j0 < len(m.R); j0++ {
- m.R[j0].IsPermit = buf.DecodeUint8()
- m.R[j0].IsIPv6 = buf.DecodeUint8()
- m.R[j0].SrcIPAddr = make([]byte, 16)
- copy(m.R[j0].SrcIPAddr, buf.DecodeBytes(len(m.R[j0].SrcIPAddr)))
- m.R[j0].SrcIPPrefixLen = buf.DecodeUint8()
- m.R[j0].DstIPAddr = make([]byte, 16)
- copy(m.R[j0].DstIPAddr, buf.DecodeBytes(len(m.R[j0].DstIPAddr)))
- m.R[j0].DstIPPrefixLen = buf.DecodeUint8()
- m.R[j0].Proto = buf.DecodeUint8()
- m.R[j0].SrcportOrIcmptypeFirst = buf.DecodeUint16()
- m.R[j0].SrcportOrIcmptypeLast = buf.DecodeUint16()
- m.R[j0].DstportOrIcmpcodeFirst = buf.DecodeUint16()
- m.R[j0].DstportOrIcmpcodeLast = buf.DecodeUint16()
- m.R[j0].TCPFlagsMask = buf.DecodeUint8()
- m.R[j0].TCPFlagsValue = buf.DecodeUint8()
- }
- return nil
-}
-
-// ACLDump defines message 'acl_dump'.
-type ACLDump struct {
- ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
-}
-
-func (m *ACLDump) Reset() { *m = ACLDump{} }
-func (*ACLDump) GetMessageName() string { return "acl_dump" }
-func (*ACLDump) GetCrcString() string { return "ef34fea4" }
-func (*ACLDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ACLDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.ACLIndex
- return size
-}
-func (m *ACLDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.ACLIndex)
- return buf.Bytes(), nil
-}
-func (m *ACLDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.ACLIndex = buf.DecodeUint32()
- return nil
-}
-
-// ACLInterfaceAddDel defines message 'acl_interface_add_del'.
-type ACLInterfaceAddDel struct {
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
- IsInput uint8 `binapi:"u8,name=is_input" json:"is_input,omitempty"`
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
-}
-
-func (m *ACLInterfaceAddDel) Reset() { *m = ACLInterfaceAddDel{} }
-func (*ACLInterfaceAddDel) GetMessageName() string { return "acl_interface_add_del" }
-func (*ACLInterfaceAddDel) GetCrcString() string { return "0b2aedd1" }
-func (*ACLInterfaceAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ACLInterfaceAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 1 // m.IsInput
- size += 4 // m.SwIfIndex
- size += 4 // m.ACLIndex
- return size
-}
-func (m *ACLInterfaceAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsAdd)
- buf.EncodeUint8(m.IsInput)
- buf.EncodeUint32(m.SwIfIndex)
- buf.EncodeUint32(m.ACLIndex)
- return buf.Bytes(), nil
-}
-func (m *ACLInterfaceAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeUint8()
- m.IsInput = buf.DecodeUint8()
- m.SwIfIndex = buf.DecodeUint32()
- m.ACLIndex = buf.DecodeUint32()
- return nil
-}
-
-// ACLInterfaceAddDelReply defines message 'acl_interface_add_del_reply'.
-type ACLInterfaceAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *ACLInterfaceAddDelReply) Reset() { *m = ACLInterfaceAddDelReply{} }
-func (*ACLInterfaceAddDelReply) GetMessageName() string { return "acl_interface_add_del_reply" }
-func (*ACLInterfaceAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*ACLInterfaceAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ACLInterfaceAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *ACLInterfaceAddDelReply) 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 *ACLInterfaceAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// ACLInterfaceEtypeWhitelistDetails defines message 'acl_interface_etype_whitelist_details'.
-type ACLInterfaceEtypeWhitelistDetails struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- Count uint8 `binapi:"u8,name=count" json:"-"`
- NInput uint8 `binapi:"u8,name=n_input" json:"n_input,omitempty"`
- Whitelist []uint16 `binapi:"u16[count],name=whitelist" json:"whitelist,omitempty"`
-}
-
-func (m *ACLInterfaceEtypeWhitelistDetails) Reset() { *m = ACLInterfaceEtypeWhitelistDetails{} }
-func (*ACLInterfaceEtypeWhitelistDetails) GetMessageName() string {
- return "acl_interface_etype_whitelist_details"
-}
-func (*ACLInterfaceEtypeWhitelistDetails) GetCrcString() string { return "6a5d4e81" }
-func (*ACLInterfaceEtypeWhitelistDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ACLInterfaceEtypeWhitelistDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.Count
- size += 1 // m.NInput
- size += 2 * len(m.Whitelist) // m.Whitelist
- return size
-}
-func (m *ACLInterfaceEtypeWhitelistDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.SwIfIndex)
- buf.EncodeUint8(uint8(len(m.Whitelist)))
- buf.EncodeUint8(m.NInput)
- for i := 0; i < len(m.Whitelist); i++ {
- var x uint16
- if i < len(m.Whitelist) {
- x = uint16(m.Whitelist[i])
- }
- buf.EncodeUint16(x)
- }
- return buf.Bytes(), nil
-}
-func (m *ACLInterfaceEtypeWhitelistDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = buf.DecodeUint32()
- m.Count = buf.DecodeUint8()
- m.NInput = buf.DecodeUint8()
- m.Whitelist = make([]uint16, m.Count)
- for i := 0; i < len(m.Whitelist); i++ {
- m.Whitelist[i] = buf.DecodeUint16()
- }
- return nil
-}
-
-// ACLInterfaceEtypeWhitelistDump defines message 'acl_interface_etype_whitelist_dump'.
-type ACLInterfaceEtypeWhitelistDump struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *ACLInterfaceEtypeWhitelistDump) Reset() { *m = ACLInterfaceEtypeWhitelistDump{} }
-func (*ACLInterfaceEtypeWhitelistDump) GetMessageName() string {
- return "acl_interface_etype_whitelist_dump"
-}
-func (*ACLInterfaceEtypeWhitelistDump) GetCrcString() string { return "529cb13f" }
-func (*ACLInterfaceEtypeWhitelistDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ACLInterfaceEtypeWhitelistDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *ACLInterfaceEtypeWhitelistDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.SwIfIndex)
- return buf.Bytes(), nil
-}
-func (m *ACLInterfaceEtypeWhitelistDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = buf.DecodeUint32()
- return nil
-}
-
-// ACLInterfaceListDetails defines message 'acl_interface_list_details'.
-type ACLInterfaceListDetails struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- Count uint8 `binapi:"u8,name=count" json:"-"`
- NInput uint8 `binapi:"u8,name=n_input" json:"n_input,omitempty"`
- Acls []uint32 `binapi:"u32[count],name=acls" json:"acls,omitempty"`
-}
-
-func (m *ACLInterfaceListDetails) Reset() { *m = ACLInterfaceListDetails{} }
-func (*ACLInterfaceListDetails) GetMessageName() string { return "acl_interface_list_details" }
-func (*ACLInterfaceListDetails) GetCrcString() string { return "d5e80809" }
-func (*ACLInterfaceListDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ACLInterfaceListDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.Count
- size += 1 // m.NInput
- size += 4 * len(m.Acls) // m.Acls
- return size
-}
-func (m *ACLInterfaceListDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.SwIfIndex)
- buf.EncodeUint8(uint8(len(m.Acls)))
- buf.EncodeUint8(m.NInput)
- for i := 0; i < len(m.Acls); i++ {
- var x uint32
- if i < len(m.Acls) {
- x = uint32(m.Acls[i])
- }
- buf.EncodeUint32(x)
- }
- return buf.Bytes(), nil
-}
-func (m *ACLInterfaceListDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = buf.DecodeUint32()
- m.Count = buf.DecodeUint8()
- m.NInput = buf.DecodeUint8()
- m.Acls = make([]uint32, m.Count)
- for i := 0; i < len(m.Acls); i++ {
- m.Acls[i] = buf.DecodeUint32()
- }
- return nil
-}
-
-// ACLInterfaceListDump defines message 'acl_interface_list_dump'.
-type ACLInterfaceListDump struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *ACLInterfaceListDump) Reset() { *m = ACLInterfaceListDump{} }
-func (*ACLInterfaceListDump) GetMessageName() string { return "acl_interface_list_dump" }
-func (*ACLInterfaceListDump) GetCrcString() string { return "529cb13f" }
-func (*ACLInterfaceListDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ACLInterfaceListDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *ACLInterfaceListDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.SwIfIndex)
- return buf.Bytes(), nil
-}
-func (m *ACLInterfaceListDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = buf.DecodeUint32()
- return nil
-}
-
-// ACLInterfaceSetACLList defines message 'acl_interface_set_acl_list'.
-type ACLInterfaceSetACLList struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- Count uint8 `binapi:"u8,name=count" json:"-"`
- NInput uint8 `binapi:"u8,name=n_input" json:"n_input,omitempty"`
- Acls []uint32 `binapi:"u32[count],name=acls" json:"acls,omitempty"`
-}
-
-func (m *ACLInterfaceSetACLList) Reset() { *m = ACLInterfaceSetACLList{} }
-func (*ACLInterfaceSetACLList) GetMessageName() string { return "acl_interface_set_acl_list" }
-func (*ACLInterfaceSetACLList) GetCrcString() string { return "8baece38" }
-func (*ACLInterfaceSetACLList) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ACLInterfaceSetACLList) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.Count
- size += 1 // m.NInput
- size += 4 * len(m.Acls) // m.Acls
- return size
-}
-func (m *ACLInterfaceSetACLList) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.SwIfIndex)
- buf.EncodeUint8(uint8(len(m.Acls)))
- buf.EncodeUint8(m.NInput)
- for i := 0; i < len(m.Acls); i++ {
- var x uint32
- if i < len(m.Acls) {
- x = uint32(m.Acls[i])
- }
- buf.EncodeUint32(x)
- }
- return buf.Bytes(), nil
-}
-func (m *ACLInterfaceSetACLList) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = buf.DecodeUint32()
- m.Count = buf.DecodeUint8()
- m.NInput = buf.DecodeUint8()
- m.Acls = make([]uint32, m.Count)
- for i := 0; i < len(m.Acls); i++ {
- m.Acls[i] = buf.DecodeUint32()
- }
- return nil
-}
-
-// ACLInterfaceSetACLListReply defines message 'acl_interface_set_acl_list_reply'.
-type ACLInterfaceSetACLListReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *ACLInterfaceSetACLListReply) Reset() { *m = ACLInterfaceSetACLListReply{} }
-func (*ACLInterfaceSetACLListReply) GetMessageName() string {
- return "acl_interface_set_acl_list_reply"
-}
-func (*ACLInterfaceSetACLListReply) GetCrcString() string { return "e8d4e804" }
-func (*ACLInterfaceSetACLListReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ACLInterfaceSetACLListReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *ACLInterfaceSetACLListReply) 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 *ACLInterfaceSetACLListReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// ACLInterfaceSetEtypeWhitelist defines message 'acl_interface_set_etype_whitelist'.
-type ACLInterfaceSetEtypeWhitelist struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- Count uint8 `binapi:"u8,name=count" json:"-"`
- NInput uint8 `binapi:"u8,name=n_input" json:"n_input,omitempty"`
- Whitelist []uint16 `binapi:"u16[count],name=whitelist" json:"whitelist,omitempty"`
-}
-
-func (m *ACLInterfaceSetEtypeWhitelist) Reset() { *m = ACLInterfaceSetEtypeWhitelist{} }
-func (*ACLInterfaceSetEtypeWhitelist) GetMessageName() string {
- return "acl_interface_set_etype_whitelist"
-}
-func (*ACLInterfaceSetEtypeWhitelist) GetCrcString() string { return "f515efc5" }
-func (*ACLInterfaceSetEtypeWhitelist) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ACLInterfaceSetEtypeWhitelist) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.Count
- size += 1 // m.NInput
- size += 2 * len(m.Whitelist) // m.Whitelist
- return size
-}
-func (m *ACLInterfaceSetEtypeWhitelist) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.SwIfIndex)
- buf.EncodeUint8(uint8(len(m.Whitelist)))
- buf.EncodeUint8(m.NInput)
- for i := 0; i < len(m.Whitelist); i++ {
- var x uint16
- if i < len(m.Whitelist) {
- x = uint16(m.Whitelist[i])
- }
- buf.EncodeUint16(x)
- }
- return buf.Bytes(), nil
-}
-func (m *ACLInterfaceSetEtypeWhitelist) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = buf.DecodeUint32()
- m.Count = buf.DecodeUint8()
- m.NInput = buf.DecodeUint8()
- m.Whitelist = make([]uint16, m.Count)
- for i := 0; i < len(m.Whitelist); i++ {
- m.Whitelist[i] = buf.DecodeUint16()
- }
- return nil
-}
-
-// ACLInterfaceSetEtypeWhitelistReply defines message 'acl_interface_set_etype_whitelist_reply'.
-type ACLInterfaceSetEtypeWhitelistReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *ACLInterfaceSetEtypeWhitelistReply) Reset() { *m = ACLInterfaceSetEtypeWhitelistReply{} }
-func (*ACLInterfaceSetEtypeWhitelistReply) GetMessageName() string {
- return "acl_interface_set_etype_whitelist_reply"
-}
-func (*ACLInterfaceSetEtypeWhitelistReply) GetCrcString() string { return "e8d4e804" }
-func (*ACLInterfaceSetEtypeWhitelistReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ACLInterfaceSetEtypeWhitelistReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *ACLInterfaceSetEtypeWhitelistReply) 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 *ACLInterfaceSetEtypeWhitelistReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// ACLPluginControlPing defines message 'acl_plugin_control_ping'.
-type ACLPluginControlPing struct{}
-
-func (m *ACLPluginControlPing) Reset() { *m = ACLPluginControlPing{} }
-func (*ACLPluginControlPing) GetMessageName() string { return "acl_plugin_control_ping" }
-func (*ACLPluginControlPing) GetCrcString() string { return "51077d14" }
-func (*ACLPluginControlPing) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ACLPluginControlPing) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *ACLPluginControlPing) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *ACLPluginControlPing) Unmarshal(b []byte) error {
- return nil
-}
-
-// ACLPluginControlPingReply defines message 'acl_plugin_control_ping_reply'.
-type ACLPluginControlPingReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- ClientIndex uint32 `binapi:"u32,name=client_index" json:"client_index,omitempty"`
- VpePID uint32 `binapi:"u32,name=vpe_pid" json:"vpe_pid,omitempty"`
-}
-
-func (m *ACLPluginControlPingReply) Reset() { *m = ACLPluginControlPingReply{} }
-func (*ACLPluginControlPingReply) GetMessageName() string { return "acl_plugin_control_ping_reply" }
-func (*ACLPluginControlPingReply) GetCrcString() string { return "f6b0b8ca" }
-func (*ACLPluginControlPingReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ACLPluginControlPingReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.ClientIndex
- size += 4 // m.VpePID
- return size
-}
-func (m *ACLPluginControlPingReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.ClientIndex)
- buf.EncodeUint32(m.VpePID)
- return buf.Bytes(), nil
-}
-func (m *ACLPluginControlPingReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.ClientIndex = buf.DecodeUint32()
- m.VpePID = buf.DecodeUint32()
- return nil
-}
-
-// ACLPluginGetConnTableMaxEntries defines message 'acl_plugin_get_conn_table_max_entries'.
-type ACLPluginGetConnTableMaxEntries struct{}
-
-func (m *ACLPluginGetConnTableMaxEntries) Reset() { *m = ACLPluginGetConnTableMaxEntries{} }
-func (*ACLPluginGetConnTableMaxEntries) GetMessageName() string {
- return "acl_plugin_get_conn_table_max_entries"
-}
-func (*ACLPluginGetConnTableMaxEntries) GetCrcString() string { return "51077d14" }
-func (*ACLPluginGetConnTableMaxEntries) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ACLPluginGetConnTableMaxEntries) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *ACLPluginGetConnTableMaxEntries) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *ACLPluginGetConnTableMaxEntries) Unmarshal(b []byte) error {
- return nil
-}
-
-// ACLPluginGetConnTableMaxEntriesReply defines message 'acl_plugin_get_conn_table_max_entries_reply'.
-type ACLPluginGetConnTableMaxEntriesReply struct {
- ConnTableMaxEntries uint64 `binapi:"u64,name=conn_table_max_entries" json:"conn_table_max_entries,omitempty"`
-}
-
-func (m *ACLPluginGetConnTableMaxEntriesReply) Reset() { *m = ACLPluginGetConnTableMaxEntriesReply{} }
-func (*ACLPluginGetConnTableMaxEntriesReply) GetMessageName() string {
- return "acl_plugin_get_conn_table_max_entries_reply"
-}
-func (*ACLPluginGetConnTableMaxEntriesReply) GetCrcString() string { return "7a096d3d" }
-func (*ACLPluginGetConnTableMaxEntriesReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ACLPluginGetConnTableMaxEntriesReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 8 // m.ConnTableMaxEntries
- return size
-}
-func (m *ACLPluginGetConnTableMaxEntriesReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint64(m.ConnTableMaxEntries)
- return buf.Bytes(), nil
-}
-func (m *ACLPluginGetConnTableMaxEntriesReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.ConnTableMaxEntries = buf.DecodeUint64()
- return nil
-}
-
-// ACLPluginGetVersion defines message 'acl_plugin_get_version'.
-type ACLPluginGetVersion struct{}
-
-func (m *ACLPluginGetVersion) Reset() { *m = ACLPluginGetVersion{} }
-func (*ACLPluginGetVersion) GetMessageName() string { return "acl_plugin_get_version" }
-func (*ACLPluginGetVersion) GetCrcString() string { return "51077d14" }
-func (*ACLPluginGetVersion) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ACLPluginGetVersion) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *ACLPluginGetVersion) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *ACLPluginGetVersion) Unmarshal(b []byte) error {
- return nil
-}
-
-// ACLPluginGetVersionReply defines message 'acl_plugin_get_version_reply'.
-type ACLPluginGetVersionReply struct {
- Major uint32 `binapi:"u32,name=major" json:"major,omitempty"`
- Minor uint32 `binapi:"u32,name=minor" json:"minor,omitempty"`
-}
-
-func (m *ACLPluginGetVersionReply) Reset() { *m = ACLPluginGetVersionReply{} }
-func (*ACLPluginGetVersionReply) GetMessageName() string { return "acl_plugin_get_version_reply" }
-func (*ACLPluginGetVersionReply) GetCrcString() string { return "9b32cf86" }
-func (*ACLPluginGetVersionReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ACLPluginGetVersionReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Major
- size += 4 // m.Minor
- return size
-}
-func (m *ACLPluginGetVersionReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Major)
- buf.EncodeUint32(m.Minor)
- return buf.Bytes(), nil
-}
-func (m *ACLPluginGetVersionReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Major = buf.DecodeUint32()
- m.Minor = buf.DecodeUint32()
- return nil
-}
-
-// ACLStatsIntfCountersEnable defines message 'acl_stats_intf_counters_enable'.
-type ACLStatsIntfCountersEnable struct {
- Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
-}
-
-func (m *ACLStatsIntfCountersEnable) Reset() { *m = ACLStatsIntfCountersEnable{} }
-func (*ACLStatsIntfCountersEnable) GetMessageName() string { return "acl_stats_intf_counters_enable" }
-func (*ACLStatsIntfCountersEnable) GetCrcString() string { return "b3e225d2" }
-func (*ACLStatsIntfCountersEnable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ACLStatsIntfCountersEnable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.Enable
- return size
-}
-func (m *ACLStatsIntfCountersEnable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.Enable)
- return buf.Bytes(), nil
-}
-func (m *ACLStatsIntfCountersEnable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Enable = buf.DecodeBool()
- return nil
-}
-
-// ACLStatsIntfCountersEnableReply defines message 'acl_stats_intf_counters_enable_reply'.
-type ACLStatsIntfCountersEnableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *ACLStatsIntfCountersEnableReply) Reset() { *m = ACLStatsIntfCountersEnableReply{} }
-func (*ACLStatsIntfCountersEnableReply) GetMessageName() string {
- return "acl_stats_intf_counters_enable_reply"
-}
-func (*ACLStatsIntfCountersEnableReply) GetCrcString() string { return "e8d4e804" }
-func (*ACLStatsIntfCountersEnableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ACLStatsIntfCountersEnableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *ACLStatsIntfCountersEnableReply) 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 *ACLStatsIntfCountersEnableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// MacipACLAdd defines message 'macip_acl_add'.
-type MacipACLAdd struct {
- Tag []byte `binapi:"u8[64],name=tag" json:"tag,omitempty"`
- Count uint32 `binapi:"u32,name=count" json:"-"`
- R []MacipACLRule `binapi:"macip_acl_rule[count],name=r" json:"r,omitempty"`
-}
-
-func (m *MacipACLAdd) Reset() { *m = MacipACLAdd{} }
-func (*MacipACLAdd) GetMessageName() string { return "macip_acl_add" }
-func (*MacipACLAdd) GetCrcString() string { return "0c680ca5" }
-func (*MacipACLAdd) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *MacipACLAdd) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 64 // m.Tag
- size += 4 // m.Count
- for j1 := 0; j1 < len(m.R); j1++ {
- var s1 MacipACLRule
- _ = s1
- if j1 < len(m.R) {
- s1 = m.R[j1]
- }
- size += 1 // s1.IsPermit
- size += 1 // s1.IsIPv6
- size += 1 * 6 // s1.SrcMac
- size += 1 * 6 // s1.SrcMacMask
- size += 1 * 16 // s1.SrcIPAddr
- size += 1 // s1.SrcIPPrefixLen
- }
- return size
-}
-func (m *MacipACLAdd) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.Tag, 64)
- buf.EncodeUint32(uint32(len(m.R)))
- for j0 := 0; j0 < len(m.R); j0++ {
- var v0 MacipACLRule // R
- if j0 < len(m.R) {
- v0 = m.R[j0]
- }
- buf.EncodeUint8(v0.IsPermit)
- buf.EncodeUint8(v0.IsIPv6)
- buf.EncodeBytes(v0.SrcMac, 6)
- buf.EncodeBytes(v0.SrcMacMask, 6)
- buf.EncodeBytes(v0.SrcIPAddr, 16)
- buf.EncodeUint8(v0.SrcIPPrefixLen)
- }
- return buf.Bytes(), nil
-}
-func (m *MacipACLAdd) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Tag = make([]byte, 64)
- copy(m.Tag, buf.DecodeBytes(len(m.Tag)))
- m.Count = buf.DecodeUint32()
- m.R = make([]MacipACLRule, m.Count)
- for j0 := 0; j0 < len(m.R); j0++ {
- m.R[j0].IsPermit = buf.DecodeUint8()
- m.R[j0].IsIPv6 = buf.DecodeUint8()
- m.R[j0].SrcMac = make([]byte, 6)
- copy(m.R[j0].SrcMac, buf.DecodeBytes(len(m.R[j0].SrcMac)))
- m.R[j0].SrcMacMask = make([]byte, 6)
- copy(m.R[j0].SrcMacMask, buf.DecodeBytes(len(m.R[j0].SrcMacMask)))
- m.R[j0].SrcIPAddr = make([]byte, 16)
- copy(m.R[j0].SrcIPAddr, buf.DecodeBytes(len(m.R[j0].SrcIPAddr)))
- m.R[j0].SrcIPPrefixLen = buf.DecodeUint8()
- }
- return nil
-}
-
-// MacipACLAddReplace defines message 'macip_acl_add_replace'.
-type MacipACLAddReplace struct {
- ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
- Tag []byte `binapi:"u8[64],name=tag" json:"tag,omitempty"`
- Count uint32 `binapi:"u32,name=count" json:"-"`
- R []MacipACLRule `binapi:"macip_acl_rule[count],name=r" json:"r,omitempty"`
-}
-
-func (m *MacipACLAddReplace) Reset() { *m = MacipACLAddReplace{} }
-func (*MacipACLAddReplace) GetMessageName() string { return "macip_acl_add_replace" }
-func (*MacipACLAddReplace) GetCrcString() string { return "d3d313e7" }
-func (*MacipACLAddReplace) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *MacipACLAddReplace) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.ACLIndex
- size += 1 * 64 // m.Tag
- size += 4 // m.Count
- for j1 := 0; j1 < len(m.R); j1++ {
- var s1 MacipACLRule
- _ = s1
- if j1 < len(m.R) {
- s1 = m.R[j1]
- }
- size += 1 // s1.IsPermit
- size += 1 // s1.IsIPv6
- size += 1 * 6 // s1.SrcMac
- size += 1 * 6 // s1.SrcMacMask
- size += 1 * 16 // s1.SrcIPAddr
- size += 1 // s1.SrcIPPrefixLen
- }
- return size
-}
-func (m *MacipACLAddReplace) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.ACLIndex)
- buf.EncodeBytes(m.Tag, 64)
- buf.EncodeUint32(uint32(len(m.R)))
- for j0 := 0; j0 < len(m.R); j0++ {
- var v0 MacipACLRule // R
- if j0 < len(m.R) {
- v0 = m.R[j0]
- }
- buf.EncodeUint8(v0.IsPermit)
- buf.EncodeUint8(v0.IsIPv6)
- buf.EncodeBytes(v0.SrcMac, 6)
- buf.EncodeBytes(v0.SrcMacMask, 6)
- buf.EncodeBytes(v0.SrcIPAddr, 16)
- buf.EncodeUint8(v0.SrcIPPrefixLen)
- }
- return buf.Bytes(), nil
-}
-func (m *MacipACLAddReplace) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.ACLIndex = buf.DecodeUint32()
- m.Tag = make([]byte, 64)
- copy(m.Tag, buf.DecodeBytes(len(m.Tag)))
- m.Count = buf.DecodeUint32()
- m.R = make([]MacipACLRule, m.Count)
- for j0 := 0; j0 < len(m.R); j0++ {
- m.R[j0].IsPermit = buf.DecodeUint8()
- m.R[j0].IsIPv6 = buf.DecodeUint8()
- m.R[j0].SrcMac = make([]byte, 6)
- copy(m.R[j0].SrcMac, buf.DecodeBytes(len(m.R[j0].SrcMac)))
- m.R[j0].SrcMacMask = make([]byte, 6)
- copy(m.R[j0].SrcMacMask, buf.DecodeBytes(len(m.R[j0].SrcMacMask)))
- m.R[j0].SrcIPAddr = make([]byte, 16)
- copy(m.R[j0].SrcIPAddr, buf.DecodeBytes(len(m.R[j0].SrcIPAddr)))
- m.R[j0].SrcIPPrefixLen = buf.DecodeUint8()
- }
- return nil
-}
-
-// MacipACLAddReplaceReply defines message 'macip_acl_add_replace_reply'.
-type MacipACLAddReplaceReply struct {
- ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *MacipACLAddReplaceReply) Reset() { *m = MacipACLAddReplaceReply{} }
-func (*MacipACLAddReplaceReply) GetMessageName() string { return "macip_acl_add_replace_reply" }
-func (*MacipACLAddReplaceReply) GetCrcString() string { return "ac407b0c" }
-func (*MacipACLAddReplaceReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MacipACLAddReplaceReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.ACLIndex
- size += 4 // m.Retval
- return size
-}
-func (m *MacipACLAddReplaceReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.ACLIndex)
- buf.EncodeInt32(m.Retval)
- return buf.Bytes(), nil
-}
-func (m *MacipACLAddReplaceReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.ACLIndex = buf.DecodeUint32()
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// MacipACLAddReply defines message 'macip_acl_add_reply'.
-type MacipACLAddReply struct {
- ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *MacipACLAddReply) Reset() { *m = MacipACLAddReply{} }
-func (*MacipACLAddReply) GetMessageName() string { return "macip_acl_add_reply" }
-func (*MacipACLAddReply) GetCrcString() string { return "ac407b0c" }
-func (*MacipACLAddReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MacipACLAddReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.ACLIndex
- size += 4 // m.Retval
- return size
-}
-func (m *MacipACLAddReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.ACLIndex)
- buf.EncodeInt32(m.Retval)
- return buf.Bytes(), nil
-}
-func (m *MacipACLAddReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.ACLIndex = buf.DecodeUint32()
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// MacipACLDel defines message 'macip_acl_del'.
-type MacipACLDel struct {
- ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
-}
-
-func (m *MacipACLDel) Reset() { *m = MacipACLDel{} }
-func (*MacipACLDel) GetMessageName() string { return "macip_acl_del" }
-func (*MacipACLDel) GetCrcString() string { return "ef34fea4" }
-func (*MacipACLDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *MacipACLDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.ACLIndex
- return size
-}
-func (m *MacipACLDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.ACLIndex)
- return buf.Bytes(), nil
-}
-func (m *MacipACLDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.ACLIndex = buf.DecodeUint32()
- return nil
-}
-
-// MacipACLDelReply defines message 'macip_acl_del_reply'.
-type MacipACLDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *MacipACLDelReply) Reset() { *m = MacipACLDelReply{} }
-func (*MacipACLDelReply) GetMessageName() string { return "macip_acl_del_reply" }
-func (*MacipACLDelReply) GetCrcString() string { return "e8d4e804" }
-func (*MacipACLDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MacipACLDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *MacipACLDelReply) 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 *MacipACLDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// MacipACLDetails defines message 'macip_acl_details'.
-type MacipACLDetails struct {
- ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
- Tag []byte `binapi:"u8[64],name=tag" json:"tag,omitempty"`
- Count uint32 `binapi:"u32,name=count" json:"-"`
- R []MacipACLRule `binapi:"macip_acl_rule[count],name=r" json:"r,omitempty"`
-}
-
-func (m *MacipACLDetails) Reset() { *m = MacipACLDetails{} }
-func (*MacipACLDetails) GetMessageName() string { return "macip_acl_details" }
-func (*MacipACLDetails) GetCrcString() string { return "e164e69a" }
-func (*MacipACLDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MacipACLDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.ACLIndex
- size += 1 * 64 // m.Tag
- size += 4 // m.Count
- for j1 := 0; j1 < len(m.R); j1++ {
- var s1 MacipACLRule
- _ = s1
- if j1 < len(m.R) {
- s1 = m.R[j1]
- }
- size += 1 // s1.IsPermit
- size += 1 // s1.IsIPv6
- size += 1 * 6 // s1.SrcMac
- size += 1 * 6 // s1.SrcMacMask
- size += 1 * 16 // s1.SrcIPAddr
- size += 1 // s1.SrcIPPrefixLen
- }
- return size
-}
-func (m *MacipACLDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.ACLIndex)
- buf.EncodeBytes(m.Tag, 64)
- buf.EncodeUint32(uint32(len(m.R)))
- for j0 := 0; j0 < len(m.R); j0++ {
- var v0 MacipACLRule // R
- if j0 < len(m.R) {
- v0 = m.R[j0]
- }
- buf.EncodeUint8(v0.IsPermit)
- buf.EncodeUint8(v0.IsIPv6)
- buf.EncodeBytes(v0.SrcMac, 6)
- buf.EncodeBytes(v0.SrcMacMask, 6)
- buf.EncodeBytes(v0.SrcIPAddr, 16)
- buf.EncodeUint8(v0.SrcIPPrefixLen)
- }
- return buf.Bytes(), nil
-}
-func (m *MacipACLDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.ACLIndex = buf.DecodeUint32()
- m.Tag = make([]byte, 64)
- copy(m.Tag, buf.DecodeBytes(len(m.Tag)))
- m.Count = buf.DecodeUint32()
- m.R = make([]MacipACLRule, m.Count)
- for j0 := 0; j0 < len(m.R); j0++ {
- m.R[j0].IsPermit = buf.DecodeUint8()
- m.R[j0].IsIPv6 = buf.DecodeUint8()
- m.R[j0].SrcMac = make([]byte, 6)
- copy(m.R[j0].SrcMac, buf.DecodeBytes(len(m.R[j0].SrcMac)))
- m.R[j0].SrcMacMask = make([]byte, 6)
- copy(m.R[j0].SrcMacMask, buf.DecodeBytes(len(m.R[j0].SrcMacMask)))
- m.R[j0].SrcIPAddr = make([]byte, 16)
- copy(m.R[j0].SrcIPAddr, buf.DecodeBytes(len(m.R[j0].SrcIPAddr)))
- m.R[j0].SrcIPPrefixLen = buf.DecodeUint8()
- }
- return nil
-}
-
-// MacipACLDump defines message 'macip_acl_dump'.
-type MacipACLDump struct {
- ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
-}
-
-func (m *MacipACLDump) Reset() { *m = MacipACLDump{} }
-func (*MacipACLDump) GetMessageName() string { return "macip_acl_dump" }
-func (*MacipACLDump) GetCrcString() string { return "ef34fea4" }
-func (*MacipACLDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *MacipACLDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.ACLIndex
- return size
-}
-func (m *MacipACLDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.ACLIndex)
- return buf.Bytes(), nil
-}
-func (m *MacipACLDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.ACLIndex = buf.DecodeUint32()
- return nil
-}
-
-// MacipACLInterfaceAddDel defines message 'macip_acl_interface_add_del'.
-type MacipACLInterfaceAddDel struct {
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
-}
-
-func (m *MacipACLInterfaceAddDel) Reset() { *m = MacipACLInterfaceAddDel{} }
-func (*MacipACLInterfaceAddDel) GetMessageName() string { return "macip_acl_interface_add_del" }
-func (*MacipACLInterfaceAddDel) GetCrcString() string { return "6a6be97c" }
-func (*MacipACLInterfaceAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *MacipACLInterfaceAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 4 // m.SwIfIndex
- size += 4 // m.ACLIndex
- return size
-}
-func (m *MacipACLInterfaceAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsAdd)
- buf.EncodeUint32(m.SwIfIndex)
- buf.EncodeUint32(m.ACLIndex)
- return buf.Bytes(), nil
-}
-func (m *MacipACLInterfaceAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeUint8()
- m.SwIfIndex = buf.DecodeUint32()
- m.ACLIndex = buf.DecodeUint32()
- return nil
-}
-
-// MacipACLInterfaceAddDelReply defines message 'macip_acl_interface_add_del_reply'.
-type MacipACLInterfaceAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *MacipACLInterfaceAddDelReply) Reset() { *m = MacipACLInterfaceAddDelReply{} }
-func (*MacipACLInterfaceAddDelReply) GetMessageName() string {
- return "macip_acl_interface_add_del_reply"
-}
-func (*MacipACLInterfaceAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*MacipACLInterfaceAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MacipACLInterfaceAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *MacipACLInterfaceAddDelReply) 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 *MacipACLInterfaceAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// MacipACLInterfaceGet defines message 'macip_acl_interface_get'.
-type MacipACLInterfaceGet struct{}
-
-func (m *MacipACLInterfaceGet) Reset() { *m = MacipACLInterfaceGet{} }
-func (*MacipACLInterfaceGet) GetMessageName() string { return "macip_acl_interface_get" }
-func (*MacipACLInterfaceGet) GetCrcString() string { return "51077d14" }
-func (*MacipACLInterfaceGet) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *MacipACLInterfaceGet) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *MacipACLInterfaceGet) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *MacipACLInterfaceGet) Unmarshal(b []byte) error {
- return nil
-}
-
-// MacipACLInterfaceGetReply defines message 'macip_acl_interface_get_reply'.
-type MacipACLInterfaceGetReply struct {
- Count uint32 `binapi:"u32,name=count" json:"-"`
- Acls []uint32 `binapi:"u32[count],name=acls" json:"acls,omitempty"`
-}
-
-func (m *MacipACLInterfaceGetReply) Reset() { *m = MacipACLInterfaceGetReply{} }
-func (*MacipACLInterfaceGetReply) GetMessageName() string { return "macip_acl_interface_get_reply" }
-func (*MacipACLInterfaceGetReply) GetCrcString() string { return "accf9b05" }
-func (*MacipACLInterfaceGetReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MacipACLInterfaceGetReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Count
- size += 4 * len(m.Acls) // m.Acls
- return size
-}
-func (m *MacipACLInterfaceGetReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(len(m.Acls)))
- for i := 0; i < len(m.Acls); i++ {
- var x uint32
- if i < len(m.Acls) {
- x = uint32(m.Acls[i])
- }
- buf.EncodeUint32(x)
- }
- return buf.Bytes(), nil
-}
-func (m *MacipACLInterfaceGetReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Count = buf.DecodeUint32()
- m.Acls = make([]uint32, m.Count)
- for i := 0; i < len(m.Acls); i++ {
- m.Acls[i] = buf.DecodeUint32()
- }
- return nil
-}
-
-// MacipACLInterfaceListDetails defines message 'macip_acl_interface_list_details'.
-type MacipACLInterfaceListDetails struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- Count uint8 `binapi:"u8,name=count" json:"-"`
- Acls []uint32 `binapi:"u32[count],name=acls" json:"acls,omitempty"`
-}
-
-func (m *MacipACLInterfaceListDetails) Reset() { *m = MacipACLInterfaceListDetails{} }
-func (*MacipACLInterfaceListDetails) GetMessageName() string {
- return "macip_acl_interface_list_details"
-}
-func (*MacipACLInterfaceListDetails) GetCrcString() string { return "29783fa0" }
-func (*MacipACLInterfaceListDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MacipACLInterfaceListDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.Count
- size += 4 * len(m.Acls) // m.Acls
- return size
-}
-func (m *MacipACLInterfaceListDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.SwIfIndex)
- buf.EncodeUint8(uint8(len(m.Acls)))
- for i := 0; i < len(m.Acls); i++ {
- var x uint32
- if i < len(m.Acls) {
- x = uint32(m.Acls[i])
- }
- buf.EncodeUint32(x)
- }
- return buf.Bytes(), nil
-}
-func (m *MacipACLInterfaceListDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = buf.DecodeUint32()
- m.Count = buf.DecodeUint8()
- m.Acls = make([]uint32, m.Count)
- for i := 0; i < len(m.Acls); i++ {
- m.Acls[i] = buf.DecodeUint32()
- }
- return nil
-}
-
-// MacipACLInterfaceListDump defines message 'macip_acl_interface_list_dump'.
-type MacipACLInterfaceListDump struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *MacipACLInterfaceListDump) Reset() { *m = MacipACLInterfaceListDump{} }
-func (*MacipACLInterfaceListDump) GetMessageName() string { return "macip_acl_interface_list_dump" }
-func (*MacipACLInterfaceListDump) GetCrcString() string { return "529cb13f" }
-func (*MacipACLInterfaceListDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *MacipACLInterfaceListDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *MacipACLInterfaceListDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.SwIfIndex)
- return buf.Bytes(), nil
-}
-func (m *MacipACLInterfaceListDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = buf.DecodeUint32()
- return nil
-}
-
-func init() { file_acl_binapi_init() }
-func file_acl_binapi_init() {
- api.RegisterMessage((*ACLAddReplace)(nil), "acl_add_replace_13bc8539")
- api.RegisterMessage((*ACLAddReplaceReply)(nil), "acl_add_replace_reply_ac407b0c")
- api.RegisterMessage((*ACLDel)(nil), "acl_del_ef34fea4")
- api.RegisterMessage((*ACLDelReply)(nil), "acl_del_reply_e8d4e804")
- api.RegisterMessage((*ACLDetails)(nil), "acl_details_f89d7a88")
- api.RegisterMessage((*ACLDump)(nil), "acl_dump_ef34fea4")
- api.RegisterMessage((*ACLInterfaceAddDel)(nil), "acl_interface_add_del_0b2aedd1")
- api.RegisterMessage((*ACLInterfaceAddDelReply)(nil), "acl_interface_add_del_reply_e8d4e804")
- api.RegisterMessage((*ACLInterfaceEtypeWhitelistDetails)(nil), "acl_interface_etype_whitelist_details_6a5d4e81")
- api.RegisterMessage((*ACLInterfaceEtypeWhitelistDump)(nil), "acl_interface_etype_whitelist_dump_529cb13f")
- api.RegisterMessage((*ACLInterfaceListDetails)(nil), "acl_interface_list_details_d5e80809")
- api.RegisterMessage((*ACLInterfaceListDump)(nil), "acl_interface_list_dump_529cb13f")
- api.RegisterMessage((*ACLInterfaceSetACLList)(nil), "acl_interface_set_acl_list_8baece38")
- api.RegisterMessage((*ACLInterfaceSetACLListReply)(nil), "acl_interface_set_acl_list_reply_e8d4e804")
- api.RegisterMessage((*ACLInterfaceSetEtypeWhitelist)(nil), "acl_interface_set_etype_whitelist_f515efc5")
- api.RegisterMessage((*ACLInterfaceSetEtypeWhitelistReply)(nil), "acl_interface_set_etype_whitelist_reply_e8d4e804")
- api.RegisterMessage((*ACLPluginControlPing)(nil), "acl_plugin_control_ping_51077d14")
- api.RegisterMessage((*ACLPluginControlPingReply)(nil), "acl_plugin_control_ping_reply_f6b0b8ca")
- api.RegisterMessage((*ACLPluginGetConnTableMaxEntries)(nil), "acl_plugin_get_conn_table_max_entries_51077d14")
- api.RegisterMessage((*ACLPluginGetConnTableMaxEntriesReply)(nil), "acl_plugin_get_conn_table_max_entries_reply_7a096d3d")
- api.RegisterMessage((*ACLPluginGetVersion)(nil), "acl_plugin_get_version_51077d14")
- api.RegisterMessage((*ACLPluginGetVersionReply)(nil), "acl_plugin_get_version_reply_9b32cf86")
- api.RegisterMessage((*ACLStatsIntfCountersEnable)(nil), "acl_stats_intf_counters_enable_b3e225d2")
- api.RegisterMessage((*ACLStatsIntfCountersEnableReply)(nil), "acl_stats_intf_counters_enable_reply_e8d4e804")
- api.RegisterMessage((*MacipACLAdd)(nil), "macip_acl_add_0c680ca5")
- api.RegisterMessage((*MacipACLAddReplace)(nil), "macip_acl_add_replace_d3d313e7")
- api.RegisterMessage((*MacipACLAddReplaceReply)(nil), "macip_acl_add_replace_reply_ac407b0c")
- api.RegisterMessage((*MacipACLAddReply)(nil), "macip_acl_add_reply_ac407b0c")
- api.RegisterMessage((*MacipACLDel)(nil), "macip_acl_del_ef34fea4")
- api.RegisterMessage((*MacipACLDelReply)(nil), "macip_acl_del_reply_e8d4e804")
- api.RegisterMessage((*MacipACLDetails)(nil), "macip_acl_details_e164e69a")
- api.RegisterMessage((*MacipACLDump)(nil), "macip_acl_dump_ef34fea4")
- api.RegisterMessage((*MacipACLInterfaceAddDel)(nil), "macip_acl_interface_add_del_6a6be97c")
- api.RegisterMessage((*MacipACLInterfaceAddDelReply)(nil), "macip_acl_interface_add_del_reply_e8d4e804")
- api.RegisterMessage((*MacipACLInterfaceGet)(nil), "macip_acl_interface_get_51077d14")
- api.RegisterMessage((*MacipACLInterfaceGetReply)(nil), "macip_acl_interface_get_reply_accf9b05")
- api.RegisterMessage((*MacipACLInterfaceListDetails)(nil), "macip_acl_interface_list_details_29783fa0")
- api.RegisterMessage((*MacipACLInterfaceListDump)(nil), "macip_acl_interface_list_dump_529cb13f")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*ACLAddReplace)(nil),
- (*ACLAddReplaceReply)(nil),
- (*ACLDel)(nil),
- (*ACLDelReply)(nil),
- (*ACLDetails)(nil),
- (*ACLDump)(nil),
- (*ACLInterfaceAddDel)(nil),
- (*ACLInterfaceAddDelReply)(nil),
- (*ACLInterfaceEtypeWhitelistDetails)(nil),
- (*ACLInterfaceEtypeWhitelistDump)(nil),
- (*ACLInterfaceListDetails)(nil),
- (*ACLInterfaceListDump)(nil),
- (*ACLInterfaceSetACLList)(nil),
- (*ACLInterfaceSetACLListReply)(nil),
- (*ACLInterfaceSetEtypeWhitelist)(nil),
- (*ACLInterfaceSetEtypeWhitelistReply)(nil),
- (*ACLPluginControlPing)(nil),
- (*ACLPluginControlPingReply)(nil),
- (*ACLPluginGetConnTableMaxEntries)(nil),
- (*ACLPluginGetConnTableMaxEntriesReply)(nil),
- (*ACLPluginGetVersion)(nil),
- (*ACLPluginGetVersionReply)(nil),
- (*ACLStatsIntfCountersEnable)(nil),
- (*ACLStatsIntfCountersEnableReply)(nil),
- (*MacipACLAdd)(nil),
- (*MacipACLAddReplace)(nil),
- (*MacipACLAddReplaceReply)(nil),
- (*MacipACLAddReply)(nil),
- (*MacipACLDel)(nil),
- (*MacipACLDelReply)(nil),
- (*MacipACLDetails)(nil),
- (*MacipACLDump)(nil),
- (*MacipACLInterfaceAddDel)(nil),
- (*MacipACLInterfaceAddDelReply)(nil),
- (*MacipACLInterfaceGet)(nil),
- (*MacipACLInterfaceGetReply)(nil),
- (*MacipACLInterfaceListDetails)(nil),
- (*MacipACLInterfaceListDump)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/acl/acl_rpc.ba.go b/internal/testbinapi/binapi2001/acl/acl_rpc.ba.go
deleted file mode 100644
index ecaa865..0000000
--- a/internal/testbinapi/binapi2001/acl/acl_rpc.ba.go
+++ /dev/null
@@ -1,384 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package acl
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service acl.
-type RPCService interface {
- ACLAddReplace(ctx context.Context, in *ACLAddReplace) (*ACLAddReplaceReply, error)
- ACLDel(ctx context.Context, in *ACLDel) (*ACLDelReply, error)
- ACLDump(ctx context.Context, in *ACLDump) (RPCService_ACLDumpClient, error)
- ACLInterfaceAddDel(ctx context.Context, in *ACLInterfaceAddDel) (*ACLInterfaceAddDelReply, error)
- ACLInterfaceEtypeWhitelistDump(ctx context.Context, in *ACLInterfaceEtypeWhitelistDump) (RPCService_ACLInterfaceEtypeWhitelistDumpClient, error)
- ACLInterfaceListDump(ctx context.Context, in *ACLInterfaceListDump) (RPCService_ACLInterfaceListDumpClient, error)
- ACLInterfaceSetACLList(ctx context.Context, in *ACLInterfaceSetACLList) (*ACLInterfaceSetACLListReply, error)
- ACLInterfaceSetEtypeWhitelist(ctx context.Context, in *ACLInterfaceSetEtypeWhitelist) (*ACLInterfaceSetEtypeWhitelistReply, error)
- ACLPluginControlPing(ctx context.Context, in *ACLPluginControlPing) (*ACLPluginControlPingReply, error)
- ACLPluginGetConnTableMaxEntries(ctx context.Context, in *ACLPluginGetConnTableMaxEntries) (*ACLPluginGetConnTableMaxEntriesReply, error)
- ACLPluginGetVersion(ctx context.Context, in *ACLPluginGetVersion) (*ACLPluginGetVersionReply, error)
- ACLStatsIntfCountersEnable(ctx context.Context, in *ACLStatsIntfCountersEnable) (*ACLStatsIntfCountersEnableReply, error)
- MacipACLAdd(ctx context.Context, in *MacipACLAdd) (*MacipACLAddReply, error)
- MacipACLAddReplace(ctx context.Context, in *MacipACLAddReplace) (*MacipACLAddReplaceReply, error)
- MacipACLDel(ctx context.Context, in *MacipACLDel) (*MacipACLDelReply, error)
- MacipACLDump(ctx context.Context, in *MacipACLDump) (RPCService_MacipACLDumpClient, error)
- MacipACLInterfaceAddDel(ctx context.Context, in *MacipACLInterfaceAddDel) (*MacipACLInterfaceAddDelReply, error)
- MacipACLInterfaceGet(ctx context.Context, in *MacipACLInterfaceGet) (*MacipACLInterfaceGetReply, error)
- MacipACLInterfaceListDump(ctx context.Context, in *MacipACLInterfaceListDump) (RPCService_MacipACLInterfaceListDumpClient, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) ACLAddReplace(ctx context.Context, in *ACLAddReplace) (*ACLAddReplaceReply, error) {
- out := new(ACLAddReplaceReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) ACLDel(ctx context.Context, in *ACLDel) (*ACLDelReply, error) {
- out := new(ACLDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) ACLDump(ctx context.Context, in *ACLDump) (RPCService_ACLDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_ACLDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_ACLDumpClient interface {
- Recv() (*ACLDetails, error)
- api.Stream
-}
-
-type serviceClient_ACLDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_ACLDumpClient) Recv() (*ACLDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *ACLDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) ACLInterfaceAddDel(ctx context.Context, in *ACLInterfaceAddDel) (*ACLInterfaceAddDelReply, error) {
- out := new(ACLInterfaceAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) ACLInterfaceEtypeWhitelistDump(ctx context.Context, in *ACLInterfaceEtypeWhitelistDump) (RPCService_ACLInterfaceEtypeWhitelistDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_ACLInterfaceEtypeWhitelistDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_ACLInterfaceEtypeWhitelistDumpClient interface {
- Recv() (*ACLInterfaceEtypeWhitelistDetails, error)
- api.Stream
-}
-
-type serviceClient_ACLInterfaceEtypeWhitelistDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_ACLInterfaceEtypeWhitelistDumpClient) Recv() (*ACLInterfaceEtypeWhitelistDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *ACLInterfaceEtypeWhitelistDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) ACLInterfaceListDump(ctx context.Context, in *ACLInterfaceListDump) (RPCService_ACLInterfaceListDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_ACLInterfaceListDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_ACLInterfaceListDumpClient interface {
- Recv() (*ACLInterfaceListDetails, error)
- api.Stream
-}
-
-type serviceClient_ACLInterfaceListDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_ACLInterfaceListDumpClient) Recv() (*ACLInterfaceListDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *ACLInterfaceListDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) ACLInterfaceSetACLList(ctx context.Context, in *ACLInterfaceSetACLList) (*ACLInterfaceSetACLListReply, error) {
- out := new(ACLInterfaceSetACLListReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) ACLInterfaceSetEtypeWhitelist(ctx context.Context, in *ACLInterfaceSetEtypeWhitelist) (*ACLInterfaceSetEtypeWhitelistReply, error) {
- out := new(ACLInterfaceSetEtypeWhitelistReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) ACLPluginControlPing(ctx context.Context, in *ACLPluginControlPing) (*ACLPluginControlPingReply, error) {
- out := new(ACLPluginControlPingReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) ACLPluginGetConnTableMaxEntries(ctx context.Context, in *ACLPluginGetConnTableMaxEntries) (*ACLPluginGetConnTableMaxEntriesReply, error) {
- out := new(ACLPluginGetConnTableMaxEntriesReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) ACLPluginGetVersion(ctx context.Context, in *ACLPluginGetVersion) (*ACLPluginGetVersionReply, error) {
- out := new(ACLPluginGetVersionReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) ACLStatsIntfCountersEnable(ctx context.Context, in *ACLStatsIntfCountersEnable) (*ACLStatsIntfCountersEnableReply, error) {
- out := new(ACLStatsIntfCountersEnableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) MacipACLAdd(ctx context.Context, in *MacipACLAdd) (*MacipACLAddReply, error) {
- out := new(MacipACLAddReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) MacipACLAddReplace(ctx context.Context, in *MacipACLAddReplace) (*MacipACLAddReplaceReply, error) {
- out := new(MacipACLAddReplaceReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) MacipACLDel(ctx context.Context, in *MacipACLDel) (*MacipACLDelReply, error) {
- out := new(MacipACLDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) MacipACLDump(ctx context.Context, in *MacipACLDump) (RPCService_MacipACLDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_MacipACLDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_MacipACLDumpClient interface {
- Recv() (*MacipACLDetails, error)
- api.Stream
-}
-
-type serviceClient_MacipACLDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_MacipACLDumpClient) Recv() (*MacipACLDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *MacipACLDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) MacipACLInterfaceAddDel(ctx context.Context, in *MacipACLInterfaceAddDel) (*MacipACLInterfaceAddDelReply, error) {
- out := new(MacipACLInterfaceAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) MacipACLInterfaceGet(ctx context.Context, in *MacipACLInterfaceGet) (*MacipACLInterfaceGetReply, error) {
- out := new(MacipACLInterfaceGetReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) MacipACLInterfaceListDump(ctx context.Context, in *MacipACLInterfaceListDump) (RPCService_MacipACLInterfaceListDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_MacipACLInterfaceListDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_MacipACLInterfaceListDumpClient interface {
- Recv() (*MacipACLInterfaceListDetails, error)
- api.Stream
-}
-
-type serviceClient_MacipACLInterfaceListDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_MacipACLInterfaceListDumpClient) Recv() (*MacipACLInterfaceListDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *MacipACLInterfaceListDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
diff --git a/internal/testbinapi/binapi2001/acl_types/acl_types.ba.go b/internal/testbinapi/binapi2001/acl_types/acl_types.ba.go
deleted file mode 100644
index e5ae659..0000000
--- a/internal/testbinapi/binapi2001/acl_types/acl_types.ba.go
+++ /dev/null
@@ -1,55 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/plugins/acl_types.api.json
-
-// Package acl_types contains generated bindings for API file acl_types.api.
-//
-// Contents:
-// 2 structs
-//
-package acl_types
-
-import (
- api "git.fd.io/govpp.git/api"
-)
-
-// 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 = "acl_types"
- APIVersion = ""
- VersionCrc = 0x1803336d
-)
-
-// ACLRule defines type 'acl_rule'.
-type ACLRule struct {
- IsPermit uint8 `binapi:"u8,name=is_permit" json:"is_permit,omitempty"`
- IsIPv6 uint8 `binapi:"u8,name=is_ipv6" json:"is_ipv6,omitempty"`
- SrcIPAddr []byte `binapi:"u8[16],name=src_ip_addr" json:"src_ip_addr,omitempty"`
- SrcIPPrefixLen uint8 `binapi:"u8,name=src_ip_prefix_len" json:"src_ip_prefix_len,omitempty"`
- DstIPAddr []byte `binapi:"u8[16],name=dst_ip_addr" json:"dst_ip_addr,omitempty"`
- DstIPPrefixLen uint8 `binapi:"u8,name=dst_ip_prefix_len" json:"dst_ip_prefix_len,omitempty"`
- Proto uint8 `binapi:"u8,name=proto" json:"proto,omitempty"`
- SrcportOrIcmptypeFirst uint16 `binapi:"u16,name=srcport_or_icmptype_first" json:"srcport_or_icmptype_first,omitempty"`
- SrcportOrIcmptypeLast uint16 `binapi:"u16,name=srcport_or_icmptype_last" json:"srcport_or_icmptype_last,omitempty"`
- DstportOrIcmpcodeFirst uint16 `binapi:"u16,name=dstport_or_icmpcode_first" json:"dstport_or_icmpcode_first,omitempty"`
- DstportOrIcmpcodeLast uint16 `binapi:"u16,name=dstport_or_icmpcode_last" json:"dstport_or_icmpcode_last,omitempty"`
- TCPFlagsMask uint8 `binapi:"u8,name=tcp_flags_mask" json:"tcp_flags_mask,omitempty"`
- TCPFlagsValue uint8 `binapi:"u8,name=tcp_flags_value" json:"tcp_flags_value,omitempty"`
-}
-
-// MacipACLRule defines type 'macip_acl_rule'.
-type MacipACLRule struct {
- IsPermit uint8 `binapi:"u8,name=is_permit" json:"is_permit,omitempty"`
- IsIPv6 uint8 `binapi:"u8,name=is_ipv6" json:"is_ipv6,omitempty"`
- SrcMac []byte `binapi:"u8[6],name=src_mac" json:"src_mac,omitempty"`
- SrcMacMask []byte `binapi:"u8[6],name=src_mac_mask" json:"src_mac_mask,omitempty"`
- SrcIPAddr []byte `binapi:"u8[16],name=src_ip_addr" json:"src_ip_addr,omitempty"`
- SrcIPPrefixLen uint8 `binapi:"u8,name=src_ip_prefix_len" json:"src_ip_prefix_len,omitempty"`
-}
diff --git a/internal/testbinapi/binapi2001/af_packet/af_packet.ba.go b/internal/testbinapi/binapi2001/af_packet/af_packet.ba.go
deleted file mode 100644
index a3a8183..0000000
--- a/internal/testbinapi/binapi2001/af_packet/af_packet.ba.go
+++ /dev/null
@@ -1,628 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/af_packet.api.json
-
-// Package af_packet contains generated bindings for API file af_packet.api.
-//
-// Contents:
-// 2 aliases
-// 6 enums
-// 8 messages
-//
-package af_packet
-
-import (
- "net"
- "strconv"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "af_packet"
- APIVersion = "2.0.0"
- VersionCrc = 0xba745e20
-)
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// MacAddress defines alias 'mac_address'.
-type MacAddress [6]uint8
-
-func ParseMacAddress(s string) (MacAddress, error) {
- var macaddr MacAddress
- mac, err := net.ParseMAC(s)
- if err != nil {
- return macaddr, err
- }
- copy(macaddr[:], mac[:])
- return macaddr, nil
-}
-
-func (x MacAddress) ToMAC() net.HardwareAddr {
- return net.HardwareAddr(x[:])
-}
-
-func (x MacAddress) String() string {
- return x.ToMAC().String()
-}
-
-func (x *MacAddress) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *MacAddress) UnmarshalText(text []byte) error {
- mac, err := ParseMacAddress(string(text))
- if err != nil {
- return err
- }
- *x = mac
- return nil
-}
-
-// AfPacketCreate defines message 'af_packet_create'.
-type AfPacketCreate struct {
- HwAddr MacAddress `binapi:"mac_address,name=hw_addr" json:"hw_addr,omitempty"`
- UseRandomHwAddr bool `binapi:"bool,name=use_random_hw_addr" json:"use_random_hw_addr,omitempty"`
- HostIfName string `binapi:"string[64],name=host_if_name" json:"host_if_name,omitempty"`
-}
-
-func (m *AfPacketCreate) Reset() { *m = AfPacketCreate{} }
-func (*AfPacketCreate) GetMessageName() string { return "af_packet_create" }
-func (*AfPacketCreate) GetCrcString() string { return "a190415f" }
-func (*AfPacketCreate) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *AfPacketCreate) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 6 // m.HwAddr
- size += 1 // m.UseRandomHwAddr
- size += 64 // m.HostIfName
- return size
-}
-func (m *AfPacketCreate) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.HwAddr[:], 6)
- buf.EncodeBool(m.UseRandomHwAddr)
- buf.EncodeString(m.HostIfName, 64)
- return buf.Bytes(), nil
-}
-func (m *AfPacketCreate) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- copy(m.HwAddr[:], buf.DecodeBytes(6))
- m.UseRandomHwAddr = buf.DecodeBool()
- m.HostIfName = buf.DecodeString(64)
- return nil
-}
-
-// AfPacketCreateReply defines message 'af_packet_create_reply'.
-type AfPacketCreateReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *AfPacketCreateReply) Reset() { *m = AfPacketCreateReply{} }
-func (*AfPacketCreateReply) GetMessageName() string { return "af_packet_create_reply" }
-func (*AfPacketCreateReply) GetCrcString() string { return "5383d31f" }
-func (*AfPacketCreateReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *AfPacketCreateReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *AfPacketCreateReply) 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 *AfPacketCreateReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// AfPacketDelete defines message 'af_packet_delete'.
-type AfPacketDelete struct {
- HostIfName string `binapi:"string[64],name=host_if_name" json:"host_if_name,omitempty"`
-}
-
-func (m *AfPacketDelete) Reset() { *m = AfPacketDelete{} }
-func (*AfPacketDelete) GetMessageName() string { return "af_packet_delete" }
-func (*AfPacketDelete) GetCrcString() string { return "863fa648" }
-func (*AfPacketDelete) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *AfPacketDelete) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 64 // m.HostIfName
- return size
-}
-func (m *AfPacketDelete) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeString(m.HostIfName, 64)
- return buf.Bytes(), nil
-}
-func (m *AfPacketDelete) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.HostIfName = buf.DecodeString(64)
- return nil
-}
-
-// AfPacketDeleteReply defines message 'af_packet_delete_reply'.
-type AfPacketDeleteReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *AfPacketDeleteReply) Reset() { *m = AfPacketDeleteReply{} }
-func (*AfPacketDeleteReply) GetMessageName() string { return "af_packet_delete_reply" }
-func (*AfPacketDeleteReply) GetCrcString() string { return "e8d4e804" }
-func (*AfPacketDeleteReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *AfPacketDeleteReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *AfPacketDeleteReply) 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 *AfPacketDeleteReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// AfPacketDetails defines message 'af_packet_details'.
-type AfPacketDetails struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- HostIfName string `binapi:"string[64],name=host_if_name" json:"host_if_name,omitempty"`
-}
-
-func (m *AfPacketDetails) Reset() { *m = AfPacketDetails{} }
-func (*AfPacketDetails) GetMessageName() string { return "af_packet_details" }
-func (*AfPacketDetails) GetCrcString() string { return "58c7c042" }
-func (*AfPacketDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *AfPacketDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 64 // m.HostIfName
- return size
-}
-func (m *AfPacketDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeString(m.HostIfName, 64)
- return buf.Bytes(), nil
-}
-func (m *AfPacketDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.HostIfName = buf.DecodeString(64)
- return nil
-}
-
-// AfPacketDump defines message 'af_packet_dump'.
-type AfPacketDump struct{}
-
-func (m *AfPacketDump) Reset() { *m = AfPacketDump{} }
-func (*AfPacketDump) GetMessageName() string { return "af_packet_dump" }
-func (*AfPacketDump) GetCrcString() string { return "51077d14" }
-func (*AfPacketDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *AfPacketDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *AfPacketDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *AfPacketDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// AfPacketSetL4CksumOffload defines message 'af_packet_set_l4_cksum_offload'.
-type AfPacketSetL4CksumOffload struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Set bool `binapi:"bool,name=set" json:"set,omitempty"`
-}
-
-func (m *AfPacketSetL4CksumOffload) Reset() { *m = AfPacketSetL4CksumOffload{} }
-func (*AfPacketSetL4CksumOffload) GetMessageName() string { return "af_packet_set_l4_cksum_offload" }
-func (*AfPacketSetL4CksumOffload) GetCrcString() string { return "319cd5c8" }
-func (*AfPacketSetL4CksumOffload) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *AfPacketSetL4CksumOffload) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.Set
- return size
-}
-func (m *AfPacketSetL4CksumOffload) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeBool(m.Set)
- return buf.Bytes(), nil
-}
-func (m *AfPacketSetL4CksumOffload) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Set = buf.DecodeBool()
- return nil
-}
-
-// AfPacketSetL4CksumOffloadReply defines message 'af_packet_set_l4_cksum_offload_reply'.
-type AfPacketSetL4CksumOffloadReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *AfPacketSetL4CksumOffloadReply) Reset() { *m = AfPacketSetL4CksumOffloadReply{} }
-func (*AfPacketSetL4CksumOffloadReply) GetMessageName() string {
- return "af_packet_set_l4_cksum_offload_reply"
-}
-func (*AfPacketSetL4CksumOffloadReply) GetCrcString() string { return "e8d4e804" }
-func (*AfPacketSetL4CksumOffloadReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *AfPacketSetL4CksumOffloadReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *AfPacketSetL4CksumOffloadReply) 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 *AfPacketSetL4CksumOffloadReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_af_packet_binapi_init() }
-func file_af_packet_binapi_init() {
- api.RegisterMessage((*AfPacketCreate)(nil), "af_packet_create_a190415f")
- api.RegisterMessage((*AfPacketCreateReply)(nil), "af_packet_create_reply_5383d31f")
- api.RegisterMessage((*AfPacketDelete)(nil), "af_packet_delete_863fa648")
- api.RegisterMessage((*AfPacketDeleteReply)(nil), "af_packet_delete_reply_e8d4e804")
- api.RegisterMessage((*AfPacketDetails)(nil), "af_packet_details_58c7c042")
- api.RegisterMessage((*AfPacketDump)(nil), "af_packet_dump_51077d14")
- api.RegisterMessage((*AfPacketSetL4CksumOffload)(nil), "af_packet_set_l4_cksum_offload_319cd5c8")
- api.RegisterMessage((*AfPacketSetL4CksumOffloadReply)(nil), "af_packet_set_l4_cksum_offload_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*AfPacketCreate)(nil),
- (*AfPacketCreateReply)(nil),
- (*AfPacketDelete)(nil),
- (*AfPacketDeleteReply)(nil),
- (*AfPacketDetails)(nil),
- (*AfPacketDump)(nil),
- (*AfPacketSetL4CksumOffload)(nil),
- (*AfPacketSetL4CksumOffloadReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/af_packet/af_packet_rpc.ba.go b/internal/testbinapi/binapi2001/af_packet/af_packet_rpc.ba.go
deleted file mode 100644
index 19355ab..0000000
--- a/internal/testbinapi/binapi2001/af_packet/af_packet_rpc.ba.go
+++ /dev/null
@@ -1,98 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package af_packet
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service af_packet.
-type RPCService interface {
- AfPacketCreate(ctx context.Context, in *AfPacketCreate) (*AfPacketCreateReply, error)
- AfPacketDelete(ctx context.Context, in *AfPacketDelete) (*AfPacketDeleteReply, error)
- AfPacketDump(ctx context.Context, in *AfPacketDump) (RPCService_AfPacketDumpClient, error)
- AfPacketSetL4CksumOffload(ctx context.Context, in *AfPacketSetL4CksumOffload) (*AfPacketSetL4CksumOffloadReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) AfPacketCreate(ctx context.Context, in *AfPacketCreate) (*AfPacketCreateReply, error) {
- out := new(AfPacketCreateReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) AfPacketDelete(ctx context.Context, in *AfPacketDelete) (*AfPacketDeleteReply, error) {
- out := new(AfPacketDeleteReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) AfPacketDump(ctx context.Context, in *AfPacketDump) (RPCService_AfPacketDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_AfPacketDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_AfPacketDumpClient interface {
- Recv() (*AfPacketDetails, error)
- api.Stream
-}
-
-type serviceClient_AfPacketDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_AfPacketDumpClient) Recv() (*AfPacketDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *AfPacketDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) AfPacketSetL4CksumOffload(ctx context.Context, in *AfPacketSetL4CksumOffload) (*AfPacketSetL4CksumOffloadReply, error) {
- out := new(AfPacketSetL4CksumOffloadReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/arp/arp.ba.go b/internal/testbinapi/binapi2001/arp/arp.ba.go
deleted file mode 100644
index 04b0e26..0000000
--- a/internal/testbinapi/binapi2001/arp/arp.ba.go
+++ /dev/null
@@ -1,1222 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/arp.api.json
-
-// Package arp contains generated bindings for API file arp.api.
-//
-// Contents:
-// 7 aliases
-// 10 enums
-// 7 structs
-// 1 union
-// 8 messages
-//
-package arp
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "arp"
- APIVersion = "1.0.0"
- VersionCrc = 0xa818aaf3
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// MacAddress defines alias 'mac_address'.
-type MacAddress [6]uint8
-
-func ParseMacAddress(s string) (MacAddress, error) {
- var macaddr MacAddress
- mac, err := net.ParseMAC(s)
- if err != nil {
- return macaddr, err
- }
- copy(macaddr[:], mac[:])
- return macaddr, nil
-}
-
-func (x MacAddress) ToMAC() net.HardwareAddr {
- return net.HardwareAddr(x[:])
-}
-
-func (x MacAddress) String() string {
- return x.ToMAC().String()
-}
-
-func (x *MacAddress) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *MacAddress) UnmarshalText(text []byte) error {
- mac, err := ParseMacAddress(string(text))
- if err != nil {
- return err
- }
- *x = mac
- return nil
-}
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// ProxyArp defines type 'proxy_arp'.
-type ProxyArp struct {
- TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
- Low IP4Address `binapi:"ip4_address,name=low" json:"low,omitempty"`
- Hi IP4Address `binapi:"ip4_address,name=hi" json:"hi,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
-
-// ProxyArpAddDel defines message 'proxy_arp_add_del'.
-type ProxyArpAddDel struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- Proxy ProxyArp `binapi:"proxy_arp,name=proxy" json:"proxy,omitempty"`
-}
-
-func (m *ProxyArpAddDel) Reset() { *m = ProxyArpAddDel{} }
-func (*ProxyArpAddDel) GetMessageName() string { return "proxy_arp_add_del" }
-func (*ProxyArpAddDel) GetCrcString() string { return "85486cbd" }
-func (*ProxyArpAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ProxyArpAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 4 // m.Proxy.TableID
- size += 1 * 4 // m.Proxy.Low
- size += 1 * 4 // m.Proxy.Hi
- return size
-}
-func (m *ProxyArpAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeUint32(m.Proxy.TableID)
- buf.EncodeBytes(m.Proxy.Low[:], 4)
- buf.EncodeBytes(m.Proxy.Hi[:], 4)
- return buf.Bytes(), nil
-}
-func (m *ProxyArpAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.Proxy.TableID = buf.DecodeUint32()
- copy(m.Proxy.Low[:], buf.DecodeBytes(4))
- copy(m.Proxy.Hi[:], buf.DecodeBytes(4))
- return nil
-}
-
-// ProxyArpAddDelReply defines message 'proxy_arp_add_del_reply'.
-type ProxyArpAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *ProxyArpAddDelReply) Reset() { *m = ProxyArpAddDelReply{} }
-func (*ProxyArpAddDelReply) GetMessageName() string { return "proxy_arp_add_del_reply" }
-func (*ProxyArpAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*ProxyArpAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ProxyArpAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *ProxyArpAddDelReply) 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 *ProxyArpAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// ProxyArpDetails defines message 'proxy_arp_details'.
-type ProxyArpDetails struct {
- Proxy ProxyArp `binapi:"proxy_arp,name=proxy" json:"proxy,omitempty"`
-}
-
-func (m *ProxyArpDetails) Reset() { *m = ProxyArpDetails{} }
-func (*ProxyArpDetails) GetMessageName() string { return "proxy_arp_details" }
-func (*ProxyArpDetails) GetCrcString() string { return "9228c150" }
-func (*ProxyArpDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ProxyArpDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Proxy.TableID
- size += 1 * 4 // m.Proxy.Low
- size += 1 * 4 // m.Proxy.Hi
- return size
-}
-func (m *ProxyArpDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Proxy.TableID)
- buf.EncodeBytes(m.Proxy.Low[:], 4)
- buf.EncodeBytes(m.Proxy.Hi[:], 4)
- return buf.Bytes(), nil
-}
-func (m *ProxyArpDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Proxy.TableID = buf.DecodeUint32()
- copy(m.Proxy.Low[:], buf.DecodeBytes(4))
- copy(m.Proxy.Hi[:], buf.DecodeBytes(4))
- return nil
-}
-
-// ProxyArpDump defines message 'proxy_arp_dump'.
-type ProxyArpDump struct{}
-
-func (m *ProxyArpDump) Reset() { *m = ProxyArpDump{} }
-func (*ProxyArpDump) GetMessageName() string { return "proxy_arp_dump" }
-func (*ProxyArpDump) GetCrcString() string { return "51077d14" }
-func (*ProxyArpDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ProxyArpDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *ProxyArpDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *ProxyArpDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// ProxyArpIntfcDetails defines message 'proxy_arp_intfc_details'.
-type ProxyArpIntfcDetails struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *ProxyArpIntfcDetails) Reset() { *m = ProxyArpIntfcDetails{} }
-func (*ProxyArpIntfcDetails) GetMessageName() string { return "proxy_arp_intfc_details" }
-func (*ProxyArpIntfcDetails) GetCrcString() string { return "f6458e5f" }
-func (*ProxyArpIntfcDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ProxyArpIntfcDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *ProxyArpIntfcDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.SwIfIndex)
- return buf.Bytes(), nil
-}
-func (m *ProxyArpIntfcDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = buf.DecodeUint32()
- return nil
-}
-
-// ProxyArpIntfcDump defines message 'proxy_arp_intfc_dump'.
-type ProxyArpIntfcDump struct{}
-
-func (m *ProxyArpIntfcDump) Reset() { *m = ProxyArpIntfcDump{} }
-func (*ProxyArpIntfcDump) GetMessageName() string { return "proxy_arp_intfc_dump" }
-func (*ProxyArpIntfcDump) GetCrcString() string { return "51077d14" }
-func (*ProxyArpIntfcDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ProxyArpIntfcDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *ProxyArpIntfcDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *ProxyArpIntfcDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// ProxyArpIntfcEnableDisable defines message 'proxy_arp_intfc_enable_disable'.
-type ProxyArpIntfcEnableDisable struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
-}
-
-func (m *ProxyArpIntfcEnableDisable) Reset() { *m = ProxyArpIntfcEnableDisable{} }
-func (*ProxyArpIntfcEnableDisable) GetMessageName() string { return "proxy_arp_intfc_enable_disable" }
-func (*ProxyArpIntfcEnableDisable) GetCrcString() string { return "ae6cfcfb" }
-func (*ProxyArpIntfcEnableDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ProxyArpIntfcEnableDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.Enable
- return size
-}
-func (m *ProxyArpIntfcEnableDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeBool(m.Enable)
- return buf.Bytes(), nil
-}
-func (m *ProxyArpIntfcEnableDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Enable = buf.DecodeBool()
- return nil
-}
-
-// ProxyArpIntfcEnableDisableReply defines message 'proxy_arp_intfc_enable_disable_reply'.
-type ProxyArpIntfcEnableDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *ProxyArpIntfcEnableDisableReply) Reset() { *m = ProxyArpIntfcEnableDisableReply{} }
-func (*ProxyArpIntfcEnableDisableReply) GetMessageName() string {
- return "proxy_arp_intfc_enable_disable_reply"
-}
-func (*ProxyArpIntfcEnableDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*ProxyArpIntfcEnableDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ProxyArpIntfcEnableDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *ProxyArpIntfcEnableDisableReply) 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 *ProxyArpIntfcEnableDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_arp_binapi_init() }
-func file_arp_binapi_init() {
- api.RegisterMessage((*ProxyArpAddDel)(nil), "proxy_arp_add_del_85486cbd")
- api.RegisterMessage((*ProxyArpAddDelReply)(nil), "proxy_arp_add_del_reply_e8d4e804")
- api.RegisterMessage((*ProxyArpDetails)(nil), "proxy_arp_details_9228c150")
- api.RegisterMessage((*ProxyArpDump)(nil), "proxy_arp_dump_51077d14")
- api.RegisterMessage((*ProxyArpIntfcDetails)(nil), "proxy_arp_intfc_details_f6458e5f")
- api.RegisterMessage((*ProxyArpIntfcDump)(nil), "proxy_arp_intfc_dump_51077d14")
- api.RegisterMessage((*ProxyArpIntfcEnableDisable)(nil), "proxy_arp_intfc_enable_disable_ae6cfcfb")
- api.RegisterMessage((*ProxyArpIntfcEnableDisableReply)(nil), "proxy_arp_intfc_enable_disable_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*ProxyArpAddDel)(nil),
- (*ProxyArpAddDelReply)(nil),
- (*ProxyArpDetails)(nil),
- (*ProxyArpDump)(nil),
- (*ProxyArpIntfcDetails)(nil),
- (*ProxyArpIntfcDump)(nil),
- (*ProxyArpIntfcEnableDisable)(nil),
- (*ProxyArpIntfcEnableDisableReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/arp/arp_rpc.ba.go b/internal/testbinapi/binapi2001/arp/arp_rpc.ba.go
deleted file mode 100644
index 79b7ed8..0000000
--- a/internal/testbinapi/binapi2001/arp/arp_rpc.ba.go
+++ /dev/null
@@ -1,132 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package arp
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service arp.
-type RPCService interface {
- ProxyArpAddDel(ctx context.Context, in *ProxyArpAddDel) (*ProxyArpAddDelReply, error)
- ProxyArpDump(ctx context.Context, in *ProxyArpDump) (RPCService_ProxyArpDumpClient, error)
- ProxyArpIntfcDump(ctx context.Context, in *ProxyArpIntfcDump) (RPCService_ProxyArpIntfcDumpClient, error)
- ProxyArpIntfcEnableDisable(ctx context.Context, in *ProxyArpIntfcEnableDisable) (*ProxyArpIntfcEnableDisableReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) ProxyArpAddDel(ctx context.Context, in *ProxyArpAddDel) (*ProxyArpAddDelReply, error) {
- out := new(ProxyArpAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) ProxyArpDump(ctx context.Context, in *ProxyArpDump) (RPCService_ProxyArpDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_ProxyArpDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_ProxyArpDumpClient interface {
- Recv() (*ProxyArpDetails, error)
- api.Stream
-}
-
-type serviceClient_ProxyArpDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_ProxyArpDumpClient) Recv() (*ProxyArpDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *ProxyArpDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) ProxyArpIntfcDump(ctx context.Context, in *ProxyArpIntfcDump) (RPCService_ProxyArpIntfcDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_ProxyArpIntfcDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_ProxyArpIntfcDumpClient interface {
- Recv() (*ProxyArpIntfcDetails, error)
- api.Stream
-}
-
-type serviceClient_ProxyArpIntfcDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_ProxyArpIntfcDumpClient) Recv() (*ProxyArpIntfcDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *ProxyArpIntfcDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) ProxyArpIntfcEnableDisable(ctx context.Context, in *ProxyArpIntfcEnableDisable) (*ProxyArpIntfcEnableDisableReply, error) {
- out := new(ProxyArpIntfcEnableDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/avf/avf.ba.go b/internal/testbinapi/binapi2001/avf/avf.ba.go
deleted file mode 100644
index da63230..0000000
--- a/internal/testbinapi/binapi2001/avf/avf.ba.go
+++ /dev/null
@@ -1,457 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/plugins/avf.api.json
-
-// Package avf contains generated bindings for API file avf.api.
-//
-// Contents:
-// 1 alias
-// 6 enums
-// 4 messages
-//
-package avf
-
-import (
- "strconv"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "avf"
- APIVersion = "1.0.0"
- VersionCrc = 0xb7c68e1d
-)
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// AvfCreate defines message 'avf_create'.
-type AvfCreate struct {
- PciAddr uint32 `binapi:"u32,name=pci_addr" json:"pci_addr,omitempty"`
- EnableElog int32 `binapi:"i32,name=enable_elog" json:"enable_elog,omitempty"`
- RxqNum uint16 `binapi:"u16,name=rxq_num" json:"rxq_num,omitempty"`
- RxqSize uint16 `binapi:"u16,name=rxq_size" json:"rxq_size,omitempty"`
- TxqSize uint16 `binapi:"u16,name=txq_size" json:"txq_size,omitempty"`
-}
-
-func (m *AvfCreate) Reset() { *m = AvfCreate{} }
-func (*AvfCreate) GetMessageName() string { return "avf_create" }
-func (*AvfCreate) GetCrcString() string { return "daab8ae2" }
-func (*AvfCreate) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *AvfCreate) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.PciAddr
- size += 4 // m.EnableElog
- size += 2 // m.RxqNum
- size += 2 // m.RxqSize
- size += 2 // m.TxqSize
- return size
-}
-func (m *AvfCreate) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.PciAddr)
- buf.EncodeInt32(m.EnableElog)
- buf.EncodeUint16(m.RxqNum)
- buf.EncodeUint16(m.RxqSize)
- buf.EncodeUint16(m.TxqSize)
- return buf.Bytes(), nil
-}
-func (m *AvfCreate) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.PciAddr = buf.DecodeUint32()
- m.EnableElog = buf.DecodeInt32()
- m.RxqNum = buf.DecodeUint16()
- m.RxqSize = buf.DecodeUint16()
- m.TxqSize = buf.DecodeUint16()
- return nil
-}
-
-// AvfCreateReply defines message 'avf_create_reply'.
-type AvfCreateReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *AvfCreateReply) Reset() { *m = AvfCreateReply{} }
-func (*AvfCreateReply) GetMessageName() string { return "avf_create_reply" }
-func (*AvfCreateReply) GetCrcString() string { return "5383d31f" }
-func (*AvfCreateReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *AvfCreateReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *AvfCreateReply) 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 *AvfCreateReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// AvfDelete defines message 'avf_delete'.
-type AvfDelete struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *AvfDelete) Reset() { *m = AvfDelete{} }
-func (*AvfDelete) GetMessageName() string { return "avf_delete" }
-func (*AvfDelete) GetCrcString() string { return "f9e6675e" }
-func (*AvfDelete) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *AvfDelete) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *AvfDelete) 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 *AvfDelete) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// AvfDeleteReply defines message 'avf_delete_reply'.
-type AvfDeleteReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *AvfDeleteReply) Reset() { *m = AvfDeleteReply{} }
-func (*AvfDeleteReply) GetMessageName() string { return "avf_delete_reply" }
-func (*AvfDeleteReply) GetCrcString() string { return "e8d4e804" }
-func (*AvfDeleteReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *AvfDeleteReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *AvfDeleteReply) 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 *AvfDeleteReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_avf_binapi_init() }
-func file_avf_binapi_init() {
- api.RegisterMessage((*AvfCreate)(nil), "avf_create_daab8ae2")
- api.RegisterMessage((*AvfCreateReply)(nil), "avf_create_reply_5383d31f")
- api.RegisterMessage((*AvfDelete)(nil), "avf_delete_f9e6675e")
- api.RegisterMessage((*AvfDeleteReply)(nil), "avf_delete_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*AvfCreate)(nil),
- (*AvfCreateReply)(nil),
- (*AvfDelete)(nil),
- (*AvfDeleteReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/avf/avf_rpc.ba.go b/internal/testbinapi/binapi2001/avf/avf_rpc.ba.go
deleted file mode 100644
index 5747834..0000000
--- a/internal/testbinapi/binapi2001/avf/avf_rpc.ba.go
+++ /dev/null
@@ -1,41 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package avf
-
-import (
- "context"
-
- api "git.fd.io/govpp.git/api"
-)
-
-// RPCService defines RPC service avf.
-type RPCService interface {
- AvfCreate(ctx context.Context, in *AvfCreate) (*AvfCreateReply, error)
- AvfDelete(ctx context.Context, in *AvfDelete) (*AvfDeleteReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) AvfCreate(ctx context.Context, in *AvfCreate) (*AvfCreateReply, error) {
- out := new(AvfCreateReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) AvfDelete(ctx context.Context, in *AvfDelete) (*AvfDeleteReply, error) {
- out := new(AvfDeleteReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/bfd/bfd.ba.go b/internal/testbinapi/binapi2001/bfd/bfd.ba.go
deleted file mode 100644
index f83cc33..0000000
--- a/internal/testbinapi/binapi2001/bfd/bfd.ba.go
+++ /dev/null
@@ -1,2111 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/bfd.api.json
-
-// Package bfd contains generated bindings for API file bfd.api.
-//
-// Contents:
-// 6 aliases
-// 11 enums
-// 6 structs
-// 1 union
-// 28 messages
-//
-package bfd
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "bfd"
- APIVersion = "2.0.0"
- VersionCrc = 0xfd792c8c
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// BfdState defines enum 'bfd_state'.
-type BfdState uint32
-
-const (
- BFD_STATE_API_ADMIN_DOWN BfdState = 0
- BFD_STATE_API_DOWN BfdState = 1
- BFD_STATE_API_INIT BfdState = 2
- BFD_STATE_API_UP BfdState = 3
-)
-
-var (
- BfdState_name = map[uint32]string{
- 0: "BFD_STATE_API_ADMIN_DOWN",
- 1: "BFD_STATE_API_DOWN",
- 2: "BFD_STATE_API_INIT",
- 3: "BFD_STATE_API_UP",
- }
- BfdState_value = map[string]uint32{
- "BFD_STATE_API_ADMIN_DOWN": 0,
- "BFD_STATE_API_DOWN": 1,
- "BFD_STATE_API_INIT": 2,
- "BFD_STATE_API_UP": 3,
- }
-)
-
-func (x BfdState) String() string {
- s, ok := BfdState_name[uint32(x)]
- if ok {
- return s
- }
- return "BfdState(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
-
-// BfdAuthDelKey defines message 'bfd_auth_del_key'.
-type BfdAuthDelKey struct {
- ConfKeyID uint32 `binapi:"u32,name=conf_key_id" json:"conf_key_id,omitempty"`
-}
-
-func (m *BfdAuthDelKey) Reset() { *m = BfdAuthDelKey{} }
-func (*BfdAuthDelKey) GetMessageName() string { return "bfd_auth_del_key" }
-func (*BfdAuthDelKey) GetCrcString() string { return "65310b22" }
-func (*BfdAuthDelKey) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BfdAuthDelKey) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.ConfKeyID
- return size
-}
-func (m *BfdAuthDelKey) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.ConfKeyID)
- return buf.Bytes(), nil
-}
-func (m *BfdAuthDelKey) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.ConfKeyID = buf.DecodeUint32()
- return nil
-}
-
-// BfdAuthDelKeyReply defines message 'bfd_auth_del_key_reply'.
-type BfdAuthDelKeyReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *BfdAuthDelKeyReply) Reset() { *m = BfdAuthDelKeyReply{} }
-func (*BfdAuthDelKeyReply) GetMessageName() string { return "bfd_auth_del_key_reply" }
-func (*BfdAuthDelKeyReply) GetCrcString() string { return "e8d4e804" }
-func (*BfdAuthDelKeyReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BfdAuthDelKeyReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *BfdAuthDelKeyReply) 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 *BfdAuthDelKeyReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// BfdAuthKeysDetails defines message 'bfd_auth_keys_details'.
-type BfdAuthKeysDetails struct {
- ConfKeyID uint32 `binapi:"u32,name=conf_key_id" json:"conf_key_id,omitempty"`
- UseCount uint32 `binapi:"u32,name=use_count" json:"use_count,omitempty"`
- AuthType uint8 `binapi:"u8,name=auth_type" json:"auth_type,omitempty"`
-}
-
-func (m *BfdAuthKeysDetails) Reset() { *m = BfdAuthKeysDetails{} }
-func (*BfdAuthKeysDetails) GetMessageName() string { return "bfd_auth_keys_details" }
-func (*BfdAuthKeysDetails) GetCrcString() string { return "84130e9f" }
-func (*BfdAuthKeysDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BfdAuthKeysDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.ConfKeyID
- size += 4 // m.UseCount
- size += 1 // m.AuthType
- return size
-}
-func (m *BfdAuthKeysDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.ConfKeyID)
- buf.EncodeUint32(m.UseCount)
- buf.EncodeUint8(m.AuthType)
- return buf.Bytes(), nil
-}
-func (m *BfdAuthKeysDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.ConfKeyID = buf.DecodeUint32()
- m.UseCount = buf.DecodeUint32()
- m.AuthType = buf.DecodeUint8()
- return nil
-}
-
-// BfdAuthKeysDump defines message 'bfd_auth_keys_dump'.
-type BfdAuthKeysDump struct{}
-
-func (m *BfdAuthKeysDump) Reset() { *m = BfdAuthKeysDump{} }
-func (*BfdAuthKeysDump) GetMessageName() string { return "bfd_auth_keys_dump" }
-func (*BfdAuthKeysDump) GetCrcString() string { return "51077d14" }
-func (*BfdAuthKeysDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BfdAuthKeysDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *BfdAuthKeysDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *BfdAuthKeysDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// BfdAuthSetKey defines message 'bfd_auth_set_key'.
-type BfdAuthSetKey struct {
- ConfKeyID uint32 `binapi:"u32,name=conf_key_id" json:"conf_key_id,omitempty"`
- KeyLen uint8 `binapi:"u8,name=key_len" json:"key_len,omitempty"`
- AuthType uint8 `binapi:"u8,name=auth_type" json:"auth_type,omitempty"`
- Key []byte `binapi:"u8[20],name=key" json:"key,omitempty"`
-}
-
-func (m *BfdAuthSetKey) Reset() { *m = BfdAuthSetKey{} }
-func (*BfdAuthSetKey) GetMessageName() string { return "bfd_auth_set_key" }
-func (*BfdAuthSetKey) GetCrcString() string { return "690b8877" }
-func (*BfdAuthSetKey) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BfdAuthSetKey) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.ConfKeyID
- size += 1 // m.KeyLen
- size += 1 // m.AuthType
- size += 1 * 20 // m.Key
- return size
-}
-func (m *BfdAuthSetKey) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.ConfKeyID)
- buf.EncodeUint8(m.KeyLen)
- buf.EncodeUint8(m.AuthType)
- buf.EncodeBytes(m.Key, 20)
- return buf.Bytes(), nil
-}
-func (m *BfdAuthSetKey) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.ConfKeyID = buf.DecodeUint32()
- m.KeyLen = buf.DecodeUint8()
- m.AuthType = buf.DecodeUint8()
- m.Key = make([]byte, 20)
- copy(m.Key, buf.DecodeBytes(len(m.Key)))
- return nil
-}
-
-// BfdAuthSetKeyReply defines message 'bfd_auth_set_key_reply'.
-type BfdAuthSetKeyReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *BfdAuthSetKeyReply) Reset() { *m = BfdAuthSetKeyReply{} }
-func (*BfdAuthSetKeyReply) GetMessageName() string { return "bfd_auth_set_key_reply" }
-func (*BfdAuthSetKeyReply) GetCrcString() string { return "e8d4e804" }
-func (*BfdAuthSetKeyReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BfdAuthSetKeyReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *BfdAuthSetKeyReply) 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 *BfdAuthSetKeyReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// BfdUDPAdd defines message 'bfd_udp_add'.
-type BfdUDPAdd struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- DesiredMinTx uint32 `binapi:"u32,name=desired_min_tx" json:"desired_min_tx,omitempty"`
- RequiredMinRx uint32 `binapi:"u32,name=required_min_rx" json:"required_min_rx,omitempty"`
- LocalAddr Address `binapi:"address,name=local_addr" json:"local_addr,omitempty"`
- PeerAddr Address `binapi:"address,name=peer_addr" json:"peer_addr,omitempty"`
- DetectMult uint8 `binapi:"u8,name=detect_mult" json:"detect_mult,omitempty"`
- IsAuthenticated bool `binapi:"bool,name=is_authenticated" json:"is_authenticated,omitempty"`
- BfdKeyID uint8 `binapi:"u8,name=bfd_key_id" json:"bfd_key_id,omitempty"`
- ConfKeyID uint32 `binapi:"u32,name=conf_key_id" json:"conf_key_id,omitempty"`
-}
-
-func (m *BfdUDPAdd) Reset() { *m = BfdUDPAdd{} }
-func (*BfdUDPAdd) GetMessageName() string { return "bfd_udp_add" }
-func (*BfdUDPAdd) GetCrcString() string { return "7a6d1185" }
-func (*BfdUDPAdd) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BfdUDPAdd) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.DesiredMinTx
- size += 4 // m.RequiredMinRx
- size += 4 // m.LocalAddr.Af
- size += 1 * 16 // m.LocalAddr.Un
- size += 4 // m.PeerAddr.Af
- size += 1 * 16 // m.PeerAddr.Un
- size += 1 // m.DetectMult
- size += 1 // m.IsAuthenticated
- size += 1 // m.BfdKeyID
- size += 4 // m.ConfKeyID
- return size
-}
-func (m *BfdUDPAdd) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(m.DesiredMinTx)
- buf.EncodeUint32(m.RequiredMinRx)
- buf.EncodeUint32(uint32(m.LocalAddr.Af))
- buf.EncodeBytes(m.LocalAddr.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.PeerAddr.Af))
- buf.EncodeBytes(m.PeerAddr.Un.XXX_UnionData[:], 16)
- buf.EncodeUint8(m.DetectMult)
- buf.EncodeBool(m.IsAuthenticated)
- buf.EncodeUint8(m.BfdKeyID)
- buf.EncodeUint32(m.ConfKeyID)
- return buf.Bytes(), nil
-}
-func (m *BfdUDPAdd) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.DesiredMinTx = buf.DecodeUint32()
- m.RequiredMinRx = buf.DecodeUint32()
- m.LocalAddr.Af = AddressFamily(buf.DecodeUint32())
- copy(m.LocalAddr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.PeerAddr.Af = AddressFamily(buf.DecodeUint32())
- copy(m.PeerAddr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.DetectMult = buf.DecodeUint8()
- m.IsAuthenticated = buf.DecodeBool()
- m.BfdKeyID = buf.DecodeUint8()
- m.ConfKeyID = buf.DecodeUint32()
- return nil
-}
-
-// BfdUDPAddReply defines message 'bfd_udp_add_reply'.
-type BfdUDPAddReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *BfdUDPAddReply) Reset() { *m = BfdUDPAddReply{} }
-func (*BfdUDPAddReply) GetMessageName() string { return "bfd_udp_add_reply" }
-func (*BfdUDPAddReply) GetCrcString() string { return "e8d4e804" }
-func (*BfdUDPAddReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BfdUDPAddReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *BfdUDPAddReply) 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 *BfdUDPAddReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// BfdUDPAuthActivate defines message 'bfd_udp_auth_activate'.
-type BfdUDPAuthActivate struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- LocalAddr Address `binapi:"address,name=local_addr" json:"local_addr,omitempty"`
- PeerAddr Address `binapi:"address,name=peer_addr" json:"peer_addr,omitempty"`
- IsDelayed bool `binapi:"bool,name=is_delayed" json:"is_delayed,omitempty"`
- BfdKeyID uint8 `binapi:"u8,name=bfd_key_id" json:"bfd_key_id,omitempty"`
- ConfKeyID uint32 `binapi:"u32,name=conf_key_id" json:"conf_key_id,omitempty"`
-}
-
-func (m *BfdUDPAuthActivate) Reset() { *m = BfdUDPAuthActivate{} }
-func (*BfdUDPAuthActivate) GetMessageName() string { return "bfd_udp_auth_activate" }
-func (*BfdUDPAuthActivate) GetCrcString() string { return "493ee0ec" }
-func (*BfdUDPAuthActivate) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BfdUDPAuthActivate) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.LocalAddr.Af
- size += 1 * 16 // m.LocalAddr.Un
- size += 4 // m.PeerAddr.Af
- size += 1 * 16 // m.PeerAddr.Un
- size += 1 // m.IsDelayed
- size += 1 // m.BfdKeyID
- size += 4 // m.ConfKeyID
- return size
-}
-func (m *BfdUDPAuthActivate) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(uint32(m.LocalAddr.Af))
- buf.EncodeBytes(m.LocalAddr.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.PeerAddr.Af))
- buf.EncodeBytes(m.PeerAddr.Un.XXX_UnionData[:], 16)
- buf.EncodeBool(m.IsDelayed)
- buf.EncodeUint8(m.BfdKeyID)
- buf.EncodeUint32(m.ConfKeyID)
- return buf.Bytes(), nil
-}
-func (m *BfdUDPAuthActivate) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.LocalAddr.Af = AddressFamily(buf.DecodeUint32())
- copy(m.LocalAddr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.PeerAddr.Af = AddressFamily(buf.DecodeUint32())
- copy(m.PeerAddr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.IsDelayed = buf.DecodeBool()
- m.BfdKeyID = buf.DecodeUint8()
- m.ConfKeyID = buf.DecodeUint32()
- return nil
-}
-
-// BfdUDPAuthActivateReply defines message 'bfd_udp_auth_activate_reply'.
-type BfdUDPAuthActivateReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *BfdUDPAuthActivateReply) Reset() { *m = BfdUDPAuthActivateReply{} }
-func (*BfdUDPAuthActivateReply) GetMessageName() string { return "bfd_udp_auth_activate_reply" }
-func (*BfdUDPAuthActivateReply) GetCrcString() string { return "e8d4e804" }
-func (*BfdUDPAuthActivateReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BfdUDPAuthActivateReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *BfdUDPAuthActivateReply) 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 *BfdUDPAuthActivateReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// BfdUDPAuthDeactivate defines message 'bfd_udp_auth_deactivate'.
-type BfdUDPAuthDeactivate struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- LocalAddr Address `binapi:"address,name=local_addr" json:"local_addr,omitempty"`
- PeerAddr Address `binapi:"address,name=peer_addr" json:"peer_addr,omitempty"`
- IsDelayed bool `binapi:"bool,name=is_delayed" json:"is_delayed,omitempty"`
-}
-
-func (m *BfdUDPAuthDeactivate) Reset() { *m = BfdUDPAuthDeactivate{} }
-func (*BfdUDPAuthDeactivate) GetMessageName() string { return "bfd_udp_auth_deactivate" }
-func (*BfdUDPAuthDeactivate) GetCrcString() string { return "99978c32" }
-func (*BfdUDPAuthDeactivate) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BfdUDPAuthDeactivate) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.LocalAddr.Af
- size += 1 * 16 // m.LocalAddr.Un
- size += 4 // m.PeerAddr.Af
- size += 1 * 16 // m.PeerAddr.Un
- size += 1 // m.IsDelayed
- return size
-}
-func (m *BfdUDPAuthDeactivate) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(uint32(m.LocalAddr.Af))
- buf.EncodeBytes(m.LocalAddr.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.PeerAddr.Af))
- buf.EncodeBytes(m.PeerAddr.Un.XXX_UnionData[:], 16)
- buf.EncodeBool(m.IsDelayed)
- return buf.Bytes(), nil
-}
-func (m *BfdUDPAuthDeactivate) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.LocalAddr.Af = AddressFamily(buf.DecodeUint32())
- copy(m.LocalAddr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.PeerAddr.Af = AddressFamily(buf.DecodeUint32())
- copy(m.PeerAddr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.IsDelayed = buf.DecodeBool()
- return nil
-}
-
-// BfdUDPAuthDeactivateReply defines message 'bfd_udp_auth_deactivate_reply'.
-type BfdUDPAuthDeactivateReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *BfdUDPAuthDeactivateReply) Reset() { *m = BfdUDPAuthDeactivateReply{} }
-func (*BfdUDPAuthDeactivateReply) GetMessageName() string { return "bfd_udp_auth_deactivate_reply" }
-func (*BfdUDPAuthDeactivateReply) GetCrcString() string { return "e8d4e804" }
-func (*BfdUDPAuthDeactivateReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BfdUDPAuthDeactivateReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *BfdUDPAuthDeactivateReply) 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 *BfdUDPAuthDeactivateReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// BfdUDPDel defines message 'bfd_udp_del'.
-type BfdUDPDel struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- LocalAddr Address `binapi:"address,name=local_addr" json:"local_addr,omitempty"`
- PeerAddr Address `binapi:"address,name=peer_addr" json:"peer_addr,omitempty"`
-}
-
-func (m *BfdUDPDel) Reset() { *m = BfdUDPDel{} }
-func (*BfdUDPDel) GetMessageName() string { return "bfd_udp_del" }
-func (*BfdUDPDel) GetCrcString() string { return "8096514d" }
-func (*BfdUDPDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BfdUDPDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.LocalAddr.Af
- size += 1 * 16 // m.LocalAddr.Un
- size += 4 // m.PeerAddr.Af
- size += 1 * 16 // m.PeerAddr.Un
- return size
-}
-func (m *BfdUDPDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(uint32(m.LocalAddr.Af))
- buf.EncodeBytes(m.LocalAddr.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.PeerAddr.Af))
- buf.EncodeBytes(m.PeerAddr.Un.XXX_UnionData[:], 16)
- return buf.Bytes(), nil
-}
-func (m *BfdUDPDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.LocalAddr.Af = AddressFamily(buf.DecodeUint32())
- copy(m.LocalAddr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.PeerAddr.Af = AddressFamily(buf.DecodeUint32())
- copy(m.PeerAddr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- return nil
-}
-
-// BfdUDPDelEchoSource defines message 'bfd_udp_del_echo_source'.
-type BfdUDPDelEchoSource struct{}
-
-func (m *BfdUDPDelEchoSource) Reset() { *m = BfdUDPDelEchoSource{} }
-func (*BfdUDPDelEchoSource) GetMessageName() string { return "bfd_udp_del_echo_source" }
-func (*BfdUDPDelEchoSource) GetCrcString() string { return "51077d14" }
-func (*BfdUDPDelEchoSource) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BfdUDPDelEchoSource) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *BfdUDPDelEchoSource) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *BfdUDPDelEchoSource) Unmarshal(b []byte) error {
- return nil
-}
-
-// BfdUDPDelEchoSourceReply defines message 'bfd_udp_del_echo_source_reply'.
-type BfdUDPDelEchoSourceReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *BfdUDPDelEchoSourceReply) Reset() { *m = BfdUDPDelEchoSourceReply{} }
-func (*BfdUDPDelEchoSourceReply) GetMessageName() string { return "bfd_udp_del_echo_source_reply" }
-func (*BfdUDPDelEchoSourceReply) GetCrcString() string { return "e8d4e804" }
-func (*BfdUDPDelEchoSourceReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BfdUDPDelEchoSourceReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *BfdUDPDelEchoSourceReply) 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 *BfdUDPDelEchoSourceReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// BfdUDPDelReply defines message 'bfd_udp_del_reply'.
-type BfdUDPDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *BfdUDPDelReply) Reset() { *m = BfdUDPDelReply{} }
-func (*BfdUDPDelReply) GetMessageName() string { return "bfd_udp_del_reply" }
-func (*BfdUDPDelReply) GetCrcString() string { return "e8d4e804" }
-func (*BfdUDPDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BfdUDPDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *BfdUDPDelReply) 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 *BfdUDPDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// BfdUDPGetEchoSource defines message 'bfd_udp_get_echo_source'.
-type BfdUDPGetEchoSource struct{}
-
-func (m *BfdUDPGetEchoSource) Reset() { *m = BfdUDPGetEchoSource{} }
-func (*BfdUDPGetEchoSource) GetMessageName() string { return "bfd_udp_get_echo_source" }
-func (*BfdUDPGetEchoSource) GetCrcString() string { return "51077d14" }
-func (*BfdUDPGetEchoSource) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BfdUDPGetEchoSource) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *BfdUDPGetEchoSource) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *BfdUDPGetEchoSource) Unmarshal(b []byte) error {
- return nil
-}
-
-// BfdUDPGetEchoSourceReply defines message 'bfd_udp_get_echo_source_reply'.
-type BfdUDPGetEchoSourceReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- IsSet bool `binapi:"bool,name=is_set" json:"is_set,omitempty"`
- HaveUsableIP4 bool `binapi:"bool,name=have_usable_ip4" json:"have_usable_ip4,omitempty"`
- IP4Addr IP4Address `binapi:"ip4_address,name=ip4_addr" json:"ip4_addr,omitempty"`
- HaveUsableIP6 bool `binapi:"bool,name=have_usable_ip6" json:"have_usable_ip6,omitempty"`
- IP6Addr IP6Address `binapi:"ip6_address,name=ip6_addr" json:"ip6_addr,omitempty"`
-}
-
-func (m *BfdUDPGetEchoSourceReply) Reset() { *m = BfdUDPGetEchoSourceReply{} }
-func (*BfdUDPGetEchoSourceReply) GetMessageName() string { return "bfd_udp_get_echo_source_reply" }
-func (*BfdUDPGetEchoSourceReply) GetCrcString() string { return "1e00cfce" }
-func (*BfdUDPGetEchoSourceReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BfdUDPGetEchoSourceReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.SwIfIndex
- size += 1 // m.IsSet
- size += 1 // m.HaveUsableIP4
- size += 1 * 4 // m.IP4Addr
- size += 1 // m.HaveUsableIP6
- size += 1 * 16 // m.IP6Addr
- return size
-}
-func (m *BfdUDPGetEchoSourceReply) 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))
- buf.EncodeBool(m.IsSet)
- buf.EncodeBool(m.HaveUsableIP4)
- buf.EncodeBytes(m.IP4Addr[:], 4)
- buf.EncodeBool(m.HaveUsableIP6)
- buf.EncodeBytes(m.IP6Addr[:], 16)
- return buf.Bytes(), nil
-}
-func (m *BfdUDPGetEchoSourceReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.IsSet = buf.DecodeBool()
- m.HaveUsableIP4 = buf.DecodeBool()
- copy(m.IP4Addr[:], buf.DecodeBytes(4))
- m.HaveUsableIP6 = buf.DecodeBool()
- copy(m.IP6Addr[:], buf.DecodeBytes(16))
- return nil
-}
-
-// BfdUDPMod defines message 'bfd_udp_mod'.
-type BfdUDPMod struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- DesiredMinTx uint32 `binapi:"u32,name=desired_min_tx" json:"desired_min_tx,omitempty"`
- RequiredMinRx uint32 `binapi:"u32,name=required_min_rx" json:"required_min_rx,omitempty"`
- LocalAddr Address `binapi:"address,name=local_addr" json:"local_addr,omitempty"`
- PeerAddr Address `binapi:"address,name=peer_addr" json:"peer_addr,omitempty"`
- DetectMult uint8 `binapi:"u8,name=detect_mult" json:"detect_mult,omitempty"`
-}
-
-func (m *BfdUDPMod) Reset() { *m = BfdUDPMod{} }
-func (*BfdUDPMod) GetMessageName() string { return "bfd_udp_mod" }
-func (*BfdUDPMod) GetCrcString() string { return "783a3ff6" }
-func (*BfdUDPMod) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BfdUDPMod) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.DesiredMinTx
- size += 4 // m.RequiredMinRx
- size += 4 // m.LocalAddr.Af
- size += 1 * 16 // m.LocalAddr.Un
- size += 4 // m.PeerAddr.Af
- size += 1 * 16 // m.PeerAddr.Un
- size += 1 // m.DetectMult
- return size
-}
-func (m *BfdUDPMod) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(m.DesiredMinTx)
- buf.EncodeUint32(m.RequiredMinRx)
- buf.EncodeUint32(uint32(m.LocalAddr.Af))
- buf.EncodeBytes(m.LocalAddr.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.PeerAddr.Af))
- buf.EncodeBytes(m.PeerAddr.Un.XXX_UnionData[:], 16)
- buf.EncodeUint8(m.DetectMult)
- return buf.Bytes(), nil
-}
-func (m *BfdUDPMod) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.DesiredMinTx = buf.DecodeUint32()
- m.RequiredMinRx = buf.DecodeUint32()
- m.LocalAddr.Af = AddressFamily(buf.DecodeUint32())
- copy(m.LocalAddr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.PeerAddr.Af = AddressFamily(buf.DecodeUint32())
- copy(m.PeerAddr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.DetectMult = buf.DecodeUint8()
- return nil
-}
-
-// BfdUDPModReply defines message 'bfd_udp_mod_reply'.
-type BfdUDPModReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *BfdUDPModReply) Reset() { *m = BfdUDPModReply{} }
-func (*BfdUDPModReply) GetMessageName() string { return "bfd_udp_mod_reply" }
-func (*BfdUDPModReply) GetCrcString() string { return "e8d4e804" }
-func (*BfdUDPModReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BfdUDPModReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *BfdUDPModReply) 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 *BfdUDPModReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// BfdUDPSessionDetails defines message 'bfd_udp_session_details'.
-type BfdUDPSessionDetails struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- LocalAddr Address `binapi:"address,name=local_addr" json:"local_addr,omitempty"`
- PeerAddr Address `binapi:"address,name=peer_addr" json:"peer_addr,omitempty"`
- State BfdState `binapi:"bfd_state,name=state" json:"state,omitempty"`
- IsAuthenticated bool `binapi:"bool,name=is_authenticated" json:"is_authenticated,omitempty"`
- BfdKeyID uint8 `binapi:"u8,name=bfd_key_id" json:"bfd_key_id,omitempty"`
- ConfKeyID uint32 `binapi:"u32,name=conf_key_id" json:"conf_key_id,omitempty"`
- RequiredMinRx uint32 `binapi:"u32,name=required_min_rx" json:"required_min_rx,omitempty"`
- DesiredMinTx uint32 `binapi:"u32,name=desired_min_tx" json:"desired_min_tx,omitempty"`
- DetectMult uint8 `binapi:"u8,name=detect_mult" json:"detect_mult,omitempty"`
-}
-
-func (m *BfdUDPSessionDetails) Reset() { *m = BfdUDPSessionDetails{} }
-func (*BfdUDPSessionDetails) GetMessageName() string { return "bfd_udp_session_details" }
-func (*BfdUDPSessionDetails) GetCrcString() string { return "60653c02" }
-func (*BfdUDPSessionDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BfdUDPSessionDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.LocalAddr.Af
- size += 1 * 16 // m.LocalAddr.Un
- size += 4 // m.PeerAddr.Af
- size += 1 * 16 // m.PeerAddr.Un
- size += 4 // m.State
- size += 1 // m.IsAuthenticated
- size += 1 // m.BfdKeyID
- size += 4 // m.ConfKeyID
- size += 4 // m.RequiredMinRx
- size += 4 // m.DesiredMinTx
- size += 1 // m.DetectMult
- return size
-}
-func (m *BfdUDPSessionDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(uint32(m.LocalAddr.Af))
- buf.EncodeBytes(m.LocalAddr.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.PeerAddr.Af))
- buf.EncodeBytes(m.PeerAddr.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.State))
- buf.EncodeBool(m.IsAuthenticated)
- buf.EncodeUint8(m.BfdKeyID)
- buf.EncodeUint32(m.ConfKeyID)
- buf.EncodeUint32(m.RequiredMinRx)
- buf.EncodeUint32(m.DesiredMinTx)
- buf.EncodeUint8(m.DetectMult)
- return buf.Bytes(), nil
-}
-func (m *BfdUDPSessionDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.LocalAddr.Af = AddressFamily(buf.DecodeUint32())
- copy(m.LocalAddr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.PeerAddr.Af = AddressFamily(buf.DecodeUint32())
- copy(m.PeerAddr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.State = BfdState(buf.DecodeUint32())
- m.IsAuthenticated = buf.DecodeBool()
- m.BfdKeyID = buf.DecodeUint8()
- m.ConfKeyID = buf.DecodeUint32()
- m.RequiredMinRx = buf.DecodeUint32()
- m.DesiredMinTx = buf.DecodeUint32()
- m.DetectMult = buf.DecodeUint8()
- return nil
-}
-
-// BfdUDPSessionDump defines message 'bfd_udp_session_dump'.
-type BfdUDPSessionDump struct{}
-
-func (m *BfdUDPSessionDump) Reset() { *m = BfdUDPSessionDump{} }
-func (*BfdUDPSessionDump) GetMessageName() string { return "bfd_udp_session_dump" }
-func (*BfdUDPSessionDump) GetCrcString() string { return "51077d14" }
-func (*BfdUDPSessionDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BfdUDPSessionDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *BfdUDPSessionDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *BfdUDPSessionDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// BfdUDPSessionSetFlags defines message 'bfd_udp_session_set_flags'.
-type BfdUDPSessionSetFlags struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- LocalAddr Address `binapi:"address,name=local_addr" json:"local_addr,omitempty"`
- PeerAddr Address `binapi:"address,name=peer_addr" json:"peer_addr,omitempty"`
- Flags IfStatusFlags `binapi:"if_status_flags,name=flags" json:"flags,omitempty"`
-}
-
-func (m *BfdUDPSessionSetFlags) Reset() { *m = BfdUDPSessionSetFlags{} }
-func (*BfdUDPSessionSetFlags) GetMessageName() string { return "bfd_udp_session_set_flags" }
-func (*BfdUDPSessionSetFlags) GetCrcString() string { return "cf313851" }
-func (*BfdUDPSessionSetFlags) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BfdUDPSessionSetFlags) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.LocalAddr.Af
- size += 1 * 16 // m.LocalAddr.Un
- size += 4 // m.PeerAddr.Af
- size += 1 * 16 // m.PeerAddr.Un
- size += 4 // m.Flags
- return size
-}
-func (m *BfdUDPSessionSetFlags) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(uint32(m.LocalAddr.Af))
- buf.EncodeBytes(m.LocalAddr.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.PeerAddr.Af))
- buf.EncodeBytes(m.PeerAddr.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.Flags))
- return buf.Bytes(), nil
-}
-func (m *BfdUDPSessionSetFlags) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.LocalAddr.Af = AddressFamily(buf.DecodeUint32())
- copy(m.LocalAddr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.PeerAddr.Af = AddressFamily(buf.DecodeUint32())
- copy(m.PeerAddr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Flags = IfStatusFlags(buf.DecodeUint32())
- return nil
-}
-
-// BfdUDPSessionSetFlagsReply defines message 'bfd_udp_session_set_flags_reply'.
-type BfdUDPSessionSetFlagsReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *BfdUDPSessionSetFlagsReply) Reset() { *m = BfdUDPSessionSetFlagsReply{} }
-func (*BfdUDPSessionSetFlagsReply) GetMessageName() string { return "bfd_udp_session_set_flags_reply" }
-func (*BfdUDPSessionSetFlagsReply) GetCrcString() string { return "e8d4e804" }
-func (*BfdUDPSessionSetFlagsReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BfdUDPSessionSetFlagsReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *BfdUDPSessionSetFlagsReply) 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 *BfdUDPSessionSetFlagsReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// BfdUDPSetEchoSource defines message 'bfd_udp_set_echo_source'.
-type BfdUDPSetEchoSource struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *BfdUDPSetEchoSource) Reset() { *m = BfdUDPSetEchoSource{} }
-func (*BfdUDPSetEchoSource) GetMessageName() string { return "bfd_udp_set_echo_source" }
-func (*BfdUDPSetEchoSource) GetCrcString() string { return "f9e6675e" }
-func (*BfdUDPSetEchoSource) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BfdUDPSetEchoSource) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *BfdUDPSetEchoSource) 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 *BfdUDPSetEchoSource) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// BfdUDPSetEchoSourceReply defines message 'bfd_udp_set_echo_source_reply'.
-type BfdUDPSetEchoSourceReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *BfdUDPSetEchoSourceReply) Reset() { *m = BfdUDPSetEchoSourceReply{} }
-func (*BfdUDPSetEchoSourceReply) GetMessageName() string { return "bfd_udp_set_echo_source_reply" }
-func (*BfdUDPSetEchoSourceReply) GetCrcString() string { return "e8d4e804" }
-func (*BfdUDPSetEchoSourceReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BfdUDPSetEchoSourceReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *BfdUDPSetEchoSourceReply) 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 *BfdUDPSetEchoSourceReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// WantBfdEvents defines message 'want_bfd_events'.
-type WantBfdEvents struct {
- EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
- PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
-}
-
-func (m *WantBfdEvents) Reset() { *m = WantBfdEvents{} }
-func (*WantBfdEvents) GetMessageName() string { return "want_bfd_events" }
-func (*WantBfdEvents) GetCrcString() string { return "c5e2af94" }
-func (*WantBfdEvents) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *WantBfdEvents) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.EnableDisable
- size += 4 // m.PID
- return size
-}
-func (m *WantBfdEvents) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.EnableDisable)
- buf.EncodeUint32(m.PID)
- return buf.Bytes(), nil
-}
-func (m *WantBfdEvents) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.EnableDisable = buf.DecodeBool()
- m.PID = buf.DecodeUint32()
- return nil
-}
-
-// WantBfdEventsReply defines message 'want_bfd_events_reply'.
-type WantBfdEventsReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *WantBfdEventsReply) Reset() { *m = WantBfdEventsReply{} }
-func (*WantBfdEventsReply) GetMessageName() string { return "want_bfd_events_reply" }
-func (*WantBfdEventsReply) GetCrcString() string { return "e8d4e804" }
-func (*WantBfdEventsReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *WantBfdEventsReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *WantBfdEventsReply) 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 *WantBfdEventsReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_bfd_binapi_init() }
-func file_bfd_binapi_init() {
- api.RegisterMessage((*BfdAuthDelKey)(nil), "bfd_auth_del_key_65310b22")
- api.RegisterMessage((*BfdAuthDelKeyReply)(nil), "bfd_auth_del_key_reply_e8d4e804")
- api.RegisterMessage((*BfdAuthKeysDetails)(nil), "bfd_auth_keys_details_84130e9f")
- api.RegisterMessage((*BfdAuthKeysDump)(nil), "bfd_auth_keys_dump_51077d14")
- api.RegisterMessage((*BfdAuthSetKey)(nil), "bfd_auth_set_key_690b8877")
- api.RegisterMessage((*BfdAuthSetKeyReply)(nil), "bfd_auth_set_key_reply_e8d4e804")
- api.RegisterMessage((*BfdUDPAdd)(nil), "bfd_udp_add_7a6d1185")
- api.RegisterMessage((*BfdUDPAddReply)(nil), "bfd_udp_add_reply_e8d4e804")
- api.RegisterMessage((*BfdUDPAuthActivate)(nil), "bfd_udp_auth_activate_493ee0ec")
- api.RegisterMessage((*BfdUDPAuthActivateReply)(nil), "bfd_udp_auth_activate_reply_e8d4e804")
- api.RegisterMessage((*BfdUDPAuthDeactivate)(nil), "bfd_udp_auth_deactivate_99978c32")
- api.RegisterMessage((*BfdUDPAuthDeactivateReply)(nil), "bfd_udp_auth_deactivate_reply_e8d4e804")
- api.RegisterMessage((*BfdUDPDel)(nil), "bfd_udp_del_8096514d")
- api.RegisterMessage((*BfdUDPDelEchoSource)(nil), "bfd_udp_del_echo_source_51077d14")
- api.RegisterMessage((*BfdUDPDelEchoSourceReply)(nil), "bfd_udp_del_echo_source_reply_e8d4e804")
- api.RegisterMessage((*BfdUDPDelReply)(nil), "bfd_udp_del_reply_e8d4e804")
- api.RegisterMessage((*BfdUDPGetEchoSource)(nil), "bfd_udp_get_echo_source_51077d14")
- api.RegisterMessage((*BfdUDPGetEchoSourceReply)(nil), "bfd_udp_get_echo_source_reply_1e00cfce")
- api.RegisterMessage((*BfdUDPMod)(nil), "bfd_udp_mod_783a3ff6")
- api.RegisterMessage((*BfdUDPModReply)(nil), "bfd_udp_mod_reply_e8d4e804")
- api.RegisterMessage((*BfdUDPSessionDetails)(nil), "bfd_udp_session_details_60653c02")
- api.RegisterMessage((*BfdUDPSessionDump)(nil), "bfd_udp_session_dump_51077d14")
- api.RegisterMessage((*BfdUDPSessionSetFlags)(nil), "bfd_udp_session_set_flags_cf313851")
- api.RegisterMessage((*BfdUDPSessionSetFlagsReply)(nil), "bfd_udp_session_set_flags_reply_e8d4e804")
- api.RegisterMessage((*BfdUDPSetEchoSource)(nil), "bfd_udp_set_echo_source_f9e6675e")
- api.RegisterMessage((*BfdUDPSetEchoSourceReply)(nil), "bfd_udp_set_echo_source_reply_e8d4e804")
- api.RegisterMessage((*WantBfdEvents)(nil), "want_bfd_events_c5e2af94")
- api.RegisterMessage((*WantBfdEventsReply)(nil), "want_bfd_events_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*BfdAuthDelKey)(nil),
- (*BfdAuthDelKeyReply)(nil),
- (*BfdAuthKeysDetails)(nil),
- (*BfdAuthKeysDump)(nil),
- (*BfdAuthSetKey)(nil),
- (*BfdAuthSetKeyReply)(nil),
- (*BfdUDPAdd)(nil),
- (*BfdUDPAddReply)(nil),
- (*BfdUDPAuthActivate)(nil),
- (*BfdUDPAuthActivateReply)(nil),
- (*BfdUDPAuthDeactivate)(nil),
- (*BfdUDPAuthDeactivateReply)(nil),
- (*BfdUDPDel)(nil),
- (*BfdUDPDelEchoSource)(nil),
- (*BfdUDPDelEchoSourceReply)(nil),
- (*BfdUDPDelReply)(nil),
- (*BfdUDPGetEchoSource)(nil),
- (*BfdUDPGetEchoSourceReply)(nil),
- (*BfdUDPMod)(nil),
- (*BfdUDPModReply)(nil),
- (*BfdUDPSessionDetails)(nil),
- (*BfdUDPSessionDump)(nil),
- (*BfdUDPSessionSetFlags)(nil),
- (*BfdUDPSessionSetFlagsReply)(nil),
- (*BfdUDPSetEchoSource)(nil),
- (*BfdUDPSetEchoSourceReply)(nil),
- (*WantBfdEvents)(nil),
- (*WantBfdEventsReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/bfd/bfd_rpc.ba.go b/internal/testbinapi/binapi2001/bfd/bfd_rpc.ba.go
deleted file mode 100644
index a9a9472..0000000
--- a/internal/testbinapi/binapi2001/bfd/bfd_rpc.ba.go
+++ /dev/null
@@ -1,232 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package bfd
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service bfd.
-type RPCService interface {
- BfdAuthDelKey(ctx context.Context, in *BfdAuthDelKey) (*BfdAuthDelKeyReply, error)
- BfdAuthKeysDump(ctx context.Context, in *BfdAuthKeysDump) (RPCService_BfdAuthKeysDumpClient, error)
- BfdAuthSetKey(ctx context.Context, in *BfdAuthSetKey) (*BfdAuthSetKeyReply, error)
- BfdUDPAdd(ctx context.Context, in *BfdUDPAdd) (*BfdUDPAddReply, error)
- BfdUDPAuthActivate(ctx context.Context, in *BfdUDPAuthActivate) (*BfdUDPAuthActivateReply, error)
- BfdUDPAuthDeactivate(ctx context.Context, in *BfdUDPAuthDeactivate) (*BfdUDPAuthDeactivateReply, error)
- BfdUDPDel(ctx context.Context, in *BfdUDPDel) (*BfdUDPDelReply, error)
- BfdUDPDelEchoSource(ctx context.Context, in *BfdUDPDelEchoSource) (*BfdUDPDelEchoSourceReply, error)
- BfdUDPGetEchoSource(ctx context.Context, in *BfdUDPGetEchoSource) (*BfdUDPGetEchoSourceReply, error)
- BfdUDPMod(ctx context.Context, in *BfdUDPMod) (*BfdUDPModReply, error)
- BfdUDPSessionDump(ctx context.Context, in *BfdUDPSessionDump) (RPCService_BfdUDPSessionDumpClient, error)
- BfdUDPSessionSetFlags(ctx context.Context, in *BfdUDPSessionSetFlags) (*BfdUDPSessionSetFlagsReply, error)
- BfdUDPSetEchoSource(ctx context.Context, in *BfdUDPSetEchoSource) (*BfdUDPSetEchoSourceReply, error)
- WantBfdEvents(ctx context.Context, in *WantBfdEvents) (*WantBfdEventsReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) BfdAuthDelKey(ctx context.Context, in *BfdAuthDelKey) (*BfdAuthDelKeyReply, error) {
- out := new(BfdAuthDelKeyReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) BfdAuthKeysDump(ctx context.Context, in *BfdAuthKeysDump) (RPCService_BfdAuthKeysDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_BfdAuthKeysDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_BfdAuthKeysDumpClient interface {
- Recv() (*BfdAuthKeysDetails, error)
- api.Stream
-}
-
-type serviceClient_BfdAuthKeysDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_BfdAuthKeysDumpClient) Recv() (*BfdAuthKeysDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *BfdAuthKeysDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) BfdAuthSetKey(ctx context.Context, in *BfdAuthSetKey) (*BfdAuthSetKeyReply, error) {
- out := new(BfdAuthSetKeyReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) BfdUDPAdd(ctx context.Context, in *BfdUDPAdd) (*BfdUDPAddReply, error) {
- out := new(BfdUDPAddReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) BfdUDPAuthActivate(ctx context.Context, in *BfdUDPAuthActivate) (*BfdUDPAuthActivateReply, error) {
- out := new(BfdUDPAuthActivateReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) BfdUDPAuthDeactivate(ctx context.Context, in *BfdUDPAuthDeactivate) (*BfdUDPAuthDeactivateReply, error) {
- out := new(BfdUDPAuthDeactivateReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) BfdUDPDel(ctx context.Context, in *BfdUDPDel) (*BfdUDPDelReply, error) {
- out := new(BfdUDPDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) BfdUDPDelEchoSource(ctx context.Context, in *BfdUDPDelEchoSource) (*BfdUDPDelEchoSourceReply, error) {
- out := new(BfdUDPDelEchoSourceReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) BfdUDPGetEchoSource(ctx context.Context, in *BfdUDPGetEchoSource) (*BfdUDPGetEchoSourceReply, error) {
- out := new(BfdUDPGetEchoSourceReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) BfdUDPMod(ctx context.Context, in *BfdUDPMod) (*BfdUDPModReply, error) {
- out := new(BfdUDPModReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) BfdUDPSessionDump(ctx context.Context, in *BfdUDPSessionDump) (RPCService_BfdUDPSessionDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_BfdUDPSessionDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_BfdUDPSessionDumpClient interface {
- Recv() (*BfdUDPSessionDetails, error)
- api.Stream
-}
-
-type serviceClient_BfdUDPSessionDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_BfdUDPSessionDumpClient) Recv() (*BfdUDPSessionDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *BfdUDPSessionDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) BfdUDPSessionSetFlags(ctx context.Context, in *BfdUDPSessionSetFlags) (*BfdUDPSessionSetFlagsReply, error) {
- out := new(BfdUDPSessionSetFlagsReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) BfdUDPSetEchoSource(ctx context.Context, in *BfdUDPSetEchoSource) (*BfdUDPSetEchoSourceReply, error) {
- out := new(BfdUDPSetEchoSourceReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) WantBfdEvents(ctx context.Context, in *WantBfdEvents) (*WantBfdEventsReply, error) {
- out := new(WantBfdEventsReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/bier/bier.ba.go b/internal/testbinapi/binapi2001/bier/bier.ba.go
deleted file mode 100644
index ed46a97..0000000
--- a/internal/testbinapi/binapi2001/bier/bier.ba.go
+++ /dev/null
@@ -1,2011 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/bier.api.json
-
-// Package bier contains generated bindings for API file bier.api.
-//
-// Contents:
-// 5 aliases
-// 7 enums
-// 11 structs
-// 1 union
-// 22 messages
-//
-package bier
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "bier"
- APIVersion = "1.2.1"
- VersionCrc = 0x27c878c4
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// FibPathFlags defines enum 'fib_path_flags'.
-type FibPathFlags uint32
-
-const (
- FIB_API_PATH_FLAG_NONE FibPathFlags = 0
- FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED FibPathFlags = 1
- FIB_API_PATH_FLAG_RESOLVE_VIA_HOST FibPathFlags = 2
- FIB_API_PATH_FLAG_POP_PW_CW FibPathFlags = 4
-)
-
-var (
- FibPathFlags_name = map[uint32]string{
- 0: "FIB_API_PATH_FLAG_NONE",
- 1: "FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED",
- 2: "FIB_API_PATH_FLAG_RESOLVE_VIA_HOST",
- 4: "FIB_API_PATH_FLAG_POP_PW_CW",
- }
- FibPathFlags_value = map[string]uint32{
- "FIB_API_PATH_FLAG_NONE": 0,
- "FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED": 1,
- "FIB_API_PATH_FLAG_RESOLVE_VIA_HOST": 2,
- "FIB_API_PATH_FLAG_POP_PW_CW": 4,
- }
-)
-
-func (x FibPathFlags) String() string {
- s, ok := FibPathFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := FibPathFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "FibPathFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// FibPathNhProto defines enum 'fib_path_nh_proto'.
-type FibPathNhProto uint32
-
-const (
- FIB_API_PATH_NH_PROTO_IP4 FibPathNhProto = 0
- FIB_API_PATH_NH_PROTO_IP6 FibPathNhProto = 1
- FIB_API_PATH_NH_PROTO_MPLS FibPathNhProto = 2
- FIB_API_PATH_NH_PROTO_ETHERNET FibPathNhProto = 3
- FIB_API_PATH_NH_PROTO_BIER FibPathNhProto = 4
-)
-
-var (
- FibPathNhProto_name = map[uint32]string{
- 0: "FIB_API_PATH_NH_PROTO_IP4",
- 1: "FIB_API_PATH_NH_PROTO_IP6",
- 2: "FIB_API_PATH_NH_PROTO_MPLS",
- 3: "FIB_API_PATH_NH_PROTO_ETHERNET",
- 4: "FIB_API_PATH_NH_PROTO_BIER",
- }
- FibPathNhProto_value = map[string]uint32{
- "FIB_API_PATH_NH_PROTO_IP4": 0,
- "FIB_API_PATH_NH_PROTO_IP6": 1,
- "FIB_API_PATH_NH_PROTO_MPLS": 2,
- "FIB_API_PATH_NH_PROTO_ETHERNET": 3,
- "FIB_API_PATH_NH_PROTO_BIER": 4,
- }
-)
-
-func (x FibPathNhProto) String() string {
- s, ok := FibPathNhProto_name[uint32(x)]
- if ok {
- return s
- }
- return "FibPathNhProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// FibPathType defines enum 'fib_path_type'.
-type FibPathType uint32
-
-const (
- FIB_API_PATH_TYPE_NORMAL FibPathType = 0
- FIB_API_PATH_TYPE_LOCAL FibPathType = 1
- FIB_API_PATH_TYPE_DROP FibPathType = 2
- FIB_API_PATH_TYPE_UDP_ENCAP FibPathType = 3
- FIB_API_PATH_TYPE_BIER_IMP FibPathType = 4
- FIB_API_PATH_TYPE_ICMP_UNREACH FibPathType = 5
- FIB_API_PATH_TYPE_ICMP_PROHIBIT FibPathType = 6
- FIB_API_PATH_TYPE_SOURCE_LOOKUP FibPathType = 7
- FIB_API_PATH_TYPE_DVR FibPathType = 8
- FIB_API_PATH_TYPE_INTERFACE_RX FibPathType = 9
- FIB_API_PATH_TYPE_CLASSIFY FibPathType = 10
-)
-
-var (
- FibPathType_name = map[uint32]string{
- 0: "FIB_API_PATH_TYPE_NORMAL",
- 1: "FIB_API_PATH_TYPE_LOCAL",
- 2: "FIB_API_PATH_TYPE_DROP",
- 3: "FIB_API_PATH_TYPE_UDP_ENCAP",
- 4: "FIB_API_PATH_TYPE_BIER_IMP",
- 5: "FIB_API_PATH_TYPE_ICMP_UNREACH",
- 6: "FIB_API_PATH_TYPE_ICMP_PROHIBIT",
- 7: "FIB_API_PATH_TYPE_SOURCE_LOOKUP",
- 8: "FIB_API_PATH_TYPE_DVR",
- 9: "FIB_API_PATH_TYPE_INTERFACE_RX",
- 10: "FIB_API_PATH_TYPE_CLASSIFY",
- }
- FibPathType_value = map[string]uint32{
- "FIB_API_PATH_TYPE_NORMAL": 0,
- "FIB_API_PATH_TYPE_LOCAL": 1,
- "FIB_API_PATH_TYPE_DROP": 2,
- "FIB_API_PATH_TYPE_UDP_ENCAP": 3,
- "FIB_API_PATH_TYPE_BIER_IMP": 4,
- "FIB_API_PATH_TYPE_ICMP_UNREACH": 5,
- "FIB_API_PATH_TYPE_ICMP_PROHIBIT": 6,
- "FIB_API_PATH_TYPE_SOURCE_LOOKUP": 7,
- "FIB_API_PATH_TYPE_DVR": 8,
- "FIB_API_PATH_TYPE_INTERFACE_RX": 9,
- "FIB_API_PATH_TYPE_CLASSIFY": 10,
- }
-)
-
-func (x FibPathType) String() string {
- s, ok := FibPathType_name[uint32(x)]
- if ok {
- return s
- }
- return "FibPathType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// BierRoute defines type 'bier_route'.
-type BierRoute struct {
- BrBp uint32 `binapi:"u32,name=br_bp" json:"br_bp,omitempty"`
- BrTblID BierTableID `binapi:"bier_table_id,name=br_tbl_id" json:"br_tbl_id,omitempty"`
- BrNPaths uint8 `binapi:"u8,name=br_n_paths" json:"-"`
- BrPaths []FibPath `binapi:"fib_path[br_n_paths],name=br_paths" json:"br_paths,omitempty"`
-}
-
-// BierTableID defines type 'bier_table_id'.
-type BierTableID struct {
- BtSet uint8 `binapi:"u8,name=bt_set" json:"bt_set,omitempty"`
- BtSubDomain uint8 `binapi:"u8,name=bt_sub_domain" json:"bt_sub_domain,omitempty"`
- BtHdrLenID uint8 `binapi:"u8,name=bt_hdr_len_id" json:"bt_hdr_len_id,omitempty"`
-}
-
-// FibMplsLabel defines type 'fib_mpls_label'.
-type FibMplsLabel struct {
- IsUniform uint8 `binapi:"u8,name=is_uniform" json:"is_uniform,omitempty"`
- Label uint32 `binapi:"u32,name=label" json:"label,omitempty"`
- TTL uint8 `binapi:"u8,name=ttl" json:"ttl,omitempty"`
- Exp uint8 `binapi:"u8,name=exp" json:"exp,omitempty"`
-}
-
-// FibPath defines type 'fib_path'.
-type FibPath struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
- RpfID uint32 `binapi:"u32,name=rpf_id" json:"rpf_id,omitempty"`
- Weight uint8 `binapi:"u8,name=weight" json:"weight,omitempty"`
- Preference uint8 `binapi:"u8,name=preference" json:"preference,omitempty"`
- Type FibPathType `binapi:"fib_path_type,name=type" json:"type,omitempty"`
- Flags FibPathFlags `binapi:"fib_path_flags,name=flags" json:"flags,omitempty"`
- Proto FibPathNhProto `binapi:"fib_path_nh_proto,name=proto" json:"proto,omitempty"`
- Nh FibPathNh `binapi:"fib_path_nh,name=nh" json:"nh,omitempty"`
- NLabels uint8 `binapi:"u8,name=n_labels" json:"n_labels,omitempty"`
- LabelStack [16]FibMplsLabel `binapi:"fib_mpls_label[16],name=label_stack" json:"label_stack,omitempty"`
-}
-
-// FibPathNh defines type 'fib_path_nh'.
-type FibPathNh struct {
- Address AddressUnion `binapi:"address_union,name=address" json:"address,omitempty"`
- ViaLabel uint32 `binapi:"u32,name=via_label" json:"via_label,omitempty"`
- ObjID uint32 `binapi:"u32,name=obj_id" json:"obj_id,omitempty"`
- ClassifyTableIndex uint32 `binapi:"u32,name=classify_table_index" json:"classify_table_index,omitempty"`
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
-
-// BierDispEntryAddDel defines message 'bier_disp_entry_add_del'.
-type BierDispEntryAddDel struct {
- BdeBp uint16 `binapi:"u16,name=bde_bp" json:"bde_bp,omitempty"`
- BdeTblID uint32 `binapi:"u32,name=bde_tbl_id" json:"bde_tbl_id,omitempty"`
- BdeIsAdd bool `binapi:"bool,name=bde_is_add" json:"bde_is_add,omitempty"`
- BdePayloadProto uint8 `binapi:"u8,name=bde_payload_proto" json:"bde_payload_proto,omitempty"`
- BdeNPaths uint8 `binapi:"u8,name=bde_n_paths" json:"-"`
- BdePaths []FibPath `binapi:"fib_path[bde_n_paths],name=bde_paths" json:"bde_paths,omitempty"`
-}
-
-func (m *BierDispEntryAddDel) Reset() { *m = BierDispEntryAddDel{} }
-func (*BierDispEntryAddDel) GetMessageName() string { return "bier_disp_entry_add_del" }
-func (*BierDispEntryAddDel) GetCrcString() string { return "648323eb" }
-func (*BierDispEntryAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BierDispEntryAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 2 // m.BdeBp
- size += 4 // m.BdeTblID
- size += 1 // m.BdeIsAdd
- size += 1 // m.BdePayloadProto
- size += 1 // m.BdeNPaths
- for j1 := 0; j1 < len(m.BdePaths); j1++ {
- var s1 FibPath
- _ = s1
- if j1 < len(m.BdePaths) {
- s1 = m.BdePaths[j1]
- }
- size += 4 // s1.SwIfIndex
- size += 4 // s1.TableID
- size += 4 // s1.RpfID
- size += 1 // s1.Weight
- size += 1 // s1.Preference
- size += 4 // s1.Type
- size += 4 // s1.Flags
- size += 4 // s1.Proto
- size += 1 * 16 // s1.Nh.Address
- size += 4 // s1.Nh.ViaLabel
- size += 4 // s1.Nh.ObjID
- size += 4 // s1.Nh.ClassifyTableIndex
- size += 1 // s1.NLabels
- for j2 := 0; j2 < 16; j2++ {
- size += 1 // s1.LabelStack[j2].IsUniform
- size += 4 // s1.LabelStack[j2].Label
- size += 1 // s1.LabelStack[j2].TTL
- size += 1 // s1.LabelStack[j2].Exp
- }
- }
- return size
-}
-func (m *BierDispEntryAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint16(m.BdeBp)
- buf.EncodeUint32(m.BdeTblID)
- buf.EncodeBool(m.BdeIsAdd)
- buf.EncodeUint8(m.BdePayloadProto)
- buf.EncodeUint8(uint8(len(m.BdePaths)))
- for j0 := 0; j0 < len(m.BdePaths); j0++ {
- var v0 FibPath // BdePaths
- if j0 < len(m.BdePaths) {
- v0 = m.BdePaths[j0]
- }
- buf.EncodeUint32(v0.SwIfIndex)
- buf.EncodeUint32(v0.TableID)
- buf.EncodeUint32(v0.RpfID)
- buf.EncodeUint8(v0.Weight)
- buf.EncodeUint8(v0.Preference)
- buf.EncodeUint32(uint32(v0.Type))
- buf.EncodeUint32(uint32(v0.Flags))
- buf.EncodeUint32(uint32(v0.Proto))
- buf.EncodeBytes(v0.Nh.Address.XXX_UnionData[:], 16)
- buf.EncodeUint32(v0.Nh.ViaLabel)
- buf.EncodeUint32(v0.Nh.ObjID)
- buf.EncodeUint32(v0.Nh.ClassifyTableIndex)
- buf.EncodeUint8(v0.NLabels)
- for j1 := 0; j1 < 16; j1++ {
- buf.EncodeUint8(v0.LabelStack[j1].IsUniform)
- buf.EncodeUint32(v0.LabelStack[j1].Label)
- buf.EncodeUint8(v0.LabelStack[j1].TTL)
- buf.EncodeUint8(v0.LabelStack[j1].Exp)
- }
- }
- return buf.Bytes(), nil
-}
-func (m *BierDispEntryAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.BdeBp = buf.DecodeUint16()
- m.BdeTblID = buf.DecodeUint32()
- m.BdeIsAdd = buf.DecodeBool()
- m.BdePayloadProto = buf.DecodeUint8()
- m.BdeNPaths = buf.DecodeUint8()
- m.BdePaths = make([]FibPath, m.BdeNPaths)
- for j0 := 0; j0 < len(m.BdePaths); j0++ {
- m.BdePaths[j0].SwIfIndex = buf.DecodeUint32()
- m.BdePaths[j0].TableID = buf.DecodeUint32()
- m.BdePaths[j0].RpfID = buf.DecodeUint32()
- m.BdePaths[j0].Weight = buf.DecodeUint8()
- m.BdePaths[j0].Preference = buf.DecodeUint8()
- m.BdePaths[j0].Type = FibPathType(buf.DecodeUint32())
- m.BdePaths[j0].Flags = FibPathFlags(buf.DecodeUint32())
- m.BdePaths[j0].Proto = FibPathNhProto(buf.DecodeUint32())
- copy(m.BdePaths[j0].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
- m.BdePaths[j0].Nh.ViaLabel = buf.DecodeUint32()
- m.BdePaths[j0].Nh.ObjID = buf.DecodeUint32()
- m.BdePaths[j0].Nh.ClassifyTableIndex = buf.DecodeUint32()
- m.BdePaths[j0].NLabels = buf.DecodeUint8()
- for j1 := 0; j1 < 16; j1++ {
- m.BdePaths[j0].LabelStack[j1].IsUniform = buf.DecodeUint8()
- m.BdePaths[j0].LabelStack[j1].Label = buf.DecodeUint32()
- m.BdePaths[j0].LabelStack[j1].TTL = buf.DecodeUint8()
- m.BdePaths[j0].LabelStack[j1].Exp = buf.DecodeUint8()
- }
- }
- return nil
-}
-
-// BierDispEntryAddDelReply defines message 'bier_disp_entry_add_del_reply'.
-type BierDispEntryAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *BierDispEntryAddDelReply) Reset() { *m = BierDispEntryAddDelReply{} }
-func (*BierDispEntryAddDelReply) GetMessageName() string { return "bier_disp_entry_add_del_reply" }
-func (*BierDispEntryAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*BierDispEntryAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BierDispEntryAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *BierDispEntryAddDelReply) 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 *BierDispEntryAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// BierDispEntryDetails defines message 'bier_disp_entry_details'.
-type BierDispEntryDetails struct {
- BdeBp uint16 `binapi:"u16,name=bde_bp" json:"bde_bp,omitempty"`
- BdeTblID uint32 `binapi:"u32,name=bde_tbl_id" json:"bde_tbl_id,omitempty"`
- BdeIsAdd bool `binapi:"bool,name=bde_is_add" json:"bde_is_add,omitempty"`
- BdePayloadProto uint8 `binapi:"u8,name=bde_payload_proto" json:"bde_payload_proto,omitempty"`
- BdeNPaths uint8 `binapi:"u8,name=bde_n_paths" json:"-"`
- BdePaths []FibPath `binapi:"fib_path[bde_n_paths],name=bde_paths" json:"bde_paths,omitempty"`
-}
-
-func (m *BierDispEntryDetails) Reset() { *m = BierDispEntryDetails{} }
-func (*BierDispEntryDetails) GetMessageName() string { return "bier_disp_entry_details" }
-func (*BierDispEntryDetails) GetCrcString() string { return "e5b039a9" }
-func (*BierDispEntryDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BierDispEntryDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 2 // m.BdeBp
- size += 4 // m.BdeTblID
- size += 1 // m.BdeIsAdd
- size += 1 // m.BdePayloadProto
- size += 1 // m.BdeNPaths
- for j1 := 0; j1 < len(m.BdePaths); j1++ {
- var s1 FibPath
- _ = s1
- if j1 < len(m.BdePaths) {
- s1 = m.BdePaths[j1]
- }
- size += 4 // s1.SwIfIndex
- size += 4 // s1.TableID
- size += 4 // s1.RpfID
- size += 1 // s1.Weight
- size += 1 // s1.Preference
- size += 4 // s1.Type
- size += 4 // s1.Flags
- size += 4 // s1.Proto
- size += 1 * 16 // s1.Nh.Address
- size += 4 // s1.Nh.ViaLabel
- size += 4 // s1.Nh.ObjID
- size += 4 // s1.Nh.ClassifyTableIndex
- size += 1 // s1.NLabels
- for j2 := 0; j2 < 16; j2++ {
- size += 1 // s1.LabelStack[j2].IsUniform
- size += 4 // s1.LabelStack[j2].Label
- size += 1 // s1.LabelStack[j2].TTL
- size += 1 // s1.LabelStack[j2].Exp
- }
- }
- return size
-}
-func (m *BierDispEntryDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint16(m.BdeBp)
- buf.EncodeUint32(m.BdeTblID)
- buf.EncodeBool(m.BdeIsAdd)
- buf.EncodeUint8(m.BdePayloadProto)
- buf.EncodeUint8(uint8(len(m.BdePaths)))
- for j0 := 0; j0 < len(m.BdePaths); j0++ {
- var v0 FibPath // BdePaths
- if j0 < len(m.BdePaths) {
- v0 = m.BdePaths[j0]
- }
- buf.EncodeUint32(v0.SwIfIndex)
- buf.EncodeUint32(v0.TableID)
- buf.EncodeUint32(v0.RpfID)
- buf.EncodeUint8(v0.Weight)
- buf.EncodeUint8(v0.Preference)
- buf.EncodeUint32(uint32(v0.Type))
- buf.EncodeUint32(uint32(v0.Flags))
- buf.EncodeUint32(uint32(v0.Proto))
- buf.EncodeBytes(v0.Nh.Address.XXX_UnionData[:], 16)
- buf.EncodeUint32(v0.Nh.ViaLabel)
- buf.EncodeUint32(v0.Nh.ObjID)
- buf.EncodeUint32(v0.Nh.ClassifyTableIndex)
- buf.EncodeUint8(v0.NLabels)
- for j1 := 0; j1 < 16; j1++ {
- buf.EncodeUint8(v0.LabelStack[j1].IsUniform)
- buf.EncodeUint32(v0.LabelStack[j1].Label)
- buf.EncodeUint8(v0.LabelStack[j1].TTL)
- buf.EncodeUint8(v0.LabelStack[j1].Exp)
- }
- }
- return buf.Bytes(), nil
-}
-func (m *BierDispEntryDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.BdeBp = buf.DecodeUint16()
- m.BdeTblID = buf.DecodeUint32()
- m.BdeIsAdd = buf.DecodeBool()
- m.BdePayloadProto = buf.DecodeUint8()
- m.BdeNPaths = buf.DecodeUint8()
- m.BdePaths = make([]FibPath, m.BdeNPaths)
- for j0 := 0; j0 < len(m.BdePaths); j0++ {
- m.BdePaths[j0].SwIfIndex = buf.DecodeUint32()
- m.BdePaths[j0].TableID = buf.DecodeUint32()
- m.BdePaths[j0].RpfID = buf.DecodeUint32()
- m.BdePaths[j0].Weight = buf.DecodeUint8()
- m.BdePaths[j0].Preference = buf.DecodeUint8()
- m.BdePaths[j0].Type = FibPathType(buf.DecodeUint32())
- m.BdePaths[j0].Flags = FibPathFlags(buf.DecodeUint32())
- m.BdePaths[j0].Proto = FibPathNhProto(buf.DecodeUint32())
- copy(m.BdePaths[j0].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
- m.BdePaths[j0].Nh.ViaLabel = buf.DecodeUint32()
- m.BdePaths[j0].Nh.ObjID = buf.DecodeUint32()
- m.BdePaths[j0].Nh.ClassifyTableIndex = buf.DecodeUint32()
- m.BdePaths[j0].NLabels = buf.DecodeUint8()
- for j1 := 0; j1 < 16; j1++ {
- m.BdePaths[j0].LabelStack[j1].IsUniform = buf.DecodeUint8()
- m.BdePaths[j0].LabelStack[j1].Label = buf.DecodeUint32()
- m.BdePaths[j0].LabelStack[j1].TTL = buf.DecodeUint8()
- m.BdePaths[j0].LabelStack[j1].Exp = buf.DecodeUint8()
- }
- }
- return nil
-}
-
-// BierDispEntryDump defines message 'bier_disp_entry_dump'.
-type BierDispEntryDump struct {
- BdeTblID uint32 `binapi:"u32,name=bde_tbl_id" json:"bde_tbl_id,omitempty"`
-}
-
-func (m *BierDispEntryDump) Reset() { *m = BierDispEntryDump{} }
-func (*BierDispEntryDump) GetMessageName() string { return "bier_disp_entry_dump" }
-func (*BierDispEntryDump) GetCrcString() string { return "b5fa54ad" }
-func (*BierDispEntryDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BierDispEntryDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.BdeTblID
- return size
-}
-func (m *BierDispEntryDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.BdeTblID)
- return buf.Bytes(), nil
-}
-func (m *BierDispEntryDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.BdeTblID = buf.DecodeUint32()
- return nil
-}
-
-// BierDispTableAddDel defines message 'bier_disp_table_add_del'.
-type BierDispTableAddDel struct {
- BdtTblID uint32 `binapi:"u32,name=bdt_tbl_id" json:"bdt_tbl_id,omitempty"`
- BdtIsAdd bool `binapi:"bool,name=bdt_is_add" json:"bdt_is_add,omitempty"`
-}
-
-func (m *BierDispTableAddDel) Reset() { *m = BierDispTableAddDel{} }
-func (*BierDispTableAddDel) GetMessageName() string { return "bier_disp_table_add_del" }
-func (*BierDispTableAddDel) GetCrcString() string { return "889657ac" }
-func (*BierDispTableAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BierDispTableAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.BdtTblID
- size += 1 // m.BdtIsAdd
- return size
-}
-func (m *BierDispTableAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.BdtTblID)
- buf.EncodeBool(m.BdtIsAdd)
- return buf.Bytes(), nil
-}
-func (m *BierDispTableAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.BdtTblID = buf.DecodeUint32()
- m.BdtIsAdd = buf.DecodeBool()
- return nil
-}
-
-// BierDispTableAddDelReply defines message 'bier_disp_table_add_del_reply'.
-type BierDispTableAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *BierDispTableAddDelReply) Reset() { *m = BierDispTableAddDelReply{} }
-func (*BierDispTableAddDelReply) GetMessageName() string { return "bier_disp_table_add_del_reply" }
-func (*BierDispTableAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*BierDispTableAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BierDispTableAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *BierDispTableAddDelReply) 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 *BierDispTableAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// BierDispTableDetails defines message 'bier_disp_table_details'.
-type BierDispTableDetails struct {
- BdtTblID uint32 `binapi:"u32,name=bdt_tbl_id" json:"bdt_tbl_id,omitempty"`
-}
-
-func (m *BierDispTableDetails) Reset() { *m = BierDispTableDetails{} }
-func (*BierDispTableDetails) GetMessageName() string { return "bier_disp_table_details" }
-func (*BierDispTableDetails) GetCrcString() string { return "d27942c0" }
-func (*BierDispTableDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BierDispTableDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.BdtTblID
- return size
-}
-func (m *BierDispTableDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.BdtTblID)
- return buf.Bytes(), nil
-}
-func (m *BierDispTableDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.BdtTblID = buf.DecodeUint32()
- return nil
-}
-
-// BierDispTableDump defines message 'bier_disp_table_dump'.
-type BierDispTableDump struct{}
-
-func (m *BierDispTableDump) Reset() { *m = BierDispTableDump{} }
-func (*BierDispTableDump) GetMessageName() string { return "bier_disp_table_dump" }
-func (*BierDispTableDump) GetCrcString() string { return "51077d14" }
-func (*BierDispTableDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BierDispTableDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *BierDispTableDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *BierDispTableDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// BierImpAdd defines message 'bier_imp_add'.
-type BierImpAdd struct {
- BiTblID BierTableID `binapi:"bier_table_id,name=bi_tbl_id" json:"bi_tbl_id,omitempty"`
- BiSrc uint16 `binapi:"u16,name=bi_src" json:"bi_src,omitempty"`
- BiNBytes uint8 `binapi:"u8,name=bi_n_bytes" json:"-"`
- BiBytes []byte `binapi:"u8[bi_n_bytes],name=bi_bytes" json:"bi_bytes,omitempty"`
-}
-
-func (m *BierImpAdd) Reset() { *m = BierImpAdd{} }
-func (*BierImpAdd) GetMessageName() string { return "bier_imp_add" }
-func (*BierImpAdd) GetCrcString() string { return "3856dc3d" }
-func (*BierImpAdd) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BierImpAdd) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.BiTblID.BtSet
- size += 1 // m.BiTblID.BtSubDomain
- size += 1 // m.BiTblID.BtHdrLenID
- size += 2 // m.BiSrc
- size += 1 // m.BiNBytes
- size += 1 * len(m.BiBytes) // m.BiBytes
- return size
-}
-func (m *BierImpAdd) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.BiTblID.BtSet)
- buf.EncodeUint8(m.BiTblID.BtSubDomain)
- buf.EncodeUint8(m.BiTblID.BtHdrLenID)
- buf.EncodeUint16(m.BiSrc)
- buf.EncodeUint8(uint8(len(m.BiBytes)))
- buf.EncodeBytes(m.BiBytes, 0)
- return buf.Bytes(), nil
-}
-func (m *BierImpAdd) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.BiTblID.BtSet = buf.DecodeUint8()
- m.BiTblID.BtSubDomain = buf.DecodeUint8()
- m.BiTblID.BtHdrLenID = buf.DecodeUint8()
- m.BiSrc = buf.DecodeUint16()
- m.BiNBytes = buf.DecodeUint8()
- m.BiBytes = make([]byte, m.BiNBytes)
- copy(m.BiBytes, buf.DecodeBytes(len(m.BiBytes)))
- return nil
-}
-
-// BierImpAddReply defines message 'bier_imp_add_reply'.
-type BierImpAddReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- BiIndex uint32 `binapi:"u32,name=bi_index" json:"bi_index,omitempty"`
-}
-
-func (m *BierImpAddReply) Reset() { *m = BierImpAddReply{} }
-func (*BierImpAddReply) GetMessageName() string { return "bier_imp_add_reply" }
-func (*BierImpAddReply) GetCrcString() string { return "d49c5793" }
-func (*BierImpAddReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BierImpAddReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.BiIndex
- return size
-}
-func (m *BierImpAddReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.BiIndex)
- return buf.Bytes(), nil
-}
-func (m *BierImpAddReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.BiIndex = buf.DecodeUint32()
- return nil
-}
-
-// BierImpDel defines message 'bier_imp_del'.
-type BierImpDel struct {
- BiIndex uint32 `binapi:"u32,name=bi_index" json:"bi_index,omitempty"`
-}
-
-func (m *BierImpDel) Reset() { *m = BierImpDel{} }
-func (*BierImpDel) GetMessageName() string { return "bier_imp_del" }
-func (*BierImpDel) GetCrcString() string { return "7d45edf6" }
-func (*BierImpDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BierImpDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.BiIndex
- return size
-}
-func (m *BierImpDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.BiIndex)
- return buf.Bytes(), nil
-}
-func (m *BierImpDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.BiIndex = buf.DecodeUint32()
- return nil
-}
-
-// BierImpDelReply defines message 'bier_imp_del_reply'.
-type BierImpDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *BierImpDelReply) Reset() { *m = BierImpDelReply{} }
-func (*BierImpDelReply) GetMessageName() string { return "bier_imp_del_reply" }
-func (*BierImpDelReply) GetCrcString() string { return "e8d4e804" }
-func (*BierImpDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BierImpDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *BierImpDelReply) 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 *BierImpDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// BierImpDetails defines message 'bier_imp_details'.
-type BierImpDetails struct {
- BiTblID BierTableID `binapi:"bier_table_id,name=bi_tbl_id" json:"bi_tbl_id,omitempty"`
- BiSrc uint16 `binapi:"u16,name=bi_src" json:"bi_src,omitempty"`
- BiNBytes uint8 `binapi:"u8,name=bi_n_bytes" json:"-"`
- BiBytes []byte `binapi:"u8[bi_n_bytes],name=bi_bytes" json:"bi_bytes,omitempty"`
-}
-
-func (m *BierImpDetails) Reset() { *m = BierImpDetails{} }
-func (*BierImpDetails) GetMessageName() string { return "bier_imp_details" }
-func (*BierImpDetails) GetCrcString() string { return "b76192df" }
-func (*BierImpDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BierImpDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.BiTblID.BtSet
- size += 1 // m.BiTblID.BtSubDomain
- size += 1 // m.BiTblID.BtHdrLenID
- size += 2 // m.BiSrc
- size += 1 // m.BiNBytes
- size += 1 * len(m.BiBytes) // m.BiBytes
- return size
-}
-func (m *BierImpDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.BiTblID.BtSet)
- buf.EncodeUint8(m.BiTblID.BtSubDomain)
- buf.EncodeUint8(m.BiTblID.BtHdrLenID)
- buf.EncodeUint16(m.BiSrc)
- buf.EncodeUint8(uint8(len(m.BiBytes)))
- buf.EncodeBytes(m.BiBytes, 0)
- return buf.Bytes(), nil
-}
-func (m *BierImpDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.BiTblID.BtSet = buf.DecodeUint8()
- m.BiTblID.BtSubDomain = buf.DecodeUint8()
- m.BiTblID.BtHdrLenID = buf.DecodeUint8()
- m.BiSrc = buf.DecodeUint16()
- m.BiNBytes = buf.DecodeUint8()
- m.BiBytes = make([]byte, m.BiNBytes)
- copy(m.BiBytes, buf.DecodeBytes(len(m.BiBytes)))
- return nil
-}
-
-// BierImpDump defines message 'bier_imp_dump'.
-type BierImpDump struct{}
-
-func (m *BierImpDump) Reset() { *m = BierImpDump{} }
-func (*BierImpDump) GetMessageName() string { return "bier_imp_dump" }
-func (*BierImpDump) GetCrcString() string { return "51077d14" }
-func (*BierImpDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BierImpDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *BierImpDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *BierImpDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// BierRouteAddDel defines message 'bier_route_add_del'.
-type BierRouteAddDel struct {
- BrIsAdd bool `binapi:"bool,name=br_is_add" json:"br_is_add,omitempty"`
- BrIsReplace bool `binapi:"bool,name=br_is_replace" json:"br_is_replace,omitempty"`
- BrRoute BierRoute `binapi:"bier_route,name=br_route" json:"br_route,omitempty"`
-}
-
-func (m *BierRouteAddDel) Reset() { *m = BierRouteAddDel{} }
-func (*BierRouteAddDel) GetMessageName() string { return "bier_route_add_del" }
-func (*BierRouteAddDel) GetCrcString() string { return "f29edca0" }
-func (*BierRouteAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BierRouteAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.BrIsAdd
- size += 1 // m.BrIsReplace
- size += 4 // m.BrRoute.BrBp
- size += 1 // m.BrRoute.BrTblID.BtSet
- size += 1 // m.BrRoute.BrTblID.BtSubDomain
- size += 1 // m.BrRoute.BrTblID.BtHdrLenID
- size += 1 // m.BrRoute.BrNPaths
- for j2 := 0; j2 < len(m.BrRoute.BrPaths); j2++ {
- var s2 FibPath
- _ = s2
- if j2 < len(m.BrRoute.BrPaths) {
- s2 = m.BrRoute.BrPaths[j2]
- }
- size += 4 // s2.SwIfIndex
- size += 4 // s2.TableID
- size += 4 // s2.RpfID
- size += 1 // s2.Weight
- size += 1 // s2.Preference
- size += 4 // s2.Type
- size += 4 // s2.Flags
- size += 4 // s2.Proto
- size += 1 * 16 // s2.Nh.Address
- size += 4 // s2.Nh.ViaLabel
- size += 4 // s2.Nh.ObjID
- size += 4 // s2.Nh.ClassifyTableIndex
- size += 1 // s2.NLabels
- for j3 := 0; j3 < 16; j3++ {
- size += 1 // s2.LabelStack[j3].IsUniform
- size += 4 // s2.LabelStack[j3].Label
- size += 1 // s2.LabelStack[j3].TTL
- size += 1 // s2.LabelStack[j3].Exp
- }
- }
- return size
-}
-func (m *BierRouteAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.BrIsAdd)
- buf.EncodeBool(m.BrIsReplace)
- buf.EncodeUint32(m.BrRoute.BrBp)
- buf.EncodeUint8(m.BrRoute.BrTblID.BtSet)
- buf.EncodeUint8(m.BrRoute.BrTblID.BtSubDomain)
- buf.EncodeUint8(m.BrRoute.BrTblID.BtHdrLenID)
- buf.EncodeUint8(uint8(len(m.BrRoute.BrPaths)))
- for j1 := 0; j1 < len(m.BrRoute.BrPaths); j1++ {
- var v1 FibPath // BrPaths
- if j1 < len(m.BrRoute.BrPaths) {
- v1 = m.BrRoute.BrPaths[j1]
- }
- buf.EncodeUint32(v1.SwIfIndex)
- buf.EncodeUint32(v1.TableID)
- buf.EncodeUint32(v1.RpfID)
- buf.EncodeUint8(v1.Weight)
- buf.EncodeUint8(v1.Preference)
- buf.EncodeUint32(uint32(v1.Type))
- buf.EncodeUint32(uint32(v1.Flags))
- buf.EncodeUint32(uint32(v1.Proto))
- buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
- buf.EncodeUint32(v1.Nh.ViaLabel)
- buf.EncodeUint32(v1.Nh.ObjID)
- buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
- buf.EncodeUint8(v1.NLabels)
- for j2 := 0; j2 < 16; j2++ {
- buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
- buf.EncodeUint32(v1.LabelStack[j2].Label)
- buf.EncodeUint8(v1.LabelStack[j2].TTL)
- buf.EncodeUint8(v1.LabelStack[j2].Exp)
- }
- }
- return buf.Bytes(), nil
-}
-func (m *BierRouteAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.BrIsAdd = buf.DecodeBool()
- m.BrIsReplace = buf.DecodeBool()
- m.BrRoute.BrBp = buf.DecodeUint32()
- m.BrRoute.BrTblID.BtSet = buf.DecodeUint8()
- m.BrRoute.BrTblID.BtSubDomain = buf.DecodeUint8()
- m.BrRoute.BrTblID.BtHdrLenID = buf.DecodeUint8()
- m.BrRoute.BrNPaths = buf.DecodeUint8()
- m.BrRoute.BrPaths = make([]FibPath, m.BrRoute.BrNPaths)
- for j1 := 0; j1 < len(m.BrRoute.BrPaths); j1++ {
- m.BrRoute.BrPaths[j1].SwIfIndex = buf.DecodeUint32()
- m.BrRoute.BrPaths[j1].TableID = buf.DecodeUint32()
- m.BrRoute.BrPaths[j1].RpfID = buf.DecodeUint32()
- m.BrRoute.BrPaths[j1].Weight = buf.DecodeUint8()
- m.BrRoute.BrPaths[j1].Preference = buf.DecodeUint8()
- m.BrRoute.BrPaths[j1].Type = FibPathType(buf.DecodeUint32())
- m.BrRoute.BrPaths[j1].Flags = FibPathFlags(buf.DecodeUint32())
- m.BrRoute.BrPaths[j1].Proto = FibPathNhProto(buf.DecodeUint32())
- copy(m.BrRoute.BrPaths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
- m.BrRoute.BrPaths[j1].Nh.ViaLabel = buf.DecodeUint32()
- m.BrRoute.BrPaths[j1].Nh.ObjID = buf.DecodeUint32()
- m.BrRoute.BrPaths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
- m.BrRoute.BrPaths[j1].NLabels = buf.DecodeUint8()
- for j2 := 0; j2 < 16; j2++ {
- m.BrRoute.BrPaths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
- m.BrRoute.BrPaths[j1].LabelStack[j2].Label = buf.DecodeUint32()
- m.BrRoute.BrPaths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
- m.BrRoute.BrPaths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
- }
- }
- return nil
-}
-
-// BierRouteAddDelReply defines message 'bier_route_add_del_reply'.
-type BierRouteAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *BierRouteAddDelReply) Reset() { *m = BierRouteAddDelReply{} }
-func (*BierRouteAddDelReply) GetMessageName() string { return "bier_route_add_del_reply" }
-func (*BierRouteAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*BierRouteAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BierRouteAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *BierRouteAddDelReply) 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 *BierRouteAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// BierRouteDetails defines message 'bier_route_details'.
-type BierRouteDetails struct {
- BrRoute BierRoute `binapi:"bier_route,name=br_route" json:"br_route,omitempty"`
-}
-
-func (m *BierRouteDetails) Reset() { *m = BierRouteDetails{} }
-func (*BierRouteDetails) GetMessageName() string { return "bier_route_details" }
-func (*BierRouteDetails) GetCrcString() string { return "39ee6a56" }
-func (*BierRouteDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BierRouteDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.BrRoute.BrBp
- size += 1 // m.BrRoute.BrTblID.BtSet
- size += 1 // m.BrRoute.BrTblID.BtSubDomain
- size += 1 // m.BrRoute.BrTblID.BtHdrLenID
- size += 1 // m.BrRoute.BrNPaths
- for j2 := 0; j2 < len(m.BrRoute.BrPaths); j2++ {
- var s2 FibPath
- _ = s2
- if j2 < len(m.BrRoute.BrPaths) {
- s2 = m.BrRoute.BrPaths[j2]
- }
- size += 4 // s2.SwIfIndex
- size += 4 // s2.TableID
- size += 4 // s2.RpfID
- size += 1 // s2.Weight
- size += 1 // s2.Preference
- size += 4 // s2.Type
- size += 4 // s2.Flags
- size += 4 // s2.Proto
- size += 1 * 16 // s2.Nh.Address
- size += 4 // s2.Nh.ViaLabel
- size += 4 // s2.Nh.ObjID
- size += 4 // s2.Nh.ClassifyTableIndex
- size += 1 // s2.NLabels
- for j3 := 0; j3 < 16; j3++ {
- size += 1 // s2.LabelStack[j3].IsUniform
- size += 4 // s2.LabelStack[j3].Label
- size += 1 // s2.LabelStack[j3].TTL
- size += 1 // s2.LabelStack[j3].Exp
- }
- }
- return size
-}
-func (m *BierRouteDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.BrRoute.BrBp)
- buf.EncodeUint8(m.BrRoute.BrTblID.BtSet)
- buf.EncodeUint8(m.BrRoute.BrTblID.BtSubDomain)
- buf.EncodeUint8(m.BrRoute.BrTblID.BtHdrLenID)
- buf.EncodeUint8(uint8(len(m.BrRoute.BrPaths)))
- for j1 := 0; j1 < len(m.BrRoute.BrPaths); j1++ {
- var v1 FibPath // BrPaths
- if j1 < len(m.BrRoute.BrPaths) {
- v1 = m.BrRoute.BrPaths[j1]
- }
- buf.EncodeUint32(v1.SwIfIndex)
- buf.EncodeUint32(v1.TableID)
- buf.EncodeUint32(v1.RpfID)
- buf.EncodeUint8(v1.Weight)
- buf.EncodeUint8(v1.Preference)
- buf.EncodeUint32(uint32(v1.Type))
- buf.EncodeUint32(uint32(v1.Flags))
- buf.EncodeUint32(uint32(v1.Proto))
- buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
- buf.EncodeUint32(v1.Nh.ViaLabel)
- buf.EncodeUint32(v1.Nh.ObjID)
- buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
- buf.EncodeUint8(v1.NLabels)
- for j2 := 0; j2 < 16; j2++ {
- buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
- buf.EncodeUint32(v1.LabelStack[j2].Label)
- buf.EncodeUint8(v1.LabelStack[j2].TTL)
- buf.EncodeUint8(v1.LabelStack[j2].Exp)
- }
- }
- return buf.Bytes(), nil
-}
-func (m *BierRouteDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.BrRoute.BrBp = buf.DecodeUint32()
- m.BrRoute.BrTblID.BtSet = buf.DecodeUint8()
- m.BrRoute.BrTblID.BtSubDomain = buf.DecodeUint8()
- m.BrRoute.BrTblID.BtHdrLenID = buf.DecodeUint8()
- m.BrRoute.BrNPaths = buf.DecodeUint8()
- m.BrRoute.BrPaths = make([]FibPath, m.BrRoute.BrNPaths)
- for j1 := 0; j1 < len(m.BrRoute.BrPaths); j1++ {
- m.BrRoute.BrPaths[j1].SwIfIndex = buf.DecodeUint32()
- m.BrRoute.BrPaths[j1].TableID = buf.DecodeUint32()
- m.BrRoute.BrPaths[j1].RpfID = buf.DecodeUint32()
- m.BrRoute.BrPaths[j1].Weight = buf.DecodeUint8()
- m.BrRoute.BrPaths[j1].Preference = buf.DecodeUint8()
- m.BrRoute.BrPaths[j1].Type = FibPathType(buf.DecodeUint32())
- m.BrRoute.BrPaths[j1].Flags = FibPathFlags(buf.DecodeUint32())
- m.BrRoute.BrPaths[j1].Proto = FibPathNhProto(buf.DecodeUint32())
- copy(m.BrRoute.BrPaths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
- m.BrRoute.BrPaths[j1].Nh.ViaLabel = buf.DecodeUint32()
- m.BrRoute.BrPaths[j1].Nh.ObjID = buf.DecodeUint32()
- m.BrRoute.BrPaths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
- m.BrRoute.BrPaths[j1].NLabels = buf.DecodeUint8()
- for j2 := 0; j2 < 16; j2++ {
- m.BrRoute.BrPaths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
- m.BrRoute.BrPaths[j1].LabelStack[j2].Label = buf.DecodeUint32()
- m.BrRoute.BrPaths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
- m.BrRoute.BrPaths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
- }
- }
- return nil
-}
-
-// BierRouteDump defines message 'bier_route_dump'.
-type BierRouteDump struct {
- BrTblID BierTableID `binapi:"bier_table_id,name=br_tbl_id" json:"br_tbl_id,omitempty"`
-}
-
-func (m *BierRouteDump) Reset() { *m = BierRouteDump{} }
-func (*BierRouteDump) GetMessageName() string { return "bier_route_dump" }
-func (*BierRouteDump) GetCrcString() string { return "38339846" }
-func (*BierRouteDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BierRouteDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.BrTblID.BtSet
- size += 1 // m.BrTblID.BtSubDomain
- size += 1 // m.BrTblID.BtHdrLenID
- return size
-}
-func (m *BierRouteDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.BrTblID.BtSet)
- buf.EncodeUint8(m.BrTblID.BtSubDomain)
- buf.EncodeUint8(m.BrTblID.BtHdrLenID)
- return buf.Bytes(), nil
-}
-func (m *BierRouteDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.BrTblID.BtSet = buf.DecodeUint8()
- m.BrTblID.BtSubDomain = buf.DecodeUint8()
- m.BrTblID.BtHdrLenID = buf.DecodeUint8()
- return nil
-}
-
-// BierTableAddDel defines message 'bier_table_add_del'.
-type BierTableAddDel struct {
- BtTblID BierTableID `binapi:"bier_table_id,name=bt_tbl_id" json:"bt_tbl_id,omitempty"`
- BtLabel uint32 `binapi:"u32,name=bt_label" json:"bt_label,omitempty"`
- BtIsAdd bool `binapi:"bool,name=bt_is_add" json:"bt_is_add,omitempty"`
-}
-
-func (m *BierTableAddDel) Reset() { *m = BierTableAddDel{} }
-func (*BierTableAddDel) GetMessageName() string { return "bier_table_add_del" }
-func (*BierTableAddDel) GetCrcString() string { return "35e59209" }
-func (*BierTableAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BierTableAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.BtTblID.BtSet
- size += 1 // m.BtTblID.BtSubDomain
- size += 1 // m.BtTblID.BtHdrLenID
- size += 4 // m.BtLabel
- size += 1 // m.BtIsAdd
- return size
-}
-func (m *BierTableAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.BtTblID.BtSet)
- buf.EncodeUint8(m.BtTblID.BtSubDomain)
- buf.EncodeUint8(m.BtTblID.BtHdrLenID)
- buf.EncodeUint32(m.BtLabel)
- buf.EncodeBool(m.BtIsAdd)
- return buf.Bytes(), nil
-}
-func (m *BierTableAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.BtTblID.BtSet = buf.DecodeUint8()
- m.BtTblID.BtSubDomain = buf.DecodeUint8()
- m.BtTblID.BtHdrLenID = buf.DecodeUint8()
- m.BtLabel = buf.DecodeUint32()
- m.BtIsAdd = buf.DecodeBool()
- return nil
-}
-
-// BierTableAddDelReply defines message 'bier_table_add_del_reply'.
-type BierTableAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *BierTableAddDelReply) Reset() { *m = BierTableAddDelReply{} }
-func (*BierTableAddDelReply) GetMessageName() string { return "bier_table_add_del_reply" }
-func (*BierTableAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*BierTableAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BierTableAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *BierTableAddDelReply) 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 *BierTableAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// BierTableDetails defines message 'bier_table_details'.
-type BierTableDetails struct {
- BtLabel uint32 `binapi:"u32,name=bt_label" json:"bt_label,omitempty"`
- BtTblID BierTableID `binapi:"bier_table_id,name=bt_tbl_id" json:"bt_tbl_id,omitempty"`
-}
-
-func (m *BierTableDetails) Reset() { *m = BierTableDetails{} }
-func (*BierTableDetails) GetMessageName() string { return "bier_table_details" }
-func (*BierTableDetails) GetCrcString() string { return "fc44a9dd" }
-func (*BierTableDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BierTableDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.BtLabel
- size += 1 // m.BtTblID.BtSet
- size += 1 // m.BtTblID.BtSubDomain
- size += 1 // m.BtTblID.BtHdrLenID
- return size
-}
-func (m *BierTableDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.BtLabel)
- buf.EncodeUint8(m.BtTblID.BtSet)
- buf.EncodeUint8(m.BtTblID.BtSubDomain)
- buf.EncodeUint8(m.BtTblID.BtHdrLenID)
- return buf.Bytes(), nil
-}
-func (m *BierTableDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.BtLabel = buf.DecodeUint32()
- m.BtTblID.BtSet = buf.DecodeUint8()
- m.BtTblID.BtSubDomain = buf.DecodeUint8()
- m.BtTblID.BtHdrLenID = buf.DecodeUint8()
- return nil
-}
-
-// BierTableDump defines message 'bier_table_dump'.
-type BierTableDump struct{}
-
-func (m *BierTableDump) Reset() { *m = BierTableDump{} }
-func (*BierTableDump) GetMessageName() string { return "bier_table_dump" }
-func (*BierTableDump) GetCrcString() string { return "51077d14" }
-func (*BierTableDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BierTableDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *BierTableDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *BierTableDump) Unmarshal(b []byte) error {
- return nil
-}
-
-func init() { file_bier_binapi_init() }
-func file_bier_binapi_init() {
- api.RegisterMessage((*BierDispEntryAddDel)(nil), "bier_disp_entry_add_del_648323eb")
- api.RegisterMessage((*BierDispEntryAddDelReply)(nil), "bier_disp_entry_add_del_reply_e8d4e804")
- api.RegisterMessage((*BierDispEntryDetails)(nil), "bier_disp_entry_details_e5b039a9")
- api.RegisterMessage((*BierDispEntryDump)(nil), "bier_disp_entry_dump_b5fa54ad")
- api.RegisterMessage((*BierDispTableAddDel)(nil), "bier_disp_table_add_del_889657ac")
- api.RegisterMessage((*BierDispTableAddDelReply)(nil), "bier_disp_table_add_del_reply_e8d4e804")
- api.RegisterMessage((*BierDispTableDetails)(nil), "bier_disp_table_details_d27942c0")
- api.RegisterMessage((*BierDispTableDump)(nil), "bier_disp_table_dump_51077d14")
- api.RegisterMessage((*BierImpAdd)(nil), "bier_imp_add_3856dc3d")
- api.RegisterMessage((*BierImpAddReply)(nil), "bier_imp_add_reply_d49c5793")
- api.RegisterMessage((*BierImpDel)(nil), "bier_imp_del_7d45edf6")
- api.RegisterMessage((*BierImpDelReply)(nil), "bier_imp_del_reply_e8d4e804")
- api.RegisterMessage((*BierImpDetails)(nil), "bier_imp_details_b76192df")
- api.RegisterMessage((*BierImpDump)(nil), "bier_imp_dump_51077d14")
- api.RegisterMessage((*BierRouteAddDel)(nil), "bier_route_add_del_f29edca0")
- api.RegisterMessage((*BierRouteAddDelReply)(nil), "bier_route_add_del_reply_e8d4e804")
- api.RegisterMessage((*BierRouteDetails)(nil), "bier_route_details_39ee6a56")
- api.RegisterMessage((*BierRouteDump)(nil), "bier_route_dump_38339846")
- api.RegisterMessage((*BierTableAddDel)(nil), "bier_table_add_del_35e59209")
- api.RegisterMessage((*BierTableAddDelReply)(nil), "bier_table_add_del_reply_e8d4e804")
- api.RegisterMessage((*BierTableDetails)(nil), "bier_table_details_fc44a9dd")
- api.RegisterMessage((*BierTableDump)(nil), "bier_table_dump_51077d14")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*BierDispEntryAddDel)(nil),
- (*BierDispEntryAddDelReply)(nil),
- (*BierDispEntryDetails)(nil),
- (*BierDispEntryDump)(nil),
- (*BierDispTableAddDel)(nil),
- (*BierDispTableAddDelReply)(nil),
- (*BierDispTableDetails)(nil),
- (*BierDispTableDump)(nil),
- (*BierImpAdd)(nil),
- (*BierImpAddReply)(nil),
- (*BierImpDel)(nil),
- (*BierImpDelReply)(nil),
- (*BierImpDetails)(nil),
- (*BierImpDump)(nil),
- (*BierRouteAddDel)(nil),
- (*BierRouteAddDelReply)(nil),
- (*BierRouteDetails)(nil),
- (*BierRouteDump)(nil),
- (*BierTableAddDel)(nil),
- (*BierTableAddDelReply)(nil),
- (*BierTableDetails)(nil),
- (*BierTableDump)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/bier/bier_rpc.ba.go b/internal/testbinapi/binapi2001/bier/bier_rpc.ba.go
deleted file mode 100644
index a16cb9b..0000000
--- a/internal/testbinapi/binapi2001/bier/bier_rpc.ba.go
+++ /dev/null
@@ -1,304 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package bier
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service bier.
-type RPCService interface {
- BierDispEntryAddDel(ctx context.Context, in *BierDispEntryAddDel) (*BierDispEntryAddDelReply, error)
- BierDispEntryDump(ctx context.Context, in *BierDispEntryDump) (RPCService_BierDispEntryDumpClient, error)
- BierDispTableAddDel(ctx context.Context, in *BierDispTableAddDel) (*BierDispTableAddDelReply, error)
- BierDispTableDump(ctx context.Context, in *BierDispTableDump) (RPCService_BierDispTableDumpClient, error)
- BierImpAdd(ctx context.Context, in *BierImpAdd) (*BierImpAddReply, error)
- BierImpDel(ctx context.Context, in *BierImpDel) (*BierImpDelReply, error)
- BierImpDump(ctx context.Context, in *BierImpDump) (RPCService_BierImpDumpClient, error)
- BierRouteAddDel(ctx context.Context, in *BierRouteAddDel) (*BierRouteAddDelReply, error)
- BierRouteDump(ctx context.Context, in *BierRouteDump) (RPCService_BierRouteDumpClient, error)
- BierTableAddDel(ctx context.Context, in *BierTableAddDel) (*BierTableAddDelReply, error)
- BierTableDump(ctx context.Context, in *BierTableDump) (RPCService_BierTableDumpClient, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) BierDispEntryAddDel(ctx context.Context, in *BierDispEntryAddDel) (*BierDispEntryAddDelReply, error) {
- out := new(BierDispEntryAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) BierDispEntryDump(ctx context.Context, in *BierDispEntryDump) (RPCService_BierDispEntryDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_BierDispEntryDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_BierDispEntryDumpClient interface {
- Recv() (*BierDispEntryDetails, error)
- api.Stream
-}
-
-type serviceClient_BierDispEntryDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_BierDispEntryDumpClient) Recv() (*BierDispEntryDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *BierDispEntryDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) BierDispTableAddDel(ctx context.Context, in *BierDispTableAddDel) (*BierDispTableAddDelReply, error) {
- out := new(BierDispTableAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) BierDispTableDump(ctx context.Context, in *BierDispTableDump) (RPCService_BierDispTableDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_BierDispTableDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_BierDispTableDumpClient interface {
- Recv() (*BierDispTableDetails, error)
- api.Stream
-}
-
-type serviceClient_BierDispTableDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_BierDispTableDumpClient) Recv() (*BierDispTableDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *BierDispTableDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) BierImpAdd(ctx context.Context, in *BierImpAdd) (*BierImpAddReply, error) {
- out := new(BierImpAddReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) BierImpDel(ctx context.Context, in *BierImpDel) (*BierImpDelReply, error) {
- out := new(BierImpDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) BierImpDump(ctx context.Context, in *BierImpDump) (RPCService_BierImpDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_BierImpDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_BierImpDumpClient interface {
- Recv() (*BierImpDetails, error)
- api.Stream
-}
-
-type serviceClient_BierImpDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_BierImpDumpClient) Recv() (*BierImpDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *BierImpDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) BierRouteAddDel(ctx context.Context, in *BierRouteAddDel) (*BierRouteAddDelReply, error) {
- out := new(BierRouteAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) BierRouteDump(ctx context.Context, in *BierRouteDump) (RPCService_BierRouteDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_BierRouteDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_BierRouteDumpClient interface {
- Recv() (*BierRouteDetails, error)
- api.Stream
-}
-
-type serviceClient_BierRouteDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_BierRouteDumpClient) Recv() (*BierRouteDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *BierRouteDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) BierTableAddDel(ctx context.Context, in *BierTableAddDel) (*BierTableAddDelReply, error) {
- out := new(BierTableAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) BierTableDump(ctx context.Context, in *BierTableDump) (RPCService_BierTableDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_BierTableDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_BierTableDumpClient interface {
- Recv() (*BierTableDetails, error)
- api.Stream
-}
-
-type serviceClient_BierTableDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_BierTableDumpClient) Recv() (*BierTableDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *BierTableDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
diff --git a/internal/testbinapi/binapi2001/bond/bond.ba.go b/internal/testbinapi/binapi2001/bond/bond.ba.go
deleted file mode 100644
index 38e81cb..0000000
--- a/internal/testbinapi/binapi2001/bond/bond.ba.go
+++ /dev/null
@@ -1,981 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/bond.api.json
-
-// Package bond contains generated bindings for API file bond.api.
-//
-// Contents:
-// 2 aliases
-// 8 enums
-// 14 messages
-//
-package bond
-
-import (
- "net"
- "strconv"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "bond"
- APIVersion = "2.0.0"
- VersionCrc = 0x69f583ad
-)
-
-// BondLbAlgo defines enum 'bond_lb_algo'.
-type BondLbAlgo uint32
-
-const (
- BOND_API_LB_ALGO_L2 BondLbAlgo = 0
- BOND_API_LB_ALGO_L34 BondLbAlgo = 1
- BOND_API_LB_ALGO_L23 BondLbAlgo = 2
- BOND_API_LB_ALGO_RR BondLbAlgo = 3
- BOND_API_LB_ALGO_BC BondLbAlgo = 4
- BOND_API_LB_ALGO_AB BondLbAlgo = 5
-)
-
-var (
- BondLbAlgo_name = map[uint32]string{
- 0: "BOND_API_LB_ALGO_L2",
- 1: "BOND_API_LB_ALGO_L34",
- 2: "BOND_API_LB_ALGO_L23",
- 3: "BOND_API_LB_ALGO_RR",
- 4: "BOND_API_LB_ALGO_BC",
- 5: "BOND_API_LB_ALGO_AB",
- }
- BondLbAlgo_value = map[string]uint32{
- "BOND_API_LB_ALGO_L2": 0,
- "BOND_API_LB_ALGO_L34": 1,
- "BOND_API_LB_ALGO_L23": 2,
- "BOND_API_LB_ALGO_RR": 3,
- "BOND_API_LB_ALGO_BC": 4,
- "BOND_API_LB_ALGO_AB": 5,
- }
-)
-
-func (x BondLbAlgo) String() string {
- s, ok := BondLbAlgo_name[uint32(x)]
- if ok {
- return s
- }
- return "BondLbAlgo(" + strconv.Itoa(int(x)) + ")"
-}
-
-// BondMode defines enum 'bond_mode'.
-type BondMode uint32
-
-const (
- BOND_API_MODE_ROUND_ROBIN BondMode = 1
- BOND_API_MODE_ACTIVE_BACKUP BondMode = 2
- BOND_API_MODE_XOR BondMode = 3
- BOND_API_MODE_BROADCAST BondMode = 4
- BOND_API_MODE_LACP BondMode = 5
-)
-
-var (
- BondMode_name = map[uint32]string{
- 1: "BOND_API_MODE_ROUND_ROBIN",
- 2: "BOND_API_MODE_ACTIVE_BACKUP",
- 3: "BOND_API_MODE_XOR",
- 4: "BOND_API_MODE_BROADCAST",
- 5: "BOND_API_MODE_LACP",
- }
- BondMode_value = map[string]uint32{
- "BOND_API_MODE_ROUND_ROBIN": 1,
- "BOND_API_MODE_ACTIVE_BACKUP": 2,
- "BOND_API_MODE_XOR": 3,
- "BOND_API_MODE_BROADCAST": 4,
- "BOND_API_MODE_LACP": 5,
- }
-)
-
-func (x BondMode) String() string {
- s, ok := BondMode_name[uint32(x)]
- if ok {
- return s
- }
- return "BondMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// MacAddress defines alias 'mac_address'.
-type MacAddress [6]uint8
-
-func ParseMacAddress(s string) (MacAddress, error) {
- var macaddr MacAddress
- mac, err := net.ParseMAC(s)
- if err != nil {
- return macaddr, err
- }
- copy(macaddr[:], mac[:])
- return macaddr, nil
-}
-
-func (x MacAddress) ToMAC() net.HardwareAddr {
- return net.HardwareAddr(x[:])
-}
-
-func (x MacAddress) String() string {
- return x.ToMAC().String()
-}
-
-func (x *MacAddress) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *MacAddress) UnmarshalText(text []byte) error {
- mac, err := ParseMacAddress(string(text))
- if err != nil {
- return err
- }
- *x = mac
- return nil
-}
-
-// BondCreate defines message 'bond_create'.
-type BondCreate struct {
- ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
- UseCustomMac bool `binapi:"bool,name=use_custom_mac" json:"use_custom_mac,omitempty"`
- MacAddress MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
- Mode BondMode `binapi:"bond_mode,name=mode" json:"mode,omitempty"`
- Lb BondLbAlgo `binapi:"bond_lb_algo,name=lb" json:"lb,omitempty"`
- NumaOnly bool `binapi:"bool,name=numa_only" json:"numa_only,omitempty"`
-}
-
-func (m *BondCreate) Reset() { *m = BondCreate{} }
-func (*BondCreate) GetMessageName() string { return "bond_create" }
-func (*BondCreate) GetCrcString() string { return "48883c7e" }
-func (*BondCreate) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BondCreate) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.ID
- size += 1 // m.UseCustomMac
- size += 1 * 6 // m.MacAddress
- size += 4 // m.Mode
- size += 4 // m.Lb
- size += 1 // m.NumaOnly
- return size
-}
-func (m *BondCreate) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.ID)
- buf.EncodeBool(m.UseCustomMac)
- buf.EncodeBytes(m.MacAddress[:], 6)
- buf.EncodeUint32(uint32(m.Mode))
- buf.EncodeUint32(uint32(m.Lb))
- buf.EncodeBool(m.NumaOnly)
- return buf.Bytes(), nil
-}
-func (m *BondCreate) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.ID = buf.DecodeUint32()
- m.UseCustomMac = buf.DecodeBool()
- copy(m.MacAddress[:], buf.DecodeBytes(6))
- m.Mode = BondMode(buf.DecodeUint32())
- m.Lb = BondLbAlgo(buf.DecodeUint32())
- m.NumaOnly = buf.DecodeBool()
- return nil
-}
-
-// BondCreateReply defines message 'bond_create_reply'.
-type BondCreateReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *BondCreateReply) Reset() { *m = BondCreateReply{} }
-func (*BondCreateReply) GetMessageName() string { return "bond_create_reply" }
-func (*BondCreateReply) GetCrcString() string { return "5383d31f" }
-func (*BondCreateReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BondCreateReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *BondCreateReply) 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 *BondCreateReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// BondDelete defines message 'bond_delete'.
-type BondDelete struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *BondDelete) Reset() { *m = BondDelete{} }
-func (*BondDelete) GetMessageName() string { return "bond_delete" }
-func (*BondDelete) GetCrcString() string { return "f9e6675e" }
-func (*BondDelete) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BondDelete) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *BondDelete) 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 *BondDelete) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// BondDeleteReply defines message 'bond_delete_reply'.
-type BondDeleteReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *BondDeleteReply) Reset() { *m = BondDeleteReply{} }
-func (*BondDeleteReply) GetMessageName() string { return "bond_delete_reply" }
-func (*BondDeleteReply) GetCrcString() string { return "e8d4e804" }
-func (*BondDeleteReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BondDeleteReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *BondDeleteReply) 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 *BondDeleteReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// BondDetachSlave defines message 'bond_detach_slave'.
-type BondDetachSlave struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *BondDetachSlave) Reset() { *m = BondDetachSlave{} }
-func (*BondDetachSlave) GetMessageName() string { return "bond_detach_slave" }
-func (*BondDetachSlave) GetCrcString() string { return "f9e6675e" }
-func (*BondDetachSlave) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BondDetachSlave) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *BondDetachSlave) 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 *BondDetachSlave) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// BondDetachSlaveReply defines message 'bond_detach_slave_reply'.
-type BondDetachSlaveReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *BondDetachSlaveReply) Reset() { *m = BondDetachSlaveReply{} }
-func (*BondDetachSlaveReply) GetMessageName() string { return "bond_detach_slave_reply" }
-func (*BondDetachSlaveReply) GetCrcString() string { return "e8d4e804" }
-func (*BondDetachSlaveReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BondDetachSlaveReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *BondDetachSlaveReply) 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 *BondDetachSlaveReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// BondEnslave defines message 'bond_enslave'.
-type BondEnslave struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- BondSwIfIndex InterfaceIndex `binapi:"interface_index,name=bond_sw_if_index" json:"bond_sw_if_index,omitempty"`
- IsPassive bool `binapi:"bool,name=is_passive" json:"is_passive,omitempty"`
- IsLongTimeout bool `binapi:"bool,name=is_long_timeout" json:"is_long_timeout,omitempty"`
-}
-
-func (m *BondEnslave) Reset() { *m = BondEnslave{} }
-func (*BondEnslave) GetMessageName() string { return "bond_enslave" }
-func (*BondEnslave) GetCrcString() string { return "076ecfa7" }
-func (*BondEnslave) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BondEnslave) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.BondSwIfIndex
- size += 1 // m.IsPassive
- size += 1 // m.IsLongTimeout
- return size
-}
-func (m *BondEnslave) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(uint32(m.BondSwIfIndex))
- buf.EncodeBool(m.IsPassive)
- buf.EncodeBool(m.IsLongTimeout)
- return buf.Bytes(), nil
-}
-func (m *BondEnslave) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.BondSwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.IsPassive = buf.DecodeBool()
- m.IsLongTimeout = buf.DecodeBool()
- return nil
-}
-
-// BondEnslaveReply defines message 'bond_enslave_reply'.
-type BondEnslaveReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *BondEnslaveReply) Reset() { *m = BondEnslaveReply{} }
-func (*BondEnslaveReply) GetMessageName() string { return "bond_enslave_reply" }
-func (*BondEnslaveReply) GetCrcString() string { return "e8d4e804" }
-func (*BondEnslaveReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BondEnslaveReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *BondEnslaveReply) 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 *BondEnslaveReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SwInterfaceBondDetails defines message 'sw_interface_bond_details'.
-type SwInterfaceBondDetails struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
- Mode BondMode `binapi:"bond_mode,name=mode" json:"mode,omitempty"`
- Lb BondLbAlgo `binapi:"bond_lb_algo,name=lb" json:"lb,omitempty"`
- NumaOnly bool `binapi:"bool,name=numa_only" json:"numa_only,omitempty"`
- ActiveSlaves uint32 `binapi:"u32,name=active_slaves" json:"active_slaves,omitempty"`
- Slaves uint32 `binapi:"u32,name=slaves" json:"slaves,omitempty"`
- InterfaceName string `binapi:"string[64],name=interface_name" json:"interface_name,omitempty"`
-}
-
-func (m *SwInterfaceBondDetails) Reset() { *m = SwInterfaceBondDetails{} }
-func (*SwInterfaceBondDetails) GetMessageName() string { return "sw_interface_bond_details" }
-func (*SwInterfaceBondDetails) GetCrcString() string { return "f5ef2106" }
-func (*SwInterfaceBondDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SwInterfaceBondDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.ID
- size += 4 // m.Mode
- size += 4 // m.Lb
- size += 1 // m.NumaOnly
- size += 4 // m.ActiveSlaves
- size += 4 // m.Slaves
- size += 64 // m.InterfaceName
- return size
-}
-func (m *SwInterfaceBondDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(m.ID)
- buf.EncodeUint32(uint32(m.Mode))
- buf.EncodeUint32(uint32(m.Lb))
- buf.EncodeBool(m.NumaOnly)
- buf.EncodeUint32(m.ActiveSlaves)
- buf.EncodeUint32(m.Slaves)
- buf.EncodeString(m.InterfaceName, 64)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceBondDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.ID = buf.DecodeUint32()
- m.Mode = BondMode(buf.DecodeUint32())
- m.Lb = BondLbAlgo(buf.DecodeUint32())
- m.NumaOnly = buf.DecodeBool()
- m.ActiveSlaves = buf.DecodeUint32()
- m.Slaves = buf.DecodeUint32()
- m.InterfaceName = buf.DecodeString(64)
- return nil
-}
-
-// SwInterfaceBondDump defines message 'sw_interface_bond_dump'.
-type SwInterfaceBondDump struct{}
-
-func (m *SwInterfaceBondDump) Reset() { *m = SwInterfaceBondDump{} }
-func (*SwInterfaceBondDump) GetMessageName() string { return "sw_interface_bond_dump" }
-func (*SwInterfaceBondDump) GetCrcString() string { return "51077d14" }
-func (*SwInterfaceBondDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceBondDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *SwInterfaceBondDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceBondDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// SwInterfaceSetBondWeight defines message 'sw_interface_set_bond_weight'.
-type SwInterfaceSetBondWeight struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Weight uint32 `binapi:"u32,name=weight" json:"weight,omitempty"`
-}
-
-func (m *SwInterfaceSetBondWeight) Reset() { *m = SwInterfaceSetBondWeight{} }
-func (*SwInterfaceSetBondWeight) GetMessageName() string { return "sw_interface_set_bond_weight" }
-func (*SwInterfaceSetBondWeight) GetCrcString() string { return "deb510a0" }
-func (*SwInterfaceSetBondWeight) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceSetBondWeight) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.Weight
- return size
-}
-func (m *SwInterfaceSetBondWeight) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(m.Weight)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceSetBondWeight) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Weight = buf.DecodeUint32()
- return nil
-}
-
-// SwInterfaceSetBondWeightReply defines message 'sw_interface_set_bond_weight_reply'.
-type SwInterfaceSetBondWeightReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SwInterfaceSetBondWeightReply) Reset() { *m = SwInterfaceSetBondWeightReply{} }
-func (*SwInterfaceSetBondWeightReply) GetMessageName() string {
- return "sw_interface_set_bond_weight_reply"
-}
-func (*SwInterfaceSetBondWeightReply) GetCrcString() string { return "e8d4e804" }
-func (*SwInterfaceSetBondWeightReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SwInterfaceSetBondWeightReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SwInterfaceSetBondWeightReply) 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 *SwInterfaceSetBondWeightReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SwInterfaceSlaveDetails defines message 'sw_interface_slave_details'.
-type SwInterfaceSlaveDetails struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- InterfaceName string `binapi:"string[64],name=interface_name" json:"interface_name,omitempty"`
- IsPassive bool `binapi:"bool,name=is_passive" json:"is_passive,omitempty"`
- IsLongTimeout bool `binapi:"bool,name=is_long_timeout" json:"is_long_timeout,omitempty"`
- IsLocalNuma bool `binapi:"bool,name=is_local_numa" json:"is_local_numa,omitempty"`
- Weight uint32 `binapi:"u32,name=weight" json:"weight,omitempty"`
-}
-
-func (m *SwInterfaceSlaveDetails) Reset() { *m = SwInterfaceSlaveDetails{} }
-func (*SwInterfaceSlaveDetails) GetMessageName() string { return "sw_interface_slave_details" }
-func (*SwInterfaceSlaveDetails) GetCrcString() string { return "3c4a0e23" }
-func (*SwInterfaceSlaveDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SwInterfaceSlaveDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 64 // m.InterfaceName
- size += 1 // m.IsPassive
- size += 1 // m.IsLongTimeout
- size += 1 // m.IsLocalNuma
- size += 4 // m.Weight
- return size
-}
-func (m *SwInterfaceSlaveDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeString(m.InterfaceName, 64)
- buf.EncodeBool(m.IsPassive)
- buf.EncodeBool(m.IsLongTimeout)
- buf.EncodeBool(m.IsLocalNuma)
- buf.EncodeUint32(m.Weight)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceSlaveDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.InterfaceName = buf.DecodeString(64)
- m.IsPassive = buf.DecodeBool()
- m.IsLongTimeout = buf.DecodeBool()
- m.IsLocalNuma = buf.DecodeBool()
- m.Weight = buf.DecodeUint32()
- return nil
-}
-
-// SwInterfaceSlaveDump defines message 'sw_interface_slave_dump'.
-type SwInterfaceSlaveDump struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *SwInterfaceSlaveDump) Reset() { *m = SwInterfaceSlaveDump{} }
-func (*SwInterfaceSlaveDump) GetMessageName() string { return "sw_interface_slave_dump" }
-func (*SwInterfaceSlaveDump) GetCrcString() string { return "f9e6675e" }
-func (*SwInterfaceSlaveDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceSlaveDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *SwInterfaceSlaveDump) 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 *SwInterfaceSlaveDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-func init() { file_bond_binapi_init() }
-func file_bond_binapi_init() {
- api.RegisterMessage((*BondCreate)(nil), "bond_create_48883c7e")
- api.RegisterMessage((*BondCreateReply)(nil), "bond_create_reply_5383d31f")
- api.RegisterMessage((*BondDelete)(nil), "bond_delete_f9e6675e")
- api.RegisterMessage((*BondDeleteReply)(nil), "bond_delete_reply_e8d4e804")
- api.RegisterMessage((*BondDetachSlave)(nil), "bond_detach_slave_f9e6675e")
- api.RegisterMessage((*BondDetachSlaveReply)(nil), "bond_detach_slave_reply_e8d4e804")
- api.RegisterMessage((*BondEnslave)(nil), "bond_enslave_076ecfa7")
- api.RegisterMessage((*BondEnslaveReply)(nil), "bond_enslave_reply_e8d4e804")
- api.RegisterMessage((*SwInterfaceBondDetails)(nil), "sw_interface_bond_details_f5ef2106")
- api.RegisterMessage((*SwInterfaceBondDump)(nil), "sw_interface_bond_dump_51077d14")
- api.RegisterMessage((*SwInterfaceSetBondWeight)(nil), "sw_interface_set_bond_weight_deb510a0")
- api.RegisterMessage((*SwInterfaceSetBondWeightReply)(nil), "sw_interface_set_bond_weight_reply_e8d4e804")
- api.RegisterMessage((*SwInterfaceSlaveDetails)(nil), "sw_interface_slave_details_3c4a0e23")
- api.RegisterMessage((*SwInterfaceSlaveDump)(nil), "sw_interface_slave_dump_f9e6675e")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*BondCreate)(nil),
- (*BondCreateReply)(nil),
- (*BondDelete)(nil),
- (*BondDeleteReply)(nil),
- (*BondDetachSlave)(nil),
- (*BondDetachSlaveReply)(nil),
- (*BondEnslave)(nil),
- (*BondEnslaveReply)(nil),
- (*SwInterfaceBondDetails)(nil),
- (*SwInterfaceBondDump)(nil),
- (*SwInterfaceSetBondWeight)(nil),
- (*SwInterfaceSetBondWeightReply)(nil),
- (*SwInterfaceSlaveDetails)(nil),
- (*SwInterfaceSlaveDump)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/bond/bond_rpc.ba.go b/internal/testbinapi/binapi2001/bond/bond_rpc.ba.go
deleted file mode 100644
index d9625d9..0000000
--- a/internal/testbinapi/binapi2001/bond/bond_rpc.ba.go
+++ /dev/null
@@ -1,162 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package bond
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service bond.
-type RPCService interface {
- BondCreate(ctx context.Context, in *BondCreate) (*BondCreateReply, error)
- BondDelete(ctx context.Context, in *BondDelete) (*BondDeleteReply, error)
- BondDetachSlave(ctx context.Context, in *BondDetachSlave) (*BondDetachSlaveReply, error)
- BondEnslave(ctx context.Context, in *BondEnslave) (*BondEnslaveReply, error)
- SwInterfaceBondDump(ctx context.Context, in *SwInterfaceBondDump) (RPCService_SwInterfaceBondDumpClient, error)
- SwInterfaceSetBondWeight(ctx context.Context, in *SwInterfaceSetBondWeight) (*SwInterfaceSetBondWeightReply, error)
- SwInterfaceSlaveDump(ctx context.Context, in *SwInterfaceSlaveDump) (RPCService_SwInterfaceSlaveDumpClient, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) BondCreate(ctx context.Context, in *BondCreate) (*BondCreateReply, error) {
- out := new(BondCreateReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) BondDelete(ctx context.Context, in *BondDelete) (*BondDeleteReply, error) {
- out := new(BondDeleteReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) BondDetachSlave(ctx context.Context, in *BondDetachSlave) (*BondDetachSlaveReply, error) {
- out := new(BondDetachSlaveReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) BondEnslave(ctx context.Context, in *BondEnslave) (*BondEnslaveReply, error) {
- out := new(BondEnslaveReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SwInterfaceBondDump(ctx context.Context, in *SwInterfaceBondDump) (RPCService_SwInterfaceBondDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_SwInterfaceBondDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_SwInterfaceBondDumpClient interface {
- Recv() (*SwInterfaceBondDetails, error)
- api.Stream
-}
-
-type serviceClient_SwInterfaceBondDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_SwInterfaceBondDumpClient) Recv() (*SwInterfaceBondDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *SwInterfaceBondDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) SwInterfaceSetBondWeight(ctx context.Context, in *SwInterfaceSetBondWeight) (*SwInterfaceSetBondWeightReply, error) {
- out := new(SwInterfaceSetBondWeightReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SwInterfaceSlaveDump(ctx context.Context, in *SwInterfaceSlaveDump) (RPCService_SwInterfaceSlaveDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_SwInterfaceSlaveDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_SwInterfaceSlaveDumpClient interface {
- Recv() (*SwInterfaceSlaveDetails, error)
- api.Stream
-}
-
-type serviceClient_SwInterfaceSlaveDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_SwInterfaceSlaveDumpClient) Recv() (*SwInterfaceSlaveDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *SwInterfaceSlaveDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
diff --git a/internal/testbinapi/binapi2001/builtinurl/builtinurl.ba.go b/internal/testbinapi/binapi2001/builtinurl/builtinurl.ba.go
deleted file mode 100644
index c0f59e9..0000000
--- a/internal/testbinapi/binapi2001/builtinurl/builtinurl.ba.go
+++ /dev/null
@@ -1,103 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/plugins/builtinurl.api.json
-
-// Package builtinurl contains generated bindings for API file builtinurl.api.
-//
-// Contents:
-// 2 messages
-//
-package builtinurl
-
-import (
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the GoVPP api package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// GoVPP api package needs to be updated.
-const _ = api.GoVppAPIPackageIsVersion2
-
-const (
- APIFile = "builtinurl"
- APIVersion = "1.0.0"
- VersionCrc = 0x25045d63
-)
-
-// BuiltinurlEnable defines message 'builtinurl_enable'.
-type BuiltinurlEnable struct{}
-
-func (m *BuiltinurlEnable) Reset() { *m = BuiltinurlEnable{} }
-func (*BuiltinurlEnable) GetMessageName() string { return "builtinurl_enable" }
-func (*BuiltinurlEnable) GetCrcString() string { return "51077d14" }
-func (*BuiltinurlEnable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BuiltinurlEnable) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *BuiltinurlEnable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *BuiltinurlEnable) Unmarshal(b []byte) error {
- return nil
-}
-
-// BuiltinurlEnableReply defines message 'builtinurl_enable_reply'.
-type BuiltinurlEnableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *BuiltinurlEnableReply) Reset() { *m = BuiltinurlEnableReply{} }
-func (*BuiltinurlEnableReply) GetMessageName() string { return "builtinurl_enable_reply" }
-func (*BuiltinurlEnableReply) GetCrcString() string { return "e8d4e804" }
-func (*BuiltinurlEnableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BuiltinurlEnableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *BuiltinurlEnableReply) 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 *BuiltinurlEnableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_builtinurl_binapi_init() }
-func file_builtinurl_binapi_init() {
- api.RegisterMessage((*BuiltinurlEnable)(nil), "builtinurl_enable_51077d14")
- api.RegisterMessage((*BuiltinurlEnableReply)(nil), "builtinurl_enable_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*BuiltinurlEnable)(nil),
- (*BuiltinurlEnableReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/builtinurl/builtinurl_rpc.ba.go b/internal/testbinapi/binapi2001/builtinurl/builtinurl_rpc.ba.go
deleted file mode 100644
index f44e843..0000000
--- a/internal/testbinapi/binapi2001/builtinurl/builtinurl_rpc.ba.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package builtinurl
-
-import (
- "context"
-
- api "git.fd.io/govpp.git/api"
-)
-
-// RPCService defines RPC service builtinurl.
-type RPCService interface {
- BuiltinurlEnable(ctx context.Context, in *BuiltinurlEnable) (*BuiltinurlEnableReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) BuiltinurlEnable(ctx context.Context, in *BuiltinurlEnable) (*BuiltinurlEnableReply, error) {
- out := new(BuiltinurlEnableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/cdp/cdp.ba.go b/internal/testbinapi/binapi2001/cdp/cdp.ba.go
deleted file mode 100644
index ef5c91b..0000000
--- a/internal/testbinapi/binapi2001/cdp/cdp.ba.go
+++ /dev/null
@@ -1,109 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/plugins/cdp.api.json
-
-// Package cdp contains generated bindings for API file cdp.api.
-//
-// Contents:
-// 2 messages
-//
-package cdp
-
-import (
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the GoVPP api package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// GoVPP api package needs to be updated.
-const _ = api.GoVppAPIPackageIsVersion2
-
-const (
- APIFile = "cdp"
- APIVersion = "1.0.0"
- VersionCrc = 0x8cfa825e
-)
-
-// CdpEnableDisable defines message 'cdp_enable_disable'.
-type CdpEnableDisable struct {
- EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
-}
-
-func (m *CdpEnableDisable) Reset() { *m = CdpEnableDisable{} }
-func (*CdpEnableDisable) GetMessageName() string { return "cdp_enable_disable" }
-func (*CdpEnableDisable) GetCrcString() string { return "2e7b47df" }
-func (*CdpEnableDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *CdpEnableDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.EnableDisable
- return size
-}
-func (m *CdpEnableDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.EnableDisable)
- return buf.Bytes(), nil
-}
-func (m *CdpEnableDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.EnableDisable = buf.DecodeBool()
- return nil
-}
-
-// CdpEnableDisableReply defines message 'cdp_enable_disable_reply'.
-type CdpEnableDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *CdpEnableDisableReply) Reset() { *m = CdpEnableDisableReply{} }
-func (*CdpEnableDisableReply) GetMessageName() string { return "cdp_enable_disable_reply" }
-func (*CdpEnableDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*CdpEnableDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *CdpEnableDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *CdpEnableDisableReply) 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 *CdpEnableDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_cdp_binapi_init() }
-func file_cdp_binapi_init() {
- api.RegisterMessage((*CdpEnableDisable)(nil), "cdp_enable_disable_2e7b47df")
- api.RegisterMessage((*CdpEnableDisableReply)(nil), "cdp_enable_disable_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*CdpEnableDisable)(nil),
- (*CdpEnableDisableReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/cdp/cdp_rpc.ba.go b/internal/testbinapi/binapi2001/cdp/cdp_rpc.ba.go
deleted file mode 100644
index 8eac86c..0000000
--- a/internal/testbinapi/binapi2001/cdp/cdp_rpc.ba.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package cdp
-
-import (
- "context"
-
- api "git.fd.io/govpp.git/api"
-)
-
-// RPCService defines RPC service cdp.
-type RPCService interface {
- CdpEnableDisable(ctx context.Context, in *CdpEnableDisable) (*CdpEnableDisableReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) CdpEnableDisable(ctx context.Context, in *CdpEnableDisable) (*CdpEnableDisableReply, error) {
- out := new(CdpEnableDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/classify/classify.ba.go b/internal/testbinapi/binapi2001/classify/classify.ba.go
deleted file mode 100644
index b542382..0000000
--- a/internal/testbinapi/binapi2001/classify/classify.ba.go
+++ /dev/null
@@ -1,1662 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/classify.api.json
-
-// Package classify contains generated bindings for API file classify.api.
-//
-// Contents:
-// 1 alias
-// 9 enums
-// 28 messages
-//
-package classify
-
-import (
- "strconv"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "classify"
- APIVersion = "3.0.0"
- VersionCrc = 0x13587952
-)
-
-// ClassifyAction defines enum 'classify_action'.
-type ClassifyAction uint8
-
-const (
- CLASSIFY_API_ACTION_NONE ClassifyAction = 0
- CLASSIFY_API_ACTION_SET_IP4_FIB_INDEX ClassifyAction = 1
- CLASSIFY_API_ACTION_SET_IP6_FIB_INDEX ClassifyAction = 2
- CLASSIFY_API_ACTION_SET_METADATA ClassifyAction = 3
-)
-
-var (
- ClassifyAction_name = map[uint8]string{
- 0: "CLASSIFY_API_ACTION_NONE",
- 1: "CLASSIFY_API_ACTION_SET_IP4_FIB_INDEX",
- 2: "CLASSIFY_API_ACTION_SET_IP6_FIB_INDEX",
- 3: "CLASSIFY_API_ACTION_SET_METADATA",
- }
- ClassifyAction_value = map[string]uint8{
- "CLASSIFY_API_ACTION_NONE": 0,
- "CLASSIFY_API_ACTION_SET_IP4_FIB_INDEX": 1,
- "CLASSIFY_API_ACTION_SET_IP6_FIB_INDEX": 2,
- "CLASSIFY_API_ACTION_SET_METADATA": 3,
- }
-)
-
-func (x ClassifyAction) String() string {
- s, ok := ClassifyAction_name[uint8(x)]
- if ok {
- return s
- }
- return "ClassifyAction(" + strconv.Itoa(int(x)) + ")"
-}
-
-// FlowClassifyTable defines enum 'flow_classify_table'.
-type FlowClassifyTable uint8
-
-const (
- FLOW_CLASSIFY_API_TABLE_IP4 FlowClassifyTable = 1
- FLOW_CLASSIFY_API_TABLE_IP6 FlowClassifyTable = 2
-)
-
-var (
- FlowClassifyTable_name = map[uint8]string{
- 1: "FLOW_CLASSIFY_API_TABLE_IP4",
- 2: "FLOW_CLASSIFY_API_TABLE_IP6",
- }
- FlowClassifyTable_value = map[string]uint8{
- "FLOW_CLASSIFY_API_TABLE_IP4": 1,
- "FLOW_CLASSIFY_API_TABLE_IP6": 2,
- }
-)
-
-func (x FlowClassifyTable) String() string {
- s, ok := FlowClassifyTable_name[uint8(x)]
- if ok {
- return s
- }
- return "FlowClassifyTable(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// PolicerClassifyTable defines enum 'policer_classify_table'.
-type PolicerClassifyTable uint8
-
-const (
- POLICER_CLASSIFY_API_TABLE_IP4 PolicerClassifyTable = 1
- POLICER_CLASSIFY_API_TABLE_IP6 PolicerClassifyTable = 2
- POLICER_CLASSIFY_API_TABLE_L2 PolicerClassifyTable = 3
-)
-
-var (
- PolicerClassifyTable_name = map[uint8]string{
- 1: "POLICER_CLASSIFY_API_TABLE_IP4",
- 2: "POLICER_CLASSIFY_API_TABLE_IP6",
- 3: "POLICER_CLASSIFY_API_TABLE_L2",
- }
- PolicerClassifyTable_value = map[string]uint8{
- "POLICER_CLASSIFY_API_TABLE_IP4": 1,
- "POLICER_CLASSIFY_API_TABLE_IP6": 2,
- "POLICER_CLASSIFY_API_TABLE_L2": 3,
- }
-)
-
-func (x PolicerClassifyTable) String() string {
- s, ok := PolicerClassifyTable_name[uint8(x)]
- if ok {
- return s
- }
- return "PolicerClassifyTable(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// ClassifyAddDelSession defines message 'classify_add_del_session'.
-type ClassifyAddDelSession struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- TableIndex uint32 `binapi:"u32,name=table_index" json:"table_index,omitempty"`
- HitNextIndex uint32 `binapi:"u32,name=hit_next_index,default=4294967295" json:"hit_next_index,omitempty"`
- OpaqueIndex uint32 `binapi:"u32,name=opaque_index,default=4294967295" json:"opaque_index,omitempty"`
- Advance int32 `binapi:"i32,name=advance,default=0" json:"advance,omitempty"`
- Action ClassifyAction `binapi:"classify_action,name=action,default=0" json:"action,omitempty"`
- Metadata uint32 `binapi:"u32,name=metadata,default=0" json:"metadata,omitempty"`
- MatchLen uint32 `binapi:"u32,name=match_len" json:"-"`
- Match []byte `binapi:"u8[match_len],name=match" json:"match,omitempty"`
-}
-
-func (m *ClassifyAddDelSession) Reset() { *m = ClassifyAddDelSession{} }
-func (*ClassifyAddDelSession) GetMessageName() string { return "classify_add_del_session" }
-func (*ClassifyAddDelSession) GetCrcString() string { return "f20879f0" }
-func (*ClassifyAddDelSession) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ClassifyAddDelSession) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 4 // m.TableIndex
- size += 4 // m.HitNextIndex
- size += 4 // m.OpaqueIndex
- size += 4 // m.Advance
- size += 1 // m.Action
- size += 4 // m.Metadata
- size += 4 // m.MatchLen
- size += 1 * len(m.Match) // m.Match
- return size
-}
-func (m *ClassifyAddDelSession) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeUint32(m.TableIndex)
- buf.EncodeUint32(m.HitNextIndex)
- buf.EncodeUint32(m.OpaqueIndex)
- buf.EncodeInt32(m.Advance)
- buf.EncodeUint8(uint8(m.Action))
- buf.EncodeUint32(m.Metadata)
- buf.EncodeUint32(uint32(len(m.Match)))
- buf.EncodeBytes(m.Match, 0)
- return buf.Bytes(), nil
-}
-func (m *ClassifyAddDelSession) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.TableIndex = buf.DecodeUint32()
- m.HitNextIndex = buf.DecodeUint32()
- m.OpaqueIndex = buf.DecodeUint32()
- m.Advance = buf.DecodeInt32()
- m.Action = ClassifyAction(buf.DecodeUint8())
- m.Metadata = buf.DecodeUint32()
- m.MatchLen = buf.DecodeUint32()
- m.Match = make([]byte, m.MatchLen)
- copy(m.Match, buf.DecodeBytes(len(m.Match)))
- return nil
-}
-
-// ClassifyAddDelSessionReply defines message 'classify_add_del_session_reply'.
-type ClassifyAddDelSessionReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *ClassifyAddDelSessionReply) Reset() { *m = ClassifyAddDelSessionReply{} }
-func (*ClassifyAddDelSessionReply) GetMessageName() string { return "classify_add_del_session_reply" }
-func (*ClassifyAddDelSessionReply) GetCrcString() string { return "e8d4e804" }
-func (*ClassifyAddDelSessionReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ClassifyAddDelSessionReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *ClassifyAddDelSessionReply) 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 *ClassifyAddDelSessionReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// ClassifyAddDelTable defines message 'classify_add_del_table'.
-type ClassifyAddDelTable struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- DelChain bool `binapi:"bool,name=del_chain" json:"del_chain,omitempty"`
- TableIndex uint32 `binapi:"u32,name=table_index,default=4294967295" json:"table_index,omitempty"`
- Nbuckets uint32 `binapi:"u32,name=nbuckets,default=2" json:"nbuckets,omitempty"`
- MemorySize uint32 `binapi:"u32,name=memory_size,default=2097152" json:"memory_size,omitempty"`
- SkipNVectors uint32 `binapi:"u32,name=skip_n_vectors,default=0" json:"skip_n_vectors,omitempty"`
- MatchNVectors uint32 `binapi:"u32,name=match_n_vectors,default=1" json:"match_n_vectors,omitempty"`
- NextTableIndex uint32 `binapi:"u32,name=next_table_index,default=4294967295" json:"next_table_index,omitempty"`
- MissNextIndex uint32 `binapi:"u32,name=miss_next_index,default=4294967295" json:"miss_next_index,omitempty"`
- CurrentDataFlag uint8 `binapi:"u8,name=current_data_flag,default=0" json:"current_data_flag,omitempty"`
- CurrentDataOffset int16 `binapi:"i16,name=current_data_offset,default=0" json:"current_data_offset,omitempty"`
- MaskLen uint32 `binapi:"u32,name=mask_len" json:"-"`
- Mask []byte `binapi:"u8[mask_len],name=mask" json:"mask,omitempty"`
-}
-
-func (m *ClassifyAddDelTable) Reset() { *m = ClassifyAddDelTable{} }
-func (*ClassifyAddDelTable) GetMessageName() string { return "classify_add_del_table" }
-func (*ClassifyAddDelTable) GetCrcString() string { return "6849e39e" }
-func (*ClassifyAddDelTable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ClassifyAddDelTable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 1 // m.DelChain
- size += 4 // m.TableIndex
- size += 4 // m.Nbuckets
- size += 4 // m.MemorySize
- size += 4 // m.SkipNVectors
- size += 4 // m.MatchNVectors
- size += 4 // m.NextTableIndex
- size += 4 // m.MissNextIndex
- size += 1 // m.CurrentDataFlag
- size += 2 // m.CurrentDataOffset
- size += 4 // m.MaskLen
- size += 1 * len(m.Mask) // m.Mask
- return size
-}
-func (m *ClassifyAddDelTable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeBool(m.DelChain)
- buf.EncodeUint32(m.TableIndex)
- buf.EncodeUint32(m.Nbuckets)
- buf.EncodeUint32(m.MemorySize)
- buf.EncodeUint32(m.SkipNVectors)
- buf.EncodeUint32(m.MatchNVectors)
- buf.EncodeUint32(m.NextTableIndex)
- buf.EncodeUint32(m.MissNextIndex)
- buf.EncodeUint8(m.CurrentDataFlag)
- buf.EncodeInt16(m.CurrentDataOffset)
- buf.EncodeUint32(uint32(len(m.Mask)))
- buf.EncodeBytes(m.Mask, 0)
- return buf.Bytes(), nil
-}
-func (m *ClassifyAddDelTable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.DelChain = buf.DecodeBool()
- m.TableIndex = buf.DecodeUint32()
- m.Nbuckets = buf.DecodeUint32()
- m.MemorySize = buf.DecodeUint32()
- m.SkipNVectors = buf.DecodeUint32()
- m.MatchNVectors = buf.DecodeUint32()
- m.NextTableIndex = buf.DecodeUint32()
- m.MissNextIndex = buf.DecodeUint32()
- m.CurrentDataFlag = buf.DecodeUint8()
- m.CurrentDataOffset = buf.DecodeInt16()
- m.MaskLen = buf.DecodeUint32()
- m.Mask = make([]byte, m.MaskLen)
- copy(m.Mask, buf.DecodeBytes(len(m.Mask)))
- return nil
-}
-
-// ClassifyAddDelTableReply defines message 'classify_add_del_table_reply'.
-type ClassifyAddDelTableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- NewTableIndex uint32 `binapi:"u32,name=new_table_index" json:"new_table_index,omitempty"`
- SkipNVectors uint32 `binapi:"u32,name=skip_n_vectors" json:"skip_n_vectors,omitempty"`
- MatchNVectors uint32 `binapi:"u32,name=match_n_vectors" json:"match_n_vectors,omitempty"`
-}
-
-func (m *ClassifyAddDelTableReply) Reset() { *m = ClassifyAddDelTableReply{} }
-func (*ClassifyAddDelTableReply) GetMessageName() string { return "classify_add_del_table_reply" }
-func (*ClassifyAddDelTableReply) GetCrcString() string { return "05486349" }
-func (*ClassifyAddDelTableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ClassifyAddDelTableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.NewTableIndex
- size += 4 // m.SkipNVectors
- size += 4 // m.MatchNVectors
- return size
-}
-func (m *ClassifyAddDelTableReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.NewTableIndex)
- buf.EncodeUint32(m.SkipNVectors)
- buf.EncodeUint32(m.MatchNVectors)
- return buf.Bytes(), nil
-}
-func (m *ClassifyAddDelTableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.NewTableIndex = buf.DecodeUint32()
- m.SkipNVectors = buf.DecodeUint32()
- m.MatchNVectors = buf.DecodeUint32()
- return nil
-}
-
-// ClassifySessionDetails defines message 'classify_session_details'.
-type ClassifySessionDetails struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
- HitNextIndex uint32 `binapi:"u32,name=hit_next_index" json:"hit_next_index,omitempty"`
- Advance int32 `binapi:"i32,name=advance" json:"advance,omitempty"`
- OpaqueIndex uint32 `binapi:"u32,name=opaque_index" json:"opaque_index,omitempty"`
- MatchLength uint32 `binapi:"u32,name=match_length" json:"-"`
- Match []byte `binapi:"u8[match_length],name=match" json:"match,omitempty"`
-}
-
-func (m *ClassifySessionDetails) Reset() { *m = ClassifySessionDetails{} }
-func (*ClassifySessionDetails) GetMessageName() string { return "classify_session_details" }
-func (*ClassifySessionDetails) GetCrcString() string { return "60e3ef94" }
-func (*ClassifySessionDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ClassifySessionDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.TableID
- size += 4 // m.HitNextIndex
- size += 4 // m.Advance
- size += 4 // m.OpaqueIndex
- size += 4 // m.MatchLength
- size += 1 * len(m.Match) // m.Match
- return size
-}
-func (m *ClassifySessionDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.TableID)
- buf.EncodeUint32(m.HitNextIndex)
- buf.EncodeInt32(m.Advance)
- buf.EncodeUint32(m.OpaqueIndex)
- buf.EncodeUint32(uint32(len(m.Match)))
- buf.EncodeBytes(m.Match, 0)
- return buf.Bytes(), nil
-}
-func (m *ClassifySessionDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.TableID = buf.DecodeUint32()
- m.HitNextIndex = buf.DecodeUint32()
- m.Advance = buf.DecodeInt32()
- m.OpaqueIndex = buf.DecodeUint32()
- m.MatchLength = buf.DecodeUint32()
- m.Match = make([]byte, m.MatchLength)
- copy(m.Match, buf.DecodeBytes(len(m.Match)))
- return nil
-}
-
-// ClassifySessionDump defines message 'classify_session_dump'.
-type ClassifySessionDump struct {
- TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
-}
-
-func (m *ClassifySessionDump) Reset() { *m = ClassifySessionDump{} }
-func (*ClassifySessionDump) GetMessageName() string { return "classify_session_dump" }
-func (*ClassifySessionDump) GetCrcString() string { return "0cca2cd9" }
-func (*ClassifySessionDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ClassifySessionDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.TableID
- return size
-}
-func (m *ClassifySessionDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.TableID)
- return buf.Bytes(), nil
-}
-func (m *ClassifySessionDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.TableID = buf.DecodeUint32()
- return nil
-}
-
-// ClassifySetInterfaceIPTable defines message 'classify_set_interface_ip_table'.
-type ClassifySetInterfaceIPTable struct {
- IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- TableIndex uint32 `binapi:"u32,name=table_index" json:"table_index,omitempty"`
-}
-
-func (m *ClassifySetInterfaceIPTable) Reset() { *m = ClassifySetInterfaceIPTable{} }
-func (*ClassifySetInterfaceIPTable) GetMessageName() string { return "classify_set_interface_ip_table" }
-func (*ClassifySetInterfaceIPTable) GetCrcString() string { return "e0b097c7" }
-func (*ClassifySetInterfaceIPTable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ClassifySetInterfaceIPTable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsIPv6
- size += 4 // m.SwIfIndex
- size += 4 // m.TableIndex
- return size
-}
-func (m *ClassifySetInterfaceIPTable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsIPv6)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(m.TableIndex)
- return buf.Bytes(), nil
-}
-func (m *ClassifySetInterfaceIPTable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsIPv6 = buf.DecodeBool()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.TableIndex = buf.DecodeUint32()
- return nil
-}
-
-// ClassifySetInterfaceIPTableReply defines message 'classify_set_interface_ip_table_reply'.
-type ClassifySetInterfaceIPTableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *ClassifySetInterfaceIPTableReply) Reset() { *m = ClassifySetInterfaceIPTableReply{} }
-func (*ClassifySetInterfaceIPTableReply) GetMessageName() string {
- return "classify_set_interface_ip_table_reply"
-}
-func (*ClassifySetInterfaceIPTableReply) GetCrcString() string { return "e8d4e804" }
-func (*ClassifySetInterfaceIPTableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ClassifySetInterfaceIPTableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *ClassifySetInterfaceIPTableReply) 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 *ClassifySetInterfaceIPTableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// ClassifySetInterfaceL2Tables defines message 'classify_set_interface_l2_tables'.
-type ClassifySetInterfaceL2Tables struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- IP4TableIndex uint32 `binapi:"u32,name=ip4_table_index" json:"ip4_table_index,omitempty"`
- IP6TableIndex uint32 `binapi:"u32,name=ip6_table_index" json:"ip6_table_index,omitempty"`
- OtherTableIndex uint32 `binapi:"u32,name=other_table_index" json:"other_table_index,omitempty"`
- IsInput bool `binapi:"bool,name=is_input" json:"is_input,omitempty"`
-}
-
-func (m *ClassifySetInterfaceL2Tables) Reset() { *m = ClassifySetInterfaceL2Tables{} }
-func (*ClassifySetInterfaceL2Tables) GetMessageName() string {
- return "classify_set_interface_l2_tables"
-}
-func (*ClassifySetInterfaceL2Tables) GetCrcString() string { return "5a6ddf65" }
-func (*ClassifySetInterfaceL2Tables) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ClassifySetInterfaceL2Tables) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.IP4TableIndex
- size += 4 // m.IP6TableIndex
- size += 4 // m.OtherTableIndex
- size += 1 // m.IsInput
- return size
-}
-func (m *ClassifySetInterfaceL2Tables) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(m.IP4TableIndex)
- buf.EncodeUint32(m.IP6TableIndex)
- buf.EncodeUint32(m.OtherTableIndex)
- buf.EncodeBool(m.IsInput)
- return buf.Bytes(), nil
-}
-func (m *ClassifySetInterfaceL2Tables) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.IP4TableIndex = buf.DecodeUint32()
- m.IP6TableIndex = buf.DecodeUint32()
- m.OtherTableIndex = buf.DecodeUint32()
- m.IsInput = buf.DecodeBool()
- return nil
-}
-
-// ClassifySetInterfaceL2TablesReply defines message 'classify_set_interface_l2_tables_reply'.
-type ClassifySetInterfaceL2TablesReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *ClassifySetInterfaceL2TablesReply) Reset() { *m = ClassifySetInterfaceL2TablesReply{} }
-func (*ClassifySetInterfaceL2TablesReply) GetMessageName() string {
- return "classify_set_interface_l2_tables_reply"
-}
-func (*ClassifySetInterfaceL2TablesReply) GetCrcString() string { return "e8d4e804" }
-func (*ClassifySetInterfaceL2TablesReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ClassifySetInterfaceL2TablesReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *ClassifySetInterfaceL2TablesReply) 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 *ClassifySetInterfaceL2TablesReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// ClassifyTableByInterface defines message 'classify_table_by_interface'.
-type ClassifyTableByInterface struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *ClassifyTableByInterface) Reset() { *m = ClassifyTableByInterface{} }
-func (*ClassifyTableByInterface) GetMessageName() string { return "classify_table_by_interface" }
-func (*ClassifyTableByInterface) GetCrcString() string { return "f9e6675e" }
-func (*ClassifyTableByInterface) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ClassifyTableByInterface) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *ClassifyTableByInterface) 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 *ClassifyTableByInterface) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// ClassifyTableByInterfaceReply defines message 'classify_table_by_interface_reply'.
-type ClassifyTableByInterfaceReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- L2TableID uint32 `binapi:"u32,name=l2_table_id" json:"l2_table_id,omitempty"`
- IP4TableID uint32 `binapi:"u32,name=ip4_table_id" json:"ip4_table_id,omitempty"`
- IP6TableID uint32 `binapi:"u32,name=ip6_table_id" json:"ip6_table_id,omitempty"`
-}
-
-func (m *ClassifyTableByInterfaceReply) Reset() { *m = ClassifyTableByInterfaceReply{} }
-func (*ClassifyTableByInterfaceReply) GetMessageName() string {
- return "classify_table_by_interface_reply"
-}
-func (*ClassifyTableByInterfaceReply) GetCrcString() string { return "ed4197db" }
-func (*ClassifyTableByInterfaceReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ClassifyTableByInterfaceReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.SwIfIndex
- size += 4 // m.L2TableID
- size += 4 // m.IP4TableID
- size += 4 // m.IP6TableID
- return size
-}
-func (m *ClassifyTableByInterfaceReply) 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))
- buf.EncodeUint32(m.L2TableID)
- buf.EncodeUint32(m.IP4TableID)
- buf.EncodeUint32(m.IP6TableID)
- return buf.Bytes(), nil
-}
-func (m *ClassifyTableByInterfaceReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.L2TableID = buf.DecodeUint32()
- m.IP4TableID = buf.DecodeUint32()
- m.IP6TableID = buf.DecodeUint32()
- return nil
-}
-
-// ClassifyTableIds defines message 'classify_table_ids'.
-type ClassifyTableIds struct{}
-
-func (m *ClassifyTableIds) Reset() { *m = ClassifyTableIds{} }
-func (*ClassifyTableIds) GetMessageName() string { return "classify_table_ids" }
-func (*ClassifyTableIds) GetCrcString() string { return "51077d14" }
-func (*ClassifyTableIds) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ClassifyTableIds) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *ClassifyTableIds) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *ClassifyTableIds) Unmarshal(b []byte) error {
- return nil
-}
-
-// ClassifyTableIdsReply defines message 'classify_table_ids_reply'.
-type ClassifyTableIdsReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- Count uint32 `binapi:"u32,name=count" json:"-"`
- Ids []uint32 `binapi:"u32[count],name=ids" json:"ids,omitempty"`
-}
-
-func (m *ClassifyTableIdsReply) Reset() { *m = ClassifyTableIdsReply{} }
-func (*ClassifyTableIdsReply) GetMessageName() string { return "classify_table_ids_reply" }
-func (*ClassifyTableIdsReply) GetCrcString() string { return "d1d20e1d" }
-func (*ClassifyTableIdsReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ClassifyTableIdsReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.Count
- size += 4 * len(m.Ids) // m.Ids
- return size
-}
-func (m *ClassifyTableIdsReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(uint32(len(m.Ids)))
- for i := 0; i < len(m.Ids); i++ {
- var x uint32
- if i < len(m.Ids) {
- x = uint32(m.Ids[i])
- }
- buf.EncodeUint32(x)
- }
- return buf.Bytes(), nil
-}
-func (m *ClassifyTableIdsReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.Count = buf.DecodeUint32()
- m.Ids = make([]uint32, m.Count)
- for i := 0; i < len(m.Ids); i++ {
- m.Ids[i] = buf.DecodeUint32()
- }
- return nil
-}
-
-// ClassifyTableInfo defines message 'classify_table_info'.
-type ClassifyTableInfo struct {
- TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
-}
-
-func (m *ClassifyTableInfo) Reset() { *m = ClassifyTableInfo{} }
-func (*ClassifyTableInfo) GetMessageName() string { return "classify_table_info" }
-func (*ClassifyTableInfo) GetCrcString() string { return "0cca2cd9" }
-func (*ClassifyTableInfo) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ClassifyTableInfo) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.TableID
- return size
-}
-func (m *ClassifyTableInfo) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.TableID)
- return buf.Bytes(), nil
-}
-func (m *ClassifyTableInfo) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.TableID = buf.DecodeUint32()
- return nil
-}
-
-// ClassifyTableInfoReply defines message 'classify_table_info_reply'.
-type ClassifyTableInfoReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
- Nbuckets uint32 `binapi:"u32,name=nbuckets" json:"nbuckets,omitempty"`
- MatchNVectors uint32 `binapi:"u32,name=match_n_vectors" json:"match_n_vectors,omitempty"`
- SkipNVectors uint32 `binapi:"u32,name=skip_n_vectors" json:"skip_n_vectors,omitempty"`
- ActiveSessions uint32 `binapi:"u32,name=active_sessions" json:"active_sessions,omitempty"`
- NextTableIndex uint32 `binapi:"u32,name=next_table_index" json:"next_table_index,omitempty"`
- MissNextIndex uint32 `binapi:"u32,name=miss_next_index" json:"miss_next_index,omitempty"`
- MaskLength uint32 `binapi:"u32,name=mask_length" json:"-"`
- Mask []byte `binapi:"u8[mask_length],name=mask" json:"mask,omitempty"`
-}
-
-func (m *ClassifyTableInfoReply) Reset() { *m = ClassifyTableInfoReply{} }
-func (*ClassifyTableInfoReply) GetMessageName() string { return "classify_table_info_reply" }
-func (*ClassifyTableInfoReply) GetCrcString() string { return "4a573c0e" }
-func (*ClassifyTableInfoReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ClassifyTableInfoReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.TableID
- size += 4 // m.Nbuckets
- size += 4 // m.MatchNVectors
- size += 4 // m.SkipNVectors
- size += 4 // m.ActiveSessions
- size += 4 // m.NextTableIndex
- size += 4 // m.MissNextIndex
- size += 4 // m.MaskLength
- size += 1 * len(m.Mask) // m.Mask
- return size
-}
-func (m *ClassifyTableInfoReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.TableID)
- buf.EncodeUint32(m.Nbuckets)
- buf.EncodeUint32(m.MatchNVectors)
- buf.EncodeUint32(m.SkipNVectors)
- buf.EncodeUint32(m.ActiveSessions)
- buf.EncodeUint32(m.NextTableIndex)
- buf.EncodeUint32(m.MissNextIndex)
- buf.EncodeUint32(uint32(len(m.Mask)))
- buf.EncodeBytes(m.Mask, 0)
- return buf.Bytes(), nil
-}
-func (m *ClassifyTableInfoReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.TableID = buf.DecodeUint32()
- m.Nbuckets = buf.DecodeUint32()
- m.MatchNVectors = buf.DecodeUint32()
- m.SkipNVectors = buf.DecodeUint32()
- m.ActiveSessions = buf.DecodeUint32()
- m.NextTableIndex = buf.DecodeUint32()
- m.MissNextIndex = buf.DecodeUint32()
- m.MaskLength = buf.DecodeUint32()
- m.Mask = make([]byte, m.MaskLength)
- copy(m.Mask, buf.DecodeBytes(len(m.Mask)))
- return nil
-}
-
-// FlowClassifyDetails defines message 'flow_classify_details'.
-type FlowClassifyDetails struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- TableIndex uint32 `binapi:"u32,name=table_index" json:"table_index,omitempty"`
-}
-
-func (m *FlowClassifyDetails) Reset() { *m = FlowClassifyDetails{} }
-func (*FlowClassifyDetails) GetMessageName() string { return "flow_classify_details" }
-func (*FlowClassifyDetails) GetCrcString() string { return "dfd08765" }
-func (*FlowClassifyDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *FlowClassifyDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.TableIndex
- return size
-}
-func (m *FlowClassifyDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(m.TableIndex)
- return buf.Bytes(), nil
-}
-func (m *FlowClassifyDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.TableIndex = buf.DecodeUint32()
- return nil
-}
-
-// FlowClassifyDump defines message 'flow_classify_dump'.
-type FlowClassifyDump struct {
- Type FlowClassifyTable `binapi:"flow_classify_table,name=type" json:"type,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *FlowClassifyDump) Reset() { *m = FlowClassifyDump{} }
-func (*FlowClassifyDump) GetMessageName() string { return "flow_classify_dump" }
-func (*FlowClassifyDump) GetCrcString() string { return "8a6ad43d" }
-func (*FlowClassifyDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *FlowClassifyDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.Type
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *FlowClassifyDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(uint8(m.Type))
- buf.EncodeUint32(uint32(m.SwIfIndex))
- return buf.Bytes(), nil
-}
-func (m *FlowClassifyDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Type = FlowClassifyTable(buf.DecodeUint8())
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// FlowClassifySetInterface defines message 'flow_classify_set_interface'.
-type FlowClassifySetInterface struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- IP4TableIndex uint32 `binapi:"u32,name=ip4_table_index" json:"ip4_table_index,omitempty"`
- IP6TableIndex uint32 `binapi:"u32,name=ip6_table_index" json:"ip6_table_index,omitempty"`
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
-}
-
-func (m *FlowClassifySetInterface) Reset() { *m = FlowClassifySetInterface{} }
-func (*FlowClassifySetInterface) GetMessageName() string { return "flow_classify_set_interface" }
-func (*FlowClassifySetInterface) GetCrcString() string { return "b6192f1c" }
-func (*FlowClassifySetInterface) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *FlowClassifySetInterface) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.IP4TableIndex
- size += 4 // m.IP6TableIndex
- size += 1 // m.IsAdd
- return size
-}
-func (m *FlowClassifySetInterface) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(m.IP4TableIndex)
- buf.EncodeUint32(m.IP6TableIndex)
- buf.EncodeBool(m.IsAdd)
- return buf.Bytes(), nil
-}
-func (m *FlowClassifySetInterface) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.IP4TableIndex = buf.DecodeUint32()
- m.IP6TableIndex = buf.DecodeUint32()
- m.IsAdd = buf.DecodeBool()
- return nil
-}
-
-// FlowClassifySetInterfaceReply defines message 'flow_classify_set_interface_reply'.
-type FlowClassifySetInterfaceReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *FlowClassifySetInterfaceReply) Reset() { *m = FlowClassifySetInterfaceReply{} }
-func (*FlowClassifySetInterfaceReply) GetMessageName() string {
- return "flow_classify_set_interface_reply"
-}
-func (*FlowClassifySetInterfaceReply) GetCrcString() string { return "e8d4e804" }
-func (*FlowClassifySetInterfaceReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *FlowClassifySetInterfaceReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *FlowClassifySetInterfaceReply) 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 *FlowClassifySetInterfaceReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// InputACLSetInterface defines message 'input_acl_set_interface'.
-type InputACLSetInterface struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- IP4TableIndex uint32 `binapi:"u32,name=ip4_table_index" json:"ip4_table_index,omitempty"`
- IP6TableIndex uint32 `binapi:"u32,name=ip6_table_index" json:"ip6_table_index,omitempty"`
- L2TableIndex uint32 `binapi:"u32,name=l2_table_index" json:"l2_table_index,omitempty"`
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
-}
-
-func (m *InputACLSetInterface) Reset() { *m = InputACLSetInterface{} }
-func (*InputACLSetInterface) GetMessageName() string { return "input_acl_set_interface" }
-func (*InputACLSetInterface) GetCrcString() string { return "de7ad708" }
-func (*InputACLSetInterface) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *InputACLSetInterface) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.IP4TableIndex
- size += 4 // m.IP6TableIndex
- size += 4 // m.L2TableIndex
- size += 1 // m.IsAdd
- return size
-}
-func (m *InputACLSetInterface) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(m.IP4TableIndex)
- buf.EncodeUint32(m.IP6TableIndex)
- buf.EncodeUint32(m.L2TableIndex)
- buf.EncodeBool(m.IsAdd)
- return buf.Bytes(), nil
-}
-func (m *InputACLSetInterface) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.IP4TableIndex = buf.DecodeUint32()
- m.IP6TableIndex = buf.DecodeUint32()
- m.L2TableIndex = buf.DecodeUint32()
- m.IsAdd = buf.DecodeBool()
- return nil
-}
-
-// InputACLSetInterfaceReply defines message 'input_acl_set_interface_reply'.
-type InputACLSetInterfaceReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *InputACLSetInterfaceReply) Reset() { *m = InputACLSetInterfaceReply{} }
-func (*InputACLSetInterfaceReply) GetMessageName() string { return "input_acl_set_interface_reply" }
-func (*InputACLSetInterfaceReply) GetCrcString() string { return "e8d4e804" }
-func (*InputACLSetInterfaceReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *InputACLSetInterfaceReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *InputACLSetInterfaceReply) 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 *InputACLSetInterfaceReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// OutputACLSetInterface defines message 'output_acl_set_interface'.
-type OutputACLSetInterface struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- IP4TableIndex uint32 `binapi:"u32,name=ip4_table_index" json:"ip4_table_index,omitempty"`
- IP6TableIndex uint32 `binapi:"u32,name=ip6_table_index" json:"ip6_table_index,omitempty"`
- L2TableIndex uint32 `binapi:"u32,name=l2_table_index" json:"l2_table_index,omitempty"`
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
-}
-
-func (m *OutputACLSetInterface) Reset() { *m = OutputACLSetInterface{} }
-func (*OutputACLSetInterface) GetMessageName() string { return "output_acl_set_interface" }
-func (*OutputACLSetInterface) GetCrcString() string { return "de7ad708" }
-func (*OutputACLSetInterface) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OutputACLSetInterface) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.IP4TableIndex
- size += 4 // m.IP6TableIndex
- size += 4 // m.L2TableIndex
- size += 1 // m.IsAdd
- return size
-}
-func (m *OutputACLSetInterface) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(m.IP4TableIndex)
- buf.EncodeUint32(m.IP6TableIndex)
- buf.EncodeUint32(m.L2TableIndex)
- buf.EncodeBool(m.IsAdd)
- return buf.Bytes(), nil
-}
-func (m *OutputACLSetInterface) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.IP4TableIndex = buf.DecodeUint32()
- m.IP6TableIndex = buf.DecodeUint32()
- m.L2TableIndex = buf.DecodeUint32()
- m.IsAdd = buf.DecodeBool()
- return nil
-}
-
-// OutputACLSetInterfaceReply defines message 'output_acl_set_interface_reply'.
-type OutputACLSetInterfaceReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *OutputACLSetInterfaceReply) Reset() { *m = OutputACLSetInterfaceReply{} }
-func (*OutputACLSetInterfaceReply) GetMessageName() string { return "output_acl_set_interface_reply" }
-func (*OutputACLSetInterfaceReply) GetCrcString() string { return "e8d4e804" }
-func (*OutputACLSetInterfaceReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OutputACLSetInterfaceReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *OutputACLSetInterfaceReply) 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 *OutputACLSetInterfaceReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// PolicerClassifyDetails defines message 'policer_classify_details'.
-type PolicerClassifyDetails struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- TableIndex uint32 `binapi:"u32,name=table_index" json:"table_index,omitempty"`
-}
-
-func (m *PolicerClassifyDetails) Reset() { *m = PolicerClassifyDetails{} }
-func (*PolicerClassifyDetails) GetMessageName() string { return "policer_classify_details" }
-func (*PolicerClassifyDetails) GetCrcString() string { return "dfd08765" }
-func (*PolicerClassifyDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *PolicerClassifyDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.TableIndex
- return size
-}
-func (m *PolicerClassifyDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(m.TableIndex)
- return buf.Bytes(), nil
-}
-func (m *PolicerClassifyDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.TableIndex = buf.DecodeUint32()
- return nil
-}
-
-// PolicerClassifyDump defines message 'policer_classify_dump'.
-type PolicerClassifyDump struct {
- Type PolicerClassifyTable `binapi:"policer_classify_table,name=type" json:"type,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *PolicerClassifyDump) Reset() { *m = PolicerClassifyDump{} }
-func (*PolicerClassifyDump) GetMessageName() string { return "policer_classify_dump" }
-func (*PolicerClassifyDump) GetCrcString() string { return "6bfe6603" }
-func (*PolicerClassifyDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *PolicerClassifyDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.Type
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *PolicerClassifyDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(uint8(m.Type))
- buf.EncodeUint32(uint32(m.SwIfIndex))
- return buf.Bytes(), nil
-}
-func (m *PolicerClassifyDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Type = PolicerClassifyTable(buf.DecodeUint8())
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// PolicerClassifySetInterface defines message 'policer_classify_set_interface'.
-type PolicerClassifySetInterface struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- IP4TableIndex uint32 `binapi:"u32,name=ip4_table_index" json:"ip4_table_index,omitempty"`
- IP6TableIndex uint32 `binapi:"u32,name=ip6_table_index" json:"ip6_table_index,omitempty"`
- L2TableIndex uint32 `binapi:"u32,name=l2_table_index" json:"l2_table_index,omitempty"`
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
-}
-
-func (m *PolicerClassifySetInterface) Reset() { *m = PolicerClassifySetInterface{} }
-func (*PolicerClassifySetInterface) GetMessageName() string { return "policer_classify_set_interface" }
-func (*PolicerClassifySetInterface) GetCrcString() string { return "de7ad708" }
-func (*PolicerClassifySetInterface) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *PolicerClassifySetInterface) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.IP4TableIndex
- size += 4 // m.IP6TableIndex
- size += 4 // m.L2TableIndex
- size += 1 // m.IsAdd
- return size
-}
-func (m *PolicerClassifySetInterface) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(m.IP4TableIndex)
- buf.EncodeUint32(m.IP6TableIndex)
- buf.EncodeUint32(m.L2TableIndex)
- buf.EncodeBool(m.IsAdd)
- return buf.Bytes(), nil
-}
-func (m *PolicerClassifySetInterface) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.IP4TableIndex = buf.DecodeUint32()
- m.IP6TableIndex = buf.DecodeUint32()
- m.L2TableIndex = buf.DecodeUint32()
- m.IsAdd = buf.DecodeBool()
- return nil
-}
-
-// PolicerClassifySetInterfaceReply defines message 'policer_classify_set_interface_reply'.
-type PolicerClassifySetInterfaceReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *PolicerClassifySetInterfaceReply) Reset() { *m = PolicerClassifySetInterfaceReply{} }
-func (*PolicerClassifySetInterfaceReply) GetMessageName() string {
- return "policer_classify_set_interface_reply"
-}
-func (*PolicerClassifySetInterfaceReply) GetCrcString() string { return "e8d4e804" }
-func (*PolicerClassifySetInterfaceReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *PolicerClassifySetInterfaceReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *PolicerClassifySetInterfaceReply) 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 *PolicerClassifySetInterfaceReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_classify_binapi_init() }
-func file_classify_binapi_init() {
- api.RegisterMessage((*ClassifyAddDelSession)(nil), "classify_add_del_session_f20879f0")
- api.RegisterMessage((*ClassifyAddDelSessionReply)(nil), "classify_add_del_session_reply_e8d4e804")
- api.RegisterMessage((*ClassifyAddDelTable)(nil), "classify_add_del_table_6849e39e")
- api.RegisterMessage((*ClassifyAddDelTableReply)(nil), "classify_add_del_table_reply_05486349")
- api.RegisterMessage((*ClassifySessionDetails)(nil), "classify_session_details_60e3ef94")
- api.RegisterMessage((*ClassifySessionDump)(nil), "classify_session_dump_0cca2cd9")
- api.RegisterMessage((*ClassifySetInterfaceIPTable)(nil), "classify_set_interface_ip_table_e0b097c7")
- api.RegisterMessage((*ClassifySetInterfaceIPTableReply)(nil), "classify_set_interface_ip_table_reply_e8d4e804")
- api.RegisterMessage((*ClassifySetInterfaceL2Tables)(nil), "classify_set_interface_l2_tables_5a6ddf65")
- api.RegisterMessage((*ClassifySetInterfaceL2TablesReply)(nil), "classify_set_interface_l2_tables_reply_e8d4e804")
- api.RegisterMessage((*ClassifyTableByInterface)(nil), "classify_table_by_interface_f9e6675e")
- api.RegisterMessage((*ClassifyTableByInterfaceReply)(nil), "classify_table_by_interface_reply_ed4197db")
- api.RegisterMessage((*ClassifyTableIds)(nil), "classify_table_ids_51077d14")
- api.RegisterMessage((*ClassifyTableIdsReply)(nil), "classify_table_ids_reply_d1d20e1d")
- api.RegisterMessage((*ClassifyTableInfo)(nil), "classify_table_info_0cca2cd9")
- api.RegisterMessage((*ClassifyTableInfoReply)(nil), "classify_table_info_reply_4a573c0e")
- api.RegisterMessage((*FlowClassifyDetails)(nil), "flow_classify_details_dfd08765")
- api.RegisterMessage((*FlowClassifyDump)(nil), "flow_classify_dump_8a6ad43d")
- api.RegisterMessage((*FlowClassifySetInterface)(nil), "flow_classify_set_interface_b6192f1c")
- api.RegisterMessage((*FlowClassifySetInterfaceReply)(nil), "flow_classify_set_interface_reply_e8d4e804")
- api.RegisterMessage((*InputACLSetInterface)(nil), "input_acl_set_interface_de7ad708")
- api.RegisterMessage((*InputACLSetInterfaceReply)(nil), "input_acl_set_interface_reply_e8d4e804")
- api.RegisterMessage((*OutputACLSetInterface)(nil), "output_acl_set_interface_de7ad708")
- api.RegisterMessage((*OutputACLSetInterfaceReply)(nil), "output_acl_set_interface_reply_e8d4e804")
- api.RegisterMessage((*PolicerClassifyDetails)(nil), "policer_classify_details_dfd08765")
- api.RegisterMessage((*PolicerClassifyDump)(nil), "policer_classify_dump_6bfe6603")
- api.RegisterMessage((*PolicerClassifySetInterface)(nil), "policer_classify_set_interface_de7ad708")
- api.RegisterMessage((*PolicerClassifySetInterfaceReply)(nil), "policer_classify_set_interface_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*ClassifyAddDelSession)(nil),
- (*ClassifyAddDelSessionReply)(nil),
- (*ClassifyAddDelTable)(nil),
- (*ClassifyAddDelTableReply)(nil),
- (*ClassifySessionDetails)(nil),
- (*ClassifySessionDump)(nil),
- (*ClassifySetInterfaceIPTable)(nil),
- (*ClassifySetInterfaceIPTableReply)(nil),
- (*ClassifySetInterfaceL2Tables)(nil),
- (*ClassifySetInterfaceL2TablesReply)(nil),
- (*ClassifyTableByInterface)(nil),
- (*ClassifyTableByInterfaceReply)(nil),
- (*ClassifyTableIds)(nil),
- (*ClassifyTableIdsReply)(nil),
- (*ClassifyTableInfo)(nil),
- (*ClassifyTableInfoReply)(nil),
- (*FlowClassifyDetails)(nil),
- (*FlowClassifyDump)(nil),
- (*FlowClassifySetInterface)(nil),
- (*FlowClassifySetInterfaceReply)(nil),
- (*InputACLSetInterface)(nil),
- (*InputACLSetInterfaceReply)(nil),
- (*OutputACLSetInterface)(nil),
- (*OutputACLSetInterfaceReply)(nil),
- (*PolicerClassifyDetails)(nil),
- (*PolicerClassifyDump)(nil),
- (*PolicerClassifySetInterface)(nil),
- (*PolicerClassifySetInterfaceReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/classify/classify_rpc.ba.go b/internal/testbinapi/binapi2001/classify/classify_rpc.ba.go
deleted file mode 100644
index a2b6564..0000000
--- a/internal/testbinapi/binapi2001/classify/classify_rpc.ba.go
+++ /dev/null
@@ -1,266 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package classify
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service classify.
-type RPCService interface {
- ClassifyAddDelSession(ctx context.Context, in *ClassifyAddDelSession) (*ClassifyAddDelSessionReply, error)
- ClassifyAddDelTable(ctx context.Context, in *ClassifyAddDelTable) (*ClassifyAddDelTableReply, error)
- ClassifySessionDump(ctx context.Context, in *ClassifySessionDump) (RPCService_ClassifySessionDumpClient, error)
- ClassifySetInterfaceIPTable(ctx context.Context, in *ClassifySetInterfaceIPTable) (*ClassifySetInterfaceIPTableReply, error)
- ClassifySetInterfaceL2Tables(ctx context.Context, in *ClassifySetInterfaceL2Tables) (*ClassifySetInterfaceL2TablesReply, error)
- ClassifyTableByInterface(ctx context.Context, in *ClassifyTableByInterface) (*ClassifyTableByInterfaceReply, error)
- ClassifyTableIds(ctx context.Context, in *ClassifyTableIds) (*ClassifyTableIdsReply, error)
- ClassifyTableInfo(ctx context.Context, in *ClassifyTableInfo) (*ClassifyTableInfoReply, error)
- FlowClassifyDump(ctx context.Context, in *FlowClassifyDump) (RPCService_FlowClassifyDumpClient, error)
- FlowClassifySetInterface(ctx context.Context, in *FlowClassifySetInterface) (*FlowClassifySetInterfaceReply, error)
- InputACLSetInterface(ctx context.Context, in *InputACLSetInterface) (*InputACLSetInterfaceReply, error)
- OutputACLSetInterface(ctx context.Context, in *OutputACLSetInterface) (*OutputACLSetInterfaceReply, error)
- PolicerClassifyDump(ctx context.Context, in *PolicerClassifyDump) (RPCService_PolicerClassifyDumpClient, error)
- PolicerClassifySetInterface(ctx context.Context, in *PolicerClassifySetInterface) (*PolicerClassifySetInterfaceReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) ClassifyAddDelSession(ctx context.Context, in *ClassifyAddDelSession) (*ClassifyAddDelSessionReply, error) {
- out := new(ClassifyAddDelSessionReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) ClassifyAddDelTable(ctx context.Context, in *ClassifyAddDelTable) (*ClassifyAddDelTableReply, error) {
- out := new(ClassifyAddDelTableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) ClassifySessionDump(ctx context.Context, in *ClassifySessionDump) (RPCService_ClassifySessionDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_ClassifySessionDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_ClassifySessionDumpClient interface {
- Recv() (*ClassifySessionDetails, error)
- api.Stream
-}
-
-type serviceClient_ClassifySessionDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_ClassifySessionDumpClient) Recv() (*ClassifySessionDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *ClassifySessionDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) ClassifySetInterfaceIPTable(ctx context.Context, in *ClassifySetInterfaceIPTable) (*ClassifySetInterfaceIPTableReply, error) {
- out := new(ClassifySetInterfaceIPTableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) ClassifySetInterfaceL2Tables(ctx context.Context, in *ClassifySetInterfaceL2Tables) (*ClassifySetInterfaceL2TablesReply, error) {
- out := new(ClassifySetInterfaceL2TablesReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) ClassifyTableByInterface(ctx context.Context, in *ClassifyTableByInterface) (*ClassifyTableByInterfaceReply, error) {
- out := new(ClassifyTableByInterfaceReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) ClassifyTableIds(ctx context.Context, in *ClassifyTableIds) (*ClassifyTableIdsReply, error) {
- out := new(ClassifyTableIdsReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) ClassifyTableInfo(ctx context.Context, in *ClassifyTableInfo) (*ClassifyTableInfoReply, error) {
- out := new(ClassifyTableInfoReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) FlowClassifyDump(ctx context.Context, in *FlowClassifyDump) (RPCService_FlowClassifyDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_FlowClassifyDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_FlowClassifyDumpClient interface {
- Recv() (*FlowClassifyDetails, error)
- api.Stream
-}
-
-type serviceClient_FlowClassifyDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_FlowClassifyDumpClient) Recv() (*FlowClassifyDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *FlowClassifyDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) FlowClassifySetInterface(ctx context.Context, in *FlowClassifySetInterface) (*FlowClassifySetInterfaceReply, error) {
- out := new(FlowClassifySetInterfaceReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) InputACLSetInterface(ctx context.Context, in *InputACLSetInterface) (*InputACLSetInterfaceReply, error) {
- out := new(InputACLSetInterfaceReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) OutputACLSetInterface(ctx context.Context, in *OutputACLSetInterface) (*OutputACLSetInterfaceReply, error) {
- out := new(OutputACLSetInterfaceReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) PolicerClassifyDump(ctx context.Context, in *PolicerClassifyDump) (RPCService_PolicerClassifyDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_PolicerClassifyDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_PolicerClassifyDumpClient interface {
- Recv() (*PolicerClassifyDetails, error)
- api.Stream
-}
-
-type serviceClient_PolicerClassifyDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_PolicerClassifyDumpClient) Recv() (*PolicerClassifyDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *PolicerClassifyDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) PolicerClassifySetInterface(ctx context.Context, in *PolicerClassifySetInterface) (*PolicerClassifySetInterfaceReply, error) {
- out := new(PolicerClassifySetInterfaceReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/cop/cop.ba.go b/internal/testbinapi/binapi2001/cop/cop.ba.go
deleted file mode 100644
index d05b727..0000000
--- a/internal/testbinapi/binapi2001/cop/cop.ba.go
+++ /dev/null
@@ -1,461 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/cop.api.json
-
-// Package cop contains generated bindings for API file cop.api.
-//
-// Contents:
-// 1 alias
-// 6 enums
-// 4 messages
-//
-package cop
-
-import (
- "strconv"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "cop"
- APIVersion = "1.0.1"
- VersionCrc = 0x59bc1ad8
-)
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// CopInterfaceEnableDisable defines message 'cop_interface_enable_disable'.
-type CopInterfaceEnableDisable struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
-}
-
-func (m *CopInterfaceEnableDisable) Reset() { *m = CopInterfaceEnableDisable{} }
-func (*CopInterfaceEnableDisable) GetMessageName() string { return "cop_interface_enable_disable" }
-func (*CopInterfaceEnableDisable) GetCrcString() string { return "5501adee" }
-func (*CopInterfaceEnableDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *CopInterfaceEnableDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.EnableDisable
- return size
-}
-func (m *CopInterfaceEnableDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeBool(m.EnableDisable)
- return buf.Bytes(), nil
-}
-func (m *CopInterfaceEnableDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.EnableDisable = buf.DecodeBool()
- return nil
-}
-
-// CopInterfaceEnableDisableReply defines message 'cop_interface_enable_disable_reply'.
-type CopInterfaceEnableDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *CopInterfaceEnableDisableReply) Reset() { *m = CopInterfaceEnableDisableReply{} }
-func (*CopInterfaceEnableDisableReply) GetMessageName() string {
- return "cop_interface_enable_disable_reply"
-}
-func (*CopInterfaceEnableDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*CopInterfaceEnableDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *CopInterfaceEnableDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *CopInterfaceEnableDisableReply) 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 *CopInterfaceEnableDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// CopWhitelistEnableDisable defines message 'cop_whitelist_enable_disable'.
-type CopWhitelistEnableDisable struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- FibID uint32 `binapi:"u32,name=fib_id" json:"fib_id,omitempty"`
- IP4 bool `binapi:"bool,name=ip4" json:"ip4,omitempty"`
- IP6 bool `binapi:"bool,name=ip6" json:"ip6,omitempty"`
- DefaultCop bool `binapi:"bool,name=default_cop" json:"default_cop,omitempty"`
-}
-
-func (m *CopWhitelistEnableDisable) Reset() { *m = CopWhitelistEnableDisable{} }
-func (*CopWhitelistEnableDisable) GetMessageName() string { return "cop_whitelist_enable_disable" }
-func (*CopWhitelistEnableDisable) GetCrcString() string { return "debe13ea" }
-func (*CopWhitelistEnableDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *CopWhitelistEnableDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.FibID
- size += 1 // m.IP4
- size += 1 // m.IP6
- size += 1 // m.DefaultCop
- return size
-}
-func (m *CopWhitelistEnableDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(m.FibID)
- buf.EncodeBool(m.IP4)
- buf.EncodeBool(m.IP6)
- buf.EncodeBool(m.DefaultCop)
- return buf.Bytes(), nil
-}
-func (m *CopWhitelistEnableDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.FibID = buf.DecodeUint32()
- m.IP4 = buf.DecodeBool()
- m.IP6 = buf.DecodeBool()
- m.DefaultCop = buf.DecodeBool()
- return nil
-}
-
-// CopWhitelistEnableDisableReply defines message 'cop_whitelist_enable_disable_reply'.
-type CopWhitelistEnableDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *CopWhitelistEnableDisableReply) Reset() { *m = CopWhitelistEnableDisableReply{} }
-func (*CopWhitelistEnableDisableReply) GetMessageName() string {
- return "cop_whitelist_enable_disable_reply"
-}
-func (*CopWhitelistEnableDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*CopWhitelistEnableDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *CopWhitelistEnableDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *CopWhitelistEnableDisableReply) 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 *CopWhitelistEnableDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_cop_binapi_init() }
-func file_cop_binapi_init() {
- api.RegisterMessage((*CopInterfaceEnableDisable)(nil), "cop_interface_enable_disable_5501adee")
- api.RegisterMessage((*CopInterfaceEnableDisableReply)(nil), "cop_interface_enable_disable_reply_e8d4e804")
- api.RegisterMessage((*CopWhitelistEnableDisable)(nil), "cop_whitelist_enable_disable_debe13ea")
- api.RegisterMessage((*CopWhitelistEnableDisableReply)(nil), "cop_whitelist_enable_disable_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*CopInterfaceEnableDisable)(nil),
- (*CopInterfaceEnableDisableReply)(nil),
- (*CopWhitelistEnableDisable)(nil),
- (*CopWhitelistEnableDisableReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/cop/cop_rpc.ba.go b/internal/testbinapi/binapi2001/cop/cop_rpc.ba.go
deleted file mode 100644
index 120613d..0000000
--- a/internal/testbinapi/binapi2001/cop/cop_rpc.ba.go
+++ /dev/null
@@ -1,41 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package cop
-
-import (
- "context"
-
- api "git.fd.io/govpp.git/api"
-)
-
-// RPCService defines RPC service cop.
-type RPCService interface {
- CopInterfaceEnableDisable(ctx context.Context, in *CopInterfaceEnableDisable) (*CopInterfaceEnableDisableReply, error)
- CopWhitelistEnableDisable(ctx context.Context, in *CopWhitelistEnableDisable) (*CopWhitelistEnableDisableReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) CopInterfaceEnableDisable(ctx context.Context, in *CopInterfaceEnableDisable) (*CopInterfaceEnableDisableReply, error) {
- out := new(CopInterfaceEnableDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) CopWhitelistEnableDisable(ctx context.Context, in *CopWhitelistEnableDisable) (*CopWhitelistEnableDisableReply, error) {
- out := new(CopWhitelistEnableDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/ct6/ct6.ba.go b/internal/testbinapi/binapi2001/ct6/ct6.ba.go
deleted file mode 100644
index 80727b8..0000000
--- a/internal/testbinapi/binapi2001/ct6/ct6.ba.go
+++ /dev/null
@@ -1,375 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/plugins/ct6.api.json
-
-// Package ct6 contains generated bindings for API file ct6.api.
-//
-// Contents:
-// 1 alias
-// 6 enums
-// 2 messages
-//
-package ct6
-
-import (
- "strconv"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "ct6"
- APIVersion = "1.0.0"
- VersionCrc = 0xb294742c
-)
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// Ct6EnableDisable defines message 'ct6_enable_disable'.
-type Ct6EnableDisable struct {
- EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
- IsInside bool `binapi:"bool,name=is_inside" json:"is_inside,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *Ct6EnableDisable) Reset() { *m = Ct6EnableDisable{} }
-func (*Ct6EnableDisable) GetMessageName() string { return "ct6_enable_disable" }
-func (*Ct6EnableDisable) GetCrcString() string { return "5d02ac02" }
-func (*Ct6EnableDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Ct6EnableDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.EnableDisable
- size += 1 // m.IsInside
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *Ct6EnableDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.EnableDisable)
- buf.EncodeBool(m.IsInside)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- return buf.Bytes(), nil
-}
-func (m *Ct6EnableDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.EnableDisable = buf.DecodeBool()
- m.IsInside = buf.DecodeBool()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// Ct6EnableDisableReply defines message 'ct6_enable_disable_reply'.
-type Ct6EnableDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *Ct6EnableDisableReply) Reset() { *m = Ct6EnableDisableReply{} }
-func (*Ct6EnableDisableReply) GetMessageName() string { return "ct6_enable_disable_reply" }
-func (*Ct6EnableDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*Ct6EnableDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Ct6EnableDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *Ct6EnableDisableReply) 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 *Ct6EnableDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_ct6_binapi_init() }
-func file_ct6_binapi_init() {
- api.RegisterMessage((*Ct6EnableDisable)(nil), "ct6_enable_disable_5d02ac02")
- api.RegisterMessage((*Ct6EnableDisableReply)(nil), "ct6_enable_disable_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*Ct6EnableDisable)(nil),
- (*Ct6EnableDisableReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/ct6/ct6_rpc.ba.go b/internal/testbinapi/binapi2001/ct6/ct6_rpc.ba.go
deleted file mode 100644
index fcae22d..0000000
--- a/internal/testbinapi/binapi2001/ct6/ct6_rpc.ba.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package ct6
-
-import (
- "context"
-
- api "git.fd.io/govpp.git/api"
-)
-
-// RPCService defines RPC service ct6.
-type RPCService interface {
- Ct6EnableDisable(ctx context.Context, in *Ct6EnableDisable) (*Ct6EnableDisableReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) Ct6EnableDisable(ctx context.Context, in *Ct6EnableDisable) (*Ct6EnableDisableReply, error) {
- out := new(Ct6EnableDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/dhcp/dhcp.ba.go b/internal/testbinapi/binapi2001/dhcp/dhcp.ba.go
deleted file mode 100644
index a84d4da..0000000
--- a/internal/testbinapi/binapi2001/dhcp/dhcp.ba.go
+++ /dev/null
@@ -1,2641 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/plugins/dhcp.api.json
-
-// Package dhcp contains generated bindings for API file dhcp.api.
-//
-// Contents:
-// 7 aliases
-// 13 enums
-// 12 structs
-// 1 union
-// 29 messages
-//
-package dhcp
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "dhcp"
- APIVersion = "3.0.1"
- VersionCrc = 0x96a5f046
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// DHCPClientState defines enum 'dhcp_client_state'.
-type DHCPClientState uint32
-
-const (
- DHCP_CLIENT_STATE_API_DISCOVER DHCPClientState = 1
- DHCP_CLIENT_STATE_API_REQUEST DHCPClientState = 2
- DHCP_CLIENT_STATE_API_BOUND DHCPClientState = 3
-)
-
-var (
- DHCPClientState_name = map[uint32]string{
- 1: "DHCP_CLIENT_STATE_API_DISCOVER",
- 2: "DHCP_CLIENT_STATE_API_REQUEST",
- 3: "DHCP_CLIENT_STATE_API_BOUND",
- }
- DHCPClientState_value = map[string]uint32{
- "DHCP_CLIENT_STATE_API_DISCOVER": 1,
- "DHCP_CLIENT_STATE_API_REQUEST": 2,
- "DHCP_CLIENT_STATE_API_BOUND": 3,
- }
-)
-
-func (x DHCPClientState) String() string {
- s, ok := DHCPClientState_name[uint32(x)]
- if ok {
- return s
- }
- return "DHCPClientState(" + strconv.Itoa(int(x)) + ")"
-}
-
-// Dhcpv6MsgType defines enum 'dhcpv6_msg_type'.
-type Dhcpv6MsgType uint32
-
-const (
- DHCPV6_MSG_API_SOLICIT Dhcpv6MsgType = 1
- DHCPV6_MSG_API_ADVERTISE Dhcpv6MsgType = 2
- DHCPV6_MSG_API_REQUEST Dhcpv6MsgType = 3
- DHCPV6_MSG_API_CONFIRM Dhcpv6MsgType = 4
- DHCPV6_MSG_API_RENEW Dhcpv6MsgType = 5
- DHCPV6_MSG_API_REBIND Dhcpv6MsgType = 6
- DHCPV6_MSG_API_REPLY Dhcpv6MsgType = 7
- DHCPV6_MSG_API_RELEASE Dhcpv6MsgType = 8
- DHCPV6_MSG_API_DECLINE Dhcpv6MsgType = 9
- DHCPV6_MSG_API_RECONFIGURE Dhcpv6MsgType = 10
- DHCPV6_MSG_API_INFORMATION_REQUEST Dhcpv6MsgType = 11
- DHCPV6_MSG_API_RELAY_FORW Dhcpv6MsgType = 12
- DHCPV6_MSG_API_RELAY_REPL Dhcpv6MsgType = 13
-)
-
-var (
- Dhcpv6MsgType_name = map[uint32]string{
- 1: "DHCPV6_MSG_API_SOLICIT",
- 2: "DHCPV6_MSG_API_ADVERTISE",
- 3: "DHCPV6_MSG_API_REQUEST",
- 4: "DHCPV6_MSG_API_CONFIRM",
- 5: "DHCPV6_MSG_API_RENEW",
- 6: "DHCPV6_MSG_API_REBIND",
- 7: "DHCPV6_MSG_API_REPLY",
- 8: "DHCPV6_MSG_API_RELEASE",
- 9: "DHCPV6_MSG_API_DECLINE",
- 10: "DHCPV6_MSG_API_RECONFIGURE",
- 11: "DHCPV6_MSG_API_INFORMATION_REQUEST",
- 12: "DHCPV6_MSG_API_RELAY_FORW",
- 13: "DHCPV6_MSG_API_RELAY_REPL",
- }
- Dhcpv6MsgType_value = map[string]uint32{
- "DHCPV6_MSG_API_SOLICIT": 1,
- "DHCPV6_MSG_API_ADVERTISE": 2,
- "DHCPV6_MSG_API_REQUEST": 3,
- "DHCPV6_MSG_API_CONFIRM": 4,
- "DHCPV6_MSG_API_RENEW": 5,
- "DHCPV6_MSG_API_REBIND": 6,
- "DHCPV6_MSG_API_REPLY": 7,
- "DHCPV6_MSG_API_RELEASE": 8,
- "DHCPV6_MSG_API_DECLINE": 9,
- "DHCPV6_MSG_API_RECONFIGURE": 10,
- "DHCPV6_MSG_API_INFORMATION_REQUEST": 11,
- "DHCPV6_MSG_API_RELAY_FORW": 12,
- "DHCPV6_MSG_API_RELAY_REPL": 13,
- }
-)
-
-func (x Dhcpv6MsgType) String() string {
- s, ok := Dhcpv6MsgType_name[uint32(x)]
- if ok {
- return s
- }
- return "Dhcpv6MsgType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// VssType defines enum 'vss_type'.
-type VssType uint32
-
-const (
- VSS_TYPE_API_ASCII VssType = 0
- VSS_TYPE_API_VPN_ID VssType = 1
- VSS_TYPE_API_INVALID VssType = 123
- VSS_TYPE_API_DEFAULT VssType = 255
-)
-
-var (
- VssType_name = map[uint32]string{
- 0: "VSS_TYPE_API_ASCII",
- 1: "VSS_TYPE_API_VPN_ID",
- 123: "VSS_TYPE_API_INVALID",
- 255: "VSS_TYPE_API_DEFAULT",
- }
- VssType_value = map[string]uint32{
- "VSS_TYPE_API_ASCII": 0,
- "VSS_TYPE_API_VPN_ID": 1,
- "VSS_TYPE_API_INVALID": 123,
- "VSS_TYPE_API_DEFAULT": 255,
- }
-)
-
-func (x VssType) String() string {
- s, ok := VssType_name[uint32(x)]
- if ok {
- return s
- }
- return "VssType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// MacAddress defines alias 'mac_address'.
-type MacAddress [6]uint8
-
-func ParseMacAddress(s string) (MacAddress, error) {
- var macaddr MacAddress
- mac, err := net.ParseMAC(s)
- if err != nil {
- return macaddr, err
- }
- copy(macaddr[:], mac[:])
- return macaddr, nil
-}
-
-func (x MacAddress) ToMAC() net.HardwareAddr {
- return net.HardwareAddr(x[:])
-}
-
-func (x MacAddress) String() string {
- return x.ToMAC().String()
-}
-
-func (x *MacAddress) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *MacAddress) UnmarshalText(text []byte) error {
- mac, err := ParseMacAddress(string(text))
- if err != nil {
- return err
- }
- *x = mac
- return nil
-}
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// DHCP6AddressInfo defines type 'dhcp6_address_info'.
-type DHCP6AddressInfo struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- ValidTime uint32 `binapi:"u32,name=valid_time" json:"valid_time,omitempty"`
- PreferredTime uint32 `binapi:"u32,name=preferred_time" json:"preferred_time,omitempty"`
-}
-
-// DHCP6PdPrefixInfo defines type 'dhcp6_pd_prefix_info'.
-type DHCP6PdPrefixInfo struct {
- Prefix IP6Prefix `binapi:"ip6_prefix,name=prefix" json:"prefix,omitempty"`
- ValidTime uint32 `binapi:"u32,name=valid_time" json:"valid_time,omitempty"`
- PreferredTime uint32 `binapi:"u32,name=preferred_time" json:"preferred_time,omitempty"`
-}
-
-// DHCPClient defines type 'dhcp_client'.
-type DHCPClient struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Hostname string `binapi:"string[64],name=hostname" json:"hostname,omitempty"`
- ID []byte `binapi:"u8[64],name=id" json:"id,omitempty"`
- WantDHCPEvent bool `binapi:"bool,name=want_dhcp_event" json:"want_dhcp_event,omitempty"`
- SetBroadcastFlag bool `binapi:"bool,name=set_broadcast_flag" json:"set_broadcast_flag,omitempty"`
- Dscp IPDscp `binapi:"ip_dscp,name=dscp" json:"dscp,omitempty"`
- PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
-}
-
-// DHCPLease defines type 'dhcp_lease'.
-type DHCPLease struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- State DHCPClientState `binapi:"dhcp_client_state,name=state" json:"state,omitempty"`
- IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
- Hostname string `binapi:"string[64],name=hostname" json:"hostname,omitempty"`
- MaskWidth uint8 `binapi:"u8,name=mask_width" json:"mask_width,omitempty"`
- HostAddress Address `binapi:"address,name=host_address" json:"host_address,omitempty"`
- RouterAddress Address `binapi:"address,name=router_address" json:"router_address,omitempty"`
- HostMac MacAddress `binapi:"mac_address,name=host_mac" json:"host_mac,omitempty"`
- Count uint8 `binapi:"u8,name=count" json:"-"`
- DomainServer []DomainServer `binapi:"domain_server[count],name=domain_server" json:"domain_server,omitempty"`
-}
-
-// DHCPServer defines type 'dhcp_server'.
-type DHCPServer struct {
- ServerVrfID uint32 `binapi:"u32,name=server_vrf_id" json:"server_vrf_id,omitempty"`
- DHCPServer Address `binapi:"address,name=dhcp_server" json:"dhcp_server,omitempty"`
-}
-
-// DomainServer defines type 'domain_server'.
-type DomainServer struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
-
-// DHCP6ClientsEnableDisable defines message 'dhcp6_clients_enable_disable'.
-type DHCP6ClientsEnableDisable struct {
- Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
-}
-
-func (m *DHCP6ClientsEnableDisable) Reset() { *m = DHCP6ClientsEnableDisable{} }
-func (*DHCP6ClientsEnableDisable) GetMessageName() string { return "dhcp6_clients_enable_disable" }
-func (*DHCP6ClientsEnableDisable) GetCrcString() string { return "b3e225d2" }
-func (*DHCP6ClientsEnableDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *DHCP6ClientsEnableDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.Enable
- return size
-}
-func (m *DHCP6ClientsEnableDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.Enable)
- return buf.Bytes(), nil
-}
-func (m *DHCP6ClientsEnableDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Enable = buf.DecodeBool()
- return nil
-}
-
-// DHCP6ClientsEnableDisableReply defines message 'dhcp6_clients_enable_disable_reply'.
-type DHCP6ClientsEnableDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *DHCP6ClientsEnableDisableReply) Reset() { *m = DHCP6ClientsEnableDisableReply{} }
-func (*DHCP6ClientsEnableDisableReply) GetMessageName() string {
- return "dhcp6_clients_enable_disable_reply"
-}
-func (*DHCP6ClientsEnableDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*DHCP6ClientsEnableDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *DHCP6ClientsEnableDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *DHCP6ClientsEnableDisableReply) 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 *DHCP6ClientsEnableDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// DHCP6DuidLlSet defines message 'dhcp6_duid_ll_set'.
-type DHCP6DuidLlSet struct {
- DuidLl []byte `binapi:"u8[10],name=duid_ll" json:"duid_ll,omitempty"`
-}
-
-func (m *DHCP6DuidLlSet) Reset() { *m = DHCP6DuidLlSet{} }
-func (*DHCP6DuidLlSet) GetMessageName() string { return "dhcp6_duid_ll_set" }
-func (*DHCP6DuidLlSet) GetCrcString() string { return "0f6ca323" }
-func (*DHCP6DuidLlSet) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *DHCP6DuidLlSet) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 10 // m.DuidLl
- return size
-}
-func (m *DHCP6DuidLlSet) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.DuidLl, 10)
- return buf.Bytes(), nil
-}
-func (m *DHCP6DuidLlSet) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.DuidLl = make([]byte, 10)
- copy(m.DuidLl, buf.DecodeBytes(len(m.DuidLl)))
- return nil
-}
-
-// DHCP6DuidLlSetReply defines message 'dhcp6_duid_ll_set_reply'.
-type DHCP6DuidLlSetReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *DHCP6DuidLlSetReply) Reset() { *m = DHCP6DuidLlSetReply{} }
-func (*DHCP6DuidLlSetReply) GetMessageName() string { return "dhcp6_duid_ll_set_reply" }
-func (*DHCP6DuidLlSetReply) GetCrcString() string { return "e8d4e804" }
-func (*DHCP6DuidLlSetReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *DHCP6DuidLlSetReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *DHCP6DuidLlSetReply) 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 *DHCP6DuidLlSetReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// DHCP6PdReplyEvent defines message 'dhcp6_pd_reply_event'.
-type DHCP6PdReplyEvent struct {
- PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- ServerIndex uint32 `binapi:"u32,name=server_index" json:"server_index,omitempty"`
- MsgType Dhcpv6MsgType `binapi:"dhcpv6_msg_type,name=msg_type" json:"msg_type,omitempty"`
- T1 uint32 `binapi:"u32,name=T1" json:"T1,omitempty"`
- T2 uint32 `binapi:"u32,name=T2" json:"T2,omitempty"`
- InnerStatusCode uint16 `binapi:"u16,name=inner_status_code" json:"inner_status_code,omitempty"`
- StatusCode uint16 `binapi:"u16,name=status_code" json:"status_code,omitempty"`
- Preference uint8 `binapi:"u8,name=preference" json:"preference,omitempty"`
- NPrefixes uint32 `binapi:"u32,name=n_prefixes" json:"-"`
- Prefixes []DHCP6PdPrefixInfo `binapi:"dhcp6_pd_prefix_info[n_prefixes],name=prefixes" json:"prefixes,omitempty"`
-}
-
-func (m *DHCP6PdReplyEvent) Reset() { *m = DHCP6PdReplyEvent{} }
-func (*DHCP6PdReplyEvent) GetMessageName() string { return "dhcp6_pd_reply_event" }
-func (*DHCP6PdReplyEvent) GetCrcString() string { return "cb3e462b" }
-func (*DHCP6PdReplyEvent) GetMessageType() api.MessageType {
- return api.EventMessage
-}
-
-func (m *DHCP6PdReplyEvent) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.PID
- size += 4 // m.SwIfIndex
- size += 4 // m.ServerIndex
- size += 4 // m.MsgType
- size += 4 // m.T1
- size += 4 // m.T2
- size += 2 // m.InnerStatusCode
- size += 2 // m.StatusCode
- size += 1 // m.Preference
- size += 4 // m.NPrefixes
- for j1 := 0; j1 < len(m.Prefixes); j1++ {
- var s1 DHCP6PdPrefixInfo
- _ = s1
- if j1 < len(m.Prefixes) {
- s1 = m.Prefixes[j1]
- }
- size += 1 * 16 // s1.Prefix.Address
- size += 1 // s1.Prefix.Len
- size += 4 // s1.ValidTime
- size += 4 // s1.PreferredTime
- }
- return size
-}
-func (m *DHCP6PdReplyEvent) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.PID)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(m.ServerIndex)
- buf.EncodeUint32(uint32(m.MsgType))
- buf.EncodeUint32(m.T1)
- buf.EncodeUint32(m.T2)
- buf.EncodeUint16(m.InnerStatusCode)
- buf.EncodeUint16(m.StatusCode)
- buf.EncodeUint8(m.Preference)
- buf.EncodeUint32(uint32(len(m.Prefixes)))
- for j0 := 0; j0 < len(m.Prefixes); j0++ {
- var v0 DHCP6PdPrefixInfo // Prefixes
- if j0 < len(m.Prefixes) {
- v0 = m.Prefixes[j0]
- }
- buf.EncodeBytes(v0.Prefix.Address[:], 16)
- buf.EncodeUint8(v0.Prefix.Len)
- buf.EncodeUint32(v0.ValidTime)
- buf.EncodeUint32(v0.PreferredTime)
- }
- return buf.Bytes(), nil
-}
-func (m *DHCP6PdReplyEvent) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.PID = buf.DecodeUint32()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.ServerIndex = buf.DecodeUint32()
- m.MsgType = Dhcpv6MsgType(buf.DecodeUint32())
- m.T1 = buf.DecodeUint32()
- m.T2 = buf.DecodeUint32()
- m.InnerStatusCode = buf.DecodeUint16()
- m.StatusCode = buf.DecodeUint16()
- m.Preference = buf.DecodeUint8()
- m.NPrefixes = buf.DecodeUint32()
- m.Prefixes = make([]DHCP6PdPrefixInfo, m.NPrefixes)
- for j0 := 0; j0 < len(m.Prefixes); j0++ {
- copy(m.Prefixes[j0].Prefix.Address[:], buf.DecodeBytes(16))
- m.Prefixes[j0].Prefix.Len = buf.DecodeUint8()
- m.Prefixes[j0].ValidTime = buf.DecodeUint32()
- m.Prefixes[j0].PreferredTime = buf.DecodeUint32()
- }
- return nil
-}
-
-// DHCP6PdSendClientMessage defines message 'dhcp6_pd_send_client_message'.
-type DHCP6PdSendClientMessage struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- ServerIndex uint32 `binapi:"u32,name=server_index" json:"server_index,omitempty"`
- Irt uint32 `binapi:"u32,name=irt" json:"irt,omitempty"`
- Mrt uint32 `binapi:"u32,name=mrt" json:"mrt,omitempty"`
- Mrc uint32 `binapi:"u32,name=mrc" json:"mrc,omitempty"`
- Mrd uint32 `binapi:"u32,name=mrd" json:"mrd,omitempty"`
- Stop bool `binapi:"bool,name=stop" json:"stop,omitempty"`
- MsgType Dhcpv6MsgType `binapi:"dhcpv6_msg_type,name=msg_type" json:"msg_type,omitempty"`
- T1 uint32 `binapi:"u32,name=T1" json:"T1,omitempty"`
- T2 uint32 `binapi:"u32,name=T2" json:"T2,omitempty"`
- NPrefixes uint32 `binapi:"u32,name=n_prefixes" json:"-"`
- Prefixes []DHCP6PdPrefixInfo `binapi:"dhcp6_pd_prefix_info[n_prefixes],name=prefixes" json:"prefixes,omitempty"`
-}
-
-func (m *DHCP6PdSendClientMessage) Reset() { *m = DHCP6PdSendClientMessage{} }
-func (*DHCP6PdSendClientMessage) GetMessageName() string { return "dhcp6_pd_send_client_message" }
-func (*DHCP6PdSendClientMessage) GetCrcString() string { return "064badb8" }
-func (*DHCP6PdSendClientMessage) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *DHCP6PdSendClientMessage) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.ServerIndex
- size += 4 // m.Irt
- size += 4 // m.Mrt
- size += 4 // m.Mrc
- size += 4 // m.Mrd
- size += 1 // m.Stop
- size += 4 // m.MsgType
- size += 4 // m.T1
- size += 4 // m.T2
- size += 4 // m.NPrefixes
- for j1 := 0; j1 < len(m.Prefixes); j1++ {
- var s1 DHCP6PdPrefixInfo
- _ = s1
- if j1 < len(m.Prefixes) {
- s1 = m.Prefixes[j1]
- }
- size += 1 * 16 // s1.Prefix.Address
- size += 1 // s1.Prefix.Len
- size += 4 // s1.ValidTime
- size += 4 // s1.PreferredTime
- }
- return size
-}
-func (m *DHCP6PdSendClientMessage) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(m.ServerIndex)
- buf.EncodeUint32(m.Irt)
- buf.EncodeUint32(m.Mrt)
- buf.EncodeUint32(m.Mrc)
- buf.EncodeUint32(m.Mrd)
- buf.EncodeBool(m.Stop)
- buf.EncodeUint32(uint32(m.MsgType))
- buf.EncodeUint32(m.T1)
- buf.EncodeUint32(m.T2)
- buf.EncodeUint32(uint32(len(m.Prefixes)))
- for j0 := 0; j0 < len(m.Prefixes); j0++ {
- var v0 DHCP6PdPrefixInfo // Prefixes
- if j0 < len(m.Prefixes) {
- v0 = m.Prefixes[j0]
- }
- buf.EncodeBytes(v0.Prefix.Address[:], 16)
- buf.EncodeUint8(v0.Prefix.Len)
- buf.EncodeUint32(v0.ValidTime)
- buf.EncodeUint32(v0.PreferredTime)
- }
- return buf.Bytes(), nil
-}
-func (m *DHCP6PdSendClientMessage) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.ServerIndex = buf.DecodeUint32()
- m.Irt = buf.DecodeUint32()
- m.Mrt = buf.DecodeUint32()
- m.Mrc = buf.DecodeUint32()
- m.Mrd = buf.DecodeUint32()
- m.Stop = buf.DecodeBool()
- m.MsgType = Dhcpv6MsgType(buf.DecodeUint32())
- m.T1 = buf.DecodeUint32()
- m.T2 = buf.DecodeUint32()
- m.NPrefixes = buf.DecodeUint32()
- m.Prefixes = make([]DHCP6PdPrefixInfo, m.NPrefixes)
- for j0 := 0; j0 < len(m.Prefixes); j0++ {
- copy(m.Prefixes[j0].Prefix.Address[:], buf.DecodeBytes(16))
- m.Prefixes[j0].Prefix.Len = buf.DecodeUint8()
- m.Prefixes[j0].ValidTime = buf.DecodeUint32()
- m.Prefixes[j0].PreferredTime = buf.DecodeUint32()
- }
- return nil
-}
-
-// DHCP6PdSendClientMessageReply defines message 'dhcp6_pd_send_client_message_reply'.
-type DHCP6PdSendClientMessageReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *DHCP6PdSendClientMessageReply) Reset() { *m = DHCP6PdSendClientMessageReply{} }
-func (*DHCP6PdSendClientMessageReply) GetMessageName() string {
- return "dhcp6_pd_send_client_message_reply"
-}
-func (*DHCP6PdSendClientMessageReply) GetCrcString() string { return "e8d4e804" }
-func (*DHCP6PdSendClientMessageReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *DHCP6PdSendClientMessageReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *DHCP6PdSendClientMessageReply) 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 *DHCP6PdSendClientMessageReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// DHCP6ReplyEvent defines message 'dhcp6_reply_event'.
-type DHCP6ReplyEvent struct {
- PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- ServerIndex uint32 `binapi:"u32,name=server_index" json:"server_index,omitempty"`
- MsgType Dhcpv6MsgType `binapi:"dhcpv6_msg_type,name=msg_type" json:"msg_type,omitempty"`
- T1 uint32 `binapi:"u32,name=T1" json:"T1,omitempty"`
- T2 uint32 `binapi:"u32,name=T2" json:"T2,omitempty"`
- InnerStatusCode uint16 `binapi:"u16,name=inner_status_code" json:"inner_status_code,omitempty"`
- StatusCode uint16 `binapi:"u16,name=status_code" json:"status_code,omitempty"`
- Preference uint8 `binapi:"u8,name=preference" json:"preference,omitempty"`
- NAddresses uint32 `binapi:"u32,name=n_addresses" json:"-"`
- Addresses []DHCP6AddressInfo `binapi:"dhcp6_address_info[n_addresses],name=addresses" json:"addresses,omitempty"`
-}
-
-func (m *DHCP6ReplyEvent) Reset() { *m = DHCP6ReplyEvent{} }
-func (*DHCP6ReplyEvent) GetMessageName() string { return "dhcp6_reply_event" }
-func (*DHCP6ReplyEvent) GetCrcString() string { return "9f3af9e5" }
-func (*DHCP6ReplyEvent) GetMessageType() api.MessageType {
- return api.EventMessage
-}
-
-func (m *DHCP6ReplyEvent) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.PID
- size += 4 // m.SwIfIndex
- size += 4 // m.ServerIndex
- size += 4 // m.MsgType
- size += 4 // m.T1
- size += 4 // m.T2
- size += 2 // m.InnerStatusCode
- size += 2 // m.StatusCode
- size += 1 // m.Preference
- size += 4 // m.NAddresses
- for j1 := 0; j1 < len(m.Addresses); j1++ {
- var s1 DHCP6AddressInfo
- _ = s1
- if j1 < len(m.Addresses) {
- s1 = m.Addresses[j1]
- }
- size += 1 * 16 // s1.Address
- size += 4 // s1.ValidTime
- size += 4 // s1.PreferredTime
- }
- return size
-}
-func (m *DHCP6ReplyEvent) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.PID)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(m.ServerIndex)
- buf.EncodeUint32(uint32(m.MsgType))
- buf.EncodeUint32(m.T1)
- buf.EncodeUint32(m.T2)
- buf.EncodeUint16(m.InnerStatusCode)
- buf.EncodeUint16(m.StatusCode)
- buf.EncodeUint8(m.Preference)
- buf.EncodeUint32(uint32(len(m.Addresses)))
- for j0 := 0; j0 < len(m.Addresses); j0++ {
- var v0 DHCP6AddressInfo // Addresses
- if j0 < len(m.Addresses) {
- v0 = m.Addresses[j0]
- }
- buf.EncodeBytes(v0.Address[:], 16)
- buf.EncodeUint32(v0.ValidTime)
- buf.EncodeUint32(v0.PreferredTime)
- }
- return buf.Bytes(), nil
-}
-func (m *DHCP6ReplyEvent) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.PID = buf.DecodeUint32()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.ServerIndex = buf.DecodeUint32()
- m.MsgType = Dhcpv6MsgType(buf.DecodeUint32())
- m.T1 = buf.DecodeUint32()
- m.T2 = buf.DecodeUint32()
- m.InnerStatusCode = buf.DecodeUint16()
- m.StatusCode = buf.DecodeUint16()
- m.Preference = buf.DecodeUint8()
- m.NAddresses = buf.DecodeUint32()
- m.Addresses = make([]DHCP6AddressInfo, m.NAddresses)
- for j0 := 0; j0 < len(m.Addresses); j0++ {
- copy(m.Addresses[j0].Address[:], buf.DecodeBytes(16))
- m.Addresses[j0].ValidTime = buf.DecodeUint32()
- m.Addresses[j0].PreferredTime = buf.DecodeUint32()
- }
- return nil
-}
-
-// DHCP6SendClientMessage defines message 'dhcp6_send_client_message'.
-type DHCP6SendClientMessage struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- ServerIndex uint32 `binapi:"u32,name=server_index" json:"server_index,omitempty"`
- Irt uint32 `binapi:"u32,name=irt" json:"irt,omitempty"`
- Mrt uint32 `binapi:"u32,name=mrt" json:"mrt,omitempty"`
- Mrc uint32 `binapi:"u32,name=mrc" json:"mrc,omitempty"`
- Mrd uint32 `binapi:"u32,name=mrd" json:"mrd,omitempty"`
- Stop bool `binapi:"bool,name=stop" json:"stop,omitempty"`
- MsgType Dhcpv6MsgType `binapi:"dhcpv6_msg_type,name=msg_type" json:"msg_type,omitempty"`
- T1 uint32 `binapi:"u32,name=T1" json:"T1,omitempty"`
- T2 uint32 `binapi:"u32,name=T2" json:"T2,omitempty"`
- NAddresses uint32 `binapi:"u32,name=n_addresses" json:"-"`
- Addresses []DHCP6AddressInfo `binapi:"dhcp6_address_info[n_addresses],name=addresses" json:"addresses,omitempty"`
-}
-
-func (m *DHCP6SendClientMessage) Reset() { *m = DHCP6SendClientMessage{} }
-func (*DHCP6SendClientMessage) GetMessageName() string { return "dhcp6_send_client_message" }
-func (*DHCP6SendClientMessage) GetCrcString() string { return "f6f14ef0" }
-func (*DHCP6SendClientMessage) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *DHCP6SendClientMessage) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.ServerIndex
- size += 4 // m.Irt
- size += 4 // m.Mrt
- size += 4 // m.Mrc
- size += 4 // m.Mrd
- size += 1 // m.Stop
- size += 4 // m.MsgType
- size += 4 // m.T1
- size += 4 // m.T2
- size += 4 // m.NAddresses
- for j1 := 0; j1 < len(m.Addresses); j1++ {
- var s1 DHCP6AddressInfo
- _ = s1
- if j1 < len(m.Addresses) {
- s1 = m.Addresses[j1]
- }
- size += 1 * 16 // s1.Address
- size += 4 // s1.ValidTime
- size += 4 // s1.PreferredTime
- }
- return size
-}
-func (m *DHCP6SendClientMessage) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(m.ServerIndex)
- buf.EncodeUint32(m.Irt)
- buf.EncodeUint32(m.Mrt)
- buf.EncodeUint32(m.Mrc)
- buf.EncodeUint32(m.Mrd)
- buf.EncodeBool(m.Stop)
- buf.EncodeUint32(uint32(m.MsgType))
- buf.EncodeUint32(m.T1)
- buf.EncodeUint32(m.T2)
- buf.EncodeUint32(uint32(len(m.Addresses)))
- for j0 := 0; j0 < len(m.Addresses); j0++ {
- var v0 DHCP6AddressInfo // Addresses
- if j0 < len(m.Addresses) {
- v0 = m.Addresses[j0]
- }
- buf.EncodeBytes(v0.Address[:], 16)
- buf.EncodeUint32(v0.ValidTime)
- buf.EncodeUint32(v0.PreferredTime)
- }
- return buf.Bytes(), nil
-}
-func (m *DHCP6SendClientMessage) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.ServerIndex = buf.DecodeUint32()
- m.Irt = buf.DecodeUint32()
- m.Mrt = buf.DecodeUint32()
- m.Mrc = buf.DecodeUint32()
- m.Mrd = buf.DecodeUint32()
- m.Stop = buf.DecodeBool()
- m.MsgType = Dhcpv6MsgType(buf.DecodeUint32())
- m.T1 = buf.DecodeUint32()
- m.T2 = buf.DecodeUint32()
- m.NAddresses = buf.DecodeUint32()
- m.Addresses = make([]DHCP6AddressInfo, m.NAddresses)
- for j0 := 0; j0 < len(m.Addresses); j0++ {
- copy(m.Addresses[j0].Address[:], buf.DecodeBytes(16))
- m.Addresses[j0].ValidTime = buf.DecodeUint32()
- m.Addresses[j0].PreferredTime = buf.DecodeUint32()
- }
- return nil
-}
-
-// DHCP6SendClientMessageReply defines message 'dhcp6_send_client_message_reply'.
-type DHCP6SendClientMessageReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *DHCP6SendClientMessageReply) Reset() { *m = DHCP6SendClientMessageReply{} }
-func (*DHCP6SendClientMessageReply) GetMessageName() string { return "dhcp6_send_client_message_reply" }
-func (*DHCP6SendClientMessageReply) GetCrcString() string { return "e8d4e804" }
-func (*DHCP6SendClientMessageReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *DHCP6SendClientMessageReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *DHCP6SendClientMessageReply) 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 *DHCP6SendClientMessageReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// DHCPClientConfig defines message 'dhcp_client_config'.
-type DHCPClientConfig struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- Client DHCPClient `binapi:"dhcp_client,name=client" json:"client,omitempty"`
-}
-
-func (m *DHCPClientConfig) Reset() { *m = DHCPClientConfig{} }
-func (*DHCPClientConfig) GetMessageName() string { return "dhcp_client_config" }
-func (*DHCPClientConfig) GetCrcString() string { return "959b80a3" }
-func (*DHCPClientConfig) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *DHCPClientConfig) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 4 // m.Client.SwIfIndex
- size += 64 // m.Client.Hostname
- size += 1 * 64 // m.Client.ID
- size += 1 // m.Client.WantDHCPEvent
- size += 1 // m.Client.SetBroadcastFlag
- size += 1 // m.Client.Dscp
- size += 4 // m.Client.PID
- return size
-}
-func (m *DHCPClientConfig) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeUint32(uint32(m.Client.SwIfIndex))
- buf.EncodeString(m.Client.Hostname, 64)
- buf.EncodeBytes(m.Client.ID, 64)
- buf.EncodeBool(m.Client.WantDHCPEvent)
- buf.EncodeBool(m.Client.SetBroadcastFlag)
- buf.EncodeUint8(uint8(m.Client.Dscp))
- buf.EncodeUint32(m.Client.PID)
- return buf.Bytes(), nil
-}
-func (m *DHCPClientConfig) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.Client.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Client.Hostname = buf.DecodeString(64)
- m.Client.ID = make([]byte, 64)
- copy(m.Client.ID, buf.DecodeBytes(len(m.Client.ID)))
- m.Client.WantDHCPEvent = buf.DecodeBool()
- m.Client.SetBroadcastFlag = buf.DecodeBool()
- m.Client.Dscp = IPDscp(buf.DecodeUint8())
- m.Client.PID = buf.DecodeUint32()
- return nil
-}
-
-// DHCPClientConfigReply defines message 'dhcp_client_config_reply'.
-type DHCPClientConfigReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *DHCPClientConfigReply) Reset() { *m = DHCPClientConfigReply{} }
-func (*DHCPClientConfigReply) GetMessageName() string { return "dhcp_client_config_reply" }
-func (*DHCPClientConfigReply) GetCrcString() string { return "e8d4e804" }
-func (*DHCPClientConfigReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *DHCPClientConfigReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *DHCPClientConfigReply) 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 *DHCPClientConfigReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// DHCPClientDetails defines message 'dhcp_client_details'.
-type DHCPClientDetails struct {
- Client DHCPClient `binapi:"dhcp_client,name=client" json:"client,omitempty"`
- Lease DHCPLease `binapi:"dhcp_lease,name=lease" json:"lease,omitempty"`
-}
-
-func (m *DHCPClientDetails) Reset() { *m = DHCPClientDetails{} }
-func (*DHCPClientDetails) GetMessageName() string { return "dhcp_client_details" }
-func (*DHCPClientDetails) GetCrcString() string { return "acd82f5a" }
-func (*DHCPClientDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *DHCPClientDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Client.SwIfIndex
- size += 64 // m.Client.Hostname
- size += 1 * 64 // m.Client.ID
- size += 1 // m.Client.WantDHCPEvent
- size += 1 // m.Client.SetBroadcastFlag
- size += 1 // m.Client.Dscp
- size += 4 // m.Client.PID
- size += 4 // m.Lease.SwIfIndex
- size += 4 // m.Lease.State
- size += 1 // m.Lease.IsIPv6
- size += 64 // m.Lease.Hostname
- size += 1 // m.Lease.MaskWidth
- size += 4 // m.Lease.HostAddress.Af
- size += 1 * 16 // m.Lease.HostAddress.Un
- size += 4 // m.Lease.RouterAddress.Af
- size += 1 * 16 // m.Lease.RouterAddress.Un
- size += 1 * 6 // m.Lease.HostMac
- size += 1 // m.Lease.Count
- for j2 := 0; j2 < len(m.Lease.DomainServer); j2++ {
- var s2 DomainServer
- _ = s2
- if j2 < len(m.Lease.DomainServer) {
- s2 = m.Lease.DomainServer[j2]
- }
- size += 4 // s2.Address.Af
- size += 1 * 16 // s2.Address.Un
- }
- return size
-}
-func (m *DHCPClientDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.Client.SwIfIndex))
- buf.EncodeString(m.Client.Hostname, 64)
- buf.EncodeBytes(m.Client.ID, 64)
- buf.EncodeBool(m.Client.WantDHCPEvent)
- buf.EncodeBool(m.Client.SetBroadcastFlag)
- buf.EncodeUint8(uint8(m.Client.Dscp))
- buf.EncodeUint32(m.Client.PID)
- buf.EncodeUint32(uint32(m.Lease.SwIfIndex))
- buf.EncodeUint32(uint32(m.Lease.State))
- buf.EncodeBool(m.Lease.IsIPv6)
- buf.EncodeString(m.Lease.Hostname, 64)
- buf.EncodeUint8(m.Lease.MaskWidth)
- buf.EncodeUint32(uint32(m.Lease.HostAddress.Af))
- buf.EncodeBytes(m.Lease.HostAddress.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.Lease.RouterAddress.Af))
- buf.EncodeBytes(m.Lease.RouterAddress.Un.XXX_UnionData[:], 16)
- buf.EncodeBytes(m.Lease.HostMac[:], 6)
- buf.EncodeUint8(uint8(len(m.Lease.DomainServer)))
- for j1 := 0; j1 < len(m.Lease.DomainServer); j1++ {
- var v1 DomainServer // DomainServer
- if j1 < len(m.Lease.DomainServer) {
- v1 = m.Lease.DomainServer[j1]
- }
- buf.EncodeUint32(uint32(v1.Address.Af))
- buf.EncodeBytes(v1.Address.Un.XXX_UnionData[:], 16)
- }
- return buf.Bytes(), nil
-}
-func (m *DHCPClientDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Client.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Client.Hostname = buf.DecodeString(64)
- m.Client.ID = make([]byte, 64)
- copy(m.Client.ID, buf.DecodeBytes(len(m.Client.ID)))
- m.Client.WantDHCPEvent = buf.DecodeBool()
- m.Client.SetBroadcastFlag = buf.DecodeBool()
- m.Client.Dscp = IPDscp(buf.DecodeUint8())
- m.Client.PID = buf.DecodeUint32()
- m.Lease.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Lease.State = DHCPClientState(buf.DecodeUint32())
- m.Lease.IsIPv6 = buf.DecodeBool()
- m.Lease.Hostname = buf.DecodeString(64)
- m.Lease.MaskWidth = buf.DecodeUint8()
- m.Lease.HostAddress.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Lease.HostAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Lease.RouterAddress.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Lease.RouterAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- copy(m.Lease.HostMac[:], buf.DecodeBytes(6))
- m.Lease.Count = buf.DecodeUint8()
- m.Lease.DomainServer = make([]DomainServer, m.Lease.Count)
- for j1 := 0; j1 < len(m.Lease.DomainServer); j1++ {
- m.Lease.DomainServer[j1].Address.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Lease.DomainServer[j1].Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- }
- return nil
-}
-
-// DHCPClientDump defines message 'dhcp_client_dump'.
-type DHCPClientDump struct{}
-
-func (m *DHCPClientDump) Reset() { *m = DHCPClientDump{} }
-func (*DHCPClientDump) GetMessageName() string { return "dhcp_client_dump" }
-func (*DHCPClientDump) GetCrcString() string { return "51077d14" }
-func (*DHCPClientDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *DHCPClientDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *DHCPClientDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *DHCPClientDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// DHCPComplEvent defines message 'dhcp_compl_event'.
-type DHCPComplEvent struct {
- PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
- Lease DHCPLease `binapi:"dhcp_lease,name=lease" json:"lease,omitempty"`
-}
-
-func (m *DHCPComplEvent) Reset() { *m = DHCPComplEvent{} }
-func (*DHCPComplEvent) GetMessageName() string { return "dhcp_compl_event" }
-func (*DHCPComplEvent) GetCrcString() string { return "e908fd1d" }
-func (*DHCPComplEvent) GetMessageType() api.MessageType {
- return api.EventMessage
-}
-
-func (m *DHCPComplEvent) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.PID
- size += 4 // m.Lease.SwIfIndex
- size += 4 // m.Lease.State
- size += 1 // m.Lease.IsIPv6
- size += 64 // m.Lease.Hostname
- size += 1 // m.Lease.MaskWidth
- size += 4 // m.Lease.HostAddress.Af
- size += 1 * 16 // m.Lease.HostAddress.Un
- size += 4 // m.Lease.RouterAddress.Af
- size += 1 * 16 // m.Lease.RouterAddress.Un
- size += 1 * 6 // m.Lease.HostMac
- size += 1 // m.Lease.Count
- for j2 := 0; j2 < len(m.Lease.DomainServer); j2++ {
- var s2 DomainServer
- _ = s2
- if j2 < len(m.Lease.DomainServer) {
- s2 = m.Lease.DomainServer[j2]
- }
- size += 4 // s2.Address.Af
- size += 1 * 16 // s2.Address.Un
- }
- return size
-}
-func (m *DHCPComplEvent) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.PID)
- buf.EncodeUint32(uint32(m.Lease.SwIfIndex))
- buf.EncodeUint32(uint32(m.Lease.State))
- buf.EncodeBool(m.Lease.IsIPv6)
- buf.EncodeString(m.Lease.Hostname, 64)
- buf.EncodeUint8(m.Lease.MaskWidth)
- buf.EncodeUint32(uint32(m.Lease.HostAddress.Af))
- buf.EncodeBytes(m.Lease.HostAddress.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.Lease.RouterAddress.Af))
- buf.EncodeBytes(m.Lease.RouterAddress.Un.XXX_UnionData[:], 16)
- buf.EncodeBytes(m.Lease.HostMac[:], 6)
- buf.EncodeUint8(uint8(len(m.Lease.DomainServer)))
- for j1 := 0; j1 < len(m.Lease.DomainServer); j1++ {
- var v1 DomainServer // DomainServer
- if j1 < len(m.Lease.DomainServer) {
- v1 = m.Lease.DomainServer[j1]
- }
- buf.EncodeUint32(uint32(v1.Address.Af))
- buf.EncodeBytes(v1.Address.Un.XXX_UnionData[:], 16)
- }
- return buf.Bytes(), nil
-}
-func (m *DHCPComplEvent) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.PID = buf.DecodeUint32()
- m.Lease.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Lease.State = DHCPClientState(buf.DecodeUint32())
- m.Lease.IsIPv6 = buf.DecodeBool()
- m.Lease.Hostname = buf.DecodeString(64)
- m.Lease.MaskWidth = buf.DecodeUint8()
- m.Lease.HostAddress.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Lease.HostAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Lease.RouterAddress.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Lease.RouterAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- copy(m.Lease.HostMac[:], buf.DecodeBytes(6))
- m.Lease.Count = buf.DecodeUint8()
- m.Lease.DomainServer = make([]DomainServer, m.Lease.Count)
- for j1 := 0; j1 < len(m.Lease.DomainServer); j1++ {
- m.Lease.DomainServer[j1].Address.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Lease.DomainServer[j1].Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- }
- return nil
-}
-
-// DHCPPluginControlPing defines message 'dhcp_plugin_control_ping'.
-type DHCPPluginControlPing struct{}
-
-func (m *DHCPPluginControlPing) Reset() { *m = DHCPPluginControlPing{} }
-func (*DHCPPluginControlPing) GetMessageName() string { return "dhcp_plugin_control_ping" }
-func (*DHCPPluginControlPing) GetCrcString() string { return "51077d14" }
-func (*DHCPPluginControlPing) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *DHCPPluginControlPing) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *DHCPPluginControlPing) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *DHCPPluginControlPing) Unmarshal(b []byte) error {
- return nil
-}
-
-// DHCPPluginControlPingReply defines message 'dhcp_plugin_control_ping_reply'.
-type DHCPPluginControlPingReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- ClientIndex uint32 `binapi:"u32,name=client_index" json:"client_index,omitempty"`
- VpePID uint32 `binapi:"u32,name=vpe_pid" json:"vpe_pid,omitempty"`
-}
-
-func (m *DHCPPluginControlPingReply) Reset() { *m = DHCPPluginControlPingReply{} }
-func (*DHCPPluginControlPingReply) GetMessageName() string { return "dhcp_plugin_control_ping_reply" }
-func (*DHCPPluginControlPingReply) GetCrcString() string { return "f6b0b8ca" }
-func (*DHCPPluginControlPingReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *DHCPPluginControlPingReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.ClientIndex
- size += 4 // m.VpePID
- return size
-}
-func (m *DHCPPluginControlPingReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.ClientIndex)
- buf.EncodeUint32(m.VpePID)
- return buf.Bytes(), nil
-}
-func (m *DHCPPluginControlPingReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.ClientIndex = buf.DecodeUint32()
- m.VpePID = buf.DecodeUint32()
- return nil
-}
-
-// DHCPPluginGetVersion defines message 'dhcp_plugin_get_version'.
-type DHCPPluginGetVersion struct{}
-
-func (m *DHCPPluginGetVersion) Reset() { *m = DHCPPluginGetVersion{} }
-func (*DHCPPluginGetVersion) GetMessageName() string { return "dhcp_plugin_get_version" }
-func (*DHCPPluginGetVersion) GetCrcString() string { return "51077d14" }
-func (*DHCPPluginGetVersion) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *DHCPPluginGetVersion) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *DHCPPluginGetVersion) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *DHCPPluginGetVersion) Unmarshal(b []byte) error {
- return nil
-}
-
-// DHCPPluginGetVersionReply defines message 'dhcp_plugin_get_version_reply'.
-type DHCPPluginGetVersionReply struct {
- Major uint32 `binapi:"u32,name=major" json:"major,omitempty"`
- Minor uint32 `binapi:"u32,name=minor" json:"minor,omitempty"`
-}
-
-func (m *DHCPPluginGetVersionReply) Reset() { *m = DHCPPluginGetVersionReply{} }
-func (*DHCPPluginGetVersionReply) GetMessageName() string { return "dhcp_plugin_get_version_reply" }
-func (*DHCPPluginGetVersionReply) GetCrcString() string { return "9b32cf86" }
-func (*DHCPPluginGetVersionReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *DHCPPluginGetVersionReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Major
- size += 4 // m.Minor
- return size
-}
-func (m *DHCPPluginGetVersionReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Major)
- buf.EncodeUint32(m.Minor)
- return buf.Bytes(), nil
-}
-func (m *DHCPPluginGetVersionReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Major = buf.DecodeUint32()
- m.Minor = buf.DecodeUint32()
- return nil
-}
-
-// DHCPProxyConfig defines message 'dhcp_proxy_config'.
-type DHCPProxyConfig struct {
- RxVrfID uint32 `binapi:"u32,name=rx_vrf_id" json:"rx_vrf_id,omitempty"`
- ServerVrfID uint32 `binapi:"u32,name=server_vrf_id" json:"server_vrf_id,omitempty"`
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- DHCPServer Address `binapi:"address,name=dhcp_server" json:"dhcp_server,omitempty"`
- DHCPSrcAddress Address `binapi:"address,name=dhcp_src_address" json:"dhcp_src_address,omitempty"`
-}
-
-func (m *DHCPProxyConfig) Reset() { *m = DHCPProxyConfig{} }
-func (*DHCPProxyConfig) GetMessageName() string { return "dhcp_proxy_config" }
-func (*DHCPProxyConfig) GetCrcString() string { return "6767230e" }
-func (*DHCPProxyConfig) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *DHCPProxyConfig) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.RxVrfID
- size += 4 // m.ServerVrfID
- size += 1 // m.IsAdd
- size += 4 // m.DHCPServer.Af
- size += 1 * 16 // m.DHCPServer.Un
- size += 4 // m.DHCPSrcAddress.Af
- size += 1 * 16 // m.DHCPSrcAddress.Un
- return size
-}
-func (m *DHCPProxyConfig) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.RxVrfID)
- buf.EncodeUint32(m.ServerVrfID)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeUint32(uint32(m.DHCPServer.Af))
- buf.EncodeBytes(m.DHCPServer.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.DHCPSrcAddress.Af))
- buf.EncodeBytes(m.DHCPSrcAddress.Un.XXX_UnionData[:], 16)
- return buf.Bytes(), nil
-}
-func (m *DHCPProxyConfig) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.RxVrfID = buf.DecodeUint32()
- m.ServerVrfID = buf.DecodeUint32()
- m.IsAdd = buf.DecodeBool()
- m.DHCPServer.Af = AddressFamily(buf.DecodeUint32())
- copy(m.DHCPServer.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.DHCPSrcAddress.Af = AddressFamily(buf.DecodeUint32())
- copy(m.DHCPSrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- return nil
-}
-
-// DHCPProxyConfigReply defines message 'dhcp_proxy_config_reply'.
-type DHCPProxyConfigReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *DHCPProxyConfigReply) Reset() { *m = DHCPProxyConfigReply{} }
-func (*DHCPProxyConfigReply) GetMessageName() string { return "dhcp_proxy_config_reply" }
-func (*DHCPProxyConfigReply) GetCrcString() string { return "e8d4e804" }
-func (*DHCPProxyConfigReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *DHCPProxyConfigReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *DHCPProxyConfigReply) 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 *DHCPProxyConfigReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// DHCPProxyDetails defines message 'dhcp_proxy_details'.
-type DHCPProxyDetails struct {
- RxVrfID uint32 `binapi:"u32,name=rx_vrf_id" json:"rx_vrf_id,omitempty"`
- VssOui uint32 `binapi:"u32,name=vss_oui" json:"vss_oui,omitempty"`
- VssFibID uint32 `binapi:"u32,name=vss_fib_id" json:"vss_fib_id,omitempty"`
- VssType VssType `binapi:"vss_type,name=vss_type" json:"vss_type,omitempty"`
- IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
- VssVPNAsciiID string `binapi:"string[129],name=vss_vpn_ascii_id" json:"vss_vpn_ascii_id,omitempty"`
- DHCPSrcAddress Address `binapi:"address,name=dhcp_src_address" json:"dhcp_src_address,omitempty"`
- Count uint8 `binapi:"u8,name=count" json:"-"`
- Servers []DHCPServer `binapi:"dhcp_server[count],name=servers" json:"servers,omitempty"`
-}
-
-func (m *DHCPProxyDetails) Reset() { *m = DHCPProxyDetails{} }
-func (*DHCPProxyDetails) GetMessageName() string { return "dhcp_proxy_details" }
-func (*DHCPProxyDetails) GetCrcString() string { return "ce16f044" }
-func (*DHCPProxyDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *DHCPProxyDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.RxVrfID
- size += 4 // m.VssOui
- size += 4 // m.VssFibID
- size += 4 // m.VssType
- size += 1 // m.IsIPv6
- size += 129 // m.VssVPNAsciiID
- size += 4 // m.DHCPSrcAddress.Af
- size += 1 * 16 // m.DHCPSrcAddress.Un
- size += 1 // m.Count
- for j1 := 0; j1 < len(m.Servers); j1++ {
- var s1 DHCPServer
- _ = s1
- if j1 < len(m.Servers) {
- s1 = m.Servers[j1]
- }
- size += 4 // s1.ServerVrfID
- size += 4 // s1.DHCPServer.Af
- size += 1 * 16 // s1.DHCPServer.Un
- }
- return size
-}
-func (m *DHCPProxyDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.RxVrfID)
- buf.EncodeUint32(m.VssOui)
- buf.EncodeUint32(m.VssFibID)
- buf.EncodeUint32(uint32(m.VssType))
- buf.EncodeBool(m.IsIPv6)
- buf.EncodeString(m.VssVPNAsciiID, 129)
- buf.EncodeUint32(uint32(m.DHCPSrcAddress.Af))
- buf.EncodeBytes(m.DHCPSrcAddress.Un.XXX_UnionData[:], 16)
- buf.EncodeUint8(uint8(len(m.Servers)))
- for j0 := 0; j0 < len(m.Servers); j0++ {
- var v0 DHCPServer // Servers
- if j0 < len(m.Servers) {
- v0 = m.Servers[j0]
- }
- buf.EncodeUint32(v0.ServerVrfID)
- buf.EncodeUint32(uint32(v0.DHCPServer.Af))
- buf.EncodeBytes(v0.DHCPServer.Un.XXX_UnionData[:], 16)
- }
- return buf.Bytes(), nil
-}
-func (m *DHCPProxyDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.RxVrfID = buf.DecodeUint32()
- m.VssOui = buf.DecodeUint32()
- m.VssFibID = buf.DecodeUint32()
- m.VssType = VssType(buf.DecodeUint32())
- m.IsIPv6 = buf.DecodeBool()
- m.VssVPNAsciiID = buf.DecodeString(129)
- m.DHCPSrcAddress.Af = AddressFamily(buf.DecodeUint32())
- copy(m.DHCPSrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Count = buf.DecodeUint8()
- m.Servers = make([]DHCPServer, m.Count)
- for j0 := 0; j0 < len(m.Servers); j0++ {
- m.Servers[j0].ServerVrfID = buf.DecodeUint32()
- m.Servers[j0].DHCPServer.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Servers[j0].DHCPServer.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- }
- return nil
-}
-
-// DHCPProxyDump defines message 'dhcp_proxy_dump'.
-type DHCPProxyDump struct {
- IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
-}
-
-func (m *DHCPProxyDump) Reset() { *m = DHCPProxyDump{} }
-func (*DHCPProxyDump) GetMessageName() string { return "dhcp_proxy_dump" }
-func (*DHCPProxyDump) GetCrcString() string { return "5c5b063f" }
-func (*DHCPProxyDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *DHCPProxyDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsIP6
- return size
-}
-func (m *DHCPProxyDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsIP6)
- return buf.Bytes(), nil
-}
-func (m *DHCPProxyDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsIP6 = buf.DecodeBool()
- return nil
-}
-
-// DHCPProxySetVss defines message 'dhcp_proxy_set_vss'.
-type DHCPProxySetVss struct {
- TblID uint32 `binapi:"u32,name=tbl_id" json:"tbl_id,omitempty"`
- VssType VssType `binapi:"vss_type,name=vss_type" json:"vss_type,omitempty"`
- VPNAsciiID string `binapi:"string[129],name=vpn_ascii_id" json:"vpn_ascii_id,omitempty"`
- Oui uint32 `binapi:"u32,name=oui" json:"oui,omitempty"`
- VPNIndex uint32 `binapi:"u32,name=vpn_index" json:"vpn_index,omitempty"`
- IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
-}
-
-func (m *DHCPProxySetVss) Reset() { *m = DHCPProxySetVss{} }
-func (*DHCPProxySetVss) GetMessageName() string { return "dhcp_proxy_set_vss" }
-func (*DHCPProxySetVss) GetCrcString() string { return "50537301" }
-func (*DHCPProxySetVss) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *DHCPProxySetVss) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.TblID
- size += 4 // m.VssType
- size += 129 // m.VPNAsciiID
- size += 4 // m.Oui
- size += 4 // m.VPNIndex
- size += 1 // m.IsIPv6
- size += 1 // m.IsAdd
- return size
-}
-func (m *DHCPProxySetVss) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.TblID)
- buf.EncodeUint32(uint32(m.VssType))
- buf.EncodeString(m.VPNAsciiID, 129)
- buf.EncodeUint32(m.Oui)
- buf.EncodeUint32(m.VPNIndex)
- buf.EncodeBool(m.IsIPv6)
- buf.EncodeBool(m.IsAdd)
- return buf.Bytes(), nil
-}
-func (m *DHCPProxySetVss) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.TblID = buf.DecodeUint32()
- m.VssType = VssType(buf.DecodeUint32())
- m.VPNAsciiID = buf.DecodeString(129)
- m.Oui = buf.DecodeUint32()
- m.VPNIndex = buf.DecodeUint32()
- m.IsIPv6 = buf.DecodeBool()
- m.IsAdd = buf.DecodeBool()
- return nil
-}
-
-// DHCPProxySetVssReply defines message 'dhcp_proxy_set_vss_reply'.
-type DHCPProxySetVssReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *DHCPProxySetVssReply) Reset() { *m = DHCPProxySetVssReply{} }
-func (*DHCPProxySetVssReply) GetMessageName() string { return "dhcp_proxy_set_vss_reply" }
-func (*DHCPProxySetVssReply) GetCrcString() string { return "e8d4e804" }
-func (*DHCPProxySetVssReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *DHCPProxySetVssReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *DHCPProxySetVssReply) 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 *DHCPProxySetVssReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// WantDHCP6PdReplyEvents defines message 'want_dhcp6_pd_reply_events'.
-type WantDHCP6PdReplyEvents struct {
- EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
- PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
-}
-
-func (m *WantDHCP6PdReplyEvents) Reset() { *m = WantDHCP6PdReplyEvents{} }
-func (*WantDHCP6PdReplyEvents) GetMessageName() string { return "want_dhcp6_pd_reply_events" }
-func (*WantDHCP6PdReplyEvents) GetCrcString() string { return "c5e2af94" }
-func (*WantDHCP6PdReplyEvents) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *WantDHCP6PdReplyEvents) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.EnableDisable
- size += 4 // m.PID
- return size
-}
-func (m *WantDHCP6PdReplyEvents) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.EnableDisable)
- buf.EncodeUint32(m.PID)
- return buf.Bytes(), nil
-}
-func (m *WantDHCP6PdReplyEvents) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.EnableDisable = buf.DecodeBool()
- m.PID = buf.DecodeUint32()
- return nil
-}
-
-// WantDHCP6PdReplyEventsReply defines message 'want_dhcp6_pd_reply_events_reply'.
-type WantDHCP6PdReplyEventsReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *WantDHCP6PdReplyEventsReply) Reset() { *m = WantDHCP6PdReplyEventsReply{} }
-func (*WantDHCP6PdReplyEventsReply) GetMessageName() string {
- return "want_dhcp6_pd_reply_events_reply"
-}
-func (*WantDHCP6PdReplyEventsReply) GetCrcString() string { return "e8d4e804" }
-func (*WantDHCP6PdReplyEventsReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *WantDHCP6PdReplyEventsReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *WantDHCP6PdReplyEventsReply) 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 *WantDHCP6PdReplyEventsReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// WantDHCP6ReplyEvents defines message 'want_dhcp6_reply_events'.
-type WantDHCP6ReplyEvents struct {
- EnableDisable uint8 `binapi:"u8,name=enable_disable" json:"enable_disable,omitempty"`
- PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
-}
-
-func (m *WantDHCP6ReplyEvents) Reset() { *m = WantDHCP6ReplyEvents{} }
-func (*WantDHCP6ReplyEvents) GetMessageName() string { return "want_dhcp6_reply_events" }
-func (*WantDHCP6ReplyEvents) GetCrcString() string { return "05b454b5" }
-func (*WantDHCP6ReplyEvents) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *WantDHCP6ReplyEvents) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.EnableDisable
- size += 4 // m.PID
- return size
-}
-func (m *WantDHCP6ReplyEvents) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.EnableDisable)
- buf.EncodeUint32(m.PID)
- return buf.Bytes(), nil
-}
-func (m *WantDHCP6ReplyEvents) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.EnableDisable = buf.DecodeUint8()
- m.PID = buf.DecodeUint32()
- return nil
-}
-
-// WantDHCP6ReplyEventsReply defines message 'want_dhcp6_reply_events_reply'.
-type WantDHCP6ReplyEventsReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *WantDHCP6ReplyEventsReply) Reset() { *m = WantDHCP6ReplyEventsReply{} }
-func (*WantDHCP6ReplyEventsReply) GetMessageName() string { return "want_dhcp6_reply_events_reply" }
-func (*WantDHCP6ReplyEventsReply) GetCrcString() string { return "e8d4e804" }
-func (*WantDHCP6ReplyEventsReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *WantDHCP6ReplyEventsReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *WantDHCP6ReplyEventsReply) 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 *WantDHCP6ReplyEventsReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_dhcp_binapi_init() }
-func file_dhcp_binapi_init() {
- api.RegisterMessage((*DHCP6ClientsEnableDisable)(nil), "dhcp6_clients_enable_disable_b3e225d2")
- api.RegisterMessage((*DHCP6ClientsEnableDisableReply)(nil), "dhcp6_clients_enable_disable_reply_e8d4e804")
- api.RegisterMessage((*DHCP6DuidLlSet)(nil), "dhcp6_duid_ll_set_0f6ca323")
- api.RegisterMessage((*DHCP6DuidLlSetReply)(nil), "dhcp6_duid_ll_set_reply_e8d4e804")
- api.RegisterMessage((*DHCP6PdReplyEvent)(nil), "dhcp6_pd_reply_event_cb3e462b")
- api.RegisterMessage((*DHCP6PdSendClientMessage)(nil), "dhcp6_pd_send_client_message_064badb8")
- api.RegisterMessage((*DHCP6PdSendClientMessageReply)(nil), "dhcp6_pd_send_client_message_reply_e8d4e804")
- api.RegisterMessage((*DHCP6ReplyEvent)(nil), "dhcp6_reply_event_9f3af9e5")
- api.RegisterMessage((*DHCP6SendClientMessage)(nil), "dhcp6_send_client_message_f6f14ef0")
- api.RegisterMessage((*DHCP6SendClientMessageReply)(nil), "dhcp6_send_client_message_reply_e8d4e804")
- api.RegisterMessage((*DHCPClientConfig)(nil), "dhcp_client_config_959b80a3")
- api.RegisterMessage((*DHCPClientConfigReply)(nil), "dhcp_client_config_reply_e8d4e804")
- api.RegisterMessage((*DHCPClientDetails)(nil), "dhcp_client_details_acd82f5a")
- api.RegisterMessage((*DHCPClientDump)(nil), "dhcp_client_dump_51077d14")
- api.RegisterMessage((*DHCPComplEvent)(nil), "dhcp_compl_event_e908fd1d")
- api.RegisterMessage((*DHCPPluginControlPing)(nil), "dhcp_plugin_control_ping_51077d14")
- api.RegisterMessage((*DHCPPluginControlPingReply)(nil), "dhcp_plugin_control_ping_reply_f6b0b8ca")
- api.RegisterMessage((*DHCPPluginGetVersion)(nil), "dhcp_plugin_get_version_51077d14")
- api.RegisterMessage((*DHCPPluginGetVersionReply)(nil), "dhcp_plugin_get_version_reply_9b32cf86")
- api.RegisterMessage((*DHCPProxyConfig)(nil), "dhcp_proxy_config_6767230e")
- api.RegisterMessage((*DHCPProxyConfigReply)(nil), "dhcp_proxy_config_reply_e8d4e804")
- api.RegisterMessage((*DHCPProxyDetails)(nil), "dhcp_proxy_details_ce16f044")
- api.RegisterMessage((*DHCPProxyDump)(nil), "dhcp_proxy_dump_5c5b063f")
- api.RegisterMessage((*DHCPProxySetVss)(nil), "dhcp_proxy_set_vss_50537301")
- api.RegisterMessage((*DHCPProxySetVssReply)(nil), "dhcp_proxy_set_vss_reply_e8d4e804")
- api.RegisterMessage((*WantDHCP6PdReplyEvents)(nil), "want_dhcp6_pd_reply_events_c5e2af94")
- api.RegisterMessage((*WantDHCP6PdReplyEventsReply)(nil), "want_dhcp6_pd_reply_events_reply_e8d4e804")
- api.RegisterMessage((*WantDHCP6ReplyEvents)(nil), "want_dhcp6_reply_events_05b454b5")
- api.RegisterMessage((*WantDHCP6ReplyEventsReply)(nil), "want_dhcp6_reply_events_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*DHCP6ClientsEnableDisable)(nil),
- (*DHCP6ClientsEnableDisableReply)(nil),
- (*DHCP6DuidLlSet)(nil),
- (*DHCP6DuidLlSetReply)(nil),
- (*DHCP6PdReplyEvent)(nil),
- (*DHCP6PdSendClientMessage)(nil),
- (*DHCP6PdSendClientMessageReply)(nil),
- (*DHCP6ReplyEvent)(nil),
- (*DHCP6SendClientMessage)(nil),
- (*DHCP6SendClientMessageReply)(nil),
- (*DHCPClientConfig)(nil),
- (*DHCPClientConfigReply)(nil),
- (*DHCPClientDetails)(nil),
- (*DHCPClientDump)(nil),
- (*DHCPComplEvent)(nil),
- (*DHCPPluginControlPing)(nil),
- (*DHCPPluginControlPingReply)(nil),
- (*DHCPPluginGetVersion)(nil),
- (*DHCPPluginGetVersionReply)(nil),
- (*DHCPProxyConfig)(nil),
- (*DHCPProxyConfigReply)(nil),
- (*DHCPProxyDetails)(nil),
- (*DHCPProxyDump)(nil),
- (*DHCPProxySetVss)(nil),
- (*DHCPProxySetVssReply)(nil),
- (*WantDHCP6PdReplyEvents)(nil),
- (*WantDHCP6PdReplyEventsReply)(nil),
- (*WantDHCP6ReplyEvents)(nil),
- (*WantDHCP6ReplyEventsReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/dhcp/dhcp_rpc.ba.go b/internal/testbinapi/binapi2001/dhcp/dhcp_rpc.ba.go
deleted file mode 100644
index 25918a0..0000000
--- a/internal/testbinapi/binapi2001/dhcp/dhcp_rpc.ba.go
+++ /dev/null
@@ -1,222 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package dhcp
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service dhcp.
-type RPCService interface {
- DHCP6ClientsEnableDisable(ctx context.Context, in *DHCP6ClientsEnableDisable) (*DHCP6ClientsEnableDisableReply, error)
- DHCP6DuidLlSet(ctx context.Context, in *DHCP6DuidLlSet) (*DHCP6DuidLlSetReply, error)
- DHCP6PdSendClientMessage(ctx context.Context, in *DHCP6PdSendClientMessage) (*DHCP6PdSendClientMessageReply, error)
- DHCP6SendClientMessage(ctx context.Context, in *DHCP6SendClientMessage) (*DHCP6SendClientMessageReply, error)
- DHCPClientConfig(ctx context.Context, in *DHCPClientConfig) (*DHCPClientConfigReply, error)
- DHCPClientDump(ctx context.Context, in *DHCPClientDump) (RPCService_DHCPClientDumpClient, error)
- DHCPPluginControlPing(ctx context.Context, in *DHCPPluginControlPing) (*DHCPPluginControlPingReply, error)
- DHCPPluginGetVersion(ctx context.Context, in *DHCPPluginGetVersion) (*DHCPPluginGetVersionReply, error)
- DHCPProxyConfig(ctx context.Context, in *DHCPProxyConfig) (*DHCPProxyConfigReply, error)
- DHCPProxyDump(ctx context.Context, in *DHCPProxyDump) (RPCService_DHCPProxyDumpClient, error)
- DHCPProxySetVss(ctx context.Context, in *DHCPProxySetVss) (*DHCPProxySetVssReply, error)
- WantDHCP6PdReplyEvents(ctx context.Context, in *WantDHCP6PdReplyEvents) (*WantDHCP6PdReplyEventsReply, error)
- WantDHCP6ReplyEvents(ctx context.Context, in *WantDHCP6ReplyEvents) (*WantDHCP6ReplyEventsReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) DHCP6ClientsEnableDisable(ctx context.Context, in *DHCP6ClientsEnableDisable) (*DHCP6ClientsEnableDisableReply, error) {
- out := new(DHCP6ClientsEnableDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) DHCP6DuidLlSet(ctx context.Context, in *DHCP6DuidLlSet) (*DHCP6DuidLlSetReply, error) {
- out := new(DHCP6DuidLlSetReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) DHCP6PdSendClientMessage(ctx context.Context, in *DHCP6PdSendClientMessage) (*DHCP6PdSendClientMessageReply, error) {
- out := new(DHCP6PdSendClientMessageReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) DHCP6SendClientMessage(ctx context.Context, in *DHCP6SendClientMessage) (*DHCP6SendClientMessageReply, error) {
- out := new(DHCP6SendClientMessageReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) DHCPClientConfig(ctx context.Context, in *DHCPClientConfig) (*DHCPClientConfigReply, error) {
- out := new(DHCPClientConfigReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) DHCPClientDump(ctx context.Context, in *DHCPClientDump) (RPCService_DHCPClientDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_DHCPClientDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_DHCPClientDumpClient interface {
- Recv() (*DHCPClientDetails, error)
- api.Stream
-}
-
-type serviceClient_DHCPClientDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_DHCPClientDumpClient) Recv() (*DHCPClientDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *DHCPClientDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) DHCPPluginControlPing(ctx context.Context, in *DHCPPluginControlPing) (*DHCPPluginControlPingReply, error) {
- out := new(DHCPPluginControlPingReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) DHCPPluginGetVersion(ctx context.Context, in *DHCPPluginGetVersion) (*DHCPPluginGetVersionReply, error) {
- out := new(DHCPPluginGetVersionReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) DHCPProxyConfig(ctx context.Context, in *DHCPProxyConfig) (*DHCPProxyConfigReply, error) {
- out := new(DHCPProxyConfigReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) DHCPProxyDump(ctx context.Context, in *DHCPProxyDump) (RPCService_DHCPProxyDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_DHCPProxyDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_DHCPProxyDumpClient interface {
- Recv() (*DHCPProxyDetails, error)
- api.Stream
-}
-
-type serviceClient_DHCPProxyDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_DHCPProxyDumpClient) Recv() (*DHCPProxyDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *DHCPProxyDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) DHCPProxySetVss(ctx context.Context, in *DHCPProxySetVss) (*DHCPProxySetVssReply, error) {
- out := new(DHCPProxySetVssReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) WantDHCP6PdReplyEvents(ctx context.Context, in *WantDHCP6PdReplyEvents) (*WantDHCP6PdReplyEventsReply, error) {
- out := new(WantDHCP6PdReplyEventsReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) WantDHCP6ReplyEvents(ctx context.Context, in *WantDHCP6ReplyEvents) (*WantDHCP6ReplyEventsReply, error) {
- out := new(WantDHCP6ReplyEventsReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/dhcp6_ia_na_client_cp/dhcp6_ia_na_client_cp.ba.go b/internal/testbinapi/binapi2001/dhcp6_ia_na_client_cp/dhcp6_ia_na_client_cp.ba.go
deleted file mode 100644
index 7d25a0d..0000000
--- a/internal/testbinapi/binapi2001/dhcp6_ia_na_client_cp/dhcp6_ia_na_client_cp.ba.go
+++ /dev/null
@@ -1,373 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/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.
-//
-// Contents:
-// 1 alias
-// 6 enums
-// 2 messages
-//
-package dhcp6_ia_na_client_cp
-
-import (
- "strconv"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "dhcp6_ia_na_client_cp"
- APIVersion = "1.0.1"
- VersionCrc = 0x541d3edd
-)
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// DHCP6ClientEnableDisable defines message 'dhcp6_client_enable_disable'.
-type DHCP6ClientEnableDisable struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
-}
-
-func (m *DHCP6ClientEnableDisable) Reset() { *m = DHCP6ClientEnableDisable{} }
-func (*DHCP6ClientEnableDisable) GetMessageName() string { return "dhcp6_client_enable_disable" }
-func (*DHCP6ClientEnableDisable) GetCrcString() string { return "ae6cfcfb" }
-func (*DHCP6ClientEnableDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *DHCP6ClientEnableDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.Enable
- return size
-}
-func (m *DHCP6ClientEnableDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeBool(m.Enable)
- return buf.Bytes(), nil
-}
-func (m *DHCP6ClientEnableDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Enable = buf.DecodeBool()
- return nil
-}
-
-// DHCP6ClientEnableDisableReply defines message 'dhcp6_client_enable_disable_reply'.
-type DHCP6ClientEnableDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *DHCP6ClientEnableDisableReply) Reset() { *m = DHCP6ClientEnableDisableReply{} }
-func (*DHCP6ClientEnableDisableReply) GetMessageName() string {
- return "dhcp6_client_enable_disable_reply"
-}
-func (*DHCP6ClientEnableDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*DHCP6ClientEnableDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *DHCP6ClientEnableDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *DHCP6ClientEnableDisableReply) 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 *DHCP6ClientEnableDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_dhcp6_ia_na_client_cp_binapi_init() }
-func file_dhcp6_ia_na_client_cp_binapi_init() {
- api.RegisterMessage((*DHCP6ClientEnableDisable)(nil), "dhcp6_client_enable_disable_ae6cfcfb")
- api.RegisterMessage((*DHCP6ClientEnableDisableReply)(nil), "dhcp6_client_enable_disable_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*DHCP6ClientEnableDisable)(nil),
- (*DHCP6ClientEnableDisableReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/dhcp6_ia_na_client_cp/dhcp6_ia_na_client_cp_rpc.ba.go b/internal/testbinapi/binapi2001/dhcp6_ia_na_client_cp/dhcp6_ia_na_client_cp_rpc.ba.go
deleted file mode 100644
index 3fbf238..0000000
--- a/internal/testbinapi/binapi2001/dhcp6_ia_na_client_cp/dhcp6_ia_na_client_cp_rpc.ba.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package dhcp6_ia_na_client_cp
-
-import (
- "context"
-
- api "git.fd.io/govpp.git/api"
-)
-
-// RPCService defines RPC service dhcp6_ia_na_client_cp.
-type RPCService interface {
- DHCP6ClientEnableDisable(ctx context.Context, in *DHCP6ClientEnableDisable) (*DHCP6ClientEnableDisableReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) DHCP6ClientEnableDisable(ctx context.Context, in *DHCP6ClientEnableDisable) (*DHCP6ClientEnableDisableReply, error) {
- out := new(DHCP6ClientEnableDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/dhcp6_pd_client_cp/dhcp6_pd_client_cp.ba.go b/internal/testbinapi/binapi2001/dhcp6_pd_client_cp/dhcp6_pd_client_cp.ba.go
deleted file mode 100644
index 0dc6920..0000000
--- a/internal/testbinapi/binapi2001/dhcp6_pd_client_cp/dhcp6_pd_client_cp.ba.go
+++ /dev/null
@@ -1,1060 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/plugins/dhcp6_pd_client_cp.api.json
-
-// Package dhcp6_pd_client_cp contains generated bindings for API file dhcp6_pd_client_cp.api.
-//
-// Contents:
-// 6 aliases
-// 10 enums
-// 6 structs
-// 1 union
-// 4 messages
-//
-package dhcp6_pd_client_cp
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "dhcp6_pd_client_cp"
- APIVersion = "2.0.0"
- VersionCrc = 0xb44ae848
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
-
-// DHCP6PdClientEnableDisable defines message 'dhcp6_pd_client_enable_disable'.
-type DHCP6PdClientEnableDisable struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- PrefixGroup string `binapi:"string[64],name=prefix_group" json:"prefix_group,omitempty"`
- Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
-}
-
-func (m *DHCP6PdClientEnableDisable) Reset() { *m = DHCP6PdClientEnableDisable{} }
-func (*DHCP6PdClientEnableDisable) GetMessageName() string { return "dhcp6_pd_client_enable_disable" }
-func (*DHCP6PdClientEnableDisable) GetCrcString() string { return "a75a0772" }
-func (*DHCP6PdClientEnableDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *DHCP6PdClientEnableDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 64 // m.PrefixGroup
- size += 1 // m.Enable
- return size
-}
-func (m *DHCP6PdClientEnableDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeString(m.PrefixGroup, 64)
- buf.EncodeBool(m.Enable)
- return buf.Bytes(), nil
-}
-func (m *DHCP6PdClientEnableDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.PrefixGroup = buf.DecodeString(64)
- m.Enable = buf.DecodeBool()
- return nil
-}
-
-// DHCP6PdClientEnableDisableReply defines message 'dhcp6_pd_client_enable_disable_reply'.
-type DHCP6PdClientEnableDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *DHCP6PdClientEnableDisableReply) Reset() { *m = DHCP6PdClientEnableDisableReply{} }
-func (*DHCP6PdClientEnableDisableReply) GetMessageName() string {
- return "dhcp6_pd_client_enable_disable_reply"
-}
-func (*DHCP6PdClientEnableDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*DHCP6PdClientEnableDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *DHCP6PdClientEnableDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *DHCP6PdClientEnableDisableReply) 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 *DHCP6PdClientEnableDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// IP6AddDelAddressUsingPrefix defines message 'ip6_add_del_address_using_prefix'.
-type IP6AddDelAddressUsingPrefix struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- PrefixGroup string `binapi:"string[64],name=prefix_group" json:"prefix_group,omitempty"`
- AddressWithPrefix IP6AddressWithPrefix `binapi:"ip6_address_with_prefix,name=address_with_prefix" json:"address_with_prefix,omitempty"`
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
-}
-
-func (m *IP6AddDelAddressUsingPrefix) Reset() { *m = IP6AddDelAddressUsingPrefix{} }
-func (*IP6AddDelAddressUsingPrefix) GetMessageName() string {
- return "ip6_add_del_address_using_prefix"
-}
-func (*IP6AddDelAddressUsingPrefix) GetCrcString() string { return "9b3d11e0" }
-func (*IP6AddDelAddressUsingPrefix) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IP6AddDelAddressUsingPrefix) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 64 // m.PrefixGroup
- size += 1 * 16 // m.AddressWithPrefix.Address
- size += 1 // m.AddressWithPrefix.Len
- size += 1 // m.IsAdd
- return size
-}
-func (m *IP6AddDelAddressUsingPrefix) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeString(m.PrefixGroup, 64)
- buf.EncodeBytes(m.AddressWithPrefix.Address[:], 16)
- buf.EncodeUint8(m.AddressWithPrefix.Len)
- buf.EncodeBool(m.IsAdd)
- return buf.Bytes(), nil
-}
-func (m *IP6AddDelAddressUsingPrefix) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.PrefixGroup = buf.DecodeString(64)
- copy(m.AddressWithPrefix.Address[:], buf.DecodeBytes(16))
- m.AddressWithPrefix.Len = buf.DecodeUint8()
- m.IsAdd = buf.DecodeBool()
- return nil
-}
-
-// IP6AddDelAddressUsingPrefixReply defines message 'ip6_add_del_address_using_prefix_reply'.
-type IP6AddDelAddressUsingPrefixReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *IP6AddDelAddressUsingPrefixReply) Reset() { *m = IP6AddDelAddressUsingPrefixReply{} }
-func (*IP6AddDelAddressUsingPrefixReply) GetMessageName() string {
- return "ip6_add_del_address_using_prefix_reply"
-}
-func (*IP6AddDelAddressUsingPrefixReply) GetCrcString() string { return "e8d4e804" }
-func (*IP6AddDelAddressUsingPrefixReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IP6AddDelAddressUsingPrefixReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *IP6AddDelAddressUsingPrefixReply) 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 *IP6AddDelAddressUsingPrefixReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_dhcp6_pd_client_cp_binapi_init() }
-func file_dhcp6_pd_client_cp_binapi_init() {
- api.RegisterMessage((*DHCP6PdClientEnableDisable)(nil), "dhcp6_pd_client_enable_disable_a75a0772")
- api.RegisterMessage((*DHCP6PdClientEnableDisableReply)(nil), "dhcp6_pd_client_enable_disable_reply_e8d4e804")
- api.RegisterMessage((*IP6AddDelAddressUsingPrefix)(nil), "ip6_add_del_address_using_prefix_9b3d11e0")
- api.RegisterMessage((*IP6AddDelAddressUsingPrefixReply)(nil), "ip6_add_del_address_using_prefix_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*DHCP6PdClientEnableDisable)(nil),
- (*DHCP6PdClientEnableDisableReply)(nil),
- (*IP6AddDelAddressUsingPrefix)(nil),
- (*IP6AddDelAddressUsingPrefixReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/dhcp6_pd_client_cp/dhcp6_pd_client_cp_rpc.ba.go b/internal/testbinapi/binapi2001/dhcp6_pd_client_cp/dhcp6_pd_client_cp_rpc.ba.go
deleted file mode 100644
index f531408..0000000
--- a/internal/testbinapi/binapi2001/dhcp6_pd_client_cp/dhcp6_pd_client_cp_rpc.ba.go
+++ /dev/null
@@ -1,41 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package dhcp6_pd_client_cp
-
-import (
- "context"
-
- api "git.fd.io/govpp.git/api"
-)
-
-// RPCService defines RPC service dhcp6_pd_client_cp.
-type RPCService interface {
- DHCP6PdClientEnableDisable(ctx context.Context, in *DHCP6PdClientEnableDisable) (*DHCP6PdClientEnableDisableReply, error)
- IP6AddDelAddressUsingPrefix(ctx context.Context, in *IP6AddDelAddressUsingPrefix) (*IP6AddDelAddressUsingPrefixReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) DHCP6PdClientEnableDisable(ctx context.Context, in *DHCP6PdClientEnableDisable) (*DHCP6PdClientEnableDisableReply, error) {
- out := new(DHCP6PdClientEnableDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) IP6AddDelAddressUsingPrefix(ctx context.Context, in *IP6AddDelAddressUsingPrefix) (*IP6AddDelAddressUsingPrefixReply, error) {
- out := new(IP6AddDelAddressUsingPrefixReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/dns/dns.ba.go b/internal/testbinapi/binapi2001/dns/dns.ba.go
deleted file mode 100644
index f6161df..0000000
--- a/internal/testbinapi/binapi2001/dns/dns.ba.go
+++ /dev/null
@@ -1,357 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/plugins/dns.api.json
-
-// Package dns contains generated bindings for API file dns.api.
-//
-// Contents:
-// 8 messages
-//
-package dns
-
-import (
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the GoVPP api package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// GoVPP api package needs to be updated.
-const _ = api.GoVppAPIPackageIsVersion2
-
-const (
- APIFile = "dns"
- APIVersion = "1.0.0"
- VersionCrc = 0x269575cd
-)
-
-// DNSEnableDisable defines message 'dns_enable_disable'.
-type DNSEnableDisable struct {
- Enable uint8 `binapi:"u8,name=enable" json:"enable,omitempty"`
-}
-
-func (m *DNSEnableDisable) Reset() { *m = DNSEnableDisable{} }
-func (*DNSEnableDisable) GetMessageName() string { return "dns_enable_disable" }
-func (*DNSEnableDisable) GetCrcString() string { return "8050327d" }
-func (*DNSEnableDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *DNSEnableDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.Enable
- return size
-}
-func (m *DNSEnableDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.Enable)
- return buf.Bytes(), nil
-}
-func (m *DNSEnableDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Enable = buf.DecodeUint8()
- return nil
-}
-
-// DNSEnableDisableReply defines message 'dns_enable_disable_reply'.
-type DNSEnableDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *DNSEnableDisableReply) Reset() { *m = DNSEnableDisableReply{} }
-func (*DNSEnableDisableReply) GetMessageName() string { return "dns_enable_disable_reply" }
-func (*DNSEnableDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*DNSEnableDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *DNSEnableDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *DNSEnableDisableReply) 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 *DNSEnableDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// DNSNameServerAddDel defines message 'dns_name_server_add_del'.
-type DNSNameServerAddDel struct {
- IsIP6 uint8 `binapi:"u8,name=is_ip6" json:"is_ip6,omitempty"`
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
- ServerAddress []byte `binapi:"u8[16],name=server_address" json:"server_address,omitempty"`
-}
-
-func (m *DNSNameServerAddDel) Reset() { *m = DNSNameServerAddDel{} }
-func (*DNSNameServerAddDel) GetMessageName() string { return "dns_name_server_add_del" }
-func (*DNSNameServerAddDel) GetCrcString() string { return "3bb05d8c" }
-func (*DNSNameServerAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *DNSNameServerAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsIP6
- size += 1 // m.IsAdd
- size += 1 * 16 // m.ServerAddress
- return size
-}
-func (m *DNSNameServerAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsIP6)
- buf.EncodeUint8(m.IsAdd)
- buf.EncodeBytes(m.ServerAddress, 16)
- return buf.Bytes(), nil
-}
-func (m *DNSNameServerAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsIP6 = buf.DecodeUint8()
- m.IsAdd = buf.DecodeUint8()
- m.ServerAddress = make([]byte, 16)
- copy(m.ServerAddress, buf.DecodeBytes(len(m.ServerAddress)))
- return nil
-}
-
-// DNSNameServerAddDelReply defines message 'dns_name_server_add_del_reply'.
-type DNSNameServerAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *DNSNameServerAddDelReply) Reset() { *m = DNSNameServerAddDelReply{} }
-func (*DNSNameServerAddDelReply) GetMessageName() string { return "dns_name_server_add_del_reply" }
-func (*DNSNameServerAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*DNSNameServerAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *DNSNameServerAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *DNSNameServerAddDelReply) 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 *DNSNameServerAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// DNSResolveIP defines message 'dns_resolve_ip'.
-type DNSResolveIP struct {
- IsIP6 uint8 `binapi:"u8,name=is_ip6" json:"is_ip6,omitempty"`
- Address []byte `binapi:"u8[16],name=address" json:"address,omitempty"`
-}
-
-func (m *DNSResolveIP) Reset() { *m = DNSResolveIP{} }
-func (*DNSResolveIP) GetMessageName() string { return "dns_resolve_ip" }
-func (*DNSResolveIP) GetCrcString() string { return "ae96a1a3" }
-func (*DNSResolveIP) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *DNSResolveIP) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsIP6
- size += 1 * 16 // m.Address
- return size
-}
-func (m *DNSResolveIP) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsIP6)
- buf.EncodeBytes(m.Address, 16)
- return buf.Bytes(), nil
-}
-func (m *DNSResolveIP) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsIP6 = buf.DecodeUint8()
- m.Address = make([]byte, 16)
- copy(m.Address, buf.DecodeBytes(len(m.Address)))
- return nil
-}
-
-// DNSResolveIPReply defines message 'dns_resolve_ip_reply'.
-type DNSResolveIPReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- Name []byte `binapi:"u8[256],name=name" json:"name,omitempty"`
-}
-
-func (m *DNSResolveIPReply) Reset() { *m = DNSResolveIPReply{} }
-func (*DNSResolveIPReply) GetMessageName() string { return "dns_resolve_ip_reply" }
-func (*DNSResolveIPReply) GetCrcString() string { return "49ed78d6" }
-func (*DNSResolveIPReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *DNSResolveIPReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 1 * 256 // m.Name
- return size
-}
-func (m *DNSResolveIPReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeBytes(m.Name, 256)
- return buf.Bytes(), nil
-}
-func (m *DNSResolveIPReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.Name = make([]byte, 256)
- copy(m.Name, buf.DecodeBytes(len(m.Name)))
- return nil
-}
-
-// DNSResolveName defines message 'dns_resolve_name'.
-type DNSResolveName struct {
- Name []byte `binapi:"u8[256],name=name" json:"name,omitempty"`
-}
-
-func (m *DNSResolveName) Reset() { *m = DNSResolveName{} }
-func (*DNSResolveName) GetMessageName() string { return "dns_resolve_name" }
-func (*DNSResolveName) GetCrcString() string { return "c6566676" }
-func (*DNSResolveName) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *DNSResolveName) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 256 // m.Name
- return size
-}
-func (m *DNSResolveName) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.Name, 256)
- return buf.Bytes(), nil
-}
-func (m *DNSResolveName) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Name = make([]byte, 256)
- copy(m.Name, buf.DecodeBytes(len(m.Name)))
- return nil
-}
-
-// DNSResolveNameReply defines message 'dns_resolve_name_reply'.
-type DNSResolveNameReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- IP4Set uint8 `binapi:"u8,name=ip4_set" json:"ip4_set,omitempty"`
- IP6Set uint8 `binapi:"u8,name=ip6_set" json:"ip6_set,omitempty"`
- IP4Address []byte `binapi:"u8[4],name=ip4_address" json:"ip4_address,omitempty"`
- IP6Address []byte `binapi:"u8[16],name=ip6_address" json:"ip6_address,omitempty"`
-}
-
-func (m *DNSResolveNameReply) Reset() { *m = DNSResolveNameReply{} }
-func (*DNSResolveNameReply) GetMessageName() string { return "dns_resolve_name_reply" }
-func (*DNSResolveNameReply) GetCrcString() string { return "c2d758c3" }
-func (*DNSResolveNameReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *DNSResolveNameReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 1 // m.IP4Set
- size += 1 // m.IP6Set
- size += 1 * 4 // m.IP4Address
- size += 1 * 16 // m.IP6Address
- return size
-}
-func (m *DNSResolveNameReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint8(m.IP4Set)
- buf.EncodeUint8(m.IP6Set)
- buf.EncodeBytes(m.IP4Address, 4)
- buf.EncodeBytes(m.IP6Address, 16)
- return buf.Bytes(), nil
-}
-func (m *DNSResolveNameReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.IP4Set = buf.DecodeUint8()
- m.IP6Set = buf.DecodeUint8()
- m.IP4Address = make([]byte, 4)
- copy(m.IP4Address, buf.DecodeBytes(len(m.IP4Address)))
- m.IP6Address = make([]byte, 16)
- copy(m.IP6Address, buf.DecodeBytes(len(m.IP6Address)))
- return nil
-}
-
-func init() { file_dns_binapi_init() }
-func file_dns_binapi_init() {
- api.RegisterMessage((*DNSEnableDisable)(nil), "dns_enable_disable_8050327d")
- api.RegisterMessage((*DNSEnableDisableReply)(nil), "dns_enable_disable_reply_e8d4e804")
- api.RegisterMessage((*DNSNameServerAddDel)(nil), "dns_name_server_add_del_3bb05d8c")
- api.RegisterMessage((*DNSNameServerAddDelReply)(nil), "dns_name_server_add_del_reply_e8d4e804")
- api.RegisterMessage((*DNSResolveIP)(nil), "dns_resolve_ip_ae96a1a3")
- api.RegisterMessage((*DNSResolveIPReply)(nil), "dns_resolve_ip_reply_49ed78d6")
- api.RegisterMessage((*DNSResolveName)(nil), "dns_resolve_name_c6566676")
- api.RegisterMessage((*DNSResolveNameReply)(nil), "dns_resolve_name_reply_c2d758c3")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*DNSEnableDisable)(nil),
- (*DNSEnableDisableReply)(nil),
- (*DNSNameServerAddDel)(nil),
- (*DNSNameServerAddDelReply)(nil),
- (*DNSResolveIP)(nil),
- (*DNSResolveIPReply)(nil),
- (*DNSResolveName)(nil),
- (*DNSResolveNameReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/dns/dns_rpc.ba.go b/internal/testbinapi/binapi2001/dns/dns_rpc.ba.go
deleted file mode 100644
index deb5be8..0000000
--- a/internal/testbinapi/binapi2001/dns/dns_rpc.ba.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package dns
-
-import (
- "context"
-
- api "git.fd.io/govpp.git/api"
-)
-
-// RPCService defines RPC service dns.
-type RPCService interface {
- DNSEnableDisable(ctx context.Context, in *DNSEnableDisable) (*DNSEnableDisableReply, error)
- DNSNameServerAddDel(ctx context.Context, in *DNSNameServerAddDel) (*DNSNameServerAddDelReply, error)
- DNSResolveIP(ctx context.Context, in *DNSResolveIP) (*DNSResolveIPReply, error)
- DNSResolveName(ctx context.Context, in *DNSResolveName) (*DNSResolveNameReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) DNSEnableDisable(ctx context.Context, in *DNSEnableDisable) (*DNSEnableDisableReply, error) {
- out := new(DNSEnableDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) DNSNameServerAddDel(ctx context.Context, in *DNSNameServerAddDel) (*DNSNameServerAddDelReply, error) {
- out := new(DNSNameServerAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) DNSResolveIP(ctx context.Context, in *DNSResolveIP) (*DNSResolveIPReply, error) {
- out := new(DNSResolveIPReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) DNSResolveName(ctx context.Context, in *DNSResolveName) (*DNSResolveNameReply, error) {
- out := new(DNSResolveNameReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/ethernet_types/ethernet_types.ba.go b/internal/testbinapi/binapi2001/ethernet_types/ethernet_types.ba.go
deleted file mode 100644
index 6cb13ae..0000000
--- a/internal/testbinapi/binapi2001/ethernet_types/ethernet_types.ba.go
+++ /dev/null
@@ -1,64 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/ethernet_types.api.json
-
-// Package ethernet_types contains generated bindings for API file ethernet_types.api.
-//
-// Contents:
-// 1 alias
-//
-package ethernet_types
-
-import (
- "net"
-
- api "git.fd.io/govpp.git/api"
-)
-
-// 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 = "ethernet_types"
- APIVersion = ""
- VersionCrc = 0xd4ff2808
-)
-
-// MacAddress defines alias 'mac_address'.
-type MacAddress [6]uint8
-
-func ParseMacAddress(s string) (MacAddress, error) {
- var macaddr MacAddress
- mac, err := net.ParseMAC(s)
- if err != nil {
- return macaddr, err
- }
- copy(macaddr[:], mac[:])
- return macaddr, nil
-}
-
-func (x MacAddress) ToMAC() net.HardwareAddr {
- return net.HardwareAddr(x[:])
-}
-
-func (x MacAddress) String() string {
- return x.ToMAC().String()
-}
-
-func (x *MacAddress) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *MacAddress) UnmarshalText(text []byte) error {
- mac, err := ParseMacAddress(string(text))
- if err != nil {
- return err
- }
- *x = mac
- return nil
-}
diff --git a/internal/testbinapi/binapi2001/feature/feature.ba.go b/internal/testbinapi/binapi2001/feature/feature.ba.go
deleted file mode 100644
index 33f8f14..0000000
--- a/internal/testbinapi/binapi2001/feature/feature.ba.go
+++ /dev/null
@@ -1,379 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/feature.api.json
-
-// Package feature contains generated bindings for API file feature.api.
-//
-// Contents:
-// 1 alias
-// 6 enums
-// 2 messages
-//
-package feature
-
-import (
- "strconv"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "feature"
- APIVersion = "1.0.2"
- VersionCrc = 0x3696c431
-)
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// FeatureEnableDisable defines message 'feature_enable_disable'.
-type FeatureEnableDisable struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
- ArcName string `binapi:"string[64],name=arc_name" json:"arc_name,omitempty"`
- FeatureName string `binapi:"string[64],name=feature_name" json:"feature_name,omitempty"`
-}
-
-func (m *FeatureEnableDisable) Reset() { *m = FeatureEnableDisable{} }
-func (*FeatureEnableDisable) GetMessageName() string { return "feature_enable_disable" }
-func (*FeatureEnableDisable) GetCrcString() string { return "7531c862" }
-func (*FeatureEnableDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *FeatureEnableDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.Enable
- size += 64 // m.ArcName
- size += 64 // m.FeatureName
- return size
-}
-func (m *FeatureEnableDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeBool(m.Enable)
- buf.EncodeString(m.ArcName, 64)
- buf.EncodeString(m.FeatureName, 64)
- return buf.Bytes(), nil
-}
-func (m *FeatureEnableDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Enable = buf.DecodeBool()
- m.ArcName = buf.DecodeString(64)
- m.FeatureName = buf.DecodeString(64)
- return nil
-}
-
-// FeatureEnableDisableReply defines message 'feature_enable_disable_reply'.
-type FeatureEnableDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *FeatureEnableDisableReply) Reset() { *m = FeatureEnableDisableReply{} }
-func (*FeatureEnableDisableReply) GetMessageName() string { return "feature_enable_disable_reply" }
-func (*FeatureEnableDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*FeatureEnableDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *FeatureEnableDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *FeatureEnableDisableReply) 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 *FeatureEnableDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_feature_binapi_init() }
-func file_feature_binapi_init() {
- api.RegisterMessage((*FeatureEnableDisable)(nil), "feature_enable_disable_7531c862")
- api.RegisterMessage((*FeatureEnableDisableReply)(nil), "feature_enable_disable_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*FeatureEnableDisable)(nil),
- (*FeatureEnableDisableReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/feature/feature_rpc.ba.go b/internal/testbinapi/binapi2001/feature/feature_rpc.ba.go
deleted file mode 100644
index 811934b..0000000
--- a/internal/testbinapi/binapi2001/feature/feature_rpc.ba.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package feature
-
-import (
- "context"
-
- api "git.fd.io/govpp.git/api"
-)
-
-// RPCService defines RPC service feature.
-type RPCService interface {
- FeatureEnableDisable(ctx context.Context, in *FeatureEnableDisable) (*FeatureEnableDisableReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) FeatureEnableDisable(ctx context.Context, in *FeatureEnableDisable) (*FeatureEnableDisableReply, error) {
- out := new(FeatureEnableDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/fib_types/fib_types.ba.go b/internal/testbinapi/binapi2001/fib_types/fib_types.ba.go
deleted file mode 100644
index b965cc8..0000000
--- a/internal/testbinapi/binapi2001/fib_types/fib_types.ba.go
+++ /dev/null
@@ -1,799 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/fib_types.api.json
-
-// Package fib_types contains generated bindings for API file fib_types.api.
-//
-// Contents:
-// 5 aliases
-// 7 enums
-// 9 structs
-// 1 union
-//
-package fib_types
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "fib_types"
- APIVersion = "2.0.0"
- VersionCrc = 0x57387845
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// FibPathFlags defines enum 'fib_path_flags'.
-type FibPathFlags uint32
-
-const (
- FIB_API_PATH_FLAG_NONE FibPathFlags = 0
- FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED FibPathFlags = 1
- FIB_API_PATH_FLAG_RESOLVE_VIA_HOST FibPathFlags = 2
- FIB_API_PATH_FLAG_POP_PW_CW FibPathFlags = 4
-)
-
-var (
- FibPathFlags_name = map[uint32]string{
- 0: "FIB_API_PATH_FLAG_NONE",
- 1: "FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED",
- 2: "FIB_API_PATH_FLAG_RESOLVE_VIA_HOST",
- 4: "FIB_API_PATH_FLAG_POP_PW_CW",
- }
- FibPathFlags_value = map[string]uint32{
- "FIB_API_PATH_FLAG_NONE": 0,
- "FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED": 1,
- "FIB_API_PATH_FLAG_RESOLVE_VIA_HOST": 2,
- "FIB_API_PATH_FLAG_POP_PW_CW": 4,
- }
-)
-
-func (x FibPathFlags) String() string {
- s, ok := FibPathFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := FibPathFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "FibPathFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// FibPathNhProto defines enum 'fib_path_nh_proto'.
-type FibPathNhProto uint32
-
-const (
- FIB_API_PATH_NH_PROTO_IP4 FibPathNhProto = 0
- FIB_API_PATH_NH_PROTO_IP6 FibPathNhProto = 1
- FIB_API_PATH_NH_PROTO_MPLS FibPathNhProto = 2
- FIB_API_PATH_NH_PROTO_ETHERNET FibPathNhProto = 3
- FIB_API_PATH_NH_PROTO_BIER FibPathNhProto = 4
-)
-
-var (
- FibPathNhProto_name = map[uint32]string{
- 0: "FIB_API_PATH_NH_PROTO_IP4",
- 1: "FIB_API_PATH_NH_PROTO_IP6",
- 2: "FIB_API_PATH_NH_PROTO_MPLS",
- 3: "FIB_API_PATH_NH_PROTO_ETHERNET",
- 4: "FIB_API_PATH_NH_PROTO_BIER",
- }
- FibPathNhProto_value = map[string]uint32{
- "FIB_API_PATH_NH_PROTO_IP4": 0,
- "FIB_API_PATH_NH_PROTO_IP6": 1,
- "FIB_API_PATH_NH_PROTO_MPLS": 2,
- "FIB_API_PATH_NH_PROTO_ETHERNET": 3,
- "FIB_API_PATH_NH_PROTO_BIER": 4,
- }
-)
-
-func (x FibPathNhProto) String() string {
- s, ok := FibPathNhProto_name[uint32(x)]
- if ok {
- return s
- }
- return "FibPathNhProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// FibPathType defines enum 'fib_path_type'.
-type FibPathType uint32
-
-const (
- FIB_API_PATH_TYPE_NORMAL FibPathType = 0
- FIB_API_PATH_TYPE_LOCAL FibPathType = 1
- FIB_API_PATH_TYPE_DROP FibPathType = 2
- FIB_API_PATH_TYPE_UDP_ENCAP FibPathType = 3
- FIB_API_PATH_TYPE_BIER_IMP FibPathType = 4
- FIB_API_PATH_TYPE_ICMP_UNREACH FibPathType = 5
- FIB_API_PATH_TYPE_ICMP_PROHIBIT FibPathType = 6
- FIB_API_PATH_TYPE_SOURCE_LOOKUP FibPathType = 7
- FIB_API_PATH_TYPE_DVR FibPathType = 8
- FIB_API_PATH_TYPE_INTERFACE_RX FibPathType = 9
- FIB_API_PATH_TYPE_CLASSIFY FibPathType = 10
-)
-
-var (
- FibPathType_name = map[uint32]string{
- 0: "FIB_API_PATH_TYPE_NORMAL",
- 1: "FIB_API_PATH_TYPE_LOCAL",
- 2: "FIB_API_PATH_TYPE_DROP",
- 3: "FIB_API_PATH_TYPE_UDP_ENCAP",
- 4: "FIB_API_PATH_TYPE_BIER_IMP",
- 5: "FIB_API_PATH_TYPE_ICMP_UNREACH",
- 6: "FIB_API_PATH_TYPE_ICMP_PROHIBIT",
- 7: "FIB_API_PATH_TYPE_SOURCE_LOOKUP",
- 8: "FIB_API_PATH_TYPE_DVR",
- 9: "FIB_API_PATH_TYPE_INTERFACE_RX",
- 10: "FIB_API_PATH_TYPE_CLASSIFY",
- }
- FibPathType_value = map[string]uint32{
- "FIB_API_PATH_TYPE_NORMAL": 0,
- "FIB_API_PATH_TYPE_LOCAL": 1,
- "FIB_API_PATH_TYPE_DROP": 2,
- "FIB_API_PATH_TYPE_UDP_ENCAP": 3,
- "FIB_API_PATH_TYPE_BIER_IMP": 4,
- "FIB_API_PATH_TYPE_ICMP_UNREACH": 5,
- "FIB_API_PATH_TYPE_ICMP_PROHIBIT": 6,
- "FIB_API_PATH_TYPE_SOURCE_LOOKUP": 7,
- "FIB_API_PATH_TYPE_DVR": 8,
- "FIB_API_PATH_TYPE_INTERFACE_RX": 9,
- "FIB_API_PATH_TYPE_CLASSIFY": 10,
- }
-)
-
-func (x FibPathType) String() string {
- s, ok := FibPathType_name[uint32(x)]
- if ok {
- return s
- }
- return "FibPathType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// FibMplsLabel defines type 'fib_mpls_label'.
-type FibMplsLabel struct {
- IsUniform uint8 `binapi:"u8,name=is_uniform" json:"is_uniform,omitempty"`
- Label uint32 `binapi:"u32,name=label" json:"label,omitempty"`
- TTL uint8 `binapi:"u8,name=ttl" json:"ttl,omitempty"`
- Exp uint8 `binapi:"u8,name=exp" json:"exp,omitempty"`
-}
-
-// FibPath defines type 'fib_path'.
-type FibPath struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
- RpfID uint32 `binapi:"u32,name=rpf_id" json:"rpf_id,omitempty"`
- Weight uint8 `binapi:"u8,name=weight" json:"weight,omitempty"`
- Preference uint8 `binapi:"u8,name=preference" json:"preference,omitempty"`
- Type FibPathType `binapi:"fib_path_type,name=type" json:"type,omitempty"`
- Flags FibPathFlags `binapi:"fib_path_flags,name=flags" json:"flags,omitempty"`
- Proto FibPathNhProto `binapi:"fib_path_nh_proto,name=proto" json:"proto,omitempty"`
- Nh FibPathNh `binapi:"fib_path_nh,name=nh" json:"nh,omitempty"`
- NLabels uint8 `binapi:"u8,name=n_labels" json:"n_labels,omitempty"`
- LabelStack [16]FibMplsLabel `binapi:"fib_mpls_label[16],name=label_stack" json:"label_stack,omitempty"`
-}
-
-// FibPathNh defines type 'fib_path_nh'.
-type FibPathNh struct {
- Address AddressUnion `binapi:"address_union,name=address" json:"address,omitempty"`
- ViaLabel uint32 `binapi:"u32,name=via_label" json:"via_label,omitempty"`
- ObjID uint32 `binapi:"u32,name=obj_id" json:"obj_id,omitempty"`
- ClassifyTableIndex uint32 `binapi:"u32,name=classify_table_index" json:"classify_table_index,omitempty"`
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
diff --git a/internal/testbinapi/binapi2001/flowprobe/flowprobe.ba.go b/internal/testbinapi/binapi2001/flowprobe/flowprobe.ba.go
deleted file mode 100644
index 158242a..0000000
--- a/internal/testbinapi/binapi2001/flowprobe/flowprobe.ba.go
+++ /dev/null
@@ -1,553 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/plugins/flowprobe.api.json
-
-// Package flowprobe contains generated bindings for API file flowprobe.api.
-//
-// Contents:
-// 1 alias
-// 8 enums
-// 4 messages
-//
-package flowprobe
-
-import (
- "strconv"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "flowprobe"
- APIVersion = "1.0.0"
- VersionCrc = 0xbb4dfc0d
-)
-
-// FlowprobeRecordFlags defines enum 'flowprobe_record_flags'.
-type FlowprobeRecordFlags uint8
-
-const (
- FLOWPROBE_RECORD_FLAG_L2 FlowprobeRecordFlags = 1
- FLOWPROBE_RECORD_FLAG_L3 FlowprobeRecordFlags = 2
- FLOWPROBE_RECORD_FLAG_L4 FlowprobeRecordFlags = 4
-)
-
-var (
- FlowprobeRecordFlags_name = map[uint8]string{
- 1: "FLOWPROBE_RECORD_FLAG_L2",
- 2: "FLOWPROBE_RECORD_FLAG_L3",
- 4: "FLOWPROBE_RECORD_FLAG_L4",
- }
- FlowprobeRecordFlags_value = map[string]uint8{
- "FLOWPROBE_RECORD_FLAG_L2": 1,
- "FLOWPROBE_RECORD_FLAG_L3": 2,
- "FLOWPROBE_RECORD_FLAG_L4": 4,
- }
-)
-
-func (x FlowprobeRecordFlags) String() string {
- s, ok := FlowprobeRecordFlags_name[uint8(x)]
- if ok {
- return s
- }
- str := func(n uint8) string {
- s, ok := FlowprobeRecordFlags_name[uint8(n)]
- if ok {
- return s
- }
- return "FlowprobeRecordFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint8(0); i <= 8; i++ {
- val := uint8(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint8(x))
- }
- return s
-}
-
-// FlowprobeWhichFlags defines enum 'flowprobe_which_flags'.
-type FlowprobeWhichFlags uint8
-
-const (
- FLOWPROBE_WHICH_FLAG_IP4 FlowprobeWhichFlags = 1
- FLOWPROBE_WHICH_FLAG_L2 FlowprobeWhichFlags = 2
- FLOWPROBE_WHICH_FLAG_IP6 FlowprobeWhichFlags = 4
-)
-
-var (
- FlowprobeWhichFlags_name = map[uint8]string{
- 1: "FLOWPROBE_WHICH_FLAG_IP4",
- 2: "FLOWPROBE_WHICH_FLAG_L2",
- 4: "FLOWPROBE_WHICH_FLAG_IP6",
- }
- FlowprobeWhichFlags_value = map[string]uint8{
- "FLOWPROBE_WHICH_FLAG_IP4": 1,
- "FLOWPROBE_WHICH_FLAG_L2": 2,
- "FLOWPROBE_WHICH_FLAG_IP6": 4,
- }
-)
-
-func (x FlowprobeWhichFlags) String() string {
- s, ok := FlowprobeWhichFlags_name[uint8(x)]
- if ok {
- return s
- }
- str := func(n uint8) string {
- s, ok := FlowprobeWhichFlags_name[uint8(n)]
- if ok {
- return s
- }
- return "FlowprobeWhichFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint8(0); i <= 8; i++ {
- val := uint8(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint8(x))
- }
- return s
-}
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// FlowprobeParams defines message 'flowprobe_params'.
-type FlowprobeParams struct {
- RecordFlags FlowprobeRecordFlags `binapi:"flowprobe_record_flags,name=record_flags" json:"record_flags,omitempty"`
- ActiveTimer uint32 `binapi:"u32,name=active_timer" json:"active_timer,omitempty"`
- PassiveTimer uint32 `binapi:"u32,name=passive_timer" json:"passive_timer,omitempty"`
-}
-
-func (m *FlowprobeParams) Reset() { *m = FlowprobeParams{} }
-func (*FlowprobeParams) GetMessageName() string { return "flowprobe_params" }
-func (*FlowprobeParams) GetCrcString() string { return "baa46c09" }
-func (*FlowprobeParams) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *FlowprobeParams) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.RecordFlags
- size += 4 // m.ActiveTimer
- size += 4 // m.PassiveTimer
- return size
-}
-func (m *FlowprobeParams) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(uint8(m.RecordFlags))
- buf.EncodeUint32(m.ActiveTimer)
- buf.EncodeUint32(m.PassiveTimer)
- return buf.Bytes(), nil
-}
-func (m *FlowprobeParams) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.RecordFlags = FlowprobeRecordFlags(buf.DecodeUint8())
- m.ActiveTimer = buf.DecodeUint32()
- m.PassiveTimer = buf.DecodeUint32()
- return nil
-}
-
-// FlowprobeParamsReply defines message 'flowprobe_params_reply'.
-type FlowprobeParamsReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *FlowprobeParamsReply) Reset() { *m = FlowprobeParamsReply{} }
-func (*FlowprobeParamsReply) GetMessageName() string { return "flowprobe_params_reply" }
-func (*FlowprobeParamsReply) GetCrcString() string { return "e8d4e804" }
-func (*FlowprobeParamsReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *FlowprobeParamsReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *FlowprobeParamsReply) 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 *FlowprobeParamsReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// FlowprobeTxInterfaceAddDel defines message 'flowprobe_tx_interface_add_del'.
-type FlowprobeTxInterfaceAddDel struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- Which FlowprobeWhichFlags `binapi:"flowprobe_which_flags,name=which" json:"which,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *FlowprobeTxInterfaceAddDel) Reset() { *m = FlowprobeTxInterfaceAddDel{} }
-func (*FlowprobeTxInterfaceAddDel) GetMessageName() string { return "flowprobe_tx_interface_add_del" }
-func (*FlowprobeTxInterfaceAddDel) GetCrcString() string { return "b782c976" }
-func (*FlowprobeTxInterfaceAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *FlowprobeTxInterfaceAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 1 // m.Which
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *FlowprobeTxInterfaceAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeUint8(uint8(m.Which))
- buf.EncodeUint32(uint32(m.SwIfIndex))
- return buf.Bytes(), nil
-}
-func (m *FlowprobeTxInterfaceAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.Which = FlowprobeWhichFlags(buf.DecodeUint8())
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// FlowprobeTxInterfaceAddDelReply defines message 'flowprobe_tx_interface_add_del_reply'.
-type FlowprobeTxInterfaceAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *FlowprobeTxInterfaceAddDelReply) Reset() { *m = FlowprobeTxInterfaceAddDelReply{} }
-func (*FlowprobeTxInterfaceAddDelReply) GetMessageName() string {
- return "flowprobe_tx_interface_add_del_reply"
-}
-func (*FlowprobeTxInterfaceAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*FlowprobeTxInterfaceAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *FlowprobeTxInterfaceAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *FlowprobeTxInterfaceAddDelReply) 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 *FlowprobeTxInterfaceAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_flowprobe_binapi_init() }
-func file_flowprobe_binapi_init() {
- api.RegisterMessage((*FlowprobeParams)(nil), "flowprobe_params_baa46c09")
- api.RegisterMessage((*FlowprobeParamsReply)(nil), "flowprobe_params_reply_e8d4e804")
- api.RegisterMessage((*FlowprobeTxInterfaceAddDel)(nil), "flowprobe_tx_interface_add_del_b782c976")
- api.RegisterMessage((*FlowprobeTxInterfaceAddDelReply)(nil), "flowprobe_tx_interface_add_del_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*FlowprobeParams)(nil),
- (*FlowprobeParamsReply)(nil),
- (*FlowprobeTxInterfaceAddDel)(nil),
- (*FlowprobeTxInterfaceAddDelReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/flowprobe/flowprobe_rpc.ba.go b/internal/testbinapi/binapi2001/flowprobe/flowprobe_rpc.ba.go
deleted file mode 100644
index 3b0178d..0000000
--- a/internal/testbinapi/binapi2001/flowprobe/flowprobe_rpc.ba.go
+++ /dev/null
@@ -1,41 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package flowprobe
-
-import (
- "context"
-
- api "git.fd.io/govpp.git/api"
-)
-
-// RPCService defines RPC service flowprobe.
-type RPCService interface {
- FlowprobeParams(ctx context.Context, in *FlowprobeParams) (*FlowprobeParamsReply, error)
- FlowprobeTxInterfaceAddDel(ctx context.Context, in *FlowprobeTxInterfaceAddDel) (*FlowprobeTxInterfaceAddDelReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) FlowprobeParams(ctx context.Context, in *FlowprobeParams) (*FlowprobeParamsReply, error) {
- out := new(FlowprobeParamsReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) FlowprobeTxInterfaceAddDel(ctx context.Context, in *FlowprobeTxInterfaceAddDel) (*FlowprobeTxInterfaceAddDelReply, error) {
- out := new(FlowprobeTxInterfaceAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/gbp/gbp.ba.go b/internal/testbinapi/binapi2001/gbp/gbp.ba.go
deleted file mode 100644
index 27df8b5..0000000
--- a/internal/testbinapi/binapi2001/gbp/gbp.ba.go
+++ /dev/null
@@ -1,3398 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/plugins/gbp.api.json
-
-// Package gbp contains generated bindings for API file gbp.api.
-//
-// Contents:
-// 8 aliases
-// 17 enums
-// 20 structs
-// 1 union
-// 48 messages
-//
-package gbp
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the GoVPP api package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// GoVPP api package needs to be updated.
-const _ = api.GoVppAPIPackageIsVersion2
-
-const (
- APIFile = "gbp"
- APIVersion = "2.0.0"
- VersionCrc = 0xa891d6ff
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// GbpBridgeDomainFlags defines enum 'gbp_bridge_domain_flags'.
-type GbpBridgeDomainFlags uint32
-
-const (
- GBP_BD_API_FLAG_NONE GbpBridgeDomainFlags = 0
- GBP_BD_API_FLAG_DO_NOT_LEARN GbpBridgeDomainFlags = 1
- GBP_BD_API_FLAG_UU_FWD_DROP GbpBridgeDomainFlags = 2
- GBP_BD_API_FLAG_MCAST_DROP GbpBridgeDomainFlags = 4
- GBP_BD_API_FLAG_UCAST_ARP GbpBridgeDomainFlags = 8
-)
-
-var (
- GbpBridgeDomainFlags_name = map[uint32]string{
- 0: "GBP_BD_API_FLAG_NONE",
- 1: "GBP_BD_API_FLAG_DO_NOT_LEARN",
- 2: "GBP_BD_API_FLAG_UU_FWD_DROP",
- 4: "GBP_BD_API_FLAG_MCAST_DROP",
- 8: "GBP_BD_API_FLAG_UCAST_ARP",
- }
- GbpBridgeDomainFlags_value = map[string]uint32{
- "GBP_BD_API_FLAG_NONE": 0,
- "GBP_BD_API_FLAG_DO_NOT_LEARN": 1,
- "GBP_BD_API_FLAG_UU_FWD_DROP": 2,
- "GBP_BD_API_FLAG_MCAST_DROP": 4,
- "GBP_BD_API_FLAG_UCAST_ARP": 8,
- }
-)
-
-func (x GbpBridgeDomainFlags) String() string {
- s, ok := GbpBridgeDomainFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := GbpBridgeDomainFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "GbpBridgeDomainFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// GbpEndpointFlags defines enum 'gbp_endpoint_flags'.
-type GbpEndpointFlags uint32
-
-const (
- GBP_API_ENDPOINT_FLAG_NONE GbpEndpointFlags = 0
- GBP_API_ENDPOINT_FLAG_BOUNCE GbpEndpointFlags = 1
- GBP_API_ENDPOINT_FLAG_REMOTE GbpEndpointFlags = 2
- GBP_API_ENDPOINT_FLAG_LEARNT GbpEndpointFlags = 4
- GBP_API_ENDPOINT_FLAG_EXTERNAL GbpEndpointFlags = 8
-)
-
-var (
- GbpEndpointFlags_name = map[uint32]string{
- 0: "GBP_API_ENDPOINT_FLAG_NONE",
- 1: "GBP_API_ENDPOINT_FLAG_BOUNCE",
- 2: "GBP_API_ENDPOINT_FLAG_REMOTE",
- 4: "GBP_API_ENDPOINT_FLAG_LEARNT",
- 8: "GBP_API_ENDPOINT_FLAG_EXTERNAL",
- }
- GbpEndpointFlags_value = map[string]uint32{
- "GBP_API_ENDPOINT_FLAG_NONE": 0,
- "GBP_API_ENDPOINT_FLAG_BOUNCE": 1,
- "GBP_API_ENDPOINT_FLAG_REMOTE": 2,
- "GBP_API_ENDPOINT_FLAG_LEARNT": 4,
- "GBP_API_ENDPOINT_FLAG_EXTERNAL": 8,
- }
-)
-
-func (x GbpEndpointFlags) String() string {
- s, ok := GbpEndpointFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := GbpEndpointFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "GbpEndpointFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// GbpExtItfFlags defines enum 'gbp_ext_itf_flags'.
-type GbpExtItfFlags uint32
-
-const (
- GBP_API_EXT_ITF_F_NONE GbpExtItfFlags = 0
- GBP_API_EXT_ITF_F_ANON GbpExtItfFlags = 1
-)
-
-var (
- GbpExtItfFlags_name = map[uint32]string{
- 0: "GBP_API_EXT_ITF_F_NONE",
- 1: "GBP_API_EXT_ITF_F_ANON",
- }
- GbpExtItfFlags_value = map[string]uint32{
- "GBP_API_EXT_ITF_F_NONE": 0,
- "GBP_API_EXT_ITF_F_ANON": 1,
- }
-)
-
-func (x GbpExtItfFlags) String() string {
- s, ok := GbpExtItfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := GbpExtItfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "GbpExtItfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// GbpHashMode defines enum 'gbp_hash_mode'.
-type GbpHashMode uint32
-
-const (
- GBP_API_HASH_MODE_SRC_IP GbpHashMode = 1
- GBP_API_HASH_MODE_DST_IP GbpHashMode = 2
- GBP_API_HASH_MODE_SYMMETRIC GbpHashMode = 3
-)
-
-var (
- GbpHashMode_name = map[uint32]string{
- 1: "GBP_API_HASH_MODE_SRC_IP",
- 2: "GBP_API_HASH_MODE_DST_IP",
- 3: "GBP_API_HASH_MODE_SYMMETRIC",
- }
- GbpHashMode_value = map[string]uint32{
- "GBP_API_HASH_MODE_SRC_IP": 1,
- "GBP_API_HASH_MODE_DST_IP": 2,
- "GBP_API_HASH_MODE_SYMMETRIC": 3,
- }
-)
-
-func (x GbpHashMode) String() string {
- s, ok := GbpHashMode_name[uint32(x)]
- if ok {
- return s
- }
- return "GbpHashMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// GbpRuleAction defines enum 'gbp_rule_action'.
-type GbpRuleAction uint32
-
-const (
- GBP_API_RULE_PERMIT GbpRuleAction = 1
- GBP_API_RULE_DENY GbpRuleAction = 2
- GBP_API_RULE_REDIRECT GbpRuleAction = 3
-)
-
-var (
- GbpRuleAction_name = map[uint32]string{
- 1: "GBP_API_RULE_PERMIT",
- 2: "GBP_API_RULE_DENY",
- 3: "GBP_API_RULE_REDIRECT",
- }
- GbpRuleAction_value = map[string]uint32{
- "GBP_API_RULE_PERMIT": 1,
- "GBP_API_RULE_DENY": 2,
- "GBP_API_RULE_REDIRECT": 3,
- }
-)
-
-func (x GbpRuleAction) String() string {
- s, ok := GbpRuleAction_name[uint32(x)]
- if ok {
- return s
- }
- return "GbpRuleAction(" + strconv.Itoa(int(x)) + ")"
-}
-
-// GbpSubnetType defines enum 'gbp_subnet_type'.
-type GbpSubnetType uint32
-
-const (
- GBP_API_SUBNET_TRANSPORT GbpSubnetType = 1
- GBP_API_SUBNET_STITCHED_INTERNAL GbpSubnetType = 2
- GBP_API_SUBNET_STITCHED_EXTERNAL GbpSubnetType = 3
- GBP_API_SUBNET_L3_OUT GbpSubnetType = 4
- GBP_API_SUBNET_ANON_L3_OUT GbpSubnetType = 5
-)
-
-var (
- GbpSubnetType_name = map[uint32]string{
- 1: "GBP_API_SUBNET_TRANSPORT",
- 2: "GBP_API_SUBNET_STITCHED_INTERNAL",
- 3: "GBP_API_SUBNET_STITCHED_EXTERNAL",
- 4: "GBP_API_SUBNET_L3_OUT",
- 5: "GBP_API_SUBNET_ANON_L3_OUT",
- }
- GbpSubnetType_value = map[string]uint32{
- "GBP_API_SUBNET_TRANSPORT": 1,
- "GBP_API_SUBNET_STITCHED_INTERNAL": 2,
- "GBP_API_SUBNET_STITCHED_EXTERNAL": 3,
- "GBP_API_SUBNET_L3_OUT": 4,
- "GBP_API_SUBNET_ANON_L3_OUT": 5,
- }
-)
-
-func (x GbpSubnetType) String() string {
- s, ok := GbpSubnetType_name[uint32(x)]
- if ok {
- return s
- }
- return "GbpSubnetType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// GbpVxlanTunnelMode defines enum 'gbp_vxlan_tunnel_mode'.
-type GbpVxlanTunnelMode uint32
-
-const (
- GBP_VXLAN_TUNNEL_MODE_L2 GbpVxlanTunnelMode = 1
- GBP_VXLAN_TUNNEL_MODE_L3 GbpVxlanTunnelMode = 2
-)
-
-var (
- GbpVxlanTunnelMode_name = map[uint32]string{
- 1: "GBP_VXLAN_TUNNEL_MODE_L2",
- 2: "GBP_VXLAN_TUNNEL_MODE_L3",
- }
- GbpVxlanTunnelMode_value = map[string]uint32{
- "GBP_VXLAN_TUNNEL_MODE_L2": 1,
- "GBP_VXLAN_TUNNEL_MODE_L3": 2,
- }
-)
-
-func (x GbpVxlanTunnelMode) String() string {
- s, ok := GbpVxlanTunnelMode_name[uint32(x)]
- if ok {
- return s
- }
- return "GbpVxlanTunnelMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// GbpScope defines alias 'gbp_scope'.
-type GbpScope uint16
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// MacAddress defines alias 'mac_address'.
-type MacAddress [6]uint8
-
-func ParseMacAddress(s string) (MacAddress, error) {
- var macaddr MacAddress
- mac, err := net.ParseMAC(s)
- if err != nil {
- return macaddr, err
- }
- copy(macaddr[:], mac[:])
- return macaddr, nil
-}
-
-func (x MacAddress) ToMAC() net.HardwareAddr {
- return net.HardwareAddr(x[:])
-}
-
-func (x MacAddress) String() string {
- return x.ToMAC().String()
-}
-
-func (x *MacAddress) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *MacAddress) UnmarshalText(text []byte) error {
- mac, err := ParseMacAddress(string(text))
- if err != nil {
- return err
- }
- *x = mac
- return nil
-}
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// GbpBridgeDomain defines type 'gbp_bridge_domain'.
-type GbpBridgeDomain struct {
- BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
- RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"`
- Flags GbpBridgeDomainFlags `binapi:"gbp_bridge_domain_flags,name=flags" json:"flags,omitempty"`
- BviSwIfIndex InterfaceIndex `binapi:"interface_index,name=bvi_sw_if_index" json:"bvi_sw_if_index,omitempty"`
- UuFwdSwIfIndex InterfaceIndex `binapi:"interface_index,name=uu_fwd_sw_if_index" json:"uu_fwd_sw_if_index,omitempty"`
- BmFloodSwIfIndex InterfaceIndex `binapi:"interface_index,name=bm_flood_sw_if_index" json:"bm_flood_sw_if_index,omitempty"`
-}
-
-// GbpContract defines type 'gbp_contract'.
-type GbpContract struct {
- Scope GbpScope `binapi:"gbp_scope,name=scope" json:"scope,omitempty"`
- Sclass uint16 `binapi:"u16,name=sclass" json:"sclass,omitempty"`
- Dclass uint16 `binapi:"u16,name=dclass" json:"dclass,omitempty"`
- ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"`
- NEtherTypes uint8 `binapi:"u8,name=n_ether_types" json:"n_ether_types,omitempty"`
- AllowedEthertypes []uint16 `binapi:"u16[16],name=allowed_ethertypes" json:"allowed_ethertypes,omitempty"`
- NRules uint8 `binapi:"u8,name=n_rules" json:"-"`
- Rules []GbpRule `binapi:"gbp_rule[n_rules],name=rules" json:"rules,omitempty"`
-}
-
-// GbpEndpoint defines type 'gbp_endpoint'.
-type GbpEndpoint struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Sclass uint16 `binapi:"u16,name=sclass" json:"sclass,omitempty"`
- Flags GbpEndpointFlags `binapi:"gbp_endpoint_flags,name=flags" json:"flags,omitempty"`
- Mac MacAddress `binapi:"mac_address,name=mac" json:"mac,omitempty"`
- Tun GbpEndpointTun `binapi:"gbp_endpoint_tun,name=tun" json:"tun,omitempty"`
- NIps uint8 `binapi:"u8,name=n_ips" json:"-"`
- Ips []Address `binapi:"address[n_ips],name=ips" json:"ips,omitempty"`
-}
-
-// GbpEndpointGroup defines type 'gbp_endpoint_group'.
-type GbpEndpointGroup struct {
- Vnid uint32 `binapi:"u32,name=vnid" json:"vnid,omitempty"`
- Sclass uint16 `binapi:"u16,name=sclass" json:"sclass,omitempty"`
- BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
- RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"`
- UplinkSwIfIndex InterfaceIndex `binapi:"interface_index,name=uplink_sw_if_index" json:"uplink_sw_if_index,omitempty"`
- Retention GbpEndpointRetention `binapi:"gbp_endpoint_retention,name=retention" json:"retention,omitempty"`
-}
-
-// GbpEndpointRetention defines type 'gbp_endpoint_retention'.
-type GbpEndpointRetention struct {
- RemoteEpTimeout uint32 `binapi:"u32,name=remote_ep_timeout" json:"remote_ep_timeout,omitempty"`
-}
-
-// GbpEndpointTun defines type 'gbp_endpoint_tun'.
-type GbpEndpointTun struct {
- Src Address `binapi:"address,name=src" json:"src,omitempty"`
- Dst Address `binapi:"address,name=dst" json:"dst,omitempty"`
-}
-
-// GbpExtItf defines type 'gbp_ext_itf'.
-type GbpExtItf struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
- RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"`
- Flags GbpExtItfFlags `binapi:"gbp_ext_itf_flags,name=flags" json:"flags,omitempty"`
-}
-
-// GbpNextHop defines type 'gbp_next_hop'.
-type GbpNextHop struct {
- IP Address `binapi:"address,name=ip" json:"ip,omitempty"`
- Mac MacAddress `binapi:"mac_address,name=mac" json:"mac,omitempty"`
- BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
- RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"`
-}
-
-// GbpNextHopSet defines type 'gbp_next_hop_set'.
-type GbpNextHopSet struct {
- HashMode GbpHashMode `binapi:"gbp_hash_mode,name=hash_mode" json:"hash_mode,omitempty"`
- NNhs uint8 `binapi:"u8,name=n_nhs" json:"n_nhs,omitempty"`
- Nhs [8]GbpNextHop `binapi:"gbp_next_hop[8],name=nhs" json:"nhs,omitempty"`
-}
-
-// GbpRecirc defines type 'gbp_recirc'.
-type GbpRecirc struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Sclass uint16 `binapi:"u16,name=sclass" json:"sclass,omitempty"`
- IsExt bool `binapi:"bool,name=is_ext" json:"is_ext,omitempty"`
-}
-
-// GbpRouteDomain defines type 'gbp_route_domain'.
-type GbpRouteDomain struct {
- RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"`
- IP4TableID uint32 `binapi:"u32,name=ip4_table_id" json:"ip4_table_id,omitempty"`
- IP6TableID uint32 `binapi:"u32,name=ip6_table_id" json:"ip6_table_id,omitempty"`
- IP4UuSwIfIndex InterfaceIndex `binapi:"interface_index,name=ip4_uu_sw_if_index" json:"ip4_uu_sw_if_index,omitempty"`
- IP6UuSwIfIndex InterfaceIndex `binapi:"interface_index,name=ip6_uu_sw_if_index" json:"ip6_uu_sw_if_index,omitempty"`
- Scope GbpScope `binapi:"gbp_scope,name=scope" json:"scope,omitempty"`
-}
-
-// GbpRule defines type 'gbp_rule'.
-type GbpRule struct {
- Action GbpRuleAction `binapi:"gbp_rule_action,name=action" json:"action,omitempty"`
- NhSet GbpNextHopSet `binapi:"gbp_next_hop_set,name=nh_set" json:"nh_set,omitempty"`
-}
-
-// GbpSubnet defines type 'gbp_subnet'.
-type GbpSubnet struct {
- RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Sclass uint16 `binapi:"u16,name=sclass" json:"sclass,omitempty"`
- Type GbpSubnetType `binapi:"gbp_subnet_type,name=type" json:"type,omitempty"`
- Prefix Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
-}
-
-// GbpVxlanTunnel defines type 'gbp_vxlan_tunnel'.
-type GbpVxlanTunnel struct {
- Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
- Mode GbpVxlanTunnelMode `binapi:"gbp_vxlan_tunnel_mode,name=mode" json:"mode,omitempty"`
- BdRdID uint32 `binapi:"u32,name=bd_rd_id" json:"bd_rd_id,omitempty"`
- Src IP4Address `binapi:"ip4_address,name=src" json:"src,omitempty"`
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
-
-// GbpBridgeDomainAdd defines message 'gbp_bridge_domain_add'.
-type GbpBridgeDomainAdd struct {
- Bd GbpBridgeDomain `binapi:"gbp_bridge_domain,name=bd" json:"bd,omitempty"`
-}
-
-func (m *GbpBridgeDomainAdd) Reset() { *m = GbpBridgeDomainAdd{} }
-func (*GbpBridgeDomainAdd) GetMessageName() string { return "gbp_bridge_domain_add" }
-func (*GbpBridgeDomainAdd) GetCrcString() string { return "8454bfdf" }
-func (*GbpBridgeDomainAdd) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpBridgeDomainAdd) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Bd.BdID
- size += 4 // m.Bd.RdID
- size += 4 // m.Bd.Flags
- size += 4 // m.Bd.BviSwIfIndex
- size += 4 // m.Bd.UuFwdSwIfIndex
- size += 4 // m.Bd.BmFloodSwIfIndex
- return size
-}
-func (m *GbpBridgeDomainAdd) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Bd.BdID)
- buf.EncodeUint32(m.Bd.RdID)
- buf.EncodeUint32(uint32(m.Bd.Flags))
- buf.EncodeUint32(uint32(m.Bd.BviSwIfIndex))
- buf.EncodeUint32(uint32(m.Bd.UuFwdSwIfIndex))
- buf.EncodeUint32(uint32(m.Bd.BmFloodSwIfIndex))
- return buf.Bytes(), nil
-}
-func (m *GbpBridgeDomainAdd) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Bd.BdID = buf.DecodeUint32()
- m.Bd.RdID = buf.DecodeUint32()
- m.Bd.Flags = GbpBridgeDomainFlags(buf.DecodeUint32())
- m.Bd.BviSwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Bd.UuFwdSwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Bd.BmFloodSwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// GbpBridgeDomainAddReply defines message 'gbp_bridge_domain_add_reply'.
-type GbpBridgeDomainAddReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *GbpBridgeDomainAddReply) Reset() { *m = GbpBridgeDomainAddReply{} }
-func (*GbpBridgeDomainAddReply) GetMessageName() string { return "gbp_bridge_domain_add_reply" }
-func (*GbpBridgeDomainAddReply) GetCrcString() string { return "e8d4e804" }
-func (*GbpBridgeDomainAddReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpBridgeDomainAddReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *GbpBridgeDomainAddReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- return buf.Bytes(), nil
-}
-func (m *GbpBridgeDomainAddReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// GbpBridgeDomainDel defines message 'gbp_bridge_domain_del'.
-type GbpBridgeDomainDel struct {
- BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
-}
-
-func (m *GbpBridgeDomainDel) Reset() { *m = GbpBridgeDomainDel{} }
-func (*GbpBridgeDomainDel) GetMessageName() string { return "gbp_bridge_domain_del" }
-func (*GbpBridgeDomainDel) GetCrcString() string { return "c25fdce6" }
-func (*GbpBridgeDomainDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpBridgeDomainDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.BdID
- return size
-}
-func (m *GbpBridgeDomainDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.BdID)
- return buf.Bytes(), nil
-}
-func (m *GbpBridgeDomainDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.BdID = buf.DecodeUint32()
- return nil
-}
-
-// GbpBridgeDomainDelReply defines message 'gbp_bridge_domain_del_reply'.
-type GbpBridgeDomainDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *GbpBridgeDomainDelReply) Reset() { *m = GbpBridgeDomainDelReply{} }
-func (*GbpBridgeDomainDelReply) GetMessageName() string { return "gbp_bridge_domain_del_reply" }
-func (*GbpBridgeDomainDelReply) GetCrcString() string { return "e8d4e804" }
-func (*GbpBridgeDomainDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpBridgeDomainDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *GbpBridgeDomainDelReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- return buf.Bytes(), nil
-}
-func (m *GbpBridgeDomainDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// GbpBridgeDomainDetails defines message 'gbp_bridge_domain_details'.
-type GbpBridgeDomainDetails struct {
- Bd GbpBridgeDomain `binapi:"gbp_bridge_domain,name=bd" json:"bd,omitempty"`
-}
-
-func (m *GbpBridgeDomainDetails) Reset() { *m = GbpBridgeDomainDetails{} }
-func (*GbpBridgeDomainDetails) GetMessageName() string { return "gbp_bridge_domain_details" }
-func (*GbpBridgeDomainDetails) GetCrcString() string { return "2acd15f9" }
-func (*GbpBridgeDomainDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpBridgeDomainDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Bd.BdID
- size += 4 // m.Bd.RdID
- size += 4 // m.Bd.Flags
- size += 4 // m.Bd.BviSwIfIndex
- size += 4 // m.Bd.UuFwdSwIfIndex
- size += 4 // m.Bd.BmFloodSwIfIndex
- return size
-}
-func (m *GbpBridgeDomainDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Bd.BdID)
- buf.EncodeUint32(m.Bd.RdID)
- buf.EncodeUint32(uint32(m.Bd.Flags))
- buf.EncodeUint32(uint32(m.Bd.BviSwIfIndex))
- buf.EncodeUint32(uint32(m.Bd.UuFwdSwIfIndex))
- buf.EncodeUint32(uint32(m.Bd.BmFloodSwIfIndex))
- return buf.Bytes(), nil
-}
-func (m *GbpBridgeDomainDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Bd.BdID = buf.DecodeUint32()
- m.Bd.RdID = buf.DecodeUint32()
- m.Bd.Flags = GbpBridgeDomainFlags(buf.DecodeUint32())
- m.Bd.BviSwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Bd.UuFwdSwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Bd.BmFloodSwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// GbpBridgeDomainDump defines message 'gbp_bridge_domain_dump'.
-type GbpBridgeDomainDump struct{}
-
-func (m *GbpBridgeDomainDump) Reset() { *m = GbpBridgeDomainDump{} }
-func (*GbpBridgeDomainDump) GetMessageName() string { return "gbp_bridge_domain_dump" }
-func (*GbpBridgeDomainDump) GetCrcString() string { return "51077d14" }
-func (*GbpBridgeDomainDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpBridgeDomainDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *GbpBridgeDomainDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *GbpBridgeDomainDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// GbpBridgeDomainDumpReply defines message 'gbp_bridge_domain_dump_reply'.
-type GbpBridgeDomainDumpReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *GbpBridgeDomainDumpReply) Reset() { *m = GbpBridgeDomainDumpReply{} }
-func (*GbpBridgeDomainDumpReply) GetMessageName() string { return "gbp_bridge_domain_dump_reply" }
-func (*GbpBridgeDomainDumpReply) GetCrcString() string { return "e8d4e804" }
-func (*GbpBridgeDomainDumpReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpBridgeDomainDumpReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *GbpBridgeDomainDumpReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- return buf.Bytes(), nil
-}
-func (m *GbpBridgeDomainDumpReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// GbpContractAddDel defines message 'gbp_contract_add_del'.
-type GbpContractAddDel struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- Contract GbpContract `binapi:"gbp_contract,name=contract" json:"contract,omitempty"`
-}
-
-func (m *GbpContractAddDel) Reset() { *m = GbpContractAddDel{} }
-func (*GbpContractAddDel) GetMessageName() string { return "gbp_contract_add_del" }
-func (*GbpContractAddDel) GetCrcString() string { return "553e275b" }
-func (*GbpContractAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpContractAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 2 // m.Contract.Scope
- size += 2 // m.Contract.Sclass
- size += 2 // m.Contract.Dclass
- size += 4 // m.Contract.ACLIndex
- size += 1 // m.Contract.NEtherTypes
- size += 2 * 16 // m.Contract.AllowedEthertypes
- size += 1 // m.Contract.NRules
- for j2 := 0; j2 < len(m.Contract.Rules); j2++ {
- var s2 GbpRule
- _ = s2
- if j2 < len(m.Contract.Rules) {
- s2 = m.Contract.Rules[j2]
- }
- size += 4 // s2.Action
- size += 4 // s2.NhSet.HashMode
- size += 1 // s2.NhSet.NNhs
- for j4 := 0; j4 < 8; j4++ {
- size += 4 // s2.NhSet.Nhs[j4].IP.Af
- size += 1 * 16 // s2.NhSet.Nhs[j4].IP.Un
- size += 1 * 6 // s2.NhSet.Nhs[j4].Mac
- size += 4 // s2.NhSet.Nhs[j4].BdID
- size += 4 // s2.NhSet.Nhs[j4].RdID
- }
- }
- return size
-}
-func (m *GbpContractAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeUint16(uint16(m.Contract.Scope))
- buf.EncodeUint16(m.Contract.Sclass)
- buf.EncodeUint16(m.Contract.Dclass)
- buf.EncodeUint32(m.Contract.ACLIndex)
- buf.EncodeUint8(m.Contract.NEtherTypes)
- for i := 0; i < 16; i++ {
- var x uint16
- if i < len(m.Contract.AllowedEthertypes) {
- x = uint16(m.Contract.AllowedEthertypes[i])
- }
- buf.EncodeUint16(x)
- }
- buf.EncodeUint8(uint8(len(m.Contract.Rules)))
- for j1 := 0; j1 < len(m.Contract.Rules); j1++ {
- var v1 GbpRule // Rules
- if j1 < len(m.Contract.Rules) {
- v1 = m.Contract.Rules[j1]
- }
- buf.EncodeUint32(uint32(v1.Action))
- buf.EncodeUint32(uint32(v1.NhSet.HashMode))
- buf.EncodeUint8(v1.NhSet.NNhs)
- for j3 := 0; j3 < 8; j3++ {
- buf.EncodeUint32(uint32(v1.NhSet.Nhs[j3].IP.Af))
- buf.EncodeBytes(v1.NhSet.Nhs[j3].IP.Un.XXX_UnionData[:], 16)
- buf.EncodeBytes(v1.NhSet.Nhs[j3].Mac[:], 6)
- buf.EncodeUint32(v1.NhSet.Nhs[j3].BdID)
- buf.EncodeUint32(v1.NhSet.Nhs[j3].RdID)
- }
- }
- return buf.Bytes(), nil
-}
-func (m *GbpContractAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.Contract.Scope = GbpScope(buf.DecodeUint16())
- m.Contract.Sclass = buf.DecodeUint16()
- m.Contract.Dclass = buf.DecodeUint16()
- m.Contract.ACLIndex = buf.DecodeUint32()
- m.Contract.NEtherTypes = buf.DecodeUint8()
- m.Contract.AllowedEthertypes = make([]uint16, 16)
- for i := 0; i < len(m.Contract.AllowedEthertypes); i++ {
- m.Contract.AllowedEthertypes[i] = buf.DecodeUint16()
- }
- m.Contract.NRules = buf.DecodeUint8()
- m.Contract.Rules = make([]GbpRule, m.Contract.NRules)
- for j1 := 0; j1 < len(m.Contract.Rules); j1++ {
- m.Contract.Rules[j1].Action = GbpRuleAction(buf.DecodeUint32())
- m.Contract.Rules[j1].NhSet.HashMode = GbpHashMode(buf.DecodeUint32())
- m.Contract.Rules[j1].NhSet.NNhs = buf.DecodeUint8()
- for j3 := 0; j3 < 8; j3++ {
- m.Contract.Rules[j1].NhSet.Nhs[j3].IP.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Contract.Rules[j1].NhSet.Nhs[j3].IP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- copy(m.Contract.Rules[j1].NhSet.Nhs[j3].Mac[:], buf.DecodeBytes(6))
- m.Contract.Rules[j1].NhSet.Nhs[j3].BdID = buf.DecodeUint32()
- m.Contract.Rules[j1].NhSet.Nhs[j3].RdID = buf.DecodeUint32()
- }
- }
- return nil
-}
-
-// GbpContractAddDelReply defines message 'gbp_contract_add_del_reply'.
-type GbpContractAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
-}
-
-func (m *GbpContractAddDelReply) Reset() { *m = GbpContractAddDelReply{} }
-func (*GbpContractAddDelReply) GetMessageName() string { return "gbp_contract_add_del_reply" }
-func (*GbpContractAddDelReply) GetCrcString() string { return "1992deab" }
-func (*GbpContractAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpContractAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.StatsIndex
- return size
-}
-func (m *GbpContractAddDelReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.StatsIndex)
- return buf.Bytes(), nil
-}
-func (m *GbpContractAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.StatsIndex = buf.DecodeUint32()
- return nil
-}
-
-// GbpContractDetails defines message 'gbp_contract_details'.
-type GbpContractDetails struct {
- Contract GbpContract `binapi:"gbp_contract,name=contract" json:"contract,omitempty"`
-}
-
-func (m *GbpContractDetails) Reset() { *m = GbpContractDetails{} }
-func (*GbpContractDetails) GetMessageName() string { return "gbp_contract_details" }
-func (*GbpContractDetails) GetCrcString() string { return "2a18db6e" }
-func (*GbpContractDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpContractDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 2 // m.Contract.Scope
- size += 2 // m.Contract.Sclass
- size += 2 // m.Contract.Dclass
- size += 4 // m.Contract.ACLIndex
- size += 1 // m.Contract.NEtherTypes
- size += 2 * 16 // m.Contract.AllowedEthertypes
- size += 1 // m.Contract.NRules
- for j2 := 0; j2 < len(m.Contract.Rules); j2++ {
- var s2 GbpRule
- _ = s2
- if j2 < len(m.Contract.Rules) {
- s2 = m.Contract.Rules[j2]
- }
- size += 4 // s2.Action
- size += 4 // s2.NhSet.HashMode
- size += 1 // s2.NhSet.NNhs
- for j4 := 0; j4 < 8; j4++ {
- size += 4 // s2.NhSet.Nhs[j4].IP.Af
- size += 1 * 16 // s2.NhSet.Nhs[j4].IP.Un
- size += 1 * 6 // s2.NhSet.Nhs[j4].Mac
- size += 4 // s2.NhSet.Nhs[j4].BdID
- size += 4 // s2.NhSet.Nhs[j4].RdID
- }
- }
- return size
-}
-func (m *GbpContractDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint16(uint16(m.Contract.Scope))
- buf.EncodeUint16(m.Contract.Sclass)
- buf.EncodeUint16(m.Contract.Dclass)
- buf.EncodeUint32(m.Contract.ACLIndex)
- buf.EncodeUint8(m.Contract.NEtherTypes)
- for i := 0; i < 16; i++ {
- var x uint16
- if i < len(m.Contract.AllowedEthertypes) {
- x = uint16(m.Contract.AllowedEthertypes[i])
- }
- buf.EncodeUint16(x)
- }
- buf.EncodeUint8(uint8(len(m.Contract.Rules)))
- for j1 := 0; j1 < len(m.Contract.Rules); j1++ {
- var v1 GbpRule // Rules
- if j1 < len(m.Contract.Rules) {
- v1 = m.Contract.Rules[j1]
- }
- buf.EncodeUint32(uint32(v1.Action))
- buf.EncodeUint32(uint32(v1.NhSet.HashMode))
- buf.EncodeUint8(v1.NhSet.NNhs)
- for j3 := 0; j3 < 8; j3++ {
- buf.EncodeUint32(uint32(v1.NhSet.Nhs[j3].IP.Af))
- buf.EncodeBytes(v1.NhSet.Nhs[j3].IP.Un.XXX_UnionData[:], 16)
- buf.EncodeBytes(v1.NhSet.Nhs[j3].Mac[:], 6)
- buf.EncodeUint32(v1.NhSet.Nhs[j3].BdID)
- buf.EncodeUint32(v1.NhSet.Nhs[j3].RdID)
- }
- }
- return buf.Bytes(), nil
-}
-func (m *GbpContractDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Contract.Scope = GbpScope(buf.DecodeUint16())
- m.Contract.Sclass = buf.DecodeUint16()
- m.Contract.Dclass = buf.DecodeUint16()
- m.Contract.ACLIndex = buf.DecodeUint32()
- m.Contract.NEtherTypes = buf.DecodeUint8()
- m.Contract.AllowedEthertypes = make([]uint16, 16)
- for i := 0; i < len(m.Contract.AllowedEthertypes); i++ {
- m.Contract.AllowedEthertypes[i] = buf.DecodeUint16()
- }
- m.Contract.NRules = buf.DecodeUint8()
- m.Contract.Rules = make([]GbpRule, m.Contract.NRules)
- for j1 := 0; j1 < len(m.Contract.Rules); j1++ {
- m.Contract.Rules[j1].Action = GbpRuleAction(buf.DecodeUint32())
- m.Contract.Rules[j1].NhSet.HashMode = GbpHashMode(buf.DecodeUint32())
- m.Contract.Rules[j1].NhSet.NNhs = buf.DecodeUint8()
- for j3 := 0; j3 < 8; j3++ {
- m.Contract.Rules[j1].NhSet.Nhs[j3].IP.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Contract.Rules[j1].NhSet.Nhs[j3].IP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- copy(m.Contract.Rules[j1].NhSet.Nhs[j3].Mac[:], buf.DecodeBytes(6))
- m.Contract.Rules[j1].NhSet.Nhs[j3].BdID = buf.DecodeUint32()
- m.Contract.Rules[j1].NhSet.Nhs[j3].RdID = buf.DecodeUint32()
- }
- }
- return nil
-}
-
-// GbpContractDump defines message 'gbp_contract_dump'.
-type GbpContractDump struct{}
-
-func (m *GbpContractDump) Reset() { *m = GbpContractDump{} }
-func (*GbpContractDump) GetMessageName() string { return "gbp_contract_dump" }
-func (*GbpContractDump) GetCrcString() string { return "51077d14" }
-func (*GbpContractDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpContractDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *GbpContractDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *GbpContractDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// GbpEndpointAdd defines message 'gbp_endpoint_add'.
-type GbpEndpointAdd struct {
- Endpoint GbpEndpoint `binapi:"gbp_endpoint,name=endpoint" json:"endpoint,omitempty"`
-}
-
-func (m *GbpEndpointAdd) Reset() { *m = GbpEndpointAdd{} }
-func (*GbpEndpointAdd) GetMessageName() string { return "gbp_endpoint_add" }
-func (*GbpEndpointAdd) GetCrcString() string { return "9ce16d5a" }
-func (*GbpEndpointAdd) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpEndpointAdd) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Endpoint.SwIfIndex
- size += 2 // m.Endpoint.Sclass
- size += 4 // m.Endpoint.Flags
- size += 1 * 6 // m.Endpoint.Mac
- size += 4 // m.Endpoint.Tun.Src.Af
- size += 1 * 16 // m.Endpoint.Tun.Src.Un
- size += 4 // m.Endpoint.Tun.Dst.Af
- size += 1 * 16 // m.Endpoint.Tun.Dst.Un
- size += 1 // m.Endpoint.NIps
- for j2 := 0; j2 < len(m.Endpoint.Ips); j2++ {
- var s2 Address
- _ = s2
- if j2 < len(m.Endpoint.Ips) {
- s2 = m.Endpoint.Ips[j2]
- }
- size += 4 // s2.Af
- size += 1 * 16 // s2.Un
- }
- return size
-}
-func (m *GbpEndpointAdd) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.Endpoint.SwIfIndex))
- buf.EncodeUint16(m.Endpoint.Sclass)
- buf.EncodeUint32(uint32(m.Endpoint.Flags))
- buf.EncodeBytes(m.Endpoint.Mac[:], 6)
- buf.EncodeUint32(uint32(m.Endpoint.Tun.Src.Af))
- buf.EncodeBytes(m.Endpoint.Tun.Src.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.Endpoint.Tun.Dst.Af))
- buf.EncodeBytes(m.Endpoint.Tun.Dst.Un.XXX_UnionData[:], 16)
- buf.EncodeUint8(uint8(len(m.Endpoint.Ips)))
- for j1 := 0; j1 < len(m.Endpoint.Ips); j1++ {
- var v1 Address // Ips
- if j1 < len(m.Endpoint.Ips) {
- v1 = m.Endpoint.Ips[j1]
- }
- buf.EncodeUint32(uint32(v1.Af))
- buf.EncodeBytes(v1.Un.XXX_UnionData[:], 16)
- }
- return buf.Bytes(), nil
-}
-func (m *GbpEndpointAdd) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Endpoint.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Endpoint.Sclass = buf.DecodeUint16()
- m.Endpoint.Flags = GbpEndpointFlags(buf.DecodeUint32())
- copy(m.Endpoint.Mac[:], buf.DecodeBytes(6))
- m.Endpoint.Tun.Src.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Endpoint.Tun.Src.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Endpoint.Tun.Dst.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Endpoint.Tun.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Endpoint.NIps = buf.DecodeUint8()
- m.Endpoint.Ips = make([]Address, m.Endpoint.NIps)
- for j1 := 0; j1 < len(m.Endpoint.Ips); j1++ {
- m.Endpoint.Ips[j1].Af = AddressFamily(buf.DecodeUint32())
- copy(m.Endpoint.Ips[j1].Un.XXX_UnionData[:], buf.DecodeBytes(16))
- }
- return nil
-}
-
-// GbpEndpointAddReply defines message 'gbp_endpoint_add_reply'.
-type GbpEndpointAddReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- Handle uint32 `binapi:"u32,name=handle" json:"handle,omitempty"`
-}
-
-func (m *GbpEndpointAddReply) Reset() { *m = GbpEndpointAddReply{} }
-func (*GbpEndpointAddReply) GetMessageName() string { return "gbp_endpoint_add_reply" }
-func (*GbpEndpointAddReply) GetCrcString() string { return "1dd3ff3e" }
-func (*GbpEndpointAddReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpEndpointAddReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.Handle
- return size
-}
-func (m *GbpEndpointAddReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.Handle)
- return buf.Bytes(), nil
-}
-func (m *GbpEndpointAddReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.Handle = buf.DecodeUint32()
- return nil
-}
-
-// GbpEndpointDel defines message 'gbp_endpoint_del'.
-type GbpEndpointDel struct {
- Handle uint32 `binapi:"u32,name=handle" json:"handle,omitempty"`
-}
-
-func (m *GbpEndpointDel) Reset() { *m = GbpEndpointDel{} }
-func (*GbpEndpointDel) GetMessageName() string { return "gbp_endpoint_del" }
-func (*GbpEndpointDel) GetCrcString() string { return "b93cd566" }
-func (*GbpEndpointDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpEndpointDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Handle
- return size
-}
-func (m *GbpEndpointDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Handle)
- return buf.Bytes(), nil
-}
-func (m *GbpEndpointDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Handle = buf.DecodeUint32()
- return nil
-}
-
-// GbpEndpointDelReply defines message 'gbp_endpoint_del_reply'.
-type GbpEndpointDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *GbpEndpointDelReply) Reset() { *m = GbpEndpointDelReply{} }
-func (*GbpEndpointDelReply) GetMessageName() string { return "gbp_endpoint_del_reply" }
-func (*GbpEndpointDelReply) GetCrcString() string { return "e8d4e804" }
-func (*GbpEndpointDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpEndpointDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *GbpEndpointDelReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- return buf.Bytes(), nil
-}
-func (m *GbpEndpointDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// GbpEndpointDetails defines message 'gbp_endpoint_details'.
-type GbpEndpointDetails struct {
- Age float64 `binapi:"f64,name=age" json:"age,omitempty"`
- Handle uint32 `binapi:"u32,name=handle" json:"handle,omitempty"`
- Endpoint GbpEndpoint `binapi:"gbp_endpoint,name=endpoint" json:"endpoint,omitempty"`
-}
-
-func (m *GbpEndpointDetails) Reset() { *m = GbpEndpointDetails{} }
-func (*GbpEndpointDetails) GetMessageName() string { return "gbp_endpoint_details" }
-func (*GbpEndpointDetails) GetCrcString() string { return "08aecb60" }
-func (*GbpEndpointDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpEndpointDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 8 // m.Age
- size += 4 // m.Handle
- size += 4 // m.Endpoint.SwIfIndex
- size += 2 // m.Endpoint.Sclass
- size += 4 // m.Endpoint.Flags
- size += 1 * 6 // m.Endpoint.Mac
- size += 4 // m.Endpoint.Tun.Src.Af
- size += 1 * 16 // m.Endpoint.Tun.Src.Un
- size += 4 // m.Endpoint.Tun.Dst.Af
- size += 1 * 16 // m.Endpoint.Tun.Dst.Un
- size += 1 // m.Endpoint.NIps
- for j2 := 0; j2 < len(m.Endpoint.Ips); j2++ {
- var s2 Address
- _ = s2
- if j2 < len(m.Endpoint.Ips) {
- s2 = m.Endpoint.Ips[j2]
- }
- size += 4 // s2.Af
- size += 1 * 16 // s2.Un
- }
- return size
-}
-func (m *GbpEndpointDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeFloat64(m.Age)
- buf.EncodeUint32(m.Handle)
- buf.EncodeUint32(uint32(m.Endpoint.SwIfIndex))
- buf.EncodeUint16(m.Endpoint.Sclass)
- buf.EncodeUint32(uint32(m.Endpoint.Flags))
- buf.EncodeBytes(m.Endpoint.Mac[:], 6)
- buf.EncodeUint32(uint32(m.Endpoint.Tun.Src.Af))
- buf.EncodeBytes(m.Endpoint.Tun.Src.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.Endpoint.Tun.Dst.Af))
- buf.EncodeBytes(m.Endpoint.Tun.Dst.Un.XXX_UnionData[:], 16)
- buf.EncodeUint8(uint8(len(m.Endpoint.Ips)))
- for j1 := 0; j1 < len(m.Endpoint.Ips); j1++ {
- var v1 Address // Ips
- if j1 < len(m.Endpoint.Ips) {
- v1 = m.Endpoint.Ips[j1]
- }
- buf.EncodeUint32(uint32(v1.Af))
- buf.EncodeBytes(v1.Un.XXX_UnionData[:], 16)
- }
- return buf.Bytes(), nil
-}
-func (m *GbpEndpointDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Age = buf.DecodeFloat64()
- m.Handle = buf.DecodeUint32()
- m.Endpoint.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Endpoint.Sclass = buf.DecodeUint16()
- m.Endpoint.Flags = GbpEndpointFlags(buf.DecodeUint32())
- copy(m.Endpoint.Mac[:], buf.DecodeBytes(6))
- m.Endpoint.Tun.Src.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Endpoint.Tun.Src.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Endpoint.Tun.Dst.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Endpoint.Tun.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Endpoint.NIps = buf.DecodeUint8()
- m.Endpoint.Ips = make([]Address, m.Endpoint.NIps)
- for j1 := 0; j1 < len(m.Endpoint.Ips); j1++ {
- m.Endpoint.Ips[j1].Af = AddressFamily(buf.DecodeUint32())
- copy(m.Endpoint.Ips[j1].Un.XXX_UnionData[:], buf.DecodeBytes(16))
- }
- return nil
-}
-
-// GbpEndpointDump defines message 'gbp_endpoint_dump'.
-type GbpEndpointDump struct{}
-
-func (m *GbpEndpointDump) Reset() { *m = GbpEndpointDump{} }
-func (*GbpEndpointDump) GetMessageName() string { return "gbp_endpoint_dump" }
-func (*GbpEndpointDump) GetCrcString() string { return "51077d14" }
-func (*GbpEndpointDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpEndpointDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *GbpEndpointDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *GbpEndpointDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// GbpEndpointGroupAdd defines message 'gbp_endpoint_group_add'.
-type GbpEndpointGroupAdd struct {
- Epg GbpEndpointGroup `binapi:"gbp_endpoint_group,name=epg" json:"epg,omitempty"`
-}
-
-func (m *GbpEndpointGroupAdd) Reset() { *m = GbpEndpointGroupAdd{} }
-func (*GbpEndpointGroupAdd) GetMessageName() string { return "gbp_endpoint_group_add" }
-func (*GbpEndpointGroupAdd) GetCrcString() string { return "8e0f4054" }
-func (*GbpEndpointGroupAdd) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpEndpointGroupAdd) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Epg.Vnid
- size += 2 // m.Epg.Sclass
- size += 4 // m.Epg.BdID
- size += 4 // m.Epg.RdID
- size += 4 // m.Epg.UplinkSwIfIndex
- size += 4 // m.Epg.Retention.RemoteEpTimeout
- return size
-}
-func (m *GbpEndpointGroupAdd) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Epg.Vnid)
- buf.EncodeUint16(m.Epg.Sclass)
- buf.EncodeUint32(m.Epg.BdID)
- buf.EncodeUint32(m.Epg.RdID)
- buf.EncodeUint32(uint32(m.Epg.UplinkSwIfIndex))
- buf.EncodeUint32(m.Epg.Retention.RemoteEpTimeout)
- return buf.Bytes(), nil
-}
-func (m *GbpEndpointGroupAdd) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Epg.Vnid = buf.DecodeUint32()
- m.Epg.Sclass = buf.DecodeUint16()
- m.Epg.BdID = buf.DecodeUint32()
- m.Epg.RdID = buf.DecodeUint32()
- m.Epg.UplinkSwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Epg.Retention.RemoteEpTimeout = buf.DecodeUint32()
- return nil
-}
-
-// GbpEndpointGroupAddReply defines message 'gbp_endpoint_group_add_reply'.
-type GbpEndpointGroupAddReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *GbpEndpointGroupAddReply) Reset() { *m = GbpEndpointGroupAddReply{} }
-func (*GbpEndpointGroupAddReply) GetMessageName() string { return "gbp_endpoint_group_add_reply" }
-func (*GbpEndpointGroupAddReply) GetCrcString() string { return "e8d4e804" }
-func (*GbpEndpointGroupAddReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpEndpointGroupAddReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *GbpEndpointGroupAddReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- return buf.Bytes(), nil
-}
-func (m *GbpEndpointGroupAddReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// GbpEndpointGroupDel defines message 'gbp_endpoint_group_del'.
-type GbpEndpointGroupDel struct {
- Sclass uint16 `binapi:"u16,name=sclass" json:"sclass,omitempty"`
-}
-
-func (m *GbpEndpointGroupDel) Reset() { *m = GbpEndpointGroupDel{} }
-func (*GbpEndpointGroupDel) GetMessageName() string { return "gbp_endpoint_group_del" }
-func (*GbpEndpointGroupDel) GetCrcString() string { return "3436b8b7" }
-func (*GbpEndpointGroupDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpEndpointGroupDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 2 // m.Sclass
- return size
-}
-func (m *GbpEndpointGroupDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint16(m.Sclass)
- return buf.Bytes(), nil
-}
-func (m *GbpEndpointGroupDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Sclass = buf.DecodeUint16()
- return nil
-}
-
-// GbpEndpointGroupDelReply defines message 'gbp_endpoint_group_del_reply'.
-type GbpEndpointGroupDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *GbpEndpointGroupDelReply) Reset() { *m = GbpEndpointGroupDelReply{} }
-func (*GbpEndpointGroupDelReply) GetMessageName() string { return "gbp_endpoint_group_del_reply" }
-func (*GbpEndpointGroupDelReply) GetCrcString() string { return "e8d4e804" }
-func (*GbpEndpointGroupDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpEndpointGroupDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *GbpEndpointGroupDelReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- return buf.Bytes(), nil
-}
-func (m *GbpEndpointGroupDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// GbpEndpointGroupDetails defines message 'gbp_endpoint_group_details'.
-type GbpEndpointGroupDetails struct {
- Epg GbpEndpointGroup `binapi:"gbp_endpoint_group,name=epg" json:"epg,omitempty"`
-}
-
-func (m *GbpEndpointGroupDetails) Reset() { *m = GbpEndpointGroupDetails{} }
-func (*GbpEndpointGroupDetails) GetMessageName() string { return "gbp_endpoint_group_details" }
-func (*GbpEndpointGroupDetails) GetCrcString() string { return "8f38292c" }
-func (*GbpEndpointGroupDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpEndpointGroupDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Epg.Vnid
- size += 2 // m.Epg.Sclass
- size += 4 // m.Epg.BdID
- size += 4 // m.Epg.RdID
- size += 4 // m.Epg.UplinkSwIfIndex
- size += 4 // m.Epg.Retention.RemoteEpTimeout
- return size
-}
-func (m *GbpEndpointGroupDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Epg.Vnid)
- buf.EncodeUint16(m.Epg.Sclass)
- buf.EncodeUint32(m.Epg.BdID)
- buf.EncodeUint32(m.Epg.RdID)
- buf.EncodeUint32(uint32(m.Epg.UplinkSwIfIndex))
- buf.EncodeUint32(m.Epg.Retention.RemoteEpTimeout)
- return buf.Bytes(), nil
-}
-func (m *GbpEndpointGroupDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Epg.Vnid = buf.DecodeUint32()
- m.Epg.Sclass = buf.DecodeUint16()
- m.Epg.BdID = buf.DecodeUint32()
- m.Epg.RdID = buf.DecodeUint32()
- m.Epg.UplinkSwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Epg.Retention.RemoteEpTimeout = buf.DecodeUint32()
- return nil
-}
-
-// GbpEndpointGroupDump defines message 'gbp_endpoint_group_dump'.
-type GbpEndpointGroupDump struct{}
-
-func (m *GbpEndpointGroupDump) Reset() { *m = GbpEndpointGroupDump{} }
-func (*GbpEndpointGroupDump) GetMessageName() string { return "gbp_endpoint_group_dump" }
-func (*GbpEndpointGroupDump) GetCrcString() string { return "51077d14" }
-func (*GbpEndpointGroupDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpEndpointGroupDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *GbpEndpointGroupDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *GbpEndpointGroupDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// GbpExtItfAddDel defines message 'gbp_ext_itf_add_del'.
-type GbpExtItfAddDel struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- ExtItf GbpExtItf `binapi:"gbp_ext_itf,name=ext_itf" json:"ext_itf,omitempty"`
-}
-
-func (m *GbpExtItfAddDel) Reset() { *m = GbpExtItfAddDel{} }
-func (*GbpExtItfAddDel) GetMessageName() string { return "gbp_ext_itf_add_del" }
-func (*GbpExtItfAddDel) GetCrcString() string { return "12ed5700" }
-func (*GbpExtItfAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpExtItfAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 4 // m.ExtItf.SwIfIndex
- size += 4 // m.ExtItf.BdID
- size += 4 // m.ExtItf.RdID
- size += 4 // m.ExtItf.Flags
- return size
-}
-func (m *GbpExtItfAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeUint32(uint32(m.ExtItf.SwIfIndex))
- buf.EncodeUint32(m.ExtItf.BdID)
- buf.EncodeUint32(m.ExtItf.RdID)
- buf.EncodeUint32(uint32(m.ExtItf.Flags))
- return buf.Bytes(), nil
-}
-func (m *GbpExtItfAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.ExtItf.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.ExtItf.BdID = buf.DecodeUint32()
- m.ExtItf.RdID = buf.DecodeUint32()
- m.ExtItf.Flags = GbpExtItfFlags(buf.DecodeUint32())
- return nil
-}
-
-// GbpExtItfAddDelReply defines message 'gbp_ext_itf_add_del_reply'.
-type GbpExtItfAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *GbpExtItfAddDelReply) Reset() { *m = GbpExtItfAddDelReply{} }
-func (*GbpExtItfAddDelReply) GetMessageName() string { return "gbp_ext_itf_add_del_reply" }
-func (*GbpExtItfAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*GbpExtItfAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpExtItfAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *GbpExtItfAddDelReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- return buf.Bytes(), nil
-}
-func (m *GbpExtItfAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// GbpExtItfDetails defines message 'gbp_ext_itf_details'.
-type GbpExtItfDetails struct {
- ExtItf GbpExtItf `binapi:"gbp_ext_itf,name=ext_itf" json:"ext_itf,omitempty"`
-}
-
-func (m *GbpExtItfDetails) Reset() { *m = GbpExtItfDetails{} }
-func (*GbpExtItfDetails) GetMessageName() string { return "gbp_ext_itf_details" }
-func (*GbpExtItfDetails) GetCrcString() string { return "408a45c0" }
-func (*GbpExtItfDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpExtItfDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.ExtItf.SwIfIndex
- size += 4 // m.ExtItf.BdID
- size += 4 // m.ExtItf.RdID
- size += 4 // m.ExtItf.Flags
- return size
-}
-func (m *GbpExtItfDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.ExtItf.SwIfIndex))
- buf.EncodeUint32(m.ExtItf.BdID)
- buf.EncodeUint32(m.ExtItf.RdID)
- buf.EncodeUint32(uint32(m.ExtItf.Flags))
- return buf.Bytes(), nil
-}
-func (m *GbpExtItfDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.ExtItf.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.ExtItf.BdID = buf.DecodeUint32()
- m.ExtItf.RdID = buf.DecodeUint32()
- m.ExtItf.Flags = GbpExtItfFlags(buf.DecodeUint32())
- return nil
-}
-
-// GbpExtItfDump defines message 'gbp_ext_itf_dump'.
-type GbpExtItfDump struct{}
-
-func (m *GbpExtItfDump) Reset() { *m = GbpExtItfDump{} }
-func (*GbpExtItfDump) GetMessageName() string { return "gbp_ext_itf_dump" }
-func (*GbpExtItfDump) GetCrcString() string { return "51077d14" }
-func (*GbpExtItfDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpExtItfDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *GbpExtItfDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *GbpExtItfDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// GbpRecircAddDel defines message 'gbp_recirc_add_del'.
-type GbpRecircAddDel struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- Recirc GbpRecirc `binapi:"gbp_recirc,name=recirc" json:"recirc,omitempty"`
-}
-
-func (m *GbpRecircAddDel) Reset() { *m = GbpRecircAddDel{} }
-func (*GbpRecircAddDel) GetMessageName() string { return "gbp_recirc_add_del" }
-func (*GbpRecircAddDel) GetCrcString() string { return "718c69c3" }
-func (*GbpRecircAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpRecircAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 4 // m.Recirc.SwIfIndex
- size += 2 // m.Recirc.Sclass
- size += 1 // m.Recirc.IsExt
- return size
-}
-func (m *GbpRecircAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeUint32(uint32(m.Recirc.SwIfIndex))
- buf.EncodeUint16(m.Recirc.Sclass)
- buf.EncodeBool(m.Recirc.IsExt)
- return buf.Bytes(), nil
-}
-func (m *GbpRecircAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.Recirc.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Recirc.Sclass = buf.DecodeUint16()
- m.Recirc.IsExt = buf.DecodeBool()
- return nil
-}
-
-// GbpRecircAddDelReply defines message 'gbp_recirc_add_del_reply'.
-type GbpRecircAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *GbpRecircAddDelReply) Reset() { *m = GbpRecircAddDelReply{} }
-func (*GbpRecircAddDelReply) GetMessageName() string { return "gbp_recirc_add_del_reply" }
-func (*GbpRecircAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*GbpRecircAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpRecircAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *GbpRecircAddDelReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- return buf.Bytes(), nil
-}
-func (m *GbpRecircAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// GbpRecircDetails defines message 'gbp_recirc_details'.
-type GbpRecircDetails struct {
- Recirc GbpRecirc `binapi:"gbp_recirc,name=recirc" json:"recirc,omitempty"`
-}
-
-func (m *GbpRecircDetails) Reset() { *m = GbpRecircDetails{} }
-func (*GbpRecircDetails) GetMessageName() string { return "gbp_recirc_details" }
-func (*GbpRecircDetails) GetCrcString() string { return "66ecc42e" }
-func (*GbpRecircDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpRecircDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Recirc.SwIfIndex
- size += 2 // m.Recirc.Sclass
- size += 1 // m.Recirc.IsExt
- return size
-}
-func (m *GbpRecircDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.Recirc.SwIfIndex))
- buf.EncodeUint16(m.Recirc.Sclass)
- buf.EncodeBool(m.Recirc.IsExt)
- return buf.Bytes(), nil
-}
-func (m *GbpRecircDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Recirc.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Recirc.Sclass = buf.DecodeUint16()
- m.Recirc.IsExt = buf.DecodeBool()
- return nil
-}
-
-// GbpRecircDump defines message 'gbp_recirc_dump'.
-type GbpRecircDump struct{}
-
-func (m *GbpRecircDump) Reset() { *m = GbpRecircDump{} }
-func (*GbpRecircDump) GetMessageName() string { return "gbp_recirc_dump" }
-func (*GbpRecircDump) GetCrcString() string { return "51077d14" }
-func (*GbpRecircDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpRecircDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *GbpRecircDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *GbpRecircDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// GbpRouteDomainAdd defines message 'gbp_route_domain_add'.
-type GbpRouteDomainAdd struct {
- Rd GbpRouteDomain `binapi:"gbp_route_domain,name=rd" json:"rd,omitempty"`
-}
-
-func (m *GbpRouteDomainAdd) Reset() { *m = GbpRouteDomainAdd{} }
-func (*GbpRouteDomainAdd) GetMessageName() string { return "gbp_route_domain_add" }
-func (*GbpRouteDomainAdd) GetCrcString() string { return "2d0afe38" }
-func (*GbpRouteDomainAdd) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpRouteDomainAdd) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Rd.RdID
- size += 4 // m.Rd.IP4TableID
- size += 4 // m.Rd.IP6TableID
- size += 4 // m.Rd.IP4UuSwIfIndex
- size += 4 // m.Rd.IP6UuSwIfIndex
- size += 2 // m.Rd.Scope
- return size
-}
-func (m *GbpRouteDomainAdd) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Rd.RdID)
- buf.EncodeUint32(m.Rd.IP4TableID)
- buf.EncodeUint32(m.Rd.IP6TableID)
- buf.EncodeUint32(uint32(m.Rd.IP4UuSwIfIndex))
- buf.EncodeUint32(uint32(m.Rd.IP6UuSwIfIndex))
- buf.EncodeUint16(uint16(m.Rd.Scope))
- return buf.Bytes(), nil
-}
-func (m *GbpRouteDomainAdd) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Rd.RdID = buf.DecodeUint32()
- m.Rd.IP4TableID = buf.DecodeUint32()
- m.Rd.IP6TableID = buf.DecodeUint32()
- m.Rd.IP4UuSwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Rd.IP6UuSwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Rd.Scope = GbpScope(buf.DecodeUint16())
- return nil
-}
-
-// GbpRouteDomainAddReply defines message 'gbp_route_domain_add_reply'.
-type GbpRouteDomainAddReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *GbpRouteDomainAddReply) Reset() { *m = GbpRouteDomainAddReply{} }
-func (*GbpRouteDomainAddReply) GetMessageName() string { return "gbp_route_domain_add_reply" }
-func (*GbpRouteDomainAddReply) GetCrcString() string { return "e8d4e804" }
-func (*GbpRouteDomainAddReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpRouteDomainAddReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *GbpRouteDomainAddReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- return buf.Bytes(), nil
-}
-func (m *GbpRouteDomainAddReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// GbpRouteDomainDel defines message 'gbp_route_domain_del'.
-type GbpRouteDomainDel struct {
- RdID uint32 `binapi:"u32,name=rd_id" json:"rd_id,omitempty"`
-}
-
-func (m *GbpRouteDomainDel) Reset() { *m = GbpRouteDomainDel{} }
-func (*GbpRouteDomainDel) GetMessageName() string { return "gbp_route_domain_del" }
-func (*GbpRouteDomainDel) GetCrcString() string { return "bee4edcd" }
-func (*GbpRouteDomainDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpRouteDomainDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.RdID
- return size
-}
-func (m *GbpRouteDomainDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.RdID)
- return buf.Bytes(), nil
-}
-func (m *GbpRouteDomainDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.RdID = buf.DecodeUint32()
- return nil
-}
-
-// GbpRouteDomainDelReply defines message 'gbp_route_domain_del_reply'.
-type GbpRouteDomainDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *GbpRouteDomainDelReply) Reset() { *m = GbpRouteDomainDelReply{} }
-func (*GbpRouteDomainDelReply) GetMessageName() string { return "gbp_route_domain_del_reply" }
-func (*GbpRouteDomainDelReply) GetCrcString() string { return "e8d4e804" }
-func (*GbpRouteDomainDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpRouteDomainDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *GbpRouteDomainDelReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- return buf.Bytes(), nil
-}
-func (m *GbpRouteDomainDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// GbpRouteDomainDetails defines message 'gbp_route_domain_details'.
-type GbpRouteDomainDetails struct {
- Rd GbpRouteDomain `binapi:"gbp_route_domain,name=rd" json:"rd,omitempty"`
-}
-
-func (m *GbpRouteDomainDetails) Reset() { *m = GbpRouteDomainDetails{} }
-func (*GbpRouteDomainDetails) GetMessageName() string { return "gbp_route_domain_details" }
-func (*GbpRouteDomainDetails) GetCrcString() string { return "8ab11375" }
-func (*GbpRouteDomainDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpRouteDomainDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Rd.RdID
- size += 4 // m.Rd.IP4TableID
- size += 4 // m.Rd.IP6TableID
- size += 4 // m.Rd.IP4UuSwIfIndex
- size += 4 // m.Rd.IP6UuSwIfIndex
- size += 2 // m.Rd.Scope
- return size
-}
-func (m *GbpRouteDomainDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Rd.RdID)
- buf.EncodeUint32(m.Rd.IP4TableID)
- buf.EncodeUint32(m.Rd.IP6TableID)
- buf.EncodeUint32(uint32(m.Rd.IP4UuSwIfIndex))
- buf.EncodeUint32(uint32(m.Rd.IP6UuSwIfIndex))
- buf.EncodeUint16(uint16(m.Rd.Scope))
- return buf.Bytes(), nil
-}
-func (m *GbpRouteDomainDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Rd.RdID = buf.DecodeUint32()
- m.Rd.IP4TableID = buf.DecodeUint32()
- m.Rd.IP6TableID = buf.DecodeUint32()
- m.Rd.IP4UuSwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Rd.IP6UuSwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Rd.Scope = GbpScope(buf.DecodeUint16())
- return nil
-}
-
-// GbpRouteDomainDump defines message 'gbp_route_domain_dump'.
-type GbpRouteDomainDump struct{}
-
-func (m *GbpRouteDomainDump) Reset() { *m = GbpRouteDomainDump{} }
-func (*GbpRouteDomainDump) GetMessageName() string { return "gbp_route_domain_dump" }
-func (*GbpRouteDomainDump) GetCrcString() string { return "51077d14" }
-func (*GbpRouteDomainDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpRouteDomainDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *GbpRouteDomainDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *GbpRouteDomainDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// GbpRouteDomainDumpReply defines message 'gbp_route_domain_dump_reply'.
-type GbpRouteDomainDumpReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *GbpRouteDomainDumpReply) Reset() { *m = GbpRouteDomainDumpReply{} }
-func (*GbpRouteDomainDumpReply) GetMessageName() string { return "gbp_route_domain_dump_reply" }
-func (*GbpRouteDomainDumpReply) GetCrcString() string { return "e8d4e804" }
-func (*GbpRouteDomainDumpReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpRouteDomainDumpReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *GbpRouteDomainDumpReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- return buf.Bytes(), nil
-}
-func (m *GbpRouteDomainDumpReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// GbpSubnetAddDel defines message 'gbp_subnet_add_del'.
-type GbpSubnetAddDel struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- Subnet GbpSubnet `binapi:"gbp_subnet,name=subnet" json:"subnet,omitempty"`
-}
-
-func (m *GbpSubnetAddDel) Reset() { *m = GbpSubnetAddDel{} }
-func (*GbpSubnetAddDel) GetMessageName() string { return "gbp_subnet_add_del" }
-func (*GbpSubnetAddDel) GetCrcString() string { return "888aca35" }
-func (*GbpSubnetAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpSubnetAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 4 // m.Subnet.RdID
- size += 4 // m.Subnet.SwIfIndex
- size += 2 // m.Subnet.Sclass
- size += 4 // m.Subnet.Type
- size += 4 // m.Subnet.Prefix.Address.Af
- size += 1 * 16 // m.Subnet.Prefix.Address.Un
- size += 1 // m.Subnet.Prefix.Len
- return size
-}
-func (m *GbpSubnetAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeUint32(m.Subnet.RdID)
- buf.EncodeUint32(uint32(m.Subnet.SwIfIndex))
- buf.EncodeUint16(m.Subnet.Sclass)
- buf.EncodeUint32(uint32(m.Subnet.Type))
- buf.EncodeUint32(uint32(m.Subnet.Prefix.Address.Af))
- buf.EncodeBytes(m.Subnet.Prefix.Address.Un.XXX_UnionData[:], 16)
- buf.EncodeUint8(m.Subnet.Prefix.Len)
- return buf.Bytes(), nil
-}
-func (m *GbpSubnetAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.Subnet.RdID = buf.DecodeUint32()
- m.Subnet.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Subnet.Sclass = buf.DecodeUint16()
- m.Subnet.Type = GbpSubnetType(buf.DecodeUint32())
- m.Subnet.Prefix.Address.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Subnet.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Subnet.Prefix.Len = buf.DecodeUint8()
- return nil
-}
-
-// GbpSubnetAddDelReply defines message 'gbp_subnet_add_del_reply'.
-type GbpSubnetAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *GbpSubnetAddDelReply) Reset() { *m = GbpSubnetAddDelReply{} }
-func (*GbpSubnetAddDelReply) GetMessageName() string { return "gbp_subnet_add_del_reply" }
-func (*GbpSubnetAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*GbpSubnetAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpSubnetAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *GbpSubnetAddDelReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- return buf.Bytes(), nil
-}
-func (m *GbpSubnetAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// GbpSubnetDetails defines message 'gbp_subnet_details'.
-type GbpSubnetDetails struct {
- Subnet GbpSubnet `binapi:"gbp_subnet,name=subnet" json:"subnet,omitempty"`
-}
-
-func (m *GbpSubnetDetails) Reset() { *m = GbpSubnetDetails{} }
-func (*GbpSubnetDetails) GetMessageName() string { return "gbp_subnet_details" }
-func (*GbpSubnetDetails) GetCrcString() string { return "4ed84156" }
-func (*GbpSubnetDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpSubnetDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Subnet.RdID
- size += 4 // m.Subnet.SwIfIndex
- size += 2 // m.Subnet.Sclass
- size += 4 // m.Subnet.Type
- size += 4 // m.Subnet.Prefix.Address.Af
- size += 1 * 16 // m.Subnet.Prefix.Address.Un
- size += 1 // m.Subnet.Prefix.Len
- return size
-}
-func (m *GbpSubnetDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Subnet.RdID)
- buf.EncodeUint32(uint32(m.Subnet.SwIfIndex))
- buf.EncodeUint16(m.Subnet.Sclass)
- buf.EncodeUint32(uint32(m.Subnet.Type))
- buf.EncodeUint32(uint32(m.Subnet.Prefix.Address.Af))
- buf.EncodeBytes(m.Subnet.Prefix.Address.Un.XXX_UnionData[:], 16)
- buf.EncodeUint8(m.Subnet.Prefix.Len)
- return buf.Bytes(), nil
-}
-func (m *GbpSubnetDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Subnet.RdID = buf.DecodeUint32()
- m.Subnet.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Subnet.Sclass = buf.DecodeUint16()
- m.Subnet.Type = GbpSubnetType(buf.DecodeUint32())
- m.Subnet.Prefix.Address.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Subnet.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Subnet.Prefix.Len = buf.DecodeUint8()
- return nil
-}
-
-// GbpSubnetDump defines message 'gbp_subnet_dump'.
-type GbpSubnetDump struct{}
-
-func (m *GbpSubnetDump) Reset() { *m = GbpSubnetDump{} }
-func (*GbpSubnetDump) GetMessageName() string { return "gbp_subnet_dump" }
-func (*GbpSubnetDump) GetCrcString() string { return "51077d14" }
-func (*GbpSubnetDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpSubnetDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *GbpSubnetDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *GbpSubnetDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// GbpVxlanTunnelAdd defines message 'gbp_vxlan_tunnel_add'.
-type GbpVxlanTunnelAdd struct {
- Tunnel GbpVxlanTunnel `binapi:"gbp_vxlan_tunnel,name=tunnel" json:"tunnel,omitempty"`
-}
-
-func (m *GbpVxlanTunnelAdd) Reset() { *m = GbpVxlanTunnelAdd{} }
-func (*GbpVxlanTunnelAdd) GetMessageName() string { return "gbp_vxlan_tunnel_add" }
-func (*GbpVxlanTunnelAdd) GetCrcString() string { return "3e070b35" }
-func (*GbpVxlanTunnelAdd) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpVxlanTunnelAdd) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Tunnel.Vni
- size += 4 // m.Tunnel.Mode
- size += 4 // m.Tunnel.BdRdID
- size += 1 * 4 // m.Tunnel.Src
- return size
-}
-func (m *GbpVxlanTunnelAdd) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Tunnel.Vni)
- buf.EncodeUint32(uint32(m.Tunnel.Mode))
- buf.EncodeUint32(m.Tunnel.BdRdID)
- buf.EncodeBytes(m.Tunnel.Src[:], 4)
- return buf.Bytes(), nil
-}
-func (m *GbpVxlanTunnelAdd) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Tunnel.Vni = buf.DecodeUint32()
- m.Tunnel.Mode = GbpVxlanTunnelMode(buf.DecodeUint32())
- m.Tunnel.BdRdID = buf.DecodeUint32()
- copy(m.Tunnel.Src[:], buf.DecodeBytes(4))
- return nil
-}
-
-// GbpVxlanTunnelAddReply defines message 'gbp_vxlan_tunnel_add_reply'.
-type GbpVxlanTunnelAddReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *GbpVxlanTunnelAddReply) Reset() { *m = GbpVxlanTunnelAddReply{} }
-func (*GbpVxlanTunnelAddReply) GetMessageName() string { return "gbp_vxlan_tunnel_add_reply" }
-func (*GbpVxlanTunnelAddReply) GetCrcString() string { return "5383d31f" }
-func (*GbpVxlanTunnelAddReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpVxlanTunnelAddReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *GbpVxlanTunnelAddReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- return buf.Bytes(), nil
-}
-func (m *GbpVxlanTunnelAddReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// GbpVxlanTunnelDel defines message 'gbp_vxlan_tunnel_del'.
-type GbpVxlanTunnelDel struct {
- Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
-}
-
-func (m *GbpVxlanTunnelDel) Reset() { *m = GbpVxlanTunnelDel{} }
-func (*GbpVxlanTunnelDel) GetMessageName() string { return "gbp_vxlan_tunnel_del" }
-func (*GbpVxlanTunnelDel) GetCrcString() string { return "8d1f2fe9" }
-func (*GbpVxlanTunnelDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpVxlanTunnelDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Vni
- return size
-}
-func (m *GbpVxlanTunnelDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Vni)
- return buf.Bytes(), nil
-}
-func (m *GbpVxlanTunnelDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Vni = buf.DecodeUint32()
- return nil
-}
-
-// GbpVxlanTunnelDelReply defines message 'gbp_vxlan_tunnel_del_reply'.
-type GbpVxlanTunnelDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *GbpVxlanTunnelDelReply) Reset() { *m = GbpVxlanTunnelDelReply{} }
-func (*GbpVxlanTunnelDelReply) GetMessageName() string { return "gbp_vxlan_tunnel_del_reply" }
-func (*GbpVxlanTunnelDelReply) GetCrcString() string { return "e8d4e804" }
-func (*GbpVxlanTunnelDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpVxlanTunnelDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *GbpVxlanTunnelDelReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- return buf.Bytes(), nil
-}
-func (m *GbpVxlanTunnelDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// GbpVxlanTunnelDetails defines message 'gbp_vxlan_tunnel_details'.
-type GbpVxlanTunnelDetails struct {
- Tunnel GbpVxlanTunnel `binapi:"gbp_vxlan_tunnel,name=tunnel" json:"tunnel,omitempty"`
-}
-
-func (m *GbpVxlanTunnelDetails) Reset() { *m = GbpVxlanTunnelDetails{} }
-func (*GbpVxlanTunnelDetails) GetMessageName() string { return "gbp_vxlan_tunnel_details" }
-func (*GbpVxlanTunnelDetails) GetCrcString() string { return "65c6c818" }
-func (*GbpVxlanTunnelDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GbpVxlanTunnelDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Tunnel.Vni
- size += 4 // m.Tunnel.Mode
- size += 4 // m.Tunnel.BdRdID
- size += 1 * 4 // m.Tunnel.Src
- return size
-}
-func (m *GbpVxlanTunnelDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Tunnel.Vni)
- buf.EncodeUint32(uint32(m.Tunnel.Mode))
- buf.EncodeUint32(m.Tunnel.BdRdID)
- buf.EncodeBytes(m.Tunnel.Src[:], 4)
- return buf.Bytes(), nil
-}
-func (m *GbpVxlanTunnelDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Tunnel.Vni = buf.DecodeUint32()
- m.Tunnel.Mode = GbpVxlanTunnelMode(buf.DecodeUint32())
- m.Tunnel.BdRdID = buf.DecodeUint32()
- copy(m.Tunnel.Src[:], buf.DecodeBytes(4))
- return nil
-}
-
-// GbpVxlanTunnelDump defines message 'gbp_vxlan_tunnel_dump'.
-type GbpVxlanTunnelDump struct{}
-
-func (m *GbpVxlanTunnelDump) Reset() { *m = GbpVxlanTunnelDump{} }
-func (*GbpVxlanTunnelDump) GetMessageName() string { return "gbp_vxlan_tunnel_dump" }
-func (*GbpVxlanTunnelDump) GetCrcString() string { return "51077d14" }
-func (*GbpVxlanTunnelDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GbpVxlanTunnelDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *GbpVxlanTunnelDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *GbpVxlanTunnelDump) Unmarshal(b []byte) error {
- return nil
-}
-
-func init() { file_gbp_binapi_init() }
-func file_gbp_binapi_init() {
- api.RegisterMessage((*GbpBridgeDomainAdd)(nil), "gbp_bridge_domain_add_8454bfdf")
- api.RegisterMessage((*GbpBridgeDomainAddReply)(nil), "gbp_bridge_domain_add_reply_e8d4e804")
- api.RegisterMessage((*GbpBridgeDomainDel)(nil), "gbp_bridge_domain_del_c25fdce6")
- api.RegisterMessage((*GbpBridgeDomainDelReply)(nil), "gbp_bridge_domain_del_reply_e8d4e804")
- api.RegisterMessage((*GbpBridgeDomainDetails)(nil), "gbp_bridge_domain_details_2acd15f9")
- api.RegisterMessage((*GbpBridgeDomainDump)(nil), "gbp_bridge_domain_dump_51077d14")
- api.RegisterMessage((*GbpBridgeDomainDumpReply)(nil), "gbp_bridge_domain_dump_reply_e8d4e804")
- api.RegisterMessage((*GbpContractAddDel)(nil), "gbp_contract_add_del_553e275b")
- api.RegisterMessage((*GbpContractAddDelReply)(nil), "gbp_contract_add_del_reply_1992deab")
- api.RegisterMessage((*GbpContractDetails)(nil), "gbp_contract_details_2a18db6e")
- api.RegisterMessage((*GbpContractDump)(nil), "gbp_contract_dump_51077d14")
- api.RegisterMessage((*GbpEndpointAdd)(nil), "gbp_endpoint_add_9ce16d5a")
- api.RegisterMessage((*GbpEndpointAddReply)(nil), "gbp_endpoint_add_reply_1dd3ff3e")
- api.RegisterMessage((*GbpEndpointDel)(nil), "gbp_endpoint_del_b93cd566")
- api.RegisterMessage((*GbpEndpointDelReply)(nil), "gbp_endpoint_del_reply_e8d4e804")
- api.RegisterMessage((*GbpEndpointDetails)(nil), "gbp_endpoint_details_08aecb60")
- api.RegisterMessage((*GbpEndpointDump)(nil), "gbp_endpoint_dump_51077d14")
- api.RegisterMessage((*GbpEndpointGroupAdd)(nil), "gbp_endpoint_group_add_8e0f4054")
- api.RegisterMessage((*GbpEndpointGroupAddReply)(nil), "gbp_endpoint_group_add_reply_e8d4e804")
- api.RegisterMessage((*GbpEndpointGroupDel)(nil), "gbp_endpoint_group_del_3436b8b7")
- api.RegisterMessage((*GbpEndpointGroupDelReply)(nil), "gbp_endpoint_group_del_reply_e8d4e804")
- api.RegisterMessage((*GbpEndpointGroupDetails)(nil), "gbp_endpoint_group_details_8f38292c")
- api.RegisterMessage((*GbpEndpointGroupDump)(nil), "gbp_endpoint_group_dump_51077d14")
- api.RegisterMessage((*GbpExtItfAddDel)(nil), "gbp_ext_itf_add_del_12ed5700")
- api.RegisterMessage((*GbpExtItfAddDelReply)(nil), "gbp_ext_itf_add_del_reply_e8d4e804")
- api.RegisterMessage((*GbpExtItfDetails)(nil), "gbp_ext_itf_details_408a45c0")
- api.RegisterMessage((*GbpExtItfDump)(nil), "gbp_ext_itf_dump_51077d14")
- api.RegisterMessage((*GbpRecircAddDel)(nil), "gbp_recirc_add_del_718c69c3")
- api.RegisterMessage((*GbpRecircAddDelReply)(nil), "gbp_recirc_add_del_reply_e8d4e804")
- api.RegisterMessage((*GbpRecircDetails)(nil), "gbp_recirc_details_66ecc42e")
- api.RegisterMessage((*GbpRecircDump)(nil), "gbp_recirc_dump_51077d14")
- api.RegisterMessage((*GbpRouteDomainAdd)(nil), "gbp_route_domain_add_2d0afe38")
- api.RegisterMessage((*GbpRouteDomainAddReply)(nil), "gbp_route_domain_add_reply_e8d4e804")
- api.RegisterMessage((*GbpRouteDomainDel)(nil), "gbp_route_domain_del_bee4edcd")
- api.RegisterMessage((*GbpRouteDomainDelReply)(nil), "gbp_route_domain_del_reply_e8d4e804")
- api.RegisterMessage((*GbpRouteDomainDetails)(nil), "gbp_route_domain_details_8ab11375")
- api.RegisterMessage((*GbpRouteDomainDump)(nil), "gbp_route_domain_dump_51077d14")
- api.RegisterMessage((*GbpRouteDomainDumpReply)(nil), "gbp_route_domain_dump_reply_e8d4e804")
- api.RegisterMessage((*GbpSubnetAddDel)(nil), "gbp_subnet_add_del_888aca35")
- api.RegisterMessage((*GbpSubnetAddDelReply)(nil), "gbp_subnet_add_del_reply_e8d4e804")
- api.RegisterMessage((*GbpSubnetDetails)(nil), "gbp_subnet_details_4ed84156")
- api.RegisterMessage((*GbpSubnetDump)(nil), "gbp_subnet_dump_51077d14")
- api.RegisterMessage((*GbpVxlanTunnelAdd)(nil), "gbp_vxlan_tunnel_add_3e070b35")
- api.RegisterMessage((*GbpVxlanTunnelAddReply)(nil), "gbp_vxlan_tunnel_add_reply_5383d31f")
- api.RegisterMessage((*GbpVxlanTunnelDel)(nil), "gbp_vxlan_tunnel_del_8d1f2fe9")
- api.RegisterMessage((*GbpVxlanTunnelDelReply)(nil), "gbp_vxlan_tunnel_del_reply_e8d4e804")
- api.RegisterMessage((*GbpVxlanTunnelDetails)(nil), "gbp_vxlan_tunnel_details_65c6c818")
- api.RegisterMessage((*GbpVxlanTunnelDump)(nil), "gbp_vxlan_tunnel_dump_51077d14")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*GbpBridgeDomainAdd)(nil),
- (*GbpBridgeDomainAddReply)(nil),
- (*GbpBridgeDomainDel)(nil),
- (*GbpBridgeDomainDelReply)(nil),
- (*GbpBridgeDomainDetails)(nil),
- (*GbpBridgeDomainDump)(nil),
- (*GbpBridgeDomainDumpReply)(nil),
- (*GbpContractAddDel)(nil),
- (*GbpContractAddDelReply)(nil),
- (*GbpContractDetails)(nil),
- (*GbpContractDump)(nil),
- (*GbpEndpointAdd)(nil),
- (*GbpEndpointAddReply)(nil),
- (*GbpEndpointDel)(nil),
- (*GbpEndpointDelReply)(nil),
- (*GbpEndpointDetails)(nil),
- (*GbpEndpointDump)(nil),
- (*GbpEndpointGroupAdd)(nil),
- (*GbpEndpointGroupAddReply)(nil),
- (*GbpEndpointGroupDel)(nil),
- (*GbpEndpointGroupDelReply)(nil),
- (*GbpEndpointGroupDetails)(nil),
- (*GbpEndpointGroupDump)(nil),
- (*GbpExtItfAddDel)(nil),
- (*GbpExtItfAddDelReply)(nil),
- (*GbpExtItfDetails)(nil),
- (*GbpExtItfDump)(nil),
- (*GbpRecircAddDel)(nil),
- (*GbpRecircAddDelReply)(nil),
- (*GbpRecircDetails)(nil),
- (*GbpRecircDump)(nil),
- (*GbpRouteDomainAdd)(nil),
- (*GbpRouteDomainAddReply)(nil),
- (*GbpRouteDomainDel)(nil),
- (*GbpRouteDomainDelReply)(nil),
- (*GbpRouteDomainDetails)(nil),
- (*GbpRouteDomainDump)(nil),
- (*GbpRouteDomainDumpReply)(nil),
- (*GbpSubnetAddDel)(nil),
- (*GbpSubnetAddDelReply)(nil),
- (*GbpSubnetDetails)(nil),
- (*GbpSubnetDump)(nil),
- (*GbpVxlanTunnelAdd)(nil),
- (*GbpVxlanTunnelAddReply)(nil),
- (*GbpVxlanTunnelDel)(nil),
- (*GbpVxlanTunnelDelReply)(nil),
- (*GbpVxlanTunnelDetails)(nil),
- (*GbpVxlanTunnelDump)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/gbp/gbp_rpc.ba.go b/internal/testbinapi/binapi2001/gbp/gbp_rpc.ba.go
deleted file mode 100644
index cd62e3a..0000000
--- a/internal/testbinapi/binapi2001/gbp/gbp_rpc.ba.go
+++ /dev/null
@@ -1,560 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package gbp
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service gbp.
-type RPCService interface {
- GbpBridgeDomainAdd(ctx context.Context, in *GbpBridgeDomainAdd) (*GbpBridgeDomainAddReply, error)
- GbpBridgeDomainDel(ctx context.Context, in *GbpBridgeDomainDel) (*GbpBridgeDomainDelReply, error)
- GbpBridgeDomainDump(ctx context.Context, in *GbpBridgeDomainDump) (RPCService_GbpBridgeDomainDumpClient, error)
- GbpContractAddDel(ctx context.Context, in *GbpContractAddDel) (*GbpContractAddDelReply, error)
- GbpContractDump(ctx context.Context, in *GbpContractDump) (RPCService_GbpContractDumpClient, error)
- GbpEndpointAdd(ctx context.Context, in *GbpEndpointAdd) (*GbpEndpointAddReply, error)
- GbpEndpointDel(ctx context.Context, in *GbpEndpointDel) (*GbpEndpointDelReply, error)
- GbpEndpointDump(ctx context.Context, in *GbpEndpointDump) (RPCService_GbpEndpointDumpClient, error)
- GbpEndpointGroupAdd(ctx context.Context, in *GbpEndpointGroupAdd) (*GbpEndpointGroupAddReply, error)
- GbpEndpointGroupDel(ctx context.Context, in *GbpEndpointGroupDel) (*GbpEndpointGroupDelReply, error)
- GbpEndpointGroupDump(ctx context.Context, in *GbpEndpointGroupDump) (RPCService_GbpEndpointGroupDumpClient, error)
- GbpExtItfAddDel(ctx context.Context, in *GbpExtItfAddDel) (*GbpExtItfAddDelReply, error)
- GbpExtItfDump(ctx context.Context, in *GbpExtItfDump) (RPCService_GbpExtItfDumpClient, error)
- GbpRecircAddDel(ctx context.Context, in *GbpRecircAddDel) (*GbpRecircAddDelReply, error)
- GbpRecircDump(ctx context.Context, in *GbpRecircDump) (RPCService_GbpRecircDumpClient, error)
- GbpRouteDomainAdd(ctx context.Context, in *GbpRouteDomainAdd) (*GbpRouteDomainAddReply, error)
- GbpRouteDomainDel(ctx context.Context, in *GbpRouteDomainDel) (*GbpRouteDomainDelReply, error)
- GbpRouteDomainDump(ctx context.Context, in *GbpRouteDomainDump) (RPCService_GbpRouteDomainDumpClient, error)
- GbpSubnetAddDel(ctx context.Context, in *GbpSubnetAddDel) (*GbpSubnetAddDelReply, error)
- GbpSubnetDump(ctx context.Context, in *GbpSubnetDump) (RPCService_GbpSubnetDumpClient, error)
- GbpVxlanTunnelAdd(ctx context.Context, in *GbpVxlanTunnelAdd) (*GbpVxlanTunnelAddReply, error)
- GbpVxlanTunnelDel(ctx context.Context, in *GbpVxlanTunnelDel) (*GbpVxlanTunnelDelReply, error)
- GbpVxlanTunnelDump(ctx context.Context, in *GbpVxlanTunnelDump) (RPCService_GbpVxlanTunnelDumpClient, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) GbpBridgeDomainAdd(ctx context.Context, in *GbpBridgeDomainAdd) (*GbpBridgeDomainAddReply, error) {
- out := new(GbpBridgeDomainAddReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GbpBridgeDomainDel(ctx context.Context, in *GbpBridgeDomainDel) (*GbpBridgeDomainDelReply, error) {
- out := new(GbpBridgeDomainDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GbpBridgeDomainDump(ctx context.Context, in *GbpBridgeDomainDump) (RPCService_GbpBridgeDomainDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_GbpBridgeDomainDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_GbpBridgeDomainDumpClient interface {
- Recv() (*GbpBridgeDomainDetails, error)
- api.Stream
-}
-
-type serviceClient_GbpBridgeDomainDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_GbpBridgeDomainDumpClient) Recv() (*GbpBridgeDomainDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *GbpBridgeDomainDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) GbpContractAddDel(ctx context.Context, in *GbpContractAddDel) (*GbpContractAddDelReply, error) {
- out := new(GbpContractAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GbpContractDump(ctx context.Context, in *GbpContractDump) (RPCService_GbpContractDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_GbpContractDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_GbpContractDumpClient interface {
- Recv() (*GbpContractDetails, error)
- api.Stream
-}
-
-type serviceClient_GbpContractDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_GbpContractDumpClient) Recv() (*GbpContractDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *GbpContractDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) GbpEndpointAdd(ctx context.Context, in *GbpEndpointAdd) (*GbpEndpointAddReply, error) {
- out := new(GbpEndpointAddReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GbpEndpointDel(ctx context.Context, in *GbpEndpointDel) (*GbpEndpointDelReply, error) {
- out := new(GbpEndpointDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GbpEndpointDump(ctx context.Context, in *GbpEndpointDump) (RPCService_GbpEndpointDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_GbpEndpointDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_GbpEndpointDumpClient interface {
- Recv() (*GbpEndpointDetails, error)
- api.Stream
-}
-
-type serviceClient_GbpEndpointDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_GbpEndpointDumpClient) Recv() (*GbpEndpointDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *GbpEndpointDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) GbpEndpointGroupAdd(ctx context.Context, in *GbpEndpointGroupAdd) (*GbpEndpointGroupAddReply, error) {
- out := new(GbpEndpointGroupAddReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GbpEndpointGroupDel(ctx context.Context, in *GbpEndpointGroupDel) (*GbpEndpointGroupDelReply, error) {
- out := new(GbpEndpointGroupDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GbpEndpointGroupDump(ctx context.Context, in *GbpEndpointGroupDump) (RPCService_GbpEndpointGroupDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_GbpEndpointGroupDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_GbpEndpointGroupDumpClient interface {
- Recv() (*GbpEndpointGroupDetails, error)
- api.Stream
-}
-
-type serviceClient_GbpEndpointGroupDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_GbpEndpointGroupDumpClient) Recv() (*GbpEndpointGroupDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *GbpEndpointGroupDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) GbpExtItfAddDel(ctx context.Context, in *GbpExtItfAddDel) (*GbpExtItfAddDelReply, error) {
- out := new(GbpExtItfAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GbpExtItfDump(ctx context.Context, in *GbpExtItfDump) (RPCService_GbpExtItfDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_GbpExtItfDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_GbpExtItfDumpClient interface {
- Recv() (*GbpExtItfDetails, error)
- api.Stream
-}
-
-type serviceClient_GbpExtItfDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_GbpExtItfDumpClient) Recv() (*GbpExtItfDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *GbpExtItfDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) GbpRecircAddDel(ctx context.Context, in *GbpRecircAddDel) (*GbpRecircAddDelReply, error) {
- out := new(GbpRecircAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GbpRecircDump(ctx context.Context, in *GbpRecircDump) (RPCService_GbpRecircDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_GbpRecircDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_GbpRecircDumpClient interface {
- Recv() (*GbpRecircDetails, error)
- api.Stream
-}
-
-type serviceClient_GbpRecircDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_GbpRecircDumpClient) Recv() (*GbpRecircDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *GbpRecircDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) GbpRouteDomainAdd(ctx context.Context, in *GbpRouteDomainAdd) (*GbpRouteDomainAddReply, error) {
- out := new(GbpRouteDomainAddReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GbpRouteDomainDel(ctx context.Context, in *GbpRouteDomainDel) (*GbpRouteDomainDelReply, error) {
- out := new(GbpRouteDomainDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GbpRouteDomainDump(ctx context.Context, in *GbpRouteDomainDump) (RPCService_GbpRouteDomainDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_GbpRouteDomainDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_GbpRouteDomainDumpClient interface {
- Recv() (*GbpRouteDomainDetails, error)
- api.Stream
-}
-
-type serviceClient_GbpRouteDomainDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_GbpRouteDomainDumpClient) Recv() (*GbpRouteDomainDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *GbpRouteDomainDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) GbpSubnetAddDel(ctx context.Context, in *GbpSubnetAddDel) (*GbpSubnetAddDelReply, error) {
- out := new(GbpSubnetAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GbpSubnetDump(ctx context.Context, in *GbpSubnetDump) (RPCService_GbpSubnetDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_GbpSubnetDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_GbpSubnetDumpClient interface {
- Recv() (*GbpSubnetDetails, error)
- api.Stream
-}
-
-type serviceClient_GbpSubnetDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_GbpSubnetDumpClient) Recv() (*GbpSubnetDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *GbpSubnetDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) GbpVxlanTunnelAdd(ctx context.Context, in *GbpVxlanTunnelAdd) (*GbpVxlanTunnelAddReply, error) {
- out := new(GbpVxlanTunnelAddReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GbpVxlanTunnelDel(ctx context.Context, in *GbpVxlanTunnelDel) (*GbpVxlanTunnelDelReply, error) {
- out := new(GbpVxlanTunnelDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GbpVxlanTunnelDump(ctx context.Context, in *GbpVxlanTunnelDump) (RPCService_GbpVxlanTunnelDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_GbpVxlanTunnelDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_GbpVxlanTunnelDumpClient interface {
- Recv() (*GbpVxlanTunnelDetails, error)
- api.Stream
-}
-
-type serviceClient_GbpVxlanTunnelDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_GbpVxlanTunnelDumpClient) Recv() (*GbpVxlanTunnelDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *GbpVxlanTunnelDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
diff --git a/internal/testbinapi/binapi2001/gen.go b/internal/testbinapi/binapi2001/gen.go
deleted file mode 100644
index 60b8e97..0000000
--- a/internal/testbinapi/binapi2001/gen.go
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright (c) 2020 Cisco and/or its affiliates.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at:
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package binapi2001
-
-//go:generate env VPP_VERSION=20.01 ../../../bin/binapi-generator -input-dir=.vppapi -output-dir=.
diff --git a/internal/testbinapi/binapi2001/geneve/geneve.ba.go b/internal/testbinapi/binapi2001/geneve/geneve.ba.go
deleted file mode 100644
index fda3441..0000000
--- a/internal/testbinapi/binapi2001/geneve/geneve.ba.go
+++ /dev/null
@@ -1,1209 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/geneve.api.json
-
-// Package geneve contains generated bindings for API file geneve.api.
-//
-// Contents:
-// 7 aliases
-// 10 enums
-// 6 structs
-// 1 union
-// 6 messages
-//
-package geneve
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "geneve"
- APIVersion = "2.0.0"
- VersionCrc = 0x46ee8ab6
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// MacAddress defines alias 'mac_address'.
-type MacAddress [6]uint8
-
-func ParseMacAddress(s string) (MacAddress, error) {
- var macaddr MacAddress
- mac, err := net.ParseMAC(s)
- if err != nil {
- return macaddr, err
- }
- copy(macaddr[:], mac[:])
- return macaddr, nil
-}
-
-func (x MacAddress) ToMAC() net.HardwareAddr {
- return net.HardwareAddr(x[:])
-}
-
-func (x MacAddress) String() string {
- return x.ToMAC().String()
-}
-
-func (x *MacAddress) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *MacAddress) UnmarshalText(text []byte) error {
- mac, err := ParseMacAddress(string(text))
- if err != nil {
- return err
- }
- *x = mac
- return nil
-}
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
-
-// GeneveAddDelTunnel defines message 'geneve_add_del_tunnel'.
-type GeneveAddDelTunnel struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- LocalAddress Address `binapi:"address,name=local_address" json:"local_address,omitempty"`
- RemoteAddress Address `binapi:"address,name=remote_address" json:"remote_address,omitempty"`
- McastSwIfIndex InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
- EncapVrfID uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
- DecapNextIndex uint32 `binapi:"u32,name=decap_next_index" json:"decap_next_index,omitempty"`
- Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
-}
-
-func (m *GeneveAddDelTunnel) Reset() { *m = GeneveAddDelTunnel{} }
-func (*GeneveAddDelTunnel) GetMessageName() string { return "geneve_add_del_tunnel" }
-func (*GeneveAddDelTunnel) GetCrcString() string { return "976693b5" }
-func (*GeneveAddDelTunnel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GeneveAddDelTunnel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 4 // m.LocalAddress.Af
- size += 1 * 16 // m.LocalAddress.Un
- size += 4 // m.RemoteAddress.Af
- size += 1 * 16 // m.RemoteAddress.Un
- size += 4 // m.McastSwIfIndex
- size += 4 // m.EncapVrfID
- size += 4 // m.DecapNextIndex
- size += 4 // m.Vni
- return size
-}
-func (m *GeneveAddDelTunnel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeUint32(uint32(m.LocalAddress.Af))
- buf.EncodeBytes(m.LocalAddress.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.RemoteAddress.Af))
- buf.EncodeBytes(m.RemoteAddress.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.McastSwIfIndex))
- buf.EncodeUint32(m.EncapVrfID)
- buf.EncodeUint32(m.DecapNextIndex)
- buf.EncodeUint32(m.Vni)
- return buf.Bytes(), nil
-}
-func (m *GeneveAddDelTunnel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.LocalAddress.Af = AddressFamily(buf.DecodeUint32())
- copy(m.LocalAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.RemoteAddress.Af = AddressFamily(buf.DecodeUint32())
- copy(m.RemoteAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.McastSwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.EncapVrfID = buf.DecodeUint32()
- m.DecapNextIndex = buf.DecodeUint32()
- m.Vni = buf.DecodeUint32()
- return nil
-}
-
-// GeneveAddDelTunnelReply defines message 'geneve_add_del_tunnel_reply'.
-type GeneveAddDelTunnelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *GeneveAddDelTunnelReply) Reset() { *m = GeneveAddDelTunnelReply{} }
-func (*GeneveAddDelTunnelReply) GetMessageName() string { return "geneve_add_del_tunnel_reply" }
-func (*GeneveAddDelTunnelReply) GetCrcString() string { return "5383d31f" }
-func (*GeneveAddDelTunnelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GeneveAddDelTunnelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *GeneveAddDelTunnelReply) 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 *GeneveAddDelTunnelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// GeneveTunnelDetails defines message 'geneve_tunnel_details'.
-type GeneveTunnelDetails struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- SrcAddress Address `binapi:"address,name=src_address" json:"src_address,omitempty"`
- DstAddress Address `binapi:"address,name=dst_address" json:"dst_address,omitempty"`
- McastSwIfIndex InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
- EncapVrfID uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
- DecapNextIndex uint32 `binapi:"u32,name=decap_next_index" json:"decap_next_index,omitempty"`
- Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
-}
-
-func (m *GeneveTunnelDetails) Reset() { *m = GeneveTunnelDetails{} }
-func (*GeneveTunnelDetails) GetMessageName() string { return "geneve_tunnel_details" }
-func (*GeneveTunnelDetails) GetCrcString() string { return "e27e2748" }
-func (*GeneveTunnelDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GeneveTunnelDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.SrcAddress.Af
- size += 1 * 16 // m.SrcAddress.Un
- size += 4 // m.DstAddress.Af
- size += 1 * 16 // m.DstAddress.Un
- size += 4 // m.McastSwIfIndex
- size += 4 // m.EncapVrfID
- size += 4 // m.DecapNextIndex
- size += 4 // m.Vni
- return size
-}
-func (m *GeneveTunnelDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(uint32(m.SrcAddress.Af))
- buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.DstAddress.Af))
- buf.EncodeBytes(m.DstAddress.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.McastSwIfIndex))
- buf.EncodeUint32(m.EncapVrfID)
- buf.EncodeUint32(m.DecapNextIndex)
- buf.EncodeUint32(m.Vni)
- return buf.Bytes(), nil
-}
-func (m *GeneveTunnelDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.SrcAddress.Af = AddressFamily(buf.DecodeUint32())
- copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.DstAddress.Af = AddressFamily(buf.DecodeUint32())
- copy(m.DstAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.McastSwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.EncapVrfID = buf.DecodeUint32()
- m.DecapNextIndex = buf.DecodeUint32()
- m.Vni = buf.DecodeUint32()
- return nil
-}
-
-// GeneveTunnelDump defines message 'geneve_tunnel_dump'.
-type GeneveTunnelDump struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *GeneveTunnelDump) Reset() { *m = GeneveTunnelDump{} }
-func (*GeneveTunnelDump) GetMessageName() string { return "geneve_tunnel_dump" }
-func (*GeneveTunnelDump) GetCrcString() string { return "f9e6675e" }
-func (*GeneveTunnelDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GeneveTunnelDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *GeneveTunnelDump) 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 *GeneveTunnelDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// SwInterfaceSetGeneveBypass defines message 'sw_interface_set_geneve_bypass'.
-type SwInterfaceSetGeneveBypass struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
- Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
-}
-
-func (m *SwInterfaceSetGeneveBypass) Reset() { *m = SwInterfaceSetGeneveBypass{} }
-func (*SwInterfaceSetGeneveBypass) GetMessageName() string { return "sw_interface_set_geneve_bypass" }
-func (*SwInterfaceSetGeneveBypass) GetCrcString() string { return "65247409" }
-func (*SwInterfaceSetGeneveBypass) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceSetGeneveBypass) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.IsIPv6
- size += 1 // m.Enable
- return size
-}
-func (m *SwInterfaceSetGeneveBypass) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeBool(m.IsIPv6)
- buf.EncodeBool(m.Enable)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceSetGeneveBypass) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.IsIPv6 = buf.DecodeBool()
- m.Enable = buf.DecodeBool()
- return nil
-}
-
-// SwInterfaceSetGeneveBypassReply defines message 'sw_interface_set_geneve_bypass_reply'.
-type SwInterfaceSetGeneveBypassReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SwInterfaceSetGeneveBypassReply) Reset() { *m = SwInterfaceSetGeneveBypassReply{} }
-func (*SwInterfaceSetGeneveBypassReply) GetMessageName() string {
- return "sw_interface_set_geneve_bypass_reply"
-}
-func (*SwInterfaceSetGeneveBypassReply) GetCrcString() string { return "e8d4e804" }
-func (*SwInterfaceSetGeneveBypassReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SwInterfaceSetGeneveBypassReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SwInterfaceSetGeneveBypassReply) 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 *SwInterfaceSetGeneveBypassReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_geneve_binapi_init() }
-func file_geneve_binapi_init() {
- api.RegisterMessage((*GeneveAddDelTunnel)(nil), "geneve_add_del_tunnel_976693b5")
- api.RegisterMessage((*GeneveAddDelTunnelReply)(nil), "geneve_add_del_tunnel_reply_5383d31f")
- api.RegisterMessage((*GeneveTunnelDetails)(nil), "geneve_tunnel_details_e27e2748")
- api.RegisterMessage((*GeneveTunnelDump)(nil), "geneve_tunnel_dump_f9e6675e")
- api.RegisterMessage((*SwInterfaceSetGeneveBypass)(nil), "sw_interface_set_geneve_bypass_65247409")
- api.RegisterMessage((*SwInterfaceSetGeneveBypassReply)(nil), "sw_interface_set_geneve_bypass_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*GeneveAddDelTunnel)(nil),
- (*GeneveAddDelTunnelReply)(nil),
- (*GeneveTunnelDetails)(nil),
- (*GeneveTunnelDump)(nil),
- (*SwInterfaceSetGeneveBypass)(nil),
- (*SwInterfaceSetGeneveBypassReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/geneve/geneve_rpc.ba.go b/internal/testbinapi/binapi2001/geneve/geneve_rpc.ba.go
deleted file mode 100644
index f96c316..0000000
--- a/internal/testbinapi/binapi2001/geneve/geneve_rpc.ba.go
+++ /dev/null
@@ -1,88 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package geneve
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service geneve.
-type RPCService interface {
- GeneveAddDelTunnel(ctx context.Context, in *GeneveAddDelTunnel) (*GeneveAddDelTunnelReply, error)
- GeneveTunnelDump(ctx context.Context, in *GeneveTunnelDump) (RPCService_GeneveTunnelDumpClient, error)
- SwInterfaceSetGeneveBypass(ctx context.Context, in *SwInterfaceSetGeneveBypass) (*SwInterfaceSetGeneveBypassReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) GeneveAddDelTunnel(ctx context.Context, in *GeneveAddDelTunnel) (*GeneveAddDelTunnelReply, error) {
- out := new(GeneveAddDelTunnelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GeneveTunnelDump(ctx context.Context, in *GeneveTunnelDump) (RPCService_GeneveTunnelDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_GeneveTunnelDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_GeneveTunnelDumpClient interface {
- Recv() (*GeneveTunnelDetails, error)
- api.Stream
-}
-
-type serviceClient_GeneveTunnelDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_GeneveTunnelDumpClient) Recv() (*GeneveTunnelDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *GeneveTunnelDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) SwInterfaceSetGeneveBypass(ctx context.Context, in *SwInterfaceSetGeneveBypass) (*SwInterfaceSetGeneveBypassReply, error) {
- out := new(SwInterfaceSetGeneveBypassReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/gre/gre.ba.go b/internal/testbinapi/binapi2001/gre/gre.ba.go
deleted file mode 100644
index 0eeb82c..0000000
--- a/internal/testbinapi/binapi2001/gre/gre.ba.go
+++ /dev/null
@@ -1,1162 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/gre.api.json
-
-// Package gre contains generated bindings for API file gre.api.
-//
-// Contents:
-// 6 aliases
-// 12 enums
-// 7 structs
-// 1 union
-// 4 messages
-//
-package gre
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "gre"
- APIVersion = "2.0.1"
- VersionCrc = 0xb7663194
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// GreTunnelMode defines enum 'gre_tunnel_mode'.
-type GreTunnelMode uint8
-
-const (
- GRE_API_TUNNEL_MODE_P2P GreTunnelMode = 1
- GRE_API_TUNNEL_MODE_MP GreTunnelMode = 2
-)
-
-var (
- GreTunnelMode_name = map[uint8]string{
- 1: "GRE_API_TUNNEL_MODE_P2P",
- 2: "GRE_API_TUNNEL_MODE_MP",
- }
- GreTunnelMode_value = map[string]uint8{
- "GRE_API_TUNNEL_MODE_P2P": 1,
- "GRE_API_TUNNEL_MODE_MP": 2,
- }
-)
-
-func (x GreTunnelMode) String() string {
- s, ok := GreTunnelMode_name[uint8(x)]
- if ok {
- return s
- }
- return "GreTunnelMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// GreTunnelType defines enum 'gre_tunnel_type'.
-type GreTunnelType uint8
-
-const (
- GRE_API_TUNNEL_TYPE_L3 GreTunnelType = 0
- GRE_API_TUNNEL_TYPE_TEB GreTunnelType = 1
- GRE_API_TUNNEL_TYPE_ERSPAN GreTunnelType = 2
-)
-
-var (
- GreTunnelType_name = map[uint8]string{
- 0: "GRE_API_TUNNEL_TYPE_L3",
- 1: "GRE_API_TUNNEL_TYPE_TEB",
- 2: "GRE_API_TUNNEL_TYPE_ERSPAN",
- }
- GreTunnelType_value = map[string]uint8{
- "GRE_API_TUNNEL_TYPE_L3": 0,
- "GRE_API_TUNNEL_TYPE_TEB": 1,
- "GRE_API_TUNNEL_TYPE_ERSPAN": 2,
- }
-)
-
-func (x GreTunnelType) String() string {
- s, ok := GreTunnelType_name[uint8(x)]
- if ok {
- return s
- }
- return "GreTunnelType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// GreTunnel defines type 'gre_tunnel'.
-type GreTunnel struct {
- Type GreTunnelType `binapi:"gre_tunnel_type,name=type" json:"type,omitempty"`
- Mode GreTunnelMode `binapi:"gre_tunnel_mode,name=mode" json:"mode,omitempty"`
- SessionID uint16 `binapi:"u16,name=session_id" json:"session_id,omitempty"`
- Instance uint32 `binapi:"u32,name=instance" json:"instance,omitempty"`
- OuterTableID uint32 `binapi:"u32,name=outer_table_id" json:"outer_table_id,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Src Address `binapi:"address,name=src" json:"src,omitempty"`
- Dst Address `binapi:"address,name=dst" json:"dst,omitempty"`
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
-
-// GreTunnelAddDel defines message 'gre_tunnel_add_del'.
-type GreTunnelAddDel struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- Tunnel GreTunnel `binapi:"gre_tunnel,name=tunnel" json:"tunnel,omitempty"`
-}
-
-func (m *GreTunnelAddDel) Reset() { *m = GreTunnelAddDel{} }
-func (*GreTunnelAddDel) GetMessageName() string { return "gre_tunnel_add_del" }
-func (*GreTunnelAddDel) GetCrcString() string { return "f9c4059d" }
-func (*GreTunnelAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GreTunnelAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 1 // m.Tunnel.Type
- size += 1 // m.Tunnel.Mode
- size += 2 // m.Tunnel.SessionID
- size += 4 // m.Tunnel.Instance
- size += 4 // m.Tunnel.OuterTableID
- size += 4 // m.Tunnel.SwIfIndex
- size += 4 // m.Tunnel.Src.Af
- size += 1 * 16 // m.Tunnel.Src.Un
- size += 4 // m.Tunnel.Dst.Af
- size += 1 * 16 // m.Tunnel.Dst.Un
- return size
-}
-func (m *GreTunnelAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeUint8(uint8(m.Tunnel.Type))
- buf.EncodeUint8(uint8(m.Tunnel.Mode))
- buf.EncodeUint16(m.Tunnel.SessionID)
- buf.EncodeUint32(m.Tunnel.Instance)
- buf.EncodeUint32(m.Tunnel.OuterTableID)
- buf.EncodeUint32(uint32(m.Tunnel.SwIfIndex))
- buf.EncodeUint32(uint32(m.Tunnel.Src.Af))
- buf.EncodeBytes(m.Tunnel.Src.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.Tunnel.Dst.Af))
- buf.EncodeBytes(m.Tunnel.Dst.Un.XXX_UnionData[:], 16)
- return buf.Bytes(), nil
-}
-func (m *GreTunnelAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.Tunnel.Type = GreTunnelType(buf.DecodeUint8())
- m.Tunnel.Mode = GreTunnelMode(buf.DecodeUint8())
- m.Tunnel.SessionID = buf.DecodeUint16()
- m.Tunnel.Instance = buf.DecodeUint32()
- m.Tunnel.OuterTableID = buf.DecodeUint32()
- m.Tunnel.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Tunnel.Src.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Tunnel.Src.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Tunnel.Dst.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Tunnel.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- return nil
-}
-
-// GreTunnelAddDelReply defines message 'gre_tunnel_add_del_reply'.
-type GreTunnelAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *GreTunnelAddDelReply) Reset() { *m = GreTunnelAddDelReply{} }
-func (*GreTunnelAddDelReply) GetMessageName() string { return "gre_tunnel_add_del_reply" }
-func (*GreTunnelAddDelReply) GetCrcString() string { return "5383d31f" }
-func (*GreTunnelAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GreTunnelAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *GreTunnelAddDelReply) 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 *GreTunnelAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// GreTunnelDetails defines message 'gre_tunnel_details'.
-type GreTunnelDetails struct {
- Tunnel GreTunnel `binapi:"gre_tunnel,name=tunnel" json:"tunnel,omitempty"`
-}
-
-func (m *GreTunnelDetails) Reset() { *m = GreTunnelDetails{} }
-func (*GreTunnelDetails) GetMessageName() string { return "gre_tunnel_details" }
-func (*GreTunnelDetails) GetCrcString() string { return "066f8369" }
-func (*GreTunnelDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GreTunnelDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.Tunnel.Type
- size += 1 // m.Tunnel.Mode
- size += 2 // m.Tunnel.SessionID
- size += 4 // m.Tunnel.Instance
- size += 4 // m.Tunnel.OuterTableID
- size += 4 // m.Tunnel.SwIfIndex
- size += 4 // m.Tunnel.Src.Af
- size += 1 * 16 // m.Tunnel.Src.Un
- size += 4 // m.Tunnel.Dst.Af
- size += 1 * 16 // m.Tunnel.Dst.Un
- return size
-}
-func (m *GreTunnelDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(uint8(m.Tunnel.Type))
- buf.EncodeUint8(uint8(m.Tunnel.Mode))
- buf.EncodeUint16(m.Tunnel.SessionID)
- buf.EncodeUint32(m.Tunnel.Instance)
- buf.EncodeUint32(m.Tunnel.OuterTableID)
- buf.EncodeUint32(uint32(m.Tunnel.SwIfIndex))
- buf.EncodeUint32(uint32(m.Tunnel.Src.Af))
- buf.EncodeBytes(m.Tunnel.Src.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.Tunnel.Dst.Af))
- buf.EncodeBytes(m.Tunnel.Dst.Un.XXX_UnionData[:], 16)
- return buf.Bytes(), nil
-}
-func (m *GreTunnelDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Tunnel.Type = GreTunnelType(buf.DecodeUint8())
- m.Tunnel.Mode = GreTunnelMode(buf.DecodeUint8())
- m.Tunnel.SessionID = buf.DecodeUint16()
- m.Tunnel.Instance = buf.DecodeUint32()
- m.Tunnel.OuterTableID = buf.DecodeUint32()
- m.Tunnel.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Tunnel.Src.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Tunnel.Src.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Tunnel.Dst.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Tunnel.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- return nil
-}
-
-// GreTunnelDump defines message 'gre_tunnel_dump'.
-type GreTunnelDump struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *GreTunnelDump) Reset() { *m = GreTunnelDump{} }
-func (*GreTunnelDump) GetMessageName() string { return "gre_tunnel_dump" }
-func (*GreTunnelDump) GetCrcString() string { return "f9e6675e" }
-func (*GreTunnelDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GreTunnelDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *GreTunnelDump) 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 *GreTunnelDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-func init() { file_gre_binapi_init() }
-func file_gre_binapi_init() {
- api.RegisterMessage((*GreTunnelAddDel)(nil), "gre_tunnel_add_del_f9c4059d")
- api.RegisterMessage((*GreTunnelAddDelReply)(nil), "gre_tunnel_add_del_reply_5383d31f")
- api.RegisterMessage((*GreTunnelDetails)(nil), "gre_tunnel_details_066f8369")
- api.RegisterMessage((*GreTunnelDump)(nil), "gre_tunnel_dump_f9e6675e")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*GreTunnelAddDel)(nil),
- (*GreTunnelAddDelReply)(nil),
- (*GreTunnelDetails)(nil),
- (*GreTunnelDump)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/gre/gre_rpc.ba.go b/internal/testbinapi/binapi2001/gre/gre_rpc.ba.go
deleted file mode 100644
index 6237740..0000000
--- a/internal/testbinapi/binapi2001/gre/gre_rpc.ba.go
+++ /dev/null
@@ -1,78 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package gre
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service gre.
-type RPCService interface {
- GreTunnelAddDel(ctx context.Context, in *GreTunnelAddDel) (*GreTunnelAddDelReply, error)
- GreTunnelDump(ctx context.Context, in *GreTunnelDump) (RPCService_GreTunnelDumpClient, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) GreTunnelAddDel(ctx context.Context, in *GreTunnelAddDel) (*GreTunnelAddDelReply, error) {
- out := new(GreTunnelAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GreTunnelDump(ctx context.Context, in *GreTunnelDump) (RPCService_GreTunnelDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_GreTunnelDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_GreTunnelDumpClient interface {
- Recv() (*GreTunnelDetails, error)
- api.Stream
-}
-
-type serviceClient_GreTunnelDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_GreTunnelDumpClient) Recv() (*GreTunnelDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *GreTunnelDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
diff --git a/internal/testbinapi/binapi2001/gso/gso.ba.go b/internal/testbinapi/binapi2001/gso/gso.ba.go
deleted file mode 100644
index ed33544..0000000
--- a/internal/testbinapi/binapi2001/gso/gso.ba.go
+++ /dev/null
@@ -1,373 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/gso.api.json
-
-// Package gso contains generated bindings for API file gso.api.
-//
-// Contents:
-// 1 alias
-// 6 enums
-// 2 messages
-//
-package gso
-
-import (
- "strconv"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "gso"
- APIVersion = "1.0.0"
- VersionCrc = 0xecb22d44
-)
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// FeatureGsoEnableDisable defines message 'feature_gso_enable_disable'.
-type FeatureGsoEnableDisable struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
-}
-
-func (m *FeatureGsoEnableDisable) Reset() { *m = FeatureGsoEnableDisable{} }
-func (*FeatureGsoEnableDisable) GetMessageName() string { return "feature_gso_enable_disable" }
-func (*FeatureGsoEnableDisable) GetCrcString() string { return "5501adee" }
-func (*FeatureGsoEnableDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *FeatureGsoEnableDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.EnableDisable
- return size
-}
-func (m *FeatureGsoEnableDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeBool(m.EnableDisable)
- return buf.Bytes(), nil
-}
-func (m *FeatureGsoEnableDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.EnableDisable = buf.DecodeBool()
- return nil
-}
-
-// FeatureGsoEnableDisableReply defines message 'feature_gso_enable_disable_reply'.
-type FeatureGsoEnableDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *FeatureGsoEnableDisableReply) Reset() { *m = FeatureGsoEnableDisableReply{} }
-func (*FeatureGsoEnableDisableReply) GetMessageName() string {
- return "feature_gso_enable_disable_reply"
-}
-func (*FeatureGsoEnableDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*FeatureGsoEnableDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *FeatureGsoEnableDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *FeatureGsoEnableDisableReply) 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 *FeatureGsoEnableDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_gso_binapi_init() }
-func file_gso_binapi_init() {
- api.RegisterMessage((*FeatureGsoEnableDisable)(nil), "feature_gso_enable_disable_5501adee")
- api.RegisterMessage((*FeatureGsoEnableDisableReply)(nil), "feature_gso_enable_disable_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*FeatureGsoEnableDisable)(nil),
- (*FeatureGsoEnableDisableReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/gso/gso_rpc.ba.go b/internal/testbinapi/binapi2001/gso/gso_rpc.ba.go
deleted file mode 100644
index 0d3ed10..0000000
--- a/internal/testbinapi/binapi2001/gso/gso_rpc.ba.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package gso
-
-import (
- "context"
-
- api "git.fd.io/govpp.git/api"
-)
-
-// RPCService defines RPC service gso.
-type RPCService interface {
- FeatureGsoEnableDisable(ctx context.Context, in *FeatureGsoEnableDisable) (*FeatureGsoEnableDisableReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) FeatureGsoEnableDisable(ctx context.Context, in *FeatureGsoEnableDisable) (*FeatureGsoEnableDisableReply, error) {
- out := new(FeatureGsoEnableDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/gtpu/gtpu.ba.go b/internal/testbinapi/binapi2001/gtpu/gtpu.ba.go
deleted file mode 100644
index 53b65d0..0000000
--- a/internal/testbinapi/binapi2001/gtpu/gtpu.ba.go
+++ /dev/null
@@ -1,1175 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/plugins/gtpu.api.json
-
-// Package gtpu contains generated bindings for API file gtpu.api.
-//
-// Contents:
-// 6 aliases
-// 10 enums
-// 6 structs
-// 1 union
-// 6 messages
-//
-package gtpu
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "gtpu"
- APIVersion = "2.0.0"
- VersionCrc = 0x6305cc01
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
-
-// GtpuAddDelTunnel defines message 'gtpu_add_del_tunnel'.
-type GtpuAddDelTunnel struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- SrcAddress Address `binapi:"address,name=src_address" json:"src_address,omitempty"`
- DstAddress Address `binapi:"address,name=dst_address" json:"dst_address,omitempty"`
- McastSwIfIndex InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
- EncapVrfID uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
- DecapNextIndex uint32 `binapi:"u32,name=decap_next_index" json:"decap_next_index,omitempty"`
- Teid uint32 `binapi:"u32,name=teid" json:"teid,omitempty"`
-}
-
-func (m *GtpuAddDelTunnel) Reset() { *m = GtpuAddDelTunnel{} }
-func (*GtpuAddDelTunnel) GetMessageName() string { return "gtpu_add_del_tunnel" }
-func (*GtpuAddDelTunnel) GetCrcString() string { return "9a26a51c" }
-func (*GtpuAddDelTunnel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GtpuAddDelTunnel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 4 // m.SrcAddress.Af
- size += 1 * 16 // m.SrcAddress.Un
- size += 4 // m.DstAddress.Af
- size += 1 * 16 // m.DstAddress.Un
- size += 4 // m.McastSwIfIndex
- size += 4 // m.EncapVrfID
- size += 4 // m.DecapNextIndex
- size += 4 // m.Teid
- return size
-}
-func (m *GtpuAddDelTunnel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeUint32(uint32(m.SrcAddress.Af))
- buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.DstAddress.Af))
- buf.EncodeBytes(m.DstAddress.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.McastSwIfIndex))
- buf.EncodeUint32(m.EncapVrfID)
- buf.EncodeUint32(m.DecapNextIndex)
- buf.EncodeUint32(m.Teid)
- return buf.Bytes(), nil
-}
-func (m *GtpuAddDelTunnel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.SrcAddress.Af = AddressFamily(buf.DecodeUint32())
- copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.DstAddress.Af = AddressFamily(buf.DecodeUint32())
- copy(m.DstAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.McastSwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.EncapVrfID = buf.DecodeUint32()
- m.DecapNextIndex = buf.DecodeUint32()
- m.Teid = buf.DecodeUint32()
- return nil
-}
-
-// GtpuAddDelTunnelReply defines message 'gtpu_add_del_tunnel_reply'.
-type GtpuAddDelTunnelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *GtpuAddDelTunnelReply) Reset() { *m = GtpuAddDelTunnelReply{} }
-func (*GtpuAddDelTunnelReply) GetMessageName() string { return "gtpu_add_del_tunnel_reply" }
-func (*GtpuAddDelTunnelReply) GetCrcString() string { return "5383d31f" }
-func (*GtpuAddDelTunnelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GtpuAddDelTunnelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *GtpuAddDelTunnelReply) 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 *GtpuAddDelTunnelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// GtpuTunnelDetails defines message 'gtpu_tunnel_details'.
-type GtpuTunnelDetails struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- SrcAddress Address `binapi:"address,name=src_address" json:"src_address,omitempty"`
- DstAddress Address `binapi:"address,name=dst_address" json:"dst_address,omitempty"`
- McastSwIfIndex InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
- EncapVrfID uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
- DecapNextIndex uint32 `binapi:"u32,name=decap_next_index" json:"decap_next_index,omitempty"`
- Teid uint32 `binapi:"u32,name=teid" json:"teid,omitempty"`
-}
-
-func (m *GtpuTunnelDetails) Reset() { *m = GtpuTunnelDetails{} }
-func (*GtpuTunnelDetails) GetMessageName() string { return "gtpu_tunnel_details" }
-func (*GtpuTunnelDetails) GetCrcString() string { return "a4d81a09" }
-func (*GtpuTunnelDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GtpuTunnelDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.SrcAddress.Af
- size += 1 * 16 // m.SrcAddress.Un
- size += 4 // m.DstAddress.Af
- size += 1 * 16 // m.DstAddress.Un
- size += 4 // m.McastSwIfIndex
- size += 4 // m.EncapVrfID
- size += 4 // m.DecapNextIndex
- size += 4 // m.Teid
- return size
-}
-func (m *GtpuTunnelDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(uint32(m.SrcAddress.Af))
- buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.DstAddress.Af))
- buf.EncodeBytes(m.DstAddress.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.McastSwIfIndex))
- buf.EncodeUint32(m.EncapVrfID)
- buf.EncodeUint32(m.DecapNextIndex)
- buf.EncodeUint32(m.Teid)
- return buf.Bytes(), nil
-}
-func (m *GtpuTunnelDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.SrcAddress.Af = AddressFamily(buf.DecodeUint32())
- copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.DstAddress.Af = AddressFamily(buf.DecodeUint32())
- copy(m.DstAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.McastSwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.EncapVrfID = buf.DecodeUint32()
- m.DecapNextIndex = buf.DecodeUint32()
- m.Teid = buf.DecodeUint32()
- return nil
-}
-
-// GtpuTunnelDump defines message 'gtpu_tunnel_dump'.
-type GtpuTunnelDump struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *GtpuTunnelDump) Reset() { *m = GtpuTunnelDump{} }
-func (*GtpuTunnelDump) GetMessageName() string { return "gtpu_tunnel_dump" }
-func (*GtpuTunnelDump) GetCrcString() string { return "f9e6675e" }
-func (*GtpuTunnelDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GtpuTunnelDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *GtpuTunnelDump) 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 *GtpuTunnelDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// SwInterfaceSetGtpuBypass defines message 'sw_interface_set_gtpu_bypass'.
-type SwInterfaceSetGtpuBypass struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
- Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
-}
-
-func (m *SwInterfaceSetGtpuBypass) Reset() { *m = SwInterfaceSetGtpuBypass{} }
-func (*SwInterfaceSetGtpuBypass) GetMessageName() string { return "sw_interface_set_gtpu_bypass" }
-func (*SwInterfaceSetGtpuBypass) GetCrcString() string { return "65247409" }
-func (*SwInterfaceSetGtpuBypass) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceSetGtpuBypass) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.IsIPv6
- size += 1 // m.Enable
- return size
-}
-func (m *SwInterfaceSetGtpuBypass) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeBool(m.IsIPv6)
- buf.EncodeBool(m.Enable)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceSetGtpuBypass) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.IsIPv6 = buf.DecodeBool()
- m.Enable = buf.DecodeBool()
- return nil
-}
-
-// SwInterfaceSetGtpuBypassReply defines message 'sw_interface_set_gtpu_bypass_reply'.
-type SwInterfaceSetGtpuBypassReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SwInterfaceSetGtpuBypassReply) Reset() { *m = SwInterfaceSetGtpuBypassReply{} }
-func (*SwInterfaceSetGtpuBypassReply) GetMessageName() string {
- return "sw_interface_set_gtpu_bypass_reply"
-}
-func (*SwInterfaceSetGtpuBypassReply) GetCrcString() string { return "e8d4e804" }
-func (*SwInterfaceSetGtpuBypassReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SwInterfaceSetGtpuBypassReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SwInterfaceSetGtpuBypassReply) 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 *SwInterfaceSetGtpuBypassReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_gtpu_binapi_init() }
-func file_gtpu_binapi_init() {
- api.RegisterMessage((*GtpuAddDelTunnel)(nil), "gtpu_add_del_tunnel_9a26a51c")
- api.RegisterMessage((*GtpuAddDelTunnelReply)(nil), "gtpu_add_del_tunnel_reply_5383d31f")
- api.RegisterMessage((*GtpuTunnelDetails)(nil), "gtpu_tunnel_details_a4d81a09")
- api.RegisterMessage((*GtpuTunnelDump)(nil), "gtpu_tunnel_dump_f9e6675e")
- api.RegisterMessage((*SwInterfaceSetGtpuBypass)(nil), "sw_interface_set_gtpu_bypass_65247409")
- api.RegisterMessage((*SwInterfaceSetGtpuBypassReply)(nil), "sw_interface_set_gtpu_bypass_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*GtpuAddDelTunnel)(nil),
- (*GtpuAddDelTunnelReply)(nil),
- (*GtpuTunnelDetails)(nil),
- (*GtpuTunnelDump)(nil),
- (*SwInterfaceSetGtpuBypass)(nil),
- (*SwInterfaceSetGtpuBypassReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/gtpu/gtpu_rpc.ba.go b/internal/testbinapi/binapi2001/gtpu/gtpu_rpc.ba.go
deleted file mode 100644
index 8328e6b..0000000
--- a/internal/testbinapi/binapi2001/gtpu/gtpu_rpc.ba.go
+++ /dev/null
@@ -1,88 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package gtpu
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service gtpu.
-type RPCService interface {
- GtpuAddDelTunnel(ctx context.Context, in *GtpuAddDelTunnel) (*GtpuAddDelTunnelReply, error)
- GtpuTunnelDump(ctx context.Context, in *GtpuTunnelDump) (RPCService_GtpuTunnelDumpClient, error)
- SwInterfaceSetGtpuBypass(ctx context.Context, in *SwInterfaceSetGtpuBypass) (*SwInterfaceSetGtpuBypassReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) GtpuAddDelTunnel(ctx context.Context, in *GtpuAddDelTunnel) (*GtpuAddDelTunnelReply, error) {
- out := new(GtpuAddDelTunnelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GtpuTunnelDump(ctx context.Context, in *GtpuTunnelDump) (RPCService_GtpuTunnelDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_GtpuTunnelDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_GtpuTunnelDumpClient interface {
- Recv() (*GtpuTunnelDetails, error)
- api.Stream
-}
-
-type serviceClient_GtpuTunnelDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_GtpuTunnelDumpClient) Recv() (*GtpuTunnelDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *GtpuTunnelDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) SwInterfaceSetGtpuBypass(ctx context.Context, in *SwInterfaceSetGtpuBypass) (*SwInterfaceSetGtpuBypassReply, error) {
- out := new(SwInterfaceSetGtpuBypassReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/http_static/http_static.ba.go b/internal/testbinapi/binapi2001/http_static/http_static.ba.go
deleted file mode 100644
index bdd9c5b..0000000
--- a/internal/testbinapi/binapi2001/http_static/http_static.ba.go
+++ /dev/null
@@ -1,129 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/plugins/http_static.api.json
-
-// Package http_static contains generated bindings for API file http_static.api.
-//
-// Contents:
-// 2 messages
-//
-package http_static
-
-import (
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the GoVPP api package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// GoVPP api package needs to be updated.
-const _ = api.GoVppAPIPackageIsVersion2
-
-const (
- APIFile = "http_static"
- APIVersion = "2.1.0"
- VersionCrc = 0xd29e72e9
-)
-
-// HTTPStaticEnable defines message 'http_static_enable'.
-type HTTPStaticEnable struct {
- FifoSize uint32 `binapi:"u32,name=fifo_size" json:"fifo_size,omitempty"`
- CacheSizeLimit uint32 `binapi:"u32,name=cache_size_limit" json:"cache_size_limit,omitempty"`
- PreallocFifos uint32 `binapi:"u32,name=prealloc_fifos" json:"prealloc_fifos,omitempty"`
- PrivateSegmentSize uint32 `binapi:"u32,name=private_segment_size" json:"private_segment_size,omitempty"`
- WwwRoot string `binapi:"string[256],name=www_root" json:"www_root,omitempty"`
- URI string `binapi:"string[256],name=uri" json:"uri,omitempty"`
-}
-
-func (m *HTTPStaticEnable) Reset() { *m = HTTPStaticEnable{} }
-func (*HTTPStaticEnable) GetMessageName() string { return "http_static_enable" }
-func (*HTTPStaticEnable) GetCrcString() string { return "075f8292" }
-func (*HTTPStaticEnable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *HTTPStaticEnable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.FifoSize
- size += 4 // m.CacheSizeLimit
- size += 4 // m.PreallocFifos
- size += 4 // m.PrivateSegmentSize
- size += 256 // m.WwwRoot
- size += 256 // m.URI
- return size
-}
-func (m *HTTPStaticEnable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.FifoSize)
- buf.EncodeUint32(m.CacheSizeLimit)
- buf.EncodeUint32(m.PreallocFifos)
- buf.EncodeUint32(m.PrivateSegmentSize)
- buf.EncodeString(m.WwwRoot, 256)
- buf.EncodeString(m.URI, 256)
- return buf.Bytes(), nil
-}
-func (m *HTTPStaticEnable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.FifoSize = buf.DecodeUint32()
- m.CacheSizeLimit = buf.DecodeUint32()
- m.PreallocFifos = buf.DecodeUint32()
- m.PrivateSegmentSize = buf.DecodeUint32()
- m.WwwRoot = buf.DecodeString(256)
- m.URI = buf.DecodeString(256)
- return nil
-}
-
-// HTTPStaticEnableReply defines message 'http_static_enable_reply'.
-type HTTPStaticEnableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *HTTPStaticEnableReply) Reset() { *m = HTTPStaticEnableReply{} }
-func (*HTTPStaticEnableReply) GetMessageName() string { return "http_static_enable_reply" }
-func (*HTTPStaticEnableReply) GetCrcString() string { return "e8d4e804" }
-func (*HTTPStaticEnableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *HTTPStaticEnableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *HTTPStaticEnableReply) 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 *HTTPStaticEnableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_http_static_binapi_init() }
-func file_http_static_binapi_init() {
- api.RegisterMessage((*HTTPStaticEnable)(nil), "http_static_enable_075f8292")
- api.RegisterMessage((*HTTPStaticEnableReply)(nil), "http_static_enable_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*HTTPStaticEnable)(nil),
- (*HTTPStaticEnableReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/http_static/http_static_rpc.ba.go b/internal/testbinapi/binapi2001/http_static/http_static_rpc.ba.go
deleted file mode 100644
index 12bd4c1..0000000
--- a/internal/testbinapi/binapi2001/http_static/http_static_rpc.ba.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package http_static
-
-import (
- "context"
-
- api "git.fd.io/govpp.git/api"
-)
-
-// RPCService defines RPC service http_static.
-type RPCService interface {
- HTTPStaticEnable(ctx context.Context, in *HTTPStaticEnable) (*HTTPStaticEnableReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) HTTPStaticEnable(ctx context.Context, in *HTTPStaticEnable) (*HTTPStaticEnableReply, error) {
- out := new(HTTPStaticEnableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/igmp/igmp.ba.go b/internal/testbinapi/binapi2001/igmp/igmp.ba.go
deleted file mode 100644
index 0612a4b..0000000
--- a/internal/testbinapi/binapi2001/igmp/igmp.ba.go
+++ /dev/null
@@ -1,1717 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/plugins/igmp.api.json
-
-// Package igmp contains generated bindings for API file igmp.api.
-//
-// Contents:
-// 6 aliases
-// 12 enums
-// 8 structs
-// 1 union
-// 19 messages
-//
-package igmp
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "igmp"
- APIVersion = "1.0.0"
- VersionCrc = 0xfd1fef7b
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// FilterMode defines enum 'filter_mode'.
-type FilterMode uint32
-
-const (
- EXCLUDE FilterMode = 0
- INCLUDE FilterMode = 1
-)
-
-var (
- FilterMode_name = map[uint32]string{
- 0: "EXCLUDE",
- 1: "INCLUDE",
- }
- FilterMode_value = map[string]uint32{
- "EXCLUDE": 0,
- "INCLUDE": 1,
- }
-)
-
-func (x FilterMode) String() string {
- s, ok := FilterMode_name[uint32(x)]
- if ok {
- return s
- }
- return "FilterMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// GroupPrefixType defines enum 'group_prefix_type'.
-type GroupPrefixType uint32
-
-const (
- ASM GroupPrefixType = 0
- SSM GroupPrefixType = 1
-)
-
-var (
- GroupPrefixType_name = map[uint32]string{
- 0: "ASM",
- 1: "SSM",
- }
- GroupPrefixType_value = map[string]uint32{
- "ASM": 0,
- "SSM": 1,
- }
-)
-
-func (x GroupPrefixType) String() string {
- s, ok := GroupPrefixType_name[uint32(x)]
- if ok {
- return s
- }
- return "GroupPrefixType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// GroupPrefix defines type 'group_prefix'.
-type GroupPrefix struct {
- Type GroupPrefixType `binapi:"group_prefix_type,name=type" json:"type,omitempty"`
- Prefix Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
-}
-
-// IgmpGroup defines type 'igmp_group'.
-type IgmpGroup struct {
- Filter FilterMode `binapi:"filter_mode,name=filter" json:"filter,omitempty"`
- NSrcs uint8 `binapi:"u8,name=n_srcs" json:"-"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Gaddr IP4Address `binapi:"ip4_address,name=gaddr" json:"gaddr,omitempty"`
- Saddrs []IP4Address `binapi:"ip4_address[n_srcs],name=saddrs" json:"saddrs,omitempty"`
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
-
-// IgmpClearInterface defines message 'igmp_clear_interface'.
-type IgmpClearInterface struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *IgmpClearInterface) Reset() { *m = IgmpClearInterface{} }
-func (*IgmpClearInterface) GetMessageName() string { return "igmp_clear_interface" }
-func (*IgmpClearInterface) GetCrcString() string { return "f9e6675e" }
-func (*IgmpClearInterface) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IgmpClearInterface) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *IgmpClearInterface) 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 *IgmpClearInterface) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// IgmpClearInterfaceReply defines message 'igmp_clear_interface_reply'.
-type IgmpClearInterfaceReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *IgmpClearInterfaceReply) Reset() { *m = IgmpClearInterfaceReply{} }
-func (*IgmpClearInterfaceReply) GetMessageName() string { return "igmp_clear_interface_reply" }
-func (*IgmpClearInterfaceReply) GetCrcString() string { return "e8d4e804" }
-func (*IgmpClearInterfaceReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IgmpClearInterfaceReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *IgmpClearInterfaceReply) 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 *IgmpClearInterfaceReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// IgmpDetails defines message 'igmp_details'.
-type IgmpDetails struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Saddr IP4Address `binapi:"ip4_address,name=saddr" json:"saddr,omitempty"`
- Gaddr IP4Address `binapi:"ip4_address,name=gaddr" json:"gaddr,omitempty"`
-}
-
-func (m *IgmpDetails) Reset() { *m = IgmpDetails{} }
-func (*IgmpDetails) GetMessageName() string { return "igmp_details" }
-func (*IgmpDetails) GetCrcString() string { return "52f12a89" }
-func (*IgmpDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IgmpDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 * 4 // m.Saddr
- size += 1 * 4 // m.Gaddr
- return size
-}
-func (m *IgmpDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeBytes(m.Saddr[:], 4)
- buf.EncodeBytes(m.Gaddr[:], 4)
- return buf.Bytes(), nil
-}
-func (m *IgmpDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- copy(m.Saddr[:], buf.DecodeBytes(4))
- copy(m.Gaddr[:], buf.DecodeBytes(4))
- return nil
-}
-
-// IgmpDump defines message 'igmp_dump'.
-type IgmpDump struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *IgmpDump) Reset() { *m = IgmpDump{} }
-func (*IgmpDump) GetMessageName() string { return "igmp_dump" }
-func (*IgmpDump) GetCrcString() string { return "f9e6675e" }
-func (*IgmpDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IgmpDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *IgmpDump) 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 *IgmpDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// IgmpEnableDisable defines message 'igmp_enable_disable'.
-type IgmpEnableDisable struct {
- Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
- Mode uint8 `binapi:"u8,name=mode" json:"mode,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *IgmpEnableDisable) Reset() { *m = IgmpEnableDisable{} }
-func (*IgmpEnableDisable) GetMessageName() string { return "igmp_enable_disable" }
-func (*IgmpEnableDisable) GetCrcString() string { return "b1edfb96" }
-func (*IgmpEnableDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IgmpEnableDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.Enable
- size += 1 // m.Mode
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *IgmpEnableDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.Enable)
- buf.EncodeUint8(m.Mode)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- return buf.Bytes(), nil
-}
-func (m *IgmpEnableDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Enable = buf.DecodeBool()
- m.Mode = buf.DecodeUint8()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// IgmpEnableDisableReply defines message 'igmp_enable_disable_reply'.
-type IgmpEnableDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *IgmpEnableDisableReply) Reset() { *m = IgmpEnableDisableReply{} }
-func (*IgmpEnableDisableReply) GetMessageName() string { return "igmp_enable_disable_reply" }
-func (*IgmpEnableDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*IgmpEnableDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IgmpEnableDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *IgmpEnableDisableReply) 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 *IgmpEnableDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// IgmpEvent defines message 'igmp_event'.
-type IgmpEvent struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Filter FilterMode `binapi:"filter_mode,name=filter" json:"filter,omitempty"`
- Saddr IP4Address `binapi:"ip4_address,name=saddr" json:"saddr,omitempty"`
- Gaddr IP4Address `binapi:"ip4_address,name=gaddr" json:"gaddr,omitempty"`
-}
-
-func (m *IgmpEvent) Reset() { *m = IgmpEvent{} }
-func (*IgmpEvent) GetMessageName() string { return "igmp_event" }
-func (*IgmpEvent) GetCrcString() string { return "d7696eaf" }
-func (*IgmpEvent) GetMessageType() api.MessageType {
- return api.OtherMessage
-}
-
-func (m *IgmpEvent) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.Filter
- size += 1 * 4 // m.Saddr
- size += 1 * 4 // m.Gaddr
- return size
-}
-func (m *IgmpEvent) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(uint32(m.Filter))
- buf.EncodeBytes(m.Saddr[:], 4)
- buf.EncodeBytes(m.Gaddr[:], 4)
- return buf.Bytes(), nil
-}
-func (m *IgmpEvent) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Filter = FilterMode(buf.DecodeUint32())
- copy(m.Saddr[:], buf.DecodeBytes(4))
- copy(m.Gaddr[:], buf.DecodeBytes(4))
- return nil
-}
-
-// IgmpGroupPrefixDetails defines message 'igmp_group_prefix_details'.
-type IgmpGroupPrefixDetails struct {
- Gp GroupPrefix `binapi:"group_prefix,name=gp" json:"gp,omitempty"`
-}
-
-func (m *IgmpGroupPrefixDetails) Reset() { *m = IgmpGroupPrefixDetails{} }
-func (*IgmpGroupPrefixDetails) GetMessageName() string { return "igmp_group_prefix_details" }
-func (*IgmpGroupPrefixDetails) GetCrcString() string { return "c3b3c526" }
-func (*IgmpGroupPrefixDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IgmpGroupPrefixDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Gp.Type
- size += 4 // m.Gp.Prefix.Address.Af
- size += 1 * 16 // m.Gp.Prefix.Address.Un
- size += 1 // m.Gp.Prefix.Len
- return size
-}
-func (m *IgmpGroupPrefixDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.Gp.Type))
- buf.EncodeUint32(uint32(m.Gp.Prefix.Address.Af))
- buf.EncodeBytes(m.Gp.Prefix.Address.Un.XXX_UnionData[:], 16)
- buf.EncodeUint8(m.Gp.Prefix.Len)
- return buf.Bytes(), nil
-}
-func (m *IgmpGroupPrefixDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Gp.Type = GroupPrefixType(buf.DecodeUint32())
- m.Gp.Prefix.Address.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Gp.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Gp.Prefix.Len = buf.DecodeUint8()
- return nil
-}
-
-// IgmpGroupPrefixDump defines message 'igmp_group_prefix_dump'.
-type IgmpGroupPrefixDump struct{}
-
-func (m *IgmpGroupPrefixDump) Reset() { *m = IgmpGroupPrefixDump{} }
-func (*IgmpGroupPrefixDump) GetMessageName() string { return "igmp_group_prefix_dump" }
-func (*IgmpGroupPrefixDump) GetCrcString() string { return "51077d14" }
-func (*IgmpGroupPrefixDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IgmpGroupPrefixDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *IgmpGroupPrefixDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *IgmpGroupPrefixDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// IgmpGroupPrefixSet defines message 'igmp_group_prefix_set'.
-type IgmpGroupPrefixSet struct {
- Gp GroupPrefix `binapi:"group_prefix,name=gp" json:"gp,omitempty"`
-}
-
-func (m *IgmpGroupPrefixSet) Reset() { *m = IgmpGroupPrefixSet{} }
-func (*IgmpGroupPrefixSet) GetMessageName() string { return "igmp_group_prefix_set" }
-func (*IgmpGroupPrefixSet) GetCrcString() string { return "d4f20ac5" }
-func (*IgmpGroupPrefixSet) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IgmpGroupPrefixSet) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Gp.Type
- size += 4 // m.Gp.Prefix.Address.Af
- size += 1 * 16 // m.Gp.Prefix.Address.Un
- size += 1 // m.Gp.Prefix.Len
- return size
-}
-func (m *IgmpGroupPrefixSet) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.Gp.Type))
- buf.EncodeUint32(uint32(m.Gp.Prefix.Address.Af))
- buf.EncodeBytes(m.Gp.Prefix.Address.Un.XXX_UnionData[:], 16)
- buf.EncodeUint8(m.Gp.Prefix.Len)
- return buf.Bytes(), nil
-}
-func (m *IgmpGroupPrefixSet) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Gp.Type = GroupPrefixType(buf.DecodeUint32())
- m.Gp.Prefix.Address.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Gp.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Gp.Prefix.Len = buf.DecodeUint8()
- return nil
-}
-
-// IgmpGroupPrefixSetReply defines message 'igmp_group_prefix_set_reply'.
-type IgmpGroupPrefixSetReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *IgmpGroupPrefixSetReply) Reset() { *m = IgmpGroupPrefixSetReply{} }
-func (*IgmpGroupPrefixSetReply) GetMessageName() string { return "igmp_group_prefix_set_reply" }
-func (*IgmpGroupPrefixSetReply) GetCrcString() string { return "e8d4e804" }
-func (*IgmpGroupPrefixSetReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IgmpGroupPrefixSetReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *IgmpGroupPrefixSetReply) 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 *IgmpGroupPrefixSetReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// IgmpListen defines message 'igmp_listen'.
-type IgmpListen struct {
- Group IgmpGroup `binapi:"igmp_group,name=group" json:"group,omitempty"`
-}
-
-func (m *IgmpListen) Reset() { *m = IgmpListen{} }
-func (*IgmpListen) GetMessageName() string { return "igmp_listen" }
-func (*IgmpListen) GetCrcString() string { return "3f93a51a" }
-func (*IgmpListen) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IgmpListen) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Group.Filter
- size += 1 // m.Group.NSrcs
- size += 4 // m.Group.SwIfIndex
- size += 1 * 4 // m.Group.Gaddr
- for j2 := 0; j2 < len(m.Group.Saddrs); j2++ {
- var s2 IP4Address
- _ = s2
- if j2 < len(m.Group.Saddrs) {
- s2 = m.Group.Saddrs[j2]
- }
- size += 1 * 4 // s2
- }
- return size
-}
-func (m *IgmpListen) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.Group.Filter))
- buf.EncodeUint8(uint8(len(m.Group.Saddrs)))
- buf.EncodeUint32(uint32(m.Group.SwIfIndex))
- buf.EncodeBytes(m.Group.Gaddr[:], 4)
- for j1 := 0; j1 < len(m.Group.Saddrs); j1++ {
- var v1 IP4Address // Saddrs
- if j1 < len(m.Group.Saddrs) {
- v1 = m.Group.Saddrs[j1]
- }
- buf.EncodeBytes(v1[:], 4)
- }
- return buf.Bytes(), nil
-}
-func (m *IgmpListen) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Group.Filter = FilterMode(buf.DecodeUint32())
- m.Group.NSrcs = buf.DecodeUint8()
- m.Group.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- copy(m.Group.Gaddr[:], buf.DecodeBytes(4))
- m.Group.Saddrs = make([]IP4Address, m.Group.NSrcs)
- for j1 := 0; j1 < len(m.Group.Saddrs); j1++ {
- copy(m.Group.Saddrs[j1][:], buf.DecodeBytes(4))
- }
- return nil
-}
-
-// IgmpListenReply defines message 'igmp_listen_reply'.
-type IgmpListenReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *IgmpListenReply) Reset() { *m = IgmpListenReply{} }
-func (*IgmpListenReply) GetMessageName() string { return "igmp_listen_reply" }
-func (*IgmpListenReply) GetCrcString() string { return "e8d4e804" }
-func (*IgmpListenReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IgmpListenReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *IgmpListenReply) 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 *IgmpListenReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// IgmpProxyDeviceAddDel defines message 'igmp_proxy_device_add_del'.
-type IgmpProxyDeviceAddDel struct {
- Add uint8 `binapi:"u8,name=add" json:"add,omitempty"`
- VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *IgmpProxyDeviceAddDel) Reset() { *m = IgmpProxyDeviceAddDel{} }
-func (*IgmpProxyDeviceAddDel) GetMessageName() string { return "igmp_proxy_device_add_del" }
-func (*IgmpProxyDeviceAddDel) GetCrcString() string { return "0b9be9ce" }
-func (*IgmpProxyDeviceAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IgmpProxyDeviceAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.Add
- size += 4 // m.VrfID
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *IgmpProxyDeviceAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.Add)
- buf.EncodeUint32(m.VrfID)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- return buf.Bytes(), nil
-}
-func (m *IgmpProxyDeviceAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Add = buf.DecodeUint8()
- m.VrfID = buf.DecodeUint32()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// IgmpProxyDeviceAddDelInterface defines message 'igmp_proxy_device_add_del_interface'.
-type IgmpProxyDeviceAddDelInterface struct {
- Add bool `binapi:"bool,name=add" json:"add,omitempty"`
- VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *IgmpProxyDeviceAddDelInterface) Reset() { *m = IgmpProxyDeviceAddDelInterface{} }
-func (*IgmpProxyDeviceAddDelInterface) GetMessageName() string {
- return "igmp_proxy_device_add_del_interface"
-}
-func (*IgmpProxyDeviceAddDelInterface) GetCrcString() string { return "1a9ec24a" }
-func (*IgmpProxyDeviceAddDelInterface) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IgmpProxyDeviceAddDelInterface) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.Add
- size += 4 // m.VrfID
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *IgmpProxyDeviceAddDelInterface) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.Add)
- buf.EncodeUint32(m.VrfID)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- return buf.Bytes(), nil
-}
-func (m *IgmpProxyDeviceAddDelInterface) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Add = buf.DecodeBool()
- m.VrfID = buf.DecodeUint32()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// IgmpProxyDeviceAddDelInterfaceReply defines message 'igmp_proxy_device_add_del_interface_reply'.
-type IgmpProxyDeviceAddDelInterfaceReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *IgmpProxyDeviceAddDelInterfaceReply) Reset() { *m = IgmpProxyDeviceAddDelInterfaceReply{} }
-func (*IgmpProxyDeviceAddDelInterfaceReply) GetMessageName() string {
- return "igmp_proxy_device_add_del_interface_reply"
-}
-func (*IgmpProxyDeviceAddDelInterfaceReply) GetCrcString() string { return "e8d4e804" }
-func (*IgmpProxyDeviceAddDelInterfaceReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IgmpProxyDeviceAddDelInterfaceReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *IgmpProxyDeviceAddDelInterfaceReply) 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 *IgmpProxyDeviceAddDelInterfaceReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// IgmpProxyDeviceAddDelReply defines message 'igmp_proxy_device_add_del_reply'.
-type IgmpProxyDeviceAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *IgmpProxyDeviceAddDelReply) Reset() { *m = IgmpProxyDeviceAddDelReply{} }
-func (*IgmpProxyDeviceAddDelReply) GetMessageName() string { return "igmp_proxy_device_add_del_reply" }
-func (*IgmpProxyDeviceAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*IgmpProxyDeviceAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IgmpProxyDeviceAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *IgmpProxyDeviceAddDelReply) 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 *IgmpProxyDeviceAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// WantIgmpEvents defines message 'want_igmp_events'.
-type WantIgmpEvents struct {
- Enable uint32 `binapi:"u32,name=enable" json:"enable,omitempty"`
- PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
-}
-
-func (m *WantIgmpEvents) Reset() { *m = WantIgmpEvents{} }
-func (*WantIgmpEvents) GetMessageName() string { return "want_igmp_events" }
-func (*WantIgmpEvents) GetCrcString() string { return "cfaccc1f" }
-func (*WantIgmpEvents) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *WantIgmpEvents) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Enable
- size += 4 // m.PID
- return size
-}
-func (m *WantIgmpEvents) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Enable)
- buf.EncodeUint32(m.PID)
- return buf.Bytes(), nil
-}
-func (m *WantIgmpEvents) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Enable = buf.DecodeUint32()
- m.PID = buf.DecodeUint32()
- return nil
-}
-
-// WantIgmpEventsReply defines message 'want_igmp_events_reply'.
-type WantIgmpEventsReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *WantIgmpEventsReply) Reset() { *m = WantIgmpEventsReply{} }
-func (*WantIgmpEventsReply) GetMessageName() string { return "want_igmp_events_reply" }
-func (*WantIgmpEventsReply) GetCrcString() string { return "e8d4e804" }
-func (*WantIgmpEventsReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *WantIgmpEventsReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *WantIgmpEventsReply) 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 *WantIgmpEventsReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_igmp_binapi_init() }
-func file_igmp_binapi_init() {
- api.RegisterMessage((*IgmpClearInterface)(nil), "igmp_clear_interface_f9e6675e")
- api.RegisterMessage((*IgmpClearInterfaceReply)(nil), "igmp_clear_interface_reply_e8d4e804")
- api.RegisterMessage((*IgmpDetails)(nil), "igmp_details_52f12a89")
- api.RegisterMessage((*IgmpDump)(nil), "igmp_dump_f9e6675e")
- api.RegisterMessage((*IgmpEnableDisable)(nil), "igmp_enable_disable_b1edfb96")
- api.RegisterMessage((*IgmpEnableDisableReply)(nil), "igmp_enable_disable_reply_e8d4e804")
- api.RegisterMessage((*IgmpEvent)(nil), "igmp_event_d7696eaf")
- api.RegisterMessage((*IgmpGroupPrefixDetails)(nil), "igmp_group_prefix_details_c3b3c526")
- api.RegisterMessage((*IgmpGroupPrefixDump)(nil), "igmp_group_prefix_dump_51077d14")
- api.RegisterMessage((*IgmpGroupPrefixSet)(nil), "igmp_group_prefix_set_d4f20ac5")
- api.RegisterMessage((*IgmpGroupPrefixSetReply)(nil), "igmp_group_prefix_set_reply_e8d4e804")
- api.RegisterMessage((*IgmpListen)(nil), "igmp_listen_3f93a51a")
- api.RegisterMessage((*IgmpListenReply)(nil), "igmp_listen_reply_e8d4e804")
- api.RegisterMessage((*IgmpProxyDeviceAddDel)(nil), "igmp_proxy_device_add_del_0b9be9ce")
- api.RegisterMessage((*IgmpProxyDeviceAddDelInterface)(nil), "igmp_proxy_device_add_del_interface_1a9ec24a")
- api.RegisterMessage((*IgmpProxyDeviceAddDelInterfaceReply)(nil), "igmp_proxy_device_add_del_interface_reply_e8d4e804")
- api.RegisterMessage((*IgmpProxyDeviceAddDelReply)(nil), "igmp_proxy_device_add_del_reply_e8d4e804")
- api.RegisterMessage((*WantIgmpEvents)(nil), "want_igmp_events_cfaccc1f")
- api.RegisterMessage((*WantIgmpEventsReply)(nil), "want_igmp_events_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*IgmpClearInterface)(nil),
- (*IgmpClearInterfaceReply)(nil),
- (*IgmpDetails)(nil),
- (*IgmpDump)(nil),
- (*IgmpEnableDisable)(nil),
- (*IgmpEnableDisableReply)(nil),
- (*IgmpEvent)(nil),
- (*IgmpGroupPrefixDetails)(nil),
- (*IgmpGroupPrefixDump)(nil),
- (*IgmpGroupPrefixSet)(nil),
- (*IgmpGroupPrefixSetReply)(nil),
- (*IgmpListen)(nil),
- (*IgmpListenReply)(nil),
- (*IgmpProxyDeviceAddDel)(nil),
- (*IgmpProxyDeviceAddDelInterface)(nil),
- (*IgmpProxyDeviceAddDelInterfaceReply)(nil),
- (*IgmpProxyDeviceAddDelReply)(nil),
- (*WantIgmpEvents)(nil),
- (*WantIgmpEventsReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/igmp/igmp_rpc.ba.go b/internal/testbinapi/binapi2001/igmp/igmp_rpc.ba.go
deleted file mode 100644
index b79fdc2..0000000
--- a/internal/testbinapi/binapi2001/igmp/igmp_rpc.ba.go
+++ /dev/null
@@ -1,182 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package igmp
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service igmp.
-type RPCService interface {
- IgmpClearInterface(ctx context.Context, in *IgmpClearInterface) (*IgmpClearInterfaceReply, error)
- IgmpDump(ctx context.Context, in *IgmpDump) (RPCService_IgmpDumpClient, error)
- IgmpEnableDisable(ctx context.Context, in *IgmpEnableDisable) (*IgmpEnableDisableReply, error)
- IgmpGroupPrefixDump(ctx context.Context, in *IgmpGroupPrefixDump) (RPCService_IgmpGroupPrefixDumpClient, error)
- IgmpGroupPrefixSet(ctx context.Context, in *IgmpGroupPrefixSet) (*IgmpGroupPrefixSetReply, error)
- IgmpListen(ctx context.Context, in *IgmpListen) (*IgmpListenReply, error)
- IgmpProxyDeviceAddDel(ctx context.Context, in *IgmpProxyDeviceAddDel) (*IgmpProxyDeviceAddDelReply, error)
- IgmpProxyDeviceAddDelInterface(ctx context.Context, in *IgmpProxyDeviceAddDelInterface) (*IgmpProxyDeviceAddDelInterfaceReply, error)
- WantIgmpEvents(ctx context.Context, in *WantIgmpEvents) (*WantIgmpEventsReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) IgmpClearInterface(ctx context.Context, in *IgmpClearInterface) (*IgmpClearInterfaceReply, error) {
- out := new(IgmpClearInterfaceReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) IgmpDump(ctx context.Context, in *IgmpDump) (RPCService_IgmpDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_IgmpDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_IgmpDumpClient interface {
- Recv() (*IgmpDetails, error)
- api.Stream
-}
-
-type serviceClient_IgmpDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_IgmpDumpClient) Recv() (*IgmpDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *IgmpDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) IgmpEnableDisable(ctx context.Context, in *IgmpEnableDisable) (*IgmpEnableDisableReply, error) {
- out := new(IgmpEnableDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) IgmpGroupPrefixDump(ctx context.Context, in *IgmpGroupPrefixDump) (RPCService_IgmpGroupPrefixDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_IgmpGroupPrefixDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_IgmpGroupPrefixDumpClient interface {
- Recv() (*IgmpGroupPrefixDetails, error)
- api.Stream
-}
-
-type serviceClient_IgmpGroupPrefixDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_IgmpGroupPrefixDumpClient) Recv() (*IgmpGroupPrefixDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *IgmpGroupPrefixDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) IgmpGroupPrefixSet(ctx context.Context, in *IgmpGroupPrefixSet) (*IgmpGroupPrefixSetReply, error) {
- out := new(IgmpGroupPrefixSetReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) IgmpListen(ctx context.Context, in *IgmpListen) (*IgmpListenReply, error) {
- out := new(IgmpListenReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) IgmpProxyDeviceAddDel(ctx context.Context, in *IgmpProxyDeviceAddDel) (*IgmpProxyDeviceAddDelReply, error) {
- out := new(IgmpProxyDeviceAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) IgmpProxyDeviceAddDelInterface(ctx context.Context, in *IgmpProxyDeviceAddDelInterface) (*IgmpProxyDeviceAddDelInterfaceReply, error) {
- out := new(IgmpProxyDeviceAddDelInterfaceReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) WantIgmpEvents(ctx context.Context, in *WantIgmpEvents) (*WantIgmpEventsReply, error) {
- out := new(WantIgmpEventsReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/ikev2/ikev2.ba.go b/internal/testbinapi/binapi2001/ikev2/ikev2.ba.go
deleted file mode 100644
index 578cdc4..0000000
--- a/internal/testbinapi/binapi2001/ikev2/ikev2.ba.go
+++ /dev/null
@@ -1,1992 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/plugins/ikev2.api.json
-
-// Package ikev2 contains generated bindings for API file ikev2.api.
-//
-// Contents:
-// 6 aliases
-// 10 enums
-// 6 structs
-// 1 union
-// 28 messages
-//
-package ikev2
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "ikev2"
- APIVersion = "1.0.1"
- VersionCrc = 0x4eab5d22
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
-
-// Ikev2InitiateDelChildSa defines message 'ikev2_initiate_del_child_sa'.
-type Ikev2InitiateDelChildSa struct {
- Ispi uint32 `binapi:"u32,name=ispi" json:"ispi,omitempty"`
-}
-
-func (m *Ikev2InitiateDelChildSa) Reset() { *m = Ikev2InitiateDelChildSa{} }
-func (*Ikev2InitiateDelChildSa) GetMessageName() string { return "ikev2_initiate_del_child_sa" }
-func (*Ikev2InitiateDelChildSa) GetCrcString() string { return "7f004d2e" }
-func (*Ikev2InitiateDelChildSa) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Ikev2InitiateDelChildSa) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Ispi
- return size
-}
-func (m *Ikev2InitiateDelChildSa) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Ispi)
- return buf.Bytes(), nil
-}
-func (m *Ikev2InitiateDelChildSa) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Ispi = buf.DecodeUint32()
- return nil
-}
-
-// Ikev2InitiateDelChildSaReply defines message 'ikev2_initiate_del_child_sa_reply'.
-type Ikev2InitiateDelChildSaReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *Ikev2InitiateDelChildSaReply) Reset() { *m = Ikev2InitiateDelChildSaReply{} }
-func (*Ikev2InitiateDelChildSaReply) GetMessageName() string {
- return "ikev2_initiate_del_child_sa_reply"
-}
-func (*Ikev2InitiateDelChildSaReply) GetCrcString() string { return "e8d4e804" }
-func (*Ikev2InitiateDelChildSaReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Ikev2InitiateDelChildSaReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *Ikev2InitiateDelChildSaReply) 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 *Ikev2InitiateDelChildSaReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// Ikev2InitiateDelIkeSa defines message 'ikev2_initiate_del_ike_sa'.
-type Ikev2InitiateDelIkeSa struct {
- Ispi uint64 `binapi:"u64,name=ispi" json:"ispi,omitempty"`
-}
-
-func (m *Ikev2InitiateDelIkeSa) Reset() { *m = Ikev2InitiateDelIkeSa{} }
-func (*Ikev2InitiateDelIkeSa) GetMessageName() string { return "ikev2_initiate_del_ike_sa" }
-func (*Ikev2InitiateDelIkeSa) GetCrcString() string { return "8d125bdd" }
-func (*Ikev2InitiateDelIkeSa) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Ikev2InitiateDelIkeSa) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 8 // m.Ispi
- return size
-}
-func (m *Ikev2InitiateDelIkeSa) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint64(m.Ispi)
- return buf.Bytes(), nil
-}
-func (m *Ikev2InitiateDelIkeSa) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Ispi = buf.DecodeUint64()
- return nil
-}
-
-// Ikev2InitiateDelIkeSaReply defines message 'ikev2_initiate_del_ike_sa_reply'.
-type Ikev2InitiateDelIkeSaReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *Ikev2InitiateDelIkeSaReply) Reset() { *m = Ikev2InitiateDelIkeSaReply{} }
-func (*Ikev2InitiateDelIkeSaReply) GetMessageName() string { return "ikev2_initiate_del_ike_sa_reply" }
-func (*Ikev2InitiateDelIkeSaReply) GetCrcString() string { return "e8d4e804" }
-func (*Ikev2InitiateDelIkeSaReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Ikev2InitiateDelIkeSaReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *Ikev2InitiateDelIkeSaReply) 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 *Ikev2InitiateDelIkeSaReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// Ikev2InitiateRekeyChildSa defines message 'ikev2_initiate_rekey_child_sa'.
-type Ikev2InitiateRekeyChildSa struct {
- Ispi uint32 `binapi:"u32,name=ispi" json:"ispi,omitempty"`
-}
-
-func (m *Ikev2InitiateRekeyChildSa) Reset() { *m = Ikev2InitiateRekeyChildSa{} }
-func (*Ikev2InitiateRekeyChildSa) GetMessageName() string { return "ikev2_initiate_rekey_child_sa" }
-func (*Ikev2InitiateRekeyChildSa) GetCrcString() string { return "7f004d2e" }
-func (*Ikev2InitiateRekeyChildSa) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Ikev2InitiateRekeyChildSa) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Ispi
- return size
-}
-func (m *Ikev2InitiateRekeyChildSa) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Ispi)
- return buf.Bytes(), nil
-}
-func (m *Ikev2InitiateRekeyChildSa) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Ispi = buf.DecodeUint32()
- return nil
-}
-
-// Ikev2InitiateRekeyChildSaReply defines message 'ikev2_initiate_rekey_child_sa_reply'.
-type Ikev2InitiateRekeyChildSaReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *Ikev2InitiateRekeyChildSaReply) Reset() { *m = Ikev2InitiateRekeyChildSaReply{} }
-func (*Ikev2InitiateRekeyChildSaReply) GetMessageName() string {
- return "ikev2_initiate_rekey_child_sa_reply"
-}
-func (*Ikev2InitiateRekeyChildSaReply) GetCrcString() string { return "e8d4e804" }
-func (*Ikev2InitiateRekeyChildSaReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Ikev2InitiateRekeyChildSaReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *Ikev2InitiateRekeyChildSaReply) 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 *Ikev2InitiateRekeyChildSaReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// Ikev2InitiateSaInit defines message 'ikev2_initiate_sa_init'.
-type Ikev2InitiateSaInit struct {
- Name string `binapi:"string[64],name=name" json:"name,omitempty"`
-}
-
-func (m *Ikev2InitiateSaInit) Reset() { *m = Ikev2InitiateSaInit{} }
-func (*Ikev2InitiateSaInit) GetMessageName() string { return "ikev2_initiate_sa_init" }
-func (*Ikev2InitiateSaInit) GetCrcString() string { return "ebf79a66" }
-func (*Ikev2InitiateSaInit) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Ikev2InitiateSaInit) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 64 // m.Name
- return size
-}
-func (m *Ikev2InitiateSaInit) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeString(m.Name, 64)
- return buf.Bytes(), nil
-}
-func (m *Ikev2InitiateSaInit) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Name = buf.DecodeString(64)
- return nil
-}
-
-// Ikev2InitiateSaInitReply defines message 'ikev2_initiate_sa_init_reply'.
-type Ikev2InitiateSaInitReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *Ikev2InitiateSaInitReply) Reset() { *m = Ikev2InitiateSaInitReply{} }
-func (*Ikev2InitiateSaInitReply) GetMessageName() string { return "ikev2_initiate_sa_init_reply" }
-func (*Ikev2InitiateSaInitReply) GetCrcString() string { return "e8d4e804" }
-func (*Ikev2InitiateSaInitReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Ikev2InitiateSaInitReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *Ikev2InitiateSaInitReply) 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 *Ikev2InitiateSaInitReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// Ikev2PluginGetVersion defines message 'ikev2_plugin_get_version'.
-type Ikev2PluginGetVersion struct{}
-
-func (m *Ikev2PluginGetVersion) Reset() { *m = Ikev2PluginGetVersion{} }
-func (*Ikev2PluginGetVersion) GetMessageName() string { return "ikev2_plugin_get_version" }
-func (*Ikev2PluginGetVersion) GetCrcString() string { return "51077d14" }
-func (*Ikev2PluginGetVersion) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Ikev2PluginGetVersion) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *Ikev2PluginGetVersion) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *Ikev2PluginGetVersion) Unmarshal(b []byte) error {
- return nil
-}
-
-// Ikev2PluginGetVersionReply defines message 'ikev2_plugin_get_version_reply'.
-type Ikev2PluginGetVersionReply struct {
- Major uint32 `binapi:"u32,name=major" json:"major,omitempty"`
- Minor uint32 `binapi:"u32,name=minor" json:"minor,omitempty"`
-}
-
-func (m *Ikev2PluginGetVersionReply) Reset() { *m = Ikev2PluginGetVersionReply{} }
-func (*Ikev2PluginGetVersionReply) GetMessageName() string { return "ikev2_plugin_get_version_reply" }
-func (*Ikev2PluginGetVersionReply) GetCrcString() string { return "9b32cf86" }
-func (*Ikev2PluginGetVersionReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Ikev2PluginGetVersionReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Major
- size += 4 // m.Minor
- return size
-}
-func (m *Ikev2PluginGetVersionReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Major)
- buf.EncodeUint32(m.Minor)
- return buf.Bytes(), nil
-}
-func (m *Ikev2PluginGetVersionReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Major = buf.DecodeUint32()
- m.Minor = buf.DecodeUint32()
- return nil
-}
-
-// Ikev2ProfileAddDel defines message 'ikev2_profile_add_del'.
-type Ikev2ProfileAddDel struct {
- Name string `binapi:"string[64],name=name" json:"name,omitempty"`
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
-}
-
-func (m *Ikev2ProfileAddDel) Reset() { *m = Ikev2ProfileAddDel{} }
-func (*Ikev2ProfileAddDel) GetMessageName() string { return "ikev2_profile_add_del" }
-func (*Ikev2ProfileAddDel) GetCrcString() string { return "2c925b55" }
-func (*Ikev2ProfileAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Ikev2ProfileAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 64 // m.Name
- size += 1 // m.IsAdd
- return size
-}
-func (m *Ikev2ProfileAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeString(m.Name, 64)
- buf.EncodeBool(m.IsAdd)
- return buf.Bytes(), nil
-}
-func (m *Ikev2ProfileAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Name = buf.DecodeString(64)
- m.IsAdd = buf.DecodeBool()
- return nil
-}
-
-// Ikev2ProfileAddDelReply defines message 'ikev2_profile_add_del_reply'.
-type Ikev2ProfileAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *Ikev2ProfileAddDelReply) Reset() { *m = Ikev2ProfileAddDelReply{} }
-func (*Ikev2ProfileAddDelReply) GetMessageName() string { return "ikev2_profile_add_del_reply" }
-func (*Ikev2ProfileAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*Ikev2ProfileAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Ikev2ProfileAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *Ikev2ProfileAddDelReply) 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 *Ikev2ProfileAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// Ikev2ProfileSetAuth defines message 'ikev2_profile_set_auth'.
-type Ikev2ProfileSetAuth struct {
- Name string `binapi:"string[64],name=name" json:"name,omitempty"`
- AuthMethod uint8 `binapi:"u8,name=auth_method" json:"auth_method,omitempty"`
- IsHex bool `binapi:"bool,name=is_hex" json:"is_hex,omitempty"`
- DataLen uint32 `binapi:"u32,name=data_len" json:"-"`
- Data []byte `binapi:"u8[data_len],name=data" json:"data,omitempty"`
-}
-
-func (m *Ikev2ProfileSetAuth) Reset() { *m = Ikev2ProfileSetAuth{} }
-func (*Ikev2ProfileSetAuth) GetMessageName() string { return "ikev2_profile_set_auth" }
-func (*Ikev2ProfileSetAuth) GetCrcString() string { return "642c97cd" }
-func (*Ikev2ProfileSetAuth) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Ikev2ProfileSetAuth) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 64 // m.Name
- size += 1 // m.AuthMethod
- size += 1 // m.IsHex
- size += 4 // m.DataLen
- size += 1 * len(m.Data) // m.Data
- return size
-}
-func (m *Ikev2ProfileSetAuth) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeString(m.Name, 64)
- buf.EncodeUint8(m.AuthMethod)
- buf.EncodeBool(m.IsHex)
- buf.EncodeUint32(uint32(len(m.Data)))
- buf.EncodeBytes(m.Data, 0)
- return buf.Bytes(), nil
-}
-func (m *Ikev2ProfileSetAuth) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Name = buf.DecodeString(64)
- m.AuthMethod = buf.DecodeUint8()
- m.IsHex = buf.DecodeBool()
- m.DataLen = buf.DecodeUint32()
- m.Data = make([]byte, m.DataLen)
- copy(m.Data, buf.DecodeBytes(len(m.Data)))
- return nil
-}
-
-// Ikev2ProfileSetAuthReply defines message 'ikev2_profile_set_auth_reply'.
-type Ikev2ProfileSetAuthReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *Ikev2ProfileSetAuthReply) Reset() { *m = Ikev2ProfileSetAuthReply{} }
-func (*Ikev2ProfileSetAuthReply) GetMessageName() string { return "ikev2_profile_set_auth_reply" }
-func (*Ikev2ProfileSetAuthReply) GetCrcString() string { return "e8d4e804" }
-func (*Ikev2ProfileSetAuthReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Ikev2ProfileSetAuthReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *Ikev2ProfileSetAuthReply) 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 *Ikev2ProfileSetAuthReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// Ikev2ProfileSetID defines message 'ikev2_profile_set_id'.
-type Ikev2ProfileSetID struct {
- Name string `binapi:"string[64],name=name" json:"name,omitempty"`
- IsLocal bool `binapi:"bool,name=is_local" json:"is_local,omitempty"`
- IDType uint8 `binapi:"u8,name=id_type" json:"id_type,omitempty"`
- DataLen uint32 `binapi:"u32,name=data_len" json:"-"`
- Data []byte `binapi:"u8[data_len],name=data" json:"data,omitempty"`
-}
-
-func (m *Ikev2ProfileSetID) Reset() { *m = Ikev2ProfileSetID{} }
-func (*Ikev2ProfileSetID) GetMessageName() string { return "ikev2_profile_set_id" }
-func (*Ikev2ProfileSetID) GetCrcString() string { return "4d7e2418" }
-func (*Ikev2ProfileSetID) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Ikev2ProfileSetID) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 64 // m.Name
- size += 1 // m.IsLocal
- size += 1 // m.IDType
- size += 4 // m.DataLen
- size += 1 * len(m.Data) // m.Data
- return size
-}
-func (m *Ikev2ProfileSetID) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeString(m.Name, 64)
- buf.EncodeBool(m.IsLocal)
- buf.EncodeUint8(m.IDType)
- buf.EncodeUint32(uint32(len(m.Data)))
- buf.EncodeBytes(m.Data, 0)
- return buf.Bytes(), nil
-}
-func (m *Ikev2ProfileSetID) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Name = buf.DecodeString(64)
- m.IsLocal = buf.DecodeBool()
- m.IDType = buf.DecodeUint8()
- m.DataLen = buf.DecodeUint32()
- m.Data = make([]byte, m.DataLen)
- copy(m.Data, buf.DecodeBytes(len(m.Data)))
- return nil
-}
-
-// Ikev2ProfileSetIDReply defines message 'ikev2_profile_set_id_reply'.
-type Ikev2ProfileSetIDReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *Ikev2ProfileSetIDReply) Reset() { *m = Ikev2ProfileSetIDReply{} }
-func (*Ikev2ProfileSetIDReply) GetMessageName() string { return "ikev2_profile_set_id_reply" }
-func (*Ikev2ProfileSetIDReply) GetCrcString() string { return "e8d4e804" }
-func (*Ikev2ProfileSetIDReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Ikev2ProfileSetIDReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *Ikev2ProfileSetIDReply) 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 *Ikev2ProfileSetIDReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// Ikev2ProfileSetTs defines message 'ikev2_profile_set_ts'.
-type Ikev2ProfileSetTs struct {
- Name string `binapi:"string[64],name=name" json:"name,omitempty"`
- IsLocal bool `binapi:"bool,name=is_local" json:"is_local,omitempty"`
- Proto uint8 `binapi:"u8,name=proto" json:"proto,omitempty"`
- StartPort uint16 `binapi:"u16,name=start_port" json:"start_port,omitempty"`
- EndPort uint16 `binapi:"u16,name=end_port" json:"end_port,omitempty"`
- StartAddr uint32 `binapi:"u32,name=start_addr" json:"start_addr,omitempty"`
- EndAddr uint32 `binapi:"u32,name=end_addr" json:"end_addr,omitempty"`
-}
-
-func (m *Ikev2ProfileSetTs) Reset() { *m = Ikev2ProfileSetTs{} }
-func (*Ikev2ProfileSetTs) GetMessageName() string { return "ikev2_profile_set_ts" }
-func (*Ikev2ProfileSetTs) GetCrcString() string { return "64d55c16" }
-func (*Ikev2ProfileSetTs) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Ikev2ProfileSetTs) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 64 // m.Name
- size += 1 // m.IsLocal
- size += 1 // m.Proto
- size += 2 // m.StartPort
- size += 2 // m.EndPort
- size += 4 // m.StartAddr
- size += 4 // m.EndAddr
- return size
-}
-func (m *Ikev2ProfileSetTs) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeString(m.Name, 64)
- buf.EncodeBool(m.IsLocal)
- buf.EncodeUint8(m.Proto)
- buf.EncodeUint16(m.StartPort)
- buf.EncodeUint16(m.EndPort)
- buf.EncodeUint32(m.StartAddr)
- buf.EncodeUint32(m.EndAddr)
- return buf.Bytes(), nil
-}
-func (m *Ikev2ProfileSetTs) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Name = buf.DecodeString(64)
- m.IsLocal = buf.DecodeBool()
- m.Proto = buf.DecodeUint8()
- m.StartPort = buf.DecodeUint16()
- m.EndPort = buf.DecodeUint16()
- m.StartAddr = buf.DecodeUint32()
- m.EndAddr = buf.DecodeUint32()
- return nil
-}
-
-// Ikev2ProfileSetTsReply defines message 'ikev2_profile_set_ts_reply'.
-type Ikev2ProfileSetTsReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *Ikev2ProfileSetTsReply) Reset() { *m = Ikev2ProfileSetTsReply{} }
-func (*Ikev2ProfileSetTsReply) GetMessageName() string { return "ikev2_profile_set_ts_reply" }
-func (*Ikev2ProfileSetTsReply) GetCrcString() string { return "e8d4e804" }
-func (*Ikev2ProfileSetTsReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Ikev2ProfileSetTsReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *Ikev2ProfileSetTsReply) 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 *Ikev2ProfileSetTsReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// Ikev2SetEspTransforms defines message 'ikev2_set_esp_transforms'.
-type Ikev2SetEspTransforms struct {
- Name string `binapi:"string[64],name=name" json:"name,omitempty"`
- CryptoAlg uint32 `binapi:"u32,name=crypto_alg" json:"crypto_alg,omitempty"`
- CryptoKeySize uint32 `binapi:"u32,name=crypto_key_size" json:"crypto_key_size,omitempty"`
- IntegAlg uint32 `binapi:"u32,name=integ_alg" json:"integ_alg,omitempty"`
- DhGroup uint32 `binapi:"u32,name=dh_group" json:"dh_group,omitempty"`
-}
-
-func (m *Ikev2SetEspTransforms) Reset() { *m = Ikev2SetEspTransforms{} }
-func (*Ikev2SetEspTransforms) GetMessageName() string { return "ikev2_set_esp_transforms" }
-func (*Ikev2SetEspTransforms) GetCrcString() string { return "936a1a37" }
-func (*Ikev2SetEspTransforms) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Ikev2SetEspTransforms) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 64 // m.Name
- size += 4 // m.CryptoAlg
- size += 4 // m.CryptoKeySize
- size += 4 // m.IntegAlg
- size += 4 // m.DhGroup
- return size
-}
-func (m *Ikev2SetEspTransforms) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeString(m.Name, 64)
- buf.EncodeUint32(m.CryptoAlg)
- buf.EncodeUint32(m.CryptoKeySize)
- buf.EncodeUint32(m.IntegAlg)
- buf.EncodeUint32(m.DhGroup)
- return buf.Bytes(), nil
-}
-func (m *Ikev2SetEspTransforms) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Name = buf.DecodeString(64)
- m.CryptoAlg = buf.DecodeUint32()
- m.CryptoKeySize = buf.DecodeUint32()
- m.IntegAlg = buf.DecodeUint32()
- m.DhGroup = buf.DecodeUint32()
- return nil
-}
-
-// Ikev2SetEspTransformsReply defines message 'ikev2_set_esp_transforms_reply'.
-type Ikev2SetEspTransformsReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *Ikev2SetEspTransformsReply) Reset() { *m = Ikev2SetEspTransformsReply{} }
-func (*Ikev2SetEspTransformsReply) GetMessageName() string { return "ikev2_set_esp_transforms_reply" }
-func (*Ikev2SetEspTransformsReply) GetCrcString() string { return "e8d4e804" }
-func (*Ikev2SetEspTransformsReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Ikev2SetEspTransformsReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *Ikev2SetEspTransformsReply) 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 *Ikev2SetEspTransformsReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// Ikev2SetIkeTransforms defines message 'ikev2_set_ike_transforms'.
-type Ikev2SetIkeTransforms struct {
- Name string `binapi:"string[64],name=name" json:"name,omitempty"`
- CryptoAlg uint32 `binapi:"u32,name=crypto_alg" json:"crypto_alg,omitempty"`
- CryptoKeySize uint32 `binapi:"u32,name=crypto_key_size" json:"crypto_key_size,omitempty"`
- IntegAlg uint32 `binapi:"u32,name=integ_alg" json:"integ_alg,omitempty"`
- DhGroup uint32 `binapi:"u32,name=dh_group" json:"dh_group,omitempty"`
-}
-
-func (m *Ikev2SetIkeTransforms) Reset() { *m = Ikev2SetIkeTransforms{} }
-func (*Ikev2SetIkeTransforms) GetMessageName() string { return "ikev2_set_ike_transforms" }
-func (*Ikev2SetIkeTransforms) GetCrcString() string { return "936a1a37" }
-func (*Ikev2SetIkeTransforms) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Ikev2SetIkeTransforms) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 64 // m.Name
- size += 4 // m.CryptoAlg
- size += 4 // m.CryptoKeySize
- size += 4 // m.IntegAlg
- size += 4 // m.DhGroup
- return size
-}
-func (m *Ikev2SetIkeTransforms) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeString(m.Name, 64)
- buf.EncodeUint32(m.CryptoAlg)
- buf.EncodeUint32(m.CryptoKeySize)
- buf.EncodeUint32(m.IntegAlg)
- buf.EncodeUint32(m.DhGroup)
- return buf.Bytes(), nil
-}
-func (m *Ikev2SetIkeTransforms) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Name = buf.DecodeString(64)
- m.CryptoAlg = buf.DecodeUint32()
- m.CryptoKeySize = buf.DecodeUint32()
- m.IntegAlg = buf.DecodeUint32()
- m.DhGroup = buf.DecodeUint32()
- return nil
-}
-
-// Ikev2SetIkeTransformsReply defines message 'ikev2_set_ike_transforms_reply'.
-type Ikev2SetIkeTransformsReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *Ikev2SetIkeTransformsReply) Reset() { *m = Ikev2SetIkeTransformsReply{} }
-func (*Ikev2SetIkeTransformsReply) GetMessageName() string { return "ikev2_set_ike_transforms_reply" }
-func (*Ikev2SetIkeTransformsReply) GetCrcString() string { return "e8d4e804" }
-func (*Ikev2SetIkeTransformsReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Ikev2SetIkeTransformsReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *Ikev2SetIkeTransformsReply) 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 *Ikev2SetIkeTransformsReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// Ikev2SetLocalKey defines message 'ikev2_set_local_key'.
-type Ikev2SetLocalKey struct {
- KeyFile []byte `binapi:"u8[256],name=key_file" json:"key_file,omitempty"`
-}
-
-func (m *Ikev2SetLocalKey) Reset() { *m = Ikev2SetLocalKey{} }
-func (*Ikev2SetLocalKey) GetMessageName() string { return "ikev2_set_local_key" }
-func (*Ikev2SetLocalKey) GetCrcString() string { return "e4996cd5" }
-func (*Ikev2SetLocalKey) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Ikev2SetLocalKey) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 256 // m.KeyFile
- return size
-}
-func (m *Ikev2SetLocalKey) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.KeyFile, 256)
- return buf.Bytes(), nil
-}
-func (m *Ikev2SetLocalKey) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.KeyFile = make([]byte, 256)
- copy(m.KeyFile, buf.DecodeBytes(len(m.KeyFile)))
- return nil
-}
-
-// Ikev2SetLocalKeyReply defines message 'ikev2_set_local_key_reply'.
-type Ikev2SetLocalKeyReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *Ikev2SetLocalKeyReply) Reset() { *m = Ikev2SetLocalKeyReply{} }
-func (*Ikev2SetLocalKeyReply) GetMessageName() string { return "ikev2_set_local_key_reply" }
-func (*Ikev2SetLocalKeyReply) GetCrcString() string { return "e8d4e804" }
-func (*Ikev2SetLocalKeyReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Ikev2SetLocalKeyReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *Ikev2SetLocalKeyReply) 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 *Ikev2SetLocalKeyReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// Ikev2SetResponder defines message 'ikev2_set_responder'.
-type Ikev2SetResponder struct {
- Name string `binapi:"string[64],name=name" json:"name,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
-}
-
-func (m *Ikev2SetResponder) Reset() { *m = Ikev2SetResponder{} }
-func (*Ikev2SetResponder) GetMessageName() string { return "ikev2_set_responder" }
-func (*Ikev2SetResponder) GetCrcString() string { return "f0d3dc80" }
-func (*Ikev2SetResponder) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Ikev2SetResponder) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 64 // m.Name
- size += 4 // m.SwIfIndex
- size += 1 * 4 // m.Address
- return size
-}
-func (m *Ikev2SetResponder) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeString(m.Name, 64)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeBytes(m.Address[:], 4)
- return buf.Bytes(), nil
-}
-func (m *Ikev2SetResponder) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Name = buf.DecodeString(64)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- copy(m.Address[:], buf.DecodeBytes(4))
- return nil
-}
-
-// Ikev2SetResponderReply defines message 'ikev2_set_responder_reply'.
-type Ikev2SetResponderReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *Ikev2SetResponderReply) Reset() { *m = Ikev2SetResponderReply{} }
-func (*Ikev2SetResponderReply) GetMessageName() string { return "ikev2_set_responder_reply" }
-func (*Ikev2SetResponderReply) GetCrcString() string { return "e8d4e804" }
-func (*Ikev2SetResponderReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Ikev2SetResponderReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *Ikev2SetResponderReply) 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 *Ikev2SetResponderReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// Ikev2SetSaLifetime defines message 'ikev2_set_sa_lifetime'.
-type Ikev2SetSaLifetime struct {
- Name string `binapi:"string[64],name=name" json:"name,omitempty"`
- Lifetime uint64 `binapi:"u64,name=lifetime" json:"lifetime,omitempty"`
- LifetimeJitter uint32 `binapi:"u32,name=lifetime_jitter" json:"lifetime_jitter,omitempty"`
- Handover uint32 `binapi:"u32,name=handover" json:"handover,omitempty"`
- LifetimeMaxdata uint64 `binapi:"u64,name=lifetime_maxdata" json:"lifetime_maxdata,omitempty"`
-}
-
-func (m *Ikev2SetSaLifetime) Reset() { *m = Ikev2SetSaLifetime{} }
-func (*Ikev2SetSaLifetime) GetMessageName() string { return "ikev2_set_sa_lifetime" }
-func (*Ikev2SetSaLifetime) GetCrcString() string { return "7039feaa" }
-func (*Ikev2SetSaLifetime) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Ikev2SetSaLifetime) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 64 // m.Name
- size += 8 // m.Lifetime
- size += 4 // m.LifetimeJitter
- size += 4 // m.Handover
- size += 8 // m.LifetimeMaxdata
- return size
-}
-func (m *Ikev2SetSaLifetime) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeString(m.Name, 64)
- buf.EncodeUint64(m.Lifetime)
- buf.EncodeUint32(m.LifetimeJitter)
- buf.EncodeUint32(m.Handover)
- buf.EncodeUint64(m.LifetimeMaxdata)
- return buf.Bytes(), nil
-}
-func (m *Ikev2SetSaLifetime) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Name = buf.DecodeString(64)
- m.Lifetime = buf.DecodeUint64()
- m.LifetimeJitter = buf.DecodeUint32()
- m.Handover = buf.DecodeUint32()
- m.LifetimeMaxdata = buf.DecodeUint64()
- return nil
-}
-
-// Ikev2SetSaLifetimeReply defines message 'ikev2_set_sa_lifetime_reply'.
-type Ikev2SetSaLifetimeReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *Ikev2SetSaLifetimeReply) Reset() { *m = Ikev2SetSaLifetimeReply{} }
-func (*Ikev2SetSaLifetimeReply) GetMessageName() string { return "ikev2_set_sa_lifetime_reply" }
-func (*Ikev2SetSaLifetimeReply) GetCrcString() string { return "e8d4e804" }
-func (*Ikev2SetSaLifetimeReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Ikev2SetSaLifetimeReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *Ikev2SetSaLifetimeReply) 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 *Ikev2SetSaLifetimeReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_ikev2_binapi_init() }
-func file_ikev2_binapi_init() {
- api.RegisterMessage((*Ikev2InitiateDelChildSa)(nil), "ikev2_initiate_del_child_sa_7f004d2e")
- api.RegisterMessage((*Ikev2InitiateDelChildSaReply)(nil), "ikev2_initiate_del_child_sa_reply_e8d4e804")
- api.RegisterMessage((*Ikev2InitiateDelIkeSa)(nil), "ikev2_initiate_del_ike_sa_8d125bdd")
- api.RegisterMessage((*Ikev2InitiateDelIkeSaReply)(nil), "ikev2_initiate_del_ike_sa_reply_e8d4e804")
- api.RegisterMessage((*Ikev2InitiateRekeyChildSa)(nil), "ikev2_initiate_rekey_child_sa_7f004d2e")
- api.RegisterMessage((*Ikev2InitiateRekeyChildSaReply)(nil), "ikev2_initiate_rekey_child_sa_reply_e8d4e804")
- api.RegisterMessage((*Ikev2InitiateSaInit)(nil), "ikev2_initiate_sa_init_ebf79a66")
- api.RegisterMessage((*Ikev2InitiateSaInitReply)(nil), "ikev2_initiate_sa_init_reply_e8d4e804")
- api.RegisterMessage((*Ikev2PluginGetVersion)(nil), "ikev2_plugin_get_version_51077d14")
- api.RegisterMessage((*Ikev2PluginGetVersionReply)(nil), "ikev2_plugin_get_version_reply_9b32cf86")
- api.RegisterMessage((*Ikev2ProfileAddDel)(nil), "ikev2_profile_add_del_2c925b55")
- api.RegisterMessage((*Ikev2ProfileAddDelReply)(nil), "ikev2_profile_add_del_reply_e8d4e804")
- api.RegisterMessage((*Ikev2ProfileSetAuth)(nil), "ikev2_profile_set_auth_642c97cd")
- api.RegisterMessage((*Ikev2ProfileSetAuthReply)(nil), "ikev2_profile_set_auth_reply_e8d4e804")
- api.RegisterMessage((*Ikev2ProfileSetID)(nil), "ikev2_profile_set_id_4d7e2418")
- api.RegisterMessage((*Ikev2ProfileSetIDReply)(nil), "ikev2_profile_set_id_reply_e8d4e804")
- api.RegisterMessage((*Ikev2ProfileSetTs)(nil), "ikev2_profile_set_ts_64d55c16")
- api.RegisterMessage((*Ikev2ProfileSetTsReply)(nil), "ikev2_profile_set_ts_reply_e8d4e804")
- api.RegisterMessage((*Ikev2SetEspTransforms)(nil), "ikev2_set_esp_transforms_936a1a37")
- api.RegisterMessage((*Ikev2SetEspTransformsReply)(nil), "ikev2_set_esp_transforms_reply_e8d4e804")
- api.RegisterMessage((*Ikev2SetIkeTransforms)(nil), "ikev2_set_ike_transforms_936a1a37")
- api.RegisterMessage((*Ikev2SetIkeTransformsReply)(nil), "ikev2_set_ike_transforms_reply_e8d4e804")
- api.RegisterMessage((*Ikev2SetLocalKey)(nil), "ikev2_set_local_key_e4996cd5")
- api.RegisterMessage((*Ikev2SetLocalKeyReply)(nil), "ikev2_set_local_key_reply_e8d4e804")
- api.RegisterMessage((*Ikev2SetResponder)(nil), "ikev2_set_responder_f0d3dc80")
- api.RegisterMessage((*Ikev2SetResponderReply)(nil), "ikev2_set_responder_reply_e8d4e804")
- api.RegisterMessage((*Ikev2SetSaLifetime)(nil), "ikev2_set_sa_lifetime_7039feaa")
- api.RegisterMessage((*Ikev2SetSaLifetimeReply)(nil), "ikev2_set_sa_lifetime_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*Ikev2InitiateDelChildSa)(nil),
- (*Ikev2InitiateDelChildSaReply)(nil),
- (*Ikev2InitiateDelIkeSa)(nil),
- (*Ikev2InitiateDelIkeSaReply)(nil),
- (*Ikev2InitiateRekeyChildSa)(nil),
- (*Ikev2InitiateRekeyChildSaReply)(nil),
- (*Ikev2InitiateSaInit)(nil),
- (*Ikev2InitiateSaInitReply)(nil),
- (*Ikev2PluginGetVersion)(nil),
- (*Ikev2PluginGetVersionReply)(nil),
- (*Ikev2ProfileAddDel)(nil),
- (*Ikev2ProfileAddDelReply)(nil),
- (*Ikev2ProfileSetAuth)(nil),
- (*Ikev2ProfileSetAuthReply)(nil),
- (*Ikev2ProfileSetID)(nil),
- (*Ikev2ProfileSetIDReply)(nil),
- (*Ikev2ProfileSetTs)(nil),
- (*Ikev2ProfileSetTsReply)(nil),
- (*Ikev2SetEspTransforms)(nil),
- (*Ikev2SetEspTransformsReply)(nil),
- (*Ikev2SetIkeTransforms)(nil),
- (*Ikev2SetIkeTransformsReply)(nil),
- (*Ikev2SetLocalKey)(nil),
- (*Ikev2SetLocalKeyReply)(nil),
- (*Ikev2SetResponder)(nil),
- (*Ikev2SetResponderReply)(nil),
- (*Ikev2SetSaLifetime)(nil),
- (*Ikev2SetSaLifetimeReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/ikev2/ikev2_rpc.ba.go b/internal/testbinapi/binapi2001/ikev2/ikev2_rpc.ba.go
deleted file mode 100644
index 41c0e61..0000000
--- a/internal/testbinapi/binapi2001/ikev2/ikev2_rpc.ba.go
+++ /dev/null
@@ -1,161 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package ikev2
-
-import (
- "context"
-
- api "git.fd.io/govpp.git/api"
-)
-
-// RPCService defines RPC service ikev2.
-type RPCService interface {
- Ikev2InitiateDelChildSa(ctx context.Context, in *Ikev2InitiateDelChildSa) (*Ikev2InitiateDelChildSaReply, error)
- Ikev2InitiateDelIkeSa(ctx context.Context, in *Ikev2InitiateDelIkeSa) (*Ikev2InitiateDelIkeSaReply, error)
- Ikev2InitiateRekeyChildSa(ctx context.Context, in *Ikev2InitiateRekeyChildSa) (*Ikev2InitiateRekeyChildSaReply, error)
- Ikev2InitiateSaInit(ctx context.Context, in *Ikev2InitiateSaInit) (*Ikev2InitiateSaInitReply, error)
- Ikev2PluginGetVersion(ctx context.Context, in *Ikev2PluginGetVersion) (*Ikev2PluginGetVersionReply, error)
- Ikev2ProfileAddDel(ctx context.Context, in *Ikev2ProfileAddDel) (*Ikev2ProfileAddDelReply, error)
- Ikev2ProfileSetAuth(ctx context.Context, in *Ikev2ProfileSetAuth) (*Ikev2ProfileSetAuthReply, error)
- Ikev2ProfileSetID(ctx context.Context, in *Ikev2ProfileSetID) (*Ikev2ProfileSetIDReply, error)
- Ikev2ProfileSetTs(ctx context.Context, in *Ikev2ProfileSetTs) (*Ikev2ProfileSetTsReply, error)
- Ikev2SetEspTransforms(ctx context.Context, in *Ikev2SetEspTransforms) (*Ikev2SetEspTransformsReply, error)
- Ikev2SetIkeTransforms(ctx context.Context, in *Ikev2SetIkeTransforms) (*Ikev2SetIkeTransformsReply, error)
- Ikev2SetLocalKey(ctx context.Context, in *Ikev2SetLocalKey) (*Ikev2SetLocalKeyReply, error)
- Ikev2SetResponder(ctx context.Context, in *Ikev2SetResponder) (*Ikev2SetResponderReply, error)
- Ikev2SetSaLifetime(ctx context.Context, in *Ikev2SetSaLifetime) (*Ikev2SetSaLifetimeReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) Ikev2InitiateDelChildSa(ctx context.Context, in *Ikev2InitiateDelChildSa) (*Ikev2InitiateDelChildSaReply, error) {
- out := new(Ikev2InitiateDelChildSaReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) Ikev2InitiateDelIkeSa(ctx context.Context, in *Ikev2InitiateDelIkeSa) (*Ikev2InitiateDelIkeSaReply, error) {
- out := new(Ikev2InitiateDelIkeSaReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) Ikev2InitiateRekeyChildSa(ctx context.Context, in *Ikev2InitiateRekeyChildSa) (*Ikev2InitiateRekeyChildSaReply, error) {
- out := new(Ikev2InitiateRekeyChildSaReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) Ikev2InitiateSaInit(ctx context.Context, in *Ikev2InitiateSaInit) (*Ikev2InitiateSaInitReply, error) {
- out := new(Ikev2InitiateSaInitReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) Ikev2PluginGetVersion(ctx context.Context, in *Ikev2PluginGetVersion) (*Ikev2PluginGetVersionReply, error) {
- out := new(Ikev2PluginGetVersionReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) Ikev2ProfileAddDel(ctx context.Context, in *Ikev2ProfileAddDel) (*Ikev2ProfileAddDelReply, error) {
- out := new(Ikev2ProfileAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) Ikev2ProfileSetAuth(ctx context.Context, in *Ikev2ProfileSetAuth) (*Ikev2ProfileSetAuthReply, error) {
- out := new(Ikev2ProfileSetAuthReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) Ikev2ProfileSetID(ctx context.Context, in *Ikev2ProfileSetID) (*Ikev2ProfileSetIDReply, error) {
- out := new(Ikev2ProfileSetIDReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) Ikev2ProfileSetTs(ctx context.Context, in *Ikev2ProfileSetTs) (*Ikev2ProfileSetTsReply, error) {
- out := new(Ikev2ProfileSetTsReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) Ikev2SetEspTransforms(ctx context.Context, in *Ikev2SetEspTransforms) (*Ikev2SetEspTransformsReply, error) {
- out := new(Ikev2SetEspTransformsReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) Ikev2SetIkeTransforms(ctx context.Context, in *Ikev2SetIkeTransforms) (*Ikev2SetIkeTransformsReply, error) {
- out := new(Ikev2SetIkeTransformsReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) Ikev2SetLocalKey(ctx context.Context, in *Ikev2SetLocalKey) (*Ikev2SetLocalKeyReply, error) {
- out := new(Ikev2SetLocalKeyReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) Ikev2SetResponder(ctx context.Context, in *Ikev2SetResponder) (*Ikev2SetResponderReply, error) {
- out := new(Ikev2SetResponderReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) Ikev2SetSaLifetime(ctx context.Context, in *Ikev2SetSaLifetime) (*Ikev2SetSaLifetimeReply, error) {
- out := new(Ikev2SetSaLifetimeReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/interface/interface.ba.go b/internal/testbinapi/binapi2001/interface/interface.ba.go
deleted file mode 100644
index a28c261..0000000
--- a/internal/testbinapi/binapi2001/interface/interface.ba.go
+++ /dev/null
@@ -1,3118 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/interface.api.json
-
-// Package interfaces contains generated bindings for API file interface.api.
-//
-// Contents:
-// 7 aliases
-// 10 enums
-// 6 structs
-// 1 union
-// 53 messages
-//
-package interfaces
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "interface"
- APIVersion = "3.2.2"
- VersionCrc = 0xfebc3ffa
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// MacAddress defines alias 'mac_address'.
-type MacAddress [6]uint8
-
-func ParseMacAddress(s string) (MacAddress, error) {
- var macaddr MacAddress
- mac, err := net.ParseMAC(s)
- if err != nil {
- return macaddr, err
- }
- copy(macaddr[:], mac[:])
- return macaddr, nil
-}
-
-func (x MacAddress) ToMAC() net.HardwareAddr {
- return net.HardwareAddr(x[:])
-}
-
-func (x MacAddress) String() string {
- return x.ToMAC().String()
-}
-
-func (x *MacAddress) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *MacAddress) UnmarshalText(text []byte) error {
- mac, err := ParseMacAddress(string(text))
- if err != nil {
- return err
- }
- *x = mac
- return nil
-}
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
-
-// CollectDetailedInterfaceStats defines message 'collect_detailed_interface_stats'.
-type CollectDetailedInterfaceStats struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
-}
-
-func (m *CollectDetailedInterfaceStats) Reset() { *m = CollectDetailedInterfaceStats{} }
-func (*CollectDetailedInterfaceStats) GetMessageName() string {
- return "collect_detailed_interface_stats"
-}
-func (*CollectDetailedInterfaceStats) GetCrcString() string { return "5501adee" }
-func (*CollectDetailedInterfaceStats) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *CollectDetailedInterfaceStats) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.EnableDisable
- return size
-}
-func (m *CollectDetailedInterfaceStats) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeBool(m.EnableDisable)
- return buf.Bytes(), nil
-}
-func (m *CollectDetailedInterfaceStats) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.EnableDisable = buf.DecodeBool()
- return nil
-}
-
-// CollectDetailedInterfaceStatsReply defines message 'collect_detailed_interface_stats_reply'.
-type CollectDetailedInterfaceStatsReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *CollectDetailedInterfaceStatsReply) Reset() { *m = CollectDetailedInterfaceStatsReply{} }
-func (*CollectDetailedInterfaceStatsReply) GetMessageName() string {
- return "collect_detailed_interface_stats_reply"
-}
-func (*CollectDetailedInterfaceStatsReply) GetCrcString() string { return "e8d4e804" }
-func (*CollectDetailedInterfaceStatsReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *CollectDetailedInterfaceStatsReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *CollectDetailedInterfaceStatsReply) 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 *CollectDetailedInterfaceStatsReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// CreateLoopback defines message 'create_loopback'.
-type CreateLoopback struct {
- MacAddress MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
-}
-
-func (m *CreateLoopback) Reset() { *m = CreateLoopback{} }
-func (*CreateLoopback) GetMessageName() string { return "create_loopback" }
-func (*CreateLoopback) GetCrcString() string { return "42bb5d22" }
-func (*CreateLoopback) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *CreateLoopback) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 6 // m.MacAddress
- return size
-}
-func (m *CreateLoopback) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.MacAddress[:], 6)
- return buf.Bytes(), nil
-}
-func (m *CreateLoopback) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- copy(m.MacAddress[:], buf.DecodeBytes(6))
- return nil
-}
-
-// CreateLoopbackInstance defines message 'create_loopback_instance'.
-type CreateLoopbackInstance struct {
- MacAddress MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
- IsSpecified bool `binapi:"bool,name=is_specified" json:"is_specified,omitempty"`
- UserInstance uint32 `binapi:"u32,name=user_instance" json:"user_instance,omitempty"`
-}
-
-func (m *CreateLoopbackInstance) Reset() { *m = CreateLoopbackInstance{} }
-func (*CreateLoopbackInstance) GetMessageName() string { return "create_loopback_instance" }
-func (*CreateLoopbackInstance) GetCrcString() string { return "d36a3ee2" }
-func (*CreateLoopbackInstance) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *CreateLoopbackInstance) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 6 // m.MacAddress
- size += 1 // m.IsSpecified
- size += 4 // m.UserInstance
- return size
-}
-func (m *CreateLoopbackInstance) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.MacAddress[:], 6)
- buf.EncodeBool(m.IsSpecified)
- buf.EncodeUint32(m.UserInstance)
- return buf.Bytes(), nil
-}
-func (m *CreateLoopbackInstance) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- copy(m.MacAddress[:], buf.DecodeBytes(6))
- m.IsSpecified = buf.DecodeBool()
- m.UserInstance = buf.DecodeUint32()
- return nil
-}
-
-// CreateLoopbackInstanceReply defines message 'create_loopback_instance_reply'.
-type CreateLoopbackInstanceReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *CreateLoopbackInstanceReply) Reset() { *m = CreateLoopbackInstanceReply{} }
-func (*CreateLoopbackInstanceReply) GetMessageName() string { return "create_loopback_instance_reply" }
-func (*CreateLoopbackInstanceReply) GetCrcString() string { return "5383d31f" }
-func (*CreateLoopbackInstanceReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *CreateLoopbackInstanceReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *CreateLoopbackInstanceReply) 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 *CreateLoopbackInstanceReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// CreateLoopbackReply defines message 'create_loopback_reply'.
-type CreateLoopbackReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *CreateLoopbackReply) Reset() { *m = CreateLoopbackReply{} }
-func (*CreateLoopbackReply) GetMessageName() string { return "create_loopback_reply" }
-func (*CreateLoopbackReply) GetCrcString() string { return "5383d31f" }
-func (*CreateLoopbackReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *CreateLoopbackReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *CreateLoopbackReply) 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 *CreateLoopbackReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// CreateSubif defines message 'create_subif'.
-type CreateSubif struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- SubID uint32 `binapi:"u32,name=sub_id" json:"sub_id,omitempty"`
- SubIfFlags SubIfFlags `binapi:"sub_if_flags,name=sub_if_flags" json:"sub_if_flags,omitempty"`
- OuterVlanID uint16 `binapi:"u16,name=outer_vlan_id" json:"outer_vlan_id,omitempty"`
- InnerVlanID uint16 `binapi:"u16,name=inner_vlan_id" json:"inner_vlan_id,omitempty"`
-}
-
-func (m *CreateSubif) Reset() { *m = CreateSubif{} }
-func (*CreateSubif) GetMessageName() string { return "create_subif" }
-func (*CreateSubif) GetCrcString() string { return "cb371063" }
-func (*CreateSubif) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *CreateSubif) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.SubID
- size += 4 // m.SubIfFlags
- size += 2 // m.OuterVlanID
- size += 2 // m.InnerVlanID
- return size
-}
-func (m *CreateSubif) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(m.SubID)
- buf.EncodeUint32(uint32(m.SubIfFlags))
- buf.EncodeUint16(m.OuterVlanID)
- buf.EncodeUint16(m.InnerVlanID)
- return buf.Bytes(), nil
-}
-func (m *CreateSubif) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.SubID = buf.DecodeUint32()
- m.SubIfFlags = SubIfFlags(buf.DecodeUint32())
- m.OuterVlanID = buf.DecodeUint16()
- m.InnerVlanID = buf.DecodeUint16()
- return nil
-}
-
-// CreateSubifReply defines message 'create_subif_reply'.
-type CreateSubifReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *CreateSubifReply) Reset() { *m = CreateSubifReply{} }
-func (*CreateSubifReply) GetMessageName() string { return "create_subif_reply" }
-func (*CreateSubifReply) GetCrcString() string { return "5383d31f" }
-func (*CreateSubifReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *CreateSubifReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *CreateSubifReply) 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 *CreateSubifReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// CreateVlanSubif defines message 'create_vlan_subif'.
-type CreateVlanSubif struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- VlanID uint32 `binapi:"u32,name=vlan_id" json:"vlan_id,omitempty"`
-}
-
-func (m *CreateVlanSubif) Reset() { *m = CreateVlanSubif{} }
-func (*CreateVlanSubif) GetMessageName() string { return "create_vlan_subif" }
-func (*CreateVlanSubif) GetCrcString() string { return "af34ac8b" }
-func (*CreateVlanSubif) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *CreateVlanSubif) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.VlanID
- return size
-}
-func (m *CreateVlanSubif) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(m.VlanID)
- return buf.Bytes(), nil
-}
-func (m *CreateVlanSubif) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.VlanID = buf.DecodeUint32()
- return nil
-}
-
-// CreateVlanSubifReply defines message 'create_vlan_subif_reply'.
-type CreateVlanSubifReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *CreateVlanSubifReply) Reset() { *m = CreateVlanSubifReply{} }
-func (*CreateVlanSubifReply) GetMessageName() string { return "create_vlan_subif_reply" }
-func (*CreateVlanSubifReply) GetCrcString() string { return "5383d31f" }
-func (*CreateVlanSubifReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *CreateVlanSubifReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *CreateVlanSubifReply) 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 *CreateVlanSubifReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// DeleteLoopback defines message 'delete_loopback'.
-type DeleteLoopback struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *DeleteLoopback) Reset() { *m = DeleteLoopback{} }
-func (*DeleteLoopback) GetMessageName() string { return "delete_loopback" }
-func (*DeleteLoopback) GetCrcString() string { return "f9e6675e" }
-func (*DeleteLoopback) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *DeleteLoopback) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *DeleteLoopback) 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 *DeleteLoopback) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// DeleteLoopbackReply defines message 'delete_loopback_reply'.
-type DeleteLoopbackReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *DeleteLoopbackReply) Reset() { *m = DeleteLoopbackReply{} }
-func (*DeleteLoopbackReply) GetMessageName() string { return "delete_loopback_reply" }
-func (*DeleteLoopbackReply) GetCrcString() string { return "e8d4e804" }
-func (*DeleteLoopbackReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *DeleteLoopbackReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *DeleteLoopbackReply) 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 *DeleteLoopbackReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// DeleteSubif defines message 'delete_subif'.
-type DeleteSubif struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *DeleteSubif) Reset() { *m = DeleteSubif{} }
-func (*DeleteSubif) GetMessageName() string { return "delete_subif" }
-func (*DeleteSubif) GetCrcString() string { return "f9e6675e" }
-func (*DeleteSubif) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *DeleteSubif) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *DeleteSubif) 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 *DeleteSubif) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// DeleteSubifReply defines message 'delete_subif_reply'.
-type DeleteSubifReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *DeleteSubifReply) Reset() { *m = DeleteSubifReply{} }
-func (*DeleteSubifReply) GetMessageName() string { return "delete_subif_reply" }
-func (*DeleteSubifReply) GetCrcString() string { return "e8d4e804" }
-func (*DeleteSubifReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *DeleteSubifReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *DeleteSubifReply) 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 *DeleteSubifReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// HwInterfaceSetMtu defines message 'hw_interface_set_mtu'.
-type HwInterfaceSetMtu struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Mtu uint16 `binapi:"u16,name=mtu" json:"mtu,omitempty"`
-}
-
-func (m *HwInterfaceSetMtu) Reset() { *m = HwInterfaceSetMtu{} }
-func (*HwInterfaceSetMtu) GetMessageName() string { return "hw_interface_set_mtu" }
-func (*HwInterfaceSetMtu) GetCrcString() string { return "e6746899" }
-func (*HwInterfaceSetMtu) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *HwInterfaceSetMtu) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 2 // m.Mtu
- return size
-}
-func (m *HwInterfaceSetMtu) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint16(m.Mtu)
- return buf.Bytes(), nil
-}
-func (m *HwInterfaceSetMtu) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Mtu = buf.DecodeUint16()
- return nil
-}
-
-// HwInterfaceSetMtuReply defines message 'hw_interface_set_mtu_reply'.
-type HwInterfaceSetMtuReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *HwInterfaceSetMtuReply) Reset() { *m = HwInterfaceSetMtuReply{} }
-func (*HwInterfaceSetMtuReply) GetMessageName() string { return "hw_interface_set_mtu_reply" }
-func (*HwInterfaceSetMtuReply) GetCrcString() string { return "e8d4e804" }
-func (*HwInterfaceSetMtuReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *HwInterfaceSetMtuReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *HwInterfaceSetMtuReply) 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 *HwInterfaceSetMtuReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// InterfaceNameRenumber defines message 'interface_name_renumber'.
-type InterfaceNameRenumber struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- NewShowDevInstance uint32 `binapi:"u32,name=new_show_dev_instance" json:"new_show_dev_instance,omitempty"`
-}
-
-func (m *InterfaceNameRenumber) Reset() { *m = InterfaceNameRenumber{} }
-func (*InterfaceNameRenumber) GetMessageName() string { return "interface_name_renumber" }
-func (*InterfaceNameRenumber) GetCrcString() string { return "2b8858b8" }
-func (*InterfaceNameRenumber) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *InterfaceNameRenumber) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.NewShowDevInstance
- return size
-}
-func (m *InterfaceNameRenumber) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(m.NewShowDevInstance)
- return buf.Bytes(), nil
-}
-func (m *InterfaceNameRenumber) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.NewShowDevInstance = buf.DecodeUint32()
- return nil
-}
-
-// InterfaceNameRenumberReply defines message 'interface_name_renumber_reply'.
-type InterfaceNameRenumberReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *InterfaceNameRenumberReply) Reset() { *m = InterfaceNameRenumberReply{} }
-func (*InterfaceNameRenumberReply) GetMessageName() string { return "interface_name_renumber_reply" }
-func (*InterfaceNameRenumberReply) GetCrcString() string { return "e8d4e804" }
-func (*InterfaceNameRenumberReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *InterfaceNameRenumberReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *InterfaceNameRenumberReply) 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 *InterfaceNameRenumberReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SwInterfaceAddDelAddress defines message 'sw_interface_add_del_address'.
-type SwInterfaceAddDelAddress struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- DelAll bool `binapi:"bool,name=del_all" json:"del_all,omitempty"`
- Prefix AddressWithPrefix `binapi:"address_with_prefix,name=prefix" json:"prefix,omitempty"`
-}
-
-func (m *SwInterfaceAddDelAddress) Reset() { *m = SwInterfaceAddDelAddress{} }
-func (*SwInterfaceAddDelAddress) GetMessageName() string { return "sw_interface_add_del_address" }
-func (*SwInterfaceAddDelAddress) GetCrcString() string { return "5803d5c4" }
-func (*SwInterfaceAddDelAddress) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceAddDelAddress) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.IsAdd
- size += 1 // m.DelAll
- size += 4 // m.Prefix.Address.Af
- size += 1 * 16 // m.Prefix.Address.Un
- size += 1 // m.Prefix.Len
- return size
-}
-func (m *SwInterfaceAddDelAddress) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeBool(m.IsAdd)
- buf.EncodeBool(m.DelAll)
- buf.EncodeUint32(uint32(m.Prefix.Address.Af))
- buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
- buf.EncodeUint8(m.Prefix.Len)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceAddDelAddress) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.IsAdd = buf.DecodeBool()
- m.DelAll = buf.DecodeBool()
- m.Prefix.Address.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Prefix.Len = buf.DecodeUint8()
- return nil
-}
-
-// SwInterfaceAddDelAddressReply defines message 'sw_interface_add_del_address_reply'.
-type SwInterfaceAddDelAddressReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SwInterfaceAddDelAddressReply) Reset() { *m = SwInterfaceAddDelAddressReply{} }
-func (*SwInterfaceAddDelAddressReply) GetMessageName() string {
- return "sw_interface_add_del_address_reply"
-}
-func (*SwInterfaceAddDelAddressReply) GetCrcString() string { return "e8d4e804" }
-func (*SwInterfaceAddDelAddressReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SwInterfaceAddDelAddressReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SwInterfaceAddDelAddressReply) 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 *SwInterfaceAddDelAddressReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SwInterfaceAddDelMacAddress defines message 'sw_interface_add_del_mac_address'.
-type SwInterfaceAddDelMacAddress struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- Addr MacAddress `binapi:"mac_address,name=addr" json:"addr,omitempty"`
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
-}
-
-func (m *SwInterfaceAddDelMacAddress) Reset() { *m = SwInterfaceAddDelMacAddress{} }
-func (*SwInterfaceAddDelMacAddress) GetMessageName() string {
- return "sw_interface_add_del_mac_address"
-}
-func (*SwInterfaceAddDelMacAddress) GetCrcString() string { return "638bb9f4" }
-func (*SwInterfaceAddDelMacAddress) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceAddDelMacAddress) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 * 6 // m.Addr
- size += 1 // m.IsAdd
- return size
-}
-func (m *SwInterfaceAddDelMacAddress) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.SwIfIndex)
- buf.EncodeBytes(m.Addr[:], 6)
- buf.EncodeUint8(m.IsAdd)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceAddDelMacAddress) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = buf.DecodeUint32()
- copy(m.Addr[:], buf.DecodeBytes(6))
- m.IsAdd = buf.DecodeUint8()
- return nil
-}
-
-// SwInterfaceAddDelMacAddressReply defines message 'sw_interface_add_del_mac_address_reply'.
-type SwInterfaceAddDelMacAddressReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SwInterfaceAddDelMacAddressReply) Reset() { *m = SwInterfaceAddDelMacAddressReply{} }
-func (*SwInterfaceAddDelMacAddressReply) GetMessageName() string {
- return "sw_interface_add_del_mac_address_reply"
-}
-func (*SwInterfaceAddDelMacAddressReply) GetCrcString() string { return "e8d4e804" }
-func (*SwInterfaceAddDelMacAddressReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SwInterfaceAddDelMacAddressReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SwInterfaceAddDelMacAddressReply) 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 *SwInterfaceAddDelMacAddressReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SwInterfaceClearStats defines message 'sw_interface_clear_stats'.
-type SwInterfaceClearStats struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *SwInterfaceClearStats) Reset() { *m = SwInterfaceClearStats{} }
-func (*SwInterfaceClearStats) GetMessageName() string { return "sw_interface_clear_stats" }
-func (*SwInterfaceClearStats) GetCrcString() string { return "f9e6675e" }
-func (*SwInterfaceClearStats) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceClearStats) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *SwInterfaceClearStats) 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 *SwInterfaceClearStats) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// SwInterfaceClearStatsReply defines message 'sw_interface_clear_stats_reply'.
-type SwInterfaceClearStatsReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SwInterfaceClearStatsReply) Reset() { *m = SwInterfaceClearStatsReply{} }
-func (*SwInterfaceClearStatsReply) GetMessageName() string { return "sw_interface_clear_stats_reply" }
-func (*SwInterfaceClearStatsReply) GetCrcString() string { return "e8d4e804" }
-func (*SwInterfaceClearStatsReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SwInterfaceClearStatsReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SwInterfaceClearStatsReply) 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 *SwInterfaceClearStatsReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SwInterfaceDetails defines message 'sw_interface_details'.
-type SwInterfaceDetails struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- SupSwIfIndex uint32 `binapi:"u32,name=sup_sw_if_index" json:"sup_sw_if_index,omitempty"`
- L2Address MacAddress `binapi:"mac_address,name=l2_address" json:"l2_address,omitempty"`
- Flags IfStatusFlags `binapi:"if_status_flags,name=flags" json:"flags,omitempty"`
- Type IfType `binapi:"if_type,name=type" json:"type,omitempty"`
- LinkDuplex LinkDuplex `binapi:"link_duplex,name=link_duplex" json:"link_duplex,omitempty"`
- LinkSpeed uint32 `binapi:"u32,name=link_speed" json:"link_speed,omitempty"`
- LinkMtu uint16 `binapi:"u16,name=link_mtu" json:"link_mtu,omitempty"`
- Mtu []uint32 `binapi:"u32[4],name=mtu" json:"mtu,omitempty"`
- SubID uint32 `binapi:"u32,name=sub_id" json:"sub_id,omitempty"`
- SubNumberOfTags uint8 `binapi:"u8,name=sub_number_of_tags" json:"sub_number_of_tags,omitempty"`
- SubOuterVlanID uint16 `binapi:"u16,name=sub_outer_vlan_id" json:"sub_outer_vlan_id,omitempty"`
- SubInnerVlanID uint16 `binapi:"u16,name=sub_inner_vlan_id" json:"sub_inner_vlan_id,omitempty"`
- SubIfFlags SubIfFlags `binapi:"sub_if_flags,name=sub_if_flags" json:"sub_if_flags,omitempty"`
- VtrOp uint32 `binapi:"u32,name=vtr_op" json:"vtr_op,omitempty"`
- VtrPushDot1q uint32 `binapi:"u32,name=vtr_push_dot1q" json:"vtr_push_dot1q,omitempty"`
- VtrTag1 uint32 `binapi:"u32,name=vtr_tag1" json:"vtr_tag1,omitempty"`
- VtrTag2 uint32 `binapi:"u32,name=vtr_tag2" json:"vtr_tag2,omitempty"`
- OuterTag uint16 `binapi:"u16,name=outer_tag" json:"outer_tag,omitempty"`
- BDmac MacAddress `binapi:"mac_address,name=b_dmac" json:"b_dmac,omitempty"`
- BSmac MacAddress `binapi:"mac_address,name=b_smac" json:"b_smac,omitempty"`
- BVlanid uint16 `binapi:"u16,name=b_vlanid" json:"b_vlanid,omitempty"`
- ISid uint32 `binapi:"u32,name=i_sid" json:"i_sid,omitempty"`
- InterfaceName string `binapi:"string[64],name=interface_name" json:"interface_name,omitempty"`
- InterfaceDevType string `binapi:"string[64],name=interface_dev_type" json:"interface_dev_type,omitempty"`
- Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"`
-}
-
-func (m *SwInterfaceDetails) Reset() { *m = SwInterfaceDetails{} }
-func (*SwInterfaceDetails) GetMessageName() string { return "sw_interface_details" }
-func (*SwInterfaceDetails) GetCrcString() string { return "17b69fa2" }
-func (*SwInterfaceDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SwInterfaceDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.SupSwIfIndex
- size += 1 * 6 // m.L2Address
- size += 4 // m.Flags
- size += 4 // m.Type
- size += 4 // m.LinkDuplex
- size += 4 // m.LinkSpeed
- size += 2 // m.LinkMtu
- size += 4 * 4 // m.Mtu
- size += 4 // m.SubID
- size += 1 // m.SubNumberOfTags
- size += 2 // m.SubOuterVlanID
- size += 2 // m.SubInnerVlanID
- size += 4 // m.SubIfFlags
- size += 4 // m.VtrOp
- size += 4 // m.VtrPushDot1q
- size += 4 // m.VtrTag1
- size += 4 // m.VtrTag2
- size += 2 // m.OuterTag
- size += 1 * 6 // m.BDmac
- size += 1 * 6 // m.BSmac
- size += 2 // m.BVlanid
- size += 4 // m.ISid
- size += 64 // m.InterfaceName
- size += 64 // m.InterfaceDevType
- size += 64 // m.Tag
- return size
-}
-func (m *SwInterfaceDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(m.SupSwIfIndex)
- buf.EncodeBytes(m.L2Address[:], 6)
- buf.EncodeUint32(uint32(m.Flags))
- buf.EncodeUint32(uint32(m.Type))
- buf.EncodeUint32(uint32(m.LinkDuplex))
- buf.EncodeUint32(m.LinkSpeed)
- buf.EncodeUint16(m.LinkMtu)
- for i := 0; i < 4; i++ {
- var x uint32
- if i < len(m.Mtu) {
- x = uint32(m.Mtu[i])
- }
- buf.EncodeUint32(x)
- }
- buf.EncodeUint32(m.SubID)
- buf.EncodeUint8(m.SubNumberOfTags)
- buf.EncodeUint16(m.SubOuterVlanID)
- buf.EncodeUint16(m.SubInnerVlanID)
- buf.EncodeUint32(uint32(m.SubIfFlags))
- buf.EncodeUint32(m.VtrOp)
- buf.EncodeUint32(m.VtrPushDot1q)
- buf.EncodeUint32(m.VtrTag1)
- buf.EncodeUint32(m.VtrTag2)
- buf.EncodeUint16(m.OuterTag)
- buf.EncodeBytes(m.BDmac[:], 6)
- buf.EncodeBytes(m.BSmac[:], 6)
- buf.EncodeUint16(m.BVlanid)
- buf.EncodeUint32(m.ISid)
- buf.EncodeString(m.InterfaceName, 64)
- buf.EncodeString(m.InterfaceDevType, 64)
- buf.EncodeString(m.Tag, 64)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.SupSwIfIndex = buf.DecodeUint32()
- copy(m.L2Address[:], buf.DecodeBytes(6))
- m.Flags = IfStatusFlags(buf.DecodeUint32())
- m.Type = IfType(buf.DecodeUint32())
- m.LinkDuplex = LinkDuplex(buf.DecodeUint32())
- m.LinkSpeed = buf.DecodeUint32()
- m.LinkMtu = buf.DecodeUint16()
- m.Mtu = make([]uint32, 4)
- for i := 0; i < len(m.Mtu); i++ {
- m.Mtu[i] = buf.DecodeUint32()
- }
- m.SubID = buf.DecodeUint32()
- m.SubNumberOfTags = buf.DecodeUint8()
- m.SubOuterVlanID = buf.DecodeUint16()
- m.SubInnerVlanID = buf.DecodeUint16()
- m.SubIfFlags = SubIfFlags(buf.DecodeUint32())
- m.VtrOp = buf.DecodeUint32()
- m.VtrPushDot1q = buf.DecodeUint32()
- m.VtrTag1 = buf.DecodeUint32()
- m.VtrTag2 = buf.DecodeUint32()
- m.OuterTag = buf.DecodeUint16()
- copy(m.BDmac[:], buf.DecodeBytes(6))
- copy(m.BSmac[:], buf.DecodeBytes(6))
- m.BVlanid = buf.DecodeUint16()
- m.ISid = buf.DecodeUint32()
- m.InterfaceName = buf.DecodeString(64)
- m.InterfaceDevType = buf.DecodeString(64)
- m.Tag = buf.DecodeString(64)
- return nil
-}
-
-// SwInterfaceDump defines message 'sw_interface_dump'.
-type SwInterfaceDump struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
- NameFilterValid bool `binapi:"bool,name=name_filter_valid" json:"name_filter_valid,omitempty"`
- NameFilter string `binapi:"string[],name=name_filter" json:"name_filter,omitempty"`
-}
-
-func (m *SwInterfaceDump) Reset() { *m = SwInterfaceDump{} }
-func (*SwInterfaceDump) GetMessageName() string { return "sw_interface_dump" }
-func (*SwInterfaceDump) GetCrcString() string { return "aa610c27" }
-func (*SwInterfaceDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.NameFilterValid
- size += 4 + len(m.NameFilter) // m.NameFilter
- return size
-}
-func (m *SwInterfaceDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeBool(m.NameFilterValid)
- buf.EncodeString(m.NameFilter, 0)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.NameFilterValid = buf.DecodeBool()
- m.NameFilter = buf.DecodeString(0)
- return nil
-}
-
-// SwInterfaceEvent defines message 'sw_interface_event'.
-type SwInterfaceEvent struct {
- PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Flags IfStatusFlags `binapi:"if_status_flags,name=flags" json:"flags,omitempty"`
- Deleted bool `binapi:"bool,name=deleted" json:"deleted,omitempty"`
-}
-
-func (m *SwInterfaceEvent) Reset() { *m = SwInterfaceEvent{} }
-func (*SwInterfaceEvent) GetMessageName() string { return "sw_interface_event" }
-func (*SwInterfaceEvent) GetCrcString() string { return "f709f78d" }
-func (*SwInterfaceEvent) GetMessageType() api.MessageType {
- return api.EventMessage
-}
-
-func (m *SwInterfaceEvent) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.PID
- size += 4 // m.SwIfIndex
- size += 4 // m.Flags
- size += 1 // m.Deleted
- return size
-}
-func (m *SwInterfaceEvent) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.PID)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(uint32(m.Flags))
- buf.EncodeBool(m.Deleted)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceEvent) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.PID = buf.DecodeUint32()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Flags = IfStatusFlags(buf.DecodeUint32())
- m.Deleted = buf.DecodeBool()
- return nil
-}
-
-// SwInterfaceGetMacAddress defines message 'sw_interface_get_mac_address'.
-type SwInterfaceGetMacAddress struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *SwInterfaceGetMacAddress) Reset() { *m = SwInterfaceGetMacAddress{} }
-func (*SwInterfaceGetMacAddress) GetMessageName() string { return "sw_interface_get_mac_address" }
-func (*SwInterfaceGetMacAddress) GetCrcString() string { return "f9e6675e" }
-func (*SwInterfaceGetMacAddress) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceGetMacAddress) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *SwInterfaceGetMacAddress) 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 *SwInterfaceGetMacAddress) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// SwInterfaceGetMacAddressReply defines message 'sw_interface_get_mac_address_reply'.
-type SwInterfaceGetMacAddressReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- MacAddress MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
-}
-
-func (m *SwInterfaceGetMacAddressReply) Reset() { *m = SwInterfaceGetMacAddressReply{} }
-func (*SwInterfaceGetMacAddressReply) GetMessageName() string {
- return "sw_interface_get_mac_address_reply"
-}
-func (*SwInterfaceGetMacAddressReply) GetCrcString() string { return "40ef2c08" }
-func (*SwInterfaceGetMacAddressReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SwInterfaceGetMacAddressReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 1 * 6 // m.MacAddress
- return size
-}
-func (m *SwInterfaceGetMacAddressReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeBytes(m.MacAddress[:], 6)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceGetMacAddressReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- copy(m.MacAddress[:], buf.DecodeBytes(6))
- return nil
-}
-
-// SwInterfaceGetTable defines message 'sw_interface_get_table'.
-type SwInterfaceGetTable struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
-}
-
-func (m *SwInterfaceGetTable) Reset() { *m = SwInterfaceGetTable{} }
-func (*SwInterfaceGetTable) GetMessageName() string { return "sw_interface_get_table" }
-func (*SwInterfaceGetTable) GetCrcString() string { return "2d033de4" }
-func (*SwInterfaceGetTable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceGetTable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.IsIPv6
- return size
-}
-func (m *SwInterfaceGetTable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeBool(m.IsIPv6)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceGetTable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.IsIPv6 = buf.DecodeBool()
- return nil
-}
-
-// SwInterfaceGetTableReply defines message 'sw_interface_get_table_reply'.
-type SwInterfaceGetTableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
-}
-
-func (m *SwInterfaceGetTableReply) Reset() { *m = SwInterfaceGetTableReply{} }
-func (*SwInterfaceGetTableReply) GetMessageName() string { return "sw_interface_get_table_reply" }
-func (*SwInterfaceGetTableReply) GetCrcString() string { return "a6eb0109" }
-func (*SwInterfaceGetTableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SwInterfaceGetTableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.VrfID
- return size
-}
-func (m *SwInterfaceGetTableReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.VrfID)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceGetTableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.VrfID = buf.DecodeUint32()
- return nil
-}
-
-// SwInterfaceRxPlacementDetails defines message 'sw_interface_rx_placement_details'.
-type SwInterfaceRxPlacementDetails struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- QueueID uint32 `binapi:"u32,name=queue_id" json:"queue_id,omitempty"`
- WorkerID uint32 `binapi:"u32,name=worker_id" json:"worker_id,omitempty"`
- Mode RxMode `binapi:"rx_mode,name=mode" json:"mode,omitempty"`
-}
-
-func (m *SwInterfaceRxPlacementDetails) Reset() { *m = SwInterfaceRxPlacementDetails{} }
-func (*SwInterfaceRxPlacementDetails) GetMessageName() string {
- return "sw_interface_rx_placement_details"
-}
-func (*SwInterfaceRxPlacementDetails) GetCrcString() string { return "f6d7d024" }
-func (*SwInterfaceRxPlacementDetails) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceRxPlacementDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.QueueID
- size += 4 // m.WorkerID
- size += 4 // m.Mode
- return size
-}
-func (m *SwInterfaceRxPlacementDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(m.QueueID)
- buf.EncodeUint32(m.WorkerID)
- buf.EncodeUint32(uint32(m.Mode))
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceRxPlacementDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.QueueID = buf.DecodeUint32()
- m.WorkerID = buf.DecodeUint32()
- m.Mode = RxMode(buf.DecodeUint32())
- return nil
-}
-
-// SwInterfaceRxPlacementDump defines message 'sw_interface_rx_placement_dump'.
-type SwInterfaceRxPlacementDump struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *SwInterfaceRxPlacementDump) Reset() { *m = SwInterfaceRxPlacementDump{} }
-func (*SwInterfaceRxPlacementDump) GetMessageName() string { return "sw_interface_rx_placement_dump" }
-func (*SwInterfaceRxPlacementDump) GetCrcString() string { return "f9e6675e" }
-func (*SwInterfaceRxPlacementDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceRxPlacementDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *SwInterfaceRxPlacementDump) 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 *SwInterfaceRxPlacementDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// SwInterfaceSetFlags defines message 'sw_interface_set_flags'.
-type SwInterfaceSetFlags struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Flags IfStatusFlags `binapi:"if_status_flags,name=flags" json:"flags,omitempty"`
-}
-
-func (m *SwInterfaceSetFlags) Reset() { *m = SwInterfaceSetFlags{} }
-func (*SwInterfaceSetFlags) GetMessageName() string { return "sw_interface_set_flags" }
-func (*SwInterfaceSetFlags) GetCrcString() string { return "6a2b491a" }
-func (*SwInterfaceSetFlags) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceSetFlags) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.Flags
- return size
-}
-func (m *SwInterfaceSetFlags) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(uint32(m.Flags))
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceSetFlags) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Flags = IfStatusFlags(buf.DecodeUint32())
- return nil
-}
-
-// SwInterfaceSetFlagsReply defines message 'sw_interface_set_flags_reply'.
-type SwInterfaceSetFlagsReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SwInterfaceSetFlagsReply) Reset() { *m = SwInterfaceSetFlagsReply{} }
-func (*SwInterfaceSetFlagsReply) GetMessageName() string { return "sw_interface_set_flags_reply" }
-func (*SwInterfaceSetFlagsReply) GetCrcString() string { return "e8d4e804" }
-func (*SwInterfaceSetFlagsReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SwInterfaceSetFlagsReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SwInterfaceSetFlagsReply) 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 *SwInterfaceSetFlagsReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SwInterfaceSetIPDirectedBroadcast defines message 'sw_interface_set_ip_directed_broadcast'.
-type SwInterfaceSetIPDirectedBroadcast struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
-}
-
-func (m *SwInterfaceSetIPDirectedBroadcast) Reset() { *m = SwInterfaceSetIPDirectedBroadcast{} }
-func (*SwInterfaceSetIPDirectedBroadcast) GetMessageName() string {
- return "sw_interface_set_ip_directed_broadcast"
-}
-func (*SwInterfaceSetIPDirectedBroadcast) GetCrcString() string { return "ae6cfcfb" }
-func (*SwInterfaceSetIPDirectedBroadcast) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceSetIPDirectedBroadcast) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.Enable
- return size
-}
-func (m *SwInterfaceSetIPDirectedBroadcast) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeBool(m.Enable)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceSetIPDirectedBroadcast) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Enable = buf.DecodeBool()
- return nil
-}
-
-// SwInterfaceSetIPDirectedBroadcastReply defines message 'sw_interface_set_ip_directed_broadcast_reply'.
-type SwInterfaceSetIPDirectedBroadcastReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SwInterfaceSetIPDirectedBroadcastReply) Reset() {
- *m = SwInterfaceSetIPDirectedBroadcastReply{}
-}
-func (*SwInterfaceSetIPDirectedBroadcastReply) GetMessageName() string {
- return "sw_interface_set_ip_directed_broadcast_reply"
-}
-func (*SwInterfaceSetIPDirectedBroadcastReply) GetCrcString() string { return "e8d4e804" }
-func (*SwInterfaceSetIPDirectedBroadcastReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SwInterfaceSetIPDirectedBroadcastReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SwInterfaceSetIPDirectedBroadcastReply) 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 *SwInterfaceSetIPDirectedBroadcastReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SwInterfaceSetMacAddress defines message 'sw_interface_set_mac_address'.
-type SwInterfaceSetMacAddress struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- MacAddress MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
-}
-
-func (m *SwInterfaceSetMacAddress) Reset() { *m = SwInterfaceSetMacAddress{} }
-func (*SwInterfaceSetMacAddress) GetMessageName() string { return "sw_interface_set_mac_address" }
-func (*SwInterfaceSetMacAddress) GetCrcString() string { return "6aca746a" }
-func (*SwInterfaceSetMacAddress) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceSetMacAddress) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 * 6 // m.MacAddress
- return size
-}
-func (m *SwInterfaceSetMacAddress) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeBytes(m.MacAddress[:], 6)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceSetMacAddress) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- copy(m.MacAddress[:], buf.DecodeBytes(6))
- return nil
-}
-
-// SwInterfaceSetMacAddressReply defines message 'sw_interface_set_mac_address_reply'.
-type SwInterfaceSetMacAddressReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SwInterfaceSetMacAddressReply) Reset() { *m = SwInterfaceSetMacAddressReply{} }
-func (*SwInterfaceSetMacAddressReply) GetMessageName() string {
- return "sw_interface_set_mac_address_reply"
-}
-func (*SwInterfaceSetMacAddressReply) GetCrcString() string { return "e8d4e804" }
-func (*SwInterfaceSetMacAddressReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SwInterfaceSetMacAddressReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SwInterfaceSetMacAddressReply) 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 *SwInterfaceSetMacAddressReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SwInterfaceSetMtu defines message 'sw_interface_set_mtu'.
-type SwInterfaceSetMtu struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Mtu []uint32 `binapi:"u32[4],name=mtu" json:"mtu,omitempty"`
-}
-
-func (m *SwInterfaceSetMtu) Reset() { *m = SwInterfaceSetMtu{} }
-func (*SwInterfaceSetMtu) GetMessageName() string { return "sw_interface_set_mtu" }
-func (*SwInterfaceSetMtu) GetCrcString() string { return "5cbe85e5" }
-func (*SwInterfaceSetMtu) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceSetMtu) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 * 4 // m.Mtu
- return size
-}
-func (m *SwInterfaceSetMtu) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- for i := 0; i < 4; i++ {
- var x uint32
- if i < len(m.Mtu) {
- x = uint32(m.Mtu[i])
- }
- buf.EncodeUint32(x)
- }
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceSetMtu) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Mtu = make([]uint32, 4)
- for i := 0; i < len(m.Mtu); i++ {
- m.Mtu[i] = buf.DecodeUint32()
- }
- return nil
-}
-
-// SwInterfaceSetMtuReply defines message 'sw_interface_set_mtu_reply'.
-type SwInterfaceSetMtuReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SwInterfaceSetMtuReply) Reset() { *m = SwInterfaceSetMtuReply{} }
-func (*SwInterfaceSetMtuReply) GetMessageName() string { return "sw_interface_set_mtu_reply" }
-func (*SwInterfaceSetMtuReply) GetCrcString() string { return "e8d4e804" }
-func (*SwInterfaceSetMtuReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SwInterfaceSetMtuReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SwInterfaceSetMtuReply) 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 *SwInterfaceSetMtuReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SwInterfaceSetRxMode defines message 'sw_interface_set_rx_mode'.
-type SwInterfaceSetRxMode struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- QueueIDValid bool `binapi:"bool,name=queue_id_valid" json:"queue_id_valid,omitempty"`
- QueueID uint32 `binapi:"u32,name=queue_id" json:"queue_id,omitempty"`
- Mode RxMode `binapi:"rx_mode,name=mode" json:"mode,omitempty"`
-}
-
-func (m *SwInterfaceSetRxMode) Reset() { *m = SwInterfaceSetRxMode{} }
-func (*SwInterfaceSetRxMode) GetMessageName() string { return "sw_interface_set_rx_mode" }
-func (*SwInterfaceSetRxMode) GetCrcString() string { return "780f5cee" }
-func (*SwInterfaceSetRxMode) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceSetRxMode) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.QueueIDValid
- size += 4 // m.QueueID
- size += 4 // m.Mode
- return size
-}
-func (m *SwInterfaceSetRxMode) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeBool(m.QueueIDValid)
- buf.EncodeUint32(m.QueueID)
- buf.EncodeUint32(uint32(m.Mode))
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceSetRxMode) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.QueueIDValid = buf.DecodeBool()
- m.QueueID = buf.DecodeUint32()
- m.Mode = RxMode(buf.DecodeUint32())
- return nil
-}
-
-// SwInterfaceSetRxModeReply defines message 'sw_interface_set_rx_mode_reply'.
-type SwInterfaceSetRxModeReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SwInterfaceSetRxModeReply) Reset() { *m = SwInterfaceSetRxModeReply{} }
-func (*SwInterfaceSetRxModeReply) GetMessageName() string { return "sw_interface_set_rx_mode_reply" }
-func (*SwInterfaceSetRxModeReply) GetCrcString() string { return "e8d4e804" }
-func (*SwInterfaceSetRxModeReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SwInterfaceSetRxModeReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SwInterfaceSetRxModeReply) 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 *SwInterfaceSetRxModeReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SwInterfaceSetRxPlacement defines message 'sw_interface_set_rx_placement'.
-type SwInterfaceSetRxPlacement struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- QueueID uint32 `binapi:"u32,name=queue_id" json:"queue_id,omitempty"`
- WorkerID uint32 `binapi:"u32,name=worker_id" json:"worker_id,omitempty"`
- IsMain bool `binapi:"bool,name=is_main" json:"is_main,omitempty"`
-}
-
-func (m *SwInterfaceSetRxPlacement) Reset() { *m = SwInterfaceSetRxPlacement{} }
-func (*SwInterfaceSetRxPlacement) GetMessageName() string { return "sw_interface_set_rx_placement" }
-func (*SwInterfaceSetRxPlacement) GetCrcString() string { return "db65f3c9" }
-func (*SwInterfaceSetRxPlacement) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceSetRxPlacement) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.QueueID
- size += 4 // m.WorkerID
- size += 1 // m.IsMain
- return size
-}
-func (m *SwInterfaceSetRxPlacement) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(m.QueueID)
- buf.EncodeUint32(m.WorkerID)
- buf.EncodeBool(m.IsMain)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceSetRxPlacement) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.QueueID = buf.DecodeUint32()
- m.WorkerID = buf.DecodeUint32()
- m.IsMain = buf.DecodeBool()
- return nil
-}
-
-// SwInterfaceSetRxPlacementReply defines message 'sw_interface_set_rx_placement_reply'.
-type SwInterfaceSetRxPlacementReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SwInterfaceSetRxPlacementReply) Reset() { *m = SwInterfaceSetRxPlacementReply{} }
-func (*SwInterfaceSetRxPlacementReply) GetMessageName() string {
- return "sw_interface_set_rx_placement_reply"
-}
-func (*SwInterfaceSetRxPlacementReply) GetCrcString() string { return "e8d4e804" }
-func (*SwInterfaceSetRxPlacementReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SwInterfaceSetRxPlacementReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SwInterfaceSetRxPlacementReply) 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 *SwInterfaceSetRxPlacementReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SwInterfaceSetTable defines message 'sw_interface_set_table'.
-type SwInterfaceSetTable struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
- VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
-}
-
-func (m *SwInterfaceSetTable) Reset() { *m = SwInterfaceSetTable{} }
-func (*SwInterfaceSetTable) GetMessageName() string { return "sw_interface_set_table" }
-func (*SwInterfaceSetTable) GetCrcString() string { return "df42a577" }
-func (*SwInterfaceSetTable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceSetTable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.IsIPv6
- size += 4 // m.VrfID
- return size
-}
-func (m *SwInterfaceSetTable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeBool(m.IsIPv6)
- buf.EncodeUint32(m.VrfID)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceSetTable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.IsIPv6 = buf.DecodeBool()
- m.VrfID = buf.DecodeUint32()
- return nil
-}
-
-// SwInterfaceSetTableReply defines message 'sw_interface_set_table_reply'.
-type SwInterfaceSetTableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SwInterfaceSetTableReply) Reset() { *m = SwInterfaceSetTableReply{} }
-func (*SwInterfaceSetTableReply) GetMessageName() string { return "sw_interface_set_table_reply" }
-func (*SwInterfaceSetTableReply) GetCrcString() string { return "e8d4e804" }
-func (*SwInterfaceSetTableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SwInterfaceSetTableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SwInterfaceSetTableReply) 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 *SwInterfaceSetTableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SwInterfaceSetUnnumbered defines message 'sw_interface_set_unnumbered'.
-type SwInterfaceSetUnnumbered struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- UnnumberedSwIfIndex InterfaceIndex `binapi:"interface_index,name=unnumbered_sw_if_index" json:"unnumbered_sw_if_index,omitempty"`
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
-}
-
-func (m *SwInterfaceSetUnnumbered) Reset() { *m = SwInterfaceSetUnnumbered{} }
-func (*SwInterfaceSetUnnumbered) GetMessageName() string { return "sw_interface_set_unnumbered" }
-func (*SwInterfaceSetUnnumbered) GetCrcString() string { return "938ef33b" }
-func (*SwInterfaceSetUnnumbered) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceSetUnnumbered) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.UnnumberedSwIfIndex
- size += 1 // m.IsAdd
- return size
-}
-func (m *SwInterfaceSetUnnumbered) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(uint32(m.UnnumberedSwIfIndex))
- buf.EncodeBool(m.IsAdd)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceSetUnnumbered) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.UnnumberedSwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.IsAdd = buf.DecodeBool()
- return nil
-}
-
-// SwInterfaceSetUnnumberedReply defines message 'sw_interface_set_unnumbered_reply'.
-type SwInterfaceSetUnnumberedReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SwInterfaceSetUnnumberedReply) Reset() { *m = SwInterfaceSetUnnumberedReply{} }
-func (*SwInterfaceSetUnnumberedReply) GetMessageName() string {
- return "sw_interface_set_unnumbered_reply"
-}
-func (*SwInterfaceSetUnnumberedReply) GetCrcString() string { return "e8d4e804" }
-func (*SwInterfaceSetUnnumberedReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SwInterfaceSetUnnumberedReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SwInterfaceSetUnnumberedReply) 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 *SwInterfaceSetUnnumberedReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SwInterfaceTagAddDel defines message 'sw_interface_tag_add_del'.
-type SwInterfaceTagAddDel struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"`
-}
-
-func (m *SwInterfaceTagAddDel) Reset() { *m = SwInterfaceTagAddDel{} }
-func (*SwInterfaceTagAddDel) GetMessageName() string { return "sw_interface_tag_add_del" }
-func (*SwInterfaceTagAddDel) GetCrcString() string { return "426f8bc1" }
-func (*SwInterfaceTagAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceTagAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 4 // m.SwIfIndex
- size += 64 // m.Tag
- return size
-}
-func (m *SwInterfaceTagAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeString(m.Tag, 64)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceTagAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Tag = buf.DecodeString(64)
- return nil
-}
-
-// SwInterfaceTagAddDelReply defines message 'sw_interface_tag_add_del_reply'.
-type SwInterfaceTagAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SwInterfaceTagAddDelReply) Reset() { *m = SwInterfaceTagAddDelReply{} }
-func (*SwInterfaceTagAddDelReply) GetMessageName() string { return "sw_interface_tag_add_del_reply" }
-func (*SwInterfaceTagAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*SwInterfaceTagAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SwInterfaceTagAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SwInterfaceTagAddDelReply) 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 *SwInterfaceTagAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// WantInterfaceEvents defines message 'want_interface_events'.
-type WantInterfaceEvents struct {
- EnableDisable uint32 `binapi:"u32,name=enable_disable" json:"enable_disable,omitempty"`
- PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
-}
-
-func (m *WantInterfaceEvents) Reset() { *m = WantInterfaceEvents{} }
-func (*WantInterfaceEvents) GetMessageName() string { return "want_interface_events" }
-func (*WantInterfaceEvents) GetCrcString() string { return "476f5a08" }
-func (*WantInterfaceEvents) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *WantInterfaceEvents) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.EnableDisable
- size += 4 // m.PID
- return size
-}
-func (m *WantInterfaceEvents) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.EnableDisable)
- buf.EncodeUint32(m.PID)
- return buf.Bytes(), nil
-}
-func (m *WantInterfaceEvents) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.EnableDisable = buf.DecodeUint32()
- m.PID = buf.DecodeUint32()
- return nil
-}
-
-// WantInterfaceEventsReply defines message 'want_interface_events_reply'.
-type WantInterfaceEventsReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *WantInterfaceEventsReply) Reset() { *m = WantInterfaceEventsReply{} }
-func (*WantInterfaceEventsReply) GetMessageName() string { return "want_interface_events_reply" }
-func (*WantInterfaceEventsReply) GetCrcString() string { return "e8d4e804" }
-func (*WantInterfaceEventsReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *WantInterfaceEventsReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *WantInterfaceEventsReply) 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 *WantInterfaceEventsReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_interfaces_binapi_init() }
-func file_interfaces_binapi_init() {
- api.RegisterMessage((*CollectDetailedInterfaceStats)(nil), "collect_detailed_interface_stats_5501adee")
- api.RegisterMessage((*CollectDetailedInterfaceStatsReply)(nil), "collect_detailed_interface_stats_reply_e8d4e804")
- api.RegisterMessage((*CreateLoopback)(nil), "create_loopback_42bb5d22")
- api.RegisterMessage((*CreateLoopbackInstance)(nil), "create_loopback_instance_d36a3ee2")
- api.RegisterMessage((*CreateLoopbackInstanceReply)(nil), "create_loopback_instance_reply_5383d31f")
- api.RegisterMessage((*CreateLoopbackReply)(nil), "create_loopback_reply_5383d31f")
- api.RegisterMessage((*CreateSubif)(nil), "create_subif_cb371063")
- api.RegisterMessage((*CreateSubifReply)(nil), "create_subif_reply_5383d31f")
- api.RegisterMessage((*CreateVlanSubif)(nil), "create_vlan_subif_af34ac8b")
- api.RegisterMessage((*CreateVlanSubifReply)(nil), "create_vlan_subif_reply_5383d31f")
- api.RegisterMessage((*DeleteLoopback)(nil), "delete_loopback_f9e6675e")
- api.RegisterMessage((*DeleteLoopbackReply)(nil), "delete_loopback_reply_e8d4e804")
- api.RegisterMessage((*DeleteSubif)(nil), "delete_subif_f9e6675e")
- api.RegisterMessage((*DeleteSubifReply)(nil), "delete_subif_reply_e8d4e804")
- api.RegisterMessage((*HwInterfaceSetMtu)(nil), "hw_interface_set_mtu_e6746899")
- api.RegisterMessage((*HwInterfaceSetMtuReply)(nil), "hw_interface_set_mtu_reply_e8d4e804")
- api.RegisterMessage((*InterfaceNameRenumber)(nil), "interface_name_renumber_2b8858b8")
- api.RegisterMessage((*InterfaceNameRenumberReply)(nil), "interface_name_renumber_reply_e8d4e804")
- api.RegisterMessage((*SwInterfaceAddDelAddress)(nil), "sw_interface_add_del_address_5803d5c4")
- api.RegisterMessage((*SwInterfaceAddDelAddressReply)(nil), "sw_interface_add_del_address_reply_e8d4e804")
- api.RegisterMessage((*SwInterfaceAddDelMacAddress)(nil), "sw_interface_add_del_mac_address_638bb9f4")
- api.RegisterMessage((*SwInterfaceAddDelMacAddressReply)(nil), "sw_interface_add_del_mac_address_reply_e8d4e804")
- api.RegisterMessage((*SwInterfaceClearStats)(nil), "sw_interface_clear_stats_f9e6675e")
- api.RegisterMessage((*SwInterfaceClearStatsReply)(nil), "sw_interface_clear_stats_reply_e8d4e804")
- api.RegisterMessage((*SwInterfaceDetails)(nil), "sw_interface_details_17b69fa2")
- api.RegisterMessage((*SwInterfaceDump)(nil), "sw_interface_dump_aa610c27")
- api.RegisterMessage((*SwInterfaceEvent)(nil), "sw_interface_event_f709f78d")
- api.RegisterMessage((*SwInterfaceGetMacAddress)(nil), "sw_interface_get_mac_address_f9e6675e")
- api.RegisterMessage((*SwInterfaceGetMacAddressReply)(nil), "sw_interface_get_mac_address_reply_40ef2c08")
- api.RegisterMessage((*SwInterfaceGetTable)(nil), "sw_interface_get_table_2d033de4")
- api.RegisterMessage((*SwInterfaceGetTableReply)(nil), "sw_interface_get_table_reply_a6eb0109")
- api.RegisterMessage((*SwInterfaceRxPlacementDetails)(nil), "sw_interface_rx_placement_details_f6d7d024")
- api.RegisterMessage((*SwInterfaceRxPlacementDump)(nil), "sw_interface_rx_placement_dump_f9e6675e")
- api.RegisterMessage((*SwInterfaceSetFlags)(nil), "sw_interface_set_flags_6a2b491a")
- api.RegisterMessage((*SwInterfaceSetFlagsReply)(nil), "sw_interface_set_flags_reply_e8d4e804")
- api.RegisterMessage((*SwInterfaceSetIPDirectedBroadcast)(nil), "sw_interface_set_ip_directed_broadcast_ae6cfcfb")
- api.RegisterMessage((*SwInterfaceSetIPDirectedBroadcastReply)(nil), "sw_interface_set_ip_directed_broadcast_reply_e8d4e804")
- api.RegisterMessage((*SwInterfaceSetMacAddress)(nil), "sw_interface_set_mac_address_6aca746a")
- api.RegisterMessage((*SwInterfaceSetMacAddressReply)(nil), "sw_interface_set_mac_address_reply_e8d4e804")
- api.RegisterMessage((*SwInterfaceSetMtu)(nil), "sw_interface_set_mtu_5cbe85e5")
- api.RegisterMessage((*SwInterfaceSetMtuReply)(nil), "sw_interface_set_mtu_reply_e8d4e804")
- api.RegisterMessage((*SwInterfaceSetRxMode)(nil), "sw_interface_set_rx_mode_780f5cee")
- api.RegisterMessage((*SwInterfaceSetRxModeReply)(nil), "sw_interface_set_rx_mode_reply_e8d4e804")
- api.RegisterMessage((*SwInterfaceSetRxPlacement)(nil), "sw_interface_set_rx_placement_db65f3c9")
- api.RegisterMessage((*SwInterfaceSetRxPlacementReply)(nil), "sw_interface_set_rx_placement_reply_e8d4e804")
- api.RegisterMessage((*SwInterfaceSetTable)(nil), "sw_interface_set_table_df42a577")
- api.RegisterMessage((*SwInterfaceSetTableReply)(nil), "sw_interface_set_table_reply_e8d4e804")
- api.RegisterMessage((*SwInterfaceSetUnnumbered)(nil), "sw_interface_set_unnumbered_938ef33b")
- api.RegisterMessage((*SwInterfaceSetUnnumberedReply)(nil), "sw_interface_set_unnumbered_reply_e8d4e804")
- api.RegisterMessage((*SwInterfaceTagAddDel)(nil), "sw_interface_tag_add_del_426f8bc1")
- api.RegisterMessage((*SwInterfaceTagAddDelReply)(nil), "sw_interface_tag_add_del_reply_e8d4e804")
- api.RegisterMessage((*WantInterfaceEvents)(nil), "want_interface_events_476f5a08")
- api.RegisterMessage((*WantInterfaceEventsReply)(nil), "want_interface_events_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*CollectDetailedInterfaceStats)(nil),
- (*CollectDetailedInterfaceStatsReply)(nil),
- (*CreateLoopback)(nil),
- (*CreateLoopbackInstance)(nil),
- (*CreateLoopbackInstanceReply)(nil),
- (*CreateLoopbackReply)(nil),
- (*CreateSubif)(nil),
- (*CreateSubifReply)(nil),
- (*CreateVlanSubif)(nil),
- (*CreateVlanSubifReply)(nil),
- (*DeleteLoopback)(nil),
- (*DeleteLoopbackReply)(nil),
- (*DeleteSubif)(nil),
- (*DeleteSubifReply)(nil),
- (*HwInterfaceSetMtu)(nil),
- (*HwInterfaceSetMtuReply)(nil),
- (*InterfaceNameRenumber)(nil),
- (*InterfaceNameRenumberReply)(nil),
- (*SwInterfaceAddDelAddress)(nil),
- (*SwInterfaceAddDelAddressReply)(nil),
- (*SwInterfaceAddDelMacAddress)(nil),
- (*SwInterfaceAddDelMacAddressReply)(nil),
- (*SwInterfaceClearStats)(nil),
- (*SwInterfaceClearStatsReply)(nil),
- (*SwInterfaceDetails)(nil),
- (*SwInterfaceDump)(nil),
- (*SwInterfaceEvent)(nil),
- (*SwInterfaceGetMacAddress)(nil),
- (*SwInterfaceGetMacAddressReply)(nil),
- (*SwInterfaceGetTable)(nil),
- (*SwInterfaceGetTableReply)(nil),
- (*SwInterfaceRxPlacementDetails)(nil),
- (*SwInterfaceRxPlacementDump)(nil),
- (*SwInterfaceSetFlags)(nil),
- (*SwInterfaceSetFlagsReply)(nil),
- (*SwInterfaceSetIPDirectedBroadcast)(nil),
- (*SwInterfaceSetIPDirectedBroadcastReply)(nil),
- (*SwInterfaceSetMacAddress)(nil),
- (*SwInterfaceSetMacAddressReply)(nil),
- (*SwInterfaceSetMtu)(nil),
- (*SwInterfaceSetMtuReply)(nil),
- (*SwInterfaceSetRxMode)(nil),
- (*SwInterfaceSetRxModeReply)(nil),
- (*SwInterfaceSetRxPlacement)(nil),
- (*SwInterfaceSetRxPlacementReply)(nil),
- (*SwInterfaceSetTable)(nil),
- (*SwInterfaceSetTableReply)(nil),
- (*SwInterfaceSetUnnumbered)(nil),
- (*SwInterfaceSetUnnumberedReply)(nil),
- (*SwInterfaceTagAddDel)(nil),
- (*SwInterfaceTagAddDelReply)(nil),
- (*WantInterfaceEvents)(nil),
- (*WantInterfaceEventsReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/interface/interface_rpc.ba.go b/internal/testbinapi/binapi2001/interface/interface_rpc.ba.go
deleted file mode 100644
index d7ae7c5..0000000
--- a/internal/testbinapi/binapi2001/interface/interface_rpc.ba.go
+++ /dev/null
@@ -1,352 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package interfaces
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service interface.
-type RPCService interface {
- CollectDetailedInterfaceStats(ctx context.Context, in *CollectDetailedInterfaceStats) (*CollectDetailedInterfaceStatsReply, error)
- CreateLoopback(ctx context.Context, in *CreateLoopback) (*CreateLoopbackReply, error)
- CreateLoopbackInstance(ctx context.Context, in *CreateLoopbackInstance) (*CreateLoopbackInstanceReply, error)
- CreateSubif(ctx context.Context, in *CreateSubif) (*CreateSubifReply, error)
- CreateVlanSubif(ctx context.Context, in *CreateVlanSubif) (*CreateVlanSubifReply, error)
- DeleteLoopback(ctx context.Context, in *DeleteLoopback) (*DeleteLoopbackReply, error)
- DeleteSubif(ctx context.Context, in *DeleteSubif) (*DeleteSubifReply, error)
- HwInterfaceSetMtu(ctx context.Context, in *HwInterfaceSetMtu) (*HwInterfaceSetMtuReply, error)
- InterfaceNameRenumber(ctx context.Context, in *InterfaceNameRenumber) (*InterfaceNameRenumberReply, error)
- SwInterfaceAddDelAddress(ctx context.Context, in *SwInterfaceAddDelAddress) (*SwInterfaceAddDelAddressReply, error)
- SwInterfaceAddDelMacAddress(ctx context.Context, in *SwInterfaceAddDelMacAddress) (*SwInterfaceAddDelMacAddressReply, error)
- SwInterfaceClearStats(ctx context.Context, in *SwInterfaceClearStats) (*SwInterfaceClearStatsReply, error)
- SwInterfaceDump(ctx context.Context, in *SwInterfaceDump) (RPCService_SwInterfaceDumpClient, error)
- SwInterfaceGetMacAddress(ctx context.Context, in *SwInterfaceGetMacAddress) (*SwInterfaceGetMacAddressReply, error)
- SwInterfaceGetTable(ctx context.Context, in *SwInterfaceGetTable) (*SwInterfaceGetTableReply, error)
- SwInterfaceRxPlacementDump(ctx context.Context, in *SwInterfaceRxPlacementDump) (RPCService_SwInterfaceRxPlacementDumpClient, error)
- SwInterfaceSetFlags(ctx context.Context, in *SwInterfaceSetFlags) (*SwInterfaceSetFlagsReply, error)
- SwInterfaceSetIPDirectedBroadcast(ctx context.Context, in *SwInterfaceSetIPDirectedBroadcast) (*SwInterfaceSetIPDirectedBroadcastReply, error)
- SwInterfaceSetMacAddress(ctx context.Context, in *SwInterfaceSetMacAddress) (*SwInterfaceSetMacAddressReply, error)
- SwInterfaceSetMtu(ctx context.Context, in *SwInterfaceSetMtu) (*SwInterfaceSetMtuReply, error)
- SwInterfaceSetRxMode(ctx context.Context, in *SwInterfaceSetRxMode) (*SwInterfaceSetRxModeReply, error)
- SwInterfaceSetRxPlacement(ctx context.Context, in *SwInterfaceSetRxPlacement) (*SwInterfaceSetRxPlacementReply, error)
- SwInterfaceSetTable(ctx context.Context, in *SwInterfaceSetTable) (*SwInterfaceSetTableReply, error)
- SwInterfaceSetUnnumbered(ctx context.Context, in *SwInterfaceSetUnnumbered) (*SwInterfaceSetUnnumberedReply, error)
- SwInterfaceTagAddDel(ctx context.Context, in *SwInterfaceTagAddDel) (*SwInterfaceTagAddDelReply, error)
- WantInterfaceEvents(ctx context.Context, in *WantInterfaceEvents) (*WantInterfaceEventsReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) CollectDetailedInterfaceStats(ctx context.Context, in *CollectDetailedInterfaceStats) (*CollectDetailedInterfaceStatsReply, error) {
- out := new(CollectDetailedInterfaceStatsReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) CreateLoopback(ctx context.Context, in *CreateLoopback) (*CreateLoopbackReply, error) {
- out := new(CreateLoopbackReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) CreateLoopbackInstance(ctx context.Context, in *CreateLoopbackInstance) (*CreateLoopbackInstanceReply, error) {
- out := new(CreateLoopbackInstanceReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) CreateSubif(ctx context.Context, in *CreateSubif) (*CreateSubifReply, error) {
- out := new(CreateSubifReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) CreateVlanSubif(ctx context.Context, in *CreateVlanSubif) (*CreateVlanSubifReply, error) {
- out := new(CreateVlanSubifReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) DeleteLoopback(ctx context.Context, in *DeleteLoopback) (*DeleteLoopbackReply, error) {
- out := new(DeleteLoopbackReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) DeleteSubif(ctx context.Context, in *DeleteSubif) (*DeleteSubifReply, error) {
- out := new(DeleteSubifReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) HwInterfaceSetMtu(ctx context.Context, in *HwInterfaceSetMtu) (*HwInterfaceSetMtuReply, error) {
- out := new(HwInterfaceSetMtuReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) InterfaceNameRenumber(ctx context.Context, in *InterfaceNameRenumber) (*InterfaceNameRenumberReply, error) {
- out := new(InterfaceNameRenumberReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SwInterfaceAddDelAddress(ctx context.Context, in *SwInterfaceAddDelAddress) (*SwInterfaceAddDelAddressReply, error) {
- out := new(SwInterfaceAddDelAddressReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SwInterfaceAddDelMacAddress(ctx context.Context, in *SwInterfaceAddDelMacAddress) (*SwInterfaceAddDelMacAddressReply, error) {
- out := new(SwInterfaceAddDelMacAddressReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SwInterfaceClearStats(ctx context.Context, in *SwInterfaceClearStats) (*SwInterfaceClearStatsReply, error) {
- out := new(SwInterfaceClearStatsReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SwInterfaceDump(ctx context.Context, in *SwInterfaceDump) (RPCService_SwInterfaceDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_SwInterfaceDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_SwInterfaceDumpClient interface {
- Recv() (*SwInterfaceDetails, error)
- api.Stream
-}
-
-type serviceClient_SwInterfaceDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_SwInterfaceDumpClient) Recv() (*SwInterfaceDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *SwInterfaceDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) SwInterfaceGetMacAddress(ctx context.Context, in *SwInterfaceGetMacAddress) (*SwInterfaceGetMacAddressReply, error) {
- out := new(SwInterfaceGetMacAddressReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SwInterfaceGetTable(ctx context.Context, in *SwInterfaceGetTable) (*SwInterfaceGetTableReply, error) {
- out := new(SwInterfaceGetTableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SwInterfaceRxPlacementDump(ctx context.Context, in *SwInterfaceRxPlacementDump) (RPCService_SwInterfaceRxPlacementDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_SwInterfaceRxPlacementDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_SwInterfaceRxPlacementDumpClient interface {
- Recv() (*SwInterfaceRxPlacementDetails, error)
- api.Stream
-}
-
-type serviceClient_SwInterfaceRxPlacementDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_SwInterfaceRxPlacementDumpClient) Recv() (*SwInterfaceRxPlacementDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *SwInterfaceRxPlacementDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) SwInterfaceSetFlags(ctx context.Context, in *SwInterfaceSetFlags) (*SwInterfaceSetFlagsReply, error) {
- out := new(SwInterfaceSetFlagsReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SwInterfaceSetIPDirectedBroadcast(ctx context.Context, in *SwInterfaceSetIPDirectedBroadcast) (*SwInterfaceSetIPDirectedBroadcastReply, error) {
- out := new(SwInterfaceSetIPDirectedBroadcastReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SwInterfaceSetMacAddress(ctx context.Context, in *SwInterfaceSetMacAddress) (*SwInterfaceSetMacAddressReply, error) {
- out := new(SwInterfaceSetMacAddressReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SwInterfaceSetMtu(ctx context.Context, in *SwInterfaceSetMtu) (*SwInterfaceSetMtuReply, error) {
- out := new(SwInterfaceSetMtuReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SwInterfaceSetRxMode(ctx context.Context, in *SwInterfaceSetRxMode) (*SwInterfaceSetRxModeReply, error) {
- out := new(SwInterfaceSetRxModeReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SwInterfaceSetRxPlacement(ctx context.Context, in *SwInterfaceSetRxPlacement) (*SwInterfaceSetRxPlacementReply, error) {
- out := new(SwInterfaceSetRxPlacementReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SwInterfaceSetTable(ctx context.Context, in *SwInterfaceSetTable) (*SwInterfaceSetTableReply, error) {
- out := new(SwInterfaceSetTableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SwInterfaceSetUnnumbered(ctx context.Context, in *SwInterfaceSetUnnumbered) (*SwInterfaceSetUnnumberedReply, error) {
- out := new(SwInterfaceSetUnnumberedReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SwInterfaceTagAddDel(ctx context.Context, in *SwInterfaceTagAddDel) (*SwInterfaceTagAddDelReply, error) {
- out := new(SwInterfaceTagAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) WantInterfaceEvents(ctx context.Context, in *WantInterfaceEvents) (*WantInterfaceEventsReply, error) {
- out := new(WantInterfaceEventsReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/interface_types/interface_types.ba.go b/internal/testbinapi/binapi2001/interface_types/interface_types.ba.go
deleted file mode 100644
index 14e2766..0000000
--- a/internal/testbinapi/binapi2001/interface_types/interface_types.ba.go
+++ /dev/null
@@ -1,285 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/interface_types.api.json
-
-// Package interface_types contains generated bindings for API file interface_types.api.
-//
-// Contents:
-// 1 alias
-// 6 enums
-//
-package interface_types
-
-import (
- "strconv"
-
- api "git.fd.io/govpp.git/api"
-)
-
-// 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 = "interface_types"
- APIVersion = ""
- VersionCrc = 0xc97be83d
-)
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
diff --git a/internal/testbinapi/binapi2001/ioam_cache/ioam_cache.ba.go b/internal/testbinapi/binapi2001/ioam_cache/ioam_cache.ba.go
deleted file mode 100644
index c409cc9..0000000
--- a/internal/testbinapi/binapi2001/ioam_cache/ioam_cache.ba.go
+++ /dev/null
@@ -1,111 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/plugins/ioam_cache.api.json
-
-// Package ioam_cache contains generated bindings for API file ioam_cache.api.
-//
-// Contents:
-// 2 messages
-//
-package ioam_cache
-
-import (
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the GoVPP api package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// GoVPP api package needs to be updated.
-const _ = api.GoVppAPIPackageIsVersion2
-
-const (
- APIFile = "ioam_cache"
- APIVersion = "1.0.0"
- VersionCrc = 0xd0a0cf20
-)
-
-// IoamCacheIP6EnableDisable defines message 'ioam_cache_ip6_enable_disable'.
-type IoamCacheIP6EnableDisable struct {
- IsDisable bool `binapi:"bool,name=is_disable" json:"is_disable,omitempty"`
-}
-
-func (m *IoamCacheIP6EnableDisable) Reset() { *m = IoamCacheIP6EnableDisable{} }
-func (*IoamCacheIP6EnableDisable) GetMessageName() string { return "ioam_cache_ip6_enable_disable" }
-func (*IoamCacheIP6EnableDisable) GetCrcString() string { return "47705c03" }
-func (*IoamCacheIP6EnableDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IoamCacheIP6EnableDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsDisable
- return size
-}
-func (m *IoamCacheIP6EnableDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsDisable)
- return buf.Bytes(), nil
-}
-func (m *IoamCacheIP6EnableDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsDisable = buf.DecodeBool()
- return nil
-}
-
-// IoamCacheIP6EnableDisableReply defines message 'ioam_cache_ip6_enable_disable_reply'.
-type IoamCacheIP6EnableDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *IoamCacheIP6EnableDisableReply) Reset() { *m = IoamCacheIP6EnableDisableReply{} }
-func (*IoamCacheIP6EnableDisableReply) GetMessageName() string {
- return "ioam_cache_ip6_enable_disable_reply"
-}
-func (*IoamCacheIP6EnableDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*IoamCacheIP6EnableDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IoamCacheIP6EnableDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *IoamCacheIP6EnableDisableReply) 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 *IoamCacheIP6EnableDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_ioam_cache_binapi_init() }
-func file_ioam_cache_binapi_init() {
- api.RegisterMessage((*IoamCacheIP6EnableDisable)(nil), "ioam_cache_ip6_enable_disable_47705c03")
- api.RegisterMessage((*IoamCacheIP6EnableDisableReply)(nil), "ioam_cache_ip6_enable_disable_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*IoamCacheIP6EnableDisable)(nil),
- (*IoamCacheIP6EnableDisableReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/ioam_cache/ioam_cache_rpc.ba.go b/internal/testbinapi/binapi2001/ioam_cache/ioam_cache_rpc.ba.go
deleted file mode 100644
index 9847365..0000000
--- a/internal/testbinapi/binapi2001/ioam_cache/ioam_cache_rpc.ba.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package ioam_cache
-
-import (
- "context"
-
- api "git.fd.io/govpp.git/api"
-)
-
-// RPCService defines RPC service ioam_cache.
-type RPCService interface {
- IoamCacheIP6EnableDisable(ctx context.Context, in *IoamCacheIP6EnableDisable) (*IoamCacheIP6EnableDisableReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) IoamCacheIP6EnableDisable(ctx context.Context, in *IoamCacheIP6EnableDisable) (*IoamCacheIP6EnableDisableReply, error) {
- out := new(IoamCacheIP6EnableDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/ioam_export/ioam_export.ba.go b/internal/testbinapi/binapi2001/ioam_export/ioam_export.ba.go
deleted file mode 100644
index 044b8e2..0000000
--- a/internal/testbinapi/binapi2001/ioam_export/ioam_export.ba.go
+++ /dev/null
@@ -1,717 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/plugins/ioam_export.api.json
-
-// Package ioam_export contains generated bindings for API file ioam_export.api.
-//
-// Contents:
-// 5 aliases
-// 4 enums
-// 6 structs
-// 1 union
-// 2 messages
-//
-package ioam_export
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "ioam_export"
- APIVersion = "1.0.0"
- VersionCrc = 0xc6fdb83f
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
-
-// IoamExportIP6EnableDisable defines message 'ioam_export_ip6_enable_disable'.
-type IoamExportIP6EnableDisable struct {
- IsDisable bool `binapi:"bool,name=is_disable" json:"is_disable,omitempty"`
- CollectorAddress IP4Address `binapi:"ip4_address,name=collector_address" json:"collector_address,omitempty"`
- SrcAddress IP4Address `binapi:"ip4_address,name=src_address" json:"src_address,omitempty"`
-}
-
-func (m *IoamExportIP6EnableDisable) Reset() { *m = IoamExportIP6EnableDisable{} }
-func (*IoamExportIP6EnableDisable) GetMessageName() string { return "ioam_export_ip6_enable_disable" }
-func (*IoamExportIP6EnableDisable) GetCrcString() string { return "e4d4ebfa" }
-func (*IoamExportIP6EnableDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IoamExportIP6EnableDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsDisable
- size += 1 * 4 // m.CollectorAddress
- size += 1 * 4 // m.SrcAddress
- return size
-}
-func (m *IoamExportIP6EnableDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsDisable)
- buf.EncodeBytes(m.CollectorAddress[:], 4)
- buf.EncodeBytes(m.SrcAddress[:], 4)
- return buf.Bytes(), nil
-}
-func (m *IoamExportIP6EnableDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsDisable = buf.DecodeBool()
- copy(m.CollectorAddress[:], buf.DecodeBytes(4))
- copy(m.SrcAddress[:], buf.DecodeBytes(4))
- return nil
-}
-
-// IoamExportIP6EnableDisableReply defines message 'ioam_export_ip6_enable_disable_reply'.
-type IoamExportIP6EnableDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *IoamExportIP6EnableDisableReply) Reset() { *m = IoamExportIP6EnableDisableReply{} }
-func (*IoamExportIP6EnableDisableReply) GetMessageName() string {
- return "ioam_export_ip6_enable_disable_reply"
-}
-func (*IoamExportIP6EnableDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*IoamExportIP6EnableDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IoamExportIP6EnableDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *IoamExportIP6EnableDisableReply) 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 *IoamExportIP6EnableDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_ioam_export_binapi_init() }
-func file_ioam_export_binapi_init() {
- api.RegisterMessage((*IoamExportIP6EnableDisable)(nil), "ioam_export_ip6_enable_disable_e4d4ebfa")
- api.RegisterMessage((*IoamExportIP6EnableDisableReply)(nil), "ioam_export_ip6_enable_disable_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*IoamExportIP6EnableDisable)(nil),
- (*IoamExportIP6EnableDisableReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/ioam_export/ioam_export_rpc.ba.go b/internal/testbinapi/binapi2001/ioam_export/ioam_export_rpc.ba.go
deleted file mode 100644
index 0e0da2e..0000000
--- a/internal/testbinapi/binapi2001/ioam_export/ioam_export_rpc.ba.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package ioam_export
-
-import (
- "context"
-
- api "git.fd.io/govpp.git/api"
-)
-
-// RPCService defines RPC service ioam_export.
-type RPCService interface {
- IoamExportIP6EnableDisable(ctx context.Context, in *IoamExportIP6EnableDisable) (*IoamExportIP6EnableDisableReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) IoamExportIP6EnableDisable(ctx context.Context, in *IoamExportIP6EnableDisable) (*IoamExportIP6EnableDisableReply, error) {
- out := new(IoamExportIP6EnableDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/ioam_vxlan_gpe/ioam_vxlan_gpe.ba.go b/internal/testbinapi/binapi2001/ioam_vxlan_gpe/ioam_vxlan_gpe.ba.go
deleted file mode 100644
index 7ee44bc..0000000
--- a/internal/testbinapi/binapi2001/ioam_vxlan_gpe/ioam_vxlan_gpe.ba.go
+++ /dev/null
@@ -1,1117 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/plugins/ioam_vxlan_gpe.api.json
-
-// Package ioam_vxlan_gpe contains generated bindings for API file ioam_vxlan_gpe.api.
-//
-// Contents:
-// 5 aliases
-// 4 enums
-// 6 structs
-// 1 union
-// 12 messages
-//
-package ioam_vxlan_gpe
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "ioam_vxlan_gpe"
- APIVersion = "1.0.0"
- VersionCrc = 0xf80eb923
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
-
-// VxlanGpeIoamDisable defines message 'vxlan_gpe_ioam_disable'.
-type VxlanGpeIoamDisable struct {
- ID uint16 `binapi:"u16,name=id" json:"id,omitempty"`
-}
-
-func (m *VxlanGpeIoamDisable) Reset() { *m = VxlanGpeIoamDisable{} }
-func (*VxlanGpeIoamDisable) GetMessageName() string { return "vxlan_gpe_ioam_disable" }
-func (*VxlanGpeIoamDisable) GetCrcString() string { return "6b16a45e" }
-func (*VxlanGpeIoamDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *VxlanGpeIoamDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 2 // m.ID
- return size
-}
-func (m *VxlanGpeIoamDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint16(m.ID)
- return buf.Bytes(), nil
-}
-func (m *VxlanGpeIoamDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.ID = buf.DecodeUint16()
- return nil
-}
-
-// VxlanGpeIoamDisableReply defines message 'vxlan_gpe_ioam_disable_reply'.
-type VxlanGpeIoamDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *VxlanGpeIoamDisableReply) Reset() { *m = VxlanGpeIoamDisableReply{} }
-func (*VxlanGpeIoamDisableReply) GetMessageName() string { return "vxlan_gpe_ioam_disable_reply" }
-func (*VxlanGpeIoamDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*VxlanGpeIoamDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *VxlanGpeIoamDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *VxlanGpeIoamDisableReply) 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 *VxlanGpeIoamDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// VxlanGpeIoamEnable defines message 'vxlan_gpe_ioam_enable'.
-type VxlanGpeIoamEnable struct {
- ID uint16 `binapi:"u16,name=id" json:"id,omitempty"`
- TracePpc uint8 `binapi:"u8,name=trace_ppc" json:"trace_ppc,omitempty"`
- PowEnable bool `binapi:"bool,name=pow_enable" json:"pow_enable,omitempty"`
- TraceEnable bool `binapi:"bool,name=trace_enable" json:"trace_enable,omitempty"`
-}
-
-func (m *VxlanGpeIoamEnable) Reset() { *m = VxlanGpeIoamEnable{} }
-func (*VxlanGpeIoamEnable) GetMessageName() string { return "vxlan_gpe_ioam_enable" }
-func (*VxlanGpeIoamEnable) GetCrcString() string { return "2481bef7" }
-func (*VxlanGpeIoamEnable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *VxlanGpeIoamEnable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 2 // m.ID
- size += 1 // m.TracePpc
- size += 1 // m.PowEnable
- size += 1 // m.TraceEnable
- return size
-}
-func (m *VxlanGpeIoamEnable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint16(m.ID)
- buf.EncodeUint8(m.TracePpc)
- buf.EncodeBool(m.PowEnable)
- buf.EncodeBool(m.TraceEnable)
- return buf.Bytes(), nil
-}
-func (m *VxlanGpeIoamEnable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.ID = buf.DecodeUint16()
- m.TracePpc = buf.DecodeUint8()
- m.PowEnable = buf.DecodeBool()
- m.TraceEnable = buf.DecodeBool()
- return nil
-}
-
-// VxlanGpeIoamEnableReply defines message 'vxlan_gpe_ioam_enable_reply'.
-type VxlanGpeIoamEnableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *VxlanGpeIoamEnableReply) Reset() { *m = VxlanGpeIoamEnableReply{} }
-func (*VxlanGpeIoamEnableReply) GetMessageName() string { return "vxlan_gpe_ioam_enable_reply" }
-func (*VxlanGpeIoamEnableReply) GetCrcString() string { return "e8d4e804" }
-func (*VxlanGpeIoamEnableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *VxlanGpeIoamEnableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *VxlanGpeIoamEnableReply) 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 *VxlanGpeIoamEnableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// VxlanGpeIoamTransitDisable defines message 'vxlan_gpe_ioam_transit_disable'.
-type VxlanGpeIoamTransitDisable struct {
- OuterFibIndex uint32 `binapi:"u32,name=outer_fib_index" json:"outer_fib_index,omitempty"`
- DstAddr Address `binapi:"address,name=dst_addr" json:"dst_addr,omitempty"`
-}
-
-func (m *VxlanGpeIoamTransitDisable) Reset() { *m = VxlanGpeIoamTransitDisable{} }
-func (*VxlanGpeIoamTransitDisable) GetMessageName() string { return "vxlan_gpe_ioam_transit_disable" }
-func (*VxlanGpeIoamTransitDisable) GetCrcString() string { return "553f5b7b" }
-func (*VxlanGpeIoamTransitDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *VxlanGpeIoamTransitDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.OuterFibIndex
- size += 4 // m.DstAddr.Af
- size += 1 * 16 // m.DstAddr.Un
- return size
-}
-func (m *VxlanGpeIoamTransitDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.OuterFibIndex)
- buf.EncodeUint32(uint32(m.DstAddr.Af))
- buf.EncodeBytes(m.DstAddr.Un.XXX_UnionData[:], 16)
- return buf.Bytes(), nil
-}
-func (m *VxlanGpeIoamTransitDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.OuterFibIndex = buf.DecodeUint32()
- m.DstAddr.Af = AddressFamily(buf.DecodeUint32())
- copy(m.DstAddr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- return nil
-}
-
-// VxlanGpeIoamTransitDisableReply defines message 'vxlan_gpe_ioam_transit_disable_reply'.
-type VxlanGpeIoamTransitDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *VxlanGpeIoamTransitDisableReply) Reset() { *m = VxlanGpeIoamTransitDisableReply{} }
-func (*VxlanGpeIoamTransitDisableReply) GetMessageName() string {
- return "vxlan_gpe_ioam_transit_disable_reply"
-}
-func (*VxlanGpeIoamTransitDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*VxlanGpeIoamTransitDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *VxlanGpeIoamTransitDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *VxlanGpeIoamTransitDisableReply) 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 *VxlanGpeIoamTransitDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// VxlanGpeIoamTransitEnable defines message 'vxlan_gpe_ioam_transit_enable'.
-type VxlanGpeIoamTransitEnable struct {
- OuterFibIndex uint32 `binapi:"u32,name=outer_fib_index" json:"outer_fib_index,omitempty"`
- DstAddr Address `binapi:"address,name=dst_addr" json:"dst_addr,omitempty"`
-}
-
-func (m *VxlanGpeIoamTransitEnable) Reset() { *m = VxlanGpeIoamTransitEnable{} }
-func (*VxlanGpeIoamTransitEnable) GetMessageName() string { return "vxlan_gpe_ioam_transit_enable" }
-func (*VxlanGpeIoamTransitEnable) GetCrcString() string { return "553f5b7b" }
-func (*VxlanGpeIoamTransitEnable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *VxlanGpeIoamTransitEnable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.OuterFibIndex
- size += 4 // m.DstAddr.Af
- size += 1 * 16 // m.DstAddr.Un
- return size
-}
-func (m *VxlanGpeIoamTransitEnable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.OuterFibIndex)
- buf.EncodeUint32(uint32(m.DstAddr.Af))
- buf.EncodeBytes(m.DstAddr.Un.XXX_UnionData[:], 16)
- return buf.Bytes(), nil
-}
-func (m *VxlanGpeIoamTransitEnable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.OuterFibIndex = buf.DecodeUint32()
- m.DstAddr.Af = AddressFamily(buf.DecodeUint32())
- copy(m.DstAddr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- return nil
-}
-
-// VxlanGpeIoamTransitEnableReply defines message 'vxlan_gpe_ioam_transit_enable_reply'.
-type VxlanGpeIoamTransitEnableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *VxlanGpeIoamTransitEnableReply) Reset() { *m = VxlanGpeIoamTransitEnableReply{} }
-func (*VxlanGpeIoamTransitEnableReply) GetMessageName() string {
- return "vxlan_gpe_ioam_transit_enable_reply"
-}
-func (*VxlanGpeIoamTransitEnableReply) GetCrcString() string { return "e8d4e804" }
-func (*VxlanGpeIoamTransitEnableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *VxlanGpeIoamTransitEnableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *VxlanGpeIoamTransitEnableReply) 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 *VxlanGpeIoamTransitEnableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// VxlanGpeIoamVniDisable defines message 'vxlan_gpe_ioam_vni_disable'.
-type VxlanGpeIoamVniDisable struct {
- Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
- Local Address `binapi:"address,name=local" json:"local,omitempty"`
- Remote Address `binapi:"address,name=remote" json:"remote,omitempty"`
-}
-
-func (m *VxlanGpeIoamVniDisable) Reset() { *m = VxlanGpeIoamVniDisable{} }
-func (*VxlanGpeIoamVniDisable) GetMessageName() string { return "vxlan_gpe_ioam_vni_disable" }
-func (*VxlanGpeIoamVniDisable) GetCrcString() string { return "997161fb" }
-func (*VxlanGpeIoamVniDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *VxlanGpeIoamVniDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Vni
- size += 4 // m.Local.Af
- size += 1 * 16 // m.Local.Un
- size += 4 // m.Remote.Af
- size += 1 * 16 // m.Remote.Un
- return size
-}
-func (m *VxlanGpeIoamVniDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Vni)
- buf.EncodeUint32(uint32(m.Local.Af))
- buf.EncodeBytes(m.Local.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.Remote.Af))
- buf.EncodeBytes(m.Remote.Un.XXX_UnionData[:], 16)
- return buf.Bytes(), nil
-}
-func (m *VxlanGpeIoamVniDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Vni = buf.DecodeUint32()
- m.Local.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Local.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Remote.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Remote.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- return nil
-}
-
-// VxlanGpeIoamVniDisableReply defines message 'vxlan_gpe_ioam_vni_disable_reply'.
-type VxlanGpeIoamVniDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *VxlanGpeIoamVniDisableReply) Reset() { *m = VxlanGpeIoamVniDisableReply{} }
-func (*VxlanGpeIoamVniDisableReply) GetMessageName() string {
- return "vxlan_gpe_ioam_vni_disable_reply"
-}
-func (*VxlanGpeIoamVniDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*VxlanGpeIoamVniDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *VxlanGpeIoamVniDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *VxlanGpeIoamVniDisableReply) 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 *VxlanGpeIoamVniDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// VxlanGpeIoamVniEnable defines message 'vxlan_gpe_ioam_vni_enable'.
-type VxlanGpeIoamVniEnable struct {
- Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
- Local Address `binapi:"address,name=local" json:"local,omitempty"`
- Remote Address `binapi:"address,name=remote" json:"remote,omitempty"`
-}
-
-func (m *VxlanGpeIoamVniEnable) Reset() { *m = VxlanGpeIoamVniEnable{} }
-func (*VxlanGpeIoamVniEnable) GetMessageName() string { return "vxlan_gpe_ioam_vni_enable" }
-func (*VxlanGpeIoamVniEnable) GetCrcString() string { return "997161fb" }
-func (*VxlanGpeIoamVniEnable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *VxlanGpeIoamVniEnable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Vni
- size += 4 // m.Local.Af
- size += 1 * 16 // m.Local.Un
- size += 4 // m.Remote.Af
- size += 1 * 16 // m.Remote.Un
- return size
-}
-func (m *VxlanGpeIoamVniEnable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Vni)
- buf.EncodeUint32(uint32(m.Local.Af))
- buf.EncodeBytes(m.Local.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.Remote.Af))
- buf.EncodeBytes(m.Remote.Un.XXX_UnionData[:], 16)
- return buf.Bytes(), nil
-}
-func (m *VxlanGpeIoamVniEnable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Vni = buf.DecodeUint32()
- m.Local.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Local.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Remote.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Remote.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- return nil
-}
-
-// VxlanGpeIoamVniEnableReply defines message 'vxlan_gpe_ioam_vni_enable_reply'.
-type VxlanGpeIoamVniEnableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *VxlanGpeIoamVniEnableReply) Reset() { *m = VxlanGpeIoamVniEnableReply{} }
-func (*VxlanGpeIoamVniEnableReply) GetMessageName() string { return "vxlan_gpe_ioam_vni_enable_reply" }
-func (*VxlanGpeIoamVniEnableReply) GetCrcString() string { return "e8d4e804" }
-func (*VxlanGpeIoamVniEnableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *VxlanGpeIoamVniEnableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *VxlanGpeIoamVniEnableReply) 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 *VxlanGpeIoamVniEnableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_ioam_vxlan_gpe_binapi_init() }
-func file_ioam_vxlan_gpe_binapi_init() {
- api.RegisterMessage((*VxlanGpeIoamDisable)(nil), "vxlan_gpe_ioam_disable_6b16a45e")
- api.RegisterMessage((*VxlanGpeIoamDisableReply)(nil), "vxlan_gpe_ioam_disable_reply_e8d4e804")
- api.RegisterMessage((*VxlanGpeIoamEnable)(nil), "vxlan_gpe_ioam_enable_2481bef7")
- api.RegisterMessage((*VxlanGpeIoamEnableReply)(nil), "vxlan_gpe_ioam_enable_reply_e8d4e804")
- api.RegisterMessage((*VxlanGpeIoamTransitDisable)(nil), "vxlan_gpe_ioam_transit_disable_553f5b7b")
- api.RegisterMessage((*VxlanGpeIoamTransitDisableReply)(nil), "vxlan_gpe_ioam_transit_disable_reply_e8d4e804")
- api.RegisterMessage((*VxlanGpeIoamTransitEnable)(nil), "vxlan_gpe_ioam_transit_enable_553f5b7b")
- api.RegisterMessage((*VxlanGpeIoamTransitEnableReply)(nil), "vxlan_gpe_ioam_transit_enable_reply_e8d4e804")
- api.RegisterMessage((*VxlanGpeIoamVniDisable)(nil), "vxlan_gpe_ioam_vni_disable_997161fb")
- api.RegisterMessage((*VxlanGpeIoamVniDisableReply)(nil), "vxlan_gpe_ioam_vni_disable_reply_e8d4e804")
- api.RegisterMessage((*VxlanGpeIoamVniEnable)(nil), "vxlan_gpe_ioam_vni_enable_997161fb")
- api.RegisterMessage((*VxlanGpeIoamVniEnableReply)(nil), "vxlan_gpe_ioam_vni_enable_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*VxlanGpeIoamDisable)(nil),
- (*VxlanGpeIoamDisableReply)(nil),
- (*VxlanGpeIoamEnable)(nil),
- (*VxlanGpeIoamEnableReply)(nil),
- (*VxlanGpeIoamTransitDisable)(nil),
- (*VxlanGpeIoamTransitDisableReply)(nil),
- (*VxlanGpeIoamTransitEnable)(nil),
- (*VxlanGpeIoamTransitEnableReply)(nil),
- (*VxlanGpeIoamVniDisable)(nil),
- (*VxlanGpeIoamVniDisableReply)(nil),
- (*VxlanGpeIoamVniEnable)(nil),
- (*VxlanGpeIoamVniEnableReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/ioam_vxlan_gpe/ioam_vxlan_gpe_rpc.ba.go b/internal/testbinapi/binapi2001/ioam_vxlan_gpe/ioam_vxlan_gpe_rpc.ba.go
deleted file mode 100644
index 19bdbb2..0000000
--- a/internal/testbinapi/binapi2001/ioam_vxlan_gpe/ioam_vxlan_gpe_rpc.ba.go
+++ /dev/null
@@ -1,81 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package ioam_vxlan_gpe
-
-import (
- "context"
-
- api "git.fd.io/govpp.git/api"
-)
-
-// RPCService defines RPC service ioam_vxlan_gpe.
-type RPCService interface {
- VxlanGpeIoamDisable(ctx context.Context, in *VxlanGpeIoamDisable) (*VxlanGpeIoamDisableReply, error)
- VxlanGpeIoamEnable(ctx context.Context, in *VxlanGpeIoamEnable) (*VxlanGpeIoamEnableReply, error)
- VxlanGpeIoamTransitDisable(ctx context.Context, in *VxlanGpeIoamTransitDisable) (*VxlanGpeIoamTransitDisableReply, error)
- VxlanGpeIoamTransitEnable(ctx context.Context, in *VxlanGpeIoamTransitEnable) (*VxlanGpeIoamTransitEnableReply, error)
- VxlanGpeIoamVniDisable(ctx context.Context, in *VxlanGpeIoamVniDisable) (*VxlanGpeIoamVniDisableReply, error)
- VxlanGpeIoamVniEnable(ctx context.Context, in *VxlanGpeIoamVniEnable) (*VxlanGpeIoamVniEnableReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) VxlanGpeIoamDisable(ctx context.Context, in *VxlanGpeIoamDisable) (*VxlanGpeIoamDisableReply, error) {
- out := new(VxlanGpeIoamDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) VxlanGpeIoamEnable(ctx context.Context, in *VxlanGpeIoamEnable) (*VxlanGpeIoamEnableReply, error) {
- out := new(VxlanGpeIoamEnableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) VxlanGpeIoamTransitDisable(ctx context.Context, in *VxlanGpeIoamTransitDisable) (*VxlanGpeIoamTransitDisableReply, error) {
- out := new(VxlanGpeIoamTransitDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) VxlanGpeIoamTransitEnable(ctx context.Context, in *VxlanGpeIoamTransitEnable) (*VxlanGpeIoamTransitEnableReply, error) {
- out := new(VxlanGpeIoamTransitEnableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) VxlanGpeIoamVniDisable(ctx context.Context, in *VxlanGpeIoamVniDisable) (*VxlanGpeIoamVniDisableReply, error) {
- out := new(VxlanGpeIoamVniDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) VxlanGpeIoamVniEnable(ctx context.Context, in *VxlanGpeIoamVniEnable) (*VxlanGpeIoamVniEnableReply, error) {
- out := new(VxlanGpeIoamVniEnableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/ip/ip.ba.go b/internal/testbinapi/binapi2001/ip/ip.ba.go
deleted file mode 100644
index 2480300..0000000
--- a/internal/testbinapi/binapi2001/ip/ip.ba.go
+++ /dev/null
@@ -1,4066 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/ip.api.json
-
-// Package ip contains generated bindings for API file ip.api.
-//
-// Contents:
-// 7 aliases
-// 15 enums
-// 14 structs
-// 1 union
-// 60 messages
-//
-package ip
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "ip"
- APIVersion = "3.0.1"
- VersionCrc = 0xfc3fea46
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// FibPathFlags defines enum 'fib_path_flags'.
-type FibPathFlags uint32
-
-const (
- FIB_API_PATH_FLAG_NONE FibPathFlags = 0
- FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED FibPathFlags = 1
- FIB_API_PATH_FLAG_RESOLVE_VIA_HOST FibPathFlags = 2
- FIB_API_PATH_FLAG_POP_PW_CW FibPathFlags = 4
-)
-
-var (
- FibPathFlags_name = map[uint32]string{
- 0: "FIB_API_PATH_FLAG_NONE",
- 1: "FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED",
- 2: "FIB_API_PATH_FLAG_RESOLVE_VIA_HOST",
- 4: "FIB_API_PATH_FLAG_POP_PW_CW",
- }
- FibPathFlags_value = map[string]uint32{
- "FIB_API_PATH_FLAG_NONE": 0,
- "FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED": 1,
- "FIB_API_PATH_FLAG_RESOLVE_VIA_HOST": 2,
- "FIB_API_PATH_FLAG_POP_PW_CW": 4,
- }
-)
-
-func (x FibPathFlags) String() string {
- s, ok := FibPathFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := FibPathFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "FibPathFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// FibPathNhProto defines enum 'fib_path_nh_proto'.
-type FibPathNhProto uint32
-
-const (
- FIB_API_PATH_NH_PROTO_IP4 FibPathNhProto = 0
- FIB_API_PATH_NH_PROTO_IP6 FibPathNhProto = 1
- FIB_API_PATH_NH_PROTO_MPLS FibPathNhProto = 2
- FIB_API_PATH_NH_PROTO_ETHERNET FibPathNhProto = 3
- FIB_API_PATH_NH_PROTO_BIER FibPathNhProto = 4
-)
-
-var (
- FibPathNhProto_name = map[uint32]string{
- 0: "FIB_API_PATH_NH_PROTO_IP4",
- 1: "FIB_API_PATH_NH_PROTO_IP6",
- 2: "FIB_API_PATH_NH_PROTO_MPLS",
- 3: "FIB_API_PATH_NH_PROTO_ETHERNET",
- 4: "FIB_API_PATH_NH_PROTO_BIER",
- }
- FibPathNhProto_value = map[string]uint32{
- "FIB_API_PATH_NH_PROTO_IP4": 0,
- "FIB_API_PATH_NH_PROTO_IP6": 1,
- "FIB_API_PATH_NH_PROTO_MPLS": 2,
- "FIB_API_PATH_NH_PROTO_ETHERNET": 3,
- "FIB_API_PATH_NH_PROTO_BIER": 4,
- }
-)
-
-func (x FibPathNhProto) String() string {
- s, ok := FibPathNhProto_name[uint32(x)]
- if ok {
- return s
- }
- return "FibPathNhProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// FibPathType defines enum 'fib_path_type'.
-type FibPathType uint32
-
-const (
- FIB_API_PATH_TYPE_NORMAL FibPathType = 0
- FIB_API_PATH_TYPE_LOCAL FibPathType = 1
- FIB_API_PATH_TYPE_DROP FibPathType = 2
- FIB_API_PATH_TYPE_UDP_ENCAP FibPathType = 3
- FIB_API_PATH_TYPE_BIER_IMP FibPathType = 4
- FIB_API_PATH_TYPE_ICMP_UNREACH FibPathType = 5
- FIB_API_PATH_TYPE_ICMP_PROHIBIT FibPathType = 6
- FIB_API_PATH_TYPE_SOURCE_LOOKUP FibPathType = 7
- FIB_API_PATH_TYPE_DVR FibPathType = 8
- FIB_API_PATH_TYPE_INTERFACE_RX FibPathType = 9
- FIB_API_PATH_TYPE_CLASSIFY FibPathType = 10
-)
-
-var (
- FibPathType_name = map[uint32]string{
- 0: "FIB_API_PATH_TYPE_NORMAL",
- 1: "FIB_API_PATH_TYPE_LOCAL",
- 2: "FIB_API_PATH_TYPE_DROP",
- 3: "FIB_API_PATH_TYPE_UDP_ENCAP",
- 4: "FIB_API_PATH_TYPE_BIER_IMP",
- 5: "FIB_API_PATH_TYPE_ICMP_UNREACH",
- 6: "FIB_API_PATH_TYPE_ICMP_PROHIBIT",
- 7: "FIB_API_PATH_TYPE_SOURCE_LOOKUP",
- 8: "FIB_API_PATH_TYPE_DVR",
- 9: "FIB_API_PATH_TYPE_INTERFACE_RX",
- 10: "FIB_API_PATH_TYPE_CLASSIFY",
- }
- FibPathType_value = map[string]uint32{
- "FIB_API_PATH_TYPE_NORMAL": 0,
- "FIB_API_PATH_TYPE_LOCAL": 1,
- "FIB_API_PATH_TYPE_DROP": 2,
- "FIB_API_PATH_TYPE_UDP_ENCAP": 3,
- "FIB_API_PATH_TYPE_BIER_IMP": 4,
- "FIB_API_PATH_TYPE_ICMP_UNREACH": 5,
- "FIB_API_PATH_TYPE_ICMP_PROHIBIT": 6,
- "FIB_API_PATH_TYPE_SOURCE_LOOKUP": 7,
- "FIB_API_PATH_TYPE_DVR": 8,
- "FIB_API_PATH_TYPE_INTERFACE_RX": 9,
- "FIB_API_PATH_TYPE_CLASSIFY": 10,
- }
-)
-
-func (x FibPathType) String() string {
- s, ok := FibPathType_name[uint32(x)]
- if ok {
- return s
- }
- return "FibPathType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPReassType defines enum 'ip_reass_type'.
-type IPReassType uint32
-
-const (
- IP_REASS_TYPE_FULL IPReassType = 0
- IP_REASS_TYPE_SHALLOW_VIRTUAL IPReassType = 1
-)
-
-var (
- IPReassType_name = map[uint32]string{
- 0: "IP_REASS_TYPE_FULL",
- 1: "IP_REASS_TYPE_SHALLOW_VIRTUAL",
- }
- IPReassType_value = map[string]uint32{
- "IP_REASS_TYPE_FULL": 0,
- "IP_REASS_TYPE_SHALLOW_VIRTUAL": 1,
- }
-)
-
-func (x IPReassType) String() string {
- s, ok := IPReassType_name[uint32(x)]
- if ok {
- return s
- }
- return "IPReassType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MfibItfFlags defines enum 'mfib_itf_flags'.
-type MfibItfFlags uint32
-
-const (
- MFIB_API_ITF_FLAG_NONE MfibItfFlags = 0
- MFIB_API_ITF_FLAG_NEGATE_SIGNAL MfibItfFlags = 1
- MFIB_API_ITF_FLAG_ACCEPT MfibItfFlags = 2
- MFIB_API_ITF_FLAG_FORWARD MfibItfFlags = 4
- MFIB_API_ITF_FLAG_SIGNAL_PRESENT MfibItfFlags = 8
- MFIB_API_ITF_FLAG_DONT_PRESERVE MfibItfFlags = 16
-)
-
-var (
- MfibItfFlags_name = map[uint32]string{
- 0: "MFIB_API_ITF_FLAG_NONE",
- 1: "MFIB_API_ITF_FLAG_NEGATE_SIGNAL",
- 2: "MFIB_API_ITF_FLAG_ACCEPT",
- 4: "MFIB_API_ITF_FLAG_FORWARD",
- 8: "MFIB_API_ITF_FLAG_SIGNAL_PRESENT",
- 16: "MFIB_API_ITF_FLAG_DONT_PRESERVE",
- }
- MfibItfFlags_value = map[string]uint32{
- "MFIB_API_ITF_FLAG_NONE": 0,
- "MFIB_API_ITF_FLAG_NEGATE_SIGNAL": 1,
- "MFIB_API_ITF_FLAG_ACCEPT": 2,
- "MFIB_API_ITF_FLAG_FORWARD": 4,
- "MFIB_API_ITF_FLAG_SIGNAL_PRESENT": 8,
- "MFIB_API_ITF_FLAG_DONT_PRESERVE": 16,
- }
-)
-
-func (x MfibItfFlags) String() string {
- s, ok := MfibItfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := MfibItfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "MfibItfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// MacAddress defines alias 'mac_address'.
-type MacAddress [6]uint8
-
-func ParseMacAddress(s string) (MacAddress, error) {
- var macaddr MacAddress
- mac, err := net.ParseMAC(s)
- if err != nil {
- return macaddr, err
- }
- copy(macaddr[:], mac[:])
- return macaddr, nil
-}
-
-func (x MacAddress) ToMAC() net.HardwareAddr {
- return net.HardwareAddr(x[:])
-}
-
-func (x MacAddress) String() string {
- return x.ToMAC().String()
-}
-
-func (x *MacAddress) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *MacAddress) UnmarshalText(text []byte) error {
- mac, err := ParseMacAddress(string(text))
- if err != nil {
- return err
- }
- *x = mac
- return nil
-}
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// FibMplsLabel defines type 'fib_mpls_label'.
-type FibMplsLabel struct {
- IsUniform uint8 `binapi:"u8,name=is_uniform" json:"is_uniform,omitempty"`
- Label uint32 `binapi:"u32,name=label" json:"label,omitempty"`
- TTL uint8 `binapi:"u8,name=ttl" json:"ttl,omitempty"`
- Exp uint8 `binapi:"u8,name=exp" json:"exp,omitempty"`
-}
-
-// FibPath defines type 'fib_path'.
-type FibPath struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
- RpfID uint32 `binapi:"u32,name=rpf_id" json:"rpf_id,omitempty"`
- Weight uint8 `binapi:"u8,name=weight" json:"weight,omitempty"`
- Preference uint8 `binapi:"u8,name=preference" json:"preference,omitempty"`
- Type FibPathType `binapi:"fib_path_type,name=type" json:"type,omitempty"`
- Flags FibPathFlags `binapi:"fib_path_flags,name=flags" json:"flags,omitempty"`
- Proto FibPathNhProto `binapi:"fib_path_nh_proto,name=proto" json:"proto,omitempty"`
- Nh FibPathNh `binapi:"fib_path_nh,name=nh" json:"nh,omitempty"`
- NLabels uint8 `binapi:"u8,name=n_labels" json:"n_labels,omitempty"`
- LabelStack [16]FibMplsLabel `binapi:"fib_mpls_label[16],name=label_stack" json:"label_stack,omitempty"`
-}
-
-// FibPathNh defines type 'fib_path_nh'.
-type FibPathNh struct {
- Address AddressUnion `binapi:"address_union,name=address" json:"address,omitempty"`
- ViaLabel uint32 `binapi:"u32,name=via_label" json:"via_label,omitempty"`
- ObjID uint32 `binapi:"u32,name=obj_id" json:"obj_id,omitempty"`
- ClassifyTableIndex uint32 `binapi:"u32,name=classify_table_index" json:"classify_table_index,omitempty"`
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IPMroute defines type 'ip_mroute'.
-type IPMroute struct {
- TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
- EntryFlags uint32 `binapi:"u32,name=entry_flags" json:"entry_flags,omitempty"`
- RpfID uint32 `binapi:"u32,name=rpf_id" json:"rpf_id,omitempty"`
- Prefix Mprefix `binapi:"mprefix,name=prefix" json:"prefix,omitempty"`
- NPaths uint8 `binapi:"u8,name=n_paths" json:"-"`
- Paths []MfibPath `binapi:"mfib_path[n_paths],name=paths" json:"paths,omitempty"`
-}
-
-// IPRoute defines type 'ip_route'.
-type IPRoute struct {
- TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
- StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
- Prefix Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
- NPaths uint8 `binapi:"u8,name=n_paths" json:"-"`
- Paths []FibPath `binapi:"fib_path[n_paths],name=paths" json:"paths,omitempty"`
-}
-
-// IPTable defines type 'ip_table'.
-type IPTable struct {
- TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
- IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
- Name string `binapi:"string[64],name=name" json:"name,omitempty"`
-}
-
-// MfibPath defines type 'mfib_path'.
-type MfibPath struct {
- ItfFlags MfibItfFlags `binapi:"mfib_itf_flags,name=itf_flags" json:"itf_flags,omitempty"`
- Path FibPath `binapi:"fib_path,name=path" json:"path,omitempty"`
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// PuntRedirect defines type 'punt_redirect'.
-type PuntRedirect struct {
- RxSwIfIndex InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"`
- TxSwIfIndex InterfaceIndex `binapi:"interface_index,name=tx_sw_if_index" json:"tx_sw_if_index,omitempty"`
- Nh Address `binapi:"address,name=nh" json:"nh,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
-
-// IoamDisable defines message 'ioam_disable'.
-type IoamDisable struct {
- ID uint16 `binapi:"u16,name=id" json:"id,omitempty"`
-}
-
-func (m *IoamDisable) Reset() { *m = IoamDisable{} }
-func (*IoamDisable) GetMessageName() string { return "ioam_disable" }
-func (*IoamDisable) GetCrcString() string { return "6b16a45e" }
-func (*IoamDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IoamDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 2 // m.ID
- return size
-}
-func (m *IoamDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint16(m.ID)
- return buf.Bytes(), nil
-}
-func (m *IoamDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.ID = buf.DecodeUint16()
- return nil
-}
-
-// IoamDisableReply defines message 'ioam_disable_reply'.
-type IoamDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *IoamDisableReply) Reset() { *m = IoamDisableReply{} }
-func (*IoamDisableReply) GetMessageName() string { return "ioam_disable_reply" }
-func (*IoamDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*IoamDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IoamDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *IoamDisableReply) 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 *IoamDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// IoamEnable defines message 'ioam_enable'.
-type IoamEnable struct {
- ID uint16 `binapi:"u16,name=id" json:"id,omitempty"`
- Seqno bool `binapi:"bool,name=seqno" json:"seqno,omitempty"`
- Analyse bool `binapi:"bool,name=analyse" json:"analyse,omitempty"`
- PotEnable bool `binapi:"bool,name=pot_enable" json:"pot_enable,omitempty"`
- TraceEnable bool `binapi:"bool,name=trace_enable" json:"trace_enable,omitempty"`
- NodeID uint32 `binapi:"u32,name=node_id" json:"node_id,omitempty"`
-}
-
-func (m *IoamEnable) Reset() { *m = IoamEnable{} }
-func (*IoamEnable) GetMessageName() string { return "ioam_enable" }
-func (*IoamEnable) GetCrcString() string { return "51ccd868" }
-func (*IoamEnable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IoamEnable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 2 // m.ID
- size += 1 // m.Seqno
- size += 1 // m.Analyse
- size += 1 // m.PotEnable
- size += 1 // m.TraceEnable
- size += 4 // m.NodeID
- return size
-}
-func (m *IoamEnable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint16(m.ID)
- buf.EncodeBool(m.Seqno)
- buf.EncodeBool(m.Analyse)
- buf.EncodeBool(m.PotEnable)
- buf.EncodeBool(m.TraceEnable)
- buf.EncodeUint32(m.NodeID)
- return buf.Bytes(), nil
-}
-func (m *IoamEnable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.ID = buf.DecodeUint16()
- m.Seqno = buf.DecodeBool()
- m.Analyse = buf.DecodeBool()
- m.PotEnable = buf.DecodeBool()
- m.TraceEnable = buf.DecodeBool()
- m.NodeID = buf.DecodeUint32()
- return nil
-}
-
-// IoamEnableReply defines message 'ioam_enable_reply'.
-type IoamEnableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *IoamEnableReply) Reset() { *m = IoamEnableReply{} }
-func (*IoamEnableReply) GetMessageName() string { return "ioam_enable_reply" }
-func (*IoamEnableReply) GetCrcString() string { return "e8d4e804" }
-func (*IoamEnableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IoamEnableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *IoamEnableReply) 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 *IoamEnableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// IPAddressDetails defines message 'ip_address_details'.
-type IPAddressDetails struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Prefix AddressWithPrefix `binapi:"address_with_prefix,name=prefix" json:"prefix,omitempty"`
-}
-
-func (m *IPAddressDetails) Reset() { *m = IPAddressDetails{} }
-func (*IPAddressDetails) GetMessageName() string { return "ip_address_details" }
-func (*IPAddressDetails) GetCrcString() string { return "b1199745" }
-func (*IPAddressDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IPAddressDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.Prefix.Address.Af
- size += 1 * 16 // m.Prefix.Address.Un
- size += 1 // m.Prefix.Len
- return size
-}
-func (m *IPAddressDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(uint32(m.Prefix.Address.Af))
- buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
- buf.EncodeUint8(m.Prefix.Len)
- return buf.Bytes(), nil
-}
-func (m *IPAddressDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Prefix.Address.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Prefix.Len = buf.DecodeUint8()
- return nil
-}
-
-// IPAddressDump defines message 'ip_address_dump'.
-type IPAddressDump struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
-}
-
-func (m *IPAddressDump) Reset() { *m = IPAddressDump{} }
-func (*IPAddressDump) GetMessageName() string { return "ip_address_dump" }
-func (*IPAddressDump) GetCrcString() string { return "2d033de4" }
-func (*IPAddressDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IPAddressDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.IsIPv6
- return size
-}
-func (m *IPAddressDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeBool(m.IsIPv6)
- return buf.Bytes(), nil
-}
-func (m *IPAddressDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.IsIPv6 = buf.DecodeBool()
- return nil
-}
-
-// IPContainerProxyAddDel defines message 'ip_container_proxy_add_del'.
-type IPContainerProxyAddDel struct {
- Pfx Prefix `binapi:"prefix,name=pfx" json:"pfx,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
-}
-
-func (m *IPContainerProxyAddDel) Reset() { *m = IPContainerProxyAddDel{} }
-func (*IPContainerProxyAddDel) GetMessageName() string { return "ip_container_proxy_add_del" }
-func (*IPContainerProxyAddDel) GetCrcString() string { return "91189f40" }
-func (*IPContainerProxyAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IPContainerProxyAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Pfx.Address.Af
- size += 1 * 16 // m.Pfx.Address.Un
- size += 1 // m.Pfx.Len
- size += 4 // m.SwIfIndex
- size += 1 // m.IsAdd
- return size
-}
-func (m *IPContainerProxyAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.Pfx.Address.Af))
- buf.EncodeBytes(m.Pfx.Address.Un.XXX_UnionData[:], 16)
- buf.EncodeUint8(m.Pfx.Len)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeBool(m.IsAdd)
- return buf.Bytes(), nil
-}
-func (m *IPContainerProxyAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Pfx.Address.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Pfx.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Pfx.Len = buf.DecodeUint8()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.IsAdd = buf.DecodeBool()
- return nil
-}
-
-// IPContainerProxyAddDelReply defines message 'ip_container_proxy_add_del_reply'.
-type IPContainerProxyAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *IPContainerProxyAddDelReply) Reset() { *m = IPContainerProxyAddDelReply{} }
-func (*IPContainerProxyAddDelReply) GetMessageName() string {
- return "ip_container_proxy_add_del_reply"
-}
-func (*IPContainerProxyAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*IPContainerProxyAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IPContainerProxyAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *IPContainerProxyAddDelReply) 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 *IPContainerProxyAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// IPContainerProxyDetails defines message 'ip_container_proxy_details'.
-type IPContainerProxyDetails struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Prefix Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
-}
-
-func (m *IPContainerProxyDetails) Reset() { *m = IPContainerProxyDetails{} }
-func (*IPContainerProxyDetails) GetMessageName() string { return "ip_container_proxy_details" }
-func (*IPContainerProxyDetails) GetCrcString() string { return "0ee460e8" }
-func (*IPContainerProxyDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IPContainerProxyDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.Prefix.Address.Af
- size += 1 * 16 // m.Prefix.Address.Un
- size += 1 // m.Prefix.Len
- return size
-}
-func (m *IPContainerProxyDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(uint32(m.Prefix.Address.Af))
- buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
- buf.EncodeUint8(m.Prefix.Len)
- return buf.Bytes(), nil
-}
-func (m *IPContainerProxyDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Prefix.Address.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Prefix.Len = buf.DecodeUint8()
- return nil
-}
-
-// IPContainerProxyDump defines message 'ip_container_proxy_dump'.
-type IPContainerProxyDump struct{}
-
-func (m *IPContainerProxyDump) Reset() { *m = IPContainerProxyDump{} }
-func (*IPContainerProxyDump) GetMessageName() string { return "ip_container_proxy_dump" }
-func (*IPContainerProxyDump) GetCrcString() string { return "51077d14" }
-func (*IPContainerProxyDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IPContainerProxyDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *IPContainerProxyDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *IPContainerProxyDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// IPDetails defines message 'ip_details'.
-type IPDetails struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
-}
-
-func (m *IPDetails) Reset() { *m = IPDetails{} }
-func (*IPDetails) GetMessageName() string { return "ip_details" }
-func (*IPDetails) GetCrcString() string { return "eb152d07" }
-func (*IPDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IPDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.IsIPv6
- return size
-}
-func (m *IPDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeBool(m.IsIPv6)
- return buf.Bytes(), nil
-}
-func (m *IPDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.IsIPv6 = buf.DecodeBool()
- return nil
-}
-
-// IPDump defines message 'ip_dump'.
-type IPDump struct {
- IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
-}
-
-func (m *IPDump) Reset() { *m = IPDump{} }
-func (*IPDump) GetMessageName() string { return "ip_dump" }
-func (*IPDump) GetCrcString() string { return "98d231ca" }
-func (*IPDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IPDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsIPv6
- return size
-}
-func (m *IPDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsIPv6)
- return buf.Bytes(), nil
-}
-func (m *IPDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsIPv6 = buf.DecodeBool()
- return nil
-}
-
-// IPMrouteAddDel defines message 'ip_mroute_add_del'.
-type IPMrouteAddDel struct {
- IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
- IsMultipath bool `binapi:"bool,name=is_multipath" json:"is_multipath,omitempty"`
- Route IPMroute `binapi:"ip_mroute,name=route" json:"route,omitempty"`
-}
-
-func (m *IPMrouteAddDel) Reset() { *m = IPMrouteAddDel{} }
-func (*IPMrouteAddDel) GetMessageName() string { return "ip_mroute_add_del" }
-func (*IPMrouteAddDel) GetCrcString() string { return "f6627d17" }
-func (*IPMrouteAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IPMrouteAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 1 // m.IsMultipath
- size += 4 // m.Route.TableID
- size += 4 // m.Route.EntryFlags
- size += 4 // m.Route.RpfID
- size += 4 // m.Route.Prefix.Af
- size += 2 // m.Route.Prefix.GrpAddressLength
- size += 1 * 16 // m.Route.Prefix.GrpAddress
- size += 1 * 16 // m.Route.Prefix.SrcAddress
- size += 1 // m.Route.NPaths
- for j2 := 0; j2 < len(m.Route.Paths); j2++ {
- var s2 MfibPath
- _ = s2
- if j2 < len(m.Route.Paths) {
- s2 = m.Route.Paths[j2]
- }
- size += 4 // s2.ItfFlags
- size += 4 // s2.Path.SwIfIndex
- size += 4 // s2.Path.TableID
- size += 4 // s2.Path.RpfID
- size += 1 // s2.Path.Weight
- size += 1 // s2.Path.Preference
- size += 4 // s2.Path.Type
- size += 4 // s2.Path.Flags
- size += 4 // s2.Path.Proto
- size += 1 * 16 // s2.Path.Nh.Address
- size += 4 // s2.Path.Nh.ViaLabel
- size += 4 // s2.Path.Nh.ObjID
- size += 4 // s2.Path.Nh.ClassifyTableIndex
- size += 1 // s2.Path.NLabels
- for j4 := 0; j4 < 16; j4++ {
- size += 1 // s2.Path.LabelStack[j4].IsUniform
- size += 4 // s2.Path.LabelStack[j4].Label
- size += 1 // s2.Path.LabelStack[j4].TTL
- size += 1 // s2.Path.LabelStack[j4].Exp
- }
- }
- return size
-}
-func (m *IPMrouteAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeBool(m.IsMultipath)
- buf.EncodeUint32(m.Route.TableID)
- buf.EncodeUint32(m.Route.EntryFlags)
- buf.EncodeUint32(m.Route.RpfID)
- buf.EncodeUint32(uint32(m.Route.Prefix.Af))
- buf.EncodeUint16(m.Route.Prefix.GrpAddressLength)
- buf.EncodeBytes(m.Route.Prefix.GrpAddress.XXX_UnionData[:], 16)
- buf.EncodeBytes(m.Route.Prefix.SrcAddress.XXX_UnionData[:], 16)
- buf.EncodeUint8(uint8(len(m.Route.Paths)))
- for j1 := 0; j1 < len(m.Route.Paths); j1++ {
- var v1 MfibPath // Paths
- if j1 < len(m.Route.Paths) {
- v1 = m.Route.Paths[j1]
- }
- buf.EncodeUint32(uint32(v1.ItfFlags))
- buf.EncodeUint32(v1.Path.SwIfIndex)
- buf.EncodeUint32(v1.Path.TableID)
- buf.EncodeUint32(v1.Path.RpfID)
- buf.EncodeUint8(v1.Path.Weight)
- buf.EncodeUint8(v1.Path.Preference)
- buf.EncodeUint32(uint32(v1.Path.Type))
- buf.EncodeUint32(uint32(v1.Path.Flags))
- buf.EncodeUint32(uint32(v1.Path.Proto))
- buf.EncodeBytes(v1.Path.Nh.Address.XXX_UnionData[:], 16)
- buf.EncodeUint32(v1.Path.Nh.ViaLabel)
- buf.EncodeUint32(v1.Path.Nh.ObjID)
- buf.EncodeUint32(v1.Path.Nh.ClassifyTableIndex)
- buf.EncodeUint8(v1.Path.NLabels)
- for j3 := 0; j3 < 16; j3++ {
- buf.EncodeUint8(v1.Path.LabelStack[j3].IsUniform)
- buf.EncodeUint32(v1.Path.LabelStack[j3].Label)
- buf.EncodeUint8(v1.Path.LabelStack[j3].TTL)
- buf.EncodeUint8(v1.Path.LabelStack[j3].Exp)
- }
- }
- return buf.Bytes(), nil
-}
-func (m *IPMrouteAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.IsMultipath = buf.DecodeBool()
- m.Route.TableID = buf.DecodeUint32()
- m.Route.EntryFlags = buf.DecodeUint32()
- m.Route.RpfID = buf.DecodeUint32()
- m.Route.Prefix.Af = AddressFamily(buf.DecodeUint32())
- m.Route.Prefix.GrpAddressLength = buf.DecodeUint16()
- copy(m.Route.Prefix.GrpAddress.XXX_UnionData[:], buf.DecodeBytes(16))
- copy(m.Route.Prefix.SrcAddress.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Route.NPaths = buf.DecodeUint8()
- m.Route.Paths = make([]MfibPath, m.Route.NPaths)
- for j1 := 0; j1 < len(m.Route.Paths); j1++ {
- m.Route.Paths[j1].ItfFlags = MfibItfFlags(buf.DecodeUint32())
- m.Route.Paths[j1].Path.SwIfIndex = buf.DecodeUint32()
- m.Route.Paths[j1].Path.TableID = buf.DecodeUint32()
- m.Route.Paths[j1].Path.RpfID = buf.DecodeUint32()
- m.Route.Paths[j1].Path.Weight = buf.DecodeUint8()
- m.Route.Paths[j1].Path.Preference = buf.DecodeUint8()
- m.Route.Paths[j1].Path.Type = FibPathType(buf.DecodeUint32())
- m.Route.Paths[j1].Path.Flags = FibPathFlags(buf.DecodeUint32())
- m.Route.Paths[j1].Path.Proto = FibPathNhProto(buf.DecodeUint32())
- copy(m.Route.Paths[j1].Path.Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Route.Paths[j1].Path.Nh.ViaLabel = buf.DecodeUint32()
- m.Route.Paths[j1].Path.Nh.ObjID = buf.DecodeUint32()
- m.Route.Paths[j1].Path.Nh.ClassifyTableIndex = buf.DecodeUint32()
- m.Route.Paths[j1].Path.NLabels = buf.DecodeUint8()
- for j3 := 0; j3 < 16; j3++ {
- m.Route.Paths[j1].Path.LabelStack[j3].IsUniform = buf.DecodeUint8()
- m.Route.Paths[j1].Path.LabelStack[j3].Label = buf.DecodeUint32()
- m.Route.Paths[j1].Path.LabelStack[j3].TTL = buf.DecodeUint8()
- m.Route.Paths[j1].Path.LabelStack[j3].Exp = buf.DecodeUint8()
- }
- }
- return nil
-}
-
-// IPMrouteAddDelReply defines message 'ip_mroute_add_del_reply'.
-type IPMrouteAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
-}
-
-func (m *IPMrouteAddDelReply) Reset() { *m = IPMrouteAddDelReply{} }
-func (*IPMrouteAddDelReply) GetMessageName() string { return "ip_mroute_add_del_reply" }
-func (*IPMrouteAddDelReply) GetCrcString() string { return "1992deab" }
-func (*IPMrouteAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IPMrouteAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.StatsIndex
- return size
-}
-func (m *IPMrouteAddDelReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.StatsIndex)
- return buf.Bytes(), nil
-}
-func (m *IPMrouteAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.StatsIndex = buf.DecodeUint32()
- return nil
-}
-
-// IPMrouteDetails defines message 'ip_mroute_details'.
-type IPMrouteDetails struct {
- Route IPMroute `binapi:"ip_mroute,name=route" json:"route,omitempty"`
-}
-
-func (m *IPMrouteDetails) Reset() { *m = IPMrouteDetails{} }
-func (*IPMrouteDetails) GetMessageName() string { return "ip_mroute_details" }
-func (*IPMrouteDetails) GetCrcString() string { return "c1cb4b44" }
-func (*IPMrouteDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IPMrouteDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Route.TableID
- size += 4 // m.Route.EntryFlags
- size += 4 // m.Route.RpfID
- size += 4 // m.Route.Prefix.Af
- size += 2 // m.Route.Prefix.GrpAddressLength
- size += 1 * 16 // m.Route.Prefix.GrpAddress
- size += 1 * 16 // m.Route.Prefix.SrcAddress
- size += 1 // m.Route.NPaths
- for j2 := 0; j2 < len(m.Route.Paths); j2++ {
- var s2 MfibPath
- _ = s2
- if j2 < len(m.Route.Paths) {
- s2 = m.Route.Paths[j2]
- }
- size += 4 // s2.ItfFlags
- size += 4 // s2.Path.SwIfIndex
- size += 4 // s2.Path.TableID
- size += 4 // s2.Path.RpfID
- size += 1 // s2.Path.Weight
- size += 1 // s2.Path.Preference
- size += 4 // s2.Path.Type
- size += 4 // s2.Path.Flags
- size += 4 // s2.Path.Proto
- size += 1 * 16 // s2.Path.Nh.Address
- size += 4 // s2.Path.Nh.ViaLabel
- size += 4 // s2.Path.Nh.ObjID
- size += 4 // s2.Path.Nh.ClassifyTableIndex
- size += 1 // s2.Path.NLabels
- for j4 := 0; j4 < 16; j4++ {
- size += 1 // s2.Path.LabelStack[j4].IsUniform
- size += 4 // s2.Path.LabelStack[j4].Label
- size += 1 // s2.Path.LabelStack[j4].TTL
- size += 1 // s2.Path.LabelStack[j4].Exp
- }
- }
- return size
-}
-func (m *IPMrouteDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Route.TableID)
- buf.EncodeUint32(m.Route.EntryFlags)
- buf.EncodeUint32(m.Route.RpfID)
- buf.EncodeUint32(uint32(m.Route.Prefix.Af))
- buf.EncodeUint16(m.Route.Prefix.GrpAddressLength)
- buf.EncodeBytes(m.Route.Prefix.GrpAddress.XXX_UnionData[:], 16)
- buf.EncodeBytes(m.Route.Prefix.SrcAddress.XXX_UnionData[:], 16)
- buf.EncodeUint8(uint8(len(m.Route.Paths)))
- for j1 := 0; j1 < len(m.Route.Paths); j1++ {
- var v1 MfibPath // Paths
- if j1 < len(m.Route.Paths) {
- v1 = m.Route.Paths[j1]
- }
- buf.EncodeUint32(uint32(v1.ItfFlags))
- buf.EncodeUint32(v1.Path.SwIfIndex)
- buf.EncodeUint32(v1.Path.TableID)
- buf.EncodeUint32(v1.Path.RpfID)
- buf.EncodeUint8(v1.Path.Weight)
- buf.EncodeUint8(v1.Path.Preference)
- buf.EncodeUint32(uint32(v1.Path.Type))
- buf.EncodeUint32(uint32(v1.Path.Flags))
- buf.EncodeUint32(uint32(v1.Path.Proto))
- buf.EncodeBytes(v1.Path.Nh.Address.XXX_UnionData[:], 16)
- buf.EncodeUint32(v1.Path.Nh.ViaLabel)
- buf.EncodeUint32(v1.Path.Nh.ObjID)
- buf.EncodeUint32(v1.Path.Nh.ClassifyTableIndex)
- buf.EncodeUint8(v1.Path.NLabels)
- for j3 := 0; j3 < 16; j3++ {
- buf.EncodeUint8(v1.Path.LabelStack[j3].IsUniform)
- buf.EncodeUint32(v1.Path.LabelStack[j3].Label)
- buf.EncodeUint8(v1.Path.LabelStack[j3].TTL)
- buf.EncodeUint8(v1.Path.LabelStack[j3].Exp)
- }
- }
- return buf.Bytes(), nil
-}
-func (m *IPMrouteDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Route.TableID = buf.DecodeUint32()
- m.Route.EntryFlags = buf.DecodeUint32()
- m.Route.RpfID = buf.DecodeUint32()
- m.Route.Prefix.Af = AddressFamily(buf.DecodeUint32())
- m.Route.Prefix.GrpAddressLength = buf.DecodeUint16()
- copy(m.Route.Prefix.GrpAddress.XXX_UnionData[:], buf.DecodeBytes(16))
- copy(m.Route.Prefix.SrcAddress.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Route.NPaths = buf.DecodeUint8()
- m.Route.Paths = make([]MfibPath, m.Route.NPaths)
- for j1 := 0; j1 < len(m.Route.Paths); j1++ {
- m.Route.Paths[j1].ItfFlags = MfibItfFlags(buf.DecodeUint32())
- m.Route.Paths[j1].Path.SwIfIndex = buf.DecodeUint32()
- m.Route.Paths[j1].Path.TableID = buf.DecodeUint32()
- m.Route.Paths[j1].Path.RpfID = buf.DecodeUint32()
- m.Route.Paths[j1].Path.Weight = buf.DecodeUint8()
- m.Route.Paths[j1].Path.Preference = buf.DecodeUint8()
- m.Route.Paths[j1].Path.Type = FibPathType(buf.DecodeUint32())
- m.Route.Paths[j1].Path.Flags = FibPathFlags(buf.DecodeUint32())
- m.Route.Paths[j1].Path.Proto = FibPathNhProto(buf.DecodeUint32())
- copy(m.Route.Paths[j1].Path.Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Route.Paths[j1].Path.Nh.ViaLabel = buf.DecodeUint32()
- m.Route.Paths[j1].Path.Nh.ObjID = buf.DecodeUint32()
- m.Route.Paths[j1].Path.Nh.ClassifyTableIndex = buf.DecodeUint32()
- m.Route.Paths[j1].Path.NLabels = buf.DecodeUint8()
- for j3 := 0; j3 < 16; j3++ {
- m.Route.Paths[j1].Path.LabelStack[j3].IsUniform = buf.DecodeUint8()
- m.Route.Paths[j1].Path.LabelStack[j3].Label = buf.DecodeUint32()
- m.Route.Paths[j1].Path.LabelStack[j3].TTL = buf.DecodeUint8()
- m.Route.Paths[j1].Path.LabelStack[j3].Exp = buf.DecodeUint8()
- }
- }
- return nil
-}
-
-// IPMrouteDump defines message 'ip_mroute_dump'.
-type IPMrouteDump struct {
- Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
-}
-
-func (m *IPMrouteDump) Reset() { *m = IPMrouteDump{} }
-func (*IPMrouteDump) GetMessageName() string { return "ip_mroute_dump" }
-func (*IPMrouteDump) GetCrcString() string { return "b9d2e09e" }
-func (*IPMrouteDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IPMrouteDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Table.TableID
- size += 1 // m.Table.IsIP6
- size += 64 // m.Table.Name
- return size
-}
-func (m *IPMrouteDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Table.TableID)
- buf.EncodeBool(m.Table.IsIP6)
- buf.EncodeString(m.Table.Name, 64)
- return buf.Bytes(), nil
-}
-func (m *IPMrouteDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Table.TableID = buf.DecodeUint32()
- m.Table.IsIP6 = buf.DecodeBool()
- m.Table.Name = buf.DecodeString(64)
- return nil
-}
-
-// IPMtableDetails defines message 'ip_mtable_details'.
-type IPMtableDetails struct {
- Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
-}
-
-func (m *IPMtableDetails) Reset() { *m = IPMtableDetails{} }
-func (*IPMtableDetails) GetMessageName() string { return "ip_mtable_details" }
-func (*IPMtableDetails) GetCrcString() string { return "b9d2e09e" }
-func (*IPMtableDetails) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IPMtableDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Table.TableID
- size += 1 // m.Table.IsIP6
- size += 64 // m.Table.Name
- return size
-}
-func (m *IPMtableDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Table.TableID)
- buf.EncodeBool(m.Table.IsIP6)
- buf.EncodeString(m.Table.Name, 64)
- return buf.Bytes(), nil
-}
-func (m *IPMtableDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Table.TableID = buf.DecodeUint32()
- m.Table.IsIP6 = buf.DecodeBool()
- m.Table.Name = buf.DecodeString(64)
- return nil
-}
-
-// IPMtableDump defines message 'ip_mtable_dump'.
-type IPMtableDump struct{}
-
-func (m *IPMtableDump) Reset() { *m = IPMtableDump{} }
-func (*IPMtableDump) GetMessageName() string { return "ip_mtable_dump" }
-func (*IPMtableDump) GetCrcString() string { return "51077d14" }
-func (*IPMtableDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IPMtableDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *IPMtableDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *IPMtableDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// IPPuntPolice defines message 'ip_punt_police'.
-type IPPuntPolice struct {
- PolicerIndex uint32 `binapi:"u32,name=policer_index" json:"policer_index,omitempty"`
- IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
- IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
-}
-
-func (m *IPPuntPolice) Reset() { *m = IPPuntPolice{} }
-func (*IPPuntPolice) GetMessageName() string { return "ip_punt_police" }
-func (*IPPuntPolice) GetCrcString() string { return "db867cea" }
-func (*IPPuntPolice) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IPPuntPolice) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.PolicerIndex
- size += 1 // m.IsAdd
- size += 1 // m.IsIP6
- return size
-}
-func (m *IPPuntPolice) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.PolicerIndex)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeBool(m.IsIP6)
- return buf.Bytes(), nil
-}
-func (m *IPPuntPolice) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.PolicerIndex = buf.DecodeUint32()
- m.IsAdd = buf.DecodeBool()
- m.IsIP6 = buf.DecodeBool()
- return nil
-}
-
-// IPPuntPoliceReply defines message 'ip_punt_police_reply'.
-type IPPuntPoliceReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *IPPuntPoliceReply) Reset() { *m = IPPuntPoliceReply{} }
-func (*IPPuntPoliceReply) GetMessageName() string { return "ip_punt_police_reply" }
-func (*IPPuntPoliceReply) GetCrcString() string { return "e8d4e804" }
-func (*IPPuntPoliceReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IPPuntPoliceReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *IPPuntPoliceReply) 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 *IPPuntPoliceReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// IPPuntRedirect defines message 'ip_punt_redirect'.
-type IPPuntRedirect struct {
- Punt PuntRedirect `binapi:"punt_redirect,name=punt" json:"punt,omitempty"`
- IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
-}
-
-func (m *IPPuntRedirect) Reset() { *m = IPPuntRedirect{} }
-func (*IPPuntRedirect) GetMessageName() string { return "ip_punt_redirect" }
-func (*IPPuntRedirect) GetCrcString() string { return "a9a5592c" }
-func (*IPPuntRedirect) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IPPuntRedirect) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Punt.RxSwIfIndex
- size += 4 // m.Punt.TxSwIfIndex
- size += 4 // m.Punt.Nh.Af
- size += 1 * 16 // m.Punt.Nh.Un
- size += 1 // m.IsAdd
- return size
-}
-func (m *IPPuntRedirect) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.Punt.RxSwIfIndex))
- buf.EncodeUint32(uint32(m.Punt.TxSwIfIndex))
- buf.EncodeUint32(uint32(m.Punt.Nh.Af))
- buf.EncodeBytes(m.Punt.Nh.Un.XXX_UnionData[:], 16)
- buf.EncodeBool(m.IsAdd)
- return buf.Bytes(), nil
-}
-func (m *IPPuntRedirect) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Punt.RxSwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Punt.TxSwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Punt.Nh.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Punt.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.IsAdd = buf.DecodeBool()
- return nil
-}
-
-// IPPuntRedirectDetails defines message 'ip_punt_redirect_details'.
-type IPPuntRedirectDetails struct {
- Punt PuntRedirect `binapi:"punt_redirect,name=punt" json:"punt,omitempty"`
-}
-
-func (m *IPPuntRedirectDetails) Reset() { *m = IPPuntRedirectDetails{} }
-func (*IPPuntRedirectDetails) GetMessageName() string { return "ip_punt_redirect_details" }
-func (*IPPuntRedirectDetails) GetCrcString() string { return "3924f5d3" }
-func (*IPPuntRedirectDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IPPuntRedirectDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Punt.RxSwIfIndex
- size += 4 // m.Punt.TxSwIfIndex
- size += 4 // m.Punt.Nh.Af
- size += 1 * 16 // m.Punt.Nh.Un
- return size
-}
-func (m *IPPuntRedirectDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.Punt.RxSwIfIndex))
- buf.EncodeUint32(uint32(m.Punt.TxSwIfIndex))
- buf.EncodeUint32(uint32(m.Punt.Nh.Af))
- buf.EncodeBytes(m.Punt.Nh.Un.XXX_UnionData[:], 16)
- return buf.Bytes(), nil
-}
-func (m *IPPuntRedirectDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Punt.RxSwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Punt.TxSwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Punt.Nh.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Punt.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- return nil
-}
-
-// IPPuntRedirectDump defines message 'ip_punt_redirect_dump'.
-type IPPuntRedirectDump struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
-}
-
-func (m *IPPuntRedirectDump) Reset() { *m = IPPuntRedirectDump{} }
-func (*IPPuntRedirectDump) GetMessageName() string { return "ip_punt_redirect_dump" }
-func (*IPPuntRedirectDump) GetCrcString() string { return "2d033de4" }
-func (*IPPuntRedirectDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IPPuntRedirectDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.IsIPv6
- return size
-}
-func (m *IPPuntRedirectDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeBool(m.IsIPv6)
- return buf.Bytes(), nil
-}
-func (m *IPPuntRedirectDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.IsIPv6 = buf.DecodeBool()
- return nil
-}
-
-// IPPuntRedirectReply defines message 'ip_punt_redirect_reply'.
-type IPPuntRedirectReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *IPPuntRedirectReply) Reset() { *m = IPPuntRedirectReply{} }
-func (*IPPuntRedirectReply) GetMessageName() string { return "ip_punt_redirect_reply" }
-func (*IPPuntRedirectReply) GetCrcString() string { return "e8d4e804" }
-func (*IPPuntRedirectReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IPPuntRedirectReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *IPPuntRedirectReply) 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 *IPPuntRedirectReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// IPReassemblyEnableDisable defines message 'ip_reassembly_enable_disable'.
-type IPReassemblyEnableDisable struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- EnableIP4 bool `binapi:"bool,name=enable_ip4" json:"enable_ip4,omitempty"`
- EnableIP6 bool `binapi:"bool,name=enable_ip6" json:"enable_ip6,omitempty"`
- Type IPReassType `binapi:"ip_reass_type,name=type" json:"type,omitempty"`
-}
-
-func (m *IPReassemblyEnableDisable) Reset() { *m = IPReassemblyEnableDisable{} }
-func (*IPReassemblyEnableDisable) GetMessageName() string { return "ip_reassembly_enable_disable" }
-func (*IPReassemblyEnableDisable) GetCrcString() string { return "885c85a6" }
-func (*IPReassemblyEnableDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IPReassemblyEnableDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.EnableIP4
- size += 1 // m.EnableIP6
- size += 4 // m.Type
- return size
-}
-func (m *IPReassemblyEnableDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeBool(m.EnableIP4)
- buf.EncodeBool(m.EnableIP6)
- buf.EncodeUint32(uint32(m.Type))
- return buf.Bytes(), nil
-}
-func (m *IPReassemblyEnableDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.EnableIP4 = buf.DecodeBool()
- m.EnableIP6 = buf.DecodeBool()
- m.Type = IPReassType(buf.DecodeUint32())
- return nil
-}
-
-// IPReassemblyEnableDisableReply defines message 'ip_reassembly_enable_disable_reply'.
-type IPReassemblyEnableDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *IPReassemblyEnableDisableReply) Reset() { *m = IPReassemblyEnableDisableReply{} }
-func (*IPReassemblyEnableDisableReply) GetMessageName() string {
- return "ip_reassembly_enable_disable_reply"
-}
-func (*IPReassemblyEnableDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*IPReassemblyEnableDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IPReassemblyEnableDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *IPReassemblyEnableDisableReply) 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 *IPReassemblyEnableDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// IPReassemblyGet defines message 'ip_reassembly_get'.
-type IPReassemblyGet struct {
- IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
- Type IPReassType `binapi:"ip_reass_type,name=type" json:"type,omitempty"`
-}
-
-func (m *IPReassemblyGet) Reset() { *m = IPReassemblyGet{} }
-func (*IPReassemblyGet) GetMessageName() string { return "ip_reassembly_get" }
-func (*IPReassemblyGet) GetCrcString() string { return "ea13ff63" }
-func (*IPReassemblyGet) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IPReassemblyGet) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsIP6
- size += 4 // m.Type
- return size
-}
-func (m *IPReassemblyGet) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsIP6)
- buf.EncodeUint32(uint32(m.Type))
- return buf.Bytes(), nil
-}
-func (m *IPReassemblyGet) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsIP6 = buf.DecodeBool()
- m.Type = IPReassType(buf.DecodeUint32())
- return nil
-}
-
-// IPReassemblyGetReply defines message 'ip_reassembly_get_reply'.
-type IPReassemblyGetReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- TimeoutMs uint32 `binapi:"u32,name=timeout_ms" json:"timeout_ms,omitempty"`
- MaxReassemblies uint32 `binapi:"u32,name=max_reassemblies" json:"max_reassemblies,omitempty"`
- MaxReassemblyLength uint32 `binapi:"u32,name=max_reassembly_length" json:"max_reassembly_length,omitempty"`
- ExpireWalkIntervalMs uint32 `binapi:"u32,name=expire_walk_interval_ms" json:"expire_walk_interval_ms,omitempty"`
- IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
-}
-
-func (m *IPReassemblyGetReply) Reset() { *m = IPReassemblyGetReply{} }
-func (*IPReassemblyGetReply) GetMessageName() string { return "ip_reassembly_get_reply" }
-func (*IPReassemblyGetReply) GetCrcString() string { return "d5eb8d34" }
-func (*IPReassemblyGetReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IPReassemblyGetReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.TimeoutMs
- size += 4 // m.MaxReassemblies
- size += 4 // m.MaxReassemblyLength
- size += 4 // m.ExpireWalkIntervalMs
- size += 1 // m.IsIP6
- return size
-}
-func (m *IPReassemblyGetReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.TimeoutMs)
- buf.EncodeUint32(m.MaxReassemblies)
- buf.EncodeUint32(m.MaxReassemblyLength)
- buf.EncodeUint32(m.ExpireWalkIntervalMs)
- buf.EncodeBool(m.IsIP6)
- return buf.Bytes(), nil
-}
-func (m *IPReassemblyGetReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.TimeoutMs = buf.DecodeUint32()
- m.MaxReassemblies = buf.DecodeUint32()
- m.MaxReassemblyLength = buf.DecodeUint32()
- m.ExpireWalkIntervalMs = buf.DecodeUint32()
- m.IsIP6 = buf.DecodeBool()
- return nil
-}
-
-// IPReassemblySet defines message 'ip_reassembly_set'.
-type IPReassemblySet struct {
- TimeoutMs uint32 `binapi:"u32,name=timeout_ms" json:"timeout_ms,omitempty"`
- MaxReassemblies uint32 `binapi:"u32,name=max_reassemblies" json:"max_reassemblies,omitempty"`
- MaxReassemblyLength uint32 `binapi:"u32,name=max_reassembly_length" json:"max_reassembly_length,omitempty"`
- ExpireWalkIntervalMs uint32 `binapi:"u32,name=expire_walk_interval_ms" json:"expire_walk_interval_ms,omitempty"`
- IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
- Type IPReassType `binapi:"ip_reass_type,name=type" json:"type,omitempty"`
-}
-
-func (m *IPReassemblySet) Reset() { *m = IPReassemblySet{} }
-func (*IPReassemblySet) GetMessageName() string { return "ip_reassembly_set" }
-func (*IPReassemblySet) GetCrcString() string { return "16467d25" }
-func (*IPReassemblySet) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IPReassemblySet) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.TimeoutMs
- size += 4 // m.MaxReassemblies
- size += 4 // m.MaxReassemblyLength
- size += 4 // m.ExpireWalkIntervalMs
- size += 1 // m.IsIP6
- size += 4 // m.Type
- return size
-}
-func (m *IPReassemblySet) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.TimeoutMs)
- buf.EncodeUint32(m.MaxReassemblies)
- buf.EncodeUint32(m.MaxReassemblyLength)
- buf.EncodeUint32(m.ExpireWalkIntervalMs)
- buf.EncodeBool(m.IsIP6)
- buf.EncodeUint32(uint32(m.Type))
- return buf.Bytes(), nil
-}
-func (m *IPReassemblySet) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.TimeoutMs = buf.DecodeUint32()
- m.MaxReassemblies = buf.DecodeUint32()
- m.MaxReassemblyLength = buf.DecodeUint32()
- m.ExpireWalkIntervalMs = buf.DecodeUint32()
- m.IsIP6 = buf.DecodeBool()
- m.Type = IPReassType(buf.DecodeUint32())
- return nil
-}
-
-// IPReassemblySetReply defines message 'ip_reassembly_set_reply'.
-type IPReassemblySetReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *IPReassemblySetReply) Reset() { *m = IPReassemblySetReply{} }
-func (*IPReassemblySetReply) GetMessageName() string { return "ip_reassembly_set_reply" }
-func (*IPReassemblySetReply) GetCrcString() string { return "e8d4e804" }
-func (*IPReassemblySetReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IPReassemblySetReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *IPReassemblySetReply) 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 *IPReassemblySetReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// IPRouteAddDel defines message 'ip_route_add_del'.
-type IPRouteAddDel struct {
- IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
- IsMultipath bool `binapi:"bool,name=is_multipath" json:"is_multipath,omitempty"`
- Route IPRoute `binapi:"ip_route,name=route" json:"route,omitempty"`
-}
-
-func (m *IPRouteAddDel) Reset() { *m = IPRouteAddDel{} }
-func (*IPRouteAddDel) GetMessageName() string { return "ip_route_add_del" }
-func (*IPRouteAddDel) GetCrcString() string { return "c1ff832d" }
-func (*IPRouteAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IPRouteAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 1 // m.IsMultipath
- size += 4 // m.Route.TableID
- size += 4 // m.Route.StatsIndex
- size += 4 // m.Route.Prefix.Address.Af
- size += 1 * 16 // m.Route.Prefix.Address.Un
- size += 1 // m.Route.Prefix.Len
- size += 1 // m.Route.NPaths
- for j2 := 0; j2 < len(m.Route.Paths); j2++ {
- var s2 FibPath
- _ = s2
- if j2 < len(m.Route.Paths) {
- s2 = m.Route.Paths[j2]
- }
- size += 4 // s2.SwIfIndex
- size += 4 // s2.TableID
- size += 4 // s2.RpfID
- size += 1 // s2.Weight
- size += 1 // s2.Preference
- size += 4 // s2.Type
- size += 4 // s2.Flags
- size += 4 // s2.Proto
- size += 1 * 16 // s2.Nh.Address
- size += 4 // s2.Nh.ViaLabel
- size += 4 // s2.Nh.ObjID
- size += 4 // s2.Nh.ClassifyTableIndex
- size += 1 // s2.NLabels
- for j3 := 0; j3 < 16; j3++ {
- size += 1 // s2.LabelStack[j3].IsUniform
- size += 4 // s2.LabelStack[j3].Label
- size += 1 // s2.LabelStack[j3].TTL
- size += 1 // s2.LabelStack[j3].Exp
- }
- }
- return size
-}
-func (m *IPRouteAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeBool(m.IsMultipath)
- buf.EncodeUint32(m.Route.TableID)
- buf.EncodeUint32(m.Route.StatsIndex)
- buf.EncodeUint32(uint32(m.Route.Prefix.Address.Af))
- buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16)
- buf.EncodeUint8(m.Route.Prefix.Len)
- buf.EncodeUint8(uint8(len(m.Route.Paths)))
- for j1 := 0; j1 < len(m.Route.Paths); j1++ {
- var v1 FibPath // Paths
- if j1 < len(m.Route.Paths) {
- v1 = m.Route.Paths[j1]
- }
- buf.EncodeUint32(v1.SwIfIndex)
- buf.EncodeUint32(v1.TableID)
- buf.EncodeUint32(v1.RpfID)
- buf.EncodeUint8(v1.Weight)
- buf.EncodeUint8(v1.Preference)
- buf.EncodeUint32(uint32(v1.Type))
- buf.EncodeUint32(uint32(v1.Flags))
- buf.EncodeUint32(uint32(v1.Proto))
- buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
- buf.EncodeUint32(v1.Nh.ViaLabel)
- buf.EncodeUint32(v1.Nh.ObjID)
- buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
- buf.EncodeUint8(v1.NLabels)
- for j2 := 0; j2 < 16; j2++ {
- buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
- buf.EncodeUint32(v1.LabelStack[j2].Label)
- buf.EncodeUint8(v1.LabelStack[j2].TTL)
- buf.EncodeUint8(v1.LabelStack[j2].Exp)
- }
- }
- return buf.Bytes(), nil
-}
-func (m *IPRouteAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.IsMultipath = buf.DecodeBool()
- m.Route.TableID = buf.DecodeUint32()
- m.Route.StatsIndex = buf.DecodeUint32()
- m.Route.Prefix.Address.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Route.Prefix.Len = buf.DecodeUint8()
- m.Route.NPaths = buf.DecodeUint8()
- m.Route.Paths = make([]FibPath, m.Route.NPaths)
- for j1 := 0; j1 < len(m.Route.Paths); j1++ {
- m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32()
- m.Route.Paths[j1].TableID = buf.DecodeUint32()
- m.Route.Paths[j1].RpfID = buf.DecodeUint32()
- m.Route.Paths[j1].Weight = buf.DecodeUint8()
- m.Route.Paths[j1].Preference = buf.DecodeUint8()
- m.Route.Paths[j1].Type = FibPathType(buf.DecodeUint32())
- m.Route.Paths[j1].Flags = FibPathFlags(buf.DecodeUint32())
- m.Route.Paths[j1].Proto = FibPathNhProto(buf.DecodeUint32())
- copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
- m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32()
- m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
- m.Route.Paths[j1].NLabels = buf.DecodeUint8()
- for j2 := 0; j2 < 16; j2++ {
- m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
- m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
- m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
- m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
- }
- }
- return nil
-}
-
-// IPRouteAddDelReply defines message 'ip_route_add_del_reply'.
-type IPRouteAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
-}
-
-func (m *IPRouteAddDelReply) Reset() { *m = IPRouteAddDelReply{} }
-func (*IPRouteAddDelReply) GetMessageName() string { return "ip_route_add_del_reply" }
-func (*IPRouteAddDelReply) GetCrcString() string { return "1992deab" }
-func (*IPRouteAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IPRouteAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.StatsIndex
- return size
-}
-func (m *IPRouteAddDelReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.StatsIndex)
- return buf.Bytes(), nil
-}
-func (m *IPRouteAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.StatsIndex = buf.DecodeUint32()
- return nil
-}
-
-// IPRouteDetails defines message 'ip_route_details'.
-type IPRouteDetails struct {
- Route IPRoute `binapi:"ip_route,name=route" json:"route,omitempty"`
-}
-
-func (m *IPRouteDetails) Reset() { *m = IPRouteDetails{} }
-func (*IPRouteDetails) GetMessageName() string { return "ip_route_details" }
-func (*IPRouteDetails) GetCrcString() string { return "d1ffaae1" }
-func (*IPRouteDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IPRouteDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Route.TableID
- size += 4 // m.Route.StatsIndex
- size += 4 // m.Route.Prefix.Address.Af
- size += 1 * 16 // m.Route.Prefix.Address.Un
- size += 1 // m.Route.Prefix.Len
- size += 1 // m.Route.NPaths
- for j2 := 0; j2 < len(m.Route.Paths); j2++ {
- var s2 FibPath
- _ = s2
- if j2 < len(m.Route.Paths) {
- s2 = m.Route.Paths[j2]
- }
- size += 4 // s2.SwIfIndex
- size += 4 // s2.TableID
- size += 4 // s2.RpfID
- size += 1 // s2.Weight
- size += 1 // s2.Preference
- size += 4 // s2.Type
- size += 4 // s2.Flags
- size += 4 // s2.Proto
- size += 1 * 16 // s2.Nh.Address
- size += 4 // s2.Nh.ViaLabel
- size += 4 // s2.Nh.ObjID
- size += 4 // s2.Nh.ClassifyTableIndex
- size += 1 // s2.NLabels
- for j3 := 0; j3 < 16; j3++ {
- size += 1 // s2.LabelStack[j3].IsUniform
- size += 4 // s2.LabelStack[j3].Label
- size += 1 // s2.LabelStack[j3].TTL
- size += 1 // s2.LabelStack[j3].Exp
- }
- }
- return size
-}
-func (m *IPRouteDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Route.TableID)
- buf.EncodeUint32(m.Route.StatsIndex)
- buf.EncodeUint32(uint32(m.Route.Prefix.Address.Af))
- buf.EncodeBytes(m.Route.Prefix.Address.Un.XXX_UnionData[:], 16)
- buf.EncodeUint8(m.Route.Prefix.Len)
- buf.EncodeUint8(uint8(len(m.Route.Paths)))
- for j1 := 0; j1 < len(m.Route.Paths); j1++ {
- var v1 FibPath // Paths
- if j1 < len(m.Route.Paths) {
- v1 = m.Route.Paths[j1]
- }
- buf.EncodeUint32(v1.SwIfIndex)
- buf.EncodeUint32(v1.TableID)
- buf.EncodeUint32(v1.RpfID)
- buf.EncodeUint8(v1.Weight)
- buf.EncodeUint8(v1.Preference)
- buf.EncodeUint32(uint32(v1.Type))
- buf.EncodeUint32(uint32(v1.Flags))
- buf.EncodeUint32(uint32(v1.Proto))
- buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
- buf.EncodeUint32(v1.Nh.ViaLabel)
- buf.EncodeUint32(v1.Nh.ObjID)
- buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
- buf.EncodeUint8(v1.NLabels)
- for j2 := 0; j2 < 16; j2++ {
- buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
- buf.EncodeUint32(v1.LabelStack[j2].Label)
- buf.EncodeUint8(v1.LabelStack[j2].TTL)
- buf.EncodeUint8(v1.LabelStack[j2].Exp)
- }
- }
- return buf.Bytes(), nil
-}
-func (m *IPRouteDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Route.TableID = buf.DecodeUint32()
- m.Route.StatsIndex = buf.DecodeUint32()
- m.Route.Prefix.Address.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Route.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Route.Prefix.Len = buf.DecodeUint8()
- m.Route.NPaths = buf.DecodeUint8()
- m.Route.Paths = make([]FibPath, m.Route.NPaths)
- for j1 := 0; j1 < len(m.Route.Paths); j1++ {
- m.Route.Paths[j1].SwIfIndex = buf.DecodeUint32()
- m.Route.Paths[j1].TableID = buf.DecodeUint32()
- m.Route.Paths[j1].RpfID = buf.DecodeUint32()
- m.Route.Paths[j1].Weight = buf.DecodeUint8()
- m.Route.Paths[j1].Preference = buf.DecodeUint8()
- m.Route.Paths[j1].Type = FibPathType(buf.DecodeUint32())
- m.Route.Paths[j1].Flags = FibPathFlags(buf.DecodeUint32())
- m.Route.Paths[j1].Proto = FibPathNhProto(buf.DecodeUint32())
- copy(m.Route.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Route.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
- m.Route.Paths[j1].Nh.ObjID = buf.DecodeUint32()
- m.Route.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
- m.Route.Paths[j1].NLabels = buf.DecodeUint8()
- for j2 := 0; j2 < 16; j2++ {
- m.Route.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
- m.Route.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
- m.Route.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
- m.Route.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
- }
- }
- return nil
-}
-
-// IPRouteDump defines message 'ip_route_dump'.
-type IPRouteDump struct {
- Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
-}
-
-func (m *IPRouteDump) Reset() { *m = IPRouteDump{} }
-func (*IPRouteDump) GetMessageName() string { return "ip_route_dump" }
-func (*IPRouteDump) GetCrcString() string { return "b9d2e09e" }
-func (*IPRouteDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IPRouteDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Table.TableID
- size += 1 // m.Table.IsIP6
- size += 64 // m.Table.Name
- return size
-}
-func (m *IPRouteDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Table.TableID)
- buf.EncodeBool(m.Table.IsIP6)
- buf.EncodeString(m.Table.Name, 64)
- return buf.Bytes(), nil
-}
-func (m *IPRouteDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Table.TableID = buf.DecodeUint32()
- m.Table.IsIP6 = buf.DecodeBool()
- m.Table.Name = buf.DecodeString(64)
- return nil
-}
-
-// IPSourceAndPortRangeCheckAddDel defines message 'ip_source_and_port_range_check_add_del'.
-type IPSourceAndPortRangeCheckAddDel struct {
- IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
- Prefix Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
- NumberOfRanges uint8 `binapi:"u8,name=number_of_ranges" json:"number_of_ranges,omitempty"`
- LowPorts []uint16 `binapi:"u16[32],name=low_ports" json:"low_ports,omitempty"`
- HighPorts []uint16 `binapi:"u16[32],name=high_ports" json:"high_ports,omitempty"`
- VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
-}
-
-func (m *IPSourceAndPortRangeCheckAddDel) Reset() { *m = IPSourceAndPortRangeCheckAddDel{} }
-func (*IPSourceAndPortRangeCheckAddDel) GetMessageName() string {
- return "ip_source_and_port_range_check_add_del"
-}
-func (*IPSourceAndPortRangeCheckAddDel) GetCrcString() string { return "8bfc76f2" }
-func (*IPSourceAndPortRangeCheckAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IPSourceAndPortRangeCheckAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 4 // m.Prefix.Address.Af
- size += 1 * 16 // m.Prefix.Address.Un
- size += 1 // m.Prefix.Len
- size += 1 // m.NumberOfRanges
- size += 2 * 32 // m.LowPorts
- size += 2 * 32 // m.HighPorts
- size += 4 // m.VrfID
- return size
-}
-func (m *IPSourceAndPortRangeCheckAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeUint32(uint32(m.Prefix.Address.Af))
- buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
- buf.EncodeUint8(m.Prefix.Len)
- buf.EncodeUint8(m.NumberOfRanges)
- for i := 0; i < 32; i++ {
- var x uint16
- if i < len(m.LowPorts) {
- x = uint16(m.LowPorts[i])
- }
- buf.EncodeUint16(x)
- }
- for i := 0; i < 32; i++ {
- var x uint16
- if i < len(m.HighPorts) {
- x = uint16(m.HighPorts[i])
- }
- buf.EncodeUint16(x)
- }
- buf.EncodeUint32(m.VrfID)
- return buf.Bytes(), nil
-}
-func (m *IPSourceAndPortRangeCheckAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.Prefix.Address.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Prefix.Len = buf.DecodeUint8()
- m.NumberOfRanges = buf.DecodeUint8()
- m.LowPorts = make([]uint16, 32)
- for i := 0; i < len(m.LowPorts); i++ {
- m.LowPorts[i] = buf.DecodeUint16()
- }
- m.HighPorts = make([]uint16, 32)
- for i := 0; i < len(m.HighPorts); i++ {
- m.HighPorts[i] = buf.DecodeUint16()
- }
- m.VrfID = buf.DecodeUint32()
- return nil
-}
-
-// IPSourceAndPortRangeCheckAddDelReply defines message 'ip_source_and_port_range_check_add_del_reply'.
-type IPSourceAndPortRangeCheckAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *IPSourceAndPortRangeCheckAddDelReply) Reset() { *m = IPSourceAndPortRangeCheckAddDelReply{} }
-func (*IPSourceAndPortRangeCheckAddDelReply) GetMessageName() string {
- return "ip_source_and_port_range_check_add_del_reply"
-}
-func (*IPSourceAndPortRangeCheckAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*IPSourceAndPortRangeCheckAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IPSourceAndPortRangeCheckAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *IPSourceAndPortRangeCheckAddDelReply) 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 *IPSourceAndPortRangeCheckAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// IPSourceAndPortRangeCheckInterfaceAddDel defines message 'ip_source_and_port_range_check_interface_add_del'.
-type IPSourceAndPortRangeCheckInterfaceAddDel struct {
- IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- TCPInVrfID uint32 `binapi:"u32,name=tcp_in_vrf_id" json:"tcp_in_vrf_id,omitempty"`
- TCPOutVrfID uint32 `binapi:"u32,name=tcp_out_vrf_id" json:"tcp_out_vrf_id,omitempty"`
- UDPInVrfID uint32 `binapi:"u32,name=udp_in_vrf_id" json:"udp_in_vrf_id,omitempty"`
- UDPOutVrfID uint32 `binapi:"u32,name=udp_out_vrf_id" json:"udp_out_vrf_id,omitempty"`
-}
-
-func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Reset() {
- *m = IPSourceAndPortRangeCheckInterfaceAddDel{}
-}
-func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetMessageName() string {
- return "ip_source_and_port_range_check_interface_add_del"
-}
-func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetCrcString() string { return "e1ba8987" }
-func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 4 // m.SwIfIndex
- size += 4 // m.TCPInVrfID
- size += 4 // m.TCPOutVrfID
- size += 4 // m.UDPInVrfID
- size += 4 // m.UDPOutVrfID
- return size
-}
-func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(m.TCPInVrfID)
- buf.EncodeUint32(m.TCPOutVrfID)
- buf.EncodeUint32(m.UDPInVrfID)
- buf.EncodeUint32(m.UDPOutVrfID)
- return buf.Bytes(), nil
-}
-func (m *IPSourceAndPortRangeCheckInterfaceAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.TCPInVrfID = buf.DecodeUint32()
- m.TCPOutVrfID = buf.DecodeUint32()
- m.UDPInVrfID = buf.DecodeUint32()
- m.UDPOutVrfID = buf.DecodeUint32()
- return nil
-}
-
-// IPSourceAndPortRangeCheckInterfaceAddDelReply defines message 'ip_source_and_port_range_check_interface_add_del_reply'.
-type IPSourceAndPortRangeCheckInterfaceAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Reset() {
- *m = IPSourceAndPortRangeCheckInterfaceAddDelReply{}
-}
-func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetMessageName() string {
- return "ip_source_and_port_range_check_interface_add_del_reply"
-}
-func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *IPSourceAndPortRangeCheckInterfaceAddDelReply) 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 *IPSourceAndPortRangeCheckInterfaceAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// IPSourceCheckInterfaceAddDel defines message 'ip_source_check_interface_add_del'.
-type IPSourceCheckInterfaceAddDel struct {
- IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
- Loose bool `binapi:"bool,name=loose" json:"loose,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *IPSourceCheckInterfaceAddDel) Reset() { *m = IPSourceCheckInterfaceAddDel{} }
-func (*IPSourceCheckInterfaceAddDel) GetMessageName() string {
- return "ip_source_check_interface_add_del"
-}
-func (*IPSourceCheckInterfaceAddDel) GetCrcString() string { return "6612356b" }
-func (*IPSourceCheckInterfaceAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IPSourceCheckInterfaceAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 1 // m.Loose
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *IPSourceCheckInterfaceAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeBool(m.Loose)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- return buf.Bytes(), nil
-}
-func (m *IPSourceCheckInterfaceAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.Loose = buf.DecodeBool()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// IPSourceCheckInterfaceAddDelReply defines message 'ip_source_check_interface_add_del_reply'.
-type IPSourceCheckInterfaceAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *IPSourceCheckInterfaceAddDelReply) Reset() { *m = IPSourceCheckInterfaceAddDelReply{} }
-func (*IPSourceCheckInterfaceAddDelReply) GetMessageName() string {
- return "ip_source_check_interface_add_del_reply"
-}
-func (*IPSourceCheckInterfaceAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*IPSourceCheckInterfaceAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IPSourceCheckInterfaceAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *IPSourceCheckInterfaceAddDelReply) 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 *IPSourceCheckInterfaceAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// IPTableAddDel defines message 'ip_table_add_del'.
-type IPTableAddDel struct {
- IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
- Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
-}
-
-func (m *IPTableAddDel) Reset() { *m = IPTableAddDel{} }
-func (*IPTableAddDel) GetMessageName() string { return "ip_table_add_del" }
-func (*IPTableAddDel) GetCrcString() string { return "0ffdaec0" }
-func (*IPTableAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IPTableAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 4 // m.Table.TableID
- size += 1 // m.Table.IsIP6
- size += 64 // m.Table.Name
- return size
-}
-func (m *IPTableAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeUint32(m.Table.TableID)
- buf.EncodeBool(m.Table.IsIP6)
- buf.EncodeString(m.Table.Name, 64)
- return buf.Bytes(), nil
-}
-func (m *IPTableAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.Table.TableID = buf.DecodeUint32()
- m.Table.IsIP6 = buf.DecodeBool()
- m.Table.Name = buf.DecodeString(64)
- return nil
-}
-
-// IPTableAddDelReply defines message 'ip_table_add_del_reply'.
-type IPTableAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *IPTableAddDelReply) Reset() { *m = IPTableAddDelReply{} }
-func (*IPTableAddDelReply) GetMessageName() string { return "ip_table_add_del_reply" }
-func (*IPTableAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*IPTableAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IPTableAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *IPTableAddDelReply) 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 *IPTableAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// IPTableDetails defines message 'ip_table_details'.
-type IPTableDetails struct {
- Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
-}
-
-func (m *IPTableDetails) Reset() { *m = IPTableDetails{} }
-func (*IPTableDetails) GetMessageName() string { return "ip_table_details" }
-func (*IPTableDetails) GetCrcString() string { return "c79fca0f" }
-func (*IPTableDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IPTableDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Table.TableID
- size += 1 // m.Table.IsIP6
- size += 64 // m.Table.Name
- return size
-}
-func (m *IPTableDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Table.TableID)
- buf.EncodeBool(m.Table.IsIP6)
- buf.EncodeString(m.Table.Name, 64)
- return buf.Bytes(), nil
-}
-func (m *IPTableDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Table.TableID = buf.DecodeUint32()
- m.Table.IsIP6 = buf.DecodeBool()
- m.Table.Name = buf.DecodeString(64)
- return nil
-}
-
-// IPTableDump defines message 'ip_table_dump'.
-type IPTableDump struct{}
-
-func (m *IPTableDump) Reset() { *m = IPTableDump{} }
-func (*IPTableDump) GetMessageName() string { return "ip_table_dump" }
-func (*IPTableDump) GetCrcString() string { return "51077d14" }
-func (*IPTableDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IPTableDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *IPTableDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *IPTableDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// IPTableFlush defines message 'ip_table_flush'.
-type IPTableFlush struct {
- Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
-}
-
-func (m *IPTableFlush) Reset() { *m = IPTableFlush{} }
-func (*IPTableFlush) GetMessageName() string { return "ip_table_flush" }
-func (*IPTableFlush) GetCrcString() string { return "b9d2e09e" }
-func (*IPTableFlush) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IPTableFlush) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Table.TableID
- size += 1 // m.Table.IsIP6
- size += 64 // m.Table.Name
- return size
-}
-func (m *IPTableFlush) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Table.TableID)
- buf.EncodeBool(m.Table.IsIP6)
- buf.EncodeString(m.Table.Name, 64)
- return buf.Bytes(), nil
-}
-func (m *IPTableFlush) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Table.TableID = buf.DecodeUint32()
- m.Table.IsIP6 = buf.DecodeBool()
- m.Table.Name = buf.DecodeString(64)
- return nil
-}
-
-// IPTableFlushReply defines message 'ip_table_flush_reply'.
-type IPTableFlushReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *IPTableFlushReply) Reset() { *m = IPTableFlushReply{} }
-func (*IPTableFlushReply) GetMessageName() string { return "ip_table_flush_reply" }
-func (*IPTableFlushReply) GetCrcString() string { return "e8d4e804" }
-func (*IPTableFlushReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IPTableFlushReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *IPTableFlushReply) 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 *IPTableFlushReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// IPTableReplaceBegin defines message 'ip_table_replace_begin'.
-type IPTableReplaceBegin struct {
- Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
-}
-
-func (m *IPTableReplaceBegin) Reset() { *m = IPTableReplaceBegin{} }
-func (*IPTableReplaceBegin) GetMessageName() string { return "ip_table_replace_begin" }
-func (*IPTableReplaceBegin) GetCrcString() string { return "b9d2e09e" }
-func (*IPTableReplaceBegin) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IPTableReplaceBegin) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Table.TableID
- size += 1 // m.Table.IsIP6
- size += 64 // m.Table.Name
- return size
-}
-func (m *IPTableReplaceBegin) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Table.TableID)
- buf.EncodeBool(m.Table.IsIP6)
- buf.EncodeString(m.Table.Name, 64)
- return buf.Bytes(), nil
-}
-func (m *IPTableReplaceBegin) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Table.TableID = buf.DecodeUint32()
- m.Table.IsIP6 = buf.DecodeBool()
- m.Table.Name = buf.DecodeString(64)
- return nil
-}
-
-// IPTableReplaceBeginReply defines message 'ip_table_replace_begin_reply'.
-type IPTableReplaceBeginReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *IPTableReplaceBeginReply) Reset() { *m = IPTableReplaceBeginReply{} }
-func (*IPTableReplaceBeginReply) GetMessageName() string { return "ip_table_replace_begin_reply" }
-func (*IPTableReplaceBeginReply) GetCrcString() string { return "e8d4e804" }
-func (*IPTableReplaceBeginReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IPTableReplaceBeginReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *IPTableReplaceBeginReply) 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 *IPTableReplaceBeginReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// IPTableReplaceEnd defines message 'ip_table_replace_end'.
-type IPTableReplaceEnd struct {
- Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"`
-}
-
-func (m *IPTableReplaceEnd) Reset() { *m = IPTableReplaceEnd{} }
-func (*IPTableReplaceEnd) GetMessageName() string { return "ip_table_replace_end" }
-func (*IPTableReplaceEnd) GetCrcString() string { return "b9d2e09e" }
-func (*IPTableReplaceEnd) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IPTableReplaceEnd) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Table.TableID
- size += 1 // m.Table.IsIP6
- size += 64 // m.Table.Name
- return size
-}
-func (m *IPTableReplaceEnd) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Table.TableID)
- buf.EncodeBool(m.Table.IsIP6)
- buf.EncodeString(m.Table.Name, 64)
- return buf.Bytes(), nil
-}
-func (m *IPTableReplaceEnd) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Table.TableID = buf.DecodeUint32()
- m.Table.IsIP6 = buf.DecodeBool()
- m.Table.Name = buf.DecodeString(64)
- return nil
-}
-
-// IPTableReplaceEndReply defines message 'ip_table_replace_end_reply'.
-type IPTableReplaceEndReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *IPTableReplaceEndReply) Reset() { *m = IPTableReplaceEndReply{} }
-func (*IPTableReplaceEndReply) GetMessageName() string { return "ip_table_replace_end_reply" }
-func (*IPTableReplaceEndReply) GetCrcString() string { return "e8d4e804" }
-func (*IPTableReplaceEndReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IPTableReplaceEndReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *IPTableReplaceEndReply) 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 *IPTableReplaceEndReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// IPUnnumberedDetails defines message 'ip_unnumbered_details'.
-type IPUnnumberedDetails struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- IPSwIfIndex InterfaceIndex `binapi:"interface_index,name=ip_sw_if_index" json:"ip_sw_if_index,omitempty"`
-}
-
-func (m *IPUnnumberedDetails) Reset() { *m = IPUnnumberedDetails{} }
-func (*IPUnnumberedDetails) GetMessageName() string { return "ip_unnumbered_details" }
-func (*IPUnnumberedDetails) GetCrcString() string { return "aa12a483" }
-func (*IPUnnumberedDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IPUnnumberedDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.IPSwIfIndex
- return size
-}
-func (m *IPUnnumberedDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(uint32(m.IPSwIfIndex))
- return buf.Bytes(), nil
-}
-func (m *IPUnnumberedDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.IPSwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// IPUnnumberedDump defines message 'ip_unnumbered_dump'.
-type IPUnnumberedDump struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *IPUnnumberedDump) Reset() { *m = IPUnnumberedDump{} }
-func (*IPUnnumberedDump) GetMessageName() string { return "ip_unnumbered_dump" }
-func (*IPUnnumberedDump) GetCrcString() string { return "f9e6675e" }
-func (*IPUnnumberedDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IPUnnumberedDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *IPUnnumberedDump) 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 *IPUnnumberedDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// MfibSignalDetails defines message 'mfib_signal_details'.
-type MfibSignalDetails struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
- Prefix Mprefix `binapi:"mprefix,name=prefix" json:"prefix,omitempty"`
- IPPacketLen uint16 `binapi:"u16,name=ip_packet_len" json:"ip_packet_len,omitempty"`
- IPPacketData []byte `binapi:"u8[256],name=ip_packet_data" json:"ip_packet_data,omitempty"`
-}
-
-func (m *MfibSignalDetails) Reset() { *m = MfibSignalDetails{} }
-func (*MfibSignalDetails) GetMessageName() string { return "mfib_signal_details" }
-func (*MfibSignalDetails) GetCrcString() string { return "64398a9a" }
-func (*MfibSignalDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MfibSignalDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.TableID
- size += 4 // m.Prefix.Af
- size += 2 // m.Prefix.GrpAddressLength
- size += 1 * 16 // m.Prefix.GrpAddress
- size += 1 * 16 // m.Prefix.SrcAddress
- size += 2 // m.IPPacketLen
- size += 1 * 256 // m.IPPacketData
- return size
-}
-func (m *MfibSignalDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(m.TableID)
- buf.EncodeUint32(uint32(m.Prefix.Af))
- buf.EncodeUint16(m.Prefix.GrpAddressLength)
- buf.EncodeBytes(m.Prefix.GrpAddress.XXX_UnionData[:], 16)
- buf.EncodeBytes(m.Prefix.SrcAddress.XXX_UnionData[:], 16)
- buf.EncodeUint16(m.IPPacketLen)
- buf.EncodeBytes(m.IPPacketData, 256)
- return buf.Bytes(), nil
-}
-func (m *MfibSignalDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.TableID = buf.DecodeUint32()
- m.Prefix.Af = AddressFamily(buf.DecodeUint32())
- m.Prefix.GrpAddressLength = buf.DecodeUint16()
- copy(m.Prefix.GrpAddress.XXX_UnionData[:], buf.DecodeBytes(16))
- copy(m.Prefix.SrcAddress.XXX_UnionData[:], buf.DecodeBytes(16))
- m.IPPacketLen = buf.DecodeUint16()
- m.IPPacketData = make([]byte, 256)
- copy(m.IPPacketData, buf.DecodeBytes(len(m.IPPacketData)))
- return nil
-}
-
-// MfibSignalDump defines message 'mfib_signal_dump'.
-type MfibSignalDump struct{}
-
-func (m *MfibSignalDump) Reset() { *m = MfibSignalDump{} }
-func (*MfibSignalDump) GetMessageName() string { return "mfib_signal_dump" }
-func (*MfibSignalDump) GetCrcString() string { return "51077d14" }
-func (*MfibSignalDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *MfibSignalDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *MfibSignalDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *MfibSignalDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// SetIPFlowHash defines message 'set_ip_flow_hash'.
-type SetIPFlowHash struct {
- VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
- IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
- Src bool `binapi:"bool,name=src" json:"src,omitempty"`
- Dst bool `binapi:"bool,name=dst" json:"dst,omitempty"`
- Sport bool `binapi:"bool,name=sport" json:"sport,omitempty"`
- Dport bool `binapi:"bool,name=dport" json:"dport,omitempty"`
- Proto bool `binapi:"bool,name=proto" json:"proto,omitempty"`
- Reverse bool `binapi:"bool,name=reverse" json:"reverse,omitempty"`
- Symmetric bool `binapi:"bool,name=symmetric" json:"symmetric,omitempty"`
-}
-
-func (m *SetIPFlowHash) Reset() { *m = SetIPFlowHash{} }
-func (*SetIPFlowHash) GetMessageName() string { return "set_ip_flow_hash" }
-func (*SetIPFlowHash) GetCrcString() string { return "084ee09e" }
-func (*SetIPFlowHash) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SetIPFlowHash) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.VrfID
- size += 1 // m.IsIPv6
- size += 1 // m.Src
- size += 1 // m.Dst
- size += 1 // m.Sport
- size += 1 // m.Dport
- size += 1 // m.Proto
- size += 1 // m.Reverse
- size += 1 // m.Symmetric
- return size
-}
-func (m *SetIPFlowHash) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.VrfID)
- buf.EncodeBool(m.IsIPv6)
- buf.EncodeBool(m.Src)
- buf.EncodeBool(m.Dst)
- buf.EncodeBool(m.Sport)
- buf.EncodeBool(m.Dport)
- buf.EncodeBool(m.Proto)
- buf.EncodeBool(m.Reverse)
- buf.EncodeBool(m.Symmetric)
- return buf.Bytes(), nil
-}
-func (m *SetIPFlowHash) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.VrfID = buf.DecodeUint32()
- m.IsIPv6 = buf.DecodeBool()
- m.Src = buf.DecodeBool()
- m.Dst = buf.DecodeBool()
- m.Sport = buf.DecodeBool()
- m.Dport = buf.DecodeBool()
- m.Proto = buf.DecodeBool()
- m.Reverse = buf.DecodeBool()
- m.Symmetric = buf.DecodeBool()
- return nil
-}
-
-// SetIPFlowHashReply defines message 'set_ip_flow_hash_reply'.
-type SetIPFlowHashReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SetIPFlowHashReply) Reset() { *m = SetIPFlowHashReply{} }
-func (*SetIPFlowHashReply) GetMessageName() string { return "set_ip_flow_hash_reply" }
-func (*SetIPFlowHashReply) GetCrcString() string { return "e8d4e804" }
-func (*SetIPFlowHashReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SetIPFlowHashReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SetIPFlowHashReply) 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 *SetIPFlowHashReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SwInterfaceIP6EnableDisable defines message 'sw_interface_ip6_enable_disable'.
-type SwInterfaceIP6EnableDisable struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
-}
-
-func (m *SwInterfaceIP6EnableDisable) Reset() { *m = SwInterfaceIP6EnableDisable{} }
-func (*SwInterfaceIP6EnableDisable) GetMessageName() string { return "sw_interface_ip6_enable_disable" }
-func (*SwInterfaceIP6EnableDisable) GetCrcString() string { return "ae6cfcfb" }
-func (*SwInterfaceIP6EnableDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceIP6EnableDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.Enable
- return size
-}
-func (m *SwInterfaceIP6EnableDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeBool(m.Enable)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceIP6EnableDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Enable = buf.DecodeBool()
- return nil
-}
-
-// SwInterfaceIP6EnableDisableReply defines message 'sw_interface_ip6_enable_disable_reply'.
-type SwInterfaceIP6EnableDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SwInterfaceIP6EnableDisableReply) Reset() { *m = SwInterfaceIP6EnableDisableReply{} }
-func (*SwInterfaceIP6EnableDisableReply) GetMessageName() string {
- return "sw_interface_ip6_enable_disable_reply"
-}
-func (*SwInterfaceIP6EnableDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*SwInterfaceIP6EnableDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SwInterfaceIP6EnableDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SwInterfaceIP6EnableDisableReply) 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 *SwInterfaceIP6EnableDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SwInterfaceIP6SetLinkLocalAddress defines message 'sw_interface_ip6_set_link_local_address'.
-type SwInterfaceIP6SetLinkLocalAddress struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- IP IP6Address `binapi:"ip6_address,name=ip" json:"ip,omitempty"`
-}
-
-func (m *SwInterfaceIP6SetLinkLocalAddress) Reset() { *m = SwInterfaceIP6SetLinkLocalAddress{} }
-func (*SwInterfaceIP6SetLinkLocalAddress) GetMessageName() string {
- return "sw_interface_ip6_set_link_local_address"
-}
-func (*SwInterfaceIP6SetLinkLocalAddress) GetCrcString() string { return "2931d9fa" }
-func (*SwInterfaceIP6SetLinkLocalAddress) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceIP6SetLinkLocalAddress) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 * 16 // m.IP
- return size
-}
-func (m *SwInterfaceIP6SetLinkLocalAddress) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeBytes(m.IP[:], 16)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceIP6SetLinkLocalAddress) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- copy(m.IP[:], buf.DecodeBytes(16))
- return nil
-}
-
-// SwInterfaceIP6SetLinkLocalAddressReply defines message 'sw_interface_ip6_set_link_local_address_reply'.
-type SwInterfaceIP6SetLinkLocalAddressReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SwInterfaceIP6SetLinkLocalAddressReply) Reset() {
- *m = SwInterfaceIP6SetLinkLocalAddressReply{}
-}
-func (*SwInterfaceIP6SetLinkLocalAddressReply) GetMessageName() string {
- return "sw_interface_ip6_set_link_local_address_reply"
-}
-func (*SwInterfaceIP6SetLinkLocalAddressReply) GetCrcString() string { return "e8d4e804" }
-func (*SwInterfaceIP6SetLinkLocalAddressReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SwInterfaceIP6SetLinkLocalAddressReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SwInterfaceIP6SetLinkLocalAddressReply) 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 *SwInterfaceIP6SetLinkLocalAddressReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_ip_binapi_init() }
-func file_ip_binapi_init() {
- api.RegisterMessage((*IoamDisable)(nil), "ioam_disable_6b16a45e")
- api.RegisterMessage((*IoamDisableReply)(nil), "ioam_disable_reply_e8d4e804")
- api.RegisterMessage((*IoamEnable)(nil), "ioam_enable_51ccd868")
- api.RegisterMessage((*IoamEnableReply)(nil), "ioam_enable_reply_e8d4e804")
- api.RegisterMessage((*IPAddressDetails)(nil), "ip_address_details_b1199745")
- api.RegisterMessage((*IPAddressDump)(nil), "ip_address_dump_2d033de4")
- api.RegisterMessage((*IPContainerProxyAddDel)(nil), "ip_container_proxy_add_del_91189f40")
- api.RegisterMessage((*IPContainerProxyAddDelReply)(nil), "ip_container_proxy_add_del_reply_e8d4e804")
- api.RegisterMessage((*IPContainerProxyDetails)(nil), "ip_container_proxy_details_0ee460e8")
- api.RegisterMessage((*IPContainerProxyDump)(nil), "ip_container_proxy_dump_51077d14")
- api.RegisterMessage((*IPDetails)(nil), "ip_details_eb152d07")
- api.RegisterMessage((*IPDump)(nil), "ip_dump_98d231ca")
- api.RegisterMessage((*IPMrouteAddDel)(nil), "ip_mroute_add_del_f6627d17")
- api.RegisterMessage((*IPMrouteAddDelReply)(nil), "ip_mroute_add_del_reply_1992deab")
- api.RegisterMessage((*IPMrouteDetails)(nil), "ip_mroute_details_c1cb4b44")
- api.RegisterMessage((*IPMrouteDump)(nil), "ip_mroute_dump_b9d2e09e")
- api.RegisterMessage((*IPMtableDetails)(nil), "ip_mtable_details_b9d2e09e")
- api.RegisterMessage((*IPMtableDump)(nil), "ip_mtable_dump_51077d14")
- api.RegisterMessage((*IPPuntPolice)(nil), "ip_punt_police_db867cea")
- api.RegisterMessage((*IPPuntPoliceReply)(nil), "ip_punt_police_reply_e8d4e804")
- api.RegisterMessage((*IPPuntRedirect)(nil), "ip_punt_redirect_a9a5592c")
- api.RegisterMessage((*IPPuntRedirectDetails)(nil), "ip_punt_redirect_details_3924f5d3")
- api.RegisterMessage((*IPPuntRedirectDump)(nil), "ip_punt_redirect_dump_2d033de4")
- api.RegisterMessage((*IPPuntRedirectReply)(nil), "ip_punt_redirect_reply_e8d4e804")
- api.RegisterMessage((*IPReassemblyEnableDisable)(nil), "ip_reassembly_enable_disable_885c85a6")
- api.RegisterMessage((*IPReassemblyEnableDisableReply)(nil), "ip_reassembly_enable_disable_reply_e8d4e804")
- api.RegisterMessage((*IPReassemblyGet)(nil), "ip_reassembly_get_ea13ff63")
- api.RegisterMessage((*IPReassemblyGetReply)(nil), "ip_reassembly_get_reply_d5eb8d34")
- api.RegisterMessage((*IPReassemblySet)(nil), "ip_reassembly_set_16467d25")
- api.RegisterMessage((*IPReassemblySetReply)(nil), "ip_reassembly_set_reply_e8d4e804")
- api.RegisterMessage((*IPRouteAddDel)(nil), "ip_route_add_del_c1ff832d")
- api.RegisterMessage((*IPRouteAddDelReply)(nil), "ip_route_add_del_reply_1992deab")
- api.RegisterMessage((*IPRouteDetails)(nil), "ip_route_details_d1ffaae1")
- api.RegisterMessage((*IPRouteDump)(nil), "ip_route_dump_b9d2e09e")
- api.RegisterMessage((*IPSourceAndPortRangeCheckAddDel)(nil), "ip_source_and_port_range_check_add_del_8bfc76f2")
- api.RegisterMessage((*IPSourceAndPortRangeCheckAddDelReply)(nil), "ip_source_and_port_range_check_add_del_reply_e8d4e804")
- api.RegisterMessage((*IPSourceAndPortRangeCheckInterfaceAddDel)(nil), "ip_source_and_port_range_check_interface_add_del_e1ba8987")
- api.RegisterMessage((*IPSourceAndPortRangeCheckInterfaceAddDelReply)(nil), "ip_source_and_port_range_check_interface_add_del_reply_e8d4e804")
- api.RegisterMessage((*IPSourceCheckInterfaceAddDel)(nil), "ip_source_check_interface_add_del_6612356b")
- api.RegisterMessage((*IPSourceCheckInterfaceAddDelReply)(nil), "ip_source_check_interface_add_del_reply_e8d4e804")
- api.RegisterMessage((*IPTableAddDel)(nil), "ip_table_add_del_0ffdaec0")
- api.RegisterMessage((*IPTableAddDelReply)(nil), "ip_table_add_del_reply_e8d4e804")
- api.RegisterMessage((*IPTableDetails)(nil), "ip_table_details_c79fca0f")
- api.RegisterMessage((*IPTableDump)(nil), "ip_table_dump_51077d14")
- api.RegisterMessage((*IPTableFlush)(nil), "ip_table_flush_b9d2e09e")
- api.RegisterMessage((*IPTableFlushReply)(nil), "ip_table_flush_reply_e8d4e804")
- api.RegisterMessage((*IPTableReplaceBegin)(nil), "ip_table_replace_begin_b9d2e09e")
- api.RegisterMessage((*IPTableReplaceBeginReply)(nil), "ip_table_replace_begin_reply_e8d4e804")
- api.RegisterMessage((*IPTableReplaceEnd)(nil), "ip_table_replace_end_b9d2e09e")
- api.RegisterMessage((*IPTableReplaceEndReply)(nil), "ip_table_replace_end_reply_e8d4e804")
- api.RegisterMessage((*IPUnnumberedDetails)(nil), "ip_unnumbered_details_aa12a483")
- api.RegisterMessage((*IPUnnumberedDump)(nil), "ip_unnumbered_dump_f9e6675e")
- api.RegisterMessage((*MfibSignalDetails)(nil), "mfib_signal_details_64398a9a")
- api.RegisterMessage((*MfibSignalDump)(nil), "mfib_signal_dump_51077d14")
- api.RegisterMessage((*SetIPFlowHash)(nil), "set_ip_flow_hash_084ee09e")
- api.RegisterMessage((*SetIPFlowHashReply)(nil), "set_ip_flow_hash_reply_e8d4e804")
- api.RegisterMessage((*SwInterfaceIP6EnableDisable)(nil), "sw_interface_ip6_enable_disable_ae6cfcfb")
- api.RegisterMessage((*SwInterfaceIP6EnableDisableReply)(nil), "sw_interface_ip6_enable_disable_reply_e8d4e804")
- api.RegisterMessage((*SwInterfaceIP6SetLinkLocalAddress)(nil), "sw_interface_ip6_set_link_local_address_2931d9fa")
- api.RegisterMessage((*SwInterfaceIP6SetLinkLocalAddressReply)(nil), "sw_interface_ip6_set_link_local_address_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*IoamDisable)(nil),
- (*IoamDisableReply)(nil),
- (*IoamEnable)(nil),
- (*IoamEnableReply)(nil),
- (*IPAddressDetails)(nil),
- (*IPAddressDump)(nil),
- (*IPContainerProxyAddDel)(nil),
- (*IPContainerProxyAddDelReply)(nil),
- (*IPContainerProxyDetails)(nil),
- (*IPContainerProxyDump)(nil),
- (*IPDetails)(nil),
- (*IPDump)(nil),
- (*IPMrouteAddDel)(nil),
- (*IPMrouteAddDelReply)(nil),
- (*IPMrouteDetails)(nil),
- (*IPMrouteDump)(nil),
- (*IPMtableDetails)(nil),
- (*IPMtableDump)(nil),
- (*IPPuntPolice)(nil),
- (*IPPuntPoliceReply)(nil),
- (*IPPuntRedirect)(nil),
- (*IPPuntRedirectDetails)(nil),
- (*IPPuntRedirectDump)(nil),
- (*IPPuntRedirectReply)(nil),
- (*IPReassemblyEnableDisable)(nil),
- (*IPReassemblyEnableDisableReply)(nil),
- (*IPReassemblyGet)(nil),
- (*IPReassemblyGetReply)(nil),
- (*IPReassemblySet)(nil),
- (*IPReassemblySetReply)(nil),
- (*IPRouteAddDel)(nil),
- (*IPRouteAddDelReply)(nil),
- (*IPRouteDetails)(nil),
- (*IPRouteDump)(nil),
- (*IPSourceAndPortRangeCheckAddDel)(nil),
- (*IPSourceAndPortRangeCheckAddDelReply)(nil),
- (*IPSourceAndPortRangeCheckInterfaceAddDel)(nil),
- (*IPSourceAndPortRangeCheckInterfaceAddDelReply)(nil),
- (*IPSourceCheckInterfaceAddDel)(nil),
- (*IPSourceCheckInterfaceAddDelReply)(nil),
- (*IPTableAddDel)(nil),
- (*IPTableAddDelReply)(nil),
- (*IPTableDetails)(nil),
- (*IPTableDump)(nil),
- (*IPTableFlush)(nil),
- (*IPTableFlushReply)(nil),
- (*IPTableReplaceBegin)(nil),
- (*IPTableReplaceBeginReply)(nil),
- (*IPTableReplaceEnd)(nil),
- (*IPTableReplaceEndReply)(nil),
- (*IPUnnumberedDetails)(nil),
- (*IPUnnumberedDump)(nil),
- (*MfibSignalDetails)(nil),
- (*MfibSignalDump)(nil),
- (*SetIPFlowHash)(nil),
- (*SetIPFlowHashReply)(nil),
- (*SwInterfaceIP6EnableDisable)(nil),
- (*SwInterfaceIP6EnableDisableReply)(nil),
- (*SwInterfaceIP6SetLinkLocalAddress)(nil),
- (*SwInterfaceIP6SetLinkLocalAddressReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/ip/ip_rpc.ba.go b/internal/testbinapi/binapi2001/ip/ip_rpc.ba.go
deleted file mode 100644
index 26f72c2..0000000
--- a/internal/testbinapi/binapi2001/ip/ip_rpc.ba.go
+++ /dev/null
@@ -1,664 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package ip
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service ip.
-type RPCService interface {
- IoamDisable(ctx context.Context, in *IoamDisable) (*IoamDisableReply, error)
- IoamEnable(ctx context.Context, in *IoamEnable) (*IoamEnableReply, error)
- IPAddressDump(ctx context.Context, in *IPAddressDump) (RPCService_IPAddressDumpClient, error)
- IPContainerProxyAddDel(ctx context.Context, in *IPContainerProxyAddDel) (*IPContainerProxyAddDelReply, error)
- IPContainerProxyDump(ctx context.Context, in *IPContainerProxyDump) (RPCService_IPContainerProxyDumpClient, error)
- IPDump(ctx context.Context, in *IPDump) (RPCService_IPDumpClient, error)
- IPMrouteAddDel(ctx context.Context, in *IPMrouteAddDel) (*IPMrouteAddDelReply, error)
- IPMrouteDump(ctx context.Context, in *IPMrouteDump) (RPCService_IPMrouteDumpClient, error)
- IPMtableDump(ctx context.Context, in *IPMtableDump) (RPCService_IPMtableDumpClient, error)
- IPPuntPolice(ctx context.Context, in *IPPuntPolice) (*IPPuntPoliceReply, error)
- IPPuntRedirect(ctx context.Context, in *IPPuntRedirect) (*IPPuntRedirectReply, error)
- IPPuntRedirectDump(ctx context.Context, in *IPPuntRedirectDump) (RPCService_IPPuntRedirectDumpClient, error)
- IPReassemblyEnableDisable(ctx context.Context, in *IPReassemblyEnableDisable) (*IPReassemblyEnableDisableReply, error)
- IPReassemblyGet(ctx context.Context, in *IPReassemblyGet) (*IPReassemblyGetReply, error)
- IPReassemblySet(ctx context.Context, in *IPReassemblySet) (*IPReassemblySetReply, error)
- IPRouteAddDel(ctx context.Context, in *IPRouteAddDel) (*IPRouteAddDelReply, error)
- IPRouteDump(ctx context.Context, in *IPRouteDump) (RPCService_IPRouteDumpClient, error)
- IPSourceAndPortRangeCheckAddDel(ctx context.Context, in *IPSourceAndPortRangeCheckAddDel) (*IPSourceAndPortRangeCheckAddDelReply, error)
- IPSourceAndPortRangeCheckInterfaceAddDel(ctx context.Context, in *IPSourceAndPortRangeCheckInterfaceAddDel) (*IPSourceAndPortRangeCheckInterfaceAddDelReply, error)
- IPSourceCheckInterfaceAddDel(ctx context.Context, in *IPSourceCheckInterfaceAddDel) (*IPSourceCheckInterfaceAddDelReply, error)
- IPTableAddDel(ctx context.Context, in *IPTableAddDel) (*IPTableAddDelReply, error)
- IPTableDump(ctx context.Context, in *IPTableDump) (RPCService_IPTableDumpClient, error)
- IPTableFlush(ctx context.Context, in *IPTableFlush) (*IPTableFlushReply, error)
- IPTableReplaceBegin(ctx context.Context, in *IPTableReplaceBegin) (*IPTableReplaceBeginReply, error)
- IPTableReplaceEnd(ctx context.Context, in *IPTableReplaceEnd) (*IPTableReplaceEndReply, error)
- IPUnnumberedDump(ctx context.Context, in *IPUnnumberedDump) (RPCService_IPUnnumberedDumpClient, error)
- MfibSignalDump(ctx context.Context, in *MfibSignalDump) (RPCService_MfibSignalDumpClient, error)
- SetIPFlowHash(ctx context.Context, in *SetIPFlowHash) (*SetIPFlowHashReply, error)
- SwInterfaceIP6EnableDisable(ctx context.Context, in *SwInterfaceIP6EnableDisable) (*SwInterfaceIP6EnableDisableReply, error)
- SwInterfaceIP6SetLinkLocalAddress(ctx context.Context, in *SwInterfaceIP6SetLinkLocalAddress) (*SwInterfaceIP6SetLinkLocalAddressReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) IoamDisable(ctx context.Context, in *IoamDisable) (*IoamDisableReply, error) {
- out := new(IoamDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) IoamEnable(ctx context.Context, in *IoamEnable) (*IoamEnableReply, error) {
- out := new(IoamEnableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) IPAddressDump(ctx context.Context, in *IPAddressDump) (RPCService_IPAddressDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_IPAddressDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_IPAddressDumpClient interface {
- Recv() (*IPAddressDetails, error)
- api.Stream
-}
-
-type serviceClient_IPAddressDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_IPAddressDumpClient) Recv() (*IPAddressDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *IPAddressDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) IPContainerProxyAddDel(ctx context.Context, in *IPContainerProxyAddDel) (*IPContainerProxyAddDelReply, error) {
- out := new(IPContainerProxyAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) IPContainerProxyDump(ctx context.Context, in *IPContainerProxyDump) (RPCService_IPContainerProxyDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_IPContainerProxyDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_IPContainerProxyDumpClient interface {
- Recv() (*IPContainerProxyDetails, error)
- api.Stream
-}
-
-type serviceClient_IPContainerProxyDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_IPContainerProxyDumpClient) Recv() (*IPContainerProxyDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *IPContainerProxyDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) IPDump(ctx context.Context, in *IPDump) (RPCService_IPDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_IPDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_IPDumpClient interface {
- Recv() (*IPDetails, error)
- api.Stream
-}
-
-type serviceClient_IPDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_IPDumpClient) Recv() (*IPDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *IPDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) IPMrouteAddDel(ctx context.Context, in *IPMrouteAddDel) (*IPMrouteAddDelReply, error) {
- out := new(IPMrouteAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) IPMrouteDump(ctx context.Context, in *IPMrouteDump) (RPCService_IPMrouteDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_IPMrouteDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_IPMrouteDumpClient interface {
- Recv() (*IPMrouteDetails, error)
- api.Stream
-}
-
-type serviceClient_IPMrouteDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_IPMrouteDumpClient) Recv() (*IPMrouteDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *IPMrouteDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) IPMtableDump(ctx context.Context, in *IPMtableDump) (RPCService_IPMtableDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_IPMtableDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_IPMtableDumpClient interface {
- Recv() (*IPMtableDetails, error)
- api.Stream
-}
-
-type serviceClient_IPMtableDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_IPMtableDumpClient) Recv() (*IPMtableDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *IPMtableDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) IPPuntPolice(ctx context.Context, in *IPPuntPolice) (*IPPuntPoliceReply, error) {
- out := new(IPPuntPoliceReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) IPPuntRedirect(ctx context.Context, in *IPPuntRedirect) (*IPPuntRedirectReply, error) {
- out := new(IPPuntRedirectReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) IPPuntRedirectDump(ctx context.Context, in *IPPuntRedirectDump) (RPCService_IPPuntRedirectDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_IPPuntRedirectDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_IPPuntRedirectDumpClient interface {
- Recv() (*IPPuntRedirectDetails, error)
- api.Stream
-}
-
-type serviceClient_IPPuntRedirectDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_IPPuntRedirectDumpClient) Recv() (*IPPuntRedirectDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *IPPuntRedirectDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) IPReassemblyEnableDisable(ctx context.Context, in *IPReassemblyEnableDisable) (*IPReassemblyEnableDisableReply, error) {
- out := new(IPReassemblyEnableDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) IPReassemblyGet(ctx context.Context, in *IPReassemblyGet) (*IPReassemblyGetReply, error) {
- out := new(IPReassemblyGetReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) IPReassemblySet(ctx context.Context, in *IPReassemblySet) (*IPReassemblySetReply, error) {
- out := new(IPReassemblySetReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) IPRouteAddDel(ctx context.Context, in *IPRouteAddDel) (*IPRouteAddDelReply, error) {
- out := new(IPRouteAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) IPRouteDump(ctx context.Context, in *IPRouteDump) (RPCService_IPRouteDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_IPRouteDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_IPRouteDumpClient interface {
- Recv() (*IPRouteDetails, error)
- api.Stream
-}
-
-type serviceClient_IPRouteDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_IPRouteDumpClient) Recv() (*IPRouteDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *IPRouteDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) IPSourceAndPortRangeCheckAddDel(ctx context.Context, in *IPSourceAndPortRangeCheckAddDel) (*IPSourceAndPortRangeCheckAddDelReply, error) {
- out := new(IPSourceAndPortRangeCheckAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) IPSourceAndPortRangeCheckInterfaceAddDel(ctx context.Context, in *IPSourceAndPortRangeCheckInterfaceAddDel) (*IPSourceAndPortRangeCheckInterfaceAddDelReply, error) {
- out := new(IPSourceAndPortRangeCheckInterfaceAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) IPSourceCheckInterfaceAddDel(ctx context.Context, in *IPSourceCheckInterfaceAddDel) (*IPSourceCheckInterfaceAddDelReply, error) {
- out := new(IPSourceCheckInterfaceAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) IPTableAddDel(ctx context.Context, in *IPTableAddDel) (*IPTableAddDelReply, error) {
- out := new(IPTableAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) IPTableDump(ctx context.Context, in *IPTableDump) (RPCService_IPTableDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_IPTableDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_IPTableDumpClient interface {
- Recv() (*IPTableDetails, error)
- api.Stream
-}
-
-type serviceClient_IPTableDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_IPTableDumpClient) Recv() (*IPTableDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *IPTableDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) IPTableFlush(ctx context.Context, in *IPTableFlush) (*IPTableFlushReply, error) {
- out := new(IPTableFlushReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) IPTableReplaceBegin(ctx context.Context, in *IPTableReplaceBegin) (*IPTableReplaceBeginReply, error) {
- out := new(IPTableReplaceBeginReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) IPTableReplaceEnd(ctx context.Context, in *IPTableReplaceEnd) (*IPTableReplaceEndReply, error) {
- out := new(IPTableReplaceEndReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) IPUnnumberedDump(ctx context.Context, in *IPUnnumberedDump) (RPCService_IPUnnumberedDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_IPUnnumberedDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_IPUnnumberedDumpClient interface {
- Recv() (*IPUnnumberedDetails, error)
- api.Stream
-}
-
-type serviceClient_IPUnnumberedDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_IPUnnumberedDumpClient) Recv() (*IPUnnumberedDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *IPUnnumberedDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) MfibSignalDump(ctx context.Context, in *MfibSignalDump) (RPCService_MfibSignalDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_MfibSignalDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_MfibSignalDumpClient interface {
- Recv() (*MfibSignalDetails, error)
- api.Stream
-}
-
-type serviceClient_MfibSignalDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_MfibSignalDumpClient) Recv() (*MfibSignalDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *MfibSignalDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) SetIPFlowHash(ctx context.Context, in *SetIPFlowHash) (*SetIPFlowHashReply, error) {
- out := new(SetIPFlowHashReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SwInterfaceIP6EnableDisable(ctx context.Context, in *SwInterfaceIP6EnableDisable) (*SwInterfaceIP6EnableDisableReply, error) {
- out := new(SwInterfaceIP6EnableDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SwInterfaceIP6SetLinkLocalAddress(ctx context.Context, in *SwInterfaceIP6SetLinkLocalAddress) (*SwInterfaceIP6SetLinkLocalAddressReply, error) {
- out := new(SwInterfaceIP6SetLinkLocalAddressReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/ip6_nd/ip6_nd.ba.go b/internal/testbinapi/binapi2001/ip6_nd/ip6_nd.ba.go
deleted file mode 100644
index bae32c7..0000000
--- a/internal/testbinapi/binapi2001/ip6_nd/ip6_nd.ba.go
+++ /dev/null
@@ -1,1551 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/ip6_nd.api.json
-
-// Package ip6_nd contains generated bindings for API file ip6_nd.api.
-//
-// Contents:
-// 6 aliases
-// 10 enums
-// 7 structs
-// 1 union
-// 13 messages
-//
-package ip6_nd
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "ip6_nd"
- APIVersion = "1.0.0"
- VersionCrc = 0xbb8ff0e9
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6RaPrefixInfo defines type 'ip6_ra_prefix_info'.
-type IP6RaPrefixInfo struct {
- Prefix Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
- Flags uint8 `binapi:"u8,name=flags" json:"flags,omitempty"`
- ValidTime uint32 `binapi:"u32,name=valid_time" json:"valid_time,omitempty"`
- PreferredTime uint32 `binapi:"u32,name=preferred_time" json:"preferred_time,omitempty"`
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
-
-// IP6RaEvent defines message 'ip6_ra_event'.
-type IP6RaEvent struct {
- PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- RouterAddr IP6Address `binapi:"ip6_address,name=router_addr" json:"router_addr,omitempty"`
- CurrentHopLimit uint8 `binapi:"u8,name=current_hop_limit" json:"current_hop_limit,omitempty"`
- Flags uint8 `binapi:"u8,name=flags" json:"flags,omitempty"`
- RouterLifetimeInSec uint16 `binapi:"u16,name=router_lifetime_in_sec" json:"router_lifetime_in_sec,omitempty"`
- NeighborReachableTimeInMsec uint32 `binapi:"u32,name=neighbor_reachable_time_in_msec" json:"neighbor_reachable_time_in_msec,omitempty"`
- TimeInMsecBetweenRetransmittedNeighborSolicitations uint32 `binapi:"u32,name=time_in_msec_between_retransmitted_neighbor_solicitations" json:"time_in_msec_between_retransmitted_neighbor_solicitations,omitempty"`
- NPrefixes uint32 `binapi:"u32,name=n_prefixes" json:"-"`
- Prefixes []IP6RaPrefixInfo `binapi:"ip6_ra_prefix_info[n_prefixes],name=prefixes" json:"prefixes,omitempty"`
-}
-
-func (m *IP6RaEvent) Reset() { *m = IP6RaEvent{} }
-func (*IP6RaEvent) GetMessageName() string { return "ip6_ra_event" }
-func (*IP6RaEvent) GetCrcString() string { return "47e8cfbe" }
-func (*IP6RaEvent) GetMessageType() api.MessageType {
- return api.EventMessage
-}
-
-func (m *IP6RaEvent) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.PID
- size += 4 // m.SwIfIndex
- size += 1 * 16 // m.RouterAddr
- size += 1 // m.CurrentHopLimit
- size += 1 // m.Flags
- size += 2 // m.RouterLifetimeInSec
- size += 4 // m.NeighborReachableTimeInMsec
- size += 4 // m.TimeInMsecBetweenRetransmittedNeighborSolicitations
- size += 4 // m.NPrefixes
- for j1 := 0; j1 < len(m.Prefixes); j1++ {
- var s1 IP6RaPrefixInfo
- _ = s1
- if j1 < len(m.Prefixes) {
- s1 = m.Prefixes[j1]
- }
- size += 4 // s1.Prefix.Address.Af
- size += 1 * 16 // s1.Prefix.Address.Un
- size += 1 // s1.Prefix.Len
- size += 1 // s1.Flags
- size += 4 // s1.ValidTime
- size += 4 // s1.PreferredTime
- }
- return size
-}
-func (m *IP6RaEvent) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.PID)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeBytes(m.RouterAddr[:], 16)
- buf.EncodeUint8(m.CurrentHopLimit)
- buf.EncodeUint8(m.Flags)
- buf.EncodeUint16(m.RouterLifetimeInSec)
- buf.EncodeUint32(m.NeighborReachableTimeInMsec)
- buf.EncodeUint32(m.TimeInMsecBetweenRetransmittedNeighborSolicitations)
- buf.EncodeUint32(uint32(len(m.Prefixes)))
- for j0 := 0; j0 < len(m.Prefixes); j0++ {
- var v0 IP6RaPrefixInfo // Prefixes
- if j0 < len(m.Prefixes) {
- v0 = m.Prefixes[j0]
- }
- buf.EncodeUint32(uint32(v0.Prefix.Address.Af))
- buf.EncodeBytes(v0.Prefix.Address.Un.XXX_UnionData[:], 16)
- buf.EncodeUint8(v0.Prefix.Len)
- buf.EncodeUint8(v0.Flags)
- buf.EncodeUint32(v0.ValidTime)
- buf.EncodeUint32(v0.PreferredTime)
- }
- return buf.Bytes(), nil
-}
-func (m *IP6RaEvent) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.PID = buf.DecodeUint32()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- copy(m.RouterAddr[:], buf.DecodeBytes(16))
- m.CurrentHopLimit = buf.DecodeUint8()
- m.Flags = buf.DecodeUint8()
- m.RouterLifetimeInSec = buf.DecodeUint16()
- m.NeighborReachableTimeInMsec = buf.DecodeUint32()
- m.TimeInMsecBetweenRetransmittedNeighborSolicitations = buf.DecodeUint32()
- m.NPrefixes = buf.DecodeUint32()
- m.Prefixes = make([]IP6RaPrefixInfo, m.NPrefixes)
- for j0 := 0; j0 < len(m.Prefixes); j0++ {
- m.Prefixes[j0].Prefix.Address.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Prefixes[j0].Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Prefixes[j0].Prefix.Len = buf.DecodeUint8()
- m.Prefixes[j0].Flags = buf.DecodeUint8()
- m.Prefixes[j0].ValidTime = buf.DecodeUint32()
- m.Prefixes[j0].PreferredTime = buf.DecodeUint32()
- }
- return nil
-}
-
-// IP6ndProxyAddDel defines message 'ip6nd_proxy_add_del'.
-type IP6ndProxyAddDel struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- IP IP6Address `binapi:"ip6_address,name=ip" json:"ip,omitempty"`
-}
-
-func (m *IP6ndProxyAddDel) Reset() { *m = IP6ndProxyAddDel{} }
-func (*IP6ndProxyAddDel) GetMessageName() string { return "ip6nd_proxy_add_del" }
-func (*IP6ndProxyAddDel) GetCrcString() string { return "3fdf6659" }
-func (*IP6ndProxyAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IP6ndProxyAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.IsAdd
- size += 1 * 16 // m.IP
- return size
-}
-func (m *IP6ndProxyAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeBool(m.IsAdd)
- buf.EncodeBytes(m.IP[:], 16)
- return buf.Bytes(), nil
-}
-func (m *IP6ndProxyAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.IsAdd = buf.DecodeBool()
- copy(m.IP[:], buf.DecodeBytes(16))
- return nil
-}
-
-// IP6ndProxyAddDelReply defines message 'ip6nd_proxy_add_del_reply'.
-type IP6ndProxyAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *IP6ndProxyAddDelReply) Reset() { *m = IP6ndProxyAddDelReply{} }
-func (*IP6ndProxyAddDelReply) GetMessageName() string { return "ip6nd_proxy_add_del_reply" }
-func (*IP6ndProxyAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*IP6ndProxyAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IP6ndProxyAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *IP6ndProxyAddDelReply) 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 *IP6ndProxyAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// IP6ndProxyDetails defines message 'ip6nd_proxy_details'.
-type IP6ndProxyDetails struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- IP IP6Address `binapi:"ip6_address,name=ip" json:"ip,omitempty"`
-}
-
-func (m *IP6ndProxyDetails) Reset() { *m = IP6ndProxyDetails{} }
-func (*IP6ndProxyDetails) GetMessageName() string { return "ip6nd_proxy_details" }
-func (*IP6ndProxyDetails) GetCrcString() string { return "d35be8ff" }
-func (*IP6ndProxyDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IP6ndProxyDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 * 16 // m.IP
- return size
-}
-func (m *IP6ndProxyDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeBytes(m.IP[:], 16)
- return buf.Bytes(), nil
-}
-func (m *IP6ndProxyDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- copy(m.IP[:], buf.DecodeBytes(16))
- return nil
-}
-
-// IP6ndProxyDump defines message 'ip6nd_proxy_dump'.
-type IP6ndProxyDump struct{}
-
-func (m *IP6ndProxyDump) Reset() { *m = IP6ndProxyDump{} }
-func (*IP6ndProxyDump) GetMessageName() string { return "ip6nd_proxy_dump" }
-func (*IP6ndProxyDump) GetCrcString() string { return "51077d14" }
-func (*IP6ndProxyDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IP6ndProxyDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *IP6ndProxyDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *IP6ndProxyDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// IP6ndSendRouterSolicitation defines message 'ip6nd_send_router_solicitation'.
-type IP6ndSendRouterSolicitation struct {
- Irt uint32 `binapi:"u32,name=irt" json:"irt,omitempty"`
- Mrt uint32 `binapi:"u32,name=mrt" json:"mrt,omitempty"`
- Mrc uint32 `binapi:"u32,name=mrc" json:"mrc,omitempty"`
- Mrd uint32 `binapi:"u32,name=mrd" json:"mrd,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Stop bool `binapi:"bool,name=stop" json:"stop,omitempty"`
-}
-
-func (m *IP6ndSendRouterSolicitation) Reset() { *m = IP6ndSendRouterSolicitation{} }
-func (*IP6ndSendRouterSolicitation) GetMessageName() string { return "ip6nd_send_router_solicitation" }
-func (*IP6ndSendRouterSolicitation) GetCrcString() string { return "e5de609c" }
-func (*IP6ndSendRouterSolicitation) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IP6ndSendRouterSolicitation) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Irt
- size += 4 // m.Mrt
- size += 4 // m.Mrc
- size += 4 // m.Mrd
- size += 4 // m.SwIfIndex
- size += 1 // m.Stop
- return size
-}
-func (m *IP6ndSendRouterSolicitation) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Irt)
- buf.EncodeUint32(m.Mrt)
- buf.EncodeUint32(m.Mrc)
- buf.EncodeUint32(m.Mrd)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeBool(m.Stop)
- return buf.Bytes(), nil
-}
-func (m *IP6ndSendRouterSolicitation) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Irt = buf.DecodeUint32()
- m.Mrt = buf.DecodeUint32()
- m.Mrc = buf.DecodeUint32()
- m.Mrd = buf.DecodeUint32()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Stop = buf.DecodeBool()
- return nil
-}
-
-// IP6ndSendRouterSolicitationReply defines message 'ip6nd_send_router_solicitation_reply'.
-type IP6ndSendRouterSolicitationReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *IP6ndSendRouterSolicitationReply) Reset() { *m = IP6ndSendRouterSolicitationReply{} }
-func (*IP6ndSendRouterSolicitationReply) GetMessageName() string {
- return "ip6nd_send_router_solicitation_reply"
-}
-func (*IP6ndSendRouterSolicitationReply) GetCrcString() string { return "e8d4e804" }
-func (*IP6ndSendRouterSolicitationReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IP6ndSendRouterSolicitationReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *IP6ndSendRouterSolicitationReply) 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 *IP6ndSendRouterSolicitationReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SwInterfaceIP6ndRaConfig defines message 'sw_interface_ip6nd_ra_config'.
-type SwInterfaceIP6ndRaConfig struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Suppress uint8 `binapi:"u8,name=suppress" json:"suppress,omitempty"`
- Managed uint8 `binapi:"u8,name=managed" json:"managed,omitempty"`
- Other uint8 `binapi:"u8,name=other" json:"other,omitempty"`
- LlOption uint8 `binapi:"u8,name=ll_option" json:"ll_option,omitempty"`
- SendUnicast uint8 `binapi:"u8,name=send_unicast" json:"send_unicast,omitempty"`
- Cease uint8 `binapi:"u8,name=cease" json:"cease,omitempty"`
- IsNo bool `binapi:"bool,name=is_no" json:"is_no,omitempty"`
- DefaultRouter uint8 `binapi:"u8,name=default_router" json:"default_router,omitempty"`
- MaxInterval uint32 `binapi:"u32,name=max_interval" json:"max_interval,omitempty"`
- MinInterval uint32 `binapi:"u32,name=min_interval" json:"min_interval,omitempty"`
- Lifetime uint32 `binapi:"u32,name=lifetime" json:"lifetime,omitempty"`
- InitialCount uint32 `binapi:"u32,name=initial_count" json:"initial_count,omitempty"`
- InitialInterval uint32 `binapi:"u32,name=initial_interval" json:"initial_interval,omitempty"`
-}
-
-func (m *SwInterfaceIP6ndRaConfig) Reset() { *m = SwInterfaceIP6ndRaConfig{} }
-func (*SwInterfaceIP6ndRaConfig) GetMessageName() string { return "sw_interface_ip6nd_ra_config" }
-func (*SwInterfaceIP6ndRaConfig) GetCrcString() string { return "3eb00b1c" }
-func (*SwInterfaceIP6ndRaConfig) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceIP6ndRaConfig) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.Suppress
- size += 1 // m.Managed
- size += 1 // m.Other
- size += 1 // m.LlOption
- size += 1 // m.SendUnicast
- size += 1 // m.Cease
- size += 1 // m.IsNo
- size += 1 // m.DefaultRouter
- size += 4 // m.MaxInterval
- size += 4 // m.MinInterval
- size += 4 // m.Lifetime
- size += 4 // m.InitialCount
- size += 4 // m.InitialInterval
- return size
-}
-func (m *SwInterfaceIP6ndRaConfig) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint8(m.Suppress)
- buf.EncodeUint8(m.Managed)
- buf.EncodeUint8(m.Other)
- buf.EncodeUint8(m.LlOption)
- buf.EncodeUint8(m.SendUnicast)
- buf.EncodeUint8(m.Cease)
- buf.EncodeBool(m.IsNo)
- buf.EncodeUint8(m.DefaultRouter)
- buf.EncodeUint32(m.MaxInterval)
- buf.EncodeUint32(m.MinInterval)
- buf.EncodeUint32(m.Lifetime)
- buf.EncodeUint32(m.InitialCount)
- buf.EncodeUint32(m.InitialInterval)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceIP6ndRaConfig) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Suppress = buf.DecodeUint8()
- m.Managed = buf.DecodeUint8()
- m.Other = buf.DecodeUint8()
- m.LlOption = buf.DecodeUint8()
- m.SendUnicast = buf.DecodeUint8()
- m.Cease = buf.DecodeUint8()
- m.IsNo = buf.DecodeBool()
- m.DefaultRouter = buf.DecodeUint8()
- m.MaxInterval = buf.DecodeUint32()
- m.MinInterval = buf.DecodeUint32()
- m.Lifetime = buf.DecodeUint32()
- m.InitialCount = buf.DecodeUint32()
- m.InitialInterval = buf.DecodeUint32()
- return nil
-}
-
-// SwInterfaceIP6ndRaConfigReply defines message 'sw_interface_ip6nd_ra_config_reply'.
-type SwInterfaceIP6ndRaConfigReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SwInterfaceIP6ndRaConfigReply) Reset() { *m = SwInterfaceIP6ndRaConfigReply{} }
-func (*SwInterfaceIP6ndRaConfigReply) GetMessageName() string {
- return "sw_interface_ip6nd_ra_config_reply"
-}
-func (*SwInterfaceIP6ndRaConfigReply) GetCrcString() string { return "e8d4e804" }
-func (*SwInterfaceIP6ndRaConfigReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SwInterfaceIP6ndRaConfigReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SwInterfaceIP6ndRaConfigReply) 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 *SwInterfaceIP6ndRaConfigReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SwInterfaceIP6ndRaPrefix defines message 'sw_interface_ip6nd_ra_prefix'.
-type SwInterfaceIP6ndRaPrefix struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Prefix Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
- UseDefault bool `binapi:"bool,name=use_default" json:"use_default,omitempty"`
- NoAdvertise bool `binapi:"bool,name=no_advertise" json:"no_advertise,omitempty"`
- OffLink bool `binapi:"bool,name=off_link" json:"off_link,omitempty"`
- NoAutoconfig bool `binapi:"bool,name=no_autoconfig" json:"no_autoconfig,omitempty"`
- NoOnlink bool `binapi:"bool,name=no_onlink" json:"no_onlink,omitempty"`
- IsNo bool `binapi:"bool,name=is_no" json:"is_no,omitempty"`
- ValLifetime uint32 `binapi:"u32,name=val_lifetime" json:"val_lifetime,omitempty"`
- PrefLifetime uint32 `binapi:"u32,name=pref_lifetime" json:"pref_lifetime,omitempty"`
-}
-
-func (m *SwInterfaceIP6ndRaPrefix) Reset() { *m = SwInterfaceIP6ndRaPrefix{} }
-func (*SwInterfaceIP6ndRaPrefix) GetMessageName() string { return "sw_interface_ip6nd_ra_prefix" }
-func (*SwInterfaceIP6ndRaPrefix) GetCrcString() string { return "e098785f" }
-func (*SwInterfaceIP6ndRaPrefix) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceIP6ndRaPrefix) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.Prefix.Address.Af
- size += 1 * 16 // m.Prefix.Address.Un
- size += 1 // m.Prefix.Len
- size += 1 // m.UseDefault
- size += 1 // m.NoAdvertise
- size += 1 // m.OffLink
- size += 1 // m.NoAutoconfig
- size += 1 // m.NoOnlink
- size += 1 // m.IsNo
- size += 4 // m.ValLifetime
- size += 4 // m.PrefLifetime
- return size
-}
-func (m *SwInterfaceIP6ndRaPrefix) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(uint32(m.Prefix.Address.Af))
- buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
- buf.EncodeUint8(m.Prefix.Len)
- buf.EncodeBool(m.UseDefault)
- buf.EncodeBool(m.NoAdvertise)
- buf.EncodeBool(m.OffLink)
- buf.EncodeBool(m.NoAutoconfig)
- buf.EncodeBool(m.NoOnlink)
- buf.EncodeBool(m.IsNo)
- buf.EncodeUint32(m.ValLifetime)
- buf.EncodeUint32(m.PrefLifetime)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceIP6ndRaPrefix) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Prefix.Address.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Prefix.Len = buf.DecodeUint8()
- m.UseDefault = buf.DecodeBool()
- m.NoAdvertise = buf.DecodeBool()
- m.OffLink = buf.DecodeBool()
- m.NoAutoconfig = buf.DecodeBool()
- m.NoOnlink = buf.DecodeBool()
- m.IsNo = buf.DecodeBool()
- m.ValLifetime = buf.DecodeUint32()
- m.PrefLifetime = buf.DecodeUint32()
- return nil
-}
-
-// SwInterfaceIP6ndRaPrefixReply defines message 'sw_interface_ip6nd_ra_prefix_reply'.
-type SwInterfaceIP6ndRaPrefixReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SwInterfaceIP6ndRaPrefixReply) Reset() { *m = SwInterfaceIP6ndRaPrefixReply{} }
-func (*SwInterfaceIP6ndRaPrefixReply) GetMessageName() string {
- return "sw_interface_ip6nd_ra_prefix_reply"
-}
-func (*SwInterfaceIP6ndRaPrefixReply) GetCrcString() string { return "e8d4e804" }
-func (*SwInterfaceIP6ndRaPrefixReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SwInterfaceIP6ndRaPrefixReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SwInterfaceIP6ndRaPrefixReply) 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 *SwInterfaceIP6ndRaPrefixReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// WantIP6RaEvents defines message 'want_ip6_ra_events'.
-type WantIP6RaEvents struct {
- Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
- PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
-}
-
-func (m *WantIP6RaEvents) Reset() { *m = WantIP6RaEvents{} }
-func (*WantIP6RaEvents) GetMessageName() string { return "want_ip6_ra_events" }
-func (*WantIP6RaEvents) GetCrcString() string { return "3ec6d6c2" }
-func (*WantIP6RaEvents) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *WantIP6RaEvents) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.Enable
- size += 4 // m.PID
- return size
-}
-func (m *WantIP6RaEvents) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.Enable)
- buf.EncodeUint32(m.PID)
- return buf.Bytes(), nil
-}
-func (m *WantIP6RaEvents) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Enable = buf.DecodeBool()
- m.PID = buf.DecodeUint32()
- return nil
-}
-
-// WantIP6RaEventsReply defines message 'want_ip6_ra_events_reply'.
-type WantIP6RaEventsReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *WantIP6RaEventsReply) Reset() { *m = WantIP6RaEventsReply{} }
-func (*WantIP6RaEventsReply) GetMessageName() string { return "want_ip6_ra_events_reply" }
-func (*WantIP6RaEventsReply) GetCrcString() string { return "e8d4e804" }
-func (*WantIP6RaEventsReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *WantIP6RaEventsReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *WantIP6RaEventsReply) 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 *WantIP6RaEventsReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_ip6_nd_binapi_init() }
-func file_ip6_nd_binapi_init() {
- api.RegisterMessage((*IP6RaEvent)(nil), "ip6_ra_event_47e8cfbe")
- api.RegisterMessage((*IP6ndProxyAddDel)(nil), "ip6nd_proxy_add_del_3fdf6659")
- api.RegisterMessage((*IP6ndProxyAddDelReply)(nil), "ip6nd_proxy_add_del_reply_e8d4e804")
- api.RegisterMessage((*IP6ndProxyDetails)(nil), "ip6nd_proxy_details_d35be8ff")
- api.RegisterMessage((*IP6ndProxyDump)(nil), "ip6nd_proxy_dump_51077d14")
- api.RegisterMessage((*IP6ndSendRouterSolicitation)(nil), "ip6nd_send_router_solicitation_e5de609c")
- api.RegisterMessage((*IP6ndSendRouterSolicitationReply)(nil), "ip6nd_send_router_solicitation_reply_e8d4e804")
- api.RegisterMessage((*SwInterfaceIP6ndRaConfig)(nil), "sw_interface_ip6nd_ra_config_3eb00b1c")
- api.RegisterMessage((*SwInterfaceIP6ndRaConfigReply)(nil), "sw_interface_ip6nd_ra_config_reply_e8d4e804")
- api.RegisterMessage((*SwInterfaceIP6ndRaPrefix)(nil), "sw_interface_ip6nd_ra_prefix_e098785f")
- api.RegisterMessage((*SwInterfaceIP6ndRaPrefixReply)(nil), "sw_interface_ip6nd_ra_prefix_reply_e8d4e804")
- api.RegisterMessage((*WantIP6RaEvents)(nil), "want_ip6_ra_events_3ec6d6c2")
- api.RegisterMessage((*WantIP6RaEventsReply)(nil), "want_ip6_ra_events_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*IP6RaEvent)(nil),
- (*IP6ndProxyAddDel)(nil),
- (*IP6ndProxyAddDelReply)(nil),
- (*IP6ndProxyDetails)(nil),
- (*IP6ndProxyDump)(nil),
- (*IP6ndSendRouterSolicitation)(nil),
- (*IP6ndSendRouterSolicitationReply)(nil),
- (*SwInterfaceIP6ndRaConfig)(nil),
- (*SwInterfaceIP6ndRaConfigReply)(nil),
- (*SwInterfaceIP6ndRaPrefix)(nil),
- (*SwInterfaceIP6ndRaPrefixReply)(nil),
- (*WantIP6RaEvents)(nil),
- (*WantIP6RaEventsReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/ip6_nd/ip6_nd_rpc.ba.go b/internal/testbinapi/binapi2001/ip6_nd/ip6_nd_rpc.ba.go
deleted file mode 100644
index 1d18c7d..0000000
--- a/internal/testbinapi/binapi2001/ip6_nd/ip6_nd_rpc.ba.go
+++ /dev/null
@@ -1,118 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package ip6_nd
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service ip6_nd.
-type RPCService interface {
- IP6ndProxyAddDel(ctx context.Context, in *IP6ndProxyAddDel) (*IP6ndProxyAddDelReply, error)
- IP6ndProxyDump(ctx context.Context, in *IP6ndProxyDump) (RPCService_IP6ndProxyDumpClient, error)
- IP6ndSendRouterSolicitation(ctx context.Context, in *IP6ndSendRouterSolicitation) (*IP6ndSendRouterSolicitationReply, error)
- SwInterfaceIP6ndRaConfig(ctx context.Context, in *SwInterfaceIP6ndRaConfig) (*SwInterfaceIP6ndRaConfigReply, error)
- SwInterfaceIP6ndRaPrefix(ctx context.Context, in *SwInterfaceIP6ndRaPrefix) (*SwInterfaceIP6ndRaPrefixReply, error)
- WantIP6RaEvents(ctx context.Context, in *WantIP6RaEvents) (*WantIP6RaEventsReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) IP6ndProxyAddDel(ctx context.Context, in *IP6ndProxyAddDel) (*IP6ndProxyAddDelReply, error) {
- out := new(IP6ndProxyAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) IP6ndProxyDump(ctx context.Context, in *IP6ndProxyDump) (RPCService_IP6ndProxyDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_IP6ndProxyDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_IP6ndProxyDumpClient interface {
- Recv() (*IP6ndProxyDetails, error)
- api.Stream
-}
-
-type serviceClient_IP6ndProxyDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_IP6ndProxyDumpClient) Recv() (*IP6ndProxyDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *IP6ndProxyDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) IP6ndSendRouterSolicitation(ctx context.Context, in *IP6ndSendRouterSolicitation) (*IP6ndSendRouterSolicitationReply, error) {
- out := new(IP6ndSendRouterSolicitationReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SwInterfaceIP6ndRaConfig(ctx context.Context, in *SwInterfaceIP6ndRaConfig) (*SwInterfaceIP6ndRaConfigReply, error) {
- out := new(SwInterfaceIP6ndRaConfigReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SwInterfaceIP6ndRaPrefix(ctx context.Context, in *SwInterfaceIP6ndRaPrefix) (*SwInterfaceIP6ndRaPrefixReply, error) {
- out := new(SwInterfaceIP6ndRaPrefixReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) WantIP6RaEvents(ctx context.Context, in *WantIP6RaEvents) (*WantIP6RaEventsReply, error) {
- out := new(WantIP6RaEventsReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/ip_neighbor/ip_neighbor.ba.go b/internal/testbinapi/binapi2001/ip_neighbor/ip_neighbor.ba.go
deleted file mode 100644
index 6e88503..0000000
--- a/internal/testbinapi/binapi2001/ip_neighbor/ip_neighbor.ba.go
+++ /dev/null
@@ -1,1376 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/ip_neighbor.api.json
-
-// Package ip_neighbor contains generated bindings for API file ip_neighbor.api.
-//
-// Contents:
-// 7 aliases
-// 11 enums
-// 7 structs
-// 1 union
-// 9 messages
-//
-package ip_neighbor
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "ip_neighbor"
- APIVersion = "1.0.0"
- VersionCrc = 0xdae37c55
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPNeighborFlags defines enum 'ip_neighbor_flags'.
-type IPNeighborFlags uint8
-
-const (
- IP_API_NEIGHBOR_FLAG_NONE IPNeighborFlags = 0
- IP_API_NEIGHBOR_FLAG_STATIC IPNeighborFlags = 1
- IP_API_NEIGHBOR_FLAG_NO_FIB_ENTRY IPNeighborFlags = 2
-)
-
-var (
- IPNeighborFlags_name = map[uint8]string{
- 0: "IP_API_NEIGHBOR_FLAG_NONE",
- 1: "IP_API_NEIGHBOR_FLAG_STATIC",
- 2: "IP_API_NEIGHBOR_FLAG_NO_FIB_ENTRY",
- }
- IPNeighborFlags_value = map[string]uint8{
- "IP_API_NEIGHBOR_FLAG_NONE": 0,
- "IP_API_NEIGHBOR_FLAG_STATIC": 1,
- "IP_API_NEIGHBOR_FLAG_NO_FIB_ENTRY": 2,
- }
-)
-
-func (x IPNeighborFlags) String() string {
- s, ok := IPNeighborFlags_name[uint8(x)]
- if ok {
- return s
- }
- str := func(n uint8) string {
- s, ok := IPNeighborFlags_name[uint8(n)]
- if ok {
- return s
- }
- return "IPNeighborFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint8(0); i <= 8; i++ {
- val := uint8(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint8(x))
- }
- return s
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// MacAddress defines alias 'mac_address'.
-type MacAddress [6]uint8
-
-func ParseMacAddress(s string) (MacAddress, error) {
- var macaddr MacAddress
- mac, err := net.ParseMAC(s)
- if err != nil {
- return macaddr, err
- }
- copy(macaddr[:], mac[:])
- return macaddr, nil
-}
-
-func (x MacAddress) ToMAC() net.HardwareAddr {
- return net.HardwareAddr(x[:])
-}
-
-func (x MacAddress) String() string {
- return x.ToMAC().String()
-}
-
-func (x *MacAddress) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *MacAddress) UnmarshalText(text []byte) error {
- mac, err := ParseMacAddress(string(text))
- if err != nil {
- return err
- }
- *x = mac
- return nil
-}
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IPNeighbor defines type 'ip_neighbor'.
-type IPNeighbor struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Flags IPNeighborFlags `binapi:"ip_neighbor_flags,name=flags" json:"flags,omitempty"`
- MacAddress MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
- IPAddress Address `binapi:"address,name=ip_address" json:"ip_address,omitempty"`
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
-
-// IPNeighborAddDel defines message 'ip_neighbor_add_del'.
-type IPNeighborAddDel struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- Neighbor IPNeighbor `binapi:"ip_neighbor,name=neighbor" json:"neighbor,omitempty"`
-}
-
-func (m *IPNeighborAddDel) Reset() { *m = IPNeighborAddDel{} }
-func (*IPNeighborAddDel) GetMessageName() string { return "ip_neighbor_add_del" }
-func (*IPNeighborAddDel) GetCrcString() string { return "105518b6" }
-func (*IPNeighborAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IPNeighborAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 4 // m.Neighbor.SwIfIndex
- size += 1 // m.Neighbor.Flags
- size += 1 * 6 // m.Neighbor.MacAddress
- size += 4 // m.Neighbor.IPAddress.Af
- size += 1 * 16 // m.Neighbor.IPAddress.Un
- return size
-}
-func (m *IPNeighborAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeUint32(uint32(m.Neighbor.SwIfIndex))
- buf.EncodeUint8(uint8(m.Neighbor.Flags))
- buf.EncodeBytes(m.Neighbor.MacAddress[:], 6)
- buf.EncodeUint32(uint32(m.Neighbor.IPAddress.Af))
- buf.EncodeBytes(m.Neighbor.IPAddress.Un.XXX_UnionData[:], 16)
- return buf.Bytes(), nil
-}
-func (m *IPNeighborAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.Neighbor.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Neighbor.Flags = IPNeighborFlags(buf.DecodeUint8())
- copy(m.Neighbor.MacAddress[:], buf.DecodeBytes(6))
- m.Neighbor.IPAddress.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Neighbor.IPAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- return nil
-}
-
-// IPNeighborAddDelReply defines message 'ip_neighbor_add_del_reply'.
-type IPNeighborAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
-}
-
-func (m *IPNeighborAddDelReply) Reset() { *m = IPNeighborAddDelReply{} }
-func (*IPNeighborAddDelReply) GetMessageName() string { return "ip_neighbor_add_del_reply" }
-func (*IPNeighborAddDelReply) GetCrcString() string { return "1992deab" }
-func (*IPNeighborAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IPNeighborAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.StatsIndex
- return size
-}
-func (m *IPNeighborAddDelReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.StatsIndex)
- return buf.Bytes(), nil
-}
-func (m *IPNeighborAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.StatsIndex = buf.DecodeUint32()
- return nil
-}
-
-// IPNeighborConfig defines message 'ip_neighbor_config'.
-type IPNeighborConfig struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- MaxNumber uint32 `binapi:"u32,name=max_number" json:"max_number,omitempty"`
- MaxAge uint32 `binapi:"u32,name=max_age" json:"max_age,omitempty"`
- Recycle bool `binapi:"bool,name=recycle" json:"recycle,omitempty"`
-}
-
-func (m *IPNeighborConfig) Reset() { *m = IPNeighborConfig{} }
-func (*IPNeighborConfig) GetMessageName() string { return "ip_neighbor_config" }
-func (*IPNeighborConfig) GetCrcString() string { return "f4a5cf44" }
-func (*IPNeighborConfig) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IPNeighborConfig) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Af
- size += 4 // m.MaxNumber
- size += 4 // m.MaxAge
- size += 1 // m.Recycle
- return size
-}
-func (m *IPNeighborConfig) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.Af))
- buf.EncodeUint32(m.MaxNumber)
- buf.EncodeUint32(m.MaxAge)
- buf.EncodeBool(m.Recycle)
- return buf.Bytes(), nil
-}
-func (m *IPNeighborConfig) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Af = AddressFamily(buf.DecodeUint32())
- m.MaxNumber = buf.DecodeUint32()
- m.MaxAge = buf.DecodeUint32()
- m.Recycle = buf.DecodeBool()
- return nil
-}
-
-// IPNeighborConfigReply defines message 'ip_neighbor_config_reply'.
-type IPNeighborConfigReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *IPNeighborConfigReply) Reset() { *m = IPNeighborConfigReply{} }
-func (*IPNeighborConfigReply) GetMessageName() string { return "ip_neighbor_config_reply" }
-func (*IPNeighborConfigReply) GetCrcString() string { return "e8d4e804" }
-func (*IPNeighborConfigReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IPNeighborConfigReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *IPNeighborConfigReply) 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 *IPNeighborConfigReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// IPNeighborDetails defines message 'ip_neighbor_details'.
-type IPNeighborDetails struct {
- Neighbor IPNeighbor `binapi:"ip_neighbor,name=neighbor" json:"neighbor,omitempty"`
-}
-
-func (m *IPNeighborDetails) Reset() { *m = IPNeighborDetails{} }
-func (*IPNeighborDetails) GetMessageName() string { return "ip_neighbor_details" }
-func (*IPNeighborDetails) GetCrcString() string { return "59121ce9" }
-func (*IPNeighborDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IPNeighborDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Neighbor.SwIfIndex
- size += 1 // m.Neighbor.Flags
- size += 1 * 6 // m.Neighbor.MacAddress
- size += 4 // m.Neighbor.IPAddress.Af
- size += 1 * 16 // m.Neighbor.IPAddress.Un
- return size
-}
-func (m *IPNeighborDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.Neighbor.SwIfIndex))
- buf.EncodeUint8(uint8(m.Neighbor.Flags))
- buf.EncodeBytes(m.Neighbor.MacAddress[:], 6)
- buf.EncodeUint32(uint32(m.Neighbor.IPAddress.Af))
- buf.EncodeBytes(m.Neighbor.IPAddress.Un.XXX_UnionData[:], 16)
- return buf.Bytes(), nil
-}
-func (m *IPNeighborDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Neighbor.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Neighbor.Flags = IPNeighborFlags(buf.DecodeUint8())
- copy(m.Neighbor.MacAddress[:], buf.DecodeBytes(6))
- m.Neighbor.IPAddress.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Neighbor.IPAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- return nil
-}
-
-// IPNeighborDump defines message 'ip_neighbor_dump'.
-type IPNeighborDump struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
-}
-
-func (m *IPNeighborDump) Reset() { *m = IPNeighborDump{} }
-func (*IPNeighborDump) GetMessageName() string { return "ip_neighbor_dump" }
-func (*IPNeighborDump) GetCrcString() string { return "cd831298" }
-func (*IPNeighborDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IPNeighborDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.Af
- return size
-}
-func (m *IPNeighborDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(uint32(m.Af))
- return buf.Bytes(), nil
-}
-func (m *IPNeighborDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Af = AddressFamily(buf.DecodeUint32())
- return nil
-}
-
-// IPNeighborEvent defines message 'ip_neighbor_event'.
-type IPNeighborEvent struct {
- PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
- Neighbor IPNeighbor `binapi:"ip_neighbor,name=neighbor" json:"neighbor,omitempty"`
-}
-
-func (m *IPNeighborEvent) Reset() { *m = IPNeighborEvent{} }
-func (*IPNeighborEvent) GetMessageName() string { return "ip_neighbor_event" }
-func (*IPNeighborEvent) GetCrcString() string { return "83933131" }
-func (*IPNeighborEvent) GetMessageType() api.MessageType {
- return api.EventMessage
-}
-
-func (m *IPNeighborEvent) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.PID
- size += 4 // m.Neighbor.SwIfIndex
- size += 1 // m.Neighbor.Flags
- size += 1 * 6 // m.Neighbor.MacAddress
- size += 4 // m.Neighbor.IPAddress.Af
- size += 1 * 16 // m.Neighbor.IPAddress.Un
- return size
-}
-func (m *IPNeighborEvent) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.PID)
- buf.EncodeUint32(uint32(m.Neighbor.SwIfIndex))
- buf.EncodeUint8(uint8(m.Neighbor.Flags))
- buf.EncodeBytes(m.Neighbor.MacAddress[:], 6)
- buf.EncodeUint32(uint32(m.Neighbor.IPAddress.Af))
- buf.EncodeBytes(m.Neighbor.IPAddress.Un.XXX_UnionData[:], 16)
- return buf.Bytes(), nil
-}
-func (m *IPNeighborEvent) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.PID = buf.DecodeUint32()
- m.Neighbor.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Neighbor.Flags = IPNeighborFlags(buf.DecodeUint8())
- copy(m.Neighbor.MacAddress[:], buf.DecodeBytes(6))
- m.Neighbor.IPAddress.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Neighbor.IPAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- return nil
-}
-
-// WantIPNeighborEvents defines message 'want_ip_neighbor_events'.
-type WantIPNeighborEvents struct {
- Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
- PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
- IP Address `binapi:"address,name=ip" json:"ip,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
-}
-
-func (m *WantIPNeighborEvents) Reset() { *m = WantIPNeighborEvents{} }
-func (*WantIPNeighborEvents) GetMessageName() string { return "want_ip_neighbor_events" }
-func (*WantIPNeighborEvents) GetCrcString() string { return "1a312870" }
-func (*WantIPNeighborEvents) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *WantIPNeighborEvents) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.Enable
- size += 4 // m.PID
- size += 4 // m.IP.Af
- size += 1 * 16 // m.IP.Un
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *WantIPNeighborEvents) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.Enable)
- buf.EncodeUint32(m.PID)
- buf.EncodeUint32(uint32(m.IP.Af))
- buf.EncodeBytes(m.IP.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- return buf.Bytes(), nil
-}
-func (m *WantIPNeighborEvents) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Enable = buf.DecodeBool()
- m.PID = buf.DecodeUint32()
- m.IP.Af = AddressFamily(buf.DecodeUint32())
- copy(m.IP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// WantIPNeighborEventsReply defines message 'want_ip_neighbor_events_reply'.
-type WantIPNeighborEventsReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *WantIPNeighborEventsReply) Reset() { *m = WantIPNeighborEventsReply{} }
-func (*WantIPNeighborEventsReply) GetMessageName() string { return "want_ip_neighbor_events_reply" }
-func (*WantIPNeighborEventsReply) GetCrcString() string { return "e8d4e804" }
-func (*WantIPNeighborEventsReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *WantIPNeighborEventsReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *WantIPNeighborEventsReply) 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 *WantIPNeighborEventsReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_ip_neighbor_binapi_init() }
-func file_ip_neighbor_binapi_init() {
- api.RegisterMessage((*IPNeighborAddDel)(nil), "ip_neighbor_add_del_105518b6")
- api.RegisterMessage((*IPNeighborAddDelReply)(nil), "ip_neighbor_add_del_reply_1992deab")
- api.RegisterMessage((*IPNeighborConfig)(nil), "ip_neighbor_config_f4a5cf44")
- api.RegisterMessage((*IPNeighborConfigReply)(nil), "ip_neighbor_config_reply_e8d4e804")
- api.RegisterMessage((*IPNeighborDetails)(nil), "ip_neighbor_details_59121ce9")
- api.RegisterMessage((*IPNeighborDump)(nil), "ip_neighbor_dump_cd831298")
- api.RegisterMessage((*IPNeighborEvent)(nil), "ip_neighbor_event_83933131")
- api.RegisterMessage((*WantIPNeighborEvents)(nil), "want_ip_neighbor_events_1a312870")
- api.RegisterMessage((*WantIPNeighborEventsReply)(nil), "want_ip_neighbor_events_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*IPNeighborAddDel)(nil),
- (*IPNeighborAddDelReply)(nil),
- (*IPNeighborConfig)(nil),
- (*IPNeighborConfigReply)(nil),
- (*IPNeighborDetails)(nil),
- (*IPNeighborDump)(nil),
- (*IPNeighborEvent)(nil),
- (*WantIPNeighborEvents)(nil),
- (*WantIPNeighborEventsReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/ip_neighbor/ip_neighbor_rpc.ba.go b/internal/testbinapi/binapi2001/ip_neighbor/ip_neighbor_rpc.ba.go
deleted file mode 100644
index 9cab182..0000000
--- a/internal/testbinapi/binapi2001/ip_neighbor/ip_neighbor_rpc.ba.go
+++ /dev/null
@@ -1,98 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package ip_neighbor
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service ip_neighbor.
-type RPCService interface {
- IPNeighborAddDel(ctx context.Context, in *IPNeighborAddDel) (*IPNeighborAddDelReply, error)
- IPNeighborConfig(ctx context.Context, in *IPNeighborConfig) (*IPNeighborConfigReply, error)
- IPNeighborDump(ctx context.Context, in *IPNeighborDump) (RPCService_IPNeighborDumpClient, error)
- WantIPNeighborEvents(ctx context.Context, in *WantIPNeighborEvents) (*WantIPNeighborEventsReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) IPNeighborAddDel(ctx context.Context, in *IPNeighborAddDel) (*IPNeighborAddDelReply, error) {
- out := new(IPNeighborAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) IPNeighborConfig(ctx context.Context, in *IPNeighborConfig) (*IPNeighborConfigReply, error) {
- out := new(IPNeighborConfigReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) IPNeighborDump(ctx context.Context, in *IPNeighborDump) (RPCService_IPNeighborDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_IPNeighborDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_IPNeighborDumpClient interface {
- Recv() (*IPNeighborDetails, error)
- api.Stream
-}
-
-type serviceClient_IPNeighborDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_IPNeighborDumpClient) Recv() (*IPNeighborDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *IPNeighborDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) WantIPNeighborEvents(ctx context.Context, in *WantIPNeighborEvents) (*WantIPNeighborEventsReply, error) {
- out := new(WantIPNeighborEventsReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/ip_types/ip_types.ba.go b/internal/testbinapi/binapi2001/ip_types/ip_types.ba.go
deleted file mode 100644
index b302df0..0000000
--- a/internal/testbinapi/binapi2001/ip_types/ip_types.ba.go
+++ /dev/null
@@ -1,626 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/ip_types.api.json
-
-// Package ip_types contains generated bindings for API file ip_types.api.
-//
-// Contents:
-// 5 aliases
-// 4 enums
-// 6 structs
-// 1 union
-//
-package ip_types
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "ip_types"
- APIVersion = "3.0.0"
- VersionCrc = 0x80424562
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
diff --git a/internal/testbinapi/binapi2001/ipfix_export/ipfix_export.ba.go b/internal/testbinapi/binapi2001/ipfix_export/ipfix_export.ba.go
deleted file mode 100644
index ee75bbf..0000000
--- a/internal/testbinapi/binapi2001/ipfix_export/ipfix_export.ba.go
+++ /dev/null
@@ -1,1193 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/ipfix_export.api.json
-
-// Package ipfix_export contains generated bindings for API file ipfix_export.api.
-//
-// Contents:
-// 5 aliases
-// 4 enums
-// 6 structs
-// 1 union
-// 14 messages
-//
-package ipfix_export
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "ipfix_export"
- APIVersion = "2.0.1"
- VersionCrc = 0xee6ea488
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
-
-// IpfixClassifyStreamDetails defines message 'ipfix_classify_stream_details'.
-type IpfixClassifyStreamDetails struct {
- DomainID uint32 `binapi:"u32,name=domain_id" json:"domain_id,omitempty"`
- SrcPort uint16 `binapi:"u16,name=src_port" json:"src_port,omitempty"`
-}
-
-func (m *IpfixClassifyStreamDetails) Reset() { *m = IpfixClassifyStreamDetails{} }
-func (*IpfixClassifyStreamDetails) GetMessageName() string { return "ipfix_classify_stream_details" }
-func (*IpfixClassifyStreamDetails) GetCrcString() string { return "2903539d" }
-func (*IpfixClassifyStreamDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IpfixClassifyStreamDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.DomainID
- size += 2 // m.SrcPort
- return size
-}
-func (m *IpfixClassifyStreamDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.DomainID)
- buf.EncodeUint16(m.SrcPort)
- return buf.Bytes(), nil
-}
-func (m *IpfixClassifyStreamDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.DomainID = buf.DecodeUint32()
- m.SrcPort = buf.DecodeUint16()
- return nil
-}
-
-// IpfixClassifyStreamDump defines message 'ipfix_classify_stream_dump'.
-type IpfixClassifyStreamDump struct{}
-
-func (m *IpfixClassifyStreamDump) Reset() { *m = IpfixClassifyStreamDump{} }
-func (*IpfixClassifyStreamDump) GetMessageName() string { return "ipfix_classify_stream_dump" }
-func (*IpfixClassifyStreamDump) GetCrcString() string { return "51077d14" }
-func (*IpfixClassifyStreamDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IpfixClassifyStreamDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *IpfixClassifyStreamDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *IpfixClassifyStreamDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// IpfixClassifyTableAddDel defines message 'ipfix_classify_table_add_del'.
-type IpfixClassifyTableAddDel struct {
- TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
- IPVersion AddressFamily `binapi:"address_family,name=ip_version" json:"ip_version,omitempty"`
- TransportProtocol IPProto `binapi:"ip_proto,name=transport_protocol" json:"transport_protocol,omitempty"`
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
-}
-
-func (m *IpfixClassifyTableAddDel) Reset() { *m = IpfixClassifyTableAddDel{} }
-func (*IpfixClassifyTableAddDel) GetMessageName() string { return "ipfix_classify_table_add_del" }
-func (*IpfixClassifyTableAddDel) GetCrcString() string { return "5118bc5e" }
-func (*IpfixClassifyTableAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IpfixClassifyTableAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.TableID
- size += 4 // m.IPVersion
- size += 4 // m.TransportProtocol
- size += 1 // m.IsAdd
- return size
-}
-func (m *IpfixClassifyTableAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.TableID)
- buf.EncodeUint32(uint32(m.IPVersion))
- buf.EncodeUint32(uint32(m.TransportProtocol))
- buf.EncodeBool(m.IsAdd)
- return buf.Bytes(), nil
-}
-func (m *IpfixClassifyTableAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.TableID = buf.DecodeUint32()
- m.IPVersion = AddressFamily(buf.DecodeUint32())
- m.TransportProtocol = IPProto(buf.DecodeUint32())
- m.IsAdd = buf.DecodeBool()
- return nil
-}
-
-// IpfixClassifyTableAddDelReply defines message 'ipfix_classify_table_add_del_reply'.
-type IpfixClassifyTableAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *IpfixClassifyTableAddDelReply) Reset() { *m = IpfixClassifyTableAddDelReply{} }
-func (*IpfixClassifyTableAddDelReply) GetMessageName() string {
- return "ipfix_classify_table_add_del_reply"
-}
-func (*IpfixClassifyTableAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*IpfixClassifyTableAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IpfixClassifyTableAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *IpfixClassifyTableAddDelReply) 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 *IpfixClassifyTableAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// IpfixClassifyTableDetails defines message 'ipfix_classify_table_details'.
-type IpfixClassifyTableDetails struct {
- TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
- IPVersion AddressFamily `binapi:"address_family,name=ip_version" json:"ip_version,omitempty"`
- TransportProtocol IPProto `binapi:"ip_proto,name=transport_protocol" json:"transport_protocol,omitempty"`
-}
-
-func (m *IpfixClassifyTableDetails) Reset() { *m = IpfixClassifyTableDetails{} }
-func (*IpfixClassifyTableDetails) GetMessageName() string { return "ipfix_classify_table_details" }
-func (*IpfixClassifyTableDetails) GetCrcString() string { return "7c8351ec" }
-func (*IpfixClassifyTableDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IpfixClassifyTableDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.TableID
- size += 4 // m.IPVersion
- size += 4 // m.TransportProtocol
- return size
-}
-func (m *IpfixClassifyTableDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.TableID)
- buf.EncodeUint32(uint32(m.IPVersion))
- buf.EncodeUint32(uint32(m.TransportProtocol))
- return buf.Bytes(), nil
-}
-func (m *IpfixClassifyTableDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.TableID = buf.DecodeUint32()
- m.IPVersion = AddressFamily(buf.DecodeUint32())
- m.TransportProtocol = IPProto(buf.DecodeUint32())
- return nil
-}
-
-// IpfixClassifyTableDump defines message 'ipfix_classify_table_dump'.
-type IpfixClassifyTableDump struct{}
-
-func (m *IpfixClassifyTableDump) Reset() { *m = IpfixClassifyTableDump{} }
-func (*IpfixClassifyTableDump) GetMessageName() string { return "ipfix_classify_table_dump" }
-func (*IpfixClassifyTableDump) GetCrcString() string { return "51077d14" }
-func (*IpfixClassifyTableDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IpfixClassifyTableDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *IpfixClassifyTableDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *IpfixClassifyTableDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// IpfixExporterDetails defines message 'ipfix_exporter_details'.
-type IpfixExporterDetails struct {
- CollectorAddress Address `binapi:"address,name=collector_address" json:"collector_address,omitempty"`
- CollectorPort uint16 `binapi:"u16,name=collector_port" json:"collector_port,omitempty"`
- SrcAddress Address `binapi:"address,name=src_address" json:"src_address,omitempty"`
- VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
- PathMtu uint32 `binapi:"u32,name=path_mtu" json:"path_mtu,omitempty"`
- TemplateInterval uint32 `binapi:"u32,name=template_interval" json:"template_interval,omitempty"`
- UDPChecksum bool `binapi:"bool,name=udp_checksum" json:"udp_checksum,omitempty"`
-}
-
-func (m *IpfixExporterDetails) Reset() { *m = IpfixExporterDetails{} }
-func (*IpfixExporterDetails) GetMessageName() string { return "ipfix_exporter_details" }
-func (*IpfixExporterDetails) GetCrcString() string { return "11e07413" }
-func (*IpfixExporterDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IpfixExporterDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.CollectorAddress.Af
- size += 1 * 16 // m.CollectorAddress.Un
- size += 2 // m.CollectorPort
- size += 4 // m.SrcAddress.Af
- size += 1 * 16 // m.SrcAddress.Un
- size += 4 // m.VrfID
- size += 4 // m.PathMtu
- size += 4 // m.TemplateInterval
- size += 1 // m.UDPChecksum
- return size
-}
-func (m *IpfixExporterDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.CollectorAddress.Af))
- buf.EncodeBytes(m.CollectorAddress.Un.XXX_UnionData[:], 16)
- buf.EncodeUint16(m.CollectorPort)
- buf.EncodeUint32(uint32(m.SrcAddress.Af))
- buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(m.VrfID)
- buf.EncodeUint32(m.PathMtu)
- buf.EncodeUint32(m.TemplateInterval)
- buf.EncodeBool(m.UDPChecksum)
- return buf.Bytes(), nil
-}
-func (m *IpfixExporterDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.CollectorAddress.Af = AddressFamily(buf.DecodeUint32())
- copy(m.CollectorAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.CollectorPort = buf.DecodeUint16()
- m.SrcAddress.Af = AddressFamily(buf.DecodeUint32())
- copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.VrfID = buf.DecodeUint32()
- m.PathMtu = buf.DecodeUint32()
- m.TemplateInterval = buf.DecodeUint32()
- m.UDPChecksum = buf.DecodeBool()
- return nil
-}
-
-// IpfixExporterDump defines message 'ipfix_exporter_dump'.
-type IpfixExporterDump struct{}
-
-func (m *IpfixExporterDump) Reset() { *m = IpfixExporterDump{} }
-func (*IpfixExporterDump) GetMessageName() string { return "ipfix_exporter_dump" }
-func (*IpfixExporterDump) GetCrcString() string { return "51077d14" }
-func (*IpfixExporterDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IpfixExporterDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *IpfixExporterDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *IpfixExporterDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// IpfixFlush defines message 'ipfix_flush'.
-type IpfixFlush struct{}
-
-func (m *IpfixFlush) Reset() { *m = IpfixFlush{} }
-func (*IpfixFlush) GetMessageName() string { return "ipfix_flush" }
-func (*IpfixFlush) GetCrcString() string { return "51077d14" }
-func (*IpfixFlush) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IpfixFlush) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *IpfixFlush) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *IpfixFlush) Unmarshal(b []byte) error {
- return nil
-}
-
-// IpfixFlushReply defines message 'ipfix_flush_reply'.
-type IpfixFlushReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *IpfixFlushReply) Reset() { *m = IpfixFlushReply{} }
-func (*IpfixFlushReply) GetMessageName() string { return "ipfix_flush_reply" }
-func (*IpfixFlushReply) GetCrcString() string { return "e8d4e804" }
-func (*IpfixFlushReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IpfixFlushReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *IpfixFlushReply) 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 *IpfixFlushReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SetIpfixClassifyStream defines message 'set_ipfix_classify_stream'.
-type SetIpfixClassifyStream struct {
- DomainID uint32 `binapi:"u32,name=domain_id" json:"domain_id,omitempty"`
- SrcPort uint16 `binapi:"u16,name=src_port" json:"src_port,omitempty"`
-}
-
-func (m *SetIpfixClassifyStream) Reset() { *m = SetIpfixClassifyStream{} }
-func (*SetIpfixClassifyStream) GetMessageName() string { return "set_ipfix_classify_stream" }
-func (*SetIpfixClassifyStream) GetCrcString() string { return "c9cbe053" }
-func (*SetIpfixClassifyStream) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SetIpfixClassifyStream) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.DomainID
- size += 2 // m.SrcPort
- return size
-}
-func (m *SetIpfixClassifyStream) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.DomainID)
- buf.EncodeUint16(m.SrcPort)
- return buf.Bytes(), nil
-}
-func (m *SetIpfixClassifyStream) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.DomainID = buf.DecodeUint32()
- m.SrcPort = buf.DecodeUint16()
- return nil
-}
-
-// SetIpfixClassifyStreamReply defines message 'set_ipfix_classify_stream_reply'.
-type SetIpfixClassifyStreamReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SetIpfixClassifyStreamReply) Reset() { *m = SetIpfixClassifyStreamReply{} }
-func (*SetIpfixClassifyStreamReply) GetMessageName() string { return "set_ipfix_classify_stream_reply" }
-func (*SetIpfixClassifyStreamReply) GetCrcString() string { return "e8d4e804" }
-func (*SetIpfixClassifyStreamReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SetIpfixClassifyStreamReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SetIpfixClassifyStreamReply) 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 *SetIpfixClassifyStreamReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SetIpfixExporter defines message 'set_ipfix_exporter'.
-type SetIpfixExporter struct {
- CollectorAddress Address `binapi:"address,name=collector_address" json:"collector_address,omitempty"`
- CollectorPort uint16 `binapi:"u16,name=collector_port" json:"collector_port,omitempty"`
- SrcAddress Address `binapi:"address,name=src_address" json:"src_address,omitempty"`
- VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
- PathMtu uint32 `binapi:"u32,name=path_mtu" json:"path_mtu,omitempty"`
- TemplateInterval uint32 `binapi:"u32,name=template_interval" json:"template_interval,omitempty"`
- UDPChecksum bool `binapi:"bool,name=udp_checksum" json:"udp_checksum,omitempty"`
-}
-
-func (m *SetIpfixExporter) Reset() { *m = SetIpfixExporter{} }
-func (*SetIpfixExporter) GetMessageName() string { return "set_ipfix_exporter" }
-func (*SetIpfixExporter) GetCrcString() string { return "69284e07" }
-func (*SetIpfixExporter) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SetIpfixExporter) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.CollectorAddress.Af
- size += 1 * 16 // m.CollectorAddress.Un
- size += 2 // m.CollectorPort
- size += 4 // m.SrcAddress.Af
- size += 1 * 16 // m.SrcAddress.Un
- size += 4 // m.VrfID
- size += 4 // m.PathMtu
- size += 4 // m.TemplateInterval
- size += 1 // m.UDPChecksum
- return size
-}
-func (m *SetIpfixExporter) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.CollectorAddress.Af))
- buf.EncodeBytes(m.CollectorAddress.Un.XXX_UnionData[:], 16)
- buf.EncodeUint16(m.CollectorPort)
- buf.EncodeUint32(uint32(m.SrcAddress.Af))
- buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(m.VrfID)
- buf.EncodeUint32(m.PathMtu)
- buf.EncodeUint32(m.TemplateInterval)
- buf.EncodeBool(m.UDPChecksum)
- return buf.Bytes(), nil
-}
-func (m *SetIpfixExporter) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.CollectorAddress.Af = AddressFamily(buf.DecodeUint32())
- copy(m.CollectorAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.CollectorPort = buf.DecodeUint16()
- m.SrcAddress.Af = AddressFamily(buf.DecodeUint32())
- copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.VrfID = buf.DecodeUint32()
- m.PathMtu = buf.DecodeUint32()
- m.TemplateInterval = buf.DecodeUint32()
- m.UDPChecksum = buf.DecodeBool()
- return nil
-}
-
-// SetIpfixExporterReply defines message 'set_ipfix_exporter_reply'.
-type SetIpfixExporterReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SetIpfixExporterReply) Reset() { *m = SetIpfixExporterReply{} }
-func (*SetIpfixExporterReply) GetMessageName() string { return "set_ipfix_exporter_reply" }
-func (*SetIpfixExporterReply) GetCrcString() string { return "e8d4e804" }
-func (*SetIpfixExporterReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SetIpfixExporterReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SetIpfixExporterReply) 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 *SetIpfixExporterReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_ipfix_export_binapi_init() }
-func file_ipfix_export_binapi_init() {
- api.RegisterMessage((*IpfixClassifyStreamDetails)(nil), "ipfix_classify_stream_details_2903539d")
- api.RegisterMessage((*IpfixClassifyStreamDump)(nil), "ipfix_classify_stream_dump_51077d14")
- api.RegisterMessage((*IpfixClassifyTableAddDel)(nil), "ipfix_classify_table_add_del_5118bc5e")
- api.RegisterMessage((*IpfixClassifyTableAddDelReply)(nil), "ipfix_classify_table_add_del_reply_e8d4e804")
- api.RegisterMessage((*IpfixClassifyTableDetails)(nil), "ipfix_classify_table_details_7c8351ec")
- api.RegisterMessage((*IpfixClassifyTableDump)(nil), "ipfix_classify_table_dump_51077d14")
- api.RegisterMessage((*IpfixExporterDetails)(nil), "ipfix_exporter_details_11e07413")
- api.RegisterMessage((*IpfixExporterDump)(nil), "ipfix_exporter_dump_51077d14")
- api.RegisterMessage((*IpfixFlush)(nil), "ipfix_flush_51077d14")
- api.RegisterMessage((*IpfixFlushReply)(nil), "ipfix_flush_reply_e8d4e804")
- api.RegisterMessage((*SetIpfixClassifyStream)(nil), "set_ipfix_classify_stream_c9cbe053")
- api.RegisterMessage((*SetIpfixClassifyStreamReply)(nil), "set_ipfix_classify_stream_reply_e8d4e804")
- api.RegisterMessage((*SetIpfixExporter)(nil), "set_ipfix_exporter_69284e07")
- api.RegisterMessage((*SetIpfixExporterReply)(nil), "set_ipfix_exporter_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*IpfixClassifyStreamDetails)(nil),
- (*IpfixClassifyStreamDump)(nil),
- (*IpfixClassifyTableAddDel)(nil),
- (*IpfixClassifyTableAddDelReply)(nil),
- (*IpfixClassifyTableDetails)(nil),
- (*IpfixClassifyTableDump)(nil),
- (*IpfixExporterDetails)(nil),
- (*IpfixExporterDump)(nil),
- (*IpfixFlush)(nil),
- (*IpfixFlushReply)(nil),
- (*SetIpfixClassifyStream)(nil),
- (*SetIpfixClassifyStreamReply)(nil),
- (*SetIpfixExporter)(nil),
- (*SetIpfixExporterReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/ipfix_export/ipfix_export_rpc.ba.go b/internal/testbinapi/binapi2001/ipfix_export/ipfix_export_rpc.ba.go
deleted file mode 100644
index c0de49b..0000000
--- a/internal/testbinapi/binapi2001/ipfix_export/ipfix_export_rpc.ba.go
+++ /dev/null
@@ -1,196 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package ipfix_export
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service ipfix_export.
-type RPCService interface {
- IpfixClassifyStreamDump(ctx context.Context, in *IpfixClassifyStreamDump) (RPCService_IpfixClassifyStreamDumpClient, error)
- IpfixClassifyTableAddDel(ctx context.Context, in *IpfixClassifyTableAddDel) (*IpfixClassifyTableAddDelReply, error)
- IpfixClassifyTableDump(ctx context.Context, in *IpfixClassifyTableDump) (RPCService_IpfixClassifyTableDumpClient, error)
- IpfixExporterDump(ctx context.Context, in *IpfixExporterDump) (RPCService_IpfixExporterDumpClient, error)
- IpfixFlush(ctx context.Context, in *IpfixFlush) (*IpfixFlushReply, error)
- SetIpfixClassifyStream(ctx context.Context, in *SetIpfixClassifyStream) (*SetIpfixClassifyStreamReply, error)
- SetIpfixExporter(ctx context.Context, in *SetIpfixExporter) (*SetIpfixExporterReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) IpfixClassifyStreamDump(ctx context.Context, in *IpfixClassifyStreamDump) (RPCService_IpfixClassifyStreamDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_IpfixClassifyStreamDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_IpfixClassifyStreamDumpClient interface {
- Recv() (*IpfixClassifyStreamDetails, error)
- api.Stream
-}
-
-type serviceClient_IpfixClassifyStreamDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_IpfixClassifyStreamDumpClient) Recv() (*IpfixClassifyStreamDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *IpfixClassifyStreamDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) IpfixClassifyTableAddDel(ctx context.Context, in *IpfixClassifyTableAddDel) (*IpfixClassifyTableAddDelReply, error) {
- out := new(IpfixClassifyTableAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) IpfixClassifyTableDump(ctx context.Context, in *IpfixClassifyTableDump) (RPCService_IpfixClassifyTableDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_IpfixClassifyTableDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_IpfixClassifyTableDumpClient interface {
- Recv() (*IpfixClassifyTableDetails, error)
- api.Stream
-}
-
-type serviceClient_IpfixClassifyTableDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_IpfixClassifyTableDumpClient) Recv() (*IpfixClassifyTableDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *IpfixClassifyTableDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) IpfixExporterDump(ctx context.Context, in *IpfixExporterDump) (RPCService_IpfixExporterDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_IpfixExporterDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_IpfixExporterDumpClient interface {
- Recv() (*IpfixExporterDetails, error)
- api.Stream
-}
-
-type serviceClient_IpfixExporterDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_IpfixExporterDumpClient) Recv() (*IpfixExporterDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *IpfixExporterDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) IpfixFlush(ctx context.Context, in *IpfixFlush) (*IpfixFlushReply, error) {
- out := new(IpfixFlushReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SetIpfixClassifyStream(ctx context.Context, in *SetIpfixClassifyStream) (*SetIpfixClassifyStreamReply, error) {
- out := new(SetIpfixClassifyStreamReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SetIpfixExporter(ctx context.Context, in *SetIpfixExporter) (*SetIpfixExporterReply, error) {
- out := new(SetIpfixExporterReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/ipip/ipip.ba.go b/internal/testbinapi/binapi2001/ipip/ipip.ba.go
deleted file mode 100644
index 6118a82..0000000
--- a/internal/testbinapi/binapi2001/ipip/ipip.ba.go
+++ /dev/null
@@ -1,1396 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/ipip.api.json
-
-// Package ipip contains generated bindings for API file ipip.api.
-//
-// Contents:
-// 6 aliases
-// 11 enums
-// 7 structs
-// 1 union
-// 10 messages
-//
-package ipip
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "ipip"
- APIVersion = "2.0.0"
- VersionCrc = 0xf108649c
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IpipTunnelFlags defines enum 'ipip_tunnel_flags'.
-type IpipTunnelFlags uint8
-
-const (
- IPIP_TUNNEL_API_FLAG_NONE IpipTunnelFlags = 0
- IPIP_TUNNEL_API_FLAG_ENCAP_COPY_DF IpipTunnelFlags = 1
- IPIP_TUNNEL_API_FLAG_ENCAP_SET_DF IpipTunnelFlags = 2
- IPIP_TUNNEL_API_FLAG_ENCAP_COPY_DSCP IpipTunnelFlags = 4
- IPIP_TUNNEL_API_FLAG_ENCAP_COPY_ECN IpipTunnelFlags = 8
- IPIP_TUNNEL_API_FLAG_DECAP_COPY_ECN IpipTunnelFlags = 16
-)
-
-var (
- IpipTunnelFlags_name = map[uint8]string{
- 0: "IPIP_TUNNEL_API_FLAG_NONE",
- 1: "IPIP_TUNNEL_API_FLAG_ENCAP_COPY_DF",
- 2: "IPIP_TUNNEL_API_FLAG_ENCAP_SET_DF",
- 4: "IPIP_TUNNEL_API_FLAG_ENCAP_COPY_DSCP",
- 8: "IPIP_TUNNEL_API_FLAG_ENCAP_COPY_ECN",
- 16: "IPIP_TUNNEL_API_FLAG_DECAP_COPY_ECN",
- }
- IpipTunnelFlags_value = map[string]uint8{
- "IPIP_TUNNEL_API_FLAG_NONE": 0,
- "IPIP_TUNNEL_API_FLAG_ENCAP_COPY_DF": 1,
- "IPIP_TUNNEL_API_FLAG_ENCAP_SET_DF": 2,
- "IPIP_TUNNEL_API_FLAG_ENCAP_COPY_DSCP": 4,
- "IPIP_TUNNEL_API_FLAG_ENCAP_COPY_ECN": 8,
- "IPIP_TUNNEL_API_FLAG_DECAP_COPY_ECN": 16,
- }
-)
-
-func (x IpipTunnelFlags) String() string {
- s, ok := IpipTunnelFlags_name[uint8(x)]
- if ok {
- return s
- }
- str := func(n uint8) string {
- s, ok := IpipTunnelFlags_name[uint8(n)]
- if ok {
- return s
- }
- return "IpipTunnelFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint8(0); i <= 8; i++ {
- val := uint8(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint8(x))
- }
- return s
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IpipTunnel defines type 'ipip_tunnel'.
-type IpipTunnel struct {
- Instance uint32 `binapi:"u32,name=instance" json:"instance,omitempty"`
- Src Address `binapi:"address,name=src" json:"src,omitempty"`
- Dst Address `binapi:"address,name=dst" json:"dst,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
- Flags IpipTunnelFlags `binapi:"ipip_tunnel_flags,name=flags" json:"flags,omitempty"`
- Dscp IPDscp `binapi:"ip_dscp,name=dscp" json:"dscp,omitempty"`
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
-
-// Ipip6rdAddTunnel defines message 'ipip_6rd_add_tunnel'.
-type Ipip6rdAddTunnel struct {
- IP6TableID uint32 `binapi:"u32,name=ip6_table_id" json:"ip6_table_id,omitempty"`
- IP4TableID uint32 `binapi:"u32,name=ip4_table_id" json:"ip4_table_id,omitempty"`
- IP6Prefix IP6Prefix `binapi:"ip6_prefix,name=ip6_prefix" json:"ip6_prefix,omitempty"`
- IP4Prefix IP4Prefix `binapi:"ip4_prefix,name=ip4_prefix" json:"ip4_prefix,omitempty"`
- IP4Src IP4Address `binapi:"ip4_address,name=ip4_src" json:"ip4_src,omitempty"`
- SecurityCheck bool `binapi:"bool,name=security_check" json:"security_check,omitempty"`
- TcTos uint8 `binapi:"u8,name=tc_tos" json:"tc_tos,omitempty"`
-}
-
-func (m *Ipip6rdAddTunnel) Reset() { *m = Ipip6rdAddTunnel{} }
-func (*Ipip6rdAddTunnel) GetMessageName() string { return "ipip_6rd_add_tunnel" }
-func (*Ipip6rdAddTunnel) GetCrcString() string { return "56e93cc0" }
-func (*Ipip6rdAddTunnel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Ipip6rdAddTunnel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.IP6TableID
- size += 4 // m.IP4TableID
- size += 1 * 16 // m.IP6Prefix.Address
- size += 1 // m.IP6Prefix.Len
- size += 1 * 4 // m.IP4Prefix.Address
- size += 1 // m.IP4Prefix.Len
- size += 1 * 4 // m.IP4Src
- size += 1 // m.SecurityCheck
- size += 1 // m.TcTos
- return size
-}
-func (m *Ipip6rdAddTunnel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.IP6TableID)
- buf.EncodeUint32(m.IP4TableID)
- buf.EncodeBytes(m.IP6Prefix.Address[:], 16)
- buf.EncodeUint8(m.IP6Prefix.Len)
- buf.EncodeBytes(m.IP4Prefix.Address[:], 4)
- buf.EncodeUint8(m.IP4Prefix.Len)
- buf.EncodeBytes(m.IP4Src[:], 4)
- buf.EncodeBool(m.SecurityCheck)
- buf.EncodeUint8(m.TcTos)
- return buf.Bytes(), nil
-}
-func (m *Ipip6rdAddTunnel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IP6TableID = buf.DecodeUint32()
- m.IP4TableID = buf.DecodeUint32()
- copy(m.IP6Prefix.Address[:], buf.DecodeBytes(16))
- m.IP6Prefix.Len = buf.DecodeUint8()
- copy(m.IP4Prefix.Address[:], buf.DecodeBytes(4))
- m.IP4Prefix.Len = buf.DecodeUint8()
- copy(m.IP4Src[:], buf.DecodeBytes(4))
- m.SecurityCheck = buf.DecodeBool()
- m.TcTos = buf.DecodeUint8()
- return nil
-}
-
-// Ipip6rdAddTunnelReply defines message 'ipip_6rd_add_tunnel_reply'.
-type Ipip6rdAddTunnelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *Ipip6rdAddTunnelReply) Reset() { *m = Ipip6rdAddTunnelReply{} }
-func (*Ipip6rdAddTunnelReply) GetMessageName() string { return "ipip_6rd_add_tunnel_reply" }
-func (*Ipip6rdAddTunnelReply) GetCrcString() string { return "5383d31f" }
-func (*Ipip6rdAddTunnelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Ipip6rdAddTunnelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *Ipip6rdAddTunnelReply) 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 *Ipip6rdAddTunnelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// Ipip6rdDelTunnel defines message 'ipip_6rd_del_tunnel'.
-type Ipip6rdDelTunnel struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *Ipip6rdDelTunnel) Reset() { *m = Ipip6rdDelTunnel{} }
-func (*Ipip6rdDelTunnel) GetMessageName() string { return "ipip_6rd_del_tunnel" }
-func (*Ipip6rdDelTunnel) GetCrcString() string { return "f9e6675e" }
-func (*Ipip6rdDelTunnel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Ipip6rdDelTunnel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *Ipip6rdDelTunnel) 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 *Ipip6rdDelTunnel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// Ipip6rdDelTunnelReply defines message 'ipip_6rd_del_tunnel_reply'.
-type Ipip6rdDelTunnelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *Ipip6rdDelTunnelReply) Reset() { *m = Ipip6rdDelTunnelReply{} }
-func (*Ipip6rdDelTunnelReply) GetMessageName() string { return "ipip_6rd_del_tunnel_reply" }
-func (*Ipip6rdDelTunnelReply) GetCrcString() string { return "e8d4e804" }
-func (*Ipip6rdDelTunnelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Ipip6rdDelTunnelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *Ipip6rdDelTunnelReply) 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 *Ipip6rdDelTunnelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// IpipAddTunnel defines message 'ipip_add_tunnel'.
-type IpipAddTunnel struct {
- Tunnel IpipTunnel `binapi:"ipip_tunnel,name=tunnel" json:"tunnel,omitempty"`
-}
-
-func (m *IpipAddTunnel) Reset() { *m = IpipAddTunnel{} }
-func (*IpipAddTunnel) GetMessageName() string { return "ipip_add_tunnel" }
-func (*IpipAddTunnel) GetCrcString() string { return "ef93caab" }
-func (*IpipAddTunnel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IpipAddTunnel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Tunnel.Instance
- size += 4 // m.Tunnel.Src.Af
- size += 1 * 16 // m.Tunnel.Src.Un
- size += 4 // m.Tunnel.Dst.Af
- size += 1 * 16 // m.Tunnel.Dst.Un
- size += 4 // m.Tunnel.SwIfIndex
- size += 4 // m.Tunnel.TableID
- size += 1 // m.Tunnel.Flags
- size += 1 // m.Tunnel.Dscp
- return size
-}
-func (m *IpipAddTunnel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Tunnel.Instance)
- buf.EncodeUint32(uint32(m.Tunnel.Src.Af))
- buf.EncodeBytes(m.Tunnel.Src.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.Tunnel.Dst.Af))
- buf.EncodeBytes(m.Tunnel.Dst.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.Tunnel.SwIfIndex))
- buf.EncodeUint32(m.Tunnel.TableID)
- buf.EncodeUint8(uint8(m.Tunnel.Flags))
- buf.EncodeUint8(uint8(m.Tunnel.Dscp))
- return buf.Bytes(), nil
-}
-func (m *IpipAddTunnel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Tunnel.Instance = buf.DecodeUint32()
- m.Tunnel.Src.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Tunnel.Src.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Tunnel.Dst.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Tunnel.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Tunnel.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Tunnel.TableID = buf.DecodeUint32()
- m.Tunnel.Flags = IpipTunnelFlags(buf.DecodeUint8())
- m.Tunnel.Dscp = IPDscp(buf.DecodeUint8())
- return nil
-}
-
-// IpipAddTunnelReply defines message 'ipip_add_tunnel_reply'.
-type IpipAddTunnelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *IpipAddTunnelReply) Reset() { *m = IpipAddTunnelReply{} }
-func (*IpipAddTunnelReply) GetMessageName() string { return "ipip_add_tunnel_reply" }
-func (*IpipAddTunnelReply) GetCrcString() string { return "5383d31f" }
-func (*IpipAddTunnelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IpipAddTunnelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *IpipAddTunnelReply) 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 *IpipAddTunnelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// IpipDelTunnel defines message 'ipip_del_tunnel'.
-type IpipDelTunnel struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *IpipDelTunnel) Reset() { *m = IpipDelTunnel{} }
-func (*IpipDelTunnel) GetMessageName() string { return "ipip_del_tunnel" }
-func (*IpipDelTunnel) GetCrcString() string { return "f9e6675e" }
-func (*IpipDelTunnel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IpipDelTunnel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *IpipDelTunnel) 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 *IpipDelTunnel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// IpipDelTunnelReply defines message 'ipip_del_tunnel_reply'.
-type IpipDelTunnelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *IpipDelTunnelReply) Reset() { *m = IpipDelTunnelReply{} }
-func (*IpipDelTunnelReply) GetMessageName() string { return "ipip_del_tunnel_reply" }
-func (*IpipDelTunnelReply) GetCrcString() string { return "e8d4e804" }
-func (*IpipDelTunnelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IpipDelTunnelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *IpipDelTunnelReply) 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 *IpipDelTunnelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// IpipTunnelDetails defines message 'ipip_tunnel_details'.
-type IpipTunnelDetails struct {
- Tunnel IpipTunnel `binapi:"ipip_tunnel,name=tunnel" json:"tunnel,omitempty"`
-}
-
-func (m *IpipTunnelDetails) Reset() { *m = IpipTunnelDetails{} }
-func (*IpipTunnelDetails) GetMessageName() string { return "ipip_tunnel_details" }
-func (*IpipTunnelDetails) GetCrcString() string { return "7f7b5b85" }
-func (*IpipTunnelDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IpipTunnelDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Tunnel.Instance
- size += 4 // m.Tunnel.Src.Af
- size += 1 * 16 // m.Tunnel.Src.Un
- size += 4 // m.Tunnel.Dst.Af
- size += 1 * 16 // m.Tunnel.Dst.Un
- size += 4 // m.Tunnel.SwIfIndex
- size += 4 // m.Tunnel.TableID
- size += 1 // m.Tunnel.Flags
- size += 1 // m.Tunnel.Dscp
- return size
-}
-func (m *IpipTunnelDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Tunnel.Instance)
- buf.EncodeUint32(uint32(m.Tunnel.Src.Af))
- buf.EncodeBytes(m.Tunnel.Src.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.Tunnel.Dst.Af))
- buf.EncodeBytes(m.Tunnel.Dst.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.Tunnel.SwIfIndex))
- buf.EncodeUint32(m.Tunnel.TableID)
- buf.EncodeUint8(uint8(m.Tunnel.Flags))
- buf.EncodeUint8(uint8(m.Tunnel.Dscp))
- return buf.Bytes(), nil
-}
-func (m *IpipTunnelDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Tunnel.Instance = buf.DecodeUint32()
- m.Tunnel.Src.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Tunnel.Src.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Tunnel.Dst.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Tunnel.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Tunnel.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Tunnel.TableID = buf.DecodeUint32()
- m.Tunnel.Flags = IpipTunnelFlags(buf.DecodeUint8())
- m.Tunnel.Dscp = IPDscp(buf.DecodeUint8())
- return nil
-}
-
-// IpipTunnelDump defines message 'ipip_tunnel_dump'.
-type IpipTunnelDump struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *IpipTunnelDump) Reset() { *m = IpipTunnelDump{} }
-func (*IpipTunnelDump) GetMessageName() string { return "ipip_tunnel_dump" }
-func (*IpipTunnelDump) GetCrcString() string { return "f9e6675e" }
-func (*IpipTunnelDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IpipTunnelDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *IpipTunnelDump) 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 *IpipTunnelDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-func init() { file_ipip_binapi_init() }
-func file_ipip_binapi_init() {
- api.RegisterMessage((*Ipip6rdAddTunnel)(nil), "ipip_6rd_add_tunnel_56e93cc0")
- api.RegisterMessage((*Ipip6rdAddTunnelReply)(nil), "ipip_6rd_add_tunnel_reply_5383d31f")
- api.RegisterMessage((*Ipip6rdDelTunnel)(nil), "ipip_6rd_del_tunnel_f9e6675e")
- api.RegisterMessage((*Ipip6rdDelTunnelReply)(nil), "ipip_6rd_del_tunnel_reply_e8d4e804")
- api.RegisterMessage((*IpipAddTunnel)(nil), "ipip_add_tunnel_ef93caab")
- api.RegisterMessage((*IpipAddTunnelReply)(nil), "ipip_add_tunnel_reply_5383d31f")
- api.RegisterMessage((*IpipDelTunnel)(nil), "ipip_del_tunnel_f9e6675e")
- api.RegisterMessage((*IpipDelTunnelReply)(nil), "ipip_del_tunnel_reply_e8d4e804")
- api.RegisterMessage((*IpipTunnelDetails)(nil), "ipip_tunnel_details_7f7b5b85")
- api.RegisterMessage((*IpipTunnelDump)(nil), "ipip_tunnel_dump_f9e6675e")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*Ipip6rdAddTunnel)(nil),
- (*Ipip6rdAddTunnelReply)(nil),
- (*Ipip6rdDelTunnel)(nil),
- (*Ipip6rdDelTunnelReply)(nil),
- (*IpipAddTunnel)(nil),
- (*IpipAddTunnelReply)(nil),
- (*IpipDelTunnel)(nil),
- (*IpipDelTunnelReply)(nil),
- (*IpipTunnelDetails)(nil),
- (*IpipTunnelDump)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/ipip/ipip_rpc.ba.go b/internal/testbinapi/binapi2001/ipip/ipip_rpc.ba.go
deleted file mode 100644
index 27666ae..0000000
--- a/internal/testbinapi/binapi2001/ipip/ipip_rpc.ba.go
+++ /dev/null
@@ -1,108 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package ipip
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service ipip.
-type RPCService interface {
- Ipip6rdAddTunnel(ctx context.Context, in *Ipip6rdAddTunnel) (*Ipip6rdAddTunnelReply, error)
- Ipip6rdDelTunnel(ctx context.Context, in *Ipip6rdDelTunnel) (*Ipip6rdDelTunnelReply, error)
- IpipAddTunnel(ctx context.Context, in *IpipAddTunnel) (*IpipAddTunnelReply, error)
- IpipDelTunnel(ctx context.Context, in *IpipDelTunnel) (*IpipDelTunnelReply, error)
- IpipTunnelDump(ctx context.Context, in *IpipTunnelDump) (RPCService_IpipTunnelDumpClient, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) Ipip6rdAddTunnel(ctx context.Context, in *Ipip6rdAddTunnel) (*Ipip6rdAddTunnelReply, error) {
- out := new(Ipip6rdAddTunnelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) Ipip6rdDelTunnel(ctx context.Context, in *Ipip6rdDelTunnel) (*Ipip6rdDelTunnelReply, error) {
- out := new(Ipip6rdDelTunnelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) IpipAddTunnel(ctx context.Context, in *IpipAddTunnel) (*IpipAddTunnelReply, error) {
- out := new(IpipAddTunnelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) IpipDelTunnel(ctx context.Context, in *IpipDelTunnel) (*IpipDelTunnelReply, error) {
- out := new(IpipDelTunnelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) IpipTunnelDump(ctx context.Context, in *IpipTunnelDump) (RPCService_IpipTunnelDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_IpipTunnelDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_IpipTunnelDumpClient interface {
- Recv() (*IpipTunnelDetails, error)
- api.Stream
-}
-
-type serviceClient_IpipTunnelDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_IpipTunnelDumpClient) Recv() (*IpipTunnelDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *IpipTunnelDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
diff --git a/internal/testbinapi/binapi2001/ipip_types/ipip_types.ba.go b/internal/testbinapi/binapi2001/ipip_types/ipip_types.ba.go
deleted file mode 100644
index a345908..0000000
--- a/internal/testbinapi/binapi2001/ipip_types/ipip_types.ba.go
+++ /dev/null
@@ -1,88 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/ipip_types.api.json
-
-// Package ipip_types contains generated bindings for API file ipip_types.api.
-//
-// Contents:
-// 1 enum
-//
-package ipip_types
-
-import (
- "strconv"
-
- api "git.fd.io/govpp.git/api"
-)
-
-// 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 = "ipip_types"
- APIVersion = ""
- VersionCrc = 0xa2a8fa8d
-)
-
-// IpipTunnelFlags defines enum 'ipip_tunnel_flags'.
-type IpipTunnelFlags uint8
-
-const (
- IPIP_TUNNEL_API_FLAG_NONE IpipTunnelFlags = 0
- IPIP_TUNNEL_API_FLAG_ENCAP_COPY_DF IpipTunnelFlags = 1
- IPIP_TUNNEL_API_FLAG_ENCAP_SET_DF IpipTunnelFlags = 2
- IPIP_TUNNEL_API_FLAG_ENCAP_COPY_DSCP IpipTunnelFlags = 4
- IPIP_TUNNEL_API_FLAG_ENCAP_COPY_ECN IpipTunnelFlags = 8
- IPIP_TUNNEL_API_FLAG_DECAP_COPY_ECN IpipTunnelFlags = 16
-)
-
-var (
- IpipTunnelFlags_name = map[uint8]string{
- 0: "IPIP_TUNNEL_API_FLAG_NONE",
- 1: "IPIP_TUNNEL_API_FLAG_ENCAP_COPY_DF",
- 2: "IPIP_TUNNEL_API_FLAG_ENCAP_SET_DF",
- 4: "IPIP_TUNNEL_API_FLAG_ENCAP_COPY_DSCP",
- 8: "IPIP_TUNNEL_API_FLAG_ENCAP_COPY_ECN",
- 16: "IPIP_TUNNEL_API_FLAG_DECAP_COPY_ECN",
- }
- IpipTunnelFlags_value = map[string]uint8{
- "IPIP_TUNNEL_API_FLAG_NONE": 0,
- "IPIP_TUNNEL_API_FLAG_ENCAP_COPY_DF": 1,
- "IPIP_TUNNEL_API_FLAG_ENCAP_SET_DF": 2,
- "IPIP_TUNNEL_API_FLAG_ENCAP_COPY_DSCP": 4,
- "IPIP_TUNNEL_API_FLAG_ENCAP_COPY_ECN": 8,
- "IPIP_TUNNEL_API_FLAG_DECAP_COPY_ECN": 16,
- }
-)
-
-func (x IpipTunnelFlags) String() string {
- s, ok := IpipTunnelFlags_name[uint8(x)]
- if ok {
- return s
- }
- str := func(n uint8) string {
- s, ok := IpipTunnelFlags_name[uint8(n)]
- if ok {
- return s
- }
- return "IpipTunnelFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint8(0); i <= 8; i++ {
- val := uint8(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint8(x))
- }
- return s
-}
diff --git a/internal/testbinapi/binapi2001/ipsec/ipsec.ba.go b/internal/testbinapi/binapi2001/ipsec/ipsec.ba.go
deleted file mode 100644
index 68aab51..0000000
--- a/internal/testbinapi/binapi2001/ipsec/ipsec.ba.go
+++ /dev/null
@@ -1,2621 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/ipsec.api.json
-
-// Package ipsec contains generated bindings for API file ipsec.api.
-//
-// Contents:
-// 6 aliases
-// 15 enums
-// 10 structs
-// 1 union
-// 30 messages
-//
-package ipsec
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "ipsec"
- APIVersion = "3.0.0"
- VersionCrc = 0x5a59fef9
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IpsecCryptoAlg defines enum 'ipsec_crypto_alg'.
-type IpsecCryptoAlg uint32
-
-const (
- IPSEC_API_CRYPTO_ALG_NONE IpsecCryptoAlg = 0
- IPSEC_API_CRYPTO_ALG_AES_CBC_128 IpsecCryptoAlg = 1
- IPSEC_API_CRYPTO_ALG_AES_CBC_192 IpsecCryptoAlg = 2
- IPSEC_API_CRYPTO_ALG_AES_CBC_256 IpsecCryptoAlg = 3
- IPSEC_API_CRYPTO_ALG_AES_CTR_128 IpsecCryptoAlg = 4
- IPSEC_API_CRYPTO_ALG_AES_CTR_192 IpsecCryptoAlg = 5
- IPSEC_API_CRYPTO_ALG_AES_CTR_256 IpsecCryptoAlg = 6
- IPSEC_API_CRYPTO_ALG_AES_GCM_128 IpsecCryptoAlg = 7
- IPSEC_API_CRYPTO_ALG_AES_GCM_192 IpsecCryptoAlg = 8
- IPSEC_API_CRYPTO_ALG_AES_GCM_256 IpsecCryptoAlg = 9
- IPSEC_API_CRYPTO_ALG_DES_CBC IpsecCryptoAlg = 10
- IPSEC_API_CRYPTO_ALG_3DES_CBC IpsecCryptoAlg = 11
-)
-
-var (
- IpsecCryptoAlg_name = map[uint32]string{
- 0: "IPSEC_API_CRYPTO_ALG_NONE",
- 1: "IPSEC_API_CRYPTO_ALG_AES_CBC_128",
- 2: "IPSEC_API_CRYPTO_ALG_AES_CBC_192",
- 3: "IPSEC_API_CRYPTO_ALG_AES_CBC_256",
- 4: "IPSEC_API_CRYPTO_ALG_AES_CTR_128",
- 5: "IPSEC_API_CRYPTO_ALG_AES_CTR_192",
- 6: "IPSEC_API_CRYPTO_ALG_AES_CTR_256",
- 7: "IPSEC_API_CRYPTO_ALG_AES_GCM_128",
- 8: "IPSEC_API_CRYPTO_ALG_AES_GCM_192",
- 9: "IPSEC_API_CRYPTO_ALG_AES_GCM_256",
- 10: "IPSEC_API_CRYPTO_ALG_DES_CBC",
- 11: "IPSEC_API_CRYPTO_ALG_3DES_CBC",
- }
- IpsecCryptoAlg_value = map[string]uint32{
- "IPSEC_API_CRYPTO_ALG_NONE": 0,
- "IPSEC_API_CRYPTO_ALG_AES_CBC_128": 1,
- "IPSEC_API_CRYPTO_ALG_AES_CBC_192": 2,
- "IPSEC_API_CRYPTO_ALG_AES_CBC_256": 3,
- "IPSEC_API_CRYPTO_ALG_AES_CTR_128": 4,
- "IPSEC_API_CRYPTO_ALG_AES_CTR_192": 5,
- "IPSEC_API_CRYPTO_ALG_AES_CTR_256": 6,
- "IPSEC_API_CRYPTO_ALG_AES_GCM_128": 7,
- "IPSEC_API_CRYPTO_ALG_AES_GCM_192": 8,
- "IPSEC_API_CRYPTO_ALG_AES_GCM_256": 9,
- "IPSEC_API_CRYPTO_ALG_DES_CBC": 10,
- "IPSEC_API_CRYPTO_ALG_3DES_CBC": 11,
- }
-)
-
-func (x IpsecCryptoAlg) String() string {
- s, ok := IpsecCryptoAlg_name[uint32(x)]
- if ok {
- return s
- }
- return "IpsecCryptoAlg(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IpsecIntegAlg defines enum 'ipsec_integ_alg'.
-type IpsecIntegAlg uint32
-
-const (
- IPSEC_API_INTEG_ALG_NONE IpsecIntegAlg = 0
- IPSEC_API_INTEG_ALG_MD5_96 IpsecIntegAlg = 1
- IPSEC_API_INTEG_ALG_SHA1_96 IpsecIntegAlg = 2
- IPSEC_API_INTEG_ALG_SHA_256_96 IpsecIntegAlg = 3
- IPSEC_API_INTEG_ALG_SHA_256_128 IpsecIntegAlg = 4
- IPSEC_API_INTEG_ALG_SHA_384_192 IpsecIntegAlg = 5
- IPSEC_API_INTEG_ALG_SHA_512_256 IpsecIntegAlg = 6
-)
-
-var (
- IpsecIntegAlg_name = map[uint32]string{
- 0: "IPSEC_API_INTEG_ALG_NONE",
- 1: "IPSEC_API_INTEG_ALG_MD5_96",
- 2: "IPSEC_API_INTEG_ALG_SHA1_96",
- 3: "IPSEC_API_INTEG_ALG_SHA_256_96",
- 4: "IPSEC_API_INTEG_ALG_SHA_256_128",
- 5: "IPSEC_API_INTEG_ALG_SHA_384_192",
- 6: "IPSEC_API_INTEG_ALG_SHA_512_256",
- }
- IpsecIntegAlg_value = map[string]uint32{
- "IPSEC_API_INTEG_ALG_NONE": 0,
- "IPSEC_API_INTEG_ALG_MD5_96": 1,
- "IPSEC_API_INTEG_ALG_SHA1_96": 2,
- "IPSEC_API_INTEG_ALG_SHA_256_96": 3,
- "IPSEC_API_INTEG_ALG_SHA_256_128": 4,
- "IPSEC_API_INTEG_ALG_SHA_384_192": 5,
- "IPSEC_API_INTEG_ALG_SHA_512_256": 6,
- }
-)
-
-func (x IpsecIntegAlg) String() string {
- s, ok := IpsecIntegAlg_name[uint32(x)]
- if ok {
- return s
- }
- return "IpsecIntegAlg(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IpsecProto defines enum 'ipsec_proto'.
-type IpsecProto uint32
-
-const (
- IPSEC_API_PROTO_ESP IpsecProto = 1
- IPSEC_API_PROTO_AH IpsecProto = 2
-)
-
-var (
- IpsecProto_name = map[uint32]string{
- 1: "IPSEC_API_PROTO_ESP",
- 2: "IPSEC_API_PROTO_AH",
- }
- IpsecProto_value = map[string]uint32{
- "IPSEC_API_PROTO_ESP": 1,
- "IPSEC_API_PROTO_AH": 2,
- }
-)
-
-func (x IpsecProto) String() string {
- s, ok := IpsecProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IpsecProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IpsecSadFlags defines enum 'ipsec_sad_flags'.
-type IpsecSadFlags uint32
-
-const (
- IPSEC_API_SAD_FLAG_NONE IpsecSadFlags = 0
- IPSEC_API_SAD_FLAG_USE_ESN IpsecSadFlags = 1
- IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY IpsecSadFlags = 2
- IPSEC_API_SAD_FLAG_IS_TUNNEL IpsecSadFlags = 4
- IPSEC_API_SAD_FLAG_IS_TUNNEL_V6 IpsecSadFlags = 8
- IPSEC_API_SAD_FLAG_UDP_ENCAP IpsecSadFlags = 16
-)
-
-var (
- IpsecSadFlags_name = map[uint32]string{
- 0: "IPSEC_API_SAD_FLAG_NONE",
- 1: "IPSEC_API_SAD_FLAG_USE_ESN",
- 2: "IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY",
- 4: "IPSEC_API_SAD_FLAG_IS_TUNNEL",
- 8: "IPSEC_API_SAD_FLAG_IS_TUNNEL_V6",
- 16: "IPSEC_API_SAD_FLAG_UDP_ENCAP",
- }
- IpsecSadFlags_value = map[string]uint32{
- "IPSEC_API_SAD_FLAG_NONE": 0,
- "IPSEC_API_SAD_FLAG_USE_ESN": 1,
- "IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY": 2,
- "IPSEC_API_SAD_FLAG_IS_TUNNEL": 4,
- "IPSEC_API_SAD_FLAG_IS_TUNNEL_V6": 8,
- "IPSEC_API_SAD_FLAG_UDP_ENCAP": 16,
- }
-)
-
-func (x IpsecSadFlags) String() string {
- s, ok := IpsecSadFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IpsecSadFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IpsecSadFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IpsecSpdAction defines enum 'ipsec_spd_action'.
-type IpsecSpdAction uint32
-
-const (
- IPSEC_API_SPD_ACTION_BYPASS IpsecSpdAction = 0
- IPSEC_API_SPD_ACTION_DISCARD IpsecSpdAction = 1
- IPSEC_API_SPD_ACTION_RESOLVE IpsecSpdAction = 2
- IPSEC_API_SPD_ACTION_PROTECT IpsecSpdAction = 3
-)
-
-var (
- IpsecSpdAction_name = map[uint32]string{
- 0: "IPSEC_API_SPD_ACTION_BYPASS",
- 1: "IPSEC_API_SPD_ACTION_DISCARD",
- 2: "IPSEC_API_SPD_ACTION_RESOLVE",
- 3: "IPSEC_API_SPD_ACTION_PROTECT",
- }
- IpsecSpdAction_value = map[string]uint32{
- "IPSEC_API_SPD_ACTION_BYPASS": 0,
- "IPSEC_API_SPD_ACTION_DISCARD": 1,
- "IPSEC_API_SPD_ACTION_RESOLVE": 2,
- "IPSEC_API_SPD_ACTION_PROTECT": 3,
- }
-)
-
-func (x IpsecSpdAction) String() string {
- s, ok := IpsecSpdAction_name[uint32(x)]
- if ok {
- return s
- }
- return "IpsecSpdAction(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IpsecSadEntry defines type 'ipsec_sad_entry'.
-type IpsecSadEntry struct {
- SadID uint32 `binapi:"u32,name=sad_id" json:"sad_id,omitempty"`
- Spi uint32 `binapi:"u32,name=spi" json:"spi,omitempty"`
- Protocol IpsecProto `binapi:"ipsec_proto,name=protocol" json:"protocol,omitempty"`
- CryptoAlgorithm IpsecCryptoAlg `binapi:"ipsec_crypto_alg,name=crypto_algorithm" json:"crypto_algorithm,omitempty"`
- CryptoKey Key `binapi:"key,name=crypto_key" json:"crypto_key,omitempty"`
- IntegrityAlgorithm IpsecIntegAlg `binapi:"ipsec_integ_alg,name=integrity_algorithm" json:"integrity_algorithm,omitempty"`
- IntegrityKey Key `binapi:"key,name=integrity_key" json:"integrity_key,omitempty"`
- Flags IpsecSadFlags `binapi:"ipsec_sad_flags,name=flags" json:"flags,omitempty"`
- TunnelSrc Address `binapi:"address,name=tunnel_src" json:"tunnel_src,omitempty"`
- TunnelDst Address `binapi:"address,name=tunnel_dst" json:"tunnel_dst,omitempty"`
- TxTableID uint32 `binapi:"u32,name=tx_table_id" json:"tx_table_id,omitempty"`
- Salt uint32 `binapi:"u32,name=salt" json:"salt,omitempty"`
-}
-
-// IpsecSpdEntry defines type 'ipsec_spd_entry'.
-type IpsecSpdEntry struct {
- SpdID uint32 `binapi:"u32,name=spd_id" json:"spd_id,omitempty"`
- Priority int32 `binapi:"i32,name=priority" json:"priority,omitempty"`
- IsOutbound uint8 `binapi:"u8,name=is_outbound" json:"is_outbound,omitempty"`
- SaID uint32 `binapi:"u32,name=sa_id" json:"sa_id,omitempty"`
- Policy IpsecSpdAction `binapi:"ipsec_spd_action,name=policy" json:"policy,omitempty"`
- Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"`
- RemoteAddressStart Address `binapi:"address,name=remote_address_start" json:"remote_address_start,omitempty"`
- RemoteAddressStop Address `binapi:"address,name=remote_address_stop" json:"remote_address_stop,omitempty"`
- LocalAddressStart Address `binapi:"address,name=local_address_start" json:"local_address_start,omitempty"`
- LocalAddressStop Address `binapi:"address,name=local_address_stop" json:"local_address_stop,omitempty"`
- RemotePortStart uint16 `binapi:"u16,name=remote_port_start" json:"remote_port_start,omitempty"`
- RemotePortStop uint16 `binapi:"u16,name=remote_port_stop" json:"remote_port_stop,omitempty"`
- LocalPortStart uint16 `binapi:"u16,name=local_port_start" json:"local_port_start,omitempty"`
- LocalPortStop uint16 `binapi:"u16,name=local_port_stop" json:"local_port_stop,omitempty"`
-}
-
-// IpsecTunnelProtect defines type 'ipsec_tunnel_protect'.
-type IpsecTunnelProtect struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- SaOut uint32 `binapi:"u32,name=sa_out" json:"sa_out,omitempty"`
- NSaIn uint8 `binapi:"u8,name=n_sa_in" json:"-"`
- SaIn []uint32 `binapi:"u32[n_sa_in],name=sa_in" json:"sa_in,omitempty"`
-}
-
-// Key defines type 'key'.
-type Key struct {
- Length uint8 `binapi:"u8,name=length" json:"length,omitempty"`
- Data []byte `binapi:"u8[128],name=data" json:"data,omitempty"`
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
-
-// IpsecBackendDetails defines message 'ipsec_backend_details'.
-type IpsecBackendDetails struct {
- Name []byte `binapi:"u8[128],name=name" json:"name,omitempty"`
- Protocol IpsecProto `binapi:"ipsec_proto,name=protocol" json:"protocol,omitempty"`
- Index uint8 `binapi:"u8,name=index" json:"index,omitempty"`
- Active uint8 `binapi:"u8,name=active" json:"active,omitempty"`
-}
-
-func (m *IpsecBackendDetails) Reset() { *m = IpsecBackendDetails{} }
-func (*IpsecBackendDetails) GetMessageName() string { return "ipsec_backend_details" }
-func (*IpsecBackendDetails) GetCrcString() string { return "7700751c" }
-func (*IpsecBackendDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IpsecBackendDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 128 // m.Name
- size += 4 // m.Protocol
- size += 1 // m.Index
- size += 1 // m.Active
- return size
-}
-func (m *IpsecBackendDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.Name, 128)
- buf.EncodeUint32(uint32(m.Protocol))
- buf.EncodeUint8(m.Index)
- buf.EncodeUint8(m.Active)
- return buf.Bytes(), nil
-}
-func (m *IpsecBackendDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Name = make([]byte, 128)
- copy(m.Name, buf.DecodeBytes(len(m.Name)))
- m.Protocol = IpsecProto(buf.DecodeUint32())
- m.Index = buf.DecodeUint8()
- m.Active = buf.DecodeUint8()
- return nil
-}
-
-// IpsecBackendDump defines message 'ipsec_backend_dump'.
-type IpsecBackendDump struct{}
-
-func (m *IpsecBackendDump) Reset() { *m = IpsecBackendDump{} }
-func (*IpsecBackendDump) GetMessageName() string { return "ipsec_backend_dump" }
-func (*IpsecBackendDump) GetCrcString() string { return "51077d14" }
-func (*IpsecBackendDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IpsecBackendDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *IpsecBackendDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *IpsecBackendDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// IpsecInterfaceAddDelSpd defines message 'ipsec_interface_add_del_spd'.
-type IpsecInterfaceAddDelSpd struct {
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- SpdID uint32 `binapi:"u32,name=spd_id" json:"spd_id,omitempty"`
-}
-
-func (m *IpsecInterfaceAddDelSpd) Reset() { *m = IpsecInterfaceAddDelSpd{} }
-func (*IpsecInterfaceAddDelSpd) GetMessageName() string { return "ipsec_interface_add_del_spd" }
-func (*IpsecInterfaceAddDelSpd) GetCrcString() string { return "1e3b8286" }
-func (*IpsecInterfaceAddDelSpd) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IpsecInterfaceAddDelSpd) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 4 // m.SwIfIndex
- size += 4 // m.SpdID
- return size
-}
-func (m *IpsecInterfaceAddDelSpd) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsAdd)
- buf.EncodeUint32(m.SwIfIndex)
- buf.EncodeUint32(m.SpdID)
- return buf.Bytes(), nil
-}
-func (m *IpsecInterfaceAddDelSpd) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeUint8()
- m.SwIfIndex = buf.DecodeUint32()
- m.SpdID = buf.DecodeUint32()
- return nil
-}
-
-// IpsecInterfaceAddDelSpdReply defines message 'ipsec_interface_add_del_spd_reply'.
-type IpsecInterfaceAddDelSpdReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *IpsecInterfaceAddDelSpdReply) Reset() { *m = IpsecInterfaceAddDelSpdReply{} }
-func (*IpsecInterfaceAddDelSpdReply) GetMessageName() string {
- return "ipsec_interface_add_del_spd_reply"
-}
-func (*IpsecInterfaceAddDelSpdReply) GetCrcString() string { return "e8d4e804" }
-func (*IpsecInterfaceAddDelSpdReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IpsecInterfaceAddDelSpdReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *IpsecInterfaceAddDelSpdReply) 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 *IpsecInterfaceAddDelSpdReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// IpsecSaDetails defines message 'ipsec_sa_details'.
-type IpsecSaDetails struct {
- Entry IpsecSadEntry `binapi:"ipsec_sad_entry,name=entry" json:"entry,omitempty"`
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- Salt uint32 `binapi:"u32,name=salt" json:"salt,omitempty"`
- SeqOutbound uint64 `binapi:"u64,name=seq_outbound" json:"seq_outbound,omitempty"`
- LastSeqInbound uint64 `binapi:"u64,name=last_seq_inbound" json:"last_seq_inbound,omitempty"`
- ReplayWindow uint64 `binapi:"u64,name=replay_window" json:"replay_window,omitempty"`
- TotalDataSize uint64 `binapi:"u64,name=total_data_size" json:"total_data_size,omitempty"`
-}
-
-func (m *IpsecSaDetails) Reset() { *m = IpsecSaDetails{} }
-func (*IpsecSaDetails) GetMessageName() string { return "ipsec_sa_details" }
-func (*IpsecSaDetails) GetCrcString() string { return "9c8d829a" }
-func (*IpsecSaDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IpsecSaDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Entry.SadID
- size += 4 // m.Entry.Spi
- size += 4 // m.Entry.Protocol
- size += 4 // m.Entry.CryptoAlgorithm
- size += 1 // m.Entry.CryptoKey.Length
- size += 1 * 128 // m.Entry.CryptoKey.Data
- size += 4 // m.Entry.IntegrityAlgorithm
- size += 1 // m.Entry.IntegrityKey.Length
- size += 1 * 128 // m.Entry.IntegrityKey.Data
- size += 4 // m.Entry.Flags
- size += 4 // m.Entry.TunnelSrc.Af
- size += 1 * 16 // m.Entry.TunnelSrc.Un
- size += 4 // m.Entry.TunnelDst.Af
- size += 1 * 16 // m.Entry.TunnelDst.Un
- size += 4 // m.Entry.TxTableID
- size += 4 // m.Entry.Salt
- size += 4 // m.SwIfIndex
- size += 4 // m.Salt
- size += 8 // m.SeqOutbound
- size += 8 // m.LastSeqInbound
- size += 8 // m.ReplayWindow
- size += 8 // m.TotalDataSize
- return size
-}
-func (m *IpsecSaDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Entry.SadID)
- buf.EncodeUint32(m.Entry.Spi)
- buf.EncodeUint32(uint32(m.Entry.Protocol))
- buf.EncodeUint32(uint32(m.Entry.CryptoAlgorithm))
- buf.EncodeUint8(m.Entry.CryptoKey.Length)
- buf.EncodeBytes(m.Entry.CryptoKey.Data, 128)
- buf.EncodeUint32(uint32(m.Entry.IntegrityAlgorithm))
- buf.EncodeUint8(m.Entry.IntegrityKey.Length)
- buf.EncodeBytes(m.Entry.IntegrityKey.Data, 128)
- buf.EncodeUint32(uint32(m.Entry.Flags))
- buf.EncodeUint32(uint32(m.Entry.TunnelSrc.Af))
- buf.EncodeBytes(m.Entry.TunnelSrc.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.Entry.TunnelDst.Af))
- buf.EncodeBytes(m.Entry.TunnelDst.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(m.Entry.TxTableID)
- buf.EncodeUint32(m.Entry.Salt)
- buf.EncodeUint32(m.SwIfIndex)
- buf.EncodeUint32(m.Salt)
- buf.EncodeUint64(m.SeqOutbound)
- buf.EncodeUint64(m.LastSeqInbound)
- buf.EncodeUint64(m.ReplayWindow)
- buf.EncodeUint64(m.TotalDataSize)
- return buf.Bytes(), nil
-}
-func (m *IpsecSaDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Entry.SadID = buf.DecodeUint32()
- m.Entry.Spi = buf.DecodeUint32()
- m.Entry.Protocol = IpsecProto(buf.DecodeUint32())
- m.Entry.CryptoAlgorithm = IpsecCryptoAlg(buf.DecodeUint32())
- m.Entry.CryptoKey.Length = buf.DecodeUint8()
- m.Entry.CryptoKey.Data = make([]byte, 128)
- copy(m.Entry.CryptoKey.Data, buf.DecodeBytes(len(m.Entry.CryptoKey.Data)))
- m.Entry.IntegrityAlgorithm = IpsecIntegAlg(buf.DecodeUint32())
- m.Entry.IntegrityKey.Length = buf.DecodeUint8()
- m.Entry.IntegrityKey.Data = make([]byte, 128)
- copy(m.Entry.IntegrityKey.Data, buf.DecodeBytes(len(m.Entry.IntegrityKey.Data)))
- m.Entry.Flags = IpsecSadFlags(buf.DecodeUint32())
- m.Entry.TunnelSrc.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Entry.TunnelSrc.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Entry.TunnelDst.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Entry.TunnelDst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Entry.TxTableID = buf.DecodeUint32()
- m.Entry.Salt = buf.DecodeUint32()
- m.SwIfIndex = buf.DecodeUint32()
- m.Salt = buf.DecodeUint32()
- m.SeqOutbound = buf.DecodeUint64()
- m.LastSeqInbound = buf.DecodeUint64()
- m.ReplayWindow = buf.DecodeUint64()
- m.TotalDataSize = buf.DecodeUint64()
- return nil
-}
-
-// IpsecSaDump defines message 'ipsec_sa_dump'.
-type IpsecSaDump struct {
- SaID uint32 `binapi:"u32,name=sa_id" json:"sa_id,omitempty"`
-}
-
-func (m *IpsecSaDump) Reset() { *m = IpsecSaDump{} }
-func (*IpsecSaDump) GetMessageName() string { return "ipsec_sa_dump" }
-func (*IpsecSaDump) GetCrcString() string { return "2076c2f4" }
-func (*IpsecSaDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IpsecSaDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SaID
- return size
-}
-func (m *IpsecSaDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.SaID)
- return buf.Bytes(), nil
-}
-func (m *IpsecSaDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SaID = buf.DecodeUint32()
- return nil
-}
-
-// IpsecSadEntryAddDel defines message 'ipsec_sad_entry_add_del'.
-type IpsecSadEntryAddDel struct {
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
- Entry IpsecSadEntry `binapi:"ipsec_sad_entry,name=entry" json:"entry,omitempty"`
-}
-
-func (m *IpsecSadEntryAddDel) Reset() { *m = IpsecSadEntryAddDel{} }
-func (*IpsecSadEntryAddDel) GetMessageName() string { return "ipsec_sad_entry_add_del" }
-func (*IpsecSadEntryAddDel) GetCrcString() string { return "a25ab61e" }
-func (*IpsecSadEntryAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IpsecSadEntryAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 4 // m.Entry.SadID
- size += 4 // m.Entry.Spi
- size += 4 // m.Entry.Protocol
- size += 4 // m.Entry.CryptoAlgorithm
- size += 1 // m.Entry.CryptoKey.Length
- size += 1 * 128 // m.Entry.CryptoKey.Data
- size += 4 // m.Entry.IntegrityAlgorithm
- size += 1 // m.Entry.IntegrityKey.Length
- size += 1 * 128 // m.Entry.IntegrityKey.Data
- size += 4 // m.Entry.Flags
- size += 4 // m.Entry.TunnelSrc.Af
- size += 1 * 16 // m.Entry.TunnelSrc.Un
- size += 4 // m.Entry.TunnelDst.Af
- size += 1 * 16 // m.Entry.TunnelDst.Un
- size += 4 // m.Entry.TxTableID
- size += 4 // m.Entry.Salt
- return size
-}
-func (m *IpsecSadEntryAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsAdd)
- buf.EncodeUint32(m.Entry.SadID)
- buf.EncodeUint32(m.Entry.Spi)
- buf.EncodeUint32(uint32(m.Entry.Protocol))
- buf.EncodeUint32(uint32(m.Entry.CryptoAlgorithm))
- buf.EncodeUint8(m.Entry.CryptoKey.Length)
- buf.EncodeBytes(m.Entry.CryptoKey.Data, 128)
- buf.EncodeUint32(uint32(m.Entry.IntegrityAlgorithm))
- buf.EncodeUint8(m.Entry.IntegrityKey.Length)
- buf.EncodeBytes(m.Entry.IntegrityKey.Data, 128)
- buf.EncodeUint32(uint32(m.Entry.Flags))
- buf.EncodeUint32(uint32(m.Entry.TunnelSrc.Af))
- buf.EncodeBytes(m.Entry.TunnelSrc.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.Entry.TunnelDst.Af))
- buf.EncodeBytes(m.Entry.TunnelDst.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(m.Entry.TxTableID)
- buf.EncodeUint32(m.Entry.Salt)
- return buf.Bytes(), nil
-}
-func (m *IpsecSadEntryAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeUint8()
- m.Entry.SadID = buf.DecodeUint32()
- m.Entry.Spi = buf.DecodeUint32()
- m.Entry.Protocol = IpsecProto(buf.DecodeUint32())
- m.Entry.CryptoAlgorithm = IpsecCryptoAlg(buf.DecodeUint32())
- m.Entry.CryptoKey.Length = buf.DecodeUint8()
- m.Entry.CryptoKey.Data = make([]byte, 128)
- copy(m.Entry.CryptoKey.Data, buf.DecodeBytes(len(m.Entry.CryptoKey.Data)))
- m.Entry.IntegrityAlgorithm = IpsecIntegAlg(buf.DecodeUint32())
- m.Entry.IntegrityKey.Length = buf.DecodeUint8()
- m.Entry.IntegrityKey.Data = make([]byte, 128)
- copy(m.Entry.IntegrityKey.Data, buf.DecodeBytes(len(m.Entry.IntegrityKey.Data)))
- m.Entry.Flags = IpsecSadFlags(buf.DecodeUint32())
- m.Entry.TunnelSrc.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Entry.TunnelSrc.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Entry.TunnelDst.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Entry.TunnelDst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Entry.TxTableID = buf.DecodeUint32()
- m.Entry.Salt = buf.DecodeUint32()
- return nil
-}
-
-// IpsecSadEntryAddDelReply defines message 'ipsec_sad_entry_add_del_reply'.
-type IpsecSadEntryAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- StatIndex uint32 `binapi:"u32,name=stat_index" json:"stat_index,omitempty"`
-}
-
-func (m *IpsecSadEntryAddDelReply) Reset() { *m = IpsecSadEntryAddDelReply{} }
-func (*IpsecSadEntryAddDelReply) GetMessageName() string { return "ipsec_sad_entry_add_del_reply" }
-func (*IpsecSadEntryAddDelReply) GetCrcString() string { return "9ffac24b" }
-func (*IpsecSadEntryAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IpsecSadEntryAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.StatIndex
- return size
-}
-func (m *IpsecSadEntryAddDelReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.StatIndex)
- return buf.Bytes(), nil
-}
-func (m *IpsecSadEntryAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.StatIndex = buf.DecodeUint32()
- return nil
-}
-
-// IpsecSelectBackend defines message 'ipsec_select_backend'.
-type IpsecSelectBackend struct {
- Protocol IpsecProto `binapi:"ipsec_proto,name=protocol" json:"protocol,omitempty"`
- Index uint8 `binapi:"u8,name=index" json:"index,omitempty"`
-}
-
-func (m *IpsecSelectBackend) Reset() { *m = IpsecSelectBackend{} }
-func (*IpsecSelectBackend) GetMessageName() string { return "ipsec_select_backend" }
-func (*IpsecSelectBackend) GetCrcString() string { return "4fd24836" }
-func (*IpsecSelectBackend) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IpsecSelectBackend) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Protocol
- size += 1 // m.Index
- return size
-}
-func (m *IpsecSelectBackend) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.Protocol))
- buf.EncodeUint8(m.Index)
- return buf.Bytes(), nil
-}
-func (m *IpsecSelectBackend) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Protocol = IpsecProto(buf.DecodeUint32())
- m.Index = buf.DecodeUint8()
- return nil
-}
-
-// IpsecSelectBackendReply defines message 'ipsec_select_backend_reply'.
-type IpsecSelectBackendReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *IpsecSelectBackendReply) Reset() { *m = IpsecSelectBackendReply{} }
-func (*IpsecSelectBackendReply) GetMessageName() string { return "ipsec_select_backend_reply" }
-func (*IpsecSelectBackendReply) GetCrcString() string { return "e8d4e804" }
-func (*IpsecSelectBackendReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IpsecSelectBackendReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *IpsecSelectBackendReply) 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 *IpsecSelectBackendReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// IpsecSpdAddDel defines message 'ipsec_spd_add_del'.
-type IpsecSpdAddDel struct {
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
- SpdID uint32 `binapi:"u32,name=spd_id" json:"spd_id,omitempty"`
-}
-
-func (m *IpsecSpdAddDel) Reset() { *m = IpsecSpdAddDel{} }
-func (*IpsecSpdAddDel) GetMessageName() string { return "ipsec_spd_add_del" }
-func (*IpsecSpdAddDel) GetCrcString() string { return "9ffdf5da" }
-func (*IpsecSpdAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IpsecSpdAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 4 // m.SpdID
- return size
-}
-func (m *IpsecSpdAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsAdd)
- buf.EncodeUint32(m.SpdID)
- return buf.Bytes(), nil
-}
-func (m *IpsecSpdAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeUint8()
- m.SpdID = buf.DecodeUint32()
- return nil
-}
-
-// IpsecSpdAddDelReply defines message 'ipsec_spd_add_del_reply'.
-type IpsecSpdAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *IpsecSpdAddDelReply) Reset() { *m = IpsecSpdAddDelReply{} }
-func (*IpsecSpdAddDelReply) GetMessageName() string { return "ipsec_spd_add_del_reply" }
-func (*IpsecSpdAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*IpsecSpdAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IpsecSpdAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *IpsecSpdAddDelReply) 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 *IpsecSpdAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// IpsecSpdDetails defines message 'ipsec_spd_details'.
-type IpsecSpdDetails struct {
- Entry IpsecSpdEntry `binapi:"ipsec_spd_entry,name=entry" json:"entry,omitempty"`
-}
-
-func (m *IpsecSpdDetails) Reset() { *m = IpsecSpdDetails{} }
-func (*IpsecSpdDetails) GetMessageName() string { return "ipsec_spd_details" }
-func (*IpsecSpdDetails) GetCrcString() string { return "021e2c20" }
-func (*IpsecSpdDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IpsecSpdDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Entry.SpdID
- size += 4 // m.Entry.Priority
- size += 1 // m.Entry.IsOutbound
- size += 4 // m.Entry.SaID
- size += 4 // m.Entry.Policy
- size += 1 // m.Entry.Protocol
- size += 4 // m.Entry.RemoteAddressStart.Af
- size += 1 * 16 // m.Entry.RemoteAddressStart.Un
- size += 4 // m.Entry.RemoteAddressStop.Af
- size += 1 * 16 // m.Entry.RemoteAddressStop.Un
- size += 4 // m.Entry.LocalAddressStart.Af
- size += 1 * 16 // m.Entry.LocalAddressStart.Un
- size += 4 // m.Entry.LocalAddressStop.Af
- size += 1 * 16 // m.Entry.LocalAddressStop.Un
- size += 2 // m.Entry.RemotePortStart
- size += 2 // m.Entry.RemotePortStop
- size += 2 // m.Entry.LocalPortStart
- size += 2 // m.Entry.LocalPortStop
- return size
-}
-func (m *IpsecSpdDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Entry.SpdID)
- buf.EncodeInt32(m.Entry.Priority)
- buf.EncodeUint8(m.Entry.IsOutbound)
- buf.EncodeUint32(m.Entry.SaID)
- buf.EncodeUint32(uint32(m.Entry.Policy))
- buf.EncodeUint8(m.Entry.Protocol)
- buf.EncodeUint32(uint32(m.Entry.RemoteAddressStart.Af))
- buf.EncodeBytes(m.Entry.RemoteAddressStart.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.Entry.RemoteAddressStop.Af))
- buf.EncodeBytes(m.Entry.RemoteAddressStop.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.Entry.LocalAddressStart.Af))
- buf.EncodeBytes(m.Entry.LocalAddressStart.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.Entry.LocalAddressStop.Af))
- buf.EncodeBytes(m.Entry.LocalAddressStop.Un.XXX_UnionData[:], 16)
- buf.EncodeUint16(m.Entry.RemotePortStart)
- buf.EncodeUint16(m.Entry.RemotePortStop)
- buf.EncodeUint16(m.Entry.LocalPortStart)
- buf.EncodeUint16(m.Entry.LocalPortStop)
- return buf.Bytes(), nil
-}
-func (m *IpsecSpdDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Entry.SpdID = buf.DecodeUint32()
- m.Entry.Priority = buf.DecodeInt32()
- m.Entry.IsOutbound = buf.DecodeUint8()
- m.Entry.SaID = buf.DecodeUint32()
- m.Entry.Policy = IpsecSpdAction(buf.DecodeUint32())
- m.Entry.Protocol = buf.DecodeUint8()
- m.Entry.RemoteAddressStart.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Entry.RemoteAddressStart.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Entry.RemoteAddressStop.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Entry.RemoteAddressStop.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Entry.LocalAddressStart.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Entry.LocalAddressStart.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Entry.LocalAddressStop.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Entry.LocalAddressStop.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Entry.RemotePortStart = buf.DecodeUint16()
- m.Entry.RemotePortStop = buf.DecodeUint16()
- m.Entry.LocalPortStart = buf.DecodeUint16()
- m.Entry.LocalPortStop = buf.DecodeUint16()
- return nil
-}
-
-// IpsecSpdDump defines message 'ipsec_spd_dump'.
-type IpsecSpdDump struct {
- SpdID uint32 `binapi:"u32,name=spd_id" json:"spd_id,omitempty"`
- SaID uint32 `binapi:"u32,name=sa_id" json:"sa_id,omitempty"`
-}
-
-func (m *IpsecSpdDump) Reset() { *m = IpsecSpdDump{} }
-func (*IpsecSpdDump) GetMessageName() string { return "ipsec_spd_dump" }
-func (*IpsecSpdDump) GetCrcString() string { return "afefbf7d" }
-func (*IpsecSpdDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IpsecSpdDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SpdID
- size += 4 // m.SaID
- return size
-}
-func (m *IpsecSpdDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.SpdID)
- buf.EncodeUint32(m.SaID)
- return buf.Bytes(), nil
-}
-func (m *IpsecSpdDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SpdID = buf.DecodeUint32()
- m.SaID = buf.DecodeUint32()
- return nil
-}
-
-// IpsecSpdEntryAddDel defines message 'ipsec_spd_entry_add_del'.
-type IpsecSpdEntryAddDel struct {
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
- Entry IpsecSpdEntry `binapi:"ipsec_spd_entry,name=entry" json:"entry,omitempty"`
-}
-
-func (m *IpsecSpdEntryAddDel) Reset() { *m = IpsecSpdEntryAddDel{} }
-func (*IpsecSpdEntryAddDel) GetMessageName() string { return "ipsec_spd_entry_add_del" }
-func (*IpsecSpdEntryAddDel) GetCrcString() string { return "db217840" }
-func (*IpsecSpdEntryAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IpsecSpdEntryAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 4 // m.Entry.SpdID
- size += 4 // m.Entry.Priority
- size += 1 // m.Entry.IsOutbound
- size += 4 // m.Entry.SaID
- size += 4 // m.Entry.Policy
- size += 1 // m.Entry.Protocol
- size += 4 // m.Entry.RemoteAddressStart.Af
- size += 1 * 16 // m.Entry.RemoteAddressStart.Un
- size += 4 // m.Entry.RemoteAddressStop.Af
- size += 1 * 16 // m.Entry.RemoteAddressStop.Un
- size += 4 // m.Entry.LocalAddressStart.Af
- size += 1 * 16 // m.Entry.LocalAddressStart.Un
- size += 4 // m.Entry.LocalAddressStop.Af
- size += 1 * 16 // m.Entry.LocalAddressStop.Un
- size += 2 // m.Entry.RemotePortStart
- size += 2 // m.Entry.RemotePortStop
- size += 2 // m.Entry.LocalPortStart
- size += 2 // m.Entry.LocalPortStop
- return size
-}
-func (m *IpsecSpdEntryAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsAdd)
- buf.EncodeUint32(m.Entry.SpdID)
- buf.EncodeInt32(m.Entry.Priority)
- buf.EncodeUint8(m.Entry.IsOutbound)
- buf.EncodeUint32(m.Entry.SaID)
- buf.EncodeUint32(uint32(m.Entry.Policy))
- buf.EncodeUint8(m.Entry.Protocol)
- buf.EncodeUint32(uint32(m.Entry.RemoteAddressStart.Af))
- buf.EncodeBytes(m.Entry.RemoteAddressStart.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.Entry.RemoteAddressStop.Af))
- buf.EncodeBytes(m.Entry.RemoteAddressStop.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.Entry.LocalAddressStart.Af))
- buf.EncodeBytes(m.Entry.LocalAddressStart.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.Entry.LocalAddressStop.Af))
- buf.EncodeBytes(m.Entry.LocalAddressStop.Un.XXX_UnionData[:], 16)
- buf.EncodeUint16(m.Entry.RemotePortStart)
- buf.EncodeUint16(m.Entry.RemotePortStop)
- buf.EncodeUint16(m.Entry.LocalPortStart)
- buf.EncodeUint16(m.Entry.LocalPortStop)
- return buf.Bytes(), nil
-}
-func (m *IpsecSpdEntryAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeUint8()
- m.Entry.SpdID = buf.DecodeUint32()
- m.Entry.Priority = buf.DecodeInt32()
- m.Entry.IsOutbound = buf.DecodeUint8()
- m.Entry.SaID = buf.DecodeUint32()
- m.Entry.Policy = IpsecSpdAction(buf.DecodeUint32())
- m.Entry.Protocol = buf.DecodeUint8()
- m.Entry.RemoteAddressStart.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Entry.RemoteAddressStart.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Entry.RemoteAddressStop.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Entry.RemoteAddressStop.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Entry.LocalAddressStart.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Entry.LocalAddressStart.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Entry.LocalAddressStop.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Entry.LocalAddressStop.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Entry.RemotePortStart = buf.DecodeUint16()
- m.Entry.RemotePortStop = buf.DecodeUint16()
- m.Entry.LocalPortStart = buf.DecodeUint16()
- m.Entry.LocalPortStop = buf.DecodeUint16()
- return nil
-}
-
-// IpsecSpdEntryAddDelReply defines message 'ipsec_spd_entry_add_del_reply'.
-type IpsecSpdEntryAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- StatIndex uint32 `binapi:"u32,name=stat_index" json:"stat_index,omitempty"`
-}
-
-func (m *IpsecSpdEntryAddDelReply) Reset() { *m = IpsecSpdEntryAddDelReply{} }
-func (*IpsecSpdEntryAddDelReply) GetMessageName() string { return "ipsec_spd_entry_add_del_reply" }
-func (*IpsecSpdEntryAddDelReply) GetCrcString() string { return "9ffac24b" }
-func (*IpsecSpdEntryAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IpsecSpdEntryAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.StatIndex
- return size
-}
-func (m *IpsecSpdEntryAddDelReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.StatIndex)
- return buf.Bytes(), nil
-}
-func (m *IpsecSpdEntryAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.StatIndex = buf.DecodeUint32()
- return nil
-}
-
-// IpsecSpdInterfaceDetails defines message 'ipsec_spd_interface_details'.
-type IpsecSpdInterfaceDetails struct {
- SpdIndex uint32 `binapi:"u32,name=spd_index" json:"spd_index,omitempty"`
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *IpsecSpdInterfaceDetails) Reset() { *m = IpsecSpdInterfaceDetails{} }
-func (*IpsecSpdInterfaceDetails) GetMessageName() string { return "ipsec_spd_interface_details" }
-func (*IpsecSpdInterfaceDetails) GetCrcString() string { return "2c54296d" }
-func (*IpsecSpdInterfaceDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IpsecSpdInterfaceDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SpdIndex
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *IpsecSpdInterfaceDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.SpdIndex)
- buf.EncodeUint32(m.SwIfIndex)
- return buf.Bytes(), nil
-}
-func (m *IpsecSpdInterfaceDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SpdIndex = buf.DecodeUint32()
- m.SwIfIndex = buf.DecodeUint32()
- return nil
-}
-
-// IpsecSpdInterfaceDump defines message 'ipsec_spd_interface_dump'.
-type IpsecSpdInterfaceDump struct {
- SpdIndex uint32 `binapi:"u32,name=spd_index" json:"spd_index,omitempty"`
- SpdIndexValid uint8 `binapi:"u8,name=spd_index_valid" json:"spd_index_valid,omitempty"`
-}
-
-func (m *IpsecSpdInterfaceDump) Reset() { *m = IpsecSpdInterfaceDump{} }
-func (*IpsecSpdInterfaceDump) GetMessageName() string { return "ipsec_spd_interface_dump" }
-func (*IpsecSpdInterfaceDump) GetCrcString() string { return "8971de19" }
-func (*IpsecSpdInterfaceDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IpsecSpdInterfaceDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SpdIndex
- size += 1 // m.SpdIndexValid
- return size
-}
-func (m *IpsecSpdInterfaceDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.SpdIndex)
- buf.EncodeUint8(m.SpdIndexValid)
- return buf.Bytes(), nil
-}
-func (m *IpsecSpdInterfaceDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SpdIndex = buf.DecodeUint32()
- m.SpdIndexValid = buf.DecodeUint8()
- return nil
-}
-
-// IpsecSpdsDetails defines message 'ipsec_spds_details'.
-type IpsecSpdsDetails struct {
- SpdID uint32 `binapi:"u32,name=spd_id" json:"spd_id,omitempty"`
- Npolicies uint32 `binapi:"u32,name=npolicies" json:"npolicies,omitempty"`
-}
-
-func (m *IpsecSpdsDetails) Reset() { *m = IpsecSpdsDetails{} }
-func (*IpsecSpdsDetails) GetMessageName() string { return "ipsec_spds_details" }
-func (*IpsecSpdsDetails) GetCrcString() string { return "a04bb254" }
-func (*IpsecSpdsDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IpsecSpdsDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SpdID
- size += 4 // m.Npolicies
- return size
-}
-func (m *IpsecSpdsDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.SpdID)
- buf.EncodeUint32(m.Npolicies)
- return buf.Bytes(), nil
-}
-func (m *IpsecSpdsDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SpdID = buf.DecodeUint32()
- m.Npolicies = buf.DecodeUint32()
- return nil
-}
-
-// IpsecSpdsDump defines message 'ipsec_spds_dump'.
-type IpsecSpdsDump struct{}
-
-func (m *IpsecSpdsDump) Reset() { *m = IpsecSpdsDump{} }
-func (*IpsecSpdsDump) GetMessageName() string { return "ipsec_spds_dump" }
-func (*IpsecSpdsDump) GetCrcString() string { return "51077d14" }
-func (*IpsecSpdsDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IpsecSpdsDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *IpsecSpdsDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *IpsecSpdsDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// IpsecTunnelIfAddDel defines message 'ipsec_tunnel_if_add_del'.
-type IpsecTunnelIfAddDel struct {
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
- Esn uint8 `binapi:"u8,name=esn" json:"esn,omitempty"`
- AntiReplay uint8 `binapi:"u8,name=anti_replay" json:"anti_replay,omitempty"`
- LocalIP Address `binapi:"address,name=local_ip" json:"local_ip,omitempty"`
- RemoteIP Address `binapi:"address,name=remote_ip" json:"remote_ip,omitempty"`
- LocalSpi uint32 `binapi:"u32,name=local_spi" json:"local_spi,omitempty"`
- RemoteSpi uint32 `binapi:"u32,name=remote_spi" json:"remote_spi,omitempty"`
- CryptoAlg uint8 `binapi:"u8,name=crypto_alg" json:"crypto_alg,omitempty"`
- LocalCryptoKeyLen uint8 `binapi:"u8,name=local_crypto_key_len" json:"local_crypto_key_len,omitempty"`
- LocalCryptoKey []byte `binapi:"u8[128],name=local_crypto_key" json:"local_crypto_key,omitempty"`
- RemoteCryptoKeyLen uint8 `binapi:"u8,name=remote_crypto_key_len" json:"remote_crypto_key_len,omitempty"`
- RemoteCryptoKey []byte `binapi:"u8[128],name=remote_crypto_key" json:"remote_crypto_key,omitempty"`
- IntegAlg uint8 `binapi:"u8,name=integ_alg" json:"integ_alg,omitempty"`
- LocalIntegKeyLen uint8 `binapi:"u8,name=local_integ_key_len" json:"local_integ_key_len,omitempty"`
- LocalIntegKey []byte `binapi:"u8[128],name=local_integ_key" json:"local_integ_key,omitempty"`
- RemoteIntegKeyLen uint8 `binapi:"u8,name=remote_integ_key_len" json:"remote_integ_key_len,omitempty"`
- RemoteIntegKey []byte `binapi:"u8[128],name=remote_integ_key" json:"remote_integ_key,omitempty"`
- Renumber uint8 `binapi:"u8,name=renumber" json:"renumber,omitempty"`
- ShowInstance uint32 `binapi:"u32,name=show_instance" json:"show_instance,omitempty"`
- UDPEncap uint8 `binapi:"u8,name=udp_encap" json:"udp_encap,omitempty"`
- TxTableID uint32 `binapi:"u32,name=tx_table_id" json:"tx_table_id,omitempty"`
- Salt uint32 `binapi:"u32,name=salt" json:"salt,omitempty"`
-}
-
-func (m *IpsecTunnelIfAddDel) Reset() { *m = IpsecTunnelIfAddDel{} }
-func (*IpsecTunnelIfAddDel) GetMessageName() string { return "ipsec_tunnel_if_add_del" }
-func (*IpsecTunnelIfAddDel) GetCrcString() string { return "d5a98274" }
-func (*IpsecTunnelIfAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IpsecTunnelIfAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 1 // m.Esn
- size += 1 // m.AntiReplay
- size += 4 // m.LocalIP.Af
- size += 1 * 16 // m.LocalIP.Un
- size += 4 // m.RemoteIP.Af
- size += 1 * 16 // m.RemoteIP.Un
- size += 4 // m.LocalSpi
- size += 4 // m.RemoteSpi
- size += 1 // m.CryptoAlg
- size += 1 // m.LocalCryptoKeyLen
- size += 1 * 128 // m.LocalCryptoKey
- size += 1 // m.RemoteCryptoKeyLen
- size += 1 * 128 // m.RemoteCryptoKey
- size += 1 // m.IntegAlg
- size += 1 // m.LocalIntegKeyLen
- size += 1 * 128 // m.LocalIntegKey
- size += 1 // m.RemoteIntegKeyLen
- size += 1 * 128 // m.RemoteIntegKey
- size += 1 // m.Renumber
- size += 4 // m.ShowInstance
- size += 1 // m.UDPEncap
- size += 4 // m.TxTableID
- size += 4 // m.Salt
- return size
-}
-func (m *IpsecTunnelIfAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsAdd)
- buf.EncodeUint8(m.Esn)
- buf.EncodeUint8(m.AntiReplay)
- buf.EncodeUint32(uint32(m.LocalIP.Af))
- buf.EncodeBytes(m.LocalIP.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.RemoteIP.Af))
- buf.EncodeBytes(m.RemoteIP.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(m.LocalSpi)
- buf.EncodeUint32(m.RemoteSpi)
- buf.EncodeUint8(m.CryptoAlg)
- buf.EncodeUint8(m.LocalCryptoKeyLen)
- buf.EncodeBytes(m.LocalCryptoKey, 128)
- buf.EncodeUint8(m.RemoteCryptoKeyLen)
- buf.EncodeBytes(m.RemoteCryptoKey, 128)
- buf.EncodeUint8(m.IntegAlg)
- buf.EncodeUint8(m.LocalIntegKeyLen)
- buf.EncodeBytes(m.LocalIntegKey, 128)
- buf.EncodeUint8(m.RemoteIntegKeyLen)
- buf.EncodeBytes(m.RemoteIntegKey, 128)
- buf.EncodeUint8(m.Renumber)
- buf.EncodeUint32(m.ShowInstance)
- buf.EncodeUint8(m.UDPEncap)
- buf.EncodeUint32(m.TxTableID)
- buf.EncodeUint32(m.Salt)
- return buf.Bytes(), nil
-}
-func (m *IpsecTunnelIfAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeUint8()
- m.Esn = buf.DecodeUint8()
- m.AntiReplay = buf.DecodeUint8()
- m.LocalIP.Af = AddressFamily(buf.DecodeUint32())
- copy(m.LocalIP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.RemoteIP.Af = AddressFamily(buf.DecodeUint32())
- copy(m.RemoteIP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.LocalSpi = buf.DecodeUint32()
- m.RemoteSpi = buf.DecodeUint32()
- m.CryptoAlg = buf.DecodeUint8()
- m.LocalCryptoKeyLen = buf.DecodeUint8()
- m.LocalCryptoKey = make([]byte, 128)
- copy(m.LocalCryptoKey, buf.DecodeBytes(len(m.LocalCryptoKey)))
- m.RemoteCryptoKeyLen = buf.DecodeUint8()
- m.RemoteCryptoKey = make([]byte, 128)
- copy(m.RemoteCryptoKey, buf.DecodeBytes(len(m.RemoteCryptoKey)))
- m.IntegAlg = buf.DecodeUint8()
- m.LocalIntegKeyLen = buf.DecodeUint8()
- m.LocalIntegKey = make([]byte, 128)
- copy(m.LocalIntegKey, buf.DecodeBytes(len(m.LocalIntegKey)))
- m.RemoteIntegKeyLen = buf.DecodeUint8()
- m.RemoteIntegKey = make([]byte, 128)
- copy(m.RemoteIntegKey, buf.DecodeBytes(len(m.RemoteIntegKey)))
- m.Renumber = buf.DecodeUint8()
- m.ShowInstance = buf.DecodeUint32()
- m.UDPEncap = buf.DecodeUint8()
- m.TxTableID = buf.DecodeUint32()
- m.Salt = buf.DecodeUint32()
- return nil
-}
-
-// IpsecTunnelIfAddDelReply defines message 'ipsec_tunnel_if_add_del_reply'.
-type IpsecTunnelIfAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *IpsecTunnelIfAddDelReply) Reset() { *m = IpsecTunnelIfAddDelReply{} }
-func (*IpsecTunnelIfAddDelReply) GetMessageName() string { return "ipsec_tunnel_if_add_del_reply" }
-func (*IpsecTunnelIfAddDelReply) GetCrcString() string { return "fda5941f" }
-func (*IpsecTunnelIfAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IpsecTunnelIfAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *IpsecTunnelIfAddDelReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.SwIfIndex)
- return buf.Bytes(), nil
-}
-func (m *IpsecTunnelIfAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.SwIfIndex = buf.DecodeUint32()
- return nil
-}
-
-// IpsecTunnelIfSetSa defines message 'ipsec_tunnel_if_set_sa'.
-type IpsecTunnelIfSetSa struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- SaID uint32 `binapi:"u32,name=sa_id" json:"sa_id,omitempty"`
- IsOutbound uint8 `binapi:"u8,name=is_outbound" json:"is_outbound,omitempty"`
-}
-
-func (m *IpsecTunnelIfSetSa) Reset() { *m = IpsecTunnelIfSetSa{} }
-func (*IpsecTunnelIfSetSa) GetMessageName() string { return "ipsec_tunnel_if_set_sa" }
-func (*IpsecTunnelIfSetSa) GetCrcString() string { return "6ab567f2" }
-func (*IpsecTunnelIfSetSa) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IpsecTunnelIfSetSa) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.SaID
- size += 1 // m.IsOutbound
- return size
-}
-func (m *IpsecTunnelIfSetSa) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.SwIfIndex)
- buf.EncodeUint32(m.SaID)
- buf.EncodeUint8(m.IsOutbound)
- return buf.Bytes(), nil
-}
-func (m *IpsecTunnelIfSetSa) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = buf.DecodeUint32()
- m.SaID = buf.DecodeUint32()
- m.IsOutbound = buf.DecodeUint8()
- return nil
-}
-
-// IpsecTunnelIfSetSaReply defines message 'ipsec_tunnel_if_set_sa_reply'.
-type IpsecTunnelIfSetSaReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *IpsecTunnelIfSetSaReply) Reset() { *m = IpsecTunnelIfSetSaReply{} }
-func (*IpsecTunnelIfSetSaReply) GetMessageName() string { return "ipsec_tunnel_if_set_sa_reply" }
-func (*IpsecTunnelIfSetSaReply) GetCrcString() string { return "e8d4e804" }
-func (*IpsecTunnelIfSetSaReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IpsecTunnelIfSetSaReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *IpsecTunnelIfSetSaReply) 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 *IpsecTunnelIfSetSaReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// IpsecTunnelProtectDel defines message 'ipsec_tunnel_protect_del'.
-type IpsecTunnelProtectDel struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *IpsecTunnelProtectDel) Reset() { *m = IpsecTunnelProtectDel{} }
-func (*IpsecTunnelProtectDel) GetMessageName() string { return "ipsec_tunnel_protect_del" }
-func (*IpsecTunnelProtectDel) GetCrcString() string { return "f9e6675e" }
-func (*IpsecTunnelProtectDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IpsecTunnelProtectDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *IpsecTunnelProtectDel) 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 *IpsecTunnelProtectDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// IpsecTunnelProtectDelReply defines message 'ipsec_tunnel_protect_del_reply'.
-type IpsecTunnelProtectDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *IpsecTunnelProtectDelReply) Reset() { *m = IpsecTunnelProtectDelReply{} }
-func (*IpsecTunnelProtectDelReply) GetMessageName() string { return "ipsec_tunnel_protect_del_reply" }
-func (*IpsecTunnelProtectDelReply) GetCrcString() string { return "e8d4e804" }
-func (*IpsecTunnelProtectDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IpsecTunnelProtectDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *IpsecTunnelProtectDelReply) 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 *IpsecTunnelProtectDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// IpsecTunnelProtectDetails defines message 'ipsec_tunnel_protect_details'.
-type IpsecTunnelProtectDetails struct {
- Tun IpsecTunnelProtect `binapi:"ipsec_tunnel_protect,name=tun" json:"tun,omitempty"`
-}
-
-func (m *IpsecTunnelProtectDetails) Reset() { *m = IpsecTunnelProtectDetails{} }
-func (*IpsecTunnelProtectDetails) GetMessageName() string { return "ipsec_tunnel_protect_details" }
-func (*IpsecTunnelProtectDetails) GetCrcString() string { return "7520eefe" }
-func (*IpsecTunnelProtectDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IpsecTunnelProtectDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Tun.SwIfIndex
- size += 4 // m.Tun.SaOut
- size += 1 // m.Tun.NSaIn
- size += 4 * len(m.Tun.SaIn) // m.Tun.SaIn
- return size
-}
-func (m *IpsecTunnelProtectDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.Tun.SwIfIndex))
- buf.EncodeUint32(m.Tun.SaOut)
- buf.EncodeUint8(uint8(len(m.Tun.SaIn)))
- for i := 0; i < len(m.Tun.SaIn); i++ {
- var x uint32
- if i < len(m.Tun.SaIn) {
- x = uint32(m.Tun.SaIn[i])
- }
- buf.EncodeUint32(x)
- }
- return buf.Bytes(), nil
-}
-func (m *IpsecTunnelProtectDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Tun.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Tun.SaOut = buf.DecodeUint32()
- m.Tun.NSaIn = buf.DecodeUint8()
- m.Tun.SaIn = make([]uint32, m.Tun.NSaIn)
- for i := 0; i < len(m.Tun.SaIn); i++ {
- m.Tun.SaIn[i] = buf.DecodeUint32()
- }
- return nil
-}
-
-// IpsecTunnelProtectDump defines message 'ipsec_tunnel_protect_dump'.
-type IpsecTunnelProtectDump struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *IpsecTunnelProtectDump) Reset() { *m = IpsecTunnelProtectDump{} }
-func (*IpsecTunnelProtectDump) GetMessageName() string { return "ipsec_tunnel_protect_dump" }
-func (*IpsecTunnelProtectDump) GetCrcString() string { return "f9e6675e" }
-func (*IpsecTunnelProtectDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IpsecTunnelProtectDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *IpsecTunnelProtectDump) 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 *IpsecTunnelProtectDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// IpsecTunnelProtectUpdate defines message 'ipsec_tunnel_protect_update'.
-type IpsecTunnelProtectUpdate struct {
- Tunnel IpsecTunnelProtect `binapi:"ipsec_tunnel_protect,name=tunnel" json:"tunnel,omitempty"`
-}
-
-func (m *IpsecTunnelProtectUpdate) Reset() { *m = IpsecTunnelProtectUpdate{} }
-func (*IpsecTunnelProtectUpdate) GetMessageName() string { return "ipsec_tunnel_protect_update" }
-func (*IpsecTunnelProtectUpdate) GetCrcString() string { return "eccbc177" }
-func (*IpsecTunnelProtectUpdate) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IpsecTunnelProtectUpdate) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Tunnel.SwIfIndex
- size += 4 // m.Tunnel.SaOut
- size += 1 // m.Tunnel.NSaIn
- size += 4 * len(m.Tunnel.SaIn) // m.Tunnel.SaIn
- return size
-}
-func (m *IpsecTunnelProtectUpdate) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.Tunnel.SwIfIndex))
- buf.EncodeUint32(m.Tunnel.SaOut)
- buf.EncodeUint8(uint8(len(m.Tunnel.SaIn)))
- for i := 0; i < len(m.Tunnel.SaIn); i++ {
- var x uint32
- if i < len(m.Tunnel.SaIn) {
- x = uint32(m.Tunnel.SaIn[i])
- }
- buf.EncodeUint32(x)
- }
- return buf.Bytes(), nil
-}
-func (m *IpsecTunnelProtectUpdate) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Tunnel.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Tunnel.SaOut = buf.DecodeUint32()
- m.Tunnel.NSaIn = buf.DecodeUint8()
- m.Tunnel.SaIn = make([]uint32, m.Tunnel.NSaIn)
- for i := 0; i < len(m.Tunnel.SaIn); i++ {
- m.Tunnel.SaIn[i] = buf.DecodeUint32()
- }
- return nil
-}
-
-// IpsecTunnelProtectUpdateReply defines message 'ipsec_tunnel_protect_update_reply'.
-type IpsecTunnelProtectUpdateReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *IpsecTunnelProtectUpdateReply) Reset() { *m = IpsecTunnelProtectUpdateReply{} }
-func (*IpsecTunnelProtectUpdateReply) GetMessageName() string {
- return "ipsec_tunnel_protect_update_reply"
-}
-func (*IpsecTunnelProtectUpdateReply) GetCrcString() string { return "e8d4e804" }
-func (*IpsecTunnelProtectUpdateReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IpsecTunnelProtectUpdateReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *IpsecTunnelProtectUpdateReply) 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 *IpsecTunnelProtectUpdateReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_ipsec_binapi_init() }
-func file_ipsec_binapi_init() {
- api.RegisterMessage((*IpsecBackendDetails)(nil), "ipsec_backend_details_7700751c")
- api.RegisterMessage((*IpsecBackendDump)(nil), "ipsec_backend_dump_51077d14")
- api.RegisterMessage((*IpsecInterfaceAddDelSpd)(nil), "ipsec_interface_add_del_spd_1e3b8286")
- api.RegisterMessage((*IpsecInterfaceAddDelSpdReply)(nil), "ipsec_interface_add_del_spd_reply_e8d4e804")
- api.RegisterMessage((*IpsecSaDetails)(nil), "ipsec_sa_details_9c8d829a")
- api.RegisterMessage((*IpsecSaDump)(nil), "ipsec_sa_dump_2076c2f4")
- api.RegisterMessage((*IpsecSadEntryAddDel)(nil), "ipsec_sad_entry_add_del_a25ab61e")
- api.RegisterMessage((*IpsecSadEntryAddDelReply)(nil), "ipsec_sad_entry_add_del_reply_9ffac24b")
- api.RegisterMessage((*IpsecSelectBackend)(nil), "ipsec_select_backend_4fd24836")
- api.RegisterMessage((*IpsecSelectBackendReply)(nil), "ipsec_select_backend_reply_e8d4e804")
- api.RegisterMessage((*IpsecSpdAddDel)(nil), "ipsec_spd_add_del_9ffdf5da")
- api.RegisterMessage((*IpsecSpdAddDelReply)(nil), "ipsec_spd_add_del_reply_e8d4e804")
- api.RegisterMessage((*IpsecSpdDetails)(nil), "ipsec_spd_details_021e2c20")
- api.RegisterMessage((*IpsecSpdDump)(nil), "ipsec_spd_dump_afefbf7d")
- api.RegisterMessage((*IpsecSpdEntryAddDel)(nil), "ipsec_spd_entry_add_del_db217840")
- api.RegisterMessage((*IpsecSpdEntryAddDelReply)(nil), "ipsec_spd_entry_add_del_reply_9ffac24b")
- api.RegisterMessage((*IpsecSpdInterfaceDetails)(nil), "ipsec_spd_interface_details_2c54296d")
- api.RegisterMessage((*IpsecSpdInterfaceDump)(nil), "ipsec_spd_interface_dump_8971de19")
- api.RegisterMessage((*IpsecSpdsDetails)(nil), "ipsec_spds_details_a04bb254")
- api.RegisterMessage((*IpsecSpdsDump)(nil), "ipsec_spds_dump_51077d14")
- api.RegisterMessage((*IpsecTunnelIfAddDel)(nil), "ipsec_tunnel_if_add_del_d5a98274")
- api.RegisterMessage((*IpsecTunnelIfAddDelReply)(nil), "ipsec_tunnel_if_add_del_reply_fda5941f")
- api.RegisterMessage((*IpsecTunnelIfSetSa)(nil), "ipsec_tunnel_if_set_sa_6ab567f2")
- api.RegisterMessage((*IpsecTunnelIfSetSaReply)(nil), "ipsec_tunnel_if_set_sa_reply_e8d4e804")
- api.RegisterMessage((*IpsecTunnelProtectDel)(nil), "ipsec_tunnel_protect_del_f9e6675e")
- api.RegisterMessage((*IpsecTunnelProtectDelReply)(nil), "ipsec_tunnel_protect_del_reply_e8d4e804")
- api.RegisterMessage((*IpsecTunnelProtectDetails)(nil), "ipsec_tunnel_protect_details_7520eefe")
- api.RegisterMessage((*IpsecTunnelProtectDump)(nil), "ipsec_tunnel_protect_dump_f9e6675e")
- api.RegisterMessage((*IpsecTunnelProtectUpdate)(nil), "ipsec_tunnel_protect_update_eccbc177")
- api.RegisterMessage((*IpsecTunnelProtectUpdateReply)(nil), "ipsec_tunnel_protect_update_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*IpsecBackendDetails)(nil),
- (*IpsecBackendDump)(nil),
- (*IpsecInterfaceAddDelSpd)(nil),
- (*IpsecInterfaceAddDelSpdReply)(nil),
- (*IpsecSaDetails)(nil),
- (*IpsecSaDump)(nil),
- (*IpsecSadEntryAddDel)(nil),
- (*IpsecSadEntryAddDelReply)(nil),
- (*IpsecSelectBackend)(nil),
- (*IpsecSelectBackendReply)(nil),
- (*IpsecSpdAddDel)(nil),
- (*IpsecSpdAddDelReply)(nil),
- (*IpsecSpdDetails)(nil),
- (*IpsecSpdDump)(nil),
- (*IpsecSpdEntryAddDel)(nil),
- (*IpsecSpdEntryAddDelReply)(nil),
- (*IpsecSpdInterfaceDetails)(nil),
- (*IpsecSpdInterfaceDump)(nil),
- (*IpsecSpdsDetails)(nil),
- (*IpsecSpdsDump)(nil),
- (*IpsecTunnelIfAddDel)(nil),
- (*IpsecTunnelIfAddDelReply)(nil),
- (*IpsecTunnelIfSetSa)(nil),
- (*IpsecTunnelIfSetSaReply)(nil),
- (*IpsecTunnelProtectDel)(nil),
- (*IpsecTunnelProtectDelReply)(nil),
- (*IpsecTunnelProtectDetails)(nil),
- (*IpsecTunnelProtectDump)(nil),
- (*IpsecTunnelProtectUpdate)(nil),
- (*IpsecTunnelProtectUpdateReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/ipsec/ipsec_rpc.ba.go b/internal/testbinapi/binapi2001/ipsec/ipsec_rpc.ba.go
deleted file mode 100644
index d2ccabb..0000000
--- a/internal/testbinapi/binapi2001/ipsec/ipsec_rpc.ba.go
+++ /dev/null
@@ -1,378 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package ipsec
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service ipsec.
-type RPCService interface {
- IpsecBackendDump(ctx context.Context, in *IpsecBackendDump) (RPCService_IpsecBackendDumpClient, error)
- IpsecInterfaceAddDelSpd(ctx context.Context, in *IpsecInterfaceAddDelSpd) (*IpsecInterfaceAddDelSpdReply, error)
- IpsecSaDump(ctx context.Context, in *IpsecSaDump) (RPCService_IpsecSaDumpClient, error)
- IpsecSadEntryAddDel(ctx context.Context, in *IpsecSadEntryAddDel) (*IpsecSadEntryAddDelReply, error)
- IpsecSelectBackend(ctx context.Context, in *IpsecSelectBackend) (*IpsecSelectBackendReply, error)
- IpsecSpdAddDel(ctx context.Context, in *IpsecSpdAddDel) (*IpsecSpdAddDelReply, error)
- IpsecSpdDump(ctx context.Context, in *IpsecSpdDump) (RPCService_IpsecSpdDumpClient, error)
- IpsecSpdEntryAddDel(ctx context.Context, in *IpsecSpdEntryAddDel) (*IpsecSpdEntryAddDelReply, error)
- IpsecSpdInterfaceDump(ctx context.Context, in *IpsecSpdInterfaceDump) (RPCService_IpsecSpdInterfaceDumpClient, error)
- IpsecSpdsDump(ctx context.Context, in *IpsecSpdsDump) (RPCService_IpsecSpdsDumpClient, error)
- IpsecTunnelIfAddDel(ctx context.Context, in *IpsecTunnelIfAddDel) (*IpsecTunnelIfAddDelReply, error)
- IpsecTunnelIfSetSa(ctx context.Context, in *IpsecTunnelIfSetSa) (*IpsecTunnelIfSetSaReply, error)
- IpsecTunnelProtectDel(ctx context.Context, in *IpsecTunnelProtectDel) (*IpsecTunnelProtectDelReply, error)
- IpsecTunnelProtectDump(ctx context.Context, in *IpsecTunnelProtectDump) (RPCService_IpsecTunnelProtectDumpClient, error)
- IpsecTunnelProtectUpdate(ctx context.Context, in *IpsecTunnelProtectUpdate) (*IpsecTunnelProtectUpdateReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) IpsecBackendDump(ctx context.Context, in *IpsecBackendDump) (RPCService_IpsecBackendDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_IpsecBackendDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_IpsecBackendDumpClient interface {
- Recv() (*IpsecBackendDetails, error)
- api.Stream
-}
-
-type serviceClient_IpsecBackendDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_IpsecBackendDumpClient) Recv() (*IpsecBackendDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *IpsecBackendDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) IpsecInterfaceAddDelSpd(ctx context.Context, in *IpsecInterfaceAddDelSpd) (*IpsecInterfaceAddDelSpdReply, error) {
- out := new(IpsecInterfaceAddDelSpdReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) IpsecSaDump(ctx context.Context, in *IpsecSaDump) (RPCService_IpsecSaDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_IpsecSaDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_IpsecSaDumpClient interface {
- Recv() (*IpsecSaDetails, error)
- api.Stream
-}
-
-type serviceClient_IpsecSaDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_IpsecSaDumpClient) Recv() (*IpsecSaDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *IpsecSaDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) IpsecSadEntryAddDel(ctx context.Context, in *IpsecSadEntryAddDel) (*IpsecSadEntryAddDelReply, error) {
- out := new(IpsecSadEntryAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) IpsecSelectBackend(ctx context.Context, in *IpsecSelectBackend) (*IpsecSelectBackendReply, error) {
- out := new(IpsecSelectBackendReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) IpsecSpdAddDel(ctx context.Context, in *IpsecSpdAddDel) (*IpsecSpdAddDelReply, error) {
- out := new(IpsecSpdAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) IpsecSpdDump(ctx context.Context, in *IpsecSpdDump) (RPCService_IpsecSpdDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_IpsecSpdDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_IpsecSpdDumpClient interface {
- Recv() (*IpsecSpdDetails, error)
- api.Stream
-}
-
-type serviceClient_IpsecSpdDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_IpsecSpdDumpClient) Recv() (*IpsecSpdDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *IpsecSpdDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) IpsecSpdEntryAddDel(ctx context.Context, in *IpsecSpdEntryAddDel) (*IpsecSpdEntryAddDelReply, error) {
- out := new(IpsecSpdEntryAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) IpsecSpdInterfaceDump(ctx context.Context, in *IpsecSpdInterfaceDump) (RPCService_IpsecSpdInterfaceDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_IpsecSpdInterfaceDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_IpsecSpdInterfaceDumpClient interface {
- Recv() (*IpsecSpdInterfaceDetails, error)
- api.Stream
-}
-
-type serviceClient_IpsecSpdInterfaceDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_IpsecSpdInterfaceDumpClient) Recv() (*IpsecSpdInterfaceDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *IpsecSpdInterfaceDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) IpsecSpdsDump(ctx context.Context, in *IpsecSpdsDump) (RPCService_IpsecSpdsDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_IpsecSpdsDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_IpsecSpdsDumpClient interface {
- Recv() (*IpsecSpdsDetails, error)
- api.Stream
-}
-
-type serviceClient_IpsecSpdsDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_IpsecSpdsDumpClient) Recv() (*IpsecSpdsDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *IpsecSpdsDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) IpsecTunnelIfAddDel(ctx context.Context, in *IpsecTunnelIfAddDel) (*IpsecTunnelIfAddDelReply, error) {
- out := new(IpsecTunnelIfAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) IpsecTunnelIfSetSa(ctx context.Context, in *IpsecTunnelIfSetSa) (*IpsecTunnelIfSetSaReply, error) {
- out := new(IpsecTunnelIfSetSaReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) IpsecTunnelProtectDel(ctx context.Context, in *IpsecTunnelProtectDel) (*IpsecTunnelProtectDelReply, error) {
- out := new(IpsecTunnelProtectDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) IpsecTunnelProtectDump(ctx context.Context, in *IpsecTunnelProtectDump) (RPCService_IpsecTunnelProtectDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_IpsecTunnelProtectDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_IpsecTunnelProtectDumpClient interface {
- Recv() (*IpsecTunnelProtectDetails, error)
- api.Stream
-}
-
-type serviceClient_IpsecTunnelProtectDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_IpsecTunnelProtectDumpClient) Recv() (*IpsecTunnelProtectDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *IpsecTunnelProtectDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) IpsecTunnelProtectUpdate(ctx context.Context, in *IpsecTunnelProtectUpdate) (*IpsecTunnelProtectUpdateReply, error) {
- out := new(IpsecTunnelProtectUpdateReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/ipsec_types/ipsec_types.ba.go b/internal/testbinapi/binapi2001/ipsec_types/ipsec_types.ba.go
deleted file mode 100644
index a55ac08..0000000
--- a/internal/testbinapi/binapi2001/ipsec_types/ipsec_types.ba.go
+++ /dev/null
@@ -1,832 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/ipsec_types.api.json
-
-// Package ipsec_types contains generated bindings for API file ipsec_types.api.
-//
-// Contents:
-// 5 aliases
-// 8 enums
-// 8 structs
-// 1 union
-//
-package ipsec_types
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "ipsec_types"
- APIVersion = "3.0.0"
- VersionCrc = 0x6e9f4c73
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IpsecCryptoAlg defines enum 'ipsec_crypto_alg'.
-type IpsecCryptoAlg uint32
-
-const (
- IPSEC_API_CRYPTO_ALG_NONE IpsecCryptoAlg = 0
- IPSEC_API_CRYPTO_ALG_AES_CBC_128 IpsecCryptoAlg = 1
- IPSEC_API_CRYPTO_ALG_AES_CBC_192 IpsecCryptoAlg = 2
- IPSEC_API_CRYPTO_ALG_AES_CBC_256 IpsecCryptoAlg = 3
- IPSEC_API_CRYPTO_ALG_AES_CTR_128 IpsecCryptoAlg = 4
- IPSEC_API_CRYPTO_ALG_AES_CTR_192 IpsecCryptoAlg = 5
- IPSEC_API_CRYPTO_ALG_AES_CTR_256 IpsecCryptoAlg = 6
- IPSEC_API_CRYPTO_ALG_AES_GCM_128 IpsecCryptoAlg = 7
- IPSEC_API_CRYPTO_ALG_AES_GCM_192 IpsecCryptoAlg = 8
- IPSEC_API_CRYPTO_ALG_AES_GCM_256 IpsecCryptoAlg = 9
- IPSEC_API_CRYPTO_ALG_DES_CBC IpsecCryptoAlg = 10
- IPSEC_API_CRYPTO_ALG_3DES_CBC IpsecCryptoAlg = 11
-)
-
-var (
- IpsecCryptoAlg_name = map[uint32]string{
- 0: "IPSEC_API_CRYPTO_ALG_NONE",
- 1: "IPSEC_API_CRYPTO_ALG_AES_CBC_128",
- 2: "IPSEC_API_CRYPTO_ALG_AES_CBC_192",
- 3: "IPSEC_API_CRYPTO_ALG_AES_CBC_256",
- 4: "IPSEC_API_CRYPTO_ALG_AES_CTR_128",
- 5: "IPSEC_API_CRYPTO_ALG_AES_CTR_192",
- 6: "IPSEC_API_CRYPTO_ALG_AES_CTR_256",
- 7: "IPSEC_API_CRYPTO_ALG_AES_GCM_128",
- 8: "IPSEC_API_CRYPTO_ALG_AES_GCM_192",
- 9: "IPSEC_API_CRYPTO_ALG_AES_GCM_256",
- 10: "IPSEC_API_CRYPTO_ALG_DES_CBC",
- 11: "IPSEC_API_CRYPTO_ALG_3DES_CBC",
- }
- IpsecCryptoAlg_value = map[string]uint32{
- "IPSEC_API_CRYPTO_ALG_NONE": 0,
- "IPSEC_API_CRYPTO_ALG_AES_CBC_128": 1,
- "IPSEC_API_CRYPTO_ALG_AES_CBC_192": 2,
- "IPSEC_API_CRYPTO_ALG_AES_CBC_256": 3,
- "IPSEC_API_CRYPTO_ALG_AES_CTR_128": 4,
- "IPSEC_API_CRYPTO_ALG_AES_CTR_192": 5,
- "IPSEC_API_CRYPTO_ALG_AES_CTR_256": 6,
- "IPSEC_API_CRYPTO_ALG_AES_GCM_128": 7,
- "IPSEC_API_CRYPTO_ALG_AES_GCM_192": 8,
- "IPSEC_API_CRYPTO_ALG_AES_GCM_256": 9,
- "IPSEC_API_CRYPTO_ALG_DES_CBC": 10,
- "IPSEC_API_CRYPTO_ALG_3DES_CBC": 11,
- }
-)
-
-func (x IpsecCryptoAlg) String() string {
- s, ok := IpsecCryptoAlg_name[uint32(x)]
- if ok {
- return s
- }
- return "IpsecCryptoAlg(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IpsecIntegAlg defines enum 'ipsec_integ_alg'.
-type IpsecIntegAlg uint32
-
-const (
- IPSEC_API_INTEG_ALG_NONE IpsecIntegAlg = 0
- IPSEC_API_INTEG_ALG_MD5_96 IpsecIntegAlg = 1
- IPSEC_API_INTEG_ALG_SHA1_96 IpsecIntegAlg = 2
- IPSEC_API_INTEG_ALG_SHA_256_96 IpsecIntegAlg = 3
- IPSEC_API_INTEG_ALG_SHA_256_128 IpsecIntegAlg = 4
- IPSEC_API_INTEG_ALG_SHA_384_192 IpsecIntegAlg = 5
- IPSEC_API_INTEG_ALG_SHA_512_256 IpsecIntegAlg = 6
-)
-
-var (
- IpsecIntegAlg_name = map[uint32]string{
- 0: "IPSEC_API_INTEG_ALG_NONE",
- 1: "IPSEC_API_INTEG_ALG_MD5_96",
- 2: "IPSEC_API_INTEG_ALG_SHA1_96",
- 3: "IPSEC_API_INTEG_ALG_SHA_256_96",
- 4: "IPSEC_API_INTEG_ALG_SHA_256_128",
- 5: "IPSEC_API_INTEG_ALG_SHA_384_192",
- 6: "IPSEC_API_INTEG_ALG_SHA_512_256",
- }
- IpsecIntegAlg_value = map[string]uint32{
- "IPSEC_API_INTEG_ALG_NONE": 0,
- "IPSEC_API_INTEG_ALG_MD5_96": 1,
- "IPSEC_API_INTEG_ALG_SHA1_96": 2,
- "IPSEC_API_INTEG_ALG_SHA_256_96": 3,
- "IPSEC_API_INTEG_ALG_SHA_256_128": 4,
- "IPSEC_API_INTEG_ALG_SHA_384_192": 5,
- "IPSEC_API_INTEG_ALG_SHA_512_256": 6,
- }
-)
-
-func (x IpsecIntegAlg) String() string {
- s, ok := IpsecIntegAlg_name[uint32(x)]
- if ok {
- return s
- }
- return "IpsecIntegAlg(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IpsecProto defines enum 'ipsec_proto'.
-type IpsecProto uint32
-
-const (
- IPSEC_API_PROTO_ESP IpsecProto = 1
- IPSEC_API_PROTO_AH IpsecProto = 2
-)
-
-var (
- IpsecProto_name = map[uint32]string{
- 1: "IPSEC_API_PROTO_ESP",
- 2: "IPSEC_API_PROTO_AH",
- }
- IpsecProto_value = map[string]uint32{
- "IPSEC_API_PROTO_ESP": 1,
- "IPSEC_API_PROTO_AH": 2,
- }
-)
-
-func (x IpsecProto) String() string {
- s, ok := IpsecProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IpsecProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IpsecSadFlags defines enum 'ipsec_sad_flags'.
-type IpsecSadFlags uint32
-
-const (
- IPSEC_API_SAD_FLAG_NONE IpsecSadFlags = 0
- IPSEC_API_SAD_FLAG_USE_ESN IpsecSadFlags = 1
- IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY IpsecSadFlags = 2
- IPSEC_API_SAD_FLAG_IS_TUNNEL IpsecSadFlags = 4
- IPSEC_API_SAD_FLAG_IS_TUNNEL_V6 IpsecSadFlags = 8
- IPSEC_API_SAD_FLAG_UDP_ENCAP IpsecSadFlags = 16
-)
-
-var (
- IpsecSadFlags_name = map[uint32]string{
- 0: "IPSEC_API_SAD_FLAG_NONE",
- 1: "IPSEC_API_SAD_FLAG_USE_ESN",
- 2: "IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY",
- 4: "IPSEC_API_SAD_FLAG_IS_TUNNEL",
- 8: "IPSEC_API_SAD_FLAG_IS_TUNNEL_V6",
- 16: "IPSEC_API_SAD_FLAG_UDP_ENCAP",
- }
- IpsecSadFlags_value = map[string]uint32{
- "IPSEC_API_SAD_FLAG_NONE": 0,
- "IPSEC_API_SAD_FLAG_USE_ESN": 1,
- "IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY": 2,
- "IPSEC_API_SAD_FLAG_IS_TUNNEL": 4,
- "IPSEC_API_SAD_FLAG_IS_TUNNEL_V6": 8,
- "IPSEC_API_SAD_FLAG_UDP_ENCAP": 16,
- }
-)
-
-func (x IpsecSadFlags) String() string {
- s, ok := IpsecSadFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IpsecSadFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IpsecSadFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IpsecSadEntry defines type 'ipsec_sad_entry'.
-type IpsecSadEntry struct {
- SadID uint32 `binapi:"u32,name=sad_id" json:"sad_id,omitempty"`
- Spi uint32 `binapi:"u32,name=spi" json:"spi,omitempty"`
- Protocol IpsecProto `binapi:"ipsec_proto,name=protocol" json:"protocol,omitempty"`
- CryptoAlgorithm IpsecCryptoAlg `binapi:"ipsec_crypto_alg,name=crypto_algorithm" json:"crypto_algorithm,omitempty"`
- CryptoKey Key `binapi:"key,name=crypto_key" json:"crypto_key,omitempty"`
- IntegrityAlgorithm IpsecIntegAlg `binapi:"ipsec_integ_alg,name=integrity_algorithm" json:"integrity_algorithm,omitempty"`
- IntegrityKey Key `binapi:"key,name=integrity_key" json:"integrity_key,omitempty"`
- Flags IpsecSadFlags `binapi:"ipsec_sad_flags,name=flags" json:"flags,omitempty"`
- TunnelSrc Address `binapi:"address,name=tunnel_src" json:"tunnel_src,omitempty"`
- TunnelDst Address `binapi:"address,name=tunnel_dst" json:"tunnel_dst,omitempty"`
- TxTableID uint32 `binapi:"u32,name=tx_table_id" json:"tx_table_id,omitempty"`
- Salt uint32 `binapi:"u32,name=salt" json:"salt,omitempty"`
-}
-
-// Key defines type 'key'.
-type Key struct {
- Length uint8 `binapi:"u8,name=length" json:"length,omitempty"`
- Data []byte `binapi:"u8[128],name=data" json:"data,omitempty"`
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
diff --git a/internal/testbinapi/binapi2001/l2/l2.ba.go b/internal/testbinapi/binapi2001/l2/l2.ba.go
deleted file mode 100644
index 9eee598..0000000
--- a/internal/testbinapi/binapi2001/l2/l2.ba.go
+++ /dev/null
@@ -1,3285 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/l2.api.json
-
-// Package l2 contains generated bindings for API file l2.api.
-//
-// Contents:
-// 7 aliases
-// 12 enums
-// 9 structs
-// 1 union
-// 54 messages
-//
-package l2
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "l2"
- APIVersion = "2.2.2"
- VersionCrc = 0x2e148df3
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// BdFlags defines enum 'bd_flags'.
-type BdFlags uint32
-
-const (
- BRIDGE_API_FLAG_NONE BdFlags = 0
- BRIDGE_API_FLAG_LEARN BdFlags = 1
- BRIDGE_API_FLAG_FWD BdFlags = 2
- BRIDGE_API_FLAG_FLOOD BdFlags = 4
- BRIDGE_API_FLAG_UU_FLOOD BdFlags = 8
- BRIDGE_API_FLAG_ARP_TERM BdFlags = 16
- BRIDGE_API_FLAG_ARP_UFWD BdFlags = 32
-)
-
-var (
- BdFlags_name = map[uint32]string{
- 0: "BRIDGE_API_FLAG_NONE",
- 1: "BRIDGE_API_FLAG_LEARN",
- 2: "BRIDGE_API_FLAG_FWD",
- 4: "BRIDGE_API_FLAG_FLOOD",
- 8: "BRIDGE_API_FLAG_UU_FLOOD",
- 16: "BRIDGE_API_FLAG_ARP_TERM",
- 32: "BRIDGE_API_FLAG_ARP_UFWD",
- }
- BdFlags_value = map[string]uint32{
- "BRIDGE_API_FLAG_NONE": 0,
- "BRIDGE_API_FLAG_LEARN": 1,
- "BRIDGE_API_FLAG_FWD": 2,
- "BRIDGE_API_FLAG_FLOOD": 4,
- "BRIDGE_API_FLAG_UU_FLOOD": 8,
- "BRIDGE_API_FLAG_ARP_TERM": 16,
- "BRIDGE_API_FLAG_ARP_UFWD": 32,
- }
-)
-
-func (x BdFlags) String() string {
- s, ok := BdFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := BdFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "BdFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// L2PortType defines enum 'l2_port_type'.
-type L2PortType uint32
-
-const (
- L2_API_PORT_TYPE_NORMAL L2PortType = 0
- L2_API_PORT_TYPE_BVI L2PortType = 1
- L2_API_PORT_TYPE_UU_FWD L2PortType = 2
-)
-
-var (
- L2PortType_name = map[uint32]string{
- 0: "L2_API_PORT_TYPE_NORMAL",
- 1: "L2_API_PORT_TYPE_BVI",
- 2: "L2_API_PORT_TYPE_UU_FWD",
- }
- L2PortType_value = map[string]uint32{
- "L2_API_PORT_TYPE_NORMAL": 0,
- "L2_API_PORT_TYPE_BVI": 1,
- "L2_API_PORT_TYPE_UU_FWD": 2,
- }
-)
-
-func (x L2PortType) String() string {
- s, ok := L2PortType_name[uint32(x)]
- if ok {
- return s
- }
- return "L2PortType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// MacAddress defines alias 'mac_address'.
-type MacAddress [6]uint8
-
-func ParseMacAddress(s string) (MacAddress, error) {
- var macaddr MacAddress
- mac, err := net.ParseMAC(s)
- if err != nil {
- return macaddr, err
- }
- copy(macaddr[:], mac[:])
- return macaddr, nil
-}
-
-func (x MacAddress) ToMAC() net.HardwareAddr {
- return net.HardwareAddr(x[:])
-}
-
-func (x MacAddress) String() string {
- return x.ToMAC().String()
-}
-
-func (x *MacAddress) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *MacAddress) UnmarshalText(text []byte) error {
- mac, err := ParseMacAddress(string(text))
- if err != nil {
- return err
- }
- *x = mac
- return nil
-}
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// BdIPMac defines type 'bd_ip_mac'.
-type BdIPMac struct {
- BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
- IP Address `binapi:"address,name=ip" json:"ip,omitempty"`
- Mac MacAddress `binapi:"mac_address,name=mac" json:"mac,omitempty"`
-}
-
-// BridgeDomainSwIf defines type 'bridge_domain_sw_if'.
-type BridgeDomainSwIf struct {
- Context uint32 `binapi:"u32,name=context" json:"context,omitempty"`
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- Shg uint8 `binapi:"u8,name=shg" json:"shg,omitempty"`
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// MacEntry defines type 'mac_entry'.
-type MacEntry struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- MacAddr []byte `binapi:"u8[6],name=mac_addr" json:"mac_addr,omitempty"`
- Action uint8 `binapi:"u8,name=action" json:"action,omitempty"`
- Flags uint8 `binapi:"u8,name=flags" json:"flags,omitempty"`
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
-
-// BdIPMacAddDel defines message 'bd_ip_mac_add_del'.
-type BdIPMacAddDel struct {
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
- Entry BdIPMac `binapi:"bd_ip_mac,name=entry" json:"entry,omitempty"`
-}
-
-func (m *BdIPMacAddDel) Reset() { *m = BdIPMacAddDel{} }
-func (*BdIPMacAddDel) GetMessageName() string { return "bd_ip_mac_add_del" }
-func (*BdIPMacAddDel) GetCrcString() string { return "25bf4063" }
-func (*BdIPMacAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BdIPMacAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 4 // m.Entry.BdID
- size += 4 // m.Entry.IP.Af
- size += 1 * 16 // m.Entry.IP.Un
- size += 1 * 6 // m.Entry.Mac
- return size
-}
-func (m *BdIPMacAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsAdd)
- buf.EncodeUint32(m.Entry.BdID)
- buf.EncodeUint32(uint32(m.Entry.IP.Af))
- buf.EncodeBytes(m.Entry.IP.Un.XXX_UnionData[:], 16)
- buf.EncodeBytes(m.Entry.Mac[:], 6)
- return buf.Bytes(), nil
-}
-func (m *BdIPMacAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeUint8()
- m.Entry.BdID = buf.DecodeUint32()
- m.Entry.IP.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Entry.IP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- copy(m.Entry.Mac[:], buf.DecodeBytes(6))
- return nil
-}
-
-// BdIPMacAddDelReply defines message 'bd_ip_mac_add_del_reply'.
-type BdIPMacAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *BdIPMacAddDelReply) Reset() { *m = BdIPMacAddDelReply{} }
-func (*BdIPMacAddDelReply) GetMessageName() string { return "bd_ip_mac_add_del_reply" }
-func (*BdIPMacAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*BdIPMacAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BdIPMacAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *BdIPMacAddDelReply) 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 *BdIPMacAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// BdIPMacDetails defines message 'bd_ip_mac_details'.
-type BdIPMacDetails struct {
- Entry BdIPMac `binapi:"bd_ip_mac,name=entry" json:"entry,omitempty"`
-}
-
-func (m *BdIPMacDetails) Reset() { *m = BdIPMacDetails{} }
-func (*BdIPMacDetails) GetMessageName() string { return "bd_ip_mac_details" }
-func (*BdIPMacDetails) GetCrcString() string { return "a52f8044" }
-func (*BdIPMacDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BdIPMacDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Entry.BdID
- size += 4 // m.Entry.IP.Af
- size += 1 * 16 // m.Entry.IP.Un
- size += 1 * 6 // m.Entry.Mac
- return size
-}
-func (m *BdIPMacDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Entry.BdID)
- buf.EncodeUint32(uint32(m.Entry.IP.Af))
- buf.EncodeBytes(m.Entry.IP.Un.XXX_UnionData[:], 16)
- buf.EncodeBytes(m.Entry.Mac[:], 6)
- return buf.Bytes(), nil
-}
-func (m *BdIPMacDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Entry.BdID = buf.DecodeUint32()
- m.Entry.IP.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Entry.IP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- copy(m.Entry.Mac[:], buf.DecodeBytes(6))
- return nil
-}
-
-// BdIPMacDump defines message 'bd_ip_mac_dump'.
-type BdIPMacDump struct {
- BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
-}
-
-func (m *BdIPMacDump) Reset() { *m = BdIPMacDump{} }
-func (*BdIPMacDump) GetMessageName() string { return "bd_ip_mac_dump" }
-func (*BdIPMacDump) GetCrcString() string { return "c25fdce6" }
-func (*BdIPMacDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BdIPMacDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.BdID
- return size
-}
-func (m *BdIPMacDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.BdID)
- return buf.Bytes(), nil
-}
-func (m *BdIPMacDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.BdID = buf.DecodeUint32()
- return nil
-}
-
-// BdIPMacFlush defines message 'bd_ip_mac_flush'.
-type BdIPMacFlush struct {
- BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
-}
-
-func (m *BdIPMacFlush) Reset() { *m = BdIPMacFlush{} }
-func (*BdIPMacFlush) GetMessageName() string { return "bd_ip_mac_flush" }
-func (*BdIPMacFlush) GetCrcString() string { return "c25fdce6" }
-func (*BdIPMacFlush) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BdIPMacFlush) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.BdID
- return size
-}
-func (m *BdIPMacFlush) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.BdID)
- return buf.Bytes(), nil
-}
-func (m *BdIPMacFlush) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.BdID = buf.DecodeUint32()
- return nil
-}
-
-// BdIPMacFlushReply defines message 'bd_ip_mac_flush_reply'.
-type BdIPMacFlushReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *BdIPMacFlushReply) Reset() { *m = BdIPMacFlushReply{} }
-func (*BdIPMacFlushReply) GetMessageName() string { return "bd_ip_mac_flush_reply" }
-func (*BdIPMacFlushReply) GetCrcString() string { return "e8d4e804" }
-func (*BdIPMacFlushReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BdIPMacFlushReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *BdIPMacFlushReply) 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 *BdIPMacFlushReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// BridgeDomainAddDel defines message 'bridge_domain_add_del'.
-type BridgeDomainAddDel struct {
- BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
- Flood uint8 `binapi:"u8,name=flood" json:"flood,omitempty"`
- UuFlood uint8 `binapi:"u8,name=uu_flood" json:"uu_flood,omitempty"`
- Forward uint8 `binapi:"u8,name=forward" json:"forward,omitempty"`
- Learn uint8 `binapi:"u8,name=learn" json:"learn,omitempty"`
- ArpTerm uint8 `binapi:"u8,name=arp_term" json:"arp_term,omitempty"`
- ArpUfwd uint8 `binapi:"u8,name=arp_ufwd" json:"arp_ufwd,omitempty"`
- MacAge uint8 `binapi:"u8,name=mac_age" json:"mac_age,omitempty"`
- BdTag []byte `binapi:"u8[64],name=bd_tag" json:"bd_tag,omitempty"`
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
-}
-
-func (m *BridgeDomainAddDel) Reset() { *m = BridgeDomainAddDel{} }
-func (*BridgeDomainAddDel) GetMessageName() string { return "bridge_domain_add_del" }
-func (*BridgeDomainAddDel) GetCrcString() string { return "c6360720" }
-func (*BridgeDomainAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BridgeDomainAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.BdID
- size += 1 // m.Flood
- size += 1 // m.UuFlood
- size += 1 // m.Forward
- size += 1 // m.Learn
- size += 1 // m.ArpTerm
- size += 1 // m.ArpUfwd
- size += 1 // m.MacAge
- size += 1 * 64 // m.BdTag
- size += 1 // m.IsAdd
- return size
-}
-func (m *BridgeDomainAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.BdID)
- buf.EncodeUint8(m.Flood)
- buf.EncodeUint8(m.UuFlood)
- buf.EncodeUint8(m.Forward)
- buf.EncodeUint8(m.Learn)
- buf.EncodeUint8(m.ArpTerm)
- buf.EncodeUint8(m.ArpUfwd)
- buf.EncodeUint8(m.MacAge)
- buf.EncodeBytes(m.BdTag, 64)
- buf.EncodeUint8(m.IsAdd)
- return buf.Bytes(), nil
-}
-func (m *BridgeDomainAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.BdID = buf.DecodeUint32()
- m.Flood = buf.DecodeUint8()
- m.UuFlood = buf.DecodeUint8()
- m.Forward = buf.DecodeUint8()
- m.Learn = buf.DecodeUint8()
- m.ArpTerm = buf.DecodeUint8()
- m.ArpUfwd = buf.DecodeUint8()
- m.MacAge = buf.DecodeUint8()
- m.BdTag = make([]byte, 64)
- copy(m.BdTag, buf.DecodeBytes(len(m.BdTag)))
- m.IsAdd = buf.DecodeUint8()
- return nil
-}
-
-// BridgeDomainAddDelReply defines message 'bridge_domain_add_del_reply'.
-type BridgeDomainAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *BridgeDomainAddDelReply) Reset() { *m = BridgeDomainAddDelReply{} }
-func (*BridgeDomainAddDelReply) GetMessageName() string { return "bridge_domain_add_del_reply" }
-func (*BridgeDomainAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*BridgeDomainAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BridgeDomainAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *BridgeDomainAddDelReply) 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 *BridgeDomainAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// BridgeDomainDetails defines message 'bridge_domain_details'.
-type BridgeDomainDetails struct {
- BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
- Flood uint8 `binapi:"u8,name=flood" json:"flood,omitempty"`
- UuFlood uint8 `binapi:"u8,name=uu_flood" json:"uu_flood,omitempty"`
- Forward uint8 `binapi:"u8,name=forward" json:"forward,omitempty"`
- Learn uint8 `binapi:"u8,name=learn" json:"learn,omitempty"`
- ArpTerm uint8 `binapi:"u8,name=arp_term" json:"arp_term,omitempty"`
- ArpUfwd uint8 `binapi:"u8,name=arp_ufwd" json:"arp_ufwd,omitempty"`
- MacAge uint8 `binapi:"u8,name=mac_age" json:"mac_age,omitempty"`
- BdTag []byte `binapi:"u8[64],name=bd_tag" json:"bd_tag,omitempty"`
- BviSwIfIndex uint32 `binapi:"u32,name=bvi_sw_if_index" json:"bvi_sw_if_index,omitempty"`
- UuFwdSwIfIndex uint32 `binapi:"u32,name=uu_fwd_sw_if_index" json:"uu_fwd_sw_if_index,omitempty"`
- NSwIfs uint32 `binapi:"u32,name=n_sw_ifs" json:"-"`
- SwIfDetails []BridgeDomainSwIf `binapi:"bridge_domain_sw_if[n_sw_ifs],name=sw_if_details" json:"sw_if_details,omitempty"`
-}
-
-func (m *BridgeDomainDetails) Reset() { *m = BridgeDomainDetails{} }
-func (*BridgeDomainDetails) GetMessageName() string { return "bridge_domain_details" }
-func (*BridgeDomainDetails) GetCrcString() string { return "748c854a" }
-func (*BridgeDomainDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BridgeDomainDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.BdID
- size += 1 // m.Flood
- size += 1 // m.UuFlood
- size += 1 // m.Forward
- size += 1 // m.Learn
- size += 1 // m.ArpTerm
- size += 1 // m.ArpUfwd
- size += 1 // m.MacAge
- size += 1 * 64 // m.BdTag
- size += 4 // m.BviSwIfIndex
- size += 4 // m.UuFwdSwIfIndex
- size += 4 // m.NSwIfs
- for j1 := 0; j1 < len(m.SwIfDetails); j1++ {
- var s1 BridgeDomainSwIf
- _ = s1
- if j1 < len(m.SwIfDetails) {
- s1 = m.SwIfDetails[j1]
- }
- size += 4 // s1.Context
- size += 4 // s1.SwIfIndex
- size += 1 // s1.Shg
- }
- return size
-}
-func (m *BridgeDomainDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.BdID)
- buf.EncodeUint8(m.Flood)
- buf.EncodeUint8(m.UuFlood)
- buf.EncodeUint8(m.Forward)
- buf.EncodeUint8(m.Learn)
- buf.EncodeUint8(m.ArpTerm)
- buf.EncodeUint8(m.ArpUfwd)
- buf.EncodeUint8(m.MacAge)
- buf.EncodeBytes(m.BdTag, 64)
- buf.EncodeUint32(m.BviSwIfIndex)
- buf.EncodeUint32(m.UuFwdSwIfIndex)
- buf.EncodeUint32(uint32(len(m.SwIfDetails)))
- for j0 := 0; j0 < len(m.SwIfDetails); j0++ {
- var v0 BridgeDomainSwIf // SwIfDetails
- if j0 < len(m.SwIfDetails) {
- v0 = m.SwIfDetails[j0]
- }
- buf.EncodeUint32(v0.Context)
- buf.EncodeUint32(v0.SwIfIndex)
- buf.EncodeUint8(v0.Shg)
- }
- return buf.Bytes(), nil
-}
-func (m *BridgeDomainDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.BdID = buf.DecodeUint32()
- m.Flood = buf.DecodeUint8()
- m.UuFlood = buf.DecodeUint8()
- m.Forward = buf.DecodeUint8()
- m.Learn = buf.DecodeUint8()
- m.ArpTerm = buf.DecodeUint8()
- m.ArpUfwd = buf.DecodeUint8()
- m.MacAge = buf.DecodeUint8()
- m.BdTag = make([]byte, 64)
- copy(m.BdTag, buf.DecodeBytes(len(m.BdTag)))
- m.BviSwIfIndex = buf.DecodeUint32()
- m.UuFwdSwIfIndex = buf.DecodeUint32()
- m.NSwIfs = buf.DecodeUint32()
- m.SwIfDetails = make([]BridgeDomainSwIf, m.NSwIfs)
- for j0 := 0; j0 < len(m.SwIfDetails); j0++ {
- m.SwIfDetails[j0].Context = buf.DecodeUint32()
- m.SwIfDetails[j0].SwIfIndex = buf.DecodeUint32()
- m.SwIfDetails[j0].Shg = buf.DecodeUint8()
- }
- return nil
-}
-
-// BridgeDomainDump defines message 'bridge_domain_dump'.
-type BridgeDomainDump struct {
- BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
-}
-
-func (m *BridgeDomainDump) Reset() { *m = BridgeDomainDump{} }
-func (*BridgeDomainDump) GetMessageName() string { return "bridge_domain_dump" }
-func (*BridgeDomainDump) GetCrcString() string { return "c25fdce6" }
-func (*BridgeDomainDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BridgeDomainDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.BdID
- return size
-}
-func (m *BridgeDomainDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.BdID)
- return buf.Bytes(), nil
-}
-func (m *BridgeDomainDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.BdID = buf.DecodeUint32()
- return nil
-}
-
-// BridgeDomainSetMacAge defines message 'bridge_domain_set_mac_age'.
-type BridgeDomainSetMacAge struct {
- BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
- MacAge uint8 `binapi:"u8,name=mac_age" json:"mac_age,omitempty"`
-}
-
-func (m *BridgeDomainSetMacAge) Reset() { *m = BridgeDomainSetMacAge{} }
-func (*BridgeDomainSetMacAge) GetMessageName() string { return "bridge_domain_set_mac_age" }
-func (*BridgeDomainSetMacAge) GetCrcString() string { return "b537ad7b" }
-func (*BridgeDomainSetMacAge) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BridgeDomainSetMacAge) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.BdID
- size += 1 // m.MacAge
- return size
-}
-func (m *BridgeDomainSetMacAge) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.BdID)
- buf.EncodeUint8(m.MacAge)
- return buf.Bytes(), nil
-}
-func (m *BridgeDomainSetMacAge) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.BdID = buf.DecodeUint32()
- m.MacAge = buf.DecodeUint8()
- return nil
-}
-
-// BridgeDomainSetMacAgeReply defines message 'bridge_domain_set_mac_age_reply'.
-type BridgeDomainSetMacAgeReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *BridgeDomainSetMacAgeReply) Reset() { *m = BridgeDomainSetMacAgeReply{} }
-func (*BridgeDomainSetMacAgeReply) GetMessageName() string { return "bridge_domain_set_mac_age_reply" }
-func (*BridgeDomainSetMacAgeReply) GetCrcString() string { return "e8d4e804" }
-func (*BridgeDomainSetMacAgeReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BridgeDomainSetMacAgeReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *BridgeDomainSetMacAgeReply) 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 *BridgeDomainSetMacAgeReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// BridgeFlags defines message 'bridge_flags'.
-type BridgeFlags struct {
- BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
- IsSet uint8 `binapi:"u8,name=is_set" json:"is_set,omitempty"`
- Flags BdFlags `binapi:"bd_flags,name=flags" json:"flags,omitempty"`
-}
-
-func (m *BridgeFlags) Reset() { *m = BridgeFlags{} }
-func (*BridgeFlags) GetMessageName() string { return "bridge_flags" }
-func (*BridgeFlags) GetCrcString() string { return "2eb9b76c" }
-func (*BridgeFlags) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BridgeFlags) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.BdID
- size += 1 // m.IsSet
- size += 4 // m.Flags
- return size
-}
-func (m *BridgeFlags) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.BdID)
- buf.EncodeUint8(m.IsSet)
- buf.EncodeUint32(uint32(m.Flags))
- return buf.Bytes(), nil
-}
-func (m *BridgeFlags) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.BdID = buf.DecodeUint32()
- m.IsSet = buf.DecodeUint8()
- m.Flags = BdFlags(buf.DecodeUint32())
- return nil
-}
-
-// BridgeFlagsReply defines message 'bridge_flags_reply'.
-type BridgeFlagsReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- ResultingFeatureBitmap uint32 `binapi:"u32,name=resulting_feature_bitmap" json:"resulting_feature_bitmap,omitempty"`
-}
-
-func (m *BridgeFlagsReply) Reset() { *m = BridgeFlagsReply{} }
-func (*BridgeFlagsReply) GetMessageName() string { return "bridge_flags_reply" }
-func (*BridgeFlagsReply) GetCrcString() string { return "29b2a2b3" }
-func (*BridgeFlagsReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BridgeFlagsReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.ResultingFeatureBitmap
- return size
-}
-func (m *BridgeFlagsReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.ResultingFeatureBitmap)
- return buf.Bytes(), nil
-}
-func (m *BridgeFlagsReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.ResultingFeatureBitmap = buf.DecodeUint32()
- return nil
-}
-
-// BviCreate defines message 'bvi_create'.
-type BviCreate struct {
- Mac MacAddress `binapi:"mac_address,name=mac" json:"mac,omitempty"`
- UserInstance uint32 `binapi:"u32,name=user_instance" json:"user_instance,omitempty"`
-}
-
-func (m *BviCreate) Reset() { *m = BviCreate{} }
-func (*BviCreate) GetMessageName() string { return "bvi_create" }
-func (*BviCreate) GetCrcString() string { return "f5398559" }
-func (*BviCreate) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BviCreate) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 6 // m.Mac
- size += 4 // m.UserInstance
- return size
-}
-func (m *BviCreate) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.Mac[:], 6)
- buf.EncodeUint32(m.UserInstance)
- return buf.Bytes(), nil
-}
-func (m *BviCreate) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- copy(m.Mac[:], buf.DecodeBytes(6))
- m.UserInstance = buf.DecodeUint32()
- return nil
-}
-
-// BviCreateReply defines message 'bvi_create_reply'.
-type BviCreateReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *BviCreateReply) Reset() { *m = BviCreateReply{} }
-func (*BviCreateReply) GetMessageName() string { return "bvi_create_reply" }
-func (*BviCreateReply) GetCrcString() string { return "fda5941f" }
-func (*BviCreateReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BviCreateReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *BviCreateReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.SwIfIndex)
- return buf.Bytes(), nil
-}
-func (m *BviCreateReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.SwIfIndex = buf.DecodeUint32()
- return nil
-}
-
-// BviDelete defines message 'bvi_delete'.
-type BviDelete struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *BviDelete) Reset() { *m = BviDelete{} }
-func (*BviDelete) GetMessageName() string { return "bvi_delete" }
-func (*BviDelete) GetCrcString() string { return "529cb13f" }
-func (*BviDelete) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BviDelete) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *BviDelete) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.SwIfIndex)
- return buf.Bytes(), nil
-}
-func (m *BviDelete) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = buf.DecodeUint32()
- return nil
-}
-
-// BviDeleteReply defines message 'bvi_delete_reply'.
-type BviDeleteReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *BviDeleteReply) Reset() { *m = BviDeleteReply{} }
-func (*BviDeleteReply) GetMessageName() string { return "bvi_delete_reply" }
-func (*BviDeleteReply) GetCrcString() string { return "e8d4e804" }
-func (*BviDeleteReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BviDeleteReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *BviDeleteReply) 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 *BviDeleteReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// L2ArpTermEvent defines message 'l2_arp_term_event'.
-type L2ArpTermEvent struct {
- PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
- IP Address `binapi:"address,name=ip" json:"ip,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Mac MacAddress `binapi:"mac_address,name=mac" json:"mac,omitempty"`
-}
-
-func (m *L2ArpTermEvent) Reset() { *m = L2ArpTermEvent{} }
-func (*L2ArpTermEvent) GetMessageName() string { return "l2_arp_term_event" }
-func (*L2ArpTermEvent) GetCrcString() string { return "85ff71ea" }
-func (*L2ArpTermEvent) GetMessageType() api.MessageType {
- return api.EventMessage
-}
-
-func (m *L2ArpTermEvent) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.PID
- size += 4 // m.IP.Af
- size += 1 * 16 // m.IP.Un
- size += 4 // m.SwIfIndex
- size += 1 * 6 // m.Mac
- return size
-}
-func (m *L2ArpTermEvent) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.PID)
- buf.EncodeUint32(uint32(m.IP.Af))
- buf.EncodeBytes(m.IP.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeBytes(m.Mac[:], 6)
- return buf.Bytes(), nil
-}
-func (m *L2ArpTermEvent) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.PID = buf.DecodeUint32()
- m.IP.Af = AddressFamily(buf.DecodeUint32())
- copy(m.IP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- copy(m.Mac[:], buf.DecodeBytes(6))
- return nil
-}
-
-// L2FibClearTable defines message 'l2_fib_clear_table'.
-type L2FibClearTable struct{}
-
-func (m *L2FibClearTable) Reset() { *m = L2FibClearTable{} }
-func (*L2FibClearTable) GetMessageName() string { return "l2_fib_clear_table" }
-func (*L2FibClearTable) GetCrcString() string { return "51077d14" }
-func (*L2FibClearTable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *L2FibClearTable) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *L2FibClearTable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *L2FibClearTable) Unmarshal(b []byte) error {
- return nil
-}
-
-// L2FibClearTableReply defines message 'l2_fib_clear_table_reply'.
-type L2FibClearTableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *L2FibClearTableReply) Reset() { *m = L2FibClearTableReply{} }
-func (*L2FibClearTableReply) GetMessageName() string { return "l2_fib_clear_table_reply" }
-func (*L2FibClearTableReply) GetCrcString() string { return "e8d4e804" }
-func (*L2FibClearTableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *L2FibClearTableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *L2FibClearTableReply) 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 *L2FibClearTableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// L2FibTableDetails defines message 'l2_fib_table_details'.
-type L2FibTableDetails struct {
- BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
- Mac []byte `binapi:"u8[6],name=mac" json:"mac,omitempty"`
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- StaticMac uint8 `binapi:"u8,name=static_mac" json:"static_mac,omitempty"`
- FilterMac uint8 `binapi:"u8,name=filter_mac" json:"filter_mac,omitempty"`
- BviMac uint8 `binapi:"u8,name=bvi_mac" json:"bvi_mac,omitempty"`
-}
-
-func (m *L2FibTableDetails) Reset() { *m = L2FibTableDetails{} }
-func (*L2FibTableDetails) GetMessageName() string { return "l2_fib_table_details" }
-func (*L2FibTableDetails) GetCrcString() string { return "c7392706" }
-func (*L2FibTableDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *L2FibTableDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.BdID
- size += 1 * 6 // m.Mac
- size += 4 // m.SwIfIndex
- size += 1 // m.StaticMac
- size += 1 // m.FilterMac
- size += 1 // m.BviMac
- return size
-}
-func (m *L2FibTableDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.BdID)
- buf.EncodeBytes(m.Mac, 6)
- buf.EncodeUint32(m.SwIfIndex)
- buf.EncodeUint8(m.StaticMac)
- buf.EncodeUint8(m.FilterMac)
- buf.EncodeUint8(m.BviMac)
- return buf.Bytes(), nil
-}
-func (m *L2FibTableDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.BdID = buf.DecodeUint32()
- m.Mac = make([]byte, 6)
- copy(m.Mac, buf.DecodeBytes(len(m.Mac)))
- m.SwIfIndex = buf.DecodeUint32()
- m.StaticMac = buf.DecodeUint8()
- m.FilterMac = buf.DecodeUint8()
- m.BviMac = buf.DecodeUint8()
- return nil
-}
-
-// L2FibTableDump defines message 'l2_fib_table_dump'.
-type L2FibTableDump struct {
- BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
-}
-
-func (m *L2FibTableDump) Reset() { *m = L2FibTableDump{} }
-func (*L2FibTableDump) GetMessageName() string { return "l2_fib_table_dump" }
-func (*L2FibTableDump) GetCrcString() string { return "c25fdce6" }
-func (*L2FibTableDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *L2FibTableDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.BdID
- return size
-}
-func (m *L2FibTableDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.BdID)
- return buf.Bytes(), nil
-}
-func (m *L2FibTableDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.BdID = buf.DecodeUint32()
- return nil
-}
-
-// L2Flags defines message 'l2_flags'.
-type L2Flags struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- IsSet uint8 `binapi:"u8,name=is_set" json:"is_set,omitempty"`
- FeatureBitmap uint32 `binapi:"u32,name=feature_bitmap" json:"feature_bitmap,omitempty"`
-}
-
-func (m *L2Flags) Reset() { *m = L2Flags{} }
-func (*L2Flags) GetMessageName() string { return "l2_flags" }
-func (*L2Flags) GetCrcString() string { return "0e889fb9" }
-func (*L2Flags) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *L2Flags) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.IsSet
- size += 4 // m.FeatureBitmap
- return size
-}
-func (m *L2Flags) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.SwIfIndex)
- buf.EncodeUint8(m.IsSet)
- buf.EncodeUint32(m.FeatureBitmap)
- return buf.Bytes(), nil
-}
-func (m *L2Flags) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = buf.DecodeUint32()
- m.IsSet = buf.DecodeUint8()
- m.FeatureBitmap = buf.DecodeUint32()
- return nil
-}
-
-// L2FlagsReply defines message 'l2_flags_reply'.
-type L2FlagsReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- ResultingFeatureBitmap uint32 `binapi:"u32,name=resulting_feature_bitmap" json:"resulting_feature_bitmap,omitempty"`
-}
-
-func (m *L2FlagsReply) Reset() { *m = L2FlagsReply{} }
-func (*L2FlagsReply) GetMessageName() string { return "l2_flags_reply" }
-func (*L2FlagsReply) GetCrcString() string { return "29b2a2b3" }
-func (*L2FlagsReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *L2FlagsReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.ResultingFeatureBitmap
- return size
-}
-func (m *L2FlagsReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.ResultingFeatureBitmap)
- return buf.Bytes(), nil
-}
-func (m *L2FlagsReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.ResultingFeatureBitmap = buf.DecodeUint32()
- return nil
-}
-
-// L2InterfaceEfpFilter defines message 'l2_interface_efp_filter'.
-type L2InterfaceEfpFilter struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- EnableDisable uint8 `binapi:"u8,name=enable_disable" json:"enable_disable,omitempty"`
-}
-
-func (m *L2InterfaceEfpFilter) Reset() { *m = L2InterfaceEfpFilter{} }
-func (*L2InterfaceEfpFilter) GetMessageName() string { return "l2_interface_efp_filter" }
-func (*L2InterfaceEfpFilter) GetCrcString() string { return "69d24598" }
-func (*L2InterfaceEfpFilter) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *L2InterfaceEfpFilter) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.EnableDisable
- return size
-}
-func (m *L2InterfaceEfpFilter) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.SwIfIndex)
- buf.EncodeUint8(m.EnableDisable)
- return buf.Bytes(), nil
-}
-func (m *L2InterfaceEfpFilter) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = buf.DecodeUint32()
- m.EnableDisable = buf.DecodeUint8()
- return nil
-}
-
-// L2InterfaceEfpFilterReply defines message 'l2_interface_efp_filter_reply'.
-type L2InterfaceEfpFilterReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *L2InterfaceEfpFilterReply) Reset() { *m = L2InterfaceEfpFilterReply{} }
-func (*L2InterfaceEfpFilterReply) GetMessageName() string { return "l2_interface_efp_filter_reply" }
-func (*L2InterfaceEfpFilterReply) GetCrcString() string { return "e8d4e804" }
-func (*L2InterfaceEfpFilterReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *L2InterfaceEfpFilterReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *L2InterfaceEfpFilterReply) 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 *L2InterfaceEfpFilterReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// L2InterfacePbbTagRewrite defines message 'l2_interface_pbb_tag_rewrite'.
-type L2InterfacePbbTagRewrite struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- VtrOp uint32 `binapi:"u32,name=vtr_op" json:"vtr_op,omitempty"`
- OuterTag uint16 `binapi:"u16,name=outer_tag" json:"outer_tag,omitempty"`
- BDmac []byte `binapi:"u8[6],name=b_dmac" json:"b_dmac,omitempty"`
- BSmac []byte `binapi:"u8[6],name=b_smac" json:"b_smac,omitempty"`
- BVlanid uint16 `binapi:"u16,name=b_vlanid" json:"b_vlanid,omitempty"`
- ISid uint32 `binapi:"u32,name=i_sid" json:"i_sid,omitempty"`
-}
-
-func (m *L2InterfacePbbTagRewrite) Reset() { *m = L2InterfacePbbTagRewrite{} }
-func (*L2InterfacePbbTagRewrite) GetMessageName() string { return "l2_interface_pbb_tag_rewrite" }
-func (*L2InterfacePbbTagRewrite) GetCrcString() string { return "6cf815f9" }
-func (*L2InterfacePbbTagRewrite) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *L2InterfacePbbTagRewrite) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.VtrOp
- size += 2 // m.OuterTag
- size += 1 * 6 // m.BDmac
- size += 1 * 6 // m.BSmac
- size += 2 // m.BVlanid
- size += 4 // m.ISid
- return size
-}
-func (m *L2InterfacePbbTagRewrite) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.SwIfIndex)
- buf.EncodeUint32(m.VtrOp)
- buf.EncodeUint16(m.OuterTag)
- buf.EncodeBytes(m.BDmac, 6)
- buf.EncodeBytes(m.BSmac, 6)
- buf.EncodeUint16(m.BVlanid)
- buf.EncodeUint32(m.ISid)
- return buf.Bytes(), nil
-}
-func (m *L2InterfacePbbTagRewrite) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = buf.DecodeUint32()
- m.VtrOp = buf.DecodeUint32()
- m.OuterTag = buf.DecodeUint16()
- m.BDmac = make([]byte, 6)
- copy(m.BDmac, buf.DecodeBytes(len(m.BDmac)))
- m.BSmac = make([]byte, 6)
- copy(m.BSmac, buf.DecodeBytes(len(m.BSmac)))
- m.BVlanid = buf.DecodeUint16()
- m.ISid = buf.DecodeUint32()
- return nil
-}
-
-// L2InterfacePbbTagRewriteReply defines message 'l2_interface_pbb_tag_rewrite_reply'.
-type L2InterfacePbbTagRewriteReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *L2InterfacePbbTagRewriteReply) Reset() { *m = L2InterfacePbbTagRewriteReply{} }
-func (*L2InterfacePbbTagRewriteReply) GetMessageName() string {
- return "l2_interface_pbb_tag_rewrite_reply"
-}
-func (*L2InterfacePbbTagRewriteReply) GetCrcString() string { return "e8d4e804" }
-func (*L2InterfacePbbTagRewriteReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *L2InterfacePbbTagRewriteReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *L2InterfacePbbTagRewriteReply) 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 *L2InterfacePbbTagRewriteReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// L2InterfaceVlanTagRewrite defines message 'l2_interface_vlan_tag_rewrite'.
-type L2InterfaceVlanTagRewrite struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- VtrOp uint32 `binapi:"u32,name=vtr_op" json:"vtr_op,omitempty"`
- PushDot1q uint32 `binapi:"u32,name=push_dot1q" json:"push_dot1q,omitempty"`
- Tag1 uint32 `binapi:"u32,name=tag1" json:"tag1,omitempty"`
- Tag2 uint32 `binapi:"u32,name=tag2" json:"tag2,omitempty"`
-}
-
-func (m *L2InterfaceVlanTagRewrite) Reset() { *m = L2InterfaceVlanTagRewrite{} }
-func (*L2InterfaceVlanTagRewrite) GetMessageName() string { return "l2_interface_vlan_tag_rewrite" }
-func (*L2InterfaceVlanTagRewrite) GetCrcString() string { return "b90be6b4" }
-func (*L2InterfaceVlanTagRewrite) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *L2InterfaceVlanTagRewrite) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.VtrOp
- size += 4 // m.PushDot1q
- size += 4 // m.Tag1
- size += 4 // m.Tag2
- return size
-}
-func (m *L2InterfaceVlanTagRewrite) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.SwIfIndex)
- buf.EncodeUint32(m.VtrOp)
- buf.EncodeUint32(m.PushDot1q)
- buf.EncodeUint32(m.Tag1)
- buf.EncodeUint32(m.Tag2)
- return buf.Bytes(), nil
-}
-func (m *L2InterfaceVlanTagRewrite) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = buf.DecodeUint32()
- m.VtrOp = buf.DecodeUint32()
- m.PushDot1q = buf.DecodeUint32()
- m.Tag1 = buf.DecodeUint32()
- m.Tag2 = buf.DecodeUint32()
- return nil
-}
-
-// L2InterfaceVlanTagRewriteReply defines message 'l2_interface_vlan_tag_rewrite_reply'.
-type L2InterfaceVlanTagRewriteReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *L2InterfaceVlanTagRewriteReply) Reset() { *m = L2InterfaceVlanTagRewriteReply{} }
-func (*L2InterfaceVlanTagRewriteReply) GetMessageName() string {
- return "l2_interface_vlan_tag_rewrite_reply"
-}
-func (*L2InterfaceVlanTagRewriteReply) GetCrcString() string { return "e8d4e804" }
-func (*L2InterfaceVlanTagRewriteReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *L2InterfaceVlanTagRewriteReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *L2InterfaceVlanTagRewriteReply) 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 *L2InterfaceVlanTagRewriteReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// L2MacsEvent defines message 'l2_macs_event'.
-type L2MacsEvent struct {
- PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
- NMacs uint32 `binapi:"u32,name=n_macs" json:"-"`
- Mac []MacEntry `binapi:"mac_entry[n_macs],name=mac" json:"mac,omitempty"`
-}
-
-func (m *L2MacsEvent) Reset() { *m = L2MacsEvent{} }
-func (*L2MacsEvent) GetMessageName() string { return "l2_macs_event" }
-func (*L2MacsEvent) GetCrcString() string { return "afc74a60" }
-func (*L2MacsEvent) GetMessageType() api.MessageType {
- return api.EventMessage
-}
-
-func (m *L2MacsEvent) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.PID
- size += 4 // m.NMacs
- for j1 := 0; j1 < len(m.Mac); j1++ {
- var s1 MacEntry
- _ = s1
- if j1 < len(m.Mac) {
- s1 = m.Mac[j1]
- }
- size += 4 // s1.SwIfIndex
- size += 1 * 6 // s1.MacAddr
- size += 1 // s1.Action
- size += 1 // s1.Flags
- }
- return size
-}
-func (m *L2MacsEvent) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.PID)
- buf.EncodeUint32(uint32(len(m.Mac)))
- for j0 := 0; j0 < len(m.Mac); j0++ {
- var v0 MacEntry // Mac
- if j0 < len(m.Mac) {
- v0 = m.Mac[j0]
- }
- buf.EncodeUint32(v0.SwIfIndex)
- buf.EncodeBytes(v0.MacAddr, 6)
- buf.EncodeUint8(v0.Action)
- buf.EncodeUint8(v0.Flags)
- }
- return buf.Bytes(), nil
-}
-func (m *L2MacsEvent) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.PID = buf.DecodeUint32()
- m.NMacs = buf.DecodeUint32()
- m.Mac = make([]MacEntry, m.NMacs)
- for j0 := 0; j0 < len(m.Mac); j0++ {
- m.Mac[j0].SwIfIndex = buf.DecodeUint32()
- m.Mac[j0].MacAddr = make([]byte, 6)
- copy(m.Mac[j0].MacAddr, buf.DecodeBytes(len(m.Mac[j0].MacAddr)))
- m.Mac[j0].Action = buf.DecodeUint8()
- m.Mac[j0].Flags = buf.DecodeUint8()
- }
- return nil
-}
-
-// L2PatchAddDel defines message 'l2_patch_add_del'.
-type L2PatchAddDel struct {
- RxSwIfIndex uint32 `binapi:"u32,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"`
- TxSwIfIndex uint32 `binapi:"u32,name=tx_sw_if_index" json:"tx_sw_if_index,omitempty"`
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
-}
-
-func (m *L2PatchAddDel) Reset() { *m = L2PatchAddDel{} }
-func (*L2PatchAddDel) GetMessageName() string { return "l2_patch_add_del" }
-func (*L2PatchAddDel) GetCrcString() string { return "62506e63" }
-func (*L2PatchAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *L2PatchAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.RxSwIfIndex
- size += 4 // m.TxSwIfIndex
- size += 1 // m.IsAdd
- return size
-}
-func (m *L2PatchAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.RxSwIfIndex)
- buf.EncodeUint32(m.TxSwIfIndex)
- buf.EncodeUint8(m.IsAdd)
- return buf.Bytes(), nil
-}
-func (m *L2PatchAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.RxSwIfIndex = buf.DecodeUint32()
- m.TxSwIfIndex = buf.DecodeUint32()
- m.IsAdd = buf.DecodeUint8()
- return nil
-}
-
-// L2PatchAddDelReply defines message 'l2_patch_add_del_reply'.
-type L2PatchAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *L2PatchAddDelReply) Reset() { *m = L2PatchAddDelReply{} }
-func (*L2PatchAddDelReply) GetMessageName() string { return "l2_patch_add_del_reply" }
-func (*L2PatchAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*L2PatchAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *L2PatchAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *L2PatchAddDelReply) 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 *L2PatchAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// L2XconnectDetails defines message 'l2_xconnect_details'.
-type L2XconnectDetails struct {
- RxSwIfIndex uint32 `binapi:"u32,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"`
- TxSwIfIndex uint32 `binapi:"u32,name=tx_sw_if_index" json:"tx_sw_if_index,omitempty"`
-}
-
-func (m *L2XconnectDetails) Reset() { *m = L2XconnectDetails{} }
-func (*L2XconnectDetails) GetMessageName() string { return "l2_xconnect_details" }
-func (*L2XconnectDetails) GetCrcString() string { return "722e2378" }
-func (*L2XconnectDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *L2XconnectDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.RxSwIfIndex
- size += 4 // m.TxSwIfIndex
- return size
-}
-func (m *L2XconnectDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.RxSwIfIndex)
- buf.EncodeUint32(m.TxSwIfIndex)
- return buf.Bytes(), nil
-}
-func (m *L2XconnectDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.RxSwIfIndex = buf.DecodeUint32()
- m.TxSwIfIndex = buf.DecodeUint32()
- return nil
-}
-
-// L2XconnectDump defines message 'l2_xconnect_dump'.
-type L2XconnectDump struct{}
-
-func (m *L2XconnectDump) Reset() { *m = L2XconnectDump{} }
-func (*L2XconnectDump) GetMessageName() string { return "l2_xconnect_dump" }
-func (*L2XconnectDump) GetCrcString() string { return "51077d14" }
-func (*L2XconnectDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *L2XconnectDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *L2XconnectDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *L2XconnectDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// L2fibAddDel defines message 'l2fib_add_del'.
-type L2fibAddDel struct {
- Mac []byte `binapi:"u8[6],name=mac" json:"mac,omitempty"`
- BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
- StaticMac uint8 `binapi:"u8,name=static_mac" json:"static_mac,omitempty"`
- FilterMac uint8 `binapi:"u8,name=filter_mac" json:"filter_mac,omitempty"`
- BviMac uint8 `binapi:"u8,name=bvi_mac" json:"bvi_mac,omitempty"`
-}
-
-func (m *L2fibAddDel) Reset() { *m = L2fibAddDel{} }
-func (*L2fibAddDel) GetMessageName() string { return "l2fib_add_del" }
-func (*L2fibAddDel) GetCrcString() string { return "34ced3eb" }
-func (*L2fibAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *L2fibAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 6 // m.Mac
- size += 4 // m.BdID
- size += 4 // m.SwIfIndex
- size += 1 // m.IsAdd
- size += 1 // m.StaticMac
- size += 1 // m.FilterMac
- size += 1 // m.BviMac
- return size
-}
-func (m *L2fibAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.Mac, 6)
- buf.EncodeUint32(m.BdID)
- buf.EncodeUint32(m.SwIfIndex)
- buf.EncodeUint8(m.IsAdd)
- buf.EncodeUint8(m.StaticMac)
- buf.EncodeUint8(m.FilterMac)
- buf.EncodeUint8(m.BviMac)
- return buf.Bytes(), nil
-}
-func (m *L2fibAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Mac = make([]byte, 6)
- copy(m.Mac, buf.DecodeBytes(len(m.Mac)))
- m.BdID = buf.DecodeUint32()
- m.SwIfIndex = buf.DecodeUint32()
- m.IsAdd = buf.DecodeUint8()
- m.StaticMac = buf.DecodeUint8()
- m.FilterMac = buf.DecodeUint8()
- m.BviMac = buf.DecodeUint8()
- return nil
-}
-
-// L2fibAddDelReply defines message 'l2fib_add_del_reply'.
-type L2fibAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *L2fibAddDelReply) Reset() { *m = L2fibAddDelReply{} }
-func (*L2fibAddDelReply) GetMessageName() string { return "l2fib_add_del_reply" }
-func (*L2fibAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*L2fibAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *L2fibAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *L2fibAddDelReply) 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 *L2fibAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// L2fibFlushAll defines message 'l2fib_flush_all'.
-type L2fibFlushAll struct{}
-
-func (m *L2fibFlushAll) Reset() { *m = L2fibFlushAll{} }
-func (*L2fibFlushAll) GetMessageName() string { return "l2fib_flush_all" }
-func (*L2fibFlushAll) GetCrcString() string { return "51077d14" }
-func (*L2fibFlushAll) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *L2fibFlushAll) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *L2fibFlushAll) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *L2fibFlushAll) Unmarshal(b []byte) error {
- return nil
-}
-
-// L2fibFlushAllReply defines message 'l2fib_flush_all_reply'.
-type L2fibFlushAllReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *L2fibFlushAllReply) Reset() { *m = L2fibFlushAllReply{} }
-func (*L2fibFlushAllReply) GetMessageName() string { return "l2fib_flush_all_reply" }
-func (*L2fibFlushAllReply) GetCrcString() string { return "e8d4e804" }
-func (*L2fibFlushAllReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *L2fibFlushAllReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *L2fibFlushAllReply) 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 *L2fibFlushAllReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// L2fibFlushBd defines message 'l2fib_flush_bd'.
-type L2fibFlushBd struct {
- BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
-}
-
-func (m *L2fibFlushBd) Reset() { *m = L2fibFlushBd{} }
-func (*L2fibFlushBd) GetMessageName() string { return "l2fib_flush_bd" }
-func (*L2fibFlushBd) GetCrcString() string { return "c25fdce6" }
-func (*L2fibFlushBd) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *L2fibFlushBd) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.BdID
- return size
-}
-func (m *L2fibFlushBd) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.BdID)
- return buf.Bytes(), nil
-}
-func (m *L2fibFlushBd) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.BdID = buf.DecodeUint32()
- return nil
-}
-
-// L2fibFlushBdReply defines message 'l2fib_flush_bd_reply'.
-type L2fibFlushBdReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *L2fibFlushBdReply) Reset() { *m = L2fibFlushBdReply{} }
-func (*L2fibFlushBdReply) GetMessageName() string { return "l2fib_flush_bd_reply" }
-func (*L2fibFlushBdReply) GetCrcString() string { return "e8d4e804" }
-func (*L2fibFlushBdReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *L2fibFlushBdReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *L2fibFlushBdReply) 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 *L2fibFlushBdReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// L2fibFlushInt defines message 'l2fib_flush_int'.
-type L2fibFlushInt struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *L2fibFlushInt) Reset() { *m = L2fibFlushInt{} }
-func (*L2fibFlushInt) GetMessageName() string { return "l2fib_flush_int" }
-func (*L2fibFlushInt) GetCrcString() string { return "529cb13f" }
-func (*L2fibFlushInt) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *L2fibFlushInt) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *L2fibFlushInt) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.SwIfIndex)
- return buf.Bytes(), nil
-}
-func (m *L2fibFlushInt) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = buf.DecodeUint32()
- return nil
-}
-
-// L2fibFlushIntReply defines message 'l2fib_flush_int_reply'.
-type L2fibFlushIntReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *L2fibFlushIntReply) Reset() { *m = L2fibFlushIntReply{} }
-func (*L2fibFlushIntReply) GetMessageName() string { return "l2fib_flush_int_reply" }
-func (*L2fibFlushIntReply) GetCrcString() string { return "e8d4e804" }
-func (*L2fibFlushIntReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *L2fibFlushIntReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *L2fibFlushIntReply) 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 *L2fibFlushIntReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SwInterfaceSetL2Bridge defines message 'sw_interface_set_l2_bridge'.
-type SwInterfaceSetL2Bridge struct {
- RxSwIfIndex uint32 `binapi:"u32,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"`
- BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"`
- PortType L2PortType `binapi:"l2_port_type,name=port_type" json:"port_type,omitempty"`
- Shg uint8 `binapi:"u8,name=shg" json:"shg,omitempty"`
- Enable uint8 `binapi:"u8,name=enable" json:"enable,omitempty"`
-}
-
-func (m *SwInterfaceSetL2Bridge) Reset() { *m = SwInterfaceSetL2Bridge{} }
-func (*SwInterfaceSetL2Bridge) GetMessageName() string { return "sw_interface_set_l2_bridge" }
-func (*SwInterfaceSetL2Bridge) GetCrcString() string { return "5579f809" }
-func (*SwInterfaceSetL2Bridge) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceSetL2Bridge) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.RxSwIfIndex
- size += 4 // m.BdID
- size += 4 // m.PortType
- size += 1 // m.Shg
- size += 1 // m.Enable
- return size
-}
-func (m *SwInterfaceSetL2Bridge) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.RxSwIfIndex)
- buf.EncodeUint32(m.BdID)
- buf.EncodeUint32(uint32(m.PortType))
- buf.EncodeUint8(m.Shg)
- buf.EncodeUint8(m.Enable)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceSetL2Bridge) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.RxSwIfIndex = buf.DecodeUint32()
- m.BdID = buf.DecodeUint32()
- m.PortType = L2PortType(buf.DecodeUint32())
- m.Shg = buf.DecodeUint8()
- m.Enable = buf.DecodeUint8()
- return nil
-}
-
-// SwInterfaceSetL2BridgeReply defines message 'sw_interface_set_l2_bridge_reply'.
-type SwInterfaceSetL2BridgeReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SwInterfaceSetL2BridgeReply) Reset() { *m = SwInterfaceSetL2BridgeReply{} }
-func (*SwInterfaceSetL2BridgeReply) GetMessageName() string {
- return "sw_interface_set_l2_bridge_reply"
-}
-func (*SwInterfaceSetL2BridgeReply) GetCrcString() string { return "e8d4e804" }
-func (*SwInterfaceSetL2BridgeReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SwInterfaceSetL2BridgeReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SwInterfaceSetL2BridgeReply) 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 *SwInterfaceSetL2BridgeReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SwInterfaceSetL2Xconnect defines message 'sw_interface_set_l2_xconnect'.
-type SwInterfaceSetL2Xconnect struct {
- RxSwIfIndex uint32 `binapi:"u32,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"`
- TxSwIfIndex uint32 `binapi:"u32,name=tx_sw_if_index" json:"tx_sw_if_index,omitempty"`
- Enable uint8 `binapi:"u8,name=enable" json:"enable,omitempty"`
-}
-
-func (m *SwInterfaceSetL2Xconnect) Reset() { *m = SwInterfaceSetL2Xconnect{} }
-func (*SwInterfaceSetL2Xconnect) GetMessageName() string { return "sw_interface_set_l2_xconnect" }
-func (*SwInterfaceSetL2Xconnect) GetCrcString() string { return "95de3988" }
-func (*SwInterfaceSetL2Xconnect) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceSetL2Xconnect) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.RxSwIfIndex
- size += 4 // m.TxSwIfIndex
- size += 1 // m.Enable
- return size
-}
-func (m *SwInterfaceSetL2Xconnect) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.RxSwIfIndex)
- buf.EncodeUint32(m.TxSwIfIndex)
- buf.EncodeUint8(m.Enable)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceSetL2Xconnect) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.RxSwIfIndex = buf.DecodeUint32()
- m.TxSwIfIndex = buf.DecodeUint32()
- m.Enable = buf.DecodeUint8()
- return nil
-}
-
-// SwInterfaceSetL2XconnectReply defines message 'sw_interface_set_l2_xconnect_reply'.
-type SwInterfaceSetL2XconnectReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SwInterfaceSetL2XconnectReply) Reset() { *m = SwInterfaceSetL2XconnectReply{} }
-func (*SwInterfaceSetL2XconnectReply) GetMessageName() string {
- return "sw_interface_set_l2_xconnect_reply"
-}
-func (*SwInterfaceSetL2XconnectReply) GetCrcString() string { return "e8d4e804" }
-func (*SwInterfaceSetL2XconnectReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SwInterfaceSetL2XconnectReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SwInterfaceSetL2XconnectReply) 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 *SwInterfaceSetL2XconnectReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SwInterfaceSetVpath defines message 'sw_interface_set_vpath'.
-type SwInterfaceSetVpath struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- Enable uint8 `binapi:"u8,name=enable" json:"enable,omitempty"`
-}
-
-func (m *SwInterfaceSetVpath) Reset() { *m = SwInterfaceSetVpath{} }
-func (*SwInterfaceSetVpath) GetMessageName() string { return "sw_interface_set_vpath" }
-func (*SwInterfaceSetVpath) GetCrcString() string { return "a36fadc0" }
-func (*SwInterfaceSetVpath) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceSetVpath) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.Enable
- return size
-}
-func (m *SwInterfaceSetVpath) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.SwIfIndex)
- buf.EncodeUint8(m.Enable)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceSetVpath) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = buf.DecodeUint32()
- m.Enable = buf.DecodeUint8()
- return nil
-}
-
-// SwInterfaceSetVpathReply defines message 'sw_interface_set_vpath_reply'.
-type SwInterfaceSetVpathReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SwInterfaceSetVpathReply) Reset() { *m = SwInterfaceSetVpathReply{} }
-func (*SwInterfaceSetVpathReply) GetMessageName() string { return "sw_interface_set_vpath_reply" }
-func (*SwInterfaceSetVpathReply) GetCrcString() string { return "e8d4e804" }
-func (*SwInterfaceSetVpathReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SwInterfaceSetVpathReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SwInterfaceSetVpathReply) 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 *SwInterfaceSetVpathReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// WantL2ArpTermEvents defines message 'want_l2_arp_term_events'.
-type WantL2ArpTermEvents struct {
- Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
- PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
-}
-
-func (m *WantL2ArpTermEvents) Reset() { *m = WantL2ArpTermEvents{} }
-func (*WantL2ArpTermEvents) GetMessageName() string { return "want_l2_arp_term_events" }
-func (*WantL2ArpTermEvents) GetCrcString() string { return "3ec6d6c2" }
-func (*WantL2ArpTermEvents) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *WantL2ArpTermEvents) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.Enable
- size += 4 // m.PID
- return size
-}
-func (m *WantL2ArpTermEvents) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.Enable)
- buf.EncodeUint32(m.PID)
- return buf.Bytes(), nil
-}
-func (m *WantL2ArpTermEvents) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Enable = buf.DecodeBool()
- m.PID = buf.DecodeUint32()
- return nil
-}
-
-// WantL2ArpTermEventsReply defines message 'want_l2_arp_term_events_reply'.
-type WantL2ArpTermEventsReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *WantL2ArpTermEventsReply) Reset() { *m = WantL2ArpTermEventsReply{} }
-func (*WantL2ArpTermEventsReply) GetMessageName() string { return "want_l2_arp_term_events_reply" }
-func (*WantL2ArpTermEventsReply) GetCrcString() string { return "e8d4e804" }
-func (*WantL2ArpTermEventsReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *WantL2ArpTermEventsReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *WantL2ArpTermEventsReply) 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 *WantL2ArpTermEventsReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// WantL2MacsEvents defines message 'want_l2_macs_events'.
-type WantL2MacsEvents struct {
- LearnLimit uint32 `binapi:"u32,name=learn_limit" json:"learn_limit,omitempty"`
- ScanDelay uint8 `binapi:"u8,name=scan_delay" json:"scan_delay,omitempty"`
- MaxMacsInEvent uint8 `binapi:"u8,name=max_macs_in_event" json:"max_macs_in_event,omitempty"`
- EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
- PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
-}
-
-func (m *WantL2MacsEvents) Reset() { *m = WantL2MacsEvents{} }
-func (*WantL2MacsEvents) GetMessageName() string { return "want_l2_macs_events" }
-func (*WantL2MacsEvents) GetCrcString() string { return "9aabdfde" }
-func (*WantL2MacsEvents) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *WantL2MacsEvents) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.LearnLimit
- size += 1 // m.ScanDelay
- size += 1 // m.MaxMacsInEvent
- size += 1 // m.EnableDisable
- size += 4 // m.PID
- return size
-}
-func (m *WantL2MacsEvents) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.LearnLimit)
- buf.EncodeUint8(m.ScanDelay)
- buf.EncodeUint8(m.MaxMacsInEvent)
- buf.EncodeBool(m.EnableDisable)
- buf.EncodeUint32(m.PID)
- return buf.Bytes(), nil
-}
-func (m *WantL2MacsEvents) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.LearnLimit = buf.DecodeUint32()
- m.ScanDelay = buf.DecodeUint8()
- m.MaxMacsInEvent = buf.DecodeUint8()
- m.EnableDisable = buf.DecodeBool()
- m.PID = buf.DecodeUint32()
- return nil
-}
-
-// WantL2MacsEventsReply defines message 'want_l2_macs_events_reply'.
-type WantL2MacsEventsReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *WantL2MacsEventsReply) Reset() { *m = WantL2MacsEventsReply{} }
-func (*WantL2MacsEventsReply) GetMessageName() string { return "want_l2_macs_events_reply" }
-func (*WantL2MacsEventsReply) GetCrcString() string { return "e8d4e804" }
-func (*WantL2MacsEventsReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *WantL2MacsEventsReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *WantL2MacsEventsReply) 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 *WantL2MacsEventsReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_l2_binapi_init() }
-func file_l2_binapi_init() {
- api.RegisterMessage((*BdIPMacAddDel)(nil), "bd_ip_mac_add_del_25bf4063")
- api.RegisterMessage((*BdIPMacAddDelReply)(nil), "bd_ip_mac_add_del_reply_e8d4e804")
- api.RegisterMessage((*BdIPMacDetails)(nil), "bd_ip_mac_details_a52f8044")
- api.RegisterMessage((*BdIPMacDump)(nil), "bd_ip_mac_dump_c25fdce6")
- api.RegisterMessage((*BdIPMacFlush)(nil), "bd_ip_mac_flush_c25fdce6")
- api.RegisterMessage((*BdIPMacFlushReply)(nil), "bd_ip_mac_flush_reply_e8d4e804")
- api.RegisterMessage((*BridgeDomainAddDel)(nil), "bridge_domain_add_del_c6360720")
- api.RegisterMessage((*BridgeDomainAddDelReply)(nil), "bridge_domain_add_del_reply_e8d4e804")
- api.RegisterMessage((*BridgeDomainDetails)(nil), "bridge_domain_details_748c854a")
- api.RegisterMessage((*BridgeDomainDump)(nil), "bridge_domain_dump_c25fdce6")
- api.RegisterMessage((*BridgeDomainSetMacAge)(nil), "bridge_domain_set_mac_age_b537ad7b")
- api.RegisterMessage((*BridgeDomainSetMacAgeReply)(nil), "bridge_domain_set_mac_age_reply_e8d4e804")
- api.RegisterMessage((*BridgeFlags)(nil), "bridge_flags_2eb9b76c")
- api.RegisterMessage((*BridgeFlagsReply)(nil), "bridge_flags_reply_29b2a2b3")
- api.RegisterMessage((*BviCreate)(nil), "bvi_create_f5398559")
- api.RegisterMessage((*BviCreateReply)(nil), "bvi_create_reply_fda5941f")
- api.RegisterMessage((*BviDelete)(nil), "bvi_delete_529cb13f")
- api.RegisterMessage((*BviDeleteReply)(nil), "bvi_delete_reply_e8d4e804")
- api.RegisterMessage((*L2ArpTermEvent)(nil), "l2_arp_term_event_85ff71ea")
- api.RegisterMessage((*L2FibClearTable)(nil), "l2_fib_clear_table_51077d14")
- api.RegisterMessage((*L2FibClearTableReply)(nil), "l2_fib_clear_table_reply_e8d4e804")
- api.RegisterMessage((*L2FibTableDetails)(nil), "l2_fib_table_details_c7392706")
- api.RegisterMessage((*L2FibTableDump)(nil), "l2_fib_table_dump_c25fdce6")
- api.RegisterMessage((*L2Flags)(nil), "l2_flags_0e889fb9")
- api.RegisterMessage((*L2FlagsReply)(nil), "l2_flags_reply_29b2a2b3")
- api.RegisterMessage((*L2InterfaceEfpFilter)(nil), "l2_interface_efp_filter_69d24598")
- api.RegisterMessage((*L2InterfaceEfpFilterReply)(nil), "l2_interface_efp_filter_reply_e8d4e804")
- api.RegisterMessage((*L2InterfacePbbTagRewrite)(nil), "l2_interface_pbb_tag_rewrite_6cf815f9")
- api.RegisterMessage((*L2InterfacePbbTagRewriteReply)(nil), "l2_interface_pbb_tag_rewrite_reply_e8d4e804")
- api.RegisterMessage((*L2InterfaceVlanTagRewrite)(nil), "l2_interface_vlan_tag_rewrite_b90be6b4")
- api.RegisterMessage((*L2InterfaceVlanTagRewriteReply)(nil), "l2_interface_vlan_tag_rewrite_reply_e8d4e804")
- api.RegisterMessage((*L2MacsEvent)(nil), "l2_macs_event_afc74a60")
- api.RegisterMessage((*L2PatchAddDel)(nil), "l2_patch_add_del_62506e63")
- api.RegisterMessage((*L2PatchAddDelReply)(nil), "l2_patch_add_del_reply_e8d4e804")
- api.RegisterMessage((*L2XconnectDetails)(nil), "l2_xconnect_details_722e2378")
- api.RegisterMessage((*L2XconnectDump)(nil), "l2_xconnect_dump_51077d14")
- api.RegisterMessage((*L2fibAddDel)(nil), "l2fib_add_del_34ced3eb")
- api.RegisterMessage((*L2fibAddDelReply)(nil), "l2fib_add_del_reply_e8d4e804")
- api.RegisterMessage((*L2fibFlushAll)(nil), "l2fib_flush_all_51077d14")
- api.RegisterMessage((*L2fibFlushAllReply)(nil), "l2fib_flush_all_reply_e8d4e804")
- api.RegisterMessage((*L2fibFlushBd)(nil), "l2fib_flush_bd_c25fdce6")
- api.RegisterMessage((*L2fibFlushBdReply)(nil), "l2fib_flush_bd_reply_e8d4e804")
- api.RegisterMessage((*L2fibFlushInt)(nil), "l2fib_flush_int_529cb13f")
- api.RegisterMessage((*L2fibFlushIntReply)(nil), "l2fib_flush_int_reply_e8d4e804")
- api.RegisterMessage((*SwInterfaceSetL2Bridge)(nil), "sw_interface_set_l2_bridge_5579f809")
- api.RegisterMessage((*SwInterfaceSetL2BridgeReply)(nil), "sw_interface_set_l2_bridge_reply_e8d4e804")
- api.RegisterMessage((*SwInterfaceSetL2Xconnect)(nil), "sw_interface_set_l2_xconnect_95de3988")
- api.RegisterMessage((*SwInterfaceSetL2XconnectReply)(nil), "sw_interface_set_l2_xconnect_reply_e8d4e804")
- api.RegisterMessage((*SwInterfaceSetVpath)(nil), "sw_interface_set_vpath_a36fadc0")
- api.RegisterMessage((*SwInterfaceSetVpathReply)(nil), "sw_interface_set_vpath_reply_e8d4e804")
- api.RegisterMessage((*WantL2ArpTermEvents)(nil), "want_l2_arp_term_events_3ec6d6c2")
- api.RegisterMessage((*WantL2ArpTermEventsReply)(nil), "want_l2_arp_term_events_reply_e8d4e804")
- api.RegisterMessage((*WantL2MacsEvents)(nil), "want_l2_macs_events_9aabdfde")
- api.RegisterMessage((*WantL2MacsEventsReply)(nil), "want_l2_macs_events_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*BdIPMacAddDel)(nil),
- (*BdIPMacAddDelReply)(nil),
- (*BdIPMacDetails)(nil),
- (*BdIPMacDump)(nil),
- (*BdIPMacFlush)(nil),
- (*BdIPMacFlushReply)(nil),
- (*BridgeDomainAddDel)(nil),
- (*BridgeDomainAddDelReply)(nil),
- (*BridgeDomainDetails)(nil),
- (*BridgeDomainDump)(nil),
- (*BridgeDomainSetMacAge)(nil),
- (*BridgeDomainSetMacAgeReply)(nil),
- (*BridgeFlags)(nil),
- (*BridgeFlagsReply)(nil),
- (*BviCreate)(nil),
- (*BviCreateReply)(nil),
- (*BviDelete)(nil),
- (*BviDeleteReply)(nil),
- (*L2ArpTermEvent)(nil),
- (*L2FibClearTable)(nil),
- (*L2FibClearTableReply)(nil),
- (*L2FibTableDetails)(nil),
- (*L2FibTableDump)(nil),
- (*L2Flags)(nil),
- (*L2FlagsReply)(nil),
- (*L2InterfaceEfpFilter)(nil),
- (*L2InterfaceEfpFilterReply)(nil),
- (*L2InterfacePbbTagRewrite)(nil),
- (*L2InterfacePbbTagRewriteReply)(nil),
- (*L2InterfaceVlanTagRewrite)(nil),
- (*L2InterfaceVlanTagRewriteReply)(nil),
- (*L2MacsEvent)(nil),
- (*L2PatchAddDel)(nil),
- (*L2PatchAddDelReply)(nil),
- (*L2XconnectDetails)(nil),
- (*L2XconnectDump)(nil),
- (*L2fibAddDel)(nil),
- (*L2fibAddDelReply)(nil),
- (*L2fibFlushAll)(nil),
- (*L2fibFlushAllReply)(nil),
- (*L2fibFlushBd)(nil),
- (*L2fibFlushBdReply)(nil),
- (*L2fibFlushInt)(nil),
- (*L2fibFlushIntReply)(nil),
- (*SwInterfaceSetL2Bridge)(nil),
- (*SwInterfaceSetL2BridgeReply)(nil),
- (*SwInterfaceSetL2Xconnect)(nil),
- (*SwInterfaceSetL2XconnectReply)(nil),
- (*SwInterfaceSetVpath)(nil),
- (*SwInterfaceSetVpathReply)(nil),
- (*WantL2ArpTermEvents)(nil),
- (*WantL2ArpTermEventsReply)(nil),
- (*WantL2MacsEvents)(nil),
- (*WantL2MacsEventsReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/l2/l2_rpc.ba.go b/internal/testbinapi/binapi2001/l2/l2_rpc.ba.go
deleted file mode 100644
index 106ca97..0000000
--- a/internal/testbinapi/binapi2001/l2/l2_rpc.ba.go
+++ /dev/null
@@ -1,420 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package l2
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service l2.
-type RPCService interface {
- BdIPMacAddDel(ctx context.Context, in *BdIPMacAddDel) (*BdIPMacAddDelReply, error)
- BdIPMacDump(ctx context.Context, in *BdIPMacDump) (RPCService_BdIPMacDumpClient, error)
- BdIPMacFlush(ctx context.Context, in *BdIPMacFlush) (*BdIPMacFlushReply, error)
- BridgeDomainAddDel(ctx context.Context, in *BridgeDomainAddDel) (*BridgeDomainAddDelReply, error)
- BridgeDomainDump(ctx context.Context, in *BridgeDomainDump) (RPCService_BridgeDomainDumpClient, error)
- BridgeDomainSetMacAge(ctx context.Context, in *BridgeDomainSetMacAge) (*BridgeDomainSetMacAgeReply, error)
- BridgeFlags(ctx context.Context, in *BridgeFlags) (*BridgeFlagsReply, error)
- BviCreate(ctx context.Context, in *BviCreate) (*BviCreateReply, error)
- BviDelete(ctx context.Context, in *BviDelete) (*BviDeleteReply, error)
- L2FibClearTable(ctx context.Context, in *L2FibClearTable) (*L2FibClearTableReply, error)
- L2FibTableDump(ctx context.Context, in *L2FibTableDump) (RPCService_L2FibTableDumpClient, error)
- L2Flags(ctx context.Context, in *L2Flags) (*L2FlagsReply, error)
- L2InterfaceEfpFilter(ctx context.Context, in *L2InterfaceEfpFilter) (*L2InterfaceEfpFilterReply, error)
- L2InterfacePbbTagRewrite(ctx context.Context, in *L2InterfacePbbTagRewrite) (*L2InterfacePbbTagRewriteReply, error)
- L2InterfaceVlanTagRewrite(ctx context.Context, in *L2InterfaceVlanTagRewrite) (*L2InterfaceVlanTagRewriteReply, error)
- L2PatchAddDel(ctx context.Context, in *L2PatchAddDel) (*L2PatchAddDelReply, error)
- L2XconnectDump(ctx context.Context, in *L2XconnectDump) (RPCService_L2XconnectDumpClient, error)
- L2fibAddDel(ctx context.Context, in *L2fibAddDel) (*L2fibAddDelReply, error)
- L2fibFlushAll(ctx context.Context, in *L2fibFlushAll) (*L2fibFlushAllReply, error)
- L2fibFlushBd(ctx context.Context, in *L2fibFlushBd) (*L2fibFlushBdReply, error)
- L2fibFlushInt(ctx context.Context, in *L2fibFlushInt) (*L2fibFlushIntReply, error)
- SwInterfaceSetL2Bridge(ctx context.Context, in *SwInterfaceSetL2Bridge) (*SwInterfaceSetL2BridgeReply, error)
- SwInterfaceSetL2Xconnect(ctx context.Context, in *SwInterfaceSetL2Xconnect) (*SwInterfaceSetL2XconnectReply, error)
- SwInterfaceSetVpath(ctx context.Context, in *SwInterfaceSetVpath) (*SwInterfaceSetVpathReply, error)
- WantL2ArpTermEvents(ctx context.Context, in *WantL2ArpTermEvents) (*WantL2ArpTermEventsReply, error)
- WantL2MacsEvents(ctx context.Context, in *WantL2MacsEvents) (*WantL2MacsEventsReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) BdIPMacAddDel(ctx context.Context, in *BdIPMacAddDel) (*BdIPMacAddDelReply, error) {
- out := new(BdIPMacAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) BdIPMacDump(ctx context.Context, in *BdIPMacDump) (RPCService_BdIPMacDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_BdIPMacDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_BdIPMacDumpClient interface {
- Recv() (*BdIPMacDetails, error)
- api.Stream
-}
-
-type serviceClient_BdIPMacDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_BdIPMacDumpClient) Recv() (*BdIPMacDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *BdIPMacDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) BdIPMacFlush(ctx context.Context, in *BdIPMacFlush) (*BdIPMacFlushReply, error) {
- out := new(BdIPMacFlushReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) BridgeDomainAddDel(ctx context.Context, in *BridgeDomainAddDel) (*BridgeDomainAddDelReply, error) {
- out := new(BridgeDomainAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) BridgeDomainDump(ctx context.Context, in *BridgeDomainDump) (RPCService_BridgeDomainDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_BridgeDomainDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_BridgeDomainDumpClient interface {
- Recv() (*BridgeDomainDetails, error)
- api.Stream
-}
-
-type serviceClient_BridgeDomainDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_BridgeDomainDumpClient) Recv() (*BridgeDomainDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *BridgeDomainDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) BridgeDomainSetMacAge(ctx context.Context, in *BridgeDomainSetMacAge) (*BridgeDomainSetMacAgeReply, error) {
- out := new(BridgeDomainSetMacAgeReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) BridgeFlags(ctx context.Context, in *BridgeFlags) (*BridgeFlagsReply, error) {
- out := new(BridgeFlagsReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) BviCreate(ctx context.Context, in *BviCreate) (*BviCreateReply, error) {
- out := new(BviCreateReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) BviDelete(ctx context.Context, in *BviDelete) (*BviDeleteReply, error) {
- out := new(BviDeleteReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) L2FibClearTable(ctx context.Context, in *L2FibClearTable) (*L2FibClearTableReply, error) {
- out := new(L2FibClearTableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) L2FibTableDump(ctx context.Context, in *L2FibTableDump) (RPCService_L2FibTableDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_L2FibTableDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_L2FibTableDumpClient interface {
- Recv() (*L2FibTableDetails, error)
- api.Stream
-}
-
-type serviceClient_L2FibTableDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_L2FibTableDumpClient) Recv() (*L2FibTableDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *L2FibTableDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) L2Flags(ctx context.Context, in *L2Flags) (*L2FlagsReply, error) {
- out := new(L2FlagsReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) L2InterfaceEfpFilter(ctx context.Context, in *L2InterfaceEfpFilter) (*L2InterfaceEfpFilterReply, error) {
- out := new(L2InterfaceEfpFilterReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) L2InterfacePbbTagRewrite(ctx context.Context, in *L2InterfacePbbTagRewrite) (*L2InterfacePbbTagRewriteReply, error) {
- out := new(L2InterfacePbbTagRewriteReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) L2InterfaceVlanTagRewrite(ctx context.Context, in *L2InterfaceVlanTagRewrite) (*L2InterfaceVlanTagRewriteReply, error) {
- out := new(L2InterfaceVlanTagRewriteReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) L2PatchAddDel(ctx context.Context, in *L2PatchAddDel) (*L2PatchAddDelReply, error) {
- out := new(L2PatchAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) L2XconnectDump(ctx context.Context, in *L2XconnectDump) (RPCService_L2XconnectDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_L2XconnectDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_L2XconnectDumpClient interface {
- Recv() (*L2XconnectDetails, error)
- api.Stream
-}
-
-type serviceClient_L2XconnectDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_L2XconnectDumpClient) Recv() (*L2XconnectDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *L2XconnectDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) L2fibAddDel(ctx context.Context, in *L2fibAddDel) (*L2fibAddDelReply, error) {
- out := new(L2fibAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) L2fibFlushAll(ctx context.Context, in *L2fibFlushAll) (*L2fibFlushAllReply, error) {
- out := new(L2fibFlushAllReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) L2fibFlushBd(ctx context.Context, in *L2fibFlushBd) (*L2fibFlushBdReply, error) {
- out := new(L2fibFlushBdReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) L2fibFlushInt(ctx context.Context, in *L2fibFlushInt) (*L2fibFlushIntReply, error) {
- out := new(L2fibFlushIntReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SwInterfaceSetL2Bridge(ctx context.Context, in *SwInterfaceSetL2Bridge) (*SwInterfaceSetL2BridgeReply, error) {
- out := new(SwInterfaceSetL2BridgeReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SwInterfaceSetL2Xconnect(ctx context.Context, in *SwInterfaceSetL2Xconnect) (*SwInterfaceSetL2XconnectReply, error) {
- out := new(SwInterfaceSetL2XconnectReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SwInterfaceSetVpath(ctx context.Context, in *SwInterfaceSetVpath) (*SwInterfaceSetVpathReply, error) {
- out := new(SwInterfaceSetVpathReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) WantL2ArpTermEvents(ctx context.Context, in *WantL2ArpTermEvents) (*WantL2ArpTermEventsReply, error) {
- out := new(WantL2ArpTermEventsReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) WantL2MacsEvents(ctx context.Context, in *WantL2MacsEvents) (*WantL2MacsEventsReply, error) {
- out := new(WantL2MacsEventsReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/l2e/l2e.ba.go b/internal/testbinapi/binapi2001/l2e/l2e.ba.go
deleted file mode 100644
index ef750b9..0000000
--- a/internal/testbinapi/binapi2001/l2e/l2e.ba.go
+++ /dev/null
@@ -1,371 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/plugins/l2e.api.json
-
-// Package l2e contains generated bindings for API file l2e.api.
-//
-// Contents:
-// 1 alias
-// 6 enums
-// 2 messages
-//
-package l2e
-
-import (
- "strconv"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the GoVPP api package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// GoVPP api package needs to be updated.
-const _ = api.GoVppAPIPackageIsVersion2
-
-const (
- APIFile = "l2e"
- APIVersion = "1.0.0"
- VersionCrc = 0x541d3edd
-)
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// L2Emulation defines message 'l2_emulation'.
-type L2Emulation struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
-}
-
-func (m *L2Emulation) Reset() { *m = L2Emulation{} }
-func (*L2Emulation) GetMessageName() string { return "l2_emulation" }
-func (*L2Emulation) GetCrcString() string { return "ae6cfcfb" }
-func (*L2Emulation) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *L2Emulation) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.Enable
- return size
-}
-func (m *L2Emulation) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeBool(m.Enable)
- return buf.Bytes(), nil
-}
-func (m *L2Emulation) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Enable = buf.DecodeBool()
- return nil
-}
-
-// L2EmulationReply defines message 'l2_emulation_reply'.
-type L2EmulationReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *L2EmulationReply) Reset() { *m = L2EmulationReply{} }
-func (*L2EmulationReply) GetMessageName() string { return "l2_emulation_reply" }
-func (*L2EmulationReply) GetCrcString() string { return "e8d4e804" }
-func (*L2EmulationReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *L2EmulationReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *L2EmulationReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- return buf.Bytes(), nil
-}
-func (m *L2EmulationReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_l2e_binapi_init() }
-func file_l2e_binapi_init() {
- api.RegisterMessage((*L2Emulation)(nil), "l2_emulation_ae6cfcfb")
- api.RegisterMessage((*L2EmulationReply)(nil), "l2_emulation_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*L2Emulation)(nil),
- (*L2EmulationReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/l2e/l2e_rpc.ba.go b/internal/testbinapi/binapi2001/l2e/l2e_rpc.ba.go
deleted file mode 100644
index 277e04e..0000000
--- a/internal/testbinapi/binapi2001/l2e/l2e_rpc.ba.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package l2e
-
-import (
- "context"
-
- api "git.fd.io/govpp.git/api"
-)
-
-// RPCService defines RPC service l2e.
-type RPCService interface {
- L2Emulation(ctx context.Context, in *L2Emulation) (*L2EmulationReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) L2Emulation(ctx context.Context, in *L2Emulation) (*L2EmulationReply, error) {
- out := new(L2EmulationReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/l2tp/l2tp.ba.go b/internal/testbinapi/binapi2001/l2tp/l2tp.ba.go
deleted file mode 100644
index 3aea952..0000000
--- a/internal/testbinapi/binapi2001/l2tp/l2tp.ba.go
+++ /dev/null
@@ -1,1400 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/l2tp.api.json
-
-// Package l2tp contains generated bindings for API file l2tp.api.
-//
-// Contents:
-// 7 aliases
-// 11 enums
-// 6 structs
-// 1 union
-// 10 messages
-//
-package l2tp
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "l2tp"
- APIVersion = "2.0.0"
- VersionCrc = 0x1ecf7730
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// L2tLookupKey defines enum 'l2t_lookup_key'.
-type L2tLookupKey uint8
-
-const (
- L2T_LOOKUP_KEY_API_SRC_ADDR L2tLookupKey = 0
- L2T_LOOKUP_KEY_API_DST_ADDR L2tLookupKey = 1
- L2T_LOOKUP_KEY_API_SESSION_ID L2tLookupKey = 2
-)
-
-var (
- L2tLookupKey_name = map[uint8]string{
- 0: "L2T_LOOKUP_KEY_API_SRC_ADDR",
- 1: "L2T_LOOKUP_KEY_API_DST_ADDR",
- 2: "L2T_LOOKUP_KEY_API_SESSION_ID",
- }
- L2tLookupKey_value = map[string]uint8{
- "L2T_LOOKUP_KEY_API_SRC_ADDR": 0,
- "L2T_LOOKUP_KEY_API_DST_ADDR": 1,
- "L2T_LOOKUP_KEY_API_SESSION_ID": 2,
- }
-)
-
-func (x L2tLookupKey) String() string {
- s, ok := L2tLookupKey_name[uint8(x)]
- if ok {
- return s
- }
- return "L2tLookupKey(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// MacAddress defines alias 'mac_address'.
-type MacAddress [6]uint8
-
-func ParseMacAddress(s string) (MacAddress, error) {
- var macaddr MacAddress
- mac, err := net.ParseMAC(s)
- if err != nil {
- return macaddr, err
- }
- copy(macaddr[:], mac[:])
- return macaddr, nil
-}
-
-func (x MacAddress) ToMAC() net.HardwareAddr {
- return net.HardwareAddr(x[:])
-}
-
-func (x MacAddress) String() string {
- return x.ToMAC().String()
-}
-
-func (x *MacAddress) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *MacAddress) UnmarshalText(text []byte) error {
- mac, err := ParseMacAddress(string(text))
- if err != nil {
- return err
- }
- *x = mac
- return nil
-}
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
-
-// L2tpv3CreateTunnel defines message 'l2tpv3_create_tunnel'.
-type L2tpv3CreateTunnel struct {
- ClientAddress Address `binapi:"address,name=client_address" json:"client_address,omitempty"`
- OurAddress Address `binapi:"address,name=our_address" json:"our_address,omitempty"`
- LocalSessionID uint32 `binapi:"u32,name=local_session_id" json:"local_session_id,omitempty"`
- RemoteSessionID uint32 `binapi:"u32,name=remote_session_id" json:"remote_session_id,omitempty"`
- LocalCookie uint64 `binapi:"u64,name=local_cookie" json:"local_cookie,omitempty"`
- RemoteCookie uint64 `binapi:"u64,name=remote_cookie" json:"remote_cookie,omitempty"`
- L2SublayerPresent bool `binapi:"bool,name=l2_sublayer_present" json:"l2_sublayer_present,omitempty"`
- EncapVrfID uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
-}
-
-func (m *L2tpv3CreateTunnel) Reset() { *m = L2tpv3CreateTunnel{} }
-func (*L2tpv3CreateTunnel) GetMessageName() string { return "l2tpv3_create_tunnel" }
-func (*L2tpv3CreateTunnel) GetCrcString() string { return "596892cb" }
-func (*L2tpv3CreateTunnel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *L2tpv3CreateTunnel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.ClientAddress.Af
- size += 1 * 16 // m.ClientAddress.Un
- size += 4 // m.OurAddress.Af
- size += 1 * 16 // m.OurAddress.Un
- size += 4 // m.LocalSessionID
- size += 4 // m.RemoteSessionID
- size += 8 // m.LocalCookie
- size += 8 // m.RemoteCookie
- size += 1 // m.L2SublayerPresent
- size += 4 // m.EncapVrfID
- return size
-}
-func (m *L2tpv3CreateTunnel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.ClientAddress.Af))
- buf.EncodeBytes(m.ClientAddress.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.OurAddress.Af))
- buf.EncodeBytes(m.OurAddress.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(m.LocalSessionID)
- buf.EncodeUint32(m.RemoteSessionID)
- buf.EncodeUint64(m.LocalCookie)
- buf.EncodeUint64(m.RemoteCookie)
- buf.EncodeBool(m.L2SublayerPresent)
- buf.EncodeUint32(m.EncapVrfID)
- return buf.Bytes(), nil
-}
-func (m *L2tpv3CreateTunnel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.ClientAddress.Af = AddressFamily(buf.DecodeUint32())
- copy(m.ClientAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.OurAddress.Af = AddressFamily(buf.DecodeUint32())
- copy(m.OurAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.LocalSessionID = buf.DecodeUint32()
- m.RemoteSessionID = buf.DecodeUint32()
- m.LocalCookie = buf.DecodeUint64()
- m.RemoteCookie = buf.DecodeUint64()
- m.L2SublayerPresent = buf.DecodeBool()
- m.EncapVrfID = buf.DecodeUint32()
- return nil
-}
-
-// L2tpv3CreateTunnelReply defines message 'l2tpv3_create_tunnel_reply'.
-type L2tpv3CreateTunnelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *L2tpv3CreateTunnelReply) Reset() { *m = L2tpv3CreateTunnelReply{} }
-func (*L2tpv3CreateTunnelReply) GetMessageName() string { return "l2tpv3_create_tunnel_reply" }
-func (*L2tpv3CreateTunnelReply) GetCrcString() string { return "5383d31f" }
-func (*L2tpv3CreateTunnelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *L2tpv3CreateTunnelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *L2tpv3CreateTunnelReply) 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 *L2tpv3CreateTunnelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// L2tpv3InterfaceEnableDisable defines message 'l2tpv3_interface_enable_disable'.
-type L2tpv3InterfaceEnableDisable struct {
- EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *L2tpv3InterfaceEnableDisable) Reset() { *m = L2tpv3InterfaceEnableDisable{} }
-func (*L2tpv3InterfaceEnableDisable) GetMessageName() string {
- return "l2tpv3_interface_enable_disable"
-}
-func (*L2tpv3InterfaceEnableDisable) GetCrcString() string { return "3865946c" }
-func (*L2tpv3InterfaceEnableDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *L2tpv3InterfaceEnableDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.EnableDisable
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *L2tpv3InterfaceEnableDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.EnableDisable)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- return buf.Bytes(), nil
-}
-func (m *L2tpv3InterfaceEnableDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.EnableDisable = buf.DecodeBool()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// L2tpv3InterfaceEnableDisableReply defines message 'l2tpv3_interface_enable_disable_reply'.
-type L2tpv3InterfaceEnableDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *L2tpv3InterfaceEnableDisableReply) Reset() { *m = L2tpv3InterfaceEnableDisableReply{} }
-func (*L2tpv3InterfaceEnableDisableReply) GetMessageName() string {
- return "l2tpv3_interface_enable_disable_reply"
-}
-func (*L2tpv3InterfaceEnableDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*L2tpv3InterfaceEnableDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *L2tpv3InterfaceEnableDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *L2tpv3InterfaceEnableDisableReply) 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 *L2tpv3InterfaceEnableDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// L2tpv3SetLookupKey defines message 'l2tpv3_set_lookup_key'.
-type L2tpv3SetLookupKey struct {
- Key L2tLookupKey `binapi:"l2t_lookup_key,name=key" json:"key,omitempty"`
-}
-
-func (m *L2tpv3SetLookupKey) Reset() { *m = L2tpv3SetLookupKey{} }
-func (*L2tpv3SetLookupKey) GetMessageName() string { return "l2tpv3_set_lookup_key" }
-func (*L2tpv3SetLookupKey) GetCrcString() string { return "c9892c86" }
-func (*L2tpv3SetLookupKey) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *L2tpv3SetLookupKey) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.Key
- return size
-}
-func (m *L2tpv3SetLookupKey) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(uint8(m.Key))
- return buf.Bytes(), nil
-}
-func (m *L2tpv3SetLookupKey) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Key = L2tLookupKey(buf.DecodeUint8())
- return nil
-}
-
-// L2tpv3SetLookupKeyReply defines message 'l2tpv3_set_lookup_key_reply'.
-type L2tpv3SetLookupKeyReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *L2tpv3SetLookupKeyReply) Reset() { *m = L2tpv3SetLookupKeyReply{} }
-func (*L2tpv3SetLookupKeyReply) GetMessageName() string { return "l2tpv3_set_lookup_key_reply" }
-func (*L2tpv3SetLookupKeyReply) GetCrcString() string { return "e8d4e804" }
-func (*L2tpv3SetLookupKeyReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *L2tpv3SetLookupKeyReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *L2tpv3SetLookupKeyReply) 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 *L2tpv3SetLookupKeyReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// L2tpv3SetTunnelCookies defines message 'l2tpv3_set_tunnel_cookies'.
-type L2tpv3SetTunnelCookies struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- NewLocalCookie uint64 `binapi:"u64,name=new_local_cookie" json:"new_local_cookie,omitempty"`
- NewRemoteCookie uint64 `binapi:"u64,name=new_remote_cookie" json:"new_remote_cookie,omitempty"`
-}
-
-func (m *L2tpv3SetTunnelCookies) Reset() { *m = L2tpv3SetTunnelCookies{} }
-func (*L2tpv3SetTunnelCookies) GetMessageName() string { return "l2tpv3_set_tunnel_cookies" }
-func (*L2tpv3SetTunnelCookies) GetCrcString() string { return "b3f4faf7" }
-func (*L2tpv3SetTunnelCookies) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *L2tpv3SetTunnelCookies) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 8 // m.NewLocalCookie
- size += 8 // m.NewRemoteCookie
- return size
-}
-func (m *L2tpv3SetTunnelCookies) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint64(m.NewLocalCookie)
- buf.EncodeUint64(m.NewRemoteCookie)
- return buf.Bytes(), nil
-}
-func (m *L2tpv3SetTunnelCookies) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.NewLocalCookie = buf.DecodeUint64()
- m.NewRemoteCookie = buf.DecodeUint64()
- return nil
-}
-
-// L2tpv3SetTunnelCookiesReply defines message 'l2tpv3_set_tunnel_cookies_reply'.
-type L2tpv3SetTunnelCookiesReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *L2tpv3SetTunnelCookiesReply) Reset() { *m = L2tpv3SetTunnelCookiesReply{} }
-func (*L2tpv3SetTunnelCookiesReply) GetMessageName() string { return "l2tpv3_set_tunnel_cookies_reply" }
-func (*L2tpv3SetTunnelCookiesReply) GetCrcString() string { return "e8d4e804" }
-func (*L2tpv3SetTunnelCookiesReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *L2tpv3SetTunnelCookiesReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *L2tpv3SetTunnelCookiesReply) 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 *L2tpv3SetTunnelCookiesReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SwIfL2tpv3TunnelDetails defines message 'sw_if_l2tpv3_tunnel_details'.
-type SwIfL2tpv3TunnelDetails struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- InterfaceName string `binapi:"string[64],name=interface_name" json:"interface_name,omitempty"`
- ClientAddress Address `binapi:"address,name=client_address" json:"client_address,omitempty"`
- OurAddress Address `binapi:"address,name=our_address" json:"our_address,omitempty"`
- LocalSessionID uint32 `binapi:"u32,name=local_session_id" json:"local_session_id,omitempty"`
- RemoteSessionID uint32 `binapi:"u32,name=remote_session_id" json:"remote_session_id,omitempty"`
- LocalCookie []uint64 `binapi:"u64[2],name=local_cookie" json:"local_cookie,omitempty"`
- RemoteCookie uint64 `binapi:"u64,name=remote_cookie" json:"remote_cookie,omitempty"`
- L2SublayerPresent bool `binapi:"bool,name=l2_sublayer_present" json:"l2_sublayer_present,omitempty"`
-}
-
-func (m *SwIfL2tpv3TunnelDetails) Reset() { *m = SwIfL2tpv3TunnelDetails{} }
-func (*SwIfL2tpv3TunnelDetails) GetMessageName() string { return "sw_if_l2tpv3_tunnel_details" }
-func (*SwIfL2tpv3TunnelDetails) GetCrcString() string { return "1dab5c7e" }
-func (*SwIfL2tpv3TunnelDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SwIfL2tpv3TunnelDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 64 // m.InterfaceName
- size += 4 // m.ClientAddress.Af
- size += 1 * 16 // m.ClientAddress.Un
- size += 4 // m.OurAddress.Af
- size += 1 * 16 // m.OurAddress.Un
- size += 4 // m.LocalSessionID
- size += 4 // m.RemoteSessionID
- size += 8 * 2 // m.LocalCookie
- size += 8 // m.RemoteCookie
- size += 1 // m.L2SublayerPresent
- return size
-}
-func (m *SwIfL2tpv3TunnelDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeString(m.InterfaceName, 64)
- buf.EncodeUint32(uint32(m.ClientAddress.Af))
- buf.EncodeBytes(m.ClientAddress.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.OurAddress.Af))
- buf.EncodeBytes(m.OurAddress.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(m.LocalSessionID)
- buf.EncodeUint32(m.RemoteSessionID)
- for i := 0; i < 2; i++ {
- var x uint64
- if i < len(m.LocalCookie) {
- x = uint64(m.LocalCookie[i])
- }
- buf.EncodeUint64(x)
- }
- buf.EncodeUint64(m.RemoteCookie)
- buf.EncodeBool(m.L2SublayerPresent)
- return buf.Bytes(), nil
-}
-func (m *SwIfL2tpv3TunnelDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.InterfaceName = buf.DecodeString(64)
- m.ClientAddress.Af = AddressFamily(buf.DecodeUint32())
- copy(m.ClientAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.OurAddress.Af = AddressFamily(buf.DecodeUint32())
- copy(m.OurAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.LocalSessionID = buf.DecodeUint32()
- m.RemoteSessionID = buf.DecodeUint32()
- m.LocalCookie = make([]uint64, 2)
- for i := 0; i < len(m.LocalCookie); i++ {
- m.LocalCookie[i] = buf.DecodeUint64()
- }
- m.RemoteCookie = buf.DecodeUint64()
- m.L2SublayerPresent = buf.DecodeBool()
- return nil
-}
-
-// SwIfL2tpv3TunnelDump defines message 'sw_if_l2tpv3_tunnel_dump'.
-type SwIfL2tpv3TunnelDump struct{}
-
-func (m *SwIfL2tpv3TunnelDump) Reset() { *m = SwIfL2tpv3TunnelDump{} }
-func (*SwIfL2tpv3TunnelDump) GetMessageName() string { return "sw_if_l2tpv3_tunnel_dump" }
-func (*SwIfL2tpv3TunnelDump) GetCrcString() string { return "51077d14" }
-func (*SwIfL2tpv3TunnelDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwIfL2tpv3TunnelDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *SwIfL2tpv3TunnelDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *SwIfL2tpv3TunnelDump) Unmarshal(b []byte) error {
- return nil
-}
-
-func init() { file_l2tp_binapi_init() }
-func file_l2tp_binapi_init() {
- api.RegisterMessage((*L2tpv3CreateTunnel)(nil), "l2tpv3_create_tunnel_596892cb")
- api.RegisterMessage((*L2tpv3CreateTunnelReply)(nil), "l2tpv3_create_tunnel_reply_5383d31f")
- api.RegisterMessage((*L2tpv3InterfaceEnableDisable)(nil), "l2tpv3_interface_enable_disable_3865946c")
- api.RegisterMessage((*L2tpv3InterfaceEnableDisableReply)(nil), "l2tpv3_interface_enable_disable_reply_e8d4e804")
- api.RegisterMessage((*L2tpv3SetLookupKey)(nil), "l2tpv3_set_lookup_key_c9892c86")
- api.RegisterMessage((*L2tpv3SetLookupKeyReply)(nil), "l2tpv3_set_lookup_key_reply_e8d4e804")
- api.RegisterMessage((*L2tpv3SetTunnelCookies)(nil), "l2tpv3_set_tunnel_cookies_b3f4faf7")
- api.RegisterMessage((*L2tpv3SetTunnelCookiesReply)(nil), "l2tpv3_set_tunnel_cookies_reply_e8d4e804")
- api.RegisterMessage((*SwIfL2tpv3TunnelDetails)(nil), "sw_if_l2tpv3_tunnel_details_1dab5c7e")
- api.RegisterMessage((*SwIfL2tpv3TunnelDump)(nil), "sw_if_l2tpv3_tunnel_dump_51077d14")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*L2tpv3CreateTunnel)(nil),
- (*L2tpv3CreateTunnelReply)(nil),
- (*L2tpv3InterfaceEnableDisable)(nil),
- (*L2tpv3InterfaceEnableDisableReply)(nil),
- (*L2tpv3SetLookupKey)(nil),
- (*L2tpv3SetLookupKeyReply)(nil),
- (*L2tpv3SetTunnelCookies)(nil),
- (*L2tpv3SetTunnelCookiesReply)(nil),
- (*SwIfL2tpv3TunnelDetails)(nil),
- (*SwIfL2tpv3TunnelDump)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/l2tp/l2tp_rpc.ba.go b/internal/testbinapi/binapi2001/l2tp/l2tp_rpc.ba.go
deleted file mode 100644
index f0b1e59..0000000
--- a/internal/testbinapi/binapi2001/l2tp/l2tp_rpc.ba.go
+++ /dev/null
@@ -1,108 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package l2tp
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service l2tp.
-type RPCService interface {
- L2tpv3CreateTunnel(ctx context.Context, in *L2tpv3CreateTunnel) (*L2tpv3CreateTunnelReply, error)
- L2tpv3InterfaceEnableDisable(ctx context.Context, in *L2tpv3InterfaceEnableDisable) (*L2tpv3InterfaceEnableDisableReply, error)
- L2tpv3SetLookupKey(ctx context.Context, in *L2tpv3SetLookupKey) (*L2tpv3SetLookupKeyReply, error)
- L2tpv3SetTunnelCookies(ctx context.Context, in *L2tpv3SetTunnelCookies) (*L2tpv3SetTunnelCookiesReply, error)
- SwIfL2tpv3TunnelDump(ctx context.Context, in *SwIfL2tpv3TunnelDump) (RPCService_SwIfL2tpv3TunnelDumpClient, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) L2tpv3CreateTunnel(ctx context.Context, in *L2tpv3CreateTunnel) (*L2tpv3CreateTunnelReply, error) {
- out := new(L2tpv3CreateTunnelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) L2tpv3InterfaceEnableDisable(ctx context.Context, in *L2tpv3InterfaceEnableDisable) (*L2tpv3InterfaceEnableDisableReply, error) {
- out := new(L2tpv3InterfaceEnableDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) L2tpv3SetLookupKey(ctx context.Context, in *L2tpv3SetLookupKey) (*L2tpv3SetLookupKeyReply, error) {
- out := new(L2tpv3SetLookupKeyReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) L2tpv3SetTunnelCookies(ctx context.Context, in *L2tpv3SetTunnelCookies) (*L2tpv3SetTunnelCookiesReply, error) {
- out := new(L2tpv3SetTunnelCookiesReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SwIfL2tpv3TunnelDump(ctx context.Context, in *SwIfL2tpv3TunnelDump) (RPCService_SwIfL2tpv3TunnelDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_SwIfL2tpv3TunnelDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_SwIfL2tpv3TunnelDumpClient interface {
- Recv() (*SwIfL2tpv3TunnelDetails, error)
- api.Stream
-}
-
-type serviceClient_SwIfL2tpv3TunnelDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_SwIfL2tpv3TunnelDumpClient) Recv() (*SwIfL2tpv3TunnelDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *SwIfL2tpv3TunnelDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
diff --git a/internal/testbinapi/binapi2001/l3xc/l3xc.ba.go b/internal/testbinapi/binapi2001/l3xc/l3xc.ba.go
deleted file mode 100644
index 27aa4c6..0000000
--- a/internal/testbinapi/binapi2001/l3xc/l3xc.ba.go
+++ /dev/null
@@ -1,1516 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/plugins/l3xc.api.json
-
-// Package l3xc contains generated bindings for API file l3xc.api.
-//
-// Contents:
-// 6 aliases
-// 13 enums
-// 10 structs
-// 1 union
-// 8 messages
-//
-package l3xc
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "l3xc"
- APIVersion = "1.0.1"
- VersionCrc = 0x80b00c99
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// FibPathFlags defines enum 'fib_path_flags'.
-type FibPathFlags uint32
-
-const (
- FIB_API_PATH_FLAG_NONE FibPathFlags = 0
- FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED FibPathFlags = 1
- FIB_API_PATH_FLAG_RESOLVE_VIA_HOST FibPathFlags = 2
- FIB_API_PATH_FLAG_POP_PW_CW FibPathFlags = 4
-)
-
-var (
- FibPathFlags_name = map[uint32]string{
- 0: "FIB_API_PATH_FLAG_NONE",
- 1: "FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED",
- 2: "FIB_API_PATH_FLAG_RESOLVE_VIA_HOST",
- 4: "FIB_API_PATH_FLAG_POP_PW_CW",
- }
- FibPathFlags_value = map[string]uint32{
- "FIB_API_PATH_FLAG_NONE": 0,
- "FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED": 1,
- "FIB_API_PATH_FLAG_RESOLVE_VIA_HOST": 2,
- "FIB_API_PATH_FLAG_POP_PW_CW": 4,
- }
-)
-
-func (x FibPathFlags) String() string {
- s, ok := FibPathFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := FibPathFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "FibPathFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// FibPathNhProto defines enum 'fib_path_nh_proto'.
-type FibPathNhProto uint32
-
-const (
- FIB_API_PATH_NH_PROTO_IP4 FibPathNhProto = 0
- FIB_API_PATH_NH_PROTO_IP6 FibPathNhProto = 1
- FIB_API_PATH_NH_PROTO_MPLS FibPathNhProto = 2
- FIB_API_PATH_NH_PROTO_ETHERNET FibPathNhProto = 3
- FIB_API_PATH_NH_PROTO_BIER FibPathNhProto = 4
-)
-
-var (
- FibPathNhProto_name = map[uint32]string{
- 0: "FIB_API_PATH_NH_PROTO_IP4",
- 1: "FIB_API_PATH_NH_PROTO_IP6",
- 2: "FIB_API_PATH_NH_PROTO_MPLS",
- 3: "FIB_API_PATH_NH_PROTO_ETHERNET",
- 4: "FIB_API_PATH_NH_PROTO_BIER",
- }
- FibPathNhProto_value = map[string]uint32{
- "FIB_API_PATH_NH_PROTO_IP4": 0,
- "FIB_API_PATH_NH_PROTO_IP6": 1,
- "FIB_API_PATH_NH_PROTO_MPLS": 2,
- "FIB_API_PATH_NH_PROTO_ETHERNET": 3,
- "FIB_API_PATH_NH_PROTO_BIER": 4,
- }
-)
-
-func (x FibPathNhProto) String() string {
- s, ok := FibPathNhProto_name[uint32(x)]
- if ok {
- return s
- }
- return "FibPathNhProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// FibPathType defines enum 'fib_path_type'.
-type FibPathType uint32
-
-const (
- FIB_API_PATH_TYPE_NORMAL FibPathType = 0
- FIB_API_PATH_TYPE_LOCAL FibPathType = 1
- FIB_API_PATH_TYPE_DROP FibPathType = 2
- FIB_API_PATH_TYPE_UDP_ENCAP FibPathType = 3
- FIB_API_PATH_TYPE_BIER_IMP FibPathType = 4
- FIB_API_PATH_TYPE_ICMP_UNREACH FibPathType = 5
- FIB_API_PATH_TYPE_ICMP_PROHIBIT FibPathType = 6
- FIB_API_PATH_TYPE_SOURCE_LOOKUP FibPathType = 7
- FIB_API_PATH_TYPE_DVR FibPathType = 8
- FIB_API_PATH_TYPE_INTERFACE_RX FibPathType = 9
- FIB_API_PATH_TYPE_CLASSIFY FibPathType = 10
-)
-
-var (
- FibPathType_name = map[uint32]string{
- 0: "FIB_API_PATH_TYPE_NORMAL",
- 1: "FIB_API_PATH_TYPE_LOCAL",
- 2: "FIB_API_PATH_TYPE_DROP",
- 3: "FIB_API_PATH_TYPE_UDP_ENCAP",
- 4: "FIB_API_PATH_TYPE_BIER_IMP",
- 5: "FIB_API_PATH_TYPE_ICMP_UNREACH",
- 6: "FIB_API_PATH_TYPE_ICMP_PROHIBIT",
- 7: "FIB_API_PATH_TYPE_SOURCE_LOOKUP",
- 8: "FIB_API_PATH_TYPE_DVR",
- 9: "FIB_API_PATH_TYPE_INTERFACE_RX",
- 10: "FIB_API_PATH_TYPE_CLASSIFY",
- }
- FibPathType_value = map[string]uint32{
- "FIB_API_PATH_TYPE_NORMAL": 0,
- "FIB_API_PATH_TYPE_LOCAL": 1,
- "FIB_API_PATH_TYPE_DROP": 2,
- "FIB_API_PATH_TYPE_UDP_ENCAP": 3,
- "FIB_API_PATH_TYPE_BIER_IMP": 4,
- "FIB_API_PATH_TYPE_ICMP_UNREACH": 5,
- "FIB_API_PATH_TYPE_ICMP_PROHIBIT": 6,
- "FIB_API_PATH_TYPE_SOURCE_LOOKUP": 7,
- "FIB_API_PATH_TYPE_DVR": 8,
- "FIB_API_PATH_TYPE_INTERFACE_RX": 9,
- "FIB_API_PATH_TYPE_CLASSIFY": 10,
- }
-)
-
-func (x FibPathType) String() string {
- s, ok := FibPathType_name[uint32(x)]
- if ok {
- return s
- }
- return "FibPathType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// FibMplsLabel defines type 'fib_mpls_label'.
-type FibMplsLabel struct {
- IsUniform uint8 `binapi:"u8,name=is_uniform" json:"is_uniform,omitempty"`
- Label uint32 `binapi:"u32,name=label" json:"label,omitempty"`
- TTL uint8 `binapi:"u8,name=ttl" json:"ttl,omitempty"`
- Exp uint8 `binapi:"u8,name=exp" json:"exp,omitempty"`
-}
-
-// FibPath defines type 'fib_path'.
-type FibPath struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
- RpfID uint32 `binapi:"u32,name=rpf_id" json:"rpf_id,omitempty"`
- Weight uint8 `binapi:"u8,name=weight" json:"weight,omitempty"`
- Preference uint8 `binapi:"u8,name=preference" json:"preference,omitempty"`
- Type FibPathType `binapi:"fib_path_type,name=type" json:"type,omitempty"`
- Flags FibPathFlags `binapi:"fib_path_flags,name=flags" json:"flags,omitempty"`
- Proto FibPathNhProto `binapi:"fib_path_nh_proto,name=proto" json:"proto,omitempty"`
- Nh FibPathNh `binapi:"fib_path_nh,name=nh" json:"nh,omitempty"`
- NLabels uint8 `binapi:"u8,name=n_labels" json:"n_labels,omitempty"`
- LabelStack [16]FibMplsLabel `binapi:"fib_mpls_label[16],name=label_stack" json:"label_stack,omitempty"`
-}
-
-// FibPathNh defines type 'fib_path_nh'.
-type FibPathNh struct {
- Address AddressUnion `binapi:"address_union,name=address" json:"address,omitempty"`
- ViaLabel uint32 `binapi:"u32,name=via_label" json:"via_label,omitempty"`
- ObjID uint32 `binapi:"u32,name=obj_id" json:"obj_id,omitempty"`
- ClassifyTableIndex uint32 `binapi:"u32,name=classify_table_index" json:"classify_table_index,omitempty"`
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// L3xc defines type 'l3xc'.
-type L3xc struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
- NPaths uint8 `binapi:"u8,name=n_paths" json:"-"`
- Paths []FibPath `binapi:"fib_path[n_paths],name=paths" json:"paths,omitempty"`
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
-
-// L3xcDel defines message 'l3xc_del'.
-type L3xcDel struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"`
-}
-
-func (m *L3xcDel) Reset() { *m = L3xcDel{} }
-func (*L3xcDel) GetMessageName() string { return "l3xc_del" }
-func (*L3xcDel) GetCrcString() string { return "e7dbef91" }
-func (*L3xcDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *L3xcDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.IsIP6
- return size
-}
-func (m *L3xcDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeBool(m.IsIP6)
- return buf.Bytes(), nil
-}
-func (m *L3xcDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.IsIP6 = buf.DecodeBool()
- return nil
-}
-
-// L3xcDelReply defines message 'l3xc_del_reply'.
-type L3xcDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *L3xcDelReply) Reset() { *m = L3xcDelReply{} }
-func (*L3xcDelReply) GetMessageName() string { return "l3xc_del_reply" }
-func (*L3xcDelReply) GetCrcString() string { return "e8d4e804" }
-func (*L3xcDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *L3xcDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *L3xcDelReply) 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 *L3xcDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// L3xcDetails defines message 'l3xc_details'.
-type L3xcDetails struct {
- L3xc L3xc `binapi:"l3xc,name=l3xc" json:"l3xc,omitempty"`
-}
-
-func (m *L3xcDetails) Reset() { *m = L3xcDetails{} }
-func (*L3xcDetails) GetMessageName() string { return "l3xc_details" }
-func (*L3xcDetails) GetCrcString() string { return "d4f69627" }
-func (*L3xcDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *L3xcDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.L3xc.SwIfIndex
- size += 1 // m.L3xc.IsIP6
- size += 1 // m.L3xc.NPaths
- for j2 := 0; j2 < len(m.L3xc.Paths); j2++ {
- var s2 FibPath
- _ = s2
- if j2 < len(m.L3xc.Paths) {
- s2 = m.L3xc.Paths[j2]
- }
- size += 4 // s2.SwIfIndex
- size += 4 // s2.TableID
- size += 4 // s2.RpfID
- size += 1 // s2.Weight
- size += 1 // s2.Preference
- size += 4 // s2.Type
- size += 4 // s2.Flags
- size += 4 // s2.Proto
- size += 1 * 16 // s2.Nh.Address
- size += 4 // s2.Nh.ViaLabel
- size += 4 // s2.Nh.ObjID
- size += 4 // s2.Nh.ClassifyTableIndex
- size += 1 // s2.NLabels
- for j3 := 0; j3 < 16; j3++ {
- size += 1 // s2.LabelStack[j3].IsUniform
- size += 4 // s2.LabelStack[j3].Label
- size += 1 // s2.LabelStack[j3].TTL
- size += 1 // s2.LabelStack[j3].Exp
- }
- }
- return size
-}
-func (m *L3xcDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.L3xc.SwIfIndex))
- buf.EncodeBool(m.L3xc.IsIP6)
- buf.EncodeUint8(uint8(len(m.L3xc.Paths)))
- for j1 := 0; j1 < len(m.L3xc.Paths); j1++ {
- var v1 FibPath // Paths
- if j1 < len(m.L3xc.Paths) {
- v1 = m.L3xc.Paths[j1]
- }
- buf.EncodeUint32(v1.SwIfIndex)
- buf.EncodeUint32(v1.TableID)
- buf.EncodeUint32(v1.RpfID)
- buf.EncodeUint8(v1.Weight)
- buf.EncodeUint8(v1.Preference)
- buf.EncodeUint32(uint32(v1.Type))
- buf.EncodeUint32(uint32(v1.Flags))
- buf.EncodeUint32(uint32(v1.Proto))
- buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
- buf.EncodeUint32(v1.Nh.ViaLabel)
- buf.EncodeUint32(v1.Nh.ObjID)
- buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
- buf.EncodeUint8(v1.NLabels)
- for j2 := 0; j2 < 16; j2++ {
- buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
- buf.EncodeUint32(v1.LabelStack[j2].Label)
- buf.EncodeUint8(v1.LabelStack[j2].TTL)
- buf.EncodeUint8(v1.LabelStack[j2].Exp)
- }
- }
- return buf.Bytes(), nil
-}
-func (m *L3xcDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.L3xc.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.L3xc.IsIP6 = buf.DecodeBool()
- m.L3xc.NPaths = buf.DecodeUint8()
- m.L3xc.Paths = make([]FibPath, m.L3xc.NPaths)
- for j1 := 0; j1 < len(m.L3xc.Paths); j1++ {
- m.L3xc.Paths[j1].SwIfIndex = buf.DecodeUint32()
- m.L3xc.Paths[j1].TableID = buf.DecodeUint32()
- m.L3xc.Paths[j1].RpfID = buf.DecodeUint32()
- m.L3xc.Paths[j1].Weight = buf.DecodeUint8()
- m.L3xc.Paths[j1].Preference = buf.DecodeUint8()
- m.L3xc.Paths[j1].Type = FibPathType(buf.DecodeUint32())
- m.L3xc.Paths[j1].Flags = FibPathFlags(buf.DecodeUint32())
- m.L3xc.Paths[j1].Proto = FibPathNhProto(buf.DecodeUint32())
- copy(m.L3xc.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
- m.L3xc.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
- m.L3xc.Paths[j1].Nh.ObjID = buf.DecodeUint32()
- m.L3xc.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
- m.L3xc.Paths[j1].NLabels = buf.DecodeUint8()
- for j2 := 0; j2 < 16; j2++ {
- m.L3xc.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
- m.L3xc.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
- m.L3xc.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
- m.L3xc.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
- }
- }
- return nil
-}
-
-// L3xcDump defines message 'l3xc_dump'.
-type L3xcDump struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *L3xcDump) Reset() { *m = L3xcDump{} }
-func (*L3xcDump) GetMessageName() string { return "l3xc_dump" }
-func (*L3xcDump) GetCrcString() string { return "f9e6675e" }
-func (*L3xcDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *L3xcDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *L3xcDump) 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 *L3xcDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// L3xcPluginGetVersion defines message 'l3xc_plugin_get_version'.
-type L3xcPluginGetVersion struct{}
-
-func (m *L3xcPluginGetVersion) Reset() { *m = L3xcPluginGetVersion{} }
-func (*L3xcPluginGetVersion) GetMessageName() string { return "l3xc_plugin_get_version" }
-func (*L3xcPluginGetVersion) GetCrcString() string { return "51077d14" }
-func (*L3xcPluginGetVersion) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *L3xcPluginGetVersion) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *L3xcPluginGetVersion) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *L3xcPluginGetVersion) Unmarshal(b []byte) error {
- return nil
-}
-
-// L3xcPluginGetVersionReply defines message 'l3xc_plugin_get_version_reply'.
-type L3xcPluginGetVersionReply struct {
- Major uint32 `binapi:"u32,name=major" json:"major,omitempty"`
- Minor uint32 `binapi:"u32,name=minor" json:"minor,omitempty"`
-}
-
-func (m *L3xcPluginGetVersionReply) Reset() { *m = L3xcPluginGetVersionReply{} }
-func (*L3xcPluginGetVersionReply) GetMessageName() string { return "l3xc_plugin_get_version_reply" }
-func (*L3xcPluginGetVersionReply) GetCrcString() string { return "9b32cf86" }
-func (*L3xcPluginGetVersionReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *L3xcPluginGetVersionReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Major
- size += 4 // m.Minor
- return size
-}
-func (m *L3xcPluginGetVersionReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Major)
- buf.EncodeUint32(m.Minor)
- return buf.Bytes(), nil
-}
-func (m *L3xcPluginGetVersionReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Major = buf.DecodeUint32()
- m.Minor = buf.DecodeUint32()
- return nil
-}
-
-// L3xcUpdate defines message 'l3xc_update'.
-type L3xcUpdate struct {
- L3xc L3xc `binapi:"l3xc,name=l3xc" json:"l3xc,omitempty"`
-}
-
-func (m *L3xcUpdate) Reset() { *m = L3xcUpdate{} }
-func (*L3xcUpdate) GetMessageName() string { return "l3xc_update" }
-func (*L3xcUpdate) GetCrcString() string { return "0787b1d3" }
-func (*L3xcUpdate) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *L3xcUpdate) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.L3xc.SwIfIndex
- size += 1 // m.L3xc.IsIP6
- size += 1 // m.L3xc.NPaths
- for j2 := 0; j2 < len(m.L3xc.Paths); j2++ {
- var s2 FibPath
- _ = s2
- if j2 < len(m.L3xc.Paths) {
- s2 = m.L3xc.Paths[j2]
- }
- size += 4 // s2.SwIfIndex
- size += 4 // s2.TableID
- size += 4 // s2.RpfID
- size += 1 // s2.Weight
- size += 1 // s2.Preference
- size += 4 // s2.Type
- size += 4 // s2.Flags
- size += 4 // s2.Proto
- size += 1 * 16 // s2.Nh.Address
- size += 4 // s2.Nh.ViaLabel
- size += 4 // s2.Nh.ObjID
- size += 4 // s2.Nh.ClassifyTableIndex
- size += 1 // s2.NLabels
- for j3 := 0; j3 < 16; j3++ {
- size += 1 // s2.LabelStack[j3].IsUniform
- size += 4 // s2.LabelStack[j3].Label
- size += 1 // s2.LabelStack[j3].TTL
- size += 1 // s2.LabelStack[j3].Exp
- }
- }
- return size
-}
-func (m *L3xcUpdate) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.L3xc.SwIfIndex))
- buf.EncodeBool(m.L3xc.IsIP6)
- buf.EncodeUint8(uint8(len(m.L3xc.Paths)))
- for j1 := 0; j1 < len(m.L3xc.Paths); j1++ {
- var v1 FibPath // Paths
- if j1 < len(m.L3xc.Paths) {
- v1 = m.L3xc.Paths[j1]
- }
- buf.EncodeUint32(v1.SwIfIndex)
- buf.EncodeUint32(v1.TableID)
- buf.EncodeUint32(v1.RpfID)
- buf.EncodeUint8(v1.Weight)
- buf.EncodeUint8(v1.Preference)
- buf.EncodeUint32(uint32(v1.Type))
- buf.EncodeUint32(uint32(v1.Flags))
- buf.EncodeUint32(uint32(v1.Proto))
- buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
- buf.EncodeUint32(v1.Nh.ViaLabel)
- buf.EncodeUint32(v1.Nh.ObjID)
- buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
- buf.EncodeUint8(v1.NLabels)
- for j2 := 0; j2 < 16; j2++ {
- buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
- buf.EncodeUint32(v1.LabelStack[j2].Label)
- buf.EncodeUint8(v1.LabelStack[j2].TTL)
- buf.EncodeUint8(v1.LabelStack[j2].Exp)
- }
- }
- return buf.Bytes(), nil
-}
-func (m *L3xcUpdate) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.L3xc.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.L3xc.IsIP6 = buf.DecodeBool()
- m.L3xc.NPaths = buf.DecodeUint8()
- m.L3xc.Paths = make([]FibPath, m.L3xc.NPaths)
- for j1 := 0; j1 < len(m.L3xc.Paths); j1++ {
- m.L3xc.Paths[j1].SwIfIndex = buf.DecodeUint32()
- m.L3xc.Paths[j1].TableID = buf.DecodeUint32()
- m.L3xc.Paths[j1].RpfID = buf.DecodeUint32()
- m.L3xc.Paths[j1].Weight = buf.DecodeUint8()
- m.L3xc.Paths[j1].Preference = buf.DecodeUint8()
- m.L3xc.Paths[j1].Type = FibPathType(buf.DecodeUint32())
- m.L3xc.Paths[j1].Flags = FibPathFlags(buf.DecodeUint32())
- m.L3xc.Paths[j1].Proto = FibPathNhProto(buf.DecodeUint32())
- copy(m.L3xc.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
- m.L3xc.Paths[j1].Nh.ViaLabel = buf.DecodeUint32()
- m.L3xc.Paths[j1].Nh.ObjID = buf.DecodeUint32()
- m.L3xc.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
- m.L3xc.Paths[j1].NLabels = buf.DecodeUint8()
- for j2 := 0; j2 < 16; j2++ {
- m.L3xc.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
- m.L3xc.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32()
- m.L3xc.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
- m.L3xc.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
- }
- }
- return nil
-}
-
-// L3xcUpdateReply defines message 'l3xc_update_reply'.
-type L3xcUpdateReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
-}
-
-func (m *L3xcUpdateReply) Reset() { *m = L3xcUpdateReply{} }
-func (*L3xcUpdateReply) GetMessageName() string { return "l3xc_update_reply" }
-func (*L3xcUpdateReply) GetCrcString() string { return "1992deab" }
-func (*L3xcUpdateReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *L3xcUpdateReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.StatsIndex
- return size
-}
-func (m *L3xcUpdateReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.StatsIndex)
- return buf.Bytes(), nil
-}
-func (m *L3xcUpdateReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.StatsIndex = buf.DecodeUint32()
- return nil
-}
-
-func init() { file_l3xc_binapi_init() }
-func file_l3xc_binapi_init() {
- api.RegisterMessage((*L3xcDel)(nil), "l3xc_del_e7dbef91")
- api.RegisterMessage((*L3xcDelReply)(nil), "l3xc_del_reply_e8d4e804")
- api.RegisterMessage((*L3xcDetails)(nil), "l3xc_details_d4f69627")
- api.RegisterMessage((*L3xcDump)(nil), "l3xc_dump_f9e6675e")
- api.RegisterMessage((*L3xcPluginGetVersion)(nil), "l3xc_plugin_get_version_51077d14")
- api.RegisterMessage((*L3xcPluginGetVersionReply)(nil), "l3xc_plugin_get_version_reply_9b32cf86")
- api.RegisterMessage((*L3xcUpdate)(nil), "l3xc_update_0787b1d3")
- api.RegisterMessage((*L3xcUpdateReply)(nil), "l3xc_update_reply_1992deab")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*L3xcDel)(nil),
- (*L3xcDelReply)(nil),
- (*L3xcDetails)(nil),
- (*L3xcDump)(nil),
- (*L3xcPluginGetVersion)(nil),
- (*L3xcPluginGetVersionReply)(nil),
- (*L3xcUpdate)(nil),
- (*L3xcUpdateReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/l3xc/l3xc_rpc.ba.go b/internal/testbinapi/binapi2001/l3xc/l3xc_rpc.ba.go
deleted file mode 100644
index 9f4c8a7..0000000
--- a/internal/testbinapi/binapi2001/l3xc/l3xc_rpc.ba.go
+++ /dev/null
@@ -1,98 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package l3xc
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service l3xc.
-type RPCService interface {
- L3xcDel(ctx context.Context, in *L3xcDel) (*L3xcDelReply, error)
- L3xcDump(ctx context.Context, in *L3xcDump) (RPCService_L3xcDumpClient, error)
- L3xcPluginGetVersion(ctx context.Context, in *L3xcPluginGetVersion) (*L3xcPluginGetVersionReply, error)
- L3xcUpdate(ctx context.Context, in *L3xcUpdate) (*L3xcUpdateReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) L3xcDel(ctx context.Context, in *L3xcDel) (*L3xcDelReply, error) {
- out := new(L3xcDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) L3xcDump(ctx context.Context, in *L3xcDump) (RPCService_L3xcDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_L3xcDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_L3xcDumpClient interface {
- Recv() (*L3xcDetails, error)
- api.Stream
-}
-
-type serviceClient_L3xcDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_L3xcDumpClient) Recv() (*L3xcDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *L3xcDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) L3xcPluginGetVersion(ctx context.Context, in *L3xcPluginGetVersion) (*L3xcPluginGetVersionReply, error) {
- out := new(L3xcPluginGetVersionReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) L3xcUpdate(ctx context.Context, in *L3xcUpdate) (*L3xcUpdateReply, error) {
- out := new(L3xcUpdateReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/lacp/lacp.ba.go b/internal/testbinapi/binapi2001/lacp/lacp.ba.go
deleted file mode 100644
index 848079b..0000000
--- a/internal/testbinapi/binapi2001/lacp/lacp.ba.go
+++ /dev/null
@@ -1,468 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/plugins/lacp.api.json
-
-// Package lacp contains generated bindings for API file lacp.api.
-//
-// Contents:
-// 2 aliases
-// 6 enums
-// 2 messages
-//
-package lacp
-
-import (
- "net"
- "strconv"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "lacp"
- APIVersion = "2.0.0"
- VersionCrc = 0x930086a4
-)
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// MacAddress defines alias 'mac_address'.
-type MacAddress [6]uint8
-
-func ParseMacAddress(s string) (MacAddress, error) {
- var macaddr MacAddress
- mac, err := net.ParseMAC(s)
- if err != nil {
- return macaddr, err
- }
- copy(macaddr[:], mac[:])
- return macaddr, nil
-}
-
-func (x MacAddress) ToMAC() net.HardwareAddr {
- return net.HardwareAddr(x[:])
-}
-
-func (x MacAddress) String() string {
- return x.ToMAC().String()
-}
-
-func (x *MacAddress) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *MacAddress) UnmarshalText(text []byte) error {
- mac, err := ParseMacAddress(string(text))
- if err != nil {
- return err
- }
- *x = mac
- return nil
-}
-
-// SwInterfaceLacpDetails defines message 'sw_interface_lacp_details'.
-type SwInterfaceLacpDetails struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- InterfaceName string `binapi:"string[64],name=interface_name" json:"interface_name,omitempty"`
- RxState uint32 `binapi:"u32,name=rx_state" json:"rx_state,omitempty"`
- TxState uint32 `binapi:"u32,name=tx_state" json:"tx_state,omitempty"`
- MuxState uint32 `binapi:"u32,name=mux_state" json:"mux_state,omitempty"`
- PtxState uint32 `binapi:"u32,name=ptx_state" json:"ptx_state,omitempty"`
- BondInterfaceName string `binapi:"string[64],name=bond_interface_name" json:"bond_interface_name,omitempty"`
- ActorSystemPriority uint16 `binapi:"u16,name=actor_system_priority" json:"actor_system_priority,omitempty"`
- ActorSystem MacAddress `binapi:"mac_address,name=actor_system" json:"actor_system,omitempty"`
- ActorKey uint16 `binapi:"u16,name=actor_key" json:"actor_key,omitempty"`
- ActorPortPriority uint16 `binapi:"u16,name=actor_port_priority" json:"actor_port_priority,omitempty"`
- ActorPortNumber uint16 `binapi:"u16,name=actor_port_number" json:"actor_port_number,omitempty"`
- ActorState uint8 `binapi:"u8,name=actor_state" json:"actor_state,omitempty"`
- PartnerSystemPriority uint16 `binapi:"u16,name=partner_system_priority" json:"partner_system_priority,omitempty"`
- PartnerSystem MacAddress `binapi:"mac_address,name=partner_system" json:"partner_system,omitempty"`
- PartnerKey uint16 `binapi:"u16,name=partner_key" json:"partner_key,omitempty"`
- PartnerPortPriority uint16 `binapi:"u16,name=partner_port_priority" json:"partner_port_priority,omitempty"`
- PartnerPortNumber uint16 `binapi:"u16,name=partner_port_number" json:"partner_port_number,omitempty"`
- PartnerState uint8 `binapi:"u8,name=partner_state" json:"partner_state,omitempty"`
-}
-
-func (m *SwInterfaceLacpDetails) Reset() { *m = SwInterfaceLacpDetails{} }
-func (*SwInterfaceLacpDetails) GetMessageName() string { return "sw_interface_lacp_details" }
-func (*SwInterfaceLacpDetails) GetCrcString() string { return "745ae0ba" }
-func (*SwInterfaceLacpDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SwInterfaceLacpDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 64 // m.InterfaceName
- size += 4 // m.RxState
- size += 4 // m.TxState
- size += 4 // m.MuxState
- size += 4 // m.PtxState
- size += 64 // m.BondInterfaceName
- size += 2 // m.ActorSystemPriority
- size += 1 * 6 // m.ActorSystem
- size += 2 // m.ActorKey
- size += 2 // m.ActorPortPriority
- size += 2 // m.ActorPortNumber
- size += 1 // m.ActorState
- size += 2 // m.PartnerSystemPriority
- size += 1 * 6 // m.PartnerSystem
- size += 2 // m.PartnerKey
- size += 2 // m.PartnerPortPriority
- size += 2 // m.PartnerPortNumber
- size += 1 // m.PartnerState
- return size
-}
-func (m *SwInterfaceLacpDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeString(m.InterfaceName, 64)
- buf.EncodeUint32(m.RxState)
- buf.EncodeUint32(m.TxState)
- buf.EncodeUint32(m.MuxState)
- buf.EncodeUint32(m.PtxState)
- buf.EncodeString(m.BondInterfaceName, 64)
- buf.EncodeUint16(m.ActorSystemPriority)
- buf.EncodeBytes(m.ActorSystem[:], 6)
- buf.EncodeUint16(m.ActorKey)
- buf.EncodeUint16(m.ActorPortPriority)
- buf.EncodeUint16(m.ActorPortNumber)
- buf.EncodeUint8(m.ActorState)
- buf.EncodeUint16(m.PartnerSystemPriority)
- buf.EncodeBytes(m.PartnerSystem[:], 6)
- buf.EncodeUint16(m.PartnerKey)
- buf.EncodeUint16(m.PartnerPortPriority)
- buf.EncodeUint16(m.PartnerPortNumber)
- buf.EncodeUint8(m.PartnerState)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceLacpDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.InterfaceName = buf.DecodeString(64)
- m.RxState = buf.DecodeUint32()
- m.TxState = buf.DecodeUint32()
- m.MuxState = buf.DecodeUint32()
- m.PtxState = buf.DecodeUint32()
- m.BondInterfaceName = buf.DecodeString(64)
- m.ActorSystemPriority = buf.DecodeUint16()
- copy(m.ActorSystem[:], buf.DecodeBytes(6))
- m.ActorKey = buf.DecodeUint16()
- m.ActorPortPriority = buf.DecodeUint16()
- m.ActorPortNumber = buf.DecodeUint16()
- m.ActorState = buf.DecodeUint8()
- m.PartnerSystemPriority = buf.DecodeUint16()
- copy(m.PartnerSystem[:], buf.DecodeBytes(6))
- m.PartnerKey = buf.DecodeUint16()
- m.PartnerPortPriority = buf.DecodeUint16()
- m.PartnerPortNumber = buf.DecodeUint16()
- m.PartnerState = buf.DecodeUint8()
- return nil
-}
-
-// SwInterfaceLacpDump defines message 'sw_interface_lacp_dump'.
-type SwInterfaceLacpDump struct{}
-
-func (m *SwInterfaceLacpDump) Reset() { *m = SwInterfaceLacpDump{} }
-func (*SwInterfaceLacpDump) GetMessageName() string { return "sw_interface_lacp_dump" }
-func (*SwInterfaceLacpDump) GetCrcString() string { return "51077d14" }
-func (*SwInterfaceLacpDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceLacpDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *SwInterfaceLacpDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceLacpDump) Unmarshal(b []byte) error {
- return nil
-}
-
-func init() { file_lacp_binapi_init() }
-func file_lacp_binapi_init() {
- api.RegisterMessage((*SwInterfaceLacpDetails)(nil), "sw_interface_lacp_details_745ae0ba")
- api.RegisterMessage((*SwInterfaceLacpDump)(nil), "sw_interface_lacp_dump_51077d14")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*SwInterfaceLacpDetails)(nil),
- (*SwInterfaceLacpDump)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/lacp/lacp_rpc.ba.go b/internal/testbinapi/binapi2001/lacp/lacp_rpc.ba.go
deleted file mode 100644
index a2176a9..0000000
--- a/internal/testbinapi/binapi2001/lacp/lacp_rpc.ba.go
+++ /dev/null
@@ -1,68 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package lacp
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service lacp.
-type RPCService interface {
- SwInterfaceLacpDump(ctx context.Context, in *SwInterfaceLacpDump) (RPCService_SwInterfaceLacpDumpClient, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) SwInterfaceLacpDump(ctx context.Context, in *SwInterfaceLacpDump) (RPCService_SwInterfaceLacpDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_SwInterfaceLacpDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_SwInterfaceLacpDumpClient interface {
- Recv() (*SwInterfaceLacpDetails, error)
- api.Stream
-}
-
-type serviceClient_SwInterfaceLacpDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_SwInterfaceLacpDumpClient) Recv() (*SwInterfaceLacpDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *SwInterfaceLacpDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
diff --git a/internal/testbinapi/binapi2001/lb/lb.ba.go b/internal/testbinapi/binapi2001/lb/lb.ba.go
deleted file mode 100644
index 12536bb..0000000
--- a/internal/testbinapi/binapi2001/lb/lb.ba.go
+++ /dev/null
@@ -1,1834 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/plugins/lb.api.json
-
-// Package lb contains generated bindings for API file lb.api.
-//
-// Contents:
-// 6 aliases
-// 15 enums
-// 7 structs
-// 1 union
-// 16 messages
-//
-package lb
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "lb"
- APIVersion = "1.0.0"
- VersionCrc = 0x76c36b4c
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LbEncapType defines enum 'lb_encap_type'.
-type LbEncapType uint32
-
-const (
- LB_API_ENCAP_TYPE_GRE4 LbEncapType = 0
- LB_API_ENCAP_TYPE_GRE6 LbEncapType = 1
- LB_API_ENCAP_TYPE_L3DSR LbEncapType = 2
- LB_API_ENCAP_TYPE_NAT4 LbEncapType = 3
- LB_API_ENCAP_TYPE_NAT6 LbEncapType = 4
- LB_API_ENCAP_N_TYPES LbEncapType = 5
-)
-
-var (
- LbEncapType_name = map[uint32]string{
- 0: "LB_API_ENCAP_TYPE_GRE4",
- 1: "LB_API_ENCAP_TYPE_GRE6",
- 2: "LB_API_ENCAP_TYPE_L3DSR",
- 3: "LB_API_ENCAP_TYPE_NAT4",
- 4: "LB_API_ENCAP_TYPE_NAT6",
- 5: "LB_API_ENCAP_N_TYPES",
- }
- LbEncapType_value = map[string]uint32{
- "LB_API_ENCAP_TYPE_GRE4": 0,
- "LB_API_ENCAP_TYPE_GRE6": 1,
- "LB_API_ENCAP_TYPE_L3DSR": 2,
- "LB_API_ENCAP_TYPE_NAT4": 3,
- "LB_API_ENCAP_TYPE_NAT6": 4,
- "LB_API_ENCAP_N_TYPES": 5,
- }
-)
-
-func (x LbEncapType) String() string {
- s, ok := LbEncapType_name[uint32(x)]
- if ok {
- return s
- }
- return "LbEncapType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LbLkpTypeT defines enum 'lb_lkp_type_t'.
-type LbLkpTypeT uint32
-
-const (
- LB_API_LKP_SAME_IP_PORT LbLkpTypeT = 0
- LB_API_LKP_DIFF_IP_PORT LbLkpTypeT = 1
- LB_API_LKP_ALL_PORT_IP LbLkpTypeT = 2
- LB_API_LKP_N_TYPES LbLkpTypeT = 3
-)
-
-var (
- LbLkpTypeT_name = map[uint32]string{
- 0: "LB_API_LKP_SAME_IP_PORT",
- 1: "LB_API_LKP_DIFF_IP_PORT",
- 2: "LB_API_LKP_ALL_PORT_IP",
- 3: "LB_API_LKP_N_TYPES",
- }
- LbLkpTypeT_value = map[string]uint32{
- "LB_API_LKP_SAME_IP_PORT": 0,
- "LB_API_LKP_DIFF_IP_PORT": 1,
- "LB_API_LKP_ALL_PORT_IP": 2,
- "LB_API_LKP_N_TYPES": 3,
- }
-)
-
-func (x LbLkpTypeT) String() string {
- s, ok := LbLkpTypeT_name[uint32(x)]
- if ok {
- return s
- }
- return "LbLkpTypeT(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LbNatProtocol defines enum 'lb_nat_protocol'.
-type LbNatProtocol uint32
-
-const (
- LB_API_NAT_PROTOCOL_UDP LbNatProtocol = 6
- LB_API_NAT_PROTOCOL_TCP LbNatProtocol = 23
- LB_API_NAT_PROTOCOL_ANY LbNatProtocol = 4294967295
-)
-
-var (
- LbNatProtocol_name = map[uint32]string{
- 6: "LB_API_NAT_PROTOCOL_UDP",
- 23: "LB_API_NAT_PROTOCOL_TCP",
- 4294967295: "LB_API_NAT_PROTOCOL_ANY",
- }
- LbNatProtocol_value = map[string]uint32{
- "LB_API_NAT_PROTOCOL_UDP": 6,
- "LB_API_NAT_PROTOCOL_TCP": 23,
- "LB_API_NAT_PROTOCOL_ANY": 4294967295,
- }
-)
-
-func (x LbNatProtocol) String() string {
- s, ok := LbNatProtocol_name[uint32(x)]
- if ok {
- return s
- }
- return "LbNatProtocol(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LbSrvType defines enum 'lb_srv_type'.
-type LbSrvType uint32
-
-const (
- LB_API_SRV_TYPE_CLUSTERIP LbSrvType = 0
- LB_API_SRV_TYPE_NODEPORT LbSrvType = 1
- LB_API_SRV_N_TYPES LbSrvType = 2
-)
-
-var (
- LbSrvType_name = map[uint32]string{
- 0: "LB_API_SRV_TYPE_CLUSTERIP",
- 1: "LB_API_SRV_TYPE_NODEPORT",
- 2: "LB_API_SRV_N_TYPES",
- }
- LbSrvType_value = map[string]uint32{
- "LB_API_SRV_TYPE_CLUSTERIP": 0,
- "LB_API_SRV_TYPE_NODEPORT": 1,
- "LB_API_SRV_N_TYPES": 2,
- }
-)
-
-func (x LbSrvType) String() string {
- s, ok := LbSrvType_name[uint32(x)]
- if ok {
- return s
- }
- return "LbSrvType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LbVipType defines enum 'lb_vip_type'.
-type LbVipType uint32
-
-const (
- LB_API_VIP_TYPE_IP6_GRE6 LbVipType = 0
- LB_API_VIP_TYPE_IP6_GRE4 LbVipType = 1
- LB_API_VIP_TYPE_IP4_GRE6 LbVipType = 2
- LB_API_VIP_TYPE_IP4_GRE4 LbVipType = 3
- LB_API_VIP_TYPE_IP4_L3DSR LbVipType = 4
- LB_API_VIP_TYPE_IP4_NAT4 LbVipType = 5
- LB_API_VIP_TYPE_IP6_NAT6 LbVipType = 6
- LB_API_VIP_N_TYPES LbVipType = 7
-)
-
-var (
- LbVipType_name = map[uint32]string{
- 0: "LB_API_VIP_TYPE_IP6_GRE6",
- 1: "LB_API_VIP_TYPE_IP6_GRE4",
- 2: "LB_API_VIP_TYPE_IP4_GRE6",
- 3: "LB_API_VIP_TYPE_IP4_GRE4",
- 4: "LB_API_VIP_TYPE_IP4_L3DSR",
- 5: "LB_API_VIP_TYPE_IP4_NAT4",
- 6: "LB_API_VIP_TYPE_IP6_NAT6",
- 7: "LB_API_VIP_N_TYPES",
- }
- LbVipType_value = map[string]uint32{
- "LB_API_VIP_TYPE_IP6_GRE6": 0,
- "LB_API_VIP_TYPE_IP6_GRE4": 1,
- "LB_API_VIP_TYPE_IP4_GRE6": 2,
- "LB_API_VIP_TYPE_IP4_GRE4": 3,
- "LB_API_VIP_TYPE_IP4_L3DSR": 4,
- "LB_API_VIP_TYPE_IP4_NAT4": 5,
- "LB_API_VIP_TYPE_IP6_NAT6": 6,
- "LB_API_VIP_N_TYPES": 7,
- }
-)
-
-func (x LbVipType) String() string {
- s, ok := LbVipType_name[uint32(x)]
- if ok {
- return s
- }
- return "LbVipType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// LbVip defines type 'lb_vip'.
-type LbVip struct {
- Pfx AddressWithPrefix `binapi:"address_with_prefix,name=pfx" json:"pfx,omitempty"`
- Protocol IPProto `binapi:"ip_proto,name=protocol" json:"protocol,omitempty"`
- Port uint16 `binapi:"u16,name=port" json:"port,omitempty"`
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
-
-// LbAddDelAs defines message 'lb_add_del_as'.
-type LbAddDelAs struct {
- Pfx AddressWithPrefix `binapi:"address_with_prefix,name=pfx" json:"pfx,omitempty"`
- Protocol uint8 `binapi:"u8,name=protocol,default=255" json:"protocol,omitempty"`
- Port uint16 `binapi:"u16,name=port" json:"port,omitempty"`
- AsAddress Address `binapi:"address,name=as_address" json:"as_address,omitempty"`
- IsDel bool `binapi:"bool,name=is_del" json:"is_del,omitempty"`
- IsFlush bool `binapi:"bool,name=is_flush" json:"is_flush,omitempty"`
-}
-
-func (m *LbAddDelAs) Reset() { *m = LbAddDelAs{} }
-func (*LbAddDelAs) GetMessageName() string { return "lb_add_del_as" }
-func (*LbAddDelAs) GetCrcString() string { return "78628987" }
-func (*LbAddDelAs) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *LbAddDelAs) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Pfx.Address.Af
- size += 1 * 16 // m.Pfx.Address.Un
- size += 1 // m.Pfx.Len
- size += 1 // m.Protocol
- size += 2 // m.Port
- size += 4 // m.AsAddress.Af
- size += 1 * 16 // m.AsAddress.Un
- size += 1 // m.IsDel
- size += 1 // m.IsFlush
- return size
-}
-func (m *LbAddDelAs) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.Pfx.Address.Af))
- buf.EncodeBytes(m.Pfx.Address.Un.XXX_UnionData[:], 16)
- buf.EncodeUint8(m.Pfx.Len)
- buf.EncodeUint8(m.Protocol)
- buf.EncodeUint16(m.Port)
- buf.EncodeUint32(uint32(m.AsAddress.Af))
- buf.EncodeBytes(m.AsAddress.Un.XXX_UnionData[:], 16)
- buf.EncodeBool(m.IsDel)
- buf.EncodeBool(m.IsFlush)
- return buf.Bytes(), nil
-}
-func (m *LbAddDelAs) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Pfx.Address.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Pfx.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Pfx.Len = buf.DecodeUint8()
- m.Protocol = buf.DecodeUint8()
- m.Port = buf.DecodeUint16()
- m.AsAddress.Af = AddressFamily(buf.DecodeUint32())
- copy(m.AsAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.IsDel = buf.DecodeBool()
- m.IsFlush = buf.DecodeBool()
- return nil
-}
-
-// LbAddDelAsReply defines message 'lb_add_del_as_reply'.
-type LbAddDelAsReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *LbAddDelAsReply) Reset() { *m = LbAddDelAsReply{} }
-func (*LbAddDelAsReply) GetMessageName() string { return "lb_add_del_as_reply" }
-func (*LbAddDelAsReply) GetCrcString() string { return "e8d4e804" }
-func (*LbAddDelAsReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *LbAddDelAsReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *LbAddDelAsReply) 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 *LbAddDelAsReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// LbAddDelIntfNat4 defines message 'lb_add_del_intf_nat4'.
-type LbAddDelIntfNat4 struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *LbAddDelIntfNat4) Reset() { *m = LbAddDelIntfNat4{} }
-func (*LbAddDelIntfNat4) GetMessageName() string { return "lb_add_del_intf_nat4" }
-func (*LbAddDelIntfNat4) GetCrcString() string { return "47d6e753" }
-func (*LbAddDelIntfNat4) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *LbAddDelIntfNat4) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *LbAddDelIntfNat4) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- return buf.Bytes(), nil
-}
-func (m *LbAddDelIntfNat4) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// LbAddDelIntfNat4Reply defines message 'lb_add_del_intf_nat4_reply'.
-type LbAddDelIntfNat4Reply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *LbAddDelIntfNat4Reply) Reset() { *m = LbAddDelIntfNat4Reply{} }
-func (*LbAddDelIntfNat4Reply) GetMessageName() string { return "lb_add_del_intf_nat4_reply" }
-func (*LbAddDelIntfNat4Reply) GetCrcString() string { return "e8d4e804" }
-func (*LbAddDelIntfNat4Reply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *LbAddDelIntfNat4Reply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *LbAddDelIntfNat4Reply) 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 *LbAddDelIntfNat4Reply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// LbAddDelIntfNat6 defines message 'lb_add_del_intf_nat6'.
-type LbAddDelIntfNat6 struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *LbAddDelIntfNat6) Reset() { *m = LbAddDelIntfNat6{} }
-func (*LbAddDelIntfNat6) GetMessageName() string { return "lb_add_del_intf_nat6" }
-func (*LbAddDelIntfNat6) GetCrcString() string { return "47d6e753" }
-func (*LbAddDelIntfNat6) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *LbAddDelIntfNat6) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *LbAddDelIntfNat6) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- return buf.Bytes(), nil
-}
-func (m *LbAddDelIntfNat6) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// LbAddDelIntfNat6Reply defines message 'lb_add_del_intf_nat6_reply'.
-type LbAddDelIntfNat6Reply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *LbAddDelIntfNat6Reply) Reset() { *m = LbAddDelIntfNat6Reply{} }
-func (*LbAddDelIntfNat6Reply) GetMessageName() string { return "lb_add_del_intf_nat6_reply" }
-func (*LbAddDelIntfNat6Reply) GetCrcString() string { return "e8d4e804" }
-func (*LbAddDelIntfNat6Reply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *LbAddDelIntfNat6Reply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *LbAddDelIntfNat6Reply) 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 *LbAddDelIntfNat6Reply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// LbAddDelVip defines message 'lb_add_del_vip'.
-type LbAddDelVip struct {
- Pfx AddressWithPrefix `binapi:"address_with_prefix,name=pfx" json:"pfx,omitempty"`
- Protocol uint8 `binapi:"u8,name=protocol,default=255" json:"protocol,omitempty"`
- Port uint16 `binapi:"u16,name=port" json:"port,omitempty"`
- Encap LbEncapType `binapi:"lb_encap_type,name=encap" json:"encap,omitempty"`
- Dscp uint8 `binapi:"u8,name=dscp" json:"dscp,omitempty"`
- Type LbSrvType `binapi:"lb_srv_type,name=type" json:"type,omitempty"`
- TargetPort uint16 `binapi:"u16,name=target_port" json:"target_port,omitempty"`
- NodePort uint16 `binapi:"u16,name=node_port" json:"node_port,omitempty"`
- NewFlowsTableLength uint32 `binapi:"u32,name=new_flows_table_length,default=1024" json:"new_flows_table_length,omitempty"`
- IsDel bool `binapi:"bool,name=is_del" json:"is_del,omitempty"`
-}
-
-func (m *LbAddDelVip) Reset() { *m = LbAddDelVip{} }
-func (*LbAddDelVip) GetMessageName() string { return "lb_add_del_vip" }
-func (*LbAddDelVip) GetCrcString() string { return "d15b7ddc" }
-func (*LbAddDelVip) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *LbAddDelVip) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Pfx.Address.Af
- size += 1 * 16 // m.Pfx.Address.Un
- size += 1 // m.Pfx.Len
- size += 1 // m.Protocol
- size += 2 // m.Port
- size += 4 // m.Encap
- size += 1 // m.Dscp
- size += 4 // m.Type
- size += 2 // m.TargetPort
- size += 2 // m.NodePort
- size += 4 // m.NewFlowsTableLength
- size += 1 // m.IsDel
- return size
-}
-func (m *LbAddDelVip) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.Pfx.Address.Af))
- buf.EncodeBytes(m.Pfx.Address.Un.XXX_UnionData[:], 16)
- buf.EncodeUint8(m.Pfx.Len)
- buf.EncodeUint8(m.Protocol)
- buf.EncodeUint16(m.Port)
- buf.EncodeUint32(uint32(m.Encap))
- buf.EncodeUint8(m.Dscp)
- buf.EncodeUint32(uint32(m.Type))
- buf.EncodeUint16(m.TargetPort)
- buf.EncodeUint16(m.NodePort)
- buf.EncodeUint32(m.NewFlowsTableLength)
- buf.EncodeBool(m.IsDel)
- return buf.Bytes(), nil
-}
-func (m *LbAddDelVip) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Pfx.Address.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Pfx.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Pfx.Len = buf.DecodeUint8()
- m.Protocol = buf.DecodeUint8()
- m.Port = buf.DecodeUint16()
- m.Encap = LbEncapType(buf.DecodeUint32())
- m.Dscp = buf.DecodeUint8()
- m.Type = LbSrvType(buf.DecodeUint32())
- m.TargetPort = buf.DecodeUint16()
- m.NodePort = buf.DecodeUint16()
- m.NewFlowsTableLength = buf.DecodeUint32()
- m.IsDel = buf.DecodeBool()
- return nil
-}
-
-// LbAddDelVipReply defines message 'lb_add_del_vip_reply'.
-type LbAddDelVipReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *LbAddDelVipReply) Reset() { *m = LbAddDelVipReply{} }
-func (*LbAddDelVipReply) GetMessageName() string { return "lb_add_del_vip_reply" }
-func (*LbAddDelVipReply) GetCrcString() string { return "e8d4e804" }
-func (*LbAddDelVipReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *LbAddDelVipReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *LbAddDelVipReply) 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 *LbAddDelVipReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// LbAsDetails defines message 'lb_as_details'.
-type LbAsDetails struct {
- Vip LbVip `binapi:"lb_vip,name=vip" json:"vip,omitempty"`
- AppSrv Address `binapi:"address,name=app_srv" json:"app_srv,omitempty"`
- Flags uint8 `binapi:"u8,name=flags" json:"flags,omitempty"`
- InUseSince uint32 `binapi:"u32,name=in_use_since" json:"in_use_since,omitempty"`
-}
-
-func (m *LbAsDetails) Reset() { *m = LbAsDetails{} }
-func (*LbAsDetails) GetMessageName() string { return "lb_as_details" }
-func (*LbAsDetails) GetCrcString() string { return "9c39f60e" }
-func (*LbAsDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *LbAsDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Vip.Pfx.Address.Af
- size += 1 * 16 // m.Vip.Pfx.Address.Un
- size += 1 // m.Vip.Pfx.Len
- size += 4 // m.Vip.Protocol
- size += 2 // m.Vip.Port
- size += 4 // m.AppSrv.Af
- size += 1 * 16 // m.AppSrv.Un
- size += 1 // m.Flags
- size += 4 // m.InUseSince
- return size
-}
-func (m *LbAsDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.Vip.Pfx.Address.Af))
- buf.EncodeBytes(m.Vip.Pfx.Address.Un.XXX_UnionData[:], 16)
- buf.EncodeUint8(m.Vip.Pfx.Len)
- buf.EncodeUint32(uint32(m.Vip.Protocol))
- buf.EncodeUint16(m.Vip.Port)
- buf.EncodeUint32(uint32(m.AppSrv.Af))
- buf.EncodeBytes(m.AppSrv.Un.XXX_UnionData[:], 16)
- buf.EncodeUint8(m.Flags)
- buf.EncodeUint32(m.InUseSince)
- return buf.Bytes(), nil
-}
-func (m *LbAsDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Vip.Pfx.Address.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Vip.Pfx.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Vip.Pfx.Len = buf.DecodeUint8()
- m.Vip.Protocol = IPProto(buf.DecodeUint32())
- m.Vip.Port = buf.DecodeUint16()
- m.AppSrv.Af = AddressFamily(buf.DecodeUint32())
- copy(m.AppSrv.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Flags = buf.DecodeUint8()
- m.InUseSince = buf.DecodeUint32()
- return nil
-}
-
-// LbAsDump defines message 'lb_as_dump'.
-type LbAsDump struct {
- Pfx AddressWithPrefix `binapi:"address_with_prefix,name=pfx" json:"pfx,omitempty"`
- Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"`
- Port uint16 `binapi:"u16,name=port" json:"port,omitempty"`
-}
-
-func (m *LbAsDump) Reset() { *m = LbAsDump{} }
-func (*LbAsDump) GetMessageName() string { return "lb_as_dump" }
-func (*LbAsDump) GetCrcString() string { return "1063f819" }
-func (*LbAsDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *LbAsDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Pfx.Address.Af
- size += 1 * 16 // m.Pfx.Address.Un
- size += 1 // m.Pfx.Len
- size += 1 // m.Protocol
- size += 2 // m.Port
- return size
-}
-func (m *LbAsDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.Pfx.Address.Af))
- buf.EncodeBytes(m.Pfx.Address.Un.XXX_UnionData[:], 16)
- buf.EncodeUint8(m.Pfx.Len)
- buf.EncodeUint8(m.Protocol)
- buf.EncodeUint16(m.Port)
- return buf.Bytes(), nil
-}
-func (m *LbAsDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Pfx.Address.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Pfx.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Pfx.Len = buf.DecodeUint8()
- m.Protocol = buf.DecodeUint8()
- m.Port = buf.DecodeUint16()
- return nil
-}
-
-// LbConf defines message 'lb_conf'.
-type LbConf struct {
- IP4SrcAddress IP4Address `binapi:"ip4_address,name=ip4_src_address" json:"ip4_src_address,omitempty"`
- IP6SrcAddress IP6Address `binapi:"ip6_address,name=ip6_src_address" json:"ip6_src_address,omitempty"`
- StickyBucketsPerCore uint32 `binapi:"u32,name=sticky_buckets_per_core" json:"sticky_buckets_per_core,omitempty"`
- FlowTimeout uint32 `binapi:"u32,name=flow_timeout" json:"flow_timeout,omitempty"`
-}
-
-func (m *LbConf) Reset() { *m = LbConf{} }
-func (*LbConf) GetMessageName() string { return "lb_conf" }
-func (*LbConf) GetCrcString() string { return "22ddb739" }
-func (*LbConf) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *LbConf) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 4 // m.IP4SrcAddress
- size += 1 * 16 // m.IP6SrcAddress
- size += 4 // m.StickyBucketsPerCore
- size += 4 // m.FlowTimeout
- return size
-}
-func (m *LbConf) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.IP4SrcAddress[:], 4)
- buf.EncodeBytes(m.IP6SrcAddress[:], 16)
- buf.EncodeUint32(m.StickyBucketsPerCore)
- buf.EncodeUint32(m.FlowTimeout)
- return buf.Bytes(), nil
-}
-func (m *LbConf) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- copy(m.IP4SrcAddress[:], buf.DecodeBytes(4))
- copy(m.IP6SrcAddress[:], buf.DecodeBytes(16))
- m.StickyBucketsPerCore = buf.DecodeUint32()
- m.FlowTimeout = buf.DecodeUint32()
- return nil
-}
-
-// LbConfReply defines message 'lb_conf_reply'.
-type LbConfReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *LbConfReply) Reset() { *m = LbConfReply{} }
-func (*LbConfReply) GetMessageName() string { return "lb_conf_reply" }
-func (*LbConfReply) GetCrcString() string { return "e8d4e804" }
-func (*LbConfReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *LbConfReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *LbConfReply) 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 *LbConfReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// LbFlushVip defines message 'lb_flush_vip'.
-type LbFlushVip struct {
- Pfx AddressWithPrefix `binapi:"address_with_prefix,name=pfx" json:"pfx,omitempty"`
- Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"`
- Port uint16 `binapi:"u16,name=port" json:"port,omitempty"`
-}
-
-func (m *LbFlushVip) Reset() { *m = LbFlushVip{} }
-func (*LbFlushVip) GetMessageName() string { return "lb_flush_vip" }
-func (*LbFlushVip) GetCrcString() string { return "1063f819" }
-func (*LbFlushVip) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *LbFlushVip) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Pfx.Address.Af
- size += 1 * 16 // m.Pfx.Address.Un
- size += 1 // m.Pfx.Len
- size += 1 // m.Protocol
- size += 2 // m.Port
- return size
-}
-func (m *LbFlushVip) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.Pfx.Address.Af))
- buf.EncodeBytes(m.Pfx.Address.Un.XXX_UnionData[:], 16)
- buf.EncodeUint8(m.Pfx.Len)
- buf.EncodeUint8(m.Protocol)
- buf.EncodeUint16(m.Port)
- return buf.Bytes(), nil
-}
-func (m *LbFlushVip) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Pfx.Address.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Pfx.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Pfx.Len = buf.DecodeUint8()
- m.Protocol = buf.DecodeUint8()
- m.Port = buf.DecodeUint16()
- return nil
-}
-
-// LbFlushVipReply defines message 'lb_flush_vip_reply'.
-type LbFlushVipReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *LbFlushVipReply) Reset() { *m = LbFlushVipReply{} }
-func (*LbFlushVipReply) GetMessageName() string { return "lb_flush_vip_reply" }
-func (*LbFlushVipReply) GetCrcString() string { return "e8d4e804" }
-func (*LbFlushVipReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *LbFlushVipReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *LbFlushVipReply) 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 *LbFlushVipReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// LbVipDetails defines message 'lb_vip_details'.
-type LbVipDetails struct {
- Vip LbVip `binapi:"lb_vip,name=vip" json:"vip,omitempty"`
- Encap LbEncapType `binapi:"lb_encap_type,name=encap" json:"encap,omitempty"`
- Dscp IPDscp `binapi:"ip_dscp,name=dscp" json:"dscp,omitempty"`
- SrvType LbSrvType `binapi:"lb_srv_type,name=srv_type" json:"srv_type,omitempty"`
- TargetPort uint16 `binapi:"u16,name=target_port" json:"target_port,omitempty"`
- FlowTableLength uint16 `binapi:"u16,name=flow_table_length" json:"flow_table_length,omitempty"`
-}
-
-func (m *LbVipDetails) Reset() { *m = LbVipDetails{} }
-func (*LbVipDetails) GetMessageName() string { return "lb_vip_details" }
-func (*LbVipDetails) GetCrcString() string { return "08f39bed" }
-func (*LbVipDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *LbVipDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Vip.Pfx.Address.Af
- size += 1 * 16 // m.Vip.Pfx.Address.Un
- size += 1 // m.Vip.Pfx.Len
- size += 4 // m.Vip.Protocol
- size += 2 // m.Vip.Port
- size += 4 // m.Encap
- size += 1 // m.Dscp
- size += 4 // m.SrvType
- size += 2 // m.TargetPort
- size += 2 // m.FlowTableLength
- return size
-}
-func (m *LbVipDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.Vip.Pfx.Address.Af))
- buf.EncodeBytes(m.Vip.Pfx.Address.Un.XXX_UnionData[:], 16)
- buf.EncodeUint8(m.Vip.Pfx.Len)
- buf.EncodeUint32(uint32(m.Vip.Protocol))
- buf.EncodeUint16(m.Vip.Port)
- buf.EncodeUint32(uint32(m.Encap))
- buf.EncodeUint8(uint8(m.Dscp))
- buf.EncodeUint32(uint32(m.SrvType))
- buf.EncodeUint16(m.TargetPort)
- buf.EncodeUint16(m.FlowTableLength)
- return buf.Bytes(), nil
-}
-func (m *LbVipDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Vip.Pfx.Address.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Vip.Pfx.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Vip.Pfx.Len = buf.DecodeUint8()
- m.Vip.Protocol = IPProto(buf.DecodeUint32())
- m.Vip.Port = buf.DecodeUint16()
- m.Encap = LbEncapType(buf.DecodeUint32())
- m.Dscp = IPDscp(buf.DecodeUint8())
- m.SrvType = LbSrvType(buf.DecodeUint32())
- m.TargetPort = buf.DecodeUint16()
- m.FlowTableLength = buf.DecodeUint16()
- return nil
-}
-
-// LbVipDump defines message 'lb_vip_dump'.
-type LbVipDump struct {
- Pfx AddressWithPrefix `binapi:"address_with_prefix,name=pfx" json:"pfx,omitempty"`
- PfxMatcher PrefixMatcher `binapi:"prefix_matcher,name=pfx_matcher" json:"pfx_matcher,omitempty"`
- Protocol uint8 `binapi:"u8,name=protocol,default=255" json:"protocol,omitempty"`
- Port uint16 `binapi:"u16,name=port" json:"port,omitempty"`
-}
-
-func (m *LbVipDump) Reset() { *m = LbVipDump{} }
-func (*LbVipDump) GetMessageName() string { return "lb_vip_dump" }
-func (*LbVipDump) GetCrcString() string { return "c7bcb124" }
-func (*LbVipDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *LbVipDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Pfx.Address.Af
- size += 1 * 16 // m.Pfx.Address.Un
- size += 1 // m.Pfx.Len
- size += 1 // m.PfxMatcher.Le
- size += 1 // m.PfxMatcher.Ge
- size += 1 // m.Protocol
- size += 2 // m.Port
- return size
-}
-func (m *LbVipDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.Pfx.Address.Af))
- buf.EncodeBytes(m.Pfx.Address.Un.XXX_UnionData[:], 16)
- buf.EncodeUint8(m.Pfx.Len)
- buf.EncodeUint8(m.PfxMatcher.Le)
- buf.EncodeUint8(m.PfxMatcher.Ge)
- buf.EncodeUint8(m.Protocol)
- buf.EncodeUint16(m.Port)
- return buf.Bytes(), nil
-}
-func (m *LbVipDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Pfx.Address.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Pfx.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Pfx.Len = buf.DecodeUint8()
- m.PfxMatcher.Le = buf.DecodeUint8()
- m.PfxMatcher.Ge = buf.DecodeUint8()
- m.Protocol = buf.DecodeUint8()
- m.Port = buf.DecodeUint16()
- return nil
-}
-
-func init() { file_lb_binapi_init() }
-func file_lb_binapi_init() {
- api.RegisterMessage((*LbAddDelAs)(nil), "lb_add_del_as_78628987")
- api.RegisterMessage((*LbAddDelAsReply)(nil), "lb_add_del_as_reply_e8d4e804")
- api.RegisterMessage((*LbAddDelIntfNat4)(nil), "lb_add_del_intf_nat4_47d6e753")
- api.RegisterMessage((*LbAddDelIntfNat4Reply)(nil), "lb_add_del_intf_nat4_reply_e8d4e804")
- api.RegisterMessage((*LbAddDelIntfNat6)(nil), "lb_add_del_intf_nat6_47d6e753")
- api.RegisterMessage((*LbAddDelIntfNat6Reply)(nil), "lb_add_del_intf_nat6_reply_e8d4e804")
- api.RegisterMessage((*LbAddDelVip)(nil), "lb_add_del_vip_d15b7ddc")
- api.RegisterMessage((*LbAddDelVipReply)(nil), "lb_add_del_vip_reply_e8d4e804")
- api.RegisterMessage((*LbAsDetails)(nil), "lb_as_details_9c39f60e")
- api.RegisterMessage((*LbAsDump)(nil), "lb_as_dump_1063f819")
- api.RegisterMessage((*LbConf)(nil), "lb_conf_22ddb739")
- api.RegisterMessage((*LbConfReply)(nil), "lb_conf_reply_e8d4e804")
- api.RegisterMessage((*LbFlushVip)(nil), "lb_flush_vip_1063f819")
- api.RegisterMessage((*LbFlushVipReply)(nil), "lb_flush_vip_reply_e8d4e804")
- api.RegisterMessage((*LbVipDetails)(nil), "lb_vip_details_08f39bed")
- api.RegisterMessage((*LbVipDump)(nil), "lb_vip_dump_c7bcb124")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*LbAddDelAs)(nil),
- (*LbAddDelAsReply)(nil),
- (*LbAddDelIntfNat4)(nil),
- (*LbAddDelIntfNat4Reply)(nil),
- (*LbAddDelIntfNat6)(nil),
- (*LbAddDelIntfNat6Reply)(nil),
- (*LbAddDelVip)(nil),
- (*LbAddDelVipReply)(nil),
- (*LbAsDetails)(nil),
- (*LbAsDump)(nil),
- (*LbConf)(nil),
- (*LbConfReply)(nil),
- (*LbFlushVip)(nil),
- (*LbFlushVipReply)(nil),
- (*LbVipDetails)(nil),
- (*LbVipDump)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/lb/lb_rpc.ba.go b/internal/testbinapi/binapi2001/lb/lb_rpc.ba.go
deleted file mode 100644
index 43c0c4b..0000000
--- a/internal/testbinapi/binapi2001/lb/lb_rpc.ba.go
+++ /dev/null
@@ -1,172 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package lb
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service lb.
-type RPCService interface {
- LbAddDelAs(ctx context.Context, in *LbAddDelAs) (*LbAddDelAsReply, error)
- LbAddDelIntfNat4(ctx context.Context, in *LbAddDelIntfNat4) (*LbAddDelIntfNat4Reply, error)
- LbAddDelIntfNat6(ctx context.Context, in *LbAddDelIntfNat6) (*LbAddDelIntfNat6Reply, error)
- LbAddDelVip(ctx context.Context, in *LbAddDelVip) (*LbAddDelVipReply, error)
- LbAsDump(ctx context.Context, in *LbAsDump) (RPCService_LbAsDumpClient, error)
- LbConf(ctx context.Context, in *LbConf) (*LbConfReply, error)
- LbFlushVip(ctx context.Context, in *LbFlushVip) (*LbFlushVipReply, error)
- LbVipDump(ctx context.Context, in *LbVipDump) (RPCService_LbVipDumpClient, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) LbAddDelAs(ctx context.Context, in *LbAddDelAs) (*LbAddDelAsReply, error) {
- out := new(LbAddDelAsReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) LbAddDelIntfNat4(ctx context.Context, in *LbAddDelIntfNat4) (*LbAddDelIntfNat4Reply, error) {
- out := new(LbAddDelIntfNat4Reply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) LbAddDelIntfNat6(ctx context.Context, in *LbAddDelIntfNat6) (*LbAddDelIntfNat6Reply, error) {
- out := new(LbAddDelIntfNat6Reply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) LbAddDelVip(ctx context.Context, in *LbAddDelVip) (*LbAddDelVipReply, error) {
- out := new(LbAddDelVipReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) LbAsDump(ctx context.Context, in *LbAsDump) (RPCService_LbAsDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_LbAsDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_LbAsDumpClient interface {
- Recv() (*LbAsDetails, error)
- api.Stream
-}
-
-type serviceClient_LbAsDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_LbAsDumpClient) Recv() (*LbAsDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *LbAsDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) LbConf(ctx context.Context, in *LbConf) (*LbConfReply, error) {
- out := new(LbConfReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) LbFlushVip(ctx context.Context, in *LbFlushVip) (*LbFlushVipReply, error) {
- out := new(LbFlushVipReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) LbVipDump(ctx context.Context, in *LbVipDump) (RPCService_LbVipDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_LbVipDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_LbVipDumpClient interface {
- Recv() (*LbVipDetails, error)
- api.Stream
-}
-
-type serviceClient_LbVipDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_LbVipDumpClient) Recv() (*LbVipDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *LbVipDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
diff --git a/internal/testbinapi/binapi2001/lb_types/lb_types.ba.go b/internal/testbinapi/binapi2001/lb_types/lb_types.ba.go
deleted file mode 100644
index a2ac411..0000000
--- a/internal/testbinapi/binapi2001/lb_types/lb_types.ba.go
+++ /dev/null
@@ -1,810 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/plugins/lb_types.api.json
-
-// Package lb_types contains generated bindings for API file lb_types.api.
-//
-// Contents:
-// 5 aliases
-// 9 enums
-// 7 structs
-// 1 union
-//
-package lb_types
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "lb_types"
- APIVersion = ""
- VersionCrc = 0xd04207f3
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LbEncapType defines enum 'lb_encap_type'.
-type LbEncapType uint32
-
-const (
- LB_API_ENCAP_TYPE_GRE4 LbEncapType = 0
- LB_API_ENCAP_TYPE_GRE6 LbEncapType = 1
- LB_API_ENCAP_TYPE_L3DSR LbEncapType = 2
- LB_API_ENCAP_TYPE_NAT4 LbEncapType = 3
- LB_API_ENCAP_TYPE_NAT6 LbEncapType = 4
- LB_API_ENCAP_N_TYPES LbEncapType = 5
-)
-
-var (
- LbEncapType_name = map[uint32]string{
- 0: "LB_API_ENCAP_TYPE_GRE4",
- 1: "LB_API_ENCAP_TYPE_GRE6",
- 2: "LB_API_ENCAP_TYPE_L3DSR",
- 3: "LB_API_ENCAP_TYPE_NAT4",
- 4: "LB_API_ENCAP_TYPE_NAT6",
- 5: "LB_API_ENCAP_N_TYPES",
- }
- LbEncapType_value = map[string]uint32{
- "LB_API_ENCAP_TYPE_GRE4": 0,
- "LB_API_ENCAP_TYPE_GRE6": 1,
- "LB_API_ENCAP_TYPE_L3DSR": 2,
- "LB_API_ENCAP_TYPE_NAT4": 3,
- "LB_API_ENCAP_TYPE_NAT6": 4,
- "LB_API_ENCAP_N_TYPES": 5,
- }
-)
-
-func (x LbEncapType) String() string {
- s, ok := LbEncapType_name[uint32(x)]
- if ok {
- return s
- }
- return "LbEncapType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LbLkpTypeT defines enum 'lb_lkp_type_t'.
-type LbLkpTypeT uint32
-
-const (
- LB_API_LKP_SAME_IP_PORT LbLkpTypeT = 0
- LB_API_LKP_DIFF_IP_PORT LbLkpTypeT = 1
- LB_API_LKP_ALL_PORT_IP LbLkpTypeT = 2
- LB_API_LKP_N_TYPES LbLkpTypeT = 3
-)
-
-var (
- LbLkpTypeT_name = map[uint32]string{
- 0: "LB_API_LKP_SAME_IP_PORT",
- 1: "LB_API_LKP_DIFF_IP_PORT",
- 2: "LB_API_LKP_ALL_PORT_IP",
- 3: "LB_API_LKP_N_TYPES",
- }
- LbLkpTypeT_value = map[string]uint32{
- "LB_API_LKP_SAME_IP_PORT": 0,
- "LB_API_LKP_DIFF_IP_PORT": 1,
- "LB_API_LKP_ALL_PORT_IP": 2,
- "LB_API_LKP_N_TYPES": 3,
- }
-)
-
-func (x LbLkpTypeT) String() string {
- s, ok := LbLkpTypeT_name[uint32(x)]
- if ok {
- return s
- }
- return "LbLkpTypeT(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LbNatProtocol defines enum 'lb_nat_protocol'.
-type LbNatProtocol uint32
-
-const (
- LB_API_NAT_PROTOCOL_UDP LbNatProtocol = 6
- LB_API_NAT_PROTOCOL_TCP LbNatProtocol = 23
- LB_API_NAT_PROTOCOL_ANY LbNatProtocol = 4294967295
-)
-
-var (
- LbNatProtocol_name = map[uint32]string{
- 6: "LB_API_NAT_PROTOCOL_UDP",
- 23: "LB_API_NAT_PROTOCOL_TCP",
- 4294967295: "LB_API_NAT_PROTOCOL_ANY",
- }
- LbNatProtocol_value = map[string]uint32{
- "LB_API_NAT_PROTOCOL_UDP": 6,
- "LB_API_NAT_PROTOCOL_TCP": 23,
- "LB_API_NAT_PROTOCOL_ANY": 4294967295,
- }
-)
-
-func (x LbNatProtocol) String() string {
- s, ok := LbNatProtocol_name[uint32(x)]
- if ok {
- return s
- }
- return "LbNatProtocol(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LbSrvType defines enum 'lb_srv_type'.
-type LbSrvType uint32
-
-const (
- LB_API_SRV_TYPE_CLUSTERIP LbSrvType = 0
- LB_API_SRV_TYPE_NODEPORT LbSrvType = 1
- LB_API_SRV_N_TYPES LbSrvType = 2
-)
-
-var (
- LbSrvType_name = map[uint32]string{
- 0: "LB_API_SRV_TYPE_CLUSTERIP",
- 1: "LB_API_SRV_TYPE_NODEPORT",
- 2: "LB_API_SRV_N_TYPES",
- }
- LbSrvType_value = map[string]uint32{
- "LB_API_SRV_TYPE_CLUSTERIP": 0,
- "LB_API_SRV_TYPE_NODEPORT": 1,
- "LB_API_SRV_N_TYPES": 2,
- }
-)
-
-func (x LbSrvType) String() string {
- s, ok := LbSrvType_name[uint32(x)]
- if ok {
- return s
- }
- return "LbSrvType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LbVipType defines enum 'lb_vip_type'.
-type LbVipType uint32
-
-const (
- LB_API_VIP_TYPE_IP6_GRE6 LbVipType = 0
- LB_API_VIP_TYPE_IP6_GRE4 LbVipType = 1
- LB_API_VIP_TYPE_IP4_GRE6 LbVipType = 2
- LB_API_VIP_TYPE_IP4_GRE4 LbVipType = 3
- LB_API_VIP_TYPE_IP4_L3DSR LbVipType = 4
- LB_API_VIP_TYPE_IP4_NAT4 LbVipType = 5
- LB_API_VIP_TYPE_IP6_NAT6 LbVipType = 6
- LB_API_VIP_N_TYPES LbVipType = 7
-)
-
-var (
- LbVipType_name = map[uint32]string{
- 0: "LB_API_VIP_TYPE_IP6_GRE6",
- 1: "LB_API_VIP_TYPE_IP6_GRE4",
- 2: "LB_API_VIP_TYPE_IP4_GRE6",
- 3: "LB_API_VIP_TYPE_IP4_GRE4",
- 4: "LB_API_VIP_TYPE_IP4_L3DSR",
- 5: "LB_API_VIP_TYPE_IP4_NAT4",
- 6: "LB_API_VIP_TYPE_IP6_NAT6",
- 7: "LB_API_VIP_N_TYPES",
- }
- LbVipType_value = map[string]uint32{
- "LB_API_VIP_TYPE_IP6_GRE6": 0,
- "LB_API_VIP_TYPE_IP6_GRE4": 1,
- "LB_API_VIP_TYPE_IP4_GRE6": 2,
- "LB_API_VIP_TYPE_IP4_GRE4": 3,
- "LB_API_VIP_TYPE_IP4_L3DSR": 4,
- "LB_API_VIP_TYPE_IP4_NAT4": 5,
- "LB_API_VIP_TYPE_IP6_NAT6": 6,
- "LB_API_VIP_N_TYPES": 7,
- }
-)
-
-func (x LbVipType) String() string {
- s, ok := LbVipType_name[uint32(x)]
- if ok {
- return s
- }
- return "LbVipType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// LbVip defines type 'lb_vip'.
-type LbVip struct {
- Pfx AddressWithPrefix `binapi:"address_with_prefix,name=pfx" json:"pfx,omitempty"`
- Protocol IPProto `binapi:"ip_proto,name=protocol" json:"protocol,omitempty"`
- Port uint16 `binapi:"u16,name=port" json:"port,omitempty"`
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
diff --git a/internal/testbinapi/binapi2001/lisp/lisp.ba.go b/internal/testbinapi/binapi2001/lisp/lisp.ba.go
deleted file mode 100644
index dd605c7..0000000
--- a/internal/testbinapi/binapi2001/lisp/lisp.ba.go
+++ /dev/null
@@ -1,2568 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/lisp.api.json
-
-// Package lisp contains generated bindings for API file lisp.api.
-//
-// Contents:
-// 3 structs
-// 60 messages
-//
-package lisp
-
-import (
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the GoVPP api package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// GoVPP api package needs to be updated.
-const _ = api.GoVppAPIPackageIsVersion2
-
-const (
- APIFile = "lisp"
- APIVersion = "1.0.0"
- VersionCrc = 0x681568f8
-)
-
-// LispAdjacency defines type 'lisp_adjacency'.
-type LispAdjacency struct {
- EidType uint8 `binapi:"u8,name=eid_type" json:"eid_type,omitempty"`
- Reid []byte `binapi:"u8[16],name=reid" json:"reid,omitempty"`
- Leid []byte `binapi:"u8[16],name=leid" json:"leid,omitempty"`
- ReidPrefixLen uint8 `binapi:"u8,name=reid_prefix_len" json:"reid_prefix_len,omitempty"`
- LeidPrefixLen uint8 `binapi:"u8,name=leid_prefix_len" json:"leid_prefix_len,omitempty"`
-}
-
-// LocalLocator defines type 'local_locator'.
-type LocalLocator struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- Priority uint8 `binapi:"u8,name=priority" json:"priority,omitempty"`
- Weight uint8 `binapi:"u8,name=weight" json:"weight,omitempty"`
-}
-
-// RemoteLocator defines type 'remote_locator'.
-type RemoteLocator struct {
- IsIP4 uint8 `binapi:"u8,name=is_ip4" json:"is_ip4,omitempty"`
- Priority uint8 `binapi:"u8,name=priority" json:"priority,omitempty"`
- Weight uint8 `binapi:"u8,name=weight" json:"weight,omitempty"`
- Addr []byte `binapi:"u8[16],name=addr" json:"addr,omitempty"`
-}
-
-// LispAddDelAdjacency defines message 'lisp_add_del_adjacency'.
-type LispAddDelAdjacency struct {
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
- Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
- EidType uint8 `binapi:"u8,name=eid_type" json:"eid_type,omitempty"`
- Reid []byte `binapi:"u8[16],name=reid" json:"reid,omitempty"`
- Leid []byte `binapi:"u8[16],name=leid" json:"leid,omitempty"`
- ReidLen uint8 `binapi:"u8,name=reid_len" json:"reid_len,omitempty"`
- LeidLen uint8 `binapi:"u8,name=leid_len" json:"leid_len,omitempty"`
-}
-
-func (m *LispAddDelAdjacency) Reset() { *m = LispAddDelAdjacency{} }
-func (*LispAddDelAdjacency) GetMessageName() string { return "lisp_add_del_adjacency" }
-func (*LispAddDelAdjacency) GetCrcString() string { return "f047390d" }
-func (*LispAddDelAdjacency) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *LispAddDelAdjacency) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 4 // m.Vni
- size += 1 // m.EidType
- size += 1 * 16 // m.Reid
- size += 1 * 16 // m.Leid
- size += 1 // m.ReidLen
- size += 1 // m.LeidLen
- return size
-}
-func (m *LispAddDelAdjacency) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsAdd)
- buf.EncodeUint32(m.Vni)
- buf.EncodeUint8(m.EidType)
- buf.EncodeBytes(m.Reid, 16)
- buf.EncodeBytes(m.Leid, 16)
- buf.EncodeUint8(m.ReidLen)
- buf.EncodeUint8(m.LeidLen)
- return buf.Bytes(), nil
-}
-func (m *LispAddDelAdjacency) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeUint8()
- m.Vni = buf.DecodeUint32()
- m.EidType = buf.DecodeUint8()
- m.Reid = make([]byte, 16)
- copy(m.Reid, buf.DecodeBytes(len(m.Reid)))
- m.Leid = make([]byte, 16)
- copy(m.Leid, buf.DecodeBytes(len(m.Leid)))
- m.ReidLen = buf.DecodeUint8()
- m.LeidLen = buf.DecodeUint8()
- return nil
-}
-
-// LispAddDelAdjacencyReply defines message 'lisp_add_del_adjacency_reply'.
-type LispAddDelAdjacencyReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *LispAddDelAdjacencyReply) Reset() { *m = LispAddDelAdjacencyReply{} }
-func (*LispAddDelAdjacencyReply) GetMessageName() string { return "lisp_add_del_adjacency_reply" }
-func (*LispAddDelAdjacencyReply) GetCrcString() string { return "e8d4e804" }
-func (*LispAddDelAdjacencyReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *LispAddDelAdjacencyReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *LispAddDelAdjacencyReply) 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 *LispAddDelAdjacencyReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// LispAddDelLocalEid defines message 'lisp_add_del_local_eid'.
-type LispAddDelLocalEid struct {
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
- EidType uint8 `binapi:"u8,name=eid_type" json:"eid_type,omitempty"`
- Eid []byte `binapi:"u8[16],name=eid" json:"eid,omitempty"`
- PrefixLen uint8 `binapi:"u8,name=prefix_len" json:"prefix_len,omitempty"`
- LocatorSetName []byte `binapi:"u8[64],name=locator_set_name" json:"locator_set_name,omitempty"`
- Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
- KeyID uint16 `binapi:"u16,name=key_id" json:"key_id,omitempty"`
- Key []byte `binapi:"u8[64],name=key" json:"key,omitempty"`
-}
-
-func (m *LispAddDelLocalEid) Reset() { *m = LispAddDelLocalEid{} }
-func (*LispAddDelLocalEid) GetMessageName() string { return "lisp_add_del_local_eid" }
-func (*LispAddDelLocalEid) GetCrcString() string { return "e6d00717" }
-func (*LispAddDelLocalEid) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *LispAddDelLocalEid) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 1 // m.EidType
- size += 1 * 16 // m.Eid
- size += 1 // m.PrefixLen
- size += 1 * 64 // m.LocatorSetName
- size += 4 // m.Vni
- size += 2 // m.KeyID
- size += 1 * 64 // m.Key
- return size
-}
-func (m *LispAddDelLocalEid) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsAdd)
- buf.EncodeUint8(m.EidType)
- buf.EncodeBytes(m.Eid, 16)
- buf.EncodeUint8(m.PrefixLen)
- buf.EncodeBytes(m.LocatorSetName, 64)
- buf.EncodeUint32(m.Vni)
- buf.EncodeUint16(m.KeyID)
- buf.EncodeBytes(m.Key, 64)
- return buf.Bytes(), nil
-}
-func (m *LispAddDelLocalEid) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeUint8()
- m.EidType = buf.DecodeUint8()
- m.Eid = make([]byte, 16)
- copy(m.Eid, buf.DecodeBytes(len(m.Eid)))
- m.PrefixLen = buf.DecodeUint8()
- m.LocatorSetName = make([]byte, 64)
- copy(m.LocatorSetName, buf.DecodeBytes(len(m.LocatorSetName)))
- m.Vni = buf.DecodeUint32()
- m.KeyID = buf.DecodeUint16()
- m.Key = make([]byte, 64)
- copy(m.Key, buf.DecodeBytes(len(m.Key)))
- return nil
-}
-
-// LispAddDelLocalEidReply defines message 'lisp_add_del_local_eid_reply'.
-type LispAddDelLocalEidReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *LispAddDelLocalEidReply) Reset() { *m = LispAddDelLocalEidReply{} }
-func (*LispAddDelLocalEidReply) GetMessageName() string { return "lisp_add_del_local_eid_reply" }
-func (*LispAddDelLocalEidReply) GetCrcString() string { return "e8d4e804" }
-func (*LispAddDelLocalEidReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *LispAddDelLocalEidReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *LispAddDelLocalEidReply) 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 *LispAddDelLocalEidReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// LispAddDelLocator defines message 'lisp_add_del_locator'.
-type LispAddDelLocator struct {
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
- LocatorSetName []byte `binapi:"u8[64],name=locator_set_name" json:"locator_set_name,omitempty"`
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- Priority uint8 `binapi:"u8,name=priority" json:"priority,omitempty"`
- Weight uint8 `binapi:"u8,name=weight" json:"weight,omitempty"`
-}
-
-func (m *LispAddDelLocator) Reset() { *m = LispAddDelLocator{} }
-func (*LispAddDelLocator) GetMessageName() string { return "lisp_add_del_locator" }
-func (*LispAddDelLocator) GetCrcString() string { return "006a4240" }
-func (*LispAddDelLocator) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *LispAddDelLocator) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 1 * 64 // m.LocatorSetName
- size += 4 // m.SwIfIndex
- size += 1 // m.Priority
- size += 1 // m.Weight
- return size
-}
-func (m *LispAddDelLocator) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsAdd)
- buf.EncodeBytes(m.LocatorSetName, 64)
- buf.EncodeUint32(m.SwIfIndex)
- buf.EncodeUint8(m.Priority)
- buf.EncodeUint8(m.Weight)
- return buf.Bytes(), nil
-}
-func (m *LispAddDelLocator) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeUint8()
- m.LocatorSetName = make([]byte, 64)
- copy(m.LocatorSetName, buf.DecodeBytes(len(m.LocatorSetName)))
- m.SwIfIndex = buf.DecodeUint32()
- m.Priority = buf.DecodeUint8()
- m.Weight = buf.DecodeUint8()
- return nil
-}
-
-// LispAddDelLocatorReply defines message 'lisp_add_del_locator_reply'.
-type LispAddDelLocatorReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *LispAddDelLocatorReply) Reset() { *m = LispAddDelLocatorReply{} }
-func (*LispAddDelLocatorReply) GetMessageName() string { return "lisp_add_del_locator_reply" }
-func (*LispAddDelLocatorReply) GetCrcString() string { return "e8d4e804" }
-func (*LispAddDelLocatorReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *LispAddDelLocatorReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *LispAddDelLocatorReply) 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 *LispAddDelLocatorReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// LispAddDelLocatorSet defines message 'lisp_add_del_locator_set'.
-type LispAddDelLocatorSet struct {
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
- LocatorSetName []byte `binapi:"u8[64],name=locator_set_name" json:"locator_set_name,omitempty"`
- LocatorNum uint32 `binapi:"u32,name=locator_num" json:"-"`
- Locators []LocalLocator `binapi:"local_locator[locator_num],name=locators" json:"locators,omitempty"`
-}
-
-func (m *LispAddDelLocatorSet) Reset() { *m = LispAddDelLocatorSet{} }
-func (*LispAddDelLocatorSet) GetMessageName() string { return "lisp_add_del_locator_set" }
-func (*LispAddDelLocatorSet) GetCrcString() string { return "06968e38" }
-func (*LispAddDelLocatorSet) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *LispAddDelLocatorSet) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 1 * 64 // m.LocatorSetName
- size += 4 // m.LocatorNum
- for j1 := 0; j1 < len(m.Locators); j1++ {
- var s1 LocalLocator
- _ = s1
- if j1 < len(m.Locators) {
- s1 = m.Locators[j1]
- }
- size += 4 // s1.SwIfIndex
- size += 1 // s1.Priority
- size += 1 // s1.Weight
- }
- return size
-}
-func (m *LispAddDelLocatorSet) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsAdd)
- buf.EncodeBytes(m.LocatorSetName, 64)
- buf.EncodeUint32(uint32(len(m.Locators)))
- for j0 := 0; j0 < len(m.Locators); j0++ {
- var v0 LocalLocator // Locators
- if j0 < len(m.Locators) {
- v0 = m.Locators[j0]
- }
- buf.EncodeUint32(v0.SwIfIndex)
- buf.EncodeUint8(v0.Priority)
- buf.EncodeUint8(v0.Weight)
- }
- return buf.Bytes(), nil
-}
-func (m *LispAddDelLocatorSet) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeUint8()
- m.LocatorSetName = make([]byte, 64)
- copy(m.LocatorSetName, buf.DecodeBytes(len(m.LocatorSetName)))
- m.LocatorNum = buf.DecodeUint32()
- m.Locators = make([]LocalLocator, m.LocatorNum)
- for j0 := 0; j0 < len(m.Locators); j0++ {
- m.Locators[j0].SwIfIndex = buf.DecodeUint32()
- m.Locators[j0].Priority = buf.DecodeUint8()
- m.Locators[j0].Weight = buf.DecodeUint8()
- }
- return nil
-}
-
-// LispAddDelLocatorSetReply defines message 'lisp_add_del_locator_set_reply'.
-type LispAddDelLocatorSetReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- LsIndex uint32 `binapi:"u32,name=ls_index" json:"ls_index,omitempty"`
-}
-
-func (m *LispAddDelLocatorSetReply) Reset() { *m = LispAddDelLocatorSetReply{} }
-func (*LispAddDelLocatorSetReply) GetMessageName() string { return "lisp_add_del_locator_set_reply" }
-func (*LispAddDelLocatorSetReply) GetCrcString() string { return "b6666db4" }
-func (*LispAddDelLocatorSetReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *LispAddDelLocatorSetReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.LsIndex
- return size
-}
-func (m *LispAddDelLocatorSetReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.LsIndex)
- return buf.Bytes(), nil
-}
-func (m *LispAddDelLocatorSetReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.LsIndex = buf.DecodeUint32()
- return nil
-}
-
-// LispAddDelMapRequestItrRlocs defines message 'lisp_add_del_map_request_itr_rlocs'.
-type LispAddDelMapRequestItrRlocs struct {
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
- LocatorSetName []byte `binapi:"u8[64],name=locator_set_name" json:"locator_set_name,omitempty"`
-}
-
-func (m *LispAddDelMapRequestItrRlocs) Reset() { *m = LispAddDelMapRequestItrRlocs{} }
-func (*LispAddDelMapRequestItrRlocs) GetMessageName() string {
- return "lisp_add_del_map_request_itr_rlocs"
-}
-func (*LispAddDelMapRequestItrRlocs) GetCrcString() string { return "c7c6cb2f" }
-func (*LispAddDelMapRequestItrRlocs) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *LispAddDelMapRequestItrRlocs) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 1 * 64 // m.LocatorSetName
- return size
-}
-func (m *LispAddDelMapRequestItrRlocs) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsAdd)
- buf.EncodeBytes(m.LocatorSetName, 64)
- return buf.Bytes(), nil
-}
-func (m *LispAddDelMapRequestItrRlocs) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeUint8()
- m.LocatorSetName = make([]byte, 64)
- copy(m.LocatorSetName, buf.DecodeBytes(len(m.LocatorSetName)))
- return nil
-}
-
-// LispAddDelMapRequestItrRlocsReply defines message 'lisp_add_del_map_request_itr_rlocs_reply'.
-type LispAddDelMapRequestItrRlocsReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *LispAddDelMapRequestItrRlocsReply) Reset() { *m = LispAddDelMapRequestItrRlocsReply{} }
-func (*LispAddDelMapRequestItrRlocsReply) GetMessageName() string {
- return "lisp_add_del_map_request_itr_rlocs_reply"
-}
-func (*LispAddDelMapRequestItrRlocsReply) GetCrcString() string { return "e8d4e804" }
-func (*LispAddDelMapRequestItrRlocsReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *LispAddDelMapRequestItrRlocsReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *LispAddDelMapRequestItrRlocsReply) 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 *LispAddDelMapRequestItrRlocsReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// LispAddDelMapResolver defines message 'lisp_add_del_map_resolver'.
-type LispAddDelMapResolver struct {
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
- IsIPv6 uint8 `binapi:"u8,name=is_ipv6" json:"is_ipv6,omitempty"`
- IPAddress []byte `binapi:"u8[16],name=ip_address" json:"ip_address,omitempty"`
-}
-
-func (m *LispAddDelMapResolver) Reset() { *m = LispAddDelMapResolver{} }
-func (*LispAddDelMapResolver) GetMessageName() string { return "lisp_add_del_map_resolver" }
-func (*LispAddDelMapResolver) GetCrcString() string { return "0ebcd37d" }
-func (*LispAddDelMapResolver) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *LispAddDelMapResolver) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 1 // m.IsIPv6
- size += 1 * 16 // m.IPAddress
- return size
-}
-func (m *LispAddDelMapResolver) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsAdd)
- buf.EncodeUint8(m.IsIPv6)
- buf.EncodeBytes(m.IPAddress, 16)
- return buf.Bytes(), nil
-}
-func (m *LispAddDelMapResolver) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeUint8()
- m.IsIPv6 = buf.DecodeUint8()
- m.IPAddress = make([]byte, 16)
- copy(m.IPAddress, buf.DecodeBytes(len(m.IPAddress)))
- return nil
-}
-
-// LispAddDelMapResolverReply defines message 'lisp_add_del_map_resolver_reply'.
-type LispAddDelMapResolverReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *LispAddDelMapResolverReply) Reset() { *m = LispAddDelMapResolverReply{} }
-func (*LispAddDelMapResolverReply) GetMessageName() string { return "lisp_add_del_map_resolver_reply" }
-func (*LispAddDelMapResolverReply) GetCrcString() string { return "e8d4e804" }
-func (*LispAddDelMapResolverReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *LispAddDelMapResolverReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *LispAddDelMapResolverReply) 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 *LispAddDelMapResolverReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// LispAddDelMapServer defines message 'lisp_add_del_map_server'.
-type LispAddDelMapServer struct {
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
- IsIPv6 uint8 `binapi:"u8,name=is_ipv6" json:"is_ipv6,omitempty"`
- IPAddress []byte `binapi:"u8[16],name=ip_address" json:"ip_address,omitempty"`
-}
-
-func (m *LispAddDelMapServer) Reset() { *m = LispAddDelMapServer{} }
-func (*LispAddDelMapServer) GetMessageName() string { return "lisp_add_del_map_server" }
-func (*LispAddDelMapServer) GetCrcString() string { return "0ebcd37d" }
-func (*LispAddDelMapServer) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *LispAddDelMapServer) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 1 // m.IsIPv6
- size += 1 * 16 // m.IPAddress
- return size
-}
-func (m *LispAddDelMapServer) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsAdd)
- buf.EncodeUint8(m.IsIPv6)
- buf.EncodeBytes(m.IPAddress, 16)
- return buf.Bytes(), nil
-}
-func (m *LispAddDelMapServer) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeUint8()
- m.IsIPv6 = buf.DecodeUint8()
- m.IPAddress = make([]byte, 16)
- copy(m.IPAddress, buf.DecodeBytes(len(m.IPAddress)))
- return nil
-}
-
-// LispAddDelMapServerReply defines message 'lisp_add_del_map_server_reply'.
-type LispAddDelMapServerReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *LispAddDelMapServerReply) Reset() { *m = LispAddDelMapServerReply{} }
-func (*LispAddDelMapServerReply) GetMessageName() string { return "lisp_add_del_map_server_reply" }
-func (*LispAddDelMapServerReply) GetCrcString() string { return "e8d4e804" }
-func (*LispAddDelMapServerReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *LispAddDelMapServerReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *LispAddDelMapServerReply) 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 *LispAddDelMapServerReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// LispAddDelRemoteMapping defines message 'lisp_add_del_remote_mapping'.
-type LispAddDelRemoteMapping struct {
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
- IsSrcDst uint8 `binapi:"u8,name=is_src_dst" json:"is_src_dst,omitempty"`
- DelAll uint8 `binapi:"u8,name=del_all" json:"del_all,omitempty"`
- Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
- Action uint8 `binapi:"u8,name=action" json:"action,omitempty"`
- EidType uint8 `binapi:"u8,name=eid_type" json:"eid_type,omitempty"`
- Eid []byte `binapi:"u8[16],name=eid" json:"eid,omitempty"`
- EidLen uint8 `binapi:"u8,name=eid_len" json:"eid_len,omitempty"`
- Seid []byte `binapi:"u8[16],name=seid" json:"seid,omitempty"`
- SeidLen uint8 `binapi:"u8,name=seid_len" json:"seid_len,omitempty"`
- RlocNum uint32 `binapi:"u32,name=rloc_num" json:"-"`
- Rlocs []RemoteLocator `binapi:"remote_locator[rloc_num],name=rlocs" json:"rlocs,omitempty"`
-}
-
-func (m *LispAddDelRemoteMapping) Reset() { *m = LispAddDelRemoteMapping{} }
-func (*LispAddDelRemoteMapping) GetMessageName() string { return "lisp_add_del_remote_mapping" }
-func (*LispAddDelRemoteMapping) GetCrcString() string { return "b879c3a9" }
-func (*LispAddDelRemoteMapping) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *LispAddDelRemoteMapping) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 1 // m.IsSrcDst
- size += 1 // m.DelAll
- size += 4 // m.Vni
- size += 1 // m.Action
- size += 1 // m.EidType
- size += 1 * 16 // m.Eid
- size += 1 // m.EidLen
- size += 1 * 16 // m.Seid
- size += 1 // m.SeidLen
- size += 4 // m.RlocNum
- for j1 := 0; j1 < len(m.Rlocs); j1++ {
- var s1 RemoteLocator
- _ = s1
- if j1 < len(m.Rlocs) {
- s1 = m.Rlocs[j1]
- }
- size += 1 // s1.IsIP4
- size += 1 // s1.Priority
- size += 1 // s1.Weight
- size += 1 * 16 // s1.Addr
- }
- return size
-}
-func (m *LispAddDelRemoteMapping) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsAdd)
- buf.EncodeUint8(m.IsSrcDst)
- buf.EncodeUint8(m.DelAll)
- buf.EncodeUint32(m.Vni)
- buf.EncodeUint8(m.Action)
- buf.EncodeUint8(m.EidType)
- buf.EncodeBytes(m.Eid, 16)
- buf.EncodeUint8(m.EidLen)
- buf.EncodeBytes(m.Seid, 16)
- buf.EncodeUint8(m.SeidLen)
- buf.EncodeUint32(uint32(len(m.Rlocs)))
- for j0 := 0; j0 < len(m.Rlocs); j0++ {
- var v0 RemoteLocator // Rlocs
- if j0 < len(m.Rlocs) {
- v0 = m.Rlocs[j0]
- }
- buf.EncodeUint8(v0.IsIP4)
- buf.EncodeUint8(v0.Priority)
- buf.EncodeUint8(v0.Weight)
- buf.EncodeBytes(v0.Addr, 16)
- }
- return buf.Bytes(), nil
-}
-func (m *LispAddDelRemoteMapping) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeUint8()
- m.IsSrcDst = buf.DecodeUint8()
- m.DelAll = buf.DecodeUint8()
- m.Vni = buf.DecodeUint32()
- m.Action = buf.DecodeUint8()
- m.EidType = buf.DecodeUint8()
- m.Eid = make([]byte, 16)
- copy(m.Eid, buf.DecodeBytes(len(m.Eid)))
- m.EidLen = buf.DecodeUint8()
- m.Seid = make([]byte, 16)
- copy(m.Seid, buf.DecodeBytes(len(m.Seid)))
- m.SeidLen = buf.DecodeUint8()
- m.RlocNum = buf.DecodeUint32()
- m.Rlocs = make([]RemoteLocator, m.RlocNum)
- for j0 := 0; j0 < len(m.Rlocs); j0++ {
- m.Rlocs[j0].IsIP4 = buf.DecodeUint8()
- m.Rlocs[j0].Priority = buf.DecodeUint8()
- m.Rlocs[j0].Weight = buf.DecodeUint8()
- m.Rlocs[j0].Addr = make([]byte, 16)
- copy(m.Rlocs[j0].Addr, buf.DecodeBytes(len(m.Rlocs[j0].Addr)))
- }
- return nil
-}
-
-// LispAddDelRemoteMappingReply defines message 'lisp_add_del_remote_mapping_reply'.
-type LispAddDelRemoteMappingReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *LispAddDelRemoteMappingReply) Reset() { *m = LispAddDelRemoteMappingReply{} }
-func (*LispAddDelRemoteMappingReply) GetMessageName() string {
- return "lisp_add_del_remote_mapping_reply"
-}
-func (*LispAddDelRemoteMappingReply) GetCrcString() string { return "e8d4e804" }
-func (*LispAddDelRemoteMappingReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *LispAddDelRemoteMappingReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *LispAddDelRemoteMappingReply) 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 *LispAddDelRemoteMappingReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// LispAdjacenciesGet defines message 'lisp_adjacencies_get'.
-type LispAdjacenciesGet struct {
- Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
-}
-
-func (m *LispAdjacenciesGet) Reset() { *m = LispAdjacenciesGet{} }
-func (*LispAdjacenciesGet) GetMessageName() string { return "lisp_adjacencies_get" }
-func (*LispAdjacenciesGet) GetCrcString() string { return "8d1f2fe9" }
-func (*LispAdjacenciesGet) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *LispAdjacenciesGet) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Vni
- return size
-}
-func (m *LispAdjacenciesGet) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Vni)
- return buf.Bytes(), nil
-}
-func (m *LispAdjacenciesGet) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Vni = buf.DecodeUint32()
- return nil
-}
-
-// LispAdjacenciesGetReply defines message 'lisp_adjacencies_get_reply'.
-type LispAdjacenciesGetReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- Count uint32 `binapi:"u32,name=count" json:"-"`
- Adjacencies []LispAdjacency `binapi:"lisp_adjacency[count],name=adjacencies" json:"adjacencies,omitempty"`
-}
-
-func (m *LispAdjacenciesGetReply) Reset() { *m = LispAdjacenciesGetReply{} }
-func (*LispAdjacenciesGetReply) GetMessageName() string { return "lisp_adjacencies_get_reply" }
-func (*LispAdjacenciesGetReply) GetCrcString() string { return "ada0f464" }
-func (*LispAdjacenciesGetReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *LispAdjacenciesGetReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.Count
- for j1 := 0; j1 < len(m.Adjacencies); j1++ {
- var s1 LispAdjacency
- _ = s1
- if j1 < len(m.Adjacencies) {
- s1 = m.Adjacencies[j1]
- }
- size += 1 // s1.EidType
- size += 1 * 16 // s1.Reid
- size += 1 * 16 // s1.Leid
- size += 1 // s1.ReidPrefixLen
- size += 1 // s1.LeidPrefixLen
- }
- return size
-}
-func (m *LispAdjacenciesGetReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(uint32(len(m.Adjacencies)))
- for j0 := 0; j0 < len(m.Adjacencies); j0++ {
- var v0 LispAdjacency // Adjacencies
- if j0 < len(m.Adjacencies) {
- v0 = m.Adjacencies[j0]
- }
- buf.EncodeUint8(v0.EidType)
- buf.EncodeBytes(v0.Reid, 16)
- buf.EncodeBytes(v0.Leid, 16)
- buf.EncodeUint8(v0.ReidPrefixLen)
- buf.EncodeUint8(v0.LeidPrefixLen)
- }
- return buf.Bytes(), nil
-}
-func (m *LispAdjacenciesGetReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.Count = buf.DecodeUint32()
- m.Adjacencies = make([]LispAdjacency, m.Count)
- for j0 := 0; j0 < len(m.Adjacencies); j0++ {
- m.Adjacencies[j0].EidType = buf.DecodeUint8()
- m.Adjacencies[j0].Reid = make([]byte, 16)
- copy(m.Adjacencies[j0].Reid, buf.DecodeBytes(len(m.Adjacencies[j0].Reid)))
- m.Adjacencies[j0].Leid = make([]byte, 16)
- copy(m.Adjacencies[j0].Leid, buf.DecodeBytes(len(m.Adjacencies[j0].Leid)))
- m.Adjacencies[j0].ReidPrefixLen = buf.DecodeUint8()
- m.Adjacencies[j0].LeidPrefixLen = buf.DecodeUint8()
- }
- return nil
-}
-
-// LispEidTableAddDelMap defines message 'lisp_eid_table_add_del_map'.
-type LispEidTableAddDelMap struct {
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
- Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
- DpTable uint32 `binapi:"u32,name=dp_table" json:"dp_table,omitempty"`
- IsL2 uint8 `binapi:"u8,name=is_l2" json:"is_l2,omitempty"`
-}
-
-func (m *LispEidTableAddDelMap) Reset() { *m = LispEidTableAddDelMap{} }
-func (*LispEidTableAddDelMap) GetMessageName() string { return "lisp_eid_table_add_del_map" }
-func (*LispEidTableAddDelMap) GetCrcString() string { return "59e9975e" }
-func (*LispEidTableAddDelMap) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *LispEidTableAddDelMap) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 4 // m.Vni
- size += 4 // m.DpTable
- size += 1 // m.IsL2
- return size
-}
-func (m *LispEidTableAddDelMap) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsAdd)
- buf.EncodeUint32(m.Vni)
- buf.EncodeUint32(m.DpTable)
- buf.EncodeUint8(m.IsL2)
- return buf.Bytes(), nil
-}
-func (m *LispEidTableAddDelMap) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeUint8()
- m.Vni = buf.DecodeUint32()
- m.DpTable = buf.DecodeUint32()
- m.IsL2 = buf.DecodeUint8()
- return nil
-}
-
-// LispEidTableAddDelMapReply defines message 'lisp_eid_table_add_del_map_reply'.
-type LispEidTableAddDelMapReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *LispEidTableAddDelMapReply) Reset() { *m = LispEidTableAddDelMapReply{} }
-func (*LispEidTableAddDelMapReply) GetMessageName() string { return "lisp_eid_table_add_del_map_reply" }
-func (*LispEidTableAddDelMapReply) GetCrcString() string { return "e8d4e804" }
-func (*LispEidTableAddDelMapReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *LispEidTableAddDelMapReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *LispEidTableAddDelMapReply) 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 *LispEidTableAddDelMapReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// LispEidTableDetails defines message 'lisp_eid_table_details'.
-type LispEidTableDetails struct {
- LocatorSetIndex uint32 `binapi:"u32,name=locator_set_index" json:"locator_set_index,omitempty"`
- Action uint8 `binapi:"u8,name=action" json:"action,omitempty"`
- IsLocal uint8 `binapi:"u8,name=is_local" json:"is_local,omitempty"`
- EidType uint8 `binapi:"u8,name=eid_type" json:"eid_type,omitempty"`
- IsSrcDst uint8 `binapi:"u8,name=is_src_dst" json:"is_src_dst,omitempty"`
- Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
- Eid []byte `binapi:"u8[16],name=eid" json:"eid,omitempty"`
- EidPrefixLen uint8 `binapi:"u8,name=eid_prefix_len" json:"eid_prefix_len,omitempty"`
- Seid []byte `binapi:"u8[16],name=seid" json:"seid,omitempty"`
- SeidPrefixLen uint8 `binapi:"u8,name=seid_prefix_len" json:"seid_prefix_len,omitempty"`
- TTL uint32 `binapi:"u32,name=ttl" json:"ttl,omitempty"`
- Authoritative uint8 `binapi:"u8,name=authoritative" json:"authoritative,omitempty"`
- KeyID uint16 `binapi:"u16,name=key_id" json:"key_id,omitempty"`
- Key []byte `binapi:"u8[64],name=key" json:"key,omitempty"`
-}
-
-func (m *LispEidTableDetails) Reset() { *m = LispEidTableDetails{} }
-func (*LispEidTableDetails) GetMessageName() string { return "lisp_eid_table_details" }
-func (*LispEidTableDetails) GetCrcString() string { return "dcd9f414" }
-func (*LispEidTableDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *LispEidTableDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.LocatorSetIndex
- size += 1 // m.Action
- size += 1 // m.IsLocal
- size += 1 // m.EidType
- size += 1 // m.IsSrcDst
- size += 4 // m.Vni
- size += 1 * 16 // m.Eid
- size += 1 // m.EidPrefixLen
- size += 1 * 16 // m.Seid
- size += 1 // m.SeidPrefixLen
- size += 4 // m.TTL
- size += 1 // m.Authoritative
- size += 2 // m.KeyID
- size += 1 * 64 // m.Key
- return size
-}
-func (m *LispEidTableDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.LocatorSetIndex)
- buf.EncodeUint8(m.Action)
- buf.EncodeUint8(m.IsLocal)
- buf.EncodeUint8(m.EidType)
- buf.EncodeUint8(m.IsSrcDst)
- buf.EncodeUint32(m.Vni)
- buf.EncodeBytes(m.Eid, 16)
- buf.EncodeUint8(m.EidPrefixLen)
- buf.EncodeBytes(m.Seid, 16)
- buf.EncodeUint8(m.SeidPrefixLen)
- buf.EncodeUint32(m.TTL)
- buf.EncodeUint8(m.Authoritative)
- buf.EncodeUint16(m.KeyID)
- buf.EncodeBytes(m.Key, 64)
- return buf.Bytes(), nil
-}
-func (m *LispEidTableDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.LocatorSetIndex = buf.DecodeUint32()
- m.Action = buf.DecodeUint8()
- m.IsLocal = buf.DecodeUint8()
- m.EidType = buf.DecodeUint8()
- m.IsSrcDst = buf.DecodeUint8()
- m.Vni = buf.DecodeUint32()
- m.Eid = make([]byte, 16)
- copy(m.Eid, buf.DecodeBytes(len(m.Eid)))
- m.EidPrefixLen = buf.DecodeUint8()
- m.Seid = make([]byte, 16)
- copy(m.Seid, buf.DecodeBytes(len(m.Seid)))
- m.SeidPrefixLen = buf.DecodeUint8()
- m.TTL = buf.DecodeUint32()
- m.Authoritative = buf.DecodeUint8()
- m.KeyID = buf.DecodeUint16()
- m.Key = make([]byte, 64)
- copy(m.Key, buf.DecodeBytes(len(m.Key)))
- return nil
-}
-
-// LispEidTableDump defines message 'lisp_eid_table_dump'.
-type LispEidTableDump struct {
- EidSet uint8 `binapi:"u8,name=eid_set" json:"eid_set,omitempty"`
- PrefixLength uint8 `binapi:"u8,name=prefix_length" json:"prefix_length,omitempty"`
- Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
- EidType uint8 `binapi:"u8,name=eid_type" json:"eid_type,omitempty"`
- Eid []byte `binapi:"u8[16],name=eid" json:"eid,omitempty"`
- Filter uint8 `binapi:"u8,name=filter" json:"filter,omitempty"`
-}
-
-func (m *LispEidTableDump) Reset() { *m = LispEidTableDump{} }
-func (*LispEidTableDump) GetMessageName() string { return "lisp_eid_table_dump" }
-func (*LispEidTableDump) GetCrcString() string { return "e0df64da" }
-func (*LispEidTableDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *LispEidTableDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.EidSet
- size += 1 // m.PrefixLength
- size += 4 // m.Vni
- size += 1 // m.EidType
- size += 1 * 16 // m.Eid
- size += 1 // m.Filter
- return size
-}
-func (m *LispEidTableDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.EidSet)
- buf.EncodeUint8(m.PrefixLength)
- buf.EncodeUint32(m.Vni)
- buf.EncodeUint8(m.EidType)
- buf.EncodeBytes(m.Eid, 16)
- buf.EncodeUint8(m.Filter)
- return buf.Bytes(), nil
-}
-func (m *LispEidTableDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.EidSet = buf.DecodeUint8()
- m.PrefixLength = buf.DecodeUint8()
- m.Vni = buf.DecodeUint32()
- m.EidType = buf.DecodeUint8()
- m.Eid = make([]byte, 16)
- copy(m.Eid, buf.DecodeBytes(len(m.Eid)))
- m.Filter = buf.DecodeUint8()
- return nil
-}
-
-// LispEidTableMapDetails defines message 'lisp_eid_table_map_details'.
-type LispEidTableMapDetails struct {
- Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
- DpTable uint32 `binapi:"u32,name=dp_table" json:"dp_table,omitempty"`
-}
-
-func (m *LispEidTableMapDetails) Reset() { *m = LispEidTableMapDetails{} }
-func (*LispEidTableMapDetails) GetMessageName() string { return "lisp_eid_table_map_details" }
-func (*LispEidTableMapDetails) GetCrcString() string { return "0b6859e2" }
-func (*LispEidTableMapDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *LispEidTableMapDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Vni
- size += 4 // m.DpTable
- return size
-}
-func (m *LispEidTableMapDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Vni)
- buf.EncodeUint32(m.DpTable)
- return buf.Bytes(), nil
-}
-func (m *LispEidTableMapDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Vni = buf.DecodeUint32()
- m.DpTable = buf.DecodeUint32()
- return nil
-}
-
-// LispEidTableMapDump defines message 'lisp_eid_table_map_dump'.
-type LispEidTableMapDump struct {
- IsL2 uint8 `binapi:"u8,name=is_l2" json:"is_l2,omitempty"`
-}
-
-func (m *LispEidTableMapDump) Reset() { *m = LispEidTableMapDump{} }
-func (*LispEidTableMapDump) GetMessageName() string { return "lisp_eid_table_map_dump" }
-func (*LispEidTableMapDump) GetCrcString() string { return "67c54650" }
-func (*LispEidTableMapDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *LispEidTableMapDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsL2
- return size
-}
-func (m *LispEidTableMapDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsL2)
- return buf.Bytes(), nil
-}
-func (m *LispEidTableMapDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsL2 = buf.DecodeUint8()
- return nil
-}
-
-// LispEidTableVniDetails defines message 'lisp_eid_table_vni_details'.
-type LispEidTableVniDetails struct {
- Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
-}
-
-func (m *LispEidTableVniDetails) Reset() { *m = LispEidTableVniDetails{} }
-func (*LispEidTableVniDetails) GetMessageName() string { return "lisp_eid_table_vni_details" }
-func (*LispEidTableVniDetails) GetCrcString() string { return "64abc01e" }
-func (*LispEidTableVniDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *LispEidTableVniDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Vni
- return size
-}
-func (m *LispEidTableVniDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Vni)
- return buf.Bytes(), nil
-}
-func (m *LispEidTableVniDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Vni = buf.DecodeUint32()
- return nil
-}
-
-// LispEidTableVniDump defines message 'lisp_eid_table_vni_dump'.
-type LispEidTableVniDump struct{}
-
-func (m *LispEidTableVniDump) Reset() { *m = LispEidTableVniDump{} }
-func (*LispEidTableVniDump) GetMessageName() string { return "lisp_eid_table_vni_dump" }
-func (*LispEidTableVniDump) GetCrcString() string { return "51077d14" }
-func (*LispEidTableVniDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *LispEidTableVniDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *LispEidTableVniDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *LispEidTableVniDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// LispEnableDisable defines message 'lisp_enable_disable'.
-type LispEnableDisable struct {
- IsEn uint8 `binapi:"u8,name=is_en" json:"is_en,omitempty"`
-}
-
-func (m *LispEnableDisable) Reset() { *m = LispEnableDisable{} }
-func (*LispEnableDisable) GetMessageName() string { return "lisp_enable_disable" }
-func (*LispEnableDisable) GetCrcString() string { return "eb0e943b" }
-func (*LispEnableDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *LispEnableDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsEn
- return size
-}
-func (m *LispEnableDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsEn)
- return buf.Bytes(), nil
-}
-func (m *LispEnableDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsEn = buf.DecodeUint8()
- return nil
-}
-
-// LispEnableDisableReply defines message 'lisp_enable_disable_reply'.
-type LispEnableDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *LispEnableDisableReply) Reset() { *m = LispEnableDisableReply{} }
-func (*LispEnableDisableReply) GetMessageName() string { return "lisp_enable_disable_reply" }
-func (*LispEnableDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*LispEnableDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *LispEnableDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *LispEnableDisableReply) 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 *LispEnableDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// LispGetMapRequestItrRlocs defines message 'lisp_get_map_request_itr_rlocs'.
-type LispGetMapRequestItrRlocs struct{}
-
-func (m *LispGetMapRequestItrRlocs) Reset() { *m = LispGetMapRequestItrRlocs{} }
-func (*LispGetMapRequestItrRlocs) GetMessageName() string { return "lisp_get_map_request_itr_rlocs" }
-func (*LispGetMapRequestItrRlocs) GetCrcString() string { return "51077d14" }
-func (*LispGetMapRequestItrRlocs) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *LispGetMapRequestItrRlocs) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *LispGetMapRequestItrRlocs) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *LispGetMapRequestItrRlocs) Unmarshal(b []byte) error {
- return nil
-}
-
-// LispGetMapRequestItrRlocsReply defines message 'lisp_get_map_request_itr_rlocs_reply'.
-type LispGetMapRequestItrRlocsReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- LocatorSetName []byte `binapi:"u8[64],name=locator_set_name" json:"locator_set_name,omitempty"`
-}
-
-func (m *LispGetMapRequestItrRlocsReply) Reset() { *m = LispGetMapRequestItrRlocsReply{} }
-func (*LispGetMapRequestItrRlocsReply) GetMessageName() string {
- return "lisp_get_map_request_itr_rlocs_reply"
-}
-func (*LispGetMapRequestItrRlocsReply) GetCrcString() string { return "9f56f6f7" }
-func (*LispGetMapRequestItrRlocsReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *LispGetMapRequestItrRlocsReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 1 * 64 // m.LocatorSetName
- return size
-}
-func (m *LispGetMapRequestItrRlocsReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeBytes(m.LocatorSetName, 64)
- return buf.Bytes(), nil
-}
-func (m *LispGetMapRequestItrRlocsReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.LocatorSetName = make([]byte, 64)
- copy(m.LocatorSetName, buf.DecodeBytes(len(m.LocatorSetName)))
- return nil
-}
-
-// LispLocatorDetails defines message 'lisp_locator_details'.
-type LispLocatorDetails struct {
- Local uint8 `binapi:"u8,name=local" json:"local,omitempty"`
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- IsIPv6 uint8 `binapi:"u8,name=is_ipv6" json:"is_ipv6,omitempty"`
- IPAddress []byte `binapi:"u8[16],name=ip_address" json:"ip_address,omitempty"`
- Priority uint8 `binapi:"u8,name=priority" json:"priority,omitempty"`
- Weight uint8 `binapi:"u8,name=weight" json:"weight,omitempty"`
-}
-
-func (m *LispLocatorDetails) Reset() { *m = LispLocatorDetails{} }
-func (*LispLocatorDetails) GetMessageName() string { return "lisp_locator_details" }
-func (*LispLocatorDetails) GetCrcString() string { return "b3988a30" }
-func (*LispLocatorDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *LispLocatorDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.Local
- size += 4 // m.SwIfIndex
- size += 1 // m.IsIPv6
- size += 1 * 16 // m.IPAddress
- size += 1 // m.Priority
- size += 1 // m.Weight
- return size
-}
-func (m *LispLocatorDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.Local)
- buf.EncodeUint32(m.SwIfIndex)
- buf.EncodeUint8(m.IsIPv6)
- buf.EncodeBytes(m.IPAddress, 16)
- buf.EncodeUint8(m.Priority)
- buf.EncodeUint8(m.Weight)
- return buf.Bytes(), nil
-}
-func (m *LispLocatorDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Local = buf.DecodeUint8()
- m.SwIfIndex = buf.DecodeUint32()
- m.IsIPv6 = buf.DecodeUint8()
- m.IPAddress = make([]byte, 16)
- copy(m.IPAddress, buf.DecodeBytes(len(m.IPAddress)))
- m.Priority = buf.DecodeUint8()
- m.Weight = buf.DecodeUint8()
- return nil
-}
-
-// LispLocatorDump defines message 'lisp_locator_dump'.
-type LispLocatorDump struct {
- LsIndex uint32 `binapi:"u32,name=ls_index" json:"ls_index,omitempty"`
- LsName []byte `binapi:"u8[64],name=ls_name" json:"ls_name,omitempty"`
- IsIndexSet uint8 `binapi:"u8,name=is_index_set" json:"is_index_set,omitempty"`
-}
-
-func (m *LispLocatorDump) Reset() { *m = LispLocatorDump{} }
-func (*LispLocatorDump) GetMessageName() string { return "lisp_locator_dump" }
-func (*LispLocatorDump) GetCrcString() string { return "f27d5050" }
-func (*LispLocatorDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *LispLocatorDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.LsIndex
- size += 1 * 64 // m.LsName
- size += 1 // m.IsIndexSet
- return size
-}
-func (m *LispLocatorDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.LsIndex)
- buf.EncodeBytes(m.LsName, 64)
- buf.EncodeUint8(m.IsIndexSet)
- return buf.Bytes(), nil
-}
-func (m *LispLocatorDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.LsIndex = buf.DecodeUint32()
- m.LsName = make([]byte, 64)
- copy(m.LsName, buf.DecodeBytes(len(m.LsName)))
- m.IsIndexSet = buf.DecodeUint8()
- return nil
-}
-
-// LispLocatorSetDetails defines message 'lisp_locator_set_details'.
-type LispLocatorSetDetails struct {
- LsIndex uint32 `binapi:"u32,name=ls_index" json:"ls_index,omitempty"`
- LsName []byte `binapi:"u8[64],name=ls_name" json:"ls_name,omitempty"`
-}
-
-func (m *LispLocatorSetDetails) Reset() { *m = LispLocatorSetDetails{} }
-func (*LispLocatorSetDetails) GetMessageName() string { return "lisp_locator_set_details" }
-func (*LispLocatorSetDetails) GetCrcString() string { return "6b846882" }
-func (*LispLocatorSetDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *LispLocatorSetDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.LsIndex
- size += 1 * 64 // m.LsName
- return size
-}
-func (m *LispLocatorSetDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.LsIndex)
- buf.EncodeBytes(m.LsName, 64)
- return buf.Bytes(), nil
-}
-func (m *LispLocatorSetDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.LsIndex = buf.DecodeUint32()
- m.LsName = make([]byte, 64)
- copy(m.LsName, buf.DecodeBytes(len(m.LsName)))
- return nil
-}
-
-// LispLocatorSetDump defines message 'lisp_locator_set_dump'.
-type LispLocatorSetDump struct {
- Filter uint8 `binapi:"u8,name=filter" json:"filter,omitempty"`
-}
-
-func (m *LispLocatorSetDump) Reset() { *m = LispLocatorSetDump{} }
-func (*LispLocatorSetDump) GetMessageName() string { return "lisp_locator_set_dump" }
-func (*LispLocatorSetDump) GetCrcString() string { return "c79e8ab0" }
-func (*LispLocatorSetDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *LispLocatorSetDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.Filter
- return size
-}
-func (m *LispLocatorSetDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.Filter)
- return buf.Bytes(), nil
-}
-func (m *LispLocatorSetDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Filter = buf.DecodeUint8()
- return nil
-}
-
-// LispMapRegisterEnableDisable defines message 'lisp_map_register_enable_disable'.
-type LispMapRegisterEnableDisable struct {
- IsEnabled uint8 `binapi:"u8,name=is_enabled" json:"is_enabled,omitempty"`
-}
-
-func (m *LispMapRegisterEnableDisable) Reset() { *m = LispMapRegisterEnableDisable{} }
-func (*LispMapRegisterEnableDisable) GetMessageName() string {
- return "lisp_map_register_enable_disable"
-}
-func (*LispMapRegisterEnableDisable) GetCrcString() string { return "294103d1" }
-func (*LispMapRegisterEnableDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *LispMapRegisterEnableDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsEnabled
- return size
-}
-func (m *LispMapRegisterEnableDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsEnabled)
- return buf.Bytes(), nil
-}
-func (m *LispMapRegisterEnableDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsEnabled = buf.DecodeUint8()
- return nil
-}
-
-// LispMapRegisterEnableDisableReply defines message 'lisp_map_register_enable_disable_reply'.
-type LispMapRegisterEnableDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *LispMapRegisterEnableDisableReply) Reset() { *m = LispMapRegisterEnableDisableReply{} }
-func (*LispMapRegisterEnableDisableReply) GetMessageName() string {
- return "lisp_map_register_enable_disable_reply"
-}
-func (*LispMapRegisterEnableDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*LispMapRegisterEnableDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *LispMapRegisterEnableDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *LispMapRegisterEnableDisableReply) 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 *LispMapRegisterEnableDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// LispMapRequestMode defines message 'lisp_map_request_mode'.
-type LispMapRequestMode struct {
- Mode uint8 `binapi:"u8,name=mode" json:"mode,omitempty"`
-}
-
-func (m *LispMapRequestMode) Reset() { *m = LispMapRequestMode{} }
-func (*LispMapRequestMode) GetMessageName() string { return "lisp_map_request_mode" }
-func (*LispMapRequestMode) GetCrcString() string { return "f3f93ce9" }
-func (*LispMapRequestMode) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *LispMapRequestMode) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.Mode
- return size
-}
-func (m *LispMapRequestMode) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.Mode)
- return buf.Bytes(), nil
-}
-func (m *LispMapRequestMode) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Mode = buf.DecodeUint8()
- return nil
-}
-
-// LispMapRequestModeReply defines message 'lisp_map_request_mode_reply'.
-type LispMapRequestModeReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *LispMapRequestModeReply) Reset() { *m = LispMapRequestModeReply{} }
-func (*LispMapRequestModeReply) GetMessageName() string { return "lisp_map_request_mode_reply" }
-func (*LispMapRequestModeReply) GetCrcString() string { return "e8d4e804" }
-func (*LispMapRequestModeReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *LispMapRequestModeReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *LispMapRequestModeReply) 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 *LispMapRequestModeReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// LispMapResolverDetails defines message 'lisp_map_resolver_details'.
-type LispMapResolverDetails struct {
- IsIPv6 uint8 `binapi:"u8,name=is_ipv6" json:"is_ipv6,omitempty"`
- IPAddress []byte `binapi:"u8[16],name=ip_address" json:"ip_address,omitempty"`
-}
-
-func (m *LispMapResolverDetails) Reset() { *m = LispMapResolverDetails{} }
-func (*LispMapResolverDetails) GetMessageName() string { return "lisp_map_resolver_details" }
-func (*LispMapResolverDetails) GetCrcString() string { return "60a5f5ca" }
-func (*LispMapResolverDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *LispMapResolverDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsIPv6
- size += 1 * 16 // m.IPAddress
- return size
-}
-func (m *LispMapResolverDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsIPv6)
- buf.EncodeBytes(m.IPAddress, 16)
- return buf.Bytes(), nil
-}
-func (m *LispMapResolverDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsIPv6 = buf.DecodeUint8()
- m.IPAddress = make([]byte, 16)
- copy(m.IPAddress, buf.DecodeBytes(len(m.IPAddress)))
- return nil
-}
-
-// LispMapResolverDump defines message 'lisp_map_resolver_dump'.
-type LispMapResolverDump struct{}
-
-func (m *LispMapResolverDump) Reset() { *m = LispMapResolverDump{} }
-func (*LispMapResolverDump) GetMessageName() string { return "lisp_map_resolver_dump" }
-func (*LispMapResolverDump) GetCrcString() string { return "51077d14" }
-func (*LispMapResolverDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *LispMapResolverDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *LispMapResolverDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *LispMapResolverDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// LispMapServerDetails defines message 'lisp_map_server_details'.
-type LispMapServerDetails struct {
- IsIPv6 uint8 `binapi:"u8,name=is_ipv6" json:"is_ipv6,omitempty"`
- IPAddress []byte `binapi:"u8[16],name=ip_address" json:"ip_address,omitempty"`
-}
-
-func (m *LispMapServerDetails) Reset() { *m = LispMapServerDetails{} }
-func (*LispMapServerDetails) GetMessageName() string { return "lisp_map_server_details" }
-func (*LispMapServerDetails) GetCrcString() string { return "60a5f5ca" }
-func (*LispMapServerDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *LispMapServerDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsIPv6
- size += 1 * 16 // m.IPAddress
- return size
-}
-func (m *LispMapServerDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsIPv6)
- buf.EncodeBytes(m.IPAddress, 16)
- return buf.Bytes(), nil
-}
-func (m *LispMapServerDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsIPv6 = buf.DecodeUint8()
- m.IPAddress = make([]byte, 16)
- copy(m.IPAddress, buf.DecodeBytes(len(m.IPAddress)))
- return nil
-}
-
-// LispMapServerDump defines message 'lisp_map_server_dump'.
-type LispMapServerDump struct{}
-
-func (m *LispMapServerDump) Reset() { *m = LispMapServerDump{} }
-func (*LispMapServerDump) GetMessageName() string { return "lisp_map_server_dump" }
-func (*LispMapServerDump) GetCrcString() string { return "51077d14" }
-func (*LispMapServerDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *LispMapServerDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *LispMapServerDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *LispMapServerDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// LispPitrSetLocatorSet defines message 'lisp_pitr_set_locator_set'.
-type LispPitrSetLocatorSet struct {
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
- LsName []byte `binapi:"u8[64],name=ls_name" json:"ls_name,omitempty"`
-}
-
-func (m *LispPitrSetLocatorSet) Reset() { *m = LispPitrSetLocatorSet{} }
-func (*LispPitrSetLocatorSet) GetMessageName() string { return "lisp_pitr_set_locator_set" }
-func (*LispPitrSetLocatorSet) GetCrcString() string { return "7aa022dd" }
-func (*LispPitrSetLocatorSet) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *LispPitrSetLocatorSet) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 1 * 64 // m.LsName
- return size
-}
-func (m *LispPitrSetLocatorSet) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsAdd)
- buf.EncodeBytes(m.LsName, 64)
- return buf.Bytes(), nil
-}
-func (m *LispPitrSetLocatorSet) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeUint8()
- m.LsName = make([]byte, 64)
- copy(m.LsName, buf.DecodeBytes(len(m.LsName)))
- return nil
-}
-
-// LispPitrSetLocatorSetReply defines message 'lisp_pitr_set_locator_set_reply'.
-type LispPitrSetLocatorSetReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *LispPitrSetLocatorSetReply) Reset() { *m = LispPitrSetLocatorSetReply{} }
-func (*LispPitrSetLocatorSetReply) GetMessageName() string { return "lisp_pitr_set_locator_set_reply" }
-func (*LispPitrSetLocatorSetReply) GetCrcString() string { return "e8d4e804" }
-func (*LispPitrSetLocatorSetReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *LispPitrSetLocatorSetReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *LispPitrSetLocatorSetReply) 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 *LispPitrSetLocatorSetReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// LispRlocProbeEnableDisable defines message 'lisp_rloc_probe_enable_disable'.
-type LispRlocProbeEnableDisable struct {
- IsEnabled uint8 `binapi:"u8,name=is_enabled" json:"is_enabled,omitempty"`
-}
-
-func (m *LispRlocProbeEnableDisable) Reset() { *m = LispRlocProbeEnableDisable{} }
-func (*LispRlocProbeEnableDisable) GetMessageName() string { return "lisp_rloc_probe_enable_disable" }
-func (*LispRlocProbeEnableDisable) GetCrcString() string { return "294103d1" }
-func (*LispRlocProbeEnableDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *LispRlocProbeEnableDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsEnabled
- return size
-}
-func (m *LispRlocProbeEnableDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsEnabled)
- return buf.Bytes(), nil
-}
-func (m *LispRlocProbeEnableDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsEnabled = buf.DecodeUint8()
- return nil
-}
-
-// LispRlocProbeEnableDisableReply defines message 'lisp_rloc_probe_enable_disable_reply'.
-type LispRlocProbeEnableDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *LispRlocProbeEnableDisableReply) Reset() { *m = LispRlocProbeEnableDisableReply{} }
-func (*LispRlocProbeEnableDisableReply) GetMessageName() string {
- return "lisp_rloc_probe_enable_disable_reply"
-}
-func (*LispRlocProbeEnableDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*LispRlocProbeEnableDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *LispRlocProbeEnableDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *LispRlocProbeEnableDisableReply) 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 *LispRlocProbeEnableDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// LispUsePetr defines message 'lisp_use_petr'.
-type LispUsePetr struct {
- IsIP4 uint8 `binapi:"u8,name=is_ip4" json:"is_ip4,omitempty"`
- Address []byte `binapi:"u8[16],name=address" json:"address,omitempty"`
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
-}
-
-func (m *LispUsePetr) Reset() { *m = LispUsePetr{} }
-func (*LispUsePetr) GetMessageName() string { return "lisp_use_petr" }
-func (*LispUsePetr) GetCrcString() string { return "6910787d" }
-func (*LispUsePetr) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *LispUsePetr) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsIP4
- size += 1 * 16 // m.Address
- size += 1 // m.IsAdd
- return size
-}
-func (m *LispUsePetr) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsIP4)
- buf.EncodeBytes(m.Address, 16)
- buf.EncodeUint8(m.IsAdd)
- return buf.Bytes(), nil
-}
-func (m *LispUsePetr) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsIP4 = buf.DecodeUint8()
- m.Address = make([]byte, 16)
- copy(m.Address, buf.DecodeBytes(len(m.Address)))
- m.IsAdd = buf.DecodeUint8()
- return nil
-}
-
-// LispUsePetrReply defines message 'lisp_use_petr_reply'.
-type LispUsePetrReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *LispUsePetrReply) Reset() { *m = LispUsePetrReply{} }
-func (*LispUsePetrReply) GetMessageName() string { return "lisp_use_petr_reply" }
-func (*LispUsePetrReply) GetCrcString() string { return "e8d4e804" }
-func (*LispUsePetrReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *LispUsePetrReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *LispUsePetrReply) 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 *LispUsePetrReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// ShowLispMapRegisterState defines message 'show_lisp_map_register_state'.
-type ShowLispMapRegisterState struct{}
-
-func (m *ShowLispMapRegisterState) Reset() { *m = ShowLispMapRegisterState{} }
-func (*ShowLispMapRegisterState) GetMessageName() string { return "show_lisp_map_register_state" }
-func (*ShowLispMapRegisterState) GetCrcString() string { return "51077d14" }
-func (*ShowLispMapRegisterState) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ShowLispMapRegisterState) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *ShowLispMapRegisterState) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *ShowLispMapRegisterState) Unmarshal(b []byte) error {
- return nil
-}
-
-// ShowLispMapRegisterStateReply defines message 'show_lisp_map_register_state_reply'.
-type ShowLispMapRegisterStateReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- IsEnabled uint8 `binapi:"u8,name=is_enabled" json:"is_enabled,omitempty"`
-}
-
-func (m *ShowLispMapRegisterStateReply) Reset() { *m = ShowLispMapRegisterStateReply{} }
-func (*ShowLispMapRegisterStateReply) GetMessageName() string {
- return "show_lisp_map_register_state_reply"
-}
-func (*ShowLispMapRegisterStateReply) GetCrcString() string { return "14304fbc" }
-func (*ShowLispMapRegisterStateReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ShowLispMapRegisterStateReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 1 // m.IsEnabled
- return size
-}
-func (m *ShowLispMapRegisterStateReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint8(m.IsEnabled)
- return buf.Bytes(), nil
-}
-func (m *ShowLispMapRegisterStateReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.IsEnabled = buf.DecodeUint8()
- return nil
-}
-
-// ShowLispMapRequestMode defines message 'show_lisp_map_request_mode'.
-type ShowLispMapRequestMode struct{}
-
-func (m *ShowLispMapRequestMode) Reset() { *m = ShowLispMapRequestMode{} }
-func (*ShowLispMapRequestMode) GetMessageName() string { return "show_lisp_map_request_mode" }
-func (*ShowLispMapRequestMode) GetCrcString() string { return "51077d14" }
-func (*ShowLispMapRequestMode) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ShowLispMapRequestMode) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *ShowLispMapRequestMode) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *ShowLispMapRequestMode) Unmarshal(b []byte) error {
- return nil
-}
-
-// ShowLispMapRequestModeReply defines message 'show_lisp_map_request_mode_reply'.
-type ShowLispMapRequestModeReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- Mode uint8 `binapi:"u8,name=mode" json:"mode,omitempty"`
-}
-
-func (m *ShowLispMapRequestModeReply) Reset() { *m = ShowLispMapRequestModeReply{} }
-func (*ShowLispMapRequestModeReply) GetMessageName() string {
- return "show_lisp_map_request_mode_reply"
-}
-func (*ShowLispMapRequestModeReply) GetCrcString() string { return "d423107c" }
-func (*ShowLispMapRequestModeReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ShowLispMapRequestModeReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 1 // m.Mode
- return size
-}
-func (m *ShowLispMapRequestModeReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint8(m.Mode)
- return buf.Bytes(), nil
-}
-func (m *ShowLispMapRequestModeReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.Mode = buf.DecodeUint8()
- return nil
-}
-
-// ShowLispPitr defines message 'show_lisp_pitr'.
-type ShowLispPitr struct{}
-
-func (m *ShowLispPitr) Reset() { *m = ShowLispPitr{} }
-func (*ShowLispPitr) GetMessageName() string { return "show_lisp_pitr" }
-func (*ShowLispPitr) GetCrcString() string { return "51077d14" }
-func (*ShowLispPitr) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ShowLispPitr) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *ShowLispPitr) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *ShowLispPitr) Unmarshal(b []byte) error {
- return nil
-}
-
-// ShowLispPitrReply defines message 'show_lisp_pitr_reply'.
-type ShowLispPitrReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- Status uint8 `binapi:"u8,name=status" json:"status,omitempty"`
- LocatorSetName []byte `binapi:"u8[64],name=locator_set_name" json:"locator_set_name,omitempty"`
-}
-
-func (m *ShowLispPitrReply) Reset() { *m = ShowLispPitrReply{} }
-func (*ShowLispPitrReply) GetMessageName() string { return "show_lisp_pitr_reply" }
-func (*ShowLispPitrReply) GetCrcString() string { return "dca512cc" }
-func (*ShowLispPitrReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ShowLispPitrReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 1 // m.Status
- size += 1 * 64 // m.LocatorSetName
- return size
-}
-func (m *ShowLispPitrReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint8(m.Status)
- buf.EncodeBytes(m.LocatorSetName, 64)
- return buf.Bytes(), nil
-}
-func (m *ShowLispPitrReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.Status = buf.DecodeUint8()
- m.LocatorSetName = make([]byte, 64)
- copy(m.LocatorSetName, buf.DecodeBytes(len(m.LocatorSetName)))
- return nil
-}
-
-// ShowLispRlocProbeState defines message 'show_lisp_rloc_probe_state'.
-type ShowLispRlocProbeState struct{}
-
-func (m *ShowLispRlocProbeState) Reset() { *m = ShowLispRlocProbeState{} }
-func (*ShowLispRlocProbeState) GetMessageName() string { return "show_lisp_rloc_probe_state" }
-func (*ShowLispRlocProbeState) GetCrcString() string { return "51077d14" }
-func (*ShowLispRlocProbeState) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ShowLispRlocProbeState) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *ShowLispRlocProbeState) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *ShowLispRlocProbeState) Unmarshal(b []byte) error {
- return nil
-}
-
-// ShowLispRlocProbeStateReply defines message 'show_lisp_rloc_probe_state_reply'.
-type ShowLispRlocProbeStateReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- IsEnabled uint8 `binapi:"u8,name=is_enabled" json:"is_enabled,omitempty"`
-}
-
-func (m *ShowLispRlocProbeStateReply) Reset() { *m = ShowLispRlocProbeStateReply{} }
-func (*ShowLispRlocProbeStateReply) GetMessageName() string {
- return "show_lisp_rloc_probe_state_reply"
-}
-func (*ShowLispRlocProbeStateReply) GetCrcString() string { return "14304fbc" }
-func (*ShowLispRlocProbeStateReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ShowLispRlocProbeStateReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 1 // m.IsEnabled
- return size
-}
-func (m *ShowLispRlocProbeStateReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint8(m.IsEnabled)
- return buf.Bytes(), nil
-}
-func (m *ShowLispRlocProbeStateReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.IsEnabled = buf.DecodeUint8()
- return nil
-}
-
-// ShowLispStatus defines message 'show_lisp_status'.
-type ShowLispStatus struct{}
-
-func (m *ShowLispStatus) Reset() { *m = ShowLispStatus{} }
-func (*ShowLispStatus) GetMessageName() string { return "show_lisp_status" }
-func (*ShowLispStatus) GetCrcString() string { return "51077d14" }
-func (*ShowLispStatus) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ShowLispStatus) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *ShowLispStatus) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *ShowLispStatus) Unmarshal(b []byte) error {
- return nil
-}
-
-// ShowLispStatusReply defines message 'show_lisp_status_reply'.
-type ShowLispStatusReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- FeatureStatus uint8 `binapi:"u8,name=feature_status" json:"feature_status,omitempty"`
- GpeStatus uint8 `binapi:"u8,name=gpe_status" json:"gpe_status,omitempty"`
-}
-
-func (m *ShowLispStatusReply) Reset() { *m = ShowLispStatusReply{} }
-func (*ShowLispStatusReply) GetMessageName() string { return "show_lisp_status_reply" }
-func (*ShowLispStatusReply) GetCrcString() string { return "ddcf48ef" }
-func (*ShowLispStatusReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ShowLispStatusReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 1 // m.FeatureStatus
- size += 1 // m.GpeStatus
- return size
-}
-func (m *ShowLispStatusReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint8(m.FeatureStatus)
- buf.EncodeUint8(m.GpeStatus)
- return buf.Bytes(), nil
-}
-func (m *ShowLispStatusReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.FeatureStatus = buf.DecodeUint8()
- m.GpeStatus = buf.DecodeUint8()
- return nil
-}
-
-// ShowLispUsePetr defines message 'show_lisp_use_petr'.
-type ShowLispUsePetr struct{}
-
-func (m *ShowLispUsePetr) Reset() { *m = ShowLispUsePetr{} }
-func (*ShowLispUsePetr) GetMessageName() string { return "show_lisp_use_petr" }
-func (*ShowLispUsePetr) GetCrcString() string { return "51077d14" }
-func (*ShowLispUsePetr) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ShowLispUsePetr) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *ShowLispUsePetr) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *ShowLispUsePetr) Unmarshal(b []byte) error {
- return nil
-}
-
-// ShowLispUsePetrReply defines message 'show_lisp_use_petr_reply'.
-type ShowLispUsePetrReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- Status uint8 `binapi:"u8,name=status" json:"status,omitempty"`
- IsIP4 uint8 `binapi:"u8,name=is_ip4" json:"is_ip4,omitempty"`
- Address []byte `binapi:"u8[16],name=address" json:"address,omitempty"`
-}
-
-func (m *ShowLispUsePetrReply) Reset() { *m = ShowLispUsePetrReply{} }
-func (*ShowLispUsePetrReply) GetMessageName() string { return "show_lisp_use_petr_reply" }
-func (*ShowLispUsePetrReply) GetCrcString() string { return "1eb21916" }
-func (*ShowLispUsePetrReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ShowLispUsePetrReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 1 // m.Status
- size += 1 // m.IsIP4
- size += 1 * 16 // m.Address
- return size
-}
-func (m *ShowLispUsePetrReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint8(m.Status)
- buf.EncodeUint8(m.IsIP4)
- buf.EncodeBytes(m.Address, 16)
- return buf.Bytes(), nil
-}
-func (m *ShowLispUsePetrReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.Status = buf.DecodeUint8()
- m.IsIP4 = buf.DecodeUint8()
- m.Address = make([]byte, 16)
- copy(m.Address, buf.DecodeBytes(len(m.Address)))
- return nil
-}
-
-func init() { file_lisp_binapi_init() }
-func file_lisp_binapi_init() {
- api.RegisterMessage((*LispAddDelAdjacency)(nil), "lisp_add_del_adjacency_f047390d")
- api.RegisterMessage((*LispAddDelAdjacencyReply)(nil), "lisp_add_del_adjacency_reply_e8d4e804")
- api.RegisterMessage((*LispAddDelLocalEid)(nil), "lisp_add_del_local_eid_e6d00717")
- api.RegisterMessage((*LispAddDelLocalEidReply)(nil), "lisp_add_del_local_eid_reply_e8d4e804")
- api.RegisterMessage((*LispAddDelLocator)(nil), "lisp_add_del_locator_006a4240")
- api.RegisterMessage((*LispAddDelLocatorReply)(nil), "lisp_add_del_locator_reply_e8d4e804")
- api.RegisterMessage((*LispAddDelLocatorSet)(nil), "lisp_add_del_locator_set_06968e38")
- api.RegisterMessage((*LispAddDelLocatorSetReply)(nil), "lisp_add_del_locator_set_reply_b6666db4")
- api.RegisterMessage((*LispAddDelMapRequestItrRlocs)(nil), "lisp_add_del_map_request_itr_rlocs_c7c6cb2f")
- api.RegisterMessage((*LispAddDelMapRequestItrRlocsReply)(nil), "lisp_add_del_map_request_itr_rlocs_reply_e8d4e804")
- api.RegisterMessage((*LispAddDelMapResolver)(nil), "lisp_add_del_map_resolver_0ebcd37d")
- api.RegisterMessage((*LispAddDelMapResolverReply)(nil), "lisp_add_del_map_resolver_reply_e8d4e804")
- api.RegisterMessage((*LispAddDelMapServer)(nil), "lisp_add_del_map_server_0ebcd37d")
- api.RegisterMessage((*LispAddDelMapServerReply)(nil), "lisp_add_del_map_server_reply_e8d4e804")
- api.RegisterMessage((*LispAddDelRemoteMapping)(nil), "lisp_add_del_remote_mapping_b879c3a9")
- api.RegisterMessage((*LispAddDelRemoteMappingReply)(nil), "lisp_add_del_remote_mapping_reply_e8d4e804")
- api.RegisterMessage((*LispAdjacenciesGet)(nil), "lisp_adjacencies_get_8d1f2fe9")
- api.RegisterMessage((*LispAdjacenciesGetReply)(nil), "lisp_adjacencies_get_reply_ada0f464")
- api.RegisterMessage((*LispEidTableAddDelMap)(nil), "lisp_eid_table_add_del_map_59e9975e")
- api.RegisterMessage((*LispEidTableAddDelMapReply)(nil), "lisp_eid_table_add_del_map_reply_e8d4e804")
- api.RegisterMessage((*LispEidTableDetails)(nil), "lisp_eid_table_details_dcd9f414")
- api.RegisterMessage((*LispEidTableDump)(nil), "lisp_eid_table_dump_e0df64da")
- api.RegisterMessage((*LispEidTableMapDetails)(nil), "lisp_eid_table_map_details_0b6859e2")
- api.RegisterMessage((*LispEidTableMapDump)(nil), "lisp_eid_table_map_dump_67c54650")
- api.RegisterMessage((*LispEidTableVniDetails)(nil), "lisp_eid_table_vni_details_64abc01e")
- api.RegisterMessage((*LispEidTableVniDump)(nil), "lisp_eid_table_vni_dump_51077d14")
- api.RegisterMessage((*LispEnableDisable)(nil), "lisp_enable_disable_eb0e943b")
- api.RegisterMessage((*LispEnableDisableReply)(nil), "lisp_enable_disable_reply_e8d4e804")
- api.RegisterMessage((*LispGetMapRequestItrRlocs)(nil), "lisp_get_map_request_itr_rlocs_51077d14")
- api.RegisterMessage((*LispGetMapRequestItrRlocsReply)(nil), "lisp_get_map_request_itr_rlocs_reply_9f56f6f7")
- api.RegisterMessage((*LispLocatorDetails)(nil), "lisp_locator_details_b3988a30")
- api.RegisterMessage((*LispLocatorDump)(nil), "lisp_locator_dump_f27d5050")
- api.RegisterMessage((*LispLocatorSetDetails)(nil), "lisp_locator_set_details_6b846882")
- api.RegisterMessage((*LispLocatorSetDump)(nil), "lisp_locator_set_dump_c79e8ab0")
- api.RegisterMessage((*LispMapRegisterEnableDisable)(nil), "lisp_map_register_enable_disable_294103d1")
- api.RegisterMessage((*LispMapRegisterEnableDisableReply)(nil), "lisp_map_register_enable_disable_reply_e8d4e804")
- api.RegisterMessage((*LispMapRequestMode)(nil), "lisp_map_request_mode_f3f93ce9")
- api.RegisterMessage((*LispMapRequestModeReply)(nil), "lisp_map_request_mode_reply_e8d4e804")
- api.RegisterMessage((*LispMapResolverDetails)(nil), "lisp_map_resolver_details_60a5f5ca")
- api.RegisterMessage((*LispMapResolverDump)(nil), "lisp_map_resolver_dump_51077d14")
- api.RegisterMessage((*LispMapServerDetails)(nil), "lisp_map_server_details_60a5f5ca")
- api.RegisterMessage((*LispMapServerDump)(nil), "lisp_map_server_dump_51077d14")
- api.RegisterMessage((*LispPitrSetLocatorSet)(nil), "lisp_pitr_set_locator_set_7aa022dd")
- api.RegisterMessage((*LispPitrSetLocatorSetReply)(nil), "lisp_pitr_set_locator_set_reply_e8d4e804")
- api.RegisterMessage((*LispRlocProbeEnableDisable)(nil), "lisp_rloc_probe_enable_disable_294103d1")
- api.RegisterMessage((*LispRlocProbeEnableDisableReply)(nil), "lisp_rloc_probe_enable_disable_reply_e8d4e804")
- api.RegisterMessage((*LispUsePetr)(nil), "lisp_use_petr_6910787d")
- api.RegisterMessage((*LispUsePetrReply)(nil), "lisp_use_petr_reply_e8d4e804")
- api.RegisterMessage((*ShowLispMapRegisterState)(nil), "show_lisp_map_register_state_51077d14")
- api.RegisterMessage((*ShowLispMapRegisterStateReply)(nil), "show_lisp_map_register_state_reply_14304fbc")
- api.RegisterMessage((*ShowLispMapRequestMode)(nil), "show_lisp_map_request_mode_51077d14")
- api.RegisterMessage((*ShowLispMapRequestModeReply)(nil), "show_lisp_map_request_mode_reply_d423107c")
- api.RegisterMessage((*ShowLispPitr)(nil), "show_lisp_pitr_51077d14")
- api.RegisterMessage((*ShowLispPitrReply)(nil), "show_lisp_pitr_reply_dca512cc")
- api.RegisterMessage((*ShowLispRlocProbeState)(nil), "show_lisp_rloc_probe_state_51077d14")
- api.RegisterMessage((*ShowLispRlocProbeStateReply)(nil), "show_lisp_rloc_probe_state_reply_14304fbc")
- api.RegisterMessage((*ShowLispStatus)(nil), "show_lisp_status_51077d14")
- api.RegisterMessage((*ShowLispStatusReply)(nil), "show_lisp_status_reply_ddcf48ef")
- api.RegisterMessage((*ShowLispUsePetr)(nil), "show_lisp_use_petr_51077d14")
- api.RegisterMessage((*ShowLispUsePetrReply)(nil), "show_lisp_use_petr_reply_1eb21916")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*LispAddDelAdjacency)(nil),
- (*LispAddDelAdjacencyReply)(nil),
- (*LispAddDelLocalEid)(nil),
- (*LispAddDelLocalEidReply)(nil),
- (*LispAddDelLocator)(nil),
- (*LispAddDelLocatorReply)(nil),
- (*LispAddDelLocatorSet)(nil),
- (*LispAddDelLocatorSetReply)(nil),
- (*LispAddDelMapRequestItrRlocs)(nil),
- (*LispAddDelMapRequestItrRlocsReply)(nil),
- (*LispAddDelMapResolver)(nil),
- (*LispAddDelMapResolverReply)(nil),
- (*LispAddDelMapServer)(nil),
- (*LispAddDelMapServerReply)(nil),
- (*LispAddDelRemoteMapping)(nil),
- (*LispAddDelRemoteMappingReply)(nil),
- (*LispAdjacenciesGet)(nil),
- (*LispAdjacenciesGetReply)(nil),
- (*LispEidTableAddDelMap)(nil),
- (*LispEidTableAddDelMapReply)(nil),
- (*LispEidTableDetails)(nil),
- (*LispEidTableDump)(nil),
- (*LispEidTableMapDetails)(nil),
- (*LispEidTableMapDump)(nil),
- (*LispEidTableVniDetails)(nil),
- (*LispEidTableVniDump)(nil),
- (*LispEnableDisable)(nil),
- (*LispEnableDisableReply)(nil),
- (*LispGetMapRequestItrRlocs)(nil),
- (*LispGetMapRequestItrRlocsReply)(nil),
- (*LispLocatorDetails)(nil),
- (*LispLocatorDump)(nil),
- (*LispLocatorSetDetails)(nil),
- (*LispLocatorSetDump)(nil),
- (*LispMapRegisterEnableDisable)(nil),
- (*LispMapRegisterEnableDisableReply)(nil),
- (*LispMapRequestMode)(nil),
- (*LispMapRequestModeReply)(nil),
- (*LispMapResolverDetails)(nil),
- (*LispMapResolverDump)(nil),
- (*LispMapServerDetails)(nil),
- (*LispMapServerDump)(nil),
- (*LispPitrSetLocatorSet)(nil),
- (*LispPitrSetLocatorSetReply)(nil),
- (*LispRlocProbeEnableDisable)(nil),
- (*LispRlocProbeEnableDisableReply)(nil),
- (*LispUsePetr)(nil),
- (*LispUsePetrReply)(nil),
- (*ShowLispMapRegisterState)(nil),
- (*ShowLispMapRegisterStateReply)(nil),
- (*ShowLispMapRequestMode)(nil),
- (*ShowLispMapRequestModeReply)(nil),
- (*ShowLispPitr)(nil),
- (*ShowLispPitrReply)(nil),
- (*ShowLispRlocProbeState)(nil),
- (*ShowLispRlocProbeStateReply)(nil),
- (*ShowLispStatus)(nil),
- (*ShowLispStatusReply)(nil),
- (*ShowLispUsePetr)(nil),
- (*ShowLispUsePetrReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/lisp/lisp_rpc.ba.go b/internal/testbinapi/binapi2001/lisp/lisp_rpc.ba.go
deleted file mode 100644
index 5c9c632..0000000
--- a/internal/testbinapi/binapi2001/lisp/lisp_rpc.ba.go
+++ /dev/null
@@ -1,562 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package lisp
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service lisp.
-type RPCService interface {
- LispAddDelAdjacency(ctx context.Context, in *LispAddDelAdjacency) (*LispAddDelAdjacencyReply, error)
- LispAddDelLocalEid(ctx context.Context, in *LispAddDelLocalEid) (*LispAddDelLocalEidReply, error)
- LispAddDelLocator(ctx context.Context, in *LispAddDelLocator) (*LispAddDelLocatorReply, error)
- LispAddDelLocatorSet(ctx context.Context, in *LispAddDelLocatorSet) (*LispAddDelLocatorSetReply, error)
- LispAddDelMapRequestItrRlocs(ctx context.Context, in *LispAddDelMapRequestItrRlocs) (*LispAddDelMapRequestItrRlocsReply, error)
- LispAddDelMapResolver(ctx context.Context, in *LispAddDelMapResolver) (*LispAddDelMapResolverReply, error)
- LispAddDelMapServer(ctx context.Context, in *LispAddDelMapServer) (*LispAddDelMapServerReply, error)
- LispAddDelRemoteMapping(ctx context.Context, in *LispAddDelRemoteMapping) (*LispAddDelRemoteMappingReply, error)
- LispAdjacenciesGet(ctx context.Context, in *LispAdjacenciesGet) (*LispAdjacenciesGetReply, error)
- LispEidTableAddDelMap(ctx context.Context, in *LispEidTableAddDelMap) (*LispEidTableAddDelMapReply, error)
- LispEidTableDump(ctx context.Context, in *LispEidTableDump) (RPCService_LispEidTableDumpClient, error)
- LispEidTableMapDump(ctx context.Context, in *LispEidTableMapDump) (RPCService_LispEidTableMapDumpClient, error)
- LispEidTableVniDump(ctx context.Context, in *LispEidTableVniDump) (RPCService_LispEidTableVniDumpClient, error)
- LispEnableDisable(ctx context.Context, in *LispEnableDisable) (*LispEnableDisableReply, error)
- LispGetMapRequestItrRlocs(ctx context.Context, in *LispGetMapRequestItrRlocs) (*LispGetMapRequestItrRlocsReply, error)
- LispLocatorDump(ctx context.Context, in *LispLocatorDump) (RPCService_LispLocatorDumpClient, error)
- LispLocatorSetDump(ctx context.Context, in *LispLocatorSetDump) (RPCService_LispLocatorSetDumpClient, error)
- LispMapRegisterEnableDisable(ctx context.Context, in *LispMapRegisterEnableDisable) (*LispMapRegisterEnableDisableReply, error)
- LispMapRequestMode(ctx context.Context, in *LispMapRequestMode) (*LispMapRequestModeReply, error)
- LispMapResolverDump(ctx context.Context, in *LispMapResolverDump) (RPCService_LispMapResolverDumpClient, error)
- LispMapServerDump(ctx context.Context, in *LispMapServerDump) (RPCService_LispMapServerDumpClient, error)
- LispPitrSetLocatorSet(ctx context.Context, in *LispPitrSetLocatorSet) (*LispPitrSetLocatorSetReply, error)
- LispRlocProbeEnableDisable(ctx context.Context, in *LispRlocProbeEnableDisable) (*LispRlocProbeEnableDisableReply, error)
- LispUsePetr(ctx context.Context, in *LispUsePetr) (*LispUsePetrReply, error)
- ShowLispMapRegisterState(ctx context.Context, in *ShowLispMapRegisterState) (*ShowLispMapRegisterStateReply, error)
- ShowLispMapRequestMode(ctx context.Context, in *ShowLispMapRequestMode) (*ShowLispMapRequestModeReply, error)
- ShowLispPitr(ctx context.Context, in *ShowLispPitr) (*ShowLispPitrReply, error)
- ShowLispRlocProbeState(ctx context.Context, in *ShowLispRlocProbeState) (*ShowLispRlocProbeStateReply, error)
- ShowLispStatus(ctx context.Context, in *ShowLispStatus) (*ShowLispStatusReply, error)
- ShowLispUsePetr(ctx context.Context, in *ShowLispUsePetr) (*ShowLispUsePetrReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) LispAddDelAdjacency(ctx context.Context, in *LispAddDelAdjacency) (*LispAddDelAdjacencyReply, error) {
- out := new(LispAddDelAdjacencyReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) LispAddDelLocalEid(ctx context.Context, in *LispAddDelLocalEid) (*LispAddDelLocalEidReply, error) {
- out := new(LispAddDelLocalEidReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) LispAddDelLocator(ctx context.Context, in *LispAddDelLocator) (*LispAddDelLocatorReply, error) {
- out := new(LispAddDelLocatorReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) LispAddDelLocatorSet(ctx context.Context, in *LispAddDelLocatorSet) (*LispAddDelLocatorSetReply, error) {
- out := new(LispAddDelLocatorSetReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) LispAddDelMapRequestItrRlocs(ctx context.Context, in *LispAddDelMapRequestItrRlocs) (*LispAddDelMapRequestItrRlocsReply, error) {
- out := new(LispAddDelMapRequestItrRlocsReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) LispAddDelMapResolver(ctx context.Context, in *LispAddDelMapResolver) (*LispAddDelMapResolverReply, error) {
- out := new(LispAddDelMapResolverReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) LispAddDelMapServer(ctx context.Context, in *LispAddDelMapServer) (*LispAddDelMapServerReply, error) {
- out := new(LispAddDelMapServerReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) LispAddDelRemoteMapping(ctx context.Context, in *LispAddDelRemoteMapping) (*LispAddDelRemoteMappingReply, error) {
- out := new(LispAddDelRemoteMappingReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) LispAdjacenciesGet(ctx context.Context, in *LispAdjacenciesGet) (*LispAdjacenciesGetReply, error) {
- out := new(LispAdjacenciesGetReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) LispEidTableAddDelMap(ctx context.Context, in *LispEidTableAddDelMap) (*LispEidTableAddDelMapReply, error) {
- out := new(LispEidTableAddDelMapReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) LispEidTableDump(ctx context.Context, in *LispEidTableDump) (RPCService_LispEidTableDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_LispEidTableDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_LispEidTableDumpClient interface {
- Recv() (*LispEidTableDetails, error)
- api.Stream
-}
-
-type serviceClient_LispEidTableDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_LispEidTableDumpClient) Recv() (*LispEidTableDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *LispEidTableDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) LispEidTableMapDump(ctx context.Context, in *LispEidTableMapDump) (RPCService_LispEidTableMapDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_LispEidTableMapDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_LispEidTableMapDumpClient interface {
- Recv() (*LispEidTableMapDetails, error)
- api.Stream
-}
-
-type serviceClient_LispEidTableMapDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_LispEidTableMapDumpClient) Recv() (*LispEidTableMapDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *LispEidTableMapDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) LispEidTableVniDump(ctx context.Context, in *LispEidTableVniDump) (RPCService_LispEidTableVniDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_LispEidTableVniDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_LispEidTableVniDumpClient interface {
- Recv() (*LispEidTableVniDetails, error)
- api.Stream
-}
-
-type serviceClient_LispEidTableVniDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_LispEidTableVniDumpClient) Recv() (*LispEidTableVniDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *LispEidTableVniDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) LispEnableDisable(ctx context.Context, in *LispEnableDisable) (*LispEnableDisableReply, error) {
- out := new(LispEnableDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) LispGetMapRequestItrRlocs(ctx context.Context, in *LispGetMapRequestItrRlocs) (*LispGetMapRequestItrRlocsReply, error) {
- out := new(LispGetMapRequestItrRlocsReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) LispLocatorDump(ctx context.Context, in *LispLocatorDump) (RPCService_LispLocatorDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_LispLocatorDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_LispLocatorDumpClient interface {
- Recv() (*LispLocatorDetails, error)
- api.Stream
-}
-
-type serviceClient_LispLocatorDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_LispLocatorDumpClient) Recv() (*LispLocatorDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *LispLocatorDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) LispLocatorSetDump(ctx context.Context, in *LispLocatorSetDump) (RPCService_LispLocatorSetDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_LispLocatorSetDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_LispLocatorSetDumpClient interface {
- Recv() (*LispLocatorSetDetails, error)
- api.Stream
-}
-
-type serviceClient_LispLocatorSetDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_LispLocatorSetDumpClient) Recv() (*LispLocatorSetDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *LispLocatorSetDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) LispMapRegisterEnableDisable(ctx context.Context, in *LispMapRegisterEnableDisable) (*LispMapRegisterEnableDisableReply, error) {
- out := new(LispMapRegisterEnableDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) LispMapRequestMode(ctx context.Context, in *LispMapRequestMode) (*LispMapRequestModeReply, error) {
- out := new(LispMapRequestModeReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) LispMapResolverDump(ctx context.Context, in *LispMapResolverDump) (RPCService_LispMapResolverDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_LispMapResolverDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_LispMapResolverDumpClient interface {
- Recv() (*LispMapResolverDetails, error)
- api.Stream
-}
-
-type serviceClient_LispMapResolverDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_LispMapResolverDumpClient) Recv() (*LispMapResolverDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *LispMapResolverDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) LispMapServerDump(ctx context.Context, in *LispMapServerDump) (RPCService_LispMapServerDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_LispMapServerDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_LispMapServerDumpClient interface {
- Recv() (*LispMapServerDetails, error)
- api.Stream
-}
-
-type serviceClient_LispMapServerDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_LispMapServerDumpClient) Recv() (*LispMapServerDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *LispMapServerDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) LispPitrSetLocatorSet(ctx context.Context, in *LispPitrSetLocatorSet) (*LispPitrSetLocatorSetReply, error) {
- out := new(LispPitrSetLocatorSetReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) LispRlocProbeEnableDisable(ctx context.Context, in *LispRlocProbeEnableDisable) (*LispRlocProbeEnableDisableReply, error) {
- out := new(LispRlocProbeEnableDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) LispUsePetr(ctx context.Context, in *LispUsePetr) (*LispUsePetrReply, error) {
- out := new(LispUsePetrReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) ShowLispMapRegisterState(ctx context.Context, in *ShowLispMapRegisterState) (*ShowLispMapRegisterStateReply, error) {
- out := new(ShowLispMapRegisterStateReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) ShowLispMapRequestMode(ctx context.Context, in *ShowLispMapRequestMode) (*ShowLispMapRequestModeReply, error) {
- out := new(ShowLispMapRequestModeReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) ShowLispPitr(ctx context.Context, in *ShowLispPitr) (*ShowLispPitrReply, error) {
- out := new(ShowLispPitrReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) ShowLispRlocProbeState(ctx context.Context, in *ShowLispRlocProbeState) (*ShowLispRlocProbeStateReply, error) {
- out := new(ShowLispRlocProbeStateReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) ShowLispStatus(ctx context.Context, in *ShowLispStatus) (*ShowLispStatusReply, error) {
- out := new(ShowLispStatusReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) ShowLispUsePetr(ctx context.Context, in *ShowLispUsePetr) (*ShowLispUsePetrReply, error) {
- out := new(ShowLispUsePetrReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/lisp_gpe/lisp_gpe.ba.go b/internal/testbinapi/binapi2001/lisp_gpe/lisp_gpe.ba.go
deleted file mode 100644
index f46aa92..0000000
--- a/internal/testbinapi/binapi2001/lisp_gpe/lisp_gpe.ba.go
+++ /dev/null
@@ -1,979 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/lisp_gpe.api.json
-
-// Package lisp_gpe contains generated bindings for API file lisp_gpe.api.
-//
-// Contents:
-// 3 structs
-// 20 messages
-//
-package lisp_gpe
-
-import (
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the GoVPP api package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// GoVPP api package needs to be updated.
-const _ = api.GoVppAPIPackageIsVersion2
-
-const (
- APIFile = "lisp_gpe"
- APIVersion = "1.0.0"
- VersionCrc = 0x9396c80c
-)
-
-// GpeFwdEntry defines type 'gpe_fwd_entry'.
-type GpeFwdEntry struct {
- FwdEntryIndex uint32 `binapi:"u32,name=fwd_entry_index" json:"fwd_entry_index,omitempty"`
- DpTable uint32 `binapi:"u32,name=dp_table" json:"dp_table,omitempty"`
- EidType uint8 `binapi:"u8,name=eid_type" json:"eid_type,omitempty"`
- LeidPrefixLen uint8 `binapi:"u8,name=leid_prefix_len" json:"leid_prefix_len,omitempty"`
- ReidPrefixLen uint8 `binapi:"u8,name=reid_prefix_len" json:"reid_prefix_len,omitempty"`
- Leid []byte `binapi:"u8[16],name=leid" json:"leid,omitempty"`
- Reid []byte `binapi:"u8[16],name=reid" json:"reid,omitempty"`
- Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
- Action uint8 `binapi:"u8,name=action" json:"action,omitempty"`
-}
-
-// GpeLocator defines type 'gpe_locator'.
-type GpeLocator struct {
- IsIP4 uint8 `binapi:"u8,name=is_ip4" json:"is_ip4,omitempty"`
- Weight uint8 `binapi:"u8,name=weight" json:"weight,omitempty"`
- Addr []byte `binapi:"u8[16],name=addr" json:"addr,omitempty"`
-}
-
-// GpeNativeFwdRpath defines type 'gpe_native_fwd_rpath'.
-type GpeNativeFwdRpath struct {
- FibIndex uint32 `binapi:"u32,name=fib_index" json:"fib_index,omitempty"`
- NhSwIfIndex uint32 `binapi:"u32,name=nh_sw_if_index" json:"nh_sw_if_index,omitempty"`
- IsIP4 uint8 `binapi:"u8,name=is_ip4" json:"is_ip4,omitempty"`
- NhAddr []byte `binapi:"u8[16],name=nh_addr" json:"nh_addr,omitempty"`
-}
-
-// GpeAddDelFwdEntry defines message 'gpe_add_del_fwd_entry'.
-type GpeAddDelFwdEntry struct {
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
- EidType uint8 `binapi:"u8,name=eid_type" json:"eid_type,omitempty"`
- RmtEid []byte `binapi:"u8[16],name=rmt_eid" json:"rmt_eid,omitempty"`
- LclEid []byte `binapi:"u8[16],name=lcl_eid" json:"lcl_eid,omitempty"`
- RmtLen uint8 `binapi:"u8,name=rmt_len" json:"rmt_len,omitempty"`
- LclLen uint8 `binapi:"u8,name=lcl_len" json:"lcl_len,omitempty"`
- Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
- DpTable uint32 `binapi:"u32,name=dp_table" json:"dp_table,omitempty"`
- Action uint8 `binapi:"u8,name=action" json:"action,omitempty"`
- LocNum uint32 `binapi:"u32,name=loc_num" json:"-"`
- Locs []GpeLocator `binapi:"gpe_locator[loc_num],name=locs" json:"locs,omitempty"`
-}
-
-func (m *GpeAddDelFwdEntry) Reset() { *m = GpeAddDelFwdEntry{} }
-func (*GpeAddDelFwdEntry) GetMessageName() string { return "gpe_add_del_fwd_entry" }
-func (*GpeAddDelFwdEntry) GetCrcString() string { return "afbf857a" }
-func (*GpeAddDelFwdEntry) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GpeAddDelFwdEntry) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 1 // m.EidType
- size += 1 * 16 // m.RmtEid
- size += 1 * 16 // m.LclEid
- size += 1 // m.RmtLen
- size += 1 // m.LclLen
- 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
- if j1 < len(m.Locs) {
- s1 = m.Locs[j1]
- }
- size += 1 // s1.IsIP4
- size += 1 // s1.Weight
- size += 1 * 16 // s1.Addr
- }
- return size
-}
-func (m *GpeAddDelFwdEntry) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsAdd)
- buf.EncodeUint8(m.EidType)
- buf.EncodeBytes(m.RmtEid, 16)
- buf.EncodeBytes(m.LclEid, 16)
- buf.EncodeUint8(m.RmtLen)
- buf.EncodeUint8(m.LclLen)
- buf.EncodeUint32(m.Vni)
- buf.EncodeUint32(m.DpTable)
- buf.EncodeUint8(m.Action)
- buf.EncodeUint32(uint32(len(m.Locs)))
- for j0 := 0; j0 < len(m.Locs); j0++ {
- var v0 GpeLocator // Locs
- if j0 < len(m.Locs) {
- v0 = m.Locs[j0]
- }
- buf.EncodeUint8(v0.IsIP4)
- buf.EncodeUint8(v0.Weight)
- buf.EncodeBytes(v0.Addr, 16)
- }
- return buf.Bytes(), nil
-}
-func (m *GpeAddDelFwdEntry) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeUint8()
- m.EidType = buf.DecodeUint8()
- m.RmtEid = make([]byte, 16)
- copy(m.RmtEid, buf.DecodeBytes(len(m.RmtEid)))
- m.LclEid = make([]byte, 16)
- copy(m.LclEid, buf.DecodeBytes(len(m.LclEid)))
- m.RmtLen = buf.DecodeUint8()
- m.LclLen = buf.DecodeUint8()
- m.Vni = buf.DecodeUint32()
- m.DpTable = buf.DecodeUint32()
- m.Action = buf.DecodeUint8()
- m.LocNum = buf.DecodeUint32()
- m.Locs = make([]GpeLocator, m.LocNum)
- for j0 := 0; j0 < len(m.Locs); j0++ {
- m.Locs[j0].IsIP4 = buf.DecodeUint8()
- m.Locs[j0].Weight = buf.DecodeUint8()
- m.Locs[j0].Addr = make([]byte, 16)
- copy(m.Locs[j0].Addr, buf.DecodeBytes(len(m.Locs[j0].Addr)))
- }
- return nil
-}
-
-// GpeAddDelFwdEntryReply defines message 'gpe_add_del_fwd_entry_reply'.
-type GpeAddDelFwdEntryReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- FwdEntryIndex uint32 `binapi:"u32,name=fwd_entry_index" json:"fwd_entry_index,omitempty"`
-}
-
-func (m *GpeAddDelFwdEntryReply) Reset() { *m = GpeAddDelFwdEntryReply{} }
-func (*GpeAddDelFwdEntryReply) GetMessageName() string { return "gpe_add_del_fwd_entry_reply" }
-func (*GpeAddDelFwdEntryReply) GetCrcString() string { return "efe5f176" }
-func (*GpeAddDelFwdEntryReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GpeAddDelFwdEntryReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.FwdEntryIndex
- return size
-}
-func (m *GpeAddDelFwdEntryReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.FwdEntryIndex)
- return buf.Bytes(), nil
-}
-func (m *GpeAddDelFwdEntryReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.FwdEntryIndex = buf.DecodeUint32()
- return nil
-}
-
-// GpeAddDelIface defines message 'gpe_add_del_iface'.
-type GpeAddDelIface struct {
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
- IsL2 uint8 `binapi:"u8,name=is_l2" json:"is_l2,omitempty"`
- DpTable uint32 `binapi:"u32,name=dp_table" json:"dp_table,omitempty"`
- Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
-}
-
-func (m *GpeAddDelIface) Reset() { *m = GpeAddDelIface{} }
-func (*GpeAddDelIface) GetMessageName() string { return "gpe_add_del_iface" }
-func (*GpeAddDelIface) GetCrcString() string { return "42d6b533" }
-func (*GpeAddDelIface) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GpeAddDelIface) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 1 // m.IsL2
- size += 4 // m.DpTable
- size += 4 // m.Vni
- return size
-}
-func (m *GpeAddDelIface) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsAdd)
- buf.EncodeUint8(m.IsL2)
- buf.EncodeUint32(m.DpTable)
- buf.EncodeUint32(m.Vni)
- return buf.Bytes(), nil
-}
-func (m *GpeAddDelIface) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeUint8()
- m.IsL2 = buf.DecodeUint8()
- m.DpTable = buf.DecodeUint32()
- m.Vni = buf.DecodeUint32()
- return nil
-}
-
-// GpeAddDelIfaceReply defines message 'gpe_add_del_iface_reply'.
-type GpeAddDelIfaceReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *GpeAddDelIfaceReply) Reset() { *m = GpeAddDelIfaceReply{} }
-func (*GpeAddDelIfaceReply) GetMessageName() string { return "gpe_add_del_iface_reply" }
-func (*GpeAddDelIfaceReply) GetCrcString() string { return "e8d4e804" }
-func (*GpeAddDelIfaceReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GpeAddDelIfaceReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *GpeAddDelIfaceReply) 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 *GpeAddDelIfaceReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// GpeAddDelNativeFwdRpath defines message 'gpe_add_del_native_fwd_rpath'.
-type GpeAddDelNativeFwdRpath struct {
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
- TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
- NhSwIfIndex uint32 `binapi:"u32,name=nh_sw_if_index" json:"nh_sw_if_index,omitempty"`
- IsIP4 uint8 `binapi:"u8,name=is_ip4" json:"is_ip4,omitempty"`
- NhAddr []byte `binapi:"u8[16],name=nh_addr" json:"nh_addr,omitempty"`
-}
-
-func (m *GpeAddDelNativeFwdRpath) Reset() { *m = GpeAddDelNativeFwdRpath{} }
-func (*GpeAddDelNativeFwdRpath) GetMessageName() string { return "gpe_add_del_native_fwd_rpath" }
-func (*GpeAddDelNativeFwdRpath) GetCrcString() string { return "bfc42b8f" }
-func (*GpeAddDelNativeFwdRpath) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GpeAddDelNativeFwdRpath) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 4 // m.TableID
- size += 4 // m.NhSwIfIndex
- size += 1 // m.IsIP4
- size += 1 * 16 // m.NhAddr
- return size
-}
-func (m *GpeAddDelNativeFwdRpath) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsAdd)
- buf.EncodeUint32(m.TableID)
- buf.EncodeUint32(m.NhSwIfIndex)
- buf.EncodeUint8(m.IsIP4)
- buf.EncodeBytes(m.NhAddr, 16)
- return buf.Bytes(), nil
-}
-func (m *GpeAddDelNativeFwdRpath) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeUint8()
- m.TableID = buf.DecodeUint32()
- m.NhSwIfIndex = buf.DecodeUint32()
- m.IsIP4 = buf.DecodeUint8()
- m.NhAddr = make([]byte, 16)
- copy(m.NhAddr, buf.DecodeBytes(len(m.NhAddr)))
- return nil
-}
-
-// GpeAddDelNativeFwdRpathReply defines message 'gpe_add_del_native_fwd_rpath_reply'.
-type GpeAddDelNativeFwdRpathReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *GpeAddDelNativeFwdRpathReply) Reset() { *m = GpeAddDelNativeFwdRpathReply{} }
-func (*GpeAddDelNativeFwdRpathReply) GetMessageName() string {
- return "gpe_add_del_native_fwd_rpath_reply"
-}
-func (*GpeAddDelNativeFwdRpathReply) GetCrcString() string { return "e8d4e804" }
-func (*GpeAddDelNativeFwdRpathReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GpeAddDelNativeFwdRpathReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *GpeAddDelNativeFwdRpathReply) 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 *GpeAddDelNativeFwdRpathReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// GpeEnableDisable defines message 'gpe_enable_disable'.
-type GpeEnableDisable struct {
- IsEn uint8 `binapi:"u8,name=is_en" json:"is_en,omitempty"`
-}
-
-func (m *GpeEnableDisable) Reset() { *m = GpeEnableDisable{} }
-func (*GpeEnableDisable) GetMessageName() string { return "gpe_enable_disable" }
-func (*GpeEnableDisable) GetCrcString() string { return "eb0e943b" }
-func (*GpeEnableDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GpeEnableDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsEn
- return size
-}
-func (m *GpeEnableDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsEn)
- return buf.Bytes(), nil
-}
-func (m *GpeEnableDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsEn = buf.DecodeUint8()
- return nil
-}
-
-// GpeEnableDisableReply defines message 'gpe_enable_disable_reply'.
-type GpeEnableDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *GpeEnableDisableReply) Reset() { *m = GpeEnableDisableReply{} }
-func (*GpeEnableDisableReply) GetMessageName() string { return "gpe_enable_disable_reply" }
-func (*GpeEnableDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*GpeEnableDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GpeEnableDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *GpeEnableDisableReply) 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 *GpeEnableDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// GpeFwdEntriesGet defines message 'gpe_fwd_entries_get'.
-type GpeFwdEntriesGet struct {
- Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
-}
-
-func (m *GpeFwdEntriesGet) Reset() { *m = GpeFwdEntriesGet{} }
-func (*GpeFwdEntriesGet) GetMessageName() string { return "gpe_fwd_entries_get" }
-func (*GpeFwdEntriesGet) GetCrcString() string { return "8d1f2fe9" }
-func (*GpeFwdEntriesGet) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GpeFwdEntriesGet) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Vni
- return size
-}
-func (m *GpeFwdEntriesGet) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Vni)
- return buf.Bytes(), nil
-}
-func (m *GpeFwdEntriesGet) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Vni = buf.DecodeUint32()
- return nil
-}
-
-// GpeFwdEntriesGetReply defines message 'gpe_fwd_entries_get_reply'.
-type GpeFwdEntriesGetReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- Count uint32 `binapi:"u32,name=count" json:"-"`
- Entries []GpeFwdEntry `binapi:"gpe_fwd_entry[count],name=entries" json:"entries,omitempty"`
-}
-
-func (m *GpeFwdEntriesGetReply) Reset() { *m = GpeFwdEntriesGetReply{} }
-func (*GpeFwdEntriesGetReply) GetMessageName() string { return "gpe_fwd_entries_get_reply" }
-func (*GpeFwdEntriesGetReply) GetCrcString() string { return "07b02c34" }
-func (*GpeFwdEntriesGetReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GpeFwdEntriesGetReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.Count
- for j1 := 0; j1 < len(m.Entries); j1++ {
- var s1 GpeFwdEntry
- _ = s1
- if j1 < len(m.Entries) {
- s1 = m.Entries[j1]
- }
- size += 4 // s1.FwdEntryIndex
- size += 4 // s1.DpTable
- size += 1 // s1.EidType
- size += 1 // s1.LeidPrefixLen
- size += 1 // s1.ReidPrefixLen
- size += 1 * 16 // s1.Leid
- size += 1 * 16 // s1.Reid
- size += 4 // s1.Vni
- size += 1 // s1.Action
- }
- return size
-}
-func (m *GpeFwdEntriesGetReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(uint32(len(m.Entries)))
- for j0 := 0; j0 < len(m.Entries); j0++ {
- var v0 GpeFwdEntry // Entries
- if j0 < len(m.Entries) {
- v0 = m.Entries[j0]
- }
- buf.EncodeUint32(v0.FwdEntryIndex)
- buf.EncodeUint32(v0.DpTable)
- buf.EncodeUint8(v0.EidType)
- buf.EncodeUint8(v0.LeidPrefixLen)
- buf.EncodeUint8(v0.ReidPrefixLen)
- buf.EncodeBytes(v0.Leid, 16)
- buf.EncodeBytes(v0.Reid, 16)
- buf.EncodeUint32(v0.Vni)
- buf.EncodeUint8(v0.Action)
- }
- return buf.Bytes(), nil
-}
-func (m *GpeFwdEntriesGetReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.Count = buf.DecodeUint32()
- m.Entries = make([]GpeFwdEntry, m.Count)
- for j0 := 0; j0 < len(m.Entries); j0++ {
- m.Entries[j0].FwdEntryIndex = buf.DecodeUint32()
- m.Entries[j0].DpTable = buf.DecodeUint32()
- m.Entries[j0].EidType = buf.DecodeUint8()
- m.Entries[j0].LeidPrefixLen = buf.DecodeUint8()
- m.Entries[j0].ReidPrefixLen = buf.DecodeUint8()
- m.Entries[j0].Leid = make([]byte, 16)
- copy(m.Entries[j0].Leid, buf.DecodeBytes(len(m.Entries[j0].Leid)))
- m.Entries[j0].Reid = make([]byte, 16)
- copy(m.Entries[j0].Reid, buf.DecodeBytes(len(m.Entries[j0].Reid)))
- m.Entries[j0].Vni = buf.DecodeUint32()
- m.Entries[j0].Action = buf.DecodeUint8()
- }
- return nil
-}
-
-// GpeFwdEntryPathDetails defines message 'gpe_fwd_entry_path_details'.
-type GpeFwdEntryPathDetails struct {
- LclLoc GpeLocator `binapi:"gpe_locator,name=lcl_loc" json:"lcl_loc,omitempty"`
- RmtLoc GpeLocator `binapi:"gpe_locator,name=rmt_loc" json:"rmt_loc,omitempty"`
-}
-
-func (m *GpeFwdEntryPathDetails) Reset() { *m = GpeFwdEntryPathDetails{} }
-func (*GpeFwdEntryPathDetails) GetMessageName() string { return "gpe_fwd_entry_path_details" }
-func (*GpeFwdEntryPathDetails) GetCrcString() string { return "a9bdc1f1" }
-func (*GpeFwdEntryPathDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GpeFwdEntryPathDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.LclLoc.IsIP4
- size += 1 // m.LclLoc.Weight
- size += 1 * 16 // m.LclLoc.Addr
- size += 1 // m.RmtLoc.IsIP4
- size += 1 // m.RmtLoc.Weight
- size += 1 * 16 // m.RmtLoc.Addr
- return size
-}
-func (m *GpeFwdEntryPathDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.LclLoc.IsIP4)
- buf.EncodeUint8(m.LclLoc.Weight)
- buf.EncodeBytes(m.LclLoc.Addr, 16)
- buf.EncodeUint8(m.RmtLoc.IsIP4)
- buf.EncodeUint8(m.RmtLoc.Weight)
- buf.EncodeBytes(m.RmtLoc.Addr, 16)
- return buf.Bytes(), nil
-}
-func (m *GpeFwdEntryPathDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.LclLoc.IsIP4 = buf.DecodeUint8()
- m.LclLoc.Weight = buf.DecodeUint8()
- m.LclLoc.Addr = make([]byte, 16)
- copy(m.LclLoc.Addr, buf.DecodeBytes(len(m.LclLoc.Addr)))
- m.RmtLoc.IsIP4 = buf.DecodeUint8()
- m.RmtLoc.Weight = buf.DecodeUint8()
- m.RmtLoc.Addr = make([]byte, 16)
- copy(m.RmtLoc.Addr, buf.DecodeBytes(len(m.RmtLoc.Addr)))
- return nil
-}
-
-// GpeFwdEntryPathDump defines message 'gpe_fwd_entry_path_dump'.
-type GpeFwdEntryPathDump struct {
- FwdEntryIndex uint32 `binapi:"u32,name=fwd_entry_index" json:"fwd_entry_index,omitempty"`
-}
-
-func (m *GpeFwdEntryPathDump) Reset() { *m = GpeFwdEntryPathDump{} }
-func (*GpeFwdEntryPathDump) GetMessageName() string { return "gpe_fwd_entry_path_dump" }
-func (*GpeFwdEntryPathDump) GetCrcString() string { return "39bce980" }
-func (*GpeFwdEntryPathDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GpeFwdEntryPathDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.FwdEntryIndex
- return size
-}
-func (m *GpeFwdEntryPathDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.FwdEntryIndex)
- return buf.Bytes(), nil
-}
-func (m *GpeFwdEntryPathDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.FwdEntryIndex = buf.DecodeUint32()
- return nil
-}
-
-// GpeFwdEntryVnisGet defines message 'gpe_fwd_entry_vnis_get'.
-type GpeFwdEntryVnisGet struct{}
-
-func (m *GpeFwdEntryVnisGet) Reset() { *m = GpeFwdEntryVnisGet{} }
-func (*GpeFwdEntryVnisGet) GetMessageName() string { return "gpe_fwd_entry_vnis_get" }
-func (*GpeFwdEntryVnisGet) GetCrcString() string { return "51077d14" }
-func (*GpeFwdEntryVnisGet) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GpeFwdEntryVnisGet) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *GpeFwdEntryVnisGet) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *GpeFwdEntryVnisGet) Unmarshal(b []byte) error {
- return nil
-}
-
-// GpeFwdEntryVnisGetReply defines message 'gpe_fwd_entry_vnis_get_reply'.
-type GpeFwdEntryVnisGetReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- Count uint32 `binapi:"u32,name=count" json:"-"`
- Vnis []uint32 `binapi:"u32[count],name=vnis" json:"vnis,omitempty"`
-}
-
-func (m *GpeFwdEntryVnisGetReply) Reset() { *m = GpeFwdEntryVnisGetReply{} }
-func (*GpeFwdEntryVnisGetReply) GetMessageName() string { return "gpe_fwd_entry_vnis_get_reply" }
-func (*GpeFwdEntryVnisGetReply) GetCrcString() string { return "aa70da20" }
-func (*GpeFwdEntryVnisGetReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GpeFwdEntryVnisGetReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.Count
- size += 4 * len(m.Vnis) // m.Vnis
- return size
-}
-func (m *GpeFwdEntryVnisGetReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(uint32(len(m.Vnis)))
- for i := 0; i < len(m.Vnis); i++ {
- var x uint32
- if i < len(m.Vnis) {
- x = uint32(m.Vnis[i])
- }
- buf.EncodeUint32(x)
- }
- return buf.Bytes(), nil
-}
-func (m *GpeFwdEntryVnisGetReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.Count = buf.DecodeUint32()
- m.Vnis = make([]uint32, m.Count)
- for i := 0; i < len(m.Vnis); i++ {
- m.Vnis[i] = buf.DecodeUint32()
- }
- return nil
-}
-
-// GpeGetEncapMode defines message 'gpe_get_encap_mode'.
-type GpeGetEncapMode struct{}
-
-func (m *GpeGetEncapMode) Reset() { *m = GpeGetEncapMode{} }
-func (*GpeGetEncapMode) GetMessageName() string { return "gpe_get_encap_mode" }
-func (*GpeGetEncapMode) GetCrcString() string { return "51077d14" }
-func (*GpeGetEncapMode) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GpeGetEncapMode) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *GpeGetEncapMode) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *GpeGetEncapMode) Unmarshal(b []byte) error {
- return nil
-}
-
-// GpeGetEncapModeReply defines message 'gpe_get_encap_mode_reply'.
-type GpeGetEncapModeReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- EncapMode uint8 `binapi:"u8,name=encap_mode" json:"encap_mode,omitempty"`
-}
-
-func (m *GpeGetEncapModeReply) Reset() { *m = GpeGetEncapModeReply{} }
-func (*GpeGetEncapModeReply) GetMessageName() string { return "gpe_get_encap_mode_reply" }
-func (*GpeGetEncapModeReply) GetCrcString() string { return "36e3f7ca" }
-func (*GpeGetEncapModeReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GpeGetEncapModeReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 1 // m.EncapMode
- return size
-}
-func (m *GpeGetEncapModeReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint8(m.EncapMode)
- return buf.Bytes(), nil
-}
-func (m *GpeGetEncapModeReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.EncapMode = buf.DecodeUint8()
- return nil
-}
-
-// GpeNativeFwdRpathsGet defines message 'gpe_native_fwd_rpaths_get'.
-type GpeNativeFwdRpathsGet struct {
- IsIP4 uint8 `binapi:"u8,name=is_ip4" json:"is_ip4,omitempty"`
-}
-
-func (m *GpeNativeFwdRpathsGet) Reset() { *m = GpeNativeFwdRpathsGet{} }
-func (*GpeNativeFwdRpathsGet) GetMessageName() string { return "gpe_native_fwd_rpaths_get" }
-func (*GpeNativeFwdRpathsGet) GetCrcString() string { return "c5e0d91b" }
-func (*GpeNativeFwdRpathsGet) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GpeNativeFwdRpathsGet) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsIP4
- return size
-}
-func (m *GpeNativeFwdRpathsGet) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsIP4)
- return buf.Bytes(), nil
-}
-func (m *GpeNativeFwdRpathsGet) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsIP4 = buf.DecodeUint8()
- return nil
-}
-
-// GpeNativeFwdRpathsGetReply defines message 'gpe_native_fwd_rpaths_get_reply'.
-type GpeNativeFwdRpathsGetReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- Count uint32 `binapi:"u32,name=count" json:"-"`
- Entries []GpeNativeFwdRpath `binapi:"gpe_native_fwd_rpath[count],name=entries" json:"entries,omitempty"`
-}
-
-func (m *GpeNativeFwdRpathsGetReply) Reset() { *m = GpeNativeFwdRpathsGetReply{} }
-func (*GpeNativeFwdRpathsGetReply) GetMessageName() string { return "gpe_native_fwd_rpaths_get_reply" }
-func (*GpeNativeFwdRpathsGetReply) GetCrcString() string { return "1e4536e3" }
-func (*GpeNativeFwdRpathsGetReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GpeNativeFwdRpathsGetReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.Count
- for j1 := 0; j1 < len(m.Entries); j1++ {
- var s1 GpeNativeFwdRpath
- _ = s1
- if j1 < len(m.Entries) {
- s1 = m.Entries[j1]
- }
- size += 4 // s1.FibIndex
- size += 4 // s1.NhSwIfIndex
- size += 1 // s1.IsIP4
- size += 1 * 16 // s1.NhAddr
- }
- return size
-}
-func (m *GpeNativeFwdRpathsGetReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(uint32(len(m.Entries)))
- for j0 := 0; j0 < len(m.Entries); j0++ {
- var v0 GpeNativeFwdRpath // Entries
- if j0 < len(m.Entries) {
- v0 = m.Entries[j0]
- }
- buf.EncodeUint32(v0.FibIndex)
- buf.EncodeUint32(v0.NhSwIfIndex)
- buf.EncodeUint8(v0.IsIP4)
- buf.EncodeBytes(v0.NhAddr, 16)
- }
- return buf.Bytes(), nil
-}
-func (m *GpeNativeFwdRpathsGetReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.Count = buf.DecodeUint32()
- m.Entries = make([]GpeNativeFwdRpath, m.Count)
- for j0 := 0; j0 < len(m.Entries); j0++ {
- m.Entries[j0].FibIndex = buf.DecodeUint32()
- m.Entries[j0].NhSwIfIndex = buf.DecodeUint32()
- m.Entries[j0].IsIP4 = buf.DecodeUint8()
- m.Entries[j0].NhAddr = make([]byte, 16)
- copy(m.Entries[j0].NhAddr, buf.DecodeBytes(len(m.Entries[j0].NhAddr)))
- }
- return nil
-}
-
-// GpeSetEncapMode defines message 'gpe_set_encap_mode'.
-type GpeSetEncapMode struct {
- Mode uint8 `binapi:"u8,name=mode" json:"mode,omitempty"`
-}
-
-func (m *GpeSetEncapMode) Reset() { *m = GpeSetEncapMode{} }
-func (*GpeSetEncapMode) GetMessageName() string { return "gpe_set_encap_mode" }
-func (*GpeSetEncapMode) GetCrcString() string { return "f3f93ce9" }
-func (*GpeSetEncapMode) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GpeSetEncapMode) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.Mode
- return size
-}
-func (m *GpeSetEncapMode) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.Mode)
- return buf.Bytes(), nil
-}
-func (m *GpeSetEncapMode) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Mode = buf.DecodeUint8()
- return nil
-}
-
-// GpeSetEncapModeReply defines message 'gpe_set_encap_mode_reply'.
-type GpeSetEncapModeReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *GpeSetEncapModeReply) Reset() { *m = GpeSetEncapModeReply{} }
-func (*GpeSetEncapModeReply) GetMessageName() string { return "gpe_set_encap_mode_reply" }
-func (*GpeSetEncapModeReply) GetCrcString() string { return "e8d4e804" }
-func (*GpeSetEncapModeReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GpeSetEncapModeReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *GpeSetEncapModeReply) 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 *GpeSetEncapModeReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_lisp_gpe_binapi_init() }
-func file_lisp_gpe_binapi_init() {
- api.RegisterMessage((*GpeAddDelFwdEntry)(nil), "gpe_add_del_fwd_entry_afbf857a")
- api.RegisterMessage((*GpeAddDelFwdEntryReply)(nil), "gpe_add_del_fwd_entry_reply_efe5f176")
- api.RegisterMessage((*GpeAddDelIface)(nil), "gpe_add_del_iface_42d6b533")
- api.RegisterMessage((*GpeAddDelIfaceReply)(nil), "gpe_add_del_iface_reply_e8d4e804")
- api.RegisterMessage((*GpeAddDelNativeFwdRpath)(nil), "gpe_add_del_native_fwd_rpath_bfc42b8f")
- api.RegisterMessage((*GpeAddDelNativeFwdRpathReply)(nil), "gpe_add_del_native_fwd_rpath_reply_e8d4e804")
- api.RegisterMessage((*GpeEnableDisable)(nil), "gpe_enable_disable_eb0e943b")
- api.RegisterMessage((*GpeEnableDisableReply)(nil), "gpe_enable_disable_reply_e8d4e804")
- api.RegisterMessage((*GpeFwdEntriesGet)(nil), "gpe_fwd_entries_get_8d1f2fe9")
- api.RegisterMessage((*GpeFwdEntriesGetReply)(nil), "gpe_fwd_entries_get_reply_07b02c34")
- api.RegisterMessage((*GpeFwdEntryPathDetails)(nil), "gpe_fwd_entry_path_details_a9bdc1f1")
- api.RegisterMessage((*GpeFwdEntryPathDump)(nil), "gpe_fwd_entry_path_dump_39bce980")
- api.RegisterMessage((*GpeFwdEntryVnisGet)(nil), "gpe_fwd_entry_vnis_get_51077d14")
- api.RegisterMessage((*GpeFwdEntryVnisGetReply)(nil), "gpe_fwd_entry_vnis_get_reply_aa70da20")
- api.RegisterMessage((*GpeGetEncapMode)(nil), "gpe_get_encap_mode_51077d14")
- api.RegisterMessage((*GpeGetEncapModeReply)(nil), "gpe_get_encap_mode_reply_36e3f7ca")
- api.RegisterMessage((*GpeNativeFwdRpathsGet)(nil), "gpe_native_fwd_rpaths_get_c5e0d91b")
- api.RegisterMessage((*GpeNativeFwdRpathsGetReply)(nil), "gpe_native_fwd_rpaths_get_reply_1e4536e3")
- api.RegisterMessage((*GpeSetEncapMode)(nil), "gpe_set_encap_mode_f3f93ce9")
- api.RegisterMessage((*GpeSetEncapModeReply)(nil), "gpe_set_encap_mode_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*GpeAddDelFwdEntry)(nil),
- (*GpeAddDelFwdEntryReply)(nil),
- (*GpeAddDelIface)(nil),
- (*GpeAddDelIfaceReply)(nil),
- (*GpeAddDelNativeFwdRpath)(nil),
- (*GpeAddDelNativeFwdRpathReply)(nil),
- (*GpeEnableDisable)(nil),
- (*GpeEnableDisableReply)(nil),
- (*GpeFwdEntriesGet)(nil),
- (*GpeFwdEntriesGetReply)(nil),
- (*GpeFwdEntryPathDetails)(nil),
- (*GpeFwdEntryPathDump)(nil),
- (*GpeFwdEntryVnisGet)(nil),
- (*GpeFwdEntryVnisGetReply)(nil),
- (*GpeGetEncapMode)(nil),
- (*GpeGetEncapModeReply)(nil),
- (*GpeNativeFwdRpathsGet)(nil),
- (*GpeNativeFwdRpathsGetReply)(nil),
- (*GpeSetEncapMode)(nil),
- (*GpeSetEncapModeReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/lisp_gpe/lisp_gpe_rpc.ba.go b/internal/testbinapi/binapi2001/lisp_gpe/lisp_gpe_rpc.ba.go
deleted file mode 100644
index 5fc0c95..0000000
--- a/internal/testbinapi/binapi2001/lisp_gpe/lisp_gpe_rpc.ba.go
+++ /dev/null
@@ -1,158 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package lisp_gpe
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service lisp_gpe.
-type RPCService interface {
- GpeAddDelFwdEntry(ctx context.Context, in *GpeAddDelFwdEntry) (*GpeAddDelFwdEntryReply, error)
- GpeAddDelIface(ctx context.Context, in *GpeAddDelIface) (*GpeAddDelIfaceReply, error)
- GpeAddDelNativeFwdRpath(ctx context.Context, in *GpeAddDelNativeFwdRpath) (*GpeAddDelNativeFwdRpathReply, error)
- GpeEnableDisable(ctx context.Context, in *GpeEnableDisable) (*GpeEnableDisableReply, error)
- GpeFwdEntriesGet(ctx context.Context, in *GpeFwdEntriesGet) (*GpeFwdEntriesGetReply, error)
- GpeFwdEntryPathDump(ctx context.Context, in *GpeFwdEntryPathDump) (RPCService_GpeFwdEntryPathDumpClient, error)
- GpeFwdEntryVnisGet(ctx context.Context, in *GpeFwdEntryVnisGet) (*GpeFwdEntryVnisGetReply, error)
- GpeGetEncapMode(ctx context.Context, in *GpeGetEncapMode) (*GpeGetEncapModeReply, error)
- GpeNativeFwdRpathsGet(ctx context.Context, in *GpeNativeFwdRpathsGet) (*GpeNativeFwdRpathsGetReply, error)
- GpeSetEncapMode(ctx context.Context, in *GpeSetEncapMode) (*GpeSetEncapModeReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) GpeAddDelFwdEntry(ctx context.Context, in *GpeAddDelFwdEntry) (*GpeAddDelFwdEntryReply, error) {
- out := new(GpeAddDelFwdEntryReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GpeAddDelIface(ctx context.Context, in *GpeAddDelIface) (*GpeAddDelIfaceReply, error) {
- out := new(GpeAddDelIfaceReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GpeAddDelNativeFwdRpath(ctx context.Context, in *GpeAddDelNativeFwdRpath) (*GpeAddDelNativeFwdRpathReply, error) {
- out := new(GpeAddDelNativeFwdRpathReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GpeEnableDisable(ctx context.Context, in *GpeEnableDisable) (*GpeEnableDisableReply, error) {
- out := new(GpeEnableDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GpeFwdEntriesGet(ctx context.Context, in *GpeFwdEntriesGet) (*GpeFwdEntriesGetReply, error) {
- out := new(GpeFwdEntriesGetReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GpeFwdEntryPathDump(ctx context.Context, in *GpeFwdEntryPathDump) (RPCService_GpeFwdEntryPathDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_GpeFwdEntryPathDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_GpeFwdEntryPathDumpClient interface {
- Recv() (*GpeFwdEntryPathDetails, error)
- api.Stream
-}
-
-type serviceClient_GpeFwdEntryPathDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_GpeFwdEntryPathDumpClient) Recv() (*GpeFwdEntryPathDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *GpeFwdEntryPathDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) GpeFwdEntryVnisGet(ctx context.Context, in *GpeFwdEntryVnisGet) (*GpeFwdEntryVnisGetReply, error) {
- out := new(GpeFwdEntryVnisGetReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GpeGetEncapMode(ctx context.Context, in *GpeGetEncapMode) (*GpeGetEncapModeReply, error) {
- out := new(GpeGetEncapModeReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GpeNativeFwdRpathsGet(ctx context.Context, in *GpeNativeFwdRpathsGet) (*GpeNativeFwdRpathsGetReply, error) {
- out := new(GpeNativeFwdRpathsGetReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GpeSetEncapMode(ctx context.Context, in *GpeSetEncapMode) (*GpeSetEncapModeReply, error) {
- out := new(GpeSetEncapModeReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/lldp/lldp.ba.go b/internal/testbinapi/binapi2001/lldp/lldp.ba.go
deleted file mode 100644
index 0bca38e..0000000
--- a/internal/testbinapi/binapi2001/lldp/lldp.ba.go
+++ /dev/null
@@ -1,212 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/lldp.api.json
-
-// Package lldp contains generated bindings for API file lldp.api.
-//
-// Contents:
-// 4 messages
-//
-package lldp
-
-import (
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the GoVPP api package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// GoVPP api package needs to be updated.
-const _ = api.GoVppAPIPackageIsVersion2
-
-const (
- APIFile = "lldp"
- APIVersion = "1.0.0"
- VersionCrc = 0xabb21dd0
-)
-
-// LldpConfig defines message 'lldp_config'.
-type LldpConfig struct {
- SystemName []byte `binapi:"u8[256],name=system_name" json:"system_name,omitempty"`
- TxHold uint32 `binapi:"u32,name=tx_hold" json:"tx_hold,omitempty"`
- TxInterval uint32 `binapi:"u32,name=tx_interval" json:"tx_interval,omitempty"`
-}
-
-func (m *LldpConfig) Reset() { *m = LldpConfig{} }
-func (*LldpConfig) GetMessageName() string { return "lldp_config" }
-func (*LldpConfig) GetCrcString() string { return "2410286f" }
-func (*LldpConfig) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *LldpConfig) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 256 // m.SystemName
- size += 4 // m.TxHold
- size += 4 // m.TxInterval
- return size
-}
-func (m *LldpConfig) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.SystemName, 256)
- buf.EncodeUint32(m.TxHold)
- buf.EncodeUint32(m.TxInterval)
- return buf.Bytes(), nil
-}
-func (m *LldpConfig) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SystemName = make([]byte, 256)
- copy(m.SystemName, buf.DecodeBytes(len(m.SystemName)))
- m.TxHold = buf.DecodeUint32()
- m.TxInterval = buf.DecodeUint32()
- return nil
-}
-
-// LldpConfigReply defines message 'lldp_config_reply'.
-type LldpConfigReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *LldpConfigReply) Reset() { *m = LldpConfigReply{} }
-func (*LldpConfigReply) GetMessageName() string { return "lldp_config_reply" }
-func (*LldpConfigReply) GetCrcString() string { return "e8d4e804" }
-func (*LldpConfigReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *LldpConfigReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *LldpConfigReply) 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 *LldpConfigReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SwInterfaceSetLldp defines message 'sw_interface_set_lldp'.
-type SwInterfaceSetLldp struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- PortDesc []byte `binapi:"u8[256],name=port_desc" json:"port_desc,omitempty"`
- MgmtIP4 []byte `binapi:"u8[4],name=mgmt_ip4" json:"mgmt_ip4,omitempty"`
- MgmtIP6 []byte `binapi:"u8[16],name=mgmt_ip6" json:"mgmt_ip6,omitempty"`
- MgmtOid []byte `binapi:"u8[128],name=mgmt_oid" json:"mgmt_oid,omitempty"`
- Enable uint8 `binapi:"u8,name=enable" json:"enable,omitempty"`
-}
-
-func (m *SwInterfaceSetLldp) Reset() { *m = SwInterfaceSetLldp{} }
-func (*SwInterfaceSetLldp) GetMessageName() string { return "sw_interface_set_lldp" }
-func (*SwInterfaceSetLldp) GetCrcString() string { return "2d85d156" }
-func (*SwInterfaceSetLldp) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceSetLldp) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 * 256 // m.PortDesc
- size += 1 * 4 // m.MgmtIP4
- size += 1 * 16 // m.MgmtIP6
- size += 1 * 128 // m.MgmtOid
- size += 1 // m.Enable
- return size
-}
-func (m *SwInterfaceSetLldp) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.SwIfIndex)
- buf.EncodeBytes(m.PortDesc, 256)
- buf.EncodeBytes(m.MgmtIP4, 4)
- buf.EncodeBytes(m.MgmtIP6, 16)
- buf.EncodeBytes(m.MgmtOid, 128)
- buf.EncodeUint8(m.Enable)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceSetLldp) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = buf.DecodeUint32()
- m.PortDesc = make([]byte, 256)
- copy(m.PortDesc, buf.DecodeBytes(len(m.PortDesc)))
- m.MgmtIP4 = make([]byte, 4)
- copy(m.MgmtIP4, buf.DecodeBytes(len(m.MgmtIP4)))
- m.MgmtIP6 = make([]byte, 16)
- copy(m.MgmtIP6, buf.DecodeBytes(len(m.MgmtIP6)))
- m.MgmtOid = make([]byte, 128)
- copy(m.MgmtOid, buf.DecodeBytes(len(m.MgmtOid)))
- m.Enable = buf.DecodeUint8()
- return nil
-}
-
-// SwInterfaceSetLldpReply defines message 'sw_interface_set_lldp_reply'.
-type SwInterfaceSetLldpReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SwInterfaceSetLldpReply) Reset() { *m = SwInterfaceSetLldpReply{} }
-func (*SwInterfaceSetLldpReply) GetMessageName() string { return "sw_interface_set_lldp_reply" }
-func (*SwInterfaceSetLldpReply) GetCrcString() string { return "e8d4e804" }
-func (*SwInterfaceSetLldpReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SwInterfaceSetLldpReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SwInterfaceSetLldpReply) 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 *SwInterfaceSetLldpReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_lldp_binapi_init() }
-func file_lldp_binapi_init() {
- api.RegisterMessage((*LldpConfig)(nil), "lldp_config_2410286f")
- api.RegisterMessage((*LldpConfigReply)(nil), "lldp_config_reply_e8d4e804")
- api.RegisterMessage((*SwInterfaceSetLldp)(nil), "sw_interface_set_lldp_2d85d156")
- api.RegisterMessage((*SwInterfaceSetLldpReply)(nil), "sw_interface_set_lldp_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*LldpConfig)(nil),
- (*LldpConfigReply)(nil),
- (*SwInterfaceSetLldp)(nil),
- (*SwInterfaceSetLldpReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/lldp/lldp_rpc.ba.go b/internal/testbinapi/binapi2001/lldp/lldp_rpc.ba.go
deleted file mode 100644
index d9fdbc5..0000000
--- a/internal/testbinapi/binapi2001/lldp/lldp_rpc.ba.go
+++ /dev/null
@@ -1,41 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package lldp
-
-import (
- "context"
-
- api "git.fd.io/govpp.git/api"
-)
-
-// RPCService defines RPC service lldp.
-type RPCService interface {
- LldpConfig(ctx context.Context, in *LldpConfig) (*LldpConfigReply, error)
- SwInterfaceSetLldp(ctx context.Context, in *SwInterfaceSetLldp) (*SwInterfaceSetLldpReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) LldpConfig(ctx context.Context, in *LldpConfig) (*LldpConfigReply, error) {
- out := new(LldpConfigReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SwInterfaceSetLldp(ctx context.Context, in *SwInterfaceSetLldp) (*SwInterfaceSetLldpReply, error) {
- out := new(SwInterfaceSetLldpReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/mactime/mactime.ba.go b/internal/testbinapi/binapi2001/mactime/mactime.ba.go
deleted file mode 100644
index 699d329..0000000
--- a/internal/testbinapi/binapi2001/mactime/mactime.ba.go
+++ /dev/null
@@ -1,700 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/plugins/mactime.api.json
-
-// Package mactime contains generated bindings for API file mactime.api.
-//
-// Contents:
-// 2 aliases
-// 6 enums
-// 2 structs
-// 7 messages
-//
-package mactime
-
-import (
- "net"
- "strconv"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "mactime"
- APIVersion = "2.0.0"
- VersionCrc = 0xd32f01e0
-)
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// MacAddress defines alias 'mac_address'.
-type MacAddress [6]uint8
-
-func ParseMacAddress(s string) (MacAddress, error) {
- var macaddr MacAddress
- mac, err := net.ParseMAC(s)
- if err != nil {
- return macaddr, err
- }
- copy(macaddr[:], mac[:])
- return macaddr, nil
-}
-
-func (x MacAddress) ToMAC() net.HardwareAddr {
- return net.HardwareAddr(x[:])
-}
-
-func (x MacAddress) String() string {
- return x.ToMAC().String()
-}
-
-func (x *MacAddress) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *MacAddress) UnmarshalText(text []byte) error {
- mac, err := ParseMacAddress(string(text))
- if err != nil {
- return err
- }
- *x = mac
- return nil
-}
-
-// MactimeTimeRange defines type 'mactime_time_range'.
-type MactimeTimeRange struct {
- Start float64 `binapi:"f64,name=start" json:"start,omitempty"`
- End float64 `binapi:"f64,name=end" json:"end,omitempty"`
-}
-
-// TimeRange defines type 'time_range'.
-type TimeRange struct {
- Start float64 `binapi:"f64,name=start" json:"start,omitempty"`
- End float64 `binapi:"f64,name=end" json:"end,omitempty"`
-}
-
-// MactimeAddDelRange defines message 'mactime_add_del_range'.
-type MactimeAddDelRange struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- Drop bool `binapi:"bool,name=drop" json:"drop,omitempty"`
- Allow bool `binapi:"bool,name=allow" json:"allow,omitempty"`
- AllowQuota uint8 `binapi:"u8,name=allow_quota" json:"allow_quota,omitempty"`
- NoUDP10001 bool `binapi:"bool,name=no_udp_10001" json:"no_udp_10001,omitempty"`
- DataQuota uint64 `binapi:"u64,name=data_quota" json:"data_quota,omitempty"`
- MacAddress MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
- DeviceName string `binapi:"string[64],name=device_name" json:"device_name,omitempty"`
- Count uint32 `binapi:"u32,name=count" json:"-"`
- Ranges []TimeRange `binapi:"time_range[count],name=ranges" json:"ranges,omitempty"`
-}
-
-func (m *MactimeAddDelRange) Reset() { *m = MactimeAddDelRange{} }
-func (*MactimeAddDelRange) GetMessageName() string { return "mactime_add_del_range" }
-func (*MactimeAddDelRange) GetCrcString() string { return "101858ef" }
-func (*MactimeAddDelRange) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *MactimeAddDelRange) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 1 // m.Drop
- size += 1 // m.Allow
- size += 1 // m.AllowQuota
- size += 1 // m.NoUDP10001
- size += 8 // m.DataQuota
- size += 1 * 6 // m.MacAddress
- size += 64 // m.DeviceName
- size += 4 // m.Count
- for j1 := 0; j1 < len(m.Ranges); j1++ {
- var s1 TimeRange
- _ = s1
- if j1 < len(m.Ranges) {
- s1 = m.Ranges[j1]
- }
- size += 8 // s1.Start
- size += 8 // s1.End
- }
- return size
-}
-func (m *MactimeAddDelRange) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeBool(m.Drop)
- buf.EncodeBool(m.Allow)
- buf.EncodeUint8(m.AllowQuota)
- buf.EncodeBool(m.NoUDP10001)
- buf.EncodeUint64(m.DataQuota)
- buf.EncodeBytes(m.MacAddress[:], 6)
- buf.EncodeString(m.DeviceName, 64)
- buf.EncodeUint32(uint32(len(m.Ranges)))
- for j0 := 0; j0 < len(m.Ranges); j0++ {
- var v0 TimeRange // Ranges
- if j0 < len(m.Ranges) {
- v0 = m.Ranges[j0]
- }
- buf.EncodeFloat64(v0.Start)
- buf.EncodeFloat64(v0.End)
- }
- return buf.Bytes(), nil
-}
-func (m *MactimeAddDelRange) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.Drop = buf.DecodeBool()
- m.Allow = buf.DecodeBool()
- m.AllowQuota = buf.DecodeUint8()
- m.NoUDP10001 = buf.DecodeBool()
- m.DataQuota = buf.DecodeUint64()
- copy(m.MacAddress[:], buf.DecodeBytes(6))
- m.DeviceName = buf.DecodeString(64)
- m.Count = buf.DecodeUint32()
- m.Ranges = make([]TimeRange, m.Count)
- for j0 := 0; j0 < len(m.Ranges); j0++ {
- m.Ranges[j0].Start = buf.DecodeFloat64()
- m.Ranges[j0].End = buf.DecodeFloat64()
- }
- return nil
-}
-
-// MactimeAddDelRangeReply defines message 'mactime_add_del_range_reply'.
-type MactimeAddDelRangeReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *MactimeAddDelRangeReply) Reset() { *m = MactimeAddDelRangeReply{} }
-func (*MactimeAddDelRangeReply) GetMessageName() string { return "mactime_add_del_range_reply" }
-func (*MactimeAddDelRangeReply) GetCrcString() string { return "e8d4e804" }
-func (*MactimeAddDelRangeReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MactimeAddDelRangeReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *MactimeAddDelRangeReply) 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 *MactimeAddDelRangeReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// MactimeDetails defines message 'mactime_details'.
-type MactimeDetails struct {
- PoolIndex uint32 `binapi:"u32,name=pool_index" json:"pool_index,omitempty"`
- MacAddress MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
- DataQuota uint64 `binapi:"u64,name=data_quota" json:"data_quota,omitempty"`
- DataUsedInRange uint64 `binapi:"u64,name=data_used_in_range" json:"data_used_in_range,omitempty"`
- Flags uint32 `binapi:"u32,name=flags" json:"flags,omitempty"`
- DeviceName string `binapi:"string[64],name=device_name" json:"device_name,omitempty"`
- Nranges uint32 `binapi:"u32,name=nranges" json:"-"`
- Ranges []MactimeTimeRange `binapi:"mactime_time_range[nranges],name=ranges" json:"ranges,omitempty"`
-}
-
-func (m *MactimeDetails) Reset() { *m = MactimeDetails{} }
-func (*MactimeDetails) GetMessageName() string { return "mactime_details" }
-func (*MactimeDetails) GetCrcString() string { return "44921c06" }
-func (*MactimeDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MactimeDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.PoolIndex
- size += 1 * 6 // m.MacAddress
- size += 8 // m.DataQuota
- size += 8 // m.DataUsedInRange
- size += 4 // m.Flags
- size += 64 // m.DeviceName
- size += 4 // m.Nranges
- for j1 := 0; j1 < len(m.Ranges); j1++ {
- var s1 MactimeTimeRange
- _ = s1
- if j1 < len(m.Ranges) {
- s1 = m.Ranges[j1]
- }
- size += 8 // s1.Start
- size += 8 // s1.End
- }
- return size
-}
-func (m *MactimeDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.PoolIndex)
- buf.EncodeBytes(m.MacAddress[:], 6)
- buf.EncodeUint64(m.DataQuota)
- buf.EncodeUint64(m.DataUsedInRange)
- buf.EncodeUint32(m.Flags)
- buf.EncodeString(m.DeviceName, 64)
- buf.EncodeUint32(uint32(len(m.Ranges)))
- for j0 := 0; j0 < len(m.Ranges); j0++ {
- var v0 MactimeTimeRange // Ranges
- if j0 < len(m.Ranges) {
- v0 = m.Ranges[j0]
- }
- buf.EncodeFloat64(v0.Start)
- buf.EncodeFloat64(v0.End)
- }
- return buf.Bytes(), nil
-}
-func (m *MactimeDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.PoolIndex = buf.DecodeUint32()
- copy(m.MacAddress[:], buf.DecodeBytes(6))
- m.DataQuota = buf.DecodeUint64()
- m.DataUsedInRange = buf.DecodeUint64()
- m.Flags = buf.DecodeUint32()
- m.DeviceName = buf.DecodeString(64)
- m.Nranges = buf.DecodeUint32()
- m.Ranges = make([]MactimeTimeRange, m.Nranges)
- for j0 := 0; j0 < len(m.Ranges); j0++ {
- m.Ranges[j0].Start = buf.DecodeFloat64()
- m.Ranges[j0].End = buf.DecodeFloat64()
- }
- return nil
-}
-
-// MactimeDump defines message 'mactime_dump'.
-type MactimeDump struct {
- MyTableEpoch uint32 `binapi:"u32,name=my_table_epoch" json:"my_table_epoch,omitempty"`
-}
-
-func (m *MactimeDump) Reset() { *m = MactimeDump{} }
-func (*MactimeDump) GetMessageName() string { return "mactime_dump" }
-func (*MactimeDump) GetCrcString() string { return "8f454e23" }
-func (*MactimeDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *MactimeDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.MyTableEpoch
- return size
-}
-func (m *MactimeDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.MyTableEpoch)
- return buf.Bytes(), nil
-}
-func (m *MactimeDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.MyTableEpoch = buf.DecodeUint32()
- return nil
-}
-
-// MactimeDumpReply defines message 'mactime_dump_reply'.
-type MactimeDumpReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- TableEpoch uint32 `binapi:"u32,name=table_epoch" json:"table_epoch,omitempty"`
-}
-
-func (m *MactimeDumpReply) Reset() { *m = MactimeDumpReply{} }
-func (*MactimeDumpReply) GetMessageName() string { return "mactime_dump_reply" }
-func (*MactimeDumpReply) GetCrcString() string { return "49bcc753" }
-func (*MactimeDumpReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MactimeDumpReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.TableEpoch
- return size
-}
-func (m *MactimeDumpReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.TableEpoch)
- return buf.Bytes(), nil
-}
-func (m *MactimeDumpReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.TableEpoch = buf.DecodeUint32()
- return nil
-}
-
-// MactimeEnableDisable defines message 'mactime_enable_disable'.
-type MactimeEnableDisable struct {
- EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *MactimeEnableDisable) Reset() { *m = MactimeEnableDisable{} }
-func (*MactimeEnableDisable) GetMessageName() string { return "mactime_enable_disable" }
-func (*MactimeEnableDisable) GetCrcString() string { return "3865946c" }
-func (*MactimeEnableDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *MactimeEnableDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.EnableDisable
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *MactimeEnableDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.EnableDisable)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- return buf.Bytes(), nil
-}
-func (m *MactimeEnableDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.EnableDisable = buf.DecodeBool()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// MactimeEnableDisableReply defines message 'mactime_enable_disable_reply'.
-type MactimeEnableDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *MactimeEnableDisableReply) Reset() { *m = MactimeEnableDisableReply{} }
-func (*MactimeEnableDisableReply) GetMessageName() string { return "mactime_enable_disable_reply" }
-func (*MactimeEnableDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*MactimeEnableDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MactimeEnableDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *MactimeEnableDisableReply) 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 *MactimeEnableDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_mactime_binapi_init() }
-func file_mactime_binapi_init() {
- api.RegisterMessage((*MactimeAddDelRange)(nil), "mactime_add_del_range_101858ef")
- api.RegisterMessage((*MactimeAddDelRangeReply)(nil), "mactime_add_del_range_reply_e8d4e804")
- api.RegisterMessage((*MactimeDetails)(nil), "mactime_details_44921c06")
- api.RegisterMessage((*MactimeDump)(nil), "mactime_dump_8f454e23")
- api.RegisterMessage((*MactimeDumpReply)(nil), "mactime_dump_reply_49bcc753")
- api.RegisterMessage((*MactimeEnableDisable)(nil), "mactime_enable_disable_3865946c")
- api.RegisterMessage((*MactimeEnableDisableReply)(nil), "mactime_enable_disable_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*MactimeAddDelRange)(nil),
- (*MactimeAddDelRangeReply)(nil),
- (*MactimeDetails)(nil),
- (*MactimeDump)(nil),
- (*MactimeDumpReply)(nil),
- (*MactimeEnableDisable)(nil),
- (*MactimeEnableDisableReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/mactime/mactime_rpc.ba.go b/internal/testbinapi/binapi2001/mactime/mactime_rpc.ba.go
deleted file mode 100644
index 89630da..0000000
--- a/internal/testbinapi/binapi2001/mactime/mactime_rpc.ba.go
+++ /dev/null
@@ -1,88 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package mactime
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service mactime.
-type RPCService interface {
- MactimeAddDelRange(ctx context.Context, in *MactimeAddDelRange) (*MactimeAddDelRangeReply, error)
- MactimeDump(ctx context.Context, in *MactimeDump) (RPCService_MactimeDumpClient, error)
- MactimeEnableDisable(ctx context.Context, in *MactimeEnableDisable) (*MactimeEnableDisableReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) MactimeAddDelRange(ctx context.Context, in *MactimeAddDelRange) (*MactimeAddDelRangeReply, error) {
- out := new(MactimeAddDelRangeReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) MactimeDump(ctx context.Context, in *MactimeDump) (RPCService_MactimeDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_MactimeDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_MactimeDumpClient interface {
- Recv() (*MactimeDetails, error)
- api.Stream
-}
-
-type serviceClient_MactimeDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_MactimeDumpClient) Recv() (*MactimeDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *MactimeDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) MactimeEnableDisable(ctx context.Context, in *MactimeEnableDisable) (*MactimeEnableDisableReply, error) {
- out := new(MactimeEnableDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/map/map.ba.go b/internal/testbinapi/binapi2001/map/map.ba.go
deleted file mode 100644
index b5dc558..0000000
--- a/internal/testbinapi/binapi2001/map/map.ba.go
+++ /dev/null
@@ -1,2164 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/plugins/map.api.json
-
-// Package maps contains generated bindings for API file map.api.
-//
-// Contents:
-// 6 aliases
-// 10 enums
-// 6 structs
-// 1 union
-// 30 messages
-//
-package maps
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "map"
- APIVersion = "4.1.1"
- VersionCrc = 0x42c84657
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
-
-// MapAddDelRule defines message 'map_add_del_rule'.
-type MapAddDelRule struct {
- Index uint32 `binapi:"u32,name=index" json:"index,omitempty"`
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- IP6Dst IP6Address `binapi:"ip6_address,name=ip6_dst" json:"ip6_dst,omitempty"`
- Psid uint16 `binapi:"u16,name=psid" json:"psid,omitempty"`
-}
-
-func (m *MapAddDelRule) Reset() { *m = MapAddDelRule{} }
-func (*MapAddDelRule) GetMessageName() string { return "map_add_del_rule" }
-func (*MapAddDelRule) GetCrcString() string { return "c65b32f7" }
-func (*MapAddDelRule) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *MapAddDelRule) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Index
- size += 1 // m.IsAdd
- size += 1 * 16 // m.IP6Dst
- size += 2 // m.Psid
- return size
-}
-func (m *MapAddDelRule) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Index)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeBytes(m.IP6Dst[:], 16)
- buf.EncodeUint16(m.Psid)
- return buf.Bytes(), nil
-}
-func (m *MapAddDelRule) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Index = buf.DecodeUint32()
- m.IsAdd = buf.DecodeBool()
- copy(m.IP6Dst[:], buf.DecodeBytes(16))
- m.Psid = buf.DecodeUint16()
- return nil
-}
-
-// MapAddDelRuleReply defines message 'map_add_del_rule_reply'.
-type MapAddDelRuleReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *MapAddDelRuleReply) Reset() { *m = MapAddDelRuleReply{} }
-func (*MapAddDelRuleReply) GetMessageName() string { return "map_add_del_rule_reply" }
-func (*MapAddDelRuleReply) GetCrcString() string { return "e8d4e804" }
-func (*MapAddDelRuleReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MapAddDelRuleReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *MapAddDelRuleReply) 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 *MapAddDelRuleReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// MapAddDomain defines message 'map_add_domain'.
-type MapAddDomain struct {
- IP6Prefix IP6Prefix `binapi:"ip6_prefix,name=ip6_prefix" json:"ip6_prefix,omitempty"`
- IP4Prefix IP4Prefix `binapi:"ip4_prefix,name=ip4_prefix" json:"ip4_prefix,omitempty"`
- IP6Src IP6Prefix `binapi:"ip6_prefix,name=ip6_src" json:"ip6_src,omitempty"`
- EaBitsLen uint8 `binapi:"u8,name=ea_bits_len" json:"ea_bits_len,omitempty"`
- PsidOffset uint8 `binapi:"u8,name=psid_offset" json:"psid_offset,omitempty"`
- PsidLength uint8 `binapi:"u8,name=psid_length" json:"psid_length,omitempty"`
- Mtu uint16 `binapi:"u16,name=mtu" json:"mtu,omitempty"`
- Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"`
-}
-
-func (m *MapAddDomain) Reset() { *m = MapAddDomain{} }
-func (*MapAddDomain) GetMessageName() string { return "map_add_domain" }
-func (*MapAddDomain) GetCrcString() string { return "7a5a18c9" }
-func (*MapAddDomain) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *MapAddDomain) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 16 // m.IP6Prefix.Address
- size += 1 // m.IP6Prefix.Len
- size += 1 * 4 // m.IP4Prefix.Address
- size += 1 // m.IP4Prefix.Len
- size += 1 * 16 // m.IP6Src.Address
- size += 1 // m.IP6Src.Len
- size += 1 // m.EaBitsLen
- size += 1 // m.PsidOffset
- size += 1 // m.PsidLength
- size += 2 // m.Mtu
- size += 64 // m.Tag
- return size
-}
-func (m *MapAddDomain) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.IP6Prefix.Address[:], 16)
- buf.EncodeUint8(m.IP6Prefix.Len)
- buf.EncodeBytes(m.IP4Prefix.Address[:], 4)
- buf.EncodeUint8(m.IP4Prefix.Len)
- buf.EncodeBytes(m.IP6Src.Address[:], 16)
- buf.EncodeUint8(m.IP6Src.Len)
- buf.EncodeUint8(m.EaBitsLen)
- buf.EncodeUint8(m.PsidOffset)
- buf.EncodeUint8(m.PsidLength)
- buf.EncodeUint16(m.Mtu)
- buf.EncodeString(m.Tag, 64)
- return buf.Bytes(), nil
-}
-func (m *MapAddDomain) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- copy(m.IP6Prefix.Address[:], buf.DecodeBytes(16))
- m.IP6Prefix.Len = buf.DecodeUint8()
- copy(m.IP4Prefix.Address[:], buf.DecodeBytes(4))
- m.IP4Prefix.Len = buf.DecodeUint8()
- copy(m.IP6Src.Address[:], buf.DecodeBytes(16))
- m.IP6Src.Len = buf.DecodeUint8()
- m.EaBitsLen = buf.DecodeUint8()
- m.PsidOffset = buf.DecodeUint8()
- m.PsidLength = buf.DecodeUint8()
- m.Mtu = buf.DecodeUint16()
- m.Tag = buf.DecodeString(64)
- return nil
-}
-
-// MapAddDomainReply defines message 'map_add_domain_reply'.
-type MapAddDomainReply struct {
- Index uint32 `binapi:"u32,name=index" json:"index,omitempty"`
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *MapAddDomainReply) Reset() { *m = MapAddDomainReply{} }
-func (*MapAddDomainReply) GetMessageName() string { return "map_add_domain_reply" }
-func (*MapAddDomainReply) GetCrcString() string { return "3e6d4e2c" }
-func (*MapAddDomainReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MapAddDomainReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Index
- size += 4 // m.Retval
- return size
-}
-func (m *MapAddDomainReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Index)
- buf.EncodeInt32(m.Retval)
- return buf.Bytes(), nil
-}
-func (m *MapAddDomainReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Index = buf.DecodeUint32()
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// MapDelDomain defines message 'map_del_domain'.
-type MapDelDomain struct {
- Index uint32 `binapi:"u32,name=index" json:"index,omitempty"`
-}
-
-func (m *MapDelDomain) Reset() { *m = MapDelDomain{} }
-func (*MapDelDomain) GetMessageName() string { return "map_del_domain" }
-func (*MapDelDomain) GetCrcString() string { return "8ac76db6" }
-func (*MapDelDomain) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *MapDelDomain) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Index
- return size
-}
-func (m *MapDelDomain) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Index)
- return buf.Bytes(), nil
-}
-func (m *MapDelDomain) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Index = buf.DecodeUint32()
- return nil
-}
-
-// MapDelDomainReply defines message 'map_del_domain_reply'.
-type MapDelDomainReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *MapDelDomainReply) Reset() { *m = MapDelDomainReply{} }
-func (*MapDelDomainReply) GetMessageName() string { return "map_del_domain_reply" }
-func (*MapDelDomainReply) GetCrcString() string { return "e8d4e804" }
-func (*MapDelDomainReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MapDelDomainReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *MapDelDomainReply) 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 *MapDelDomainReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// MapDomainDetails defines message 'map_domain_details'.
-type MapDomainDetails struct {
- DomainIndex uint32 `binapi:"u32,name=domain_index" json:"domain_index,omitempty"`
- IP6Prefix IP6Prefix `binapi:"ip6_prefix,name=ip6_prefix" json:"ip6_prefix,omitempty"`
- IP4Prefix IP4Prefix `binapi:"ip4_prefix,name=ip4_prefix" json:"ip4_prefix,omitempty"`
- IP6Src IP6Prefix `binapi:"ip6_prefix,name=ip6_src" json:"ip6_src,omitempty"`
- EaBitsLen uint8 `binapi:"u8,name=ea_bits_len" json:"ea_bits_len,omitempty"`
- PsidOffset uint8 `binapi:"u8,name=psid_offset" json:"psid_offset,omitempty"`
- PsidLength uint8 `binapi:"u8,name=psid_length" json:"psid_length,omitempty"`
- Flags uint8 `binapi:"u8,name=flags" json:"flags,omitempty"`
- Mtu uint16 `binapi:"u16,name=mtu" json:"mtu,omitempty"`
- Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"`
-}
-
-func (m *MapDomainDetails) Reset() { *m = MapDomainDetails{} }
-func (*MapDomainDetails) GetMessageName() string { return "map_domain_details" }
-func (*MapDomainDetails) GetCrcString() string { return "fc1859dd" }
-func (*MapDomainDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MapDomainDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.DomainIndex
- size += 1 * 16 // m.IP6Prefix.Address
- size += 1 // m.IP6Prefix.Len
- size += 1 * 4 // m.IP4Prefix.Address
- size += 1 // m.IP4Prefix.Len
- size += 1 * 16 // m.IP6Src.Address
- size += 1 // m.IP6Src.Len
- size += 1 // m.EaBitsLen
- size += 1 // m.PsidOffset
- size += 1 // m.PsidLength
- size += 1 // m.Flags
- size += 2 // m.Mtu
- size += 64 // m.Tag
- return size
-}
-func (m *MapDomainDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.DomainIndex)
- buf.EncodeBytes(m.IP6Prefix.Address[:], 16)
- buf.EncodeUint8(m.IP6Prefix.Len)
- buf.EncodeBytes(m.IP4Prefix.Address[:], 4)
- buf.EncodeUint8(m.IP4Prefix.Len)
- buf.EncodeBytes(m.IP6Src.Address[:], 16)
- buf.EncodeUint8(m.IP6Src.Len)
- buf.EncodeUint8(m.EaBitsLen)
- buf.EncodeUint8(m.PsidOffset)
- buf.EncodeUint8(m.PsidLength)
- buf.EncodeUint8(m.Flags)
- buf.EncodeUint16(m.Mtu)
- buf.EncodeString(m.Tag, 64)
- return buf.Bytes(), nil
-}
-func (m *MapDomainDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.DomainIndex = buf.DecodeUint32()
- copy(m.IP6Prefix.Address[:], buf.DecodeBytes(16))
- m.IP6Prefix.Len = buf.DecodeUint8()
- copy(m.IP4Prefix.Address[:], buf.DecodeBytes(4))
- m.IP4Prefix.Len = buf.DecodeUint8()
- copy(m.IP6Src.Address[:], buf.DecodeBytes(16))
- m.IP6Src.Len = buf.DecodeUint8()
- m.EaBitsLen = buf.DecodeUint8()
- m.PsidOffset = buf.DecodeUint8()
- m.PsidLength = buf.DecodeUint8()
- m.Flags = buf.DecodeUint8()
- m.Mtu = buf.DecodeUint16()
- m.Tag = buf.DecodeString(64)
- return nil
-}
-
-// MapDomainDump defines message 'map_domain_dump'.
-type MapDomainDump struct{}
-
-func (m *MapDomainDump) Reset() { *m = MapDomainDump{} }
-func (*MapDomainDump) GetMessageName() string { return "map_domain_dump" }
-func (*MapDomainDump) GetCrcString() string { return "51077d14" }
-func (*MapDomainDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *MapDomainDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *MapDomainDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *MapDomainDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// MapIfEnableDisable defines message 'map_if_enable_disable'.
-type MapIfEnableDisable struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- IsEnable bool `binapi:"bool,name=is_enable" json:"is_enable,omitempty"`
- IsTranslation bool `binapi:"bool,name=is_translation" json:"is_translation,omitempty"`
-}
-
-func (m *MapIfEnableDisable) Reset() { *m = MapIfEnableDisable{} }
-func (*MapIfEnableDisable) GetMessageName() string { return "map_if_enable_disable" }
-func (*MapIfEnableDisable) GetCrcString() string { return "59bb32f4" }
-func (*MapIfEnableDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *MapIfEnableDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.IsEnable
- size += 1 // m.IsTranslation
- return size
-}
-func (m *MapIfEnableDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeBool(m.IsEnable)
- buf.EncodeBool(m.IsTranslation)
- return buf.Bytes(), nil
-}
-func (m *MapIfEnableDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.IsEnable = buf.DecodeBool()
- m.IsTranslation = buf.DecodeBool()
- return nil
-}
-
-// MapIfEnableDisableReply defines message 'map_if_enable_disable_reply'.
-type MapIfEnableDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *MapIfEnableDisableReply) Reset() { *m = MapIfEnableDisableReply{} }
-func (*MapIfEnableDisableReply) GetMessageName() string { return "map_if_enable_disable_reply" }
-func (*MapIfEnableDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*MapIfEnableDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MapIfEnableDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *MapIfEnableDisableReply) 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 *MapIfEnableDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// MapParamAddDelPreResolve defines message 'map_param_add_del_pre_resolve'.
-type MapParamAddDelPreResolve struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- IP4NhAddress IP4Address `binapi:"ip4_address,name=ip4_nh_address" json:"ip4_nh_address,omitempty"`
- IP6NhAddress IP6Address `binapi:"ip6_address,name=ip6_nh_address" json:"ip6_nh_address,omitempty"`
-}
-
-func (m *MapParamAddDelPreResolve) Reset() { *m = MapParamAddDelPreResolve{} }
-func (*MapParamAddDelPreResolve) GetMessageName() string { return "map_param_add_del_pre_resolve" }
-func (*MapParamAddDelPreResolve) GetCrcString() string { return "17008c66" }
-func (*MapParamAddDelPreResolve) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *MapParamAddDelPreResolve) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 1 * 4 // m.IP4NhAddress
- size += 1 * 16 // m.IP6NhAddress
- return size
-}
-func (m *MapParamAddDelPreResolve) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeBytes(m.IP4NhAddress[:], 4)
- buf.EncodeBytes(m.IP6NhAddress[:], 16)
- return buf.Bytes(), nil
-}
-func (m *MapParamAddDelPreResolve) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- copy(m.IP4NhAddress[:], buf.DecodeBytes(4))
- copy(m.IP6NhAddress[:], buf.DecodeBytes(16))
- return nil
-}
-
-// MapParamAddDelPreResolveReply defines message 'map_param_add_del_pre_resolve_reply'.
-type MapParamAddDelPreResolveReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *MapParamAddDelPreResolveReply) Reset() { *m = MapParamAddDelPreResolveReply{} }
-func (*MapParamAddDelPreResolveReply) GetMessageName() string {
- return "map_param_add_del_pre_resolve_reply"
-}
-func (*MapParamAddDelPreResolveReply) GetCrcString() string { return "e8d4e804" }
-func (*MapParamAddDelPreResolveReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MapParamAddDelPreResolveReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *MapParamAddDelPreResolveReply) 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 *MapParamAddDelPreResolveReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// MapParamGet defines message 'map_param_get'.
-type MapParamGet struct{}
-
-func (m *MapParamGet) Reset() { *m = MapParamGet{} }
-func (*MapParamGet) GetMessageName() string { return "map_param_get" }
-func (*MapParamGet) GetCrcString() string { return "51077d14" }
-func (*MapParamGet) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *MapParamGet) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *MapParamGet) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *MapParamGet) Unmarshal(b []byte) error {
- return nil
-}
-
-// MapParamGetReply defines message 'map_param_get_reply'.
-type MapParamGetReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- FragInner uint8 `binapi:"u8,name=frag_inner" json:"frag_inner,omitempty"`
- FragIgnoreDf uint8 `binapi:"u8,name=frag_ignore_df" json:"frag_ignore_df,omitempty"`
- ICMPIP4ErrRelaySrc IP4Address `binapi:"ip4_address,name=icmp_ip4_err_relay_src" json:"icmp_ip4_err_relay_src,omitempty"`
- ICMP6EnableUnreachable bool `binapi:"bool,name=icmp6_enable_unreachable" json:"icmp6_enable_unreachable,omitempty"`
- IP4NhAddress IP4Address `binapi:"ip4_address,name=ip4_nh_address" json:"ip4_nh_address,omitempty"`
- IP6NhAddress IP6Address `binapi:"ip6_address,name=ip6_nh_address" json:"ip6_nh_address,omitempty"`
- IP4LifetimeMs uint16 `binapi:"u16,name=ip4_lifetime_ms" json:"ip4_lifetime_ms,omitempty"`
- IP4PoolSize uint16 `binapi:"u16,name=ip4_pool_size" json:"ip4_pool_size,omitempty"`
- IP4Buffers uint32 `binapi:"u32,name=ip4_buffers" json:"ip4_buffers,omitempty"`
- IP4HtRatio float64 `binapi:"f64,name=ip4_ht_ratio" json:"ip4_ht_ratio,omitempty"`
- SecCheckEnable bool `binapi:"bool,name=sec_check_enable" json:"sec_check_enable,omitempty"`
- SecCheckFragments bool `binapi:"bool,name=sec_check_fragments" json:"sec_check_fragments,omitempty"`
- TcCopy bool `binapi:"bool,name=tc_copy" json:"tc_copy,omitempty"`
- TcClass uint8 `binapi:"u8,name=tc_class" json:"tc_class,omitempty"`
-}
-
-func (m *MapParamGetReply) Reset() { *m = MapParamGetReply{} }
-func (*MapParamGetReply) GetMessageName() string { return "map_param_get_reply" }
-func (*MapParamGetReply) GetCrcString() string { return "28092156" }
-func (*MapParamGetReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MapParamGetReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 1 // m.FragInner
- size += 1 // m.FragIgnoreDf
- size += 1 * 4 // m.ICMPIP4ErrRelaySrc
- size += 1 // m.ICMP6EnableUnreachable
- size += 1 * 4 // m.IP4NhAddress
- size += 1 * 16 // m.IP6NhAddress
- size += 2 // m.IP4LifetimeMs
- size += 2 // m.IP4PoolSize
- size += 4 // m.IP4Buffers
- size += 8 // m.IP4HtRatio
- size += 1 // m.SecCheckEnable
- size += 1 // m.SecCheckFragments
- size += 1 // m.TcCopy
- size += 1 // m.TcClass
- return size
-}
-func (m *MapParamGetReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint8(m.FragInner)
- buf.EncodeUint8(m.FragIgnoreDf)
- buf.EncodeBytes(m.ICMPIP4ErrRelaySrc[:], 4)
- buf.EncodeBool(m.ICMP6EnableUnreachable)
- buf.EncodeBytes(m.IP4NhAddress[:], 4)
- buf.EncodeBytes(m.IP6NhAddress[:], 16)
- buf.EncodeUint16(m.IP4LifetimeMs)
- buf.EncodeUint16(m.IP4PoolSize)
- buf.EncodeUint32(m.IP4Buffers)
- buf.EncodeFloat64(m.IP4HtRatio)
- buf.EncodeBool(m.SecCheckEnable)
- buf.EncodeBool(m.SecCheckFragments)
- buf.EncodeBool(m.TcCopy)
- buf.EncodeUint8(m.TcClass)
- return buf.Bytes(), nil
-}
-func (m *MapParamGetReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.FragInner = buf.DecodeUint8()
- m.FragIgnoreDf = buf.DecodeUint8()
- copy(m.ICMPIP4ErrRelaySrc[:], buf.DecodeBytes(4))
- m.ICMP6EnableUnreachable = buf.DecodeBool()
- copy(m.IP4NhAddress[:], buf.DecodeBytes(4))
- copy(m.IP6NhAddress[:], buf.DecodeBytes(16))
- m.IP4LifetimeMs = buf.DecodeUint16()
- m.IP4PoolSize = buf.DecodeUint16()
- m.IP4Buffers = buf.DecodeUint32()
- m.IP4HtRatio = buf.DecodeFloat64()
- m.SecCheckEnable = buf.DecodeBool()
- m.SecCheckFragments = buf.DecodeBool()
- m.TcCopy = buf.DecodeBool()
- m.TcClass = buf.DecodeUint8()
- return nil
-}
-
-// MapParamSetFragmentation defines message 'map_param_set_fragmentation'.
-type MapParamSetFragmentation struct {
- Inner bool `binapi:"bool,name=inner" json:"inner,omitempty"`
- IgnoreDf bool `binapi:"bool,name=ignore_df" json:"ignore_df,omitempty"`
-}
-
-func (m *MapParamSetFragmentation) Reset() { *m = MapParamSetFragmentation{} }
-func (*MapParamSetFragmentation) GetMessageName() string { return "map_param_set_fragmentation" }
-func (*MapParamSetFragmentation) GetCrcString() string { return "9ff54d90" }
-func (*MapParamSetFragmentation) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *MapParamSetFragmentation) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.Inner
- size += 1 // m.IgnoreDf
- return size
-}
-func (m *MapParamSetFragmentation) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.Inner)
- buf.EncodeBool(m.IgnoreDf)
- return buf.Bytes(), nil
-}
-func (m *MapParamSetFragmentation) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Inner = buf.DecodeBool()
- m.IgnoreDf = buf.DecodeBool()
- return nil
-}
-
-// MapParamSetFragmentationReply defines message 'map_param_set_fragmentation_reply'.
-type MapParamSetFragmentationReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *MapParamSetFragmentationReply) Reset() { *m = MapParamSetFragmentationReply{} }
-func (*MapParamSetFragmentationReply) GetMessageName() string {
- return "map_param_set_fragmentation_reply"
-}
-func (*MapParamSetFragmentationReply) GetCrcString() string { return "e8d4e804" }
-func (*MapParamSetFragmentationReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MapParamSetFragmentationReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *MapParamSetFragmentationReply) 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 *MapParamSetFragmentationReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// MapParamSetICMP defines message 'map_param_set_icmp'.
-type MapParamSetICMP struct {
- IP4ErrRelaySrc IP4Address `binapi:"ip4_address,name=ip4_err_relay_src" json:"ip4_err_relay_src,omitempty"`
-}
-
-func (m *MapParamSetICMP) Reset() { *m = MapParamSetICMP{} }
-func (*MapParamSetICMP) GetMessageName() string { return "map_param_set_icmp" }
-func (*MapParamSetICMP) GetCrcString() string { return "58210cbf" }
-func (*MapParamSetICMP) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *MapParamSetICMP) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 4 // m.IP4ErrRelaySrc
- return size
-}
-func (m *MapParamSetICMP) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.IP4ErrRelaySrc[:], 4)
- return buf.Bytes(), nil
-}
-func (m *MapParamSetICMP) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- copy(m.IP4ErrRelaySrc[:], buf.DecodeBytes(4))
- return nil
-}
-
-// MapParamSetICMP6 defines message 'map_param_set_icmp6'.
-type MapParamSetICMP6 struct {
- EnableUnreachable bool `binapi:"bool,name=enable_unreachable" json:"enable_unreachable,omitempty"`
-}
-
-func (m *MapParamSetICMP6) Reset() { *m = MapParamSetICMP6{} }
-func (*MapParamSetICMP6) GetMessageName() string { return "map_param_set_icmp6" }
-func (*MapParamSetICMP6) GetCrcString() string { return "5d01f8c1" }
-func (*MapParamSetICMP6) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *MapParamSetICMP6) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.EnableUnreachable
- return size
-}
-func (m *MapParamSetICMP6) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.EnableUnreachable)
- return buf.Bytes(), nil
-}
-func (m *MapParamSetICMP6) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.EnableUnreachable = buf.DecodeBool()
- return nil
-}
-
-// MapParamSetICMP6Reply defines message 'map_param_set_icmp6_reply'.
-type MapParamSetICMP6Reply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *MapParamSetICMP6Reply) Reset() { *m = MapParamSetICMP6Reply{} }
-func (*MapParamSetICMP6Reply) GetMessageName() string { return "map_param_set_icmp6_reply" }
-func (*MapParamSetICMP6Reply) GetCrcString() string { return "e8d4e804" }
-func (*MapParamSetICMP6Reply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MapParamSetICMP6Reply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *MapParamSetICMP6Reply) 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 *MapParamSetICMP6Reply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// MapParamSetICMPReply defines message 'map_param_set_icmp_reply'.
-type MapParamSetICMPReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *MapParamSetICMPReply) Reset() { *m = MapParamSetICMPReply{} }
-func (*MapParamSetICMPReply) GetMessageName() string { return "map_param_set_icmp_reply" }
-func (*MapParamSetICMPReply) GetCrcString() string { return "e8d4e804" }
-func (*MapParamSetICMPReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MapParamSetICMPReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *MapParamSetICMPReply) 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 *MapParamSetICMPReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// MapParamSetSecurityCheck defines message 'map_param_set_security_check'.
-type MapParamSetSecurityCheck struct {
- Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
- Fragments bool `binapi:"bool,name=fragments" json:"fragments,omitempty"`
-}
-
-func (m *MapParamSetSecurityCheck) Reset() { *m = MapParamSetSecurityCheck{} }
-func (*MapParamSetSecurityCheck) GetMessageName() string { return "map_param_set_security_check" }
-func (*MapParamSetSecurityCheck) GetCrcString() string { return "6abe9836" }
-func (*MapParamSetSecurityCheck) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *MapParamSetSecurityCheck) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.Enable
- size += 1 // m.Fragments
- return size
-}
-func (m *MapParamSetSecurityCheck) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.Enable)
- buf.EncodeBool(m.Fragments)
- return buf.Bytes(), nil
-}
-func (m *MapParamSetSecurityCheck) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Enable = buf.DecodeBool()
- m.Fragments = buf.DecodeBool()
- return nil
-}
-
-// MapParamSetSecurityCheckReply defines message 'map_param_set_security_check_reply'.
-type MapParamSetSecurityCheckReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *MapParamSetSecurityCheckReply) Reset() { *m = MapParamSetSecurityCheckReply{} }
-func (*MapParamSetSecurityCheckReply) GetMessageName() string {
- return "map_param_set_security_check_reply"
-}
-func (*MapParamSetSecurityCheckReply) GetCrcString() string { return "e8d4e804" }
-func (*MapParamSetSecurityCheckReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MapParamSetSecurityCheckReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *MapParamSetSecurityCheckReply) 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 *MapParamSetSecurityCheckReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// MapParamSetTCP defines message 'map_param_set_tcp'.
-type MapParamSetTCP struct {
- TCPMss uint16 `binapi:"u16,name=tcp_mss" json:"tcp_mss,omitempty"`
-}
-
-func (m *MapParamSetTCP) Reset() { *m = MapParamSetTCP{} }
-func (*MapParamSetTCP) GetMessageName() string { return "map_param_set_tcp" }
-func (*MapParamSetTCP) GetCrcString() string { return "87a825d9" }
-func (*MapParamSetTCP) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *MapParamSetTCP) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 2 // m.TCPMss
- return size
-}
-func (m *MapParamSetTCP) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint16(m.TCPMss)
- return buf.Bytes(), nil
-}
-func (m *MapParamSetTCP) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.TCPMss = buf.DecodeUint16()
- return nil
-}
-
-// MapParamSetTCPReply defines message 'map_param_set_tcp_reply'.
-type MapParamSetTCPReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *MapParamSetTCPReply) Reset() { *m = MapParamSetTCPReply{} }
-func (*MapParamSetTCPReply) GetMessageName() string { return "map_param_set_tcp_reply" }
-func (*MapParamSetTCPReply) GetCrcString() string { return "e8d4e804" }
-func (*MapParamSetTCPReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MapParamSetTCPReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *MapParamSetTCPReply) 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 *MapParamSetTCPReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// MapParamSetTrafficClass defines message 'map_param_set_traffic_class'.
-type MapParamSetTrafficClass struct {
- Copy bool `binapi:"bool,name=copy" json:"copy,omitempty"`
- TcClass uint8 `binapi:"u8,name=tc_class" json:"tc_class,omitempty"`
-}
-
-func (m *MapParamSetTrafficClass) Reset() { *m = MapParamSetTrafficClass{} }
-func (*MapParamSetTrafficClass) GetMessageName() string { return "map_param_set_traffic_class" }
-func (*MapParamSetTrafficClass) GetCrcString() string { return "9cac455c" }
-func (*MapParamSetTrafficClass) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *MapParamSetTrafficClass) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.Copy
- size += 1 // m.TcClass
- return size
-}
-func (m *MapParamSetTrafficClass) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.Copy)
- buf.EncodeUint8(m.TcClass)
- return buf.Bytes(), nil
-}
-func (m *MapParamSetTrafficClass) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Copy = buf.DecodeBool()
- m.TcClass = buf.DecodeUint8()
- return nil
-}
-
-// MapParamSetTrafficClassReply defines message 'map_param_set_traffic_class_reply'.
-type MapParamSetTrafficClassReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *MapParamSetTrafficClassReply) Reset() { *m = MapParamSetTrafficClassReply{} }
-func (*MapParamSetTrafficClassReply) GetMessageName() string {
- return "map_param_set_traffic_class_reply"
-}
-func (*MapParamSetTrafficClassReply) GetCrcString() string { return "e8d4e804" }
-func (*MapParamSetTrafficClassReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MapParamSetTrafficClassReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *MapParamSetTrafficClassReply) 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 *MapParamSetTrafficClassReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// MapRuleDetails defines message 'map_rule_details'.
-type MapRuleDetails struct {
- IP6Dst IP6Address `binapi:"ip6_address,name=ip6_dst" json:"ip6_dst,omitempty"`
- Psid uint16 `binapi:"u16,name=psid" json:"psid,omitempty"`
-}
-
-func (m *MapRuleDetails) Reset() { *m = MapRuleDetails{} }
-func (*MapRuleDetails) GetMessageName() string { return "map_rule_details" }
-func (*MapRuleDetails) GetCrcString() string { return "c7cbeea5" }
-func (*MapRuleDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MapRuleDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 16 // m.IP6Dst
- size += 2 // m.Psid
- return size
-}
-func (m *MapRuleDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.IP6Dst[:], 16)
- buf.EncodeUint16(m.Psid)
- return buf.Bytes(), nil
-}
-func (m *MapRuleDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- copy(m.IP6Dst[:], buf.DecodeBytes(16))
- m.Psid = buf.DecodeUint16()
- return nil
-}
-
-// MapRuleDump defines message 'map_rule_dump'.
-type MapRuleDump struct {
- DomainIndex uint32 `binapi:"u32,name=domain_index" json:"domain_index,omitempty"`
-}
-
-func (m *MapRuleDump) Reset() { *m = MapRuleDump{} }
-func (*MapRuleDump) GetMessageName() string { return "map_rule_dump" }
-func (*MapRuleDump) GetCrcString() string { return "e43e6ff6" }
-func (*MapRuleDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *MapRuleDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.DomainIndex
- return size
-}
-func (m *MapRuleDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.DomainIndex)
- return buf.Bytes(), nil
-}
-func (m *MapRuleDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.DomainIndex = buf.DecodeUint32()
- return nil
-}
-
-// MapSummaryStats defines message 'map_summary_stats'.
-type MapSummaryStats struct{}
-
-func (m *MapSummaryStats) Reset() { *m = MapSummaryStats{} }
-func (*MapSummaryStats) GetMessageName() string { return "map_summary_stats" }
-func (*MapSummaryStats) GetCrcString() string { return "51077d14" }
-func (*MapSummaryStats) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *MapSummaryStats) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *MapSummaryStats) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *MapSummaryStats) Unmarshal(b []byte) error {
- return nil
-}
-
-// MapSummaryStatsReply defines message 'map_summary_stats_reply'.
-type MapSummaryStatsReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- TotalBindings uint64 `binapi:"u64,name=total_bindings" json:"total_bindings,omitempty"`
- TotalPkts []uint64 `binapi:"u64[2],name=total_pkts" json:"total_pkts,omitempty"`
- TotalBytes []uint64 `binapi:"u64[2],name=total_bytes" json:"total_bytes,omitempty"`
- TotalIP4Fragments uint64 `binapi:"u64,name=total_ip4_fragments" json:"total_ip4_fragments,omitempty"`
- TotalSecurityCheck []uint64 `binapi:"u64[2],name=total_security_check" json:"total_security_check,omitempty"`
-}
-
-func (m *MapSummaryStatsReply) Reset() { *m = MapSummaryStatsReply{} }
-func (*MapSummaryStatsReply) GetMessageName() string { return "map_summary_stats_reply" }
-func (*MapSummaryStatsReply) GetCrcString() string { return "0e4ace0e" }
-func (*MapSummaryStatsReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MapSummaryStatsReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 8 // m.TotalBindings
- size += 8 * 2 // m.TotalPkts
- size += 8 * 2 // m.TotalBytes
- size += 8 // m.TotalIP4Fragments
- size += 8 * 2 // m.TotalSecurityCheck
- return size
-}
-func (m *MapSummaryStatsReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint64(m.TotalBindings)
- for i := 0; i < 2; i++ {
- var x uint64
- if i < len(m.TotalPkts) {
- x = uint64(m.TotalPkts[i])
- }
- buf.EncodeUint64(x)
- }
- for i := 0; i < 2; i++ {
- var x uint64
- if i < len(m.TotalBytes) {
- x = uint64(m.TotalBytes[i])
- }
- buf.EncodeUint64(x)
- }
- buf.EncodeUint64(m.TotalIP4Fragments)
- for i := 0; i < 2; i++ {
- var x uint64
- if i < len(m.TotalSecurityCheck) {
- x = uint64(m.TotalSecurityCheck[i])
- }
- buf.EncodeUint64(x)
- }
- return buf.Bytes(), nil
-}
-func (m *MapSummaryStatsReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.TotalBindings = buf.DecodeUint64()
- m.TotalPkts = make([]uint64, 2)
- for i := 0; i < len(m.TotalPkts); i++ {
- m.TotalPkts[i] = buf.DecodeUint64()
- }
- m.TotalBytes = make([]uint64, 2)
- for i := 0; i < len(m.TotalBytes); i++ {
- m.TotalBytes[i] = buf.DecodeUint64()
- }
- m.TotalIP4Fragments = buf.DecodeUint64()
- m.TotalSecurityCheck = make([]uint64, 2)
- for i := 0; i < len(m.TotalSecurityCheck); i++ {
- m.TotalSecurityCheck[i] = buf.DecodeUint64()
- }
- return nil
-}
-
-func init() { file_maps_binapi_init() }
-func file_maps_binapi_init() {
- api.RegisterMessage((*MapAddDelRule)(nil), "map_add_del_rule_c65b32f7")
- api.RegisterMessage((*MapAddDelRuleReply)(nil), "map_add_del_rule_reply_e8d4e804")
- api.RegisterMessage((*MapAddDomain)(nil), "map_add_domain_7a5a18c9")
- api.RegisterMessage((*MapAddDomainReply)(nil), "map_add_domain_reply_3e6d4e2c")
- api.RegisterMessage((*MapDelDomain)(nil), "map_del_domain_8ac76db6")
- api.RegisterMessage((*MapDelDomainReply)(nil), "map_del_domain_reply_e8d4e804")
- api.RegisterMessage((*MapDomainDetails)(nil), "map_domain_details_fc1859dd")
- api.RegisterMessage((*MapDomainDump)(nil), "map_domain_dump_51077d14")
- api.RegisterMessage((*MapIfEnableDisable)(nil), "map_if_enable_disable_59bb32f4")
- api.RegisterMessage((*MapIfEnableDisableReply)(nil), "map_if_enable_disable_reply_e8d4e804")
- api.RegisterMessage((*MapParamAddDelPreResolve)(nil), "map_param_add_del_pre_resolve_17008c66")
- api.RegisterMessage((*MapParamAddDelPreResolveReply)(nil), "map_param_add_del_pre_resolve_reply_e8d4e804")
- api.RegisterMessage((*MapParamGet)(nil), "map_param_get_51077d14")
- api.RegisterMessage((*MapParamGetReply)(nil), "map_param_get_reply_28092156")
- api.RegisterMessage((*MapParamSetFragmentation)(nil), "map_param_set_fragmentation_9ff54d90")
- api.RegisterMessage((*MapParamSetFragmentationReply)(nil), "map_param_set_fragmentation_reply_e8d4e804")
- api.RegisterMessage((*MapParamSetICMP)(nil), "map_param_set_icmp_58210cbf")
- api.RegisterMessage((*MapParamSetICMP6)(nil), "map_param_set_icmp6_5d01f8c1")
- api.RegisterMessage((*MapParamSetICMP6Reply)(nil), "map_param_set_icmp6_reply_e8d4e804")
- api.RegisterMessage((*MapParamSetICMPReply)(nil), "map_param_set_icmp_reply_e8d4e804")
- api.RegisterMessage((*MapParamSetSecurityCheck)(nil), "map_param_set_security_check_6abe9836")
- api.RegisterMessage((*MapParamSetSecurityCheckReply)(nil), "map_param_set_security_check_reply_e8d4e804")
- api.RegisterMessage((*MapParamSetTCP)(nil), "map_param_set_tcp_87a825d9")
- api.RegisterMessage((*MapParamSetTCPReply)(nil), "map_param_set_tcp_reply_e8d4e804")
- api.RegisterMessage((*MapParamSetTrafficClass)(nil), "map_param_set_traffic_class_9cac455c")
- api.RegisterMessage((*MapParamSetTrafficClassReply)(nil), "map_param_set_traffic_class_reply_e8d4e804")
- api.RegisterMessage((*MapRuleDetails)(nil), "map_rule_details_c7cbeea5")
- api.RegisterMessage((*MapRuleDump)(nil), "map_rule_dump_e43e6ff6")
- api.RegisterMessage((*MapSummaryStats)(nil), "map_summary_stats_51077d14")
- api.RegisterMessage((*MapSummaryStatsReply)(nil), "map_summary_stats_reply_0e4ace0e")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*MapAddDelRule)(nil),
- (*MapAddDelRuleReply)(nil),
- (*MapAddDomain)(nil),
- (*MapAddDomainReply)(nil),
- (*MapDelDomain)(nil),
- (*MapDelDomainReply)(nil),
- (*MapDomainDetails)(nil),
- (*MapDomainDump)(nil),
- (*MapIfEnableDisable)(nil),
- (*MapIfEnableDisableReply)(nil),
- (*MapParamAddDelPreResolve)(nil),
- (*MapParamAddDelPreResolveReply)(nil),
- (*MapParamGet)(nil),
- (*MapParamGetReply)(nil),
- (*MapParamSetFragmentation)(nil),
- (*MapParamSetFragmentationReply)(nil),
- (*MapParamSetICMP)(nil),
- (*MapParamSetICMP6)(nil),
- (*MapParamSetICMP6Reply)(nil),
- (*MapParamSetICMPReply)(nil),
- (*MapParamSetSecurityCheck)(nil),
- (*MapParamSetSecurityCheckReply)(nil),
- (*MapParamSetTCP)(nil),
- (*MapParamSetTCPReply)(nil),
- (*MapParamSetTrafficClass)(nil),
- (*MapParamSetTrafficClassReply)(nil),
- (*MapRuleDetails)(nil),
- (*MapRuleDump)(nil),
- (*MapSummaryStats)(nil),
- (*MapSummaryStatsReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/map/map_rpc.ba.go b/internal/testbinapi/binapi2001/map/map_rpc.ba.go
deleted file mode 100644
index bfc48e7..0000000
--- a/internal/testbinapi/binapi2001/map/map_rpc.ba.go
+++ /dev/null
@@ -1,242 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package maps
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service map.
-type RPCService interface {
- MapAddDelRule(ctx context.Context, in *MapAddDelRule) (*MapAddDelRuleReply, error)
- MapAddDomain(ctx context.Context, in *MapAddDomain) (*MapAddDomainReply, error)
- MapDelDomain(ctx context.Context, in *MapDelDomain) (*MapDelDomainReply, error)
- MapDomainDump(ctx context.Context, in *MapDomainDump) (RPCService_MapDomainDumpClient, error)
- MapIfEnableDisable(ctx context.Context, in *MapIfEnableDisable) (*MapIfEnableDisableReply, error)
- MapParamAddDelPreResolve(ctx context.Context, in *MapParamAddDelPreResolve) (*MapParamAddDelPreResolveReply, error)
- MapParamGet(ctx context.Context, in *MapParamGet) (*MapParamGetReply, error)
- MapParamSetFragmentation(ctx context.Context, in *MapParamSetFragmentation) (*MapParamSetFragmentationReply, error)
- MapParamSetICMP(ctx context.Context, in *MapParamSetICMP) (*MapParamSetICMPReply, error)
- MapParamSetICMP6(ctx context.Context, in *MapParamSetICMP6) (*MapParamSetICMP6Reply, error)
- MapParamSetSecurityCheck(ctx context.Context, in *MapParamSetSecurityCheck) (*MapParamSetSecurityCheckReply, error)
- MapParamSetTCP(ctx context.Context, in *MapParamSetTCP) (*MapParamSetTCPReply, error)
- MapParamSetTrafficClass(ctx context.Context, in *MapParamSetTrafficClass) (*MapParamSetTrafficClassReply, error)
- MapRuleDump(ctx context.Context, in *MapRuleDump) (RPCService_MapRuleDumpClient, error)
- MapSummaryStats(ctx context.Context, in *MapSummaryStats) (*MapSummaryStatsReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) MapAddDelRule(ctx context.Context, in *MapAddDelRule) (*MapAddDelRuleReply, error) {
- out := new(MapAddDelRuleReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) MapAddDomain(ctx context.Context, in *MapAddDomain) (*MapAddDomainReply, error) {
- out := new(MapAddDomainReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) MapDelDomain(ctx context.Context, in *MapDelDomain) (*MapDelDomainReply, error) {
- out := new(MapDelDomainReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) MapDomainDump(ctx context.Context, in *MapDomainDump) (RPCService_MapDomainDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_MapDomainDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_MapDomainDumpClient interface {
- Recv() (*MapDomainDetails, error)
- api.Stream
-}
-
-type serviceClient_MapDomainDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_MapDomainDumpClient) Recv() (*MapDomainDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *MapDomainDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) MapIfEnableDisable(ctx context.Context, in *MapIfEnableDisable) (*MapIfEnableDisableReply, error) {
- out := new(MapIfEnableDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) MapParamAddDelPreResolve(ctx context.Context, in *MapParamAddDelPreResolve) (*MapParamAddDelPreResolveReply, error) {
- out := new(MapParamAddDelPreResolveReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) MapParamGet(ctx context.Context, in *MapParamGet) (*MapParamGetReply, error) {
- out := new(MapParamGetReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) MapParamSetFragmentation(ctx context.Context, in *MapParamSetFragmentation) (*MapParamSetFragmentationReply, error) {
- out := new(MapParamSetFragmentationReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) MapParamSetICMP(ctx context.Context, in *MapParamSetICMP) (*MapParamSetICMPReply, error) {
- out := new(MapParamSetICMPReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) MapParamSetICMP6(ctx context.Context, in *MapParamSetICMP6) (*MapParamSetICMP6Reply, error) {
- out := new(MapParamSetICMP6Reply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) MapParamSetSecurityCheck(ctx context.Context, in *MapParamSetSecurityCheck) (*MapParamSetSecurityCheckReply, error) {
- out := new(MapParamSetSecurityCheckReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) MapParamSetTCP(ctx context.Context, in *MapParamSetTCP) (*MapParamSetTCPReply, error) {
- out := new(MapParamSetTCPReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) MapParamSetTrafficClass(ctx context.Context, in *MapParamSetTrafficClass) (*MapParamSetTrafficClassReply, error) {
- out := new(MapParamSetTrafficClassReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) MapRuleDump(ctx context.Context, in *MapRuleDump) (RPCService_MapRuleDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_MapRuleDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_MapRuleDumpClient interface {
- Recv() (*MapRuleDetails, error)
- api.Stream
-}
-
-type serviceClient_MapRuleDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_MapRuleDumpClient) Recv() (*MapRuleDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *MapRuleDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) MapSummaryStats(ctx context.Context, in *MapSummaryStats) (*MapSummaryStatsReply, error) {
- out := new(MapSummaryStatsReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/mdata/mdata.ba.go b/internal/testbinapi/binapi2001/mdata/mdata.ba.go
deleted file mode 100644
index d7e8ee2..0000000
--- a/internal/testbinapi/binapi2001/mdata/mdata.ba.go
+++ /dev/null
@@ -1,369 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/plugins/mdata.api.json
-
-// Package mdata contains generated bindings for API file mdata.api.
-//
-// Contents:
-// 1 alias
-// 6 enums
-// 2 messages
-//
-package mdata
-
-import (
- "strconv"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "mdata"
- APIVersion = "0.1.0"
- VersionCrc = 0x68055b0c
-)
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// MdataEnableDisable defines message 'mdata_enable_disable'.
-// InProgress: the message form may change in the future versions
-type MdataEnableDisable struct {
- EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
-}
-
-func (m *MdataEnableDisable) Reset() { *m = MdataEnableDisable{} }
-func (*MdataEnableDisable) GetMessageName() string { return "mdata_enable_disable" }
-func (*MdataEnableDisable) GetCrcString() string { return "2e7b47df" }
-func (*MdataEnableDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *MdataEnableDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.EnableDisable
- return size
-}
-func (m *MdataEnableDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.EnableDisable)
- return buf.Bytes(), nil
-}
-func (m *MdataEnableDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.EnableDisable = buf.DecodeBool()
- return nil
-}
-
-// MdataEnableDisableReply defines message 'mdata_enable_disable_reply'.
-// InProgress: the message form may change in the future versions
-type MdataEnableDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *MdataEnableDisableReply) Reset() { *m = MdataEnableDisableReply{} }
-func (*MdataEnableDisableReply) GetMessageName() string { return "mdata_enable_disable_reply" }
-func (*MdataEnableDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*MdataEnableDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MdataEnableDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *MdataEnableDisableReply) 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 *MdataEnableDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_mdata_binapi_init() }
-func file_mdata_binapi_init() {
- api.RegisterMessage((*MdataEnableDisable)(nil), "mdata_enable_disable_2e7b47df")
- api.RegisterMessage((*MdataEnableDisableReply)(nil), "mdata_enable_disable_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*MdataEnableDisable)(nil),
- (*MdataEnableDisableReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/mdata/mdata_rpc.ba.go b/internal/testbinapi/binapi2001/mdata/mdata_rpc.ba.go
deleted file mode 100644
index 8ae8748..0000000
--- a/internal/testbinapi/binapi2001/mdata/mdata_rpc.ba.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package mdata
-
-import (
- "context"
-
- api "git.fd.io/govpp.git/api"
-)
-
-// RPCService defines RPC service mdata.
-type RPCService interface {
- MdataEnableDisable(ctx context.Context, in *MdataEnableDisable) (*MdataEnableDisableReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) MdataEnableDisable(ctx context.Context, in *MdataEnableDisable) (*MdataEnableDisableReply, error) {
- out := new(MdataEnableDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/memclnt/memclnt.ba.go b/internal/testbinapi/binapi2001/memclnt/memclnt.ba.go
deleted file mode 100644
index f2c8136..0000000
--- a/internal/testbinapi/binapi2001/memclnt/memclnt.ba.go
+++ /dev/null
@@ -1,971 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/memclnt.api.json
-
-// Package memclnt contains generated bindings for API file memclnt.api.
-//
-// Contents:
-// 2 structs
-// 22 messages
-//
-package memclnt
-
-import (
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the GoVPP api package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// GoVPP api package needs to be updated.
-const _ = api.GoVppAPIPackageIsVersion2
-
-const (
- APIFile = "memclnt"
- APIVersion = "2.1.0"
- VersionCrc = 0x8d3dd881
-)
-
-// MessageTableEntry defines type 'message_table_entry'.
-type MessageTableEntry struct {
- Index uint16 `binapi:"u16,name=index" json:"index,omitempty"`
- Name string `binapi:"string[64],name=name" json:"name,omitempty"`
-}
-
-// ModuleVersion defines type 'module_version'.
-type ModuleVersion struct {
- Major uint32 `binapi:"u32,name=major" json:"major,omitempty"`
- Minor uint32 `binapi:"u32,name=minor" json:"minor,omitempty"`
- Patch uint32 `binapi:"u32,name=patch" json:"patch,omitempty"`
- Name string `binapi:"string[64],name=name" json:"name,omitempty"`
-}
-
-// APIVersions defines message 'api_versions'.
-type APIVersions struct{}
-
-func (m *APIVersions) Reset() { *m = APIVersions{} }
-func (*APIVersions) GetMessageName() string { return "api_versions" }
-func (*APIVersions) GetCrcString() string { return "51077d14" }
-func (*APIVersions) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *APIVersions) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *APIVersions) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *APIVersions) Unmarshal(b []byte) error {
- return nil
-}
-
-// APIVersionsReply defines message 'api_versions_reply'.
-type APIVersionsReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- Count uint32 `binapi:"u32,name=count" json:"-"`
- APIVersions []ModuleVersion `binapi:"module_version[count],name=api_versions" json:"api_versions,omitempty"`
-}
-
-func (m *APIVersionsReply) Reset() { *m = APIVersionsReply{} }
-func (*APIVersionsReply) GetMessageName() string { return "api_versions_reply" }
-func (*APIVersionsReply) GetCrcString() string { return "5f0d99d6" }
-func (*APIVersionsReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *APIVersionsReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.Count
- for j1 := 0; j1 < len(m.APIVersions); j1++ {
- var s1 ModuleVersion
- _ = s1
- if j1 < len(m.APIVersions) {
- s1 = m.APIVersions[j1]
- }
- size += 4 // s1.Major
- size += 4 // s1.Minor
- size += 4 // s1.Patch
- size += 64 // s1.Name
- }
- return size
-}
-func (m *APIVersionsReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(uint32(len(m.APIVersions)))
- for j0 := 0; j0 < len(m.APIVersions); j0++ {
- var v0 ModuleVersion // APIVersions
- if j0 < len(m.APIVersions) {
- v0 = m.APIVersions[j0]
- }
- buf.EncodeUint32(v0.Major)
- buf.EncodeUint32(v0.Minor)
- buf.EncodeUint32(v0.Patch)
- buf.EncodeString(v0.Name, 64)
- }
- return buf.Bytes(), nil
-}
-func (m *APIVersionsReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.Count = buf.DecodeUint32()
- m.APIVersions = make([]ModuleVersion, m.Count)
- for j0 := 0; j0 < len(m.APIVersions); j0++ {
- m.APIVersions[j0].Major = buf.DecodeUint32()
- m.APIVersions[j0].Minor = buf.DecodeUint32()
- m.APIVersions[j0].Patch = buf.DecodeUint32()
- m.APIVersions[j0].Name = buf.DecodeString(64)
- }
- return nil
-}
-
-// GetFirstMsgID defines message 'get_first_msg_id'.
-type GetFirstMsgID struct {
- Name string `binapi:"string[64],name=name" json:"name,omitempty"`
-}
-
-func (m *GetFirstMsgID) Reset() { *m = GetFirstMsgID{} }
-func (*GetFirstMsgID) GetMessageName() string { return "get_first_msg_id" }
-func (*GetFirstMsgID) GetCrcString() string { return "ebf79a66" }
-func (*GetFirstMsgID) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GetFirstMsgID) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 64 // m.Name
- return size
-}
-func (m *GetFirstMsgID) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeString(m.Name, 64)
- return buf.Bytes(), nil
-}
-func (m *GetFirstMsgID) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Name = buf.DecodeString(64)
- return nil
-}
-
-// GetFirstMsgIDReply defines message 'get_first_msg_id_reply'.
-type GetFirstMsgIDReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- FirstMsgID uint16 `binapi:"u16,name=first_msg_id" json:"first_msg_id,omitempty"`
-}
-
-func (m *GetFirstMsgIDReply) Reset() { *m = GetFirstMsgIDReply{} }
-func (*GetFirstMsgIDReply) GetMessageName() string { return "get_first_msg_id_reply" }
-func (*GetFirstMsgIDReply) GetCrcString() string { return "7d337472" }
-func (*GetFirstMsgIDReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GetFirstMsgIDReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 2 // m.FirstMsgID
- return size
-}
-func (m *GetFirstMsgIDReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint16(m.FirstMsgID)
- return buf.Bytes(), nil
-}
-func (m *GetFirstMsgIDReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.FirstMsgID = buf.DecodeUint16()
- return nil
-}
-
-// MemclntCreate defines message 'memclnt_create'.
-type MemclntCreate struct {
- CtxQuota int32 `binapi:"i32,name=ctx_quota" json:"ctx_quota,omitempty"`
- InputQueue uint64 `binapi:"u64,name=input_queue" json:"input_queue,omitempty"`
- Name string `binapi:"string[64],name=name" json:"name,omitempty"`
- APIVersions []uint32 `binapi:"u32[8],name=api_versions" json:"api_versions,omitempty"`
-}
-
-func (m *MemclntCreate) Reset() { *m = MemclntCreate{} }
-func (*MemclntCreate) GetMessageName() string { return "memclnt_create" }
-func (*MemclntCreate) GetCrcString() string { return "9c5e1c2f" }
-func (*MemclntCreate) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MemclntCreate) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.CtxQuota
- size += 8 // m.InputQueue
- size += 64 // m.Name
- size += 4 * 8 // m.APIVersions
- return size
-}
-func (m *MemclntCreate) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.CtxQuota)
- buf.EncodeUint64(m.InputQueue)
- buf.EncodeString(m.Name, 64)
- for i := 0; i < 8; i++ {
- var x uint32
- if i < len(m.APIVersions) {
- x = uint32(m.APIVersions[i])
- }
- buf.EncodeUint32(x)
- }
- return buf.Bytes(), nil
-}
-func (m *MemclntCreate) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.CtxQuota = buf.DecodeInt32()
- m.InputQueue = buf.DecodeUint64()
- m.Name = buf.DecodeString(64)
- m.APIVersions = make([]uint32, 8)
- for i := 0; i < len(m.APIVersions); i++ {
- m.APIVersions[i] = buf.DecodeUint32()
- }
- return nil
-}
-
-// MemclntCreateReply defines message 'memclnt_create_reply'.
-type MemclntCreateReply struct {
- Response int32 `binapi:"i32,name=response" json:"response,omitempty"`
- Handle uint64 `binapi:"u64,name=handle" json:"handle,omitempty"`
- Index uint32 `binapi:"u32,name=index" json:"index,omitempty"`
- MessageTable uint64 `binapi:"u64,name=message_table" json:"message_table,omitempty"`
-}
-
-func (m *MemclntCreateReply) Reset() { *m = MemclntCreateReply{} }
-func (*MemclntCreateReply) GetMessageName() string { return "memclnt_create_reply" }
-func (*MemclntCreateReply) GetCrcString() string { return "42ec4560" }
-func (*MemclntCreateReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MemclntCreateReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Response
- size += 8 // m.Handle
- size += 4 // m.Index
- size += 8 // m.MessageTable
- return size
-}
-func (m *MemclntCreateReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Response)
- buf.EncodeUint64(m.Handle)
- buf.EncodeUint32(m.Index)
- buf.EncodeUint64(m.MessageTable)
- return buf.Bytes(), nil
-}
-func (m *MemclntCreateReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Response = buf.DecodeInt32()
- m.Handle = buf.DecodeUint64()
- m.Index = buf.DecodeUint32()
- m.MessageTable = buf.DecodeUint64()
- return nil
-}
-
-// MemclntDelete defines message 'memclnt_delete'.
-type MemclntDelete struct {
- Index uint32 `binapi:"u32,name=index" json:"index,omitempty"`
- Handle uint64 `binapi:"u64,name=handle" json:"handle,omitempty"`
- DoCleanup bool `binapi:"bool,name=do_cleanup" json:"do_cleanup,omitempty"`
-}
-
-func (m *MemclntDelete) Reset() { *m = MemclntDelete{} }
-func (*MemclntDelete) GetMessageName() string { return "memclnt_delete" }
-func (*MemclntDelete) GetCrcString() string { return "7e1c04e3" }
-func (*MemclntDelete) GetMessageType() api.MessageType {
- return api.OtherMessage
-}
-
-func (m *MemclntDelete) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Index
- size += 8 // m.Handle
- size += 1 // m.DoCleanup
- return size
-}
-func (m *MemclntDelete) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Index)
- buf.EncodeUint64(m.Handle)
- buf.EncodeBool(m.DoCleanup)
- return buf.Bytes(), nil
-}
-func (m *MemclntDelete) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Index = buf.DecodeUint32()
- m.Handle = buf.DecodeUint64()
- m.DoCleanup = buf.DecodeBool()
- return nil
-}
-
-// MemclntDeleteReply defines message 'memclnt_delete_reply'.
-type MemclntDeleteReply struct {
- Response int32 `binapi:"i32,name=response" json:"response,omitempty"`
- Handle uint64 `binapi:"u64,name=handle" json:"handle,omitempty"`
-}
-
-func (m *MemclntDeleteReply) Reset() { *m = MemclntDeleteReply{} }
-func (*MemclntDeleteReply) GetMessageName() string { return "memclnt_delete_reply" }
-func (*MemclntDeleteReply) GetCrcString() string { return "3d3b6312" }
-func (*MemclntDeleteReply) GetMessageType() api.MessageType {
- return api.OtherMessage
-}
-
-func (m *MemclntDeleteReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Response
- size += 8 // m.Handle
- return size
-}
-func (m *MemclntDeleteReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Response)
- buf.EncodeUint64(m.Handle)
- return buf.Bytes(), nil
-}
-func (m *MemclntDeleteReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Response = buf.DecodeInt32()
- m.Handle = buf.DecodeUint64()
- return nil
-}
-
-// MemclntKeepalive defines message 'memclnt_keepalive'.
-type MemclntKeepalive struct{}
-
-func (m *MemclntKeepalive) Reset() { *m = MemclntKeepalive{} }
-func (*MemclntKeepalive) GetMessageName() string { return "memclnt_keepalive" }
-func (*MemclntKeepalive) GetCrcString() string { return "51077d14" }
-func (*MemclntKeepalive) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *MemclntKeepalive) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *MemclntKeepalive) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *MemclntKeepalive) Unmarshal(b []byte) error {
- return nil
-}
-
-// MemclntKeepaliveReply defines message 'memclnt_keepalive_reply'.
-type MemclntKeepaliveReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *MemclntKeepaliveReply) Reset() { *m = MemclntKeepaliveReply{} }
-func (*MemclntKeepaliveReply) GetMessageName() string { return "memclnt_keepalive_reply" }
-func (*MemclntKeepaliveReply) GetCrcString() string { return "e8d4e804" }
-func (*MemclntKeepaliveReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MemclntKeepaliveReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *MemclntKeepaliveReply) 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 *MemclntKeepaliveReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// MemclntReadTimeout defines message 'memclnt_read_timeout'.
-type MemclntReadTimeout struct {
- Dummy uint8 `binapi:"u8,name=dummy" json:"dummy,omitempty"`
-}
-
-func (m *MemclntReadTimeout) Reset() { *m = MemclntReadTimeout{} }
-func (*MemclntReadTimeout) GetMessageName() string { return "memclnt_read_timeout" }
-func (*MemclntReadTimeout) GetCrcString() string { return "c3a3a452" }
-func (*MemclntReadTimeout) GetMessageType() api.MessageType {
- return api.OtherMessage
-}
-
-func (m *MemclntReadTimeout) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.Dummy
- return size
-}
-func (m *MemclntReadTimeout) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.Dummy)
- return buf.Bytes(), nil
-}
-func (m *MemclntReadTimeout) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Dummy = buf.DecodeUint8()
- return nil
-}
-
-// MemclntRxThreadSuspend defines message 'memclnt_rx_thread_suspend'.
-type MemclntRxThreadSuspend struct {
- Dummy uint8 `binapi:"u8,name=dummy" json:"dummy,omitempty"`
-}
-
-func (m *MemclntRxThreadSuspend) Reset() { *m = MemclntRxThreadSuspend{} }
-func (*MemclntRxThreadSuspend) GetMessageName() string { return "memclnt_rx_thread_suspend" }
-func (*MemclntRxThreadSuspend) GetCrcString() string { return "c3a3a452" }
-func (*MemclntRxThreadSuspend) GetMessageType() api.MessageType {
- return api.OtherMessage
-}
-
-func (m *MemclntRxThreadSuspend) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.Dummy
- return size
-}
-func (m *MemclntRxThreadSuspend) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.Dummy)
- return buf.Bytes(), nil
-}
-func (m *MemclntRxThreadSuspend) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Dummy = buf.DecodeUint8()
- return nil
-}
-
-// RPCCall defines message 'rpc_call'.
-type RPCCall struct {
- Function uint64 `binapi:"u64,name=function" json:"function,omitempty"`
- Multicast uint8 `binapi:"u8,name=multicast" json:"multicast,omitempty"`
- NeedBarrierSync uint8 `binapi:"u8,name=need_barrier_sync" json:"need_barrier_sync,omitempty"`
- SendReply uint8 `binapi:"u8,name=send_reply" json:"send_reply,omitempty"`
- DataLen uint32 `binapi:"u32,name=data_len" json:"-"`
- Data []byte `binapi:"u8[data_len],name=data" json:"data,omitempty"`
-}
-
-func (m *RPCCall) Reset() { *m = RPCCall{} }
-func (*RPCCall) GetMessageName() string { return "rpc_call" }
-func (*RPCCall) GetCrcString() string { return "7e8a2c95" }
-func (*RPCCall) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *RPCCall) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 8 // m.Function
- size += 1 // m.Multicast
- size += 1 // m.NeedBarrierSync
- size += 1 // m.SendReply
- size += 4 // m.DataLen
- size += 1 * len(m.Data) // m.Data
- return size
-}
-func (m *RPCCall) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint64(m.Function)
- buf.EncodeUint8(m.Multicast)
- buf.EncodeUint8(m.NeedBarrierSync)
- buf.EncodeUint8(m.SendReply)
- buf.EncodeUint32(uint32(len(m.Data)))
- buf.EncodeBytes(m.Data, 0)
- return buf.Bytes(), nil
-}
-func (m *RPCCall) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Function = buf.DecodeUint64()
- m.Multicast = buf.DecodeUint8()
- m.NeedBarrierSync = buf.DecodeUint8()
- m.SendReply = buf.DecodeUint8()
- m.DataLen = buf.DecodeUint32()
- m.Data = make([]byte, m.DataLen)
- copy(m.Data, buf.DecodeBytes(len(m.Data)))
- return nil
-}
-
-// RPCCallReply defines message 'rpc_call_reply'.
-type RPCCallReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *RPCCallReply) Reset() { *m = RPCCallReply{} }
-func (*RPCCallReply) GetMessageName() string { return "rpc_call_reply" }
-func (*RPCCallReply) GetCrcString() string { return "e8d4e804" }
-func (*RPCCallReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *RPCCallReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *RPCCallReply) 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 *RPCCallReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// RxThreadExit defines message 'rx_thread_exit'.
-type RxThreadExit struct {
- Dummy uint8 `binapi:"u8,name=dummy" json:"dummy,omitempty"`
-}
-
-func (m *RxThreadExit) Reset() { *m = RxThreadExit{} }
-func (*RxThreadExit) GetMessageName() string { return "rx_thread_exit" }
-func (*RxThreadExit) GetCrcString() string { return "c3a3a452" }
-func (*RxThreadExit) GetMessageType() api.MessageType {
- return api.OtherMessage
-}
-
-func (m *RxThreadExit) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.Dummy
- return size
-}
-func (m *RxThreadExit) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.Dummy)
- return buf.Bytes(), nil
-}
-func (m *RxThreadExit) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Dummy = buf.DecodeUint8()
- return nil
-}
-
-// SockInitShm defines message 'sock_init_shm'.
-type SockInitShm struct {
- RequestedSize uint32 `binapi:"u32,name=requested_size" json:"requested_size,omitempty"`
- Nitems uint8 `binapi:"u8,name=nitems" json:"-"`
- Configs []uint64 `binapi:"u64[nitems],name=configs" json:"configs,omitempty"`
-}
-
-func (m *SockInitShm) Reset() { *m = SockInitShm{} }
-func (*SockInitShm) GetMessageName() string { return "sock_init_shm" }
-func (*SockInitShm) GetCrcString() string { return "51646d92" }
-func (*SockInitShm) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SockInitShm) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.RequestedSize
- size += 1 // m.Nitems
- size += 8 * len(m.Configs) // m.Configs
- return size
-}
-func (m *SockInitShm) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.RequestedSize)
- buf.EncodeUint8(uint8(len(m.Configs)))
- for i := 0; i < len(m.Configs); i++ {
- var x uint64
- if i < len(m.Configs) {
- x = uint64(m.Configs[i])
- }
- buf.EncodeUint64(x)
- }
- return buf.Bytes(), nil
-}
-func (m *SockInitShm) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.RequestedSize = buf.DecodeUint32()
- m.Nitems = buf.DecodeUint8()
- m.Configs = make([]uint64, m.Nitems)
- for i := 0; i < len(m.Configs); i++ {
- m.Configs[i] = buf.DecodeUint64()
- }
- return nil
-}
-
-// SockInitShmReply defines message 'sock_init_shm_reply'.
-type SockInitShmReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SockInitShmReply) Reset() { *m = SockInitShmReply{} }
-func (*SockInitShmReply) GetMessageName() string { return "sock_init_shm_reply" }
-func (*SockInitShmReply) GetCrcString() string { return "e8d4e804" }
-func (*SockInitShmReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SockInitShmReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SockInitShmReply) 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 *SockInitShmReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SockclntCreate defines message 'sockclnt_create'.
-type SockclntCreate struct {
- Name string `binapi:"string[64],name=name" json:"name,omitempty"`
-}
-
-func (m *SockclntCreate) Reset() { *m = SockclntCreate{} }
-func (*SockclntCreate) GetMessageName() string { return "sockclnt_create" }
-func (*SockclntCreate) GetCrcString() string { return "455fb9c4" }
-func (*SockclntCreate) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SockclntCreate) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 64 // m.Name
- return size
-}
-func (m *SockclntCreate) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeString(m.Name, 64)
- return buf.Bytes(), nil
-}
-func (m *SockclntCreate) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Name = buf.DecodeString(64)
- return nil
-}
-
-// SockclntCreateReply defines message 'sockclnt_create_reply'.
-type SockclntCreateReply struct {
- Response int32 `binapi:"i32,name=response" json:"response,omitempty"`
- Index uint32 `binapi:"u32,name=index" json:"index,omitempty"`
- Count uint16 `binapi:"u16,name=count" json:"-"`
- MessageTable []MessageTableEntry `binapi:"message_table_entry[count],name=message_table" json:"message_table,omitempty"`
-}
-
-func (m *SockclntCreateReply) Reset() { *m = SockclntCreateReply{} }
-func (*SockclntCreateReply) GetMessageName() string { return "sockclnt_create_reply" }
-func (*SockclntCreateReply) GetCrcString() string { return "35166268" }
-func (*SockclntCreateReply) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SockclntCreateReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Response
- size += 4 // m.Index
- size += 2 // m.Count
- for j1 := 0; j1 < len(m.MessageTable); j1++ {
- var s1 MessageTableEntry
- _ = s1
- if j1 < len(m.MessageTable) {
- s1 = m.MessageTable[j1]
- }
- size += 2 // s1.Index
- size += 64 // s1.Name
- }
- return size
-}
-func (m *SockclntCreateReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Response)
- buf.EncodeUint32(m.Index)
- buf.EncodeUint16(uint16(len(m.MessageTable)))
- for j0 := 0; j0 < len(m.MessageTable); j0++ {
- var v0 MessageTableEntry // MessageTable
- if j0 < len(m.MessageTable) {
- v0 = m.MessageTable[j0]
- }
- buf.EncodeUint16(v0.Index)
- buf.EncodeString(v0.Name, 64)
- }
- return buf.Bytes(), nil
-}
-func (m *SockclntCreateReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Response = buf.DecodeInt32()
- m.Index = buf.DecodeUint32()
- m.Count = buf.DecodeUint16()
- m.MessageTable = make([]MessageTableEntry, m.Count)
- for j0 := 0; j0 < len(m.MessageTable); j0++ {
- m.MessageTable[j0].Index = buf.DecodeUint16()
- m.MessageTable[j0].Name = buf.DecodeString(64)
- }
- return nil
-}
-
-// SockclntDelete defines message 'sockclnt_delete'.
-type SockclntDelete struct {
- Index uint32 `binapi:"u32,name=index" json:"index,omitempty"`
-}
-
-func (m *SockclntDelete) Reset() { *m = SockclntDelete{} }
-func (*SockclntDelete) GetMessageName() string { return "sockclnt_delete" }
-func (*SockclntDelete) GetCrcString() string { return "8ac76db6" }
-func (*SockclntDelete) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SockclntDelete) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Index
- return size
-}
-func (m *SockclntDelete) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Index)
- return buf.Bytes(), nil
-}
-func (m *SockclntDelete) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Index = buf.DecodeUint32()
- return nil
-}
-
-// SockclntDeleteReply defines message 'sockclnt_delete_reply'.
-type SockclntDeleteReply struct {
- Response int32 `binapi:"i32,name=response" json:"response,omitempty"`
-}
-
-func (m *SockclntDeleteReply) Reset() { *m = SockclntDeleteReply{} }
-func (*SockclntDeleteReply) GetMessageName() string { return "sockclnt_delete_reply" }
-func (*SockclntDeleteReply) GetCrcString() string { return "8f38b1ee" }
-func (*SockclntDeleteReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SockclntDeleteReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Response
- return size
-}
-func (m *SockclntDeleteReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Response)
- return buf.Bytes(), nil
-}
-func (m *SockclntDeleteReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Response = buf.DecodeInt32()
- return nil
-}
-
-// TracePluginMsgIds defines message 'trace_plugin_msg_ids'.
-type TracePluginMsgIds struct {
- PluginName string `binapi:"string[128],name=plugin_name" json:"plugin_name,omitempty"`
- FirstMsgID uint16 `binapi:"u16,name=first_msg_id" json:"first_msg_id,omitempty"`
- LastMsgID uint16 `binapi:"u16,name=last_msg_id" json:"last_msg_id,omitempty"`
-}
-
-func (m *TracePluginMsgIds) Reset() { *m = TracePluginMsgIds{} }
-func (*TracePluginMsgIds) GetMessageName() string { return "trace_plugin_msg_ids" }
-func (*TracePluginMsgIds) GetCrcString() string { return "f476d3ce" }
-func (*TracePluginMsgIds) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *TracePluginMsgIds) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 128 // m.PluginName
- size += 2 // m.FirstMsgID
- size += 2 // m.LastMsgID
- return size
-}
-func (m *TracePluginMsgIds) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeString(m.PluginName, 128)
- buf.EncodeUint16(m.FirstMsgID)
- buf.EncodeUint16(m.LastMsgID)
- return buf.Bytes(), nil
-}
-func (m *TracePluginMsgIds) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.PluginName = buf.DecodeString(128)
- m.FirstMsgID = buf.DecodeUint16()
- m.LastMsgID = buf.DecodeUint16()
- return nil
-}
-
-func init() { file_memclnt_binapi_init() }
-func file_memclnt_binapi_init() {
- api.RegisterMessage((*APIVersions)(nil), "api_versions_51077d14")
- api.RegisterMessage((*APIVersionsReply)(nil), "api_versions_reply_5f0d99d6")
- api.RegisterMessage((*GetFirstMsgID)(nil), "get_first_msg_id_ebf79a66")
- api.RegisterMessage((*GetFirstMsgIDReply)(nil), "get_first_msg_id_reply_7d337472")
- api.RegisterMessage((*MemclntCreate)(nil), "memclnt_create_9c5e1c2f")
- api.RegisterMessage((*MemclntCreateReply)(nil), "memclnt_create_reply_42ec4560")
- api.RegisterMessage((*MemclntDelete)(nil), "memclnt_delete_7e1c04e3")
- api.RegisterMessage((*MemclntDeleteReply)(nil), "memclnt_delete_reply_3d3b6312")
- api.RegisterMessage((*MemclntKeepalive)(nil), "memclnt_keepalive_51077d14")
- api.RegisterMessage((*MemclntKeepaliveReply)(nil), "memclnt_keepalive_reply_e8d4e804")
- api.RegisterMessage((*MemclntReadTimeout)(nil), "memclnt_read_timeout_c3a3a452")
- api.RegisterMessage((*MemclntRxThreadSuspend)(nil), "memclnt_rx_thread_suspend_c3a3a452")
- api.RegisterMessage((*RPCCall)(nil), "rpc_call_7e8a2c95")
- api.RegisterMessage((*RPCCallReply)(nil), "rpc_call_reply_e8d4e804")
- api.RegisterMessage((*RxThreadExit)(nil), "rx_thread_exit_c3a3a452")
- api.RegisterMessage((*SockInitShm)(nil), "sock_init_shm_51646d92")
- api.RegisterMessage((*SockInitShmReply)(nil), "sock_init_shm_reply_e8d4e804")
- api.RegisterMessage((*SockclntCreate)(nil), "sockclnt_create_455fb9c4")
- api.RegisterMessage((*SockclntCreateReply)(nil), "sockclnt_create_reply_35166268")
- api.RegisterMessage((*SockclntDelete)(nil), "sockclnt_delete_8ac76db6")
- api.RegisterMessage((*SockclntDeleteReply)(nil), "sockclnt_delete_reply_8f38b1ee")
- api.RegisterMessage((*TracePluginMsgIds)(nil), "trace_plugin_msg_ids_f476d3ce")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*APIVersions)(nil),
- (*APIVersionsReply)(nil),
- (*GetFirstMsgID)(nil),
- (*GetFirstMsgIDReply)(nil),
- (*MemclntCreate)(nil),
- (*MemclntCreateReply)(nil),
- (*MemclntDelete)(nil),
- (*MemclntDeleteReply)(nil),
- (*MemclntKeepalive)(nil),
- (*MemclntKeepaliveReply)(nil),
- (*MemclntReadTimeout)(nil),
- (*MemclntRxThreadSuspend)(nil),
- (*RPCCall)(nil),
- (*RPCCallReply)(nil),
- (*RxThreadExit)(nil),
- (*SockInitShm)(nil),
- (*SockInitShmReply)(nil),
- (*SockclntCreate)(nil),
- (*SockclntCreateReply)(nil),
- (*SockclntDelete)(nil),
- (*SockclntDeleteReply)(nil),
- (*TracePluginMsgIds)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/memclnt/memclnt_rpc.ba.go b/internal/testbinapi/binapi2001/memclnt/memclnt_rpc.ba.go
deleted file mode 100644
index 03d32ef..0000000
--- a/internal/testbinapi/binapi2001/memclnt/memclnt_rpc.ba.go
+++ /dev/null
@@ -1,179 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package memclnt
-
-import (
- "context"
-
- api "git.fd.io/govpp.git/api"
-)
-
-// RPCService defines RPC service memclnt.
-type RPCService interface {
- APIVersions(ctx context.Context, in *APIVersions) (*APIVersionsReply, error)
- GetFirstMsgID(ctx context.Context, in *GetFirstMsgID) (*GetFirstMsgIDReply, error)
- MemclntCreate(ctx context.Context, in *MemclntCreate) (*MemclntCreateReply, error)
- MemclntDelete(ctx context.Context, in *MemclntDelete) (*MemclntDeleteReply, error)
- MemclntKeepalive(ctx context.Context, in *MemclntKeepalive) (*MemclntKeepaliveReply, error)
- MemclntReadTimeout(ctx context.Context, in *MemclntReadTimeout) error
- MemclntRxThreadSuspend(ctx context.Context, in *MemclntRxThreadSuspend) error
- RPCCall(ctx context.Context, in *RPCCall) (*RPCCallReply, error)
- RxThreadExit(ctx context.Context, in *RxThreadExit) error
- SockInitShm(ctx context.Context, in *SockInitShm) (*SockInitShmReply, error)
- SockclntCreate(ctx context.Context, in *SockclntCreate) (*SockclntCreateReply, error)
- SockclntDelete(ctx context.Context, in *SockclntDelete) (*SockclntDeleteReply, error)
- TracePluginMsgIds(ctx context.Context, in *TracePluginMsgIds) error
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) APIVersions(ctx context.Context, in *APIVersions) (*APIVersionsReply, error) {
- out := new(APIVersionsReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GetFirstMsgID(ctx context.Context, in *GetFirstMsgID) (*GetFirstMsgIDReply, error) {
- out := new(GetFirstMsgIDReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) MemclntCreate(ctx context.Context, in *MemclntCreate) (*MemclntCreateReply, error) {
- out := new(MemclntCreateReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) MemclntDelete(ctx context.Context, in *MemclntDelete) (*MemclntDeleteReply, error) {
- out := new(MemclntDeleteReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) MemclntKeepalive(ctx context.Context, in *MemclntKeepalive) (*MemclntKeepaliveReply, error) {
- out := new(MemclntKeepaliveReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) MemclntReadTimeout(ctx context.Context, in *MemclntReadTimeout) error {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return err
- }
- err = stream.SendMsg(in)
- if err != nil {
- return err
- }
- err = stream.Close()
- if err != nil {
- return err
- }
- return nil
-}
-
-func (c *serviceClient) MemclntRxThreadSuspend(ctx context.Context, in *MemclntRxThreadSuspend) error {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return err
- }
- err = stream.SendMsg(in)
- if err != nil {
- return err
- }
- err = stream.Close()
- if err != nil {
- return err
- }
- return nil
-}
-
-func (c *serviceClient) RPCCall(ctx context.Context, in *RPCCall) (*RPCCallReply, error) {
- out := new(RPCCallReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) RxThreadExit(ctx context.Context, in *RxThreadExit) error {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return err
- }
- err = stream.SendMsg(in)
- if err != nil {
- return err
- }
- err = stream.Close()
- if err != nil {
- return err
- }
- return nil
-}
-
-func (c *serviceClient) SockInitShm(ctx context.Context, in *SockInitShm) (*SockInitShmReply, error) {
- out := new(SockInitShmReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SockclntCreate(ctx context.Context, in *SockclntCreate) (*SockclntCreateReply, error) {
- out := new(SockclntCreateReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) SockclntDelete(ctx context.Context, in *SockclntDelete) (*SockclntDeleteReply, error) {
- out := new(SockclntDeleteReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) TracePluginMsgIds(ctx context.Context, in *TracePluginMsgIds) error {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return err
- }
- err = stream.SendMsg(in)
- if err != nil {
- return err
- }
- err = stream.Close()
- if err != nil {
- return err
- }
- return nil
-}
diff --git a/internal/testbinapi/binapi2001/memif/memif.ba.go b/internal/testbinapi/binapi2001/memif/memif.ba.go
deleted file mode 100644
index e1e9178..0000000
--- a/internal/testbinapi/binapi2001/memif/memif.ba.go
+++ /dev/null
@@ -1,825 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/plugins/memif.api.json
-
-// Package memif contains generated bindings for API file memif.api.
-//
-// Contents:
-// 2 aliases
-// 8 enums
-// 10 messages
-//
-package memif
-
-import (
- "net"
- "strconv"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "memif"
- APIVersion = "3.0.0"
- VersionCrc = 0x88dc56c9
-)
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MemifMode defines enum 'memif_mode'.
-type MemifMode uint32
-
-const (
- MEMIF_MODE_API_ETHERNET MemifMode = 0
- MEMIF_MODE_API_IP MemifMode = 1
- MEMIF_MODE_API_PUNT_INJECT MemifMode = 2
-)
-
-var (
- MemifMode_name = map[uint32]string{
- 0: "MEMIF_MODE_API_ETHERNET",
- 1: "MEMIF_MODE_API_IP",
- 2: "MEMIF_MODE_API_PUNT_INJECT",
- }
- MemifMode_value = map[string]uint32{
- "MEMIF_MODE_API_ETHERNET": 0,
- "MEMIF_MODE_API_IP": 1,
- "MEMIF_MODE_API_PUNT_INJECT": 2,
- }
-)
-
-func (x MemifMode) String() string {
- s, ok := MemifMode_name[uint32(x)]
- if ok {
- return s
- }
- return "MemifMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MemifRole defines enum 'memif_role'.
-type MemifRole uint32
-
-const (
- MEMIF_ROLE_API_MASTER MemifRole = 0
- MEMIF_ROLE_API_SLAVE MemifRole = 1
-)
-
-var (
- MemifRole_name = map[uint32]string{
- 0: "MEMIF_ROLE_API_MASTER",
- 1: "MEMIF_ROLE_API_SLAVE",
- }
- MemifRole_value = map[string]uint32{
- "MEMIF_ROLE_API_MASTER": 0,
- "MEMIF_ROLE_API_SLAVE": 1,
- }
-)
-
-func (x MemifRole) String() string {
- s, ok := MemifRole_name[uint32(x)]
- if ok {
- return s
- }
- return "MemifRole(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// MacAddress defines alias 'mac_address'.
-type MacAddress [6]uint8
-
-func ParseMacAddress(s string) (MacAddress, error) {
- var macaddr MacAddress
- mac, err := net.ParseMAC(s)
- if err != nil {
- return macaddr, err
- }
- copy(macaddr[:], mac[:])
- return macaddr, nil
-}
-
-func (x MacAddress) ToMAC() net.HardwareAddr {
- return net.HardwareAddr(x[:])
-}
-
-func (x MacAddress) String() string {
- return x.ToMAC().String()
-}
-
-func (x *MacAddress) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *MacAddress) UnmarshalText(text []byte) error {
- mac, err := ParseMacAddress(string(text))
- if err != nil {
- return err
- }
- *x = mac
- return nil
-}
-
-// MemifCreate defines message 'memif_create'.
-type MemifCreate struct {
- Role MemifRole `binapi:"memif_role,name=role" json:"role,omitempty"`
- Mode MemifMode `binapi:"memif_mode,name=mode" json:"mode,omitempty"`
- RxQueues uint8 `binapi:"u8,name=rx_queues" json:"rx_queues,omitempty"`
- TxQueues uint8 `binapi:"u8,name=tx_queues" json:"tx_queues,omitempty"`
- ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
- SocketID uint32 `binapi:"u32,name=socket_id" json:"socket_id,omitempty"`
- RingSize uint32 `binapi:"u32,name=ring_size" json:"ring_size,omitempty"`
- BufferSize uint16 `binapi:"u16,name=buffer_size" json:"buffer_size,omitempty"`
- NoZeroCopy bool `binapi:"bool,name=no_zero_copy" json:"no_zero_copy,omitempty"`
- HwAddr MacAddress `binapi:"mac_address,name=hw_addr" json:"hw_addr,omitempty"`
- Secret string `binapi:"string[24],name=secret" json:"secret,omitempty"`
-}
-
-func (m *MemifCreate) Reset() { *m = MemifCreate{} }
-func (*MemifCreate) GetMessageName() string { return "memif_create" }
-func (*MemifCreate) GetCrcString() string { return "b1b25061" }
-func (*MemifCreate) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *MemifCreate) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Role
- size += 4 // m.Mode
- size += 1 // m.RxQueues
- size += 1 // m.TxQueues
- size += 4 // m.ID
- size += 4 // m.SocketID
- size += 4 // m.RingSize
- size += 2 // m.BufferSize
- size += 1 // m.NoZeroCopy
- size += 1 * 6 // m.HwAddr
- size += 24 // m.Secret
- return size
-}
-func (m *MemifCreate) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.Role))
- buf.EncodeUint32(uint32(m.Mode))
- buf.EncodeUint8(m.RxQueues)
- buf.EncodeUint8(m.TxQueues)
- buf.EncodeUint32(m.ID)
- buf.EncodeUint32(m.SocketID)
- buf.EncodeUint32(m.RingSize)
- buf.EncodeUint16(m.BufferSize)
- buf.EncodeBool(m.NoZeroCopy)
- buf.EncodeBytes(m.HwAddr[:], 6)
- buf.EncodeString(m.Secret, 24)
- return buf.Bytes(), nil
-}
-func (m *MemifCreate) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Role = MemifRole(buf.DecodeUint32())
- m.Mode = MemifMode(buf.DecodeUint32())
- m.RxQueues = buf.DecodeUint8()
- m.TxQueues = buf.DecodeUint8()
- m.ID = buf.DecodeUint32()
- m.SocketID = buf.DecodeUint32()
- m.RingSize = buf.DecodeUint32()
- m.BufferSize = buf.DecodeUint16()
- m.NoZeroCopy = buf.DecodeBool()
- copy(m.HwAddr[:], buf.DecodeBytes(6))
- m.Secret = buf.DecodeString(24)
- return nil
-}
-
-// MemifCreateReply defines message 'memif_create_reply'.
-type MemifCreateReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *MemifCreateReply) Reset() { *m = MemifCreateReply{} }
-func (*MemifCreateReply) GetMessageName() string { return "memif_create_reply" }
-func (*MemifCreateReply) GetCrcString() string { return "5383d31f" }
-func (*MemifCreateReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MemifCreateReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *MemifCreateReply) 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 *MemifCreateReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// MemifDelete defines message 'memif_delete'.
-type MemifDelete struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *MemifDelete) Reset() { *m = MemifDelete{} }
-func (*MemifDelete) GetMessageName() string { return "memif_delete" }
-func (*MemifDelete) GetCrcString() string { return "f9e6675e" }
-func (*MemifDelete) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *MemifDelete) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *MemifDelete) 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 *MemifDelete) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// MemifDeleteReply defines message 'memif_delete_reply'.
-type MemifDeleteReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *MemifDeleteReply) Reset() { *m = MemifDeleteReply{} }
-func (*MemifDeleteReply) GetMessageName() string { return "memif_delete_reply" }
-func (*MemifDeleteReply) GetCrcString() string { return "e8d4e804" }
-func (*MemifDeleteReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MemifDeleteReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *MemifDeleteReply) 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 *MemifDeleteReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// MemifDetails defines message 'memif_details'.
-type MemifDetails struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- HwAddr MacAddress `binapi:"mac_address,name=hw_addr" json:"hw_addr,omitempty"`
- ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
- Role MemifRole `binapi:"memif_role,name=role" json:"role,omitempty"`
- Mode MemifMode `binapi:"memif_mode,name=mode" json:"mode,omitempty"`
- ZeroCopy bool `binapi:"bool,name=zero_copy" json:"zero_copy,omitempty"`
- SocketID uint32 `binapi:"u32,name=socket_id" json:"socket_id,omitempty"`
- RingSize uint32 `binapi:"u32,name=ring_size" json:"ring_size,omitempty"`
- BufferSize uint16 `binapi:"u16,name=buffer_size" json:"buffer_size,omitempty"`
- Flags IfStatusFlags `binapi:"if_status_flags,name=flags" json:"flags,omitempty"`
- IfName string `binapi:"string[64],name=if_name" json:"if_name,omitempty"`
-}
-
-func (m *MemifDetails) Reset() { *m = MemifDetails{} }
-func (*MemifDetails) GetMessageName() string { return "memif_details" }
-func (*MemifDetails) GetCrcString() string { return "d0382c4c" }
-func (*MemifDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MemifDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 * 6 // m.HwAddr
- size += 4 // m.ID
- size += 4 // m.Role
- size += 4 // m.Mode
- size += 1 // m.ZeroCopy
- size += 4 // m.SocketID
- size += 4 // m.RingSize
- size += 2 // m.BufferSize
- size += 4 // m.Flags
- size += 64 // m.IfName
- return size
-}
-func (m *MemifDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeBytes(m.HwAddr[:], 6)
- buf.EncodeUint32(m.ID)
- buf.EncodeUint32(uint32(m.Role))
- buf.EncodeUint32(uint32(m.Mode))
- buf.EncodeBool(m.ZeroCopy)
- buf.EncodeUint32(m.SocketID)
- buf.EncodeUint32(m.RingSize)
- buf.EncodeUint16(m.BufferSize)
- buf.EncodeUint32(uint32(m.Flags))
- buf.EncodeString(m.IfName, 64)
- return buf.Bytes(), nil
-}
-func (m *MemifDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- copy(m.HwAddr[:], buf.DecodeBytes(6))
- m.ID = buf.DecodeUint32()
- m.Role = MemifRole(buf.DecodeUint32())
- m.Mode = MemifMode(buf.DecodeUint32())
- m.ZeroCopy = buf.DecodeBool()
- m.SocketID = buf.DecodeUint32()
- m.RingSize = buf.DecodeUint32()
- m.BufferSize = buf.DecodeUint16()
- m.Flags = IfStatusFlags(buf.DecodeUint32())
- m.IfName = buf.DecodeString(64)
- return nil
-}
-
-// MemifDump defines message 'memif_dump'.
-type MemifDump struct{}
-
-func (m *MemifDump) Reset() { *m = MemifDump{} }
-func (*MemifDump) GetMessageName() string { return "memif_dump" }
-func (*MemifDump) GetCrcString() string { return "51077d14" }
-func (*MemifDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *MemifDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *MemifDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *MemifDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// MemifSocketFilenameAddDel defines message 'memif_socket_filename_add_del'.
-type MemifSocketFilenameAddDel struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- SocketID uint32 `binapi:"u32,name=socket_id" json:"socket_id,omitempty"`
- SocketFilename string `binapi:"string[108],name=socket_filename" json:"socket_filename,omitempty"`
-}
-
-func (m *MemifSocketFilenameAddDel) Reset() { *m = MemifSocketFilenameAddDel{} }
-func (*MemifSocketFilenameAddDel) GetMessageName() string { return "memif_socket_filename_add_del" }
-func (*MemifSocketFilenameAddDel) GetCrcString() string { return "a2ce1a10" }
-func (*MemifSocketFilenameAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *MemifSocketFilenameAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 4 // m.SocketID
- size += 108 // m.SocketFilename
- return size
-}
-func (m *MemifSocketFilenameAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeUint32(m.SocketID)
- buf.EncodeString(m.SocketFilename, 108)
- return buf.Bytes(), nil
-}
-func (m *MemifSocketFilenameAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.SocketID = buf.DecodeUint32()
- m.SocketFilename = buf.DecodeString(108)
- return nil
-}
-
-// MemifSocketFilenameAddDelReply defines message 'memif_socket_filename_add_del_reply'.
-type MemifSocketFilenameAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *MemifSocketFilenameAddDelReply) Reset() { *m = MemifSocketFilenameAddDelReply{} }
-func (*MemifSocketFilenameAddDelReply) GetMessageName() string {
- return "memif_socket_filename_add_del_reply"
-}
-func (*MemifSocketFilenameAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*MemifSocketFilenameAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MemifSocketFilenameAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *MemifSocketFilenameAddDelReply) 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 *MemifSocketFilenameAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// MemifSocketFilenameDetails defines message 'memif_socket_filename_details'.
-type MemifSocketFilenameDetails struct {
- SocketID uint32 `binapi:"u32,name=socket_id" json:"socket_id,omitempty"`
- SocketFilename string `binapi:"string[108],name=socket_filename" json:"socket_filename,omitempty"`
-}
-
-func (m *MemifSocketFilenameDetails) Reset() { *m = MemifSocketFilenameDetails{} }
-func (*MemifSocketFilenameDetails) GetMessageName() string { return "memif_socket_filename_details" }
-func (*MemifSocketFilenameDetails) GetCrcString() string { return "7ff326f7" }
-func (*MemifSocketFilenameDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MemifSocketFilenameDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SocketID
- size += 108 // m.SocketFilename
- return size
-}
-func (m *MemifSocketFilenameDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.SocketID)
- buf.EncodeString(m.SocketFilename, 108)
- return buf.Bytes(), nil
-}
-func (m *MemifSocketFilenameDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SocketID = buf.DecodeUint32()
- m.SocketFilename = buf.DecodeString(108)
- return nil
-}
-
-// MemifSocketFilenameDump defines message 'memif_socket_filename_dump'.
-type MemifSocketFilenameDump struct{}
-
-func (m *MemifSocketFilenameDump) Reset() { *m = MemifSocketFilenameDump{} }
-func (*MemifSocketFilenameDump) GetMessageName() string { return "memif_socket_filename_dump" }
-func (*MemifSocketFilenameDump) GetCrcString() string { return "51077d14" }
-func (*MemifSocketFilenameDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *MemifSocketFilenameDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *MemifSocketFilenameDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *MemifSocketFilenameDump) Unmarshal(b []byte) error {
- return nil
-}
-
-func init() { file_memif_binapi_init() }
-func file_memif_binapi_init() {
- api.RegisterMessage((*MemifCreate)(nil), "memif_create_b1b25061")
- api.RegisterMessage((*MemifCreateReply)(nil), "memif_create_reply_5383d31f")
- api.RegisterMessage((*MemifDelete)(nil), "memif_delete_f9e6675e")
- api.RegisterMessage((*MemifDeleteReply)(nil), "memif_delete_reply_e8d4e804")
- api.RegisterMessage((*MemifDetails)(nil), "memif_details_d0382c4c")
- api.RegisterMessage((*MemifDump)(nil), "memif_dump_51077d14")
- api.RegisterMessage((*MemifSocketFilenameAddDel)(nil), "memif_socket_filename_add_del_a2ce1a10")
- api.RegisterMessage((*MemifSocketFilenameAddDelReply)(nil), "memif_socket_filename_add_del_reply_e8d4e804")
- api.RegisterMessage((*MemifSocketFilenameDetails)(nil), "memif_socket_filename_details_7ff326f7")
- api.RegisterMessage((*MemifSocketFilenameDump)(nil), "memif_socket_filename_dump_51077d14")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*MemifCreate)(nil),
- (*MemifCreateReply)(nil),
- (*MemifDelete)(nil),
- (*MemifDeleteReply)(nil),
- (*MemifDetails)(nil),
- (*MemifDump)(nil),
- (*MemifSocketFilenameAddDel)(nil),
- (*MemifSocketFilenameAddDelReply)(nil),
- (*MemifSocketFilenameDetails)(nil),
- (*MemifSocketFilenameDump)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/memif/memif_rpc.ba.go b/internal/testbinapi/binapi2001/memif/memif_rpc.ba.go
deleted file mode 100644
index e086d64..0000000
--- a/internal/testbinapi/binapi2001/memif/memif_rpc.ba.go
+++ /dev/null
@@ -1,142 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package memif
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service memif.
-type RPCService interface {
- MemifCreate(ctx context.Context, in *MemifCreate) (*MemifCreateReply, error)
- MemifDelete(ctx context.Context, in *MemifDelete) (*MemifDeleteReply, error)
- MemifDump(ctx context.Context, in *MemifDump) (RPCService_MemifDumpClient, error)
- MemifSocketFilenameAddDel(ctx context.Context, in *MemifSocketFilenameAddDel) (*MemifSocketFilenameAddDelReply, error)
- MemifSocketFilenameDump(ctx context.Context, in *MemifSocketFilenameDump) (RPCService_MemifSocketFilenameDumpClient, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) MemifCreate(ctx context.Context, in *MemifCreate) (*MemifCreateReply, error) {
- out := new(MemifCreateReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) MemifDelete(ctx context.Context, in *MemifDelete) (*MemifDeleteReply, error) {
- out := new(MemifDeleteReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) MemifDump(ctx context.Context, in *MemifDump) (RPCService_MemifDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_MemifDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_MemifDumpClient interface {
- Recv() (*MemifDetails, error)
- api.Stream
-}
-
-type serviceClient_MemifDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_MemifDumpClient) Recv() (*MemifDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *MemifDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) MemifSocketFilenameAddDel(ctx context.Context, in *MemifSocketFilenameAddDel) (*MemifSocketFilenameAddDelReply, error) {
- out := new(MemifSocketFilenameAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) MemifSocketFilenameDump(ctx context.Context, in *MemifSocketFilenameDump) (RPCService_MemifSocketFilenameDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_MemifSocketFilenameDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_MemifSocketFilenameDumpClient interface {
- Recv() (*MemifSocketFilenameDetails, error)
- api.Stream
-}
-
-type serviceClient_MemifSocketFilenameDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_MemifSocketFilenameDumpClient) Recv() (*MemifSocketFilenameDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *MemifSocketFilenameDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
diff --git a/internal/testbinapi/binapi2001/mfib_types/mfib_types.ba.go b/internal/testbinapi/binapi2001/mfib_types/mfib_types.ba.go
deleted file mode 100644
index cc79850..0000000
--- a/internal/testbinapi/binapi2001/mfib_types/mfib_types.ba.go
+++ /dev/null
@@ -1,863 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/mfib_types.api.json
-
-// Package mfib_types contains generated bindings for API file mfib_types.api.
-//
-// Contents:
-// 5 aliases
-// 8 enums
-// 10 structs
-// 1 union
-//
-package mfib_types
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "mfib_types"
- APIVersion = ""
- VersionCrc = 0xba024d84
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// FibPathFlags defines enum 'fib_path_flags'.
-type FibPathFlags uint32
-
-const (
- FIB_API_PATH_FLAG_NONE FibPathFlags = 0
- FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED FibPathFlags = 1
- FIB_API_PATH_FLAG_RESOLVE_VIA_HOST FibPathFlags = 2
- FIB_API_PATH_FLAG_POP_PW_CW FibPathFlags = 4
-)
-
-var (
- FibPathFlags_name = map[uint32]string{
- 0: "FIB_API_PATH_FLAG_NONE",
- 1: "FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED",
- 2: "FIB_API_PATH_FLAG_RESOLVE_VIA_HOST",
- 4: "FIB_API_PATH_FLAG_POP_PW_CW",
- }
- FibPathFlags_value = map[string]uint32{
- "FIB_API_PATH_FLAG_NONE": 0,
- "FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED": 1,
- "FIB_API_PATH_FLAG_RESOLVE_VIA_HOST": 2,
- "FIB_API_PATH_FLAG_POP_PW_CW": 4,
- }
-)
-
-func (x FibPathFlags) String() string {
- s, ok := FibPathFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := FibPathFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "FibPathFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// FibPathNhProto defines enum 'fib_path_nh_proto'.
-type FibPathNhProto uint32
-
-const (
- FIB_API_PATH_NH_PROTO_IP4 FibPathNhProto = 0
- FIB_API_PATH_NH_PROTO_IP6 FibPathNhProto = 1
- FIB_API_PATH_NH_PROTO_MPLS FibPathNhProto = 2
- FIB_API_PATH_NH_PROTO_ETHERNET FibPathNhProto = 3
- FIB_API_PATH_NH_PROTO_BIER FibPathNhProto = 4
-)
-
-var (
- FibPathNhProto_name = map[uint32]string{
- 0: "FIB_API_PATH_NH_PROTO_IP4",
- 1: "FIB_API_PATH_NH_PROTO_IP6",
- 2: "FIB_API_PATH_NH_PROTO_MPLS",
- 3: "FIB_API_PATH_NH_PROTO_ETHERNET",
- 4: "FIB_API_PATH_NH_PROTO_BIER",
- }
- FibPathNhProto_value = map[string]uint32{
- "FIB_API_PATH_NH_PROTO_IP4": 0,
- "FIB_API_PATH_NH_PROTO_IP6": 1,
- "FIB_API_PATH_NH_PROTO_MPLS": 2,
- "FIB_API_PATH_NH_PROTO_ETHERNET": 3,
- "FIB_API_PATH_NH_PROTO_BIER": 4,
- }
-)
-
-func (x FibPathNhProto) String() string {
- s, ok := FibPathNhProto_name[uint32(x)]
- if ok {
- return s
- }
- return "FibPathNhProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// FibPathType defines enum 'fib_path_type'.
-type FibPathType uint32
-
-const (
- FIB_API_PATH_TYPE_NORMAL FibPathType = 0
- FIB_API_PATH_TYPE_LOCAL FibPathType = 1
- FIB_API_PATH_TYPE_DROP FibPathType = 2
- FIB_API_PATH_TYPE_UDP_ENCAP FibPathType = 3
- FIB_API_PATH_TYPE_BIER_IMP FibPathType = 4
- FIB_API_PATH_TYPE_ICMP_UNREACH FibPathType = 5
- FIB_API_PATH_TYPE_ICMP_PROHIBIT FibPathType = 6
- FIB_API_PATH_TYPE_SOURCE_LOOKUP FibPathType = 7
- FIB_API_PATH_TYPE_DVR FibPathType = 8
- FIB_API_PATH_TYPE_INTERFACE_RX FibPathType = 9
- FIB_API_PATH_TYPE_CLASSIFY FibPathType = 10
-)
-
-var (
- FibPathType_name = map[uint32]string{
- 0: "FIB_API_PATH_TYPE_NORMAL",
- 1: "FIB_API_PATH_TYPE_LOCAL",
- 2: "FIB_API_PATH_TYPE_DROP",
- 3: "FIB_API_PATH_TYPE_UDP_ENCAP",
- 4: "FIB_API_PATH_TYPE_BIER_IMP",
- 5: "FIB_API_PATH_TYPE_ICMP_UNREACH",
- 6: "FIB_API_PATH_TYPE_ICMP_PROHIBIT",
- 7: "FIB_API_PATH_TYPE_SOURCE_LOOKUP",
- 8: "FIB_API_PATH_TYPE_DVR",
- 9: "FIB_API_PATH_TYPE_INTERFACE_RX",
- 10: "FIB_API_PATH_TYPE_CLASSIFY",
- }
- FibPathType_value = map[string]uint32{
- "FIB_API_PATH_TYPE_NORMAL": 0,
- "FIB_API_PATH_TYPE_LOCAL": 1,
- "FIB_API_PATH_TYPE_DROP": 2,
- "FIB_API_PATH_TYPE_UDP_ENCAP": 3,
- "FIB_API_PATH_TYPE_BIER_IMP": 4,
- "FIB_API_PATH_TYPE_ICMP_UNREACH": 5,
- "FIB_API_PATH_TYPE_ICMP_PROHIBIT": 6,
- "FIB_API_PATH_TYPE_SOURCE_LOOKUP": 7,
- "FIB_API_PATH_TYPE_DVR": 8,
- "FIB_API_PATH_TYPE_INTERFACE_RX": 9,
- "FIB_API_PATH_TYPE_CLASSIFY": 10,
- }
-)
-
-func (x FibPathType) String() string {
- s, ok := FibPathType_name[uint32(x)]
- if ok {
- return s
- }
- return "FibPathType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MfibItfFlags defines enum 'mfib_itf_flags'.
-type MfibItfFlags uint32
-
-const (
- MFIB_API_ITF_FLAG_NONE MfibItfFlags = 0
- MFIB_API_ITF_FLAG_NEGATE_SIGNAL MfibItfFlags = 1
- MFIB_API_ITF_FLAG_ACCEPT MfibItfFlags = 2
- MFIB_API_ITF_FLAG_FORWARD MfibItfFlags = 4
- MFIB_API_ITF_FLAG_SIGNAL_PRESENT MfibItfFlags = 8
- MFIB_API_ITF_FLAG_DONT_PRESERVE MfibItfFlags = 16
-)
-
-var (
- MfibItfFlags_name = map[uint32]string{
- 0: "MFIB_API_ITF_FLAG_NONE",
- 1: "MFIB_API_ITF_FLAG_NEGATE_SIGNAL",
- 2: "MFIB_API_ITF_FLAG_ACCEPT",
- 4: "MFIB_API_ITF_FLAG_FORWARD",
- 8: "MFIB_API_ITF_FLAG_SIGNAL_PRESENT",
- 16: "MFIB_API_ITF_FLAG_DONT_PRESERVE",
- }
- MfibItfFlags_value = map[string]uint32{
- "MFIB_API_ITF_FLAG_NONE": 0,
- "MFIB_API_ITF_FLAG_NEGATE_SIGNAL": 1,
- "MFIB_API_ITF_FLAG_ACCEPT": 2,
- "MFIB_API_ITF_FLAG_FORWARD": 4,
- "MFIB_API_ITF_FLAG_SIGNAL_PRESENT": 8,
- "MFIB_API_ITF_FLAG_DONT_PRESERVE": 16,
- }
-)
-
-func (x MfibItfFlags) String() string {
- s, ok := MfibItfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := MfibItfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "MfibItfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// FibMplsLabel defines type 'fib_mpls_label'.
-type FibMplsLabel struct {
- IsUniform uint8 `binapi:"u8,name=is_uniform" json:"is_uniform,omitempty"`
- Label uint32 `binapi:"u32,name=label" json:"label,omitempty"`
- TTL uint8 `binapi:"u8,name=ttl" json:"ttl,omitempty"`
- Exp uint8 `binapi:"u8,name=exp" json:"exp,omitempty"`
-}
-
-// FibPath defines type 'fib_path'.
-type FibPath struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
- RpfID uint32 `binapi:"u32,name=rpf_id" json:"rpf_id,omitempty"`
- Weight uint8 `binapi:"u8,name=weight" json:"weight,omitempty"`
- Preference uint8 `binapi:"u8,name=preference" json:"preference,omitempty"`
- Type FibPathType `binapi:"fib_path_type,name=type" json:"type,omitempty"`
- Flags FibPathFlags `binapi:"fib_path_flags,name=flags" json:"flags,omitempty"`
- Proto FibPathNhProto `binapi:"fib_path_nh_proto,name=proto" json:"proto,omitempty"`
- Nh FibPathNh `binapi:"fib_path_nh,name=nh" json:"nh,omitempty"`
- NLabels uint8 `binapi:"u8,name=n_labels" json:"n_labels,omitempty"`
- LabelStack [16]FibMplsLabel `binapi:"fib_mpls_label[16],name=label_stack" json:"label_stack,omitempty"`
-}
-
-// FibPathNh defines type 'fib_path_nh'.
-type FibPathNh struct {
- Address AddressUnion `binapi:"address_union,name=address" json:"address,omitempty"`
- ViaLabel uint32 `binapi:"u32,name=via_label" json:"via_label,omitempty"`
- ObjID uint32 `binapi:"u32,name=obj_id" json:"obj_id,omitempty"`
- ClassifyTableIndex uint32 `binapi:"u32,name=classify_table_index" json:"classify_table_index,omitempty"`
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// MfibPath defines type 'mfib_path'.
-type MfibPath struct {
- ItfFlags MfibItfFlags `binapi:"mfib_itf_flags,name=itf_flags" json:"itf_flags,omitempty"`
- Path FibPath `binapi:"fib_path,name=path" json:"path,omitempty"`
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
diff --git a/internal/testbinapi/binapi2001/mpls/mpls.ba.go b/internal/testbinapi/binapi2001/mpls/mpls.ba.go
deleted file mode 100644
index 15c1f46..0000000
--- a/internal/testbinapi/binapi2001/mpls/mpls.ba.go
+++ /dev/null
@@ -1,2056 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/mpls.api.json
-
-// Package mpls contains generated bindings for API file mpls.api.
-//
-// Contents:
-// 6 aliases
-// 13 enums
-// 12 structs
-// 1 union
-// 16 messages
-//
-package mpls
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "mpls"
- APIVersion = "1.1.1"
- VersionCrc = 0xfe593e14
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// FibPathFlags defines enum 'fib_path_flags'.
-type FibPathFlags uint32
-
-const (
- FIB_API_PATH_FLAG_NONE FibPathFlags = 0
- FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED FibPathFlags = 1
- FIB_API_PATH_FLAG_RESOLVE_VIA_HOST FibPathFlags = 2
- FIB_API_PATH_FLAG_POP_PW_CW FibPathFlags = 4
-)
-
-var (
- FibPathFlags_name = map[uint32]string{
- 0: "FIB_API_PATH_FLAG_NONE",
- 1: "FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED",
- 2: "FIB_API_PATH_FLAG_RESOLVE_VIA_HOST",
- 4: "FIB_API_PATH_FLAG_POP_PW_CW",
- }
- FibPathFlags_value = map[string]uint32{
- "FIB_API_PATH_FLAG_NONE": 0,
- "FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED": 1,
- "FIB_API_PATH_FLAG_RESOLVE_VIA_HOST": 2,
- "FIB_API_PATH_FLAG_POP_PW_CW": 4,
- }
-)
-
-func (x FibPathFlags) String() string {
- s, ok := FibPathFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := FibPathFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "FibPathFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// FibPathNhProto defines enum 'fib_path_nh_proto'.
-type FibPathNhProto uint32
-
-const (
- FIB_API_PATH_NH_PROTO_IP4 FibPathNhProto = 0
- FIB_API_PATH_NH_PROTO_IP6 FibPathNhProto = 1
- FIB_API_PATH_NH_PROTO_MPLS FibPathNhProto = 2
- FIB_API_PATH_NH_PROTO_ETHERNET FibPathNhProto = 3
- FIB_API_PATH_NH_PROTO_BIER FibPathNhProto = 4
-)
-
-var (
- FibPathNhProto_name = map[uint32]string{
- 0: "FIB_API_PATH_NH_PROTO_IP4",
- 1: "FIB_API_PATH_NH_PROTO_IP6",
- 2: "FIB_API_PATH_NH_PROTO_MPLS",
- 3: "FIB_API_PATH_NH_PROTO_ETHERNET",
- 4: "FIB_API_PATH_NH_PROTO_BIER",
- }
- FibPathNhProto_value = map[string]uint32{
- "FIB_API_PATH_NH_PROTO_IP4": 0,
- "FIB_API_PATH_NH_PROTO_IP6": 1,
- "FIB_API_PATH_NH_PROTO_MPLS": 2,
- "FIB_API_PATH_NH_PROTO_ETHERNET": 3,
- "FIB_API_PATH_NH_PROTO_BIER": 4,
- }
-)
-
-func (x FibPathNhProto) String() string {
- s, ok := FibPathNhProto_name[uint32(x)]
- if ok {
- return s
- }
- return "FibPathNhProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// FibPathType defines enum 'fib_path_type'.
-type FibPathType uint32
-
-const (
- FIB_API_PATH_TYPE_NORMAL FibPathType = 0
- FIB_API_PATH_TYPE_LOCAL FibPathType = 1
- FIB_API_PATH_TYPE_DROP FibPathType = 2
- FIB_API_PATH_TYPE_UDP_ENCAP FibPathType = 3
- FIB_API_PATH_TYPE_BIER_IMP FibPathType = 4
- FIB_API_PATH_TYPE_ICMP_UNREACH FibPathType = 5
- FIB_API_PATH_TYPE_ICMP_PROHIBIT FibPathType = 6
- FIB_API_PATH_TYPE_SOURCE_LOOKUP FibPathType = 7
- FIB_API_PATH_TYPE_DVR FibPathType = 8
- FIB_API_PATH_TYPE_INTERFACE_RX FibPathType = 9
- FIB_API_PATH_TYPE_CLASSIFY FibPathType = 10
-)
-
-var (
- FibPathType_name = map[uint32]string{
- 0: "FIB_API_PATH_TYPE_NORMAL",
- 1: "FIB_API_PATH_TYPE_LOCAL",
- 2: "FIB_API_PATH_TYPE_DROP",
- 3: "FIB_API_PATH_TYPE_UDP_ENCAP",
- 4: "FIB_API_PATH_TYPE_BIER_IMP",
- 5: "FIB_API_PATH_TYPE_ICMP_UNREACH",
- 6: "FIB_API_PATH_TYPE_ICMP_PROHIBIT",
- 7: "FIB_API_PATH_TYPE_SOURCE_LOOKUP",
- 8: "FIB_API_PATH_TYPE_DVR",
- 9: "FIB_API_PATH_TYPE_INTERFACE_RX",
- 10: "FIB_API_PATH_TYPE_CLASSIFY",
- }
- FibPathType_value = map[string]uint32{
- "FIB_API_PATH_TYPE_NORMAL": 0,
- "FIB_API_PATH_TYPE_LOCAL": 1,
- "FIB_API_PATH_TYPE_DROP": 2,
- "FIB_API_PATH_TYPE_UDP_ENCAP": 3,
- "FIB_API_PATH_TYPE_BIER_IMP": 4,
- "FIB_API_PATH_TYPE_ICMP_UNREACH": 5,
- "FIB_API_PATH_TYPE_ICMP_PROHIBIT": 6,
- "FIB_API_PATH_TYPE_SOURCE_LOOKUP": 7,
- "FIB_API_PATH_TYPE_DVR": 8,
- "FIB_API_PATH_TYPE_INTERFACE_RX": 9,
- "FIB_API_PATH_TYPE_CLASSIFY": 10,
- }
-)
-
-func (x FibPathType) String() string {
- s, ok := FibPathType_name[uint32(x)]
- if ok {
- return s
- }
- return "FibPathType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// FibMplsLabel defines type 'fib_mpls_label'.
-type FibMplsLabel struct {
- IsUniform uint8 `binapi:"u8,name=is_uniform" json:"is_uniform,omitempty"`
- Label uint32 `binapi:"u32,name=label" json:"label,omitempty"`
- TTL uint8 `binapi:"u8,name=ttl" json:"ttl,omitempty"`
- Exp uint8 `binapi:"u8,name=exp" json:"exp,omitempty"`
-}
-
-// FibPath defines type 'fib_path'.
-type FibPath struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
- RpfID uint32 `binapi:"u32,name=rpf_id" json:"rpf_id,omitempty"`
- Weight uint8 `binapi:"u8,name=weight" json:"weight,omitempty"`
- Preference uint8 `binapi:"u8,name=preference" json:"preference,omitempty"`
- Type FibPathType `binapi:"fib_path_type,name=type" json:"type,omitempty"`
- Flags FibPathFlags `binapi:"fib_path_flags,name=flags" json:"flags,omitempty"`
- Proto FibPathNhProto `binapi:"fib_path_nh_proto,name=proto" json:"proto,omitempty"`
- Nh FibPathNh `binapi:"fib_path_nh,name=nh" json:"nh,omitempty"`
- NLabels uint8 `binapi:"u8,name=n_labels" json:"n_labels,omitempty"`
- LabelStack [16]FibMplsLabel `binapi:"fib_mpls_label[16],name=label_stack" json:"label_stack,omitempty"`
-}
-
-// FibPathNh defines type 'fib_path_nh'.
-type FibPathNh struct {
- Address AddressUnion `binapi:"address_union,name=address" json:"address,omitempty"`
- ViaLabel uint32 `binapi:"u32,name=via_label" json:"via_label,omitempty"`
- ObjID uint32 `binapi:"u32,name=obj_id" json:"obj_id,omitempty"`
- ClassifyTableIndex uint32 `binapi:"u32,name=classify_table_index" json:"classify_table_index,omitempty"`
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// MplsRoute defines type 'mpls_route'.
-type MplsRoute struct {
- MrTableID uint32 `binapi:"u32,name=mr_table_id" json:"mr_table_id,omitempty"`
- MrLabel uint32 `binapi:"u32,name=mr_label" json:"mr_label,omitempty"`
- MrEos uint8 `binapi:"u8,name=mr_eos" json:"mr_eos,omitempty"`
- MrEosProto uint8 `binapi:"u8,name=mr_eos_proto" json:"mr_eos_proto,omitempty"`
- MrIsMulticast bool `binapi:"bool,name=mr_is_multicast" json:"mr_is_multicast,omitempty"`
- MrNPaths uint8 `binapi:"u8,name=mr_n_paths" json:"-"`
- MrPaths []FibPath `binapi:"fib_path[mr_n_paths],name=mr_paths" json:"mr_paths,omitempty"`
-}
-
-// MplsTable defines type 'mpls_table'.
-type MplsTable struct {
- MtTableID uint32 `binapi:"u32,name=mt_table_id" json:"mt_table_id,omitempty"`
- MtName string `binapi:"string[64],name=mt_name" json:"mt_name,omitempty"`
-}
-
-// MplsTunnel defines type 'mpls_tunnel'.
-type MplsTunnel struct {
- MtSwIfIndex InterfaceIndex `binapi:"interface_index,name=mt_sw_if_index" json:"mt_sw_if_index,omitempty"`
- MtTunnelIndex uint32 `binapi:"u32,name=mt_tunnel_index" json:"mt_tunnel_index,omitempty"`
- MtL2Only bool `binapi:"bool,name=mt_l2_only" json:"mt_l2_only,omitempty"`
- MtIsMulticast bool `binapi:"bool,name=mt_is_multicast" json:"mt_is_multicast,omitempty"`
- MtNPaths uint8 `binapi:"u8,name=mt_n_paths" json:"-"`
- MtPaths []FibPath `binapi:"fib_path[mt_n_paths],name=mt_paths" json:"mt_paths,omitempty"`
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
-
-// MplsIPBindUnbind defines message 'mpls_ip_bind_unbind'.
-type MplsIPBindUnbind struct {
- MbMplsTableID uint32 `binapi:"u32,name=mb_mpls_table_id" json:"mb_mpls_table_id,omitempty"`
- MbLabel uint32 `binapi:"u32,name=mb_label" json:"mb_label,omitempty"`
- MbIPTableID uint32 `binapi:"u32,name=mb_ip_table_id" json:"mb_ip_table_id,omitempty"`
- MbIsBind bool `binapi:"bool,name=mb_is_bind" json:"mb_is_bind,omitempty"`
- MbPrefix Prefix `binapi:"prefix,name=mb_prefix" json:"mb_prefix,omitempty"`
-}
-
-func (m *MplsIPBindUnbind) Reset() { *m = MplsIPBindUnbind{} }
-func (*MplsIPBindUnbind) GetMessageName() string { return "mpls_ip_bind_unbind" }
-func (*MplsIPBindUnbind) GetCrcString() string { return "48249a27" }
-func (*MplsIPBindUnbind) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *MplsIPBindUnbind) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.MbMplsTableID
- size += 4 // m.MbLabel
- size += 4 // m.MbIPTableID
- size += 1 // m.MbIsBind
- size += 4 // m.MbPrefix.Address.Af
- size += 1 * 16 // m.MbPrefix.Address.Un
- size += 1 // m.MbPrefix.Len
- return size
-}
-func (m *MplsIPBindUnbind) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.MbMplsTableID)
- buf.EncodeUint32(m.MbLabel)
- buf.EncodeUint32(m.MbIPTableID)
- buf.EncodeBool(m.MbIsBind)
- buf.EncodeUint32(uint32(m.MbPrefix.Address.Af))
- buf.EncodeBytes(m.MbPrefix.Address.Un.XXX_UnionData[:], 16)
- buf.EncodeUint8(m.MbPrefix.Len)
- return buf.Bytes(), nil
-}
-func (m *MplsIPBindUnbind) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.MbMplsTableID = buf.DecodeUint32()
- m.MbLabel = buf.DecodeUint32()
- m.MbIPTableID = buf.DecodeUint32()
- m.MbIsBind = buf.DecodeBool()
- m.MbPrefix.Address.Af = AddressFamily(buf.DecodeUint32())
- copy(m.MbPrefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.MbPrefix.Len = buf.DecodeUint8()
- return nil
-}
-
-// MplsIPBindUnbindReply defines message 'mpls_ip_bind_unbind_reply'.
-type MplsIPBindUnbindReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *MplsIPBindUnbindReply) Reset() { *m = MplsIPBindUnbindReply{} }
-func (*MplsIPBindUnbindReply) GetMessageName() string { return "mpls_ip_bind_unbind_reply" }
-func (*MplsIPBindUnbindReply) GetCrcString() string { return "e8d4e804" }
-func (*MplsIPBindUnbindReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MplsIPBindUnbindReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *MplsIPBindUnbindReply) 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 *MplsIPBindUnbindReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// MplsRouteAddDel defines message 'mpls_route_add_del'.
-type MplsRouteAddDel struct {
- MrIsAdd bool `binapi:"bool,name=mr_is_add" json:"mr_is_add,omitempty"`
- MrIsMultipath bool `binapi:"bool,name=mr_is_multipath" json:"mr_is_multipath,omitempty"`
- MrRoute MplsRoute `binapi:"mpls_route,name=mr_route" json:"mr_route,omitempty"`
-}
-
-func (m *MplsRouteAddDel) Reset() { *m = MplsRouteAddDel{} }
-func (*MplsRouteAddDel) GetMessageName() string { return "mpls_route_add_del" }
-func (*MplsRouteAddDel) GetCrcString() string { return "343cff54" }
-func (*MplsRouteAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *MplsRouteAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.MrIsAdd
- size += 1 // m.MrIsMultipath
- size += 4 // m.MrRoute.MrTableID
- size += 4 // m.MrRoute.MrLabel
- size += 1 // m.MrRoute.MrEos
- size += 1 // m.MrRoute.MrEosProto
- size += 1 // m.MrRoute.MrIsMulticast
- size += 1 // m.MrRoute.MrNPaths
- for j2 := 0; j2 < len(m.MrRoute.MrPaths); j2++ {
- var s2 FibPath
- _ = s2
- if j2 < len(m.MrRoute.MrPaths) {
- s2 = m.MrRoute.MrPaths[j2]
- }
- size += 4 // s2.SwIfIndex
- size += 4 // s2.TableID
- size += 4 // s2.RpfID
- size += 1 // s2.Weight
- size += 1 // s2.Preference
- size += 4 // s2.Type
- size += 4 // s2.Flags
- size += 4 // s2.Proto
- size += 1 * 16 // s2.Nh.Address
- size += 4 // s2.Nh.ViaLabel
- size += 4 // s2.Nh.ObjID
- size += 4 // s2.Nh.ClassifyTableIndex
- size += 1 // s2.NLabels
- for j3 := 0; j3 < 16; j3++ {
- size += 1 // s2.LabelStack[j3].IsUniform
- size += 4 // s2.LabelStack[j3].Label
- size += 1 // s2.LabelStack[j3].TTL
- size += 1 // s2.LabelStack[j3].Exp
- }
- }
- return size
-}
-func (m *MplsRouteAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.MrIsAdd)
- buf.EncodeBool(m.MrIsMultipath)
- buf.EncodeUint32(m.MrRoute.MrTableID)
- buf.EncodeUint32(m.MrRoute.MrLabel)
- buf.EncodeUint8(m.MrRoute.MrEos)
- buf.EncodeUint8(m.MrRoute.MrEosProto)
- buf.EncodeBool(m.MrRoute.MrIsMulticast)
- buf.EncodeUint8(uint8(len(m.MrRoute.MrPaths)))
- for j1 := 0; j1 < len(m.MrRoute.MrPaths); j1++ {
- var v1 FibPath // MrPaths
- if j1 < len(m.MrRoute.MrPaths) {
- v1 = m.MrRoute.MrPaths[j1]
- }
- buf.EncodeUint32(v1.SwIfIndex)
- buf.EncodeUint32(v1.TableID)
- buf.EncodeUint32(v1.RpfID)
- buf.EncodeUint8(v1.Weight)
- buf.EncodeUint8(v1.Preference)
- buf.EncodeUint32(uint32(v1.Type))
- buf.EncodeUint32(uint32(v1.Flags))
- buf.EncodeUint32(uint32(v1.Proto))
- buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
- buf.EncodeUint32(v1.Nh.ViaLabel)
- buf.EncodeUint32(v1.Nh.ObjID)
- buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
- buf.EncodeUint8(v1.NLabels)
- for j2 := 0; j2 < 16; j2++ {
- buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
- buf.EncodeUint32(v1.LabelStack[j2].Label)
- buf.EncodeUint8(v1.LabelStack[j2].TTL)
- buf.EncodeUint8(v1.LabelStack[j2].Exp)
- }
- }
- return buf.Bytes(), nil
-}
-func (m *MplsRouteAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.MrIsAdd = buf.DecodeBool()
- m.MrIsMultipath = buf.DecodeBool()
- m.MrRoute.MrTableID = buf.DecodeUint32()
- m.MrRoute.MrLabel = buf.DecodeUint32()
- m.MrRoute.MrEos = buf.DecodeUint8()
- m.MrRoute.MrEosProto = buf.DecodeUint8()
- m.MrRoute.MrIsMulticast = buf.DecodeBool()
- m.MrRoute.MrNPaths = buf.DecodeUint8()
- m.MrRoute.MrPaths = make([]FibPath, m.MrRoute.MrNPaths)
- for j1 := 0; j1 < len(m.MrRoute.MrPaths); j1++ {
- m.MrRoute.MrPaths[j1].SwIfIndex = buf.DecodeUint32()
- m.MrRoute.MrPaths[j1].TableID = buf.DecodeUint32()
- m.MrRoute.MrPaths[j1].RpfID = buf.DecodeUint32()
- m.MrRoute.MrPaths[j1].Weight = buf.DecodeUint8()
- m.MrRoute.MrPaths[j1].Preference = buf.DecodeUint8()
- m.MrRoute.MrPaths[j1].Type = FibPathType(buf.DecodeUint32())
- m.MrRoute.MrPaths[j1].Flags = FibPathFlags(buf.DecodeUint32())
- m.MrRoute.MrPaths[j1].Proto = FibPathNhProto(buf.DecodeUint32())
- copy(m.MrRoute.MrPaths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
- m.MrRoute.MrPaths[j1].Nh.ViaLabel = buf.DecodeUint32()
- m.MrRoute.MrPaths[j1].Nh.ObjID = buf.DecodeUint32()
- m.MrRoute.MrPaths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
- m.MrRoute.MrPaths[j1].NLabels = buf.DecodeUint8()
- for j2 := 0; j2 < 16; j2++ {
- m.MrRoute.MrPaths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
- m.MrRoute.MrPaths[j1].LabelStack[j2].Label = buf.DecodeUint32()
- m.MrRoute.MrPaths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
- m.MrRoute.MrPaths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
- }
- }
- return nil
-}
-
-// MplsRouteAddDelReply defines message 'mpls_route_add_del_reply'.
-type MplsRouteAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- StatsIndex uint32 `binapi:"u32,name=stats_index" json:"stats_index,omitempty"`
-}
-
-func (m *MplsRouteAddDelReply) Reset() { *m = MplsRouteAddDelReply{} }
-func (*MplsRouteAddDelReply) GetMessageName() string { return "mpls_route_add_del_reply" }
-func (*MplsRouteAddDelReply) GetCrcString() string { return "1992deab" }
-func (*MplsRouteAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MplsRouteAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.StatsIndex
- return size
-}
-func (m *MplsRouteAddDelReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.StatsIndex)
- return buf.Bytes(), nil
-}
-func (m *MplsRouteAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.StatsIndex = buf.DecodeUint32()
- return nil
-}
-
-// MplsRouteDetails defines message 'mpls_route_details'.
-type MplsRouteDetails struct {
- MrRoute MplsRoute `binapi:"mpls_route,name=mr_route" json:"mr_route,omitempty"`
-}
-
-func (m *MplsRouteDetails) Reset() { *m = MplsRouteDetails{} }
-func (*MplsRouteDetails) GetMessageName() string { return "mpls_route_details" }
-func (*MplsRouteDetails) GetCrcString() string { return "d0ac384c" }
-func (*MplsRouteDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MplsRouteDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.MrRoute.MrTableID
- size += 4 // m.MrRoute.MrLabel
- size += 1 // m.MrRoute.MrEos
- size += 1 // m.MrRoute.MrEosProto
- size += 1 // m.MrRoute.MrIsMulticast
- size += 1 // m.MrRoute.MrNPaths
- for j2 := 0; j2 < len(m.MrRoute.MrPaths); j2++ {
- var s2 FibPath
- _ = s2
- if j2 < len(m.MrRoute.MrPaths) {
- s2 = m.MrRoute.MrPaths[j2]
- }
- size += 4 // s2.SwIfIndex
- size += 4 // s2.TableID
- size += 4 // s2.RpfID
- size += 1 // s2.Weight
- size += 1 // s2.Preference
- size += 4 // s2.Type
- size += 4 // s2.Flags
- size += 4 // s2.Proto
- size += 1 * 16 // s2.Nh.Address
- size += 4 // s2.Nh.ViaLabel
- size += 4 // s2.Nh.ObjID
- size += 4 // s2.Nh.ClassifyTableIndex
- size += 1 // s2.NLabels
- for j3 := 0; j3 < 16; j3++ {
- size += 1 // s2.LabelStack[j3].IsUniform
- size += 4 // s2.LabelStack[j3].Label
- size += 1 // s2.LabelStack[j3].TTL
- size += 1 // s2.LabelStack[j3].Exp
- }
- }
- return size
-}
-func (m *MplsRouteDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.MrRoute.MrTableID)
- buf.EncodeUint32(m.MrRoute.MrLabel)
- buf.EncodeUint8(m.MrRoute.MrEos)
- buf.EncodeUint8(m.MrRoute.MrEosProto)
- buf.EncodeBool(m.MrRoute.MrIsMulticast)
- buf.EncodeUint8(uint8(len(m.MrRoute.MrPaths)))
- for j1 := 0; j1 < len(m.MrRoute.MrPaths); j1++ {
- var v1 FibPath // MrPaths
- if j1 < len(m.MrRoute.MrPaths) {
- v1 = m.MrRoute.MrPaths[j1]
- }
- buf.EncodeUint32(v1.SwIfIndex)
- buf.EncodeUint32(v1.TableID)
- buf.EncodeUint32(v1.RpfID)
- buf.EncodeUint8(v1.Weight)
- buf.EncodeUint8(v1.Preference)
- buf.EncodeUint32(uint32(v1.Type))
- buf.EncodeUint32(uint32(v1.Flags))
- buf.EncodeUint32(uint32(v1.Proto))
- buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
- buf.EncodeUint32(v1.Nh.ViaLabel)
- buf.EncodeUint32(v1.Nh.ObjID)
- buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
- buf.EncodeUint8(v1.NLabels)
- for j2 := 0; j2 < 16; j2++ {
- buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
- buf.EncodeUint32(v1.LabelStack[j2].Label)
- buf.EncodeUint8(v1.LabelStack[j2].TTL)
- buf.EncodeUint8(v1.LabelStack[j2].Exp)
- }
- }
- return buf.Bytes(), nil
-}
-func (m *MplsRouteDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.MrRoute.MrTableID = buf.DecodeUint32()
- m.MrRoute.MrLabel = buf.DecodeUint32()
- m.MrRoute.MrEos = buf.DecodeUint8()
- m.MrRoute.MrEosProto = buf.DecodeUint8()
- m.MrRoute.MrIsMulticast = buf.DecodeBool()
- m.MrRoute.MrNPaths = buf.DecodeUint8()
- m.MrRoute.MrPaths = make([]FibPath, m.MrRoute.MrNPaths)
- for j1 := 0; j1 < len(m.MrRoute.MrPaths); j1++ {
- m.MrRoute.MrPaths[j1].SwIfIndex = buf.DecodeUint32()
- m.MrRoute.MrPaths[j1].TableID = buf.DecodeUint32()
- m.MrRoute.MrPaths[j1].RpfID = buf.DecodeUint32()
- m.MrRoute.MrPaths[j1].Weight = buf.DecodeUint8()
- m.MrRoute.MrPaths[j1].Preference = buf.DecodeUint8()
- m.MrRoute.MrPaths[j1].Type = FibPathType(buf.DecodeUint32())
- m.MrRoute.MrPaths[j1].Flags = FibPathFlags(buf.DecodeUint32())
- m.MrRoute.MrPaths[j1].Proto = FibPathNhProto(buf.DecodeUint32())
- copy(m.MrRoute.MrPaths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
- m.MrRoute.MrPaths[j1].Nh.ViaLabel = buf.DecodeUint32()
- m.MrRoute.MrPaths[j1].Nh.ObjID = buf.DecodeUint32()
- m.MrRoute.MrPaths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
- m.MrRoute.MrPaths[j1].NLabels = buf.DecodeUint8()
- for j2 := 0; j2 < 16; j2++ {
- m.MrRoute.MrPaths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
- m.MrRoute.MrPaths[j1].LabelStack[j2].Label = buf.DecodeUint32()
- m.MrRoute.MrPaths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
- m.MrRoute.MrPaths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
- }
- }
- return nil
-}
-
-// MplsRouteDump defines message 'mpls_route_dump'.
-type MplsRouteDump struct {
- Table MplsTable `binapi:"mpls_table,name=table" json:"table,omitempty"`
-}
-
-func (m *MplsRouteDump) Reset() { *m = MplsRouteDump{} }
-func (*MplsRouteDump) GetMessageName() string { return "mpls_route_dump" }
-func (*MplsRouteDump) GetCrcString() string { return "935fdefa" }
-func (*MplsRouteDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *MplsRouteDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Table.MtTableID
- size += 64 // m.Table.MtName
- return size
-}
-func (m *MplsRouteDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Table.MtTableID)
- buf.EncodeString(m.Table.MtName, 64)
- return buf.Bytes(), nil
-}
-func (m *MplsRouteDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Table.MtTableID = buf.DecodeUint32()
- m.Table.MtName = buf.DecodeString(64)
- return nil
-}
-
-// MplsTableAddDel defines message 'mpls_table_add_del'.
-type MplsTableAddDel struct {
- MtIsAdd bool `binapi:"bool,name=mt_is_add,default=true" json:"mt_is_add,omitempty"`
- MtTable MplsTable `binapi:"mpls_table,name=mt_table" json:"mt_table,omitempty"`
-}
-
-func (m *MplsTableAddDel) Reset() { *m = MplsTableAddDel{} }
-func (*MplsTableAddDel) GetMessageName() string { return "mpls_table_add_del" }
-func (*MplsTableAddDel) GetCrcString() string { return "57817512" }
-func (*MplsTableAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *MplsTableAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.MtIsAdd
- size += 4 // m.MtTable.MtTableID
- size += 64 // m.MtTable.MtName
- return size
-}
-func (m *MplsTableAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.MtIsAdd)
- buf.EncodeUint32(m.MtTable.MtTableID)
- buf.EncodeString(m.MtTable.MtName, 64)
- return buf.Bytes(), nil
-}
-func (m *MplsTableAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.MtIsAdd = buf.DecodeBool()
- m.MtTable.MtTableID = buf.DecodeUint32()
- m.MtTable.MtName = buf.DecodeString(64)
- return nil
-}
-
-// MplsTableAddDelReply defines message 'mpls_table_add_del_reply'.
-type MplsTableAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *MplsTableAddDelReply) Reset() { *m = MplsTableAddDelReply{} }
-func (*MplsTableAddDelReply) GetMessageName() string { return "mpls_table_add_del_reply" }
-func (*MplsTableAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*MplsTableAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MplsTableAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *MplsTableAddDelReply) 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 *MplsTableAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// MplsTableDetails defines message 'mpls_table_details'.
-type MplsTableDetails struct {
- MtTable MplsTable `binapi:"mpls_table,name=mt_table" json:"mt_table,omitempty"`
-}
-
-func (m *MplsTableDetails) Reset() { *m = MplsTableDetails{} }
-func (*MplsTableDetails) GetMessageName() string { return "mpls_table_details" }
-func (*MplsTableDetails) GetCrcString() string { return "f03ecdc8" }
-func (*MplsTableDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MplsTableDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.MtTable.MtTableID
- size += 64 // m.MtTable.MtName
- return size
-}
-func (m *MplsTableDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.MtTable.MtTableID)
- buf.EncodeString(m.MtTable.MtName, 64)
- return buf.Bytes(), nil
-}
-func (m *MplsTableDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.MtTable.MtTableID = buf.DecodeUint32()
- m.MtTable.MtName = buf.DecodeString(64)
- return nil
-}
-
-// MplsTableDump defines message 'mpls_table_dump'.
-type MplsTableDump struct{}
-
-func (m *MplsTableDump) Reset() { *m = MplsTableDump{} }
-func (*MplsTableDump) GetMessageName() string { return "mpls_table_dump" }
-func (*MplsTableDump) GetCrcString() string { return "51077d14" }
-func (*MplsTableDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *MplsTableDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *MplsTableDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *MplsTableDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// MplsTunnelAddDel defines message 'mpls_tunnel_add_del'.
-type MplsTunnelAddDel struct {
- MtIsAdd bool `binapi:"bool,name=mt_is_add,default=true" json:"mt_is_add,omitempty"`
- MtTunnel MplsTunnel `binapi:"mpls_tunnel,name=mt_tunnel" json:"mt_tunnel,omitempty"`
-}
-
-func (m *MplsTunnelAddDel) Reset() { *m = MplsTunnelAddDel{} }
-func (*MplsTunnelAddDel) GetMessageName() string { return "mpls_tunnel_add_del" }
-func (*MplsTunnelAddDel) GetCrcString() string { return "0de2478e" }
-func (*MplsTunnelAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *MplsTunnelAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.MtIsAdd
- size += 4 // m.MtTunnel.MtSwIfIndex
- size += 4 // m.MtTunnel.MtTunnelIndex
- size += 1 // m.MtTunnel.MtL2Only
- size += 1 // m.MtTunnel.MtIsMulticast
- size += 1 // m.MtTunnel.MtNPaths
- for j2 := 0; j2 < len(m.MtTunnel.MtPaths); j2++ {
- var s2 FibPath
- _ = s2
- if j2 < len(m.MtTunnel.MtPaths) {
- s2 = m.MtTunnel.MtPaths[j2]
- }
- size += 4 // s2.SwIfIndex
- size += 4 // s2.TableID
- size += 4 // s2.RpfID
- size += 1 // s2.Weight
- size += 1 // s2.Preference
- size += 4 // s2.Type
- size += 4 // s2.Flags
- size += 4 // s2.Proto
- size += 1 * 16 // s2.Nh.Address
- size += 4 // s2.Nh.ViaLabel
- size += 4 // s2.Nh.ObjID
- size += 4 // s2.Nh.ClassifyTableIndex
- size += 1 // s2.NLabels
- for j3 := 0; j3 < 16; j3++ {
- size += 1 // s2.LabelStack[j3].IsUniform
- size += 4 // s2.LabelStack[j3].Label
- size += 1 // s2.LabelStack[j3].TTL
- size += 1 // s2.LabelStack[j3].Exp
- }
- }
- return size
-}
-func (m *MplsTunnelAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.MtIsAdd)
- buf.EncodeUint32(uint32(m.MtTunnel.MtSwIfIndex))
- buf.EncodeUint32(m.MtTunnel.MtTunnelIndex)
- buf.EncodeBool(m.MtTunnel.MtL2Only)
- buf.EncodeBool(m.MtTunnel.MtIsMulticast)
- buf.EncodeUint8(uint8(len(m.MtTunnel.MtPaths)))
- for j1 := 0; j1 < len(m.MtTunnel.MtPaths); j1++ {
- var v1 FibPath // MtPaths
- if j1 < len(m.MtTunnel.MtPaths) {
- v1 = m.MtTunnel.MtPaths[j1]
- }
- buf.EncodeUint32(v1.SwIfIndex)
- buf.EncodeUint32(v1.TableID)
- buf.EncodeUint32(v1.RpfID)
- buf.EncodeUint8(v1.Weight)
- buf.EncodeUint8(v1.Preference)
- buf.EncodeUint32(uint32(v1.Type))
- buf.EncodeUint32(uint32(v1.Flags))
- buf.EncodeUint32(uint32(v1.Proto))
- buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
- buf.EncodeUint32(v1.Nh.ViaLabel)
- buf.EncodeUint32(v1.Nh.ObjID)
- buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
- buf.EncodeUint8(v1.NLabels)
- for j2 := 0; j2 < 16; j2++ {
- buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
- buf.EncodeUint32(v1.LabelStack[j2].Label)
- buf.EncodeUint8(v1.LabelStack[j2].TTL)
- buf.EncodeUint8(v1.LabelStack[j2].Exp)
- }
- }
- return buf.Bytes(), nil
-}
-func (m *MplsTunnelAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.MtIsAdd = buf.DecodeBool()
- m.MtTunnel.MtSwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.MtTunnel.MtTunnelIndex = buf.DecodeUint32()
- m.MtTunnel.MtL2Only = buf.DecodeBool()
- m.MtTunnel.MtIsMulticast = buf.DecodeBool()
- m.MtTunnel.MtNPaths = buf.DecodeUint8()
- m.MtTunnel.MtPaths = make([]FibPath, m.MtTunnel.MtNPaths)
- for j1 := 0; j1 < len(m.MtTunnel.MtPaths); j1++ {
- m.MtTunnel.MtPaths[j1].SwIfIndex = buf.DecodeUint32()
- m.MtTunnel.MtPaths[j1].TableID = buf.DecodeUint32()
- m.MtTunnel.MtPaths[j1].RpfID = buf.DecodeUint32()
- m.MtTunnel.MtPaths[j1].Weight = buf.DecodeUint8()
- m.MtTunnel.MtPaths[j1].Preference = buf.DecodeUint8()
- m.MtTunnel.MtPaths[j1].Type = FibPathType(buf.DecodeUint32())
- m.MtTunnel.MtPaths[j1].Flags = FibPathFlags(buf.DecodeUint32())
- m.MtTunnel.MtPaths[j1].Proto = FibPathNhProto(buf.DecodeUint32())
- copy(m.MtTunnel.MtPaths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
- m.MtTunnel.MtPaths[j1].Nh.ViaLabel = buf.DecodeUint32()
- m.MtTunnel.MtPaths[j1].Nh.ObjID = buf.DecodeUint32()
- m.MtTunnel.MtPaths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
- m.MtTunnel.MtPaths[j1].NLabels = buf.DecodeUint8()
- for j2 := 0; j2 < 16; j2++ {
- m.MtTunnel.MtPaths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
- m.MtTunnel.MtPaths[j1].LabelStack[j2].Label = buf.DecodeUint32()
- m.MtTunnel.MtPaths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
- m.MtTunnel.MtPaths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
- }
- }
- return nil
-}
-
-// MplsTunnelAddDelReply defines message 'mpls_tunnel_add_del_reply'.
-type MplsTunnelAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- TunnelIndex uint32 `binapi:"u32,name=tunnel_index" json:"tunnel_index,omitempty"`
-}
-
-func (m *MplsTunnelAddDelReply) Reset() { *m = MplsTunnelAddDelReply{} }
-func (*MplsTunnelAddDelReply) GetMessageName() string { return "mpls_tunnel_add_del_reply" }
-func (*MplsTunnelAddDelReply) GetCrcString() string { return "afb01472" }
-func (*MplsTunnelAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MplsTunnelAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.SwIfIndex
- size += 4 // m.TunnelIndex
- return size
-}
-func (m *MplsTunnelAddDelReply) 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))
- buf.EncodeUint32(m.TunnelIndex)
- return buf.Bytes(), nil
-}
-func (m *MplsTunnelAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.TunnelIndex = buf.DecodeUint32()
- return nil
-}
-
-// MplsTunnelDetails defines message 'mpls_tunnel_details'.
-type MplsTunnelDetails struct {
- MtTunnel MplsTunnel `binapi:"mpls_tunnel,name=mt_tunnel" json:"mt_tunnel,omitempty"`
-}
-
-func (m *MplsTunnelDetails) Reset() { *m = MplsTunnelDetails{} }
-func (*MplsTunnelDetails) GetMessageName() string { return "mpls_tunnel_details" }
-func (*MplsTunnelDetails) GetCrcString() string { return "bdc55cce" }
-func (*MplsTunnelDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MplsTunnelDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.MtTunnel.MtSwIfIndex
- size += 4 // m.MtTunnel.MtTunnelIndex
- size += 1 // m.MtTunnel.MtL2Only
- size += 1 // m.MtTunnel.MtIsMulticast
- size += 1 // m.MtTunnel.MtNPaths
- for j2 := 0; j2 < len(m.MtTunnel.MtPaths); j2++ {
- var s2 FibPath
- _ = s2
- if j2 < len(m.MtTunnel.MtPaths) {
- s2 = m.MtTunnel.MtPaths[j2]
- }
- size += 4 // s2.SwIfIndex
- size += 4 // s2.TableID
- size += 4 // s2.RpfID
- size += 1 // s2.Weight
- size += 1 // s2.Preference
- size += 4 // s2.Type
- size += 4 // s2.Flags
- size += 4 // s2.Proto
- size += 1 * 16 // s2.Nh.Address
- size += 4 // s2.Nh.ViaLabel
- size += 4 // s2.Nh.ObjID
- size += 4 // s2.Nh.ClassifyTableIndex
- size += 1 // s2.NLabels
- for j3 := 0; j3 < 16; j3++ {
- size += 1 // s2.LabelStack[j3].IsUniform
- size += 4 // s2.LabelStack[j3].Label
- size += 1 // s2.LabelStack[j3].TTL
- size += 1 // s2.LabelStack[j3].Exp
- }
- }
- return size
-}
-func (m *MplsTunnelDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.MtTunnel.MtSwIfIndex))
- buf.EncodeUint32(m.MtTunnel.MtTunnelIndex)
- buf.EncodeBool(m.MtTunnel.MtL2Only)
- buf.EncodeBool(m.MtTunnel.MtIsMulticast)
- buf.EncodeUint8(uint8(len(m.MtTunnel.MtPaths)))
- for j1 := 0; j1 < len(m.MtTunnel.MtPaths); j1++ {
- var v1 FibPath // MtPaths
- if j1 < len(m.MtTunnel.MtPaths) {
- v1 = m.MtTunnel.MtPaths[j1]
- }
- buf.EncodeUint32(v1.SwIfIndex)
- buf.EncodeUint32(v1.TableID)
- buf.EncodeUint32(v1.RpfID)
- buf.EncodeUint8(v1.Weight)
- buf.EncodeUint8(v1.Preference)
- buf.EncodeUint32(uint32(v1.Type))
- buf.EncodeUint32(uint32(v1.Flags))
- buf.EncodeUint32(uint32(v1.Proto))
- buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16)
- buf.EncodeUint32(v1.Nh.ViaLabel)
- buf.EncodeUint32(v1.Nh.ObjID)
- buf.EncodeUint32(v1.Nh.ClassifyTableIndex)
- buf.EncodeUint8(v1.NLabels)
- for j2 := 0; j2 < 16; j2++ {
- buf.EncodeUint8(v1.LabelStack[j2].IsUniform)
- buf.EncodeUint32(v1.LabelStack[j2].Label)
- buf.EncodeUint8(v1.LabelStack[j2].TTL)
- buf.EncodeUint8(v1.LabelStack[j2].Exp)
- }
- }
- return buf.Bytes(), nil
-}
-func (m *MplsTunnelDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.MtTunnel.MtSwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.MtTunnel.MtTunnelIndex = buf.DecodeUint32()
- m.MtTunnel.MtL2Only = buf.DecodeBool()
- m.MtTunnel.MtIsMulticast = buf.DecodeBool()
- m.MtTunnel.MtNPaths = buf.DecodeUint8()
- m.MtTunnel.MtPaths = make([]FibPath, m.MtTunnel.MtNPaths)
- for j1 := 0; j1 < len(m.MtTunnel.MtPaths); j1++ {
- m.MtTunnel.MtPaths[j1].SwIfIndex = buf.DecodeUint32()
- m.MtTunnel.MtPaths[j1].TableID = buf.DecodeUint32()
- m.MtTunnel.MtPaths[j1].RpfID = buf.DecodeUint32()
- m.MtTunnel.MtPaths[j1].Weight = buf.DecodeUint8()
- m.MtTunnel.MtPaths[j1].Preference = buf.DecodeUint8()
- m.MtTunnel.MtPaths[j1].Type = FibPathType(buf.DecodeUint32())
- m.MtTunnel.MtPaths[j1].Flags = FibPathFlags(buf.DecodeUint32())
- m.MtTunnel.MtPaths[j1].Proto = FibPathNhProto(buf.DecodeUint32())
- copy(m.MtTunnel.MtPaths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16))
- m.MtTunnel.MtPaths[j1].Nh.ViaLabel = buf.DecodeUint32()
- m.MtTunnel.MtPaths[j1].Nh.ObjID = buf.DecodeUint32()
- m.MtTunnel.MtPaths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32()
- m.MtTunnel.MtPaths[j1].NLabels = buf.DecodeUint8()
- for j2 := 0; j2 < 16; j2++ {
- m.MtTunnel.MtPaths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8()
- m.MtTunnel.MtPaths[j1].LabelStack[j2].Label = buf.DecodeUint32()
- m.MtTunnel.MtPaths[j1].LabelStack[j2].TTL = buf.DecodeUint8()
- m.MtTunnel.MtPaths[j1].LabelStack[j2].Exp = buf.DecodeUint8()
- }
- }
- return nil
-}
-
-// MplsTunnelDump defines message 'mpls_tunnel_dump'.
-type MplsTunnelDump struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *MplsTunnelDump) Reset() { *m = MplsTunnelDump{} }
-func (*MplsTunnelDump) GetMessageName() string { return "mpls_tunnel_dump" }
-func (*MplsTunnelDump) GetCrcString() string { return "f9e6675e" }
-func (*MplsTunnelDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *MplsTunnelDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *MplsTunnelDump) 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 *MplsTunnelDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// SwInterfaceSetMplsEnable defines message 'sw_interface_set_mpls_enable'.
-type SwInterfaceSetMplsEnable struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Enable bool `binapi:"bool,name=enable,default=true" json:"enable,omitempty"`
-}
-
-func (m *SwInterfaceSetMplsEnable) Reset() { *m = SwInterfaceSetMplsEnable{} }
-func (*SwInterfaceSetMplsEnable) GetMessageName() string { return "sw_interface_set_mpls_enable" }
-func (*SwInterfaceSetMplsEnable) GetCrcString() string { return "ae6cfcfb" }
-func (*SwInterfaceSetMplsEnable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceSetMplsEnable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.Enable
- return size
-}
-func (m *SwInterfaceSetMplsEnable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeBool(m.Enable)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceSetMplsEnable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Enable = buf.DecodeBool()
- return nil
-}
-
-// SwInterfaceSetMplsEnableReply defines message 'sw_interface_set_mpls_enable_reply'.
-type SwInterfaceSetMplsEnableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SwInterfaceSetMplsEnableReply) Reset() { *m = SwInterfaceSetMplsEnableReply{} }
-func (*SwInterfaceSetMplsEnableReply) GetMessageName() string {
- return "sw_interface_set_mpls_enable_reply"
-}
-func (*SwInterfaceSetMplsEnableReply) GetCrcString() string { return "e8d4e804" }
-func (*SwInterfaceSetMplsEnableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SwInterfaceSetMplsEnableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SwInterfaceSetMplsEnableReply) 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 *SwInterfaceSetMplsEnableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_mpls_binapi_init() }
-func file_mpls_binapi_init() {
- api.RegisterMessage((*MplsIPBindUnbind)(nil), "mpls_ip_bind_unbind_48249a27")
- api.RegisterMessage((*MplsIPBindUnbindReply)(nil), "mpls_ip_bind_unbind_reply_e8d4e804")
- api.RegisterMessage((*MplsRouteAddDel)(nil), "mpls_route_add_del_343cff54")
- api.RegisterMessage((*MplsRouteAddDelReply)(nil), "mpls_route_add_del_reply_1992deab")
- api.RegisterMessage((*MplsRouteDetails)(nil), "mpls_route_details_d0ac384c")
- api.RegisterMessage((*MplsRouteDump)(nil), "mpls_route_dump_935fdefa")
- api.RegisterMessage((*MplsTableAddDel)(nil), "mpls_table_add_del_57817512")
- api.RegisterMessage((*MplsTableAddDelReply)(nil), "mpls_table_add_del_reply_e8d4e804")
- api.RegisterMessage((*MplsTableDetails)(nil), "mpls_table_details_f03ecdc8")
- api.RegisterMessage((*MplsTableDump)(nil), "mpls_table_dump_51077d14")
- api.RegisterMessage((*MplsTunnelAddDel)(nil), "mpls_tunnel_add_del_0de2478e")
- api.RegisterMessage((*MplsTunnelAddDelReply)(nil), "mpls_tunnel_add_del_reply_afb01472")
- api.RegisterMessage((*MplsTunnelDetails)(nil), "mpls_tunnel_details_bdc55cce")
- api.RegisterMessage((*MplsTunnelDump)(nil), "mpls_tunnel_dump_f9e6675e")
- api.RegisterMessage((*SwInterfaceSetMplsEnable)(nil), "sw_interface_set_mpls_enable_ae6cfcfb")
- api.RegisterMessage((*SwInterfaceSetMplsEnableReply)(nil), "sw_interface_set_mpls_enable_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*MplsIPBindUnbind)(nil),
- (*MplsIPBindUnbindReply)(nil),
- (*MplsRouteAddDel)(nil),
- (*MplsRouteAddDelReply)(nil),
- (*MplsRouteDetails)(nil),
- (*MplsRouteDump)(nil),
- (*MplsTableAddDel)(nil),
- (*MplsTableAddDelReply)(nil),
- (*MplsTableDetails)(nil),
- (*MplsTableDump)(nil),
- (*MplsTunnelAddDel)(nil),
- (*MplsTunnelAddDelReply)(nil),
- (*MplsTunnelDetails)(nil),
- (*MplsTunnelDump)(nil),
- (*SwInterfaceSetMplsEnable)(nil),
- (*SwInterfaceSetMplsEnableReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/mpls/mpls_rpc.ba.go b/internal/testbinapi/binapi2001/mpls/mpls_rpc.ba.go
deleted file mode 100644
index 79cf550..0000000
--- a/internal/testbinapi/binapi2001/mpls/mpls_rpc.ba.go
+++ /dev/null
@@ -1,206 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package mpls
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service mpls.
-type RPCService interface {
- MplsIPBindUnbind(ctx context.Context, in *MplsIPBindUnbind) (*MplsIPBindUnbindReply, error)
- MplsRouteAddDel(ctx context.Context, in *MplsRouteAddDel) (*MplsRouteAddDelReply, error)
- MplsRouteDump(ctx context.Context, in *MplsRouteDump) (RPCService_MplsRouteDumpClient, error)
- MplsTableAddDel(ctx context.Context, in *MplsTableAddDel) (*MplsTableAddDelReply, error)
- MplsTableDump(ctx context.Context, in *MplsTableDump) (RPCService_MplsTableDumpClient, error)
- MplsTunnelAddDel(ctx context.Context, in *MplsTunnelAddDel) (*MplsTunnelAddDelReply, error)
- MplsTunnelDump(ctx context.Context, in *MplsTunnelDump) (RPCService_MplsTunnelDumpClient, error)
- SwInterfaceSetMplsEnable(ctx context.Context, in *SwInterfaceSetMplsEnable) (*SwInterfaceSetMplsEnableReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) MplsIPBindUnbind(ctx context.Context, in *MplsIPBindUnbind) (*MplsIPBindUnbindReply, error) {
- out := new(MplsIPBindUnbindReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) MplsRouteAddDel(ctx context.Context, in *MplsRouteAddDel) (*MplsRouteAddDelReply, error) {
- out := new(MplsRouteAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) MplsRouteDump(ctx context.Context, in *MplsRouteDump) (RPCService_MplsRouteDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_MplsRouteDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_MplsRouteDumpClient interface {
- Recv() (*MplsRouteDetails, error)
- api.Stream
-}
-
-type serviceClient_MplsRouteDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_MplsRouteDumpClient) Recv() (*MplsRouteDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *MplsRouteDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) MplsTableAddDel(ctx context.Context, in *MplsTableAddDel) (*MplsTableAddDelReply, error) {
- out := new(MplsTableAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) MplsTableDump(ctx context.Context, in *MplsTableDump) (RPCService_MplsTableDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_MplsTableDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_MplsTableDumpClient interface {
- Recv() (*MplsTableDetails, error)
- api.Stream
-}
-
-type serviceClient_MplsTableDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_MplsTableDumpClient) Recv() (*MplsTableDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *MplsTableDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) MplsTunnelAddDel(ctx context.Context, in *MplsTunnelAddDel) (*MplsTunnelAddDelReply, error) {
- out := new(MplsTunnelAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) MplsTunnelDump(ctx context.Context, in *MplsTunnelDump) (RPCService_MplsTunnelDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_MplsTunnelDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_MplsTunnelDumpClient interface {
- Recv() (*MplsTunnelDetails, error)
- api.Stream
-}
-
-type serviceClient_MplsTunnelDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_MplsTunnelDumpClient) Recv() (*MplsTunnelDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *MplsTunnelDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) SwInterfaceSetMplsEnable(ctx context.Context, in *SwInterfaceSetMplsEnable) (*SwInterfaceSetMplsEnableReply, error) {
- out := new(SwInterfaceSetMplsEnableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/nat/nat.ba.go b/internal/testbinapi/binapi2001/nat/nat.ba.go
deleted file mode 100644
index fd3bc20..0000000
--- a/internal/testbinapi/binapi2001/nat/nat.ba.go
+++ /dev/null
@@ -1,6409 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/plugins/nat.api.json
-
-// Package nat contains generated bindings for API file nat.api.
-//
-// Contents:
-// 6 aliases
-// 12 enums
-// 7 structs
-// 1 union
-// 131 messages
-//
-package nat
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "nat"
- APIVersion = "5.2.0"
- VersionCrc = 0xef1a1c94
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// NatConfigFlags defines enum 'nat_config_flags'.
-type NatConfigFlags uint8
-
-const (
- NAT_IS_NONE NatConfigFlags = 0
- NAT_IS_TWICE_NAT NatConfigFlags = 1
- NAT_IS_SELF_TWICE_NAT NatConfigFlags = 2
- NAT_IS_OUT2IN_ONLY NatConfigFlags = 4
- NAT_IS_ADDR_ONLY NatConfigFlags = 8
- NAT_IS_OUTSIDE NatConfigFlags = 16
- NAT_IS_INSIDE NatConfigFlags = 32
- NAT_IS_STATIC NatConfigFlags = 64
- NAT_IS_EXT_HOST_VALID NatConfigFlags = 128
-)
-
-var (
- NatConfigFlags_name = map[uint8]string{
- 0: "NAT_IS_NONE",
- 1: "NAT_IS_TWICE_NAT",
- 2: "NAT_IS_SELF_TWICE_NAT",
- 4: "NAT_IS_OUT2IN_ONLY",
- 8: "NAT_IS_ADDR_ONLY",
- 16: "NAT_IS_OUTSIDE",
- 32: "NAT_IS_INSIDE",
- 64: "NAT_IS_STATIC",
- 128: "NAT_IS_EXT_HOST_VALID",
- }
- NatConfigFlags_value = map[string]uint8{
- "NAT_IS_NONE": 0,
- "NAT_IS_TWICE_NAT": 1,
- "NAT_IS_SELF_TWICE_NAT": 2,
- "NAT_IS_OUT2IN_ONLY": 4,
- "NAT_IS_ADDR_ONLY": 8,
- "NAT_IS_OUTSIDE": 16,
- "NAT_IS_INSIDE": 32,
- "NAT_IS_STATIC": 64,
- "NAT_IS_EXT_HOST_VALID": 128,
- }
-)
-
-func (x NatConfigFlags) String() string {
- s, ok := NatConfigFlags_name[uint8(x)]
- if ok {
- return s
- }
- str := func(n uint8) string {
- s, ok := NatConfigFlags_name[uint8(n)]
- if ok {
- return s
- }
- return "NatConfigFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint8(0); i <= 8; i++ {
- val := uint8(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint8(x))
- }
- return s
-}
-
-// NatLogLevel defines enum 'nat_log_level'.
-type NatLogLevel uint8
-
-const (
- NAT_LOG_NONE NatLogLevel = 0
- NAT_LOG_ERROR NatLogLevel = 1
- NAT_LOG_WARNING NatLogLevel = 2
- NAT_LOG_NOTICE NatLogLevel = 3
- NAT_LOG_INFO NatLogLevel = 4
- NAT_LOG_DEBUG NatLogLevel = 5
-)
-
-var (
- NatLogLevel_name = map[uint8]string{
- 0: "NAT_LOG_NONE",
- 1: "NAT_LOG_ERROR",
- 2: "NAT_LOG_WARNING",
- 3: "NAT_LOG_NOTICE",
- 4: "NAT_LOG_INFO",
- 5: "NAT_LOG_DEBUG",
- }
- NatLogLevel_value = map[string]uint8{
- "NAT_LOG_NONE": 0,
- "NAT_LOG_ERROR": 1,
- "NAT_LOG_WARNING": 2,
- "NAT_LOG_NOTICE": 3,
- "NAT_LOG_INFO": 4,
- "NAT_LOG_DEBUG": 5,
- }
-)
-
-func (x NatLogLevel) String() string {
- s, ok := NatLogLevel_name[uint8(x)]
- if ok {
- return s
- }
- return "NatLogLevel(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Nat44LbAddrPort defines type 'nat44_lb_addr_port'.
-type Nat44LbAddrPort struct {
- Addr IP4Address `binapi:"ip4_address,name=addr" json:"addr,omitempty"`
- Port uint16 `binapi:"u16,name=port" json:"port,omitempty"`
- Probability uint8 `binapi:"u8,name=probability" json:"probability,omitempty"`
- VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
-
-// DsliteAddDelPoolAddrRange defines message 'dslite_add_del_pool_addr_range'.
-type DsliteAddDelPoolAddrRange struct {
- StartAddr IP4Address `binapi:"ip4_address,name=start_addr" json:"start_addr,omitempty"`
- EndAddr IP4Address `binapi:"ip4_address,name=end_addr" json:"end_addr,omitempty"`
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
-}
-
-func (m *DsliteAddDelPoolAddrRange) Reset() { *m = DsliteAddDelPoolAddrRange{} }
-func (*DsliteAddDelPoolAddrRange) GetMessageName() string { return "dslite_add_del_pool_addr_range" }
-func (*DsliteAddDelPoolAddrRange) GetCrcString() string { return "c448457a" }
-func (*DsliteAddDelPoolAddrRange) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *DsliteAddDelPoolAddrRange) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 4 // m.StartAddr
- size += 1 * 4 // m.EndAddr
- size += 1 // m.IsAdd
- return size
-}
-func (m *DsliteAddDelPoolAddrRange) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.StartAddr[:], 4)
- buf.EncodeBytes(m.EndAddr[:], 4)
- buf.EncodeBool(m.IsAdd)
- return buf.Bytes(), nil
-}
-func (m *DsliteAddDelPoolAddrRange) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- copy(m.StartAddr[:], buf.DecodeBytes(4))
- copy(m.EndAddr[:], buf.DecodeBytes(4))
- m.IsAdd = buf.DecodeBool()
- return nil
-}
-
-// DsliteAddDelPoolAddrRangeReply defines message 'dslite_add_del_pool_addr_range_reply'.
-type DsliteAddDelPoolAddrRangeReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *DsliteAddDelPoolAddrRangeReply) Reset() { *m = DsliteAddDelPoolAddrRangeReply{} }
-func (*DsliteAddDelPoolAddrRangeReply) GetMessageName() string {
- return "dslite_add_del_pool_addr_range_reply"
-}
-func (*DsliteAddDelPoolAddrRangeReply) GetCrcString() string { return "e8d4e804" }
-func (*DsliteAddDelPoolAddrRangeReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *DsliteAddDelPoolAddrRangeReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *DsliteAddDelPoolAddrRangeReply) 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 *DsliteAddDelPoolAddrRangeReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// DsliteAddressDetails defines message 'dslite_address_details'.
-type DsliteAddressDetails struct {
- IPAddress IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"`
-}
-
-func (m *DsliteAddressDetails) Reset() { *m = DsliteAddressDetails{} }
-func (*DsliteAddressDetails) GetMessageName() string { return "dslite_address_details" }
-func (*DsliteAddressDetails) GetCrcString() string { return "ec26d648" }
-func (*DsliteAddressDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *DsliteAddressDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 4 // m.IPAddress
- return size
-}
-func (m *DsliteAddressDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.IPAddress[:], 4)
- return buf.Bytes(), nil
-}
-func (m *DsliteAddressDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- copy(m.IPAddress[:], buf.DecodeBytes(4))
- return nil
-}
-
-// DsliteAddressDump defines message 'dslite_address_dump'.
-type DsliteAddressDump struct{}
-
-func (m *DsliteAddressDump) Reset() { *m = DsliteAddressDump{} }
-func (*DsliteAddressDump) GetMessageName() string { return "dslite_address_dump" }
-func (*DsliteAddressDump) GetCrcString() string { return "51077d14" }
-func (*DsliteAddressDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *DsliteAddressDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *DsliteAddressDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *DsliteAddressDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// DsliteGetAftrAddr defines message 'dslite_get_aftr_addr'.
-type DsliteGetAftrAddr struct{}
-
-func (m *DsliteGetAftrAddr) Reset() { *m = DsliteGetAftrAddr{} }
-func (*DsliteGetAftrAddr) GetMessageName() string { return "dslite_get_aftr_addr" }
-func (*DsliteGetAftrAddr) GetCrcString() string { return "51077d14" }
-func (*DsliteGetAftrAddr) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *DsliteGetAftrAddr) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *DsliteGetAftrAddr) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *DsliteGetAftrAddr) Unmarshal(b []byte) error {
- return nil
-}
-
-// DsliteGetAftrAddrReply defines message 'dslite_get_aftr_addr_reply'.
-type DsliteGetAftrAddrReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- IP4Addr IP4Address `binapi:"ip4_address,name=ip4_addr" json:"ip4_addr,omitempty"`
- IP6Addr IP6Address `binapi:"ip6_address,name=ip6_addr" json:"ip6_addr,omitempty"`
-}
-
-func (m *DsliteGetAftrAddrReply) Reset() { *m = DsliteGetAftrAddrReply{} }
-func (*DsliteGetAftrAddrReply) GetMessageName() string { return "dslite_get_aftr_addr_reply" }
-func (*DsliteGetAftrAddrReply) GetCrcString() string { return "38e30db1" }
-func (*DsliteGetAftrAddrReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *DsliteGetAftrAddrReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 1 * 4 // m.IP4Addr
- size += 1 * 16 // m.IP6Addr
- return size
-}
-func (m *DsliteGetAftrAddrReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeBytes(m.IP4Addr[:], 4)
- buf.EncodeBytes(m.IP6Addr[:], 16)
- return buf.Bytes(), nil
-}
-func (m *DsliteGetAftrAddrReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- copy(m.IP4Addr[:], buf.DecodeBytes(4))
- copy(m.IP6Addr[:], buf.DecodeBytes(16))
- return nil
-}
-
-// DsliteGetB4Addr defines message 'dslite_get_b4_addr'.
-type DsliteGetB4Addr struct{}
-
-func (m *DsliteGetB4Addr) Reset() { *m = DsliteGetB4Addr{} }
-func (*DsliteGetB4Addr) GetMessageName() string { return "dslite_get_b4_addr" }
-func (*DsliteGetB4Addr) GetCrcString() string { return "51077d14" }
-func (*DsliteGetB4Addr) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *DsliteGetB4Addr) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *DsliteGetB4Addr) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *DsliteGetB4Addr) Unmarshal(b []byte) error {
- return nil
-}
-
-// DsliteGetB4AddrReply defines message 'dslite_get_b4_addr_reply'.
-type DsliteGetB4AddrReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- IP4Addr IP4Address `binapi:"ip4_address,name=ip4_addr" json:"ip4_addr,omitempty"`
- IP6Addr IP6Address `binapi:"ip6_address,name=ip6_addr" json:"ip6_addr,omitempty"`
-}
-
-func (m *DsliteGetB4AddrReply) Reset() { *m = DsliteGetB4AddrReply{} }
-func (*DsliteGetB4AddrReply) GetMessageName() string { return "dslite_get_b4_addr_reply" }
-func (*DsliteGetB4AddrReply) GetCrcString() string { return "38e30db1" }
-func (*DsliteGetB4AddrReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *DsliteGetB4AddrReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 1 * 4 // m.IP4Addr
- size += 1 * 16 // m.IP6Addr
- return size
-}
-func (m *DsliteGetB4AddrReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeBytes(m.IP4Addr[:], 4)
- buf.EncodeBytes(m.IP6Addr[:], 16)
- return buf.Bytes(), nil
-}
-func (m *DsliteGetB4AddrReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- copy(m.IP4Addr[:], buf.DecodeBytes(4))
- copy(m.IP6Addr[:], buf.DecodeBytes(16))
- return nil
-}
-
-// DsliteSetAftrAddr defines message 'dslite_set_aftr_addr'.
-type DsliteSetAftrAddr struct {
- IP4Addr IP4Address `binapi:"ip4_address,name=ip4_addr" json:"ip4_addr,omitempty"`
- IP6Addr IP6Address `binapi:"ip6_address,name=ip6_addr" json:"ip6_addr,omitempty"`
-}
-
-func (m *DsliteSetAftrAddr) Reset() { *m = DsliteSetAftrAddr{} }
-func (*DsliteSetAftrAddr) GetMessageName() string { return "dslite_set_aftr_addr" }
-func (*DsliteSetAftrAddr) GetCrcString() string { return "1e955f8d" }
-func (*DsliteSetAftrAddr) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *DsliteSetAftrAddr) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 4 // m.IP4Addr
- size += 1 * 16 // m.IP6Addr
- return size
-}
-func (m *DsliteSetAftrAddr) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.IP4Addr[:], 4)
- buf.EncodeBytes(m.IP6Addr[:], 16)
- return buf.Bytes(), nil
-}
-func (m *DsliteSetAftrAddr) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- copy(m.IP4Addr[:], buf.DecodeBytes(4))
- copy(m.IP6Addr[:], buf.DecodeBytes(16))
- return nil
-}
-
-// DsliteSetAftrAddrReply defines message 'dslite_set_aftr_addr_reply'.
-type DsliteSetAftrAddrReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *DsliteSetAftrAddrReply) Reset() { *m = DsliteSetAftrAddrReply{} }
-func (*DsliteSetAftrAddrReply) GetMessageName() string { return "dslite_set_aftr_addr_reply" }
-func (*DsliteSetAftrAddrReply) GetCrcString() string { return "e8d4e804" }
-func (*DsliteSetAftrAddrReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *DsliteSetAftrAddrReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *DsliteSetAftrAddrReply) 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 *DsliteSetAftrAddrReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// DsliteSetB4Addr defines message 'dslite_set_b4_addr'.
-type DsliteSetB4Addr struct {
- IP4Addr IP4Address `binapi:"ip4_address,name=ip4_addr" json:"ip4_addr,omitempty"`
- IP6Addr IP6Address `binapi:"ip6_address,name=ip6_addr" json:"ip6_addr,omitempty"`
-}
-
-func (m *DsliteSetB4Addr) Reset() { *m = DsliteSetB4Addr{} }
-func (*DsliteSetB4Addr) GetMessageName() string { return "dslite_set_b4_addr" }
-func (*DsliteSetB4Addr) GetCrcString() string { return "1e955f8d" }
-func (*DsliteSetB4Addr) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *DsliteSetB4Addr) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 4 // m.IP4Addr
- size += 1 * 16 // m.IP6Addr
- return size
-}
-func (m *DsliteSetB4Addr) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.IP4Addr[:], 4)
- buf.EncodeBytes(m.IP6Addr[:], 16)
- return buf.Bytes(), nil
-}
-func (m *DsliteSetB4Addr) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- copy(m.IP4Addr[:], buf.DecodeBytes(4))
- copy(m.IP6Addr[:], buf.DecodeBytes(16))
- return nil
-}
-
-// DsliteSetB4AddrReply defines message 'dslite_set_b4_addr_reply'.
-type DsliteSetB4AddrReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *DsliteSetB4AddrReply) Reset() { *m = DsliteSetB4AddrReply{} }
-func (*DsliteSetB4AddrReply) GetMessageName() string { return "dslite_set_b4_addr_reply" }
-func (*DsliteSetB4AddrReply) GetCrcString() string { return "e8d4e804" }
-func (*DsliteSetB4AddrReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *DsliteSetB4AddrReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *DsliteSetB4AddrReply) 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 *DsliteSetB4AddrReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// Nat44AddDelAddressRange defines message 'nat44_add_del_address_range'.
-type Nat44AddDelAddressRange struct {
- FirstIPAddress IP4Address `binapi:"ip4_address,name=first_ip_address" json:"first_ip_address,omitempty"`
- LastIPAddress IP4Address `binapi:"ip4_address,name=last_ip_address" json:"last_ip_address,omitempty"`
- VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- Flags NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
-}
-
-func (m *Nat44AddDelAddressRange) Reset() { *m = Nat44AddDelAddressRange{} }
-func (*Nat44AddDelAddressRange) GetMessageName() string { return "nat44_add_del_address_range" }
-func (*Nat44AddDelAddressRange) GetCrcString() string { return "d4c7568c" }
-func (*Nat44AddDelAddressRange) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Nat44AddDelAddressRange) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 4 // m.FirstIPAddress
- size += 1 * 4 // m.LastIPAddress
- size += 4 // m.VrfID
- size += 1 // m.IsAdd
- size += 1 // m.Flags
- return size
-}
-func (m *Nat44AddDelAddressRange) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.FirstIPAddress[:], 4)
- buf.EncodeBytes(m.LastIPAddress[:], 4)
- buf.EncodeUint32(m.VrfID)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeUint8(uint8(m.Flags))
- return buf.Bytes(), nil
-}
-func (m *Nat44AddDelAddressRange) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- copy(m.FirstIPAddress[:], buf.DecodeBytes(4))
- copy(m.LastIPAddress[:], buf.DecodeBytes(4))
- m.VrfID = buf.DecodeUint32()
- m.IsAdd = buf.DecodeBool()
- m.Flags = NatConfigFlags(buf.DecodeUint8())
- return nil
-}
-
-// Nat44AddDelAddressRangeReply defines message 'nat44_add_del_address_range_reply'.
-type Nat44AddDelAddressRangeReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *Nat44AddDelAddressRangeReply) Reset() { *m = Nat44AddDelAddressRangeReply{} }
-func (*Nat44AddDelAddressRangeReply) GetMessageName() string {
- return "nat44_add_del_address_range_reply"
-}
-func (*Nat44AddDelAddressRangeReply) GetCrcString() string { return "e8d4e804" }
-func (*Nat44AddDelAddressRangeReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Nat44AddDelAddressRangeReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *Nat44AddDelAddressRangeReply) 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 *Nat44AddDelAddressRangeReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// Nat44AddDelIdentityMapping defines message 'nat44_add_del_identity_mapping'.
-type Nat44AddDelIdentityMapping struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- Flags NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
- IPAddress IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"`
- Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"`
- Port uint16 `binapi:"u16,name=port" json:"port,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
- Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"`
-}
-
-func (m *Nat44AddDelIdentityMapping) Reset() { *m = Nat44AddDelIdentityMapping{} }
-func (*Nat44AddDelIdentityMapping) GetMessageName() string { return "nat44_add_del_identity_mapping" }
-func (*Nat44AddDelIdentityMapping) GetCrcString() string { return "8e12743f" }
-func (*Nat44AddDelIdentityMapping) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Nat44AddDelIdentityMapping) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 1 // m.Flags
- size += 1 * 4 // m.IPAddress
- size += 1 // m.Protocol
- size += 2 // m.Port
- size += 4 // m.SwIfIndex
- size += 4 // m.VrfID
- size += 64 // m.Tag
- return size
-}
-func (m *Nat44AddDelIdentityMapping) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeUint8(uint8(m.Flags))
- buf.EncodeBytes(m.IPAddress[:], 4)
- buf.EncodeUint8(m.Protocol)
- buf.EncodeUint16(m.Port)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(m.VrfID)
- buf.EncodeString(m.Tag, 64)
- return buf.Bytes(), nil
-}
-func (m *Nat44AddDelIdentityMapping) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.Flags = NatConfigFlags(buf.DecodeUint8())
- copy(m.IPAddress[:], buf.DecodeBytes(4))
- m.Protocol = buf.DecodeUint8()
- m.Port = buf.DecodeUint16()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.VrfID = buf.DecodeUint32()
- m.Tag = buf.DecodeString(64)
- return nil
-}
-
-// Nat44AddDelIdentityMappingReply defines message 'nat44_add_del_identity_mapping_reply'.
-type Nat44AddDelIdentityMappingReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *Nat44AddDelIdentityMappingReply) Reset() { *m = Nat44AddDelIdentityMappingReply{} }
-func (*Nat44AddDelIdentityMappingReply) GetMessageName() string {
- return "nat44_add_del_identity_mapping_reply"
-}
-func (*Nat44AddDelIdentityMappingReply) GetCrcString() string { return "e8d4e804" }
-func (*Nat44AddDelIdentityMappingReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Nat44AddDelIdentityMappingReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *Nat44AddDelIdentityMappingReply) 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 *Nat44AddDelIdentityMappingReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// Nat44AddDelInterfaceAddr defines message 'nat44_add_del_interface_addr'.
-type Nat44AddDelInterfaceAddr struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Flags NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
-}
-
-func (m *Nat44AddDelInterfaceAddr) Reset() { *m = Nat44AddDelInterfaceAddr{} }
-func (*Nat44AddDelInterfaceAddr) GetMessageName() string { return "nat44_add_del_interface_addr" }
-func (*Nat44AddDelInterfaceAddr) GetCrcString() string { return "fc835325" }
-func (*Nat44AddDelInterfaceAddr) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Nat44AddDelInterfaceAddr) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 4 // m.SwIfIndex
- size += 1 // m.Flags
- return size
-}
-func (m *Nat44AddDelInterfaceAddr) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint8(uint8(m.Flags))
- return buf.Bytes(), nil
-}
-func (m *Nat44AddDelInterfaceAddr) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Flags = NatConfigFlags(buf.DecodeUint8())
- return nil
-}
-
-// Nat44AddDelInterfaceAddrReply defines message 'nat44_add_del_interface_addr_reply'.
-type Nat44AddDelInterfaceAddrReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *Nat44AddDelInterfaceAddrReply) Reset() { *m = Nat44AddDelInterfaceAddrReply{} }
-func (*Nat44AddDelInterfaceAddrReply) GetMessageName() string {
- return "nat44_add_del_interface_addr_reply"
-}
-func (*Nat44AddDelInterfaceAddrReply) GetCrcString() string { return "e8d4e804" }
-func (*Nat44AddDelInterfaceAddrReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Nat44AddDelInterfaceAddrReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *Nat44AddDelInterfaceAddrReply) 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 *Nat44AddDelInterfaceAddrReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// Nat44AddDelLbStaticMapping defines message 'nat44_add_del_lb_static_mapping'.
-type Nat44AddDelLbStaticMapping struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- Flags NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
- ExternalAddr IP4Address `binapi:"ip4_address,name=external_addr" json:"external_addr,omitempty"`
- ExternalPort uint16 `binapi:"u16,name=external_port" json:"external_port,omitempty"`
- Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"`
- Affinity uint32 `binapi:"u32,name=affinity" json:"affinity,omitempty"`
- Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"`
- LocalNum uint32 `binapi:"u32,name=local_num" json:"-"`
- Locals []Nat44LbAddrPort `binapi:"nat44_lb_addr_port[local_num],name=locals" json:"locals,omitempty"`
-}
-
-func (m *Nat44AddDelLbStaticMapping) Reset() { *m = Nat44AddDelLbStaticMapping{} }
-func (*Nat44AddDelLbStaticMapping) GetMessageName() string { return "nat44_add_del_lb_static_mapping" }
-func (*Nat44AddDelLbStaticMapping) GetCrcString() string { return "53b24611" }
-func (*Nat44AddDelLbStaticMapping) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Nat44AddDelLbStaticMapping) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 1 // m.Flags
- size += 1 * 4 // m.ExternalAddr
- size += 2 // m.ExternalPort
- size += 1 // m.Protocol
- size += 4 // m.Affinity
- size += 64 // m.Tag
- size += 4 // m.LocalNum
- for j1 := 0; j1 < len(m.Locals); j1++ {
- var s1 Nat44LbAddrPort
- _ = s1
- if j1 < len(m.Locals) {
- s1 = m.Locals[j1]
- }
- size += 1 * 4 // s1.Addr
- size += 2 // s1.Port
- size += 1 // s1.Probability
- size += 4 // s1.VrfID
- }
- return size
-}
-func (m *Nat44AddDelLbStaticMapping) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeUint8(uint8(m.Flags))
- buf.EncodeBytes(m.ExternalAddr[:], 4)
- buf.EncodeUint16(m.ExternalPort)
- buf.EncodeUint8(m.Protocol)
- buf.EncodeUint32(m.Affinity)
- buf.EncodeString(m.Tag, 64)
- buf.EncodeUint32(uint32(len(m.Locals)))
- for j0 := 0; j0 < len(m.Locals); j0++ {
- var v0 Nat44LbAddrPort // Locals
- if j0 < len(m.Locals) {
- v0 = m.Locals[j0]
- }
- buf.EncodeBytes(v0.Addr[:], 4)
- buf.EncodeUint16(v0.Port)
- buf.EncodeUint8(v0.Probability)
- buf.EncodeUint32(v0.VrfID)
- }
- return buf.Bytes(), nil
-}
-func (m *Nat44AddDelLbStaticMapping) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.Flags = NatConfigFlags(buf.DecodeUint8())
- copy(m.ExternalAddr[:], buf.DecodeBytes(4))
- m.ExternalPort = buf.DecodeUint16()
- m.Protocol = buf.DecodeUint8()
- m.Affinity = buf.DecodeUint32()
- m.Tag = buf.DecodeString(64)
- m.LocalNum = buf.DecodeUint32()
- m.Locals = make([]Nat44LbAddrPort, m.LocalNum)
- for j0 := 0; j0 < len(m.Locals); j0++ {
- copy(m.Locals[j0].Addr[:], buf.DecodeBytes(4))
- m.Locals[j0].Port = buf.DecodeUint16()
- m.Locals[j0].Probability = buf.DecodeUint8()
- m.Locals[j0].VrfID = buf.DecodeUint32()
- }
- return nil
-}
-
-// Nat44AddDelLbStaticMappingReply defines message 'nat44_add_del_lb_static_mapping_reply'.
-type Nat44AddDelLbStaticMappingReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *Nat44AddDelLbStaticMappingReply) Reset() { *m = Nat44AddDelLbStaticMappingReply{} }
-func (*Nat44AddDelLbStaticMappingReply) GetMessageName() string {
- return "nat44_add_del_lb_static_mapping_reply"
-}
-func (*Nat44AddDelLbStaticMappingReply) GetCrcString() string { return "e8d4e804" }
-func (*Nat44AddDelLbStaticMappingReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Nat44AddDelLbStaticMappingReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *Nat44AddDelLbStaticMappingReply) 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 *Nat44AddDelLbStaticMappingReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// Nat44AddDelStaticMapping defines message 'nat44_add_del_static_mapping'.
-type Nat44AddDelStaticMapping struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- Flags NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
- LocalIPAddress IP4Address `binapi:"ip4_address,name=local_ip_address" json:"local_ip_address,omitempty"`
- ExternalIPAddress IP4Address `binapi:"ip4_address,name=external_ip_address" json:"external_ip_address,omitempty"`
- Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"`
- LocalPort uint16 `binapi:"u16,name=local_port" json:"local_port,omitempty"`
- ExternalPort uint16 `binapi:"u16,name=external_port" json:"external_port,omitempty"`
- ExternalSwIfIndex InterfaceIndex `binapi:"interface_index,name=external_sw_if_index" json:"external_sw_if_index,omitempty"`
- VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
- Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"`
-}
-
-func (m *Nat44AddDelStaticMapping) Reset() { *m = Nat44AddDelStaticMapping{} }
-func (*Nat44AddDelStaticMapping) GetMessageName() string { return "nat44_add_del_static_mapping" }
-func (*Nat44AddDelStaticMapping) GetCrcString() string { return "e165e83b" }
-func (*Nat44AddDelStaticMapping) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Nat44AddDelStaticMapping) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 1 // m.Flags
- size += 1 * 4 // m.LocalIPAddress
- size += 1 * 4 // m.ExternalIPAddress
- size += 1 // m.Protocol
- size += 2 // m.LocalPort
- size += 2 // m.ExternalPort
- size += 4 // m.ExternalSwIfIndex
- size += 4 // m.VrfID
- size += 64 // m.Tag
- return size
-}
-func (m *Nat44AddDelStaticMapping) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeUint8(uint8(m.Flags))
- buf.EncodeBytes(m.LocalIPAddress[:], 4)
- buf.EncodeBytes(m.ExternalIPAddress[:], 4)
- buf.EncodeUint8(m.Protocol)
- buf.EncodeUint16(m.LocalPort)
- buf.EncodeUint16(m.ExternalPort)
- buf.EncodeUint32(uint32(m.ExternalSwIfIndex))
- buf.EncodeUint32(m.VrfID)
- buf.EncodeString(m.Tag, 64)
- return buf.Bytes(), nil
-}
-func (m *Nat44AddDelStaticMapping) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.Flags = NatConfigFlags(buf.DecodeUint8())
- copy(m.LocalIPAddress[:], buf.DecodeBytes(4))
- copy(m.ExternalIPAddress[:], buf.DecodeBytes(4))
- m.Protocol = buf.DecodeUint8()
- m.LocalPort = buf.DecodeUint16()
- m.ExternalPort = buf.DecodeUint16()
- m.ExternalSwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.VrfID = buf.DecodeUint32()
- m.Tag = buf.DecodeString(64)
- return nil
-}
-
-// Nat44AddDelStaticMappingReply defines message 'nat44_add_del_static_mapping_reply'.
-type Nat44AddDelStaticMappingReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *Nat44AddDelStaticMappingReply) Reset() { *m = Nat44AddDelStaticMappingReply{} }
-func (*Nat44AddDelStaticMappingReply) GetMessageName() string {
- return "nat44_add_del_static_mapping_reply"
-}
-func (*Nat44AddDelStaticMappingReply) GetCrcString() string { return "e8d4e804" }
-func (*Nat44AddDelStaticMappingReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Nat44AddDelStaticMappingReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *Nat44AddDelStaticMappingReply) 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 *Nat44AddDelStaticMappingReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// Nat44AddressDetails defines message 'nat44_address_details'.
-type Nat44AddressDetails struct {
- IPAddress IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"`
- Flags NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
- VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
-}
-
-func (m *Nat44AddressDetails) Reset() { *m = Nat44AddressDetails{} }
-func (*Nat44AddressDetails) GetMessageName() string { return "nat44_address_details" }
-func (*Nat44AddressDetails) GetCrcString() string { return "45410ac4" }
-func (*Nat44AddressDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Nat44AddressDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 4 // m.IPAddress
- size += 1 // m.Flags
- size += 4 // m.VrfID
- return size
-}
-func (m *Nat44AddressDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.IPAddress[:], 4)
- buf.EncodeUint8(uint8(m.Flags))
- buf.EncodeUint32(m.VrfID)
- return buf.Bytes(), nil
-}
-func (m *Nat44AddressDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- copy(m.IPAddress[:], buf.DecodeBytes(4))
- m.Flags = NatConfigFlags(buf.DecodeUint8())
- m.VrfID = buf.DecodeUint32()
- return nil
-}
-
-// Nat44AddressDump defines message 'nat44_address_dump'.
-type Nat44AddressDump struct{}
-
-func (m *Nat44AddressDump) Reset() { *m = Nat44AddressDump{} }
-func (*Nat44AddressDump) GetMessageName() string { return "nat44_address_dump" }
-func (*Nat44AddressDump) GetCrcString() string { return "51077d14" }
-func (*Nat44AddressDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Nat44AddressDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *Nat44AddressDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *Nat44AddressDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// Nat44DelSession defines message 'nat44_del_session'.
-type Nat44DelSession struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"`
- Port uint16 `binapi:"u16,name=port" json:"port,omitempty"`
- VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
- Flags NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
- ExtHostAddress IP4Address `binapi:"ip4_address,name=ext_host_address" json:"ext_host_address,omitempty"`
- ExtHostPort uint16 `binapi:"u16,name=ext_host_port" json:"ext_host_port,omitempty"`
-}
-
-func (m *Nat44DelSession) Reset() { *m = Nat44DelSession{} }
-func (*Nat44DelSession) GetMessageName() string { return "nat44_del_session" }
-func (*Nat44DelSession) GetCrcString() string { return "4c49c387" }
-func (*Nat44DelSession) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Nat44DelSession) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 4 // m.Address
- size += 1 // m.Protocol
- size += 2 // m.Port
- size += 4 // m.VrfID
- size += 1 // m.Flags
- size += 1 * 4 // m.ExtHostAddress
- size += 2 // m.ExtHostPort
- return size
-}
-func (m *Nat44DelSession) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.Address[:], 4)
- buf.EncodeUint8(m.Protocol)
- buf.EncodeUint16(m.Port)
- buf.EncodeUint32(m.VrfID)
- buf.EncodeUint8(uint8(m.Flags))
- buf.EncodeBytes(m.ExtHostAddress[:], 4)
- buf.EncodeUint16(m.ExtHostPort)
- return buf.Bytes(), nil
-}
-func (m *Nat44DelSession) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- copy(m.Address[:], buf.DecodeBytes(4))
- m.Protocol = buf.DecodeUint8()
- m.Port = buf.DecodeUint16()
- m.VrfID = buf.DecodeUint32()
- m.Flags = NatConfigFlags(buf.DecodeUint8())
- copy(m.ExtHostAddress[:], buf.DecodeBytes(4))
- m.ExtHostPort = buf.DecodeUint16()
- return nil
-}
-
-// Nat44DelSessionReply defines message 'nat44_del_session_reply'.
-type Nat44DelSessionReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *Nat44DelSessionReply) Reset() { *m = Nat44DelSessionReply{} }
-func (*Nat44DelSessionReply) GetMessageName() string { return "nat44_del_session_reply" }
-func (*Nat44DelSessionReply) GetCrcString() string { return "e8d4e804" }
-func (*Nat44DelSessionReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Nat44DelSessionReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *Nat44DelSessionReply) 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 *Nat44DelSessionReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// Nat44ForwardingEnableDisable defines message 'nat44_forwarding_enable_disable'.
-type Nat44ForwardingEnableDisable struct {
- Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
-}
-
-func (m *Nat44ForwardingEnableDisable) Reset() { *m = Nat44ForwardingEnableDisable{} }
-func (*Nat44ForwardingEnableDisable) GetMessageName() string {
- return "nat44_forwarding_enable_disable"
-}
-func (*Nat44ForwardingEnableDisable) GetCrcString() string { return "b3e225d2" }
-func (*Nat44ForwardingEnableDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Nat44ForwardingEnableDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.Enable
- return size
-}
-func (m *Nat44ForwardingEnableDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.Enable)
- return buf.Bytes(), nil
-}
-func (m *Nat44ForwardingEnableDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Enable = buf.DecodeBool()
- return nil
-}
-
-// Nat44ForwardingEnableDisableReply defines message 'nat44_forwarding_enable_disable_reply'.
-type Nat44ForwardingEnableDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *Nat44ForwardingEnableDisableReply) Reset() { *m = Nat44ForwardingEnableDisableReply{} }
-func (*Nat44ForwardingEnableDisableReply) GetMessageName() string {
- return "nat44_forwarding_enable_disable_reply"
-}
-func (*Nat44ForwardingEnableDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*Nat44ForwardingEnableDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Nat44ForwardingEnableDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *Nat44ForwardingEnableDisableReply) 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 *Nat44ForwardingEnableDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// Nat44ForwardingIsEnabled defines message 'nat44_forwarding_is_enabled'.
-type Nat44ForwardingIsEnabled struct{}
-
-func (m *Nat44ForwardingIsEnabled) Reset() { *m = Nat44ForwardingIsEnabled{} }
-func (*Nat44ForwardingIsEnabled) GetMessageName() string { return "nat44_forwarding_is_enabled" }
-func (*Nat44ForwardingIsEnabled) GetCrcString() string { return "51077d14" }
-func (*Nat44ForwardingIsEnabled) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Nat44ForwardingIsEnabled) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *Nat44ForwardingIsEnabled) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *Nat44ForwardingIsEnabled) Unmarshal(b []byte) error {
- return nil
-}
-
-// Nat44ForwardingIsEnabledReply defines message 'nat44_forwarding_is_enabled_reply'.
-type Nat44ForwardingIsEnabledReply struct {
- Enabled bool `binapi:"bool,name=enabled" json:"enabled,omitempty"`
-}
-
-func (m *Nat44ForwardingIsEnabledReply) Reset() { *m = Nat44ForwardingIsEnabledReply{} }
-func (*Nat44ForwardingIsEnabledReply) GetMessageName() string {
- return "nat44_forwarding_is_enabled_reply"
-}
-func (*Nat44ForwardingIsEnabledReply) GetCrcString() string { return "46924a06" }
-func (*Nat44ForwardingIsEnabledReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Nat44ForwardingIsEnabledReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.Enabled
- return size
-}
-func (m *Nat44ForwardingIsEnabledReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.Enabled)
- return buf.Bytes(), nil
-}
-func (m *Nat44ForwardingIsEnabledReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Enabled = buf.DecodeBool()
- return nil
-}
-
-// Nat44IdentityMappingDetails defines message 'nat44_identity_mapping_details'.
-type Nat44IdentityMappingDetails struct {
- Flags NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
- IPAddress IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"`
- Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"`
- Port uint16 `binapi:"u16,name=port" json:"port,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
- Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"`
-}
-
-func (m *Nat44IdentityMappingDetails) Reset() { *m = Nat44IdentityMappingDetails{} }
-func (*Nat44IdentityMappingDetails) GetMessageName() string { return "nat44_identity_mapping_details" }
-func (*Nat44IdentityMappingDetails) GetCrcString() string { return "36d21351" }
-func (*Nat44IdentityMappingDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Nat44IdentityMappingDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.Flags
- size += 1 * 4 // m.IPAddress
- size += 1 // m.Protocol
- size += 2 // m.Port
- size += 4 // m.SwIfIndex
- size += 4 // m.VrfID
- size += 64 // m.Tag
- return size
-}
-func (m *Nat44IdentityMappingDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(uint8(m.Flags))
- buf.EncodeBytes(m.IPAddress[:], 4)
- buf.EncodeUint8(m.Protocol)
- buf.EncodeUint16(m.Port)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(m.VrfID)
- buf.EncodeString(m.Tag, 64)
- return buf.Bytes(), nil
-}
-func (m *Nat44IdentityMappingDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Flags = NatConfigFlags(buf.DecodeUint8())
- copy(m.IPAddress[:], buf.DecodeBytes(4))
- m.Protocol = buf.DecodeUint8()
- m.Port = buf.DecodeUint16()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.VrfID = buf.DecodeUint32()
- m.Tag = buf.DecodeString(64)
- return nil
-}
-
-// Nat44IdentityMappingDump defines message 'nat44_identity_mapping_dump'.
-type Nat44IdentityMappingDump struct{}
-
-func (m *Nat44IdentityMappingDump) Reset() { *m = Nat44IdentityMappingDump{} }
-func (*Nat44IdentityMappingDump) GetMessageName() string { return "nat44_identity_mapping_dump" }
-func (*Nat44IdentityMappingDump) GetCrcString() string { return "51077d14" }
-func (*Nat44IdentityMappingDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Nat44IdentityMappingDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *Nat44IdentityMappingDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *Nat44IdentityMappingDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// Nat44InterfaceAddDelFeature defines message 'nat44_interface_add_del_feature'.
-type Nat44InterfaceAddDelFeature struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- Flags NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *Nat44InterfaceAddDelFeature) Reset() { *m = Nat44InterfaceAddDelFeature{} }
-func (*Nat44InterfaceAddDelFeature) GetMessageName() string { return "nat44_interface_add_del_feature" }
-func (*Nat44InterfaceAddDelFeature) GetCrcString() string { return "f3699b83" }
-func (*Nat44InterfaceAddDelFeature) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Nat44InterfaceAddDelFeature) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 1 // m.Flags
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *Nat44InterfaceAddDelFeature) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeUint8(uint8(m.Flags))
- buf.EncodeUint32(uint32(m.SwIfIndex))
- return buf.Bytes(), nil
-}
-func (m *Nat44InterfaceAddDelFeature) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.Flags = NatConfigFlags(buf.DecodeUint8())
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// Nat44InterfaceAddDelFeatureReply defines message 'nat44_interface_add_del_feature_reply'.
-type Nat44InterfaceAddDelFeatureReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *Nat44InterfaceAddDelFeatureReply) Reset() { *m = Nat44InterfaceAddDelFeatureReply{} }
-func (*Nat44InterfaceAddDelFeatureReply) GetMessageName() string {
- return "nat44_interface_add_del_feature_reply"
-}
-func (*Nat44InterfaceAddDelFeatureReply) GetCrcString() string { return "e8d4e804" }
-func (*Nat44InterfaceAddDelFeatureReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Nat44InterfaceAddDelFeatureReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *Nat44InterfaceAddDelFeatureReply) 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 *Nat44InterfaceAddDelFeatureReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// Nat44InterfaceAddDelOutputFeature defines message 'nat44_interface_add_del_output_feature'.
-type Nat44InterfaceAddDelOutputFeature struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- Flags NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *Nat44InterfaceAddDelOutputFeature) Reset() { *m = Nat44InterfaceAddDelOutputFeature{} }
-func (*Nat44InterfaceAddDelOutputFeature) GetMessageName() string {
- return "nat44_interface_add_del_output_feature"
-}
-func (*Nat44InterfaceAddDelOutputFeature) GetCrcString() string { return "f3699b83" }
-func (*Nat44InterfaceAddDelOutputFeature) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Nat44InterfaceAddDelOutputFeature) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 1 // m.Flags
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *Nat44InterfaceAddDelOutputFeature) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeUint8(uint8(m.Flags))
- buf.EncodeUint32(uint32(m.SwIfIndex))
- return buf.Bytes(), nil
-}
-func (m *Nat44InterfaceAddDelOutputFeature) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.Flags = NatConfigFlags(buf.DecodeUint8())
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// Nat44InterfaceAddDelOutputFeatureReply defines message 'nat44_interface_add_del_output_feature_reply'.
-type Nat44InterfaceAddDelOutputFeatureReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *Nat44InterfaceAddDelOutputFeatureReply) Reset() {
- *m = Nat44InterfaceAddDelOutputFeatureReply{}
-}
-func (*Nat44InterfaceAddDelOutputFeatureReply) GetMessageName() string {
- return "nat44_interface_add_del_output_feature_reply"
-}
-func (*Nat44InterfaceAddDelOutputFeatureReply) GetCrcString() string { return "e8d4e804" }
-func (*Nat44InterfaceAddDelOutputFeatureReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Nat44InterfaceAddDelOutputFeatureReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *Nat44InterfaceAddDelOutputFeatureReply) 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 *Nat44InterfaceAddDelOutputFeatureReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// Nat44InterfaceAddrDetails defines message 'nat44_interface_addr_details'.
-type Nat44InterfaceAddrDetails struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Flags NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
-}
-
-func (m *Nat44InterfaceAddrDetails) Reset() { *m = Nat44InterfaceAddrDetails{} }
-func (*Nat44InterfaceAddrDetails) GetMessageName() string { return "nat44_interface_addr_details" }
-func (*Nat44InterfaceAddrDetails) GetCrcString() string { return "3e687514" }
-func (*Nat44InterfaceAddrDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Nat44InterfaceAddrDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.Flags
- return size
-}
-func (m *Nat44InterfaceAddrDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint8(uint8(m.Flags))
- return buf.Bytes(), nil
-}
-func (m *Nat44InterfaceAddrDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Flags = NatConfigFlags(buf.DecodeUint8())
- return nil
-}
-
-// Nat44InterfaceAddrDump defines message 'nat44_interface_addr_dump'.
-type Nat44InterfaceAddrDump struct{}
-
-func (m *Nat44InterfaceAddrDump) Reset() { *m = Nat44InterfaceAddrDump{} }
-func (*Nat44InterfaceAddrDump) GetMessageName() string { return "nat44_interface_addr_dump" }
-func (*Nat44InterfaceAddrDump) GetCrcString() string { return "51077d14" }
-func (*Nat44InterfaceAddrDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Nat44InterfaceAddrDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *Nat44InterfaceAddrDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *Nat44InterfaceAddrDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// Nat44InterfaceDetails defines message 'nat44_interface_details'.
-type Nat44InterfaceDetails struct {
- Flags NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *Nat44InterfaceDetails) Reset() { *m = Nat44InterfaceDetails{} }
-func (*Nat44InterfaceDetails) GetMessageName() string { return "nat44_interface_details" }
-func (*Nat44InterfaceDetails) GetCrcString() string { return "5d286289" }
-func (*Nat44InterfaceDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Nat44InterfaceDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.Flags
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *Nat44InterfaceDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(uint8(m.Flags))
- buf.EncodeUint32(uint32(m.SwIfIndex))
- return buf.Bytes(), nil
-}
-func (m *Nat44InterfaceDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Flags = NatConfigFlags(buf.DecodeUint8())
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// Nat44InterfaceDump defines message 'nat44_interface_dump'.
-type Nat44InterfaceDump struct{}
-
-func (m *Nat44InterfaceDump) Reset() { *m = Nat44InterfaceDump{} }
-func (*Nat44InterfaceDump) GetMessageName() string { return "nat44_interface_dump" }
-func (*Nat44InterfaceDump) GetCrcString() string { return "51077d14" }
-func (*Nat44InterfaceDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Nat44InterfaceDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *Nat44InterfaceDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *Nat44InterfaceDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// Nat44InterfaceOutputFeatureDetails defines message 'nat44_interface_output_feature_details'.
-type Nat44InterfaceOutputFeatureDetails struct {
- Flags NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *Nat44InterfaceOutputFeatureDetails) Reset() { *m = Nat44InterfaceOutputFeatureDetails{} }
-func (*Nat44InterfaceOutputFeatureDetails) GetMessageName() string {
- return "nat44_interface_output_feature_details"
-}
-func (*Nat44InterfaceOutputFeatureDetails) GetCrcString() string { return "5d286289" }
-func (*Nat44InterfaceOutputFeatureDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Nat44InterfaceOutputFeatureDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.Flags
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *Nat44InterfaceOutputFeatureDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(uint8(m.Flags))
- buf.EncodeUint32(uint32(m.SwIfIndex))
- return buf.Bytes(), nil
-}
-func (m *Nat44InterfaceOutputFeatureDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Flags = NatConfigFlags(buf.DecodeUint8())
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// Nat44InterfaceOutputFeatureDump defines message 'nat44_interface_output_feature_dump'.
-type Nat44InterfaceOutputFeatureDump struct{}
-
-func (m *Nat44InterfaceOutputFeatureDump) Reset() { *m = Nat44InterfaceOutputFeatureDump{} }
-func (*Nat44InterfaceOutputFeatureDump) GetMessageName() string {
- return "nat44_interface_output_feature_dump"
-}
-func (*Nat44InterfaceOutputFeatureDump) GetCrcString() string { return "51077d14" }
-func (*Nat44InterfaceOutputFeatureDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Nat44InterfaceOutputFeatureDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *Nat44InterfaceOutputFeatureDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *Nat44InterfaceOutputFeatureDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// Nat44LbStaticMappingAddDelLocal defines message 'nat44_lb_static_mapping_add_del_local'.
-type Nat44LbStaticMappingAddDelLocal struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- ExternalAddr IP4Address `binapi:"ip4_address,name=external_addr" json:"external_addr,omitempty"`
- ExternalPort uint16 `binapi:"u16,name=external_port" json:"external_port,omitempty"`
- Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"`
- Local Nat44LbAddrPort `binapi:"nat44_lb_addr_port,name=local" json:"local,omitempty"`
-}
-
-func (m *Nat44LbStaticMappingAddDelLocal) Reset() { *m = Nat44LbStaticMappingAddDelLocal{} }
-func (*Nat44LbStaticMappingAddDelLocal) GetMessageName() string {
- return "nat44_lb_static_mapping_add_del_local"
-}
-func (*Nat44LbStaticMappingAddDelLocal) GetCrcString() string { return "2910a151" }
-func (*Nat44LbStaticMappingAddDelLocal) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Nat44LbStaticMappingAddDelLocal) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 1 * 4 // m.ExternalAddr
- size += 2 // m.ExternalPort
- size += 1 // m.Protocol
- size += 1 * 4 // m.Local.Addr
- size += 2 // m.Local.Port
- size += 1 // m.Local.Probability
- size += 4 // m.Local.VrfID
- return size
-}
-func (m *Nat44LbStaticMappingAddDelLocal) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeBytes(m.ExternalAddr[:], 4)
- buf.EncodeUint16(m.ExternalPort)
- buf.EncodeUint8(m.Protocol)
- buf.EncodeBytes(m.Local.Addr[:], 4)
- buf.EncodeUint16(m.Local.Port)
- buf.EncodeUint8(m.Local.Probability)
- buf.EncodeUint32(m.Local.VrfID)
- return buf.Bytes(), nil
-}
-func (m *Nat44LbStaticMappingAddDelLocal) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- copy(m.ExternalAddr[:], buf.DecodeBytes(4))
- m.ExternalPort = buf.DecodeUint16()
- m.Protocol = buf.DecodeUint8()
- copy(m.Local.Addr[:], buf.DecodeBytes(4))
- m.Local.Port = buf.DecodeUint16()
- m.Local.Probability = buf.DecodeUint8()
- m.Local.VrfID = buf.DecodeUint32()
- return nil
-}
-
-// Nat44LbStaticMappingAddDelLocalReply defines message 'nat44_lb_static_mapping_add_del_local_reply'.
-type Nat44LbStaticMappingAddDelLocalReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *Nat44LbStaticMappingAddDelLocalReply) Reset() { *m = Nat44LbStaticMappingAddDelLocalReply{} }
-func (*Nat44LbStaticMappingAddDelLocalReply) GetMessageName() string {
- return "nat44_lb_static_mapping_add_del_local_reply"
-}
-func (*Nat44LbStaticMappingAddDelLocalReply) GetCrcString() string { return "e8d4e804" }
-func (*Nat44LbStaticMappingAddDelLocalReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Nat44LbStaticMappingAddDelLocalReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *Nat44LbStaticMappingAddDelLocalReply) 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 *Nat44LbStaticMappingAddDelLocalReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// Nat44LbStaticMappingDetails defines message 'nat44_lb_static_mapping_details'.
-type Nat44LbStaticMappingDetails struct {
- ExternalAddr IP4Address `binapi:"ip4_address,name=external_addr" json:"external_addr,omitempty"`
- ExternalPort uint16 `binapi:"u16,name=external_port" json:"external_port,omitempty"`
- Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"`
- Flags NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
- Affinity uint32 `binapi:"u32,name=affinity" json:"affinity,omitempty"`
- Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"`
- LocalNum uint32 `binapi:"u32,name=local_num" json:"-"`
- Locals []Nat44LbAddrPort `binapi:"nat44_lb_addr_port[local_num],name=locals" json:"locals,omitempty"`
-}
-
-func (m *Nat44LbStaticMappingDetails) Reset() { *m = Nat44LbStaticMappingDetails{} }
-func (*Nat44LbStaticMappingDetails) GetMessageName() string { return "nat44_lb_static_mapping_details" }
-func (*Nat44LbStaticMappingDetails) GetCrcString() string { return "2267b9e8" }
-func (*Nat44LbStaticMappingDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Nat44LbStaticMappingDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 4 // m.ExternalAddr
- size += 2 // m.ExternalPort
- size += 1 // m.Protocol
- size += 1 // m.Flags
- size += 4 // m.Affinity
- size += 64 // m.Tag
- size += 4 // m.LocalNum
- for j1 := 0; j1 < len(m.Locals); j1++ {
- var s1 Nat44LbAddrPort
- _ = s1
- if j1 < len(m.Locals) {
- s1 = m.Locals[j1]
- }
- size += 1 * 4 // s1.Addr
- size += 2 // s1.Port
- size += 1 // s1.Probability
- size += 4 // s1.VrfID
- }
- return size
-}
-func (m *Nat44LbStaticMappingDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.ExternalAddr[:], 4)
- buf.EncodeUint16(m.ExternalPort)
- buf.EncodeUint8(m.Protocol)
- buf.EncodeUint8(uint8(m.Flags))
- buf.EncodeUint32(m.Affinity)
- buf.EncodeString(m.Tag, 64)
- buf.EncodeUint32(uint32(len(m.Locals)))
- for j0 := 0; j0 < len(m.Locals); j0++ {
- var v0 Nat44LbAddrPort // Locals
- if j0 < len(m.Locals) {
- v0 = m.Locals[j0]
- }
- buf.EncodeBytes(v0.Addr[:], 4)
- buf.EncodeUint16(v0.Port)
- buf.EncodeUint8(v0.Probability)
- buf.EncodeUint32(v0.VrfID)
- }
- return buf.Bytes(), nil
-}
-func (m *Nat44LbStaticMappingDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- copy(m.ExternalAddr[:], buf.DecodeBytes(4))
- m.ExternalPort = buf.DecodeUint16()
- m.Protocol = buf.DecodeUint8()
- m.Flags = NatConfigFlags(buf.DecodeUint8())
- m.Affinity = buf.DecodeUint32()
- m.Tag = buf.DecodeString(64)
- m.LocalNum = buf.DecodeUint32()
- m.Locals = make([]Nat44LbAddrPort, m.LocalNum)
- for j0 := 0; j0 < len(m.Locals); j0++ {
- copy(m.Locals[j0].Addr[:], buf.DecodeBytes(4))
- m.Locals[j0].Port = buf.DecodeUint16()
- m.Locals[j0].Probability = buf.DecodeUint8()
- m.Locals[j0].VrfID = buf.DecodeUint32()
- }
- return nil
-}
-
-// Nat44LbStaticMappingDump defines message 'nat44_lb_static_mapping_dump'.
-type Nat44LbStaticMappingDump struct{}
-
-func (m *Nat44LbStaticMappingDump) Reset() { *m = Nat44LbStaticMappingDump{} }
-func (*Nat44LbStaticMappingDump) GetMessageName() string { return "nat44_lb_static_mapping_dump" }
-func (*Nat44LbStaticMappingDump) GetCrcString() string { return "51077d14" }
-func (*Nat44LbStaticMappingDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Nat44LbStaticMappingDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *Nat44LbStaticMappingDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *Nat44LbStaticMappingDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// Nat44StaticMappingDetails defines message 'nat44_static_mapping_details'.
-type Nat44StaticMappingDetails struct {
- Flags NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
- LocalIPAddress IP4Address `binapi:"ip4_address,name=local_ip_address" json:"local_ip_address,omitempty"`
- ExternalIPAddress IP4Address `binapi:"ip4_address,name=external_ip_address" json:"external_ip_address,omitempty"`
- Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"`
- LocalPort uint16 `binapi:"u16,name=local_port" json:"local_port,omitempty"`
- ExternalPort uint16 `binapi:"u16,name=external_port" json:"external_port,omitempty"`
- ExternalSwIfIndex InterfaceIndex `binapi:"interface_index,name=external_sw_if_index" json:"external_sw_if_index,omitempty"`
- VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
- Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"`
-}
-
-func (m *Nat44StaticMappingDetails) Reset() { *m = Nat44StaticMappingDetails{} }
-func (*Nat44StaticMappingDetails) GetMessageName() string { return "nat44_static_mapping_details" }
-func (*Nat44StaticMappingDetails) GetCrcString() string { return "1a433ef7" }
-func (*Nat44StaticMappingDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Nat44StaticMappingDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.Flags
- size += 1 * 4 // m.LocalIPAddress
- size += 1 * 4 // m.ExternalIPAddress
- size += 1 // m.Protocol
- size += 2 // m.LocalPort
- size += 2 // m.ExternalPort
- size += 4 // m.ExternalSwIfIndex
- size += 4 // m.VrfID
- size += 64 // m.Tag
- return size
-}
-func (m *Nat44StaticMappingDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(uint8(m.Flags))
- buf.EncodeBytes(m.LocalIPAddress[:], 4)
- buf.EncodeBytes(m.ExternalIPAddress[:], 4)
- buf.EncodeUint8(m.Protocol)
- buf.EncodeUint16(m.LocalPort)
- buf.EncodeUint16(m.ExternalPort)
- buf.EncodeUint32(uint32(m.ExternalSwIfIndex))
- buf.EncodeUint32(m.VrfID)
- buf.EncodeString(m.Tag, 64)
- return buf.Bytes(), nil
-}
-func (m *Nat44StaticMappingDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Flags = NatConfigFlags(buf.DecodeUint8())
- copy(m.LocalIPAddress[:], buf.DecodeBytes(4))
- copy(m.ExternalIPAddress[:], buf.DecodeBytes(4))
- m.Protocol = buf.DecodeUint8()
- m.LocalPort = buf.DecodeUint16()
- m.ExternalPort = buf.DecodeUint16()
- m.ExternalSwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.VrfID = buf.DecodeUint32()
- m.Tag = buf.DecodeString(64)
- return nil
-}
-
-// Nat44StaticMappingDump defines message 'nat44_static_mapping_dump'.
-type Nat44StaticMappingDump struct{}
-
-func (m *Nat44StaticMappingDump) Reset() { *m = Nat44StaticMappingDump{} }
-func (*Nat44StaticMappingDump) GetMessageName() string { return "nat44_static_mapping_dump" }
-func (*Nat44StaticMappingDump) GetCrcString() string { return "51077d14" }
-func (*Nat44StaticMappingDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Nat44StaticMappingDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *Nat44StaticMappingDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *Nat44StaticMappingDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// Nat44UserDetails defines message 'nat44_user_details'.
-type Nat44UserDetails struct {
- VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
- IPAddress IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"`
- Nsessions uint32 `binapi:"u32,name=nsessions" json:"nsessions,omitempty"`
- Nstaticsessions uint32 `binapi:"u32,name=nstaticsessions" json:"nstaticsessions,omitempty"`
-}
-
-func (m *Nat44UserDetails) Reset() { *m = Nat44UserDetails{} }
-func (*Nat44UserDetails) GetMessageName() string { return "nat44_user_details" }
-func (*Nat44UserDetails) GetCrcString() string { return "355896c2" }
-func (*Nat44UserDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Nat44UserDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.VrfID
- size += 1 * 4 // m.IPAddress
- size += 4 // m.Nsessions
- size += 4 // m.Nstaticsessions
- return size
-}
-func (m *Nat44UserDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.VrfID)
- buf.EncodeBytes(m.IPAddress[:], 4)
- buf.EncodeUint32(m.Nsessions)
- buf.EncodeUint32(m.Nstaticsessions)
- return buf.Bytes(), nil
-}
-func (m *Nat44UserDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.VrfID = buf.DecodeUint32()
- copy(m.IPAddress[:], buf.DecodeBytes(4))
- m.Nsessions = buf.DecodeUint32()
- m.Nstaticsessions = buf.DecodeUint32()
- return nil
-}
-
-// Nat44UserDump defines message 'nat44_user_dump'.
-type Nat44UserDump struct{}
-
-func (m *Nat44UserDump) Reset() { *m = Nat44UserDump{} }
-func (*Nat44UserDump) GetMessageName() string { return "nat44_user_dump" }
-func (*Nat44UserDump) GetCrcString() string { return "51077d14" }
-func (*Nat44UserDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Nat44UserDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *Nat44UserDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *Nat44UserDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// Nat44UserSessionDetails defines message 'nat44_user_session_details'.
-type Nat44UserSessionDetails struct {
- OutsideIPAddress IP4Address `binapi:"ip4_address,name=outside_ip_address" json:"outside_ip_address,omitempty"`
- OutsidePort uint16 `binapi:"u16,name=outside_port" json:"outside_port,omitempty"`
- InsideIPAddress IP4Address `binapi:"ip4_address,name=inside_ip_address" json:"inside_ip_address,omitempty"`
- InsidePort uint16 `binapi:"u16,name=inside_port" json:"inside_port,omitempty"`
- Protocol uint16 `binapi:"u16,name=protocol" json:"protocol,omitempty"`
- Flags NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
- LastHeard uint64 `binapi:"u64,name=last_heard" json:"last_heard,omitempty"`
- TotalBytes uint64 `binapi:"u64,name=total_bytes" json:"total_bytes,omitempty"`
- TotalPkts uint32 `binapi:"u32,name=total_pkts" json:"total_pkts,omitempty"`
- ExtHostAddress IP4Address `binapi:"ip4_address,name=ext_host_address" json:"ext_host_address,omitempty"`
- ExtHostPort uint16 `binapi:"u16,name=ext_host_port" json:"ext_host_port,omitempty"`
- ExtHostNatAddress IP4Address `binapi:"ip4_address,name=ext_host_nat_address" json:"ext_host_nat_address,omitempty"`
- ExtHostNatPort uint16 `binapi:"u16,name=ext_host_nat_port" json:"ext_host_nat_port,omitempty"`
-}
-
-func (m *Nat44UserSessionDetails) Reset() { *m = Nat44UserSessionDetails{} }
-func (*Nat44UserSessionDetails) GetMessageName() string { return "nat44_user_session_details" }
-func (*Nat44UserSessionDetails) GetCrcString() string { return "1965fd69" }
-func (*Nat44UserSessionDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Nat44UserSessionDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 4 // m.OutsideIPAddress
- size += 2 // m.OutsidePort
- size += 1 * 4 // m.InsideIPAddress
- size += 2 // m.InsidePort
- size += 2 // m.Protocol
- size += 1 // m.Flags
- size += 8 // m.LastHeard
- size += 8 // m.TotalBytes
- size += 4 // m.TotalPkts
- size += 1 * 4 // m.ExtHostAddress
- size += 2 // m.ExtHostPort
- size += 1 * 4 // m.ExtHostNatAddress
- size += 2 // m.ExtHostNatPort
- return size
-}
-func (m *Nat44UserSessionDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.OutsideIPAddress[:], 4)
- buf.EncodeUint16(m.OutsidePort)
- buf.EncodeBytes(m.InsideIPAddress[:], 4)
- buf.EncodeUint16(m.InsidePort)
- buf.EncodeUint16(m.Protocol)
- buf.EncodeUint8(uint8(m.Flags))
- buf.EncodeUint64(m.LastHeard)
- buf.EncodeUint64(m.TotalBytes)
- buf.EncodeUint32(m.TotalPkts)
- buf.EncodeBytes(m.ExtHostAddress[:], 4)
- buf.EncodeUint16(m.ExtHostPort)
- buf.EncodeBytes(m.ExtHostNatAddress[:], 4)
- buf.EncodeUint16(m.ExtHostNatPort)
- return buf.Bytes(), nil
-}
-func (m *Nat44UserSessionDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- copy(m.OutsideIPAddress[:], buf.DecodeBytes(4))
- m.OutsidePort = buf.DecodeUint16()
- copy(m.InsideIPAddress[:], buf.DecodeBytes(4))
- m.InsidePort = buf.DecodeUint16()
- m.Protocol = buf.DecodeUint16()
- m.Flags = NatConfigFlags(buf.DecodeUint8())
- m.LastHeard = buf.DecodeUint64()
- m.TotalBytes = buf.DecodeUint64()
- m.TotalPkts = buf.DecodeUint32()
- copy(m.ExtHostAddress[:], buf.DecodeBytes(4))
- m.ExtHostPort = buf.DecodeUint16()
- copy(m.ExtHostNatAddress[:], buf.DecodeBytes(4))
- m.ExtHostNatPort = buf.DecodeUint16()
- return nil
-}
-
-// Nat44UserSessionDump defines message 'nat44_user_session_dump'.
-type Nat44UserSessionDump struct {
- IPAddress IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"`
- VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
-}
-
-func (m *Nat44UserSessionDump) Reset() { *m = Nat44UserSessionDump{} }
-func (*Nat44UserSessionDump) GetMessageName() string { return "nat44_user_session_dump" }
-func (*Nat44UserSessionDump) GetCrcString() string { return "e1899c98" }
-func (*Nat44UserSessionDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Nat44UserSessionDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 4 // m.IPAddress
- size += 4 // m.VrfID
- return size
-}
-func (m *Nat44UserSessionDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.IPAddress[:], 4)
- buf.EncodeUint32(m.VrfID)
- return buf.Bytes(), nil
-}
-func (m *Nat44UserSessionDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- copy(m.IPAddress[:], buf.DecodeBytes(4))
- m.VrfID = buf.DecodeUint32()
- return nil
-}
-
-// Nat64AddDelInterface defines message 'nat64_add_del_interface'.
-type Nat64AddDelInterface struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- Flags NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *Nat64AddDelInterface) Reset() { *m = Nat64AddDelInterface{} }
-func (*Nat64AddDelInterface) GetMessageName() string { return "nat64_add_del_interface" }
-func (*Nat64AddDelInterface) GetCrcString() string { return "f3699b83" }
-func (*Nat64AddDelInterface) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Nat64AddDelInterface) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 1 // m.Flags
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *Nat64AddDelInterface) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeUint8(uint8(m.Flags))
- buf.EncodeUint32(uint32(m.SwIfIndex))
- return buf.Bytes(), nil
-}
-func (m *Nat64AddDelInterface) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.Flags = NatConfigFlags(buf.DecodeUint8())
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// Nat64AddDelInterfaceAddr defines message 'nat64_add_del_interface_addr'.
-type Nat64AddDelInterfaceAddr struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *Nat64AddDelInterfaceAddr) Reset() { *m = Nat64AddDelInterfaceAddr{} }
-func (*Nat64AddDelInterfaceAddr) GetMessageName() string { return "nat64_add_del_interface_addr" }
-func (*Nat64AddDelInterfaceAddr) GetCrcString() string { return "47d6e753" }
-func (*Nat64AddDelInterfaceAddr) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Nat64AddDelInterfaceAddr) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *Nat64AddDelInterfaceAddr) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- return buf.Bytes(), nil
-}
-func (m *Nat64AddDelInterfaceAddr) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// Nat64AddDelInterfaceAddrReply defines message 'nat64_add_del_interface_addr_reply'.
-type Nat64AddDelInterfaceAddrReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *Nat64AddDelInterfaceAddrReply) Reset() { *m = Nat64AddDelInterfaceAddrReply{} }
-func (*Nat64AddDelInterfaceAddrReply) GetMessageName() string {
- return "nat64_add_del_interface_addr_reply"
-}
-func (*Nat64AddDelInterfaceAddrReply) GetCrcString() string { return "e8d4e804" }
-func (*Nat64AddDelInterfaceAddrReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Nat64AddDelInterfaceAddrReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *Nat64AddDelInterfaceAddrReply) 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 *Nat64AddDelInterfaceAddrReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// Nat64AddDelInterfaceReply defines message 'nat64_add_del_interface_reply'.
-type Nat64AddDelInterfaceReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *Nat64AddDelInterfaceReply) Reset() { *m = Nat64AddDelInterfaceReply{} }
-func (*Nat64AddDelInterfaceReply) GetMessageName() string { return "nat64_add_del_interface_reply" }
-func (*Nat64AddDelInterfaceReply) GetCrcString() string { return "e8d4e804" }
-func (*Nat64AddDelInterfaceReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Nat64AddDelInterfaceReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *Nat64AddDelInterfaceReply) 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 *Nat64AddDelInterfaceReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// Nat64AddDelPoolAddrRange defines message 'nat64_add_del_pool_addr_range'.
-type Nat64AddDelPoolAddrRange struct {
- StartAddr IP4Address `binapi:"ip4_address,name=start_addr" json:"start_addr,omitempty"`
- EndAddr IP4Address `binapi:"ip4_address,name=end_addr" json:"end_addr,omitempty"`
- VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
-}
-
-func (m *Nat64AddDelPoolAddrRange) Reset() { *m = Nat64AddDelPoolAddrRange{} }
-func (*Nat64AddDelPoolAddrRange) GetMessageName() string { return "nat64_add_del_pool_addr_range" }
-func (*Nat64AddDelPoolAddrRange) GetCrcString() string { return "21234ef3" }
-func (*Nat64AddDelPoolAddrRange) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Nat64AddDelPoolAddrRange) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 4 // m.StartAddr
- size += 1 * 4 // m.EndAddr
- size += 4 // m.VrfID
- size += 1 // m.IsAdd
- return size
-}
-func (m *Nat64AddDelPoolAddrRange) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.StartAddr[:], 4)
- buf.EncodeBytes(m.EndAddr[:], 4)
- buf.EncodeUint32(m.VrfID)
- buf.EncodeBool(m.IsAdd)
- return buf.Bytes(), nil
-}
-func (m *Nat64AddDelPoolAddrRange) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- copy(m.StartAddr[:], buf.DecodeBytes(4))
- copy(m.EndAddr[:], buf.DecodeBytes(4))
- m.VrfID = buf.DecodeUint32()
- m.IsAdd = buf.DecodeBool()
- return nil
-}
-
-// Nat64AddDelPoolAddrRangeReply defines message 'nat64_add_del_pool_addr_range_reply'.
-type Nat64AddDelPoolAddrRangeReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *Nat64AddDelPoolAddrRangeReply) Reset() { *m = Nat64AddDelPoolAddrRangeReply{} }
-func (*Nat64AddDelPoolAddrRangeReply) GetMessageName() string {
- return "nat64_add_del_pool_addr_range_reply"
-}
-func (*Nat64AddDelPoolAddrRangeReply) GetCrcString() string { return "e8d4e804" }
-func (*Nat64AddDelPoolAddrRangeReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Nat64AddDelPoolAddrRangeReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *Nat64AddDelPoolAddrRangeReply) 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 *Nat64AddDelPoolAddrRangeReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// Nat64AddDelPrefix defines message 'nat64_add_del_prefix'.
-type Nat64AddDelPrefix struct {
- Prefix IP6Prefix `binapi:"ip6_prefix,name=prefix" json:"prefix,omitempty"`
- VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
-}
-
-func (m *Nat64AddDelPrefix) Reset() { *m = Nat64AddDelPrefix{} }
-func (*Nat64AddDelPrefix) GetMessageName() string { return "nat64_add_del_prefix" }
-func (*Nat64AddDelPrefix) GetCrcString() string { return "727b2f4c" }
-func (*Nat64AddDelPrefix) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Nat64AddDelPrefix) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 16 // m.Prefix.Address
- size += 1 // m.Prefix.Len
- size += 4 // m.VrfID
- size += 1 // m.IsAdd
- return size
-}
-func (m *Nat64AddDelPrefix) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.Prefix.Address[:], 16)
- buf.EncodeUint8(m.Prefix.Len)
- buf.EncodeUint32(m.VrfID)
- buf.EncodeBool(m.IsAdd)
- return buf.Bytes(), nil
-}
-func (m *Nat64AddDelPrefix) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- copy(m.Prefix.Address[:], buf.DecodeBytes(16))
- m.Prefix.Len = buf.DecodeUint8()
- m.VrfID = buf.DecodeUint32()
- m.IsAdd = buf.DecodeBool()
- return nil
-}
-
-// Nat64AddDelPrefixReply defines message 'nat64_add_del_prefix_reply'.
-type Nat64AddDelPrefixReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *Nat64AddDelPrefixReply) Reset() { *m = Nat64AddDelPrefixReply{} }
-func (*Nat64AddDelPrefixReply) GetMessageName() string { return "nat64_add_del_prefix_reply" }
-func (*Nat64AddDelPrefixReply) GetCrcString() string { return "e8d4e804" }
-func (*Nat64AddDelPrefixReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Nat64AddDelPrefixReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *Nat64AddDelPrefixReply) 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 *Nat64AddDelPrefixReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// Nat64AddDelStaticBib defines message 'nat64_add_del_static_bib'.
-type Nat64AddDelStaticBib struct {
- IAddr IP6Address `binapi:"ip6_address,name=i_addr" json:"i_addr,omitempty"`
- OAddr IP4Address `binapi:"ip4_address,name=o_addr" json:"o_addr,omitempty"`
- IPort uint16 `binapi:"u16,name=i_port" json:"i_port,omitempty"`
- OPort uint16 `binapi:"u16,name=o_port" json:"o_port,omitempty"`
- VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
- Proto uint8 `binapi:"u8,name=proto" json:"proto,omitempty"`
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
-}
-
-func (m *Nat64AddDelStaticBib) Reset() { *m = Nat64AddDelStaticBib{} }
-func (*Nat64AddDelStaticBib) GetMessageName() string { return "nat64_add_del_static_bib" }
-func (*Nat64AddDelStaticBib) GetCrcString() string { return "90fae58a" }
-func (*Nat64AddDelStaticBib) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Nat64AddDelStaticBib) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 16 // m.IAddr
- size += 1 * 4 // m.OAddr
- size += 2 // m.IPort
- size += 2 // m.OPort
- size += 4 // m.VrfID
- size += 1 // m.Proto
- size += 1 // m.IsAdd
- return size
-}
-func (m *Nat64AddDelStaticBib) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.IAddr[:], 16)
- buf.EncodeBytes(m.OAddr[:], 4)
- buf.EncodeUint16(m.IPort)
- buf.EncodeUint16(m.OPort)
- buf.EncodeUint32(m.VrfID)
- buf.EncodeUint8(m.Proto)
- buf.EncodeBool(m.IsAdd)
- return buf.Bytes(), nil
-}
-func (m *Nat64AddDelStaticBib) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- copy(m.IAddr[:], buf.DecodeBytes(16))
- copy(m.OAddr[:], buf.DecodeBytes(4))
- m.IPort = buf.DecodeUint16()
- m.OPort = buf.DecodeUint16()
- m.VrfID = buf.DecodeUint32()
- m.Proto = buf.DecodeUint8()
- m.IsAdd = buf.DecodeBool()
- return nil
-}
-
-// Nat64AddDelStaticBibReply defines message 'nat64_add_del_static_bib_reply'.
-type Nat64AddDelStaticBibReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *Nat64AddDelStaticBibReply) Reset() { *m = Nat64AddDelStaticBibReply{} }
-func (*Nat64AddDelStaticBibReply) GetMessageName() string { return "nat64_add_del_static_bib_reply" }
-func (*Nat64AddDelStaticBibReply) GetCrcString() string { return "e8d4e804" }
-func (*Nat64AddDelStaticBibReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Nat64AddDelStaticBibReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *Nat64AddDelStaticBibReply) 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 *Nat64AddDelStaticBibReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// Nat64BibDetails defines message 'nat64_bib_details'.
-type Nat64BibDetails struct {
- IAddr IP6Address `binapi:"ip6_address,name=i_addr" json:"i_addr,omitempty"`
- OAddr IP4Address `binapi:"ip4_address,name=o_addr" json:"o_addr,omitempty"`
- IPort uint16 `binapi:"u16,name=i_port" json:"i_port,omitempty"`
- OPort uint16 `binapi:"u16,name=o_port" json:"o_port,omitempty"`
- VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
- Proto uint8 `binapi:"u8,name=proto" json:"proto,omitempty"`
- Flags NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
- SesNum uint32 `binapi:"u32,name=ses_num" json:"ses_num,omitempty"`
-}
-
-func (m *Nat64BibDetails) Reset() { *m = Nat64BibDetails{} }
-func (*Nat64BibDetails) GetMessageName() string { return "nat64_bib_details" }
-func (*Nat64BibDetails) GetCrcString() string { return "62c8541d" }
-func (*Nat64BibDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Nat64BibDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 16 // m.IAddr
- size += 1 * 4 // m.OAddr
- size += 2 // m.IPort
- size += 2 // m.OPort
- size += 4 // m.VrfID
- size += 1 // m.Proto
- size += 1 // m.Flags
- size += 4 // m.SesNum
- return size
-}
-func (m *Nat64BibDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.IAddr[:], 16)
- buf.EncodeBytes(m.OAddr[:], 4)
- buf.EncodeUint16(m.IPort)
- buf.EncodeUint16(m.OPort)
- buf.EncodeUint32(m.VrfID)
- buf.EncodeUint8(m.Proto)
- buf.EncodeUint8(uint8(m.Flags))
- buf.EncodeUint32(m.SesNum)
- return buf.Bytes(), nil
-}
-func (m *Nat64BibDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- copy(m.IAddr[:], buf.DecodeBytes(16))
- copy(m.OAddr[:], buf.DecodeBytes(4))
- m.IPort = buf.DecodeUint16()
- m.OPort = buf.DecodeUint16()
- m.VrfID = buf.DecodeUint32()
- m.Proto = buf.DecodeUint8()
- m.Flags = NatConfigFlags(buf.DecodeUint8())
- m.SesNum = buf.DecodeUint32()
- return nil
-}
-
-// Nat64BibDump defines message 'nat64_bib_dump'.
-type Nat64BibDump struct {
- Proto uint8 `binapi:"u8,name=proto" json:"proto,omitempty"`
-}
-
-func (m *Nat64BibDump) Reset() { *m = Nat64BibDump{} }
-func (*Nat64BibDump) GetMessageName() string { return "nat64_bib_dump" }
-func (*Nat64BibDump) GetCrcString() string { return "cfcb6b75" }
-func (*Nat64BibDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Nat64BibDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.Proto
- return size
-}
-func (m *Nat64BibDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.Proto)
- return buf.Bytes(), nil
-}
-func (m *Nat64BibDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Proto = buf.DecodeUint8()
- return nil
-}
-
-// Nat64InterfaceDetails defines message 'nat64_interface_details'.
-type Nat64InterfaceDetails struct {
- Flags NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *Nat64InterfaceDetails) Reset() { *m = Nat64InterfaceDetails{} }
-func (*Nat64InterfaceDetails) GetMessageName() string { return "nat64_interface_details" }
-func (*Nat64InterfaceDetails) GetCrcString() string { return "5d286289" }
-func (*Nat64InterfaceDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Nat64InterfaceDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.Flags
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *Nat64InterfaceDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(uint8(m.Flags))
- buf.EncodeUint32(uint32(m.SwIfIndex))
- return buf.Bytes(), nil
-}
-func (m *Nat64InterfaceDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Flags = NatConfigFlags(buf.DecodeUint8())
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// Nat64InterfaceDump defines message 'nat64_interface_dump'.
-type Nat64InterfaceDump struct{}
-
-func (m *Nat64InterfaceDump) Reset() { *m = Nat64InterfaceDump{} }
-func (*Nat64InterfaceDump) GetMessageName() string { return "nat64_interface_dump" }
-func (*Nat64InterfaceDump) GetCrcString() string { return "51077d14" }
-func (*Nat64InterfaceDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Nat64InterfaceDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *Nat64InterfaceDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *Nat64InterfaceDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// Nat64PoolAddrDetails defines message 'nat64_pool_addr_details'.
-type Nat64PoolAddrDetails struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
-}
-
-func (m *Nat64PoolAddrDetails) Reset() { *m = Nat64PoolAddrDetails{} }
-func (*Nat64PoolAddrDetails) GetMessageName() string { return "nat64_pool_addr_details" }
-func (*Nat64PoolAddrDetails) GetCrcString() string { return "9bb99cdb" }
-func (*Nat64PoolAddrDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Nat64PoolAddrDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 4 // m.Address
- size += 4 // m.VrfID
- return size
-}
-func (m *Nat64PoolAddrDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.Address[:], 4)
- buf.EncodeUint32(m.VrfID)
- return buf.Bytes(), nil
-}
-func (m *Nat64PoolAddrDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- copy(m.Address[:], buf.DecodeBytes(4))
- m.VrfID = buf.DecodeUint32()
- return nil
-}
-
-// Nat64PoolAddrDump defines message 'nat64_pool_addr_dump'.
-type Nat64PoolAddrDump struct{}
-
-func (m *Nat64PoolAddrDump) Reset() { *m = Nat64PoolAddrDump{} }
-func (*Nat64PoolAddrDump) GetMessageName() string { return "nat64_pool_addr_dump" }
-func (*Nat64PoolAddrDump) GetCrcString() string { return "51077d14" }
-func (*Nat64PoolAddrDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Nat64PoolAddrDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *Nat64PoolAddrDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *Nat64PoolAddrDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// Nat64PrefixDetails defines message 'nat64_prefix_details'.
-type Nat64PrefixDetails struct {
- Prefix IP6Prefix `binapi:"ip6_prefix,name=prefix" json:"prefix,omitempty"`
- VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
-}
-
-func (m *Nat64PrefixDetails) Reset() { *m = Nat64PrefixDetails{} }
-func (*Nat64PrefixDetails) GetMessageName() string { return "nat64_prefix_details" }
-func (*Nat64PrefixDetails) GetCrcString() string { return "20568de3" }
-func (*Nat64PrefixDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Nat64PrefixDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 16 // m.Prefix.Address
- size += 1 // m.Prefix.Len
- size += 4 // m.VrfID
- return size
-}
-func (m *Nat64PrefixDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.Prefix.Address[:], 16)
- buf.EncodeUint8(m.Prefix.Len)
- buf.EncodeUint32(m.VrfID)
- return buf.Bytes(), nil
-}
-func (m *Nat64PrefixDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- copy(m.Prefix.Address[:], buf.DecodeBytes(16))
- m.Prefix.Len = buf.DecodeUint8()
- m.VrfID = buf.DecodeUint32()
- return nil
-}
-
-// Nat64PrefixDump defines message 'nat64_prefix_dump'.
-type Nat64PrefixDump struct{}
-
-func (m *Nat64PrefixDump) Reset() { *m = Nat64PrefixDump{} }
-func (*Nat64PrefixDump) GetMessageName() string { return "nat64_prefix_dump" }
-func (*Nat64PrefixDump) GetCrcString() string { return "51077d14" }
-func (*Nat64PrefixDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Nat64PrefixDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *Nat64PrefixDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *Nat64PrefixDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// Nat64StDetails defines message 'nat64_st_details'.
-type Nat64StDetails struct {
- IlAddr IP6Address `binapi:"ip6_address,name=il_addr" json:"il_addr,omitempty"`
- OlAddr IP4Address `binapi:"ip4_address,name=ol_addr" json:"ol_addr,omitempty"`
- IlPort uint16 `binapi:"u16,name=il_port" json:"il_port,omitempty"`
- OlPort uint16 `binapi:"u16,name=ol_port" json:"ol_port,omitempty"`
- IrAddr IP6Address `binapi:"ip6_address,name=ir_addr" json:"ir_addr,omitempty"`
- OrAddr IP4Address `binapi:"ip4_address,name=or_addr" json:"or_addr,omitempty"`
- RPort uint16 `binapi:"u16,name=r_port" json:"r_port,omitempty"`
- VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
- Proto uint8 `binapi:"u8,name=proto" json:"proto,omitempty"`
-}
-
-func (m *Nat64StDetails) Reset() { *m = Nat64StDetails{} }
-func (*Nat64StDetails) GetMessageName() string { return "nat64_st_details" }
-func (*Nat64StDetails) GetCrcString() string { return "c770d620" }
-func (*Nat64StDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Nat64StDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 16 // m.IlAddr
- size += 1 * 4 // m.OlAddr
- size += 2 // m.IlPort
- size += 2 // m.OlPort
- size += 1 * 16 // m.IrAddr
- size += 1 * 4 // m.OrAddr
- size += 2 // m.RPort
- size += 4 // m.VrfID
- size += 1 // m.Proto
- return size
-}
-func (m *Nat64StDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.IlAddr[:], 16)
- buf.EncodeBytes(m.OlAddr[:], 4)
- buf.EncodeUint16(m.IlPort)
- buf.EncodeUint16(m.OlPort)
- buf.EncodeBytes(m.IrAddr[:], 16)
- buf.EncodeBytes(m.OrAddr[:], 4)
- buf.EncodeUint16(m.RPort)
- buf.EncodeUint32(m.VrfID)
- buf.EncodeUint8(m.Proto)
- return buf.Bytes(), nil
-}
-func (m *Nat64StDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- copy(m.IlAddr[:], buf.DecodeBytes(16))
- copy(m.OlAddr[:], buf.DecodeBytes(4))
- m.IlPort = buf.DecodeUint16()
- m.OlPort = buf.DecodeUint16()
- copy(m.IrAddr[:], buf.DecodeBytes(16))
- copy(m.OrAddr[:], buf.DecodeBytes(4))
- m.RPort = buf.DecodeUint16()
- m.VrfID = buf.DecodeUint32()
- m.Proto = buf.DecodeUint8()
- return nil
-}
-
-// Nat64StDump defines message 'nat64_st_dump'.
-type Nat64StDump struct {
- Proto uint8 `binapi:"u8,name=proto" json:"proto,omitempty"`
-}
-
-func (m *Nat64StDump) Reset() { *m = Nat64StDump{} }
-func (*Nat64StDump) GetMessageName() string { return "nat64_st_dump" }
-func (*Nat64StDump) GetCrcString() string { return "cfcb6b75" }
-func (*Nat64StDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Nat64StDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.Proto
- return size
-}
-func (m *Nat64StDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.Proto)
- return buf.Bytes(), nil
-}
-func (m *Nat64StDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Proto = buf.DecodeUint8()
- return nil
-}
-
-// Nat66AddDelInterface defines message 'nat66_add_del_interface'.
-type Nat66AddDelInterface struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- Flags NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *Nat66AddDelInterface) Reset() { *m = Nat66AddDelInterface{} }
-func (*Nat66AddDelInterface) GetMessageName() string { return "nat66_add_del_interface" }
-func (*Nat66AddDelInterface) GetCrcString() string { return "f3699b83" }
-func (*Nat66AddDelInterface) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Nat66AddDelInterface) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 1 // m.Flags
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *Nat66AddDelInterface) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeUint8(uint8(m.Flags))
- buf.EncodeUint32(uint32(m.SwIfIndex))
- return buf.Bytes(), nil
-}
-func (m *Nat66AddDelInterface) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.Flags = NatConfigFlags(buf.DecodeUint8())
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// Nat66AddDelInterfaceReply defines message 'nat66_add_del_interface_reply'.
-type Nat66AddDelInterfaceReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *Nat66AddDelInterfaceReply) Reset() { *m = Nat66AddDelInterfaceReply{} }
-func (*Nat66AddDelInterfaceReply) GetMessageName() string { return "nat66_add_del_interface_reply" }
-func (*Nat66AddDelInterfaceReply) GetCrcString() string { return "e8d4e804" }
-func (*Nat66AddDelInterfaceReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Nat66AddDelInterfaceReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *Nat66AddDelInterfaceReply) 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 *Nat66AddDelInterfaceReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// Nat66AddDelStaticMapping defines message 'nat66_add_del_static_mapping'.
-type Nat66AddDelStaticMapping struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- LocalIPAddress IP6Address `binapi:"ip6_address,name=local_ip_address" json:"local_ip_address,omitempty"`
- ExternalIPAddress IP6Address `binapi:"ip6_address,name=external_ip_address" json:"external_ip_address,omitempty"`
- VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
-}
-
-func (m *Nat66AddDelStaticMapping) Reset() { *m = Nat66AddDelStaticMapping{} }
-func (*Nat66AddDelStaticMapping) GetMessageName() string { return "nat66_add_del_static_mapping" }
-func (*Nat66AddDelStaticMapping) GetCrcString() string { return "fb64e50b" }
-func (*Nat66AddDelStaticMapping) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Nat66AddDelStaticMapping) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 1 * 16 // m.LocalIPAddress
- size += 1 * 16 // m.ExternalIPAddress
- size += 4 // m.VrfID
- return size
-}
-func (m *Nat66AddDelStaticMapping) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeBytes(m.LocalIPAddress[:], 16)
- buf.EncodeBytes(m.ExternalIPAddress[:], 16)
- buf.EncodeUint32(m.VrfID)
- return buf.Bytes(), nil
-}
-func (m *Nat66AddDelStaticMapping) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- copy(m.LocalIPAddress[:], buf.DecodeBytes(16))
- copy(m.ExternalIPAddress[:], buf.DecodeBytes(16))
- m.VrfID = buf.DecodeUint32()
- return nil
-}
-
-// Nat66AddDelStaticMappingReply defines message 'nat66_add_del_static_mapping_reply'.
-type Nat66AddDelStaticMappingReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *Nat66AddDelStaticMappingReply) Reset() { *m = Nat66AddDelStaticMappingReply{} }
-func (*Nat66AddDelStaticMappingReply) GetMessageName() string {
- return "nat66_add_del_static_mapping_reply"
-}
-func (*Nat66AddDelStaticMappingReply) GetCrcString() string { return "e8d4e804" }
-func (*Nat66AddDelStaticMappingReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Nat66AddDelStaticMappingReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *Nat66AddDelStaticMappingReply) 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 *Nat66AddDelStaticMappingReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// Nat66InterfaceDetails defines message 'nat66_interface_details'.
-type Nat66InterfaceDetails struct {
- Flags NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *Nat66InterfaceDetails) Reset() { *m = Nat66InterfaceDetails{} }
-func (*Nat66InterfaceDetails) GetMessageName() string { return "nat66_interface_details" }
-func (*Nat66InterfaceDetails) GetCrcString() string { return "5d286289" }
-func (*Nat66InterfaceDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Nat66InterfaceDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.Flags
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *Nat66InterfaceDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(uint8(m.Flags))
- buf.EncodeUint32(uint32(m.SwIfIndex))
- return buf.Bytes(), nil
-}
-func (m *Nat66InterfaceDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Flags = NatConfigFlags(buf.DecodeUint8())
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// Nat66InterfaceDump defines message 'nat66_interface_dump'.
-type Nat66InterfaceDump struct{}
-
-func (m *Nat66InterfaceDump) Reset() { *m = Nat66InterfaceDump{} }
-func (*Nat66InterfaceDump) GetMessageName() string { return "nat66_interface_dump" }
-func (*Nat66InterfaceDump) GetCrcString() string { return "51077d14" }
-func (*Nat66InterfaceDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Nat66InterfaceDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *Nat66InterfaceDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *Nat66InterfaceDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// Nat66StaticMappingDetails defines message 'nat66_static_mapping_details'.
-type Nat66StaticMappingDetails struct {
- LocalIPAddress IP6Address `binapi:"ip6_address,name=local_ip_address" json:"local_ip_address,omitempty"`
- ExternalIPAddress IP6Address `binapi:"ip6_address,name=external_ip_address" json:"external_ip_address,omitempty"`
- VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
- TotalBytes uint64 `binapi:"u64,name=total_bytes" json:"total_bytes,omitempty"`
- TotalPkts uint64 `binapi:"u64,name=total_pkts" json:"total_pkts,omitempty"`
-}
-
-func (m *Nat66StaticMappingDetails) Reset() { *m = Nat66StaticMappingDetails{} }
-func (*Nat66StaticMappingDetails) GetMessageName() string { return "nat66_static_mapping_details" }
-func (*Nat66StaticMappingDetails) GetCrcString() string { return "5c568448" }
-func (*Nat66StaticMappingDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Nat66StaticMappingDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 16 // m.LocalIPAddress
- size += 1 * 16 // m.ExternalIPAddress
- size += 4 // m.VrfID
- size += 8 // m.TotalBytes
- size += 8 // m.TotalPkts
- return size
-}
-func (m *Nat66StaticMappingDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.LocalIPAddress[:], 16)
- buf.EncodeBytes(m.ExternalIPAddress[:], 16)
- buf.EncodeUint32(m.VrfID)
- buf.EncodeUint64(m.TotalBytes)
- buf.EncodeUint64(m.TotalPkts)
- return buf.Bytes(), nil
-}
-func (m *Nat66StaticMappingDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- copy(m.LocalIPAddress[:], buf.DecodeBytes(16))
- copy(m.ExternalIPAddress[:], buf.DecodeBytes(16))
- m.VrfID = buf.DecodeUint32()
- m.TotalBytes = buf.DecodeUint64()
- m.TotalPkts = buf.DecodeUint64()
- return nil
-}
-
-// Nat66StaticMappingDump defines message 'nat66_static_mapping_dump'.
-type Nat66StaticMappingDump struct{}
-
-func (m *Nat66StaticMappingDump) Reset() { *m = Nat66StaticMappingDump{} }
-func (*Nat66StaticMappingDump) GetMessageName() string { return "nat66_static_mapping_dump" }
-func (*Nat66StaticMappingDump) GetCrcString() string { return "51077d14" }
-func (*Nat66StaticMappingDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Nat66StaticMappingDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *Nat66StaticMappingDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *Nat66StaticMappingDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// NatControlPing defines message 'nat_control_ping'.
-type NatControlPing struct{}
-
-func (m *NatControlPing) Reset() { *m = NatControlPing{} }
-func (*NatControlPing) GetMessageName() string { return "nat_control_ping" }
-func (*NatControlPing) GetCrcString() string { return "51077d14" }
-func (*NatControlPing) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *NatControlPing) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *NatControlPing) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *NatControlPing) Unmarshal(b []byte) error {
- return nil
-}
-
-// NatControlPingReply defines message 'nat_control_ping_reply'.
-type NatControlPingReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- ClientIndex uint32 `binapi:"u32,name=client_index" json:"client_index,omitempty"`
- VpePID uint32 `binapi:"u32,name=vpe_pid" json:"vpe_pid,omitempty"`
-}
-
-func (m *NatControlPingReply) Reset() { *m = NatControlPingReply{} }
-func (*NatControlPingReply) GetMessageName() string { return "nat_control_ping_reply" }
-func (*NatControlPingReply) GetCrcString() string { return "f6b0b8ca" }
-func (*NatControlPingReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *NatControlPingReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.ClientIndex
- size += 4 // m.VpePID
- return size
-}
-func (m *NatControlPingReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.ClientIndex)
- buf.EncodeUint32(m.VpePID)
- return buf.Bytes(), nil
-}
-func (m *NatControlPingReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.ClientIndex = buf.DecodeUint32()
- m.VpePID = buf.DecodeUint32()
- return nil
-}
-
-// NatDetAddDelMap defines message 'nat_det_add_del_map'.
-type NatDetAddDelMap struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- InAddr IP4Address `binapi:"ip4_address,name=in_addr" json:"in_addr,omitempty"`
- InPlen uint8 `binapi:"u8,name=in_plen" json:"in_plen,omitempty"`
- OutAddr IP4Address `binapi:"ip4_address,name=out_addr" json:"out_addr,omitempty"`
- OutPlen uint8 `binapi:"u8,name=out_plen" json:"out_plen,omitempty"`
-}
-
-func (m *NatDetAddDelMap) Reset() { *m = NatDetAddDelMap{} }
-func (*NatDetAddDelMap) GetMessageName() string { return "nat_det_add_del_map" }
-func (*NatDetAddDelMap) GetCrcString() string { return "112fde05" }
-func (*NatDetAddDelMap) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *NatDetAddDelMap) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 1 * 4 // m.InAddr
- size += 1 // m.InPlen
- size += 1 * 4 // m.OutAddr
- size += 1 // m.OutPlen
- return size
-}
-func (m *NatDetAddDelMap) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeBytes(m.InAddr[:], 4)
- buf.EncodeUint8(m.InPlen)
- buf.EncodeBytes(m.OutAddr[:], 4)
- buf.EncodeUint8(m.OutPlen)
- return buf.Bytes(), nil
-}
-func (m *NatDetAddDelMap) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- copy(m.InAddr[:], buf.DecodeBytes(4))
- m.InPlen = buf.DecodeUint8()
- copy(m.OutAddr[:], buf.DecodeBytes(4))
- m.OutPlen = buf.DecodeUint8()
- return nil
-}
-
-// NatDetAddDelMapReply defines message 'nat_det_add_del_map_reply'.
-type NatDetAddDelMapReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *NatDetAddDelMapReply) Reset() { *m = NatDetAddDelMapReply{} }
-func (*NatDetAddDelMapReply) GetMessageName() string { return "nat_det_add_del_map_reply" }
-func (*NatDetAddDelMapReply) GetCrcString() string { return "e8d4e804" }
-func (*NatDetAddDelMapReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *NatDetAddDelMapReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *NatDetAddDelMapReply) 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 *NatDetAddDelMapReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// NatDetCloseSessionIn defines message 'nat_det_close_session_in'.
-type NatDetCloseSessionIn struct {
- InAddr IP4Address `binapi:"ip4_address,name=in_addr" json:"in_addr,omitempty"`
- InPort uint16 `binapi:"u16,name=in_port" json:"in_port,omitempty"`
- ExtAddr IP4Address `binapi:"ip4_address,name=ext_addr" json:"ext_addr,omitempty"`
- ExtPort uint16 `binapi:"u16,name=ext_port" json:"ext_port,omitempty"`
-}
-
-func (m *NatDetCloseSessionIn) Reset() { *m = NatDetCloseSessionIn{} }
-func (*NatDetCloseSessionIn) GetMessageName() string { return "nat_det_close_session_in" }
-func (*NatDetCloseSessionIn) GetCrcString() string { return "0a10ef64" }
-func (*NatDetCloseSessionIn) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *NatDetCloseSessionIn) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 4 // m.InAddr
- size += 2 // m.InPort
- size += 1 * 4 // m.ExtAddr
- size += 2 // m.ExtPort
- return size
-}
-func (m *NatDetCloseSessionIn) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.InAddr[:], 4)
- buf.EncodeUint16(m.InPort)
- buf.EncodeBytes(m.ExtAddr[:], 4)
- buf.EncodeUint16(m.ExtPort)
- return buf.Bytes(), nil
-}
-func (m *NatDetCloseSessionIn) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- copy(m.InAddr[:], buf.DecodeBytes(4))
- m.InPort = buf.DecodeUint16()
- copy(m.ExtAddr[:], buf.DecodeBytes(4))
- m.ExtPort = buf.DecodeUint16()
- return nil
-}
-
-// NatDetCloseSessionInReply defines message 'nat_det_close_session_in_reply'.
-type NatDetCloseSessionInReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *NatDetCloseSessionInReply) Reset() { *m = NatDetCloseSessionInReply{} }
-func (*NatDetCloseSessionInReply) GetMessageName() string { return "nat_det_close_session_in_reply" }
-func (*NatDetCloseSessionInReply) GetCrcString() string { return "e8d4e804" }
-func (*NatDetCloseSessionInReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *NatDetCloseSessionInReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *NatDetCloseSessionInReply) 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 *NatDetCloseSessionInReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// NatDetCloseSessionOut defines message 'nat_det_close_session_out'.
-type NatDetCloseSessionOut struct {
- OutAddr IP4Address `binapi:"ip4_address,name=out_addr" json:"out_addr,omitempty"`
- OutPort uint16 `binapi:"u16,name=out_port" json:"out_port,omitempty"`
- ExtAddr IP4Address `binapi:"ip4_address,name=ext_addr" json:"ext_addr,omitempty"`
- ExtPort uint16 `binapi:"u16,name=ext_port" json:"ext_port,omitempty"`
-}
-
-func (m *NatDetCloseSessionOut) Reset() { *m = NatDetCloseSessionOut{} }
-func (*NatDetCloseSessionOut) GetMessageName() string { return "nat_det_close_session_out" }
-func (*NatDetCloseSessionOut) GetCrcString() string { return "c1b6cbfb" }
-func (*NatDetCloseSessionOut) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *NatDetCloseSessionOut) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 4 // m.OutAddr
- size += 2 // m.OutPort
- size += 1 * 4 // m.ExtAddr
- size += 2 // m.ExtPort
- return size
-}
-func (m *NatDetCloseSessionOut) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.OutAddr[:], 4)
- buf.EncodeUint16(m.OutPort)
- buf.EncodeBytes(m.ExtAddr[:], 4)
- buf.EncodeUint16(m.ExtPort)
- return buf.Bytes(), nil
-}
-func (m *NatDetCloseSessionOut) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- copy(m.OutAddr[:], buf.DecodeBytes(4))
- m.OutPort = buf.DecodeUint16()
- copy(m.ExtAddr[:], buf.DecodeBytes(4))
- m.ExtPort = buf.DecodeUint16()
- return nil
-}
-
-// NatDetCloseSessionOutReply defines message 'nat_det_close_session_out_reply'.
-type NatDetCloseSessionOutReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *NatDetCloseSessionOutReply) Reset() { *m = NatDetCloseSessionOutReply{} }
-func (*NatDetCloseSessionOutReply) GetMessageName() string { return "nat_det_close_session_out_reply" }
-func (*NatDetCloseSessionOutReply) GetCrcString() string { return "e8d4e804" }
-func (*NatDetCloseSessionOutReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *NatDetCloseSessionOutReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *NatDetCloseSessionOutReply) 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 *NatDetCloseSessionOutReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// NatDetForward defines message 'nat_det_forward'.
-type NatDetForward struct {
- InAddr IP4Address `binapi:"ip4_address,name=in_addr" json:"in_addr,omitempty"`
-}
-
-func (m *NatDetForward) Reset() { *m = NatDetForward{} }
-func (*NatDetForward) GetMessageName() string { return "nat_det_forward" }
-func (*NatDetForward) GetCrcString() string { return "7f8a89cd" }
-func (*NatDetForward) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *NatDetForward) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 4 // m.InAddr
- return size
-}
-func (m *NatDetForward) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.InAddr[:], 4)
- return buf.Bytes(), nil
-}
-func (m *NatDetForward) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- copy(m.InAddr[:], buf.DecodeBytes(4))
- return nil
-}
-
-// NatDetForwardReply defines message 'nat_det_forward_reply'.
-type NatDetForwardReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- OutPortLo uint16 `binapi:"u16,name=out_port_lo" json:"out_port_lo,omitempty"`
- OutPortHi uint16 `binapi:"u16,name=out_port_hi" json:"out_port_hi,omitempty"`
- OutAddr IP4Address `binapi:"ip4_address,name=out_addr" json:"out_addr,omitempty"`
-}
-
-func (m *NatDetForwardReply) Reset() { *m = NatDetForwardReply{} }
-func (*NatDetForwardReply) GetMessageName() string { return "nat_det_forward_reply" }
-func (*NatDetForwardReply) GetCrcString() string { return "a8ccbdc0" }
-func (*NatDetForwardReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *NatDetForwardReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 2 // m.OutPortLo
- size += 2 // m.OutPortHi
- size += 1 * 4 // m.OutAddr
- return size
-}
-func (m *NatDetForwardReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint16(m.OutPortLo)
- buf.EncodeUint16(m.OutPortHi)
- buf.EncodeBytes(m.OutAddr[:], 4)
- return buf.Bytes(), nil
-}
-func (m *NatDetForwardReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.OutPortLo = buf.DecodeUint16()
- m.OutPortHi = buf.DecodeUint16()
- copy(m.OutAddr[:], buf.DecodeBytes(4))
- return nil
-}
-
-// NatDetMapDetails defines message 'nat_det_map_details'.
-type NatDetMapDetails struct {
- InAddr IP4Address `binapi:"ip4_address,name=in_addr" json:"in_addr,omitempty"`
- InPlen uint8 `binapi:"u8,name=in_plen" json:"in_plen,omitempty"`
- OutAddr IP4Address `binapi:"ip4_address,name=out_addr" json:"out_addr,omitempty"`
- OutPlen uint8 `binapi:"u8,name=out_plen" json:"out_plen,omitempty"`
- SharingRatio uint32 `binapi:"u32,name=sharing_ratio" json:"sharing_ratio,omitempty"`
- PortsPerHost uint16 `binapi:"u16,name=ports_per_host" json:"ports_per_host,omitempty"`
- SesNum uint32 `binapi:"u32,name=ses_num" json:"ses_num,omitempty"`
-}
-
-func (m *NatDetMapDetails) Reset() { *m = NatDetMapDetails{} }
-func (*NatDetMapDetails) GetMessageName() string { return "nat_det_map_details" }
-func (*NatDetMapDetails) GetCrcString() string { return "88000ee1" }
-func (*NatDetMapDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *NatDetMapDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 4 // m.InAddr
- size += 1 // m.InPlen
- size += 1 * 4 // m.OutAddr
- size += 1 // m.OutPlen
- size += 4 // m.SharingRatio
- size += 2 // m.PortsPerHost
- size += 4 // m.SesNum
- return size
-}
-func (m *NatDetMapDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.InAddr[:], 4)
- buf.EncodeUint8(m.InPlen)
- buf.EncodeBytes(m.OutAddr[:], 4)
- buf.EncodeUint8(m.OutPlen)
- buf.EncodeUint32(m.SharingRatio)
- buf.EncodeUint16(m.PortsPerHost)
- buf.EncodeUint32(m.SesNum)
- return buf.Bytes(), nil
-}
-func (m *NatDetMapDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- copy(m.InAddr[:], buf.DecodeBytes(4))
- m.InPlen = buf.DecodeUint8()
- copy(m.OutAddr[:], buf.DecodeBytes(4))
- m.OutPlen = buf.DecodeUint8()
- m.SharingRatio = buf.DecodeUint32()
- m.PortsPerHost = buf.DecodeUint16()
- m.SesNum = buf.DecodeUint32()
- return nil
-}
-
-// NatDetMapDump defines message 'nat_det_map_dump'.
-type NatDetMapDump struct{}
-
-func (m *NatDetMapDump) Reset() { *m = NatDetMapDump{} }
-func (*NatDetMapDump) GetMessageName() string { return "nat_det_map_dump" }
-func (*NatDetMapDump) GetCrcString() string { return "51077d14" }
-func (*NatDetMapDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *NatDetMapDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *NatDetMapDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *NatDetMapDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// NatDetReverse defines message 'nat_det_reverse'.
-type NatDetReverse struct {
- OutPort uint16 `binapi:"u16,name=out_port" json:"out_port,omitempty"`
- OutAddr IP4Address `binapi:"ip4_address,name=out_addr" json:"out_addr,omitempty"`
-}
-
-func (m *NatDetReverse) Reset() { *m = NatDetReverse{} }
-func (*NatDetReverse) GetMessageName() string { return "nat_det_reverse" }
-func (*NatDetReverse) GetCrcString() string { return "a7573fe1" }
-func (*NatDetReverse) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *NatDetReverse) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 2 // m.OutPort
- size += 1 * 4 // m.OutAddr
- return size
-}
-func (m *NatDetReverse) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint16(m.OutPort)
- buf.EncodeBytes(m.OutAddr[:], 4)
- return buf.Bytes(), nil
-}
-func (m *NatDetReverse) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.OutPort = buf.DecodeUint16()
- copy(m.OutAddr[:], buf.DecodeBytes(4))
- return nil
-}
-
-// NatDetReverseReply defines message 'nat_det_reverse_reply'.
-type NatDetReverseReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- InAddr IP4Address `binapi:"ip4_address,name=in_addr" json:"in_addr,omitempty"`
-}
-
-func (m *NatDetReverseReply) Reset() { *m = NatDetReverseReply{} }
-func (*NatDetReverseReply) GetMessageName() string { return "nat_det_reverse_reply" }
-func (*NatDetReverseReply) GetCrcString() string { return "34066d48" }
-func (*NatDetReverseReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *NatDetReverseReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 1 * 4 // m.InAddr
- return size
-}
-func (m *NatDetReverseReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeBytes(m.InAddr[:], 4)
- return buf.Bytes(), nil
-}
-func (m *NatDetReverseReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- copy(m.InAddr[:], buf.DecodeBytes(4))
- return nil
-}
-
-// NatDetSessionDetails defines message 'nat_det_session_details'.
-type NatDetSessionDetails struct {
- InPort uint16 `binapi:"u16,name=in_port" json:"in_port,omitempty"`
- ExtAddr IP4Address `binapi:"ip4_address,name=ext_addr" json:"ext_addr,omitempty"`
- ExtPort uint16 `binapi:"u16,name=ext_port" json:"ext_port,omitempty"`
- OutPort uint16 `binapi:"u16,name=out_port" json:"out_port,omitempty"`
- State uint8 `binapi:"u8,name=state" json:"state,omitempty"`
- Expire uint32 `binapi:"u32,name=expire" json:"expire,omitempty"`
-}
-
-func (m *NatDetSessionDetails) Reset() { *m = NatDetSessionDetails{} }
-func (*NatDetSessionDetails) GetMessageName() string { return "nat_det_session_details" }
-func (*NatDetSessionDetails) GetCrcString() string { return "27f3c171" }
-func (*NatDetSessionDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *NatDetSessionDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 2 // m.InPort
- size += 1 * 4 // m.ExtAddr
- size += 2 // m.ExtPort
- size += 2 // m.OutPort
- size += 1 // m.State
- size += 4 // m.Expire
- return size
-}
-func (m *NatDetSessionDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint16(m.InPort)
- buf.EncodeBytes(m.ExtAddr[:], 4)
- buf.EncodeUint16(m.ExtPort)
- buf.EncodeUint16(m.OutPort)
- buf.EncodeUint8(m.State)
- buf.EncodeUint32(m.Expire)
- return buf.Bytes(), nil
-}
-func (m *NatDetSessionDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.InPort = buf.DecodeUint16()
- copy(m.ExtAddr[:], buf.DecodeBytes(4))
- m.ExtPort = buf.DecodeUint16()
- m.OutPort = buf.DecodeUint16()
- m.State = buf.DecodeUint8()
- m.Expire = buf.DecodeUint32()
- return nil
-}
-
-// NatDetSessionDump defines message 'nat_det_session_dump'.
-type NatDetSessionDump struct {
- UserAddr IP4Address `binapi:"ip4_address,name=user_addr" json:"user_addr,omitempty"`
-}
-
-func (m *NatDetSessionDump) Reset() { *m = NatDetSessionDump{} }
-func (*NatDetSessionDump) GetMessageName() string { return "nat_det_session_dump" }
-func (*NatDetSessionDump) GetCrcString() string { return "e45a3af7" }
-func (*NatDetSessionDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *NatDetSessionDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 4 // m.UserAddr
- return size
-}
-func (m *NatDetSessionDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.UserAddr[:], 4)
- return buf.Bytes(), nil
-}
-func (m *NatDetSessionDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- copy(m.UserAddr[:], buf.DecodeBytes(4))
- return nil
-}
-
-// NatGetAddrAndPortAllocAlg defines message 'nat_get_addr_and_port_alloc_alg'.
-type NatGetAddrAndPortAllocAlg struct{}
-
-func (m *NatGetAddrAndPortAllocAlg) Reset() { *m = NatGetAddrAndPortAllocAlg{} }
-func (*NatGetAddrAndPortAllocAlg) GetMessageName() string { return "nat_get_addr_and_port_alloc_alg" }
-func (*NatGetAddrAndPortAllocAlg) GetCrcString() string { return "51077d14" }
-func (*NatGetAddrAndPortAllocAlg) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *NatGetAddrAndPortAllocAlg) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *NatGetAddrAndPortAllocAlg) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *NatGetAddrAndPortAllocAlg) Unmarshal(b []byte) error {
- return nil
-}
-
-// NatGetAddrAndPortAllocAlgReply defines message 'nat_get_addr_and_port_alloc_alg_reply'.
-type NatGetAddrAndPortAllocAlgReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- Alg uint8 `binapi:"u8,name=alg" json:"alg,omitempty"`
- PsidOffset uint8 `binapi:"u8,name=psid_offset" json:"psid_offset,omitempty"`
- PsidLength uint8 `binapi:"u8,name=psid_length" json:"psid_length,omitempty"`
- Psid uint16 `binapi:"u16,name=psid" json:"psid,omitempty"`
- StartPort uint16 `binapi:"u16,name=start_port" json:"start_port,omitempty"`
- EndPort uint16 `binapi:"u16,name=end_port" json:"end_port,omitempty"`
-}
-
-func (m *NatGetAddrAndPortAllocAlgReply) Reset() { *m = NatGetAddrAndPortAllocAlgReply{} }
-func (*NatGetAddrAndPortAllocAlgReply) GetMessageName() string {
- return "nat_get_addr_and_port_alloc_alg_reply"
-}
-func (*NatGetAddrAndPortAllocAlgReply) GetCrcString() string { return "3607a7d0" }
-func (*NatGetAddrAndPortAllocAlgReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *NatGetAddrAndPortAllocAlgReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 1 // m.Alg
- size += 1 // m.PsidOffset
- size += 1 // m.PsidLength
- size += 2 // m.Psid
- size += 2 // m.StartPort
- size += 2 // m.EndPort
- return size
-}
-func (m *NatGetAddrAndPortAllocAlgReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint8(m.Alg)
- buf.EncodeUint8(m.PsidOffset)
- buf.EncodeUint8(m.PsidLength)
- buf.EncodeUint16(m.Psid)
- buf.EncodeUint16(m.StartPort)
- buf.EncodeUint16(m.EndPort)
- return buf.Bytes(), nil
-}
-func (m *NatGetAddrAndPortAllocAlgReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.Alg = buf.DecodeUint8()
- m.PsidOffset = buf.DecodeUint8()
- m.PsidLength = buf.DecodeUint8()
- m.Psid = buf.DecodeUint16()
- m.StartPort = buf.DecodeUint16()
- m.EndPort = buf.DecodeUint16()
- return nil
-}
-
-// NatGetMssClamping defines message 'nat_get_mss_clamping'.
-type NatGetMssClamping struct{}
-
-func (m *NatGetMssClamping) Reset() { *m = NatGetMssClamping{} }
-func (*NatGetMssClamping) GetMessageName() string { return "nat_get_mss_clamping" }
-func (*NatGetMssClamping) GetCrcString() string { return "51077d14" }
-func (*NatGetMssClamping) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *NatGetMssClamping) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *NatGetMssClamping) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *NatGetMssClamping) Unmarshal(b []byte) error {
- return nil
-}
-
-// NatGetMssClampingReply defines message 'nat_get_mss_clamping_reply'.
-type NatGetMssClampingReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- MssValue uint16 `binapi:"u16,name=mss_value" json:"mss_value,omitempty"`
- Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
-}
-
-func (m *NatGetMssClampingReply) Reset() { *m = NatGetMssClampingReply{} }
-func (*NatGetMssClampingReply) GetMessageName() string { return "nat_get_mss_clamping_reply" }
-func (*NatGetMssClampingReply) GetCrcString() string { return "1c0b2a78" }
-func (*NatGetMssClampingReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *NatGetMssClampingReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 2 // m.MssValue
- size += 1 // m.Enable
- return size
-}
-func (m *NatGetMssClampingReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint16(m.MssValue)
- buf.EncodeBool(m.Enable)
- return buf.Bytes(), nil
-}
-func (m *NatGetMssClampingReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.MssValue = buf.DecodeUint16()
- m.Enable = buf.DecodeBool()
- return nil
-}
-
-// NatGetTimeouts defines message 'nat_get_timeouts'.
-type NatGetTimeouts struct{}
-
-func (m *NatGetTimeouts) Reset() { *m = NatGetTimeouts{} }
-func (*NatGetTimeouts) GetMessageName() string { return "nat_get_timeouts" }
-func (*NatGetTimeouts) GetCrcString() string { return "51077d14" }
-func (*NatGetTimeouts) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *NatGetTimeouts) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *NatGetTimeouts) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *NatGetTimeouts) Unmarshal(b []byte) error {
- return nil
-}
-
-// NatGetTimeoutsReply defines message 'nat_get_timeouts_reply'.
-type NatGetTimeoutsReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- UDP uint32 `binapi:"u32,name=udp" json:"udp,omitempty"`
- TCPEstablished uint32 `binapi:"u32,name=tcp_established" json:"tcp_established,omitempty"`
- TCPTransitory uint32 `binapi:"u32,name=tcp_transitory" json:"tcp_transitory,omitempty"`
- ICMP uint32 `binapi:"u32,name=icmp" json:"icmp,omitempty"`
-}
-
-func (m *NatGetTimeoutsReply) Reset() { *m = NatGetTimeoutsReply{} }
-func (*NatGetTimeoutsReply) GetMessageName() string { return "nat_get_timeouts_reply" }
-func (*NatGetTimeoutsReply) GetCrcString() string { return "3c4df4e1" }
-func (*NatGetTimeoutsReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *NatGetTimeoutsReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.UDP
- size += 4 // m.TCPEstablished
- size += 4 // m.TCPTransitory
- size += 4 // m.ICMP
- return size
-}
-func (m *NatGetTimeoutsReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.UDP)
- buf.EncodeUint32(m.TCPEstablished)
- buf.EncodeUint32(m.TCPTransitory)
- buf.EncodeUint32(m.ICMP)
- return buf.Bytes(), nil
-}
-func (m *NatGetTimeoutsReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.UDP = buf.DecodeUint32()
- m.TCPEstablished = buf.DecodeUint32()
- m.TCPTransitory = buf.DecodeUint32()
- m.ICMP = buf.DecodeUint32()
- return nil
-}
-
-// NatHaFlush defines message 'nat_ha_flush'.
-type NatHaFlush struct{}
-
-func (m *NatHaFlush) Reset() { *m = NatHaFlush{} }
-func (*NatHaFlush) GetMessageName() string { return "nat_ha_flush" }
-func (*NatHaFlush) GetCrcString() string { return "51077d14" }
-func (*NatHaFlush) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *NatHaFlush) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *NatHaFlush) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *NatHaFlush) Unmarshal(b []byte) error {
- return nil
-}
-
-// NatHaFlushReply defines message 'nat_ha_flush_reply'.
-type NatHaFlushReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *NatHaFlushReply) Reset() { *m = NatHaFlushReply{} }
-func (*NatHaFlushReply) GetMessageName() string { return "nat_ha_flush_reply" }
-func (*NatHaFlushReply) GetCrcString() string { return "e8d4e804" }
-func (*NatHaFlushReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *NatHaFlushReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *NatHaFlushReply) 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 *NatHaFlushReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// NatHaGetFailover defines message 'nat_ha_get_failover'.
-type NatHaGetFailover struct{}
-
-func (m *NatHaGetFailover) Reset() { *m = NatHaGetFailover{} }
-func (*NatHaGetFailover) GetMessageName() string { return "nat_ha_get_failover" }
-func (*NatHaGetFailover) GetCrcString() string { return "51077d14" }
-func (*NatHaGetFailover) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *NatHaGetFailover) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *NatHaGetFailover) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *NatHaGetFailover) Unmarshal(b []byte) error {
- return nil
-}
-
-// NatHaGetFailoverReply defines message 'nat_ha_get_failover_reply'.
-type NatHaGetFailoverReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- IPAddress IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"`
- Port uint16 `binapi:"u16,name=port" json:"port,omitempty"`
- SessionRefreshInterval uint32 `binapi:"u32,name=session_refresh_interval" json:"session_refresh_interval,omitempty"`
-}
-
-func (m *NatHaGetFailoverReply) Reset() { *m = NatHaGetFailoverReply{} }
-func (*NatHaGetFailoverReply) GetMessageName() string { return "nat_ha_get_failover_reply" }
-func (*NatHaGetFailoverReply) GetCrcString() string { return "a67d8752" }
-func (*NatHaGetFailoverReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *NatHaGetFailoverReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 1 * 4 // m.IPAddress
- size += 2 // m.Port
- size += 4 // m.SessionRefreshInterval
- return size
-}
-func (m *NatHaGetFailoverReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeBytes(m.IPAddress[:], 4)
- buf.EncodeUint16(m.Port)
- buf.EncodeUint32(m.SessionRefreshInterval)
- return buf.Bytes(), nil
-}
-func (m *NatHaGetFailoverReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- copy(m.IPAddress[:], buf.DecodeBytes(4))
- m.Port = buf.DecodeUint16()
- m.SessionRefreshInterval = buf.DecodeUint32()
- return nil
-}
-
-// NatHaGetListener defines message 'nat_ha_get_listener'.
-type NatHaGetListener struct{}
-
-func (m *NatHaGetListener) Reset() { *m = NatHaGetListener{} }
-func (*NatHaGetListener) GetMessageName() string { return "nat_ha_get_listener" }
-func (*NatHaGetListener) GetCrcString() string { return "51077d14" }
-func (*NatHaGetListener) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *NatHaGetListener) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *NatHaGetListener) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *NatHaGetListener) Unmarshal(b []byte) error {
- return nil
-}
-
-// NatHaGetListenerReply defines message 'nat_ha_get_listener_reply'.
-type NatHaGetListenerReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- IPAddress IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"`
- Port uint16 `binapi:"u16,name=port" json:"port,omitempty"`
- PathMtu uint32 `binapi:"u32,name=path_mtu" json:"path_mtu,omitempty"`
-}
-
-func (m *NatHaGetListenerReply) Reset() { *m = NatHaGetListenerReply{} }
-func (*NatHaGetListenerReply) GetMessageName() string { return "nat_ha_get_listener_reply" }
-func (*NatHaGetListenerReply) GetCrcString() string { return "123ea41f" }
-func (*NatHaGetListenerReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *NatHaGetListenerReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 1 * 4 // m.IPAddress
- size += 2 // m.Port
- size += 4 // m.PathMtu
- return size
-}
-func (m *NatHaGetListenerReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeBytes(m.IPAddress[:], 4)
- buf.EncodeUint16(m.Port)
- buf.EncodeUint32(m.PathMtu)
- return buf.Bytes(), nil
-}
-func (m *NatHaGetListenerReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- copy(m.IPAddress[:], buf.DecodeBytes(4))
- m.Port = buf.DecodeUint16()
- m.PathMtu = buf.DecodeUint32()
- return nil
-}
-
-// NatHaResync defines message 'nat_ha_resync'.
-type NatHaResync struct {
- WantResyncEvent uint8 `binapi:"u8,name=want_resync_event" json:"want_resync_event,omitempty"`
- PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
-}
-
-func (m *NatHaResync) Reset() { *m = NatHaResync{} }
-func (*NatHaResync) GetMessageName() string { return "nat_ha_resync" }
-func (*NatHaResync) GetCrcString() string { return "c8ab9e03" }
-func (*NatHaResync) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *NatHaResync) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.WantResyncEvent
- size += 4 // m.PID
- return size
-}
-func (m *NatHaResync) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.WantResyncEvent)
- buf.EncodeUint32(m.PID)
- return buf.Bytes(), nil
-}
-func (m *NatHaResync) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.WantResyncEvent = buf.DecodeUint8()
- m.PID = buf.DecodeUint32()
- return nil
-}
-
-// NatHaResyncCompletedEvent defines message 'nat_ha_resync_completed_event'.
-type NatHaResyncCompletedEvent struct {
- PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
- MissedCount uint32 `binapi:"u32,name=missed_count" json:"missed_count,omitempty"`
-}
-
-func (m *NatHaResyncCompletedEvent) Reset() { *m = NatHaResyncCompletedEvent{} }
-func (*NatHaResyncCompletedEvent) GetMessageName() string { return "nat_ha_resync_completed_event" }
-func (*NatHaResyncCompletedEvent) GetCrcString() string { return "fdc598fb" }
-func (*NatHaResyncCompletedEvent) GetMessageType() api.MessageType {
- return api.EventMessage
-}
-
-func (m *NatHaResyncCompletedEvent) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.PID
- size += 4 // m.MissedCount
- return size
-}
-func (m *NatHaResyncCompletedEvent) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.PID)
- buf.EncodeUint32(m.MissedCount)
- return buf.Bytes(), nil
-}
-func (m *NatHaResyncCompletedEvent) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.PID = buf.DecodeUint32()
- m.MissedCount = buf.DecodeUint32()
- return nil
-}
-
-// NatHaResyncReply defines message 'nat_ha_resync_reply'.
-type NatHaResyncReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *NatHaResyncReply) Reset() { *m = NatHaResyncReply{} }
-func (*NatHaResyncReply) GetMessageName() string { return "nat_ha_resync_reply" }
-func (*NatHaResyncReply) GetCrcString() string { return "e8d4e804" }
-func (*NatHaResyncReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *NatHaResyncReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *NatHaResyncReply) 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 *NatHaResyncReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// NatHaSetFailover defines message 'nat_ha_set_failover'.
-type NatHaSetFailover struct {
- IPAddress IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"`
- Port uint16 `binapi:"u16,name=port" json:"port,omitempty"`
- SessionRefreshInterval uint32 `binapi:"u32,name=session_refresh_interval" json:"session_refresh_interval,omitempty"`
-}
-
-func (m *NatHaSetFailover) Reset() { *m = NatHaSetFailover{} }
-func (*NatHaSetFailover) GetMessageName() string { return "nat_ha_set_failover" }
-func (*NatHaSetFailover) GetCrcString() string { return "718246af" }
-func (*NatHaSetFailover) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *NatHaSetFailover) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 4 // m.IPAddress
- size += 2 // m.Port
- size += 4 // m.SessionRefreshInterval
- return size
-}
-func (m *NatHaSetFailover) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.IPAddress[:], 4)
- buf.EncodeUint16(m.Port)
- buf.EncodeUint32(m.SessionRefreshInterval)
- return buf.Bytes(), nil
-}
-func (m *NatHaSetFailover) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- copy(m.IPAddress[:], buf.DecodeBytes(4))
- m.Port = buf.DecodeUint16()
- m.SessionRefreshInterval = buf.DecodeUint32()
- return nil
-}
-
-// NatHaSetFailoverReply defines message 'nat_ha_set_failover_reply'.
-type NatHaSetFailoverReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *NatHaSetFailoverReply) Reset() { *m = NatHaSetFailoverReply{} }
-func (*NatHaSetFailoverReply) GetMessageName() string { return "nat_ha_set_failover_reply" }
-func (*NatHaSetFailoverReply) GetCrcString() string { return "e8d4e804" }
-func (*NatHaSetFailoverReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *NatHaSetFailoverReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *NatHaSetFailoverReply) 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 *NatHaSetFailoverReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// NatHaSetListener defines message 'nat_ha_set_listener'.
-type NatHaSetListener struct {
- IPAddress IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"`
- Port uint16 `binapi:"u16,name=port" json:"port,omitempty"`
- PathMtu uint32 `binapi:"u32,name=path_mtu" json:"path_mtu,omitempty"`
-}
-
-func (m *NatHaSetListener) Reset() { *m = NatHaSetListener{} }
-func (*NatHaSetListener) GetMessageName() string { return "nat_ha_set_listener" }
-func (*NatHaSetListener) GetCrcString() string { return "e4a8cb4e" }
-func (*NatHaSetListener) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *NatHaSetListener) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 4 // m.IPAddress
- size += 2 // m.Port
- size += 4 // m.PathMtu
- return size
-}
-func (m *NatHaSetListener) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.IPAddress[:], 4)
- buf.EncodeUint16(m.Port)
- buf.EncodeUint32(m.PathMtu)
- return buf.Bytes(), nil
-}
-func (m *NatHaSetListener) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- copy(m.IPAddress[:], buf.DecodeBytes(4))
- m.Port = buf.DecodeUint16()
- m.PathMtu = buf.DecodeUint32()
- return nil
-}
-
-// NatHaSetListenerReply defines message 'nat_ha_set_listener_reply'.
-type NatHaSetListenerReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *NatHaSetListenerReply) Reset() { *m = NatHaSetListenerReply{} }
-func (*NatHaSetListenerReply) GetMessageName() string { return "nat_ha_set_listener_reply" }
-func (*NatHaSetListenerReply) GetCrcString() string { return "e8d4e804" }
-func (*NatHaSetListenerReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *NatHaSetListenerReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *NatHaSetListenerReply) 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 *NatHaSetListenerReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// NatIpfixEnableDisable defines message 'nat_ipfix_enable_disable'.
-type NatIpfixEnableDisable struct {
- DomainID uint32 `binapi:"u32,name=domain_id" json:"domain_id,omitempty"`
- SrcPort uint16 `binapi:"u16,name=src_port" json:"src_port,omitempty"`
- Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
-}
-
-func (m *NatIpfixEnableDisable) Reset() { *m = NatIpfixEnableDisable{} }
-func (*NatIpfixEnableDisable) GetMessageName() string { return "nat_ipfix_enable_disable" }
-func (*NatIpfixEnableDisable) GetCrcString() string { return "9af4a2d2" }
-func (*NatIpfixEnableDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *NatIpfixEnableDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.DomainID
- size += 2 // m.SrcPort
- size += 1 // m.Enable
- return size
-}
-func (m *NatIpfixEnableDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.DomainID)
- buf.EncodeUint16(m.SrcPort)
- buf.EncodeBool(m.Enable)
- return buf.Bytes(), nil
-}
-func (m *NatIpfixEnableDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.DomainID = buf.DecodeUint32()
- m.SrcPort = buf.DecodeUint16()
- m.Enable = buf.DecodeBool()
- return nil
-}
-
-// NatIpfixEnableDisableReply defines message 'nat_ipfix_enable_disable_reply'.
-type NatIpfixEnableDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *NatIpfixEnableDisableReply) Reset() { *m = NatIpfixEnableDisableReply{} }
-func (*NatIpfixEnableDisableReply) GetMessageName() string { return "nat_ipfix_enable_disable_reply" }
-func (*NatIpfixEnableDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*NatIpfixEnableDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *NatIpfixEnableDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *NatIpfixEnableDisableReply) 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 *NatIpfixEnableDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// NatSetAddrAndPortAllocAlg defines message 'nat_set_addr_and_port_alloc_alg'.
-type NatSetAddrAndPortAllocAlg struct {
- Alg uint8 `binapi:"u8,name=alg" json:"alg,omitempty"`
- PsidOffset uint8 `binapi:"u8,name=psid_offset" json:"psid_offset,omitempty"`
- PsidLength uint8 `binapi:"u8,name=psid_length" json:"psid_length,omitempty"`
- Psid uint16 `binapi:"u16,name=psid" json:"psid,omitempty"`
- StartPort uint16 `binapi:"u16,name=start_port" json:"start_port,omitempty"`
- EndPort uint16 `binapi:"u16,name=end_port" json:"end_port,omitempty"`
-}
-
-func (m *NatSetAddrAndPortAllocAlg) Reset() { *m = NatSetAddrAndPortAllocAlg{} }
-func (*NatSetAddrAndPortAllocAlg) GetMessageName() string { return "nat_set_addr_and_port_alloc_alg" }
-func (*NatSetAddrAndPortAllocAlg) GetCrcString() string { return "deeb746f" }
-func (*NatSetAddrAndPortAllocAlg) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *NatSetAddrAndPortAllocAlg) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.Alg
- size += 1 // m.PsidOffset
- size += 1 // m.PsidLength
- size += 2 // m.Psid
- size += 2 // m.StartPort
- size += 2 // m.EndPort
- return size
-}
-func (m *NatSetAddrAndPortAllocAlg) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.Alg)
- buf.EncodeUint8(m.PsidOffset)
- buf.EncodeUint8(m.PsidLength)
- buf.EncodeUint16(m.Psid)
- buf.EncodeUint16(m.StartPort)
- buf.EncodeUint16(m.EndPort)
- return buf.Bytes(), nil
-}
-func (m *NatSetAddrAndPortAllocAlg) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Alg = buf.DecodeUint8()
- m.PsidOffset = buf.DecodeUint8()
- m.PsidLength = buf.DecodeUint8()
- m.Psid = buf.DecodeUint16()
- m.StartPort = buf.DecodeUint16()
- m.EndPort = buf.DecodeUint16()
- return nil
-}
-
-// NatSetAddrAndPortAllocAlgReply defines message 'nat_set_addr_and_port_alloc_alg_reply'.
-type NatSetAddrAndPortAllocAlgReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *NatSetAddrAndPortAllocAlgReply) Reset() { *m = NatSetAddrAndPortAllocAlgReply{} }
-func (*NatSetAddrAndPortAllocAlgReply) GetMessageName() string {
- return "nat_set_addr_and_port_alloc_alg_reply"
-}
-func (*NatSetAddrAndPortAllocAlgReply) GetCrcString() string { return "e8d4e804" }
-func (*NatSetAddrAndPortAllocAlgReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *NatSetAddrAndPortAllocAlgReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *NatSetAddrAndPortAllocAlgReply) 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 *NatSetAddrAndPortAllocAlgReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// NatSetLogLevel defines message 'nat_set_log_level'.
-type NatSetLogLevel struct {
- LogLevel NatLogLevel `binapi:"nat_log_level,name=log_level" json:"log_level,omitempty"`
-}
-
-func (m *NatSetLogLevel) Reset() { *m = NatSetLogLevel{} }
-func (*NatSetLogLevel) GetMessageName() string { return "nat_set_log_level" }
-func (*NatSetLogLevel) GetCrcString() string { return "70076bfe" }
-func (*NatSetLogLevel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *NatSetLogLevel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.LogLevel
- return size
-}
-func (m *NatSetLogLevel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(uint8(m.LogLevel))
- return buf.Bytes(), nil
-}
-func (m *NatSetLogLevel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.LogLevel = NatLogLevel(buf.DecodeUint8())
- return nil
-}
-
-// NatSetLogLevelReply defines message 'nat_set_log_level_reply'.
-type NatSetLogLevelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *NatSetLogLevelReply) Reset() { *m = NatSetLogLevelReply{} }
-func (*NatSetLogLevelReply) GetMessageName() string { return "nat_set_log_level_reply" }
-func (*NatSetLogLevelReply) GetCrcString() string { return "e8d4e804" }
-func (*NatSetLogLevelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *NatSetLogLevelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *NatSetLogLevelReply) 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 *NatSetLogLevelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// NatSetMssClamping defines message 'nat_set_mss_clamping'.
-type NatSetMssClamping struct {
- MssValue uint16 `binapi:"u16,name=mss_value" json:"mss_value,omitempty"`
- Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
-}
-
-func (m *NatSetMssClamping) Reset() { *m = NatSetMssClamping{} }
-func (*NatSetMssClamping) GetMessageName() string { return "nat_set_mss_clamping" }
-func (*NatSetMssClamping) GetCrcString() string { return "25e90abb" }
-func (*NatSetMssClamping) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *NatSetMssClamping) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 2 // m.MssValue
- size += 1 // m.Enable
- return size
-}
-func (m *NatSetMssClamping) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint16(m.MssValue)
- buf.EncodeBool(m.Enable)
- return buf.Bytes(), nil
-}
-func (m *NatSetMssClamping) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.MssValue = buf.DecodeUint16()
- m.Enable = buf.DecodeBool()
- return nil
-}
-
-// NatSetMssClampingReply defines message 'nat_set_mss_clamping_reply'.
-type NatSetMssClampingReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *NatSetMssClampingReply) Reset() { *m = NatSetMssClampingReply{} }
-func (*NatSetMssClampingReply) GetMessageName() string { return "nat_set_mss_clamping_reply" }
-func (*NatSetMssClampingReply) GetCrcString() string { return "e8d4e804" }
-func (*NatSetMssClampingReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *NatSetMssClampingReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *NatSetMssClampingReply) 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 *NatSetMssClampingReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// NatSetTimeouts defines message 'nat_set_timeouts'.
-type NatSetTimeouts struct {
- UDP uint32 `binapi:"u32,name=udp" json:"udp,omitempty"`
- TCPEstablished uint32 `binapi:"u32,name=tcp_established" json:"tcp_established,omitempty"`
- TCPTransitory uint32 `binapi:"u32,name=tcp_transitory" json:"tcp_transitory,omitempty"`
- ICMP uint32 `binapi:"u32,name=icmp" json:"icmp,omitempty"`
-}
-
-func (m *NatSetTimeouts) Reset() { *m = NatSetTimeouts{} }
-func (*NatSetTimeouts) GetMessageName() string { return "nat_set_timeouts" }
-func (*NatSetTimeouts) GetCrcString() string { return "d4746b16" }
-func (*NatSetTimeouts) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *NatSetTimeouts) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.UDP
- size += 4 // m.TCPEstablished
- size += 4 // m.TCPTransitory
- size += 4 // m.ICMP
- return size
-}
-func (m *NatSetTimeouts) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.UDP)
- buf.EncodeUint32(m.TCPEstablished)
- buf.EncodeUint32(m.TCPTransitory)
- buf.EncodeUint32(m.ICMP)
- return buf.Bytes(), nil
-}
-func (m *NatSetTimeouts) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.UDP = buf.DecodeUint32()
- m.TCPEstablished = buf.DecodeUint32()
- m.TCPTransitory = buf.DecodeUint32()
- m.ICMP = buf.DecodeUint32()
- return nil
-}
-
-// NatSetTimeoutsReply defines message 'nat_set_timeouts_reply'.
-type NatSetTimeoutsReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *NatSetTimeoutsReply) Reset() { *m = NatSetTimeoutsReply{} }
-func (*NatSetTimeoutsReply) GetMessageName() string { return "nat_set_timeouts_reply" }
-func (*NatSetTimeoutsReply) GetCrcString() string { return "e8d4e804" }
-func (*NatSetTimeoutsReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *NatSetTimeoutsReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *NatSetTimeoutsReply) 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 *NatSetTimeoutsReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// NatSetWorkers defines message 'nat_set_workers'.
-type NatSetWorkers struct {
- WorkerMask uint64 `binapi:"u64,name=worker_mask" json:"worker_mask,omitempty"`
-}
-
-func (m *NatSetWorkers) Reset() { *m = NatSetWorkers{} }
-func (*NatSetWorkers) GetMessageName() string { return "nat_set_workers" }
-func (*NatSetWorkers) GetCrcString() string { return "da926638" }
-func (*NatSetWorkers) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *NatSetWorkers) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 8 // m.WorkerMask
- return size
-}
-func (m *NatSetWorkers) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint64(m.WorkerMask)
- return buf.Bytes(), nil
-}
-func (m *NatSetWorkers) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.WorkerMask = buf.DecodeUint64()
- return nil
-}
-
-// NatSetWorkersReply defines message 'nat_set_workers_reply'.
-type NatSetWorkersReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *NatSetWorkersReply) Reset() { *m = NatSetWorkersReply{} }
-func (*NatSetWorkersReply) GetMessageName() string { return "nat_set_workers_reply" }
-func (*NatSetWorkersReply) GetCrcString() string { return "e8d4e804" }
-func (*NatSetWorkersReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *NatSetWorkersReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *NatSetWorkersReply) 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 *NatSetWorkersReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// NatShowConfig defines message 'nat_show_config'.
-type NatShowConfig struct{}
-
-func (m *NatShowConfig) Reset() { *m = NatShowConfig{} }
-func (*NatShowConfig) GetMessageName() string { return "nat_show_config" }
-func (*NatShowConfig) GetCrcString() string { return "51077d14" }
-func (*NatShowConfig) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *NatShowConfig) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *NatShowConfig) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *NatShowConfig) Unmarshal(b []byte) error {
- return nil
-}
-
-// NatShowConfigReply defines message 'nat_show_config_reply'.
-type NatShowConfigReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- StaticMappingOnly bool `binapi:"bool,name=static_mapping_only" json:"static_mapping_only,omitempty"`
- StaticMappingConnectionTracking bool `binapi:"bool,name=static_mapping_connection_tracking" json:"static_mapping_connection_tracking,omitempty"`
- Deterministic bool `binapi:"bool,name=deterministic" json:"deterministic,omitempty"`
- EndpointDependent bool `binapi:"bool,name=endpoint_dependent" json:"endpoint_dependent,omitempty"`
- Out2inDpo bool `binapi:"bool,name=out2in_dpo" json:"out2in_dpo,omitempty"`
- DsliteCe bool `binapi:"bool,name=dslite_ce" json:"dslite_ce,omitempty"`
- TranslationBuckets uint32 `binapi:"u32,name=translation_buckets" json:"translation_buckets,omitempty"`
- TranslationMemorySize uint32 `binapi:"u32,name=translation_memory_size" json:"translation_memory_size,omitempty"`
- UserBuckets uint32 `binapi:"u32,name=user_buckets" json:"user_buckets,omitempty"`
- UserMemorySize uint32 `binapi:"u32,name=user_memory_size" json:"user_memory_size,omitempty"`
- MaxTranslationsPerUser uint32 `binapi:"u32,name=max_translations_per_user" json:"max_translations_per_user,omitempty"`
- OutsideVrfID uint32 `binapi:"u32,name=outside_vrf_id" json:"outside_vrf_id,omitempty"`
- InsideVrfID uint32 `binapi:"u32,name=inside_vrf_id" json:"inside_vrf_id,omitempty"`
- Nat64BibBuckets uint32 `binapi:"u32,name=nat64_bib_buckets" json:"nat64_bib_buckets,omitempty"`
- Nat64BibMemorySize uint32 `binapi:"u32,name=nat64_bib_memory_size" json:"nat64_bib_memory_size,omitempty"`
- Nat64StBuckets uint32 `binapi:"u32,name=nat64_st_buckets" json:"nat64_st_buckets,omitempty"`
- Nat64StMemorySize uint32 `binapi:"u32,name=nat64_st_memory_size" json:"nat64_st_memory_size,omitempty"`
-}
-
-func (m *NatShowConfigReply) Reset() { *m = NatShowConfigReply{} }
-func (*NatShowConfigReply) GetMessageName() string { return "nat_show_config_reply" }
-func (*NatShowConfigReply) GetCrcString() string { return "006a0786" }
-func (*NatShowConfigReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *NatShowConfigReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 1 // m.StaticMappingOnly
- size += 1 // m.StaticMappingConnectionTracking
- size += 1 // m.Deterministic
- size += 1 // m.EndpointDependent
- size += 1 // m.Out2inDpo
- size += 1 // m.DsliteCe
- size += 4 // m.TranslationBuckets
- size += 4 // m.TranslationMemorySize
- size += 4 // m.UserBuckets
- size += 4 // m.UserMemorySize
- size += 4 // m.MaxTranslationsPerUser
- size += 4 // m.OutsideVrfID
- size += 4 // m.InsideVrfID
- size += 4 // m.Nat64BibBuckets
- size += 4 // m.Nat64BibMemorySize
- size += 4 // m.Nat64StBuckets
- size += 4 // m.Nat64StMemorySize
- return size
-}
-func (m *NatShowConfigReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeBool(m.StaticMappingOnly)
- buf.EncodeBool(m.StaticMappingConnectionTracking)
- buf.EncodeBool(m.Deterministic)
- buf.EncodeBool(m.EndpointDependent)
- buf.EncodeBool(m.Out2inDpo)
- buf.EncodeBool(m.DsliteCe)
- buf.EncodeUint32(m.TranslationBuckets)
- buf.EncodeUint32(m.TranslationMemorySize)
- buf.EncodeUint32(m.UserBuckets)
- buf.EncodeUint32(m.UserMemorySize)
- buf.EncodeUint32(m.MaxTranslationsPerUser)
- buf.EncodeUint32(m.OutsideVrfID)
- buf.EncodeUint32(m.InsideVrfID)
- buf.EncodeUint32(m.Nat64BibBuckets)
- buf.EncodeUint32(m.Nat64BibMemorySize)
- buf.EncodeUint32(m.Nat64StBuckets)
- buf.EncodeUint32(m.Nat64StMemorySize)
- return buf.Bytes(), nil
-}
-func (m *NatShowConfigReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.StaticMappingOnly = buf.DecodeBool()
- m.StaticMappingConnectionTracking = buf.DecodeBool()
- m.Deterministic = buf.DecodeBool()
- m.EndpointDependent = buf.DecodeBool()
- m.Out2inDpo = buf.DecodeBool()
- m.DsliteCe = buf.DecodeBool()
- m.TranslationBuckets = buf.DecodeUint32()
- m.TranslationMemorySize = buf.DecodeUint32()
- m.UserBuckets = buf.DecodeUint32()
- m.UserMemorySize = buf.DecodeUint32()
- m.MaxTranslationsPerUser = buf.DecodeUint32()
- m.OutsideVrfID = buf.DecodeUint32()
- m.InsideVrfID = buf.DecodeUint32()
- m.Nat64BibBuckets = buf.DecodeUint32()
- m.Nat64BibMemorySize = buf.DecodeUint32()
- m.Nat64StBuckets = buf.DecodeUint32()
- m.Nat64StMemorySize = buf.DecodeUint32()
- return nil
-}
-
-// NatWorkerDetails defines message 'nat_worker_details'.
-type NatWorkerDetails struct {
- WorkerIndex uint32 `binapi:"u32,name=worker_index" json:"worker_index,omitempty"`
- LcoreID uint32 `binapi:"u32,name=lcore_id" json:"lcore_id,omitempty"`
- Name string `binapi:"string[64],name=name" json:"name,omitempty"`
-}
-
-func (m *NatWorkerDetails) Reset() { *m = NatWorkerDetails{} }
-func (*NatWorkerDetails) GetMessageName() string { return "nat_worker_details" }
-func (*NatWorkerDetails) GetCrcString() string { return "84bf06fc" }
-func (*NatWorkerDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *NatWorkerDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.WorkerIndex
- size += 4 // m.LcoreID
- size += 64 // m.Name
- return size
-}
-func (m *NatWorkerDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.WorkerIndex)
- buf.EncodeUint32(m.LcoreID)
- buf.EncodeString(m.Name, 64)
- return buf.Bytes(), nil
-}
-func (m *NatWorkerDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.WorkerIndex = buf.DecodeUint32()
- m.LcoreID = buf.DecodeUint32()
- m.Name = buf.DecodeString(64)
- return nil
-}
-
-// NatWorkerDump defines message 'nat_worker_dump'.
-type NatWorkerDump struct{}
-
-func (m *NatWorkerDump) Reset() { *m = NatWorkerDump{} }
-func (*NatWorkerDump) GetMessageName() string { return "nat_worker_dump" }
-func (*NatWorkerDump) GetCrcString() string { return "51077d14" }
-func (*NatWorkerDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *NatWorkerDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *NatWorkerDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *NatWorkerDump) Unmarshal(b []byte) error {
- return nil
-}
-
-func init() { file_nat_binapi_init() }
-func file_nat_binapi_init() {
- api.RegisterMessage((*DsliteAddDelPoolAddrRange)(nil), "dslite_add_del_pool_addr_range_c448457a")
- api.RegisterMessage((*DsliteAddDelPoolAddrRangeReply)(nil), "dslite_add_del_pool_addr_range_reply_e8d4e804")
- api.RegisterMessage((*DsliteAddressDetails)(nil), "dslite_address_details_ec26d648")
- api.RegisterMessage((*DsliteAddressDump)(nil), "dslite_address_dump_51077d14")
- api.RegisterMessage((*DsliteGetAftrAddr)(nil), "dslite_get_aftr_addr_51077d14")
- api.RegisterMessage((*DsliteGetAftrAddrReply)(nil), "dslite_get_aftr_addr_reply_38e30db1")
- api.RegisterMessage((*DsliteGetB4Addr)(nil), "dslite_get_b4_addr_51077d14")
- api.RegisterMessage((*DsliteGetB4AddrReply)(nil), "dslite_get_b4_addr_reply_38e30db1")
- api.RegisterMessage((*DsliteSetAftrAddr)(nil), "dslite_set_aftr_addr_1e955f8d")
- api.RegisterMessage((*DsliteSetAftrAddrReply)(nil), "dslite_set_aftr_addr_reply_e8d4e804")
- api.RegisterMessage((*DsliteSetB4Addr)(nil), "dslite_set_b4_addr_1e955f8d")
- api.RegisterMessage((*DsliteSetB4AddrReply)(nil), "dslite_set_b4_addr_reply_e8d4e804")
- api.RegisterMessage((*Nat44AddDelAddressRange)(nil), "nat44_add_del_address_range_d4c7568c")
- api.RegisterMessage((*Nat44AddDelAddressRangeReply)(nil), "nat44_add_del_address_range_reply_e8d4e804")
- api.RegisterMessage((*Nat44AddDelIdentityMapping)(nil), "nat44_add_del_identity_mapping_8e12743f")
- api.RegisterMessage((*Nat44AddDelIdentityMappingReply)(nil), "nat44_add_del_identity_mapping_reply_e8d4e804")
- api.RegisterMessage((*Nat44AddDelInterfaceAddr)(nil), "nat44_add_del_interface_addr_fc835325")
- api.RegisterMessage((*Nat44AddDelInterfaceAddrReply)(nil), "nat44_add_del_interface_addr_reply_e8d4e804")
- api.RegisterMessage((*Nat44AddDelLbStaticMapping)(nil), "nat44_add_del_lb_static_mapping_53b24611")
- api.RegisterMessage((*Nat44AddDelLbStaticMappingReply)(nil), "nat44_add_del_lb_static_mapping_reply_e8d4e804")
- api.RegisterMessage((*Nat44AddDelStaticMapping)(nil), "nat44_add_del_static_mapping_e165e83b")
- api.RegisterMessage((*Nat44AddDelStaticMappingReply)(nil), "nat44_add_del_static_mapping_reply_e8d4e804")
- api.RegisterMessage((*Nat44AddressDetails)(nil), "nat44_address_details_45410ac4")
- api.RegisterMessage((*Nat44AddressDump)(nil), "nat44_address_dump_51077d14")
- api.RegisterMessage((*Nat44DelSession)(nil), "nat44_del_session_4c49c387")
- api.RegisterMessage((*Nat44DelSessionReply)(nil), "nat44_del_session_reply_e8d4e804")
- api.RegisterMessage((*Nat44ForwardingEnableDisable)(nil), "nat44_forwarding_enable_disable_b3e225d2")
- api.RegisterMessage((*Nat44ForwardingEnableDisableReply)(nil), "nat44_forwarding_enable_disable_reply_e8d4e804")
- api.RegisterMessage((*Nat44ForwardingIsEnabled)(nil), "nat44_forwarding_is_enabled_51077d14")
- api.RegisterMessage((*Nat44ForwardingIsEnabledReply)(nil), "nat44_forwarding_is_enabled_reply_46924a06")
- api.RegisterMessage((*Nat44IdentityMappingDetails)(nil), "nat44_identity_mapping_details_36d21351")
- api.RegisterMessage((*Nat44IdentityMappingDump)(nil), "nat44_identity_mapping_dump_51077d14")
- api.RegisterMessage((*Nat44InterfaceAddDelFeature)(nil), "nat44_interface_add_del_feature_f3699b83")
- api.RegisterMessage((*Nat44InterfaceAddDelFeatureReply)(nil), "nat44_interface_add_del_feature_reply_e8d4e804")
- api.RegisterMessage((*Nat44InterfaceAddDelOutputFeature)(nil), "nat44_interface_add_del_output_feature_f3699b83")
- api.RegisterMessage((*Nat44InterfaceAddDelOutputFeatureReply)(nil), "nat44_interface_add_del_output_feature_reply_e8d4e804")
- api.RegisterMessage((*Nat44InterfaceAddrDetails)(nil), "nat44_interface_addr_details_3e687514")
- api.RegisterMessage((*Nat44InterfaceAddrDump)(nil), "nat44_interface_addr_dump_51077d14")
- api.RegisterMessage((*Nat44InterfaceDetails)(nil), "nat44_interface_details_5d286289")
- api.RegisterMessage((*Nat44InterfaceDump)(nil), "nat44_interface_dump_51077d14")
- api.RegisterMessage((*Nat44InterfaceOutputFeatureDetails)(nil), "nat44_interface_output_feature_details_5d286289")
- api.RegisterMessage((*Nat44InterfaceOutputFeatureDump)(nil), "nat44_interface_output_feature_dump_51077d14")
- api.RegisterMessage((*Nat44LbStaticMappingAddDelLocal)(nil), "nat44_lb_static_mapping_add_del_local_2910a151")
- api.RegisterMessage((*Nat44LbStaticMappingAddDelLocalReply)(nil), "nat44_lb_static_mapping_add_del_local_reply_e8d4e804")
- api.RegisterMessage((*Nat44LbStaticMappingDetails)(nil), "nat44_lb_static_mapping_details_2267b9e8")
- api.RegisterMessage((*Nat44LbStaticMappingDump)(nil), "nat44_lb_static_mapping_dump_51077d14")
- api.RegisterMessage((*Nat44StaticMappingDetails)(nil), "nat44_static_mapping_details_1a433ef7")
- api.RegisterMessage((*Nat44StaticMappingDump)(nil), "nat44_static_mapping_dump_51077d14")
- api.RegisterMessage((*Nat44UserDetails)(nil), "nat44_user_details_355896c2")
- api.RegisterMessage((*Nat44UserDump)(nil), "nat44_user_dump_51077d14")
- api.RegisterMessage((*Nat44UserSessionDetails)(nil), "nat44_user_session_details_1965fd69")
- api.RegisterMessage((*Nat44UserSessionDump)(nil), "nat44_user_session_dump_e1899c98")
- api.RegisterMessage((*Nat64AddDelInterface)(nil), "nat64_add_del_interface_f3699b83")
- api.RegisterMessage((*Nat64AddDelInterfaceAddr)(nil), "nat64_add_del_interface_addr_47d6e753")
- api.RegisterMessage((*Nat64AddDelInterfaceAddrReply)(nil), "nat64_add_del_interface_addr_reply_e8d4e804")
- api.RegisterMessage((*Nat64AddDelInterfaceReply)(nil), "nat64_add_del_interface_reply_e8d4e804")
- api.RegisterMessage((*Nat64AddDelPoolAddrRange)(nil), "nat64_add_del_pool_addr_range_21234ef3")
- api.RegisterMessage((*Nat64AddDelPoolAddrRangeReply)(nil), "nat64_add_del_pool_addr_range_reply_e8d4e804")
- api.RegisterMessage((*Nat64AddDelPrefix)(nil), "nat64_add_del_prefix_727b2f4c")
- api.RegisterMessage((*Nat64AddDelPrefixReply)(nil), "nat64_add_del_prefix_reply_e8d4e804")
- api.RegisterMessage((*Nat64AddDelStaticBib)(nil), "nat64_add_del_static_bib_90fae58a")
- api.RegisterMessage((*Nat64AddDelStaticBibReply)(nil), "nat64_add_del_static_bib_reply_e8d4e804")
- api.RegisterMessage((*Nat64BibDetails)(nil), "nat64_bib_details_62c8541d")
- api.RegisterMessage((*Nat64BibDump)(nil), "nat64_bib_dump_cfcb6b75")
- api.RegisterMessage((*Nat64InterfaceDetails)(nil), "nat64_interface_details_5d286289")
- api.RegisterMessage((*Nat64InterfaceDump)(nil), "nat64_interface_dump_51077d14")
- api.RegisterMessage((*Nat64PoolAddrDetails)(nil), "nat64_pool_addr_details_9bb99cdb")
- api.RegisterMessage((*Nat64PoolAddrDump)(nil), "nat64_pool_addr_dump_51077d14")
- api.RegisterMessage((*Nat64PrefixDetails)(nil), "nat64_prefix_details_20568de3")
- api.RegisterMessage((*Nat64PrefixDump)(nil), "nat64_prefix_dump_51077d14")
- api.RegisterMessage((*Nat64StDetails)(nil), "nat64_st_details_c770d620")
- api.RegisterMessage((*Nat64StDump)(nil), "nat64_st_dump_cfcb6b75")
- api.RegisterMessage((*Nat66AddDelInterface)(nil), "nat66_add_del_interface_f3699b83")
- api.RegisterMessage((*Nat66AddDelInterfaceReply)(nil), "nat66_add_del_interface_reply_e8d4e804")
- api.RegisterMessage((*Nat66AddDelStaticMapping)(nil), "nat66_add_del_static_mapping_fb64e50b")
- api.RegisterMessage((*Nat66AddDelStaticMappingReply)(nil), "nat66_add_del_static_mapping_reply_e8d4e804")
- api.RegisterMessage((*Nat66InterfaceDetails)(nil), "nat66_interface_details_5d286289")
- api.RegisterMessage((*Nat66InterfaceDump)(nil), "nat66_interface_dump_51077d14")
- api.RegisterMessage((*Nat66StaticMappingDetails)(nil), "nat66_static_mapping_details_5c568448")
- api.RegisterMessage((*Nat66StaticMappingDump)(nil), "nat66_static_mapping_dump_51077d14")
- api.RegisterMessage((*NatControlPing)(nil), "nat_control_ping_51077d14")
- api.RegisterMessage((*NatControlPingReply)(nil), "nat_control_ping_reply_f6b0b8ca")
- api.RegisterMessage((*NatDetAddDelMap)(nil), "nat_det_add_del_map_112fde05")
- api.RegisterMessage((*NatDetAddDelMapReply)(nil), "nat_det_add_del_map_reply_e8d4e804")
- api.RegisterMessage((*NatDetCloseSessionIn)(nil), "nat_det_close_session_in_0a10ef64")
- api.RegisterMessage((*NatDetCloseSessionInReply)(nil), "nat_det_close_session_in_reply_e8d4e804")
- api.RegisterMessage((*NatDetCloseSessionOut)(nil), "nat_det_close_session_out_c1b6cbfb")
- api.RegisterMessage((*NatDetCloseSessionOutReply)(nil), "nat_det_close_session_out_reply_e8d4e804")
- api.RegisterMessage((*NatDetForward)(nil), "nat_det_forward_7f8a89cd")
- api.RegisterMessage((*NatDetForwardReply)(nil), "nat_det_forward_reply_a8ccbdc0")
- api.RegisterMessage((*NatDetMapDetails)(nil), "nat_det_map_details_88000ee1")
- api.RegisterMessage((*NatDetMapDump)(nil), "nat_det_map_dump_51077d14")
- api.RegisterMessage((*NatDetReverse)(nil), "nat_det_reverse_a7573fe1")
- api.RegisterMessage((*NatDetReverseReply)(nil), "nat_det_reverse_reply_34066d48")
- api.RegisterMessage((*NatDetSessionDetails)(nil), "nat_det_session_details_27f3c171")
- api.RegisterMessage((*NatDetSessionDump)(nil), "nat_det_session_dump_e45a3af7")
- api.RegisterMessage((*NatGetAddrAndPortAllocAlg)(nil), "nat_get_addr_and_port_alloc_alg_51077d14")
- api.RegisterMessage((*NatGetAddrAndPortAllocAlgReply)(nil), "nat_get_addr_and_port_alloc_alg_reply_3607a7d0")
- api.RegisterMessage((*NatGetMssClamping)(nil), "nat_get_mss_clamping_51077d14")
- api.RegisterMessage((*NatGetMssClampingReply)(nil), "nat_get_mss_clamping_reply_1c0b2a78")
- api.RegisterMessage((*NatGetTimeouts)(nil), "nat_get_timeouts_51077d14")
- api.RegisterMessage((*NatGetTimeoutsReply)(nil), "nat_get_timeouts_reply_3c4df4e1")
- api.RegisterMessage((*NatHaFlush)(nil), "nat_ha_flush_51077d14")
- api.RegisterMessage((*NatHaFlushReply)(nil), "nat_ha_flush_reply_e8d4e804")
- api.RegisterMessage((*NatHaGetFailover)(nil), "nat_ha_get_failover_51077d14")
- api.RegisterMessage((*NatHaGetFailoverReply)(nil), "nat_ha_get_failover_reply_a67d8752")
- api.RegisterMessage((*NatHaGetListener)(nil), "nat_ha_get_listener_51077d14")
- api.RegisterMessage((*NatHaGetListenerReply)(nil), "nat_ha_get_listener_reply_123ea41f")
- api.RegisterMessage((*NatHaResync)(nil), "nat_ha_resync_c8ab9e03")
- api.RegisterMessage((*NatHaResyncCompletedEvent)(nil), "nat_ha_resync_completed_event_fdc598fb")
- api.RegisterMessage((*NatHaResyncReply)(nil), "nat_ha_resync_reply_e8d4e804")
- api.RegisterMessage((*NatHaSetFailover)(nil), "nat_ha_set_failover_718246af")
- api.RegisterMessage((*NatHaSetFailoverReply)(nil), "nat_ha_set_failover_reply_e8d4e804")
- api.RegisterMessage((*NatHaSetListener)(nil), "nat_ha_set_listener_e4a8cb4e")
- api.RegisterMessage((*NatHaSetListenerReply)(nil), "nat_ha_set_listener_reply_e8d4e804")
- api.RegisterMessage((*NatIpfixEnableDisable)(nil), "nat_ipfix_enable_disable_9af4a2d2")
- api.RegisterMessage((*NatIpfixEnableDisableReply)(nil), "nat_ipfix_enable_disable_reply_e8d4e804")
- api.RegisterMessage((*NatSetAddrAndPortAllocAlg)(nil), "nat_set_addr_and_port_alloc_alg_deeb746f")
- api.RegisterMessage((*NatSetAddrAndPortAllocAlgReply)(nil), "nat_set_addr_and_port_alloc_alg_reply_e8d4e804")
- api.RegisterMessage((*NatSetLogLevel)(nil), "nat_set_log_level_70076bfe")
- api.RegisterMessage((*NatSetLogLevelReply)(nil), "nat_set_log_level_reply_e8d4e804")
- api.RegisterMessage((*NatSetMssClamping)(nil), "nat_set_mss_clamping_25e90abb")
- api.RegisterMessage((*NatSetMssClampingReply)(nil), "nat_set_mss_clamping_reply_e8d4e804")
- api.RegisterMessage((*NatSetTimeouts)(nil), "nat_set_timeouts_d4746b16")
- api.RegisterMessage((*NatSetTimeoutsReply)(nil), "nat_set_timeouts_reply_e8d4e804")
- api.RegisterMessage((*NatSetWorkers)(nil), "nat_set_workers_da926638")
- api.RegisterMessage((*NatSetWorkersReply)(nil), "nat_set_workers_reply_e8d4e804")
- api.RegisterMessage((*NatShowConfig)(nil), "nat_show_config_51077d14")
- api.RegisterMessage((*NatShowConfigReply)(nil), "nat_show_config_reply_006a0786")
- api.RegisterMessage((*NatWorkerDetails)(nil), "nat_worker_details_84bf06fc")
- api.RegisterMessage((*NatWorkerDump)(nil), "nat_worker_dump_51077d14")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*DsliteAddDelPoolAddrRange)(nil),
- (*DsliteAddDelPoolAddrRangeReply)(nil),
- (*DsliteAddressDetails)(nil),
- (*DsliteAddressDump)(nil),
- (*DsliteGetAftrAddr)(nil),
- (*DsliteGetAftrAddrReply)(nil),
- (*DsliteGetB4Addr)(nil),
- (*DsliteGetB4AddrReply)(nil),
- (*DsliteSetAftrAddr)(nil),
- (*DsliteSetAftrAddrReply)(nil),
- (*DsliteSetB4Addr)(nil),
- (*DsliteSetB4AddrReply)(nil),
- (*Nat44AddDelAddressRange)(nil),
- (*Nat44AddDelAddressRangeReply)(nil),
- (*Nat44AddDelIdentityMapping)(nil),
- (*Nat44AddDelIdentityMappingReply)(nil),
- (*Nat44AddDelInterfaceAddr)(nil),
- (*Nat44AddDelInterfaceAddrReply)(nil),
- (*Nat44AddDelLbStaticMapping)(nil),
- (*Nat44AddDelLbStaticMappingReply)(nil),
- (*Nat44AddDelStaticMapping)(nil),
- (*Nat44AddDelStaticMappingReply)(nil),
- (*Nat44AddressDetails)(nil),
- (*Nat44AddressDump)(nil),
- (*Nat44DelSession)(nil),
- (*Nat44DelSessionReply)(nil),
- (*Nat44ForwardingEnableDisable)(nil),
- (*Nat44ForwardingEnableDisableReply)(nil),
- (*Nat44ForwardingIsEnabled)(nil),
- (*Nat44ForwardingIsEnabledReply)(nil),
- (*Nat44IdentityMappingDetails)(nil),
- (*Nat44IdentityMappingDump)(nil),
- (*Nat44InterfaceAddDelFeature)(nil),
- (*Nat44InterfaceAddDelFeatureReply)(nil),
- (*Nat44InterfaceAddDelOutputFeature)(nil),
- (*Nat44InterfaceAddDelOutputFeatureReply)(nil),
- (*Nat44InterfaceAddrDetails)(nil),
- (*Nat44InterfaceAddrDump)(nil),
- (*Nat44InterfaceDetails)(nil),
- (*Nat44InterfaceDump)(nil),
- (*Nat44InterfaceOutputFeatureDetails)(nil),
- (*Nat44InterfaceOutputFeatureDump)(nil),
- (*Nat44LbStaticMappingAddDelLocal)(nil),
- (*Nat44LbStaticMappingAddDelLocalReply)(nil),
- (*Nat44LbStaticMappingDetails)(nil),
- (*Nat44LbStaticMappingDump)(nil),
- (*Nat44StaticMappingDetails)(nil),
- (*Nat44StaticMappingDump)(nil),
- (*Nat44UserDetails)(nil),
- (*Nat44UserDump)(nil),
- (*Nat44UserSessionDetails)(nil),
- (*Nat44UserSessionDump)(nil),
- (*Nat64AddDelInterface)(nil),
- (*Nat64AddDelInterfaceAddr)(nil),
- (*Nat64AddDelInterfaceAddrReply)(nil),
- (*Nat64AddDelInterfaceReply)(nil),
- (*Nat64AddDelPoolAddrRange)(nil),
- (*Nat64AddDelPoolAddrRangeReply)(nil),
- (*Nat64AddDelPrefix)(nil),
- (*Nat64AddDelPrefixReply)(nil),
- (*Nat64AddDelStaticBib)(nil),
- (*Nat64AddDelStaticBibReply)(nil),
- (*Nat64BibDetails)(nil),
- (*Nat64BibDump)(nil),
- (*Nat64InterfaceDetails)(nil),
- (*Nat64InterfaceDump)(nil),
- (*Nat64PoolAddrDetails)(nil),
- (*Nat64PoolAddrDump)(nil),
- (*Nat64PrefixDetails)(nil),
- (*Nat64PrefixDump)(nil),
- (*Nat64StDetails)(nil),
- (*Nat64StDump)(nil),
- (*Nat66AddDelInterface)(nil),
- (*Nat66AddDelInterfaceReply)(nil),
- (*Nat66AddDelStaticMapping)(nil),
- (*Nat66AddDelStaticMappingReply)(nil),
- (*Nat66InterfaceDetails)(nil),
- (*Nat66InterfaceDump)(nil),
- (*Nat66StaticMappingDetails)(nil),
- (*Nat66StaticMappingDump)(nil),
- (*NatControlPing)(nil),
- (*NatControlPingReply)(nil),
- (*NatDetAddDelMap)(nil),
- (*NatDetAddDelMapReply)(nil),
- (*NatDetCloseSessionIn)(nil),
- (*NatDetCloseSessionInReply)(nil),
- (*NatDetCloseSessionOut)(nil),
- (*NatDetCloseSessionOutReply)(nil),
- (*NatDetForward)(nil),
- (*NatDetForwardReply)(nil),
- (*NatDetMapDetails)(nil),
- (*NatDetMapDump)(nil),
- (*NatDetReverse)(nil),
- (*NatDetReverseReply)(nil),
- (*NatDetSessionDetails)(nil),
- (*NatDetSessionDump)(nil),
- (*NatGetAddrAndPortAllocAlg)(nil),
- (*NatGetAddrAndPortAllocAlgReply)(nil),
- (*NatGetMssClamping)(nil),
- (*NatGetMssClampingReply)(nil),
- (*NatGetTimeouts)(nil),
- (*NatGetTimeoutsReply)(nil),
- (*NatHaFlush)(nil),
- (*NatHaFlushReply)(nil),
- (*NatHaGetFailover)(nil),
- (*NatHaGetFailoverReply)(nil),
- (*NatHaGetListener)(nil),
- (*NatHaGetListenerReply)(nil),
- (*NatHaResync)(nil),
- (*NatHaResyncCompletedEvent)(nil),
- (*NatHaResyncReply)(nil),
- (*NatHaSetFailover)(nil),
- (*NatHaSetFailoverReply)(nil),
- (*NatHaSetListener)(nil),
- (*NatHaSetListenerReply)(nil),
- (*NatIpfixEnableDisable)(nil),
- (*NatIpfixEnableDisableReply)(nil),
- (*NatSetAddrAndPortAllocAlg)(nil),
- (*NatSetAddrAndPortAllocAlgReply)(nil),
- (*NatSetLogLevel)(nil),
- (*NatSetLogLevelReply)(nil),
- (*NatSetMssClamping)(nil),
- (*NatSetMssClampingReply)(nil),
- (*NatSetTimeouts)(nil),
- (*NatSetTimeoutsReply)(nil),
- (*NatSetWorkers)(nil),
- (*NatSetWorkersReply)(nil),
- (*NatShowConfig)(nil),
- (*NatShowConfigReply)(nil),
- (*NatWorkerDetails)(nil),
- (*NatWorkerDump)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/nat/nat_rpc.ba.go b/internal/testbinapi/binapi2001/nat/nat_rpc.ba.go
deleted file mode 100644
index 32d74c2..0000000
--- a/internal/testbinapi/binapi2001/nat/nat_rpc.ba.go
+++ /dev/null
@@ -1,1354 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package nat
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service nat.
-type RPCService interface {
- DsliteAddDelPoolAddrRange(ctx context.Context, in *DsliteAddDelPoolAddrRange) (*DsliteAddDelPoolAddrRangeReply, error)
- DsliteAddressDump(ctx context.Context, in *DsliteAddressDump) (RPCService_DsliteAddressDumpClient, error)
- DsliteGetAftrAddr(ctx context.Context, in *DsliteGetAftrAddr) (*DsliteGetAftrAddrReply, error)
- DsliteGetB4Addr(ctx context.Context, in *DsliteGetB4Addr) (*DsliteGetB4AddrReply, error)
- DsliteSetAftrAddr(ctx context.Context, in *DsliteSetAftrAddr) (*DsliteSetAftrAddrReply, error)
- DsliteSetB4Addr(ctx context.Context, in *DsliteSetB4Addr) (*DsliteSetB4AddrReply, error)
- Nat44AddDelAddressRange(ctx context.Context, in *Nat44AddDelAddressRange) (*Nat44AddDelAddressRangeReply, error)
- Nat44AddDelIdentityMapping(ctx context.Context, in *Nat44AddDelIdentityMapping) (*Nat44AddDelIdentityMappingReply, error)
- Nat44AddDelInterfaceAddr(ctx context.Context, in *Nat44AddDelInterfaceAddr) (*Nat44AddDelInterfaceAddrReply, error)
- Nat44AddDelLbStaticMapping(ctx context.Context, in *Nat44AddDelLbStaticMapping) (*Nat44AddDelLbStaticMappingReply, error)
- Nat44AddDelStaticMapping(ctx context.Context, in *Nat44AddDelStaticMapping) (*Nat44AddDelStaticMappingReply, error)
- Nat44AddressDump(ctx context.Context, in *Nat44AddressDump) (RPCService_Nat44AddressDumpClient, error)
- Nat44DelSession(ctx context.Context, in *Nat44DelSession) (*Nat44DelSessionReply, error)
- Nat44ForwardingEnableDisable(ctx context.Context, in *Nat44ForwardingEnableDisable) (*Nat44ForwardingEnableDisableReply, error)
- Nat44ForwardingIsEnabled(ctx context.Context, in *Nat44ForwardingIsEnabled) (*Nat44ForwardingIsEnabledReply, error)
- Nat44IdentityMappingDump(ctx context.Context, in *Nat44IdentityMappingDump) (RPCService_Nat44IdentityMappingDumpClient, error)
- Nat44InterfaceAddDelFeature(ctx context.Context, in *Nat44InterfaceAddDelFeature) (*Nat44InterfaceAddDelFeatureReply, error)
- Nat44InterfaceAddDelOutputFeature(ctx context.Context, in *Nat44InterfaceAddDelOutputFeature) (*Nat44InterfaceAddDelOutputFeatureReply, error)
- Nat44InterfaceAddrDump(ctx context.Context, in *Nat44InterfaceAddrDump) (RPCService_Nat44InterfaceAddrDumpClient, error)
- Nat44InterfaceDump(ctx context.Context, in *Nat44InterfaceDump) (RPCService_Nat44InterfaceDumpClient, error)
- Nat44InterfaceOutputFeatureDump(ctx context.Context, in *Nat44InterfaceOutputFeatureDump) (RPCService_Nat44InterfaceOutputFeatureDumpClient, error)
- Nat44LbStaticMappingAddDelLocal(ctx context.Context, in *Nat44LbStaticMappingAddDelLocal) (*Nat44LbStaticMappingAddDelLocalReply, error)
- Nat44LbStaticMappingDump(ctx context.Context, in *Nat44LbStaticMappingDump) (RPCService_Nat44LbStaticMappingDumpClient, error)
- Nat44StaticMappingDump(ctx context.Context, in *Nat44StaticMappingDump) (RPCService_Nat44StaticMappingDumpClient, error)
- Nat44UserDump(ctx context.Context, in *Nat44UserDump) (RPCService_Nat44UserDumpClient, error)
- Nat44UserSessionDump(ctx context.Context, in *Nat44UserSessionDump) (RPCService_Nat44UserSessionDumpClient, error)
- Nat64AddDelInterface(ctx context.Context, in *Nat64AddDelInterface) (*Nat64AddDelInterfaceReply, error)
- Nat64AddDelInterfaceAddr(ctx context.Context, in *Nat64AddDelInterfaceAddr) (*Nat64AddDelInterfaceAddrReply, error)
- Nat64AddDelPoolAddrRange(ctx context.Context, in *Nat64AddDelPoolAddrRange) (*Nat64AddDelPoolAddrRangeReply, error)
- Nat64AddDelPrefix(ctx context.Context, in *Nat64AddDelPrefix) (*Nat64AddDelPrefixReply, error)
- Nat64AddDelStaticBib(ctx context.Context, in *Nat64AddDelStaticBib) (*Nat64AddDelStaticBibReply, error)
- Nat64BibDump(ctx context.Context, in *Nat64BibDump) (RPCService_Nat64BibDumpClient, error)
- Nat64InterfaceDump(ctx context.Context, in *Nat64InterfaceDump) (RPCService_Nat64InterfaceDumpClient, error)
- Nat64PoolAddrDump(ctx context.Context, in *Nat64PoolAddrDump) (RPCService_Nat64PoolAddrDumpClient, error)
- Nat64PrefixDump(ctx context.Context, in *Nat64PrefixDump) (RPCService_Nat64PrefixDumpClient, error)
- Nat64StDump(ctx context.Context, in *Nat64StDump) (RPCService_Nat64StDumpClient, error)
- Nat66AddDelInterface(ctx context.Context, in *Nat66AddDelInterface) (*Nat66AddDelInterfaceReply, error)
- Nat66AddDelStaticMapping(ctx context.Context, in *Nat66AddDelStaticMapping) (*Nat66AddDelStaticMappingReply, error)
- Nat66InterfaceDump(ctx context.Context, in *Nat66InterfaceDump) (RPCService_Nat66InterfaceDumpClient, error)
- Nat66StaticMappingDump(ctx context.Context, in *Nat66StaticMappingDump) (RPCService_Nat66StaticMappingDumpClient, error)
- NatControlPing(ctx context.Context, in *NatControlPing) (*NatControlPingReply, error)
- NatDetAddDelMap(ctx context.Context, in *NatDetAddDelMap) (*NatDetAddDelMapReply, error)
- NatDetCloseSessionIn(ctx context.Context, in *NatDetCloseSessionIn) (*NatDetCloseSessionInReply, error)
- NatDetCloseSessionOut(ctx context.Context, in *NatDetCloseSessionOut) (*NatDetCloseSessionOutReply, error)
- NatDetForward(ctx context.Context, in *NatDetForward) (*NatDetForwardReply, error)
- NatDetMapDump(ctx context.Context, in *NatDetMapDump) (RPCService_NatDetMapDumpClient, error)
- NatDetReverse(ctx context.Context, in *NatDetReverse) (*NatDetReverseReply, error)
- NatDetSessionDump(ctx context.Context, in *NatDetSessionDump) (RPCService_NatDetSessionDumpClient, error)
- NatGetAddrAndPortAllocAlg(ctx context.Context, in *NatGetAddrAndPortAllocAlg) (*NatGetAddrAndPortAllocAlgReply, error)
- NatGetMssClamping(ctx context.Context, in *NatGetMssClamping) (*NatGetMssClampingReply, error)
- NatGetTimeouts(ctx context.Context, in *NatGetTimeouts) (*NatGetTimeoutsReply, error)
- NatHaFlush(ctx context.Context, in *NatHaFlush) (*NatHaFlushReply, error)
- NatHaGetFailover(ctx context.Context, in *NatHaGetFailover) (*NatHaGetFailoverReply, error)
- NatHaGetListener(ctx context.Context, in *NatHaGetListener) (*NatHaGetListenerReply, error)
- NatHaResync(ctx context.Context, in *NatHaResync) (*NatHaResyncReply, error)
- NatHaSetFailover(ctx context.Context, in *NatHaSetFailover) (*NatHaSetFailoverReply, error)
- NatHaSetListener(ctx context.Context, in *NatHaSetListener) (*NatHaSetListenerReply, error)
- NatIpfixEnableDisable(ctx context.Context, in *NatIpfixEnableDisable) (*NatIpfixEnableDisableReply, error)
- NatSetAddrAndPortAllocAlg(ctx context.Context, in *NatSetAddrAndPortAllocAlg) (*NatSetAddrAndPortAllocAlgReply, error)
- NatSetLogLevel(ctx context.Context, in *NatSetLogLevel) (*NatSetLogLevelReply, error)
- NatSetMssClamping(ctx context.Context, in *NatSetMssClamping) (*NatSetMssClampingReply, error)
- NatSetTimeouts(ctx context.Context, in *NatSetTimeouts) (*NatSetTimeoutsReply, error)
- NatSetWorkers(ctx context.Context, in *NatSetWorkers) (*NatSetWorkersReply, error)
- NatShowConfig(ctx context.Context, in *NatShowConfig) (*NatShowConfigReply, error)
- NatWorkerDump(ctx context.Context, in *NatWorkerDump) (RPCService_NatWorkerDumpClient, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) DsliteAddDelPoolAddrRange(ctx context.Context, in *DsliteAddDelPoolAddrRange) (*DsliteAddDelPoolAddrRangeReply, error) {
- out := new(DsliteAddDelPoolAddrRangeReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) DsliteAddressDump(ctx context.Context, in *DsliteAddressDump) (RPCService_DsliteAddressDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_DsliteAddressDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_DsliteAddressDumpClient interface {
- Recv() (*DsliteAddressDetails, error)
- api.Stream
-}
-
-type serviceClient_DsliteAddressDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_DsliteAddressDumpClient) Recv() (*DsliteAddressDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *DsliteAddressDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) DsliteGetAftrAddr(ctx context.Context, in *DsliteGetAftrAddr) (*DsliteGetAftrAddrReply, error) {
- out := new(DsliteGetAftrAddrReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) DsliteGetB4Addr(ctx context.Context, in *DsliteGetB4Addr) (*DsliteGetB4AddrReply, error) {
- out := new(DsliteGetB4AddrReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) DsliteSetAftrAddr(ctx context.Context, in *DsliteSetAftrAddr) (*DsliteSetAftrAddrReply, error) {
- out := new(DsliteSetAftrAddrReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) DsliteSetB4Addr(ctx context.Context, in *DsliteSetB4Addr) (*DsliteSetB4AddrReply, error) {
- out := new(DsliteSetB4AddrReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) Nat44AddDelAddressRange(ctx context.Context, in *Nat44AddDelAddressRange) (*Nat44AddDelAddressRangeReply, error) {
- out := new(Nat44AddDelAddressRangeReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) Nat44AddDelIdentityMapping(ctx context.Context, in *Nat44AddDelIdentityMapping) (*Nat44AddDelIdentityMappingReply, error) {
- out := new(Nat44AddDelIdentityMappingReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) Nat44AddDelInterfaceAddr(ctx context.Context, in *Nat44AddDelInterfaceAddr) (*Nat44AddDelInterfaceAddrReply, error) {
- out := new(Nat44AddDelInterfaceAddrReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) Nat44AddDelLbStaticMapping(ctx context.Context, in *Nat44AddDelLbStaticMapping) (*Nat44AddDelLbStaticMappingReply, error) {
- out := new(Nat44AddDelLbStaticMappingReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) Nat44AddDelStaticMapping(ctx context.Context, in *Nat44AddDelStaticMapping) (*Nat44AddDelStaticMappingReply, error) {
- out := new(Nat44AddDelStaticMappingReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) Nat44AddressDump(ctx context.Context, in *Nat44AddressDump) (RPCService_Nat44AddressDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_Nat44AddressDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_Nat44AddressDumpClient interface {
- Recv() (*Nat44AddressDetails, error)
- api.Stream
-}
-
-type serviceClient_Nat44AddressDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_Nat44AddressDumpClient) Recv() (*Nat44AddressDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *Nat44AddressDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) Nat44DelSession(ctx context.Context, in *Nat44DelSession) (*Nat44DelSessionReply, error) {
- out := new(Nat44DelSessionReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) Nat44ForwardingEnableDisable(ctx context.Context, in *Nat44ForwardingEnableDisable) (*Nat44ForwardingEnableDisableReply, error) {
- out := new(Nat44ForwardingEnableDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) Nat44ForwardingIsEnabled(ctx context.Context, in *Nat44ForwardingIsEnabled) (*Nat44ForwardingIsEnabledReply, error) {
- out := new(Nat44ForwardingIsEnabledReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) Nat44IdentityMappingDump(ctx context.Context, in *Nat44IdentityMappingDump) (RPCService_Nat44IdentityMappingDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_Nat44IdentityMappingDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_Nat44IdentityMappingDumpClient interface {
- Recv() (*Nat44IdentityMappingDetails, error)
- api.Stream
-}
-
-type serviceClient_Nat44IdentityMappingDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_Nat44IdentityMappingDumpClient) Recv() (*Nat44IdentityMappingDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *Nat44IdentityMappingDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) Nat44InterfaceAddDelFeature(ctx context.Context, in *Nat44InterfaceAddDelFeature) (*Nat44InterfaceAddDelFeatureReply, error) {
- out := new(Nat44InterfaceAddDelFeatureReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) Nat44InterfaceAddDelOutputFeature(ctx context.Context, in *Nat44InterfaceAddDelOutputFeature) (*Nat44InterfaceAddDelOutputFeatureReply, error) {
- out := new(Nat44InterfaceAddDelOutputFeatureReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) Nat44InterfaceAddrDump(ctx context.Context, in *Nat44InterfaceAddrDump) (RPCService_Nat44InterfaceAddrDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_Nat44InterfaceAddrDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_Nat44InterfaceAddrDumpClient interface {
- Recv() (*Nat44InterfaceAddrDetails, error)
- api.Stream
-}
-
-type serviceClient_Nat44InterfaceAddrDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_Nat44InterfaceAddrDumpClient) Recv() (*Nat44InterfaceAddrDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *Nat44InterfaceAddrDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) Nat44InterfaceDump(ctx context.Context, in *Nat44InterfaceDump) (RPCService_Nat44InterfaceDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_Nat44InterfaceDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_Nat44InterfaceDumpClient interface {
- Recv() (*Nat44InterfaceDetails, error)
- api.Stream
-}
-
-type serviceClient_Nat44InterfaceDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_Nat44InterfaceDumpClient) Recv() (*Nat44InterfaceDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *Nat44InterfaceDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) Nat44InterfaceOutputFeatureDump(ctx context.Context, in *Nat44InterfaceOutputFeatureDump) (RPCService_Nat44InterfaceOutputFeatureDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_Nat44InterfaceOutputFeatureDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_Nat44InterfaceOutputFeatureDumpClient interface {
- Recv() (*Nat44InterfaceOutputFeatureDetails, error)
- api.Stream
-}
-
-type serviceClient_Nat44InterfaceOutputFeatureDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_Nat44InterfaceOutputFeatureDumpClient) Recv() (*Nat44InterfaceOutputFeatureDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *Nat44InterfaceOutputFeatureDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) Nat44LbStaticMappingAddDelLocal(ctx context.Context, in *Nat44LbStaticMappingAddDelLocal) (*Nat44LbStaticMappingAddDelLocalReply, error) {
- out := new(Nat44LbStaticMappingAddDelLocalReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) Nat44LbStaticMappingDump(ctx context.Context, in *Nat44LbStaticMappingDump) (RPCService_Nat44LbStaticMappingDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_Nat44LbStaticMappingDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_Nat44LbStaticMappingDumpClient interface {
- Recv() (*Nat44LbStaticMappingDetails, error)
- api.Stream
-}
-
-type serviceClient_Nat44LbStaticMappingDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_Nat44LbStaticMappingDumpClient) Recv() (*Nat44LbStaticMappingDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *Nat44LbStaticMappingDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) Nat44StaticMappingDump(ctx context.Context, in *Nat44StaticMappingDump) (RPCService_Nat44StaticMappingDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_Nat44StaticMappingDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_Nat44StaticMappingDumpClient interface {
- Recv() (*Nat44StaticMappingDetails, error)
- api.Stream
-}
-
-type serviceClient_Nat44StaticMappingDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_Nat44StaticMappingDumpClient) Recv() (*Nat44StaticMappingDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *Nat44StaticMappingDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) Nat44UserDump(ctx context.Context, in *Nat44UserDump) (RPCService_Nat44UserDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_Nat44UserDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_Nat44UserDumpClient interface {
- Recv() (*Nat44UserDetails, error)
- api.Stream
-}
-
-type serviceClient_Nat44UserDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_Nat44UserDumpClient) Recv() (*Nat44UserDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *Nat44UserDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) Nat44UserSessionDump(ctx context.Context, in *Nat44UserSessionDump) (RPCService_Nat44UserSessionDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_Nat44UserSessionDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_Nat44UserSessionDumpClient interface {
- Recv() (*Nat44UserSessionDetails, error)
- api.Stream
-}
-
-type serviceClient_Nat44UserSessionDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_Nat44UserSessionDumpClient) Recv() (*Nat44UserSessionDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *Nat44UserSessionDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) Nat64AddDelInterface(ctx context.Context, in *Nat64AddDelInterface) (*Nat64AddDelInterfaceReply, error) {
- out := new(Nat64AddDelInterfaceReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) Nat64AddDelInterfaceAddr(ctx context.Context, in *Nat64AddDelInterfaceAddr) (*Nat64AddDelInterfaceAddrReply, error) {
- out := new(Nat64AddDelInterfaceAddrReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) Nat64AddDelPoolAddrRange(ctx context.Context, in *Nat64AddDelPoolAddrRange) (*Nat64AddDelPoolAddrRangeReply, error) {
- out := new(Nat64AddDelPoolAddrRangeReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) Nat64AddDelPrefix(ctx context.Context, in *Nat64AddDelPrefix) (*Nat64AddDelPrefixReply, error) {
- out := new(Nat64AddDelPrefixReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) Nat64AddDelStaticBib(ctx context.Context, in *Nat64AddDelStaticBib) (*Nat64AddDelStaticBibReply, error) {
- out := new(Nat64AddDelStaticBibReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) Nat64BibDump(ctx context.Context, in *Nat64BibDump) (RPCService_Nat64BibDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_Nat64BibDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_Nat64BibDumpClient interface {
- Recv() (*Nat64BibDetails, error)
- api.Stream
-}
-
-type serviceClient_Nat64BibDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_Nat64BibDumpClient) Recv() (*Nat64BibDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *Nat64BibDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) Nat64InterfaceDump(ctx context.Context, in *Nat64InterfaceDump) (RPCService_Nat64InterfaceDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_Nat64InterfaceDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_Nat64InterfaceDumpClient interface {
- Recv() (*Nat64InterfaceDetails, error)
- api.Stream
-}
-
-type serviceClient_Nat64InterfaceDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_Nat64InterfaceDumpClient) Recv() (*Nat64InterfaceDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *Nat64InterfaceDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) Nat64PoolAddrDump(ctx context.Context, in *Nat64PoolAddrDump) (RPCService_Nat64PoolAddrDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_Nat64PoolAddrDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_Nat64PoolAddrDumpClient interface {
- Recv() (*Nat64PoolAddrDetails, error)
- api.Stream
-}
-
-type serviceClient_Nat64PoolAddrDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_Nat64PoolAddrDumpClient) Recv() (*Nat64PoolAddrDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *Nat64PoolAddrDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) Nat64PrefixDump(ctx context.Context, in *Nat64PrefixDump) (RPCService_Nat64PrefixDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_Nat64PrefixDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_Nat64PrefixDumpClient interface {
- Recv() (*Nat64PrefixDetails, error)
- api.Stream
-}
-
-type serviceClient_Nat64PrefixDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_Nat64PrefixDumpClient) Recv() (*Nat64PrefixDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *Nat64PrefixDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) Nat64StDump(ctx context.Context, in *Nat64StDump) (RPCService_Nat64StDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_Nat64StDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_Nat64StDumpClient interface {
- Recv() (*Nat64StDetails, error)
- api.Stream
-}
-
-type serviceClient_Nat64StDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_Nat64StDumpClient) Recv() (*Nat64StDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *Nat64StDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) Nat66AddDelInterface(ctx context.Context, in *Nat66AddDelInterface) (*Nat66AddDelInterfaceReply, error) {
- out := new(Nat66AddDelInterfaceReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) Nat66AddDelStaticMapping(ctx context.Context, in *Nat66AddDelStaticMapping) (*Nat66AddDelStaticMappingReply, error) {
- out := new(Nat66AddDelStaticMappingReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) Nat66InterfaceDump(ctx context.Context, in *Nat66InterfaceDump) (RPCService_Nat66InterfaceDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_Nat66InterfaceDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_Nat66InterfaceDumpClient interface {
- Recv() (*Nat66InterfaceDetails, error)
- api.Stream
-}
-
-type serviceClient_Nat66InterfaceDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_Nat66InterfaceDumpClient) Recv() (*Nat66InterfaceDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *Nat66InterfaceDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) Nat66StaticMappingDump(ctx context.Context, in *Nat66StaticMappingDump) (RPCService_Nat66StaticMappingDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_Nat66StaticMappingDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_Nat66StaticMappingDumpClient interface {
- Recv() (*Nat66StaticMappingDetails, error)
- api.Stream
-}
-
-type serviceClient_Nat66StaticMappingDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_Nat66StaticMappingDumpClient) Recv() (*Nat66StaticMappingDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *Nat66StaticMappingDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) NatControlPing(ctx context.Context, in *NatControlPing) (*NatControlPingReply, error) {
- out := new(NatControlPingReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) NatDetAddDelMap(ctx context.Context, in *NatDetAddDelMap) (*NatDetAddDelMapReply, error) {
- out := new(NatDetAddDelMapReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) NatDetCloseSessionIn(ctx context.Context, in *NatDetCloseSessionIn) (*NatDetCloseSessionInReply, error) {
- out := new(NatDetCloseSessionInReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) NatDetCloseSessionOut(ctx context.Context, in *NatDetCloseSessionOut) (*NatDetCloseSessionOutReply, error) {
- out := new(NatDetCloseSessionOutReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) NatDetForward(ctx context.Context, in *NatDetForward) (*NatDetForwardReply, error) {
- out := new(NatDetForwardReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) NatDetMapDump(ctx context.Context, in *NatDetMapDump) (RPCService_NatDetMapDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_NatDetMapDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_NatDetMapDumpClient interface {
- Recv() (*NatDetMapDetails, error)
- api.Stream
-}
-
-type serviceClient_NatDetMapDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_NatDetMapDumpClient) Recv() (*NatDetMapDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *NatDetMapDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) NatDetReverse(ctx context.Context, in *NatDetReverse) (*NatDetReverseReply, error) {
- out := new(NatDetReverseReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) NatDetSessionDump(ctx context.Context, in *NatDetSessionDump) (RPCService_NatDetSessionDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_NatDetSessionDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_NatDetSessionDumpClient interface {
- Recv() (*NatDetSessionDetails, error)
- api.Stream
-}
-
-type serviceClient_NatDetSessionDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_NatDetSessionDumpClient) Recv() (*NatDetSessionDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *NatDetSessionDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) NatGetAddrAndPortAllocAlg(ctx context.Context, in *NatGetAddrAndPortAllocAlg) (*NatGetAddrAndPortAllocAlgReply, error) {
- out := new(NatGetAddrAndPortAllocAlgReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) NatGetMssClamping(ctx context.Context, in *NatGetMssClamping) (*NatGetMssClampingReply, error) {
- out := new(NatGetMssClampingReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) NatGetTimeouts(ctx context.Context, in *NatGetTimeouts) (*NatGetTimeoutsReply, error) {
- out := new(NatGetTimeoutsReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) NatHaFlush(ctx context.Context, in *NatHaFlush) (*NatHaFlushReply, error) {
- out := new(NatHaFlushReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) NatHaGetFailover(ctx context.Context, in *NatHaGetFailover) (*NatHaGetFailoverReply, error) {
- out := new(NatHaGetFailoverReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) NatHaGetListener(ctx context.Context, in *NatHaGetListener) (*NatHaGetListenerReply, error) {
- out := new(NatHaGetListenerReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) NatHaResync(ctx context.Context, in *NatHaResync) (*NatHaResyncReply, error) {
- out := new(NatHaResyncReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) NatHaSetFailover(ctx context.Context, in *NatHaSetFailover) (*NatHaSetFailoverReply, error) {
- out := new(NatHaSetFailoverReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) NatHaSetListener(ctx context.Context, in *NatHaSetListener) (*NatHaSetListenerReply, error) {
- out := new(NatHaSetListenerReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) NatIpfixEnableDisable(ctx context.Context, in *NatIpfixEnableDisable) (*NatIpfixEnableDisableReply, error) {
- out := new(NatIpfixEnableDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) NatSetAddrAndPortAllocAlg(ctx context.Context, in *NatSetAddrAndPortAllocAlg) (*NatSetAddrAndPortAllocAlgReply, error) {
- out := new(NatSetAddrAndPortAllocAlgReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) NatSetLogLevel(ctx context.Context, in *NatSetLogLevel) (*NatSetLogLevelReply, error) {
- out := new(NatSetLogLevelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) NatSetMssClamping(ctx context.Context, in *NatSetMssClamping) (*NatSetMssClampingReply, error) {
- out := new(NatSetMssClampingReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) NatSetTimeouts(ctx context.Context, in *NatSetTimeouts) (*NatSetTimeoutsReply, error) {
- out := new(NatSetTimeoutsReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) NatSetWorkers(ctx context.Context, in *NatSetWorkers) (*NatSetWorkersReply, error) {
- out := new(NatSetWorkersReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) NatShowConfig(ctx context.Context, in *NatShowConfig) (*NatShowConfigReply, error) {
- out := new(NatShowConfigReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) NatWorkerDump(ctx context.Context, in *NatWorkerDump) (RPCService_NatWorkerDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_NatWorkerDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_NatWorkerDumpClient interface {
- Recv() (*NatWorkerDetails, error)
- api.Stream
-}
-
-type serviceClient_NatWorkerDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_NatWorkerDumpClient) Recv() (*NatWorkerDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *NatWorkerDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
diff --git a/internal/testbinapi/binapi2001/netmap/netmap.ba.go b/internal/testbinapi/binapi2001/netmap/netmap.ba.go
deleted file mode 100644
index 99a81dc..0000000
--- a/internal/testbinapi/binapi2001/netmap/netmap.ba.go
+++ /dev/null
@@ -1,198 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/netmap.api.json
-
-// Package netmap contains generated bindings for API file netmap.api.
-//
-// Contents:
-// 4 messages
-//
-package netmap
-
-import (
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the GoVPP api package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// GoVPP api package needs to be updated.
-const _ = api.GoVppAPIPackageIsVersion2
-
-const (
- APIFile = "netmap"
- APIVersion = "1.0.0"
- VersionCrc = 0x40e7a84f
-)
-
-// NetmapCreate defines message 'netmap_create'.
-type NetmapCreate struct {
- NetmapIfName []byte `binapi:"u8[64],name=netmap_if_name" json:"netmap_if_name,omitempty"`
- HwAddr []byte `binapi:"u8[6],name=hw_addr" json:"hw_addr,omitempty"`
- UseRandomHwAddr uint8 `binapi:"u8,name=use_random_hw_addr" json:"use_random_hw_addr,omitempty"`
- IsPipe uint8 `binapi:"u8,name=is_pipe" json:"is_pipe,omitempty"`
- IsMaster uint8 `binapi:"u8,name=is_master" json:"is_master,omitempty"`
-}
-
-func (m *NetmapCreate) Reset() { *m = NetmapCreate{} }
-func (*NetmapCreate) GetMessageName() string { return "netmap_create" }
-func (*NetmapCreate) GetCrcString() string { return "5299044e" }
-func (*NetmapCreate) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *NetmapCreate) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 64 // m.NetmapIfName
- size += 1 * 6 // m.HwAddr
- size += 1 // m.UseRandomHwAddr
- size += 1 // m.IsPipe
- size += 1 // m.IsMaster
- return size
-}
-func (m *NetmapCreate) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.NetmapIfName, 64)
- buf.EncodeBytes(m.HwAddr, 6)
- buf.EncodeUint8(m.UseRandomHwAddr)
- buf.EncodeUint8(m.IsPipe)
- buf.EncodeUint8(m.IsMaster)
- return buf.Bytes(), nil
-}
-func (m *NetmapCreate) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.NetmapIfName = make([]byte, 64)
- copy(m.NetmapIfName, buf.DecodeBytes(len(m.NetmapIfName)))
- m.HwAddr = make([]byte, 6)
- copy(m.HwAddr, buf.DecodeBytes(len(m.HwAddr)))
- m.UseRandomHwAddr = buf.DecodeUint8()
- m.IsPipe = buf.DecodeUint8()
- m.IsMaster = buf.DecodeUint8()
- return nil
-}
-
-// NetmapCreateReply defines message 'netmap_create_reply'.
-type NetmapCreateReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *NetmapCreateReply) Reset() { *m = NetmapCreateReply{} }
-func (*NetmapCreateReply) GetMessageName() string { return "netmap_create_reply" }
-func (*NetmapCreateReply) GetCrcString() string { return "e8d4e804" }
-func (*NetmapCreateReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *NetmapCreateReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *NetmapCreateReply) 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 *NetmapCreateReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// NetmapDelete defines message 'netmap_delete'.
-type NetmapDelete struct {
- NetmapIfName []byte `binapi:"u8[64],name=netmap_if_name" json:"netmap_if_name,omitempty"`
-}
-
-func (m *NetmapDelete) Reset() { *m = NetmapDelete{} }
-func (*NetmapDelete) GetMessageName() string { return "netmap_delete" }
-func (*NetmapDelete) GetCrcString() string { return "a8b6c201" }
-func (*NetmapDelete) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *NetmapDelete) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 64 // m.NetmapIfName
- return size
-}
-func (m *NetmapDelete) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.NetmapIfName, 64)
- return buf.Bytes(), nil
-}
-func (m *NetmapDelete) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.NetmapIfName = make([]byte, 64)
- copy(m.NetmapIfName, buf.DecodeBytes(len(m.NetmapIfName)))
- return nil
-}
-
-// NetmapDeleteReply defines message 'netmap_delete_reply'.
-type NetmapDeleteReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *NetmapDeleteReply) Reset() { *m = NetmapDeleteReply{} }
-func (*NetmapDeleteReply) GetMessageName() string { return "netmap_delete_reply" }
-func (*NetmapDeleteReply) GetCrcString() string { return "e8d4e804" }
-func (*NetmapDeleteReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *NetmapDeleteReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *NetmapDeleteReply) 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 *NetmapDeleteReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_netmap_binapi_init() }
-func file_netmap_binapi_init() {
- api.RegisterMessage((*NetmapCreate)(nil), "netmap_create_5299044e")
- api.RegisterMessage((*NetmapCreateReply)(nil), "netmap_create_reply_e8d4e804")
- api.RegisterMessage((*NetmapDelete)(nil), "netmap_delete_a8b6c201")
- api.RegisterMessage((*NetmapDeleteReply)(nil), "netmap_delete_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*NetmapCreate)(nil),
- (*NetmapCreateReply)(nil),
- (*NetmapDelete)(nil),
- (*NetmapDeleteReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/netmap/netmap_rpc.ba.go b/internal/testbinapi/binapi2001/netmap/netmap_rpc.ba.go
deleted file mode 100644
index 9746ff7..0000000
--- a/internal/testbinapi/binapi2001/netmap/netmap_rpc.ba.go
+++ /dev/null
@@ -1,41 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package netmap
-
-import (
- "context"
-
- api "git.fd.io/govpp.git/api"
-)
-
-// RPCService defines RPC service netmap.
-type RPCService interface {
- NetmapCreate(ctx context.Context, in *NetmapCreate) (*NetmapCreateReply, error)
- NetmapDelete(ctx context.Context, in *NetmapDelete) (*NetmapDeleteReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) NetmapCreate(ctx context.Context, in *NetmapCreate) (*NetmapCreateReply, error) {
- out := new(NetmapCreateReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) NetmapDelete(ctx context.Context, in *NetmapDelete) (*NetmapDeleteReply, error) {
- out := new(NetmapDeleteReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/nhrp/nhrp.ba.go b/internal/testbinapi/binapi2001/nhrp/nhrp.ba.go
deleted file mode 100644
index 7d326b7..0000000
--- a/internal/testbinapi/binapi2001/nhrp/nhrp.ba.go
+++ /dev/null
@@ -1,1067 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/nhrp.api.json
-
-// Package nhrp contains generated bindings for API file nhrp.api.
-//
-// Contents:
-// 6 aliases
-// 10 enums
-// 7 structs
-// 1 union
-// 4 messages
-//
-package nhrp
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "nhrp"
- APIVersion = "1.0.0"
- VersionCrc = 0xfb0453b2
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// NhrpEntry defines type 'nhrp_entry'.
-type NhrpEntry struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Peer Address `binapi:"address,name=peer" json:"peer,omitempty"`
- Nh Address `binapi:"address,name=nh" json:"nh,omitempty"`
- NhTableID uint32 `binapi:"u32,name=nh_table_id" json:"nh_table_id,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
-
-// NhrpDetails defines message 'nhrp_details'.
-type NhrpDetails struct {
- Entry NhrpEntry `binapi:"nhrp_entry,name=entry" json:"entry,omitempty"`
-}
-
-func (m *NhrpDetails) Reset() { *m = NhrpDetails{} }
-func (*NhrpDetails) GetMessageName() string { return "nhrp_details" }
-func (*NhrpDetails) GetCrcString() string { return "e351c50a" }
-func (*NhrpDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *NhrpDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Entry.SwIfIndex
- size += 4 // m.Entry.Peer.Af
- size += 1 * 16 // m.Entry.Peer.Un
- size += 4 // m.Entry.Nh.Af
- size += 1 * 16 // m.Entry.Nh.Un
- size += 4 // m.Entry.NhTableID
- return size
-}
-func (m *NhrpDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.Entry.SwIfIndex))
- buf.EncodeUint32(uint32(m.Entry.Peer.Af))
- buf.EncodeBytes(m.Entry.Peer.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.Entry.Nh.Af))
- buf.EncodeBytes(m.Entry.Nh.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(m.Entry.NhTableID)
- return buf.Bytes(), nil
-}
-func (m *NhrpDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Entry.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Entry.Peer.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Entry.Peer.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Entry.Nh.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Entry.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Entry.NhTableID = buf.DecodeUint32()
- return nil
-}
-
-// NhrpDump defines message 'nhrp_dump'.
-type NhrpDump struct{}
-
-func (m *NhrpDump) Reset() { *m = NhrpDump{} }
-func (*NhrpDump) GetMessageName() string { return "nhrp_dump" }
-func (*NhrpDump) GetCrcString() string { return "51077d14" }
-func (*NhrpDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *NhrpDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *NhrpDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *NhrpDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// NhrpEntryAddDel defines message 'nhrp_entry_add_del'.
-type NhrpEntryAddDel struct {
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
- Entry NhrpEntry `binapi:"nhrp_entry,name=entry" json:"entry,omitempty"`
-}
-
-func (m *NhrpEntryAddDel) Reset() { *m = NhrpEntryAddDel{} }
-func (*NhrpEntryAddDel) GetMessageName() string { return "nhrp_entry_add_del" }
-func (*NhrpEntryAddDel) GetCrcString() string { return "5a47c531" }
-func (*NhrpEntryAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *NhrpEntryAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 4 // m.Entry.SwIfIndex
- size += 4 // m.Entry.Peer.Af
- size += 1 * 16 // m.Entry.Peer.Un
- size += 4 // m.Entry.Nh.Af
- size += 1 * 16 // m.Entry.Nh.Un
- size += 4 // m.Entry.NhTableID
- return size
-}
-func (m *NhrpEntryAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsAdd)
- buf.EncodeUint32(uint32(m.Entry.SwIfIndex))
- buf.EncodeUint32(uint32(m.Entry.Peer.Af))
- buf.EncodeBytes(m.Entry.Peer.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.Entry.Nh.Af))
- buf.EncodeBytes(m.Entry.Nh.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(m.Entry.NhTableID)
- return buf.Bytes(), nil
-}
-func (m *NhrpEntryAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeUint8()
- m.Entry.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Entry.Peer.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Entry.Peer.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Entry.Nh.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Entry.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Entry.NhTableID = buf.DecodeUint32()
- return nil
-}
-
-// NhrpEntryAddDelReply defines message 'nhrp_entry_add_del_reply'.
-type NhrpEntryAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *NhrpEntryAddDelReply) Reset() { *m = NhrpEntryAddDelReply{} }
-func (*NhrpEntryAddDelReply) GetMessageName() string { return "nhrp_entry_add_del_reply" }
-func (*NhrpEntryAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*NhrpEntryAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *NhrpEntryAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *NhrpEntryAddDelReply) 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 *NhrpEntryAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_nhrp_binapi_init() }
-func file_nhrp_binapi_init() {
- api.RegisterMessage((*NhrpDetails)(nil), "nhrp_details_e351c50a")
- api.RegisterMessage((*NhrpDump)(nil), "nhrp_dump_51077d14")
- api.RegisterMessage((*NhrpEntryAddDel)(nil), "nhrp_entry_add_del_5a47c531")
- api.RegisterMessage((*NhrpEntryAddDelReply)(nil), "nhrp_entry_add_del_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*NhrpDetails)(nil),
- (*NhrpDump)(nil),
- (*NhrpEntryAddDel)(nil),
- (*NhrpEntryAddDelReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/nhrp/nhrp_rpc.ba.go b/internal/testbinapi/binapi2001/nhrp/nhrp_rpc.ba.go
deleted file mode 100644
index 8b7261c..0000000
--- a/internal/testbinapi/binapi2001/nhrp/nhrp_rpc.ba.go
+++ /dev/null
@@ -1,78 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package nhrp
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service nhrp.
-type RPCService interface {
- NhrpDump(ctx context.Context, in *NhrpDump) (RPCService_NhrpDumpClient, error)
- NhrpEntryAddDel(ctx context.Context, in *NhrpEntryAddDel) (*NhrpEntryAddDelReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) NhrpDump(ctx context.Context, in *NhrpDump) (RPCService_NhrpDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_NhrpDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_NhrpDumpClient interface {
- Recv() (*NhrpDetails, error)
- api.Stream
-}
-
-type serviceClient_NhrpDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_NhrpDumpClient) Recv() (*NhrpDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *NhrpDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) NhrpEntryAddDel(ctx context.Context, in *NhrpEntryAddDel) (*NhrpEntryAddDelReply, error) {
- out := new(NhrpEntryAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/nsh/nsh.ba.go b/internal/testbinapi/binapi2001/nsh/nsh.ba.go
deleted file mode 100644
index c6d20be..0000000
--- a/internal/testbinapi/binapi2001/nsh/nsh.ba.go
+++ /dev/null
@@ -1,731 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/plugins/nsh.api.json
-
-// Package nsh contains generated bindings for API file nsh.api.
-//
-// Contents:
-// 1 alias
-// 6 enums
-// 8 messages
-//
-package nsh
-
-import (
- "strconv"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "nsh"
- APIVersion = "1.0.0"
- VersionCrc = 0xac2c8897
-)
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// NshAddDelEntry defines message 'nsh_add_del_entry'.
-type NshAddDelEntry struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- NspNsi uint32 `binapi:"u32,name=nsp_nsi" json:"nsp_nsi,omitempty"`
- MdType uint8 `binapi:"u8,name=md_type" json:"md_type,omitempty"`
- VerOC uint8 `binapi:"u8,name=ver_o_c" json:"ver_o_c,omitempty"`
- TTL uint8 `binapi:"u8,name=ttl" json:"ttl,omitempty"`
- Length uint8 `binapi:"u8,name=length" json:"length,omitempty"`
- NextProtocol uint8 `binapi:"u8,name=next_protocol" json:"next_protocol,omitempty"`
- C1 uint32 `binapi:"u32,name=c1" json:"c1,omitempty"`
- C2 uint32 `binapi:"u32,name=c2" json:"c2,omitempty"`
- C3 uint32 `binapi:"u32,name=c3" json:"c3,omitempty"`
- C4 uint32 `binapi:"u32,name=c4" json:"c4,omitempty"`
- TlvLength uint8 `binapi:"u8,name=tlv_length" json:"tlv_length,omitempty"`
- Tlv []byte `binapi:"u8[248],name=tlv" json:"tlv,omitempty"`
-}
-
-func (m *NshAddDelEntry) Reset() { *m = NshAddDelEntry{} }
-func (*NshAddDelEntry) GetMessageName() string { return "nsh_add_del_entry" }
-func (*NshAddDelEntry) GetCrcString() string { return "7dea480b" }
-func (*NshAddDelEntry) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *NshAddDelEntry) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 4 // m.NspNsi
- size += 1 // m.MdType
- size += 1 // m.VerOC
- size += 1 // m.TTL
- size += 1 // m.Length
- size += 1 // m.NextProtocol
- size += 4 // m.C1
- size += 4 // m.C2
- size += 4 // m.C3
- size += 4 // m.C4
- size += 1 // m.TlvLength
- size += 1 * 248 // m.Tlv
- return size
-}
-func (m *NshAddDelEntry) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeUint32(m.NspNsi)
- buf.EncodeUint8(m.MdType)
- buf.EncodeUint8(m.VerOC)
- buf.EncodeUint8(m.TTL)
- buf.EncodeUint8(m.Length)
- buf.EncodeUint8(m.NextProtocol)
- buf.EncodeUint32(m.C1)
- buf.EncodeUint32(m.C2)
- buf.EncodeUint32(m.C3)
- buf.EncodeUint32(m.C4)
- buf.EncodeUint8(m.TlvLength)
- buf.EncodeBytes(m.Tlv, 248)
- return buf.Bytes(), nil
-}
-func (m *NshAddDelEntry) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.NspNsi = buf.DecodeUint32()
- m.MdType = buf.DecodeUint8()
- m.VerOC = buf.DecodeUint8()
- m.TTL = buf.DecodeUint8()
- m.Length = buf.DecodeUint8()
- m.NextProtocol = buf.DecodeUint8()
- m.C1 = buf.DecodeUint32()
- m.C2 = buf.DecodeUint32()
- m.C3 = buf.DecodeUint32()
- m.C4 = buf.DecodeUint32()
- m.TlvLength = buf.DecodeUint8()
- m.Tlv = make([]byte, 248)
- copy(m.Tlv, buf.DecodeBytes(len(m.Tlv)))
- return nil
-}
-
-// NshAddDelEntryReply defines message 'nsh_add_del_entry_reply'.
-type NshAddDelEntryReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- EntryIndex uint32 `binapi:"u32,name=entry_index" json:"entry_index,omitempty"`
-}
-
-func (m *NshAddDelEntryReply) Reset() { *m = NshAddDelEntryReply{} }
-func (*NshAddDelEntryReply) GetMessageName() string { return "nsh_add_del_entry_reply" }
-func (*NshAddDelEntryReply) GetCrcString() string { return "6296a9eb" }
-func (*NshAddDelEntryReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *NshAddDelEntryReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.EntryIndex
- return size
-}
-func (m *NshAddDelEntryReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.EntryIndex)
- return buf.Bytes(), nil
-}
-func (m *NshAddDelEntryReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.EntryIndex = buf.DecodeUint32()
- return nil
-}
-
-// NshAddDelMap defines message 'nsh_add_del_map'.
-type NshAddDelMap struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- NspNsi uint32 `binapi:"u32,name=nsp_nsi" json:"nsp_nsi,omitempty"`
- MappedNspNsi uint32 `binapi:"u32,name=mapped_nsp_nsi" json:"mapped_nsp_nsi,omitempty"`
- NshAction uint32 `binapi:"u32,name=nsh_action" json:"nsh_action,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- RxSwIfIndex InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"`
- NextNode uint32 `binapi:"u32,name=next_node" json:"next_node,omitempty"`
-}
-
-func (m *NshAddDelMap) Reset() { *m = NshAddDelMap{} }
-func (*NshAddDelMap) GetMessageName() string { return "nsh_add_del_map" }
-func (*NshAddDelMap) GetCrcString() string { return "898d857d" }
-func (*NshAddDelMap) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *NshAddDelMap) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 4 // m.NspNsi
- size += 4 // m.MappedNspNsi
- size += 4 // m.NshAction
- size += 4 // m.SwIfIndex
- size += 4 // m.RxSwIfIndex
- size += 4 // m.NextNode
- return size
-}
-func (m *NshAddDelMap) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeUint32(m.NspNsi)
- buf.EncodeUint32(m.MappedNspNsi)
- buf.EncodeUint32(m.NshAction)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(uint32(m.RxSwIfIndex))
- buf.EncodeUint32(m.NextNode)
- return buf.Bytes(), nil
-}
-func (m *NshAddDelMap) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.NspNsi = buf.DecodeUint32()
- m.MappedNspNsi = buf.DecodeUint32()
- m.NshAction = buf.DecodeUint32()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.RxSwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.NextNode = buf.DecodeUint32()
- return nil
-}
-
-// NshAddDelMapReply defines message 'nsh_add_del_map_reply'.
-type NshAddDelMapReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- MapIndex uint32 `binapi:"u32,name=map_index" json:"map_index,omitempty"`
-}
-
-func (m *NshAddDelMapReply) Reset() { *m = NshAddDelMapReply{} }
-func (*NshAddDelMapReply) GetMessageName() string { return "nsh_add_del_map_reply" }
-func (*NshAddDelMapReply) GetCrcString() string { return "b2b127ef" }
-func (*NshAddDelMapReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *NshAddDelMapReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.MapIndex
- return size
-}
-func (m *NshAddDelMapReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.MapIndex)
- return buf.Bytes(), nil
-}
-func (m *NshAddDelMapReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.MapIndex = buf.DecodeUint32()
- return nil
-}
-
-// NshEntryDetails defines message 'nsh_entry_details'.
-type NshEntryDetails struct {
- EntryIndex uint32 `binapi:"u32,name=entry_index" json:"entry_index,omitempty"`
- NspNsi uint32 `binapi:"u32,name=nsp_nsi" json:"nsp_nsi,omitempty"`
- MdType uint8 `binapi:"u8,name=md_type" json:"md_type,omitempty"`
- VerOC uint8 `binapi:"u8,name=ver_o_c" json:"ver_o_c,omitempty"`
- TTL uint8 `binapi:"u8,name=ttl" json:"ttl,omitempty"`
- Length uint8 `binapi:"u8,name=length" json:"length,omitempty"`
- NextProtocol uint8 `binapi:"u8,name=next_protocol" json:"next_protocol,omitempty"`
- C1 uint32 `binapi:"u32,name=c1" json:"c1,omitempty"`
- C2 uint32 `binapi:"u32,name=c2" json:"c2,omitempty"`
- C3 uint32 `binapi:"u32,name=c3" json:"c3,omitempty"`
- C4 uint32 `binapi:"u32,name=c4" json:"c4,omitempty"`
- TlvLength uint8 `binapi:"u8,name=tlv_length" json:"tlv_length,omitempty"`
- Tlv []byte `binapi:"u8[248],name=tlv" json:"tlv,omitempty"`
-}
-
-func (m *NshEntryDetails) Reset() { *m = NshEntryDetails{} }
-func (*NshEntryDetails) GetMessageName() string { return "nsh_entry_details" }
-func (*NshEntryDetails) GetCrcString() string { return "046fb556" }
-func (*NshEntryDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *NshEntryDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.EntryIndex
- size += 4 // m.NspNsi
- size += 1 // m.MdType
- size += 1 // m.VerOC
- size += 1 // m.TTL
- size += 1 // m.Length
- size += 1 // m.NextProtocol
- size += 4 // m.C1
- size += 4 // m.C2
- size += 4 // m.C3
- size += 4 // m.C4
- size += 1 // m.TlvLength
- size += 1 * 248 // m.Tlv
- return size
-}
-func (m *NshEntryDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.EntryIndex)
- buf.EncodeUint32(m.NspNsi)
- buf.EncodeUint8(m.MdType)
- buf.EncodeUint8(m.VerOC)
- buf.EncodeUint8(m.TTL)
- buf.EncodeUint8(m.Length)
- buf.EncodeUint8(m.NextProtocol)
- buf.EncodeUint32(m.C1)
- buf.EncodeUint32(m.C2)
- buf.EncodeUint32(m.C3)
- buf.EncodeUint32(m.C4)
- buf.EncodeUint8(m.TlvLength)
- buf.EncodeBytes(m.Tlv, 248)
- return buf.Bytes(), nil
-}
-func (m *NshEntryDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.EntryIndex = buf.DecodeUint32()
- m.NspNsi = buf.DecodeUint32()
- m.MdType = buf.DecodeUint8()
- m.VerOC = buf.DecodeUint8()
- m.TTL = buf.DecodeUint8()
- m.Length = buf.DecodeUint8()
- m.NextProtocol = buf.DecodeUint8()
- m.C1 = buf.DecodeUint32()
- m.C2 = buf.DecodeUint32()
- m.C3 = buf.DecodeUint32()
- m.C4 = buf.DecodeUint32()
- m.TlvLength = buf.DecodeUint8()
- m.Tlv = make([]byte, 248)
- copy(m.Tlv, buf.DecodeBytes(len(m.Tlv)))
- return nil
-}
-
-// NshEntryDump defines message 'nsh_entry_dump'.
-type NshEntryDump struct {
- EntryIndex uint32 `binapi:"u32,name=entry_index" json:"entry_index,omitempty"`
-}
-
-func (m *NshEntryDump) Reset() { *m = NshEntryDump{} }
-func (*NshEntryDump) GetMessageName() string { return "nsh_entry_dump" }
-func (*NshEntryDump) GetCrcString() string { return "cdaf8ccb" }
-func (*NshEntryDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *NshEntryDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.EntryIndex
- return size
-}
-func (m *NshEntryDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.EntryIndex)
- return buf.Bytes(), nil
-}
-func (m *NshEntryDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.EntryIndex = buf.DecodeUint32()
- return nil
-}
-
-// NshMapDetails defines message 'nsh_map_details'.
-type NshMapDetails struct {
- MapIndex uint32 `binapi:"u32,name=map_index" json:"map_index,omitempty"`
- NspNsi uint32 `binapi:"u32,name=nsp_nsi" json:"nsp_nsi,omitempty"`
- MappedNspNsi uint32 `binapi:"u32,name=mapped_nsp_nsi" json:"mapped_nsp_nsi,omitempty"`
- NshAction uint32 `binapi:"u32,name=nsh_action" json:"nsh_action,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- RxSwIfIndex InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"`
- NextNode uint32 `binapi:"u32,name=next_node" json:"next_node,omitempty"`
-}
-
-func (m *NshMapDetails) Reset() { *m = NshMapDetails{} }
-func (*NshMapDetails) GetMessageName() string { return "nsh_map_details" }
-func (*NshMapDetails) GetCrcString() string { return "b34ac8a1" }
-func (*NshMapDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *NshMapDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.MapIndex
- size += 4 // m.NspNsi
- size += 4 // m.MappedNspNsi
- size += 4 // m.NshAction
- size += 4 // m.SwIfIndex
- size += 4 // m.RxSwIfIndex
- size += 4 // m.NextNode
- return size
-}
-func (m *NshMapDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.MapIndex)
- buf.EncodeUint32(m.NspNsi)
- buf.EncodeUint32(m.MappedNspNsi)
- buf.EncodeUint32(m.NshAction)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(uint32(m.RxSwIfIndex))
- buf.EncodeUint32(m.NextNode)
- return buf.Bytes(), nil
-}
-func (m *NshMapDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.MapIndex = buf.DecodeUint32()
- m.NspNsi = buf.DecodeUint32()
- m.MappedNspNsi = buf.DecodeUint32()
- m.NshAction = buf.DecodeUint32()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.RxSwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.NextNode = buf.DecodeUint32()
- return nil
-}
-
-// NshMapDump defines message 'nsh_map_dump'.
-type NshMapDump struct {
- MapIndex uint32 `binapi:"u32,name=map_index" json:"map_index,omitempty"`
-}
-
-func (m *NshMapDump) Reset() { *m = NshMapDump{} }
-func (*NshMapDump) GetMessageName() string { return "nsh_map_dump" }
-func (*NshMapDump) GetCrcString() string { return "8fc06b82" }
-func (*NshMapDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *NshMapDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.MapIndex
- return size
-}
-func (m *NshMapDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.MapIndex)
- return buf.Bytes(), nil
-}
-func (m *NshMapDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.MapIndex = buf.DecodeUint32()
- return nil
-}
-
-func init() { file_nsh_binapi_init() }
-func file_nsh_binapi_init() {
- api.RegisterMessage((*NshAddDelEntry)(nil), "nsh_add_del_entry_7dea480b")
- api.RegisterMessage((*NshAddDelEntryReply)(nil), "nsh_add_del_entry_reply_6296a9eb")
- api.RegisterMessage((*NshAddDelMap)(nil), "nsh_add_del_map_898d857d")
- api.RegisterMessage((*NshAddDelMapReply)(nil), "nsh_add_del_map_reply_b2b127ef")
- api.RegisterMessage((*NshEntryDetails)(nil), "nsh_entry_details_046fb556")
- api.RegisterMessage((*NshEntryDump)(nil), "nsh_entry_dump_cdaf8ccb")
- api.RegisterMessage((*NshMapDetails)(nil), "nsh_map_details_b34ac8a1")
- api.RegisterMessage((*NshMapDump)(nil), "nsh_map_dump_8fc06b82")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*NshAddDelEntry)(nil),
- (*NshAddDelEntryReply)(nil),
- (*NshAddDelMap)(nil),
- (*NshAddDelMapReply)(nil),
- (*NshEntryDetails)(nil),
- (*NshEntryDump)(nil),
- (*NshMapDetails)(nil),
- (*NshMapDump)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/nsh/nsh_rpc.ba.go b/internal/testbinapi/binapi2001/nsh/nsh_rpc.ba.go
deleted file mode 100644
index 6399b32..0000000
--- a/internal/testbinapi/binapi2001/nsh/nsh_rpc.ba.go
+++ /dev/null
@@ -1,132 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package nsh
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service nsh.
-type RPCService interface {
- NshAddDelEntry(ctx context.Context, in *NshAddDelEntry) (*NshAddDelEntryReply, error)
- NshAddDelMap(ctx context.Context, in *NshAddDelMap) (*NshAddDelMapReply, error)
- NshEntryDump(ctx context.Context, in *NshEntryDump) (RPCService_NshEntryDumpClient, error)
- NshMapDump(ctx context.Context, in *NshMapDump) (RPCService_NshMapDumpClient, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) NshAddDelEntry(ctx context.Context, in *NshAddDelEntry) (*NshAddDelEntryReply, error) {
- out := new(NshAddDelEntryReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) NshAddDelMap(ctx context.Context, in *NshAddDelMap) (*NshAddDelMapReply, error) {
- out := new(NshAddDelMapReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) NshEntryDump(ctx context.Context, in *NshEntryDump) (RPCService_NshEntryDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_NshEntryDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_NshEntryDumpClient interface {
- Recv() (*NshEntryDetails, error)
- api.Stream
-}
-
-type serviceClient_NshEntryDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_NshEntryDumpClient) Recv() (*NshEntryDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *NshEntryDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) NshMapDump(ctx context.Context, in *NshMapDump) (RPCService_NshMapDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_NshMapDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_NshMapDumpClient interface {
- Recv() (*NshMapDetails, error)
- api.Stream
-}
-
-type serviceClient_NshMapDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_NshMapDumpClient) Recv() (*NshMapDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *NshMapDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
diff --git a/internal/testbinapi/binapi2001/nsim/nsim.ba.go b/internal/testbinapi/binapi2001/nsim/nsim.ba.go
deleted file mode 100644
index 009d4bd..0000000
--- a/internal/testbinapi/binapi2001/nsim/nsim.ba.go
+++ /dev/null
@@ -1,539 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/plugins/nsim.api.json
-
-// Package nsim contains generated bindings for API file nsim.api.
-//
-// Contents:
-// 1 alias
-// 6 enums
-// 6 messages
-//
-package nsim
-
-import (
- "strconv"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "nsim"
- APIVersion = "2.1.1"
- VersionCrc = 0xd61e346f
-)
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// NsimConfigure defines message 'nsim_configure'.
-type NsimConfigure struct {
- DelayInUsec uint32 `binapi:"u32,name=delay_in_usec" json:"delay_in_usec,omitempty"`
- AveragePacketSize uint32 `binapi:"u32,name=average_packet_size" json:"average_packet_size,omitempty"`
- BandwidthInBitsPerSecond uint64 `binapi:"u64,name=bandwidth_in_bits_per_second" json:"bandwidth_in_bits_per_second,omitempty"`
- PacketsPerDrop uint32 `binapi:"u32,name=packets_per_drop" json:"packets_per_drop,omitempty"`
-}
-
-func (m *NsimConfigure) Reset() { *m = NsimConfigure{} }
-func (*NsimConfigure) GetMessageName() string { return "nsim_configure" }
-func (*NsimConfigure) GetCrcString() string { return "16ed400f" }
-func (*NsimConfigure) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *NsimConfigure) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.DelayInUsec
- size += 4 // m.AveragePacketSize
- size += 8 // m.BandwidthInBitsPerSecond
- size += 4 // m.PacketsPerDrop
- return size
-}
-func (m *NsimConfigure) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.DelayInUsec)
- buf.EncodeUint32(m.AveragePacketSize)
- buf.EncodeUint64(m.BandwidthInBitsPerSecond)
- buf.EncodeUint32(m.PacketsPerDrop)
- return buf.Bytes(), nil
-}
-func (m *NsimConfigure) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.DelayInUsec = buf.DecodeUint32()
- m.AveragePacketSize = buf.DecodeUint32()
- m.BandwidthInBitsPerSecond = buf.DecodeUint64()
- m.PacketsPerDrop = buf.DecodeUint32()
- return nil
-}
-
-// NsimConfigureReply defines message 'nsim_configure_reply'.
-type NsimConfigureReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *NsimConfigureReply) Reset() { *m = NsimConfigureReply{} }
-func (*NsimConfigureReply) GetMessageName() string { return "nsim_configure_reply" }
-func (*NsimConfigureReply) GetCrcString() string { return "e8d4e804" }
-func (*NsimConfigureReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *NsimConfigureReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *NsimConfigureReply) 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 *NsimConfigureReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// NsimCrossConnectEnableDisable defines message 'nsim_cross_connect_enable_disable'.
-type NsimCrossConnectEnableDisable struct {
- EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
- SwIfIndex0 InterfaceIndex `binapi:"interface_index,name=sw_if_index0" json:"sw_if_index0,omitempty"`
- SwIfIndex1 InterfaceIndex `binapi:"interface_index,name=sw_if_index1" json:"sw_if_index1,omitempty"`
-}
-
-func (m *NsimCrossConnectEnableDisable) Reset() { *m = NsimCrossConnectEnableDisable{} }
-func (*NsimCrossConnectEnableDisable) GetMessageName() string {
- return "nsim_cross_connect_enable_disable"
-}
-func (*NsimCrossConnectEnableDisable) GetCrcString() string { return "16f70bdf" }
-func (*NsimCrossConnectEnableDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *NsimCrossConnectEnableDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.EnableDisable
- size += 4 // m.SwIfIndex0
- size += 4 // m.SwIfIndex1
- return size
-}
-func (m *NsimCrossConnectEnableDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.EnableDisable)
- buf.EncodeUint32(uint32(m.SwIfIndex0))
- buf.EncodeUint32(uint32(m.SwIfIndex1))
- return buf.Bytes(), nil
-}
-func (m *NsimCrossConnectEnableDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.EnableDisable = buf.DecodeBool()
- m.SwIfIndex0 = InterfaceIndex(buf.DecodeUint32())
- m.SwIfIndex1 = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// NsimCrossConnectEnableDisableReply defines message 'nsim_cross_connect_enable_disable_reply'.
-type NsimCrossConnectEnableDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *NsimCrossConnectEnableDisableReply) Reset() { *m = NsimCrossConnectEnableDisableReply{} }
-func (*NsimCrossConnectEnableDisableReply) GetMessageName() string {
- return "nsim_cross_connect_enable_disable_reply"
-}
-func (*NsimCrossConnectEnableDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*NsimCrossConnectEnableDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *NsimCrossConnectEnableDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *NsimCrossConnectEnableDisableReply) 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 *NsimCrossConnectEnableDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// NsimOutputFeatureEnableDisable defines message 'nsim_output_feature_enable_disable'.
-type NsimOutputFeatureEnableDisable struct {
- EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *NsimOutputFeatureEnableDisable) Reset() { *m = NsimOutputFeatureEnableDisable{} }
-func (*NsimOutputFeatureEnableDisable) GetMessageName() string {
- return "nsim_output_feature_enable_disable"
-}
-func (*NsimOutputFeatureEnableDisable) GetCrcString() string { return "3865946c" }
-func (*NsimOutputFeatureEnableDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *NsimOutputFeatureEnableDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.EnableDisable
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *NsimOutputFeatureEnableDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.EnableDisable)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- return buf.Bytes(), nil
-}
-func (m *NsimOutputFeatureEnableDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.EnableDisable = buf.DecodeBool()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// NsimOutputFeatureEnableDisableReply defines message 'nsim_output_feature_enable_disable_reply'.
-type NsimOutputFeatureEnableDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *NsimOutputFeatureEnableDisableReply) Reset() { *m = NsimOutputFeatureEnableDisableReply{} }
-func (*NsimOutputFeatureEnableDisableReply) GetMessageName() string {
- return "nsim_output_feature_enable_disable_reply"
-}
-func (*NsimOutputFeatureEnableDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*NsimOutputFeatureEnableDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *NsimOutputFeatureEnableDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *NsimOutputFeatureEnableDisableReply) 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 *NsimOutputFeatureEnableDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_nsim_binapi_init() }
-func file_nsim_binapi_init() {
- api.RegisterMessage((*NsimConfigure)(nil), "nsim_configure_16ed400f")
- api.RegisterMessage((*NsimConfigureReply)(nil), "nsim_configure_reply_e8d4e804")
- api.RegisterMessage((*NsimCrossConnectEnableDisable)(nil), "nsim_cross_connect_enable_disable_16f70bdf")
- api.RegisterMessage((*NsimCrossConnectEnableDisableReply)(nil), "nsim_cross_connect_enable_disable_reply_e8d4e804")
- api.RegisterMessage((*NsimOutputFeatureEnableDisable)(nil), "nsim_output_feature_enable_disable_3865946c")
- api.RegisterMessage((*NsimOutputFeatureEnableDisableReply)(nil), "nsim_output_feature_enable_disable_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*NsimConfigure)(nil),
- (*NsimConfigureReply)(nil),
- (*NsimCrossConnectEnableDisable)(nil),
- (*NsimCrossConnectEnableDisableReply)(nil),
- (*NsimOutputFeatureEnableDisable)(nil),
- (*NsimOutputFeatureEnableDisableReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/nsim/nsim_rpc.ba.go b/internal/testbinapi/binapi2001/nsim/nsim_rpc.ba.go
deleted file mode 100644
index d46b1ef..0000000
--- a/internal/testbinapi/binapi2001/nsim/nsim_rpc.ba.go
+++ /dev/null
@@ -1,51 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package nsim
-
-import (
- "context"
-
- api "git.fd.io/govpp.git/api"
-)
-
-// RPCService defines RPC service nsim.
-type RPCService interface {
- NsimConfigure(ctx context.Context, in *NsimConfigure) (*NsimConfigureReply, error)
- NsimCrossConnectEnableDisable(ctx context.Context, in *NsimCrossConnectEnableDisable) (*NsimCrossConnectEnableDisableReply, error)
- NsimOutputFeatureEnableDisable(ctx context.Context, in *NsimOutputFeatureEnableDisable) (*NsimOutputFeatureEnableDisableReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) NsimConfigure(ctx context.Context, in *NsimConfigure) (*NsimConfigureReply, error) {
- out := new(NsimConfigureReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) NsimCrossConnectEnableDisable(ctx context.Context, in *NsimCrossConnectEnableDisable) (*NsimCrossConnectEnableDisableReply, error) {
- out := new(NsimCrossConnectEnableDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) NsimOutputFeatureEnableDisable(ctx context.Context, in *NsimOutputFeatureEnableDisable) (*NsimOutputFeatureEnableDisableReply, error) {
- out := new(NsimOutputFeatureEnableDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/oddbuf/oddbuf.ba.go b/internal/testbinapi/binapi2001/oddbuf/oddbuf.ba.go
deleted file mode 100644
index 281960f..0000000
--- a/internal/testbinapi/binapi2001/oddbuf/oddbuf.ba.go
+++ /dev/null
@@ -1,373 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/plugins/oddbuf.api.json
-
-// Package oddbuf contains generated bindings for API file oddbuf.api.
-//
-// Contents:
-// 1 alias
-// 6 enums
-// 2 messages
-//
-package oddbuf
-
-import (
- "strconv"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "oddbuf"
- APIVersion = "0.1.0"
- VersionCrc = 0x570f3132
-)
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// OddbufEnableDisable defines message 'oddbuf_enable_disable'.
-// InProgress: the message form may change in the future versions
-type OddbufEnableDisable struct {
- EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *OddbufEnableDisable) Reset() { *m = OddbufEnableDisable{} }
-func (*OddbufEnableDisable) GetMessageName() string { return "oddbuf_enable_disable" }
-func (*OddbufEnableDisable) GetCrcString() string { return "3865946c" }
-func (*OddbufEnableDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OddbufEnableDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.EnableDisable
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *OddbufEnableDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.EnableDisable)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- return buf.Bytes(), nil
-}
-func (m *OddbufEnableDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.EnableDisable = buf.DecodeBool()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// OddbufEnableDisableReply defines message 'oddbuf_enable_disable_reply'.
-// InProgress: the message form may change in the future versions
-type OddbufEnableDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *OddbufEnableDisableReply) Reset() { *m = OddbufEnableDisableReply{} }
-func (*OddbufEnableDisableReply) GetMessageName() string { return "oddbuf_enable_disable_reply" }
-func (*OddbufEnableDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*OddbufEnableDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OddbufEnableDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *OddbufEnableDisableReply) 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 *OddbufEnableDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_oddbuf_binapi_init() }
-func file_oddbuf_binapi_init() {
- api.RegisterMessage((*OddbufEnableDisable)(nil), "oddbuf_enable_disable_3865946c")
- api.RegisterMessage((*OddbufEnableDisableReply)(nil), "oddbuf_enable_disable_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*OddbufEnableDisable)(nil),
- (*OddbufEnableDisableReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/oddbuf/oddbuf_rpc.ba.go b/internal/testbinapi/binapi2001/oddbuf/oddbuf_rpc.ba.go
deleted file mode 100644
index f7c0164..0000000
--- a/internal/testbinapi/binapi2001/oddbuf/oddbuf_rpc.ba.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package oddbuf
-
-import (
- "context"
-
- api "git.fd.io/govpp.git/api"
-)
-
-// RPCService defines RPC service oddbuf.
-type RPCService interface {
- OddbufEnableDisable(ctx context.Context, in *OddbufEnableDisable) (*OddbufEnableDisableReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) OddbufEnableDisable(ctx context.Context, in *OddbufEnableDisable) (*OddbufEnableDisableReply, error) {
- out := new(OddbufEnableDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/one/one.ba.go b/internal/testbinapi/binapi2001/one/one.ba.go
deleted file mode 100644
index 83a4d17..0000000
--- a/internal/testbinapi/binapi2001/one/one.ba.go
+++ /dev/null
@@ -1,4408 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/one.api.json
-
-// Package one contains generated bindings for API file one.api.
-//
-// Contents:
-// 5 structs
-// 108 messages
-//
-package one
-
-import (
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the GoVPP api package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// GoVPP api package needs to be updated.
-const _ = api.GoVppAPIPackageIsVersion2
-
-const (
- APIFile = "one"
- APIVersion = "1.0.0"
- VersionCrc = 0xde9891c3
-)
-
-// OneAdjacency defines type 'one_adjacency'.
-type OneAdjacency struct {
- EidType uint8 `binapi:"u8,name=eid_type" json:"eid_type,omitempty"`
- Reid []byte `binapi:"u8[16],name=reid" json:"reid,omitempty"`
- Leid []byte `binapi:"u8[16],name=leid" json:"leid,omitempty"`
- ReidPrefixLen uint8 `binapi:"u8,name=reid_prefix_len" json:"reid_prefix_len,omitempty"`
- LeidPrefixLen uint8 `binapi:"u8,name=leid_prefix_len" json:"leid_prefix_len,omitempty"`
-}
-
-// OneL2ArpEntry defines type 'one_l2_arp_entry'.
-type OneL2ArpEntry struct {
- Mac []byte `binapi:"u8[6],name=mac" json:"mac,omitempty"`
- IP4 uint32 `binapi:"u32,name=ip4" json:"ip4,omitempty"`
-}
-
-// OneLocalLocator defines type 'one_local_locator'.
-type OneLocalLocator struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- Priority uint8 `binapi:"u8,name=priority" json:"priority,omitempty"`
- Weight uint8 `binapi:"u8,name=weight" json:"weight,omitempty"`
-}
-
-// OneNdpEntry defines type 'one_ndp_entry'.
-type OneNdpEntry struct {
- Mac []byte `binapi:"u8[6],name=mac" json:"mac,omitempty"`
- IP6 []byte `binapi:"u8[16],name=ip6" json:"ip6,omitempty"`
-}
-
-// OneRemoteLocator defines type 'one_remote_locator'.
-type OneRemoteLocator struct {
- IsIP4 uint8 `binapi:"u8,name=is_ip4" json:"is_ip4,omitempty"`
- Priority uint8 `binapi:"u8,name=priority" json:"priority,omitempty"`
- Weight uint8 `binapi:"u8,name=weight" json:"weight,omitempty"`
- Addr []byte `binapi:"u8[16],name=addr" json:"addr,omitempty"`
-}
-
-// OneAddDelAdjacency defines message 'one_add_del_adjacency'.
-type OneAddDelAdjacency struct {
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
- Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
- EidType uint8 `binapi:"u8,name=eid_type" json:"eid_type,omitempty"`
- Reid []byte `binapi:"u8[16],name=reid" json:"reid,omitempty"`
- Leid []byte `binapi:"u8[16],name=leid" json:"leid,omitempty"`
- ReidLen uint8 `binapi:"u8,name=reid_len" json:"reid_len,omitempty"`
- LeidLen uint8 `binapi:"u8,name=leid_len" json:"leid_len,omitempty"`
-}
-
-func (m *OneAddDelAdjacency) Reset() { *m = OneAddDelAdjacency{} }
-func (*OneAddDelAdjacency) GetMessageName() string { return "one_add_del_adjacency" }
-func (*OneAddDelAdjacency) GetCrcString() string { return "f047390d" }
-func (*OneAddDelAdjacency) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OneAddDelAdjacency) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 4 // m.Vni
- size += 1 // m.EidType
- size += 1 * 16 // m.Reid
- size += 1 * 16 // m.Leid
- size += 1 // m.ReidLen
- size += 1 // m.LeidLen
- return size
-}
-func (m *OneAddDelAdjacency) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsAdd)
- buf.EncodeUint32(m.Vni)
- buf.EncodeUint8(m.EidType)
- buf.EncodeBytes(m.Reid, 16)
- buf.EncodeBytes(m.Leid, 16)
- buf.EncodeUint8(m.ReidLen)
- buf.EncodeUint8(m.LeidLen)
- return buf.Bytes(), nil
-}
-func (m *OneAddDelAdjacency) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeUint8()
- m.Vni = buf.DecodeUint32()
- m.EidType = buf.DecodeUint8()
- m.Reid = make([]byte, 16)
- copy(m.Reid, buf.DecodeBytes(len(m.Reid)))
- m.Leid = make([]byte, 16)
- copy(m.Leid, buf.DecodeBytes(len(m.Leid)))
- m.ReidLen = buf.DecodeUint8()
- m.LeidLen = buf.DecodeUint8()
- return nil
-}
-
-// OneAddDelAdjacencyReply defines message 'one_add_del_adjacency_reply'.
-type OneAddDelAdjacencyReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *OneAddDelAdjacencyReply) Reset() { *m = OneAddDelAdjacencyReply{} }
-func (*OneAddDelAdjacencyReply) GetMessageName() string { return "one_add_del_adjacency_reply" }
-func (*OneAddDelAdjacencyReply) GetCrcString() string { return "e8d4e804" }
-func (*OneAddDelAdjacencyReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OneAddDelAdjacencyReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *OneAddDelAdjacencyReply) 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 *OneAddDelAdjacencyReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// OneAddDelL2ArpEntry defines message 'one_add_del_l2_arp_entry'.
-type OneAddDelL2ArpEntry struct {
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
- Mac []byte `binapi:"u8[6],name=mac" json:"mac,omitempty"`
- Bd uint32 `binapi:"u32,name=bd" json:"bd,omitempty"`
- IP4 uint32 `binapi:"u32,name=ip4" json:"ip4,omitempty"`
-}
-
-func (m *OneAddDelL2ArpEntry) Reset() { *m = OneAddDelL2ArpEntry{} }
-func (*OneAddDelL2ArpEntry) GetMessageName() string { return "one_add_del_l2_arp_entry" }
-func (*OneAddDelL2ArpEntry) GetCrcString() string { return "a95cc2d7" }
-func (*OneAddDelL2ArpEntry) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OneAddDelL2ArpEntry) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 1 * 6 // m.Mac
- size += 4 // m.Bd
- size += 4 // m.IP4
- return size
-}
-func (m *OneAddDelL2ArpEntry) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsAdd)
- buf.EncodeBytes(m.Mac, 6)
- buf.EncodeUint32(m.Bd)
- buf.EncodeUint32(m.IP4)
- return buf.Bytes(), nil
-}
-func (m *OneAddDelL2ArpEntry) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeUint8()
- m.Mac = make([]byte, 6)
- copy(m.Mac, buf.DecodeBytes(len(m.Mac)))
- m.Bd = buf.DecodeUint32()
- m.IP4 = buf.DecodeUint32()
- return nil
-}
-
-// OneAddDelL2ArpEntryReply defines message 'one_add_del_l2_arp_entry_reply'.
-type OneAddDelL2ArpEntryReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *OneAddDelL2ArpEntryReply) Reset() { *m = OneAddDelL2ArpEntryReply{} }
-func (*OneAddDelL2ArpEntryReply) GetMessageName() string { return "one_add_del_l2_arp_entry_reply" }
-func (*OneAddDelL2ArpEntryReply) GetCrcString() string { return "e8d4e804" }
-func (*OneAddDelL2ArpEntryReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OneAddDelL2ArpEntryReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *OneAddDelL2ArpEntryReply) 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 *OneAddDelL2ArpEntryReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// OneAddDelLocalEid defines message 'one_add_del_local_eid'.
-type OneAddDelLocalEid struct {
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
- EidType uint8 `binapi:"u8,name=eid_type" json:"eid_type,omitempty"`
- Eid []byte `binapi:"u8[16],name=eid" json:"eid,omitempty"`
- PrefixLen uint8 `binapi:"u8,name=prefix_len" json:"prefix_len,omitempty"`
- LocatorSetName []byte `binapi:"u8[64],name=locator_set_name" json:"locator_set_name,omitempty"`
- Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
- KeyID uint16 `binapi:"u16,name=key_id" json:"key_id,omitempty"`
- Key []byte `binapi:"u8[64],name=key" json:"key,omitempty"`
-}
-
-func (m *OneAddDelLocalEid) Reset() { *m = OneAddDelLocalEid{} }
-func (*OneAddDelLocalEid) GetMessageName() string { return "one_add_del_local_eid" }
-func (*OneAddDelLocalEid) GetCrcString() string { return "e6d00717" }
-func (*OneAddDelLocalEid) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OneAddDelLocalEid) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 1 // m.EidType
- size += 1 * 16 // m.Eid
- size += 1 // m.PrefixLen
- size += 1 * 64 // m.LocatorSetName
- size += 4 // m.Vni
- size += 2 // m.KeyID
- size += 1 * 64 // m.Key
- return size
-}
-func (m *OneAddDelLocalEid) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsAdd)
- buf.EncodeUint8(m.EidType)
- buf.EncodeBytes(m.Eid, 16)
- buf.EncodeUint8(m.PrefixLen)
- buf.EncodeBytes(m.LocatorSetName, 64)
- buf.EncodeUint32(m.Vni)
- buf.EncodeUint16(m.KeyID)
- buf.EncodeBytes(m.Key, 64)
- return buf.Bytes(), nil
-}
-func (m *OneAddDelLocalEid) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeUint8()
- m.EidType = buf.DecodeUint8()
- m.Eid = make([]byte, 16)
- copy(m.Eid, buf.DecodeBytes(len(m.Eid)))
- m.PrefixLen = buf.DecodeUint8()
- m.LocatorSetName = make([]byte, 64)
- copy(m.LocatorSetName, buf.DecodeBytes(len(m.LocatorSetName)))
- m.Vni = buf.DecodeUint32()
- m.KeyID = buf.DecodeUint16()
- m.Key = make([]byte, 64)
- copy(m.Key, buf.DecodeBytes(len(m.Key)))
- return nil
-}
-
-// OneAddDelLocalEidReply defines message 'one_add_del_local_eid_reply'.
-type OneAddDelLocalEidReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *OneAddDelLocalEidReply) Reset() { *m = OneAddDelLocalEidReply{} }
-func (*OneAddDelLocalEidReply) GetMessageName() string { return "one_add_del_local_eid_reply" }
-func (*OneAddDelLocalEidReply) GetCrcString() string { return "e8d4e804" }
-func (*OneAddDelLocalEidReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OneAddDelLocalEidReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *OneAddDelLocalEidReply) 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 *OneAddDelLocalEidReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// OneAddDelLocator defines message 'one_add_del_locator'.
-type OneAddDelLocator struct {
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
- LocatorSetName []byte `binapi:"u8[64],name=locator_set_name" json:"locator_set_name,omitempty"`
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- Priority uint8 `binapi:"u8,name=priority" json:"priority,omitempty"`
- Weight uint8 `binapi:"u8,name=weight" json:"weight,omitempty"`
-}
-
-func (m *OneAddDelLocator) Reset() { *m = OneAddDelLocator{} }
-func (*OneAddDelLocator) GetMessageName() string { return "one_add_del_locator" }
-func (*OneAddDelLocator) GetCrcString() string { return "006a4240" }
-func (*OneAddDelLocator) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OneAddDelLocator) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 1 * 64 // m.LocatorSetName
- size += 4 // m.SwIfIndex
- size += 1 // m.Priority
- size += 1 // m.Weight
- return size
-}
-func (m *OneAddDelLocator) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsAdd)
- buf.EncodeBytes(m.LocatorSetName, 64)
- buf.EncodeUint32(m.SwIfIndex)
- buf.EncodeUint8(m.Priority)
- buf.EncodeUint8(m.Weight)
- return buf.Bytes(), nil
-}
-func (m *OneAddDelLocator) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeUint8()
- m.LocatorSetName = make([]byte, 64)
- copy(m.LocatorSetName, buf.DecodeBytes(len(m.LocatorSetName)))
- m.SwIfIndex = buf.DecodeUint32()
- m.Priority = buf.DecodeUint8()
- m.Weight = buf.DecodeUint8()
- return nil
-}
-
-// OneAddDelLocatorReply defines message 'one_add_del_locator_reply'.
-type OneAddDelLocatorReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *OneAddDelLocatorReply) Reset() { *m = OneAddDelLocatorReply{} }
-func (*OneAddDelLocatorReply) GetMessageName() string { return "one_add_del_locator_reply" }
-func (*OneAddDelLocatorReply) GetCrcString() string { return "e8d4e804" }
-func (*OneAddDelLocatorReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OneAddDelLocatorReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *OneAddDelLocatorReply) 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 *OneAddDelLocatorReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// OneAddDelLocatorSet defines message 'one_add_del_locator_set'.
-type OneAddDelLocatorSet struct {
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
- LocatorSetName []byte `binapi:"u8[64],name=locator_set_name" json:"locator_set_name,omitempty"`
- LocatorNum uint32 `binapi:"u32,name=locator_num" json:"-"`
- Locators []OneLocalLocator `binapi:"one_local_locator[locator_num],name=locators" json:"locators,omitempty"`
-}
-
-func (m *OneAddDelLocatorSet) Reset() { *m = OneAddDelLocatorSet{} }
-func (*OneAddDelLocatorSet) GetMessageName() string { return "one_add_del_locator_set" }
-func (*OneAddDelLocatorSet) GetCrcString() string { return "2e73b050" }
-func (*OneAddDelLocatorSet) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OneAddDelLocatorSet) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 1 * 64 // m.LocatorSetName
- size += 4 // m.LocatorNum
- for j1 := 0; j1 < len(m.Locators); j1++ {
- var s1 OneLocalLocator
- _ = s1
- if j1 < len(m.Locators) {
- s1 = m.Locators[j1]
- }
- size += 4 // s1.SwIfIndex
- size += 1 // s1.Priority
- size += 1 // s1.Weight
- }
- return size
-}
-func (m *OneAddDelLocatorSet) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsAdd)
- buf.EncodeBytes(m.LocatorSetName, 64)
- buf.EncodeUint32(uint32(len(m.Locators)))
- for j0 := 0; j0 < len(m.Locators); j0++ {
- var v0 OneLocalLocator // Locators
- if j0 < len(m.Locators) {
- v0 = m.Locators[j0]
- }
- buf.EncodeUint32(v0.SwIfIndex)
- buf.EncodeUint8(v0.Priority)
- buf.EncodeUint8(v0.Weight)
- }
- return buf.Bytes(), nil
-}
-func (m *OneAddDelLocatorSet) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeUint8()
- m.LocatorSetName = make([]byte, 64)
- copy(m.LocatorSetName, buf.DecodeBytes(len(m.LocatorSetName)))
- m.LocatorNum = buf.DecodeUint32()
- m.Locators = make([]OneLocalLocator, m.LocatorNum)
- for j0 := 0; j0 < len(m.Locators); j0++ {
- m.Locators[j0].SwIfIndex = buf.DecodeUint32()
- m.Locators[j0].Priority = buf.DecodeUint8()
- m.Locators[j0].Weight = buf.DecodeUint8()
- }
- return nil
-}
-
-// OneAddDelLocatorSetReply defines message 'one_add_del_locator_set_reply'.
-type OneAddDelLocatorSetReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- LsIndex uint32 `binapi:"u32,name=ls_index" json:"ls_index,omitempty"`
-}
-
-func (m *OneAddDelLocatorSetReply) Reset() { *m = OneAddDelLocatorSetReply{} }
-func (*OneAddDelLocatorSetReply) GetMessageName() string { return "one_add_del_locator_set_reply" }
-func (*OneAddDelLocatorSetReply) GetCrcString() string { return "b6666db4" }
-func (*OneAddDelLocatorSetReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OneAddDelLocatorSetReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.LsIndex
- return size
-}
-func (m *OneAddDelLocatorSetReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.LsIndex)
- return buf.Bytes(), nil
-}
-func (m *OneAddDelLocatorSetReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.LsIndex = buf.DecodeUint32()
- return nil
-}
-
-// OneAddDelMapRequestItrRlocs defines message 'one_add_del_map_request_itr_rlocs'.
-type OneAddDelMapRequestItrRlocs struct {
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
- LocatorSetName []byte `binapi:"u8[64],name=locator_set_name" json:"locator_set_name,omitempty"`
-}
-
-func (m *OneAddDelMapRequestItrRlocs) Reset() { *m = OneAddDelMapRequestItrRlocs{} }
-func (*OneAddDelMapRequestItrRlocs) GetMessageName() string {
- return "one_add_del_map_request_itr_rlocs"
-}
-func (*OneAddDelMapRequestItrRlocs) GetCrcString() string { return "c7c6cb2f" }
-func (*OneAddDelMapRequestItrRlocs) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OneAddDelMapRequestItrRlocs) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 1 * 64 // m.LocatorSetName
- return size
-}
-func (m *OneAddDelMapRequestItrRlocs) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsAdd)
- buf.EncodeBytes(m.LocatorSetName, 64)
- return buf.Bytes(), nil
-}
-func (m *OneAddDelMapRequestItrRlocs) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeUint8()
- m.LocatorSetName = make([]byte, 64)
- copy(m.LocatorSetName, buf.DecodeBytes(len(m.LocatorSetName)))
- return nil
-}
-
-// OneAddDelMapRequestItrRlocsReply defines message 'one_add_del_map_request_itr_rlocs_reply'.
-type OneAddDelMapRequestItrRlocsReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *OneAddDelMapRequestItrRlocsReply) Reset() { *m = OneAddDelMapRequestItrRlocsReply{} }
-func (*OneAddDelMapRequestItrRlocsReply) GetMessageName() string {
- return "one_add_del_map_request_itr_rlocs_reply"
-}
-func (*OneAddDelMapRequestItrRlocsReply) GetCrcString() string { return "e8d4e804" }
-func (*OneAddDelMapRequestItrRlocsReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OneAddDelMapRequestItrRlocsReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *OneAddDelMapRequestItrRlocsReply) 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 *OneAddDelMapRequestItrRlocsReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// OneAddDelMapResolver defines message 'one_add_del_map_resolver'.
-type OneAddDelMapResolver struct {
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
- IsIPv6 uint8 `binapi:"u8,name=is_ipv6" json:"is_ipv6,omitempty"`
- IPAddress []byte `binapi:"u8[16],name=ip_address" json:"ip_address,omitempty"`
-}
-
-func (m *OneAddDelMapResolver) Reset() { *m = OneAddDelMapResolver{} }
-func (*OneAddDelMapResolver) GetMessageName() string { return "one_add_del_map_resolver" }
-func (*OneAddDelMapResolver) GetCrcString() string { return "0ebcd37d" }
-func (*OneAddDelMapResolver) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OneAddDelMapResolver) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 1 // m.IsIPv6
- size += 1 * 16 // m.IPAddress
- return size
-}
-func (m *OneAddDelMapResolver) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsAdd)
- buf.EncodeUint8(m.IsIPv6)
- buf.EncodeBytes(m.IPAddress, 16)
- return buf.Bytes(), nil
-}
-func (m *OneAddDelMapResolver) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeUint8()
- m.IsIPv6 = buf.DecodeUint8()
- m.IPAddress = make([]byte, 16)
- copy(m.IPAddress, buf.DecodeBytes(len(m.IPAddress)))
- return nil
-}
-
-// OneAddDelMapResolverReply defines message 'one_add_del_map_resolver_reply'.
-type OneAddDelMapResolverReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *OneAddDelMapResolverReply) Reset() { *m = OneAddDelMapResolverReply{} }
-func (*OneAddDelMapResolverReply) GetMessageName() string { return "one_add_del_map_resolver_reply" }
-func (*OneAddDelMapResolverReply) GetCrcString() string { return "e8d4e804" }
-func (*OneAddDelMapResolverReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OneAddDelMapResolverReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *OneAddDelMapResolverReply) 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 *OneAddDelMapResolverReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// OneAddDelMapServer defines message 'one_add_del_map_server'.
-type OneAddDelMapServer struct {
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
- IsIPv6 uint8 `binapi:"u8,name=is_ipv6" json:"is_ipv6,omitempty"`
- IPAddress []byte `binapi:"u8[16],name=ip_address" json:"ip_address,omitempty"`
-}
-
-func (m *OneAddDelMapServer) Reset() { *m = OneAddDelMapServer{} }
-func (*OneAddDelMapServer) GetMessageName() string { return "one_add_del_map_server" }
-func (*OneAddDelMapServer) GetCrcString() string { return "0ebcd37d" }
-func (*OneAddDelMapServer) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OneAddDelMapServer) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 1 // m.IsIPv6
- size += 1 * 16 // m.IPAddress
- return size
-}
-func (m *OneAddDelMapServer) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsAdd)
- buf.EncodeUint8(m.IsIPv6)
- buf.EncodeBytes(m.IPAddress, 16)
- return buf.Bytes(), nil
-}
-func (m *OneAddDelMapServer) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeUint8()
- m.IsIPv6 = buf.DecodeUint8()
- m.IPAddress = make([]byte, 16)
- copy(m.IPAddress, buf.DecodeBytes(len(m.IPAddress)))
- return nil
-}
-
-// OneAddDelMapServerReply defines message 'one_add_del_map_server_reply'.
-type OneAddDelMapServerReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *OneAddDelMapServerReply) Reset() { *m = OneAddDelMapServerReply{} }
-func (*OneAddDelMapServerReply) GetMessageName() string { return "one_add_del_map_server_reply" }
-func (*OneAddDelMapServerReply) GetCrcString() string { return "e8d4e804" }
-func (*OneAddDelMapServerReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OneAddDelMapServerReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *OneAddDelMapServerReply) 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 *OneAddDelMapServerReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// OneAddDelNdpEntry defines message 'one_add_del_ndp_entry'.
-type OneAddDelNdpEntry struct {
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
- Mac []byte `binapi:"u8[6],name=mac" json:"mac,omitempty"`
- Bd uint32 `binapi:"u32,name=bd" json:"bd,omitempty"`
- IP6 []byte `binapi:"u8[16],name=ip6" json:"ip6,omitempty"`
-}
-
-func (m *OneAddDelNdpEntry) Reset() { *m = OneAddDelNdpEntry{} }
-func (*OneAddDelNdpEntry) GetMessageName() string { return "one_add_del_ndp_entry" }
-func (*OneAddDelNdpEntry) GetCrcString() string { return "e9468fe3" }
-func (*OneAddDelNdpEntry) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OneAddDelNdpEntry) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 1 * 6 // m.Mac
- size += 4 // m.Bd
- size += 1 * 16 // m.IP6
- return size
-}
-func (m *OneAddDelNdpEntry) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsAdd)
- buf.EncodeBytes(m.Mac, 6)
- buf.EncodeUint32(m.Bd)
- buf.EncodeBytes(m.IP6, 16)
- return buf.Bytes(), nil
-}
-func (m *OneAddDelNdpEntry) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeUint8()
- m.Mac = make([]byte, 6)
- copy(m.Mac, buf.DecodeBytes(len(m.Mac)))
- m.Bd = buf.DecodeUint32()
- m.IP6 = make([]byte, 16)
- copy(m.IP6, buf.DecodeBytes(len(m.IP6)))
- return nil
-}
-
-// OneAddDelNdpEntryReply defines message 'one_add_del_ndp_entry_reply'.
-type OneAddDelNdpEntryReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *OneAddDelNdpEntryReply) Reset() { *m = OneAddDelNdpEntryReply{} }
-func (*OneAddDelNdpEntryReply) GetMessageName() string { return "one_add_del_ndp_entry_reply" }
-func (*OneAddDelNdpEntryReply) GetCrcString() string { return "e8d4e804" }
-func (*OneAddDelNdpEntryReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OneAddDelNdpEntryReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *OneAddDelNdpEntryReply) 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 *OneAddDelNdpEntryReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// OneAddDelRemoteMapping defines message 'one_add_del_remote_mapping'.
-type OneAddDelRemoteMapping struct {
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
- IsSrcDst uint8 `binapi:"u8,name=is_src_dst" json:"is_src_dst,omitempty"`
- DelAll uint8 `binapi:"u8,name=del_all" json:"del_all,omitempty"`
- Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
- Action uint8 `binapi:"u8,name=action" json:"action,omitempty"`
- EidType uint8 `binapi:"u8,name=eid_type" json:"eid_type,omitempty"`
- Eid []byte `binapi:"u8[16],name=eid" json:"eid,omitempty"`
- EidLen uint8 `binapi:"u8,name=eid_len" json:"eid_len,omitempty"`
- Seid []byte `binapi:"u8[16],name=seid" json:"seid,omitempty"`
- SeidLen uint8 `binapi:"u8,name=seid_len" json:"seid_len,omitempty"`
- RlocNum uint32 `binapi:"u32,name=rloc_num" json:"-"`
- Rlocs []OneRemoteLocator `binapi:"one_remote_locator[rloc_num],name=rlocs" json:"rlocs,omitempty"`
-}
-
-func (m *OneAddDelRemoteMapping) Reset() { *m = OneAddDelRemoteMapping{} }
-func (*OneAddDelRemoteMapping) GetMessageName() string { return "one_add_del_remote_mapping" }
-func (*OneAddDelRemoteMapping) GetCrcString() string { return "0b2010ec" }
-func (*OneAddDelRemoteMapping) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OneAddDelRemoteMapping) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 1 // m.IsSrcDst
- size += 1 // m.DelAll
- size += 4 // m.Vni
- size += 1 // m.Action
- size += 1 // m.EidType
- size += 1 * 16 // m.Eid
- size += 1 // m.EidLen
- size += 1 * 16 // m.Seid
- size += 1 // m.SeidLen
- size += 4 // m.RlocNum
- for j1 := 0; j1 < len(m.Rlocs); j1++ {
- var s1 OneRemoteLocator
- _ = s1
- if j1 < len(m.Rlocs) {
- s1 = m.Rlocs[j1]
- }
- size += 1 // s1.IsIP4
- size += 1 // s1.Priority
- size += 1 // s1.Weight
- size += 1 * 16 // s1.Addr
- }
- return size
-}
-func (m *OneAddDelRemoteMapping) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsAdd)
- buf.EncodeUint8(m.IsSrcDst)
- buf.EncodeUint8(m.DelAll)
- buf.EncodeUint32(m.Vni)
- buf.EncodeUint8(m.Action)
- buf.EncodeUint8(m.EidType)
- buf.EncodeBytes(m.Eid, 16)
- buf.EncodeUint8(m.EidLen)
- buf.EncodeBytes(m.Seid, 16)
- buf.EncodeUint8(m.SeidLen)
- buf.EncodeUint32(uint32(len(m.Rlocs)))
- for j0 := 0; j0 < len(m.Rlocs); j0++ {
- var v0 OneRemoteLocator // Rlocs
- if j0 < len(m.Rlocs) {
- v0 = m.Rlocs[j0]
- }
- buf.EncodeUint8(v0.IsIP4)
- buf.EncodeUint8(v0.Priority)
- buf.EncodeUint8(v0.Weight)
- buf.EncodeBytes(v0.Addr, 16)
- }
- return buf.Bytes(), nil
-}
-func (m *OneAddDelRemoteMapping) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeUint8()
- m.IsSrcDst = buf.DecodeUint8()
- m.DelAll = buf.DecodeUint8()
- m.Vni = buf.DecodeUint32()
- m.Action = buf.DecodeUint8()
- m.EidType = buf.DecodeUint8()
- m.Eid = make([]byte, 16)
- copy(m.Eid, buf.DecodeBytes(len(m.Eid)))
- m.EidLen = buf.DecodeUint8()
- m.Seid = make([]byte, 16)
- copy(m.Seid, buf.DecodeBytes(len(m.Seid)))
- m.SeidLen = buf.DecodeUint8()
- m.RlocNum = buf.DecodeUint32()
- m.Rlocs = make([]OneRemoteLocator, m.RlocNum)
- for j0 := 0; j0 < len(m.Rlocs); j0++ {
- m.Rlocs[j0].IsIP4 = buf.DecodeUint8()
- m.Rlocs[j0].Priority = buf.DecodeUint8()
- m.Rlocs[j0].Weight = buf.DecodeUint8()
- m.Rlocs[j0].Addr = make([]byte, 16)
- copy(m.Rlocs[j0].Addr, buf.DecodeBytes(len(m.Rlocs[j0].Addr)))
- }
- return nil
-}
-
-// OneAddDelRemoteMappingReply defines message 'one_add_del_remote_mapping_reply'.
-type OneAddDelRemoteMappingReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *OneAddDelRemoteMappingReply) Reset() { *m = OneAddDelRemoteMappingReply{} }
-func (*OneAddDelRemoteMappingReply) GetMessageName() string {
- return "one_add_del_remote_mapping_reply"
-}
-func (*OneAddDelRemoteMappingReply) GetCrcString() string { return "e8d4e804" }
-func (*OneAddDelRemoteMappingReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OneAddDelRemoteMappingReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *OneAddDelRemoteMappingReply) 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 *OneAddDelRemoteMappingReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// OneAdjacenciesGet defines message 'one_adjacencies_get'.
-type OneAdjacenciesGet struct {
- Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
-}
-
-func (m *OneAdjacenciesGet) Reset() { *m = OneAdjacenciesGet{} }
-func (*OneAdjacenciesGet) GetMessageName() string { return "one_adjacencies_get" }
-func (*OneAdjacenciesGet) GetCrcString() string { return "8d1f2fe9" }
-func (*OneAdjacenciesGet) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OneAdjacenciesGet) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Vni
- return size
-}
-func (m *OneAdjacenciesGet) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Vni)
- return buf.Bytes(), nil
-}
-func (m *OneAdjacenciesGet) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Vni = buf.DecodeUint32()
- return nil
-}
-
-// OneAdjacenciesGetReply defines message 'one_adjacencies_get_reply'.
-type OneAdjacenciesGetReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- Count uint32 `binapi:"u32,name=count" json:"-"`
- Adjacencies []OneAdjacency `binapi:"one_adjacency[count],name=adjacencies" json:"adjacencies,omitempty"`
-}
-
-func (m *OneAdjacenciesGetReply) Reset() { *m = OneAdjacenciesGetReply{} }
-func (*OneAdjacenciesGetReply) GetMessageName() string { return "one_adjacencies_get_reply" }
-func (*OneAdjacenciesGetReply) GetCrcString() string { return "60a3c592" }
-func (*OneAdjacenciesGetReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OneAdjacenciesGetReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.Count
- for j1 := 0; j1 < len(m.Adjacencies); j1++ {
- var s1 OneAdjacency
- _ = s1
- if j1 < len(m.Adjacencies) {
- s1 = m.Adjacencies[j1]
- }
- size += 1 // s1.EidType
- size += 1 * 16 // s1.Reid
- size += 1 * 16 // s1.Leid
- size += 1 // s1.ReidPrefixLen
- size += 1 // s1.LeidPrefixLen
- }
- return size
-}
-func (m *OneAdjacenciesGetReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(uint32(len(m.Adjacencies)))
- for j0 := 0; j0 < len(m.Adjacencies); j0++ {
- var v0 OneAdjacency // Adjacencies
- if j0 < len(m.Adjacencies) {
- v0 = m.Adjacencies[j0]
- }
- buf.EncodeUint8(v0.EidType)
- buf.EncodeBytes(v0.Reid, 16)
- buf.EncodeBytes(v0.Leid, 16)
- buf.EncodeUint8(v0.ReidPrefixLen)
- buf.EncodeUint8(v0.LeidPrefixLen)
- }
- return buf.Bytes(), nil
-}
-func (m *OneAdjacenciesGetReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.Count = buf.DecodeUint32()
- m.Adjacencies = make([]OneAdjacency, m.Count)
- for j0 := 0; j0 < len(m.Adjacencies); j0++ {
- m.Adjacencies[j0].EidType = buf.DecodeUint8()
- m.Adjacencies[j0].Reid = make([]byte, 16)
- copy(m.Adjacencies[j0].Reid, buf.DecodeBytes(len(m.Adjacencies[j0].Reid)))
- m.Adjacencies[j0].Leid = make([]byte, 16)
- copy(m.Adjacencies[j0].Leid, buf.DecodeBytes(len(m.Adjacencies[j0].Leid)))
- m.Adjacencies[j0].ReidPrefixLen = buf.DecodeUint8()
- m.Adjacencies[j0].LeidPrefixLen = buf.DecodeUint8()
- }
- return nil
-}
-
-// OneEidTableAddDelMap defines message 'one_eid_table_add_del_map'.
-type OneEidTableAddDelMap struct {
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
- Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
- DpTable uint32 `binapi:"u32,name=dp_table" json:"dp_table,omitempty"`
- IsL2 uint8 `binapi:"u8,name=is_l2" json:"is_l2,omitempty"`
-}
-
-func (m *OneEidTableAddDelMap) Reset() { *m = OneEidTableAddDelMap{} }
-func (*OneEidTableAddDelMap) GetMessageName() string { return "one_eid_table_add_del_map" }
-func (*OneEidTableAddDelMap) GetCrcString() string { return "59e9975e" }
-func (*OneEidTableAddDelMap) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OneEidTableAddDelMap) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 4 // m.Vni
- size += 4 // m.DpTable
- size += 1 // m.IsL2
- return size
-}
-func (m *OneEidTableAddDelMap) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsAdd)
- buf.EncodeUint32(m.Vni)
- buf.EncodeUint32(m.DpTable)
- buf.EncodeUint8(m.IsL2)
- return buf.Bytes(), nil
-}
-func (m *OneEidTableAddDelMap) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeUint8()
- m.Vni = buf.DecodeUint32()
- m.DpTable = buf.DecodeUint32()
- m.IsL2 = buf.DecodeUint8()
- return nil
-}
-
-// OneEidTableAddDelMapReply defines message 'one_eid_table_add_del_map_reply'.
-type OneEidTableAddDelMapReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *OneEidTableAddDelMapReply) Reset() { *m = OneEidTableAddDelMapReply{} }
-func (*OneEidTableAddDelMapReply) GetMessageName() string { return "one_eid_table_add_del_map_reply" }
-func (*OneEidTableAddDelMapReply) GetCrcString() string { return "e8d4e804" }
-func (*OneEidTableAddDelMapReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OneEidTableAddDelMapReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *OneEidTableAddDelMapReply) 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 *OneEidTableAddDelMapReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// OneEidTableDetails defines message 'one_eid_table_details'.
-type OneEidTableDetails struct {
- LocatorSetIndex uint32 `binapi:"u32,name=locator_set_index" json:"locator_set_index,omitempty"`
- Action uint8 `binapi:"u8,name=action" json:"action,omitempty"`
- IsLocal uint8 `binapi:"u8,name=is_local" json:"is_local,omitempty"`
- EidType uint8 `binapi:"u8,name=eid_type" json:"eid_type,omitempty"`
- IsSrcDst uint8 `binapi:"u8,name=is_src_dst" json:"is_src_dst,omitempty"`
- Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
- Eid []byte `binapi:"u8[16],name=eid" json:"eid,omitempty"`
- EidPrefixLen uint8 `binapi:"u8,name=eid_prefix_len" json:"eid_prefix_len,omitempty"`
- Seid []byte `binapi:"u8[16],name=seid" json:"seid,omitempty"`
- SeidPrefixLen uint8 `binapi:"u8,name=seid_prefix_len" json:"seid_prefix_len,omitempty"`
- TTL uint32 `binapi:"u32,name=ttl" json:"ttl,omitempty"`
- Authoritative uint8 `binapi:"u8,name=authoritative" json:"authoritative,omitempty"`
- KeyID uint16 `binapi:"u16,name=key_id" json:"key_id,omitempty"`
- Key []byte `binapi:"u8[64],name=key" json:"key,omitempty"`
-}
-
-func (m *OneEidTableDetails) Reset() { *m = OneEidTableDetails{} }
-func (*OneEidTableDetails) GetMessageName() string { return "one_eid_table_details" }
-func (*OneEidTableDetails) GetCrcString() string { return "dcd9f414" }
-func (*OneEidTableDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OneEidTableDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.LocatorSetIndex
- size += 1 // m.Action
- size += 1 // m.IsLocal
- size += 1 // m.EidType
- size += 1 // m.IsSrcDst
- size += 4 // m.Vni
- size += 1 * 16 // m.Eid
- size += 1 // m.EidPrefixLen
- size += 1 * 16 // m.Seid
- size += 1 // m.SeidPrefixLen
- size += 4 // m.TTL
- size += 1 // m.Authoritative
- size += 2 // m.KeyID
- size += 1 * 64 // m.Key
- return size
-}
-func (m *OneEidTableDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.LocatorSetIndex)
- buf.EncodeUint8(m.Action)
- buf.EncodeUint8(m.IsLocal)
- buf.EncodeUint8(m.EidType)
- buf.EncodeUint8(m.IsSrcDst)
- buf.EncodeUint32(m.Vni)
- buf.EncodeBytes(m.Eid, 16)
- buf.EncodeUint8(m.EidPrefixLen)
- buf.EncodeBytes(m.Seid, 16)
- buf.EncodeUint8(m.SeidPrefixLen)
- buf.EncodeUint32(m.TTL)
- buf.EncodeUint8(m.Authoritative)
- buf.EncodeUint16(m.KeyID)
- buf.EncodeBytes(m.Key, 64)
- return buf.Bytes(), nil
-}
-func (m *OneEidTableDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.LocatorSetIndex = buf.DecodeUint32()
- m.Action = buf.DecodeUint8()
- m.IsLocal = buf.DecodeUint8()
- m.EidType = buf.DecodeUint8()
- m.IsSrcDst = buf.DecodeUint8()
- m.Vni = buf.DecodeUint32()
- m.Eid = make([]byte, 16)
- copy(m.Eid, buf.DecodeBytes(len(m.Eid)))
- m.EidPrefixLen = buf.DecodeUint8()
- m.Seid = make([]byte, 16)
- copy(m.Seid, buf.DecodeBytes(len(m.Seid)))
- m.SeidPrefixLen = buf.DecodeUint8()
- m.TTL = buf.DecodeUint32()
- m.Authoritative = buf.DecodeUint8()
- m.KeyID = buf.DecodeUint16()
- m.Key = make([]byte, 64)
- copy(m.Key, buf.DecodeBytes(len(m.Key)))
- return nil
-}
-
-// OneEidTableDump defines message 'one_eid_table_dump'.
-type OneEidTableDump struct {
- EidSet uint8 `binapi:"u8,name=eid_set" json:"eid_set,omitempty"`
- PrefixLength uint8 `binapi:"u8,name=prefix_length" json:"prefix_length,omitempty"`
- Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
- EidType uint8 `binapi:"u8,name=eid_type" json:"eid_type,omitempty"`
- Eid []byte `binapi:"u8[16],name=eid" json:"eid,omitempty"`
- Filter uint8 `binapi:"u8,name=filter" json:"filter,omitempty"`
-}
-
-func (m *OneEidTableDump) Reset() { *m = OneEidTableDump{} }
-func (*OneEidTableDump) GetMessageName() string { return "one_eid_table_dump" }
-func (*OneEidTableDump) GetCrcString() string { return "e0df64da" }
-func (*OneEidTableDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OneEidTableDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.EidSet
- size += 1 // m.PrefixLength
- size += 4 // m.Vni
- size += 1 // m.EidType
- size += 1 * 16 // m.Eid
- size += 1 // m.Filter
- return size
-}
-func (m *OneEidTableDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.EidSet)
- buf.EncodeUint8(m.PrefixLength)
- buf.EncodeUint32(m.Vni)
- buf.EncodeUint8(m.EidType)
- buf.EncodeBytes(m.Eid, 16)
- buf.EncodeUint8(m.Filter)
- return buf.Bytes(), nil
-}
-func (m *OneEidTableDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.EidSet = buf.DecodeUint8()
- m.PrefixLength = buf.DecodeUint8()
- m.Vni = buf.DecodeUint32()
- m.EidType = buf.DecodeUint8()
- m.Eid = make([]byte, 16)
- copy(m.Eid, buf.DecodeBytes(len(m.Eid)))
- m.Filter = buf.DecodeUint8()
- return nil
-}
-
-// OneEidTableMapDetails defines message 'one_eid_table_map_details'.
-type OneEidTableMapDetails struct {
- Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
- DpTable uint32 `binapi:"u32,name=dp_table" json:"dp_table,omitempty"`
-}
-
-func (m *OneEidTableMapDetails) Reset() { *m = OneEidTableMapDetails{} }
-func (*OneEidTableMapDetails) GetMessageName() string { return "one_eid_table_map_details" }
-func (*OneEidTableMapDetails) GetCrcString() string { return "0b6859e2" }
-func (*OneEidTableMapDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OneEidTableMapDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Vni
- size += 4 // m.DpTable
- return size
-}
-func (m *OneEidTableMapDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Vni)
- buf.EncodeUint32(m.DpTable)
- return buf.Bytes(), nil
-}
-func (m *OneEidTableMapDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Vni = buf.DecodeUint32()
- m.DpTable = buf.DecodeUint32()
- return nil
-}
-
-// OneEidTableMapDump defines message 'one_eid_table_map_dump'.
-type OneEidTableMapDump struct {
- IsL2 uint8 `binapi:"u8,name=is_l2" json:"is_l2,omitempty"`
-}
-
-func (m *OneEidTableMapDump) Reset() { *m = OneEidTableMapDump{} }
-func (*OneEidTableMapDump) GetMessageName() string { return "one_eid_table_map_dump" }
-func (*OneEidTableMapDump) GetCrcString() string { return "67c54650" }
-func (*OneEidTableMapDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OneEidTableMapDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsL2
- return size
-}
-func (m *OneEidTableMapDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsL2)
- return buf.Bytes(), nil
-}
-func (m *OneEidTableMapDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsL2 = buf.DecodeUint8()
- return nil
-}
-
-// OneEidTableVniDetails defines message 'one_eid_table_vni_details'.
-type OneEidTableVniDetails struct {
- Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
-}
-
-func (m *OneEidTableVniDetails) Reset() { *m = OneEidTableVniDetails{} }
-func (*OneEidTableVniDetails) GetMessageName() string { return "one_eid_table_vni_details" }
-func (*OneEidTableVniDetails) GetCrcString() string { return "64abc01e" }
-func (*OneEidTableVniDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OneEidTableVniDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Vni
- return size
-}
-func (m *OneEidTableVniDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Vni)
- return buf.Bytes(), nil
-}
-func (m *OneEidTableVniDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Vni = buf.DecodeUint32()
- return nil
-}
-
-// OneEidTableVniDump defines message 'one_eid_table_vni_dump'.
-type OneEidTableVniDump struct{}
-
-func (m *OneEidTableVniDump) Reset() { *m = OneEidTableVniDump{} }
-func (*OneEidTableVniDump) GetMessageName() string { return "one_eid_table_vni_dump" }
-func (*OneEidTableVniDump) GetCrcString() string { return "51077d14" }
-func (*OneEidTableVniDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OneEidTableVniDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *OneEidTableVniDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *OneEidTableVniDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// OneEnableDisable defines message 'one_enable_disable'.
-type OneEnableDisable struct {
- IsEn uint8 `binapi:"u8,name=is_en" json:"is_en,omitempty"`
-}
-
-func (m *OneEnableDisable) Reset() { *m = OneEnableDisable{} }
-func (*OneEnableDisable) GetMessageName() string { return "one_enable_disable" }
-func (*OneEnableDisable) GetCrcString() string { return "eb0e943b" }
-func (*OneEnableDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OneEnableDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsEn
- return size
-}
-func (m *OneEnableDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsEn)
- return buf.Bytes(), nil
-}
-func (m *OneEnableDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsEn = buf.DecodeUint8()
- return nil
-}
-
-// OneEnableDisablePetrMode defines message 'one_enable_disable_petr_mode'.
-type OneEnableDisablePetrMode struct {
- IsEn uint8 `binapi:"u8,name=is_en" json:"is_en,omitempty"`
-}
-
-func (m *OneEnableDisablePetrMode) Reset() { *m = OneEnableDisablePetrMode{} }
-func (*OneEnableDisablePetrMode) GetMessageName() string { return "one_enable_disable_petr_mode" }
-func (*OneEnableDisablePetrMode) GetCrcString() string { return "eb0e943b" }
-func (*OneEnableDisablePetrMode) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OneEnableDisablePetrMode) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsEn
- return size
-}
-func (m *OneEnableDisablePetrMode) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsEn)
- return buf.Bytes(), nil
-}
-func (m *OneEnableDisablePetrMode) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsEn = buf.DecodeUint8()
- return nil
-}
-
-// OneEnableDisablePetrModeReply defines message 'one_enable_disable_petr_mode_reply'.
-type OneEnableDisablePetrModeReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *OneEnableDisablePetrModeReply) Reset() { *m = OneEnableDisablePetrModeReply{} }
-func (*OneEnableDisablePetrModeReply) GetMessageName() string {
- return "one_enable_disable_petr_mode_reply"
-}
-func (*OneEnableDisablePetrModeReply) GetCrcString() string { return "e8d4e804" }
-func (*OneEnableDisablePetrModeReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OneEnableDisablePetrModeReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *OneEnableDisablePetrModeReply) 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 *OneEnableDisablePetrModeReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// OneEnableDisablePitrMode defines message 'one_enable_disable_pitr_mode'.
-type OneEnableDisablePitrMode struct {
- IsEn uint8 `binapi:"u8,name=is_en" json:"is_en,omitempty"`
-}
-
-func (m *OneEnableDisablePitrMode) Reset() { *m = OneEnableDisablePitrMode{} }
-func (*OneEnableDisablePitrMode) GetMessageName() string { return "one_enable_disable_pitr_mode" }
-func (*OneEnableDisablePitrMode) GetCrcString() string { return "eb0e943b" }
-func (*OneEnableDisablePitrMode) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OneEnableDisablePitrMode) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsEn
- return size
-}
-func (m *OneEnableDisablePitrMode) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsEn)
- return buf.Bytes(), nil
-}
-func (m *OneEnableDisablePitrMode) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsEn = buf.DecodeUint8()
- return nil
-}
-
-// OneEnableDisablePitrModeReply defines message 'one_enable_disable_pitr_mode_reply'.
-type OneEnableDisablePitrModeReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *OneEnableDisablePitrModeReply) Reset() { *m = OneEnableDisablePitrModeReply{} }
-func (*OneEnableDisablePitrModeReply) GetMessageName() string {
- return "one_enable_disable_pitr_mode_reply"
-}
-func (*OneEnableDisablePitrModeReply) GetCrcString() string { return "e8d4e804" }
-func (*OneEnableDisablePitrModeReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OneEnableDisablePitrModeReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *OneEnableDisablePitrModeReply) 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 *OneEnableDisablePitrModeReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// OneEnableDisableReply defines message 'one_enable_disable_reply'.
-type OneEnableDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *OneEnableDisableReply) Reset() { *m = OneEnableDisableReply{} }
-func (*OneEnableDisableReply) GetMessageName() string { return "one_enable_disable_reply" }
-func (*OneEnableDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*OneEnableDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OneEnableDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *OneEnableDisableReply) 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 *OneEnableDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// OneEnableDisableXtrMode defines message 'one_enable_disable_xtr_mode'.
-type OneEnableDisableXtrMode struct {
- IsEn uint8 `binapi:"u8,name=is_en" json:"is_en,omitempty"`
-}
-
-func (m *OneEnableDisableXtrMode) Reset() { *m = OneEnableDisableXtrMode{} }
-func (*OneEnableDisableXtrMode) GetMessageName() string { return "one_enable_disable_xtr_mode" }
-func (*OneEnableDisableXtrMode) GetCrcString() string { return "eb0e943b" }
-func (*OneEnableDisableXtrMode) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OneEnableDisableXtrMode) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsEn
- return size
-}
-func (m *OneEnableDisableXtrMode) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsEn)
- return buf.Bytes(), nil
-}
-func (m *OneEnableDisableXtrMode) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsEn = buf.DecodeUint8()
- return nil
-}
-
-// OneEnableDisableXtrModeReply defines message 'one_enable_disable_xtr_mode_reply'.
-type OneEnableDisableXtrModeReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *OneEnableDisableXtrModeReply) Reset() { *m = OneEnableDisableXtrModeReply{} }
-func (*OneEnableDisableXtrModeReply) GetMessageName() string {
- return "one_enable_disable_xtr_mode_reply"
-}
-func (*OneEnableDisableXtrModeReply) GetCrcString() string { return "e8d4e804" }
-func (*OneEnableDisableXtrModeReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OneEnableDisableXtrModeReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *OneEnableDisableXtrModeReply) 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 *OneEnableDisableXtrModeReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// OneGetMapRequestItrRlocs defines message 'one_get_map_request_itr_rlocs'.
-type OneGetMapRequestItrRlocs struct{}
-
-func (m *OneGetMapRequestItrRlocs) Reset() { *m = OneGetMapRequestItrRlocs{} }
-func (*OneGetMapRequestItrRlocs) GetMessageName() string { return "one_get_map_request_itr_rlocs" }
-func (*OneGetMapRequestItrRlocs) GetCrcString() string { return "51077d14" }
-func (*OneGetMapRequestItrRlocs) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OneGetMapRequestItrRlocs) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *OneGetMapRequestItrRlocs) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *OneGetMapRequestItrRlocs) Unmarshal(b []byte) error {
- return nil
-}
-
-// OneGetMapRequestItrRlocsReply defines message 'one_get_map_request_itr_rlocs_reply'.
-type OneGetMapRequestItrRlocsReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- LocatorSetName []byte `binapi:"u8[64],name=locator_set_name" json:"locator_set_name,omitempty"`
-}
-
-func (m *OneGetMapRequestItrRlocsReply) Reset() { *m = OneGetMapRequestItrRlocsReply{} }
-func (*OneGetMapRequestItrRlocsReply) GetMessageName() string {
- return "one_get_map_request_itr_rlocs_reply"
-}
-func (*OneGetMapRequestItrRlocsReply) GetCrcString() string { return "9f56f6f7" }
-func (*OneGetMapRequestItrRlocsReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OneGetMapRequestItrRlocsReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 1 * 64 // m.LocatorSetName
- return size
-}
-func (m *OneGetMapRequestItrRlocsReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeBytes(m.LocatorSetName, 64)
- return buf.Bytes(), nil
-}
-func (m *OneGetMapRequestItrRlocsReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.LocatorSetName = make([]byte, 64)
- copy(m.LocatorSetName, buf.DecodeBytes(len(m.LocatorSetName)))
- return nil
-}
-
-// OneGetTransportProtocol defines message 'one_get_transport_protocol'.
-type OneGetTransportProtocol struct{}
-
-func (m *OneGetTransportProtocol) Reset() { *m = OneGetTransportProtocol{} }
-func (*OneGetTransportProtocol) GetMessageName() string { return "one_get_transport_protocol" }
-func (*OneGetTransportProtocol) GetCrcString() string { return "51077d14" }
-func (*OneGetTransportProtocol) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OneGetTransportProtocol) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *OneGetTransportProtocol) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *OneGetTransportProtocol) Unmarshal(b []byte) error {
- return nil
-}
-
-// OneGetTransportProtocolReply defines message 'one_get_transport_protocol_reply'.
-type OneGetTransportProtocolReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"`
-}
-
-func (m *OneGetTransportProtocolReply) Reset() { *m = OneGetTransportProtocolReply{} }
-func (*OneGetTransportProtocolReply) GetMessageName() string {
- return "one_get_transport_protocol_reply"
-}
-func (*OneGetTransportProtocolReply) GetCrcString() string { return "62a28eb3" }
-func (*OneGetTransportProtocolReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OneGetTransportProtocolReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 1 // m.Protocol
- return size
-}
-func (m *OneGetTransportProtocolReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint8(m.Protocol)
- return buf.Bytes(), nil
-}
-func (m *OneGetTransportProtocolReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.Protocol = buf.DecodeUint8()
- return nil
-}
-
-// OneL2ArpBdGet defines message 'one_l2_arp_bd_get'.
-type OneL2ArpBdGet struct{}
-
-func (m *OneL2ArpBdGet) Reset() { *m = OneL2ArpBdGet{} }
-func (*OneL2ArpBdGet) GetMessageName() string { return "one_l2_arp_bd_get" }
-func (*OneL2ArpBdGet) GetCrcString() string { return "51077d14" }
-func (*OneL2ArpBdGet) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OneL2ArpBdGet) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *OneL2ArpBdGet) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *OneL2ArpBdGet) Unmarshal(b []byte) error {
- return nil
-}
-
-// OneL2ArpBdGetReply defines message 'one_l2_arp_bd_get_reply'.
-type OneL2ArpBdGetReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- Count uint32 `binapi:"u32,name=count" json:"-"`
- BridgeDomains []uint32 `binapi:"u32[count],name=bridge_domains" json:"bridge_domains,omitempty"`
-}
-
-func (m *OneL2ArpBdGetReply) Reset() { *m = OneL2ArpBdGetReply{} }
-func (*OneL2ArpBdGetReply) GetMessageName() string { return "one_l2_arp_bd_get_reply" }
-func (*OneL2ArpBdGetReply) GetCrcString() string { return "221ac888" }
-func (*OneL2ArpBdGetReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OneL2ArpBdGetReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.Count
- size += 4 * len(m.BridgeDomains) // m.BridgeDomains
- return size
-}
-func (m *OneL2ArpBdGetReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(uint32(len(m.BridgeDomains)))
- for i := 0; i < len(m.BridgeDomains); i++ {
- var x uint32
- if i < len(m.BridgeDomains) {
- x = uint32(m.BridgeDomains[i])
- }
- buf.EncodeUint32(x)
- }
- return buf.Bytes(), nil
-}
-func (m *OneL2ArpBdGetReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.Count = buf.DecodeUint32()
- m.BridgeDomains = make([]uint32, m.Count)
- for i := 0; i < len(m.BridgeDomains); i++ {
- m.BridgeDomains[i] = buf.DecodeUint32()
- }
- return nil
-}
-
-// OneL2ArpEntriesGet defines message 'one_l2_arp_entries_get'.
-type OneL2ArpEntriesGet struct {
- Bd uint32 `binapi:"u32,name=bd" json:"bd,omitempty"`
-}
-
-func (m *OneL2ArpEntriesGet) Reset() { *m = OneL2ArpEntriesGet{} }
-func (*OneL2ArpEntriesGet) GetMessageName() string { return "one_l2_arp_entries_get" }
-func (*OneL2ArpEntriesGet) GetCrcString() string { return "4d418cf4" }
-func (*OneL2ArpEntriesGet) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OneL2ArpEntriesGet) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Bd
- return size
-}
-func (m *OneL2ArpEntriesGet) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Bd)
- return buf.Bytes(), nil
-}
-func (m *OneL2ArpEntriesGet) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Bd = buf.DecodeUint32()
- return nil
-}
-
-// OneL2ArpEntriesGetReply defines message 'one_l2_arp_entries_get_reply'.
-type OneL2ArpEntriesGetReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- Count uint32 `binapi:"u32,name=count" json:"-"`
- Entries []OneL2ArpEntry `binapi:"one_l2_arp_entry[count],name=entries" json:"entries,omitempty"`
-}
-
-func (m *OneL2ArpEntriesGetReply) Reset() { *m = OneL2ArpEntriesGetReply{} }
-func (*OneL2ArpEntriesGetReply) GetMessageName() string { return "one_l2_arp_entries_get_reply" }
-func (*OneL2ArpEntriesGetReply) GetCrcString() string { return "88e54ded" }
-func (*OneL2ArpEntriesGetReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OneL2ArpEntriesGetReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.Count
- for j1 := 0; j1 < len(m.Entries); j1++ {
- var s1 OneL2ArpEntry
- _ = s1
- if j1 < len(m.Entries) {
- s1 = m.Entries[j1]
- }
- size += 1 * 6 // s1.Mac
- size += 4 // s1.IP4
- }
- return size
-}
-func (m *OneL2ArpEntriesGetReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(uint32(len(m.Entries)))
- for j0 := 0; j0 < len(m.Entries); j0++ {
- var v0 OneL2ArpEntry // Entries
- if j0 < len(m.Entries) {
- v0 = m.Entries[j0]
- }
- buf.EncodeBytes(v0.Mac, 6)
- buf.EncodeUint32(v0.IP4)
- }
- return buf.Bytes(), nil
-}
-func (m *OneL2ArpEntriesGetReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.Count = buf.DecodeUint32()
- m.Entries = make([]OneL2ArpEntry, m.Count)
- for j0 := 0; j0 < len(m.Entries); j0++ {
- m.Entries[j0].Mac = make([]byte, 6)
- copy(m.Entries[j0].Mac, buf.DecodeBytes(len(m.Entries[j0].Mac)))
- m.Entries[j0].IP4 = buf.DecodeUint32()
- }
- return nil
-}
-
-// OneLocatorDetails defines message 'one_locator_details'.
-type OneLocatorDetails struct {
- Local uint8 `binapi:"u8,name=local" json:"local,omitempty"`
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- IsIPv6 uint8 `binapi:"u8,name=is_ipv6" json:"is_ipv6,omitempty"`
- IPAddress []byte `binapi:"u8[16],name=ip_address" json:"ip_address,omitempty"`
- Priority uint8 `binapi:"u8,name=priority" json:"priority,omitempty"`
- Weight uint8 `binapi:"u8,name=weight" json:"weight,omitempty"`
-}
-
-func (m *OneLocatorDetails) Reset() { *m = OneLocatorDetails{} }
-func (*OneLocatorDetails) GetMessageName() string { return "one_locator_details" }
-func (*OneLocatorDetails) GetCrcString() string { return "b3988a30" }
-func (*OneLocatorDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OneLocatorDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.Local
- size += 4 // m.SwIfIndex
- size += 1 // m.IsIPv6
- size += 1 * 16 // m.IPAddress
- size += 1 // m.Priority
- size += 1 // m.Weight
- return size
-}
-func (m *OneLocatorDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.Local)
- buf.EncodeUint32(m.SwIfIndex)
- buf.EncodeUint8(m.IsIPv6)
- buf.EncodeBytes(m.IPAddress, 16)
- buf.EncodeUint8(m.Priority)
- buf.EncodeUint8(m.Weight)
- return buf.Bytes(), nil
-}
-func (m *OneLocatorDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Local = buf.DecodeUint8()
- m.SwIfIndex = buf.DecodeUint32()
- m.IsIPv6 = buf.DecodeUint8()
- m.IPAddress = make([]byte, 16)
- copy(m.IPAddress, buf.DecodeBytes(len(m.IPAddress)))
- m.Priority = buf.DecodeUint8()
- m.Weight = buf.DecodeUint8()
- return nil
-}
-
-// OneLocatorDump defines message 'one_locator_dump'.
-type OneLocatorDump struct {
- LsIndex uint32 `binapi:"u32,name=ls_index" json:"ls_index,omitempty"`
- LsName []byte `binapi:"u8[64],name=ls_name" json:"ls_name,omitempty"`
- IsIndexSet uint8 `binapi:"u8,name=is_index_set" json:"is_index_set,omitempty"`
-}
-
-func (m *OneLocatorDump) Reset() { *m = OneLocatorDump{} }
-func (*OneLocatorDump) GetMessageName() string { return "one_locator_dump" }
-func (*OneLocatorDump) GetCrcString() string { return "f27d5050" }
-func (*OneLocatorDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OneLocatorDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.LsIndex
- size += 1 * 64 // m.LsName
- size += 1 // m.IsIndexSet
- return size
-}
-func (m *OneLocatorDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.LsIndex)
- buf.EncodeBytes(m.LsName, 64)
- buf.EncodeUint8(m.IsIndexSet)
- return buf.Bytes(), nil
-}
-func (m *OneLocatorDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.LsIndex = buf.DecodeUint32()
- m.LsName = make([]byte, 64)
- copy(m.LsName, buf.DecodeBytes(len(m.LsName)))
- m.IsIndexSet = buf.DecodeUint8()
- return nil
-}
-
-// OneLocatorSetDetails defines message 'one_locator_set_details'.
-type OneLocatorSetDetails struct {
- LsIndex uint32 `binapi:"u32,name=ls_index" json:"ls_index,omitempty"`
- LsName []byte `binapi:"u8[64],name=ls_name" json:"ls_name,omitempty"`
-}
-
-func (m *OneLocatorSetDetails) Reset() { *m = OneLocatorSetDetails{} }
-func (*OneLocatorSetDetails) GetMessageName() string { return "one_locator_set_details" }
-func (*OneLocatorSetDetails) GetCrcString() string { return "6b846882" }
-func (*OneLocatorSetDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OneLocatorSetDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.LsIndex
- size += 1 * 64 // m.LsName
- return size
-}
-func (m *OneLocatorSetDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.LsIndex)
- buf.EncodeBytes(m.LsName, 64)
- return buf.Bytes(), nil
-}
-func (m *OneLocatorSetDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.LsIndex = buf.DecodeUint32()
- m.LsName = make([]byte, 64)
- copy(m.LsName, buf.DecodeBytes(len(m.LsName)))
- return nil
-}
-
-// OneLocatorSetDump defines message 'one_locator_set_dump'.
-type OneLocatorSetDump struct {
- Filter uint8 `binapi:"u8,name=filter" json:"filter,omitempty"`
-}
-
-func (m *OneLocatorSetDump) Reset() { *m = OneLocatorSetDump{} }
-func (*OneLocatorSetDump) GetMessageName() string { return "one_locator_set_dump" }
-func (*OneLocatorSetDump) GetCrcString() string { return "c79e8ab0" }
-func (*OneLocatorSetDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OneLocatorSetDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.Filter
- return size
-}
-func (m *OneLocatorSetDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.Filter)
- return buf.Bytes(), nil
-}
-func (m *OneLocatorSetDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Filter = buf.DecodeUint8()
- return nil
-}
-
-// OneMapRegisterEnableDisable defines message 'one_map_register_enable_disable'.
-type OneMapRegisterEnableDisable struct {
- IsEnabled uint8 `binapi:"u8,name=is_enabled" json:"is_enabled,omitempty"`
-}
-
-func (m *OneMapRegisterEnableDisable) Reset() { *m = OneMapRegisterEnableDisable{} }
-func (*OneMapRegisterEnableDisable) GetMessageName() string { return "one_map_register_enable_disable" }
-func (*OneMapRegisterEnableDisable) GetCrcString() string { return "294103d1" }
-func (*OneMapRegisterEnableDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OneMapRegisterEnableDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsEnabled
- return size
-}
-func (m *OneMapRegisterEnableDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsEnabled)
- return buf.Bytes(), nil
-}
-func (m *OneMapRegisterEnableDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsEnabled = buf.DecodeUint8()
- return nil
-}
-
-// OneMapRegisterEnableDisableReply defines message 'one_map_register_enable_disable_reply'.
-type OneMapRegisterEnableDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *OneMapRegisterEnableDisableReply) Reset() { *m = OneMapRegisterEnableDisableReply{} }
-func (*OneMapRegisterEnableDisableReply) GetMessageName() string {
- return "one_map_register_enable_disable_reply"
-}
-func (*OneMapRegisterEnableDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*OneMapRegisterEnableDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OneMapRegisterEnableDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *OneMapRegisterEnableDisableReply) 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 *OneMapRegisterEnableDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// OneMapRegisterFallbackThreshold defines message 'one_map_register_fallback_threshold'.
-type OneMapRegisterFallbackThreshold struct {
- Value uint32 `binapi:"u32,name=value" json:"value,omitempty"`
-}
-
-func (m *OneMapRegisterFallbackThreshold) Reset() { *m = OneMapRegisterFallbackThreshold{} }
-func (*OneMapRegisterFallbackThreshold) GetMessageName() string {
- return "one_map_register_fallback_threshold"
-}
-func (*OneMapRegisterFallbackThreshold) GetCrcString() string { return "f7d4a475" }
-func (*OneMapRegisterFallbackThreshold) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OneMapRegisterFallbackThreshold) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Value
- return size
-}
-func (m *OneMapRegisterFallbackThreshold) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Value)
- return buf.Bytes(), nil
-}
-func (m *OneMapRegisterFallbackThreshold) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Value = buf.DecodeUint32()
- return nil
-}
-
-// OneMapRegisterFallbackThresholdReply defines message 'one_map_register_fallback_threshold_reply'.
-type OneMapRegisterFallbackThresholdReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *OneMapRegisterFallbackThresholdReply) Reset() { *m = OneMapRegisterFallbackThresholdReply{} }
-func (*OneMapRegisterFallbackThresholdReply) GetMessageName() string {
- return "one_map_register_fallback_threshold_reply"
-}
-func (*OneMapRegisterFallbackThresholdReply) GetCrcString() string { return "e8d4e804" }
-func (*OneMapRegisterFallbackThresholdReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OneMapRegisterFallbackThresholdReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *OneMapRegisterFallbackThresholdReply) 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 *OneMapRegisterFallbackThresholdReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// OneMapRegisterSetTTL defines message 'one_map_register_set_ttl'.
-type OneMapRegisterSetTTL struct {
- TTL uint32 `binapi:"u32,name=ttl" json:"ttl,omitempty"`
-}
-
-func (m *OneMapRegisterSetTTL) Reset() { *m = OneMapRegisterSetTTL{} }
-func (*OneMapRegisterSetTTL) GetMessageName() string { return "one_map_register_set_ttl" }
-func (*OneMapRegisterSetTTL) GetCrcString() string { return "dd59f1f3" }
-func (*OneMapRegisterSetTTL) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OneMapRegisterSetTTL) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.TTL
- return size
-}
-func (m *OneMapRegisterSetTTL) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.TTL)
- return buf.Bytes(), nil
-}
-func (m *OneMapRegisterSetTTL) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.TTL = buf.DecodeUint32()
- return nil
-}
-
-// OneMapRegisterSetTTLReply defines message 'one_map_register_set_ttl_reply'.
-type OneMapRegisterSetTTLReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *OneMapRegisterSetTTLReply) Reset() { *m = OneMapRegisterSetTTLReply{} }
-func (*OneMapRegisterSetTTLReply) GetMessageName() string { return "one_map_register_set_ttl_reply" }
-func (*OneMapRegisterSetTTLReply) GetCrcString() string { return "e8d4e804" }
-func (*OneMapRegisterSetTTLReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OneMapRegisterSetTTLReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *OneMapRegisterSetTTLReply) 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 *OneMapRegisterSetTTLReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// OneMapRequestMode defines message 'one_map_request_mode'.
-type OneMapRequestMode struct {
- Mode uint8 `binapi:"u8,name=mode" json:"mode,omitempty"`
-}
-
-func (m *OneMapRequestMode) Reset() { *m = OneMapRequestMode{} }
-func (*OneMapRequestMode) GetMessageName() string { return "one_map_request_mode" }
-func (*OneMapRequestMode) GetCrcString() string { return "f3f93ce9" }
-func (*OneMapRequestMode) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OneMapRequestMode) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.Mode
- return size
-}
-func (m *OneMapRequestMode) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.Mode)
- return buf.Bytes(), nil
-}
-func (m *OneMapRequestMode) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Mode = buf.DecodeUint8()
- return nil
-}
-
-// OneMapRequestModeReply defines message 'one_map_request_mode_reply'.
-type OneMapRequestModeReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *OneMapRequestModeReply) Reset() { *m = OneMapRequestModeReply{} }
-func (*OneMapRequestModeReply) GetMessageName() string { return "one_map_request_mode_reply" }
-func (*OneMapRequestModeReply) GetCrcString() string { return "e8d4e804" }
-func (*OneMapRequestModeReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OneMapRequestModeReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *OneMapRequestModeReply) 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 *OneMapRequestModeReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// OneMapResolverDetails defines message 'one_map_resolver_details'.
-type OneMapResolverDetails struct {
- IsIPv6 uint8 `binapi:"u8,name=is_ipv6" json:"is_ipv6,omitempty"`
- IPAddress []byte `binapi:"u8[16],name=ip_address" json:"ip_address,omitempty"`
-}
-
-func (m *OneMapResolverDetails) Reset() { *m = OneMapResolverDetails{} }
-func (*OneMapResolverDetails) GetMessageName() string { return "one_map_resolver_details" }
-func (*OneMapResolverDetails) GetCrcString() string { return "60a5f5ca" }
-func (*OneMapResolverDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OneMapResolverDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsIPv6
- size += 1 * 16 // m.IPAddress
- return size
-}
-func (m *OneMapResolverDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsIPv6)
- buf.EncodeBytes(m.IPAddress, 16)
- return buf.Bytes(), nil
-}
-func (m *OneMapResolverDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsIPv6 = buf.DecodeUint8()
- m.IPAddress = make([]byte, 16)
- copy(m.IPAddress, buf.DecodeBytes(len(m.IPAddress)))
- return nil
-}
-
-// OneMapResolverDump defines message 'one_map_resolver_dump'.
-type OneMapResolverDump struct{}
-
-func (m *OneMapResolverDump) Reset() { *m = OneMapResolverDump{} }
-func (*OneMapResolverDump) GetMessageName() string { return "one_map_resolver_dump" }
-func (*OneMapResolverDump) GetCrcString() string { return "51077d14" }
-func (*OneMapResolverDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OneMapResolverDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *OneMapResolverDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *OneMapResolverDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// OneMapServerDetails defines message 'one_map_server_details'.
-type OneMapServerDetails struct {
- IsIPv6 uint8 `binapi:"u8,name=is_ipv6" json:"is_ipv6,omitempty"`
- IPAddress []byte `binapi:"u8[16],name=ip_address" json:"ip_address,omitempty"`
-}
-
-func (m *OneMapServerDetails) Reset() { *m = OneMapServerDetails{} }
-func (*OneMapServerDetails) GetMessageName() string { return "one_map_server_details" }
-func (*OneMapServerDetails) GetCrcString() string { return "60a5f5ca" }
-func (*OneMapServerDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OneMapServerDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsIPv6
- size += 1 * 16 // m.IPAddress
- return size
-}
-func (m *OneMapServerDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsIPv6)
- buf.EncodeBytes(m.IPAddress, 16)
- return buf.Bytes(), nil
-}
-func (m *OneMapServerDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsIPv6 = buf.DecodeUint8()
- m.IPAddress = make([]byte, 16)
- copy(m.IPAddress, buf.DecodeBytes(len(m.IPAddress)))
- return nil
-}
-
-// OneMapServerDump defines message 'one_map_server_dump'.
-type OneMapServerDump struct{}
-
-func (m *OneMapServerDump) Reset() { *m = OneMapServerDump{} }
-func (*OneMapServerDump) GetMessageName() string { return "one_map_server_dump" }
-func (*OneMapServerDump) GetCrcString() string { return "51077d14" }
-func (*OneMapServerDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OneMapServerDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *OneMapServerDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *OneMapServerDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// OneNdpBdGet defines message 'one_ndp_bd_get'.
-type OneNdpBdGet struct{}
-
-func (m *OneNdpBdGet) Reset() { *m = OneNdpBdGet{} }
-func (*OneNdpBdGet) GetMessageName() string { return "one_ndp_bd_get" }
-func (*OneNdpBdGet) GetCrcString() string { return "51077d14" }
-func (*OneNdpBdGet) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OneNdpBdGet) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *OneNdpBdGet) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *OneNdpBdGet) Unmarshal(b []byte) error {
- return nil
-}
-
-// OneNdpBdGetReply defines message 'one_ndp_bd_get_reply'.
-type OneNdpBdGetReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- Count uint32 `binapi:"u32,name=count" json:"-"`
- BridgeDomains []uint32 `binapi:"u32[count],name=bridge_domains" json:"bridge_domains,omitempty"`
-}
-
-func (m *OneNdpBdGetReply) Reset() { *m = OneNdpBdGetReply{} }
-func (*OneNdpBdGetReply) GetMessageName() string { return "one_ndp_bd_get_reply" }
-func (*OneNdpBdGetReply) GetCrcString() string { return "221ac888" }
-func (*OneNdpBdGetReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OneNdpBdGetReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.Count
- size += 4 * len(m.BridgeDomains) // m.BridgeDomains
- return size
-}
-func (m *OneNdpBdGetReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(uint32(len(m.BridgeDomains)))
- for i := 0; i < len(m.BridgeDomains); i++ {
- var x uint32
- if i < len(m.BridgeDomains) {
- x = uint32(m.BridgeDomains[i])
- }
- buf.EncodeUint32(x)
- }
- return buf.Bytes(), nil
-}
-func (m *OneNdpBdGetReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.Count = buf.DecodeUint32()
- m.BridgeDomains = make([]uint32, m.Count)
- for i := 0; i < len(m.BridgeDomains); i++ {
- m.BridgeDomains[i] = buf.DecodeUint32()
- }
- return nil
-}
-
-// OneNdpEntriesGet defines message 'one_ndp_entries_get'.
-type OneNdpEntriesGet struct {
- Bd uint32 `binapi:"u32,name=bd" json:"bd,omitempty"`
-}
-
-func (m *OneNdpEntriesGet) Reset() { *m = OneNdpEntriesGet{} }
-func (*OneNdpEntriesGet) GetMessageName() string { return "one_ndp_entries_get" }
-func (*OneNdpEntriesGet) GetCrcString() string { return "4d418cf4" }
-func (*OneNdpEntriesGet) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OneNdpEntriesGet) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Bd
- return size
-}
-func (m *OneNdpEntriesGet) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Bd)
- return buf.Bytes(), nil
-}
-func (m *OneNdpEntriesGet) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Bd = buf.DecodeUint32()
- return nil
-}
-
-// OneNdpEntriesGetReply defines message 'one_ndp_entries_get_reply'.
-type OneNdpEntriesGetReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- Count uint32 `binapi:"u32,name=count" json:"-"`
- Entries []OneNdpEntry `binapi:"one_ndp_entry[count],name=entries" json:"entries,omitempty"`
-}
-
-func (m *OneNdpEntriesGetReply) Reset() { *m = OneNdpEntriesGetReply{} }
-func (*OneNdpEntriesGetReply) GetMessageName() string { return "one_ndp_entries_get_reply" }
-func (*OneNdpEntriesGetReply) GetCrcString() string { return "d0822f37" }
-func (*OneNdpEntriesGetReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OneNdpEntriesGetReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.Count
- for j1 := 0; j1 < len(m.Entries); j1++ {
- var s1 OneNdpEntry
- _ = s1
- if j1 < len(m.Entries) {
- s1 = m.Entries[j1]
- }
- size += 1 * 6 // s1.Mac
- size += 1 * 16 // s1.IP6
- }
- return size
-}
-func (m *OneNdpEntriesGetReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(uint32(len(m.Entries)))
- for j0 := 0; j0 < len(m.Entries); j0++ {
- var v0 OneNdpEntry // Entries
- if j0 < len(m.Entries) {
- v0 = m.Entries[j0]
- }
- buf.EncodeBytes(v0.Mac, 6)
- buf.EncodeBytes(v0.IP6, 16)
- }
- return buf.Bytes(), nil
-}
-func (m *OneNdpEntriesGetReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.Count = buf.DecodeUint32()
- m.Entries = make([]OneNdpEntry, m.Count)
- for j0 := 0; j0 < len(m.Entries); j0++ {
- m.Entries[j0].Mac = make([]byte, 6)
- copy(m.Entries[j0].Mac, buf.DecodeBytes(len(m.Entries[j0].Mac)))
- m.Entries[j0].IP6 = make([]byte, 16)
- copy(m.Entries[j0].IP6, buf.DecodeBytes(len(m.Entries[j0].IP6)))
- }
- return nil
-}
-
-// OneNshSetLocatorSet defines message 'one_nsh_set_locator_set'.
-type OneNshSetLocatorSet struct {
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
- LsName []byte `binapi:"u8[64],name=ls_name" json:"ls_name,omitempty"`
-}
-
-func (m *OneNshSetLocatorSet) Reset() { *m = OneNshSetLocatorSet{} }
-func (*OneNshSetLocatorSet) GetMessageName() string { return "one_nsh_set_locator_set" }
-func (*OneNshSetLocatorSet) GetCrcString() string { return "7aa022dd" }
-func (*OneNshSetLocatorSet) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OneNshSetLocatorSet) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 1 * 64 // m.LsName
- return size
-}
-func (m *OneNshSetLocatorSet) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsAdd)
- buf.EncodeBytes(m.LsName, 64)
- return buf.Bytes(), nil
-}
-func (m *OneNshSetLocatorSet) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeUint8()
- m.LsName = make([]byte, 64)
- copy(m.LsName, buf.DecodeBytes(len(m.LsName)))
- return nil
-}
-
-// OneNshSetLocatorSetReply defines message 'one_nsh_set_locator_set_reply'.
-type OneNshSetLocatorSetReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *OneNshSetLocatorSetReply) Reset() { *m = OneNshSetLocatorSetReply{} }
-func (*OneNshSetLocatorSetReply) GetMessageName() string { return "one_nsh_set_locator_set_reply" }
-func (*OneNshSetLocatorSetReply) GetCrcString() string { return "e8d4e804" }
-func (*OneNshSetLocatorSetReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OneNshSetLocatorSetReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *OneNshSetLocatorSetReply) 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 *OneNshSetLocatorSetReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// OnePitrSetLocatorSet defines message 'one_pitr_set_locator_set'.
-type OnePitrSetLocatorSet struct {
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
- LsName []byte `binapi:"u8[64],name=ls_name" json:"ls_name,omitempty"`
-}
-
-func (m *OnePitrSetLocatorSet) Reset() { *m = OnePitrSetLocatorSet{} }
-func (*OnePitrSetLocatorSet) GetMessageName() string { return "one_pitr_set_locator_set" }
-func (*OnePitrSetLocatorSet) GetCrcString() string { return "7aa022dd" }
-func (*OnePitrSetLocatorSet) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OnePitrSetLocatorSet) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 1 * 64 // m.LsName
- return size
-}
-func (m *OnePitrSetLocatorSet) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsAdd)
- buf.EncodeBytes(m.LsName, 64)
- return buf.Bytes(), nil
-}
-func (m *OnePitrSetLocatorSet) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeUint8()
- m.LsName = make([]byte, 64)
- copy(m.LsName, buf.DecodeBytes(len(m.LsName)))
- return nil
-}
-
-// OnePitrSetLocatorSetReply defines message 'one_pitr_set_locator_set_reply'.
-type OnePitrSetLocatorSetReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *OnePitrSetLocatorSetReply) Reset() { *m = OnePitrSetLocatorSetReply{} }
-func (*OnePitrSetLocatorSetReply) GetMessageName() string { return "one_pitr_set_locator_set_reply" }
-func (*OnePitrSetLocatorSetReply) GetCrcString() string { return "e8d4e804" }
-func (*OnePitrSetLocatorSetReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OnePitrSetLocatorSetReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *OnePitrSetLocatorSetReply) 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 *OnePitrSetLocatorSetReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// OneRlocProbeEnableDisable defines message 'one_rloc_probe_enable_disable'.
-type OneRlocProbeEnableDisable struct {
- IsEnabled uint8 `binapi:"u8,name=is_enabled" json:"is_enabled,omitempty"`
-}
-
-func (m *OneRlocProbeEnableDisable) Reset() { *m = OneRlocProbeEnableDisable{} }
-func (*OneRlocProbeEnableDisable) GetMessageName() string { return "one_rloc_probe_enable_disable" }
-func (*OneRlocProbeEnableDisable) GetCrcString() string { return "294103d1" }
-func (*OneRlocProbeEnableDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OneRlocProbeEnableDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsEnabled
- return size
-}
-func (m *OneRlocProbeEnableDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsEnabled)
- return buf.Bytes(), nil
-}
-func (m *OneRlocProbeEnableDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsEnabled = buf.DecodeUint8()
- return nil
-}
-
-// OneRlocProbeEnableDisableReply defines message 'one_rloc_probe_enable_disable_reply'.
-type OneRlocProbeEnableDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *OneRlocProbeEnableDisableReply) Reset() { *m = OneRlocProbeEnableDisableReply{} }
-func (*OneRlocProbeEnableDisableReply) GetMessageName() string {
- return "one_rloc_probe_enable_disable_reply"
-}
-func (*OneRlocProbeEnableDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*OneRlocProbeEnableDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OneRlocProbeEnableDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *OneRlocProbeEnableDisableReply) 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 *OneRlocProbeEnableDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// OneSetTransportProtocol defines message 'one_set_transport_protocol'.
-type OneSetTransportProtocol struct {
- Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"`
-}
-
-func (m *OneSetTransportProtocol) Reset() { *m = OneSetTransportProtocol{} }
-func (*OneSetTransportProtocol) GetMessageName() string { return "one_set_transport_protocol" }
-func (*OneSetTransportProtocol) GetCrcString() string { return "07b6b85f" }
-func (*OneSetTransportProtocol) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OneSetTransportProtocol) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.Protocol
- return size
-}
-func (m *OneSetTransportProtocol) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.Protocol)
- return buf.Bytes(), nil
-}
-func (m *OneSetTransportProtocol) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Protocol = buf.DecodeUint8()
- return nil
-}
-
-// OneSetTransportProtocolReply defines message 'one_set_transport_protocol_reply'.
-type OneSetTransportProtocolReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *OneSetTransportProtocolReply) Reset() { *m = OneSetTransportProtocolReply{} }
-func (*OneSetTransportProtocolReply) GetMessageName() string {
- return "one_set_transport_protocol_reply"
-}
-func (*OneSetTransportProtocolReply) GetCrcString() string { return "e8d4e804" }
-func (*OneSetTransportProtocolReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OneSetTransportProtocolReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *OneSetTransportProtocolReply) 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 *OneSetTransportProtocolReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// OneShowPetrMode defines message 'one_show_petr_mode'.
-type OneShowPetrMode struct{}
-
-func (m *OneShowPetrMode) Reset() { *m = OneShowPetrMode{} }
-func (*OneShowPetrMode) GetMessageName() string { return "one_show_petr_mode" }
-func (*OneShowPetrMode) GetCrcString() string { return "51077d14" }
-func (*OneShowPetrMode) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OneShowPetrMode) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *OneShowPetrMode) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *OneShowPetrMode) Unmarshal(b []byte) error {
- return nil
-}
-
-// OneShowPetrModeReply defines message 'one_show_petr_mode_reply'.
-type OneShowPetrModeReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- IsEn uint8 `binapi:"u8,name=is_en" json:"is_en,omitempty"`
-}
-
-func (m *OneShowPetrModeReply) Reset() { *m = OneShowPetrModeReply{} }
-func (*OneShowPetrModeReply) GetMessageName() string { return "one_show_petr_mode_reply" }
-func (*OneShowPetrModeReply) GetCrcString() string { return "6b4c29dc" }
-func (*OneShowPetrModeReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OneShowPetrModeReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 1 // m.IsEn
- return size
-}
-func (m *OneShowPetrModeReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint8(m.IsEn)
- return buf.Bytes(), nil
-}
-func (m *OneShowPetrModeReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.IsEn = buf.DecodeUint8()
- return nil
-}
-
-// OneShowPitrMode defines message 'one_show_pitr_mode'.
-type OneShowPitrMode struct{}
-
-func (m *OneShowPitrMode) Reset() { *m = OneShowPitrMode{} }
-func (*OneShowPitrMode) GetMessageName() string { return "one_show_pitr_mode" }
-func (*OneShowPitrMode) GetCrcString() string { return "51077d14" }
-func (*OneShowPitrMode) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OneShowPitrMode) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *OneShowPitrMode) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *OneShowPitrMode) Unmarshal(b []byte) error {
- return nil
-}
-
-// OneShowPitrModeReply defines message 'one_show_pitr_mode_reply'.
-type OneShowPitrModeReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- IsEn uint8 `binapi:"u8,name=is_en" json:"is_en,omitempty"`
-}
-
-func (m *OneShowPitrModeReply) Reset() { *m = OneShowPitrModeReply{} }
-func (*OneShowPitrModeReply) GetMessageName() string { return "one_show_pitr_mode_reply" }
-func (*OneShowPitrModeReply) GetCrcString() string { return "6b4c29dc" }
-func (*OneShowPitrModeReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OneShowPitrModeReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 1 // m.IsEn
- return size
-}
-func (m *OneShowPitrModeReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint8(m.IsEn)
- return buf.Bytes(), nil
-}
-func (m *OneShowPitrModeReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.IsEn = buf.DecodeUint8()
- return nil
-}
-
-// OneShowXtrMode defines message 'one_show_xtr_mode'.
-type OneShowXtrMode struct{}
-
-func (m *OneShowXtrMode) Reset() { *m = OneShowXtrMode{} }
-func (*OneShowXtrMode) GetMessageName() string { return "one_show_xtr_mode" }
-func (*OneShowXtrMode) GetCrcString() string { return "51077d14" }
-func (*OneShowXtrMode) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OneShowXtrMode) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *OneShowXtrMode) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *OneShowXtrMode) Unmarshal(b []byte) error {
- return nil
-}
-
-// OneShowXtrModeReply defines message 'one_show_xtr_mode_reply'.
-type OneShowXtrModeReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- IsEn uint8 `binapi:"u8,name=is_en" json:"is_en,omitempty"`
-}
-
-func (m *OneShowXtrModeReply) Reset() { *m = OneShowXtrModeReply{} }
-func (*OneShowXtrModeReply) GetMessageName() string { return "one_show_xtr_mode_reply" }
-func (*OneShowXtrModeReply) GetCrcString() string { return "6b4c29dc" }
-func (*OneShowXtrModeReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OneShowXtrModeReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 1 // m.IsEn
- return size
-}
-func (m *OneShowXtrModeReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint8(m.IsEn)
- return buf.Bytes(), nil
-}
-func (m *OneShowXtrModeReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.IsEn = buf.DecodeUint8()
- return nil
-}
-
-// OneStatsDetails defines message 'one_stats_details'.
-type OneStatsDetails struct {
- Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
- EidType uint8 `binapi:"u8,name=eid_type" json:"eid_type,omitempty"`
- Deid []byte `binapi:"u8[16],name=deid" json:"deid,omitempty"`
- Seid []byte `binapi:"u8[16],name=seid" json:"seid,omitempty"`
- DeidPrefLen uint8 `binapi:"u8,name=deid_pref_len" json:"deid_pref_len,omitempty"`
- SeidPrefLen uint8 `binapi:"u8,name=seid_pref_len" json:"seid_pref_len,omitempty"`
- IsIP4 uint8 `binapi:"u8,name=is_ip4" json:"is_ip4,omitempty"`
- Rloc []byte `binapi:"u8[16],name=rloc" json:"rloc,omitempty"`
- Lloc []byte `binapi:"u8[16],name=lloc" json:"lloc,omitempty"`
- PktCount uint32 `binapi:"u32,name=pkt_count" json:"pkt_count,omitempty"`
- Bytes uint32 `binapi:"u32,name=bytes" json:"bytes,omitempty"`
-}
-
-func (m *OneStatsDetails) Reset() { *m = OneStatsDetails{} }
-func (*OneStatsDetails) GetMessageName() string { return "one_stats_details" }
-func (*OneStatsDetails) GetCrcString() string { return "e1a34a05" }
-func (*OneStatsDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OneStatsDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Vni
- size += 1 // m.EidType
- size += 1 * 16 // m.Deid
- size += 1 * 16 // m.Seid
- size += 1 // m.DeidPrefLen
- size += 1 // m.SeidPrefLen
- size += 1 // m.IsIP4
- size += 1 * 16 // m.Rloc
- size += 1 * 16 // m.Lloc
- size += 4 // m.PktCount
- size += 4 // m.Bytes
- return size
-}
-func (m *OneStatsDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Vni)
- buf.EncodeUint8(m.EidType)
- buf.EncodeBytes(m.Deid, 16)
- buf.EncodeBytes(m.Seid, 16)
- buf.EncodeUint8(m.DeidPrefLen)
- buf.EncodeUint8(m.SeidPrefLen)
- buf.EncodeUint8(m.IsIP4)
- buf.EncodeBytes(m.Rloc, 16)
- buf.EncodeBytes(m.Lloc, 16)
- buf.EncodeUint32(m.PktCount)
- buf.EncodeUint32(m.Bytes)
- return buf.Bytes(), nil
-}
-func (m *OneStatsDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Vni = buf.DecodeUint32()
- m.EidType = buf.DecodeUint8()
- m.Deid = make([]byte, 16)
- copy(m.Deid, buf.DecodeBytes(len(m.Deid)))
- m.Seid = make([]byte, 16)
- copy(m.Seid, buf.DecodeBytes(len(m.Seid)))
- m.DeidPrefLen = buf.DecodeUint8()
- m.SeidPrefLen = buf.DecodeUint8()
- m.IsIP4 = buf.DecodeUint8()
- m.Rloc = make([]byte, 16)
- copy(m.Rloc, buf.DecodeBytes(len(m.Rloc)))
- m.Lloc = make([]byte, 16)
- copy(m.Lloc, buf.DecodeBytes(len(m.Lloc)))
- m.PktCount = buf.DecodeUint32()
- m.Bytes = buf.DecodeUint32()
- return nil
-}
-
-// OneStatsDump defines message 'one_stats_dump'.
-type OneStatsDump struct{}
-
-func (m *OneStatsDump) Reset() { *m = OneStatsDump{} }
-func (*OneStatsDump) GetMessageName() string { return "one_stats_dump" }
-func (*OneStatsDump) GetCrcString() string { return "51077d14" }
-func (*OneStatsDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OneStatsDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *OneStatsDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *OneStatsDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// OneStatsEnableDisable defines message 'one_stats_enable_disable'.
-type OneStatsEnableDisable struct {
- IsEn uint8 `binapi:"u8,name=is_en" json:"is_en,omitempty"`
-}
-
-func (m *OneStatsEnableDisable) Reset() { *m = OneStatsEnableDisable{} }
-func (*OneStatsEnableDisable) GetMessageName() string { return "one_stats_enable_disable" }
-func (*OneStatsEnableDisable) GetCrcString() string { return "eb0e943b" }
-func (*OneStatsEnableDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OneStatsEnableDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsEn
- return size
-}
-func (m *OneStatsEnableDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsEn)
- return buf.Bytes(), nil
-}
-func (m *OneStatsEnableDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsEn = buf.DecodeUint8()
- return nil
-}
-
-// OneStatsEnableDisableReply defines message 'one_stats_enable_disable_reply'.
-type OneStatsEnableDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *OneStatsEnableDisableReply) Reset() { *m = OneStatsEnableDisableReply{} }
-func (*OneStatsEnableDisableReply) GetMessageName() string { return "one_stats_enable_disable_reply" }
-func (*OneStatsEnableDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*OneStatsEnableDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OneStatsEnableDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *OneStatsEnableDisableReply) 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 *OneStatsEnableDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// OneStatsFlush defines message 'one_stats_flush'.
-type OneStatsFlush struct{}
-
-func (m *OneStatsFlush) Reset() { *m = OneStatsFlush{} }
-func (*OneStatsFlush) GetMessageName() string { return "one_stats_flush" }
-func (*OneStatsFlush) GetCrcString() string { return "51077d14" }
-func (*OneStatsFlush) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OneStatsFlush) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *OneStatsFlush) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *OneStatsFlush) Unmarshal(b []byte) error {
- return nil
-}
-
-// OneStatsFlushReply defines message 'one_stats_flush_reply'.
-type OneStatsFlushReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *OneStatsFlushReply) Reset() { *m = OneStatsFlushReply{} }
-func (*OneStatsFlushReply) GetMessageName() string { return "one_stats_flush_reply" }
-func (*OneStatsFlushReply) GetCrcString() string { return "e8d4e804" }
-func (*OneStatsFlushReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OneStatsFlushReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *OneStatsFlushReply) 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 *OneStatsFlushReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// OneUsePetr defines message 'one_use_petr'.
-type OneUsePetr struct {
- IsIP4 uint8 `binapi:"u8,name=is_ip4" json:"is_ip4,omitempty"`
- Address []byte `binapi:"u8[16],name=address" json:"address,omitempty"`
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
-}
-
-func (m *OneUsePetr) Reset() { *m = OneUsePetr{} }
-func (*OneUsePetr) GetMessageName() string { return "one_use_petr" }
-func (*OneUsePetr) GetCrcString() string { return "6910787d" }
-func (*OneUsePetr) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *OneUsePetr) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsIP4
- size += 1 * 16 // m.Address
- size += 1 // m.IsAdd
- return size
-}
-func (m *OneUsePetr) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsIP4)
- buf.EncodeBytes(m.Address, 16)
- buf.EncodeUint8(m.IsAdd)
- return buf.Bytes(), nil
-}
-func (m *OneUsePetr) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsIP4 = buf.DecodeUint8()
- m.Address = make([]byte, 16)
- copy(m.Address, buf.DecodeBytes(len(m.Address)))
- m.IsAdd = buf.DecodeUint8()
- return nil
-}
-
-// OneUsePetrReply defines message 'one_use_petr_reply'.
-type OneUsePetrReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *OneUsePetrReply) Reset() { *m = OneUsePetrReply{} }
-func (*OneUsePetrReply) GetMessageName() string { return "one_use_petr_reply" }
-func (*OneUsePetrReply) GetCrcString() string { return "e8d4e804" }
-func (*OneUsePetrReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *OneUsePetrReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *OneUsePetrReply) 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 *OneUsePetrReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// ShowOneMapRegisterFallbackThreshold defines message 'show_one_map_register_fallback_threshold'.
-type ShowOneMapRegisterFallbackThreshold struct{}
-
-func (m *ShowOneMapRegisterFallbackThreshold) Reset() { *m = ShowOneMapRegisterFallbackThreshold{} }
-func (*ShowOneMapRegisterFallbackThreshold) GetMessageName() string {
- return "show_one_map_register_fallback_threshold"
-}
-func (*ShowOneMapRegisterFallbackThreshold) GetCrcString() string { return "51077d14" }
-func (*ShowOneMapRegisterFallbackThreshold) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ShowOneMapRegisterFallbackThreshold) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *ShowOneMapRegisterFallbackThreshold) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *ShowOneMapRegisterFallbackThreshold) Unmarshal(b []byte) error {
- return nil
-}
-
-// ShowOneMapRegisterFallbackThresholdReply defines message 'show_one_map_register_fallback_threshold_reply'.
-type ShowOneMapRegisterFallbackThresholdReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- Value uint32 `binapi:"u32,name=value" json:"value,omitempty"`
-}
-
-func (m *ShowOneMapRegisterFallbackThresholdReply) Reset() {
- *m = ShowOneMapRegisterFallbackThresholdReply{}
-}
-func (*ShowOneMapRegisterFallbackThresholdReply) GetMessageName() string {
- return "show_one_map_register_fallback_threshold_reply"
-}
-func (*ShowOneMapRegisterFallbackThresholdReply) GetCrcString() string { return "c93a9113" }
-func (*ShowOneMapRegisterFallbackThresholdReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ShowOneMapRegisterFallbackThresholdReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.Value
- return size
-}
-func (m *ShowOneMapRegisterFallbackThresholdReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.Value)
- return buf.Bytes(), nil
-}
-func (m *ShowOneMapRegisterFallbackThresholdReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.Value = buf.DecodeUint32()
- return nil
-}
-
-// ShowOneMapRegisterState defines message 'show_one_map_register_state'.
-type ShowOneMapRegisterState struct{}
-
-func (m *ShowOneMapRegisterState) Reset() { *m = ShowOneMapRegisterState{} }
-func (*ShowOneMapRegisterState) GetMessageName() string { return "show_one_map_register_state" }
-func (*ShowOneMapRegisterState) GetCrcString() string { return "51077d14" }
-func (*ShowOneMapRegisterState) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ShowOneMapRegisterState) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *ShowOneMapRegisterState) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *ShowOneMapRegisterState) Unmarshal(b []byte) error {
- return nil
-}
-
-// ShowOneMapRegisterStateReply defines message 'show_one_map_register_state_reply'.
-type ShowOneMapRegisterStateReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- IsEnabled uint8 `binapi:"u8,name=is_enabled" json:"is_enabled,omitempty"`
-}
-
-func (m *ShowOneMapRegisterStateReply) Reset() { *m = ShowOneMapRegisterStateReply{} }
-func (*ShowOneMapRegisterStateReply) GetMessageName() string {
- return "show_one_map_register_state_reply"
-}
-func (*ShowOneMapRegisterStateReply) GetCrcString() string { return "14304fbc" }
-func (*ShowOneMapRegisterStateReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ShowOneMapRegisterStateReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 1 // m.IsEnabled
- return size
-}
-func (m *ShowOneMapRegisterStateReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint8(m.IsEnabled)
- return buf.Bytes(), nil
-}
-func (m *ShowOneMapRegisterStateReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.IsEnabled = buf.DecodeUint8()
- return nil
-}
-
-// ShowOneMapRegisterTTL defines message 'show_one_map_register_ttl'.
-type ShowOneMapRegisterTTL struct{}
-
-func (m *ShowOneMapRegisterTTL) Reset() { *m = ShowOneMapRegisterTTL{} }
-func (*ShowOneMapRegisterTTL) GetMessageName() string { return "show_one_map_register_ttl" }
-func (*ShowOneMapRegisterTTL) GetCrcString() string { return "51077d14" }
-func (*ShowOneMapRegisterTTL) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ShowOneMapRegisterTTL) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *ShowOneMapRegisterTTL) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *ShowOneMapRegisterTTL) Unmarshal(b []byte) error {
- return nil
-}
-
-// ShowOneMapRegisterTTLReply defines message 'show_one_map_register_ttl_reply'.
-type ShowOneMapRegisterTTLReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- TTL uint32 `binapi:"u32,name=ttl" json:"ttl,omitempty"`
-}
-
-func (m *ShowOneMapRegisterTTLReply) Reset() { *m = ShowOneMapRegisterTTLReply{} }
-func (*ShowOneMapRegisterTTLReply) GetMessageName() string { return "show_one_map_register_ttl_reply" }
-func (*ShowOneMapRegisterTTLReply) GetCrcString() string { return "fa83dd66" }
-func (*ShowOneMapRegisterTTLReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ShowOneMapRegisterTTLReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.TTL
- return size
-}
-func (m *ShowOneMapRegisterTTLReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.TTL)
- return buf.Bytes(), nil
-}
-func (m *ShowOneMapRegisterTTLReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.TTL = buf.DecodeUint32()
- return nil
-}
-
-// ShowOneMapRequestMode defines message 'show_one_map_request_mode'.
-type ShowOneMapRequestMode struct{}
-
-func (m *ShowOneMapRequestMode) Reset() { *m = ShowOneMapRequestMode{} }
-func (*ShowOneMapRequestMode) GetMessageName() string { return "show_one_map_request_mode" }
-func (*ShowOneMapRequestMode) GetCrcString() string { return "51077d14" }
-func (*ShowOneMapRequestMode) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ShowOneMapRequestMode) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *ShowOneMapRequestMode) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *ShowOneMapRequestMode) Unmarshal(b []byte) error {
- return nil
-}
-
-// ShowOneMapRequestModeReply defines message 'show_one_map_request_mode_reply'.
-type ShowOneMapRequestModeReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- Mode uint8 `binapi:"u8,name=mode" json:"mode,omitempty"`
-}
-
-func (m *ShowOneMapRequestModeReply) Reset() { *m = ShowOneMapRequestModeReply{} }
-func (*ShowOneMapRequestModeReply) GetMessageName() string { return "show_one_map_request_mode_reply" }
-func (*ShowOneMapRequestModeReply) GetCrcString() string { return "d423107c" }
-func (*ShowOneMapRequestModeReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ShowOneMapRequestModeReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 1 // m.Mode
- return size
-}
-func (m *ShowOneMapRequestModeReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint8(m.Mode)
- return buf.Bytes(), nil
-}
-func (m *ShowOneMapRequestModeReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.Mode = buf.DecodeUint8()
- return nil
-}
-
-// ShowOneNshMapping defines message 'show_one_nsh_mapping'.
-type ShowOneNshMapping struct{}
-
-func (m *ShowOneNshMapping) Reset() { *m = ShowOneNshMapping{} }
-func (*ShowOneNshMapping) GetMessageName() string { return "show_one_nsh_mapping" }
-func (*ShowOneNshMapping) GetCrcString() string { return "51077d14" }
-func (*ShowOneNshMapping) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ShowOneNshMapping) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *ShowOneNshMapping) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *ShowOneNshMapping) Unmarshal(b []byte) error {
- return nil
-}
-
-// ShowOneNshMappingReply defines message 'show_one_nsh_mapping_reply'.
-type ShowOneNshMappingReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- IsSet uint8 `binapi:"u8,name=is_set" json:"is_set,omitempty"`
- LocatorSetName []byte `binapi:"u8[64],name=locator_set_name" json:"locator_set_name,omitempty"`
-}
-
-func (m *ShowOneNshMappingReply) Reset() { *m = ShowOneNshMappingReply{} }
-func (*ShowOneNshMappingReply) GetMessageName() string { return "show_one_nsh_mapping_reply" }
-func (*ShowOneNshMappingReply) GetCrcString() string { return "f2ff364e" }
-func (*ShowOneNshMappingReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ShowOneNshMappingReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 1 // m.IsSet
- size += 1 * 64 // m.LocatorSetName
- return size
-}
-func (m *ShowOneNshMappingReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint8(m.IsSet)
- buf.EncodeBytes(m.LocatorSetName, 64)
- return buf.Bytes(), nil
-}
-func (m *ShowOneNshMappingReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.IsSet = buf.DecodeUint8()
- m.LocatorSetName = make([]byte, 64)
- copy(m.LocatorSetName, buf.DecodeBytes(len(m.LocatorSetName)))
- return nil
-}
-
-// ShowOnePitr defines message 'show_one_pitr'.
-type ShowOnePitr struct{}
-
-func (m *ShowOnePitr) Reset() { *m = ShowOnePitr{} }
-func (*ShowOnePitr) GetMessageName() string { return "show_one_pitr" }
-func (*ShowOnePitr) GetCrcString() string { return "51077d14" }
-func (*ShowOnePitr) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ShowOnePitr) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *ShowOnePitr) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *ShowOnePitr) Unmarshal(b []byte) error {
- return nil
-}
-
-// ShowOnePitrReply defines message 'show_one_pitr_reply'.
-type ShowOnePitrReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- Status uint8 `binapi:"u8,name=status" json:"status,omitempty"`
- LocatorSetName []byte `binapi:"u8[64],name=locator_set_name" json:"locator_set_name,omitempty"`
-}
-
-func (m *ShowOnePitrReply) Reset() { *m = ShowOnePitrReply{} }
-func (*ShowOnePitrReply) GetMessageName() string { return "show_one_pitr_reply" }
-func (*ShowOnePitrReply) GetCrcString() string { return "dca512cc" }
-func (*ShowOnePitrReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ShowOnePitrReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 1 // m.Status
- size += 1 * 64 // m.LocatorSetName
- return size
-}
-func (m *ShowOnePitrReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint8(m.Status)
- buf.EncodeBytes(m.LocatorSetName, 64)
- return buf.Bytes(), nil
-}
-func (m *ShowOnePitrReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.Status = buf.DecodeUint8()
- m.LocatorSetName = make([]byte, 64)
- copy(m.LocatorSetName, buf.DecodeBytes(len(m.LocatorSetName)))
- return nil
-}
-
-// ShowOneRlocProbeState defines message 'show_one_rloc_probe_state'.
-type ShowOneRlocProbeState struct{}
-
-func (m *ShowOneRlocProbeState) Reset() { *m = ShowOneRlocProbeState{} }
-func (*ShowOneRlocProbeState) GetMessageName() string { return "show_one_rloc_probe_state" }
-func (*ShowOneRlocProbeState) GetCrcString() string { return "51077d14" }
-func (*ShowOneRlocProbeState) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ShowOneRlocProbeState) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *ShowOneRlocProbeState) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *ShowOneRlocProbeState) Unmarshal(b []byte) error {
- return nil
-}
-
-// ShowOneRlocProbeStateReply defines message 'show_one_rloc_probe_state_reply'.
-type ShowOneRlocProbeStateReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- IsEnabled uint8 `binapi:"u8,name=is_enabled" json:"is_enabled,omitempty"`
-}
-
-func (m *ShowOneRlocProbeStateReply) Reset() { *m = ShowOneRlocProbeStateReply{} }
-func (*ShowOneRlocProbeStateReply) GetMessageName() string { return "show_one_rloc_probe_state_reply" }
-func (*ShowOneRlocProbeStateReply) GetCrcString() string { return "14304fbc" }
-func (*ShowOneRlocProbeStateReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ShowOneRlocProbeStateReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 1 // m.IsEnabled
- return size
-}
-func (m *ShowOneRlocProbeStateReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint8(m.IsEnabled)
- return buf.Bytes(), nil
-}
-func (m *ShowOneRlocProbeStateReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.IsEnabled = buf.DecodeUint8()
- return nil
-}
-
-// ShowOneStatsEnableDisable defines message 'show_one_stats_enable_disable'.
-type ShowOneStatsEnableDisable struct{}
-
-func (m *ShowOneStatsEnableDisable) Reset() { *m = ShowOneStatsEnableDisable{} }
-func (*ShowOneStatsEnableDisable) GetMessageName() string { return "show_one_stats_enable_disable" }
-func (*ShowOneStatsEnableDisable) GetCrcString() string { return "51077d14" }
-func (*ShowOneStatsEnableDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ShowOneStatsEnableDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *ShowOneStatsEnableDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *ShowOneStatsEnableDisable) Unmarshal(b []byte) error {
- return nil
-}
-
-// ShowOneStatsEnableDisableReply defines message 'show_one_stats_enable_disable_reply'.
-type ShowOneStatsEnableDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- IsEn uint8 `binapi:"u8,name=is_en" json:"is_en,omitempty"`
-}
-
-func (m *ShowOneStatsEnableDisableReply) Reset() { *m = ShowOneStatsEnableDisableReply{} }
-func (*ShowOneStatsEnableDisableReply) GetMessageName() string {
- return "show_one_stats_enable_disable_reply"
-}
-func (*ShowOneStatsEnableDisableReply) GetCrcString() string { return "6b4c29dc" }
-func (*ShowOneStatsEnableDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ShowOneStatsEnableDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 1 // m.IsEn
- return size
-}
-func (m *ShowOneStatsEnableDisableReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint8(m.IsEn)
- return buf.Bytes(), nil
-}
-func (m *ShowOneStatsEnableDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.IsEn = buf.DecodeUint8()
- return nil
-}
-
-// ShowOneStatus defines message 'show_one_status'.
-type ShowOneStatus struct{}
-
-func (m *ShowOneStatus) Reset() { *m = ShowOneStatus{} }
-func (*ShowOneStatus) GetMessageName() string { return "show_one_status" }
-func (*ShowOneStatus) GetCrcString() string { return "51077d14" }
-func (*ShowOneStatus) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ShowOneStatus) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *ShowOneStatus) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *ShowOneStatus) Unmarshal(b []byte) error {
- return nil
-}
-
-// ShowOneStatusReply defines message 'show_one_status_reply'.
-type ShowOneStatusReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- FeatureStatus uint8 `binapi:"u8,name=feature_status" json:"feature_status,omitempty"`
- GpeStatus uint8 `binapi:"u8,name=gpe_status" json:"gpe_status,omitempty"`
-}
-
-func (m *ShowOneStatusReply) Reset() { *m = ShowOneStatusReply{} }
-func (*ShowOneStatusReply) GetMessageName() string { return "show_one_status_reply" }
-func (*ShowOneStatusReply) GetCrcString() string { return "ddcf48ef" }
-func (*ShowOneStatusReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ShowOneStatusReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 1 // m.FeatureStatus
- size += 1 // m.GpeStatus
- return size
-}
-func (m *ShowOneStatusReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint8(m.FeatureStatus)
- buf.EncodeUint8(m.GpeStatus)
- return buf.Bytes(), nil
-}
-func (m *ShowOneStatusReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.FeatureStatus = buf.DecodeUint8()
- m.GpeStatus = buf.DecodeUint8()
- return nil
-}
-
-// ShowOneUsePetr defines message 'show_one_use_petr'.
-type ShowOneUsePetr struct{}
-
-func (m *ShowOneUsePetr) Reset() { *m = ShowOneUsePetr{} }
-func (*ShowOneUsePetr) GetMessageName() string { return "show_one_use_petr" }
-func (*ShowOneUsePetr) GetCrcString() string { return "51077d14" }
-func (*ShowOneUsePetr) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ShowOneUsePetr) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *ShowOneUsePetr) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *ShowOneUsePetr) Unmarshal(b []byte) error {
- return nil
-}
-
-// ShowOneUsePetrReply defines message 'show_one_use_petr_reply'.
-type ShowOneUsePetrReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- Status uint8 `binapi:"u8,name=status" json:"status,omitempty"`
- IsIP4 uint8 `binapi:"u8,name=is_ip4" json:"is_ip4,omitempty"`
- Address []byte `binapi:"u8[16],name=address" json:"address,omitempty"`
-}
-
-func (m *ShowOneUsePetrReply) Reset() { *m = ShowOneUsePetrReply{} }
-func (*ShowOneUsePetrReply) GetMessageName() string { return "show_one_use_petr_reply" }
-func (*ShowOneUsePetrReply) GetCrcString() string { return "1eb21916" }
-func (*ShowOneUsePetrReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ShowOneUsePetrReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 1 // m.Status
- size += 1 // m.IsIP4
- size += 1 * 16 // m.Address
- return size
-}
-func (m *ShowOneUsePetrReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint8(m.Status)
- buf.EncodeUint8(m.IsIP4)
- buf.EncodeBytes(m.Address, 16)
- return buf.Bytes(), nil
-}
-func (m *ShowOneUsePetrReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.Status = buf.DecodeUint8()
- m.IsIP4 = buf.DecodeUint8()
- m.Address = make([]byte, 16)
- copy(m.Address, buf.DecodeBytes(len(m.Address)))
- return nil
-}
-
-func init() { file_one_binapi_init() }
-func file_one_binapi_init() {
- api.RegisterMessage((*OneAddDelAdjacency)(nil), "one_add_del_adjacency_f047390d")
- api.RegisterMessage((*OneAddDelAdjacencyReply)(nil), "one_add_del_adjacency_reply_e8d4e804")
- api.RegisterMessage((*OneAddDelL2ArpEntry)(nil), "one_add_del_l2_arp_entry_a95cc2d7")
- api.RegisterMessage((*OneAddDelL2ArpEntryReply)(nil), "one_add_del_l2_arp_entry_reply_e8d4e804")
- api.RegisterMessage((*OneAddDelLocalEid)(nil), "one_add_del_local_eid_e6d00717")
- api.RegisterMessage((*OneAddDelLocalEidReply)(nil), "one_add_del_local_eid_reply_e8d4e804")
- api.RegisterMessage((*OneAddDelLocator)(nil), "one_add_del_locator_006a4240")
- api.RegisterMessage((*OneAddDelLocatorReply)(nil), "one_add_del_locator_reply_e8d4e804")
- api.RegisterMessage((*OneAddDelLocatorSet)(nil), "one_add_del_locator_set_2e73b050")
- api.RegisterMessage((*OneAddDelLocatorSetReply)(nil), "one_add_del_locator_set_reply_b6666db4")
- api.RegisterMessage((*OneAddDelMapRequestItrRlocs)(nil), "one_add_del_map_request_itr_rlocs_c7c6cb2f")
- api.RegisterMessage((*OneAddDelMapRequestItrRlocsReply)(nil), "one_add_del_map_request_itr_rlocs_reply_e8d4e804")
- api.RegisterMessage((*OneAddDelMapResolver)(nil), "one_add_del_map_resolver_0ebcd37d")
- api.RegisterMessage((*OneAddDelMapResolverReply)(nil), "one_add_del_map_resolver_reply_e8d4e804")
- api.RegisterMessage((*OneAddDelMapServer)(nil), "one_add_del_map_server_0ebcd37d")
- api.RegisterMessage((*OneAddDelMapServerReply)(nil), "one_add_del_map_server_reply_e8d4e804")
- api.RegisterMessage((*OneAddDelNdpEntry)(nil), "one_add_del_ndp_entry_e9468fe3")
- api.RegisterMessage((*OneAddDelNdpEntryReply)(nil), "one_add_del_ndp_entry_reply_e8d4e804")
- api.RegisterMessage((*OneAddDelRemoteMapping)(nil), "one_add_del_remote_mapping_0b2010ec")
- api.RegisterMessage((*OneAddDelRemoteMappingReply)(nil), "one_add_del_remote_mapping_reply_e8d4e804")
- api.RegisterMessage((*OneAdjacenciesGet)(nil), "one_adjacencies_get_8d1f2fe9")
- api.RegisterMessage((*OneAdjacenciesGetReply)(nil), "one_adjacencies_get_reply_60a3c592")
- api.RegisterMessage((*OneEidTableAddDelMap)(nil), "one_eid_table_add_del_map_59e9975e")
- api.RegisterMessage((*OneEidTableAddDelMapReply)(nil), "one_eid_table_add_del_map_reply_e8d4e804")
- api.RegisterMessage((*OneEidTableDetails)(nil), "one_eid_table_details_dcd9f414")
- api.RegisterMessage((*OneEidTableDump)(nil), "one_eid_table_dump_e0df64da")
- api.RegisterMessage((*OneEidTableMapDetails)(nil), "one_eid_table_map_details_0b6859e2")
- api.RegisterMessage((*OneEidTableMapDump)(nil), "one_eid_table_map_dump_67c54650")
- api.RegisterMessage((*OneEidTableVniDetails)(nil), "one_eid_table_vni_details_64abc01e")
- api.RegisterMessage((*OneEidTableVniDump)(nil), "one_eid_table_vni_dump_51077d14")
- api.RegisterMessage((*OneEnableDisable)(nil), "one_enable_disable_eb0e943b")
- api.RegisterMessage((*OneEnableDisablePetrMode)(nil), "one_enable_disable_petr_mode_eb0e943b")
- api.RegisterMessage((*OneEnableDisablePetrModeReply)(nil), "one_enable_disable_petr_mode_reply_e8d4e804")
- api.RegisterMessage((*OneEnableDisablePitrMode)(nil), "one_enable_disable_pitr_mode_eb0e943b")
- api.RegisterMessage((*OneEnableDisablePitrModeReply)(nil), "one_enable_disable_pitr_mode_reply_e8d4e804")
- api.RegisterMessage((*OneEnableDisableReply)(nil), "one_enable_disable_reply_e8d4e804")
- api.RegisterMessage((*OneEnableDisableXtrMode)(nil), "one_enable_disable_xtr_mode_eb0e943b")
- api.RegisterMessage((*OneEnableDisableXtrModeReply)(nil), "one_enable_disable_xtr_mode_reply_e8d4e804")
- api.RegisterMessage((*OneGetMapRequestItrRlocs)(nil), "one_get_map_request_itr_rlocs_51077d14")
- api.RegisterMessage((*OneGetMapRequestItrRlocsReply)(nil), "one_get_map_request_itr_rlocs_reply_9f56f6f7")
- api.RegisterMessage((*OneGetTransportProtocol)(nil), "one_get_transport_protocol_51077d14")
- api.RegisterMessage((*OneGetTransportProtocolReply)(nil), "one_get_transport_protocol_reply_62a28eb3")
- api.RegisterMessage((*OneL2ArpBdGet)(nil), "one_l2_arp_bd_get_51077d14")
- api.RegisterMessage((*OneL2ArpBdGetReply)(nil), "one_l2_arp_bd_get_reply_221ac888")
- api.RegisterMessage((*OneL2ArpEntriesGet)(nil), "one_l2_arp_entries_get_4d418cf4")
- api.RegisterMessage((*OneL2ArpEntriesGetReply)(nil), "one_l2_arp_entries_get_reply_88e54ded")
- api.RegisterMessage((*OneLocatorDetails)(nil), "one_locator_details_b3988a30")
- api.RegisterMessage((*OneLocatorDump)(nil), "one_locator_dump_f27d5050")
- api.RegisterMessage((*OneLocatorSetDetails)(nil), "one_locator_set_details_6b846882")
- api.RegisterMessage((*OneLocatorSetDump)(nil), "one_locator_set_dump_c79e8ab0")
- api.RegisterMessage((*OneMapRegisterEnableDisable)(nil), "one_map_register_enable_disable_294103d1")
- api.RegisterMessage((*OneMapRegisterEnableDisableReply)(nil), "one_map_register_enable_disable_reply_e8d4e804")
- api.RegisterMessage((*OneMapRegisterFallbackThreshold)(nil), "one_map_register_fallback_threshold_f7d4a475")
- api.RegisterMessage((*OneMapRegisterFallbackThresholdReply)(nil), "one_map_register_fallback_threshold_reply_e8d4e804")
- api.RegisterMessage((*OneMapRegisterSetTTL)(nil), "one_map_register_set_ttl_dd59f1f3")
- api.RegisterMessage((*OneMapRegisterSetTTLReply)(nil), "one_map_register_set_ttl_reply_e8d4e804")
- api.RegisterMessage((*OneMapRequestMode)(nil), "one_map_request_mode_f3f93ce9")
- api.RegisterMessage((*OneMapRequestModeReply)(nil), "one_map_request_mode_reply_e8d4e804")
- api.RegisterMessage((*OneMapResolverDetails)(nil), "one_map_resolver_details_60a5f5ca")
- api.RegisterMessage((*OneMapResolverDump)(nil), "one_map_resolver_dump_51077d14")
- api.RegisterMessage((*OneMapServerDetails)(nil), "one_map_server_details_60a5f5ca")
- api.RegisterMessage((*OneMapServerDump)(nil), "one_map_server_dump_51077d14")
- api.RegisterMessage((*OneNdpBdGet)(nil), "one_ndp_bd_get_51077d14")
- api.RegisterMessage((*OneNdpBdGetReply)(nil), "one_ndp_bd_get_reply_221ac888")
- api.RegisterMessage((*OneNdpEntriesGet)(nil), "one_ndp_entries_get_4d418cf4")
- api.RegisterMessage((*OneNdpEntriesGetReply)(nil), "one_ndp_entries_get_reply_d0822f37")
- api.RegisterMessage((*OneNshSetLocatorSet)(nil), "one_nsh_set_locator_set_7aa022dd")
- api.RegisterMessage((*OneNshSetLocatorSetReply)(nil), "one_nsh_set_locator_set_reply_e8d4e804")
- api.RegisterMessage((*OnePitrSetLocatorSet)(nil), "one_pitr_set_locator_set_7aa022dd")
- api.RegisterMessage((*OnePitrSetLocatorSetReply)(nil), "one_pitr_set_locator_set_reply_e8d4e804")
- api.RegisterMessage((*OneRlocProbeEnableDisable)(nil), "one_rloc_probe_enable_disable_294103d1")
- api.RegisterMessage((*OneRlocProbeEnableDisableReply)(nil), "one_rloc_probe_enable_disable_reply_e8d4e804")
- api.RegisterMessage((*OneSetTransportProtocol)(nil), "one_set_transport_protocol_07b6b85f")
- api.RegisterMessage((*OneSetTransportProtocolReply)(nil), "one_set_transport_protocol_reply_e8d4e804")
- api.RegisterMessage((*OneShowPetrMode)(nil), "one_show_petr_mode_51077d14")
- api.RegisterMessage((*OneShowPetrModeReply)(nil), "one_show_petr_mode_reply_6b4c29dc")
- api.RegisterMessage((*OneShowPitrMode)(nil), "one_show_pitr_mode_51077d14")
- api.RegisterMessage((*OneShowPitrModeReply)(nil), "one_show_pitr_mode_reply_6b4c29dc")
- api.RegisterMessage((*OneShowXtrMode)(nil), "one_show_xtr_mode_51077d14")
- api.RegisterMessage((*OneShowXtrModeReply)(nil), "one_show_xtr_mode_reply_6b4c29dc")
- api.RegisterMessage((*OneStatsDetails)(nil), "one_stats_details_e1a34a05")
- api.RegisterMessage((*OneStatsDump)(nil), "one_stats_dump_51077d14")
- api.RegisterMessage((*OneStatsEnableDisable)(nil), "one_stats_enable_disable_eb0e943b")
- api.RegisterMessage((*OneStatsEnableDisableReply)(nil), "one_stats_enable_disable_reply_e8d4e804")
- api.RegisterMessage((*OneStatsFlush)(nil), "one_stats_flush_51077d14")
- api.RegisterMessage((*OneStatsFlushReply)(nil), "one_stats_flush_reply_e8d4e804")
- api.RegisterMessage((*OneUsePetr)(nil), "one_use_petr_6910787d")
- api.RegisterMessage((*OneUsePetrReply)(nil), "one_use_petr_reply_e8d4e804")
- api.RegisterMessage((*ShowOneMapRegisterFallbackThreshold)(nil), "show_one_map_register_fallback_threshold_51077d14")
- api.RegisterMessage((*ShowOneMapRegisterFallbackThresholdReply)(nil), "show_one_map_register_fallback_threshold_reply_c93a9113")
- api.RegisterMessage((*ShowOneMapRegisterState)(nil), "show_one_map_register_state_51077d14")
- api.RegisterMessage((*ShowOneMapRegisterStateReply)(nil), "show_one_map_register_state_reply_14304fbc")
- api.RegisterMessage((*ShowOneMapRegisterTTL)(nil), "show_one_map_register_ttl_51077d14")
- api.RegisterMessage((*ShowOneMapRegisterTTLReply)(nil), "show_one_map_register_ttl_reply_fa83dd66")
- api.RegisterMessage((*ShowOneMapRequestMode)(nil), "show_one_map_request_mode_51077d14")
- api.RegisterMessage((*ShowOneMapRequestModeReply)(nil), "show_one_map_request_mode_reply_d423107c")
- api.RegisterMessage((*ShowOneNshMapping)(nil), "show_one_nsh_mapping_51077d14")
- api.RegisterMessage((*ShowOneNshMappingReply)(nil), "show_one_nsh_mapping_reply_f2ff364e")
- api.RegisterMessage((*ShowOnePitr)(nil), "show_one_pitr_51077d14")
- api.RegisterMessage((*ShowOnePitrReply)(nil), "show_one_pitr_reply_dca512cc")
- api.RegisterMessage((*ShowOneRlocProbeState)(nil), "show_one_rloc_probe_state_51077d14")
- api.RegisterMessage((*ShowOneRlocProbeStateReply)(nil), "show_one_rloc_probe_state_reply_14304fbc")
- api.RegisterMessage((*ShowOneStatsEnableDisable)(nil), "show_one_stats_enable_disable_51077d14")
- api.RegisterMessage((*ShowOneStatsEnableDisableReply)(nil), "show_one_stats_enable_disable_reply_6b4c29dc")
- api.RegisterMessage((*ShowOneStatus)(nil), "show_one_status_51077d14")
- api.RegisterMessage((*ShowOneStatusReply)(nil), "show_one_status_reply_ddcf48ef")
- api.RegisterMessage((*ShowOneUsePetr)(nil), "show_one_use_petr_51077d14")
- api.RegisterMessage((*ShowOneUsePetrReply)(nil), "show_one_use_petr_reply_1eb21916")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*OneAddDelAdjacency)(nil),
- (*OneAddDelAdjacencyReply)(nil),
- (*OneAddDelL2ArpEntry)(nil),
- (*OneAddDelL2ArpEntryReply)(nil),
- (*OneAddDelLocalEid)(nil),
- (*OneAddDelLocalEidReply)(nil),
- (*OneAddDelLocator)(nil),
- (*OneAddDelLocatorReply)(nil),
- (*OneAddDelLocatorSet)(nil),
- (*OneAddDelLocatorSetReply)(nil),
- (*OneAddDelMapRequestItrRlocs)(nil),
- (*OneAddDelMapRequestItrRlocsReply)(nil),
- (*OneAddDelMapResolver)(nil),
- (*OneAddDelMapResolverReply)(nil),
- (*OneAddDelMapServer)(nil),
- (*OneAddDelMapServerReply)(nil),
- (*OneAddDelNdpEntry)(nil),
- (*OneAddDelNdpEntryReply)(nil),
- (*OneAddDelRemoteMapping)(nil),
- (*OneAddDelRemoteMappingReply)(nil),
- (*OneAdjacenciesGet)(nil),
- (*OneAdjacenciesGetReply)(nil),
- (*OneEidTableAddDelMap)(nil),
- (*OneEidTableAddDelMapReply)(nil),
- (*OneEidTableDetails)(nil),
- (*OneEidTableDump)(nil),
- (*OneEidTableMapDetails)(nil),
- (*OneEidTableMapDump)(nil),
- (*OneEidTableVniDetails)(nil),
- (*OneEidTableVniDump)(nil),
- (*OneEnableDisable)(nil),
- (*OneEnableDisablePetrMode)(nil),
- (*OneEnableDisablePetrModeReply)(nil),
- (*OneEnableDisablePitrMode)(nil),
- (*OneEnableDisablePitrModeReply)(nil),
- (*OneEnableDisableReply)(nil),
- (*OneEnableDisableXtrMode)(nil),
- (*OneEnableDisableXtrModeReply)(nil),
- (*OneGetMapRequestItrRlocs)(nil),
- (*OneGetMapRequestItrRlocsReply)(nil),
- (*OneGetTransportProtocol)(nil),
- (*OneGetTransportProtocolReply)(nil),
- (*OneL2ArpBdGet)(nil),
- (*OneL2ArpBdGetReply)(nil),
- (*OneL2ArpEntriesGet)(nil),
- (*OneL2ArpEntriesGetReply)(nil),
- (*OneLocatorDetails)(nil),
- (*OneLocatorDump)(nil),
- (*OneLocatorSetDetails)(nil),
- (*OneLocatorSetDump)(nil),
- (*OneMapRegisterEnableDisable)(nil),
- (*OneMapRegisterEnableDisableReply)(nil),
- (*OneMapRegisterFallbackThreshold)(nil),
- (*OneMapRegisterFallbackThresholdReply)(nil),
- (*OneMapRegisterSetTTL)(nil),
- (*OneMapRegisterSetTTLReply)(nil),
- (*OneMapRequestMode)(nil),
- (*OneMapRequestModeReply)(nil),
- (*OneMapResolverDetails)(nil),
- (*OneMapResolverDump)(nil),
- (*OneMapServerDetails)(nil),
- (*OneMapServerDump)(nil),
- (*OneNdpBdGet)(nil),
- (*OneNdpBdGetReply)(nil),
- (*OneNdpEntriesGet)(nil),
- (*OneNdpEntriesGetReply)(nil),
- (*OneNshSetLocatorSet)(nil),
- (*OneNshSetLocatorSetReply)(nil),
- (*OnePitrSetLocatorSet)(nil),
- (*OnePitrSetLocatorSetReply)(nil),
- (*OneRlocProbeEnableDisable)(nil),
- (*OneRlocProbeEnableDisableReply)(nil),
- (*OneSetTransportProtocol)(nil),
- (*OneSetTransportProtocolReply)(nil),
- (*OneShowPetrMode)(nil),
- (*OneShowPetrModeReply)(nil),
- (*OneShowPitrMode)(nil),
- (*OneShowPitrModeReply)(nil),
- (*OneShowXtrMode)(nil),
- (*OneShowXtrModeReply)(nil),
- (*OneStatsDetails)(nil),
- (*OneStatsDump)(nil),
- (*OneStatsEnableDisable)(nil),
- (*OneStatsEnableDisableReply)(nil),
- (*OneStatsFlush)(nil),
- (*OneStatsFlushReply)(nil),
- (*OneUsePetr)(nil),
- (*OneUsePetrReply)(nil),
- (*ShowOneMapRegisterFallbackThreshold)(nil),
- (*ShowOneMapRegisterFallbackThresholdReply)(nil),
- (*ShowOneMapRegisterState)(nil),
- (*ShowOneMapRegisterStateReply)(nil),
- (*ShowOneMapRegisterTTL)(nil),
- (*ShowOneMapRegisterTTLReply)(nil),
- (*ShowOneMapRequestMode)(nil),
- (*ShowOneMapRequestModeReply)(nil),
- (*ShowOneNshMapping)(nil),
- (*ShowOneNshMappingReply)(nil),
- (*ShowOnePitr)(nil),
- (*ShowOnePitrReply)(nil),
- (*ShowOneRlocProbeState)(nil),
- (*ShowOneRlocProbeStateReply)(nil),
- (*ShowOneStatsEnableDisable)(nil),
- (*ShowOneStatsEnableDisableReply)(nil),
- (*ShowOneStatus)(nil),
- (*ShowOneStatusReply)(nil),
- (*ShowOneUsePetr)(nil),
- (*ShowOneUsePetrReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/one/one_rpc.ba.go b/internal/testbinapi/binapi2001/one/one_rpc.ba.go
deleted file mode 100644
index 9d01e5f..0000000
--- a/internal/testbinapi/binapi2001/one/one_rpc.ba.go
+++ /dev/null
@@ -1,836 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package one
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service one.
-type RPCService interface {
- OneAddDelAdjacency(ctx context.Context, in *OneAddDelAdjacency) (*OneAddDelAdjacencyReply, error)
- OneAddDelL2ArpEntry(ctx context.Context, in *OneAddDelL2ArpEntry) (*OneAddDelL2ArpEntryReply, error)
- OneAddDelLocalEid(ctx context.Context, in *OneAddDelLocalEid) (*OneAddDelLocalEidReply, error)
- OneAddDelLocator(ctx context.Context, in *OneAddDelLocator) (*OneAddDelLocatorReply, error)
- OneAddDelLocatorSet(ctx context.Context, in *OneAddDelLocatorSet) (*OneAddDelLocatorSetReply, error)
- OneAddDelMapRequestItrRlocs(ctx context.Context, in *OneAddDelMapRequestItrRlocs) (*OneAddDelMapRequestItrRlocsReply, error)
- OneAddDelMapResolver(ctx context.Context, in *OneAddDelMapResolver) (*OneAddDelMapResolverReply, error)
- OneAddDelMapServer(ctx context.Context, in *OneAddDelMapServer) (*OneAddDelMapServerReply, error)
- OneAddDelNdpEntry(ctx context.Context, in *OneAddDelNdpEntry) (*OneAddDelNdpEntryReply, error)
- OneAddDelRemoteMapping(ctx context.Context, in *OneAddDelRemoteMapping) (*OneAddDelRemoteMappingReply, error)
- OneAdjacenciesGet(ctx context.Context, in *OneAdjacenciesGet) (*OneAdjacenciesGetReply, error)
- OneEidTableAddDelMap(ctx context.Context, in *OneEidTableAddDelMap) (*OneEidTableAddDelMapReply, error)
- OneEidTableDump(ctx context.Context, in *OneEidTableDump) (RPCService_OneEidTableDumpClient, error)
- OneEidTableMapDump(ctx context.Context, in *OneEidTableMapDump) (RPCService_OneEidTableMapDumpClient, error)
- OneEidTableVniDump(ctx context.Context, in *OneEidTableVniDump) (RPCService_OneEidTableVniDumpClient, error)
- OneEnableDisable(ctx context.Context, in *OneEnableDisable) (*OneEnableDisableReply, error)
- OneEnableDisablePetrMode(ctx context.Context, in *OneEnableDisablePetrMode) (*OneEnableDisablePetrModeReply, error)
- OneEnableDisablePitrMode(ctx context.Context, in *OneEnableDisablePitrMode) (*OneEnableDisablePitrModeReply, error)
- OneEnableDisableXtrMode(ctx context.Context, in *OneEnableDisableXtrMode) (*OneEnableDisableXtrModeReply, error)
- OneGetMapRequestItrRlocs(ctx context.Context, in *OneGetMapRequestItrRlocs) (*OneGetMapRequestItrRlocsReply, error)
- OneGetTransportProtocol(ctx context.Context, in *OneGetTransportProtocol) (*OneGetTransportProtocolReply, error)
- OneL2ArpBdGet(ctx context.Context, in *OneL2ArpBdGet) (*OneL2ArpBdGetReply, error)
- OneL2ArpEntriesGet(ctx context.Context, in *OneL2ArpEntriesGet) (*OneL2ArpEntriesGetReply, error)
- OneLocatorDump(ctx context.Context, in *OneLocatorDump) (RPCService_OneLocatorDumpClient, error)
- OneLocatorSetDump(ctx context.Context, in *OneLocatorSetDump) (RPCService_OneLocatorSetDumpClient, error)
- OneMapRegisterEnableDisable(ctx context.Context, in *OneMapRegisterEnableDisable) (*OneMapRegisterEnableDisableReply, error)
- OneMapRegisterFallbackThreshold(ctx context.Context, in *OneMapRegisterFallbackThreshold) (*OneMapRegisterFallbackThresholdReply, error)
- OneMapRegisterSetTTL(ctx context.Context, in *OneMapRegisterSetTTL) (*OneMapRegisterSetTTLReply, error)
- OneMapRequestMode(ctx context.Context, in *OneMapRequestMode) (*OneMapRequestModeReply, error)
- OneMapResolverDump(ctx context.Context, in *OneMapResolverDump) (RPCService_OneMapResolverDumpClient, error)
- OneMapServerDump(ctx context.Context, in *OneMapServerDump) (RPCService_OneMapServerDumpClient, error)
- OneNdpBdGet(ctx context.Context, in *OneNdpBdGet) (*OneNdpBdGetReply, error)
- OneNdpEntriesGet(ctx context.Context, in *OneNdpEntriesGet) (*OneNdpEntriesGetReply, error)
- OneNshSetLocatorSet(ctx context.Context, in *OneNshSetLocatorSet) (*OneNshSetLocatorSetReply, error)
- OnePitrSetLocatorSet(ctx context.Context, in *OnePitrSetLocatorSet) (*OnePitrSetLocatorSetReply, error)
- OneRlocProbeEnableDisable(ctx context.Context, in *OneRlocProbeEnableDisable) (*OneRlocProbeEnableDisableReply, error)
- OneSetTransportProtocol(ctx context.Context, in *OneSetTransportProtocol) (*OneSetTransportProtocolReply, error)
- OneShowPetrMode(ctx context.Context, in *OneShowPetrMode) (*OneShowPetrModeReply, error)
- OneShowPitrMode(ctx context.Context, in *OneShowPitrMode) (*OneShowPitrModeReply, error)
- OneShowXtrMode(ctx context.Context, in *OneShowXtrMode) (*OneShowXtrModeReply, error)
- OneStatsDump(ctx context.Context, in *OneStatsDump) (RPCService_OneStatsDumpClient, error)
- OneStatsEnableDisable(ctx context.Context, in *OneStatsEnableDisable) (*OneStatsEnableDisableReply, error)
- OneStatsFlush(ctx context.Context, in *OneStatsFlush) (*OneStatsFlushReply, error)
- OneUsePetr(ctx context.Context, in *OneUsePetr) (*OneUsePetrReply, error)
- ShowOneMapRegisterFallbackThreshold(ctx context.Context, in *ShowOneMapRegisterFallbackThreshold) (*ShowOneMapRegisterFallbackThresholdReply, error)
- ShowOneMapRegisterState(ctx context.Context, in *ShowOneMapRegisterState) (*ShowOneMapRegisterStateReply, error)
- ShowOneMapRegisterTTL(ctx context.Context, in *ShowOneMapRegisterTTL) (*ShowOneMapRegisterTTLReply, error)
- ShowOneMapRequestMode(ctx context.Context, in *ShowOneMapRequestMode) (*ShowOneMapRequestModeReply, error)
- ShowOneNshMapping(ctx context.Context, in *ShowOneNshMapping) (*ShowOneNshMappingReply, error)
- ShowOnePitr(ctx context.Context, in *ShowOnePitr) (*ShowOnePitrReply, error)
- ShowOneRlocProbeState(ctx context.Context, in *ShowOneRlocProbeState) (*ShowOneRlocProbeStateReply, error)
- ShowOneStatsEnableDisable(ctx context.Context, in *ShowOneStatsEnableDisable) (*ShowOneStatsEnableDisableReply, error)
- ShowOneStatus(ctx context.Context, in *ShowOneStatus) (*ShowOneStatusReply, error)
- ShowOneUsePetr(ctx context.Context, in *ShowOneUsePetr) (*ShowOneUsePetrReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) OneAddDelAdjacency(ctx context.Context, in *OneAddDelAdjacency) (*OneAddDelAdjacencyReply, error) {
- out := new(OneAddDelAdjacencyReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) OneAddDelL2ArpEntry(ctx context.Context, in *OneAddDelL2ArpEntry) (*OneAddDelL2ArpEntryReply, error) {
- out := new(OneAddDelL2ArpEntryReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) OneAddDelLocalEid(ctx context.Context, in *OneAddDelLocalEid) (*OneAddDelLocalEidReply, error) {
- out := new(OneAddDelLocalEidReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) OneAddDelLocator(ctx context.Context, in *OneAddDelLocator) (*OneAddDelLocatorReply, error) {
- out := new(OneAddDelLocatorReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) OneAddDelLocatorSet(ctx context.Context, in *OneAddDelLocatorSet) (*OneAddDelLocatorSetReply, error) {
- out := new(OneAddDelLocatorSetReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) OneAddDelMapRequestItrRlocs(ctx context.Context, in *OneAddDelMapRequestItrRlocs) (*OneAddDelMapRequestItrRlocsReply, error) {
- out := new(OneAddDelMapRequestItrRlocsReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) OneAddDelMapResolver(ctx context.Context, in *OneAddDelMapResolver) (*OneAddDelMapResolverReply, error) {
- out := new(OneAddDelMapResolverReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) OneAddDelMapServer(ctx context.Context, in *OneAddDelMapServer) (*OneAddDelMapServerReply, error) {
- out := new(OneAddDelMapServerReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) OneAddDelNdpEntry(ctx context.Context, in *OneAddDelNdpEntry) (*OneAddDelNdpEntryReply, error) {
- out := new(OneAddDelNdpEntryReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) OneAddDelRemoteMapping(ctx context.Context, in *OneAddDelRemoteMapping) (*OneAddDelRemoteMappingReply, error) {
- out := new(OneAddDelRemoteMappingReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) OneAdjacenciesGet(ctx context.Context, in *OneAdjacenciesGet) (*OneAdjacenciesGetReply, error) {
- out := new(OneAdjacenciesGetReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) OneEidTableAddDelMap(ctx context.Context, in *OneEidTableAddDelMap) (*OneEidTableAddDelMapReply, error) {
- out := new(OneEidTableAddDelMapReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) OneEidTableDump(ctx context.Context, in *OneEidTableDump) (RPCService_OneEidTableDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_OneEidTableDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_OneEidTableDumpClient interface {
- Recv() (*OneEidTableDetails, error)
- api.Stream
-}
-
-type serviceClient_OneEidTableDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_OneEidTableDumpClient) Recv() (*OneEidTableDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *OneEidTableDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) OneEidTableMapDump(ctx context.Context, in *OneEidTableMapDump) (RPCService_OneEidTableMapDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_OneEidTableMapDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_OneEidTableMapDumpClient interface {
- Recv() (*OneEidTableMapDetails, error)
- api.Stream
-}
-
-type serviceClient_OneEidTableMapDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_OneEidTableMapDumpClient) Recv() (*OneEidTableMapDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *OneEidTableMapDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) OneEidTableVniDump(ctx context.Context, in *OneEidTableVniDump) (RPCService_OneEidTableVniDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_OneEidTableVniDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_OneEidTableVniDumpClient interface {
- Recv() (*OneEidTableVniDetails, error)
- api.Stream
-}
-
-type serviceClient_OneEidTableVniDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_OneEidTableVniDumpClient) Recv() (*OneEidTableVniDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *OneEidTableVniDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) OneEnableDisable(ctx context.Context, in *OneEnableDisable) (*OneEnableDisableReply, error) {
- out := new(OneEnableDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) OneEnableDisablePetrMode(ctx context.Context, in *OneEnableDisablePetrMode) (*OneEnableDisablePetrModeReply, error) {
- out := new(OneEnableDisablePetrModeReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) OneEnableDisablePitrMode(ctx context.Context, in *OneEnableDisablePitrMode) (*OneEnableDisablePitrModeReply, error) {
- out := new(OneEnableDisablePitrModeReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) OneEnableDisableXtrMode(ctx context.Context, in *OneEnableDisableXtrMode) (*OneEnableDisableXtrModeReply, error) {
- out := new(OneEnableDisableXtrModeReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) OneGetMapRequestItrRlocs(ctx context.Context, in *OneGetMapRequestItrRlocs) (*OneGetMapRequestItrRlocsReply, error) {
- out := new(OneGetMapRequestItrRlocsReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) OneGetTransportProtocol(ctx context.Context, in *OneGetTransportProtocol) (*OneGetTransportProtocolReply, error) {
- out := new(OneGetTransportProtocolReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) OneL2ArpBdGet(ctx context.Context, in *OneL2ArpBdGet) (*OneL2ArpBdGetReply, error) {
- out := new(OneL2ArpBdGetReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) OneL2ArpEntriesGet(ctx context.Context, in *OneL2ArpEntriesGet) (*OneL2ArpEntriesGetReply, error) {
- out := new(OneL2ArpEntriesGetReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) OneLocatorDump(ctx context.Context, in *OneLocatorDump) (RPCService_OneLocatorDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_OneLocatorDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_OneLocatorDumpClient interface {
- Recv() (*OneLocatorDetails, error)
- api.Stream
-}
-
-type serviceClient_OneLocatorDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_OneLocatorDumpClient) Recv() (*OneLocatorDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *OneLocatorDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) OneLocatorSetDump(ctx context.Context, in *OneLocatorSetDump) (RPCService_OneLocatorSetDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_OneLocatorSetDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_OneLocatorSetDumpClient interface {
- Recv() (*OneLocatorSetDetails, error)
- api.Stream
-}
-
-type serviceClient_OneLocatorSetDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_OneLocatorSetDumpClient) Recv() (*OneLocatorSetDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *OneLocatorSetDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) OneMapRegisterEnableDisable(ctx context.Context, in *OneMapRegisterEnableDisable) (*OneMapRegisterEnableDisableReply, error) {
- out := new(OneMapRegisterEnableDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) OneMapRegisterFallbackThreshold(ctx context.Context, in *OneMapRegisterFallbackThreshold) (*OneMapRegisterFallbackThresholdReply, error) {
- out := new(OneMapRegisterFallbackThresholdReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) OneMapRegisterSetTTL(ctx context.Context, in *OneMapRegisterSetTTL) (*OneMapRegisterSetTTLReply, error) {
- out := new(OneMapRegisterSetTTLReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) OneMapRequestMode(ctx context.Context, in *OneMapRequestMode) (*OneMapRequestModeReply, error) {
- out := new(OneMapRequestModeReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) OneMapResolverDump(ctx context.Context, in *OneMapResolverDump) (RPCService_OneMapResolverDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_OneMapResolverDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_OneMapResolverDumpClient interface {
- Recv() (*OneMapResolverDetails, error)
- api.Stream
-}
-
-type serviceClient_OneMapResolverDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_OneMapResolverDumpClient) Recv() (*OneMapResolverDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *OneMapResolverDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) OneMapServerDump(ctx context.Context, in *OneMapServerDump) (RPCService_OneMapServerDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_OneMapServerDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_OneMapServerDumpClient interface {
- Recv() (*OneMapServerDetails, error)
- api.Stream
-}
-
-type serviceClient_OneMapServerDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_OneMapServerDumpClient) Recv() (*OneMapServerDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *OneMapServerDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) OneNdpBdGet(ctx context.Context, in *OneNdpBdGet) (*OneNdpBdGetReply, error) {
- out := new(OneNdpBdGetReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) OneNdpEntriesGet(ctx context.Context, in *OneNdpEntriesGet) (*OneNdpEntriesGetReply, error) {
- out := new(OneNdpEntriesGetReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) OneNshSetLocatorSet(ctx context.Context, in *OneNshSetLocatorSet) (*OneNshSetLocatorSetReply, error) {
- out := new(OneNshSetLocatorSetReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) OnePitrSetLocatorSet(ctx context.Context, in *OnePitrSetLocatorSet) (*OnePitrSetLocatorSetReply, error) {
- out := new(OnePitrSetLocatorSetReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) OneRlocProbeEnableDisable(ctx context.Context, in *OneRlocProbeEnableDisable) (*OneRlocProbeEnableDisableReply, error) {
- out := new(OneRlocProbeEnableDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) OneSetTransportProtocol(ctx context.Context, in *OneSetTransportProtocol) (*OneSetTransportProtocolReply, error) {
- out := new(OneSetTransportProtocolReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) OneShowPetrMode(ctx context.Context, in *OneShowPetrMode) (*OneShowPetrModeReply, error) {
- out := new(OneShowPetrModeReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) OneShowPitrMode(ctx context.Context, in *OneShowPitrMode) (*OneShowPitrModeReply, error) {
- out := new(OneShowPitrModeReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) OneShowXtrMode(ctx context.Context, in *OneShowXtrMode) (*OneShowXtrModeReply, error) {
- out := new(OneShowXtrModeReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) OneStatsDump(ctx context.Context, in *OneStatsDump) (RPCService_OneStatsDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_OneStatsDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_OneStatsDumpClient interface {
- Recv() (*OneStatsDetails, error)
- api.Stream
-}
-
-type serviceClient_OneStatsDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_OneStatsDumpClient) Recv() (*OneStatsDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *OneStatsDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) OneStatsEnableDisable(ctx context.Context, in *OneStatsEnableDisable) (*OneStatsEnableDisableReply, error) {
- out := new(OneStatsEnableDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) OneStatsFlush(ctx context.Context, in *OneStatsFlush) (*OneStatsFlushReply, error) {
- out := new(OneStatsFlushReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) OneUsePetr(ctx context.Context, in *OneUsePetr) (*OneUsePetrReply, error) {
- out := new(OneUsePetrReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) ShowOneMapRegisterFallbackThreshold(ctx context.Context, in *ShowOneMapRegisterFallbackThreshold) (*ShowOneMapRegisterFallbackThresholdReply, error) {
- out := new(ShowOneMapRegisterFallbackThresholdReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) ShowOneMapRegisterState(ctx context.Context, in *ShowOneMapRegisterState) (*ShowOneMapRegisterStateReply, error) {
- out := new(ShowOneMapRegisterStateReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) ShowOneMapRegisterTTL(ctx context.Context, in *ShowOneMapRegisterTTL) (*ShowOneMapRegisterTTLReply, error) {
- out := new(ShowOneMapRegisterTTLReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) ShowOneMapRequestMode(ctx context.Context, in *ShowOneMapRequestMode) (*ShowOneMapRequestModeReply, error) {
- out := new(ShowOneMapRequestModeReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) ShowOneNshMapping(ctx context.Context, in *ShowOneNshMapping) (*ShowOneNshMappingReply, error) {
- out := new(ShowOneNshMappingReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) ShowOnePitr(ctx context.Context, in *ShowOnePitr) (*ShowOnePitrReply, error) {
- out := new(ShowOnePitrReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) ShowOneRlocProbeState(ctx context.Context, in *ShowOneRlocProbeState) (*ShowOneRlocProbeStateReply, error) {
- out := new(ShowOneRlocProbeStateReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) ShowOneStatsEnableDisable(ctx context.Context, in *ShowOneStatsEnableDisable) (*ShowOneStatsEnableDisableReply, error) {
- out := new(ShowOneStatsEnableDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) ShowOneStatus(ctx context.Context, in *ShowOneStatus) (*ShowOneStatusReply, error) {
- out := new(ShowOneStatusReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) ShowOneUsePetr(ctx context.Context, in *ShowOneUsePetr) (*ShowOneUsePetrReply, error) {
- out := new(ShowOneUsePetrReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/p2p_ethernet/p2p_ethernet.ba.go b/internal/testbinapi/binapi2001/p2p_ethernet/p2p_ethernet.ba.go
deleted file mode 100644
index fdf488c..0000000
--- a/internal/testbinapi/binapi2001/p2p_ethernet/p2p_ethernet.ba.go
+++ /dev/null
@@ -1,488 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/p2p_ethernet.api.json
-
-// Package p2p_ethernet contains generated bindings for API file p2p_ethernet.api.
-//
-// Contents:
-// 2 aliases
-// 6 enums
-// 4 messages
-//
-package p2p_ethernet
-
-import (
- "net"
- "strconv"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "p2p_ethernet"
- APIVersion = "1.0.0"
- VersionCrc = 0x282f1ed1
-)
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// MacAddress defines alias 'mac_address'.
-type MacAddress [6]uint8
-
-func ParseMacAddress(s string) (MacAddress, error) {
- var macaddr MacAddress
- mac, err := net.ParseMAC(s)
- if err != nil {
- return macaddr, err
- }
- copy(macaddr[:], mac[:])
- return macaddr, nil
-}
-
-func (x MacAddress) ToMAC() net.HardwareAddr {
- return net.HardwareAddr(x[:])
-}
-
-func (x MacAddress) String() string {
- return x.ToMAC().String()
-}
-
-func (x *MacAddress) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *MacAddress) UnmarshalText(text []byte) error {
- mac, err := ParseMacAddress(string(text))
- if err != nil {
- return err
- }
- *x = mac
- return nil
-}
-
-// P2pEthernetAdd defines message 'p2p_ethernet_add'.
-type P2pEthernetAdd struct {
- ParentIfIndex InterfaceIndex `binapi:"interface_index,name=parent_if_index" json:"parent_if_index,omitempty"`
- SubifID uint32 `binapi:"u32,name=subif_id" json:"subif_id,omitempty"`
- RemoteMac MacAddress `binapi:"mac_address,name=remote_mac" json:"remote_mac,omitempty"`
-}
-
-func (m *P2pEthernetAdd) Reset() { *m = P2pEthernetAdd{} }
-func (*P2pEthernetAdd) GetMessageName() string { return "p2p_ethernet_add" }
-func (*P2pEthernetAdd) GetCrcString() string { return "eeb8e717" }
-func (*P2pEthernetAdd) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *P2pEthernetAdd) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.ParentIfIndex
- size += 4 // m.SubifID
- size += 1 * 6 // m.RemoteMac
- return size
-}
-func (m *P2pEthernetAdd) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.ParentIfIndex))
- buf.EncodeUint32(m.SubifID)
- buf.EncodeBytes(m.RemoteMac[:], 6)
- return buf.Bytes(), nil
-}
-func (m *P2pEthernetAdd) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.ParentIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.SubifID = buf.DecodeUint32()
- copy(m.RemoteMac[:], buf.DecodeBytes(6))
- return nil
-}
-
-// P2pEthernetAddReply defines message 'p2p_ethernet_add_reply'.
-type P2pEthernetAddReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *P2pEthernetAddReply) Reset() { *m = P2pEthernetAddReply{} }
-func (*P2pEthernetAddReply) GetMessageName() string { return "p2p_ethernet_add_reply" }
-func (*P2pEthernetAddReply) GetCrcString() string { return "5383d31f" }
-func (*P2pEthernetAddReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *P2pEthernetAddReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *P2pEthernetAddReply) 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 *P2pEthernetAddReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// P2pEthernetDel defines message 'p2p_ethernet_del'.
-type P2pEthernetDel struct {
- ParentIfIndex InterfaceIndex `binapi:"interface_index,name=parent_if_index" json:"parent_if_index,omitempty"`
- RemoteMac MacAddress `binapi:"mac_address,name=remote_mac" json:"remote_mac,omitempty"`
-}
-
-func (m *P2pEthernetDel) Reset() { *m = P2pEthernetDel{} }
-func (*P2pEthernetDel) GetMessageName() string { return "p2p_ethernet_del" }
-func (*P2pEthernetDel) GetCrcString() string { return "0b62c386" }
-func (*P2pEthernetDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *P2pEthernetDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.ParentIfIndex
- size += 1 * 6 // m.RemoteMac
- return size
-}
-func (m *P2pEthernetDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.ParentIfIndex))
- buf.EncodeBytes(m.RemoteMac[:], 6)
- return buf.Bytes(), nil
-}
-func (m *P2pEthernetDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.ParentIfIndex = InterfaceIndex(buf.DecodeUint32())
- copy(m.RemoteMac[:], buf.DecodeBytes(6))
- return nil
-}
-
-// P2pEthernetDelReply defines message 'p2p_ethernet_del_reply'.
-type P2pEthernetDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *P2pEthernetDelReply) Reset() { *m = P2pEthernetDelReply{} }
-func (*P2pEthernetDelReply) GetMessageName() string { return "p2p_ethernet_del_reply" }
-func (*P2pEthernetDelReply) GetCrcString() string { return "e8d4e804" }
-func (*P2pEthernetDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *P2pEthernetDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *P2pEthernetDelReply) 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 *P2pEthernetDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_p2p_ethernet_binapi_init() }
-func file_p2p_ethernet_binapi_init() {
- api.RegisterMessage((*P2pEthernetAdd)(nil), "p2p_ethernet_add_eeb8e717")
- api.RegisterMessage((*P2pEthernetAddReply)(nil), "p2p_ethernet_add_reply_5383d31f")
- api.RegisterMessage((*P2pEthernetDel)(nil), "p2p_ethernet_del_0b62c386")
- api.RegisterMessage((*P2pEthernetDelReply)(nil), "p2p_ethernet_del_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*P2pEthernetAdd)(nil),
- (*P2pEthernetAddReply)(nil),
- (*P2pEthernetDel)(nil),
- (*P2pEthernetDelReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/p2p_ethernet/p2p_ethernet_rpc.ba.go b/internal/testbinapi/binapi2001/p2p_ethernet/p2p_ethernet_rpc.ba.go
deleted file mode 100644
index c96d6a5..0000000
--- a/internal/testbinapi/binapi2001/p2p_ethernet/p2p_ethernet_rpc.ba.go
+++ /dev/null
@@ -1,41 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package p2p_ethernet
-
-import (
- "context"
-
- api "git.fd.io/govpp.git/api"
-)
-
-// RPCService defines RPC service p2p_ethernet.
-type RPCService interface {
- P2pEthernetAdd(ctx context.Context, in *P2pEthernetAdd) (*P2pEthernetAddReply, error)
- P2pEthernetDel(ctx context.Context, in *P2pEthernetDel) (*P2pEthernetDelReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) P2pEthernetAdd(ctx context.Context, in *P2pEthernetAdd) (*P2pEthernetAddReply, error) {
- out := new(P2pEthernetAddReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) P2pEthernetDel(ctx context.Context, in *P2pEthernetDel) (*P2pEthernetDelReply, error) {
- out := new(P2pEthernetDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/pci_types/pci_types.ba.go b/internal/testbinapi/binapi2001/pci_types/pci_types.ba.go
deleted file mode 100644
index d4ea7b2..0000000
--- a/internal/testbinapi/binapi2001/pci_types/pci_types.ba.go
+++ /dev/null
@@ -1,36 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/pci_types.api.json
-
-// Package pci_types contains generated bindings for API file pci_types.api.
-//
-// Contents:
-// 1 struct
-//
-package pci_types
-
-import (
- api "git.fd.io/govpp.git/api"
-)
-
-// 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 = "pci_types"
- APIVersion = "1.0.0"
- VersionCrc = 0x5d418665
-)
-
-// PciAddress defines type 'pci_address'.
-type PciAddress struct {
- Domain uint16 `binapi:"u16,name=domain" json:"domain,omitempty"`
- Bus uint8 `binapi:"u8,name=bus" json:"bus,omitempty"`
- Slot uint8 `binapi:"u8,name=slot" json:"slot,omitempty"`
- Function uint8 `binapi:"u8,name=function" json:"function,omitempty"`
-}
diff --git a/internal/testbinapi/binapi2001/pg/pg.ba.go b/internal/testbinapi/binapi2001/pg/pg.ba.go
deleted file mode 100644
index 1e304c4..0000000
--- a/internal/testbinapi/binapi2001/pg/pg.ba.go
+++ /dev/null
@@ -1,287 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/pg.api.json
-
-// Package pg contains generated bindings for API file pg.api.
-//
-// Contents:
-// 6 messages
-//
-package pg
-
-import (
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the GoVPP api package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// GoVPP api package needs to be updated.
-const _ = api.GoVppAPIPackageIsVersion2
-
-const (
- APIFile = "pg"
- APIVersion = "1.1.0"
- VersionCrc = 0x2583e07b
-)
-
-// PgCapture defines message 'pg_capture'.
-type PgCapture struct {
- InterfaceID uint32 `binapi:"u32,name=interface_id" json:"interface_id,omitempty"`
- IsEnabled uint8 `binapi:"u8,name=is_enabled" json:"is_enabled,omitempty"`
- Count uint32 `binapi:"u32,name=count" json:"count,omitempty"`
- PcapNameLength uint32 `binapi:"u32,name=pcap_name_length" json:"-"`
- PcapFileName []byte `binapi:"u8[pcap_name_length],name=pcap_file_name" json:"pcap_file_name,omitempty"`
-}
-
-func (m *PgCapture) Reset() { *m = PgCapture{} }
-func (*PgCapture) GetMessageName() string { return "pg_capture" }
-func (*PgCapture) GetCrcString() string { return "453da78d" }
-func (*PgCapture) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *PgCapture) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.InterfaceID
- size += 1 // m.IsEnabled
- size += 4 // m.Count
- size += 4 // m.PcapNameLength
- size += 1 * len(m.PcapFileName) // m.PcapFileName
- return size
-}
-func (m *PgCapture) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.InterfaceID)
- buf.EncodeUint8(m.IsEnabled)
- buf.EncodeUint32(m.Count)
- buf.EncodeUint32(uint32(len(m.PcapFileName)))
- buf.EncodeBytes(m.PcapFileName, 0)
- return buf.Bytes(), nil
-}
-func (m *PgCapture) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.InterfaceID = buf.DecodeUint32()
- m.IsEnabled = buf.DecodeUint8()
- m.Count = buf.DecodeUint32()
- m.PcapNameLength = buf.DecodeUint32()
- m.PcapFileName = make([]byte, m.PcapNameLength)
- copy(m.PcapFileName, buf.DecodeBytes(len(m.PcapFileName)))
- return nil
-}
-
-// PgCaptureReply defines message 'pg_capture_reply'.
-type PgCaptureReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *PgCaptureReply) Reset() { *m = PgCaptureReply{} }
-func (*PgCaptureReply) GetMessageName() string { return "pg_capture_reply" }
-func (*PgCaptureReply) GetCrcString() string { return "e8d4e804" }
-func (*PgCaptureReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *PgCaptureReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *PgCaptureReply) 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 *PgCaptureReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// PgCreateInterface defines message 'pg_create_interface'.
-type PgCreateInterface struct {
- InterfaceID uint32 `binapi:"u32,name=interface_id" json:"interface_id,omitempty"`
- GsoEnabled uint8 `binapi:"u8,name=gso_enabled" json:"gso_enabled,omitempty"`
- GsoSize uint32 `binapi:"u32,name=gso_size" json:"gso_size,omitempty"`
-}
-
-func (m *PgCreateInterface) Reset() { *m = PgCreateInterface{} }
-func (*PgCreateInterface) GetMessageName() string { return "pg_create_interface" }
-func (*PgCreateInterface) GetCrcString() string { return "b1ecff05" }
-func (*PgCreateInterface) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *PgCreateInterface) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.InterfaceID
- size += 1 // m.GsoEnabled
- size += 4 // m.GsoSize
- return size
-}
-func (m *PgCreateInterface) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.InterfaceID)
- buf.EncodeUint8(m.GsoEnabled)
- buf.EncodeUint32(m.GsoSize)
- return buf.Bytes(), nil
-}
-func (m *PgCreateInterface) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.InterfaceID = buf.DecodeUint32()
- m.GsoEnabled = buf.DecodeUint8()
- m.GsoSize = buf.DecodeUint32()
- return nil
-}
-
-// PgCreateInterfaceReply defines message 'pg_create_interface_reply'.
-type PgCreateInterfaceReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *PgCreateInterfaceReply) Reset() { *m = PgCreateInterfaceReply{} }
-func (*PgCreateInterfaceReply) GetMessageName() string { return "pg_create_interface_reply" }
-func (*PgCreateInterfaceReply) GetCrcString() string { return "fda5941f" }
-func (*PgCreateInterfaceReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *PgCreateInterfaceReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *PgCreateInterfaceReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.SwIfIndex)
- return buf.Bytes(), nil
-}
-func (m *PgCreateInterfaceReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.SwIfIndex = buf.DecodeUint32()
- return nil
-}
-
-// PgEnableDisable defines message 'pg_enable_disable'.
-type PgEnableDisable struct {
- IsEnabled uint8 `binapi:"u8,name=is_enabled" json:"is_enabled,omitempty"`
- StreamNameLength uint32 `binapi:"u32,name=stream_name_length" json:"-"`
- StreamName []byte `binapi:"u8[stream_name_length],name=stream_name" json:"stream_name,omitempty"`
-}
-
-func (m *PgEnableDisable) Reset() { *m = PgEnableDisable{} }
-func (*PgEnableDisable) GetMessageName() string { return "pg_enable_disable" }
-func (*PgEnableDisable) GetCrcString() string { return "0cb71d10" }
-func (*PgEnableDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *PgEnableDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsEnabled
- size += 4 // m.StreamNameLength
- size += 1 * len(m.StreamName) // m.StreamName
- return size
-}
-func (m *PgEnableDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsEnabled)
- buf.EncodeUint32(uint32(len(m.StreamName)))
- buf.EncodeBytes(m.StreamName, 0)
- return buf.Bytes(), nil
-}
-func (m *PgEnableDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsEnabled = buf.DecodeUint8()
- m.StreamNameLength = buf.DecodeUint32()
- m.StreamName = make([]byte, m.StreamNameLength)
- copy(m.StreamName, buf.DecodeBytes(len(m.StreamName)))
- return nil
-}
-
-// PgEnableDisableReply defines message 'pg_enable_disable_reply'.
-type PgEnableDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *PgEnableDisableReply) Reset() { *m = PgEnableDisableReply{} }
-func (*PgEnableDisableReply) GetMessageName() string { return "pg_enable_disable_reply" }
-func (*PgEnableDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*PgEnableDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *PgEnableDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *PgEnableDisableReply) 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 *PgEnableDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_pg_binapi_init() }
-func file_pg_binapi_init() {
- api.RegisterMessage((*PgCapture)(nil), "pg_capture_453da78d")
- api.RegisterMessage((*PgCaptureReply)(nil), "pg_capture_reply_e8d4e804")
- api.RegisterMessage((*PgCreateInterface)(nil), "pg_create_interface_b1ecff05")
- api.RegisterMessage((*PgCreateInterfaceReply)(nil), "pg_create_interface_reply_fda5941f")
- api.RegisterMessage((*PgEnableDisable)(nil), "pg_enable_disable_0cb71d10")
- api.RegisterMessage((*PgEnableDisableReply)(nil), "pg_enable_disable_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*PgCapture)(nil),
- (*PgCaptureReply)(nil),
- (*PgCreateInterface)(nil),
- (*PgCreateInterfaceReply)(nil),
- (*PgEnableDisable)(nil),
- (*PgEnableDisableReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/pg/pg_rpc.ba.go b/internal/testbinapi/binapi2001/pg/pg_rpc.ba.go
deleted file mode 100644
index 697f684..0000000
--- a/internal/testbinapi/binapi2001/pg/pg_rpc.ba.go
+++ /dev/null
@@ -1,51 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package pg
-
-import (
- "context"
-
- api "git.fd.io/govpp.git/api"
-)
-
-// RPCService defines RPC service pg.
-type RPCService interface {
- PgCapture(ctx context.Context, in *PgCapture) (*PgCaptureReply, error)
- PgCreateInterface(ctx context.Context, in *PgCreateInterface) (*PgCreateInterfaceReply, error)
- PgEnableDisable(ctx context.Context, in *PgEnableDisable) (*PgEnableDisableReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) PgCapture(ctx context.Context, in *PgCapture) (*PgCaptureReply, error) {
- out := new(PgCaptureReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) PgCreateInterface(ctx context.Context, in *PgCreateInterface) (*PgCreateInterfaceReply, error) {
- out := new(PgCreateInterfaceReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) PgEnableDisable(ctx context.Context, in *PgEnableDisable) (*PgEnableDisableReply, error) {
- out := new(PgEnableDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/pipe/pipe.ba.go b/internal/testbinapi/binapi2001/pipe/pipe.ba.go
deleted file mode 100644
index da324cb..0000000
--- a/internal/testbinapi/binapi2001/pipe/pipe.ba.go
+++ /dev/null
@@ -1,533 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/pipe.api.json
-
-// Package pipe contains generated bindings for API file pipe.api.
-//
-// Contents:
-// 1 alias
-// 6 enums
-// 6 messages
-//
-package pipe
-
-import (
- "strconv"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "pipe"
- APIVersion = "1.0.1"
- VersionCrc = 0x1d68f11
-)
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// PipeCreate defines message 'pipe_create'.
-type PipeCreate struct {
- IsSpecified bool `binapi:"bool,name=is_specified" json:"is_specified,omitempty"`
- UserInstance uint32 `binapi:"u32,name=user_instance" json:"user_instance,omitempty"`
-}
-
-func (m *PipeCreate) Reset() { *m = PipeCreate{} }
-func (*PipeCreate) GetMessageName() string { return "pipe_create" }
-func (*PipeCreate) GetCrcString() string { return "bb263bd3" }
-func (*PipeCreate) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *PipeCreate) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsSpecified
- size += 4 // m.UserInstance
- return size
-}
-func (m *PipeCreate) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsSpecified)
- buf.EncodeUint32(m.UserInstance)
- return buf.Bytes(), nil
-}
-func (m *PipeCreate) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsSpecified = buf.DecodeBool()
- m.UserInstance = buf.DecodeUint32()
- return nil
-}
-
-// PipeCreateReply defines message 'pipe_create_reply'.
-type PipeCreateReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- PipeSwIfIndex [2]InterfaceIndex `binapi:"interface_index[2],name=pipe_sw_if_index" json:"pipe_sw_if_index,omitempty"`
-}
-
-func (m *PipeCreateReply) Reset() { *m = PipeCreateReply{} }
-func (*PipeCreateReply) GetMessageName() string { return "pipe_create_reply" }
-func (*PipeCreateReply) GetCrcString() string { return "d4c2c2b3" }
-func (*PipeCreateReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *PipeCreateReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.SwIfIndex
- for j1 := 0; j1 < 2; j1++ {
- size += 4 // m.PipeSwIfIndex[j1]
- }
- return size
-}
-func (m *PipeCreateReply) 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))
- for j0 := 0; j0 < 2; j0++ {
- buf.EncodeUint32(uint32(m.PipeSwIfIndex[j0]))
- }
- return buf.Bytes(), nil
-}
-func (m *PipeCreateReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- for j0 := 0; j0 < 2; j0++ {
- m.PipeSwIfIndex[j0] = InterfaceIndex(buf.DecodeUint32())
- }
- return nil
-}
-
-// PipeDelete defines message 'pipe_delete'.
-type PipeDelete struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *PipeDelete) Reset() { *m = PipeDelete{} }
-func (*PipeDelete) GetMessageName() string { return "pipe_delete" }
-func (*PipeDelete) GetCrcString() string { return "f9e6675e" }
-func (*PipeDelete) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *PipeDelete) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *PipeDelete) 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 *PipeDelete) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// PipeDeleteReply defines message 'pipe_delete_reply'.
-type PipeDeleteReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *PipeDeleteReply) Reset() { *m = PipeDeleteReply{} }
-func (*PipeDeleteReply) GetMessageName() string { return "pipe_delete_reply" }
-func (*PipeDeleteReply) GetCrcString() string { return "e8d4e804" }
-func (*PipeDeleteReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *PipeDeleteReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *PipeDeleteReply) 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 *PipeDeleteReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// PipeDetails defines message 'pipe_details'.
-type PipeDetails struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- PipeSwIfIndex [2]InterfaceIndex `binapi:"interface_index[2],name=pipe_sw_if_index" json:"pipe_sw_if_index,omitempty"`
- Instance uint32 `binapi:"u32,name=instance" json:"instance,omitempty"`
-}
-
-func (m *PipeDetails) Reset() { *m = PipeDetails{} }
-func (*PipeDetails) GetMessageName() string { return "pipe_details" }
-func (*PipeDetails) GetCrcString() string { return "43ac107a" }
-func (*PipeDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *PipeDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- for j1 := 0; j1 < 2; j1++ {
- size += 4 // m.PipeSwIfIndex[j1]
- }
- size += 4 // m.Instance
- return size
-}
-func (m *PipeDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- for j0 := 0; j0 < 2; j0++ {
- buf.EncodeUint32(uint32(m.PipeSwIfIndex[j0]))
- }
- buf.EncodeUint32(m.Instance)
- return buf.Bytes(), nil
-}
-func (m *PipeDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- for j0 := 0; j0 < 2; j0++ {
- m.PipeSwIfIndex[j0] = InterfaceIndex(buf.DecodeUint32())
- }
- m.Instance = buf.DecodeUint32()
- return nil
-}
-
-// PipeDump defines message 'pipe_dump'.
-type PipeDump struct{}
-
-func (m *PipeDump) Reset() { *m = PipeDump{} }
-func (*PipeDump) GetMessageName() string { return "pipe_dump" }
-func (*PipeDump) GetCrcString() string { return "51077d14" }
-func (*PipeDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *PipeDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *PipeDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *PipeDump) Unmarshal(b []byte) error {
- return nil
-}
-
-func init() { file_pipe_binapi_init() }
-func file_pipe_binapi_init() {
- api.RegisterMessage((*PipeCreate)(nil), "pipe_create_bb263bd3")
- api.RegisterMessage((*PipeCreateReply)(nil), "pipe_create_reply_d4c2c2b3")
- api.RegisterMessage((*PipeDelete)(nil), "pipe_delete_f9e6675e")
- api.RegisterMessage((*PipeDeleteReply)(nil), "pipe_delete_reply_e8d4e804")
- api.RegisterMessage((*PipeDetails)(nil), "pipe_details_43ac107a")
- api.RegisterMessage((*PipeDump)(nil), "pipe_dump_51077d14")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*PipeCreate)(nil),
- (*PipeCreateReply)(nil),
- (*PipeDelete)(nil),
- (*PipeDeleteReply)(nil),
- (*PipeDetails)(nil),
- (*PipeDump)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/pipe/pipe_rpc.ba.go b/internal/testbinapi/binapi2001/pipe/pipe_rpc.ba.go
deleted file mode 100644
index 3f2dbc9..0000000
--- a/internal/testbinapi/binapi2001/pipe/pipe_rpc.ba.go
+++ /dev/null
@@ -1,88 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package pipe
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service pipe.
-type RPCService interface {
- PipeCreate(ctx context.Context, in *PipeCreate) (*PipeCreateReply, error)
- PipeDelete(ctx context.Context, in *PipeDelete) (*PipeDeleteReply, error)
- PipeDump(ctx context.Context, in *PipeDump) (RPCService_PipeDumpClient, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) PipeCreate(ctx context.Context, in *PipeCreate) (*PipeCreateReply, error) {
- out := new(PipeCreateReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) PipeDelete(ctx context.Context, in *PipeDelete) (*PipeDeleteReply, error) {
- out := new(PipeDeleteReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) PipeDump(ctx context.Context, in *PipeDump) (RPCService_PipeDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_PipeDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_PipeDumpClient interface {
- Recv() (*PipeDetails, error)
- api.Stream
-}
-
-type serviceClient_PipeDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_PipeDumpClient) Recv() (*PipeDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *PipeDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
diff --git a/internal/testbinapi/binapi2001/policer/policer.ba.go b/internal/testbinapi/binapi2001/policer/policer.ba.go
deleted file mode 100644
index 3c8577b..0000000
--- a/internal/testbinapi/binapi2001/policer/policer.ba.go
+++ /dev/null
@@ -1,342 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/policer.api.json
-
-// Package policer contains generated bindings for API file policer.api.
-//
-// Contents:
-// 4 messages
-//
-package policer
-
-import (
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the GoVPP api package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// GoVPP api package needs to be updated.
-const _ = api.GoVppAPIPackageIsVersion2
-
-const (
- APIFile = "policer"
- APIVersion = "1.0.0"
- VersionCrc = 0x4218ed4f
-)
-
-// PolicerAddDel defines message 'policer_add_del'.
-type PolicerAddDel struct {
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
- Name []byte `binapi:"u8[64],name=name" json:"name,omitempty"`
- Cir uint32 `binapi:"u32,name=cir" json:"cir,omitempty"`
- Eir uint32 `binapi:"u32,name=eir" json:"eir,omitempty"`
- Cb uint64 `binapi:"u64,name=cb" json:"cb,omitempty"`
- Eb uint64 `binapi:"u64,name=eb" json:"eb,omitempty"`
- RateType uint8 `binapi:"u8,name=rate_type" json:"rate_type,omitempty"`
- RoundType uint8 `binapi:"u8,name=round_type" json:"round_type,omitempty"`
- Type uint8 `binapi:"u8,name=type" json:"type,omitempty"`
- ColorAware uint8 `binapi:"u8,name=color_aware" json:"color_aware,omitempty"`
- ConformActionType uint8 `binapi:"u8,name=conform_action_type" json:"conform_action_type,omitempty"`
- ConformDscp uint8 `binapi:"u8,name=conform_dscp" json:"conform_dscp,omitempty"`
- ExceedActionType uint8 `binapi:"u8,name=exceed_action_type" json:"exceed_action_type,omitempty"`
- ExceedDscp uint8 `binapi:"u8,name=exceed_dscp" json:"exceed_dscp,omitempty"`
- ViolateActionType uint8 `binapi:"u8,name=violate_action_type" json:"violate_action_type,omitempty"`
- ViolateDscp uint8 `binapi:"u8,name=violate_dscp" json:"violate_dscp,omitempty"`
-}
-
-func (m *PolicerAddDel) Reset() { *m = PolicerAddDel{} }
-func (*PolicerAddDel) GetMessageName() string { return "policer_add_del" }
-func (*PolicerAddDel) GetCrcString() string { return "dfea2be8" }
-func (*PolicerAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *PolicerAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 1 * 64 // m.Name
- size += 4 // m.Cir
- size += 4 // m.Eir
- size += 8 // m.Cb
- size += 8 // m.Eb
- size += 1 // m.RateType
- size += 1 // m.RoundType
- size += 1 // m.Type
- size += 1 // m.ColorAware
- size += 1 // m.ConformActionType
- size += 1 // m.ConformDscp
- size += 1 // m.ExceedActionType
- size += 1 // m.ExceedDscp
- size += 1 // m.ViolateActionType
- size += 1 // m.ViolateDscp
- return size
-}
-func (m *PolicerAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsAdd)
- buf.EncodeBytes(m.Name, 64)
- buf.EncodeUint32(m.Cir)
- buf.EncodeUint32(m.Eir)
- buf.EncodeUint64(m.Cb)
- buf.EncodeUint64(m.Eb)
- buf.EncodeUint8(m.RateType)
- buf.EncodeUint8(m.RoundType)
- buf.EncodeUint8(m.Type)
- buf.EncodeUint8(m.ColorAware)
- buf.EncodeUint8(m.ConformActionType)
- buf.EncodeUint8(m.ConformDscp)
- buf.EncodeUint8(m.ExceedActionType)
- buf.EncodeUint8(m.ExceedDscp)
- buf.EncodeUint8(m.ViolateActionType)
- buf.EncodeUint8(m.ViolateDscp)
- return buf.Bytes(), nil
-}
-func (m *PolicerAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeUint8()
- m.Name = make([]byte, 64)
- copy(m.Name, buf.DecodeBytes(len(m.Name)))
- m.Cir = buf.DecodeUint32()
- m.Eir = buf.DecodeUint32()
- m.Cb = buf.DecodeUint64()
- m.Eb = buf.DecodeUint64()
- m.RateType = buf.DecodeUint8()
- m.RoundType = buf.DecodeUint8()
- m.Type = buf.DecodeUint8()
- m.ColorAware = buf.DecodeUint8()
- m.ConformActionType = buf.DecodeUint8()
- m.ConformDscp = buf.DecodeUint8()
- m.ExceedActionType = buf.DecodeUint8()
- m.ExceedDscp = buf.DecodeUint8()
- m.ViolateActionType = buf.DecodeUint8()
- m.ViolateDscp = buf.DecodeUint8()
- return nil
-}
-
-// PolicerAddDelReply defines message 'policer_add_del_reply'.
-type PolicerAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- PolicerIndex uint32 `binapi:"u32,name=policer_index" json:"policer_index,omitempty"`
-}
-
-func (m *PolicerAddDelReply) Reset() { *m = PolicerAddDelReply{} }
-func (*PolicerAddDelReply) GetMessageName() string { return "policer_add_del_reply" }
-func (*PolicerAddDelReply) GetCrcString() string { return "a177cef2" }
-func (*PolicerAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *PolicerAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.PolicerIndex
- return size
-}
-func (m *PolicerAddDelReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.PolicerIndex)
- return buf.Bytes(), nil
-}
-func (m *PolicerAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.PolicerIndex = buf.DecodeUint32()
- return nil
-}
-
-// PolicerDetails defines message 'policer_details'.
-type PolicerDetails struct {
- Name []byte `binapi:"u8[64],name=name" json:"name,omitempty"`
- Cir uint32 `binapi:"u32,name=cir" json:"cir,omitempty"`
- Eir uint32 `binapi:"u32,name=eir" json:"eir,omitempty"`
- Cb uint64 `binapi:"u64,name=cb" json:"cb,omitempty"`
- Eb uint64 `binapi:"u64,name=eb" json:"eb,omitempty"`
- RateType uint8 `binapi:"u8,name=rate_type" json:"rate_type,omitempty"`
- RoundType uint8 `binapi:"u8,name=round_type" json:"round_type,omitempty"`
- Type uint8 `binapi:"u8,name=type" json:"type,omitempty"`
- ConformActionType uint8 `binapi:"u8,name=conform_action_type" json:"conform_action_type,omitempty"`
- ConformDscp uint8 `binapi:"u8,name=conform_dscp" json:"conform_dscp,omitempty"`
- ExceedActionType uint8 `binapi:"u8,name=exceed_action_type" json:"exceed_action_type,omitempty"`
- ExceedDscp uint8 `binapi:"u8,name=exceed_dscp" json:"exceed_dscp,omitempty"`
- ViolateActionType uint8 `binapi:"u8,name=violate_action_type" json:"violate_action_type,omitempty"`
- ViolateDscp uint8 `binapi:"u8,name=violate_dscp" json:"violate_dscp,omitempty"`
- SingleRate uint8 `binapi:"u8,name=single_rate" json:"single_rate,omitempty"`
- ColorAware uint8 `binapi:"u8,name=color_aware" json:"color_aware,omitempty"`
- Scale uint32 `binapi:"u32,name=scale" json:"scale,omitempty"`
- CirTokensPerPeriod uint32 `binapi:"u32,name=cir_tokens_per_period" json:"cir_tokens_per_period,omitempty"`
- PirTokensPerPeriod uint32 `binapi:"u32,name=pir_tokens_per_period" json:"pir_tokens_per_period,omitempty"`
- CurrentLimit uint32 `binapi:"u32,name=current_limit" json:"current_limit,omitempty"`
- CurrentBucket uint32 `binapi:"u32,name=current_bucket" json:"current_bucket,omitempty"`
- ExtendedLimit uint32 `binapi:"u32,name=extended_limit" json:"extended_limit,omitempty"`
- ExtendedBucket uint32 `binapi:"u32,name=extended_bucket" json:"extended_bucket,omitempty"`
- LastUpdateTime uint64 `binapi:"u64,name=last_update_time" json:"last_update_time,omitempty"`
-}
-
-func (m *PolicerDetails) Reset() { *m = PolicerDetails{} }
-func (*PolicerDetails) GetMessageName() string { return "policer_details" }
-func (*PolicerDetails) GetCrcString() string { return "ff2765f0" }
-func (*PolicerDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *PolicerDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 64 // m.Name
- size += 4 // m.Cir
- size += 4 // m.Eir
- size += 8 // m.Cb
- size += 8 // m.Eb
- size += 1 // m.RateType
- size += 1 // m.RoundType
- size += 1 // m.Type
- size += 1 // m.ConformActionType
- size += 1 // m.ConformDscp
- size += 1 // m.ExceedActionType
- size += 1 // m.ExceedDscp
- size += 1 // m.ViolateActionType
- size += 1 // m.ViolateDscp
- size += 1 // m.SingleRate
- size += 1 // m.ColorAware
- size += 4 // m.Scale
- size += 4 // m.CirTokensPerPeriod
- size += 4 // m.PirTokensPerPeriod
- size += 4 // m.CurrentLimit
- size += 4 // m.CurrentBucket
- size += 4 // m.ExtendedLimit
- size += 4 // m.ExtendedBucket
- size += 8 // m.LastUpdateTime
- return size
-}
-func (m *PolicerDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.Name, 64)
- buf.EncodeUint32(m.Cir)
- buf.EncodeUint32(m.Eir)
- buf.EncodeUint64(m.Cb)
- buf.EncodeUint64(m.Eb)
- buf.EncodeUint8(m.RateType)
- buf.EncodeUint8(m.RoundType)
- buf.EncodeUint8(m.Type)
- buf.EncodeUint8(m.ConformActionType)
- buf.EncodeUint8(m.ConformDscp)
- buf.EncodeUint8(m.ExceedActionType)
- buf.EncodeUint8(m.ExceedDscp)
- buf.EncodeUint8(m.ViolateActionType)
- buf.EncodeUint8(m.ViolateDscp)
- buf.EncodeUint8(m.SingleRate)
- buf.EncodeUint8(m.ColorAware)
- buf.EncodeUint32(m.Scale)
- buf.EncodeUint32(m.CirTokensPerPeriod)
- buf.EncodeUint32(m.PirTokensPerPeriod)
- buf.EncodeUint32(m.CurrentLimit)
- buf.EncodeUint32(m.CurrentBucket)
- buf.EncodeUint32(m.ExtendedLimit)
- buf.EncodeUint32(m.ExtendedBucket)
- buf.EncodeUint64(m.LastUpdateTime)
- return buf.Bytes(), nil
-}
-func (m *PolicerDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Name = make([]byte, 64)
- copy(m.Name, buf.DecodeBytes(len(m.Name)))
- m.Cir = buf.DecodeUint32()
- m.Eir = buf.DecodeUint32()
- m.Cb = buf.DecodeUint64()
- m.Eb = buf.DecodeUint64()
- m.RateType = buf.DecodeUint8()
- m.RoundType = buf.DecodeUint8()
- m.Type = buf.DecodeUint8()
- m.ConformActionType = buf.DecodeUint8()
- m.ConformDscp = buf.DecodeUint8()
- m.ExceedActionType = buf.DecodeUint8()
- m.ExceedDscp = buf.DecodeUint8()
- m.ViolateActionType = buf.DecodeUint8()
- m.ViolateDscp = buf.DecodeUint8()
- m.SingleRate = buf.DecodeUint8()
- m.ColorAware = buf.DecodeUint8()
- m.Scale = buf.DecodeUint32()
- m.CirTokensPerPeriod = buf.DecodeUint32()
- m.PirTokensPerPeriod = buf.DecodeUint32()
- m.CurrentLimit = buf.DecodeUint32()
- m.CurrentBucket = buf.DecodeUint32()
- m.ExtendedLimit = buf.DecodeUint32()
- m.ExtendedBucket = buf.DecodeUint32()
- m.LastUpdateTime = buf.DecodeUint64()
- return nil
-}
-
-// PolicerDump defines message 'policer_dump'.
-type PolicerDump struct {
- MatchNameValid uint8 `binapi:"u8,name=match_name_valid" json:"match_name_valid,omitempty"`
- MatchName []byte `binapi:"u8[64],name=match_name" json:"match_name,omitempty"`
-}
-
-func (m *PolicerDump) Reset() { *m = PolicerDump{} }
-func (*PolicerDump) GetMessageName() string { return "policer_dump" }
-func (*PolicerDump) GetCrcString() string { return "8be04d34" }
-func (*PolicerDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *PolicerDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.MatchNameValid
- size += 1 * 64 // m.MatchName
- return size
-}
-func (m *PolicerDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.MatchNameValid)
- buf.EncodeBytes(m.MatchName, 64)
- return buf.Bytes(), nil
-}
-func (m *PolicerDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.MatchNameValid = buf.DecodeUint8()
- m.MatchName = make([]byte, 64)
- copy(m.MatchName, buf.DecodeBytes(len(m.MatchName)))
- return nil
-}
-
-func init() { file_policer_binapi_init() }
-func file_policer_binapi_init() {
- api.RegisterMessage((*PolicerAddDel)(nil), "policer_add_del_dfea2be8")
- api.RegisterMessage((*PolicerAddDelReply)(nil), "policer_add_del_reply_a177cef2")
- api.RegisterMessage((*PolicerDetails)(nil), "policer_details_ff2765f0")
- api.RegisterMessage((*PolicerDump)(nil), "policer_dump_8be04d34")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*PolicerAddDel)(nil),
- (*PolicerAddDelReply)(nil),
- (*PolicerDetails)(nil),
- (*PolicerDump)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/policer/policer_rpc.ba.go b/internal/testbinapi/binapi2001/policer/policer_rpc.ba.go
deleted file mode 100644
index 64422fb..0000000
--- a/internal/testbinapi/binapi2001/policer/policer_rpc.ba.go
+++ /dev/null
@@ -1,78 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package policer
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service policer.
-type RPCService interface {
- PolicerAddDel(ctx context.Context, in *PolicerAddDel) (*PolicerAddDelReply, error)
- PolicerDump(ctx context.Context, in *PolicerDump) (RPCService_PolicerDumpClient, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) PolicerAddDel(ctx context.Context, in *PolicerAddDel) (*PolicerAddDelReply, error) {
- out := new(PolicerAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) PolicerDump(ctx context.Context, in *PolicerDump) (RPCService_PolicerDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_PolicerDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_PolicerDumpClient interface {
- Recv() (*PolicerDetails, error)
- api.Stream
-}
-
-type serviceClient_PolicerDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_PolicerDumpClient) Recv() (*PolicerDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *PolicerDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
diff --git a/internal/testbinapi/binapi2001/pot/pot.ba.go b/internal/testbinapi/binapi2001/pot/pot.ba.go
deleted file mode 100644
index d7fdfa9..0000000
--- a/internal/testbinapi/binapi2001/pot/pot.ba.go
+++ /dev/null
@@ -1,387 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/plugins/pot.api.json
-
-// Package pot contains generated bindings for API file pot.api.
-//
-// Contents:
-// 8 messages
-//
-package pot
-
-import (
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the GoVPP api package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// GoVPP api package needs to be updated.
-const _ = api.GoVppAPIPackageIsVersion2
-
-const (
- APIFile = "pot"
- APIVersion = "1.0.0"
- VersionCrc = 0xa9d8e55c
-)
-
-// PotProfileActivate defines message 'pot_profile_activate'.
-type PotProfileActivate struct {
- ID uint8 `binapi:"u8,name=id" json:"id,omitempty"`
- ListName string `binapi:"string[],name=list_name" json:"list_name,omitempty"`
-}
-
-func (m *PotProfileActivate) Reset() { *m = PotProfileActivate{} }
-func (*PotProfileActivate) GetMessageName() string { return "pot_profile_activate" }
-func (*PotProfileActivate) GetCrcString() string { return "0770af98" }
-func (*PotProfileActivate) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *PotProfileActivate) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.ID
- size += 4 + len(m.ListName) // m.ListName
- return size
-}
-func (m *PotProfileActivate) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.ID)
- buf.EncodeString(m.ListName, 0)
- return buf.Bytes(), nil
-}
-func (m *PotProfileActivate) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.ID = buf.DecodeUint8()
- m.ListName = buf.DecodeString(0)
- return nil
-}
-
-// PotProfileActivateReply defines message 'pot_profile_activate_reply'.
-type PotProfileActivateReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *PotProfileActivateReply) Reset() { *m = PotProfileActivateReply{} }
-func (*PotProfileActivateReply) GetMessageName() string { return "pot_profile_activate_reply" }
-func (*PotProfileActivateReply) GetCrcString() string { return "e8d4e804" }
-func (*PotProfileActivateReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *PotProfileActivateReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *PotProfileActivateReply) 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 *PotProfileActivateReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// PotProfileAdd defines message 'pot_profile_add'.
-type PotProfileAdd struct {
- ID uint8 `binapi:"u8,name=id" json:"id,omitempty"`
- Validator uint8 `binapi:"u8,name=validator" json:"validator,omitempty"`
- SecretKey uint64 `binapi:"u64,name=secret_key" json:"secret_key,omitempty"`
- SecretShare uint64 `binapi:"u64,name=secret_share" json:"secret_share,omitempty"`
- Prime uint64 `binapi:"u64,name=prime" json:"prime,omitempty"`
- MaxBits uint8 `binapi:"u8,name=max_bits" json:"max_bits,omitempty"`
- Lpc uint64 `binapi:"u64,name=lpc" json:"lpc,omitempty"`
- PolynomialPublic uint64 `binapi:"u64,name=polynomial_public" json:"polynomial_public,omitempty"`
- ListName string `binapi:"string[],name=list_name" json:"list_name,omitempty"`
-}
-
-func (m *PotProfileAdd) Reset() { *m = PotProfileAdd{} }
-func (*PotProfileAdd) GetMessageName() string { return "pot_profile_add" }
-func (*PotProfileAdd) GetCrcString() string { return "ad5da3a3" }
-func (*PotProfileAdd) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *PotProfileAdd) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.ID
- size += 1 // m.Validator
- size += 8 // m.SecretKey
- size += 8 // m.SecretShare
- size += 8 // m.Prime
- size += 1 // m.MaxBits
- size += 8 // m.Lpc
- size += 8 // m.PolynomialPublic
- size += 4 + len(m.ListName) // m.ListName
- return size
-}
-func (m *PotProfileAdd) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.ID)
- buf.EncodeUint8(m.Validator)
- buf.EncodeUint64(m.SecretKey)
- buf.EncodeUint64(m.SecretShare)
- buf.EncodeUint64(m.Prime)
- buf.EncodeUint8(m.MaxBits)
- buf.EncodeUint64(m.Lpc)
- buf.EncodeUint64(m.PolynomialPublic)
- buf.EncodeString(m.ListName, 0)
- return buf.Bytes(), nil
-}
-func (m *PotProfileAdd) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.ID = buf.DecodeUint8()
- m.Validator = buf.DecodeUint8()
- m.SecretKey = buf.DecodeUint64()
- m.SecretShare = buf.DecodeUint64()
- m.Prime = buf.DecodeUint64()
- m.MaxBits = buf.DecodeUint8()
- m.Lpc = buf.DecodeUint64()
- m.PolynomialPublic = buf.DecodeUint64()
- m.ListName = buf.DecodeString(0)
- return nil
-}
-
-// PotProfileAddReply defines message 'pot_profile_add_reply'.
-type PotProfileAddReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *PotProfileAddReply) Reset() { *m = PotProfileAddReply{} }
-func (*PotProfileAddReply) GetMessageName() string { return "pot_profile_add_reply" }
-func (*PotProfileAddReply) GetCrcString() string { return "e8d4e804" }
-func (*PotProfileAddReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *PotProfileAddReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *PotProfileAddReply) 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 *PotProfileAddReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// PotProfileDel defines message 'pot_profile_del'.
-type PotProfileDel struct {
- ListName string `binapi:"string[],name=list_name" json:"list_name,omitempty"`
-}
-
-func (m *PotProfileDel) Reset() { *m = PotProfileDel{} }
-func (*PotProfileDel) GetMessageName() string { return "pot_profile_del" }
-func (*PotProfileDel) GetCrcString() string { return "cd63f53b" }
-func (*PotProfileDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *PotProfileDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 + len(m.ListName) // m.ListName
- return size
-}
-func (m *PotProfileDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeString(m.ListName, 0)
- return buf.Bytes(), nil
-}
-func (m *PotProfileDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.ListName = buf.DecodeString(0)
- return nil
-}
-
-// PotProfileDelReply defines message 'pot_profile_del_reply'.
-type PotProfileDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *PotProfileDelReply) Reset() { *m = PotProfileDelReply{} }
-func (*PotProfileDelReply) GetMessageName() string { return "pot_profile_del_reply" }
-func (*PotProfileDelReply) GetCrcString() string { return "e8d4e804" }
-func (*PotProfileDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *PotProfileDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *PotProfileDelReply) 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 *PotProfileDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// PotProfileShowConfigDetails defines message 'pot_profile_show_config_details'.
-type PotProfileShowConfigDetails struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- ID uint8 `binapi:"u8,name=id" json:"id,omitempty"`
- Validator uint8 `binapi:"u8,name=validator" json:"validator,omitempty"`
- SecretKey uint64 `binapi:"u64,name=secret_key" json:"secret_key,omitempty"`
- SecretShare uint64 `binapi:"u64,name=secret_share" json:"secret_share,omitempty"`
- Prime uint64 `binapi:"u64,name=prime" json:"prime,omitempty"`
- BitMask uint64 `binapi:"u64,name=bit_mask" json:"bit_mask,omitempty"`
- Lpc uint64 `binapi:"u64,name=lpc" json:"lpc,omitempty"`
- PolynomialPublic uint64 `binapi:"u64,name=polynomial_public" json:"polynomial_public,omitempty"`
-}
-
-func (m *PotProfileShowConfigDetails) Reset() { *m = PotProfileShowConfigDetails{} }
-func (*PotProfileShowConfigDetails) GetMessageName() string { return "pot_profile_show_config_details" }
-func (*PotProfileShowConfigDetails) GetCrcString() string { return "b7ce0618" }
-func (*PotProfileShowConfigDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *PotProfileShowConfigDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 1 // m.ID
- size += 1 // m.Validator
- size += 8 // m.SecretKey
- size += 8 // m.SecretShare
- size += 8 // m.Prime
- size += 8 // m.BitMask
- size += 8 // m.Lpc
- size += 8 // m.PolynomialPublic
- return size
-}
-func (m *PotProfileShowConfigDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint8(m.ID)
- buf.EncodeUint8(m.Validator)
- buf.EncodeUint64(m.SecretKey)
- buf.EncodeUint64(m.SecretShare)
- buf.EncodeUint64(m.Prime)
- buf.EncodeUint64(m.BitMask)
- buf.EncodeUint64(m.Lpc)
- buf.EncodeUint64(m.PolynomialPublic)
- return buf.Bytes(), nil
-}
-func (m *PotProfileShowConfigDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.ID = buf.DecodeUint8()
- m.Validator = buf.DecodeUint8()
- m.SecretKey = buf.DecodeUint64()
- m.SecretShare = buf.DecodeUint64()
- m.Prime = buf.DecodeUint64()
- m.BitMask = buf.DecodeUint64()
- m.Lpc = buf.DecodeUint64()
- m.PolynomialPublic = buf.DecodeUint64()
- return nil
-}
-
-// PotProfileShowConfigDump defines message 'pot_profile_show_config_dump'.
-type PotProfileShowConfigDump struct {
- ID uint8 `binapi:"u8,name=id" json:"id,omitempty"`
-}
-
-func (m *PotProfileShowConfigDump) Reset() { *m = PotProfileShowConfigDump{} }
-func (*PotProfileShowConfigDump) GetMessageName() string { return "pot_profile_show_config_dump" }
-func (*PotProfileShowConfigDump) GetCrcString() string { return "005b7d59" }
-func (*PotProfileShowConfigDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *PotProfileShowConfigDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.ID
- return size
-}
-func (m *PotProfileShowConfigDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.ID)
- return buf.Bytes(), nil
-}
-func (m *PotProfileShowConfigDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.ID = buf.DecodeUint8()
- return nil
-}
-
-func init() { file_pot_binapi_init() }
-func file_pot_binapi_init() {
- api.RegisterMessage((*PotProfileActivate)(nil), "pot_profile_activate_0770af98")
- api.RegisterMessage((*PotProfileActivateReply)(nil), "pot_profile_activate_reply_e8d4e804")
- api.RegisterMessage((*PotProfileAdd)(nil), "pot_profile_add_ad5da3a3")
- api.RegisterMessage((*PotProfileAddReply)(nil), "pot_profile_add_reply_e8d4e804")
- api.RegisterMessage((*PotProfileDel)(nil), "pot_profile_del_cd63f53b")
- api.RegisterMessage((*PotProfileDelReply)(nil), "pot_profile_del_reply_e8d4e804")
- api.RegisterMessage((*PotProfileShowConfigDetails)(nil), "pot_profile_show_config_details_b7ce0618")
- api.RegisterMessage((*PotProfileShowConfigDump)(nil), "pot_profile_show_config_dump_005b7d59")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*PotProfileActivate)(nil),
- (*PotProfileActivateReply)(nil),
- (*PotProfileAdd)(nil),
- (*PotProfileAddReply)(nil),
- (*PotProfileDel)(nil),
- (*PotProfileDelReply)(nil),
- (*PotProfileShowConfigDetails)(nil),
- (*PotProfileShowConfigDump)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/pot/pot_rpc.ba.go b/internal/testbinapi/binapi2001/pot/pot_rpc.ba.go
deleted file mode 100644
index 83adca6..0000000
--- a/internal/testbinapi/binapi2001/pot/pot_rpc.ba.go
+++ /dev/null
@@ -1,98 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package pot
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service pot.
-type RPCService interface {
- PotProfileActivate(ctx context.Context, in *PotProfileActivate) (*PotProfileActivateReply, error)
- PotProfileAdd(ctx context.Context, in *PotProfileAdd) (*PotProfileAddReply, error)
- PotProfileDel(ctx context.Context, in *PotProfileDel) (*PotProfileDelReply, error)
- PotProfileShowConfigDump(ctx context.Context, in *PotProfileShowConfigDump) (RPCService_PotProfileShowConfigDumpClient, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) PotProfileActivate(ctx context.Context, in *PotProfileActivate) (*PotProfileActivateReply, error) {
- out := new(PotProfileActivateReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) PotProfileAdd(ctx context.Context, in *PotProfileAdd) (*PotProfileAddReply, error) {
- out := new(PotProfileAddReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) PotProfileDel(ctx context.Context, in *PotProfileDel) (*PotProfileDelReply, error) {
- out := new(PotProfileDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) PotProfileShowConfigDump(ctx context.Context, in *PotProfileShowConfigDump) (RPCService_PotProfileShowConfigDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_PotProfileShowConfigDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_PotProfileShowConfigDumpClient interface {
- Recv() (*PotProfileShowConfigDetails, error)
- api.Stream
-}
-
-type serviceClient_PotProfileShowConfigDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_PotProfileShowConfigDumpClient) Recv() (*PotProfileShowConfigDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *PotProfileShowConfigDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
diff --git a/internal/testbinapi/binapi2001/pppoe/pppoe.ba.go b/internal/testbinapi/binapi2001/pppoe/pppoe.ba.go
deleted file mode 100644
index 3c8d027..0000000
--- a/internal/testbinapi/binapi2001/pppoe/pppoe.ba.go
+++ /dev/null
@@ -1,1115 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/plugins/pppoe.api.json
-
-// Package pppoe contains generated bindings for API file pppoe.api.
-//
-// Contents:
-// 7 aliases
-// 10 enums
-// 6 structs
-// 1 union
-// 4 messages
-//
-package pppoe
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "pppoe"
- APIVersion = "2.0.0"
- VersionCrc = 0xb83e4d5f
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// MacAddress defines alias 'mac_address'.
-type MacAddress [6]uint8
-
-func ParseMacAddress(s string) (MacAddress, error) {
- var macaddr MacAddress
- mac, err := net.ParseMAC(s)
- if err != nil {
- return macaddr, err
- }
- copy(macaddr[:], mac[:])
- return macaddr, nil
-}
-
-func (x MacAddress) ToMAC() net.HardwareAddr {
- return net.HardwareAddr(x[:])
-}
-
-func (x MacAddress) String() string {
- return x.ToMAC().String()
-}
-
-func (x *MacAddress) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *MacAddress) UnmarshalText(text []byte) error {
- mac, err := ParseMacAddress(string(text))
- if err != nil {
- return err
- }
- *x = mac
- return nil
-}
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
-
-// PppoeAddDelSession defines message 'pppoe_add_del_session'.
-type PppoeAddDelSession struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- SessionID uint16 `binapi:"u16,name=session_id" json:"session_id,omitempty"`
- ClientIP Address `binapi:"address,name=client_ip" json:"client_ip,omitempty"`
- DecapVrfID uint32 `binapi:"u32,name=decap_vrf_id" json:"decap_vrf_id,omitempty"`
- ClientMac MacAddress `binapi:"mac_address,name=client_mac" json:"client_mac,omitempty"`
-}
-
-func (m *PppoeAddDelSession) Reset() { *m = PppoeAddDelSession{} }
-func (*PppoeAddDelSession) GetMessageName() string { return "pppoe_add_del_session" }
-func (*PppoeAddDelSession) GetCrcString() string { return "46ace853" }
-func (*PppoeAddDelSession) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *PppoeAddDelSession) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 2 // m.SessionID
- size += 4 // m.ClientIP.Af
- size += 1 * 16 // m.ClientIP.Un
- size += 4 // m.DecapVrfID
- size += 1 * 6 // m.ClientMac
- return size
-}
-func (m *PppoeAddDelSession) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeUint16(m.SessionID)
- buf.EncodeUint32(uint32(m.ClientIP.Af))
- buf.EncodeBytes(m.ClientIP.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(m.DecapVrfID)
- buf.EncodeBytes(m.ClientMac[:], 6)
- return buf.Bytes(), nil
-}
-func (m *PppoeAddDelSession) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.SessionID = buf.DecodeUint16()
- m.ClientIP.Af = AddressFamily(buf.DecodeUint32())
- copy(m.ClientIP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.DecapVrfID = buf.DecodeUint32()
- copy(m.ClientMac[:], buf.DecodeBytes(6))
- return nil
-}
-
-// PppoeAddDelSessionReply defines message 'pppoe_add_del_session_reply'.
-type PppoeAddDelSessionReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *PppoeAddDelSessionReply) Reset() { *m = PppoeAddDelSessionReply{} }
-func (*PppoeAddDelSessionReply) GetMessageName() string { return "pppoe_add_del_session_reply" }
-func (*PppoeAddDelSessionReply) GetCrcString() string { return "5383d31f" }
-func (*PppoeAddDelSessionReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *PppoeAddDelSessionReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *PppoeAddDelSessionReply) 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 *PppoeAddDelSessionReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// PppoeSessionDetails defines message 'pppoe_session_details'.
-type PppoeSessionDetails struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- SessionID uint16 `binapi:"u16,name=session_id" json:"session_id,omitempty"`
- ClientIP Address `binapi:"address,name=client_ip" json:"client_ip,omitempty"`
- EncapIfIndex InterfaceIndex `binapi:"interface_index,name=encap_if_index" json:"encap_if_index,omitempty"`
- DecapVrfID uint32 `binapi:"u32,name=decap_vrf_id" json:"decap_vrf_id,omitempty"`
- LocalMac MacAddress `binapi:"mac_address,name=local_mac" json:"local_mac,omitempty"`
- ClientMac MacAddress `binapi:"mac_address,name=client_mac" json:"client_mac,omitempty"`
-}
-
-func (m *PppoeSessionDetails) Reset() { *m = PppoeSessionDetails{} }
-func (*PppoeSessionDetails) GetMessageName() string { return "pppoe_session_details" }
-func (*PppoeSessionDetails) GetCrcString() string { return "332bc742" }
-func (*PppoeSessionDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *PppoeSessionDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 2 // m.SessionID
- size += 4 // m.ClientIP.Af
- size += 1 * 16 // m.ClientIP.Un
- size += 4 // m.EncapIfIndex
- size += 4 // m.DecapVrfID
- size += 1 * 6 // m.LocalMac
- size += 1 * 6 // m.ClientMac
- return size
-}
-func (m *PppoeSessionDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint16(m.SessionID)
- buf.EncodeUint32(uint32(m.ClientIP.Af))
- buf.EncodeBytes(m.ClientIP.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.EncapIfIndex))
- buf.EncodeUint32(m.DecapVrfID)
- buf.EncodeBytes(m.LocalMac[:], 6)
- buf.EncodeBytes(m.ClientMac[:], 6)
- return buf.Bytes(), nil
-}
-func (m *PppoeSessionDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.SessionID = buf.DecodeUint16()
- m.ClientIP.Af = AddressFamily(buf.DecodeUint32())
- copy(m.ClientIP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.EncapIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.DecapVrfID = buf.DecodeUint32()
- copy(m.LocalMac[:], buf.DecodeBytes(6))
- copy(m.ClientMac[:], buf.DecodeBytes(6))
- return nil
-}
-
-// PppoeSessionDump defines message 'pppoe_session_dump'.
-type PppoeSessionDump struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *PppoeSessionDump) Reset() { *m = PppoeSessionDump{} }
-func (*PppoeSessionDump) GetMessageName() string { return "pppoe_session_dump" }
-func (*PppoeSessionDump) GetCrcString() string { return "f9e6675e" }
-func (*PppoeSessionDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *PppoeSessionDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *PppoeSessionDump) 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 *PppoeSessionDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-func init() { file_pppoe_binapi_init() }
-func file_pppoe_binapi_init() {
- api.RegisterMessage((*PppoeAddDelSession)(nil), "pppoe_add_del_session_46ace853")
- api.RegisterMessage((*PppoeAddDelSessionReply)(nil), "pppoe_add_del_session_reply_5383d31f")
- api.RegisterMessage((*PppoeSessionDetails)(nil), "pppoe_session_details_332bc742")
- api.RegisterMessage((*PppoeSessionDump)(nil), "pppoe_session_dump_f9e6675e")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*PppoeAddDelSession)(nil),
- (*PppoeAddDelSessionReply)(nil),
- (*PppoeSessionDetails)(nil),
- (*PppoeSessionDump)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/pppoe/pppoe_rpc.ba.go b/internal/testbinapi/binapi2001/pppoe/pppoe_rpc.ba.go
deleted file mode 100644
index 09d7112..0000000
--- a/internal/testbinapi/binapi2001/pppoe/pppoe_rpc.ba.go
+++ /dev/null
@@ -1,78 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package pppoe
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service pppoe.
-type RPCService interface {
- PppoeAddDelSession(ctx context.Context, in *PppoeAddDelSession) (*PppoeAddDelSessionReply, error)
- PppoeSessionDump(ctx context.Context, in *PppoeSessionDump) (RPCService_PppoeSessionDumpClient, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) PppoeAddDelSession(ctx context.Context, in *PppoeAddDelSession) (*PppoeAddDelSessionReply, error) {
- out := new(PppoeAddDelSessionReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) PppoeSessionDump(ctx context.Context, in *PppoeSessionDump) (RPCService_PppoeSessionDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_PppoeSessionDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_PppoeSessionDumpClient interface {
- Recv() (*PppoeSessionDetails, error)
- api.Stream
-}
-
-type serviceClient_PppoeSessionDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_PppoeSessionDumpClient) Recv() (*PppoeSessionDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *PppoeSessionDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
diff --git a/internal/testbinapi/binapi2001/punt/punt.ba.go b/internal/testbinapi/binapi2001/punt/punt.ba.go
deleted file mode 100644
index e10832f..0000000
--- a/internal/testbinapi/binapi2001/punt/punt.ba.go
+++ /dev/null
@@ -1,1142 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/punt.api.json
-
-// Package punt contains generated bindings for API file punt.api.
-//
-// Contents:
-// 5 aliases
-// 5 enums
-// 11 structs
-// 2 unions
-// 10 messages
-//
-package punt
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "punt"
- APIVersion = "2.2.1"
- VersionCrc = 0x51716f7f
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// PuntType defines enum 'punt_type'.
-type PuntType uint32
-
-const (
- PUNT_API_TYPE_L4 PuntType = 1
- PUNT_API_TYPE_IP_PROTO PuntType = 2
- PUNT_API_TYPE_EXCEPTION PuntType = 3
-)
-
-var (
- PuntType_name = map[uint32]string{
- 1: "PUNT_API_TYPE_L4",
- 2: "PUNT_API_TYPE_IP_PROTO",
- 3: "PUNT_API_TYPE_EXCEPTION",
- }
- PuntType_value = map[string]uint32{
- "PUNT_API_TYPE_L4": 1,
- "PUNT_API_TYPE_IP_PROTO": 2,
- "PUNT_API_TYPE_EXCEPTION": 3,
- }
-)
-
-func (x PuntType) String() string {
- s, ok := PuntType_name[uint32(x)]
- if ok {
- return s
- }
- return "PuntType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// Punt defines type 'punt'.
-type Punt struct {
- Type PuntType `binapi:"punt_type,name=type" json:"type,omitempty"`
- Punt PuntUnion `binapi:"punt_union,name=punt" json:"punt,omitempty"`
-}
-
-// PuntException defines type 'punt_exception'.
-type PuntException struct {
- ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
-}
-
-// PuntIPProto defines type 'punt_ip_proto'.
-type PuntIPProto struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Protocol IPProto `binapi:"ip_proto,name=protocol" json:"protocol,omitempty"`
-}
-
-// PuntL4 defines type 'punt_l4'.
-type PuntL4 struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Protocol IPProto `binapi:"ip_proto,name=protocol" json:"protocol,omitempty"`
- Port uint16 `binapi:"u16,name=port" json:"port,omitempty"`
-}
-
-// PuntReason defines type 'punt_reason'.
-type PuntReason struct {
- ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
- Name string `binapi:"string[],name=name" json:"name,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
-
-// PuntUnion defines union 'punt_union'.
-type PuntUnion struct {
- // PuntUnion can be one of:
- // - Exception *PuntException
- // - L4 *PuntL4
- // - IPProto *PuntIPProto
- XXX_UnionData [10]byte
-}
-
-func PuntUnionException(a PuntException) (u PuntUnion) {
- u.SetException(a)
- return
-}
-func (u *PuntUnion) SetException(a PuntException) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeUint32(a.ID)
-}
-func (u *PuntUnion) GetException() (a PuntException) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- a.ID = buf.DecodeUint32()
- return
-}
-
-func PuntUnionL4(a PuntL4) (u PuntUnion) {
- u.SetL4(a)
- return
-}
-func (u *PuntUnion) SetL4(a PuntL4) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeUint32(uint32(a.Af))
- buf.EncodeUint32(uint32(a.Protocol))
- buf.EncodeUint16(a.Port)
-}
-func (u *PuntUnion) GetL4() (a PuntL4) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- a.Af = AddressFamily(buf.DecodeUint32())
- a.Protocol = IPProto(buf.DecodeUint32())
- a.Port = buf.DecodeUint16()
- return
-}
-
-func PuntUnionIPProto(a PuntIPProto) (u PuntUnion) {
- u.SetIPProto(a)
- return
-}
-func (u *PuntUnion) SetIPProto(a PuntIPProto) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeUint32(uint32(a.Af))
- buf.EncodeUint32(uint32(a.Protocol))
-}
-func (u *PuntUnion) GetIPProto() (a PuntIPProto) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- a.Af = AddressFamily(buf.DecodeUint32())
- a.Protocol = IPProto(buf.DecodeUint32())
- return
-}
-
-// PuntReasonDetails defines message 'punt_reason_details'.
-type PuntReasonDetails struct {
- Reason PuntReason `binapi:"punt_reason,name=reason" json:"reason,omitempty"`
-}
-
-func (m *PuntReasonDetails) Reset() { *m = PuntReasonDetails{} }
-func (*PuntReasonDetails) GetMessageName() string { return "punt_reason_details" }
-func (*PuntReasonDetails) GetCrcString() string { return "2c9d4a40" }
-func (*PuntReasonDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *PuntReasonDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Reason.ID
- size += 4 + len(m.Reason.Name) // m.Reason.Name
- return size
-}
-func (m *PuntReasonDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Reason.ID)
- buf.EncodeString(m.Reason.Name, 0)
- return buf.Bytes(), nil
-}
-func (m *PuntReasonDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Reason.ID = buf.DecodeUint32()
- m.Reason.Name = buf.DecodeString(0)
- return nil
-}
-
-// PuntReasonDump defines message 'punt_reason_dump'.
-type PuntReasonDump struct {
- Reason PuntReason `binapi:"punt_reason,name=reason" json:"reason,omitempty"`
-}
-
-func (m *PuntReasonDump) Reset() { *m = PuntReasonDump{} }
-func (*PuntReasonDump) GetMessageName() string { return "punt_reason_dump" }
-func (*PuntReasonDump) GetCrcString() string { return "5c0dd4fe" }
-func (*PuntReasonDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *PuntReasonDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Reason.ID
- size += 4 + len(m.Reason.Name) // m.Reason.Name
- return size
-}
-func (m *PuntReasonDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Reason.ID)
- buf.EncodeString(m.Reason.Name, 0)
- return buf.Bytes(), nil
-}
-func (m *PuntReasonDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Reason.ID = buf.DecodeUint32()
- m.Reason.Name = buf.DecodeString(0)
- return nil
-}
-
-// PuntSocketDeregister defines message 'punt_socket_deregister'.
-type PuntSocketDeregister struct {
- Punt Punt `binapi:"punt,name=punt" json:"punt,omitempty"`
-}
-
-func (m *PuntSocketDeregister) Reset() { *m = PuntSocketDeregister{} }
-func (*PuntSocketDeregister) GetMessageName() string { return "punt_socket_deregister" }
-func (*PuntSocketDeregister) GetCrcString() string { return "98a444f4" }
-func (*PuntSocketDeregister) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *PuntSocketDeregister) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Punt.Type
- size += 1 * 10 // m.Punt.Punt
- return size
-}
-func (m *PuntSocketDeregister) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.Punt.Type))
- buf.EncodeBytes(m.Punt.Punt.XXX_UnionData[:], 10)
- return buf.Bytes(), nil
-}
-func (m *PuntSocketDeregister) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Punt.Type = PuntType(buf.DecodeUint32())
- copy(m.Punt.Punt.XXX_UnionData[:], buf.DecodeBytes(10))
- return nil
-}
-
-// PuntSocketDeregisterReply defines message 'punt_socket_deregister_reply'.
-type PuntSocketDeregisterReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *PuntSocketDeregisterReply) Reset() { *m = PuntSocketDeregisterReply{} }
-func (*PuntSocketDeregisterReply) GetMessageName() string { return "punt_socket_deregister_reply" }
-func (*PuntSocketDeregisterReply) GetCrcString() string { return "e8d4e804" }
-func (*PuntSocketDeregisterReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *PuntSocketDeregisterReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *PuntSocketDeregisterReply) 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 *PuntSocketDeregisterReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// PuntSocketDetails defines message 'punt_socket_details'.
-type PuntSocketDetails struct {
- Punt Punt `binapi:"punt,name=punt" json:"punt,omitempty"`
- Pathname string `binapi:"string[108],name=pathname" json:"pathname,omitempty"`
-}
-
-func (m *PuntSocketDetails) Reset() { *m = PuntSocketDetails{} }
-func (*PuntSocketDetails) GetMessageName() string { return "punt_socket_details" }
-func (*PuntSocketDetails) GetCrcString() string { return "1de0ce75" }
-func (*PuntSocketDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *PuntSocketDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Punt.Type
- size += 1 * 10 // m.Punt.Punt
- size += 108 // m.Pathname
- return size
-}
-func (m *PuntSocketDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.Punt.Type))
- buf.EncodeBytes(m.Punt.Punt.XXX_UnionData[:], 10)
- buf.EncodeString(m.Pathname, 108)
- return buf.Bytes(), nil
-}
-func (m *PuntSocketDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Punt.Type = PuntType(buf.DecodeUint32())
- copy(m.Punt.Punt.XXX_UnionData[:], buf.DecodeBytes(10))
- m.Pathname = buf.DecodeString(108)
- return nil
-}
-
-// PuntSocketDump defines message 'punt_socket_dump'.
-type PuntSocketDump struct {
- Type PuntType `binapi:"punt_type,name=type" json:"type,omitempty"`
-}
-
-func (m *PuntSocketDump) Reset() { *m = PuntSocketDump{} }
-func (*PuntSocketDump) GetMessageName() string { return "punt_socket_dump" }
-func (*PuntSocketDump) GetCrcString() string { return "52974935" }
-func (*PuntSocketDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *PuntSocketDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Type
- return size
-}
-func (m *PuntSocketDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.Type))
- return buf.Bytes(), nil
-}
-func (m *PuntSocketDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Type = PuntType(buf.DecodeUint32())
- return nil
-}
-
-// PuntSocketRegister defines message 'punt_socket_register'.
-type PuntSocketRegister struct {
- HeaderVersion uint32 `binapi:"u32,name=header_version" json:"header_version,omitempty"`
- Punt Punt `binapi:"punt,name=punt" json:"punt,omitempty"`
- Pathname string `binapi:"string[108],name=pathname" json:"pathname,omitempty"`
-}
-
-func (m *PuntSocketRegister) Reset() { *m = PuntSocketRegister{} }
-func (*PuntSocketRegister) GetMessageName() string { return "punt_socket_register" }
-func (*PuntSocketRegister) GetCrcString() string { return "c8cd10fa" }
-func (*PuntSocketRegister) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *PuntSocketRegister) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.HeaderVersion
- size += 4 // m.Punt.Type
- size += 1 * 10 // m.Punt.Punt
- size += 108 // m.Pathname
- return size
-}
-func (m *PuntSocketRegister) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.HeaderVersion)
- buf.EncodeUint32(uint32(m.Punt.Type))
- buf.EncodeBytes(m.Punt.Punt.XXX_UnionData[:], 10)
- buf.EncodeString(m.Pathname, 108)
- return buf.Bytes(), nil
-}
-func (m *PuntSocketRegister) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.HeaderVersion = buf.DecodeUint32()
- m.Punt.Type = PuntType(buf.DecodeUint32())
- copy(m.Punt.Punt.XXX_UnionData[:], buf.DecodeBytes(10))
- m.Pathname = buf.DecodeString(108)
- return nil
-}
-
-// PuntSocketRegisterReply defines message 'punt_socket_register_reply'.
-type PuntSocketRegisterReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- Pathname string `binapi:"string[108],name=pathname" json:"pathname,omitempty"`
-}
-
-func (m *PuntSocketRegisterReply) Reset() { *m = PuntSocketRegisterReply{} }
-func (*PuntSocketRegisterReply) GetMessageName() string { return "punt_socket_register_reply" }
-func (*PuntSocketRegisterReply) GetCrcString() string { return "bd30ae90" }
-func (*PuntSocketRegisterReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *PuntSocketRegisterReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 108 // m.Pathname
- return size
-}
-func (m *PuntSocketRegisterReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeString(m.Pathname, 108)
- return buf.Bytes(), nil
-}
-func (m *PuntSocketRegisterReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.Pathname = buf.DecodeString(108)
- return nil
-}
-
-// SetPunt defines message 'set_punt'.
-type SetPunt struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- Punt Punt `binapi:"punt,name=punt" json:"punt,omitempty"`
-}
-
-func (m *SetPunt) Reset() { *m = SetPunt{} }
-func (*SetPunt) GetMessageName() string { return "set_punt" }
-func (*SetPunt) GetCrcString() string { return "83799618" }
-func (*SetPunt) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SetPunt) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 4 // m.Punt.Type
- size += 1 * 10 // m.Punt.Punt
- return size
-}
-func (m *SetPunt) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeUint32(uint32(m.Punt.Type))
- buf.EncodeBytes(m.Punt.Punt.XXX_UnionData[:], 10)
- return buf.Bytes(), nil
-}
-func (m *SetPunt) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.Punt.Type = PuntType(buf.DecodeUint32())
- copy(m.Punt.Punt.XXX_UnionData[:], buf.DecodeBytes(10))
- return nil
-}
-
-// SetPuntReply defines message 'set_punt_reply'.
-type SetPuntReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SetPuntReply) Reset() { *m = SetPuntReply{} }
-func (*SetPuntReply) GetMessageName() string { return "set_punt_reply" }
-func (*SetPuntReply) GetCrcString() string { return "e8d4e804" }
-func (*SetPuntReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SetPuntReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SetPuntReply) 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 *SetPuntReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_punt_binapi_init() }
-func file_punt_binapi_init() {
- api.RegisterMessage((*PuntReasonDetails)(nil), "punt_reason_details_2c9d4a40")
- api.RegisterMessage((*PuntReasonDump)(nil), "punt_reason_dump_5c0dd4fe")
- api.RegisterMessage((*PuntSocketDeregister)(nil), "punt_socket_deregister_98a444f4")
- api.RegisterMessage((*PuntSocketDeregisterReply)(nil), "punt_socket_deregister_reply_e8d4e804")
- api.RegisterMessage((*PuntSocketDetails)(nil), "punt_socket_details_1de0ce75")
- api.RegisterMessage((*PuntSocketDump)(nil), "punt_socket_dump_52974935")
- api.RegisterMessage((*PuntSocketRegister)(nil), "punt_socket_register_c8cd10fa")
- api.RegisterMessage((*PuntSocketRegisterReply)(nil), "punt_socket_register_reply_bd30ae90")
- api.RegisterMessage((*SetPunt)(nil), "set_punt_83799618")
- api.RegisterMessage((*SetPuntReply)(nil), "set_punt_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*PuntReasonDetails)(nil),
- (*PuntReasonDump)(nil),
- (*PuntSocketDeregister)(nil),
- (*PuntSocketDeregisterReply)(nil),
- (*PuntSocketDetails)(nil),
- (*PuntSocketDump)(nil),
- (*PuntSocketRegister)(nil),
- (*PuntSocketRegisterReply)(nil),
- (*SetPunt)(nil),
- (*SetPuntReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/punt/punt_rpc.ba.go b/internal/testbinapi/binapi2001/punt/punt_rpc.ba.go
deleted file mode 100644
index 337eeb7..0000000
--- a/internal/testbinapi/binapi2001/punt/punt_rpc.ba.go
+++ /dev/null
@@ -1,142 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package punt
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service punt.
-type RPCService interface {
- PuntReasonDump(ctx context.Context, in *PuntReasonDump) (RPCService_PuntReasonDumpClient, error)
- PuntSocketDeregister(ctx context.Context, in *PuntSocketDeregister) (*PuntSocketDeregisterReply, error)
- PuntSocketDump(ctx context.Context, in *PuntSocketDump) (RPCService_PuntSocketDumpClient, error)
- PuntSocketRegister(ctx context.Context, in *PuntSocketRegister) (*PuntSocketRegisterReply, error)
- SetPunt(ctx context.Context, in *SetPunt) (*SetPuntReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) PuntReasonDump(ctx context.Context, in *PuntReasonDump) (RPCService_PuntReasonDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_PuntReasonDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_PuntReasonDumpClient interface {
- Recv() (*PuntReasonDetails, error)
- api.Stream
-}
-
-type serviceClient_PuntReasonDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_PuntReasonDumpClient) Recv() (*PuntReasonDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *PuntReasonDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) PuntSocketDeregister(ctx context.Context, in *PuntSocketDeregister) (*PuntSocketDeregisterReply, error) {
- out := new(PuntSocketDeregisterReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) PuntSocketDump(ctx context.Context, in *PuntSocketDump) (RPCService_PuntSocketDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_PuntSocketDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_PuntSocketDumpClient interface {
- Recv() (*PuntSocketDetails, error)
- api.Stream
-}
-
-type serviceClient_PuntSocketDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_PuntSocketDumpClient) Recv() (*PuntSocketDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *PuntSocketDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) PuntSocketRegister(ctx context.Context, in *PuntSocketRegister) (*PuntSocketRegisterReply, error) {
- out := new(PuntSocketRegisterReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SetPunt(ctx context.Context, in *SetPunt) (*SetPuntReply, error) {
- out := new(SetPuntReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/qos/qos.ba.go b/internal/testbinapi/binapi2001/qos/qos.ba.go
deleted file mode 100644
index d91fccb..0000000
--- a/internal/testbinapi/binapi2001/qos/qos.ba.go
+++ /dev/null
@@ -1,1664 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/qos.api.json
-
-// Package qos contains generated bindings for API file qos.api.
-//
-// Contents:
-// 6 aliases
-// 11 enums
-// 11 structs
-// 1 union
-// 19 messages
-//
-package qos
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "qos"
- APIVersion = "1.1.1"
- VersionCrc = 0x86291f7f
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// QosSource defines enum 'qos_source'.
-type QosSource uint8
-
-const (
- QOS_API_SOURCE_EXT QosSource = 0
- QOS_API_SOURCE_VLAN QosSource = 1
- QOS_API_SOURCE_MPLS QosSource = 2
- QOS_API_SOURCE_IP QosSource = 3
-)
-
-var (
- QosSource_name = map[uint8]string{
- 0: "QOS_API_SOURCE_EXT",
- 1: "QOS_API_SOURCE_VLAN",
- 2: "QOS_API_SOURCE_MPLS",
- 3: "QOS_API_SOURCE_IP",
- }
- QosSource_value = map[string]uint8{
- "QOS_API_SOURCE_EXT": 0,
- "QOS_API_SOURCE_VLAN": 1,
- "QOS_API_SOURCE_MPLS": 2,
- "QOS_API_SOURCE_IP": 3,
- }
-)
-
-func (x QosSource) String() string {
- s, ok := QosSource_name[uint8(x)]
- if ok {
- return s
- }
- return "QosSource(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// QosEgressMap defines type 'qos_egress_map'.
-type QosEgressMap struct {
- ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
- Rows [4]QosEgressMapRow `binapi:"qos_egress_map_row[4],name=rows" json:"rows,omitempty"`
-}
-
-// QosEgressMapRow defines type 'qos_egress_map_row'.
-type QosEgressMapRow struct {
- Outputs []byte `binapi:"u8[256],name=outputs" json:"outputs,omitempty"`
-}
-
-// QosMark defines type 'qos_mark'.
-type QosMark struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- MapID uint32 `binapi:"u32,name=map_id" json:"map_id,omitempty"`
- OutputSource QosSource `binapi:"qos_source,name=output_source" json:"output_source,omitempty"`
-}
-
-// QosRecord defines type 'qos_record'.
-type QosRecord struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- InputSource QosSource `binapi:"qos_source,name=input_source" json:"input_source,omitempty"`
-}
-
-// QosStore defines type 'qos_store'.
-type QosStore struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- InputSource QosSource `binapi:"qos_source,name=input_source" json:"input_source,omitempty"`
- Value uint8 `binapi:"u8,name=value" json:"value,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
-
-// QosEgressMapDelete defines message 'qos_egress_map_delete'.
-type QosEgressMapDelete struct {
- ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
-}
-
-func (m *QosEgressMapDelete) Reset() { *m = QosEgressMapDelete{} }
-func (*QosEgressMapDelete) GetMessageName() string { return "qos_egress_map_delete" }
-func (*QosEgressMapDelete) GetCrcString() string { return "3a91bde5" }
-func (*QosEgressMapDelete) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *QosEgressMapDelete) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.ID
- return size
-}
-func (m *QosEgressMapDelete) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.ID)
- return buf.Bytes(), nil
-}
-func (m *QosEgressMapDelete) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.ID = buf.DecodeUint32()
- return nil
-}
-
-// QosEgressMapDeleteReply defines message 'qos_egress_map_delete_reply'.
-type QosEgressMapDeleteReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *QosEgressMapDeleteReply) Reset() { *m = QosEgressMapDeleteReply{} }
-func (*QosEgressMapDeleteReply) GetMessageName() string { return "qos_egress_map_delete_reply" }
-func (*QosEgressMapDeleteReply) GetCrcString() string { return "e8d4e804" }
-func (*QosEgressMapDeleteReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *QosEgressMapDeleteReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *QosEgressMapDeleteReply) 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 *QosEgressMapDeleteReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// QosEgressMapDetails defines message 'qos_egress_map_details'.
-type QosEgressMapDetails struct {
- Map QosEgressMap `binapi:"qos_egress_map,name=map" json:"map,omitempty"`
-}
-
-func (m *QosEgressMapDetails) Reset() { *m = QosEgressMapDetails{} }
-func (*QosEgressMapDetails) GetMessageName() string { return "qos_egress_map_details" }
-func (*QosEgressMapDetails) GetCrcString() string { return "46c5653c" }
-func (*QosEgressMapDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *QosEgressMapDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Map.ID
- for j2 := 0; j2 < 4; j2++ {
- size += 1 * 256 // m.Map.Rows[j2].Outputs
- }
- return size
-}
-func (m *QosEgressMapDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Map.ID)
- for j1 := 0; j1 < 4; j1++ {
- buf.EncodeBytes(m.Map.Rows[j1].Outputs, 256)
- }
- return buf.Bytes(), nil
-}
-func (m *QosEgressMapDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Map.ID = buf.DecodeUint32()
- for j1 := 0; j1 < 4; j1++ {
- m.Map.Rows[j1].Outputs = make([]byte, 256)
- copy(m.Map.Rows[j1].Outputs, buf.DecodeBytes(len(m.Map.Rows[j1].Outputs)))
- }
- return nil
-}
-
-// QosEgressMapDump defines message 'qos_egress_map_dump'.
-type QosEgressMapDump struct{}
-
-func (m *QosEgressMapDump) Reset() { *m = QosEgressMapDump{} }
-func (*QosEgressMapDump) GetMessageName() string { return "qos_egress_map_dump" }
-func (*QosEgressMapDump) GetCrcString() string { return "51077d14" }
-func (*QosEgressMapDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *QosEgressMapDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *QosEgressMapDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *QosEgressMapDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// QosEgressMapUpdate defines message 'qos_egress_map_update'.
-type QosEgressMapUpdate struct {
- Map QosEgressMap `binapi:"qos_egress_map,name=map" json:"map,omitempty"`
-}
-
-func (m *QosEgressMapUpdate) Reset() { *m = QosEgressMapUpdate{} }
-func (*QosEgressMapUpdate) GetMessageName() string { return "qos_egress_map_update" }
-func (*QosEgressMapUpdate) GetCrcString() string { return "6d1c065f" }
-func (*QosEgressMapUpdate) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *QosEgressMapUpdate) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Map.ID
- for j2 := 0; j2 < 4; j2++ {
- size += 1 * 256 // m.Map.Rows[j2].Outputs
- }
- return size
-}
-func (m *QosEgressMapUpdate) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Map.ID)
- for j1 := 0; j1 < 4; j1++ {
- buf.EncodeBytes(m.Map.Rows[j1].Outputs, 256)
- }
- return buf.Bytes(), nil
-}
-func (m *QosEgressMapUpdate) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Map.ID = buf.DecodeUint32()
- for j1 := 0; j1 < 4; j1++ {
- m.Map.Rows[j1].Outputs = make([]byte, 256)
- copy(m.Map.Rows[j1].Outputs, buf.DecodeBytes(len(m.Map.Rows[j1].Outputs)))
- }
- return nil
-}
-
-// QosEgressMapUpdateReply defines message 'qos_egress_map_update_reply'.
-type QosEgressMapUpdateReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *QosEgressMapUpdateReply) Reset() { *m = QosEgressMapUpdateReply{} }
-func (*QosEgressMapUpdateReply) GetMessageName() string { return "qos_egress_map_update_reply" }
-func (*QosEgressMapUpdateReply) GetCrcString() string { return "e8d4e804" }
-func (*QosEgressMapUpdateReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *QosEgressMapUpdateReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *QosEgressMapUpdateReply) 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 *QosEgressMapUpdateReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// QosMarkDetails defines message 'qos_mark_details'.
-type QosMarkDetails struct {
- Mark QosMark `binapi:"qos_mark,name=mark" json:"mark,omitempty"`
-}
-
-func (m *QosMarkDetails) Reset() { *m = QosMarkDetails{} }
-func (*QosMarkDetails) GetMessageName() string { return "qos_mark_details" }
-func (*QosMarkDetails) GetCrcString() string { return "89fe81a9" }
-func (*QosMarkDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *QosMarkDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Mark.SwIfIndex
- size += 4 // m.Mark.MapID
- size += 1 // m.Mark.OutputSource
- return size
-}
-func (m *QosMarkDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Mark.SwIfIndex)
- buf.EncodeUint32(m.Mark.MapID)
- buf.EncodeUint8(uint8(m.Mark.OutputSource))
- return buf.Bytes(), nil
-}
-func (m *QosMarkDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Mark.SwIfIndex = buf.DecodeUint32()
- m.Mark.MapID = buf.DecodeUint32()
- m.Mark.OutputSource = QosSource(buf.DecodeUint8())
- return nil
-}
-
-// QosMarkDetailsReply defines message 'qos_mark_details_reply'.
-type QosMarkDetailsReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *QosMarkDetailsReply) Reset() { *m = QosMarkDetailsReply{} }
-func (*QosMarkDetailsReply) GetMessageName() string { return "qos_mark_details_reply" }
-func (*QosMarkDetailsReply) GetCrcString() string { return "e8d4e804" }
-func (*QosMarkDetailsReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *QosMarkDetailsReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *QosMarkDetailsReply) 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 *QosMarkDetailsReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// QosMarkDump defines message 'qos_mark_dump'.
-type QosMarkDump struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *QosMarkDump) Reset() { *m = QosMarkDump{} }
-func (*QosMarkDump) GetMessageName() string { return "qos_mark_dump" }
-func (*QosMarkDump) GetCrcString() string { return "f9e6675e" }
-func (*QosMarkDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *QosMarkDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *QosMarkDump) 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 *QosMarkDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// QosMarkEnableDisable defines message 'qos_mark_enable_disable'.
-type QosMarkEnableDisable struct {
- Enable bool `binapi:"bool,name=enable,default=true" json:"enable,omitempty"`
- Mark QosMark `binapi:"qos_mark,name=mark" json:"mark,omitempty"`
-}
-
-func (m *QosMarkEnableDisable) Reset() { *m = QosMarkEnableDisable{} }
-func (*QosMarkEnableDisable) GetMessageName() string { return "qos_mark_enable_disable" }
-func (*QosMarkEnableDisable) GetCrcString() string { return "1a010f74" }
-func (*QosMarkEnableDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *QosMarkEnableDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.Enable
- size += 4 // m.Mark.SwIfIndex
- size += 4 // m.Mark.MapID
- size += 1 // m.Mark.OutputSource
- return size
-}
-func (m *QosMarkEnableDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.Enable)
- buf.EncodeUint32(m.Mark.SwIfIndex)
- buf.EncodeUint32(m.Mark.MapID)
- buf.EncodeUint8(uint8(m.Mark.OutputSource))
- return buf.Bytes(), nil
-}
-func (m *QosMarkEnableDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Enable = buf.DecodeBool()
- m.Mark.SwIfIndex = buf.DecodeUint32()
- m.Mark.MapID = buf.DecodeUint32()
- m.Mark.OutputSource = QosSource(buf.DecodeUint8())
- return nil
-}
-
-// QosMarkEnableDisableReply defines message 'qos_mark_enable_disable_reply'.
-type QosMarkEnableDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *QosMarkEnableDisableReply) Reset() { *m = QosMarkEnableDisableReply{} }
-func (*QosMarkEnableDisableReply) GetMessageName() string { return "qos_mark_enable_disable_reply" }
-func (*QosMarkEnableDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*QosMarkEnableDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *QosMarkEnableDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *QosMarkEnableDisableReply) 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 *QosMarkEnableDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// QosRecordDetails defines message 'qos_record_details'.
-type QosRecordDetails struct {
- Record QosRecord `binapi:"qos_record,name=record" json:"record,omitempty"`
-}
-
-func (m *QosRecordDetails) Reset() { *m = QosRecordDetails{} }
-func (*QosRecordDetails) GetMessageName() string { return "qos_record_details" }
-func (*QosRecordDetails) GetCrcString() string { return "4956ccdd" }
-func (*QosRecordDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *QosRecordDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Record.SwIfIndex
- size += 1 // m.Record.InputSource
- return size
-}
-func (m *QosRecordDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.Record.SwIfIndex))
- buf.EncodeUint8(uint8(m.Record.InputSource))
- return buf.Bytes(), nil
-}
-func (m *QosRecordDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Record.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Record.InputSource = QosSource(buf.DecodeUint8())
- return nil
-}
-
-// QosRecordDump defines message 'qos_record_dump'.
-type QosRecordDump struct{}
-
-func (m *QosRecordDump) Reset() { *m = QosRecordDump{} }
-func (*QosRecordDump) GetMessageName() string { return "qos_record_dump" }
-func (*QosRecordDump) GetCrcString() string { return "51077d14" }
-func (*QosRecordDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *QosRecordDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *QosRecordDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *QosRecordDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// QosRecordEnableDisable defines message 'qos_record_enable_disable'.
-type QosRecordEnableDisable struct {
- Enable bool `binapi:"bool,name=enable,default=true" json:"enable,omitempty"`
- Record QosRecord `binapi:"qos_record,name=record" json:"record,omitempty"`
-}
-
-func (m *QosRecordEnableDisable) Reset() { *m = QosRecordEnableDisable{} }
-func (*QosRecordEnableDisable) GetMessageName() string { return "qos_record_enable_disable" }
-func (*QosRecordEnableDisable) GetCrcString() string { return "25b33f88" }
-func (*QosRecordEnableDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *QosRecordEnableDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.Enable
- size += 4 // m.Record.SwIfIndex
- size += 1 // m.Record.InputSource
- return size
-}
-func (m *QosRecordEnableDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.Enable)
- buf.EncodeUint32(uint32(m.Record.SwIfIndex))
- buf.EncodeUint8(uint8(m.Record.InputSource))
- return buf.Bytes(), nil
-}
-func (m *QosRecordEnableDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Enable = buf.DecodeBool()
- m.Record.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Record.InputSource = QosSource(buf.DecodeUint8())
- return nil
-}
-
-// QosRecordEnableDisableReply defines message 'qos_record_enable_disable_reply'.
-type QosRecordEnableDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *QosRecordEnableDisableReply) Reset() { *m = QosRecordEnableDisableReply{} }
-func (*QosRecordEnableDisableReply) GetMessageName() string { return "qos_record_enable_disable_reply" }
-func (*QosRecordEnableDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*QosRecordEnableDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *QosRecordEnableDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *QosRecordEnableDisableReply) 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 *QosRecordEnableDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// QosStoreDetails defines message 'qos_store_details'.
-type QosStoreDetails struct {
- Store QosStore `binapi:"qos_store,name=store" json:"store,omitempty"`
-}
-
-func (m *QosStoreDetails) Reset() { *m = QosStoreDetails{} }
-func (*QosStoreDetails) GetMessageName() string { return "qos_store_details" }
-func (*QosStoreDetails) GetCrcString() string { return "038a6d48" }
-func (*QosStoreDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *QosStoreDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Store.SwIfIndex
- size += 1 // m.Store.InputSource
- size += 1 // m.Store.Value
- return size
-}
-func (m *QosStoreDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.Store.SwIfIndex))
- buf.EncodeUint8(uint8(m.Store.InputSource))
- buf.EncodeUint8(m.Store.Value)
- return buf.Bytes(), nil
-}
-func (m *QosStoreDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Store.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Store.InputSource = QosSource(buf.DecodeUint8())
- m.Store.Value = buf.DecodeUint8()
- return nil
-}
-
-// QosStoreDump defines message 'qos_store_dump'.
-type QosStoreDump struct{}
-
-func (m *QosStoreDump) Reset() { *m = QosStoreDump{} }
-func (*QosStoreDump) GetMessageName() string { return "qos_store_dump" }
-func (*QosStoreDump) GetCrcString() string { return "51077d14" }
-func (*QosStoreDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *QosStoreDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *QosStoreDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *QosStoreDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// QosStoreEnableDisable defines message 'qos_store_enable_disable'.
-type QosStoreEnableDisable struct {
- Enable bool `binapi:"bool,name=enable,default=true" json:"enable,omitempty"`
- Store QosStore `binapi:"qos_store,name=store" json:"store,omitempty"`
-}
-
-func (m *QosStoreEnableDisable) Reset() { *m = QosStoreEnableDisable{} }
-func (*QosStoreEnableDisable) GetMessageName() string { return "qos_store_enable_disable" }
-func (*QosStoreEnableDisable) GetCrcString() string { return "3507235e" }
-func (*QosStoreEnableDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *QosStoreEnableDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.Enable
- size += 4 // m.Store.SwIfIndex
- size += 1 // m.Store.InputSource
- size += 1 // m.Store.Value
- return size
-}
-func (m *QosStoreEnableDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.Enable)
- buf.EncodeUint32(uint32(m.Store.SwIfIndex))
- buf.EncodeUint8(uint8(m.Store.InputSource))
- buf.EncodeUint8(m.Store.Value)
- return buf.Bytes(), nil
-}
-func (m *QosStoreEnableDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Enable = buf.DecodeBool()
- m.Store.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Store.InputSource = QosSource(buf.DecodeUint8())
- m.Store.Value = buf.DecodeUint8()
- return nil
-}
-
-// QosStoreEnableDisableReply defines message 'qos_store_enable_disable_reply'.
-type QosStoreEnableDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *QosStoreEnableDisableReply) Reset() { *m = QosStoreEnableDisableReply{} }
-func (*QosStoreEnableDisableReply) GetMessageName() string { return "qos_store_enable_disable_reply" }
-func (*QosStoreEnableDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*QosStoreEnableDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *QosStoreEnableDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *QosStoreEnableDisableReply) 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 *QosStoreEnableDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_qos_binapi_init() }
-func file_qos_binapi_init() {
- api.RegisterMessage((*QosEgressMapDelete)(nil), "qos_egress_map_delete_3a91bde5")
- api.RegisterMessage((*QosEgressMapDeleteReply)(nil), "qos_egress_map_delete_reply_e8d4e804")
- api.RegisterMessage((*QosEgressMapDetails)(nil), "qos_egress_map_details_46c5653c")
- api.RegisterMessage((*QosEgressMapDump)(nil), "qos_egress_map_dump_51077d14")
- api.RegisterMessage((*QosEgressMapUpdate)(nil), "qos_egress_map_update_6d1c065f")
- api.RegisterMessage((*QosEgressMapUpdateReply)(nil), "qos_egress_map_update_reply_e8d4e804")
- api.RegisterMessage((*QosMarkDetails)(nil), "qos_mark_details_89fe81a9")
- api.RegisterMessage((*QosMarkDetailsReply)(nil), "qos_mark_details_reply_e8d4e804")
- api.RegisterMessage((*QosMarkDump)(nil), "qos_mark_dump_f9e6675e")
- api.RegisterMessage((*QosMarkEnableDisable)(nil), "qos_mark_enable_disable_1a010f74")
- api.RegisterMessage((*QosMarkEnableDisableReply)(nil), "qos_mark_enable_disable_reply_e8d4e804")
- api.RegisterMessage((*QosRecordDetails)(nil), "qos_record_details_4956ccdd")
- api.RegisterMessage((*QosRecordDump)(nil), "qos_record_dump_51077d14")
- api.RegisterMessage((*QosRecordEnableDisable)(nil), "qos_record_enable_disable_25b33f88")
- api.RegisterMessage((*QosRecordEnableDisableReply)(nil), "qos_record_enable_disable_reply_e8d4e804")
- api.RegisterMessage((*QosStoreDetails)(nil), "qos_store_details_038a6d48")
- api.RegisterMessage((*QosStoreDump)(nil), "qos_store_dump_51077d14")
- api.RegisterMessage((*QosStoreEnableDisable)(nil), "qos_store_enable_disable_3507235e")
- api.RegisterMessage((*QosStoreEnableDisableReply)(nil), "qos_store_enable_disable_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*QosEgressMapDelete)(nil),
- (*QosEgressMapDeleteReply)(nil),
- (*QosEgressMapDetails)(nil),
- (*QosEgressMapDump)(nil),
- (*QosEgressMapUpdate)(nil),
- (*QosEgressMapUpdateReply)(nil),
- (*QosMarkDetails)(nil),
- (*QosMarkDetailsReply)(nil),
- (*QosMarkDump)(nil),
- (*QosMarkEnableDisable)(nil),
- (*QosMarkEnableDisableReply)(nil),
- (*QosRecordDetails)(nil),
- (*QosRecordDump)(nil),
- (*QosRecordEnableDisable)(nil),
- (*QosRecordEnableDisableReply)(nil),
- (*QosStoreDetails)(nil),
- (*QosStoreDump)(nil),
- (*QosStoreEnableDisable)(nil),
- (*QosStoreEnableDisableReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/qos/qos_rpc.ba.go b/internal/testbinapi/binapi2001/qos/qos_rpc.ba.go
deleted file mode 100644
index 2334c62..0000000
--- a/internal/testbinapi/binapi2001/qos/qos_rpc.ba.go
+++ /dev/null
@@ -1,250 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package qos
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service qos.
-type RPCService interface {
- QosEgressMapDelete(ctx context.Context, in *QosEgressMapDelete) (*QosEgressMapDeleteReply, error)
- QosEgressMapDump(ctx context.Context, in *QosEgressMapDump) (RPCService_QosEgressMapDumpClient, error)
- QosEgressMapUpdate(ctx context.Context, in *QosEgressMapUpdate) (*QosEgressMapUpdateReply, error)
- QosMarkDump(ctx context.Context, in *QosMarkDump) (RPCService_QosMarkDumpClient, error)
- QosMarkEnableDisable(ctx context.Context, in *QosMarkEnableDisable) (*QosMarkEnableDisableReply, error)
- QosRecordDump(ctx context.Context, in *QosRecordDump) (RPCService_QosRecordDumpClient, error)
- QosRecordEnableDisable(ctx context.Context, in *QosRecordEnableDisable) (*QosRecordEnableDisableReply, error)
- QosStoreDump(ctx context.Context, in *QosStoreDump) (RPCService_QosStoreDumpClient, error)
- QosStoreEnableDisable(ctx context.Context, in *QosStoreEnableDisable) (*QosStoreEnableDisableReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) QosEgressMapDelete(ctx context.Context, in *QosEgressMapDelete) (*QosEgressMapDeleteReply, error) {
- out := new(QosEgressMapDeleteReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) QosEgressMapDump(ctx context.Context, in *QosEgressMapDump) (RPCService_QosEgressMapDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_QosEgressMapDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_QosEgressMapDumpClient interface {
- Recv() (*QosEgressMapDetails, error)
- api.Stream
-}
-
-type serviceClient_QosEgressMapDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_QosEgressMapDumpClient) Recv() (*QosEgressMapDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *QosEgressMapDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) QosEgressMapUpdate(ctx context.Context, in *QosEgressMapUpdate) (*QosEgressMapUpdateReply, error) {
- out := new(QosEgressMapUpdateReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) QosMarkDump(ctx context.Context, in *QosMarkDump) (RPCService_QosMarkDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_QosMarkDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_QosMarkDumpClient interface {
- Recv() (*QosMarkDetails, error)
- api.Stream
-}
-
-type serviceClient_QosMarkDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_QosMarkDumpClient) Recv() (*QosMarkDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *QosMarkDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) QosMarkEnableDisable(ctx context.Context, in *QosMarkEnableDisable) (*QosMarkEnableDisableReply, error) {
- out := new(QosMarkEnableDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) QosRecordDump(ctx context.Context, in *QosRecordDump) (RPCService_QosRecordDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_QosRecordDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_QosRecordDumpClient interface {
- Recv() (*QosRecordDetails, error)
- api.Stream
-}
-
-type serviceClient_QosRecordDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_QosRecordDumpClient) Recv() (*QosRecordDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *QosRecordDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) QosRecordEnableDisable(ctx context.Context, in *QosRecordEnableDisable) (*QosRecordEnableDisableReply, error) {
- out := new(QosRecordEnableDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) QosStoreDump(ctx context.Context, in *QosStoreDump) (RPCService_QosStoreDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_QosStoreDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_QosStoreDumpClient interface {
- Recv() (*QosStoreDetails, error)
- api.Stream
-}
-
-type serviceClient_QosStoreDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_QosStoreDumpClient) Recv() (*QosStoreDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *QosStoreDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) QosStoreEnableDisable(ctx context.Context, in *QosStoreEnableDisable) (*QosStoreEnableDisableReply, error) {
- out := new(QosStoreEnableDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/rd_cp/rd_cp.ba.go b/internal/testbinapi/binapi2001/rd_cp/rd_cp.ba.go
deleted file mode 100644
index 92fa94c..0000000
--- a/internal/testbinapi/binapi2001/rd_cp/rd_cp.ba.go
+++ /dev/null
@@ -1,375 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/rd_cp.api.json
-
-// Package rd_cp contains generated bindings for API file rd_cp.api.
-//
-// Contents:
-// 1 alias
-// 6 enums
-// 2 messages
-//
-package rd_cp
-
-import (
- "strconv"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "rd_cp"
- APIVersion = "1.0.1"
- VersionCrc = 0x5269dfb9
-)
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// IP6NdAddressAutoconfig defines message 'ip6_nd_address_autoconfig'.
-type IP6NdAddressAutoconfig struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
- InstallDefaultRoutes bool `binapi:"bool,name=install_default_routes" json:"install_default_routes,omitempty"`
-}
-
-func (m *IP6NdAddressAutoconfig) Reset() { *m = IP6NdAddressAutoconfig{} }
-func (*IP6NdAddressAutoconfig) GetMessageName() string { return "ip6_nd_address_autoconfig" }
-func (*IP6NdAddressAutoconfig) GetCrcString() string { return "9e14a4a7" }
-func (*IP6NdAddressAutoconfig) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *IP6NdAddressAutoconfig) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.Enable
- size += 1 // m.InstallDefaultRoutes
- return size
-}
-func (m *IP6NdAddressAutoconfig) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeBool(m.Enable)
- buf.EncodeBool(m.InstallDefaultRoutes)
- return buf.Bytes(), nil
-}
-func (m *IP6NdAddressAutoconfig) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Enable = buf.DecodeBool()
- m.InstallDefaultRoutes = buf.DecodeBool()
- return nil
-}
-
-// IP6NdAddressAutoconfigReply defines message 'ip6_nd_address_autoconfig_reply'.
-type IP6NdAddressAutoconfigReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *IP6NdAddressAutoconfigReply) Reset() { *m = IP6NdAddressAutoconfigReply{} }
-func (*IP6NdAddressAutoconfigReply) GetMessageName() string { return "ip6_nd_address_autoconfig_reply" }
-func (*IP6NdAddressAutoconfigReply) GetCrcString() string { return "e8d4e804" }
-func (*IP6NdAddressAutoconfigReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *IP6NdAddressAutoconfigReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *IP6NdAddressAutoconfigReply) 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 *IP6NdAddressAutoconfigReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_rd_cp_binapi_init() }
-func file_rd_cp_binapi_init() {
- api.RegisterMessage((*IP6NdAddressAutoconfig)(nil), "ip6_nd_address_autoconfig_9e14a4a7")
- api.RegisterMessage((*IP6NdAddressAutoconfigReply)(nil), "ip6_nd_address_autoconfig_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*IP6NdAddressAutoconfig)(nil),
- (*IP6NdAddressAutoconfigReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/rd_cp/rd_cp_rpc.ba.go b/internal/testbinapi/binapi2001/rd_cp/rd_cp_rpc.ba.go
deleted file mode 100644
index 56b2c18..0000000
--- a/internal/testbinapi/binapi2001/rd_cp/rd_cp_rpc.ba.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package rd_cp
-
-import (
- "context"
-
- api "git.fd.io/govpp.git/api"
-)
-
-// RPCService defines RPC service rd_cp.
-type RPCService interface {
- IP6NdAddressAutoconfig(ctx context.Context, in *IP6NdAddressAutoconfig) (*IP6NdAddressAutoconfigReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) IP6NdAddressAutoconfig(ctx context.Context, in *IP6NdAddressAutoconfig) (*IP6NdAddressAutoconfigReply, error) {
- out := new(IP6NdAddressAutoconfigReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/rdma/rdma.ba.go b/internal/testbinapi/binapi2001/rdma/rdma.ba.go
deleted file mode 100644
index 79c738a..0000000
--- a/internal/testbinapi/binapi2001/rdma/rdma.ba.go
+++ /dev/null
@@ -1,491 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/plugins/rdma.api.json
-
-// Package rdma contains generated bindings for API file rdma.api.
-//
-// Contents:
-// 1 alias
-// 7 enums
-// 4 messages
-//
-package rdma
-
-import (
- "strconv"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "rdma"
- APIVersion = "1.0.0"
- VersionCrc = 0x5ce233e0
-)
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RdmaMode defines enum 'rdma_mode'.
-type RdmaMode uint32
-
-const (
- RDMA_API_MODE_AUTO RdmaMode = 0
- RDMA_API_MODE_IBV RdmaMode = 1
- RDMA_API_MODE_DV RdmaMode = 2
-)
-
-var (
- RdmaMode_name = map[uint32]string{
- 0: "RDMA_API_MODE_AUTO",
- 1: "RDMA_API_MODE_IBV",
- 2: "RDMA_API_MODE_DV",
- }
- RdmaMode_value = map[string]uint32{
- "RDMA_API_MODE_AUTO": 0,
- "RDMA_API_MODE_IBV": 1,
- "RDMA_API_MODE_DV": 2,
- }
-)
-
-func (x RdmaMode) String() string {
- s, ok := RdmaMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RdmaMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// RdmaCreate defines message 'rdma_create'.
-type RdmaCreate struct {
- HostIf string `binapi:"string[64],name=host_if" json:"host_if,omitempty"`
- Name string `binapi:"string[64],name=name" json:"name,omitempty"`
- RxqNum uint16 `binapi:"u16,name=rxq_num,default=1" json:"rxq_num,omitempty"`
- RxqSize uint16 `binapi:"u16,name=rxq_size,default=1024" json:"rxq_size,omitempty"`
- TxqSize uint16 `binapi:"u16,name=txq_size,default=1024" json:"txq_size,omitempty"`
- Mode RdmaMode `binapi:"rdma_mode,name=mode,default=0" json:"mode,omitempty"`
-}
-
-func (m *RdmaCreate) Reset() { *m = RdmaCreate{} }
-func (*RdmaCreate) GetMessageName() string { return "rdma_create" }
-func (*RdmaCreate) GetCrcString() string { return "076fe418" }
-func (*RdmaCreate) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *RdmaCreate) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 64 // m.HostIf
- size += 64 // m.Name
- size += 2 // m.RxqNum
- size += 2 // m.RxqSize
- size += 2 // m.TxqSize
- size += 4 // m.Mode
- return size
-}
-func (m *RdmaCreate) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeString(m.HostIf, 64)
- buf.EncodeString(m.Name, 64)
- buf.EncodeUint16(m.RxqNum)
- buf.EncodeUint16(m.RxqSize)
- buf.EncodeUint16(m.TxqSize)
- buf.EncodeUint32(uint32(m.Mode))
- return buf.Bytes(), nil
-}
-func (m *RdmaCreate) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.HostIf = buf.DecodeString(64)
- m.Name = buf.DecodeString(64)
- m.RxqNum = buf.DecodeUint16()
- m.RxqSize = buf.DecodeUint16()
- m.TxqSize = buf.DecodeUint16()
- m.Mode = RdmaMode(buf.DecodeUint32())
- return nil
-}
-
-// RdmaCreateReply defines message 'rdma_create_reply'.
-type RdmaCreateReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *RdmaCreateReply) Reset() { *m = RdmaCreateReply{} }
-func (*RdmaCreateReply) GetMessageName() string { return "rdma_create_reply" }
-func (*RdmaCreateReply) GetCrcString() string { return "5383d31f" }
-func (*RdmaCreateReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *RdmaCreateReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *RdmaCreateReply) 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 *RdmaCreateReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// RdmaDelete defines message 'rdma_delete'.
-type RdmaDelete struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *RdmaDelete) Reset() { *m = RdmaDelete{} }
-func (*RdmaDelete) GetMessageName() string { return "rdma_delete" }
-func (*RdmaDelete) GetCrcString() string { return "f9e6675e" }
-func (*RdmaDelete) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *RdmaDelete) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *RdmaDelete) 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 *RdmaDelete) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// RdmaDeleteReply defines message 'rdma_delete_reply'.
-type RdmaDeleteReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *RdmaDeleteReply) Reset() { *m = RdmaDeleteReply{} }
-func (*RdmaDeleteReply) GetMessageName() string { return "rdma_delete_reply" }
-func (*RdmaDeleteReply) GetCrcString() string { return "e8d4e804" }
-func (*RdmaDeleteReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *RdmaDeleteReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *RdmaDeleteReply) 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 *RdmaDeleteReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_rdma_binapi_init() }
-func file_rdma_binapi_init() {
- api.RegisterMessage((*RdmaCreate)(nil), "rdma_create_076fe418")
- api.RegisterMessage((*RdmaCreateReply)(nil), "rdma_create_reply_5383d31f")
- api.RegisterMessage((*RdmaDelete)(nil), "rdma_delete_f9e6675e")
- api.RegisterMessage((*RdmaDeleteReply)(nil), "rdma_delete_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*RdmaCreate)(nil),
- (*RdmaCreateReply)(nil),
- (*RdmaDelete)(nil),
- (*RdmaDeleteReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/rdma/rdma_rpc.ba.go b/internal/testbinapi/binapi2001/rdma/rdma_rpc.ba.go
deleted file mode 100644
index 489297d..0000000
--- a/internal/testbinapi/binapi2001/rdma/rdma_rpc.ba.go
+++ /dev/null
@@ -1,41 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package rdma
-
-import (
- "context"
-
- api "git.fd.io/govpp.git/api"
-)
-
-// RPCService defines RPC service rdma.
-type RPCService interface {
- RdmaCreate(ctx context.Context, in *RdmaCreate) (*RdmaCreateReply, error)
- RdmaDelete(ctx context.Context, in *RdmaDelete) (*RdmaDeleteReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) RdmaCreate(ctx context.Context, in *RdmaCreate) (*RdmaCreateReply, error) {
- out := new(RdmaCreateReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) RdmaDelete(ctx context.Context, in *RdmaDelete) (*RdmaDeleteReply, error) {
- out := new(RdmaDeleteReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/sctp/sctp.ba.go b/internal/testbinapi/binapi2001/sctp/sctp.ba.go
deleted file mode 100644
index c06e76e..0000000
--- a/internal/testbinapi/binapi2001/sctp/sctp.ba.go
+++ /dev/null
@@ -1,285 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/plugins/sctp.api.json
-
-// Package sctp contains generated bindings for API file sctp.api.
-//
-// Contents:
-// 6 messages
-//
-package sctp
-
-import (
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the GoVPP api package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// GoVPP api package needs to be updated.
-const _ = api.GoVppAPIPackageIsVersion2
-
-const (
- APIFile = "sctp"
- APIVersion = "1.0.0"
- VersionCrc = 0x35f411c4
-)
-
-// SctpAddSrcDstConnection defines message 'sctp_add_src_dst_connection'.
-type SctpAddSrcDstConnection struct {
- IsIPv6 uint8 `binapi:"u8,name=is_ipv6" json:"is_ipv6,omitempty"`
- VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
- SrcAddress []byte `binapi:"u8[16],name=src_address" json:"src_address,omitempty"`
- DstAddress []byte `binapi:"u8[16],name=dst_address" json:"dst_address,omitempty"`
-}
-
-func (m *SctpAddSrcDstConnection) Reset() { *m = SctpAddSrcDstConnection{} }
-func (*SctpAddSrcDstConnection) GetMessageName() string { return "sctp_add_src_dst_connection" }
-func (*SctpAddSrcDstConnection) GetCrcString() string { return "45c59b2f" }
-func (*SctpAddSrcDstConnection) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SctpAddSrcDstConnection) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsIPv6
- size += 4 // m.VrfID
- size += 1 * 16 // m.SrcAddress
- size += 1 * 16 // m.DstAddress
- return size
-}
-func (m *SctpAddSrcDstConnection) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsIPv6)
- buf.EncodeUint32(m.VrfID)
- buf.EncodeBytes(m.SrcAddress, 16)
- buf.EncodeBytes(m.DstAddress, 16)
- return buf.Bytes(), nil
-}
-func (m *SctpAddSrcDstConnection) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsIPv6 = buf.DecodeUint8()
- m.VrfID = buf.DecodeUint32()
- m.SrcAddress = make([]byte, 16)
- copy(m.SrcAddress, buf.DecodeBytes(len(m.SrcAddress)))
- m.DstAddress = make([]byte, 16)
- copy(m.DstAddress, buf.DecodeBytes(len(m.DstAddress)))
- return nil
-}
-
-// SctpAddSrcDstConnectionReply defines message 'sctp_add_src_dst_connection_reply'.
-type SctpAddSrcDstConnectionReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SctpAddSrcDstConnectionReply) Reset() { *m = SctpAddSrcDstConnectionReply{} }
-func (*SctpAddSrcDstConnectionReply) GetMessageName() string {
- return "sctp_add_src_dst_connection_reply"
-}
-func (*SctpAddSrcDstConnectionReply) GetCrcString() string { return "e8d4e804" }
-func (*SctpAddSrcDstConnectionReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SctpAddSrcDstConnectionReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SctpAddSrcDstConnectionReply) 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 *SctpAddSrcDstConnectionReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SctpConfig defines message 'sctp_config'.
-type SctpConfig struct {
- NeverDelaySack uint8 `binapi:"u8,name=never_delay_sack" json:"never_delay_sack,omitempty"`
- NeverBundle uint8 `binapi:"u8,name=never_bundle" json:"never_bundle,omitempty"`
-}
-
-func (m *SctpConfig) Reset() { *m = SctpConfig{} }
-func (*SctpConfig) GetMessageName() string { return "sctp_config" }
-func (*SctpConfig) GetCrcString() string { return "7617eced" }
-func (*SctpConfig) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SctpConfig) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.NeverDelaySack
- size += 1 // m.NeverBundle
- return size
-}
-func (m *SctpConfig) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.NeverDelaySack)
- buf.EncodeUint8(m.NeverBundle)
- return buf.Bytes(), nil
-}
-func (m *SctpConfig) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.NeverDelaySack = buf.DecodeUint8()
- m.NeverBundle = buf.DecodeUint8()
- return nil
-}
-
-// SctpConfigReply defines message 'sctp_config_reply'.
-type SctpConfigReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SctpConfigReply) Reset() { *m = SctpConfigReply{} }
-func (*SctpConfigReply) GetMessageName() string { return "sctp_config_reply" }
-func (*SctpConfigReply) GetCrcString() string { return "e8d4e804" }
-func (*SctpConfigReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SctpConfigReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SctpConfigReply) 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 *SctpConfigReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SctpDelSrcDstConnection defines message 'sctp_del_src_dst_connection'.
-type SctpDelSrcDstConnection struct {
- IsIPv6 uint8 `binapi:"u8,name=is_ipv6" json:"is_ipv6,omitempty"`
- VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
- SrcAddress []byte `binapi:"u8[16],name=src_address" json:"src_address,omitempty"`
- DstAddress []byte `binapi:"u8[16],name=dst_address" json:"dst_address,omitempty"`
-}
-
-func (m *SctpDelSrcDstConnection) Reset() { *m = SctpDelSrcDstConnection{} }
-func (*SctpDelSrcDstConnection) GetMessageName() string { return "sctp_del_src_dst_connection" }
-func (*SctpDelSrcDstConnection) GetCrcString() string { return "45c59b2f" }
-func (*SctpDelSrcDstConnection) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SctpDelSrcDstConnection) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsIPv6
- size += 4 // m.VrfID
- size += 1 * 16 // m.SrcAddress
- size += 1 * 16 // m.DstAddress
- return size
-}
-func (m *SctpDelSrcDstConnection) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsIPv6)
- buf.EncodeUint32(m.VrfID)
- buf.EncodeBytes(m.SrcAddress, 16)
- buf.EncodeBytes(m.DstAddress, 16)
- return buf.Bytes(), nil
-}
-func (m *SctpDelSrcDstConnection) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsIPv6 = buf.DecodeUint8()
- m.VrfID = buf.DecodeUint32()
- m.SrcAddress = make([]byte, 16)
- copy(m.SrcAddress, buf.DecodeBytes(len(m.SrcAddress)))
- m.DstAddress = make([]byte, 16)
- copy(m.DstAddress, buf.DecodeBytes(len(m.DstAddress)))
- return nil
-}
-
-// SctpDelSrcDstConnectionReply defines message 'sctp_del_src_dst_connection_reply'.
-type SctpDelSrcDstConnectionReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SctpDelSrcDstConnectionReply) Reset() { *m = SctpDelSrcDstConnectionReply{} }
-func (*SctpDelSrcDstConnectionReply) GetMessageName() string {
- return "sctp_del_src_dst_connection_reply"
-}
-func (*SctpDelSrcDstConnectionReply) GetCrcString() string { return "e8d4e804" }
-func (*SctpDelSrcDstConnectionReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SctpDelSrcDstConnectionReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SctpDelSrcDstConnectionReply) 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 *SctpDelSrcDstConnectionReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_sctp_binapi_init() }
-func file_sctp_binapi_init() {
- api.RegisterMessage((*SctpAddSrcDstConnection)(nil), "sctp_add_src_dst_connection_45c59b2f")
- api.RegisterMessage((*SctpAddSrcDstConnectionReply)(nil), "sctp_add_src_dst_connection_reply_e8d4e804")
- api.RegisterMessage((*SctpConfig)(nil), "sctp_config_7617eced")
- api.RegisterMessage((*SctpConfigReply)(nil), "sctp_config_reply_e8d4e804")
- api.RegisterMessage((*SctpDelSrcDstConnection)(nil), "sctp_del_src_dst_connection_45c59b2f")
- api.RegisterMessage((*SctpDelSrcDstConnectionReply)(nil), "sctp_del_src_dst_connection_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*SctpAddSrcDstConnection)(nil),
- (*SctpAddSrcDstConnectionReply)(nil),
- (*SctpConfig)(nil),
- (*SctpConfigReply)(nil),
- (*SctpDelSrcDstConnection)(nil),
- (*SctpDelSrcDstConnectionReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/sctp/sctp_rpc.ba.go b/internal/testbinapi/binapi2001/sctp/sctp_rpc.ba.go
deleted file mode 100644
index 7e75326..0000000
--- a/internal/testbinapi/binapi2001/sctp/sctp_rpc.ba.go
+++ /dev/null
@@ -1,51 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package sctp
-
-import (
- "context"
-
- api "git.fd.io/govpp.git/api"
-)
-
-// RPCService defines RPC service sctp.
-type RPCService interface {
- SctpAddSrcDstConnection(ctx context.Context, in *SctpAddSrcDstConnection) (*SctpAddSrcDstConnectionReply, error)
- SctpConfig(ctx context.Context, in *SctpConfig) (*SctpConfigReply, error)
- SctpDelSrcDstConnection(ctx context.Context, in *SctpDelSrcDstConnection) (*SctpDelSrcDstConnectionReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) SctpAddSrcDstConnection(ctx context.Context, in *SctpAddSrcDstConnection) (*SctpAddSrcDstConnectionReply, error) {
- out := new(SctpAddSrcDstConnectionReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SctpConfig(ctx context.Context, in *SctpConfig) (*SctpConfigReply, error) {
- out := new(SctpConfigReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SctpDelSrcDstConnection(ctx context.Context, in *SctpDelSrcDstConnection) (*SctpDelSrcDstConnectionReply, error) {
- out := new(SctpDelSrcDstConnectionReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/session/session.ba.go b/internal/testbinapi/binapi2001/session/session.ba.go
deleted file mode 100644
index b6d5706..0000000
--- a/internal/testbinapi/binapi2001/session/session.ba.go
+++ /dev/null
@@ -1,2026 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/session.api.json
-
-// Package session contains generated bindings for API file session.api.
-//
-// Contents:
-// 44 messages
-//
-package session
-
-import (
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the GoVPP api package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// GoVPP api package needs to be updated.
-const _ = api.GoVppAPIPackageIsVersion2
-
-const (
- APIFile = "session"
- APIVersion = "1.7.0"
- VersionCrc = 0xdf888b15
-)
-
-// AppAddCertKeyPair defines message 'app_add_cert_key_pair'.
-type AppAddCertKeyPair struct {
- CertLen uint16 `binapi:"u16,name=cert_len" json:"cert_len,omitempty"`
- CertkeyLen uint16 `binapi:"u16,name=certkey_len" json:"-"`
- Certkey []byte `binapi:"u8[certkey_len],name=certkey" json:"certkey,omitempty"`
-}
-
-func (m *AppAddCertKeyPair) Reset() { *m = AppAddCertKeyPair{} }
-func (*AppAddCertKeyPair) GetMessageName() string { return "app_add_cert_key_pair" }
-func (*AppAddCertKeyPair) GetCrcString() string { return "02eb8016" }
-func (*AppAddCertKeyPair) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *AppAddCertKeyPair) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 2 // m.CertLen
- size += 2 // m.CertkeyLen
- size += 1 * len(m.Certkey) // m.Certkey
- return size
-}
-func (m *AppAddCertKeyPair) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint16(m.CertLen)
- buf.EncodeUint16(uint16(len(m.Certkey)))
- buf.EncodeBytes(m.Certkey, 0)
- return buf.Bytes(), nil
-}
-func (m *AppAddCertKeyPair) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.CertLen = buf.DecodeUint16()
- m.CertkeyLen = buf.DecodeUint16()
- m.Certkey = make([]byte, m.CertkeyLen)
- copy(m.Certkey, buf.DecodeBytes(len(m.Certkey)))
- return nil
-}
-
-// AppAddCertKeyPairReply defines message 'app_add_cert_key_pair_reply'.
-type AppAddCertKeyPairReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- Index uint32 `binapi:"u32,name=index" json:"index,omitempty"`
-}
-
-func (m *AppAddCertKeyPairReply) Reset() { *m = AppAddCertKeyPairReply{} }
-func (*AppAddCertKeyPairReply) GetMessageName() string { return "app_add_cert_key_pair_reply" }
-func (*AppAddCertKeyPairReply) GetCrcString() string { return "b42958d0" }
-func (*AppAddCertKeyPairReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *AppAddCertKeyPairReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.Index
- return size
-}
-func (m *AppAddCertKeyPairReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.Index)
- return buf.Bytes(), nil
-}
-func (m *AppAddCertKeyPairReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.Index = buf.DecodeUint32()
- return nil
-}
-
-// AppAttach defines message 'app_attach'.
-type AppAttach struct {
- Options []uint64 `binapi:"u64[16],name=options" json:"options,omitempty"`
- NamespaceIDLen uint8 `binapi:"u8,name=namespace_id_len" json:"namespace_id_len,omitempty"`
- NamespaceID []byte `binapi:"u8[64],name=namespace_id" json:"namespace_id,omitempty"`
-}
-
-func (m *AppAttach) Reset() { *m = AppAttach{} }
-func (*AppAttach) GetMessageName() string { return "app_attach" }
-func (*AppAttach) GetCrcString() string { return "ed08f4bd" }
-func (*AppAttach) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *AppAttach) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 8 * 16 // m.Options
- size += 1 // m.NamespaceIDLen
- size += 1 * 64 // m.NamespaceID
- return size
-}
-func (m *AppAttach) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- for i := 0; i < 16; i++ {
- var x uint64
- if i < len(m.Options) {
- x = uint64(m.Options[i])
- }
- buf.EncodeUint64(x)
- }
- buf.EncodeUint8(m.NamespaceIDLen)
- buf.EncodeBytes(m.NamespaceID, 64)
- return buf.Bytes(), nil
-}
-func (m *AppAttach) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Options = make([]uint64, 16)
- for i := 0; i < len(m.Options); i++ {
- m.Options[i] = buf.DecodeUint64()
- }
- m.NamespaceIDLen = buf.DecodeUint8()
- m.NamespaceID = make([]byte, 64)
- copy(m.NamespaceID, buf.DecodeBytes(len(m.NamespaceID)))
- return nil
-}
-
-// AppAttachReply defines message 'app_attach_reply'.
-type AppAttachReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- AppMq uint64 `binapi:"u64,name=app_mq" json:"app_mq,omitempty"`
- VppCtrlMq uint64 `binapi:"u64,name=vpp_ctrl_mq" json:"vpp_ctrl_mq,omitempty"`
- VppCtrlMqThread uint8 `binapi:"u8,name=vpp_ctrl_mq_thread" json:"vpp_ctrl_mq_thread,omitempty"`
- AppIndex uint32 `binapi:"u32,name=app_index" json:"app_index,omitempty"`
- NFds uint8 `binapi:"u8,name=n_fds" json:"n_fds,omitempty"`
- FdFlags uint8 `binapi:"u8,name=fd_flags" json:"fd_flags,omitempty"`
- SegmentSize uint32 `binapi:"u32,name=segment_size" json:"segment_size,omitempty"`
- SegmentNameLength uint8 `binapi:"u8,name=segment_name_length" json:"segment_name_length,omitempty"`
- SegmentName []byte `binapi:"u8[128],name=segment_name" json:"segment_name,omitempty"`
- SegmentHandle uint64 `binapi:"u64,name=segment_handle" json:"segment_handle,omitempty"`
-}
-
-func (m *AppAttachReply) Reset() { *m = AppAttachReply{} }
-func (*AppAttachReply) GetMessageName() string { return "app_attach_reply" }
-func (*AppAttachReply) GetCrcString() string { return "0112f647" }
-func (*AppAttachReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *AppAttachReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 8 // m.AppMq
- size += 8 // m.VppCtrlMq
- size += 1 // m.VppCtrlMqThread
- size += 4 // m.AppIndex
- size += 1 // m.NFds
- size += 1 // m.FdFlags
- size += 4 // m.SegmentSize
- size += 1 // m.SegmentNameLength
- size += 1 * 128 // m.SegmentName
- size += 8 // m.SegmentHandle
- return size
-}
-func (m *AppAttachReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint64(m.AppMq)
- buf.EncodeUint64(m.VppCtrlMq)
- buf.EncodeUint8(m.VppCtrlMqThread)
- buf.EncodeUint32(m.AppIndex)
- buf.EncodeUint8(m.NFds)
- buf.EncodeUint8(m.FdFlags)
- buf.EncodeUint32(m.SegmentSize)
- buf.EncodeUint8(m.SegmentNameLength)
- buf.EncodeBytes(m.SegmentName, 128)
- buf.EncodeUint64(m.SegmentHandle)
- return buf.Bytes(), nil
-}
-func (m *AppAttachReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.AppMq = buf.DecodeUint64()
- m.VppCtrlMq = buf.DecodeUint64()
- m.VppCtrlMqThread = buf.DecodeUint8()
- m.AppIndex = buf.DecodeUint32()
- m.NFds = buf.DecodeUint8()
- m.FdFlags = buf.DecodeUint8()
- m.SegmentSize = buf.DecodeUint32()
- m.SegmentNameLength = buf.DecodeUint8()
- m.SegmentName = make([]byte, 128)
- copy(m.SegmentName, buf.DecodeBytes(len(m.SegmentName)))
- m.SegmentHandle = buf.DecodeUint64()
- return nil
-}
-
-// AppCutThroughRegistrationAdd defines message 'app_cut_through_registration_add'.
-type AppCutThroughRegistrationAdd struct {
- EvtQAddress uint64 `binapi:"u64,name=evt_q_address" json:"evt_q_address,omitempty"`
- PeerEvtQAddress uint64 `binapi:"u64,name=peer_evt_q_address" json:"peer_evt_q_address,omitempty"`
- WrkIndex uint32 `binapi:"u32,name=wrk_index" json:"wrk_index,omitempty"`
- NFds uint8 `binapi:"u8,name=n_fds" json:"n_fds,omitempty"`
- FdFlags uint8 `binapi:"u8,name=fd_flags" json:"fd_flags,omitempty"`
-}
-
-func (m *AppCutThroughRegistrationAdd) Reset() { *m = AppCutThroughRegistrationAdd{} }
-func (*AppCutThroughRegistrationAdd) GetMessageName() string {
- return "app_cut_through_registration_add"
-}
-func (*AppCutThroughRegistrationAdd) GetCrcString() string { return "6d73b1b9" }
-func (*AppCutThroughRegistrationAdd) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *AppCutThroughRegistrationAdd) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 8 // m.EvtQAddress
- size += 8 // m.PeerEvtQAddress
- size += 4 // m.WrkIndex
- size += 1 // m.NFds
- size += 1 // m.FdFlags
- return size
-}
-func (m *AppCutThroughRegistrationAdd) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint64(m.EvtQAddress)
- buf.EncodeUint64(m.PeerEvtQAddress)
- buf.EncodeUint32(m.WrkIndex)
- buf.EncodeUint8(m.NFds)
- buf.EncodeUint8(m.FdFlags)
- return buf.Bytes(), nil
-}
-func (m *AppCutThroughRegistrationAdd) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.EvtQAddress = buf.DecodeUint64()
- m.PeerEvtQAddress = buf.DecodeUint64()
- m.WrkIndex = buf.DecodeUint32()
- m.NFds = buf.DecodeUint8()
- m.FdFlags = buf.DecodeUint8()
- return nil
-}
-
-// AppCutThroughRegistrationAddReply defines message 'app_cut_through_registration_add_reply'.
-type AppCutThroughRegistrationAddReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *AppCutThroughRegistrationAddReply) Reset() { *m = AppCutThroughRegistrationAddReply{} }
-func (*AppCutThroughRegistrationAddReply) GetMessageName() string {
- return "app_cut_through_registration_add_reply"
-}
-func (*AppCutThroughRegistrationAddReply) GetCrcString() string { return "e8d4e804" }
-func (*AppCutThroughRegistrationAddReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *AppCutThroughRegistrationAddReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *AppCutThroughRegistrationAddReply) 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 *AppCutThroughRegistrationAddReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// AppDelCertKeyPair defines message 'app_del_cert_key_pair'.
-type AppDelCertKeyPair struct {
- Index uint32 `binapi:"u32,name=index" json:"index,omitempty"`
-}
-
-func (m *AppDelCertKeyPair) Reset() { *m = AppDelCertKeyPair{} }
-func (*AppDelCertKeyPair) GetMessageName() string { return "app_del_cert_key_pair" }
-func (*AppDelCertKeyPair) GetCrcString() string { return "8ac76db6" }
-func (*AppDelCertKeyPair) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *AppDelCertKeyPair) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Index
- return size
-}
-func (m *AppDelCertKeyPair) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Index)
- return buf.Bytes(), nil
-}
-func (m *AppDelCertKeyPair) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Index = buf.DecodeUint32()
- return nil
-}
-
-// AppDelCertKeyPairReply defines message 'app_del_cert_key_pair_reply'.
-type AppDelCertKeyPairReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *AppDelCertKeyPairReply) Reset() { *m = AppDelCertKeyPairReply{} }
-func (*AppDelCertKeyPairReply) GetMessageName() string { return "app_del_cert_key_pair_reply" }
-func (*AppDelCertKeyPairReply) GetCrcString() string { return "e8d4e804" }
-func (*AppDelCertKeyPairReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *AppDelCertKeyPairReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *AppDelCertKeyPairReply) 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 *AppDelCertKeyPairReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// AppNamespaceAddDel defines message 'app_namespace_add_del'.
-type AppNamespaceAddDel struct {
- Secret uint64 `binapi:"u64,name=secret" json:"secret,omitempty"`
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- IP4FibID uint32 `binapi:"u32,name=ip4_fib_id" json:"ip4_fib_id,omitempty"`
- IP6FibID uint32 `binapi:"u32,name=ip6_fib_id" json:"ip6_fib_id,omitempty"`
- NamespaceIDLen uint8 `binapi:"u8,name=namespace_id_len" json:"namespace_id_len,omitempty"`
- NamespaceID []byte `binapi:"u8[64],name=namespace_id" json:"namespace_id,omitempty"`
-}
-
-func (m *AppNamespaceAddDel) Reset() { *m = AppNamespaceAddDel{} }
-func (*AppNamespaceAddDel) GetMessageName() string { return "app_namespace_add_del" }
-func (*AppNamespaceAddDel) GetCrcString() string { return "dd074c65" }
-func (*AppNamespaceAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *AppNamespaceAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 8 // m.Secret
- size += 4 // m.SwIfIndex
- size += 4 // m.IP4FibID
- size += 4 // m.IP6FibID
- size += 1 // m.NamespaceIDLen
- size += 1 * 64 // m.NamespaceID
- return size
-}
-func (m *AppNamespaceAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint64(m.Secret)
- buf.EncodeUint32(m.SwIfIndex)
- buf.EncodeUint32(m.IP4FibID)
- buf.EncodeUint32(m.IP6FibID)
- buf.EncodeUint8(m.NamespaceIDLen)
- buf.EncodeBytes(m.NamespaceID, 64)
- return buf.Bytes(), nil
-}
-func (m *AppNamespaceAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Secret = buf.DecodeUint64()
- m.SwIfIndex = buf.DecodeUint32()
- m.IP4FibID = buf.DecodeUint32()
- m.IP6FibID = buf.DecodeUint32()
- m.NamespaceIDLen = buf.DecodeUint8()
- m.NamespaceID = make([]byte, 64)
- copy(m.NamespaceID, buf.DecodeBytes(len(m.NamespaceID)))
- return nil
-}
-
-// AppNamespaceAddDelReply defines message 'app_namespace_add_del_reply'.
-type AppNamespaceAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- AppnsIndex uint32 `binapi:"u32,name=appns_index" json:"appns_index,omitempty"`
-}
-
-func (m *AppNamespaceAddDelReply) Reset() { *m = AppNamespaceAddDelReply{} }
-func (*AppNamespaceAddDelReply) GetMessageName() string { return "app_namespace_add_del_reply" }
-func (*AppNamespaceAddDelReply) GetCrcString() string { return "85137120" }
-func (*AppNamespaceAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *AppNamespaceAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.AppnsIndex
- return size
-}
-func (m *AppNamespaceAddDelReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.AppnsIndex)
- return buf.Bytes(), nil
-}
-func (m *AppNamespaceAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.AppnsIndex = buf.DecodeUint32()
- return nil
-}
-
-// AppWorkerAddDel defines message 'app_worker_add_del'.
-type AppWorkerAddDel struct {
- AppIndex uint32 `binapi:"u32,name=app_index" json:"app_index,omitempty"`
- WrkIndex uint32 `binapi:"u32,name=wrk_index" json:"wrk_index,omitempty"`
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
-}
-
-func (m *AppWorkerAddDel) Reset() { *m = AppWorkerAddDel{} }
-func (*AppWorkerAddDel) GetMessageName() string { return "app_worker_add_del" }
-func (*AppWorkerAddDel) GetCrcString() string { return "6d2b2279" }
-func (*AppWorkerAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *AppWorkerAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.AppIndex
- size += 4 // m.WrkIndex
- size += 1 // m.IsAdd
- return size
-}
-func (m *AppWorkerAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.AppIndex)
- buf.EncodeUint32(m.WrkIndex)
- buf.EncodeUint8(m.IsAdd)
- return buf.Bytes(), nil
-}
-func (m *AppWorkerAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.AppIndex = buf.DecodeUint32()
- m.WrkIndex = buf.DecodeUint32()
- m.IsAdd = buf.DecodeUint8()
- return nil
-}
-
-// AppWorkerAddDelReply defines message 'app_worker_add_del_reply'.
-type AppWorkerAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- WrkIndex uint32 `binapi:"u32,name=wrk_index" json:"wrk_index,omitempty"`
- AppEventQueueAddress uint64 `binapi:"u64,name=app_event_queue_address" json:"app_event_queue_address,omitempty"`
- NFds uint8 `binapi:"u8,name=n_fds" json:"n_fds,omitempty"`
- FdFlags uint8 `binapi:"u8,name=fd_flags" json:"fd_flags,omitempty"`
- SegmentNameLength uint8 `binapi:"u8,name=segment_name_length" json:"segment_name_length,omitempty"`
- SegmentName []byte `binapi:"u8[128],name=segment_name" json:"segment_name,omitempty"`
- SegmentHandle uint64 `binapi:"u64,name=segment_handle" json:"segment_handle,omitempty"`
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
-}
-
-func (m *AppWorkerAddDelReply) Reset() { *m = AppWorkerAddDelReply{} }
-func (*AppWorkerAddDelReply) GetMessageName() string { return "app_worker_add_del_reply" }
-func (*AppWorkerAddDelReply) GetCrcString() string { return "56b21abc" }
-func (*AppWorkerAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *AppWorkerAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.WrkIndex
- size += 8 // m.AppEventQueueAddress
- size += 1 // m.NFds
- size += 1 // m.FdFlags
- size += 1 // m.SegmentNameLength
- size += 1 * 128 // m.SegmentName
- size += 8 // m.SegmentHandle
- size += 1 // m.IsAdd
- return size
-}
-func (m *AppWorkerAddDelReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.WrkIndex)
- buf.EncodeUint64(m.AppEventQueueAddress)
- buf.EncodeUint8(m.NFds)
- buf.EncodeUint8(m.FdFlags)
- buf.EncodeUint8(m.SegmentNameLength)
- buf.EncodeBytes(m.SegmentName, 128)
- buf.EncodeUint64(m.SegmentHandle)
- buf.EncodeUint8(m.IsAdd)
- return buf.Bytes(), nil
-}
-func (m *AppWorkerAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.WrkIndex = buf.DecodeUint32()
- m.AppEventQueueAddress = buf.DecodeUint64()
- m.NFds = buf.DecodeUint8()
- m.FdFlags = buf.DecodeUint8()
- m.SegmentNameLength = buf.DecodeUint8()
- m.SegmentName = make([]byte, 128)
- copy(m.SegmentName, buf.DecodeBytes(len(m.SegmentName)))
- m.SegmentHandle = buf.DecodeUint64()
- m.IsAdd = buf.DecodeUint8()
- return nil
-}
-
-// ApplicationAttach defines message 'application_attach'.
-type ApplicationAttach struct {
- InitialSegmentSize uint32 `binapi:"u32,name=initial_segment_size" json:"initial_segment_size,omitempty"`
- Options []uint64 `binapi:"u64[16],name=options" json:"options,omitempty"`
- NamespaceIDLen uint8 `binapi:"u8,name=namespace_id_len" json:"namespace_id_len,omitempty"`
- NamespaceID []byte `binapi:"u8[64],name=namespace_id" json:"namespace_id,omitempty"`
-}
-
-func (m *ApplicationAttach) Reset() { *m = ApplicationAttach{} }
-func (*ApplicationAttach) GetMessageName() string { return "application_attach" }
-func (*ApplicationAttach) GetCrcString() string { return "81d4f974" }
-func (*ApplicationAttach) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ApplicationAttach) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.InitialSegmentSize
- size += 8 * 16 // m.Options
- size += 1 // m.NamespaceIDLen
- size += 1 * 64 // m.NamespaceID
- return size
-}
-func (m *ApplicationAttach) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.InitialSegmentSize)
- for i := 0; i < 16; i++ {
- var x uint64
- if i < len(m.Options) {
- x = uint64(m.Options[i])
- }
- buf.EncodeUint64(x)
- }
- buf.EncodeUint8(m.NamespaceIDLen)
- buf.EncodeBytes(m.NamespaceID, 64)
- return buf.Bytes(), nil
-}
-func (m *ApplicationAttach) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.InitialSegmentSize = buf.DecodeUint32()
- m.Options = make([]uint64, 16)
- for i := 0; i < len(m.Options); i++ {
- m.Options[i] = buf.DecodeUint64()
- }
- m.NamespaceIDLen = buf.DecodeUint8()
- m.NamespaceID = make([]byte, 64)
- copy(m.NamespaceID, buf.DecodeBytes(len(m.NamespaceID)))
- return nil
-}
-
-// ApplicationAttachReply defines message 'application_attach_reply'.
-type ApplicationAttachReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- AppEventQueueAddress uint64 `binapi:"u64,name=app_event_queue_address" json:"app_event_queue_address,omitempty"`
- NFds uint8 `binapi:"u8,name=n_fds" json:"n_fds,omitempty"`
- FdFlags uint8 `binapi:"u8,name=fd_flags" json:"fd_flags,omitempty"`
- SegmentSize uint32 `binapi:"u32,name=segment_size" json:"segment_size,omitempty"`
- SegmentNameLength uint8 `binapi:"u8,name=segment_name_length" json:"segment_name_length,omitempty"`
- SegmentName []byte `binapi:"u8[128],name=segment_name" json:"segment_name,omitempty"`
- AppIndex uint32 `binapi:"u32,name=app_index" json:"app_index,omitempty"`
- SegmentHandle uint64 `binapi:"u64,name=segment_handle" json:"segment_handle,omitempty"`
-}
-
-func (m *ApplicationAttachReply) Reset() { *m = ApplicationAttachReply{} }
-func (*ApplicationAttachReply) GetMessageName() string { return "application_attach_reply" }
-func (*ApplicationAttachReply) GetCrcString() string { return "581866e8" }
-func (*ApplicationAttachReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ApplicationAttachReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 8 // m.AppEventQueueAddress
- size += 1 // m.NFds
- size += 1 // m.FdFlags
- size += 4 // m.SegmentSize
- size += 1 // m.SegmentNameLength
- size += 1 * 128 // m.SegmentName
- size += 4 // m.AppIndex
- size += 8 // m.SegmentHandle
- return size
-}
-func (m *ApplicationAttachReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint64(m.AppEventQueueAddress)
- buf.EncodeUint8(m.NFds)
- buf.EncodeUint8(m.FdFlags)
- buf.EncodeUint32(m.SegmentSize)
- buf.EncodeUint8(m.SegmentNameLength)
- buf.EncodeBytes(m.SegmentName, 128)
- buf.EncodeUint32(m.AppIndex)
- buf.EncodeUint64(m.SegmentHandle)
- return buf.Bytes(), nil
-}
-func (m *ApplicationAttachReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.AppEventQueueAddress = buf.DecodeUint64()
- m.NFds = buf.DecodeUint8()
- m.FdFlags = buf.DecodeUint8()
- m.SegmentSize = buf.DecodeUint32()
- m.SegmentNameLength = buf.DecodeUint8()
- m.SegmentName = make([]byte, 128)
- copy(m.SegmentName, buf.DecodeBytes(len(m.SegmentName)))
- m.AppIndex = buf.DecodeUint32()
- m.SegmentHandle = buf.DecodeUint64()
- return nil
-}
-
-// ApplicationDetach defines message 'application_detach'.
-type ApplicationDetach struct{}
-
-func (m *ApplicationDetach) Reset() { *m = ApplicationDetach{} }
-func (*ApplicationDetach) GetMessageName() string { return "application_detach" }
-func (*ApplicationDetach) GetCrcString() string { return "51077d14" }
-func (*ApplicationDetach) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ApplicationDetach) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *ApplicationDetach) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *ApplicationDetach) Unmarshal(b []byte) error {
- return nil
-}
-
-// ApplicationDetachReply defines message 'application_detach_reply'.
-type ApplicationDetachReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *ApplicationDetachReply) Reset() { *m = ApplicationDetachReply{} }
-func (*ApplicationDetachReply) GetMessageName() string { return "application_detach_reply" }
-func (*ApplicationDetachReply) GetCrcString() string { return "e8d4e804" }
-func (*ApplicationDetachReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ApplicationDetachReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *ApplicationDetachReply) 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 *ApplicationDetachReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// ApplicationTLSCertAdd defines message 'application_tls_cert_add'.
-type ApplicationTLSCertAdd struct {
- AppIndex uint32 `binapi:"u32,name=app_index" json:"app_index,omitempty"`
- CertLen uint16 `binapi:"u16,name=cert_len" json:"-"`
- Cert []byte `binapi:"u8[cert_len],name=cert" json:"cert,omitempty"`
-}
-
-func (m *ApplicationTLSCertAdd) Reset() { *m = ApplicationTLSCertAdd{} }
-func (*ApplicationTLSCertAdd) GetMessageName() string { return "application_tls_cert_add" }
-func (*ApplicationTLSCertAdd) GetCrcString() string { return "3f5cfe45" }
-func (*ApplicationTLSCertAdd) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ApplicationTLSCertAdd) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.AppIndex
- size += 2 // m.CertLen
- size += 1 * len(m.Cert) // m.Cert
- return size
-}
-func (m *ApplicationTLSCertAdd) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.AppIndex)
- buf.EncodeUint16(uint16(len(m.Cert)))
- buf.EncodeBytes(m.Cert, 0)
- return buf.Bytes(), nil
-}
-func (m *ApplicationTLSCertAdd) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.AppIndex = buf.DecodeUint32()
- m.CertLen = buf.DecodeUint16()
- m.Cert = make([]byte, m.CertLen)
- copy(m.Cert, buf.DecodeBytes(len(m.Cert)))
- return nil
-}
-
-// ApplicationTLSCertAddReply defines message 'application_tls_cert_add_reply'.
-type ApplicationTLSCertAddReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *ApplicationTLSCertAddReply) Reset() { *m = ApplicationTLSCertAddReply{} }
-func (*ApplicationTLSCertAddReply) GetMessageName() string { return "application_tls_cert_add_reply" }
-func (*ApplicationTLSCertAddReply) GetCrcString() string { return "e8d4e804" }
-func (*ApplicationTLSCertAddReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ApplicationTLSCertAddReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *ApplicationTLSCertAddReply) 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 *ApplicationTLSCertAddReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// ApplicationTLSKeyAdd defines message 'application_tls_key_add'.
-type ApplicationTLSKeyAdd struct {
- AppIndex uint32 `binapi:"u32,name=app_index" json:"app_index,omitempty"`
- KeyLen uint16 `binapi:"u16,name=key_len" json:"-"`
- Key []byte `binapi:"u8[key_len],name=key" json:"key,omitempty"`
-}
-
-func (m *ApplicationTLSKeyAdd) Reset() { *m = ApplicationTLSKeyAdd{} }
-func (*ApplicationTLSKeyAdd) GetMessageName() string { return "application_tls_key_add" }
-func (*ApplicationTLSKeyAdd) GetCrcString() string { return "5eaf70cd" }
-func (*ApplicationTLSKeyAdd) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ApplicationTLSKeyAdd) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.AppIndex
- size += 2 // m.KeyLen
- size += 1 * len(m.Key) // m.Key
- return size
-}
-func (m *ApplicationTLSKeyAdd) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.AppIndex)
- buf.EncodeUint16(uint16(len(m.Key)))
- buf.EncodeBytes(m.Key, 0)
- return buf.Bytes(), nil
-}
-func (m *ApplicationTLSKeyAdd) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.AppIndex = buf.DecodeUint32()
- m.KeyLen = buf.DecodeUint16()
- m.Key = make([]byte, m.KeyLen)
- copy(m.Key, buf.DecodeBytes(len(m.Key)))
- return nil
-}
-
-// ApplicationTLSKeyAddReply defines message 'application_tls_key_add_reply'.
-type ApplicationTLSKeyAddReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *ApplicationTLSKeyAddReply) Reset() { *m = ApplicationTLSKeyAddReply{} }
-func (*ApplicationTLSKeyAddReply) GetMessageName() string { return "application_tls_key_add_reply" }
-func (*ApplicationTLSKeyAddReply) GetCrcString() string { return "e8d4e804" }
-func (*ApplicationTLSKeyAddReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ApplicationTLSKeyAddReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *ApplicationTLSKeyAddReply) 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 *ApplicationTLSKeyAddReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// BindSock defines message 'bind_sock'.
-type BindSock struct {
- WrkIndex uint32 `binapi:"u32,name=wrk_index" json:"wrk_index,omitempty"`
- Vrf uint32 `binapi:"u32,name=vrf" json:"vrf,omitempty"`
- IsIP4 uint8 `binapi:"u8,name=is_ip4" json:"is_ip4,omitempty"`
- IP []byte `binapi:"u8[16],name=ip" json:"ip,omitempty"`
- Port uint16 `binapi:"u16,name=port" json:"port,omitempty"`
- Proto uint8 `binapi:"u8,name=proto" json:"proto,omitempty"`
- Options []uint64 `binapi:"u64[16],name=options" json:"options,omitempty"`
-}
-
-func (m *BindSock) Reset() { *m = BindSock{} }
-func (*BindSock) GetMessageName() string { return "bind_sock" }
-func (*BindSock) GetCrcString() string { return "0394633f" }
-func (*BindSock) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BindSock) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.WrkIndex
- size += 4 // m.Vrf
- size += 1 // m.IsIP4
- size += 1 * 16 // m.IP
- size += 2 // m.Port
- size += 1 // m.Proto
- size += 8 * 16 // m.Options
- return size
-}
-func (m *BindSock) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.WrkIndex)
- buf.EncodeUint32(m.Vrf)
- buf.EncodeUint8(m.IsIP4)
- buf.EncodeBytes(m.IP, 16)
- buf.EncodeUint16(m.Port)
- buf.EncodeUint8(m.Proto)
- for i := 0; i < 16; i++ {
- var x uint64
- if i < len(m.Options) {
- x = uint64(m.Options[i])
- }
- buf.EncodeUint64(x)
- }
- return buf.Bytes(), nil
-}
-func (m *BindSock) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.WrkIndex = buf.DecodeUint32()
- m.Vrf = buf.DecodeUint32()
- m.IsIP4 = buf.DecodeUint8()
- m.IP = make([]byte, 16)
- copy(m.IP, buf.DecodeBytes(len(m.IP)))
- m.Port = buf.DecodeUint16()
- m.Proto = buf.DecodeUint8()
- m.Options = make([]uint64, 16)
- for i := 0; i < len(m.Options); i++ {
- m.Options[i] = buf.DecodeUint64()
- }
- return nil
-}
-
-// BindSockReply defines message 'bind_sock_reply'.
-type BindSockReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *BindSockReply) Reset() { *m = BindSockReply{} }
-func (*BindSockReply) GetMessageName() string { return "bind_sock_reply" }
-func (*BindSockReply) GetCrcString() string { return "e8d4e804" }
-func (*BindSockReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BindSockReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *BindSockReply) 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 *BindSockReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// BindURI defines message 'bind_uri'.
-type BindURI struct {
- AcceptCookie uint32 `binapi:"u32,name=accept_cookie" json:"accept_cookie,omitempty"`
- URI []byte `binapi:"u8[128],name=uri" json:"uri,omitempty"`
-}
-
-func (m *BindURI) Reset() { *m = BindURI{} }
-func (*BindURI) GetMessageName() string { return "bind_uri" }
-func (*BindURI) GetCrcString() string { return "fae140cb" }
-func (*BindURI) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *BindURI) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.AcceptCookie
- size += 1 * 128 // m.URI
- return size
-}
-func (m *BindURI) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.AcceptCookie)
- buf.EncodeBytes(m.URI, 128)
- return buf.Bytes(), nil
-}
-func (m *BindURI) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.AcceptCookie = buf.DecodeUint32()
- m.URI = make([]byte, 128)
- copy(m.URI, buf.DecodeBytes(len(m.URI)))
- return nil
-}
-
-// BindURIReply defines message 'bind_uri_reply'.
-type BindURIReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *BindURIReply) Reset() { *m = BindURIReply{} }
-func (*BindURIReply) GetMessageName() string { return "bind_uri_reply" }
-func (*BindURIReply) GetCrcString() string { return "e8d4e804" }
-func (*BindURIReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *BindURIReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *BindURIReply) 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 *BindURIReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// ConnectSock defines message 'connect_sock'.
-type ConnectSock struct {
- WrkIndex uint32 `binapi:"u32,name=wrk_index" json:"wrk_index,omitempty"`
- ClientQueueAddress uint64 `binapi:"u64,name=client_queue_address" json:"client_queue_address,omitempty"`
- Options []uint64 `binapi:"u64[16],name=options" json:"options,omitempty"`
- Vrf uint32 `binapi:"u32,name=vrf" json:"vrf,omitempty"`
- IsIP4 uint8 `binapi:"u8,name=is_ip4" json:"is_ip4,omitempty"`
- IP []byte `binapi:"u8[16],name=ip" json:"ip,omitempty"`
- Port uint16 `binapi:"u16,name=port" json:"port,omitempty"`
- Proto uint8 `binapi:"u8,name=proto" json:"proto,omitempty"`
- ParentHandle uint64 `binapi:"u64,name=parent_handle" json:"parent_handle,omitempty"`
- HostnameLen uint8 `binapi:"u8,name=hostname_len" json:"-"`
- Hostname []byte `binapi:"u8[hostname_len],name=hostname" json:"hostname,omitempty"`
-}
-
-func (m *ConnectSock) Reset() { *m = ConnectSock{} }
-func (*ConnectSock) GetMessageName() string { return "connect_sock" }
-func (*ConnectSock) GetCrcString() string { return "d2b460ca" }
-func (*ConnectSock) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ConnectSock) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.WrkIndex
- size += 8 // m.ClientQueueAddress
- size += 8 * 16 // m.Options
- size += 4 // m.Vrf
- size += 1 // m.IsIP4
- size += 1 * 16 // m.IP
- size += 2 // m.Port
- size += 1 // m.Proto
- size += 8 // m.ParentHandle
- size += 1 // m.HostnameLen
- size += 1 * len(m.Hostname) // m.Hostname
- return size
-}
-func (m *ConnectSock) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.WrkIndex)
- buf.EncodeUint64(m.ClientQueueAddress)
- for i := 0; i < 16; i++ {
- var x uint64
- if i < len(m.Options) {
- x = uint64(m.Options[i])
- }
- buf.EncodeUint64(x)
- }
- buf.EncodeUint32(m.Vrf)
- buf.EncodeUint8(m.IsIP4)
- buf.EncodeBytes(m.IP, 16)
- buf.EncodeUint16(m.Port)
- buf.EncodeUint8(m.Proto)
- buf.EncodeUint64(m.ParentHandle)
- buf.EncodeUint8(uint8(len(m.Hostname)))
- buf.EncodeBytes(m.Hostname, 0)
- return buf.Bytes(), nil
-}
-func (m *ConnectSock) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.WrkIndex = buf.DecodeUint32()
- m.ClientQueueAddress = buf.DecodeUint64()
- m.Options = make([]uint64, 16)
- for i := 0; i < len(m.Options); i++ {
- m.Options[i] = buf.DecodeUint64()
- }
- m.Vrf = buf.DecodeUint32()
- m.IsIP4 = buf.DecodeUint8()
- m.IP = make([]byte, 16)
- copy(m.IP, buf.DecodeBytes(len(m.IP)))
- m.Port = buf.DecodeUint16()
- m.Proto = buf.DecodeUint8()
- m.ParentHandle = buf.DecodeUint64()
- m.HostnameLen = buf.DecodeUint8()
- m.Hostname = make([]byte, m.HostnameLen)
- copy(m.Hostname, buf.DecodeBytes(len(m.Hostname)))
- return nil
-}
-
-// ConnectSockReply defines message 'connect_sock_reply'.
-type ConnectSockReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *ConnectSockReply) Reset() { *m = ConnectSockReply{} }
-func (*ConnectSockReply) GetMessageName() string { return "connect_sock_reply" }
-func (*ConnectSockReply) GetCrcString() string { return "e8d4e804" }
-func (*ConnectSockReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ConnectSockReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *ConnectSockReply) 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 *ConnectSockReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// ConnectURI defines message 'connect_uri'.
-type ConnectURI struct {
- ClientQueueAddress uint64 `binapi:"u64,name=client_queue_address" json:"client_queue_address,omitempty"`
- Options []uint64 `binapi:"u64[16],name=options" json:"options,omitempty"`
- URI []byte `binapi:"u8[128],name=uri" json:"uri,omitempty"`
-}
-
-func (m *ConnectURI) Reset() { *m = ConnectURI{} }
-func (*ConnectURI) GetMessageName() string { return "connect_uri" }
-func (*ConnectURI) GetCrcString() string { return "a36143d6" }
-func (*ConnectURI) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ConnectURI) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 8 // m.ClientQueueAddress
- size += 8 * 16 // m.Options
- size += 1 * 128 // m.URI
- return size
-}
-func (m *ConnectURI) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint64(m.ClientQueueAddress)
- for i := 0; i < 16; i++ {
- var x uint64
- if i < len(m.Options) {
- x = uint64(m.Options[i])
- }
- buf.EncodeUint64(x)
- }
- buf.EncodeBytes(m.URI, 128)
- return buf.Bytes(), nil
-}
-func (m *ConnectURI) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.ClientQueueAddress = buf.DecodeUint64()
- m.Options = make([]uint64, 16)
- for i := 0; i < len(m.Options); i++ {
- m.Options[i] = buf.DecodeUint64()
- }
- m.URI = make([]byte, 128)
- copy(m.URI, buf.DecodeBytes(len(m.URI)))
- return nil
-}
-
-// ConnectURIReply defines message 'connect_uri_reply'.
-type ConnectURIReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *ConnectURIReply) Reset() { *m = ConnectURIReply{} }
-func (*ConnectURIReply) GetMessageName() string { return "connect_uri_reply" }
-func (*ConnectURIReply) GetCrcString() string { return "e8d4e804" }
-func (*ConnectURIReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ConnectURIReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *ConnectURIReply) 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 *ConnectURIReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// DisconnectSession defines message 'disconnect_session'.
-type DisconnectSession struct {
- Handle uint64 `binapi:"u64,name=handle" json:"handle,omitempty"`
-}
-
-func (m *DisconnectSession) Reset() { *m = DisconnectSession{} }
-func (*DisconnectSession) GetMessageName() string { return "disconnect_session" }
-func (*DisconnectSession) GetCrcString() string { return "7279205b" }
-func (*DisconnectSession) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *DisconnectSession) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 8 // m.Handle
- return size
-}
-func (m *DisconnectSession) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint64(m.Handle)
- return buf.Bytes(), nil
-}
-func (m *DisconnectSession) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Handle = buf.DecodeUint64()
- return nil
-}
-
-// DisconnectSessionReply defines message 'disconnect_session_reply'.
-type DisconnectSessionReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- Handle uint64 `binapi:"u64,name=handle" json:"handle,omitempty"`
-}
-
-func (m *DisconnectSessionReply) Reset() { *m = DisconnectSessionReply{} }
-func (*DisconnectSessionReply) GetMessageName() string { return "disconnect_session_reply" }
-func (*DisconnectSessionReply) GetCrcString() string { return "d6960a03" }
-func (*DisconnectSessionReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *DisconnectSessionReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 8 // m.Handle
- return size
-}
-func (m *DisconnectSessionReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint64(m.Handle)
- return buf.Bytes(), nil
-}
-func (m *DisconnectSessionReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.Handle = buf.DecodeUint64()
- return nil
-}
-
-// MapAnotherSegment defines message 'map_another_segment'.
-type MapAnotherSegment struct {
- FdFlags uint8 `binapi:"u8,name=fd_flags" json:"fd_flags,omitempty"`
- SegmentSize uint32 `binapi:"u32,name=segment_size" json:"segment_size,omitempty"`
- SegmentName []byte `binapi:"u8[128],name=segment_name" json:"segment_name,omitempty"`
- SegmentHandle uint64 `binapi:"u64,name=segment_handle" json:"segment_handle,omitempty"`
-}
-
-func (m *MapAnotherSegment) Reset() { *m = MapAnotherSegment{} }
-func (*MapAnotherSegment) GetMessageName() string { return "map_another_segment" }
-func (*MapAnotherSegment) GetCrcString() string { return "dc2d630b" }
-func (*MapAnotherSegment) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *MapAnotherSegment) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.FdFlags
- size += 4 // m.SegmentSize
- size += 1 * 128 // m.SegmentName
- size += 8 // m.SegmentHandle
- return size
-}
-func (m *MapAnotherSegment) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.FdFlags)
- buf.EncodeUint32(m.SegmentSize)
- buf.EncodeBytes(m.SegmentName, 128)
- buf.EncodeUint64(m.SegmentHandle)
- return buf.Bytes(), nil
-}
-func (m *MapAnotherSegment) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.FdFlags = buf.DecodeUint8()
- m.SegmentSize = buf.DecodeUint32()
- m.SegmentName = make([]byte, 128)
- copy(m.SegmentName, buf.DecodeBytes(len(m.SegmentName)))
- m.SegmentHandle = buf.DecodeUint64()
- return nil
-}
-
-// MapAnotherSegmentReply defines message 'map_another_segment_reply'.
-type MapAnotherSegmentReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *MapAnotherSegmentReply) Reset() { *m = MapAnotherSegmentReply{} }
-func (*MapAnotherSegmentReply) GetMessageName() string { return "map_another_segment_reply" }
-func (*MapAnotherSegmentReply) GetCrcString() string { return "e8d4e804" }
-func (*MapAnotherSegmentReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *MapAnotherSegmentReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *MapAnotherSegmentReply) 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 *MapAnotherSegmentReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SessionEnableDisable defines message 'session_enable_disable'.
-type SessionEnableDisable struct {
- IsEnable uint8 `binapi:"u8,name=is_enable" json:"is_enable,omitempty"`
-}
-
-func (m *SessionEnableDisable) Reset() { *m = SessionEnableDisable{} }
-func (*SessionEnableDisable) GetMessageName() string { return "session_enable_disable" }
-func (*SessionEnableDisable) GetCrcString() string { return "30ac9be7" }
-func (*SessionEnableDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SessionEnableDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsEnable
- return size
-}
-func (m *SessionEnableDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsEnable)
- return buf.Bytes(), nil
-}
-func (m *SessionEnableDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsEnable = buf.DecodeUint8()
- return nil
-}
-
-// SessionEnableDisableReply defines message 'session_enable_disable_reply'.
-type SessionEnableDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SessionEnableDisableReply) Reset() { *m = SessionEnableDisableReply{} }
-func (*SessionEnableDisableReply) GetMessageName() string { return "session_enable_disable_reply" }
-func (*SessionEnableDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*SessionEnableDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SessionEnableDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SessionEnableDisableReply) 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 *SessionEnableDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SessionRuleAddDel defines message 'session_rule_add_del'.
-type SessionRuleAddDel struct {
- TransportProto uint8 `binapi:"u8,name=transport_proto" json:"transport_proto,omitempty"`
- IsIP4 uint8 `binapi:"u8,name=is_ip4" json:"is_ip4,omitempty"`
- LclIP []byte `binapi:"u8[16],name=lcl_ip" json:"lcl_ip,omitempty"`
- LclPlen uint8 `binapi:"u8,name=lcl_plen" json:"lcl_plen,omitempty"`
- RmtIP []byte `binapi:"u8[16],name=rmt_ip" json:"rmt_ip,omitempty"`
- RmtPlen uint8 `binapi:"u8,name=rmt_plen" json:"rmt_plen,omitempty"`
- LclPort uint16 `binapi:"u16,name=lcl_port" json:"lcl_port,omitempty"`
- RmtPort uint16 `binapi:"u16,name=rmt_port" json:"rmt_port,omitempty"`
- ActionIndex uint32 `binapi:"u32,name=action_index" json:"action_index,omitempty"`
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
- AppnsIndex uint32 `binapi:"u32,name=appns_index" json:"appns_index,omitempty"`
- Scope uint8 `binapi:"u8,name=scope" json:"scope,omitempty"`
- Tag []byte `binapi:"u8[64],name=tag" json:"tag,omitempty"`
-}
-
-func (m *SessionRuleAddDel) Reset() { *m = SessionRuleAddDel{} }
-func (*SessionRuleAddDel) GetMessageName() string { return "session_rule_add_del" }
-func (*SessionRuleAddDel) GetCrcString() string { return "4ab2eb06" }
-func (*SessionRuleAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SessionRuleAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.TransportProto
- size += 1 // m.IsIP4
- size += 1 * 16 // m.LclIP
- size += 1 // m.LclPlen
- size += 1 * 16 // m.RmtIP
- size += 1 // m.RmtPlen
- size += 2 // m.LclPort
- size += 2 // m.RmtPort
- size += 4 // m.ActionIndex
- size += 1 // m.IsAdd
- size += 4 // m.AppnsIndex
- size += 1 // m.Scope
- size += 1 * 64 // m.Tag
- return size
-}
-func (m *SessionRuleAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.TransportProto)
- buf.EncodeUint8(m.IsIP4)
- buf.EncodeBytes(m.LclIP, 16)
- buf.EncodeUint8(m.LclPlen)
- buf.EncodeBytes(m.RmtIP, 16)
- buf.EncodeUint8(m.RmtPlen)
- buf.EncodeUint16(m.LclPort)
- buf.EncodeUint16(m.RmtPort)
- buf.EncodeUint32(m.ActionIndex)
- buf.EncodeUint8(m.IsAdd)
- buf.EncodeUint32(m.AppnsIndex)
- buf.EncodeUint8(m.Scope)
- buf.EncodeBytes(m.Tag, 64)
- return buf.Bytes(), nil
-}
-func (m *SessionRuleAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.TransportProto = buf.DecodeUint8()
- m.IsIP4 = buf.DecodeUint8()
- m.LclIP = make([]byte, 16)
- copy(m.LclIP, buf.DecodeBytes(len(m.LclIP)))
- m.LclPlen = buf.DecodeUint8()
- m.RmtIP = make([]byte, 16)
- copy(m.RmtIP, buf.DecodeBytes(len(m.RmtIP)))
- m.RmtPlen = buf.DecodeUint8()
- m.LclPort = buf.DecodeUint16()
- m.RmtPort = buf.DecodeUint16()
- m.ActionIndex = buf.DecodeUint32()
- m.IsAdd = buf.DecodeUint8()
- m.AppnsIndex = buf.DecodeUint32()
- m.Scope = buf.DecodeUint8()
- m.Tag = make([]byte, 64)
- copy(m.Tag, buf.DecodeBytes(len(m.Tag)))
- return nil
-}
-
-// SessionRuleAddDelReply defines message 'session_rule_add_del_reply'.
-type SessionRuleAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SessionRuleAddDelReply) Reset() { *m = SessionRuleAddDelReply{} }
-func (*SessionRuleAddDelReply) GetMessageName() string { return "session_rule_add_del_reply" }
-func (*SessionRuleAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*SessionRuleAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SessionRuleAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SessionRuleAddDelReply) 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 *SessionRuleAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SessionRulesDetails defines message 'session_rules_details'.
-type SessionRulesDetails struct {
- TransportProto uint8 `binapi:"u8,name=transport_proto" json:"transport_proto,omitempty"`
- IsIP4 uint8 `binapi:"u8,name=is_ip4" json:"is_ip4,omitempty"`
- LclIP []byte `binapi:"u8[16],name=lcl_ip" json:"lcl_ip,omitempty"`
- LclPlen uint8 `binapi:"u8,name=lcl_plen" json:"lcl_plen,omitempty"`
- RmtIP []byte `binapi:"u8[16],name=rmt_ip" json:"rmt_ip,omitempty"`
- RmtPlen uint8 `binapi:"u8,name=rmt_plen" json:"rmt_plen,omitempty"`
- LclPort uint16 `binapi:"u16,name=lcl_port" json:"lcl_port,omitempty"`
- RmtPort uint16 `binapi:"u16,name=rmt_port" json:"rmt_port,omitempty"`
- ActionIndex uint32 `binapi:"u32,name=action_index" json:"action_index,omitempty"`
- AppnsIndex uint32 `binapi:"u32,name=appns_index" json:"appns_index,omitempty"`
- Scope uint8 `binapi:"u8,name=scope" json:"scope,omitempty"`
- Tag []byte `binapi:"u8[64],name=tag" json:"tag,omitempty"`
-}
-
-func (m *SessionRulesDetails) Reset() { *m = SessionRulesDetails{} }
-func (*SessionRulesDetails) GetMessageName() string { return "session_rules_details" }
-func (*SessionRulesDetails) GetCrcString() string { return "a52b0e96" }
-func (*SessionRulesDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SessionRulesDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.TransportProto
- size += 1 // m.IsIP4
- size += 1 * 16 // m.LclIP
- size += 1 // m.LclPlen
- size += 1 * 16 // m.RmtIP
- size += 1 // m.RmtPlen
- size += 2 // m.LclPort
- size += 2 // m.RmtPort
- size += 4 // m.ActionIndex
- size += 4 // m.AppnsIndex
- size += 1 // m.Scope
- size += 1 * 64 // m.Tag
- return size
-}
-func (m *SessionRulesDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.TransportProto)
- buf.EncodeUint8(m.IsIP4)
- buf.EncodeBytes(m.LclIP, 16)
- buf.EncodeUint8(m.LclPlen)
- buf.EncodeBytes(m.RmtIP, 16)
- buf.EncodeUint8(m.RmtPlen)
- buf.EncodeUint16(m.LclPort)
- buf.EncodeUint16(m.RmtPort)
- buf.EncodeUint32(m.ActionIndex)
- buf.EncodeUint32(m.AppnsIndex)
- buf.EncodeUint8(m.Scope)
- buf.EncodeBytes(m.Tag, 64)
- return buf.Bytes(), nil
-}
-func (m *SessionRulesDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.TransportProto = buf.DecodeUint8()
- m.IsIP4 = buf.DecodeUint8()
- m.LclIP = make([]byte, 16)
- copy(m.LclIP, buf.DecodeBytes(len(m.LclIP)))
- m.LclPlen = buf.DecodeUint8()
- m.RmtIP = make([]byte, 16)
- copy(m.RmtIP, buf.DecodeBytes(len(m.RmtIP)))
- m.RmtPlen = buf.DecodeUint8()
- m.LclPort = buf.DecodeUint16()
- m.RmtPort = buf.DecodeUint16()
- m.ActionIndex = buf.DecodeUint32()
- m.AppnsIndex = buf.DecodeUint32()
- m.Scope = buf.DecodeUint8()
- m.Tag = make([]byte, 64)
- copy(m.Tag, buf.DecodeBytes(len(m.Tag)))
- return nil
-}
-
-// SessionRulesDump defines message 'session_rules_dump'.
-type SessionRulesDump struct{}
-
-func (m *SessionRulesDump) Reset() { *m = SessionRulesDump{} }
-func (*SessionRulesDump) GetMessageName() string { return "session_rules_dump" }
-func (*SessionRulesDump) GetCrcString() string { return "51077d14" }
-func (*SessionRulesDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SessionRulesDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *SessionRulesDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *SessionRulesDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// UnbindSock defines message 'unbind_sock'.
-type UnbindSock struct {
- WrkIndex uint32 `binapi:"u32,name=wrk_index" json:"wrk_index,omitempty"`
- Handle uint64 `binapi:"u64,name=handle" json:"handle,omitempty"`
-}
-
-func (m *UnbindSock) Reset() { *m = UnbindSock{} }
-func (*UnbindSock) GetMessageName() string { return "unbind_sock" }
-func (*UnbindSock) GetCrcString() string { return "08880908" }
-func (*UnbindSock) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *UnbindSock) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.WrkIndex
- size += 8 // m.Handle
- return size
-}
-func (m *UnbindSock) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.WrkIndex)
- buf.EncodeUint64(m.Handle)
- return buf.Bytes(), nil
-}
-func (m *UnbindSock) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.WrkIndex = buf.DecodeUint32()
- m.Handle = buf.DecodeUint64()
- return nil
-}
-
-// UnbindSockReply defines message 'unbind_sock_reply'.
-type UnbindSockReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *UnbindSockReply) Reset() { *m = UnbindSockReply{} }
-func (*UnbindSockReply) GetMessageName() string { return "unbind_sock_reply" }
-func (*UnbindSockReply) GetCrcString() string { return "e8d4e804" }
-func (*UnbindSockReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *UnbindSockReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *UnbindSockReply) 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 *UnbindSockReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// UnbindURI defines message 'unbind_uri'.
-type UnbindURI struct {
- URI []byte `binapi:"u8[128],name=uri" json:"uri,omitempty"`
-}
-
-func (m *UnbindURI) Reset() { *m = UnbindURI{} }
-func (*UnbindURI) GetMessageName() string { return "unbind_uri" }
-func (*UnbindURI) GetCrcString() string { return "294cf07d" }
-func (*UnbindURI) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *UnbindURI) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 128 // m.URI
- return size
-}
-func (m *UnbindURI) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.URI, 128)
- return buf.Bytes(), nil
-}
-func (m *UnbindURI) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.URI = make([]byte, 128)
- copy(m.URI, buf.DecodeBytes(len(m.URI)))
- return nil
-}
-
-// UnbindURIReply defines message 'unbind_uri_reply'.
-type UnbindURIReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *UnbindURIReply) Reset() { *m = UnbindURIReply{} }
-func (*UnbindURIReply) GetMessageName() string { return "unbind_uri_reply" }
-func (*UnbindURIReply) GetCrcString() string { return "e8d4e804" }
-func (*UnbindURIReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *UnbindURIReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *UnbindURIReply) 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 *UnbindURIReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// UnmapSegment defines message 'unmap_segment'.
-type UnmapSegment struct {
- SegmentHandle uint64 `binapi:"u64,name=segment_handle" json:"segment_handle,omitempty"`
-}
-
-func (m *UnmapSegment) Reset() { *m = UnmapSegment{} }
-func (*UnmapSegment) GetMessageName() string { return "unmap_segment" }
-func (*UnmapSegment) GetCrcString() string { return "f77096f6" }
-func (*UnmapSegment) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *UnmapSegment) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 8 // m.SegmentHandle
- return size
-}
-func (m *UnmapSegment) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint64(m.SegmentHandle)
- return buf.Bytes(), nil
-}
-func (m *UnmapSegment) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SegmentHandle = buf.DecodeUint64()
- return nil
-}
-
-// UnmapSegmentReply defines message 'unmap_segment_reply'.
-type UnmapSegmentReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *UnmapSegmentReply) Reset() { *m = UnmapSegmentReply{} }
-func (*UnmapSegmentReply) GetMessageName() string { return "unmap_segment_reply" }
-func (*UnmapSegmentReply) GetCrcString() string { return "e8d4e804" }
-func (*UnmapSegmentReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *UnmapSegmentReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *UnmapSegmentReply) 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 *UnmapSegmentReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_session_binapi_init() }
-func file_session_binapi_init() {
- api.RegisterMessage((*AppAddCertKeyPair)(nil), "app_add_cert_key_pair_02eb8016")
- api.RegisterMessage((*AppAddCertKeyPairReply)(nil), "app_add_cert_key_pair_reply_b42958d0")
- api.RegisterMessage((*AppAttach)(nil), "app_attach_ed08f4bd")
- api.RegisterMessage((*AppAttachReply)(nil), "app_attach_reply_0112f647")
- api.RegisterMessage((*AppCutThroughRegistrationAdd)(nil), "app_cut_through_registration_add_6d73b1b9")
- api.RegisterMessage((*AppCutThroughRegistrationAddReply)(nil), "app_cut_through_registration_add_reply_e8d4e804")
- api.RegisterMessage((*AppDelCertKeyPair)(nil), "app_del_cert_key_pair_8ac76db6")
- api.RegisterMessage((*AppDelCertKeyPairReply)(nil), "app_del_cert_key_pair_reply_e8d4e804")
- api.RegisterMessage((*AppNamespaceAddDel)(nil), "app_namespace_add_del_dd074c65")
- api.RegisterMessage((*AppNamespaceAddDelReply)(nil), "app_namespace_add_del_reply_85137120")
- api.RegisterMessage((*AppWorkerAddDel)(nil), "app_worker_add_del_6d2b2279")
- api.RegisterMessage((*AppWorkerAddDelReply)(nil), "app_worker_add_del_reply_56b21abc")
- api.RegisterMessage((*ApplicationAttach)(nil), "application_attach_81d4f974")
- api.RegisterMessage((*ApplicationAttachReply)(nil), "application_attach_reply_581866e8")
- api.RegisterMessage((*ApplicationDetach)(nil), "application_detach_51077d14")
- api.RegisterMessage((*ApplicationDetachReply)(nil), "application_detach_reply_e8d4e804")
- api.RegisterMessage((*ApplicationTLSCertAdd)(nil), "application_tls_cert_add_3f5cfe45")
- api.RegisterMessage((*ApplicationTLSCertAddReply)(nil), "application_tls_cert_add_reply_e8d4e804")
- api.RegisterMessage((*ApplicationTLSKeyAdd)(nil), "application_tls_key_add_5eaf70cd")
- api.RegisterMessage((*ApplicationTLSKeyAddReply)(nil), "application_tls_key_add_reply_e8d4e804")
- api.RegisterMessage((*BindSock)(nil), "bind_sock_0394633f")
- api.RegisterMessage((*BindSockReply)(nil), "bind_sock_reply_e8d4e804")
- api.RegisterMessage((*BindURI)(nil), "bind_uri_fae140cb")
- api.RegisterMessage((*BindURIReply)(nil), "bind_uri_reply_e8d4e804")
- api.RegisterMessage((*ConnectSock)(nil), "connect_sock_d2b460ca")
- api.RegisterMessage((*ConnectSockReply)(nil), "connect_sock_reply_e8d4e804")
- api.RegisterMessage((*ConnectURI)(nil), "connect_uri_a36143d6")
- api.RegisterMessage((*ConnectURIReply)(nil), "connect_uri_reply_e8d4e804")
- api.RegisterMessage((*DisconnectSession)(nil), "disconnect_session_7279205b")
- api.RegisterMessage((*DisconnectSessionReply)(nil), "disconnect_session_reply_d6960a03")
- api.RegisterMessage((*MapAnotherSegment)(nil), "map_another_segment_dc2d630b")
- api.RegisterMessage((*MapAnotherSegmentReply)(nil), "map_another_segment_reply_e8d4e804")
- api.RegisterMessage((*SessionEnableDisable)(nil), "session_enable_disable_30ac9be7")
- api.RegisterMessage((*SessionEnableDisableReply)(nil), "session_enable_disable_reply_e8d4e804")
- api.RegisterMessage((*SessionRuleAddDel)(nil), "session_rule_add_del_4ab2eb06")
- api.RegisterMessage((*SessionRuleAddDelReply)(nil), "session_rule_add_del_reply_e8d4e804")
- api.RegisterMessage((*SessionRulesDetails)(nil), "session_rules_details_a52b0e96")
- api.RegisterMessage((*SessionRulesDump)(nil), "session_rules_dump_51077d14")
- api.RegisterMessage((*UnbindSock)(nil), "unbind_sock_08880908")
- api.RegisterMessage((*UnbindSockReply)(nil), "unbind_sock_reply_e8d4e804")
- api.RegisterMessage((*UnbindURI)(nil), "unbind_uri_294cf07d")
- api.RegisterMessage((*UnbindURIReply)(nil), "unbind_uri_reply_e8d4e804")
- api.RegisterMessage((*UnmapSegment)(nil), "unmap_segment_f77096f6")
- api.RegisterMessage((*UnmapSegmentReply)(nil), "unmap_segment_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*AppAddCertKeyPair)(nil),
- (*AppAddCertKeyPairReply)(nil),
- (*AppAttach)(nil),
- (*AppAttachReply)(nil),
- (*AppCutThroughRegistrationAdd)(nil),
- (*AppCutThroughRegistrationAddReply)(nil),
- (*AppDelCertKeyPair)(nil),
- (*AppDelCertKeyPairReply)(nil),
- (*AppNamespaceAddDel)(nil),
- (*AppNamespaceAddDelReply)(nil),
- (*AppWorkerAddDel)(nil),
- (*AppWorkerAddDelReply)(nil),
- (*ApplicationAttach)(nil),
- (*ApplicationAttachReply)(nil),
- (*ApplicationDetach)(nil),
- (*ApplicationDetachReply)(nil),
- (*ApplicationTLSCertAdd)(nil),
- (*ApplicationTLSCertAddReply)(nil),
- (*ApplicationTLSKeyAdd)(nil),
- (*ApplicationTLSKeyAddReply)(nil),
- (*BindSock)(nil),
- (*BindSockReply)(nil),
- (*BindURI)(nil),
- (*BindURIReply)(nil),
- (*ConnectSock)(nil),
- (*ConnectSockReply)(nil),
- (*ConnectURI)(nil),
- (*ConnectURIReply)(nil),
- (*DisconnectSession)(nil),
- (*DisconnectSessionReply)(nil),
- (*MapAnotherSegment)(nil),
- (*MapAnotherSegmentReply)(nil),
- (*SessionEnableDisable)(nil),
- (*SessionEnableDisableReply)(nil),
- (*SessionRuleAddDel)(nil),
- (*SessionRuleAddDelReply)(nil),
- (*SessionRulesDetails)(nil),
- (*SessionRulesDump)(nil),
- (*UnbindSock)(nil),
- (*UnbindSockReply)(nil),
- (*UnbindURI)(nil),
- (*UnbindURIReply)(nil),
- (*UnmapSegment)(nil),
- (*UnmapSegmentReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/session/session_rpc.ba.go b/internal/testbinapi/binapi2001/session/session_rpc.ba.go
deleted file mode 100644
index 9910c24..0000000
--- a/internal/testbinapi/binapi2001/session/session_rpc.ba.go
+++ /dev/null
@@ -1,278 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package session
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service session.
-type RPCService interface {
- AppAddCertKeyPair(ctx context.Context, in *AppAddCertKeyPair) (*AppAddCertKeyPairReply, error)
- AppAttach(ctx context.Context, in *AppAttach) (*AppAttachReply, error)
- AppCutThroughRegistrationAdd(ctx context.Context, in *AppCutThroughRegistrationAdd) (*AppCutThroughRegistrationAddReply, error)
- AppDelCertKeyPair(ctx context.Context, in *AppDelCertKeyPair) (*AppDelCertKeyPairReply, error)
- AppNamespaceAddDel(ctx context.Context, in *AppNamespaceAddDel) (*AppNamespaceAddDelReply, error)
- AppWorkerAddDel(ctx context.Context, in *AppWorkerAddDel) (*AppWorkerAddDelReply, error)
- ApplicationAttach(ctx context.Context, in *ApplicationAttach) (*ApplicationAttachReply, error)
- ApplicationDetach(ctx context.Context, in *ApplicationDetach) (*ApplicationDetachReply, error)
- ApplicationTLSCertAdd(ctx context.Context, in *ApplicationTLSCertAdd) (*ApplicationTLSCertAddReply, error)
- ApplicationTLSKeyAdd(ctx context.Context, in *ApplicationTLSKeyAdd) (*ApplicationTLSKeyAddReply, error)
- BindSock(ctx context.Context, in *BindSock) (*BindSockReply, error)
- BindURI(ctx context.Context, in *BindURI) (*BindURIReply, error)
- ConnectSock(ctx context.Context, in *ConnectSock) (*ConnectSockReply, error)
- ConnectURI(ctx context.Context, in *ConnectURI) (*ConnectURIReply, error)
- DisconnectSession(ctx context.Context, in *DisconnectSession) (*DisconnectSessionReply, error)
- MapAnotherSegment(ctx context.Context, in *MapAnotherSegment) (*MapAnotherSegmentReply, error)
- SessionEnableDisable(ctx context.Context, in *SessionEnableDisable) (*SessionEnableDisableReply, error)
- SessionRuleAddDel(ctx context.Context, in *SessionRuleAddDel) (*SessionRuleAddDelReply, error)
- SessionRulesDump(ctx context.Context, in *SessionRulesDump) (RPCService_SessionRulesDumpClient, error)
- UnbindSock(ctx context.Context, in *UnbindSock) (*UnbindSockReply, error)
- UnbindURI(ctx context.Context, in *UnbindURI) (*UnbindURIReply, error)
- UnmapSegment(ctx context.Context, in *UnmapSegment) (*UnmapSegmentReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) AppAddCertKeyPair(ctx context.Context, in *AppAddCertKeyPair) (*AppAddCertKeyPairReply, error) {
- out := new(AppAddCertKeyPairReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) AppAttach(ctx context.Context, in *AppAttach) (*AppAttachReply, error) {
- out := new(AppAttachReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) AppCutThroughRegistrationAdd(ctx context.Context, in *AppCutThroughRegistrationAdd) (*AppCutThroughRegistrationAddReply, error) {
- out := new(AppCutThroughRegistrationAddReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) AppDelCertKeyPair(ctx context.Context, in *AppDelCertKeyPair) (*AppDelCertKeyPairReply, error) {
- out := new(AppDelCertKeyPairReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) AppNamespaceAddDel(ctx context.Context, in *AppNamespaceAddDel) (*AppNamespaceAddDelReply, error) {
- out := new(AppNamespaceAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) AppWorkerAddDel(ctx context.Context, in *AppWorkerAddDel) (*AppWorkerAddDelReply, error) {
- out := new(AppWorkerAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) ApplicationAttach(ctx context.Context, in *ApplicationAttach) (*ApplicationAttachReply, error) {
- out := new(ApplicationAttachReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) ApplicationDetach(ctx context.Context, in *ApplicationDetach) (*ApplicationDetachReply, error) {
- out := new(ApplicationDetachReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) ApplicationTLSCertAdd(ctx context.Context, in *ApplicationTLSCertAdd) (*ApplicationTLSCertAddReply, error) {
- out := new(ApplicationTLSCertAddReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) ApplicationTLSKeyAdd(ctx context.Context, in *ApplicationTLSKeyAdd) (*ApplicationTLSKeyAddReply, error) {
- out := new(ApplicationTLSKeyAddReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) BindSock(ctx context.Context, in *BindSock) (*BindSockReply, error) {
- out := new(BindSockReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) BindURI(ctx context.Context, in *BindURI) (*BindURIReply, error) {
- out := new(BindURIReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) ConnectSock(ctx context.Context, in *ConnectSock) (*ConnectSockReply, error) {
- out := new(ConnectSockReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) ConnectURI(ctx context.Context, in *ConnectURI) (*ConnectURIReply, error) {
- out := new(ConnectURIReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) DisconnectSession(ctx context.Context, in *DisconnectSession) (*DisconnectSessionReply, error) {
- out := new(DisconnectSessionReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) MapAnotherSegment(ctx context.Context, in *MapAnotherSegment) (*MapAnotherSegmentReply, error) {
- out := new(MapAnotherSegmentReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SessionEnableDisable(ctx context.Context, in *SessionEnableDisable) (*SessionEnableDisableReply, error) {
- out := new(SessionEnableDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SessionRuleAddDel(ctx context.Context, in *SessionRuleAddDel) (*SessionRuleAddDelReply, error) {
- out := new(SessionRuleAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SessionRulesDump(ctx context.Context, in *SessionRulesDump) (RPCService_SessionRulesDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_SessionRulesDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_SessionRulesDumpClient interface {
- Recv() (*SessionRulesDetails, error)
- api.Stream
-}
-
-type serviceClient_SessionRulesDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_SessionRulesDumpClient) Recv() (*SessionRulesDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *SessionRulesDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) UnbindSock(ctx context.Context, in *UnbindSock) (*UnbindSockReply, error) {
- out := new(UnbindSockReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) UnbindURI(ctx context.Context, in *UnbindURI) (*UnbindURIReply, error) {
- out := new(UnbindURIReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) UnmapSegment(ctx context.Context, in *UnmapSegment) (*UnmapSegmentReply, error) {
- out := new(UnmapSegmentReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/span/span.ba.go b/internal/testbinapi/binapi2001/span/span.ba.go
deleted file mode 100644
index f7ef2a3..0000000
--- a/internal/testbinapi/binapi2001/span/span.ba.go
+++ /dev/null
@@ -1,207 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/span.api.json
-
-// Package span contains generated bindings for API file span.api.
-//
-// Contents:
-// 4 messages
-//
-package span
-
-import (
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the GoVPP api package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// GoVPP api package needs to be updated.
-const _ = api.GoVppAPIPackageIsVersion2
-
-const (
- APIFile = "span"
- APIVersion = "1.0.0"
- VersionCrc = 0x10769b5
-)
-
-// SwInterfaceSpanDetails defines message 'sw_interface_span_details'.
-type SwInterfaceSpanDetails struct {
- SwIfIndexFrom uint32 `binapi:"u32,name=sw_if_index_from" json:"sw_if_index_from,omitempty"`
- SwIfIndexTo uint32 `binapi:"u32,name=sw_if_index_to" json:"sw_if_index_to,omitempty"`
- State uint8 `binapi:"u8,name=state" json:"state,omitempty"`
- IsL2 uint8 `binapi:"u8,name=is_l2" json:"is_l2,omitempty"`
-}
-
-func (m *SwInterfaceSpanDetails) Reset() { *m = SwInterfaceSpanDetails{} }
-func (*SwInterfaceSpanDetails) GetMessageName() string { return "sw_interface_span_details" }
-func (*SwInterfaceSpanDetails) GetCrcString() string { return "23966371" }
-func (*SwInterfaceSpanDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SwInterfaceSpanDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndexFrom
- size += 4 // m.SwIfIndexTo
- size += 1 // m.State
- size += 1 // m.IsL2
- return size
-}
-func (m *SwInterfaceSpanDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.SwIfIndexFrom)
- buf.EncodeUint32(m.SwIfIndexTo)
- buf.EncodeUint8(m.State)
- buf.EncodeUint8(m.IsL2)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceSpanDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndexFrom = buf.DecodeUint32()
- m.SwIfIndexTo = buf.DecodeUint32()
- m.State = buf.DecodeUint8()
- m.IsL2 = buf.DecodeUint8()
- return nil
-}
-
-// SwInterfaceSpanDump defines message 'sw_interface_span_dump'.
-type SwInterfaceSpanDump struct {
- IsL2 uint8 `binapi:"u8,name=is_l2" json:"is_l2,omitempty"`
-}
-
-func (m *SwInterfaceSpanDump) Reset() { *m = SwInterfaceSpanDump{} }
-func (*SwInterfaceSpanDump) GetMessageName() string { return "sw_interface_span_dump" }
-func (*SwInterfaceSpanDump) GetCrcString() string { return "67c54650" }
-func (*SwInterfaceSpanDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceSpanDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsL2
- return size
-}
-func (m *SwInterfaceSpanDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsL2)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceSpanDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsL2 = buf.DecodeUint8()
- return nil
-}
-
-// SwInterfaceSpanEnableDisable defines message 'sw_interface_span_enable_disable'.
-type SwInterfaceSpanEnableDisable struct {
- SwIfIndexFrom uint32 `binapi:"u32,name=sw_if_index_from" json:"sw_if_index_from,omitempty"`
- SwIfIndexTo uint32 `binapi:"u32,name=sw_if_index_to" json:"sw_if_index_to,omitempty"`
- State uint8 `binapi:"u8,name=state" json:"state,omitempty"`
- IsL2 uint8 `binapi:"u8,name=is_l2" json:"is_l2,omitempty"`
-}
-
-func (m *SwInterfaceSpanEnableDisable) Reset() { *m = SwInterfaceSpanEnableDisable{} }
-func (*SwInterfaceSpanEnableDisable) GetMessageName() string {
- return "sw_interface_span_enable_disable"
-}
-func (*SwInterfaceSpanEnableDisable) GetCrcString() string { return "7216258d" }
-func (*SwInterfaceSpanEnableDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceSpanEnableDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndexFrom
- size += 4 // m.SwIfIndexTo
- size += 1 // m.State
- size += 1 // m.IsL2
- return size
-}
-func (m *SwInterfaceSpanEnableDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.SwIfIndexFrom)
- buf.EncodeUint32(m.SwIfIndexTo)
- buf.EncodeUint8(m.State)
- buf.EncodeUint8(m.IsL2)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceSpanEnableDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndexFrom = buf.DecodeUint32()
- m.SwIfIndexTo = buf.DecodeUint32()
- m.State = buf.DecodeUint8()
- m.IsL2 = buf.DecodeUint8()
- return nil
-}
-
-// SwInterfaceSpanEnableDisableReply defines message 'sw_interface_span_enable_disable_reply'.
-type SwInterfaceSpanEnableDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SwInterfaceSpanEnableDisableReply) Reset() { *m = SwInterfaceSpanEnableDisableReply{} }
-func (*SwInterfaceSpanEnableDisableReply) GetMessageName() string {
- return "sw_interface_span_enable_disable_reply"
-}
-func (*SwInterfaceSpanEnableDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*SwInterfaceSpanEnableDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SwInterfaceSpanEnableDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SwInterfaceSpanEnableDisableReply) 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 *SwInterfaceSpanEnableDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_span_binapi_init() }
-func file_span_binapi_init() {
- api.RegisterMessage((*SwInterfaceSpanDetails)(nil), "sw_interface_span_details_23966371")
- api.RegisterMessage((*SwInterfaceSpanDump)(nil), "sw_interface_span_dump_67c54650")
- api.RegisterMessage((*SwInterfaceSpanEnableDisable)(nil), "sw_interface_span_enable_disable_7216258d")
- api.RegisterMessage((*SwInterfaceSpanEnableDisableReply)(nil), "sw_interface_span_enable_disable_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*SwInterfaceSpanDetails)(nil),
- (*SwInterfaceSpanDump)(nil),
- (*SwInterfaceSpanEnableDisable)(nil),
- (*SwInterfaceSpanEnableDisableReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/span/span_rpc.ba.go b/internal/testbinapi/binapi2001/span/span_rpc.ba.go
deleted file mode 100644
index bea9950..0000000
--- a/internal/testbinapi/binapi2001/span/span_rpc.ba.go
+++ /dev/null
@@ -1,78 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package span
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service span.
-type RPCService interface {
- SwInterfaceSpanDump(ctx context.Context, in *SwInterfaceSpanDump) (RPCService_SwInterfaceSpanDumpClient, error)
- SwInterfaceSpanEnableDisable(ctx context.Context, in *SwInterfaceSpanEnableDisable) (*SwInterfaceSpanEnableDisableReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) SwInterfaceSpanDump(ctx context.Context, in *SwInterfaceSpanDump) (RPCService_SwInterfaceSpanDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_SwInterfaceSpanDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_SwInterfaceSpanDumpClient interface {
- Recv() (*SwInterfaceSpanDetails, error)
- api.Stream
-}
-
-type serviceClient_SwInterfaceSpanDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_SwInterfaceSpanDumpClient) Recv() (*SwInterfaceSpanDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *SwInterfaceSpanDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) SwInterfaceSpanEnableDisable(ctx context.Context, in *SwInterfaceSpanEnableDisable) (*SwInterfaceSpanEnableDisableReply, error) {
- out := new(SwInterfaceSpanEnableDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/sr/sr.ba.go b/internal/testbinapi/binapi2001/sr/sr.ba.go
deleted file mode 100644
index a8d63b9..0000000
--- a/internal/testbinapi/binapi2001/sr/sr.ba.go
+++ /dev/null
@@ -1,985 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/sr.api.json
-
-// Package sr contains generated bindings for API file sr.api.
-//
-// Contents:
-// 3 structs
-// 20 messages
-//
-package sr
-
-import (
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the GoVPP api package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// GoVPP api package needs to be updated.
-const _ = api.GoVppAPIPackageIsVersion2
-
-const (
- APIFile = "sr"
- APIVersion = "1.2.0"
- VersionCrc = 0xbf277f96
-)
-
-// SrIP6Address defines type 'sr_ip6_address'.
-type SrIP6Address struct {
- Data []byte `binapi:"u8[16],name=data" json:"data,omitempty"`
-}
-
-// Srv6Sid defines type 'srv6_sid'.
-type Srv6Sid struct {
- Addr []byte `binapi:"u8[16],name=addr" json:"addr,omitempty"`
-}
-
-// Srv6SidList defines type 'srv6_sid_list'.
-type Srv6SidList struct {
- NumSids uint8 `binapi:"u8,name=num_sids" json:"num_sids,omitempty"`
- Weight uint32 `binapi:"u32,name=weight" json:"weight,omitempty"`
- Sids [16]Srv6Sid `binapi:"srv6_sid[16],name=sids" json:"sids,omitempty"`
-}
-
-// SrLocalsidAddDel defines message 'sr_localsid_add_del'.
-type SrLocalsidAddDel struct {
- IsDel uint8 `binapi:"u8,name=is_del" json:"is_del,omitempty"`
- Localsid Srv6Sid `binapi:"srv6_sid,name=localsid" json:"localsid,omitempty"`
- EndPsp uint8 `binapi:"u8,name=end_psp" json:"end_psp,omitempty"`
- Behavior uint8 `binapi:"u8,name=behavior" json:"behavior,omitempty"`
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- VlanIndex uint32 `binapi:"u32,name=vlan_index" json:"vlan_index,omitempty"`
- FibTable uint32 `binapi:"u32,name=fib_table" json:"fib_table,omitempty"`
- NhAddr6 []byte `binapi:"u8[16],name=nh_addr6" json:"nh_addr6,omitempty"`
- NhAddr4 []byte `binapi:"u8[4],name=nh_addr4" json:"nh_addr4,omitempty"`
-}
-
-func (m *SrLocalsidAddDel) Reset() { *m = SrLocalsidAddDel{} }
-func (*SrLocalsidAddDel) GetMessageName() string { return "sr_localsid_add_del" }
-func (*SrLocalsidAddDel) GetCrcString() string { return "b30489eb" }
-func (*SrLocalsidAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SrLocalsidAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsDel
- size += 1 * 16 // m.Localsid.Addr
- size += 1 // m.EndPsp
- size += 1 // m.Behavior
- size += 4 // m.SwIfIndex
- size += 4 // m.VlanIndex
- size += 4 // m.FibTable
- size += 1 * 16 // m.NhAddr6
- size += 1 * 4 // m.NhAddr4
- return size
-}
-func (m *SrLocalsidAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsDel)
- buf.EncodeBytes(m.Localsid.Addr, 16)
- buf.EncodeUint8(m.EndPsp)
- buf.EncodeUint8(m.Behavior)
- buf.EncodeUint32(m.SwIfIndex)
- buf.EncodeUint32(m.VlanIndex)
- buf.EncodeUint32(m.FibTable)
- buf.EncodeBytes(m.NhAddr6, 16)
- buf.EncodeBytes(m.NhAddr4, 4)
- return buf.Bytes(), nil
-}
-func (m *SrLocalsidAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsDel = buf.DecodeUint8()
- m.Localsid.Addr = make([]byte, 16)
- copy(m.Localsid.Addr, buf.DecodeBytes(len(m.Localsid.Addr)))
- m.EndPsp = buf.DecodeUint8()
- m.Behavior = buf.DecodeUint8()
- m.SwIfIndex = buf.DecodeUint32()
- m.VlanIndex = buf.DecodeUint32()
- m.FibTable = buf.DecodeUint32()
- m.NhAddr6 = make([]byte, 16)
- copy(m.NhAddr6, buf.DecodeBytes(len(m.NhAddr6)))
- m.NhAddr4 = make([]byte, 4)
- copy(m.NhAddr4, buf.DecodeBytes(len(m.NhAddr4)))
- return nil
-}
-
-// SrLocalsidAddDelReply defines message 'sr_localsid_add_del_reply'.
-type SrLocalsidAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SrLocalsidAddDelReply) Reset() { *m = SrLocalsidAddDelReply{} }
-func (*SrLocalsidAddDelReply) GetMessageName() string { return "sr_localsid_add_del_reply" }
-func (*SrLocalsidAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*SrLocalsidAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SrLocalsidAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SrLocalsidAddDelReply) 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 *SrLocalsidAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SrLocalsidsDetails defines message 'sr_localsids_details'.
-type SrLocalsidsDetails struct {
- Addr Srv6Sid `binapi:"srv6_sid,name=addr" json:"addr,omitempty"`
- EndPsp uint8 `binapi:"u8,name=end_psp" json:"end_psp,omitempty"`
- Behavior uint16 `binapi:"u16,name=behavior" json:"behavior,omitempty"`
- FibTable uint32 `binapi:"u32,name=fib_table" json:"fib_table,omitempty"`
- VlanIndex uint32 `binapi:"u32,name=vlan_index" json:"vlan_index,omitempty"`
- XconnectNhAddr6 []byte `binapi:"u8[16],name=xconnect_nh_addr6" json:"xconnect_nh_addr6,omitempty"`
- XconnectNhAddr4 []byte `binapi:"u8[4],name=xconnect_nh_addr4" json:"xconnect_nh_addr4,omitempty"`
- XconnectIfaceOrVrfTable uint32 `binapi:"u32,name=xconnect_iface_or_vrf_table" json:"xconnect_iface_or_vrf_table,omitempty"`
-}
-
-func (m *SrLocalsidsDetails) Reset() { *m = SrLocalsidsDetails{} }
-func (*SrLocalsidsDetails) GetMessageName() string { return "sr_localsids_details" }
-func (*SrLocalsidsDetails) GetCrcString() string { return "0791babc" }
-func (*SrLocalsidsDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SrLocalsidsDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 16 // m.Addr.Addr
- size += 1 // m.EndPsp
- size += 2 // m.Behavior
- size += 4 // m.FibTable
- size += 4 // m.VlanIndex
- size += 1 * 16 // m.XconnectNhAddr6
- size += 1 * 4 // m.XconnectNhAddr4
- size += 4 // m.XconnectIfaceOrVrfTable
- return size
-}
-func (m *SrLocalsidsDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.Addr.Addr, 16)
- buf.EncodeUint8(m.EndPsp)
- buf.EncodeUint16(m.Behavior)
- buf.EncodeUint32(m.FibTable)
- buf.EncodeUint32(m.VlanIndex)
- buf.EncodeBytes(m.XconnectNhAddr6, 16)
- buf.EncodeBytes(m.XconnectNhAddr4, 4)
- buf.EncodeUint32(m.XconnectIfaceOrVrfTable)
- return buf.Bytes(), nil
-}
-func (m *SrLocalsidsDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Addr.Addr = make([]byte, 16)
- copy(m.Addr.Addr, buf.DecodeBytes(len(m.Addr.Addr)))
- m.EndPsp = buf.DecodeUint8()
- m.Behavior = buf.DecodeUint16()
- m.FibTable = buf.DecodeUint32()
- m.VlanIndex = buf.DecodeUint32()
- m.XconnectNhAddr6 = make([]byte, 16)
- copy(m.XconnectNhAddr6, buf.DecodeBytes(len(m.XconnectNhAddr6)))
- m.XconnectNhAddr4 = make([]byte, 4)
- copy(m.XconnectNhAddr4, buf.DecodeBytes(len(m.XconnectNhAddr4)))
- m.XconnectIfaceOrVrfTable = buf.DecodeUint32()
- return nil
-}
-
-// SrLocalsidsDump defines message 'sr_localsids_dump'.
-type SrLocalsidsDump struct{}
-
-func (m *SrLocalsidsDump) Reset() { *m = SrLocalsidsDump{} }
-func (*SrLocalsidsDump) GetMessageName() string { return "sr_localsids_dump" }
-func (*SrLocalsidsDump) GetCrcString() string { return "51077d14" }
-func (*SrLocalsidsDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SrLocalsidsDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *SrLocalsidsDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *SrLocalsidsDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// SrPoliciesDetails defines message 'sr_policies_details'.
-type SrPoliciesDetails struct {
- Bsid Srv6Sid `binapi:"srv6_sid,name=bsid" json:"bsid,omitempty"`
- Type uint8 `binapi:"u8,name=type" json:"type,omitempty"`
- IsEncap uint8 `binapi:"u8,name=is_encap" json:"is_encap,omitempty"`
- FibTable uint32 `binapi:"u32,name=fib_table" json:"fib_table,omitempty"`
- NumSidLists uint8 `binapi:"u8,name=num_sid_lists" json:"-"`
- SidLists []Srv6SidList `binapi:"srv6_sid_list[num_sid_lists],name=sid_lists" json:"sid_lists,omitempty"`
-}
-
-func (m *SrPoliciesDetails) Reset() { *m = SrPoliciesDetails{} }
-func (*SrPoliciesDetails) GetMessageName() string { return "sr_policies_details" }
-func (*SrPoliciesDetails) GetCrcString() string { return "5087f460" }
-func (*SrPoliciesDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SrPoliciesDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 16 // m.Bsid.Addr
- size += 1 // m.Type
- size += 1 // m.IsEncap
- size += 4 // m.FibTable
- size += 1 // m.NumSidLists
- for j1 := 0; j1 < len(m.SidLists); j1++ {
- var s1 Srv6SidList
- _ = s1
- if j1 < len(m.SidLists) {
- s1 = m.SidLists[j1]
- }
- size += 1 // s1.NumSids
- size += 4 // s1.Weight
- for j2 := 0; j2 < 16; j2++ {
- size += 1 * 16 // s1.Sids[j2].Addr
- }
- }
- return size
-}
-func (m *SrPoliciesDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.Bsid.Addr, 16)
- buf.EncodeUint8(m.Type)
- buf.EncodeUint8(m.IsEncap)
- buf.EncodeUint32(m.FibTable)
- buf.EncodeUint8(uint8(len(m.SidLists)))
- for j0 := 0; j0 < len(m.SidLists); j0++ {
- var v0 Srv6SidList // SidLists
- if j0 < len(m.SidLists) {
- v0 = m.SidLists[j0]
- }
- buf.EncodeUint8(v0.NumSids)
- buf.EncodeUint32(v0.Weight)
- for j1 := 0; j1 < 16; j1++ {
- buf.EncodeBytes(v0.Sids[j1].Addr, 16)
- }
- }
- return buf.Bytes(), nil
-}
-func (m *SrPoliciesDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Bsid.Addr = make([]byte, 16)
- copy(m.Bsid.Addr, buf.DecodeBytes(len(m.Bsid.Addr)))
- m.Type = buf.DecodeUint8()
- m.IsEncap = buf.DecodeUint8()
- m.FibTable = buf.DecodeUint32()
- m.NumSidLists = buf.DecodeUint8()
- m.SidLists = make([]Srv6SidList, m.NumSidLists)
- for j0 := 0; j0 < len(m.SidLists); j0++ {
- m.SidLists[j0].NumSids = buf.DecodeUint8()
- m.SidLists[j0].Weight = buf.DecodeUint32()
- for j1 := 0; j1 < 16; j1++ {
- m.SidLists[j0].Sids[j1].Addr = make([]byte, 16)
- copy(m.SidLists[j0].Sids[j1].Addr, buf.DecodeBytes(len(m.SidLists[j0].Sids[j1].Addr)))
- }
- }
- return nil
-}
-
-// SrPoliciesDump defines message 'sr_policies_dump'.
-type SrPoliciesDump struct{}
-
-func (m *SrPoliciesDump) Reset() { *m = SrPoliciesDump{} }
-func (*SrPoliciesDump) GetMessageName() string { return "sr_policies_dump" }
-func (*SrPoliciesDump) GetCrcString() string { return "51077d14" }
-func (*SrPoliciesDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SrPoliciesDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *SrPoliciesDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *SrPoliciesDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// SrPolicyAdd defines message 'sr_policy_add'.
-type SrPolicyAdd struct {
- BsidAddr []byte `binapi:"u8[16],name=bsid_addr" json:"bsid_addr,omitempty"`
- Weight uint32 `binapi:"u32,name=weight" json:"weight,omitempty"`
- IsEncap uint8 `binapi:"u8,name=is_encap" json:"is_encap,omitempty"`
- Type uint8 `binapi:"u8,name=type" json:"type,omitempty"`
- FibTable uint32 `binapi:"u32,name=fib_table" json:"fib_table,omitempty"`
- Sids Srv6SidList `binapi:"srv6_sid_list,name=sids" json:"sids,omitempty"`
-}
-
-func (m *SrPolicyAdd) Reset() { *m = SrPolicyAdd{} }
-func (*SrPolicyAdd) GetMessageName() string { return "sr_policy_add" }
-func (*SrPolicyAdd) GetCrcString() string { return "4b6e2484" }
-func (*SrPolicyAdd) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SrPolicyAdd) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 16 // m.BsidAddr
- size += 4 // m.Weight
- size += 1 // m.IsEncap
- size += 1 // m.Type
- size += 4 // m.FibTable
- size += 1 // m.Sids.NumSids
- size += 4 // m.Sids.Weight
- for j2 := 0; j2 < 16; j2++ {
- size += 1 * 16 // m.Sids.Sids[j2].Addr
- }
- return size
-}
-func (m *SrPolicyAdd) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.BsidAddr, 16)
- buf.EncodeUint32(m.Weight)
- buf.EncodeUint8(m.IsEncap)
- buf.EncodeUint8(m.Type)
- buf.EncodeUint32(m.FibTable)
- buf.EncodeUint8(m.Sids.NumSids)
- buf.EncodeUint32(m.Sids.Weight)
- for j1 := 0; j1 < 16; j1++ {
- buf.EncodeBytes(m.Sids.Sids[j1].Addr, 16)
- }
- return buf.Bytes(), nil
-}
-func (m *SrPolicyAdd) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.BsidAddr = make([]byte, 16)
- copy(m.BsidAddr, buf.DecodeBytes(len(m.BsidAddr)))
- m.Weight = buf.DecodeUint32()
- m.IsEncap = buf.DecodeUint8()
- m.Type = buf.DecodeUint8()
- m.FibTable = buf.DecodeUint32()
- m.Sids.NumSids = buf.DecodeUint8()
- m.Sids.Weight = buf.DecodeUint32()
- for j1 := 0; j1 < 16; j1++ {
- m.Sids.Sids[j1].Addr = make([]byte, 16)
- copy(m.Sids.Sids[j1].Addr, buf.DecodeBytes(len(m.Sids.Sids[j1].Addr)))
- }
- return nil
-}
-
-// SrPolicyAddReply defines message 'sr_policy_add_reply'.
-type SrPolicyAddReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SrPolicyAddReply) Reset() { *m = SrPolicyAddReply{} }
-func (*SrPolicyAddReply) GetMessageName() string { return "sr_policy_add_reply" }
-func (*SrPolicyAddReply) GetCrcString() string { return "e8d4e804" }
-func (*SrPolicyAddReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SrPolicyAddReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SrPolicyAddReply) 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 *SrPolicyAddReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SrPolicyDel defines message 'sr_policy_del'.
-type SrPolicyDel struct {
- BsidAddr Srv6Sid `binapi:"srv6_sid,name=bsid_addr" json:"bsid_addr,omitempty"`
- SrPolicyIndex uint32 `binapi:"u32,name=sr_policy_index" json:"sr_policy_index,omitempty"`
-}
-
-func (m *SrPolicyDel) Reset() { *m = SrPolicyDel{} }
-func (*SrPolicyDel) GetMessageName() string { return "sr_policy_del" }
-func (*SrPolicyDel) GetCrcString() string { return "e4133171" }
-func (*SrPolicyDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SrPolicyDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 16 // m.BsidAddr.Addr
- size += 4 // m.SrPolicyIndex
- return size
-}
-func (m *SrPolicyDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.BsidAddr.Addr, 16)
- buf.EncodeUint32(m.SrPolicyIndex)
- return buf.Bytes(), nil
-}
-func (m *SrPolicyDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.BsidAddr.Addr = make([]byte, 16)
- copy(m.BsidAddr.Addr, buf.DecodeBytes(len(m.BsidAddr.Addr)))
- m.SrPolicyIndex = buf.DecodeUint32()
- return nil
-}
-
-// SrPolicyDelReply defines message 'sr_policy_del_reply'.
-type SrPolicyDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SrPolicyDelReply) Reset() { *m = SrPolicyDelReply{} }
-func (*SrPolicyDelReply) GetMessageName() string { return "sr_policy_del_reply" }
-func (*SrPolicyDelReply) GetCrcString() string { return "e8d4e804" }
-func (*SrPolicyDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SrPolicyDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SrPolicyDelReply) 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 *SrPolicyDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SrPolicyMod defines message 'sr_policy_mod'.
-type SrPolicyMod struct {
- BsidAddr []byte `binapi:"u8[16],name=bsid_addr" json:"bsid_addr,omitempty"`
- SrPolicyIndex uint32 `binapi:"u32,name=sr_policy_index" json:"sr_policy_index,omitempty"`
- FibTable uint32 `binapi:"u32,name=fib_table" json:"fib_table,omitempty"`
- Operation uint8 `binapi:"u8,name=operation" json:"operation,omitempty"`
- SlIndex uint32 `binapi:"u32,name=sl_index" json:"sl_index,omitempty"`
- Weight uint32 `binapi:"u32,name=weight" json:"weight,omitempty"`
- Sids Srv6SidList `binapi:"srv6_sid_list,name=sids" json:"sids,omitempty"`
-}
-
-func (m *SrPolicyMod) Reset() { *m = SrPolicyMod{} }
-func (*SrPolicyMod) GetMessageName() string { return "sr_policy_mod" }
-func (*SrPolicyMod) GetCrcString() string { return "c1dfaee0" }
-func (*SrPolicyMod) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SrPolicyMod) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 16 // m.BsidAddr
- size += 4 // m.SrPolicyIndex
- size += 4 // m.FibTable
- size += 1 // m.Operation
- size += 4 // m.SlIndex
- size += 4 // m.Weight
- size += 1 // m.Sids.NumSids
- size += 4 // m.Sids.Weight
- for j2 := 0; j2 < 16; j2++ {
- size += 1 * 16 // m.Sids.Sids[j2].Addr
- }
- return size
-}
-func (m *SrPolicyMod) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.BsidAddr, 16)
- buf.EncodeUint32(m.SrPolicyIndex)
- buf.EncodeUint32(m.FibTable)
- buf.EncodeUint8(m.Operation)
- buf.EncodeUint32(m.SlIndex)
- buf.EncodeUint32(m.Weight)
- buf.EncodeUint8(m.Sids.NumSids)
- buf.EncodeUint32(m.Sids.Weight)
- for j1 := 0; j1 < 16; j1++ {
- buf.EncodeBytes(m.Sids.Sids[j1].Addr, 16)
- }
- return buf.Bytes(), nil
-}
-func (m *SrPolicyMod) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.BsidAddr = make([]byte, 16)
- copy(m.BsidAddr, buf.DecodeBytes(len(m.BsidAddr)))
- m.SrPolicyIndex = buf.DecodeUint32()
- m.FibTable = buf.DecodeUint32()
- m.Operation = buf.DecodeUint8()
- m.SlIndex = buf.DecodeUint32()
- m.Weight = buf.DecodeUint32()
- m.Sids.NumSids = buf.DecodeUint8()
- m.Sids.Weight = buf.DecodeUint32()
- for j1 := 0; j1 < 16; j1++ {
- m.Sids.Sids[j1].Addr = make([]byte, 16)
- copy(m.Sids.Sids[j1].Addr, buf.DecodeBytes(len(m.Sids.Sids[j1].Addr)))
- }
- return nil
-}
-
-// SrPolicyModReply defines message 'sr_policy_mod_reply'.
-type SrPolicyModReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SrPolicyModReply) Reset() { *m = SrPolicyModReply{} }
-func (*SrPolicyModReply) GetMessageName() string { return "sr_policy_mod_reply" }
-func (*SrPolicyModReply) GetCrcString() string { return "e8d4e804" }
-func (*SrPolicyModReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SrPolicyModReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SrPolicyModReply) 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 *SrPolicyModReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SrSetEncapHopLimit defines message 'sr_set_encap_hop_limit'.
-type SrSetEncapHopLimit struct {
- HopLimit uint8 `binapi:"u8,name=hop_limit" json:"hop_limit,omitempty"`
-}
-
-func (m *SrSetEncapHopLimit) Reset() { *m = SrSetEncapHopLimit{} }
-func (*SrSetEncapHopLimit) GetMessageName() string { return "sr_set_encap_hop_limit" }
-func (*SrSetEncapHopLimit) GetCrcString() string { return "aa75d7d0" }
-func (*SrSetEncapHopLimit) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SrSetEncapHopLimit) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.HopLimit
- return size
-}
-func (m *SrSetEncapHopLimit) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.HopLimit)
- return buf.Bytes(), nil
-}
-func (m *SrSetEncapHopLimit) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.HopLimit = buf.DecodeUint8()
- return nil
-}
-
-// SrSetEncapHopLimitReply defines message 'sr_set_encap_hop_limit_reply'.
-type SrSetEncapHopLimitReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SrSetEncapHopLimitReply) Reset() { *m = SrSetEncapHopLimitReply{} }
-func (*SrSetEncapHopLimitReply) GetMessageName() string { return "sr_set_encap_hop_limit_reply" }
-func (*SrSetEncapHopLimitReply) GetCrcString() string { return "e8d4e804" }
-func (*SrSetEncapHopLimitReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SrSetEncapHopLimitReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SrSetEncapHopLimitReply) 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 *SrSetEncapHopLimitReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SrSetEncapSource defines message 'sr_set_encap_source'.
-type SrSetEncapSource struct {
- EncapsSource []byte `binapi:"u8[16],name=encaps_source" json:"encaps_source,omitempty"`
-}
-
-func (m *SrSetEncapSource) Reset() { *m = SrSetEncapSource{} }
-func (*SrSetEncapSource) GetMessageName() string { return "sr_set_encap_source" }
-func (*SrSetEncapSource) GetCrcString() string { return "d05bb4de" }
-func (*SrSetEncapSource) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SrSetEncapSource) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 16 // m.EncapsSource
- return size
-}
-func (m *SrSetEncapSource) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.EncapsSource, 16)
- return buf.Bytes(), nil
-}
-func (m *SrSetEncapSource) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.EncapsSource = make([]byte, 16)
- copy(m.EncapsSource, buf.DecodeBytes(len(m.EncapsSource)))
- return nil
-}
-
-// SrSetEncapSourceReply defines message 'sr_set_encap_source_reply'.
-type SrSetEncapSourceReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SrSetEncapSourceReply) Reset() { *m = SrSetEncapSourceReply{} }
-func (*SrSetEncapSourceReply) GetMessageName() string { return "sr_set_encap_source_reply" }
-func (*SrSetEncapSourceReply) GetCrcString() string { return "e8d4e804" }
-func (*SrSetEncapSourceReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SrSetEncapSourceReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SrSetEncapSourceReply) 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 *SrSetEncapSourceReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SrSteeringAddDel defines message 'sr_steering_add_del'.
-type SrSteeringAddDel struct {
- IsDel uint8 `binapi:"u8,name=is_del" json:"is_del,omitempty"`
- BsidAddr []byte `binapi:"u8[16],name=bsid_addr" json:"bsid_addr,omitempty"`
- SrPolicyIndex uint32 `binapi:"u32,name=sr_policy_index" json:"sr_policy_index,omitempty"`
- TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
- PrefixAddr []byte `binapi:"u8[16],name=prefix_addr" json:"prefix_addr,omitempty"`
- MaskWidth uint32 `binapi:"u32,name=mask_width" json:"mask_width,omitempty"`
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- TrafficType uint8 `binapi:"u8,name=traffic_type" json:"traffic_type,omitempty"`
-}
-
-func (m *SrSteeringAddDel) Reset() { *m = SrSteeringAddDel{} }
-func (*SrSteeringAddDel) GetMessageName() string { return "sr_steering_add_del" }
-func (*SrSteeringAddDel) GetCrcString() string { return "28b5dcab" }
-func (*SrSteeringAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SrSteeringAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsDel
- size += 1 * 16 // m.BsidAddr
- size += 4 // m.SrPolicyIndex
- size += 4 // m.TableID
- size += 1 * 16 // m.PrefixAddr
- size += 4 // m.MaskWidth
- size += 4 // m.SwIfIndex
- size += 1 // m.TrafficType
- return size
-}
-func (m *SrSteeringAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsDel)
- buf.EncodeBytes(m.BsidAddr, 16)
- buf.EncodeUint32(m.SrPolicyIndex)
- buf.EncodeUint32(m.TableID)
- buf.EncodeBytes(m.PrefixAddr, 16)
- buf.EncodeUint32(m.MaskWidth)
- buf.EncodeUint32(m.SwIfIndex)
- buf.EncodeUint8(m.TrafficType)
- return buf.Bytes(), nil
-}
-func (m *SrSteeringAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsDel = buf.DecodeUint8()
- m.BsidAddr = make([]byte, 16)
- copy(m.BsidAddr, buf.DecodeBytes(len(m.BsidAddr)))
- m.SrPolicyIndex = buf.DecodeUint32()
- m.TableID = buf.DecodeUint32()
- m.PrefixAddr = make([]byte, 16)
- copy(m.PrefixAddr, buf.DecodeBytes(len(m.PrefixAddr)))
- m.MaskWidth = buf.DecodeUint32()
- m.SwIfIndex = buf.DecodeUint32()
- m.TrafficType = buf.DecodeUint8()
- return nil
-}
-
-// SrSteeringAddDelReply defines message 'sr_steering_add_del_reply'.
-type SrSteeringAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SrSteeringAddDelReply) Reset() { *m = SrSteeringAddDelReply{} }
-func (*SrSteeringAddDelReply) GetMessageName() string { return "sr_steering_add_del_reply" }
-func (*SrSteeringAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*SrSteeringAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SrSteeringAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SrSteeringAddDelReply) 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 *SrSteeringAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SrSteeringPolDetails defines message 'sr_steering_pol_details'.
-type SrSteeringPolDetails struct {
- TrafficType uint8 `binapi:"u8,name=traffic_type" json:"traffic_type,omitempty"`
- FibTable uint32 `binapi:"u32,name=fib_table" json:"fib_table,omitempty"`
- PrefixAddr []byte `binapi:"u8[16],name=prefix_addr" json:"prefix_addr,omitempty"`
- MaskWidth uint32 `binapi:"u32,name=mask_width" json:"mask_width,omitempty"`
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- Bsid Srv6Sid `binapi:"srv6_sid,name=bsid" json:"bsid,omitempty"`
-}
-
-func (m *SrSteeringPolDetails) Reset() { *m = SrSteeringPolDetails{} }
-func (*SrSteeringPolDetails) GetMessageName() string { return "sr_steering_pol_details" }
-func (*SrSteeringPolDetails) GetCrcString() string { return "5627d483" }
-func (*SrSteeringPolDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SrSteeringPolDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.TrafficType
- size += 4 // m.FibTable
- size += 1 * 16 // m.PrefixAddr
- size += 4 // m.MaskWidth
- size += 4 // m.SwIfIndex
- size += 1 * 16 // m.Bsid.Addr
- return size
-}
-func (m *SrSteeringPolDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.TrafficType)
- buf.EncodeUint32(m.FibTable)
- buf.EncodeBytes(m.PrefixAddr, 16)
- buf.EncodeUint32(m.MaskWidth)
- buf.EncodeUint32(m.SwIfIndex)
- buf.EncodeBytes(m.Bsid.Addr, 16)
- return buf.Bytes(), nil
-}
-func (m *SrSteeringPolDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.TrafficType = buf.DecodeUint8()
- m.FibTable = buf.DecodeUint32()
- m.PrefixAddr = make([]byte, 16)
- copy(m.PrefixAddr, buf.DecodeBytes(len(m.PrefixAddr)))
- m.MaskWidth = buf.DecodeUint32()
- m.SwIfIndex = buf.DecodeUint32()
- m.Bsid.Addr = make([]byte, 16)
- copy(m.Bsid.Addr, buf.DecodeBytes(len(m.Bsid.Addr)))
- return nil
-}
-
-// SrSteeringPolDump defines message 'sr_steering_pol_dump'.
-type SrSteeringPolDump struct{}
-
-func (m *SrSteeringPolDump) Reset() { *m = SrSteeringPolDump{} }
-func (*SrSteeringPolDump) GetMessageName() string { return "sr_steering_pol_dump" }
-func (*SrSteeringPolDump) GetCrcString() string { return "51077d14" }
-func (*SrSteeringPolDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SrSteeringPolDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *SrSteeringPolDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *SrSteeringPolDump) Unmarshal(b []byte) error {
- return nil
-}
-
-func init() { file_sr_binapi_init() }
-func file_sr_binapi_init() {
- api.RegisterMessage((*SrLocalsidAddDel)(nil), "sr_localsid_add_del_b30489eb")
- api.RegisterMessage((*SrLocalsidAddDelReply)(nil), "sr_localsid_add_del_reply_e8d4e804")
- api.RegisterMessage((*SrLocalsidsDetails)(nil), "sr_localsids_details_0791babc")
- api.RegisterMessage((*SrLocalsidsDump)(nil), "sr_localsids_dump_51077d14")
- api.RegisterMessage((*SrPoliciesDetails)(nil), "sr_policies_details_5087f460")
- api.RegisterMessage((*SrPoliciesDump)(nil), "sr_policies_dump_51077d14")
- api.RegisterMessage((*SrPolicyAdd)(nil), "sr_policy_add_4b6e2484")
- api.RegisterMessage((*SrPolicyAddReply)(nil), "sr_policy_add_reply_e8d4e804")
- api.RegisterMessage((*SrPolicyDel)(nil), "sr_policy_del_e4133171")
- api.RegisterMessage((*SrPolicyDelReply)(nil), "sr_policy_del_reply_e8d4e804")
- api.RegisterMessage((*SrPolicyMod)(nil), "sr_policy_mod_c1dfaee0")
- api.RegisterMessage((*SrPolicyModReply)(nil), "sr_policy_mod_reply_e8d4e804")
- api.RegisterMessage((*SrSetEncapHopLimit)(nil), "sr_set_encap_hop_limit_aa75d7d0")
- api.RegisterMessage((*SrSetEncapHopLimitReply)(nil), "sr_set_encap_hop_limit_reply_e8d4e804")
- api.RegisterMessage((*SrSetEncapSource)(nil), "sr_set_encap_source_d05bb4de")
- api.RegisterMessage((*SrSetEncapSourceReply)(nil), "sr_set_encap_source_reply_e8d4e804")
- api.RegisterMessage((*SrSteeringAddDel)(nil), "sr_steering_add_del_28b5dcab")
- api.RegisterMessage((*SrSteeringAddDelReply)(nil), "sr_steering_add_del_reply_e8d4e804")
- api.RegisterMessage((*SrSteeringPolDetails)(nil), "sr_steering_pol_details_5627d483")
- api.RegisterMessage((*SrSteeringPolDump)(nil), "sr_steering_pol_dump_51077d14")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*SrLocalsidAddDel)(nil),
- (*SrLocalsidAddDelReply)(nil),
- (*SrLocalsidsDetails)(nil),
- (*SrLocalsidsDump)(nil),
- (*SrPoliciesDetails)(nil),
- (*SrPoliciesDump)(nil),
- (*SrPolicyAdd)(nil),
- (*SrPolicyAddReply)(nil),
- (*SrPolicyDel)(nil),
- (*SrPolicyDelReply)(nil),
- (*SrPolicyMod)(nil),
- (*SrPolicyModReply)(nil),
- (*SrSetEncapHopLimit)(nil),
- (*SrSetEncapHopLimitReply)(nil),
- (*SrSetEncapSource)(nil),
- (*SrSetEncapSourceReply)(nil),
- (*SrSteeringAddDel)(nil),
- (*SrSteeringAddDelReply)(nil),
- (*SrSteeringPolDetails)(nil),
- (*SrSteeringPolDump)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/sr/sr_rpc.ba.go b/internal/testbinapi/binapi2001/sr/sr_rpc.ba.go
deleted file mode 100644
index 843a400..0000000
--- a/internal/testbinapi/binapi2001/sr/sr_rpc.ba.go
+++ /dev/null
@@ -1,226 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package sr
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service sr.
-type RPCService interface {
- SrLocalsidAddDel(ctx context.Context, in *SrLocalsidAddDel) (*SrLocalsidAddDelReply, error)
- SrLocalsidsDump(ctx context.Context, in *SrLocalsidsDump) (RPCService_SrLocalsidsDumpClient, error)
- SrPoliciesDump(ctx context.Context, in *SrPoliciesDump) (RPCService_SrPoliciesDumpClient, error)
- SrPolicyAdd(ctx context.Context, in *SrPolicyAdd) (*SrPolicyAddReply, error)
- SrPolicyDel(ctx context.Context, in *SrPolicyDel) (*SrPolicyDelReply, error)
- SrPolicyMod(ctx context.Context, in *SrPolicyMod) (*SrPolicyModReply, error)
- SrSetEncapHopLimit(ctx context.Context, in *SrSetEncapHopLimit) (*SrSetEncapHopLimitReply, error)
- SrSetEncapSource(ctx context.Context, in *SrSetEncapSource) (*SrSetEncapSourceReply, error)
- SrSteeringAddDel(ctx context.Context, in *SrSteeringAddDel) (*SrSteeringAddDelReply, error)
- SrSteeringPolDump(ctx context.Context, in *SrSteeringPolDump) (RPCService_SrSteeringPolDumpClient, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) SrLocalsidAddDel(ctx context.Context, in *SrLocalsidAddDel) (*SrLocalsidAddDelReply, error) {
- out := new(SrLocalsidAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SrLocalsidsDump(ctx context.Context, in *SrLocalsidsDump) (RPCService_SrLocalsidsDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_SrLocalsidsDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_SrLocalsidsDumpClient interface {
- Recv() (*SrLocalsidsDetails, error)
- api.Stream
-}
-
-type serviceClient_SrLocalsidsDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_SrLocalsidsDumpClient) Recv() (*SrLocalsidsDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *SrLocalsidsDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) SrPoliciesDump(ctx context.Context, in *SrPoliciesDump) (RPCService_SrPoliciesDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_SrPoliciesDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_SrPoliciesDumpClient interface {
- Recv() (*SrPoliciesDetails, error)
- api.Stream
-}
-
-type serviceClient_SrPoliciesDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_SrPoliciesDumpClient) Recv() (*SrPoliciesDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *SrPoliciesDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) SrPolicyAdd(ctx context.Context, in *SrPolicyAdd) (*SrPolicyAddReply, error) {
- out := new(SrPolicyAddReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SrPolicyDel(ctx context.Context, in *SrPolicyDel) (*SrPolicyDelReply, error) {
- out := new(SrPolicyDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SrPolicyMod(ctx context.Context, in *SrPolicyMod) (*SrPolicyModReply, error) {
- out := new(SrPolicyModReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SrSetEncapHopLimit(ctx context.Context, in *SrSetEncapHopLimit) (*SrSetEncapHopLimitReply, error) {
- out := new(SrSetEncapHopLimitReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SrSetEncapSource(ctx context.Context, in *SrSetEncapSource) (*SrSetEncapSourceReply, error) {
- out := new(SrSetEncapSourceReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SrSteeringAddDel(ctx context.Context, in *SrSteeringAddDel) (*SrSteeringAddDelReply, error) {
- out := new(SrSteeringAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SrSteeringPolDump(ctx context.Context, in *SrSteeringPolDump) (RPCService_SrSteeringPolDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_SrSteeringPolDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_SrSteeringPolDumpClient interface {
- Recv() (*SrSteeringPolDetails, error)
- api.Stream
-}
-
-type serviceClient_SrSteeringPolDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_SrSteeringPolDumpClient) Recv() (*SrSteeringPolDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *SrSteeringPolDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
diff --git a/internal/testbinapi/binapi2001/sr_mpls/sr_mpls.ba.go b/internal/testbinapi/binapi2001/sr_mpls/sr_mpls.ba.go
deleted file mode 100644
index f2e73a2..0000000
--- a/internal/testbinapi/binapi2001/sr_mpls/sr_mpls.ba.go
+++ /dev/null
@@ -1,502 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/sr_mpls.api.json
-
-// Package sr_mpls contains generated bindings for API file sr_mpls.api.
-//
-// Contents:
-// 10 messages
-//
-package sr_mpls
-
-import (
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the GoVPP api package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// GoVPP api package needs to be updated.
-const _ = api.GoVppAPIPackageIsVersion2
-
-const (
- APIFile = "sr_mpls"
- APIVersion = "1.0.0"
- VersionCrc = 0x933a0861
-)
-
-// SrMplsPolicyAdd defines message 'sr_mpls_policy_add'.
-type SrMplsPolicyAdd struct {
- Bsid uint32 `binapi:"u32,name=bsid" json:"bsid,omitempty"`
- Weight uint32 `binapi:"u32,name=weight" json:"weight,omitempty"`
- Type uint8 `binapi:"u8,name=type" json:"type,omitempty"`
- NSegments uint8 `binapi:"u8,name=n_segments" json:"-"`
- Segments []uint32 `binapi:"u32[n_segments],name=segments" json:"segments,omitempty"`
-}
-
-func (m *SrMplsPolicyAdd) Reset() { *m = SrMplsPolicyAdd{} }
-func (*SrMplsPolicyAdd) GetMessageName() string { return "sr_mpls_policy_add" }
-func (*SrMplsPolicyAdd) GetCrcString() string { return "6f5b21cc" }
-func (*SrMplsPolicyAdd) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SrMplsPolicyAdd) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Bsid
- size += 4 // m.Weight
- size += 1 // m.Type
- size += 1 // m.NSegments
- size += 4 * len(m.Segments) // m.Segments
- return size
-}
-func (m *SrMplsPolicyAdd) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Bsid)
- buf.EncodeUint32(m.Weight)
- buf.EncodeUint8(m.Type)
- buf.EncodeUint8(uint8(len(m.Segments)))
- for i := 0; i < len(m.Segments); i++ {
- var x uint32
- if i < len(m.Segments) {
- x = uint32(m.Segments[i])
- }
- buf.EncodeUint32(x)
- }
- return buf.Bytes(), nil
-}
-func (m *SrMplsPolicyAdd) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Bsid = buf.DecodeUint32()
- m.Weight = buf.DecodeUint32()
- m.Type = buf.DecodeUint8()
- m.NSegments = buf.DecodeUint8()
- m.Segments = make([]uint32, m.NSegments)
- for i := 0; i < len(m.Segments); i++ {
- m.Segments[i] = buf.DecodeUint32()
- }
- return nil
-}
-
-// SrMplsPolicyAddReply defines message 'sr_mpls_policy_add_reply'.
-type SrMplsPolicyAddReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SrMplsPolicyAddReply) Reset() { *m = SrMplsPolicyAddReply{} }
-func (*SrMplsPolicyAddReply) GetMessageName() string { return "sr_mpls_policy_add_reply" }
-func (*SrMplsPolicyAddReply) GetCrcString() string { return "e8d4e804" }
-func (*SrMplsPolicyAddReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SrMplsPolicyAddReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SrMplsPolicyAddReply) 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 *SrMplsPolicyAddReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SrMplsPolicyAssignEndpointColor defines message 'sr_mpls_policy_assign_endpoint_color'.
-type SrMplsPolicyAssignEndpointColor struct {
- Bsid uint32 `binapi:"u32,name=bsid" json:"bsid,omitempty"`
- Endpoint []byte `binapi:"u8[16],name=endpoint" json:"endpoint,omitempty"`
- EndpointType uint8 `binapi:"u8,name=endpoint_type" json:"endpoint_type,omitempty"`
- Color uint32 `binapi:"u32,name=color" json:"color,omitempty"`
-}
-
-func (m *SrMplsPolicyAssignEndpointColor) Reset() { *m = SrMplsPolicyAssignEndpointColor{} }
-func (*SrMplsPolicyAssignEndpointColor) GetMessageName() string {
- return "sr_mpls_policy_assign_endpoint_color"
-}
-func (*SrMplsPolicyAssignEndpointColor) GetCrcString() string { return "6c82a6da" }
-func (*SrMplsPolicyAssignEndpointColor) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SrMplsPolicyAssignEndpointColor) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Bsid
- size += 1 * 16 // m.Endpoint
- size += 1 // m.EndpointType
- size += 4 // m.Color
- return size
-}
-func (m *SrMplsPolicyAssignEndpointColor) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Bsid)
- buf.EncodeBytes(m.Endpoint, 16)
- buf.EncodeUint8(m.EndpointType)
- buf.EncodeUint32(m.Color)
- return buf.Bytes(), nil
-}
-func (m *SrMplsPolicyAssignEndpointColor) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Bsid = buf.DecodeUint32()
- m.Endpoint = make([]byte, 16)
- copy(m.Endpoint, buf.DecodeBytes(len(m.Endpoint)))
- m.EndpointType = buf.DecodeUint8()
- m.Color = buf.DecodeUint32()
- return nil
-}
-
-// SrMplsPolicyAssignEndpointColorReply defines message 'sr_mpls_policy_assign_endpoint_color_reply'.
-type SrMplsPolicyAssignEndpointColorReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SrMplsPolicyAssignEndpointColorReply) Reset() { *m = SrMplsPolicyAssignEndpointColorReply{} }
-func (*SrMplsPolicyAssignEndpointColorReply) GetMessageName() string {
- return "sr_mpls_policy_assign_endpoint_color_reply"
-}
-func (*SrMplsPolicyAssignEndpointColorReply) GetCrcString() string { return "e8d4e804" }
-func (*SrMplsPolicyAssignEndpointColorReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SrMplsPolicyAssignEndpointColorReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SrMplsPolicyAssignEndpointColorReply) 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 *SrMplsPolicyAssignEndpointColorReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SrMplsPolicyDel defines message 'sr_mpls_policy_del'.
-type SrMplsPolicyDel struct {
- Bsid uint32 `binapi:"u32,name=bsid" json:"bsid,omitempty"`
-}
-
-func (m *SrMplsPolicyDel) Reset() { *m = SrMplsPolicyDel{} }
-func (*SrMplsPolicyDel) GetMessageName() string { return "sr_mpls_policy_del" }
-func (*SrMplsPolicyDel) GetCrcString() string { return "e29d34fa" }
-func (*SrMplsPolicyDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SrMplsPolicyDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Bsid
- return size
-}
-func (m *SrMplsPolicyDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Bsid)
- return buf.Bytes(), nil
-}
-func (m *SrMplsPolicyDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Bsid = buf.DecodeUint32()
- return nil
-}
-
-// SrMplsPolicyDelReply defines message 'sr_mpls_policy_del_reply'.
-type SrMplsPolicyDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SrMplsPolicyDelReply) Reset() { *m = SrMplsPolicyDelReply{} }
-func (*SrMplsPolicyDelReply) GetMessageName() string { return "sr_mpls_policy_del_reply" }
-func (*SrMplsPolicyDelReply) GetCrcString() string { return "e8d4e804" }
-func (*SrMplsPolicyDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SrMplsPolicyDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SrMplsPolicyDelReply) 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 *SrMplsPolicyDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SrMplsPolicyMod defines message 'sr_mpls_policy_mod'.
-type SrMplsPolicyMod struct {
- Bsid uint32 `binapi:"u32,name=bsid" json:"bsid,omitempty"`
- Operation uint8 `binapi:"u8,name=operation" json:"operation,omitempty"`
- SlIndex uint32 `binapi:"u32,name=sl_index" json:"sl_index,omitempty"`
- Weight uint32 `binapi:"u32,name=weight" json:"weight,omitempty"`
- NSegments uint8 `binapi:"u8,name=n_segments" json:"-"`
- Segments []uint32 `binapi:"u32[n_segments],name=segments" json:"segments,omitempty"`
-}
-
-func (m *SrMplsPolicyMod) Reset() { *m = SrMplsPolicyMod{} }
-func (*SrMplsPolicyMod) GetMessageName() string { return "sr_mpls_policy_mod" }
-func (*SrMplsPolicyMod) GetCrcString() string { return "09d338ac" }
-func (*SrMplsPolicyMod) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SrMplsPolicyMod) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Bsid
- size += 1 // m.Operation
- size += 4 // m.SlIndex
- size += 4 // m.Weight
- size += 1 // m.NSegments
- size += 4 * len(m.Segments) // m.Segments
- return size
-}
-func (m *SrMplsPolicyMod) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Bsid)
- buf.EncodeUint8(m.Operation)
- buf.EncodeUint32(m.SlIndex)
- buf.EncodeUint32(m.Weight)
- buf.EncodeUint8(uint8(len(m.Segments)))
- for i := 0; i < len(m.Segments); i++ {
- var x uint32
- if i < len(m.Segments) {
- x = uint32(m.Segments[i])
- }
- buf.EncodeUint32(x)
- }
- return buf.Bytes(), nil
-}
-func (m *SrMplsPolicyMod) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Bsid = buf.DecodeUint32()
- m.Operation = buf.DecodeUint8()
- m.SlIndex = buf.DecodeUint32()
- m.Weight = buf.DecodeUint32()
- m.NSegments = buf.DecodeUint8()
- m.Segments = make([]uint32, m.NSegments)
- for i := 0; i < len(m.Segments); i++ {
- m.Segments[i] = buf.DecodeUint32()
- }
- return nil
-}
-
-// SrMplsPolicyModReply defines message 'sr_mpls_policy_mod_reply'.
-type SrMplsPolicyModReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SrMplsPolicyModReply) Reset() { *m = SrMplsPolicyModReply{} }
-func (*SrMplsPolicyModReply) GetMessageName() string { return "sr_mpls_policy_mod_reply" }
-func (*SrMplsPolicyModReply) GetCrcString() string { return "e8d4e804" }
-func (*SrMplsPolicyModReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SrMplsPolicyModReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SrMplsPolicyModReply) 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 *SrMplsPolicyModReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SrMplsSteeringAddDel defines message 'sr_mpls_steering_add_del'.
-type SrMplsSteeringAddDel struct {
- IsDel uint8 `binapi:"u8,name=is_del" json:"is_del,omitempty"`
- Bsid uint32 `binapi:"u32,name=bsid" json:"bsid,omitempty"`
- TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
- PrefixAddr []byte `binapi:"u8[16],name=prefix_addr" json:"prefix_addr,omitempty"`
- MaskWidth uint32 `binapi:"u32,name=mask_width" json:"mask_width,omitempty"`
- TrafficType uint8 `binapi:"u8,name=traffic_type" json:"traffic_type,omitempty"`
- NextHop []byte `binapi:"u8[16],name=next_hop" json:"next_hop,omitempty"`
- NhType uint8 `binapi:"u8,name=nh_type" json:"nh_type,omitempty"`
- Color uint32 `binapi:"u32,name=color" json:"color,omitempty"`
- CoBits uint8 `binapi:"u8,name=co_bits" json:"co_bits,omitempty"`
- VPNLabel uint32 `binapi:"u32,name=vpn_label" json:"vpn_label,omitempty"`
-}
-
-func (m *SrMplsSteeringAddDel) Reset() { *m = SrMplsSteeringAddDel{} }
-func (*SrMplsSteeringAddDel) GetMessageName() string { return "sr_mpls_steering_add_del" }
-func (*SrMplsSteeringAddDel) GetCrcString() string { return "1591f94a" }
-func (*SrMplsSteeringAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SrMplsSteeringAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsDel
- size += 4 // m.Bsid
- size += 4 // m.TableID
- size += 1 * 16 // m.PrefixAddr
- size += 4 // m.MaskWidth
- size += 1 // m.TrafficType
- size += 1 * 16 // m.NextHop
- size += 1 // m.NhType
- size += 4 // m.Color
- size += 1 // m.CoBits
- size += 4 // m.VPNLabel
- return size
-}
-func (m *SrMplsSteeringAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsDel)
- buf.EncodeUint32(m.Bsid)
- buf.EncodeUint32(m.TableID)
- buf.EncodeBytes(m.PrefixAddr, 16)
- buf.EncodeUint32(m.MaskWidth)
- buf.EncodeUint8(m.TrafficType)
- buf.EncodeBytes(m.NextHop, 16)
- buf.EncodeUint8(m.NhType)
- buf.EncodeUint32(m.Color)
- buf.EncodeUint8(m.CoBits)
- buf.EncodeUint32(m.VPNLabel)
- return buf.Bytes(), nil
-}
-func (m *SrMplsSteeringAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsDel = buf.DecodeUint8()
- m.Bsid = buf.DecodeUint32()
- m.TableID = buf.DecodeUint32()
- m.PrefixAddr = make([]byte, 16)
- copy(m.PrefixAddr, buf.DecodeBytes(len(m.PrefixAddr)))
- m.MaskWidth = buf.DecodeUint32()
- m.TrafficType = buf.DecodeUint8()
- m.NextHop = make([]byte, 16)
- copy(m.NextHop, buf.DecodeBytes(len(m.NextHop)))
- m.NhType = buf.DecodeUint8()
- m.Color = buf.DecodeUint32()
- m.CoBits = buf.DecodeUint8()
- m.VPNLabel = buf.DecodeUint32()
- return nil
-}
-
-// SrMplsSteeringAddDelReply defines message 'sr_mpls_steering_add_del_reply'.
-type SrMplsSteeringAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SrMplsSteeringAddDelReply) Reset() { *m = SrMplsSteeringAddDelReply{} }
-func (*SrMplsSteeringAddDelReply) GetMessageName() string { return "sr_mpls_steering_add_del_reply" }
-func (*SrMplsSteeringAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*SrMplsSteeringAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SrMplsSteeringAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SrMplsSteeringAddDelReply) 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 *SrMplsSteeringAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_sr_mpls_binapi_init() }
-func file_sr_mpls_binapi_init() {
- api.RegisterMessage((*SrMplsPolicyAdd)(nil), "sr_mpls_policy_add_6f5b21cc")
- api.RegisterMessage((*SrMplsPolicyAddReply)(nil), "sr_mpls_policy_add_reply_e8d4e804")
- api.RegisterMessage((*SrMplsPolicyAssignEndpointColor)(nil), "sr_mpls_policy_assign_endpoint_color_6c82a6da")
- api.RegisterMessage((*SrMplsPolicyAssignEndpointColorReply)(nil), "sr_mpls_policy_assign_endpoint_color_reply_e8d4e804")
- api.RegisterMessage((*SrMplsPolicyDel)(nil), "sr_mpls_policy_del_e29d34fa")
- api.RegisterMessage((*SrMplsPolicyDelReply)(nil), "sr_mpls_policy_del_reply_e8d4e804")
- api.RegisterMessage((*SrMplsPolicyMod)(nil), "sr_mpls_policy_mod_09d338ac")
- api.RegisterMessage((*SrMplsPolicyModReply)(nil), "sr_mpls_policy_mod_reply_e8d4e804")
- api.RegisterMessage((*SrMplsSteeringAddDel)(nil), "sr_mpls_steering_add_del_1591f94a")
- api.RegisterMessage((*SrMplsSteeringAddDelReply)(nil), "sr_mpls_steering_add_del_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*SrMplsPolicyAdd)(nil),
- (*SrMplsPolicyAddReply)(nil),
- (*SrMplsPolicyAssignEndpointColor)(nil),
- (*SrMplsPolicyAssignEndpointColorReply)(nil),
- (*SrMplsPolicyDel)(nil),
- (*SrMplsPolicyDelReply)(nil),
- (*SrMplsPolicyMod)(nil),
- (*SrMplsPolicyModReply)(nil),
- (*SrMplsSteeringAddDel)(nil),
- (*SrMplsSteeringAddDelReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/sr_mpls/sr_mpls_rpc.ba.go b/internal/testbinapi/binapi2001/sr_mpls/sr_mpls_rpc.ba.go
deleted file mode 100644
index 556d32e..0000000
--- a/internal/testbinapi/binapi2001/sr_mpls/sr_mpls_rpc.ba.go
+++ /dev/null
@@ -1,71 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package sr_mpls
-
-import (
- "context"
-
- api "git.fd.io/govpp.git/api"
-)
-
-// RPCService defines RPC service sr_mpls.
-type RPCService interface {
- SrMplsPolicyAdd(ctx context.Context, in *SrMplsPolicyAdd) (*SrMplsPolicyAddReply, error)
- SrMplsPolicyAssignEndpointColor(ctx context.Context, in *SrMplsPolicyAssignEndpointColor) (*SrMplsPolicyAssignEndpointColorReply, error)
- SrMplsPolicyDel(ctx context.Context, in *SrMplsPolicyDel) (*SrMplsPolicyDelReply, error)
- SrMplsPolicyMod(ctx context.Context, in *SrMplsPolicyMod) (*SrMplsPolicyModReply, error)
- SrMplsSteeringAddDel(ctx context.Context, in *SrMplsSteeringAddDel) (*SrMplsSteeringAddDelReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) SrMplsPolicyAdd(ctx context.Context, in *SrMplsPolicyAdd) (*SrMplsPolicyAddReply, error) {
- out := new(SrMplsPolicyAddReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SrMplsPolicyAssignEndpointColor(ctx context.Context, in *SrMplsPolicyAssignEndpointColor) (*SrMplsPolicyAssignEndpointColorReply, error) {
- out := new(SrMplsPolicyAssignEndpointColorReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SrMplsPolicyDel(ctx context.Context, in *SrMplsPolicyDel) (*SrMplsPolicyDelReply, error) {
- out := new(SrMplsPolicyDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SrMplsPolicyMod(ctx context.Context, in *SrMplsPolicyMod) (*SrMplsPolicyModReply, error) {
- out := new(SrMplsPolicyModReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SrMplsSteeringAddDel(ctx context.Context, in *SrMplsSteeringAddDel) (*SrMplsSteeringAddDelReply, error) {
- out := new(SrMplsSteeringAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/stn/stn.ba.go b/internal/testbinapi/binapi2001/stn/stn.ba.go
deleted file mode 100644
index 8e9d7dc..0000000
--- a/internal/testbinapi/binapi2001/stn/stn.ba.go
+++ /dev/null
@@ -1,1043 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/plugins/stn.api.json
-
-// Package stn contains generated bindings for API file stn.api.
-//
-// Contents:
-// 6 aliases
-// 10 enums
-// 6 structs
-// 1 union
-// 4 messages
-//
-package stn
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "stn"
- APIVersion = "2.0.0"
- VersionCrc = 0x619d8f3
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
-
-// StnAddDelRule defines message 'stn_add_del_rule'.
-type StnAddDelRule struct {
- IPAddress Address `binapi:"address,name=ip_address" json:"ip_address,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
-}
-
-func (m *StnAddDelRule) Reset() { *m = StnAddDelRule{} }
-func (*StnAddDelRule) GetMessageName() string { return "stn_add_del_rule" }
-func (*StnAddDelRule) GetCrcString() string { return "53f751e6" }
-func (*StnAddDelRule) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *StnAddDelRule) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.IPAddress.Af
- size += 1 * 16 // m.IPAddress.Un
- size += 4 // m.SwIfIndex
- size += 1 // m.IsAdd
- return size
-}
-func (m *StnAddDelRule) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.IPAddress.Af))
- buf.EncodeBytes(m.IPAddress.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeBool(m.IsAdd)
- return buf.Bytes(), nil
-}
-func (m *StnAddDelRule) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IPAddress.Af = AddressFamily(buf.DecodeUint32())
- copy(m.IPAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.IsAdd = buf.DecodeBool()
- return nil
-}
-
-// StnAddDelRuleReply defines message 'stn_add_del_rule_reply'.
-type StnAddDelRuleReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *StnAddDelRuleReply) Reset() { *m = StnAddDelRuleReply{} }
-func (*StnAddDelRuleReply) GetMessageName() string { return "stn_add_del_rule_reply" }
-func (*StnAddDelRuleReply) GetCrcString() string { return "e8d4e804" }
-func (*StnAddDelRuleReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *StnAddDelRuleReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *StnAddDelRuleReply) 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 *StnAddDelRuleReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// StnRulesDetails defines message 'stn_rules_details'.
-type StnRulesDetails struct {
- IPAddress Address `binapi:"address,name=ip_address" json:"ip_address,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *StnRulesDetails) Reset() { *m = StnRulesDetails{} }
-func (*StnRulesDetails) GetMessageName() string { return "stn_rules_details" }
-func (*StnRulesDetails) GetCrcString() string { return "b0f6606c" }
-func (*StnRulesDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *StnRulesDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.IPAddress.Af
- size += 1 * 16 // m.IPAddress.Un
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *StnRulesDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.IPAddress.Af))
- buf.EncodeBytes(m.IPAddress.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- return buf.Bytes(), nil
-}
-func (m *StnRulesDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IPAddress.Af = AddressFamily(buf.DecodeUint32())
- copy(m.IPAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// StnRulesDump defines message 'stn_rules_dump'.
-type StnRulesDump struct{}
-
-func (m *StnRulesDump) Reset() { *m = StnRulesDump{} }
-func (*StnRulesDump) GetMessageName() string { return "stn_rules_dump" }
-func (*StnRulesDump) GetCrcString() string { return "51077d14" }
-func (*StnRulesDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *StnRulesDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *StnRulesDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *StnRulesDump) Unmarshal(b []byte) error {
- return nil
-}
-
-func init() { file_stn_binapi_init() }
-func file_stn_binapi_init() {
- api.RegisterMessage((*StnAddDelRule)(nil), "stn_add_del_rule_53f751e6")
- api.RegisterMessage((*StnAddDelRuleReply)(nil), "stn_add_del_rule_reply_e8d4e804")
- api.RegisterMessage((*StnRulesDetails)(nil), "stn_rules_details_b0f6606c")
- api.RegisterMessage((*StnRulesDump)(nil), "stn_rules_dump_51077d14")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*StnAddDelRule)(nil),
- (*StnAddDelRuleReply)(nil),
- (*StnRulesDetails)(nil),
- (*StnRulesDump)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/stn/stn_rpc.ba.go b/internal/testbinapi/binapi2001/stn/stn_rpc.ba.go
deleted file mode 100644
index 80639a7..0000000
--- a/internal/testbinapi/binapi2001/stn/stn_rpc.ba.go
+++ /dev/null
@@ -1,78 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package stn
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service stn.
-type RPCService interface {
- StnAddDelRule(ctx context.Context, in *StnAddDelRule) (*StnAddDelRuleReply, error)
- StnRulesDump(ctx context.Context, in *StnRulesDump) (RPCService_StnRulesDumpClient, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) StnAddDelRule(ctx context.Context, in *StnAddDelRule) (*StnAddDelRuleReply, error) {
- out := new(StnAddDelRuleReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) StnRulesDump(ctx context.Context, in *StnRulesDump) (RPCService_StnRulesDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_StnRulesDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_StnRulesDumpClient interface {
- Recv() (*StnRulesDetails, error)
- api.Stream
-}
-
-type serviceClient_StnRulesDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_StnRulesDumpClient) Recv() (*StnRulesDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *StnRulesDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
diff --git a/internal/testbinapi/binapi2001/svs/svs.ba.go b/internal/testbinapi/binapi2001/svs/svs.ba.go
deleted file mode 100644
index 9e5db42..0000000
--- a/internal/testbinapi/binapi2001/svs/svs.ba.go
+++ /dev/null
@@ -1,1279 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/plugins/svs.api.json
-
-// Package svs contains generated bindings for API file svs.api.
-//
-// Contents:
-// 6 aliases
-// 10 enums
-// 6 structs
-// 1 union
-// 10 messages
-//
-package svs
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "svs"
- APIVersion = "1.0.0"
- VersionCrc = 0xf870d4cb
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
-
-// SvsDetails defines message 'svs_details'.
-type SvsDetails struct {
- TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
-}
-
-func (m *SvsDetails) Reset() { *m = SvsDetails{} }
-func (*SvsDetails) GetMessageName() string { return "svs_details" }
-func (*SvsDetails) GetCrcString() string { return "b8523d64" }
-func (*SvsDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SvsDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.TableID
- size += 4 // m.SwIfIndex
- size += 4 // m.Af
- return size
-}
-func (m *SvsDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.TableID)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint32(uint32(m.Af))
- return buf.Bytes(), nil
-}
-func (m *SvsDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.TableID = buf.DecodeUint32()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Af = AddressFamily(buf.DecodeUint32())
- return nil
-}
-
-// SvsDump defines message 'svs_dump'.
-type SvsDump struct{}
-
-func (m *SvsDump) Reset() { *m = SvsDump{} }
-func (*SvsDump) GetMessageName() string { return "svs_dump" }
-func (*SvsDump) GetCrcString() string { return "51077d14" }
-func (*SvsDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SvsDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *SvsDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *SvsDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// SvsEnableDisable defines message 'svs_enable_disable'.
-type SvsEnableDisable struct {
- IsEnable bool `binapi:"bool,name=is_enable" json:"is_enable,omitempty"`
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *SvsEnableDisable) Reset() { *m = SvsEnableDisable{} }
-func (*SvsEnableDisable) GetMessageName() string { return "svs_enable_disable" }
-func (*SvsEnableDisable) GetCrcString() string { return "634b89d2" }
-func (*SvsEnableDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SvsEnableDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsEnable
- size += 4 // m.Af
- size += 4 // m.TableID
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *SvsEnableDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsEnable)
- buf.EncodeUint32(uint32(m.Af))
- buf.EncodeUint32(m.TableID)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- return buf.Bytes(), nil
-}
-func (m *SvsEnableDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsEnable = buf.DecodeBool()
- m.Af = AddressFamily(buf.DecodeUint32())
- m.TableID = buf.DecodeUint32()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// SvsEnableDisableReply defines message 'svs_enable_disable_reply'.
-type SvsEnableDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SvsEnableDisableReply) Reset() { *m = SvsEnableDisableReply{} }
-func (*SvsEnableDisableReply) GetMessageName() string { return "svs_enable_disable_reply" }
-func (*SvsEnableDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*SvsEnableDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SvsEnableDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SvsEnableDisableReply) 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 *SvsEnableDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SvsPluginGetVersion defines message 'svs_plugin_get_version'.
-type SvsPluginGetVersion struct{}
-
-func (m *SvsPluginGetVersion) Reset() { *m = SvsPluginGetVersion{} }
-func (*SvsPluginGetVersion) GetMessageName() string { return "svs_plugin_get_version" }
-func (*SvsPluginGetVersion) GetCrcString() string { return "51077d14" }
-func (*SvsPluginGetVersion) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SvsPluginGetVersion) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *SvsPluginGetVersion) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *SvsPluginGetVersion) Unmarshal(b []byte) error {
- return nil
-}
-
-// SvsPluginGetVersionReply defines message 'svs_plugin_get_version_reply'.
-type SvsPluginGetVersionReply struct {
- Major uint32 `binapi:"u32,name=major" json:"major,omitempty"`
- Minor uint32 `binapi:"u32,name=minor" json:"minor,omitempty"`
-}
-
-func (m *SvsPluginGetVersionReply) Reset() { *m = SvsPluginGetVersionReply{} }
-func (*SvsPluginGetVersionReply) GetMessageName() string { return "svs_plugin_get_version_reply" }
-func (*SvsPluginGetVersionReply) GetCrcString() string { return "9b32cf86" }
-func (*SvsPluginGetVersionReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SvsPluginGetVersionReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Major
- size += 4 // m.Minor
- return size
-}
-func (m *SvsPluginGetVersionReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Major)
- buf.EncodeUint32(m.Minor)
- return buf.Bytes(), nil
-}
-func (m *SvsPluginGetVersionReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Major = buf.DecodeUint32()
- m.Minor = buf.DecodeUint32()
- return nil
-}
-
-// SvsRouteAddDel defines message 'svs_route_add_del'.
-type SvsRouteAddDel struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- Prefix Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"`
- TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
- SourceTableID uint32 `binapi:"u32,name=source_table_id" json:"source_table_id,omitempty"`
-}
-
-func (m *SvsRouteAddDel) Reset() { *m = SvsRouteAddDel{} }
-func (*SvsRouteAddDel) GetMessageName() string { return "svs_route_add_del" }
-func (*SvsRouteAddDel) GetCrcString() string { return "d39e31fc" }
-func (*SvsRouteAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SvsRouteAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 4 // m.Prefix.Address.Af
- size += 1 * 16 // m.Prefix.Address.Un
- size += 1 // m.Prefix.Len
- size += 4 // m.TableID
- size += 4 // m.SourceTableID
- return size
-}
-func (m *SvsRouteAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeUint32(uint32(m.Prefix.Address.Af))
- buf.EncodeBytes(m.Prefix.Address.Un.XXX_UnionData[:], 16)
- buf.EncodeUint8(m.Prefix.Len)
- buf.EncodeUint32(m.TableID)
- buf.EncodeUint32(m.SourceTableID)
- return buf.Bytes(), nil
-}
-func (m *SvsRouteAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.Prefix.Address.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Prefix.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Prefix.Len = buf.DecodeUint8()
- m.TableID = buf.DecodeUint32()
- m.SourceTableID = buf.DecodeUint32()
- return nil
-}
-
-// SvsRouteAddDelReply defines message 'svs_route_add_del_reply'.
-type SvsRouteAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SvsRouteAddDelReply) Reset() { *m = SvsRouteAddDelReply{} }
-func (*SvsRouteAddDelReply) GetMessageName() string { return "svs_route_add_del_reply" }
-func (*SvsRouteAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*SvsRouteAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SvsRouteAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SvsRouteAddDelReply) 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 *SvsRouteAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SvsTableAddDel defines message 'svs_table_add_del'.
-type SvsTableAddDel struct {
- IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
-}
-
-func (m *SvsTableAddDel) Reset() { *m = SvsTableAddDel{} }
-func (*SvsTableAddDel) GetMessageName() string { return "svs_table_add_del" }
-func (*SvsTableAddDel) GetCrcString() string { return "7d21cb2a" }
-func (*SvsTableAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SvsTableAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 4 // m.Af
- size += 4 // m.TableID
- return size
-}
-func (m *SvsTableAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeUint32(uint32(m.Af))
- buf.EncodeUint32(m.TableID)
- return buf.Bytes(), nil
-}
-func (m *SvsTableAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.Af = AddressFamily(buf.DecodeUint32())
- m.TableID = buf.DecodeUint32()
- return nil
-}
-
-// SvsTableAddDelReply defines message 'svs_table_add_del_reply'.
-type SvsTableAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SvsTableAddDelReply) Reset() { *m = SvsTableAddDelReply{} }
-func (*SvsTableAddDelReply) GetMessageName() string { return "svs_table_add_del_reply" }
-func (*SvsTableAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*SvsTableAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SvsTableAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SvsTableAddDelReply) 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 *SvsTableAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_svs_binapi_init() }
-func file_svs_binapi_init() {
- api.RegisterMessage((*SvsDetails)(nil), "svs_details_b8523d64")
- api.RegisterMessage((*SvsDump)(nil), "svs_dump_51077d14")
- api.RegisterMessage((*SvsEnableDisable)(nil), "svs_enable_disable_634b89d2")
- api.RegisterMessage((*SvsEnableDisableReply)(nil), "svs_enable_disable_reply_e8d4e804")
- api.RegisterMessage((*SvsPluginGetVersion)(nil), "svs_plugin_get_version_51077d14")
- api.RegisterMessage((*SvsPluginGetVersionReply)(nil), "svs_plugin_get_version_reply_9b32cf86")
- api.RegisterMessage((*SvsRouteAddDel)(nil), "svs_route_add_del_d39e31fc")
- api.RegisterMessage((*SvsRouteAddDelReply)(nil), "svs_route_add_del_reply_e8d4e804")
- api.RegisterMessage((*SvsTableAddDel)(nil), "svs_table_add_del_7d21cb2a")
- api.RegisterMessage((*SvsTableAddDelReply)(nil), "svs_table_add_del_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*SvsDetails)(nil),
- (*SvsDump)(nil),
- (*SvsEnableDisable)(nil),
- (*SvsEnableDisableReply)(nil),
- (*SvsPluginGetVersion)(nil),
- (*SvsPluginGetVersionReply)(nil),
- (*SvsRouteAddDel)(nil),
- (*SvsRouteAddDelReply)(nil),
- (*SvsTableAddDel)(nil),
- (*SvsTableAddDelReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/svs/svs_rpc.ba.go b/internal/testbinapi/binapi2001/svs/svs_rpc.ba.go
deleted file mode 100644
index c69c02b..0000000
--- a/internal/testbinapi/binapi2001/svs/svs_rpc.ba.go
+++ /dev/null
@@ -1,108 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package svs
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service svs.
-type RPCService interface {
- SvsDump(ctx context.Context, in *SvsDump) (RPCService_SvsDumpClient, error)
- SvsEnableDisable(ctx context.Context, in *SvsEnableDisable) (*SvsEnableDisableReply, error)
- SvsPluginGetVersion(ctx context.Context, in *SvsPluginGetVersion) (*SvsPluginGetVersionReply, error)
- SvsRouteAddDel(ctx context.Context, in *SvsRouteAddDel) (*SvsRouteAddDelReply, error)
- SvsTableAddDel(ctx context.Context, in *SvsTableAddDel) (*SvsTableAddDelReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) SvsDump(ctx context.Context, in *SvsDump) (RPCService_SvsDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_SvsDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_SvsDumpClient interface {
- Recv() (*SvsDetails, error)
- api.Stream
-}
-
-type serviceClient_SvsDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_SvsDumpClient) Recv() (*SvsDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *SvsDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) SvsEnableDisable(ctx context.Context, in *SvsEnableDisable) (*SvsEnableDisableReply, error) {
- out := new(SvsEnableDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SvsPluginGetVersion(ctx context.Context, in *SvsPluginGetVersion) (*SvsPluginGetVersionReply, error) {
- out := new(SvsPluginGetVersionReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, nil
-}
-
-func (c *serviceClient) SvsRouteAddDel(ctx context.Context, in *SvsRouteAddDel) (*SvsRouteAddDelReply, error) {
- out := new(SvsRouteAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SvsTableAddDel(ctx context.Context, in *SvsTableAddDel) (*SvsTableAddDelReply, error) {
- out := new(SvsTableAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/syslog/syslog.ba.go b/internal/testbinapi/binapi2001/syslog/syslog.ba.go
deleted file mode 100644
index 0136824..0000000
--- a/internal/testbinapi/binapi2001/syslog/syslog.ba.go
+++ /dev/null
@@ -1,990 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/syslog.api.json
-
-// Package syslog contains generated bindings for API file syslog.api.
-//
-// Contents:
-// 5 aliases
-// 5 enums
-// 6 structs
-// 1 union
-// 8 messages
-//
-package syslog
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "syslog"
- APIVersion = "1.0.0"
- VersionCrc = 0xb0790f43
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SyslogSeverity defines enum 'syslog_severity'.
-type SyslogSeverity uint32
-
-const (
- SYSLOG_API_SEVERITY_EMERG SyslogSeverity = 0
- SYSLOG_API_SEVERITY_ALERT SyslogSeverity = 1
- SYSLOG_API_SEVERITY_CRIT SyslogSeverity = 2
- SYSLOG_API_SEVERITY_ERR SyslogSeverity = 3
- SYSLOG_API_SEVERITY_WARN SyslogSeverity = 4
- SYSLOG_API_SEVERITY_NOTICE SyslogSeverity = 5
- SYSLOG_API_SEVERITY_INFO SyslogSeverity = 6
- SYSLOG_API_SEVERITY_DBG SyslogSeverity = 7
-)
-
-var (
- SyslogSeverity_name = map[uint32]string{
- 0: "SYSLOG_API_SEVERITY_EMERG",
- 1: "SYSLOG_API_SEVERITY_ALERT",
- 2: "SYSLOG_API_SEVERITY_CRIT",
- 3: "SYSLOG_API_SEVERITY_ERR",
- 4: "SYSLOG_API_SEVERITY_WARN",
- 5: "SYSLOG_API_SEVERITY_NOTICE",
- 6: "SYSLOG_API_SEVERITY_INFO",
- 7: "SYSLOG_API_SEVERITY_DBG",
- }
- SyslogSeverity_value = map[string]uint32{
- "SYSLOG_API_SEVERITY_EMERG": 0,
- "SYSLOG_API_SEVERITY_ALERT": 1,
- "SYSLOG_API_SEVERITY_CRIT": 2,
- "SYSLOG_API_SEVERITY_ERR": 3,
- "SYSLOG_API_SEVERITY_WARN": 4,
- "SYSLOG_API_SEVERITY_NOTICE": 5,
- "SYSLOG_API_SEVERITY_INFO": 6,
- "SYSLOG_API_SEVERITY_DBG": 7,
- }
-)
-
-func (x SyslogSeverity) String() string {
- s, ok := SyslogSeverity_name[uint32(x)]
- if ok {
- return s
- }
- return "SyslogSeverity(" + strconv.Itoa(int(x)) + ")"
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
-
-// SyslogGetFilter defines message 'syslog_get_filter'.
-type SyslogGetFilter struct{}
-
-func (m *SyslogGetFilter) Reset() { *m = SyslogGetFilter{} }
-func (*SyslogGetFilter) GetMessageName() string { return "syslog_get_filter" }
-func (*SyslogGetFilter) GetCrcString() string { return "51077d14" }
-func (*SyslogGetFilter) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SyslogGetFilter) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *SyslogGetFilter) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *SyslogGetFilter) Unmarshal(b []byte) error {
- return nil
-}
-
-// SyslogGetFilterReply defines message 'syslog_get_filter_reply'.
-type SyslogGetFilterReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- Severity SyslogSeverity `binapi:"syslog_severity,name=severity" json:"severity,omitempty"`
-}
-
-func (m *SyslogGetFilterReply) Reset() { *m = SyslogGetFilterReply{} }
-func (*SyslogGetFilterReply) GetMessageName() string { return "syslog_get_filter_reply" }
-func (*SyslogGetFilterReply) GetCrcString() string { return "eb1833f8" }
-func (*SyslogGetFilterReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SyslogGetFilterReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.Severity
- return size
-}
-func (m *SyslogGetFilterReply) 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.Severity))
- return buf.Bytes(), nil
-}
-func (m *SyslogGetFilterReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.Severity = SyslogSeverity(buf.DecodeUint32())
- return nil
-}
-
-// SyslogGetSender defines message 'syslog_get_sender'.
-type SyslogGetSender struct{}
-
-func (m *SyslogGetSender) Reset() { *m = SyslogGetSender{} }
-func (*SyslogGetSender) GetMessageName() string { return "syslog_get_sender" }
-func (*SyslogGetSender) GetCrcString() string { return "51077d14" }
-func (*SyslogGetSender) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SyslogGetSender) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *SyslogGetSender) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *SyslogGetSender) Unmarshal(b []byte) error {
- return nil
-}
-
-// SyslogGetSenderReply defines message 'syslog_get_sender_reply'.
-type SyslogGetSenderReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- SrcAddress IP4Address `binapi:"ip4_address,name=src_address" json:"src_address,omitempty"`
- CollectorAddress IP4Address `binapi:"ip4_address,name=collector_address" json:"collector_address,omitempty"`
- CollectorPort uint16 `binapi:"u16,name=collector_port" json:"collector_port,omitempty"`
- VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
- MaxMsgSize uint32 `binapi:"u32,name=max_msg_size" json:"max_msg_size,omitempty"`
-}
-
-func (m *SyslogGetSenderReply) Reset() { *m = SyslogGetSenderReply{} }
-func (*SyslogGetSenderReply) GetMessageName() string { return "syslog_get_sender_reply" }
-func (*SyslogGetSenderReply) GetCrcString() string { return "d3da60ac" }
-func (*SyslogGetSenderReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SyslogGetSenderReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 1 * 4 // m.SrcAddress
- size += 1 * 4 // m.CollectorAddress
- size += 2 // m.CollectorPort
- size += 4 // m.VrfID
- size += 4 // m.MaxMsgSize
- return size
-}
-func (m *SyslogGetSenderReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeBytes(m.SrcAddress[:], 4)
- buf.EncodeBytes(m.CollectorAddress[:], 4)
- buf.EncodeUint16(m.CollectorPort)
- buf.EncodeUint32(m.VrfID)
- buf.EncodeUint32(m.MaxMsgSize)
- return buf.Bytes(), nil
-}
-func (m *SyslogGetSenderReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- copy(m.SrcAddress[:], buf.DecodeBytes(4))
- copy(m.CollectorAddress[:], buf.DecodeBytes(4))
- m.CollectorPort = buf.DecodeUint16()
- m.VrfID = buf.DecodeUint32()
- m.MaxMsgSize = buf.DecodeUint32()
- return nil
-}
-
-// SyslogSetFilter defines message 'syslog_set_filter'.
-type SyslogSetFilter struct {
- Severity SyslogSeverity `binapi:"syslog_severity,name=severity" json:"severity,omitempty"`
-}
-
-func (m *SyslogSetFilter) Reset() { *m = SyslogSetFilter{} }
-func (*SyslogSetFilter) GetMessageName() string { return "syslog_set_filter" }
-func (*SyslogSetFilter) GetCrcString() string { return "571348c3" }
-func (*SyslogSetFilter) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SyslogSetFilter) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Severity
- return size
-}
-func (m *SyslogSetFilter) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.Severity))
- return buf.Bytes(), nil
-}
-func (m *SyslogSetFilter) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Severity = SyslogSeverity(buf.DecodeUint32())
- return nil
-}
-
-// SyslogSetFilterReply defines message 'syslog_set_filter_reply'.
-type SyslogSetFilterReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SyslogSetFilterReply) Reset() { *m = SyslogSetFilterReply{} }
-func (*SyslogSetFilterReply) GetMessageName() string { return "syslog_set_filter_reply" }
-func (*SyslogSetFilterReply) GetCrcString() string { return "e8d4e804" }
-func (*SyslogSetFilterReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SyslogSetFilterReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SyslogSetFilterReply) 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 *SyslogSetFilterReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SyslogSetSender defines message 'syslog_set_sender'.
-type SyslogSetSender struct {
- SrcAddress IP4Address `binapi:"ip4_address,name=src_address" json:"src_address,omitempty"`
- CollectorAddress IP4Address `binapi:"ip4_address,name=collector_address" json:"collector_address,omitempty"`
- CollectorPort uint16 `binapi:"u16,name=collector_port" json:"collector_port,omitempty"`
- VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
- MaxMsgSize uint32 `binapi:"u32,name=max_msg_size" json:"max_msg_size,omitempty"`
-}
-
-func (m *SyslogSetSender) Reset() { *m = SyslogSetSender{} }
-func (*SyslogSetSender) GetMessageName() string { return "syslog_set_sender" }
-func (*SyslogSetSender) GetCrcString() string { return "bb641285" }
-func (*SyslogSetSender) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SyslogSetSender) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 4 // m.SrcAddress
- size += 1 * 4 // m.CollectorAddress
- size += 2 // m.CollectorPort
- size += 4 // m.VrfID
- size += 4 // m.MaxMsgSize
- return size
-}
-func (m *SyslogSetSender) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.SrcAddress[:], 4)
- buf.EncodeBytes(m.CollectorAddress[:], 4)
- buf.EncodeUint16(m.CollectorPort)
- buf.EncodeUint32(m.VrfID)
- buf.EncodeUint32(m.MaxMsgSize)
- return buf.Bytes(), nil
-}
-func (m *SyslogSetSender) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- copy(m.SrcAddress[:], buf.DecodeBytes(4))
- copy(m.CollectorAddress[:], buf.DecodeBytes(4))
- m.CollectorPort = buf.DecodeUint16()
- m.VrfID = buf.DecodeUint32()
- m.MaxMsgSize = buf.DecodeUint32()
- return nil
-}
-
-// SyslogSetSenderReply defines message 'syslog_set_sender_reply'.
-type SyslogSetSenderReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SyslogSetSenderReply) Reset() { *m = SyslogSetSenderReply{} }
-func (*SyslogSetSenderReply) GetMessageName() string { return "syslog_set_sender_reply" }
-func (*SyslogSetSenderReply) GetCrcString() string { return "e8d4e804" }
-func (*SyslogSetSenderReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SyslogSetSenderReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SyslogSetSenderReply) 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 *SyslogSetSenderReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_syslog_binapi_init() }
-func file_syslog_binapi_init() {
- api.RegisterMessage((*SyslogGetFilter)(nil), "syslog_get_filter_51077d14")
- api.RegisterMessage((*SyslogGetFilterReply)(nil), "syslog_get_filter_reply_eb1833f8")
- api.RegisterMessage((*SyslogGetSender)(nil), "syslog_get_sender_51077d14")
- api.RegisterMessage((*SyslogGetSenderReply)(nil), "syslog_get_sender_reply_d3da60ac")
- api.RegisterMessage((*SyslogSetFilter)(nil), "syslog_set_filter_571348c3")
- api.RegisterMessage((*SyslogSetFilterReply)(nil), "syslog_set_filter_reply_e8d4e804")
- api.RegisterMessage((*SyslogSetSender)(nil), "syslog_set_sender_bb641285")
- api.RegisterMessage((*SyslogSetSenderReply)(nil), "syslog_set_sender_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*SyslogGetFilter)(nil),
- (*SyslogGetFilterReply)(nil),
- (*SyslogGetSender)(nil),
- (*SyslogGetSenderReply)(nil),
- (*SyslogSetFilter)(nil),
- (*SyslogSetFilterReply)(nil),
- (*SyslogSetSender)(nil),
- (*SyslogSetSenderReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/syslog/syslog_rpc.ba.go b/internal/testbinapi/binapi2001/syslog/syslog_rpc.ba.go
deleted file mode 100644
index da005b3..0000000
--- a/internal/testbinapi/binapi2001/syslog/syslog_rpc.ba.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package syslog
-
-import (
- "context"
-
- api "git.fd.io/govpp.git/api"
-)
-
-// RPCService defines RPC service syslog.
-type RPCService interface {
- SyslogGetFilter(ctx context.Context, in *SyslogGetFilter) (*SyslogGetFilterReply, error)
- SyslogGetSender(ctx context.Context, in *SyslogGetSender) (*SyslogGetSenderReply, error)
- SyslogSetFilter(ctx context.Context, in *SyslogSetFilter) (*SyslogSetFilterReply, error)
- SyslogSetSender(ctx context.Context, in *SyslogSetSender) (*SyslogSetSenderReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) SyslogGetFilter(ctx context.Context, in *SyslogGetFilter) (*SyslogGetFilterReply, error) {
- out := new(SyslogGetFilterReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SyslogGetSender(ctx context.Context, in *SyslogGetSender) (*SyslogGetSenderReply, error) {
- out := new(SyslogGetSenderReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SyslogSetFilter(ctx context.Context, in *SyslogSetFilter) (*SyslogSetFilterReply, error) {
- out := new(SyslogSetFilterReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SyslogSetSender(ctx context.Context, in *SyslogSetSender) (*SyslogSetSenderReply, error) {
- out := new(SyslogSetSenderReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/tapv2/tapv2.ba.go b/internal/testbinapi/binapi2001/tapv2/tapv2.ba.go
deleted file mode 100644
index d81c09f..0000000
--- a/internal/testbinapi/binapi2001/tapv2/tapv2.ba.go
+++ /dev/null
@@ -1,1345 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/tapv2.api.json
-
-// Package tapv2 contains generated bindings for API file tapv2.api.
-//
-// Contents:
-// 7 aliases
-// 11 enums
-// 6 structs
-// 1 union
-// 6 messages
-//
-package tapv2
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "tapv2"
- APIVersion = "3.0.0"
- VersionCrc = 0x7d58f9a4
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// TapFlags defines enum 'tap_flags'.
-type TapFlags uint32
-
-const (
- TAP_FLAG_GSO TapFlags = 1
- TAP_FLAG_CSUM_OFFLOAD TapFlags = 2
-)
-
-var (
- TapFlags_name = map[uint32]string{
- 1: "TAP_FLAG_GSO",
- 2: "TAP_FLAG_CSUM_OFFLOAD",
- }
- TapFlags_value = map[string]uint32{
- "TAP_FLAG_GSO": 1,
- "TAP_FLAG_CSUM_OFFLOAD": 2,
- }
-)
-
-func (x TapFlags) String() string {
- s, ok := TapFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := TapFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "TapFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// MacAddress defines alias 'mac_address'.
-type MacAddress [6]uint8
-
-func ParseMacAddress(s string) (MacAddress, error) {
- var macaddr MacAddress
- mac, err := net.ParseMAC(s)
- if err != nil {
- return macaddr, err
- }
- copy(macaddr[:], mac[:])
- return macaddr, nil
-}
-
-func (x MacAddress) ToMAC() net.HardwareAddr {
- return net.HardwareAddr(x[:])
-}
-
-func (x MacAddress) String() string {
- return x.ToMAC().String()
-}
-
-func (x *MacAddress) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *MacAddress) UnmarshalText(text []byte) error {
- mac, err := ParseMacAddress(string(text))
- if err != nil {
- return err
- }
- *x = mac
- return nil
-}
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
-
-// SwInterfaceTapV2Details defines message 'sw_interface_tap_v2_details'.
-type SwInterfaceTapV2Details struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
- TxRingSz uint16 `binapi:"u16,name=tx_ring_sz" json:"tx_ring_sz,omitempty"`
- RxRingSz uint16 `binapi:"u16,name=rx_ring_sz" json:"rx_ring_sz,omitempty"`
- HostMtuSize uint32 `binapi:"u32,name=host_mtu_size" json:"host_mtu_size,omitempty"`
- HostMacAddr MacAddress `binapi:"mac_address,name=host_mac_addr" json:"host_mac_addr,omitempty"`
- HostIP4Prefix IP4AddressWithPrefix `binapi:"ip4_address_with_prefix,name=host_ip4_prefix" json:"host_ip4_prefix,omitempty"`
- HostIP6Prefix IP6AddressWithPrefix `binapi:"ip6_address_with_prefix,name=host_ip6_prefix" json:"host_ip6_prefix,omitempty"`
- TapFlags TapFlags `binapi:"tap_flags,name=tap_flags" json:"tap_flags,omitempty"`
- DevName string `binapi:"string[64],name=dev_name" json:"dev_name,omitempty"`
- HostIfName string `binapi:"string[64],name=host_if_name" json:"host_if_name,omitempty"`
- HostNamespace string `binapi:"string[64],name=host_namespace" json:"host_namespace,omitempty"`
- HostBridge string `binapi:"string[64],name=host_bridge" json:"host_bridge,omitempty"`
-}
-
-func (m *SwInterfaceTapV2Details) Reset() { *m = SwInterfaceTapV2Details{} }
-func (*SwInterfaceTapV2Details) GetMessageName() string { return "sw_interface_tap_v2_details" }
-func (*SwInterfaceTapV2Details) GetCrcString() string { return "e53c16de" }
-func (*SwInterfaceTapV2Details) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SwInterfaceTapV2Details) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.ID
- size += 2 // m.TxRingSz
- size += 2 // m.RxRingSz
- size += 4 // m.HostMtuSize
- size += 1 * 6 // m.HostMacAddr
- size += 1 * 4 // m.HostIP4Prefix.Address
- size += 1 // m.HostIP4Prefix.Len
- size += 1 * 16 // m.HostIP6Prefix.Address
- size += 1 // m.HostIP6Prefix.Len
- size += 4 // m.TapFlags
- size += 64 // m.DevName
- size += 64 // m.HostIfName
- size += 64 // m.HostNamespace
- size += 64 // m.HostBridge
- return size
-}
-func (m *SwInterfaceTapV2Details) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.SwIfIndex)
- buf.EncodeUint32(m.ID)
- buf.EncodeUint16(m.TxRingSz)
- buf.EncodeUint16(m.RxRingSz)
- buf.EncodeUint32(m.HostMtuSize)
- buf.EncodeBytes(m.HostMacAddr[:], 6)
- buf.EncodeBytes(m.HostIP4Prefix.Address[:], 4)
- buf.EncodeUint8(m.HostIP4Prefix.Len)
- buf.EncodeBytes(m.HostIP6Prefix.Address[:], 16)
- buf.EncodeUint8(m.HostIP6Prefix.Len)
- buf.EncodeUint32(uint32(m.TapFlags))
- buf.EncodeString(m.DevName, 64)
- buf.EncodeString(m.HostIfName, 64)
- buf.EncodeString(m.HostNamespace, 64)
- buf.EncodeString(m.HostBridge, 64)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceTapV2Details) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = buf.DecodeUint32()
- m.ID = buf.DecodeUint32()
- m.TxRingSz = buf.DecodeUint16()
- m.RxRingSz = buf.DecodeUint16()
- m.HostMtuSize = buf.DecodeUint32()
- copy(m.HostMacAddr[:], buf.DecodeBytes(6))
- copy(m.HostIP4Prefix.Address[:], buf.DecodeBytes(4))
- m.HostIP4Prefix.Len = buf.DecodeUint8()
- copy(m.HostIP6Prefix.Address[:], buf.DecodeBytes(16))
- m.HostIP6Prefix.Len = buf.DecodeUint8()
- m.TapFlags = TapFlags(buf.DecodeUint32())
- m.DevName = buf.DecodeString(64)
- m.HostIfName = buf.DecodeString(64)
- m.HostNamespace = buf.DecodeString(64)
- m.HostBridge = buf.DecodeString(64)
- return nil
-}
-
-// SwInterfaceTapV2Dump defines message 'sw_interface_tap_v2_dump'.
-type SwInterfaceTapV2Dump struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
-}
-
-func (m *SwInterfaceTapV2Dump) Reset() { *m = SwInterfaceTapV2Dump{} }
-func (*SwInterfaceTapV2Dump) GetMessageName() string { return "sw_interface_tap_v2_dump" }
-func (*SwInterfaceTapV2Dump) GetCrcString() string { return "f9e6675e" }
-func (*SwInterfaceTapV2Dump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceTapV2Dump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *SwInterfaceTapV2Dump) 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 *SwInterfaceTapV2Dump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// TapCreateV2 defines message 'tap_create_v2'.
-type TapCreateV2 struct {
- ID uint32 `binapi:"u32,name=id,default=4294967295" json:"id,omitempty"`
- UseRandomMac bool `binapi:"bool,name=use_random_mac,default=true" json:"use_random_mac,omitempty"`
- MacAddress MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
- NumRxQueues uint8 `binapi:"u8,name=num_rx_queues,default=1" json:"num_rx_queues,omitempty"`
- TxRingSz uint16 `binapi:"u16,name=tx_ring_sz" json:"tx_ring_sz,omitempty"`
- RxRingSz uint16 `binapi:"u16,name=rx_ring_sz" json:"rx_ring_sz,omitempty"`
- HostMtuSet bool `binapi:"bool,name=host_mtu_set" json:"host_mtu_set,omitempty"`
- HostMtuSize uint32 `binapi:"u32,name=host_mtu_size" json:"host_mtu_size,omitempty"`
- HostMacAddrSet bool `binapi:"bool,name=host_mac_addr_set" json:"host_mac_addr_set,omitempty"`
- HostMacAddr MacAddress `binapi:"mac_address,name=host_mac_addr" json:"host_mac_addr,omitempty"`
- HostIP4PrefixSet bool `binapi:"bool,name=host_ip4_prefix_set" json:"host_ip4_prefix_set,omitempty"`
- HostIP4Prefix IP4AddressWithPrefix `binapi:"ip4_address_with_prefix,name=host_ip4_prefix" json:"host_ip4_prefix,omitempty"`
- HostIP6PrefixSet bool `binapi:"bool,name=host_ip6_prefix_set" json:"host_ip6_prefix_set,omitempty"`
- HostIP6Prefix IP6AddressWithPrefix `binapi:"ip6_address_with_prefix,name=host_ip6_prefix" json:"host_ip6_prefix,omitempty"`
- HostIP4GwSet bool `binapi:"bool,name=host_ip4_gw_set" json:"host_ip4_gw_set,omitempty"`
- HostIP4Gw IP4Address `binapi:"ip4_address,name=host_ip4_gw" json:"host_ip4_gw,omitempty"`
- HostIP6GwSet bool `binapi:"bool,name=host_ip6_gw_set" json:"host_ip6_gw_set,omitempty"`
- HostIP6Gw IP6Address `binapi:"ip6_address,name=host_ip6_gw" json:"host_ip6_gw,omitempty"`
- TapFlags TapFlags `binapi:"tap_flags,name=tap_flags" json:"tap_flags,omitempty"`
- HostNamespaceSet bool `binapi:"bool,name=host_namespace_set" json:"host_namespace_set,omitempty"`
- HostNamespace string `binapi:"string[64],name=host_namespace" json:"host_namespace,omitempty"`
- HostIfNameSet bool `binapi:"bool,name=host_if_name_set" json:"host_if_name_set,omitempty"`
- HostIfName string `binapi:"string[64],name=host_if_name" json:"host_if_name,omitempty"`
- HostBridgeSet bool `binapi:"bool,name=host_bridge_set" json:"host_bridge_set,omitempty"`
- HostBridge string `binapi:"string[64],name=host_bridge" json:"host_bridge,omitempty"`
- Tag string `binapi:"string[],name=tag" json:"tag,omitempty"`
-}
-
-func (m *TapCreateV2) Reset() { *m = TapCreateV2{} }
-func (*TapCreateV2) GetMessageName() string { return "tap_create_v2" }
-func (*TapCreateV2) GetCrcString() string { return "445835fd" }
-func (*TapCreateV2) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *TapCreateV2) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.ID
- size += 1 // m.UseRandomMac
- size += 1 * 6 // m.MacAddress
- size += 1 // m.NumRxQueues
- size += 2 // m.TxRingSz
- size += 2 // m.RxRingSz
- size += 1 // m.HostMtuSet
- size += 4 // m.HostMtuSize
- size += 1 // m.HostMacAddrSet
- size += 1 * 6 // m.HostMacAddr
- size += 1 // m.HostIP4PrefixSet
- size += 1 * 4 // m.HostIP4Prefix.Address
- size += 1 // m.HostIP4Prefix.Len
- size += 1 // m.HostIP6PrefixSet
- size += 1 * 16 // m.HostIP6Prefix.Address
- size += 1 // m.HostIP6Prefix.Len
- size += 1 // m.HostIP4GwSet
- size += 1 * 4 // m.HostIP4Gw
- size += 1 // m.HostIP6GwSet
- size += 1 * 16 // m.HostIP6Gw
- size += 4 // m.TapFlags
- size += 1 // m.HostNamespaceSet
- size += 64 // m.HostNamespace
- size += 1 // m.HostIfNameSet
- size += 64 // m.HostIfName
- size += 1 // m.HostBridgeSet
- size += 64 // m.HostBridge
- size += 4 + len(m.Tag) // m.Tag
- return size
-}
-func (m *TapCreateV2) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.ID)
- buf.EncodeBool(m.UseRandomMac)
- buf.EncodeBytes(m.MacAddress[:], 6)
- buf.EncodeUint8(m.NumRxQueues)
- buf.EncodeUint16(m.TxRingSz)
- buf.EncodeUint16(m.RxRingSz)
- buf.EncodeBool(m.HostMtuSet)
- buf.EncodeUint32(m.HostMtuSize)
- buf.EncodeBool(m.HostMacAddrSet)
- buf.EncodeBytes(m.HostMacAddr[:], 6)
- buf.EncodeBool(m.HostIP4PrefixSet)
- buf.EncodeBytes(m.HostIP4Prefix.Address[:], 4)
- buf.EncodeUint8(m.HostIP4Prefix.Len)
- buf.EncodeBool(m.HostIP6PrefixSet)
- buf.EncodeBytes(m.HostIP6Prefix.Address[:], 16)
- buf.EncodeUint8(m.HostIP6Prefix.Len)
- buf.EncodeBool(m.HostIP4GwSet)
- buf.EncodeBytes(m.HostIP4Gw[:], 4)
- buf.EncodeBool(m.HostIP6GwSet)
- buf.EncodeBytes(m.HostIP6Gw[:], 16)
- buf.EncodeUint32(uint32(m.TapFlags))
- buf.EncodeBool(m.HostNamespaceSet)
- buf.EncodeString(m.HostNamespace, 64)
- buf.EncodeBool(m.HostIfNameSet)
- buf.EncodeString(m.HostIfName, 64)
- buf.EncodeBool(m.HostBridgeSet)
- buf.EncodeString(m.HostBridge, 64)
- buf.EncodeString(m.Tag, 0)
- return buf.Bytes(), nil
-}
-func (m *TapCreateV2) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.ID = buf.DecodeUint32()
- m.UseRandomMac = buf.DecodeBool()
- copy(m.MacAddress[:], buf.DecodeBytes(6))
- m.NumRxQueues = buf.DecodeUint8()
- m.TxRingSz = buf.DecodeUint16()
- m.RxRingSz = buf.DecodeUint16()
- m.HostMtuSet = buf.DecodeBool()
- m.HostMtuSize = buf.DecodeUint32()
- m.HostMacAddrSet = buf.DecodeBool()
- copy(m.HostMacAddr[:], buf.DecodeBytes(6))
- m.HostIP4PrefixSet = buf.DecodeBool()
- copy(m.HostIP4Prefix.Address[:], buf.DecodeBytes(4))
- m.HostIP4Prefix.Len = buf.DecodeUint8()
- m.HostIP6PrefixSet = buf.DecodeBool()
- copy(m.HostIP6Prefix.Address[:], buf.DecodeBytes(16))
- m.HostIP6Prefix.Len = buf.DecodeUint8()
- m.HostIP4GwSet = buf.DecodeBool()
- copy(m.HostIP4Gw[:], buf.DecodeBytes(4))
- m.HostIP6GwSet = buf.DecodeBool()
- copy(m.HostIP6Gw[:], buf.DecodeBytes(16))
- m.TapFlags = TapFlags(buf.DecodeUint32())
- m.HostNamespaceSet = buf.DecodeBool()
- m.HostNamespace = buf.DecodeString(64)
- m.HostIfNameSet = buf.DecodeBool()
- m.HostIfName = buf.DecodeString(64)
- m.HostBridgeSet = buf.DecodeBool()
- m.HostBridge = buf.DecodeString(64)
- m.Tag = buf.DecodeString(0)
- return nil
-}
-
-// TapCreateV2Reply defines message 'tap_create_v2_reply'.
-type TapCreateV2Reply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *TapCreateV2Reply) Reset() { *m = TapCreateV2Reply{} }
-func (*TapCreateV2Reply) GetMessageName() string { return "tap_create_v2_reply" }
-func (*TapCreateV2Reply) GetCrcString() string { return "5383d31f" }
-func (*TapCreateV2Reply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *TapCreateV2Reply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *TapCreateV2Reply) 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 *TapCreateV2Reply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// TapDeleteV2 defines message 'tap_delete_v2'.
-type TapDeleteV2 struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *TapDeleteV2) Reset() { *m = TapDeleteV2{} }
-func (*TapDeleteV2) GetMessageName() string { return "tap_delete_v2" }
-func (*TapDeleteV2) GetCrcString() string { return "f9e6675e" }
-func (*TapDeleteV2) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *TapDeleteV2) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *TapDeleteV2) 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 *TapDeleteV2) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// TapDeleteV2Reply defines message 'tap_delete_v2_reply'.
-type TapDeleteV2Reply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *TapDeleteV2Reply) Reset() { *m = TapDeleteV2Reply{} }
-func (*TapDeleteV2Reply) GetMessageName() string { return "tap_delete_v2_reply" }
-func (*TapDeleteV2Reply) GetCrcString() string { return "e8d4e804" }
-func (*TapDeleteV2Reply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *TapDeleteV2Reply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *TapDeleteV2Reply) 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 *TapDeleteV2Reply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_tapv2_binapi_init() }
-func file_tapv2_binapi_init() {
- api.RegisterMessage((*SwInterfaceTapV2Details)(nil), "sw_interface_tap_v2_details_e53c16de")
- api.RegisterMessage((*SwInterfaceTapV2Dump)(nil), "sw_interface_tap_v2_dump_f9e6675e")
- api.RegisterMessage((*TapCreateV2)(nil), "tap_create_v2_445835fd")
- api.RegisterMessage((*TapCreateV2Reply)(nil), "tap_create_v2_reply_5383d31f")
- api.RegisterMessage((*TapDeleteV2)(nil), "tap_delete_v2_f9e6675e")
- api.RegisterMessage((*TapDeleteV2Reply)(nil), "tap_delete_v2_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*SwInterfaceTapV2Details)(nil),
- (*SwInterfaceTapV2Dump)(nil),
- (*TapCreateV2)(nil),
- (*TapCreateV2Reply)(nil),
- (*TapDeleteV2)(nil),
- (*TapDeleteV2Reply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/tapv2/tapv2_rpc.ba.go b/internal/testbinapi/binapi2001/tapv2/tapv2_rpc.ba.go
deleted file mode 100644
index 785ef24..0000000
--- a/internal/testbinapi/binapi2001/tapv2/tapv2_rpc.ba.go
+++ /dev/null
@@ -1,88 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package tapv2
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service tapv2.
-type RPCService interface {
- SwInterfaceTapV2Dump(ctx context.Context, in *SwInterfaceTapV2Dump) (RPCService_SwInterfaceTapV2DumpClient, error)
- TapCreateV2(ctx context.Context, in *TapCreateV2) (*TapCreateV2Reply, error)
- TapDeleteV2(ctx context.Context, in *TapDeleteV2) (*TapDeleteV2Reply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) SwInterfaceTapV2Dump(ctx context.Context, in *SwInterfaceTapV2Dump) (RPCService_SwInterfaceTapV2DumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_SwInterfaceTapV2DumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_SwInterfaceTapV2DumpClient interface {
- Recv() (*SwInterfaceTapV2Details, error)
- api.Stream
-}
-
-type serviceClient_SwInterfaceTapV2DumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_SwInterfaceTapV2DumpClient) Recv() (*SwInterfaceTapV2Details, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *SwInterfaceTapV2Details:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) TapCreateV2(ctx context.Context, in *TapCreateV2) (*TapCreateV2Reply, error) {
- out := new(TapCreateV2Reply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) TapDeleteV2(ctx context.Context, in *TapDeleteV2) (*TapDeleteV2Reply, error) {
- out := new(TapDeleteV2Reply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/tcp/tcp.ba.go b/internal/testbinapi/binapi2001/tcp/tcp.ba.go
deleted file mode 100644
index 48fe539..0000000
--- a/internal/testbinapi/binapi2001/tcp/tcp.ba.go
+++ /dev/null
@@ -1,723 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/tcp.api.json
-
-// Package tcp contains generated bindings for API file tcp.api.
-//
-// Contents:
-// 5 aliases
-// 4 enums
-// 6 structs
-// 1 union
-// 2 messages
-//
-package tcp
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "tcp"
- APIVersion = "2.0.0"
- VersionCrc = 0x4d731ac5
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
-
-// TCPConfigureSrcAddresses defines message 'tcp_configure_src_addresses'.
-type TCPConfigureSrcAddresses struct {
- VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
- FirstAddress Address `binapi:"address,name=first_address" json:"first_address,omitempty"`
- LastAddress Address `binapi:"address,name=last_address" json:"last_address,omitempty"`
-}
-
-func (m *TCPConfigureSrcAddresses) Reset() { *m = TCPConfigureSrcAddresses{} }
-func (*TCPConfigureSrcAddresses) GetMessageName() string { return "tcp_configure_src_addresses" }
-func (*TCPConfigureSrcAddresses) GetCrcString() string { return "4b02b946" }
-func (*TCPConfigureSrcAddresses) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *TCPConfigureSrcAddresses) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.VrfID
- size += 4 // m.FirstAddress.Af
- size += 1 * 16 // m.FirstAddress.Un
- size += 4 // m.LastAddress.Af
- size += 1 * 16 // m.LastAddress.Un
- return size
-}
-func (m *TCPConfigureSrcAddresses) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.VrfID)
- buf.EncodeUint32(uint32(m.FirstAddress.Af))
- buf.EncodeBytes(m.FirstAddress.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.LastAddress.Af))
- buf.EncodeBytes(m.LastAddress.Un.XXX_UnionData[:], 16)
- return buf.Bytes(), nil
-}
-func (m *TCPConfigureSrcAddresses) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.VrfID = buf.DecodeUint32()
- m.FirstAddress.Af = AddressFamily(buf.DecodeUint32())
- copy(m.FirstAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.LastAddress.Af = AddressFamily(buf.DecodeUint32())
- copy(m.LastAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- return nil
-}
-
-// TCPConfigureSrcAddressesReply defines message 'tcp_configure_src_addresses_reply'.
-type TCPConfigureSrcAddressesReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *TCPConfigureSrcAddressesReply) Reset() { *m = TCPConfigureSrcAddressesReply{} }
-func (*TCPConfigureSrcAddressesReply) GetMessageName() string {
- return "tcp_configure_src_addresses_reply"
-}
-func (*TCPConfigureSrcAddressesReply) GetCrcString() string { return "e8d4e804" }
-func (*TCPConfigureSrcAddressesReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *TCPConfigureSrcAddressesReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *TCPConfigureSrcAddressesReply) 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 *TCPConfigureSrcAddressesReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_tcp_binapi_init() }
-func file_tcp_binapi_init() {
- api.RegisterMessage((*TCPConfigureSrcAddresses)(nil), "tcp_configure_src_addresses_4b02b946")
- api.RegisterMessage((*TCPConfigureSrcAddressesReply)(nil), "tcp_configure_src_addresses_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*TCPConfigureSrcAddresses)(nil),
- (*TCPConfigureSrcAddressesReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/tcp/tcp_rpc.ba.go b/internal/testbinapi/binapi2001/tcp/tcp_rpc.ba.go
deleted file mode 100644
index 2d045f7..0000000
--- a/internal/testbinapi/binapi2001/tcp/tcp_rpc.ba.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package tcp
-
-import (
- "context"
-
- api "git.fd.io/govpp.git/api"
-)
-
-// RPCService defines RPC service tcp.
-type RPCService interface {
- TCPConfigureSrcAddresses(ctx context.Context, in *TCPConfigureSrcAddresses) (*TCPConfigureSrcAddressesReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) TCPConfigureSrcAddresses(ctx context.Context, in *TCPConfigureSrcAddresses) (*TCPConfigureSrcAddressesReply, error) {
- out := new(TCPConfigureSrcAddressesReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/tls_openssl/tls_openssl.ba.go b/internal/testbinapi/binapi2001/tls_openssl/tls_openssl.ba.go
deleted file mode 100644
index 743521c..0000000
--- a/internal/testbinapi/binapi2001/tls_openssl/tls_openssl.ba.go
+++ /dev/null
@@ -1,124 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/plugins/tls_openssl.api.json
-
-// Package tls_openssl contains generated bindings for API file tls_openssl.api.
-//
-// Contents:
-// 2 messages
-//
-package tls_openssl
-
-import (
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the GoVPP api package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// GoVPP api package needs to be updated.
-const _ = api.GoVppAPIPackageIsVersion2
-
-const (
- APIFile = "tls_openssl"
- APIVersion = "2.0.0"
- VersionCrc = 0x7386fbcd
-)
-
-// TLSOpensslSetEngine defines message 'tls_openssl_set_engine'.
-type TLSOpensslSetEngine struct {
- AsyncEnable uint32 `binapi:"u32,name=async_enable" json:"async_enable,omitempty"`
- Engine []byte `binapi:"u8[64],name=engine" json:"engine,omitempty"`
- Algorithm []byte `binapi:"u8[64],name=algorithm" json:"algorithm,omitempty"`
- Ciphers []byte `binapi:"u8[64],name=ciphers" json:"ciphers,omitempty"`
-}
-
-func (m *TLSOpensslSetEngine) Reset() { *m = TLSOpensslSetEngine{} }
-func (*TLSOpensslSetEngine) GetMessageName() string { return "tls_openssl_set_engine" }
-func (*TLSOpensslSetEngine) GetCrcString() string { return "e34d95c1" }
-func (*TLSOpensslSetEngine) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *TLSOpensslSetEngine) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.AsyncEnable
- size += 1 * 64 // m.Engine
- size += 1 * 64 // m.Algorithm
- size += 1 * 64 // m.Ciphers
- return size
-}
-func (m *TLSOpensslSetEngine) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.AsyncEnable)
- buf.EncodeBytes(m.Engine, 64)
- buf.EncodeBytes(m.Algorithm, 64)
- buf.EncodeBytes(m.Ciphers, 64)
- return buf.Bytes(), nil
-}
-func (m *TLSOpensslSetEngine) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.AsyncEnable = buf.DecodeUint32()
- m.Engine = make([]byte, 64)
- copy(m.Engine, buf.DecodeBytes(len(m.Engine)))
- m.Algorithm = make([]byte, 64)
- copy(m.Algorithm, buf.DecodeBytes(len(m.Algorithm)))
- m.Ciphers = make([]byte, 64)
- copy(m.Ciphers, buf.DecodeBytes(len(m.Ciphers)))
- return nil
-}
-
-// TLSOpensslSetEngineReply defines message 'tls_openssl_set_engine_reply'.
-type TLSOpensslSetEngineReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *TLSOpensslSetEngineReply) Reset() { *m = TLSOpensslSetEngineReply{} }
-func (*TLSOpensslSetEngineReply) GetMessageName() string { return "tls_openssl_set_engine_reply" }
-func (*TLSOpensslSetEngineReply) GetCrcString() string { return "e8d4e804" }
-func (*TLSOpensslSetEngineReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *TLSOpensslSetEngineReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *TLSOpensslSetEngineReply) 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 *TLSOpensslSetEngineReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_tls_openssl_binapi_init() }
-func file_tls_openssl_binapi_init() {
- api.RegisterMessage((*TLSOpensslSetEngine)(nil), "tls_openssl_set_engine_e34d95c1")
- api.RegisterMessage((*TLSOpensslSetEngineReply)(nil), "tls_openssl_set_engine_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*TLSOpensslSetEngine)(nil),
- (*TLSOpensslSetEngineReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/tls_openssl/tls_openssl_rpc.ba.go b/internal/testbinapi/binapi2001/tls_openssl/tls_openssl_rpc.ba.go
deleted file mode 100644
index 57ef26d..0000000
--- a/internal/testbinapi/binapi2001/tls_openssl/tls_openssl_rpc.ba.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package tls_openssl
-
-import (
- "context"
-
- api "git.fd.io/govpp.git/api"
-)
-
-// RPCService defines RPC service tls_openssl.
-type RPCService interface {
- TLSOpensslSetEngine(ctx context.Context, in *TLSOpensslSetEngine) (*TLSOpensslSetEngineReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) TLSOpensslSetEngine(ctx context.Context, in *TLSOpensslSetEngine) (*TLSOpensslSetEngineReply, error) {
- out := new(TLSOpensslSetEngineReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/trace/trace.ba.go b/internal/testbinapi/binapi2001/trace/trace.ba.go
deleted file mode 100644
index 1902e78..0000000
--- a/internal/testbinapi/binapi2001/trace/trace.ba.go
+++ /dev/null
@@ -1,273 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/plugins/trace.api.json
-
-// Package trace contains generated bindings for API file trace.api.
-//
-// Contents:
-// 6 messages
-//
-package trace
-
-import (
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the GoVPP api package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// GoVPP api package needs to be updated.
-const _ = api.GoVppAPIPackageIsVersion2
-
-const (
- APIFile = "trace"
- APIVersion = "1.0.0"
- VersionCrc = 0x397cbf90
-)
-
-// TraceProfileAdd defines message 'trace_profile_add'.
-type TraceProfileAdd struct {
- TraceType uint8 `binapi:"u8,name=trace_type" json:"trace_type,omitempty"`
- NumElts uint8 `binapi:"u8,name=num_elts" json:"num_elts,omitempty"`
- TraceTsp uint8 `binapi:"u8,name=trace_tsp" json:"trace_tsp,omitempty"`
- NodeID uint32 `binapi:"u32,name=node_id" json:"node_id,omitempty"`
- AppData uint32 `binapi:"u32,name=app_data" json:"app_data,omitempty"`
-}
-
-func (m *TraceProfileAdd) Reset() { *m = TraceProfileAdd{} }
-func (*TraceProfileAdd) GetMessageName() string { return "trace_profile_add" }
-func (*TraceProfileAdd) GetCrcString() string { return "de08aa6d" }
-func (*TraceProfileAdd) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *TraceProfileAdd) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.TraceType
- size += 1 // m.NumElts
- size += 1 // m.TraceTsp
- size += 4 // m.NodeID
- size += 4 // m.AppData
- return size
-}
-func (m *TraceProfileAdd) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.TraceType)
- buf.EncodeUint8(m.NumElts)
- buf.EncodeUint8(m.TraceTsp)
- buf.EncodeUint32(m.NodeID)
- buf.EncodeUint32(m.AppData)
- return buf.Bytes(), nil
-}
-func (m *TraceProfileAdd) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.TraceType = buf.DecodeUint8()
- m.NumElts = buf.DecodeUint8()
- m.TraceTsp = buf.DecodeUint8()
- m.NodeID = buf.DecodeUint32()
- m.AppData = buf.DecodeUint32()
- return nil
-}
-
-// TraceProfileAddReply defines message 'trace_profile_add_reply'.
-type TraceProfileAddReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *TraceProfileAddReply) Reset() { *m = TraceProfileAddReply{} }
-func (*TraceProfileAddReply) GetMessageName() string { return "trace_profile_add_reply" }
-func (*TraceProfileAddReply) GetCrcString() string { return "e8d4e804" }
-func (*TraceProfileAddReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *TraceProfileAddReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *TraceProfileAddReply) 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 *TraceProfileAddReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// TraceProfileDel defines message 'trace_profile_del'.
-type TraceProfileDel struct{}
-
-func (m *TraceProfileDel) Reset() { *m = TraceProfileDel{} }
-func (*TraceProfileDel) GetMessageName() string { return "trace_profile_del" }
-func (*TraceProfileDel) GetCrcString() string { return "51077d14" }
-func (*TraceProfileDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *TraceProfileDel) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *TraceProfileDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *TraceProfileDel) Unmarshal(b []byte) error {
- return nil
-}
-
-// TraceProfileDelReply defines message 'trace_profile_del_reply'.
-type TraceProfileDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *TraceProfileDelReply) Reset() { *m = TraceProfileDelReply{} }
-func (*TraceProfileDelReply) GetMessageName() string { return "trace_profile_del_reply" }
-func (*TraceProfileDelReply) GetCrcString() string { return "e8d4e804" }
-func (*TraceProfileDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *TraceProfileDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *TraceProfileDelReply) 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 *TraceProfileDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// TraceProfileShowConfig defines message 'trace_profile_show_config'.
-type TraceProfileShowConfig struct{}
-
-func (m *TraceProfileShowConfig) Reset() { *m = TraceProfileShowConfig{} }
-func (*TraceProfileShowConfig) GetMessageName() string { return "trace_profile_show_config" }
-func (*TraceProfileShowConfig) GetCrcString() string { return "51077d14" }
-func (*TraceProfileShowConfig) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *TraceProfileShowConfig) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *TraceProfileShowConfig) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *TraceProfileShowConfig) Unmarshal(b []byte) error {
- return nil
-}
-
-// TraceProfileShowConfigReply defines message 'trace_profile_show_config_reply'.
-type TraceProfileShowConfigReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- TraceType uint8 `binapi:"u8,name=trace_type" json:"trace_type,omitempty"`
- NumElts uint8 `binapi:"u8,name=num_elts" json:"num_elts,omitempty"`
- TraceTsp uint8 `binapi:"u8,name=trace_tsp" json:"trace_tsp,omitempty"`
- NodeID uint32 `binapi:"u32,name=node_id" json:"node_id,omitempty"`
- AppData uint32 `binapi:"u32,name=app_data" json:"app_data,omitempty"`
-}
-
-func (m *TraceProfileShowConfigReply) Reset() { *m = TraceProfileShowConfigReply{} }
-func (*TraceProfileShowConfigReply) GetMessageName() string { return "trace_profile_show_config_reply" }
-func (*TraceProfileShowConfigReply) GetCrcString() string { return "0f1d374c" }
-func (*TraceProfileShowConfigReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *TraceProfileShowConfigReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 1 // m.TraceType
- size += 1 // m.NumElts
- size += 1 // m.TraceTsp
- size += 4 // m.NodeID
- size += 4 // m.AppData
- return size
-}
-func (m *TraceProfileShowConfigReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint8(m.TraceType)
- buf.EncodeUint8(m.NumElts)
- buf.EncodeUint8(m.TraceTsp)
- buf.EncodeUint32(m.NodeID)
- buf.EncodeUint32(m.AppData)
- return buf.Bytes(), nil
-}
-func (m *TraceProfileShowConfigReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.TraceType = buf.DecodeUint8()
- m.NumElts = buf.DecodeUint8()
- m.TraceTsp = buf.DecodeUint8()
- m.NodeID = buf.DecodeUint32()
- m.AppData = buf.DecodeUint32()
- return nil
-}
-
-func init() { file_trace_binapi_init() }
-func file_trace_binapi_init() {
- api.RegisterMessage((*TraceProfileAdd)(nil), "trace_profile_add_de08aa6d")
- api.RegisterMessage((*TraceProfileAddReply)(nil), "trace_profile_add_reply_e8d4e804")
- api.RegisterMessage((*TraceProfileDel)(nil), "trace_profile_del_51077d14")
- api.RegisterMessage((*TraceProfileDelReply)(nil), "trace_profile_del_reply_e8d4e804")
- api.RegisterMessage((*TraceProfileShowConfig)(nil), "trace_profile_show_config_51077d14")
- api.RegisterMessage((*TraceProfileShowConfigReply)(nil), "trace_profile_show_config_reply_0f1d374c")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*TraceProfileAdd)(nil),
- (*TraceProfileAddReply)(nil),
- (*TraceProfileDel)(nil),
- (*TraceProfileDelReply)(nil),
- (*TraceProfileShowConfig)(nil),
- (*TraceProfileShowConfigReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/trace/trace_rpc.ba.go b/internal/testbinapi/binapi2001/trace/trace_rpc.ba.go
deleted file mode 100644
index e3f1eca..0000000
--- a/internal/testbinapi/binapi2001/trace/trace_rpc.ba.go
+++ /dev/null
@@ -1,51 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package trace
-
-import (
- "context"
-
- api "git.fd.io/govpp.git/api"
-)
-
-// RPCService defines RPC service trace.
-type RPCService interface {
- TraceProfileAdd(ctx context.Context, in *TraceProfileAdd) (*TraceProfileAddReply, error)
- TraceProfileDel(ctx context.Context, in *TraceProfileDel) (*TraceProfileDelReply, error)
- TraceProfileShowConfig(ctx context.Context, in *TraceProfileShowConfig) (*TraceProfileShowConfigReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) TraceProfileAdd(ctx context.Context, in *TraceProfileAdd) (*TraceProfileAddReply, error) {
- out := new(TraceProfileAddReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) TraceProfileDel(ctx context.Context, in *TraceProfileDel) (*TraceProfileDelReply, error) {
- out := new(TraceProfileDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) TraceProfileShowConfig(ctx context.Context, in *TraceProfileShowConfig) (*TraceProfileShowConfigReply, error) {
- out := new(TraceProfileShowConfigReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/udp/udp.ba.go b/internal/testbinapi/binapi2001/udp/udp.ba.go
deleted file mode 100644
index 6c4dabe..0000000
--- a/internal/testbinapi/binapi2001/udp/udp.ba.go
+++ /dev/null
@@ -1,897 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/udp.api.json
-
-// Package udp contains generated bindings for API file udp.api.
-//
-// Contents:
-// 5 aliases
-// 4 enums
-// 7 structs
-// 1 union
-// 6 messages
-//
-package udp
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "udp"
- APIVersion = "1.1.0"
- VersionCrc = 0xa6b4c475
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// UDPEncap defines type 'udp_encap'.
-type UDPEncap struct {
- TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
- SrcPort uint16 `binapi:"u16,name=src_port" json:"src_port,omitempty"`
- DstPort uint16 `binapi:"u16,name=dst_port" json:"dst_port,omitempty"`
- SrcIP Address `binapi:"address,name=src_ip" json:"src_ip,omitempty"`
- DstIP Address `binapi:"address,name=dst_ip" json:"dst_ip,omitempty"`
- ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
-
-// UDPEncapAdd defines message 'udp_encap_add'.
-type UDPEncapAdd struct {
- UDPEncap UDPEncap `binapi:"udp_encap,name=udp_encap" json:"udp_encap,omitempty"`
-}
-
-func (m *UDPEncapAdd) Reset() { *m = UDPEncapAdd{} }
-func (*UDPEncapAdd) GetMessageName() string { return "udp_encap_add" }
-func (*UDPEncapAdd) GetCrcString() string { return "61d5fc48" }
-func (*UDPEncapAdd) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *UDPEncapAdd) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.UDPEncap.TableID
- size += 2 // m.UDPEncap.SrcPort
- size += 2 // m.UDPEncap.DstPort
- size += 4 // m.UDPEncap.SrcIP.Af
- size += 1 * 16 // m.UDPEncap.SrcIP.Un
- size += 4 // m.UDPEncap.DstIP.Af
- size += 1 * 16 // m.UDPEncap.DstIP.Un
- size += 4 // m.UDPEncap.ID
- return size
-}
-func (m *UDPEncapAdd) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.UDPEncap.TableID)
- buf.EncodeUint16(m.UDPEncap.SrcPort)
- buf.EncodeUint16(m.UDPEncap.DstPort)
- buf.EncodeUint32(uint32(m.UDPEncap.SrcIP.Af))
- buf.EncodeBytes(m.UDPEncap.SrcIP.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.UDPEncap.DstIP.Af))
- buf.EncodeBytes(m.UDPEncap.DstIP.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(m.UDPEncap.ID)
- return buf.Bytes(), nil
-}
-func (m *UDPEncapAdd) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.UDPEncap.TableID = buf.DecodeUint32()
- m.UDPEncap.SrcPort = buf.DecodeUint16()
- m.UDPEncap.DstPort = buf.DecodeUint16()
- m.UDPEncap.SrcIP.Af = AddressFamily(buf.DecodeUint32())
- copy(m.UDPEncap.SrcIP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.UDPEncap.DstIP.Af = AddressFamily(buf.DecodeUint32())
- copy(m.UDPEncap.DstIP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.UDPEncap.ID = buf.DecodeUint32()
- return nil
-}
-
-// UDPEncapAddReply defines message 'udp_encap_add_reply'.
-type UDPEncapAddReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
-}
-
-func (m *UDPEncapAddReply) Reset() { *m = UDPEncapAddReply{} }
-func (*UDPEncapAddReply) GetMessageName() string { return "udp_encap_add_reply" }
-func (*UDPEncapAddReply) GetCrcString() string { return "e2fc8294" }
-func (*UDPEncapAddReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *UDPEncapAddReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.ID
- return size
-}
-func (m *UDPEncapAddReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.ID)
- return buf.Bytes(), nil
-}
-func (m *UDPEncapAddReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.ID = buf.DecodeUint32()
- return nil
-}
-
-// UDPEncapDel defines message 'udp_encap_del'.
-type UDPEncapDel struct {
- ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
-}
-
-func (m *UDPEncapDel) Reset() { *m = UDPEncapDel{} }
-func (*UDPEncapDel) GetMessageName() string { return "udp_encap_del" }
-func (*UDPEncapDel) GetCrcString() string { return "3a91bde5" }
-func (*UDPEncapDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *UDPEncapDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.ID
- return size
-}
-func (m *UDPEncapDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.ID)
- return buf.Bytes(), nil
-}
-func (m *UDPEncapDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.ID = buf.DecodeUint32()
- return nil
-}
-
-// UDPEncapDelReply defines message 'udp_encap_del_reply'.
-type UDPEncapDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *UDPEncapDelReply) Reset() { *m = UDPEncapDelReply{} }
-func (*UDPEncapDelReply) GetMessageName() string { return "udp_encap_del_reply" }
-func (*UDPEncapDelReply) GetCrcString() string { return "e8d4e804" }
-func (*UDPEncapDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *UDPEncapDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *UDPEncapDelReply) 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 *UDPEncapDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// UDPEncapDetails defines message 'udp_encap_details'.
-type UDPEncapDetails struct {
- UDPEncap UDPEncap `binapi:"udp_encap,name=udp_encap" json:"udp_encap,omitempty"`
-}
-
-func (m *UDPEncapDetails) Reset() { *m = UDPEncapDetails{} }
-func (*UDPEncapDetails) GetMessageName() string { return "udp_encap_details" }
-func (*UDPEncapDetails) GetCrcString() string { return "87c82821" }
-func (*UDPEncapDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *UDPEncapDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.UDPEncap.TableID
- size += 2 // m.UDPEncap.SrcPort
- size += 2 // m.UDPEncap.DstPort
- size += 4 // m.UDPEncap.SrcIP.Af
- size += 1 * 16 // m.UDPEncap.SrcIP.Un
- size += 4 // m.UDPEncap.DstIP.Af
- size += 1 * 16 // m.UDPEncap.DstIP.Un
- size += 4 // m.UDPEncap.ID
- return size
-}
-func (m *UDPEncapDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.UDPEncap.TableID)
- buf.EncodeUint16(m.UDPEncap.SrcPort)
- buf.EncodeUint16(m.UDPEncap.DstPort)
- buf.EncodeUint32(uint32(m.UDPEncap.SrcIP.Af))
- buf.EncodeBytes(m.UDPEncap.SrcIP.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.UDPEncap.DstIP.Af))
- buf.EncodeBytes(m.UDPEncap.DstIP.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(m.UDPEncap.ID)
- return buf.Bytes(), nil
-}
-func (m *UDPEncapDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.UDPEncap.TableID = buf.DecodeUint32()
- m.UDPEncap.SrcPort = buf.DecodeUint16()
- m.UDPEncap.DstPort = buf.DecodeUint16()
- m.UDPEncap.SrcIP.Af = AddressFamily(buf.DecodeUint32())
- copy(m.UDPEncap.SrcIP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.UDPEncap.DstIP.Af = AddressFamily(buf.DecodeUint32())
- copy(m.UDPEncap.DstIP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.UDPEncap.ID = buf.DecodeUint32()
- return nil
-}
-
-// UDPEncapDump defines message 'udp_encap_dump'.
-type UDPEncapDump struct{}
-
-func (m *UDPEncapDump) Reset() { *m = UDPEncapDump{} }
-func (*UDPEncapDump) GetMessageName() string { return "udp_encap_dump" }
-func (*UDPEncapDump) GetCrcString() string { return "51077d14" }
-func (*UDPEncapDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *UDPEncapDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *UDPEncapDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *UDPEncapDump) Unmarshal(b []byte) error {
- return nil
-}
-
-func init() { file_udp_binapi_init() }
-func file_udp_binapi_init() {
- api.RegisterMessage((*UDPEncapAdd)(nil), "udp_encap_add_61d5fc48")
- api.RegisterMessage((*UDPEncapAddReply)(nil), "udp_encap_add_reply_e2fc8294")
- api.RegisterMessage((*UDPEncapDel)(nil), "udp_encap_del_3a91bde5")
- api.RegisterMessage((*UDPEncapDelReply)(nil), "udp_encap_del_reply_e8d4e804")
- api.RegisterMessage((*UDPEncapDetails)(nil), "udp_encap_details_87c82821")
- api.RegisterMessage((*UDPEncapDump)(nil), "udp_encap_dump_51077d14")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*UDPEncapAdd)(nil),
- (*UDPEncapAddReply)(nil),
- (*UDPEncapDel)(nil),
- (*UDPEncapDelReply)(nil),
- (*UDPEncapDetails)(nil),
- (*UDPEncapDump)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/udp/udp_rpc.ba.go b/internal/testbinapi/binapi2001/udp/udp_rpc.ba.go
deleted file mode 100644
index 8c138fb..0000000
--- a/internal/testbinapi/binapi2001/udp/udp_rpc.ba.go
+++ /dev/null
@@ -1,88 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package udp
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service udp.
-type RPCService interface {
- UDPEncapAdd(ctx context.Context, in *UDPEncapAdd) (*UDPEncapAddReply, error)
- UDPEncapDel(ctx context.Context, in *UDPEncapDel) (*UDPEncapDelReply, error)
- UDPEncapDump(ctx context.Context, in *UDPEncapDump) (RPCService_UDPEncapDumpClient, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) UDPEncapAdd(ctx context.Context, in *UDPEncapAdd) (*UDPEncapAddReply, error) {
- out := new(UDPEncapAddReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) UDPEncapDel(ctx context.Context, in *UDPEncapDel) (*UDPEncapDelReply, error) {
- out := new(UDPEncapDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) UDPEncapDump(ctx context.Context, in *UDPEncapDump) (RPCService_UDPEncapDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_UDPEncapDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_UDPEncapDumpClient interface {
- Recv() (*UDPEncapDetails, error)
- api.Stream
-}
-
-type serviceClient_UDPEncapDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_UDPEncapDumpClient) Recv() (*UDPEncapDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *UDPEncapDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
diff --git a/internal/testbinapi/binapi2001/udp_ping/udp_ping.ba.go b/internal/testbinapi/binapi2001/udp_ping/udp_ping.ba.go
deleted file mode 100644
index 6187a67..0000000
--- a/internal/testbinapi/binapi2001/udp_ping/udp_ping.ba.go
+++ /dev/null
@@ -1,820 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/plugins/udp_ping.api.json
-
-// Package udp_ping contains generated bindings for API file udp_ping.api.
-//
-// Contents:
-// 5 aliases
-// 4 enums
-// 6 structs
-// 1 union
-// 4 messages
-//
-package udp_ping
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "udp_ping"
- APIVersion = "3.0.0"
- VersionCrc = 0x5a416f51
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
-
-// UDPPingAddDel defines message 'udp_ping_add_del'.
-type UDPPingAddDel struct {
- SrcIPAddress Address `binapi:"address,name=src_ip_address" json:"src_ip_address,omitempty"`
- DstIPAddress Address `binapi:"address,name=dst_ip_address" json:"dst_ip_address,omitempty"`
- StartSrcPort uint16 `binapi:"u16,name=start_src_port" json:"start_src_port,omitempty"`
- EndSrcPort uint16 `binapi:"u16,name=end_src_port" json:"end_src_port,omitempty"`
- StartDstPort uint16 `binapi:"u16,name=start_dst_port" json:"start_dst_port,omitempty"`
- EndDstPort uint16 `binapi:"u16,name=end_dst_port" json:"end_dst_port,omitempty"`
- Interval uint16 `binapi:"u16,name=interval" json:"interval,omitempty"`
- Dis uint8 `binapi:"u8,name=dis" json:"dis,omitempty"`
- FaultDet uint8 `binapi:"u8,name=fault_det" json:"fault_det,omitempty"`
- Reserve []byte `binapi:"u8[3],name=reserve" json:"reserve,omitempty"`
-}
-
-func (m *UDPPingAddDel) Reset() { *m = UDPPingAddDel{} }
-func (*UDPPingAddDel) GetMessageName() string { return "udp_ping_add_del" }
-func (*UDPPingAddDel) GetCrcString() string { return "c692b188" }
-func (*UDPPingAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *UDPPingAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SrcIPAddress.Af
- size += 1 * 16 // m.SrcIPAddress.Un
- size += 4 // m.DstIPAddress.Af
- size += 1 * 16 // m.DstIPAddress.Un
- size += 2 // m.StartSrcPort
- size += 2 // m.EndSrcPort
- size += 2 // m.StartDstPort
- size += 2 // m.EndDstPort
- size += 2 // m.Interval
- size += 1 // m.Dis
- size += 1 // m.FaultDet
- size += 1 * 3 // m.Reserve
- return size
-}
-func (m *UDPPingAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SrcIPAddress.Af))
- buf.EncodeBytes(m.SrcIPAddress.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.DstIPAddress.Af))
- buf.EncodeBytes(m.DstIPAddress.Un.XXX_UnionData[:], 16)
- buf.EncodeUint16(m.StartSrcPort)
- buf.EncodeUint16(m.EndSrcPort)
- buf.EncodeUint16(m.StartDstPort)
- buf.EncodeUint16(m.EndDstPort)
- buf.EncodeUint16(m.Interval)
- buf.EncodeUint8(m.Dis)
- buf.EncodeUint8(m.FaultDet)
- buf.EncodeBytes(m.Reserve, 3)
- return buf.Bytes(), nil
-}
-func (m *UDPPingAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SrcIPAddress.Af = AddressFamily(buf.DecodeUint32())
- copy(m.SrcIPAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.DstIPAddress.Af = AddressFamily(buf.DecodeUint32())
- copy(m.DstIPAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.StartSrcPort = buf.DecodeUint16()
- m.EndSrcPort = buf.DecodeUint16()
- m.StartDstPort = buf.DecodeUint16()
- m.EndDstPort = buf.DecodeUint16()
- m.Interval = buf.DecodeUint16()
- m.Dis = buf.DecodeUint8()
- m.FaultDet = buf.DecodeUint8()
- m.Reserve = make([]byte, 3)
- copy(m.Reserve, buf.DecodeBytes(len(m.Reserve)))
- return nil
-}
-
-// UDPPingAddDelReply defines message 'udp_ping_add_del_reply'.
-type UDPPingAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *UDPPingAddDelReply) Reset() { *m = UDPPingAddDelReply{} }
-func (*UDPPingAddDelReply) GetMessageName() string { return "udp_ping_add_del_reply" }
-func (*UDPPingAddDelReply) GetCrcString() string { return "e8d4e804" }
-func (*UDPPingAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *UDPPingAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *UDPPingAddDelReply) 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 *UDPPingAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// UDPPingExport defines message 'udp_ping_export'.
-type UDPPingExport struct {
- Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"`
-}
-
-func (m *UDPPingExport) Reset() { *m = UDPPingExport{} }
-func (*UDPPingExport) GetMessageName() string { return "udp_ping_export" }
-func (*UDPPingExport) GetCrcString() string { return "b3e225d2" }
-func (*UDPPingExport) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *UDPPingExport) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.Enable
- return size
-}
-func (m *UDPPingExport) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.Enable)
- return buf.Bytes(), nil
-}
-func (m *UDPPingExport) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Enable = buf.DecodeBool()
- return nil
-}
-
-// UDPPingExportReply defines message 'udp_ping_export_reply'.
-type UDPPingExportReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *UDPPingExportReply) Reset() { *m = UDPPingExportReply{} }
-func (*UDPPingExportReply) GetMessageName() string { return "udp_ping_export_reply" }
-func (*UDPPingExportReply) GetCrcString() string { return "e8d4e804" }
-func (*UDPPingExportReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *UDPPingExportReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *UDPPingExportReply) 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 *UDPPingExportReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_udp_ping_binapi_init() }
-func file_udp_ping_binapi_init() {
- api.RegisterMessage((*UDPPingAddDel)(nil), "udp_ping_add_del_c692b188")
- api.RegisterMessage((*UDPPingAddDelReply)(nil), "udp_ping_add_del_reply_e8d4e804")
- api.RegisterMessage((*UDPPingExport)(nil), "udp_ping_export_b3e225d2")
- api.RegisterMessage((*UDPPingExportReply)(nil), "udp_ping_export_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*UDPPingAddDel)(nil),
- (*UDPPingAddDelReply)(nil),
- (*UDPPingExport)(nil),
- (*UDPPingExportReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/udp_ping/udp_ping_rpc.ba.go b/internal/testbinapi/binapi2001/udp_ping/udp_ping_rpc.ba.go
deleted file mode 100644
index 3b01ff7..0000000
--- a/internal/testbinapi/binapi2001/udp_ping/udp_ping_rpc.ba.go
+++ /dev/null
@@ -1,41 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package udp_ping
-
-import (
- "context"
-
- api "git.fd.io/govpp.git/api"
-)
-
-// RPCService defines RPC service udp_ping.
-type RPCService interface {
- UDPPingAddDel(ctx context.Context, in *UDPPingAddDel) (*UDPPingAddDelReply, error)
- UDPPingExport(ctx context.Context, in *UDPPingExport) (*UDPPingExportReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) UDPPingAddDel(ctx context.Context, in *UDPPingAddDel) (*UDPPingAddDelReply, error) {
- out := new(UDPPingAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) UDPPingExport(ctx context.Context, in *UDPPingExport) (*UDPPingExportReply, error) {
- out := new(UDPPingExportReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/vhost_user/vhost_user.ba.go b/internal/testbinapi/binapi2001/vhost_user/vhost_user.ba.go
deleted file mode 100644
index a3aa648..0000000
--- a/internal/testbinapi/binapi2001/vhost_user/vhost_user.ba.go
+++ /dev/null
@@ -1,797 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/vhost_user.api.json
-
-// Package vhost_user contains generated bindings for API file vhost_user.api.
-//
-// Contents:
-// 2 aliases
-// 8 enums
-// 8 messages
-//
-package vhost_user
-
-import (
- "net"
- "strconv"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "vhost_user"
- APIVersion = "4.0.0"
- VersionCrc = 0xb547a33d
-)
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// VirtioNetFeaturesFirst32 defines enum 'virtio_net_features_first_32'.
-type VirtioNetFeaturesFirst32 uint32
-
-const (
- VIRTIO_NET_F_API_CSUM VirtioNetFeaturesFirst32 = 1
- VIRTIO_NET_F_API_GUEST_CSUM VirtioNetFeaturesFirst32 = 2
- VIRTIO_NET_F_API_GUEST_TSO4 VirtioNetFeaturesFirst32 = 128
- VIRTIO_NET_F_API_GUEST_TSO6 VirtioNetFeaturesFirst32 = 256
- VIRTIO_NET_F_API_GUEST_UFO VirtioNetFeaturesFirst32 = 1024
- VIRTIO_NET_F_API_HOST_TSO4 VirtioNetFeaturesFirst32 = 2048
- VIRTIO_NET_F_API_HOST_TSO6 VirtioNetFeaturesFirst32 = 4096
- VIRTIO_NET_F_API_HOST_UFO VirtioNetFeaturesFirst32 = 16384
- VIRTIO_NET_F_API_MRG_RXBUF VirtioNetFeaturesFirst32 = 32768
- VIRTIO_NET_F_API_CTRL_VQ VirtioNetFeaturesFirst32 = 131072
- VIRTIO_NET_F_API_GUEST_ANNOUNCE VirtioNetFeaturesFirst32 = 2097152
- VIRTIO_NET_F_API_MQ VirtioNetFeaturesFirst32 = 4194304
- VHOST_F_API_LOG_ALL VirtioNetFeaturesFirst32 = 67108864
- VIRTIO_F_API_ANY_LAYOUT VirtioNetFeaturesFirst32 = 134217728
- VIRTIO_F_API_INDIRECT_DESC VirtioNetFeaturesFirst32 = 268435456
- VHOST_USER_F_API_PROTOCOL_FEATURES VirtioNetFeaturesFirst32 = 1073741824
-)
-
-var (
- VirtioNetFeaturesFirst32_name = map[uint32]string{
- 1: "VIRTIO_NET_F_API_CSUM",
- 2: "VIRTIO_NET_F_API_GUEST_CSUM",
- 128: "VIRTIO_NET_F_API_GUEST_TSO4",
- 256: "VIRTIO_NET_F_API_GUEST_TSO6",
- 1024: "VIRTIO_NET_F_API_GUEST_UFO",
- 2048: "VIRTIO_NET_F_API_HOST_TSO4",
- 4096: "VIRTIO_NET_F_API_HOST_TSO6",
- 16384: "VIRTIO_NET_F_API_HOST_UFO",
- 32768: "VIRTIO_NET_F_API_MRG_RXBUF",
- 131072: "VIRTIO_NET_F_API_CTRL_VQ",
- 2097152: "VIRTIO_NET_F_API_GUEST_ANNOUNCE",
- 4194304: "VIRTIO_NET_F_API_MQ",
- 67108864: "VHOST_F_API_LOG_ALL",
- 134217728: "VIRTIO_F_API_ANY_LAYOUT",
- 268435456: "VIRTIO_F_API_INDIRECT_DESC",
- 1073741824: "VHOST_USER_F_API_PROTOCOL_FEATURES",
- }
- VirtioNetFeaturesFirst32_value = map[string]uint32{
- "VIRTIO_NET_F_API_CSUM": 1,
- "VIRTIO_NET_F_API_GUEST_CSUM": 2,
- "VIRTIO_NET_F_API_GUEST_TSO4": 128,
- "VIRTIO_NET_F_API_GUEST_TSO6": 256,
- "VIRTIO_NET_F_API_GUEST_UFO": 1024,
- "VIRTIO_NET_F_API_HOST_TSO4": 2048,
- "VIRTIO_NET_F_API_HOST_TSO6": 4096,
- "VIRTIO_NET_F_API_HOST_UFO": 16384,
- "VIRTIO_NET_F_API_MRG_RXBUF": 32768,
- "VIRTIO_NET_F_API_CTRL_VQ": 131072,
- "VIRTIO_NET_F_API_GUEST_ANNOUNCE": 2097152,
- "VIRTIO_NET_F_API_MQ": 4194304,
- "VHOST_F_API_LOG_ALL": 67108864,
- "VIRTIO_F_API_ANY_LAYOUT": 134217728,
- "VIRTIO_F_API_INDIRECT_DESC": 268435456,
- "VHOST_USER_F_API_PROTOCOL_FEATURES": 1073741824,
- }
-)
-
-func (x VirtioNetFeaturesFirst32) String() string {
- s, ok := VirtioNetFeaturesFirst32_name[uint32(x)]
- if ok {
- return s
- }
- return "VirtioNetFeaturesFirst32(" + strconv.Itoa(int(x)) + ")"
-}
-
-// VirtioNetFeaturesLast32 defines enum 'virtio_net_features_last_32'.
-type VirtioNetFeaturesLast32 uint32
-
-const (
- VIRTIO_F_API_VERSION_1 VirtioNetFeaturesLast32 = 1
-)
-
-var (
- VirtioNetFeaturesLast32_name = map[uint32]string{
- 1: "VIRTIO_F_API_VERSION_1",
- }
- VirtioNetFeaturesLast32_value = map[string]uint32{
- "VIRTIO_F_API_VERSION_1": 1,
- }
-)
-
-func (x VirtioNetFeaturesLast32) String() string {
- s, ok := VirtioNetFeaturesLast32_name[uint32(x)]
- if ok {
- return s
- }
- return "VirtioNetFeaturesLast32(" + strconv.Itoa(int(x)) + ")"
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// MacAddress defines alias 'mac_address'.
-type MacAddress [6]uint8
-
-func ParseMacAddress(s string) (MacAddress, error) {
- var macaddr MacAddress
- mac, err := net.ParseMAC(s)
- if err != nil {
- return macaddr, err
- }
- copy(macaddr[:], mac[:])
- return macaddr, nil
-}
-
-func (x MacAddress) ToMAC() net.HardwareAddr {
- return net.HardwareAddr(x[:])
-}
-
-func (x MacAddress) String() string {
- return x.ToMAC().String()
-}
-
-func (x *MacAddress) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *MacAddress) UnmarshalText(text []byte) error {
- mac, err := ParseMacAddress(string(text))
- if err != nil {
- return err
- }
- *x = mac
- return nil
-}
-
-// CreateVhostUserIf defines message 'create_vhost_user_if'.
-type CreateVhostUserIf struct {
- IsServer bool `binapi:"bool,name=is_server" json:"is_server,omitempty"`
- SockFilename string `binapi:"string[256],name=sock_filename" json:"sock_filename,omitempty"`
- Renumber bool `binapi:"bool,name=renumber" json:"renumber,omitempty"`
- DisableMrgRxbuf bool `binapi:"bool,name=disable_mrg_rxbuf" json:"disable_mrg_rxbuf,omitempty"`
- DisableIndirectDesc bool `binapi:"bool,name=disable_indirect_desc" json:"disable_indirect_desc,omitempty"`
- EnableGso bool `binapi:"bool,name=enable_gso" json:"enable_gso,omitempty"`
- CustomDevInstance uint32 `binapi:"u32,name=custom_dev_instance" json:"custom_dev_instance,omitempty"`
- UseCustomMac bool `binapi:"bool,name=use_custom_mac" json:"use_custom_mac,omitempty"`
- MacAddress MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
- Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"`
-}
-
-func (m *CreateVhostUserIf) Reset() { *m = CreateVhostUserIf{} }
-func (*CreateVhostUserIf) GetMessageName() string { return "create_vhost_user_if" }
-func (*CreateVhostUserIf) GetCrcString() string { return "591ee951" }
-func (*CreateVhostUserIf) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *CreateVhostUserIf) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsServer
- size += 256 // m.SockFilename
- size += 1 // m.Renumber
- size += 1 // m.DisableMrgRxbuf
- size += 1 // m.DisableIndirectDesc
- size += 1 // m.EnableGso
- size += 4 // m.CustomDevInstance
- size += 1 // m.UseCustomMac
- size += 1 * 6 // m.MacAddress
- size += 64 // m.Tag
- return size
-}
-func (m *CreateVhostUserIf) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsServer)
- buf.EncodeString(m.SockFilename, 256)
- buf.EncodeBool(m.Renumber)
- buf.EncodeBool(m.DisableMrgRxbuf)
- buf.EncodeBool(m.DisableIndirectDesc)
- buf.EncodeBool(m.EnableGso)
- buf.EncodeUint32(m.CustomDevInstance)
- buf.EncodeBool(m.UseCustomMac)
- buf.EncodeBytes(m.MacAddress[:], 6)
- buf.EncodeString(m.Tag, 64)
- return buf.Bytes(), nil
-}
-func (m *CreateVhostUserIf) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsServer = buf.DecodeBool()
- m.SockFilename = buf.DecodeString(256)
- m.Renumber = buf.DecodeBool()
- m.DisableMrgRxbuf = buf.DecodeBool()
- m.DisableIndirectDesc = buf.DecodeBool()
- m.EnableGso = buf.DecodeBool()
- m.CustomDevInstance = buf.DecodeUint32()
- m.UseCustomMac = buf.DecodeBool()
- copy(m.MacAddress[:], buf.DecodeBytes(6))
- m.Tag = buf.DecodeString(64)
- return nil
-}
-
-// CreateVhostUserIfReply defines message 'create_vhost_user_if_reply'.
-type CreateVhostUserIfReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *CreateVhostUserIfReply) Reset() { *m = CreateVhostUserIfReply{} }
-func (*CreateVhostUserIfReply) GetMessageName() string { return "create_vhost_user_if_reply" }
-func (*CreateVhostUserIfReply) GetCrcString() string { return "5383d31f" }
-func (*CreateVhostUserIfReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *CreateVhostUserIfReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *CreateVhostUserIfReply) 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 *CreateVhostUserIfReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// DeleteVhostUserIf defines message 'delete_vhost_user_if'.
-type DeleteVhostUserIf struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *DeleteVhostUserIf) Reset() { *m = DeleteVhostUserIf{} }
-func (*DeleteVhostUserIf) GetMessageName() string { return "delete_vhost_user_if" }
-func (*DeleteVhostUserIf) GetCrcString() string { return "f9e6675e" }
-func (*DeleteVhostUserIf) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *DeleteVhostUserIf) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *DeleteVhostUserIf) 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 *DeleteVhostUserIf) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// DeleteVhostUserIfReply defines message 'delete_vhost_user_if_reply'.
-type DeleteVhostUserIfReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *DeleteVhostUserIfReply) Reset() { *m = DeleteVhostUserIfReply{} }
-func (*DeleteVhostUserIfReply) GetMessageName() string { return "delete_vhost_user_if_reply" }
-func (*DeleteVhostUserIfReply) GetCrcString() string { return "e8d4e804" }
-func (*DeleteVhostUserIfReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *DeleteVhostUserIfReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *DeleteVhostUserIfReply) 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 *DeleteVhostUserIfReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// ModifyVhostUserIf defines message 'modify_vhost_user_if'.
-type ModifyVhostUserIf struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- IsServer bool `binapi:"bool,name=is_server" json:"is_server,omitempty"`
- SockFilename string `binapi:"string[256],name=sock_filename" json:"sock_filename,omitempty"`
- Renumber bool `binapi:"bool,name=renumber" json:"renumber,omitempty"`
- EnableGso bool `binapi:"bool,name=enable_gso" json:"enable_gso,omitempty"`
- CustomDevInstance uint32 `binapi:"u32,name=custom_dev_instance" json:"custom_dev_instance,omitempty"`
-}
-
-func (m *ModifyVhostUserIf) Reset() { *m = ModifyVhostUserIf{} }
-func (*ModifyVhostUserIf) GetMessageName() string { return "modify_vhost_user_if" }
-func (*ModifyVhostUserIf) GetCrcString() string { return "fcfeaf16" }
-func (*ModifyVhostUserIf) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ModifyVhostUserIf) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.IsServer
- size += 256 // m.SockFilename
- size += 1 // m.Renumber
- size += 1 // m.EnableGso
- size += 4 // m.CustomDevInstance
- return size
-}
-func (m *ModifyVhostUserIf) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeBool(m.IsServer)
- buf.EncodeString(m.SockFilename, 256)
- buf.EncodeBool(m.Renumber)
- buf.EncodeBool(m.EnableGso)
- buf.EncodeUint32(m.CustomDevInstance)
- return buf.Bytes(), nil
-}
-func (m *ModifyVhostUserIf) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.IsServer = buf.DecodeBool()
- m.SockFilename = buf.DecodeString(256)
- m.Renumber = buf.DecodeBool()
- m.EnableGso = buf.DecodeBool()
- m.CustomDevInstance = buf.DecodeUint32()
- return nil
-}
-
-// ModifyVhostUserIfReply defines message 'modify_vhost_user_if_reply'.
-type ModifyVhostUserIfReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *ModifyVhostUserIfReply) Reset() { *m = ModifyVhostUserIfReply{} }
-func (*ModifyVhostUserIfReply) GetMessageName() string { return "modify_vhost_user_if_reply" }
-func (*ModifyVhostUserIfReply) GetCrcString() string { return "e8d4e804" }
-func (*ModifyVhostUserIfReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ModifyVhostUserIfReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *ModifyVhostUserIfReply) 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 *ModifyVhostUserIfReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// SwInterfaceVhostUserDetails defines message 'sw_interface_vhost_user_details'.
-type SwInterfaceVhostUserDetails struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- InterfaceName string `binapi:"string[64],name=interface_name" json:"interface_name,omitempty"`
- VirtioNetHdrSz uint32 `binapi:"u32,name=virtio_net_hdr_sz" json:"virtio_net_hdr_sz,omitempty"`
- FeaturesFirst32 VirtioNetFeaturesFirst32 `binapi:"virtio_net_features_first_32,name=features_first_32" json:"features_first_32,omitempty"`
- FeaturesLast32 VirtioNetFeaturesLast32 `binapi:"virtio_net_features_last_32,name=features_last_32" json:"features_last_32,omitempty"`
- IsServer bool `binapi:"bool,name=is_server" json:"is_server,omitempty"`
- SockFilename string `binapi:"string[256],name=sock_filename" json:"sock_filename,omitempty"`
- NumRegions uint32 `binapi:"u32,name=num_regions" json:"num_regions,omitempty"`
- SockErrno int32 `binapi:"i32,name=sock_errno" json:"sock_errno,omitempty"`
-}
-
-func (m *SwInterfaceVhostUserDetails) Reset() { *m = SwInterfaceVhostUserDetails{} }
-func (*SwInterfaceVhostUserDetails) GetMessageName() string { return "sw_interface_vhost_user_details" }
-func (*SwInterfaceVhostUserDetails) GetCrcString() string { return "98530df1" }
-func (*SwInterfaceVhostUserDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SwInterfaceVhostUserDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 64 // m.InterfaceName
- size += 4 // m.VirtioNetHdrSz
- size += 4 // m.FeaturesFirst32
- size += 4 // m.FeaturesLast32
- size += 1 // m.IsServer
- size += 256 // m.SockFilename
- size += 4 // m.NumRegions
- size += 4 // m.SockErrno
- return size
-}
-func (m *SwInterfaceVhostUserDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeString(m.InterfaceName, 64)
- buf.EncodeUint32(m.VirtioNetHdrSz)
- buf.EncodeUint32(uint32(m.FeaturesFirst32))
- buf.EncodeUint32(uint32(m.FeaturesLast32))
- buf.EncodeBool(m.IsServer)
- buf.EncodeString(m.SockFilename, 256)
- buf.EncodeUint32(m.NumRegions)
- buf.EncodeInt32(m.SockErrno)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceVhostUserDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.InterfaceName = buf.DecodeString(64)
- m.VirtioNetHdrSz = buf.DecodeUint32()
- m.FeaturesFirst32 = VirtioNetFeaturesFirst32(buf.DecodeUint32())
- m.FeaturesLast32 = VirtioNetFeaturesLast32(buf.DecodeUint32())
- m.IsServer = buf.DecodeBool()
- m.SockFilename = buf.DecodeString(256)
- m.NumRegions = buf.DecodeUint32()
- m.SockErrno = buf.DecodeInt32()
- return nil
-}
-
-// SwInterfaceVhostUserDump defines message 'sw_interface_vhost_user_dump'.
-type SwInterfaceVhostUserDump struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
-}
-
-func (m *SwInterfaceVhostUserDump) Reset() { *m = SwInterfaceVhostUserDump{} }
-func (*SwInterfaceVhostUserDump) GetMessageName() string { return "sw_interface_vhost_user_dump" }
-func (*SwInterfaceVhostUserDump) GetCrcString() string { return "f9e6675e" }
-func (*SwInterfaceVhostUserDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceVhostUserDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *SwInterfaceVhostUserDump) 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 *SwInterfaceVhostUserDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-func init() { file_vhost_user_binapi_init() }
-func file_vhost_user_binapi_init() {
- api.RegisterMessage((*CreateVhostUserIf)(nil), "create_vhost_user_if_591ee951")
- api.RegisterMessage((*CreateVhostUserIfReply)(nil), "create_vhost_user_if_reply_5383d31f")
- api.RegisterMessage((*DeleteVhostUserIf)(nil), "delete_vhost_user_if_f9e6675e")
- api.RegisterMessage((*DeleteVhostUserIfReply)(nil), "delete_vhost_user_if_reply_e8d4e804")
- api.RegisterMessage((*ModifyVhostUserIf)(nil), "modify_vhost_user_if_fcfeaf16")
- api.RegisterMessage((*ModifyVhostUserIfReply)(nil), "modify_vhost_user_if_reply_e8d4e804")
- api.RegisterMessage((*SwInterfaceVhostUserDetails)(nil), "sw_interface_vhost_user_details_98530df1")
- api.RegisterMessage((*SwInterfaceVhostUserDump)(nil), "sw_interface_vhost_user_dump_f9e6675e")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*CreateVhostUserIf)(nil),
- (*CreateVhostUserIfReply)(nil),
- (*DeleteVhostUserIf)(nil),
- (*DeleteVhostUserIfReply)(nil),
- (*ModifyVhostUserIf)(nil),
- (*ModifyVhostUserIfReply)(nil),
- (*SwInterfaceVhostUserDetails)(nil),
- (*SwInterfaceVhostUserDump)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/vhost_user/vhost_user_rpc.ba.go b/internal/testbinapi/binapi2001/vhost_user/vhost_user_rpc.ba.go
deleted file mode 100644
index dcb13ff..0000000
--- a/internal/testbinapi/binapi2001/vhost_user/vhost_user_rpc.ba.go
+++ /dev/null
@@ -1,98 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package vhost_user
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service vhost_user.
-type RPCService interface {
- CreateVhostUserIf(ctx context.Context, in *CreateVhostUserIf) (*CreateVhostUserIfReply, error)
- DeleteVhostUserIf(ctx context.Context, in *DeleteVhostUserIf) (*DeleteVhostUserIfReply, error)
- ModifyVhostUserIf(ctx context.Context, in *ModifyVhostUserIf) (*ModifyVhostUserIfReply, error)
- SwInterfaceVhostUserDump(ctx context.Context, in *SwInterfaceVhostUserDump) (RPCService_SwInterfaceVhostUserDumpClient, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) CreateVhostUserIf(ctx context.Context, in *CreateVhostUserIf) (*CreateVhostUserIfReply, error) {
- out := new(CreateVhostUserIfReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) DeleteVhostUserIf(ctx context.Context, in *DeleteVhostUserIf) (*DeleteVhostUserIfReply, error) {
- out := new(DeleteVhostUserIfReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) ModifyVhostUserIf(ctx context.Context, in *ModifyVhostUserIf) (*ModifyVhostUserIfReply, error) {
- out := new(ModifyVhostUserIfReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) SwInterfaceVhostUserDump(ctx context.Context, in *SwInterfaceVhostUserDump) (RPCService_SwInterfaceVhostUserDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_SwInterfaceVhostUserDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_SwInterfaceVhostUserDumpClient interface {
- Recv() (*SwInterfaceVhostUserDetails, error)
- api.Stream
-}
-
-type serviceClient_SwInterfaceVhostUserDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_SwInterfaceVhostUserDumpClient) Recv() (*SwInterfaceVhostUserDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *SwInterfaceVhostUserDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
diff --git a/internal/testbinapi/binapi2001/virtio/virtio.ba.go b/internal/testbinapi/binapi2001/virtio/virtio.ba.go
deleted file mode 100644
index ad56fd4..0000000
--- a/internal/testbinapi/binapi2001/virtio/virtio.ba.go
+++ /dev/null
@@ -1,607 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/virtio.api.json
-
-// Package virtio contains generated bindings for API file virtio.api.
-//
-// Contents:
-// 2 aliases
-// 6 enums
-// 1 struct
-// 6 messages
-//
-package virtio
-
-import (
- "net"
- "strconv"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "virtio"
- APIVersion = "2.0.0"
- VersionCrc = 0xb64fcf02
-)
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// MacAddress defines alias 'mac_address'.
-type MacAddress [6]uint8
-
-func ParseMacAddress(s string) (MacAddress, error) {
- var macaddr MacAddress
- mac, err := net.ParseMAC(s)
- if err != nil {
- return macaddr, err
- }
- copy(macaddr[:], mac[:])
- return macaddr, nil
-}
-
-func (x MacAddress) ToMAC() net.HardwareAddr {
- return net.HardwareAddr(x[:])
-}
-
-func (x MacAddress) String() string {
- return x.ToMAC().String()
-}
-
-func (x *MacAddress) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *MacAddress) UnmarshalText(text []byte) error {
- mac, err := ParseMacAddress(string(text))
- if err != nil {
- return err
- }
- *x = mac
- return nil
-}
-
-// PciAddress defines type 'pci_address'.
-type PciAddress struct {
- Domain uint16 `binapi:"u16,name=domain" json:"domain,omitempty"`
- Bus uint8 `binapi:"u8,name=bus" json:"bus,omitempty"`
- Slot uint8 `binapi:"u8,name=slot" json:"slot,omitempty"`
- Function uint8 `binapi:"u8,name=function" json:"function,omitempty"`
-}
-
-// SwInterfaceVirtioPciDetails defines message 'sw_interface_virtio_pci_details'.
-type SwInterfaceVirtioPciDetails struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- PciAddr PciAddress `binapi:"pci_address,name=pci_addr" json:"pci_addr,omitempty"`
- MacAddr MacAddress `binapi:"mac_address,name=mac_addr" json:"mac_addr,omitempty"`
- TxRingSz uint16 `binapi:"u16,name=tx_ring_sz" json:"tx_ring_sz,omitempty"`
- RxRingSz uint16 `binapi:"u16,name=rx_ring_sz" json:"rx_ring_sz,omitempty"`
- Features uint64 `binapi:"u64,name=features" json:"features,omitempty"`
-}
-
-func (m *SwInterfaceVirtioPciDetails) Reset() { *m = SwInterfaceVirtioPciDetails{} }
-func (*SwInterfaceVirtioPciDetails) GetMessageName() string { return "sw_interface_virtio_pci_details" }
-func (*SwInterfaceVirtioPciDetails) GetCrcString() string { return "16187f3a" }
-func (*SwInterfaceVirtioPciDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SwInterfaceVirtioPciDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 2 // m.PciAddr.Domain
- size += 1 // m.PciAddr.Bus
- size += 1 // m.PciAddr.Slot
- size += 1 // m.PciAddr.Function
- size += 1 * 6 // m.MacAddr
- size += 2 // m.TxRingSz
- size += 2 // m.RxRingSz
- size += 8 // m.Features
- return size
-}
-func (m *SwInterfaceVirtioPciDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeUint16(m.PciAddr.Domain)
- buf.EncodeUint8(m.PciAddr.Bus)
- buf.EncodeUint8(m.PciAddr.Slot)
- buf.EncodeUint8(m.PciAddr.Function)
- buf.EncodeBytes(m.MacAddr[:], 6)
- buf.EncodeUint16(m.TxRingSz)
- buf.EncodeUint16(m.RxRingSz)
- buf.EncodeUint64(m.Features)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceVirtioPciDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.PciAddr.Domain = buf.DecodeUint16()
- m.PciAddr.Bus = buf.DecodeUint8()
- m.PciAddr.Slot = buf.DecodeUint8()
- m.PciAddr.Function = buf.DecodeUint8()
- copy(m.MacAddr[:], buf.DecodeBytes(6))
- m.TxRingSz = buf.DecodeUint16()
- m.RxRingSz = buf.DecodeUint16()
- m.Features = buf.DecodeUint64()
- return nil
-}
-
-// SwInterfaceVirtioPciDump defines message 'sw_interface_virtio_pci_dump'.
-type SwInterfaceVirtioPciDump struct{}
-
-func (m *SwInterfaceVirtioPciDump) Reset() { *m = SwInterfaceVirtioPciDump{} }
-func (*SwInterfaceVirtioPciDump) GetMessageName() string { return "sw_interface_virtio_pci_dump" }
-func (*SwInterfaceVirtioPciDump) GetCrcString() string { return "51077d14" }
-func (*SwInterfaceVirtioPciDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceVirtioPciDump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *SwInterfaceVirtioPciDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceVirtioPciDump) Unmarshal(b []byte) error {
- return nil
-}
-
-// VirtioPciCreate defines message 'virtio_pci_create'.
-type VirtioPciCreate struct {
- PciAddr PciAddress `binapi:"pci_address,name=pci_addr" json:"pci_addr,omitempty"`
- UseRandomMac bool `binapi:"bool,name=use_random_mac" json:"use_random_mac,omitempty"`
- MacAddress MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
- GsoEnabled bool `binapi:"bool,name=gso_enabled" json:"gso_enabled,omitempty"`
- ChecksumOffloadEnabled bool `binapi:"bool,name=checksum_offload_enabled" json:"checksum_offload_enabled,omitempty"`
- Features uint64 `binapi:"u64,name=features" json:"features,omitempty"`
-}
-
-func (m *VirtioPciCreate) Reset() { *m = VirtioPciCreate{} }
-func (*VirtioPciCreate) GetMessageName() string { return "virtio_pci_create" }
-func (*VirtioPciCreate) GetCrcString() string { return "a9f1370c" }
-func (*VirtioPciCreate) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *VirtioPciCreate) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 2 // m.PciAddr.Domain
- size += 1 // m.PciAddr.Bus
- size += 1 // m.PciAddr.Slot
- size += 1 // m.PciAddr.Function
- size += 1 // m.UseRandomMac
- size += 1 * 6 // m.MacAddress
- size += 1 // m.GsoEnabled
- size += 1 // m.ChecksumOffloadEnabled
- size += 8 // m.Features
- return size
-}
-func (m *VirtioPciCreate) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint16(m.PciAddr.Domain)
- buf.EncodeUint8(m.PciAddr.Bus)
- buf.EncodeUint8(m.PciAddr.Slot)
- buf.EncodeUint8(m.PciAddr.Function)
- buf.EncodeBool(m.UseRandomMac)
- buf.EncodeBytes(m.MacAddress[:], 6)
- buf.EncodeBool(m.GsoEnabled)
- buf.EncodeBool(m.ChecksumOffloadEnabled)
- buf.EncodeUint64(m.Features)
- return buf.Bytes(), nil
-}
-func (m *VirtioPciCreate) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.PciAddr.Domain = buf.DecodeUint16()
- m.PciAddr.Bus = buf.DecodeUint8()
- m.PciAddr.Slot = buf.DecodeUint8()
- m.PciAddr.Function = buf.DecodeUint8()
- m.UseRandomMac = buf.DecodeBool()
- copy(m.MacAddress[:], buf.DecodeBytes(6))
- m.GsoEnabled = buf.DecodeBool()
- m.ChecksumOffloadEnabled = buf.DecodeBool()
- m.Features = buf.DecodeUint64()
- return nil
-}
-
-// VirtioPciCreateReply defines message 'virtio_pci_create_reply'.
-type VirtioPciCreateReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *VirtioPciCreateReply) Reset() { *m = VirtioPciCreateReply{} }
-func (*VirtioPciCreateReply) GetMessageName() string { return "virtio_pci_create_reply" }
-func (*VirtioPciCreateReply) GetCrcString() string { return "5383d31f" }
-func (*VirtioPciCreateReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *VirtioPciCreateReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *VirtioPciCreateReply) 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 *VirtioPciCreateReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// VirtioPciDelete defines message 'virtio_pci_delete'.
-type VirtioPciDelete struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *VirtioPciDelete) Reset() { *m = VirtioPciDelete{} }
-func (*VirtioPciDelete) GetMessageName() string { return "virtio_pci_delete" }
-func (*VirtioPciDelete) GetCrcString() string { return "f9e6675e" }
-func (*VirtioPciDelete) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *VirtioPciDelete) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *VirtioPciDelete) 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 *VirtioPciDelete) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// VirtioPciDeleteReply defines message 'virtio_pci_delete_reply'.
-type VirtioPciDeleteReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *VirtioPciDeleteReply) Reset() { *m = VirtioPciDeleteReply{} }
-func (*VirtioPciDeleteReply) GetMessageName() string { return "virtio_pci_delete_reply" }
-func (*VirtioPciDeleteReply) GetCrcString() string { return "e8d4e804" }
-func (*VirtioPciDeleteReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *VirtioPciDeleteReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *VirtioPciDeleteReply) 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 *VirtioPciDeleteReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_virtio_binapi_init() }
-func file_virtio_binapi_init() {
- api.RegisterMessage((*SwInterfaceVirtioPciDetails)(nil), "sw_interface_virtio_pci_details_16187f3a")
- api.RegisterMessage((*SwInterfaceVirtioPciDump)(nil), "sw_interface_virtio_pci_dump_51077d14")
- api.RegisterMessage((*VirtioPciCreate)(nil), "virtio_pci_create_a9f1370c")
- api.RegisterMessage((*VirtioPciCreateReply)(nil), "virtio_pci_create_reply_5383d31f")
- api.RegisterMessage((*VirtioPciDelete)(nil), "virtio_pci_delete_f9e6675e")
- api.RegisterMessage((*VirtioPciDeleteReply)(nil), "virtio_pci_delete_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*SwInterfaceVirtioPciDetails)(nil),
- (*SwInterfaceVirtioPciDump)(nil),
- (*VirtioPciCreate)(nil),
- (*VirtioPciCreateReply)(nil),
- (*VirtioPciDelete)(nil),
- (*VirtioPciDeleteReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/virtio/virtio_rpc.ba.go b/internal/testbinapi/binapi2001/virtio/virtio_rpc.ba.go
deleted file mode 100644
index bcb5e21..0000000
--- a/internal/testbinapi/binapi2001/virtio/virtio_rpc.ba.go
+++ /dev/null
@@ -1,88 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package virtio
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service virtio.
-type RPCService interface {
- SwInterfaceVirtioPciDump(ctx context.Context, in *SwInterfaceVirtioPciDump) (RPCService_SwInterfaceVirtioPciDumpClient, error)
- VirtioPciCreate(ctx context.Context, in *VirtioPciCreate) (*VirtioPciCreateReply, error)
- VirtioPciDelete(ctx context.Context, in *VirtioPciDelete) (*VirtioPciDeleteReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) SwInterfaceVirtioPciDump(ctx context.Context, in *SwInterfaceVirtioPciDump) (RPCService_SwInterfaceVirtioPciDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_SwInterfaceVirtioPciDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_SwInterfaceVirtioPciDumpClient interface {
- Recv() (*SwInterfaceVirtioPciDetails, error)
- api.Stream
-}
-
-type serviceClient_SwInterfaceVirtioPciDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_SwInterfaceVirtioPciDumpClient) Recv() (*SwInterfaceVirtioPciDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *SwInterfaceVirtioPciDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) VirtioPciCreate(ctx context.Context, in *VirtioPciCreate) (*VirtioPciCreateReply, error) {
- out := new(VirtioPciCreateReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) VirtioPciDelete(ctx context.Context, in *VirtioPciDelete) (*VirtioPciDeleteReply, error) {
- out := new(VirtioPciDeleteReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/virtio_types/virtio_types.ba.go b/internal/testbinapi/binapi2001/virtio_types/virtio_types.ba.go
deleted file mode 100644
index 753ee5e..0000000
--- a/internal/testbinapi/binapi2001/virtio_types/virtio_types.ba.go
+++ /dev/null
@@ -1,123 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/virtio_types.api.json
-
-// Package virtio_types contains generated bindings for API file virtio_types.api.
-//
-// Contents:
-// 2 enums
-//
-package virtio_types
-
-import (
- "strconv"
-
- api "git.fd.io/govpp.git/api"
-)
-
-// 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 = "virtio_types"
- APIVersion = "1.0.0"
- VersionCrc = 0x7a70a44e
-)
-
-// VirtioNetFeaturesFirst32 defines enum 'virtio_net_features_first_32'.
-type VirtioNetFeaturesFirst32 uint32
-
-const (
- VIRTIO_NET_F_API_CSUM VirtioNetFeaturesFirst32 = 1
- VIRTIO_NET_F_API_GUEST_CSUM VirtioNetFeaturesFirst32 = 2
- VIRTIO_NET_F_API_GUEST_TSO4 VirtioNetFeaturesFirst32 = 128
- VIRTIO_NET_F_API_GUEST_TSO6 VirtioNetFeaturesFirst32 = 256
- VIRTIO_NET_F_API_GUEST_UFO VirtioNetFeaturesFirst32 = 1024
- VIRTIO_NET_F_API_HOST_TSO4 VirtioNetFeaturesFirst32 = 2048
- VIRTIO_NET_F_API_HOST_TSO6 VirtioNetFeaturesFirst32 = 4096
- VIRTIO_NET_F_API_HOST_UFO VirtioNetFeaturesFirst32 = 16384
- VIRTIO_NET_F_API_MRG_RXBUF VirtioNetFeaturesFirst32 = 32768
- VIRTIO_NET_F_API_CTRL_VQ VirtioNetFeaturesFirst32 = 131072
- VIRTIO_NET_F_API_GUEST_ANNOUNCE VirtioNetFeaturesFirst32 = 2097152
- VIRTIO_NET_F_API_MQ VirtioNetFeaturesFirst32 = 4194304
- VHOST_F_API_LOG_ALL VirtioNetFeaturesFirst32 = 67108864
- VIRTIO_F_API_ANY_LAYOUT VirtioNetFeaturesFirst32 = 134217728
- VIRTIO_F_API_INDIRECT_DESC VirtioNetFeaturesFirst32 = 268435456
- VHOST_USER_F_API_PROTOCOL_FEATURES VirtioNetFeaturesFirst32 = 1073741824
-)
-
-var (
- VirtioNetFeaturesFirst32_name = map[uint32]string{
- 1: "VIRTIO_NET_F_API_CSUM",
- 2: "VIRTIO_NET_F_API_GUEST_CSUM",
- 128: "VIRTIO_NET_F_API_GUEST_TSO4",
- 256: "VIRTIO_NET_F_API_GUEST_TSO6",
- 1024: "VIRTIO_NET_F_API_GUEST_UFO",
- 2048: "VIRTIO_NET_F_API_HOST_TSO4",
- 4096: "VIRTIO_NET_F_API_HOST_TSO6",
- 16384: "VIRTIO_NET_F_API_HOST_UFO",
- 32768: "VIRTIO_NET_F_API_MRG_RXBUF",
- 131072: "VIRTIO_NET_F_API_CTRL_VQ",
- 2097152: "VIRTIO_NET_F_API_GUEST_ANNOUNCE",
- 4194304: "VIRTIO_NET_F_API_MQ",
- 67108864: "VHOST_F_API_LOG_ALL",
- 134217728: "VIRTIO_F_API_ANY_LAYOUT",
- 268435456: "VIRTIO_F_API_INDIRECT_DESC",
- 1073741824: "VHOST_USER_F_API_PROTOCOL_FEATURES",
- }
- VirtioNetFeaturesFirst32_value = map[string]uint32{
- "VIRTIO_NET_F_API_CSUM": 1,
- "VIRTIO_NET_F_API_GUEST_CSUM": 2,
- "VIRTIO_NET_F_API_GUEST_TSO4": 128,
- "VIRTIO_NET_F_API_GUEST_TSO6": 256,
- "VIRTIO_NET_F_API_GUEST_UFO": 1024,
- "VIRTIO_NET_F_API_HOST_TSO4": 2048,
- "VIRTIO_NET_F_API_HOST_TSO6": 4096,
- "VIRTIO_NET_F_API_HOST_UFO": 16384,
- "VIRTIO_NET_F_API_MRG_RXBUF": 32768,
- "VIRTIO_NET_F_API_CTRL_VQ": 131072,
- "VIRTIO_NET_F_API_GUEST_ANNOUNCE": 2097152,
- "VIRTIO_NET_F_API_MQ": 4194304,
- "VHOST_F_API_LOG_ALL": 67108864,
- "VIRTIO_F_API_ANY_LAYOUT": 134217728,
- "VIRTIO_F_API_INDIRECT_DESC": 268435456,
- "VHOST_USER_F_API_PROTOCOL_FEATURES": 1073741824,
- }
-)
-
-func (x VirtioNetFeaturesFirst32) String() string {
- s, ok := VirtioNetFeaturesFirst32_name[uint32(x)]
- if ok {
- return s
- }
- return "VirtioNetFeaturesFirst32(" + strconv.Itoa(int(x)) + ")"
-}
-
-// VirtioNetFeaturesLast32 defines enum 'virtio_net_features_last_32'.
-type VirtioNetFeaturesLast32 uint32
-
-const (
- VIRTIO_F_API_VERSION_1 VirtioNetFeaturesLast32 = 1
-)
-
-var (
- VirtioNetFeaturesLast32_name = map[uint32]string{
- 1: "VIRTIO_F_API_VERSION_1",
- }
- VirtioNetFeaturesLast32_value = map[string]uint32{
- "VIRTIO_F_API_VERSION_1": 1,
- }
-)
-
-func (x VirtioNetFeaturesLast32) String() string {
- s, ok := VirtioNetFeaturesLast32_name[uint32(x)]
- if ok {
- return s
- }
- return "VirtioNetFeaturesLast32(" + strconv.Itoa(int(x)) + ")"
-}
diff --git a/internal/testbinapi/binapi2001/vmxnet3/vmxnet3.ba.go b/internal/testbinapi/binapi2001/vmxnet3/vmxnet3.ba.go
deleted file mode 100644
index d048166..0000000
--- a/internal/testbinapi/binapi2001/vmxnet3/vmxnet3.ba.go
+++ /dev/null
@@ -1,682 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/plugins/vmxnet3.api.json
-
-// Package vmxnet3 contains generated bindings for API file vmxnet3.api.
-//
-// Contents:
-// 2 aliases
-// 6 enums
-// 2 structs
-// 6 messages
-//
-package vmxnet3
-
-import (
- "net"
- "strconv"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// 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 = "vmxnet3"
- APIVersion = "1.1.0"
- VersionCrc = 0xe89a60f7
-)
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// MacAddress defines alias 'mac_address'.
-type MacAddress [6]uint8
-
-func ParseMacAddress(s string) (MacAddress, error) {
- var macaddr MacAddress
- mac, err := net.ParseMAC(s)
- if err != nil {
- return macaddr, err
- }
- copy(macaddr[:], mac[:])
- return macaddr, nil
-}
-
-func (x MacAddress) ToMAC() net.HardwareAddr {
- return net.HardwareAddr(x[:])
-}
-
-func (x MacAddress) String() string {
- return x.ToMAC().String()
-}
-
-func (x *MacAddress) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *MacAddress) UnmarshalText(text []byte) error {
- mac, err := ParseMacAddress(string(text))
- if err != nil {
- return err
- }
- *x = mac
- return nil
-}
-
-// Vmxnet3RxList defines type 'vmxnet3_rx_list'.
-type Vmxnet3RxList struct {
- RxQsize uint16 `binapi:"u16,name=rx_qsize" json:"rx_qsize,omitempty"`
- RxFill []uint16 `binapi:"u16[2],name=rx_fill" json:"rx_fill,omitempty"`
- RxNext uint16 `binapi:"u16,name=rx_next" json:"rx_next,omitempty"`
- RxProduce []uint16 `binapi:"u16[2],name=rx_produce" json:"rx_produce,omitempty"`
- RxConsume []uint16 `binapi:"u16[2],name=rx_consume" json:"rx_consume,omitempty"`
-}
-
-// Vmxnet3TxList defines type 'vmxnet3_tx_list'.
-type Vmxnet3TxList struct {
- TxQsize uint16 `binapi:"u16,name=tx_qsize" json:"tx_qsize,omitempty"`
- TxNext uint16 `binapi:"u16,name=tx_next" json:"tx_next,omitempty"`
- TxProduce uint16 `binapi:"u16,name=tx_produce" json:"tx_produce,omitempty"`
- TxConsume uint16 `binapi:"u16,name=tx_consume" json:"tx_consume,omitempty"`
-}
-
-// Vmxnet3Create defines message 'vmxnet3_create'.
-type Vmxnet3Create struct {
- PciAddr uint32 `binapi:"u32,name=pci_addr" json:"pci_addr,omitempty"`
- EnableElog int32 `binapi:"i32,name=enable_elog" json:"enable_elog,omitempty"`
- RxqSize uint16 `binapi:"u16,name=rxq_size" json:"rxq_size,omitempty"`
- RxqNum uint16 `binapi:"u16,name=rxq_num" json:"rxq_num,omitempty"`
- TxqSize uint16 `binapi:"u16,name=txq_size" json:"txq_size,omitempty"`
- TxqNum uint16 `binapi:"u16,name=txq_num" json:"txq_num,omitempty"`
- Bind uint8 `binapi:"u8,name=bind" json:"bind,omitempty"`
- EnableGso bool `binapi:"bool,name=enable_gso" json:"enable_gso,omitempty"`
-}
-
-func (m *Vmxnet3Create) Reset() { *m = Vmxnet3Create{} }
-func (*Vmxnet3Create) GetMessageName() string { return "vmxnet3_create" }
-func (*Vmxnet3Create) GetCrcString() string { return "71a07314" }
-func (*Vmxnet3Create) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Vmxnet3Create) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.PciAddr
- size += 4 // m.EnableElog
- size += 2 // m.RxqSize
- size += 2 // m.RxqNum
- size += 2 // m.TxqSize
- size += 2 // m.TxqNum
- size += 1 // m.Bind
- size += 1 // m.EnableGso
- return size
-}
-func (m *Vmxnet3Create) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.PciAddr)
- buf.EncodeInt32(m.EnableElog)
- buf.EncodeUint16(m.RxqSize)
- buf.EncodeUint16(m.RxqNum)
- buf.EncodeUint16(m.TxqSize)
- buf.EncodeUint16(m.TxqNum)
- buf.EncodeUint8(m.Bind)
- buf.EncodeBool(m.EnableGso)
- return buf.Bytes(), nil
-}
-func (m *Vmxnet3Create) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.PciAddr = buf.DecodeUint32()
- m.EnableElog = buf.DecodeInt32()
- m.RxqSize = buf.DecodeUint16()
- m.RxqNum = buf.DecodeUint16()
- m.TxqSize = buf.DecodeUint16()
- m.TxqNum = buf.DecodeUint16()
- m.Bind = buf.DecodeUint8()
- m.EnableGso = buf.DecodeBool()
- return nil
-}
-
-// Vmxnet3CreateReply defines message 'vmxnet3_create_reply'.
-type Vmxnet3CreateReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *Vmxnet3CreateReply) Reset() { *m = Vmxnet3CreateReply{} }
-func (*Vmxnet3CreateReply) GetMessageName() string { return "vmxnet3_create_reply" }
-func (*Vmxnet3CreateReply) GetCrcString() string { return "5383d31f" }
-func (*Vmxnet3CreateReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Vmxnet3CreateReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *Vmxnet3CreateReply) 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 *Vmxnet3CreateReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// Vmxnet3Delete defines message 'vmxnet3_delete'.
-type Vmxnet3Delete struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *Vmxnet3Delete) Reset() { *m = Vmxnet3Delete{} }
-func (*Vmxnet3Delete) GetMessageName() string { return "vmxnet3_delete" }
-func (*Vmxnet3Delete) GetCrcString() string { return "f9e6675e" }
-func (*Vmxnet3Delete) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Vmxnet3Delete) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *Vmxnet3Delete) 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 *Vmxnet3Delete) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// Vmxnet3DeleteReply defines message 'vmxnet3_delete_reply'.
-type Vmxnet3DeleteReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *Vmxnet3DeleteReply) Reset() { *m = Vmxnet3DeleteReply{} }
-func (*Vmxnet3DeleteReply) GetMessageName() string { return "vmxnet3_delete_reply" }
-func (*Vmxnet3DeleteReply) GetCrcString() string { return "e8d4e804" }
-func (*Vmxnet3DeleteReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Vmxnet3DeleteReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *Vmxnet3DeleteReply) 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 *Vmxnet3DeleteReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// Vmxnet3Details defines message 'vmxnet3_details'.
-type Vmxnet3Details struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- IfName string `binapi:"string[64],name=if_name" json:"if_name,omitempty"`
- HwAddr MacAddress `binapi:"mac_address,name=hw_addr" json:"hw_addr,omitempty"`
- PciAddr uint32 `binapi:"u32,name=pci_addr" json:"pci_addr,omitempty"`
- Version uint8 `binapi:"u8,name=version" json:"version,omitempty"`
- AdminUpDown bool `binapi:"bool,name=admin_up_down" json:"admin_up_down,omitempty"`
- RxCount uint8 `binapi:"u8,name=rx_count" json:"rx_count,omitempty"`
- RxList [16]Vmxnet3RxList `binapi:"vmxnet3_rx_list[16],name=rx_list" json:"rx_list,omitempty"`
- TxCount uint8 `binapi:"u8,name=tx_count" json:"tx_count,omitempty"`
- TxList [8]Vmxnet3TxList `binapi:"vmxnet3_tx_list[8],name=tx_list" json:"tx_list,omitempty"`
-}
-
-func (m *Vmxnet3Details) Reset() { *m = Vmxnet3Details{} }
-func (*Vmxnet3Details) GetMessageName() string { return "vmxnet3_details" }
-func (*Vmxnet3Details) GetCrcString() string { return "829ba055" }
-func (*Vmxnet3Details) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *Vmxnet3Details) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 64 // m.IfName
- size += 1 * 6 // m.HwAddr
- size += 4 // m.PciAddr
- size += 1 // m.Version
- size += 1 // m.AdminUpDown
- size += 1 // m.RxCount
- for j1 := 0; j1 < 16; j1++ {
- size += 2 // m.RxList[j1].RxQsize
- size += 2 * 2 // m.RxList[j1].RxFill
- size += 2 // m.RxList[j1].RxNext
- size += 2 * 2 // m.RxList[j1].RxProduce
- size += 2 * 2 // m.RxList[j1].RxConsume
- }
- size += 1 // m.TxCount
- for j1 := 0; j1 < 8; j1++ {
- size += 2 // m.TxList[j1].TxQsize
- size += 2 // m.TxList[j1].TxNext
- size += 2 // m.TxList[j1].TxProduce
- size += 2 // m.TxList[j1].TxConsume
- }
- return size
-}
-func (m *Vmxnet3Details) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeString(m.IfName, 64)
- buf.EncodeBytes(m.HwAddr[:], 6)
- buf.EncodeUint32(m.PciAddr)
- buf.EncodeUint8(m.Version)
- buf.EncodeBool(m.AdminUpDown)
- buf.EncodeUint8(m.RxCount)
- for j0 := 0; j0 < 16; j0++ {
- buf.EncodeUint16(m.RxList[j0].RxQsize)
- for i := 0; i < 2; i++ {
- var x uint16
- if i < len(m.RxList[j0].RxFill) {
- x = uint16(m.RxList[j0].RxFill[i])
- }
- buf.EncodeUint16(x)
- }
- buf.EncodeUint16(m.RxList[j0].RxNext)
- for i := 0; i < 2; i++ {
- var x uint16
- if i < len(m.RxList[j0].RxProduce) {
- x = uint16(m.RxList[j0].RxProduce[i])
- }
- buf.EncodeUint16(x)
- }
- for i := 0; i < 2; i++ {
- var x uint16
- if i < len(m.RxList[j0].RxConsume) {
- x = uint16(m.RxList[j0].RxConsume[i])
- }
- buf.EncodeUint16(x)
- }
- }
- buf.EncodeUint8(m.TxCount)
- for j0 := 0; j0 < 8; j0++ {
- buf.EncodeUint16(m.TxList[j0].TxQsize)
- buf.EncodeUint16(m.TxList[j0].TxNext)
- buf.EncodeUint16(m.TxList[j0].TxProduce)
- buf.EncodeUint16(m.TxList[j0].TxConsume)
- }
- return buf.Bytes(), nil
-}
-func (m *Vmxnet3Details) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.IfName = buf.DecodeString(64)
- copy(m.HwAddr[:], buf.DecodeBytes(6))
- m.PciAddr = buf.DecodeUint32()
- m.Version = buf.DecodeUint8()
- m.AdminUpDown = buf.DecodeBool()
- m.RxCount = buf.DecodeUint8()
- for j0 := 0; j0 < 16; j0++ {
- m.RxList[j0].RxQsize = buf.DecodeUint16()
- m.RxList[j0].RxFill = make([]uint16, 2)
- for i := 0; i < len(m.RxList[j0].RxFill); i++ {
- m.RxList[j0].RxFill[i] = buf.DecodeUint16()
- }
- m.RxList[j0].RxNext = buf.DecodeUint16()
- m.RxList[j0].RxProduce = make([]uint16, 2)
- for i := 0; i < len(m.RxList[j0].RxProduce); i++ {
- m.RxList[j0].RxProduce[i] = buf.DecodeUint16()
- }
- m.RxList[j0].RxConsume = make([]uint16, 2)
- for i := 0; i < len(m.RxList[j0].RxConsume); i++ {
- m.RxList[j0].RxConsume[i] = buf.DecodeUint16()
- }
- }
- m.TxCount = buf.DecodeUint8()
- for j0 := 0; j0 < 8; j0++ {
- m.TxList[j0].TxQsize = buf.DecodeUint16()
- m.TxList[j0].TxNext = buf.DecodeUint16()
- m.TxList[j0].TxProduce = buf.DecodeUint16()
- m.TxList[j0].TxConsume = buf.DecodeUint16()
- }
- return nil
-}
-
-// Vmxnet3Dump defines message 'vmxnet3_dump'.
-type Vmxnet3Dump struct{}
-
-func (m *Vmxnet3Dump) Reset() { *m = Vmxnet3Dump{} }
-func (*Vmxnet3Dump) GetMessageName() string { return "vmxnet3_dump" }
-func (*Vmxnet3Dump) GetCrcString() string { return "51077d14" }
-func (*Vmxnet3Dump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Vmxnet3Dump) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *Vmxnet3Dump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *Vmxnet3Dump) Unmarshal(b []byte) error {
- return nil
-}
-
-func init() { file_vmxnet3_binapi_init() }
-func file_vmxnet3_binapi_init() {
- api.RegisterMessage((*Vmxnet3Create)(nil), "vmxnet3_create_71a07314")
- api.RegisterMessage((*Vmxnet3CreateReply)(nil), "vmxnet3_create_reply_5383d31f")
- api.RegisterMessage((*Vmxnet3Delete)(nil), "vmxnet3_delete_f9e6675e")
- api.RegisterMessage((*Vmxnet3DeleteReply)(nil), "vmxnet3_delete_reply_e8d4e804")
- api.RegisterMessage((*Vmxnet3Details)(nil), "vmxnet3_details_829ba055")
- api.RegisterMessage((*Vmxnet3Dump)(nil), "vmxnet3_dump_51077d14")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*Vmxnet3Create)(nil),
- (*Vmxnet3CreateReply)(nil),
- (*Vmxnet3Delete)(nil),
- (*Vmxnet3DeleteReply)(nil),
- (*Vmxnet3Details)(nil),
- (*Vmxnet3Dump)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/vmxnet3/vmxnet3_rpc.ba.go b/internal/testbinapi/binapi2001/vmxnet3/vmxnet3_rpc.ba.go
deleted file mode 100644
index 7a85512..0000000
--- a/internal/testbinapi/binapi2001/vmxnet3/vmxnet3_rpc.ba.go
+++ /dev/null
@@ -1,88 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package vmxnet3
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service vmxnet3.
-type RPCService interface {
- Vmxnet3Create(ctx context.Context, in *Vmxnet3Create) (*Vmxnet3CreateReply, error)
- Vmxnet3Delete(ctx context.Context, in *Vmxnet3Delete) (*Vmxnet3DeleteReply, error)
- Vmxnet3Dump(ctx context.Context, in *Vmxnet3Dump) (RPCService_Vmxnet3DumpClient, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) Vmxnet3Create(ctx context.Context, in *Vmxnet3Create) (*Vmxnet3CreateReply, error) {
- out := new(Vmxnet3CreateReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) Vmxnet3Delete(ctx context.Context, in *Vmxnet3Delete) (*Vmxnet3DeleteReply, error) {
- out := new(Vmxnet3DeleteReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) Vmxnet3Dump(ctx context.Context, in *Vmxnet3Dump) (RPCService_Vmxnet3DumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_Vmxnet3DumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_Vmxnet3DumpClient interface {
- Recv() (*Vmxnet3Details, error)
- api.Stream
-}
-
-type serviceClient_Vmxnet3DumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_Vmxnet3DumpClient) Recv() (*Vmxnet3Details, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *Vmxnet3Details:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
diff --git a/internal/testbinapi/binapi2001/vpe/vpe.ba.go b/internal/testbinapi/binapi2001/vpe/vpe.ba.go
deleted file mode 100644
index 34842fb..0000000
--- a/internal/testbinapi/binapi2001/vpe/vpe.ba.go
+++ /dev/null
@@ -1,1159 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/vpe.api.json
-
-// Package vpe contains generated bindings for API file vpe.api.
-//
-// Contents:
-// 2 aliases
-// 1 enum
-// 2 structs
-// 26 messages
-//
-package vpe
-
-import (
- "strconv"
- "time"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the GoVPP api package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// GoVPP api package needs to be updated.
-const _ = api.GoVppAPIPackageIsVersion2
-
-const (
- APIFile = "vpe"
- APIVersion = "1.6.0"
- VersionCrc = 0xc6c0bcf6
-)
-
-// LogLevel defines enum 'log_level'.
-type LogLevel uint32
-
-const (
- VPE_API_LOG_LEVEL_EMERG LogLevel = 0
- VPE_API_LOG_LEVEL_ALERT LogLevel = 1
- VPE_API_LOG_LEVEL_CRIT LogLevel = 2
- VPE_API_LOG_LEVEL_ERR LogLevel = 3
- VPE_API_LOG_LEVEL_WARNING LogLevel = 4
- VPE_API_LOG_LEVEL_NOTICE LogLevel = 5
- VPE_API_LOG_LEVEL_INFO LogLevel = 6
- VPE_API_LOG_LEVEL_DEBUG LogLevel = 7
- VPE_API_LOG_LEVEL_DISABLED LogLevel = 8
-)
-
-var (
- LogLevel_name = map[uint32]string{
- 0: "VPE_API_LOG_LEVEL_EMERG",
- 1: "VPE_API_LOG_LEVEL_ALERT",
- 2: "VPE_API_LOG_LEVEL_CRIT",
- 3: "VPE_API_LOG_LEVEL_ERR",
- 4: "VPE_API_LOG_LEVEL_WARNING",
- 5: "VPE_API_LOG_LEVEL_NOTICE",
- 6: "VPE_API_LOG_LEVEL_INFO",
- 7: "VPE_API_LOG_LEVEL_DEBUG",
- 8: "VPE_API_LOG_LEVEL_DISABLED",
- }
- LogLevel_value = map[string]uint32{
- "VPE_API_LOG_LEVEL_EMERG": 0,
- "VPE_API_LOG_LEVEL_ALERT": 1,
- "VPE_API_LOG_LEVEL_CRIT": 2,
- "VPE_API_LOG_LEVEL_ERR": 3,
- "VPE_API_LOG_LEVEL_WARNING": 4,
- "VPE_API_LOG_LEVEL_NOTICE": 5,
- "VPE_API_LOG_LEVEL_INFO": 6,
- "VPE_API_LOG_LEVEL_DEBUG": 7,
- "VPE_API_LOG_LEVEL_DISABLED": 8,
- }
-)
-
-func (x LogLevel) String() string {
- s, ok := LogLevel_name[uint32(x)]
- if ok {
- return s
- }
- return "LogLevel(" + strconv.Itoa(int(x)) + ")"
-}
-
-// Timedelta defines alias 'timedelta'.
-type Timedelta float64
-
-// Timestamp defines alias 'timestamp'.
-type Timestamp float64
-
-func NewTimestamp(t time.Time) Timestamp {
- sec := int64(t.Unix())
- nsec := int32(t.Nanosecond())
- ns := float64(sec) + float64(nsec/1e9)
- return Timestamp(ns)
-}
-
-func (x Timestamp) ToTime() time.Time {
- ns := int64(x * 1e9)
- sec := ns / 1e9
- nsec := ns % 1e9
- return time.Unix(sec, nsec)
-}
-
-func (x Timestamp) String() string {
- return x.ToTime().String()
-}
-
-func (x *Timestamp) MarshalText() ([]byte, error) {
- return []byte(x.ToTime().Format(time.RFC3339Nano)), nil
-}
-
-func (x *Timestamp) UnmarshalText(text []byte) error {
- t, err := time.Parse(time.RFC3339Nano, string(text))
- if err != nil {
- return err
- }
- *x = NewTimestamp(t)
- return nil
-}
-
-// ThreadData defines type 'thread_data'.
-type ThreadData struct {
- ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
- Name []byte `binapi:"u8[64],name=name" json:"name,omitempty"`
- Type []byte `binapi:"u8[64],name=type" json:"type,omitempty"`
- PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"`
- CPUID uint32 `binapi:"u32,name=cpu_id" json:"cpu_id,omitempty"`
- Core uint32 `binapi:"u32,name=core" json:"core,omitempty"`
- CPUSocket uint32 `binapi:"u32,name=cpu_socket" json:"cpu_socket,omitempty"`
-}
-
-// Version defines type 'version'.
-type Version struct {
- Major uint32 `binapi:"u32,name=major" json:"major,omitempty"`
- Minor uint32 `binapi:"u32,name=minor" json:"minor,omitempty"`
- Patch uint32 `binapi:"u32,name=patch" json:"patch,omitempty"`
- PreRelease []byte `binapi:"u8[17],name=pre_release" json:"pre_release,omitempty"`
- BuildMetadata []byte `binapi:"u8[17],name=build_metadata" json:"build_metadata,omitempty"`
-}
-
-// AddNodeNext defines message 'add_node_next'.
-type AddNodeNext struct {
- NodeName []byte `binapi:"u8[64],name=node_name" json:"node_name,omitempty"`
- NextName []byte `binapi:"u8[64],name=next_name" json:"next_name,omitempty"`
-}
-
-func (m *AddNodeNext) Reset() { *m = AddNodeNext{} }
-func (*AddNodeNext) GetMessageName() string { return "add_node_next" }
-func (*AddNodeNext) GetCrcString() string { return "9ab92f7a" }
-func (*AddNodeNext) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *AddNodeNext) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 64 // m.NodeName
- size += 1 * 64 // m.NextName
- return size
-}
-func (m *AddNodeNext) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.NodeName, 64)
- buf.EncodeBytes(m.NextName, 64)
- return buf.Bytes(), nil
-}
-func (m *AddNodeNext) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.NodeName = make([]byte, 64)
- copy(m.NodeName, buf.DecodeBytes(len(m.NodeName)))
- m.NextName = make([]byte, 64)
- copy(m.NextName, buf.DecodeBytes(len(m.NextName)))
- return nil
-}
-
-// AddNodeNextReply defines message 'add_node_next_reply'.
-type AddNodeNextReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- NextIndex uint32 `binapi:"u32,name=next_index" json:"next_index,omitempty"`
-}
-
-func (m *AddNodeNextReply) Reset() { *m = AddNodeNextReply{} }
-func (*AddNodeNextReply) GetMessageName() string { return "add_node_next_reply" }
-func (*AddNodeNextReply) GetCrcString() string { return "2ed75f32" }
-func (*AddNodeNextReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *AddNodeNextReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.NextIndex
- return size
-}
-func (m *AddNodeNextReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.NextIndex)
- return buf.Bytes(), nil
-}
-func (m *AddNodeNextReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.NextIndex = buf.DecodeUint32()
- return nil
-}
-
-// Cli defines message 'cli'.
-type Cli struct {
- CmdInShmem uint64 `binapi:"u64,name=cmd_in_shmem" json:"cmd_in_shmem,omitempty"`
-}
-
-func (m *Cli) Reset() { *m = Cli{} }
-func (*Cli) GetMessageName() string { return "cli" }
-func (*Cli) GetCrcString() string { return "23bfbfff" }
-func (*Cli) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *Cli) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 8 // m.CmdInShmem
- return size
-}
-func (m *Cli) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint64(m.CmdInShmem)
- return buf.Bytes(), nil
-}
-func (m *Cli) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.CmdInShmem = buf.DecodeUint64()
- return nil
-}
-
-// CliInband defines message 'cli_inband'.
-type CliInband struct {
- Cmd string `binapi:"string[],name=cmd" json:"cmd,omitempty"`
-}
-
-func (m *CliInband) Reset() { *m = CliInband{} }
-func (*CliInband) GetMessageName() string { return "cli_inband" }
-func (*CliInband) GetCrcString() string { return "f8377302" }
-func (*CliInband) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *CliInband) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 + len(m.Cmd) // m.Cmd
- return size
-}
-func (m *CliInband) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeString(m.Cmd, 0)
- return buf.Bytes(), nil
-}
-func (m *CliInband) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Cmd = buf.DecodeString(0)
- return nil
-}
-
-// CliInbandReply defines message 'cli_inband_reply'.
-type CliInbandReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- Reply string `binapi:"string[],name=reply" json:"reply,omitempty"`
-}
-
-func (m *CliInbandReply) Reset() { *m = CliInbandReply{} }
-func (*CliInbandReply) GetMessageName() string { return "cli_inband_reply" }
-func (*CliInbandReply) GetCrcString() string { return "05879051" }
-func (*CliInbandReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *CliInbandReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 + len(m.Reply) // m.Reply
- return size
-}
-func (m *CliInbandReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeString(m.Reply, 0)
- return buf.Bytes(), nil
-}
-func (m *CliInbandReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.Reply = buf.DecodeString(0)
- return nil
-}
-
-// CliReply defines message 'cli_reply'.
-type CliReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- ReplyInShmem uint64 `binapi:"u64,name=reply_in_shmem" json:"reply_in_shmem,omitempty"`
-}
-
-func (m *CliReply) Reset() { *m = CliReply{} }
-func (*CliReply) GetMessageName() string { return "cli_reply" }
-func (*CliReply) GetCrcString() string { return "06d68297" }
-func (*CliReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *CliReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 8 // m.ReplyInShmem
- return size
-}
-func (m *CliReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint64(m.ReplyInShmem)
- return buf.Bytes(), nil
-}
-func (m *CliReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.ReplyInShmem = buf.DecodeUint64()
- return nil
-}
-
-// ControlPing defines message 'control_ping'.
-type ControlPing struct{}
-
-func (m *ControlPing) Reset() { *m = ControlPing{} }
-func (*ControlPing) GetMessageName() string { return "control_ping" }
-func (*ControlPing) GetCrcString() string { return "51077d14" }
-func (*ControlPing) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ControlPing) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *ControlPing) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *ControlPing) Unmarshal(b []byte) error {
- return nil
-}
-
-// ControlPingReply defines message 'control_ping_reply'.
-type ControlPingReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- ClientIndex uint32 `binapi:"u32,name=client_index" json:"client_index,omitempty"`
- VpePID uint32 `binapi:"u32,name=vpe_pid" json:"vpe_pid,omitempty"`
-}
-
-func (m *ControlPingReply) Reset() { *m = ControlPingReply{} }
-func (*ControlPingReply) GetMessageName() string { return "control_ping_reply" }
-func (*ControlPingReply) GetCrcString() string { return "f6b0b8ca" }
-func (*ControlPingReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ControlPingReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.ClientIndex
- size += 4 // m.VpePID
- return size
-}
-func (m *ControlPingReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.ClientIndex)
- buf.EncodeUint32(m.VpePID)
- return buf.Bytes(), nil
-}
-func (m *ControlPingReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.ClientIndex = buf.DecodeUint32()
- m.VpePID = buf.DecodeUint32()
- return nil
-}
-
-// GetF64EndianValue defines message 'get_f64_endian_value'.
-type GetF64EndianValue struct {
- F64One float64 `binapi:"f64,name=f64_one,default=1" json:"f64_one,omitempty"`
-}
-
-func (m *GetF64EndianValue) Reset() { *m = GetF64EndianValue{} }
-func (*GetF64EndianValue) GetMessageName() string { return "get_f64_endian_value" }
-func (*GetF64EndianValue) GetCrcString() string { return "809fcd44" }
-func (*GetF64EndianValue) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GetF64EndianValue) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 8 // m.F64One
- return size
-}
-func (m *GetF64EndianValue) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeFloat64(m.F64One)
- return buf.Bytes(), nil
-}
-func (m *GetF64EndianValue) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.F64One = buf.DecodeFloat64()
- return nil
-}
-
-// GetF64EndianValueReply defines message 'get_f64_endian_value_reply'.
-type GetF64EndianValueReply struct {
- Retval uint32 `binapi:"u32,name=retval" json:"retval,omitempty"`
- F64OneResult float64 `binapi:"f64,name=f64_one_result" json:"f64_one_result,omitempty"`
-}
-
-func (m *GetF64EndianValueReply) Reset() { *m = GetF64EndianValueReply{} }
-func (*GetF64EndianValueReply) GetMessageName() string { return "get_f64_endian_value_reply" }
-func (*GetF64EndianValueReply) GetCrcString() string { return "7e02e404" }
-func (*GetF64EndianValueReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GetF64EndianValueReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 8 // m.F64OneResult
- return size
-}
-func (m *GetF64EndianValueReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Retval)
- buf.EncodeFloat64(m.F64OneResult)
- return buf.Bytes(), nil
-}
-func (m *GetF64EndianValueReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeUint32()
- m.F64OneResult = buf.DecodeFloat64()
- return nil
-}
-
-// GetF64IncrementByOne defines message 'get_f64_increment_by_one'.
-type GetF64IncrementByOne struct {
- F64Value float64 `binapi:"f64,name=f64_value,default=1" json:"f64_value,omitempty"`
-}
-
-func (m *GetF64IncrementByOne) Reset() { *m = GetF64IncrementByOne{} }
-func (*GetF64IncrementByOne) GetMessageName() string { return "get_f64_increment_by_one" }
-func (*GetF64IncrementByOne) GetCrcString() string { return "b64f027e" }
-func (*GetF64IncrementByOne) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GetF64IncrementByOne) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 8 // m.F64Value
- return size
-}
-func (m *GetF64IncrementByOne) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeFloat64(m.F64Value)
- return buf.Bytes(), nil
-}
-func (m *GetF64IncrementByOne) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.F64Value = buf.DecodeFloat64()
- return nil
-}
-
-// GetF64IncrementByOneReply defines message 'get_f64_increment_by_one_reply'.
-type GetF64IncrementByOneReply struct {
- Retval uint32 `binapi:"u32,name=retval" json:"retval,omitempty"`
- F64Value float64 `binapi:"f64,name=f64_value" json:"f64_value,omitempty"`
-}
-
-func (m *GetF64IncrementByOneReply) Reset() { *m = GetF64IncrementByOneReply{} }
-func (*GetF64IncrementByOneReply) GetMessageName() string { return "get_f64_increment_by_one_reply" }
-func (*GetF64IncrementByOneReply) GetCrcString() string { return "d25dbaa3" }
-func (*GetF64IncrementByOneReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GetF64IncrementByOneReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 8 // m.F64Value
- return size
-}
-func (m *GetF64IncrementByOneReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Retval)
- buf.EncodeFloat64(m.F64Value)
- return buf.Bytes(), nil
-}
-func (m *GetF64IncrementByOneReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeUint32()
- m.F64Value = buf.DecodeFloat64()
- return nil
-}
-
-// GetNextIndex defines message 'get_next_index'.
-type GetNextIndex struct {
- NodeName []byte `binapi:"u8[64],name=node_name" json:"node_name,omitempty"`
- NextName []byte `binapi:"u8[64],name=next_name" json:"next_name,omitempty"`
-}
-
-func (m *GetNextIndex) Reset() { *m = GetNextIndex{} }
-func (*GetNextIndex) GetMessageName() string { return "get_next_index" }
-func (*GetNextIndex) GetCrcString() string { return "9ab92f7a" }
-func (*GetNextIndex) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GetNextIndex) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 64 // m.NodeName
- size += 1 * 64 // m.NextName
- return size
-}
-func (m *GetNextIndex) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.NodeName, 64)
- buf.EncodeBytes(m.NextName, 64)
- return buf.Bytes(), nil
-}
-func (m *GetNextIndex) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.NodeName = make([]byte, 64)
- copy(m.NodeName, buf.DecodeBytes(len(m.NodeName)))
- m.NextName = make([]byte, 64)
- copy(m.NextName, buf.DecodeBytes(len(m.NextName)))
- return nil
-}
-
-// GetNextIndexReply defines message 'get_next_index_reply'.
-type GetNextIndexReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- NextIndex uint32 `binapi:"u32,name=next_index" json:"next_index,omitempty"`
-}
-
-func (m *GetNextIndexReply) Reset() { *m = GetNextIndexReply{} }
-func (*GetNextIndexReply) GetMessageName() string { return "get_next_index_reply" }
-func (*GetNextIndexReply) GetCrcString() string { return "2ed75f32" }
-func (*GetNextIndexReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GetNextIndexReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.NextIndex
- return size
-}
-func (m *GetNextIndexReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.NextIndex)
- return buf.Bytes(), nil
-}
-func (m *GetNextIndexReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.NextIndex = buf.DecodeUint32()
- return nil
-}
-
-// GetNodeGraph defines message 'get_node_graph'.
-type GetNodeGraph struct{}
-
-func (m *GetNodeGraph) Reset() { *m = GetNodeGraph{} }
-func (*GetNodeGraph) GetMessageName() string { return "get_node_graph" }
-func (*GetNodeGraph) GetCrcString() string { return "51077d14" }
-func (*GetNodeGraph) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GetNodeGraph) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *GetNodeGraph) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *GetNodeGraph) Unmarshal(b []byte) error {
- return nil
-}
-
-// GetNodeGraphReply defines message 'get_node_graph_reply'.
-type GetNodeGraphReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- ReplyInShmem uint64 `binapi:"u64,name=reply_in_shmem" json:"reply_in_shmem,omitempty"`
-}
-
-func (m *GetNodeGraphReply) Reset() { *m = GetNodeGraphReply{} }
-func (*GetNodeGraphReply) GetMessageName() string { return "get_node_graph_reply" }
-func (*GetNodeGraphReply) GetCrcString() string { return "06d68297" }
-func (*GetNodeGraphReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GetNodeGraphReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 8 // m.ReplyInShmem
- return size
-}
-func (m *GetNodeGraphReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint64(m.ReplyInShmem)
- return buf.Bytes(), nil
-}
-func (m *GetNodeGraphReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.ReplyInShmem = buf.DecodeUint64()
- return nil
-}
-
-// GetNodeIndex defines message 'get_node_index'.
-type GetNodeIndex struct {
- NodeName []byte `binapi:"u8[64],name=node_name" json:"node_name,omitempty"`
-}
-
-func (m *GetNodeIndex) Reset() { *m = GetNodeIndex{} }
-func (*GetNodeIndex) GetMessageName() string { return "get_node_index" }
-func (*GetNodeIndex) GetCrcString() string { return "6c9a495d" }
-func (*GetNodeIndex) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *GetNodeIndex) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 * 64 // m.NodeName
- return size
-}
-func (m *GetNodeIndex) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBytes(m.NodeName, 64)
- return buf.Bytes(), nil
-}
-func (m *GetNodeIndex) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.NodeName = make([]byte, 64)
- copy(m.NodeName, buf.DecodeBytes(len(m.NodeName)))
- return nil
-}
-
-// GetNodeIndexReply defines message 'get_node_index_reply'.
-type GetNodeIndexReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- NodeIndex uint32 `binapi:"u32,name=node_index" json:"node_index,omitempty"`
-}
-
-func (m *GetNodeIndexReply) Reset() { *m = GetNodeIndexReply{} }
-func (*GetNodeIndexReply) GetMessageName() string { return "get_node_index_reply" }
-func (*GetNodeIndexReply) GetCrcString() string { return "a8600b89" }
-func (*GetNodeIndexReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *GetNodeIndexReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.NodeIndex
- return size
-}
-func (m *GetNodeIndexReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.NodeIndex)
- return buf.Bytes(), nil
-}
-func (m *GetNodeIndexReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.NodeIndex = buf.DecodeUint32()
- return nil
-}
-
-// LogDetails defines message 'log_details'.
-type LogDetails struct {
- Timestamp Timestamp `binapi:"timestamp,name=timestamp" json:"timestamp,omitempty"`
- Level LogLevel `binapi:"log_level,name=level" json:"level,omitempty"`
- MsgClass string `binapi:"string[32],name=msg_class" json:"msg_class,omitempty"`
- Message string `binapi:"string[256],name=message" json:"message,omitempty"`
-}
-
-func (m *LogDetails) Reset() { *m = LogDetails{} }
-func (*LogDetails) GetMessageName() string { return "log_details" }
-func (*LogDetails) GetCrcString() string { return "255827a1" }
-func (*LogDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *LogDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 8 // m.Timestamp
- size += 4 // m.Level
- size += 32 // m.MsgClass
- size += 256 // m.Message
- return size
-}
-func (m *LogDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeFloat64(float64(m.Timestamp))
- buf.EncodeUint32(uint32(m.Level))
- buf.EncodeString(m.MsgClass, 32)
- buf.EncodeString(m.Message, 256)
- return buf.Bytes(), nil
-}
-func (m *LogDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Timestamp = Timestamp(buf.DecodeFloat64())
- m.Level = LogLevel(buf.DecodeUint32())
- m.MsgClass = buf.DecodeString(32)
- m.Message = buf.DecodeString(256)
- return nil
-}
-
-// LogDump defines message 'log_dump'.
-type LogDump struct {
- StartTimestamp Timestamp `binapi:"timestamp,name=start_timestamp" json:"start_timestamp,omitempty"`
-}
-
-func (m *LogDump) Reset() { *m = LogDump{} }
-func (*LogDump) GetMessageName() string { return "log_dump" }
-func (*LogDump) GetCrcString() string { return "6ab31753" }
-func (*LogDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *LogDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 8 // m.StartTimestamp
- return size
-}
-func (m *LogDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeFloat64(float64(m.StartTimestamp))
- return buf.Bytes(), nil
-}
-func (m *LogDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.StartTimestamp = Timestamp(buf.DecodeFloat64())
- return nil
-}
-
-// ShowThreads defines message 'show_threads'.
-type ShowThreads struct{}
-
-func (m *ShowThreads) Reset() { *m = ShowThreads{} }
-func (*ShowThreads) GetMessageName() string { return "show_threads" }
-func (*ShowThreads) GetCrcString() string { return "51077d14" }
-func (*ShowThreads) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ShowThreads) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *ShowThreads) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *ShowThreads) Unmarshal(b []byte) error {
- return nil
-}
-
-// ShowThreadsReply defines message 'show_threads_reply'.
-type ShowThreadsReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- Count uint32 `binapi:"u32,name=count" json:"-"`
- ThreadData []ThreadData `binapi:"thread_data[count],name=thread_data" json:"thread_data,omitempty"`
-}
-
-func (m *ShowThreadsReply) Reset() { *m = ShowThreadsReply{} }
-func (*ShowThreadsReply) GetMessageName() string { return "show_threads_reply" }
-func (*ShowThreadsReply) GetCrcString() string { return "f5e0b66f" }
-func (*ShowThreadsReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ShowThreadsReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.Count
- for j1 := 0; j1 < len(m.ThreadData); j1++ {
- var s1 ThreadData
- _ = s1
- if j1 < len(m.ThreadData) {
- s1 = m.ThreadData[j1]
- }
- size += 4 // s1.ID
- size += 1 * 64 // s1.Name
- size += 1 * 64 // s1.Type
- size += 4 // s1.PID
- size += 4 // s1.CPUID
- size += 4 // s1.Core
- size += 4 // s1.CPUSocket
- }
- return size
-}
-func (m *ShowThreadsReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(uint32(len(m.ThreadData)))
- for j0 := 0; j0 < len(m.ThreadData); j0++ {
- var v0 ThreadData // ThreadData
- if j0 < len(m.ThreadData) {
- v0 = m.ThreadData[j0]
- }
- buf.EncodeUint32(v0.ID)
- buf.EncodeBytes(v0.Name, 64)
- buf.EncodeBytes(v0.Type, 64)
- buf.EncodeUint32(v0.PID)
- buf.EncodeUint32(v0.CPUID)
- buf.EncodeUint32(v0.Core)
- buf.EncodeUint32(v0.CPUSocket)
- }
- return buf.Bytes(), nil
-}
-func (m *ShowThreadsReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.Count = buf.DecodeUint32()
- m.ThreadData = make([]ThreadData, m.Count)
- for j0 := 0; j0 < len(m.ThreadData); j0++ {
- m.ThreadData[j0].ID = buf.DecodeUint32()
- m.ThreadData[j0].Name = make([]byte, 64)
- copy(m.ThreadData[j0].Name, buf.DecodeBytes(len(m.ThreadData[j0].Name)))
- m.ThreadData[j0].Type = make([]byte, 64)
- copy(m.ThreadData[j0].Type, buf.DecodeBytes(len(m.ThreadData[j0].Type)))
- m.ThreadData[j0].PID = buf.DecodeUint32()
- m.ThreadData[j0].CPUID = buf.DecodeUint32()
- m.ThreadData[j0].Core = buf.DecodeUint32()
- m.ThreadData[j0].CPUSocket = buf.DecodeUint32()
- }
- return nil
-}
-
-// ShowVersion defines message 'show_version'.
-type ShowVersion struct{}
-
-func (m *ShowVersion) Reset() { *m = ShowVersion{} }
-func (*ShowVersion) GetMessageName() string { return "show_version" }
-func (*ShowVersion) GetCrcString() string { return "51077d14" }
-func (*ShowVersion) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ShowVersion) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *ShowVersion) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *ShowVersion) Unmarshal(b []byte) error {
- return nil
-}
-
-// ShowVersionReply defines message 'show_version_reply'.
-type ShowVersionReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- Program string `binapi:"string[32],name=program" json:"program,omitempty"`
- Version string `binapi:"string[32],name=version" json:"version,omitempty"`
- BuildDate string `binapi:"string[32],name=build_date" json:"build_date,omitempty"`
- BuildDirectory string `binapi:"string[256],name=build_directory" json:"build_directory,omitempty"`
-}
-
-func (m *ShowVersionReply) Reset() { *m = ShowVersionReply{} }
-func (*ShowVersionReply) GetMessageName() string { return "show_version_reply" }
-func (*ShowVersionReply) GetCrcString() string { return "c919bde1" }
-func (*ShowVersionReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ShowVersionReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 32 // m.Program
- size += 32 // m.Version
- size += 32 // m.BuildDate
- size += 256 // m.BuildDirectory
- return size
-}
-func (m *ShowVersionReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeString(m.Program, 32)
- buf.EncodeString(m.Version, 32)
- buf.EncodeString(m.BuildDate, 32)
- buf.EncodeString(m.BuildDirectory, 256)
- return buf.Bytes(), nil
-}
-func (m *ShowVersionReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.Program = buf.DecodeString(32)
- m.Version = buf.DecodeString(32)
- m.BuildDate = buf.DecodeString(32)
- m.BuildDirectory = buf.DecodeString(256)
- return nil
-}
-
-// ShowVpeSystemTime defines message 'show_vpe_system_time'.
-type ShowVpeSystemTime struct{}
-
-func (m *ShowVpeSystemTime) Reset() { *m = ShowVpeSystemTime{} }
-func (*ShowVpeSystemTime) GetMessageName() string { return "show_vpe_system_time" }
-func (*ShowVpeSystemTime) GetCrcString() string { return "51077d14" }
-func (*ShowVpeSystemTime) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *ShowVpeSystemTime) Size() (size int) {
- if m == nil {
- return 0
- }
- return size
-}
-func (m *ShowVpeSystemTime) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- return buf.Bytes(), nil
-}
-func (m *ShowVpeSystemTime) Unmarshal(b []byte) error {
- return nil
-}
-
-// ShowVpeSystemTimeReply defines message 'show_vpe_system_time_reply'.
-type ShowVpeSystemTimeReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- VpeSystemTime Timestamp `binapi:"timestamp,name=vpe_system_time" json:"vpe_system_time,omitempty"`
-}
-
-func (m *ShowVpeSystemTimeReply) Reset() { *m = ShowVpeSystemTimeReply{} }
-func (*ShowVpeSystemTimeReply) GetMessageName() string { return "show_vpe_system_time_reply" }
-func (*ShowVpeSystemTimeReply) GetCrcString() string { return "7ffd8193" }
-func (*ShowVpeSystemTimeReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *ShowVpeSystemTimeReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 8 // m.VpeSystemTime
- return size
-}
-func (m *ShowVpeSystemTimeReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeFloat64(float64(m.VpeSystemTime))
- return buf.Bytes(), nil
-}
-func (m *ShowVpeSystemTimeReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.VpeSystemTime = Timestamp(buf.DecodeFloat64())
- return nil
-}
-
-func init() { file_vpe_binapi_init() }
-func file_vpe_binapi_init() {
- api.RegisterMessage((*AddNodeNext)(nil), "add_node_next_9ab92f7a")
- api.RegisterMessage((*AddNodeNextReply)(nil), "add_node_next_reply_2ed75f32")
- api.RegisterMessage((*Cli)(nil), "cli_23bfbfff")
- api.RegisterMessage((*CliInband)(nil), "cli_inband_f8377302")
- api.RegisterMessage((*CliInbandReply)(nil), "cli_inband_reply_05879051")
- api.RegisterMessage((*CliReply)(nil), "cli_reply_06d68297")
- api.RegisterMessage((*ControlPing)(nil), "control_ping_51077d14")
- api.RegisterMessage((*ControlPingReply)(nil), "control_ping_reply_f6b0b8ca")
- api.RegisterMessage((*GetF64EndianValue)(nil), "get_f64_endian_value_809fcd44")
- api.RegisterMessage((*GetF64EndianValueReply)(nil), "get_f64_endian_value_reply_7e02e404")
- api.RegisterMessage((*GetF64IncrementByOne)(nil), "get_f64_increment_by_one_b64f027e")
- api.RegisterMessage((*GetF64IncrementByOneReply)(nil), "get_f64_increment_by_one_reply_d25dbaa3")
- api.RegisterMessage((*GetNextIndex)(nil), "get_next_index_9ab92f7a")
- api.RegisterMessage((*GetNextIndexReply)(nil), "get_next_index_reply_2ed75f32")
- api.RegisterMessage((*GetNodeGraph)(nil), "get_node_graph_51077d14")
- api.RegisterMessage((*GetNodeGraphReply)(nil), "get_node_graph_reply_06d68297")
- api.RegisterMessage((*GetNodeIndex)(nil), "get_node_index_6c9a495d")
- api.RegisterMessage((*GetNodeIndexReply)(nil), "get_node_index_reply_a8600b89")
- api.RegisterMessage((*LogDetails)(nil), "log_details_255827a1")
- api.RegisterMessage((*LogDump)(nil), "log_dump_6ab31753")
- api.RegisterMessage((*ShowThreads)(nil), "show_threads_51077d14")
- api.RegisterMessage((*ShowThreadsReply)(nil), "show_threads_reply_f5e0b66f")
- api.RegisterMessage((*ShowVersion)(nil), "show_version_51077d14")
- api.RegisterMessage((*ShowVersionReply)(nil), "show_version_reply_c919bde1")
- api.RegisterMessage((*ShowVpeSystemTime)(nil), "show_vpe_system_time_51077d14")
- api.RegisterMessage((*ShowVpeSystemTimeReply)(nil), "show_vpe_system_time_reply_7ffd8193")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*AddNodeNext)(nil),
- (*AddNodeNextReply)(nil),
- (*Cli)(nil),
- (*CliInband)(nil),
- (*CliInbandReply)(nil),
- (*CliReply)(nil),
- (*ControlPing)(nil),
- (*ControlPingReply)(nil),
- (*GetF64EndianValue)(nil),
- (*GetF64EndianValueReply)(nil),
- (*GetF64IncrementByOne)(nil),
- (*GetF64IncrementByOneReply)(nil),
- (*GetNextIndex)(nil),
- (*GetNextIndexReply)(nil),
- (*GetNodeGraph)(nil),
- (*GetNodeGraphReply)(nil),
- (*GetNodeIndex)(nil),
- (*GetNodeIndexReply)(nil),
- (*LogDetails)(nil),
- (*LogDump)(nil),
- (*ShowThreads)(nil),
- (*ShowThreadsReply)(nil),
- (*ShowVersion)(nil),
- (*ShowVersionReply)(nil),
- (*ShowVpeSystemTime)(nil),
- (*ShowVpeSystemTimeReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/vpe/vpe_rpc.ba.go b/internal/testbinapi/binapi2001/vpe/vpe_rpc.ba.go
deleted file mode 100644
index 557a397..0000000
--- a/internal/testbinapi/binapi2001/vpe/vpe_rpc.ba.go
+++ /dev/null
@@ -1,187 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package vpe
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
-)
-
-// RPCService defines RPC service vpe.
-type RPCService interface {
- AddNodeNext(ctx context.Context, in *AddNodeNext) (*AddNodeNextReply, error)
- Cli(ctx context.Context, in *Cli) (*CliReply, error)
- CliInband(ctx context.Context, in *CliInband) (*CliInbandReply, error)
- ControlPing(ctx context.Context, in *ControlPing) (*ControlPingReply, error)
- GetF64EndianValue(ctx context.Context, in *GetF64EndianValue) (*GetF64EndianValueReply, error)
- GetF64IncrementByOne(ctx context.Context, in *GetF64IncrementByOne) (*GetF64IncrementByOneReply, error)
- GetNextIndex(ctx context.Context, in *GetNextIndex) (*GetNextIndexReply, error)
- GetNodeGraph(ctx context.Context, in *GetNodeGraph) (*GetNodeGraphReply, error)
- GetNodeIndex(ctx context.Context, in *GetNodeIndex) (*GetNodeIndexReply, error)
- LogDump(ctx context.Context, in *LogDump) (RPCService_LogDumpClient, error)
- ShowThreads(ctx context.Context, in *ShowThreads) (*ShowThreadsReply, error)
- ShowVersion(ctx context.Context, in *ShowVersion) (*ShowVersionReply, error)
- ShowVpeSystemTime(ctx context.Context, in *ShowVpeSystemTime) (*ShowVpeSystemTimeReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) AddNodeNext(ctx context.Context, in *AddNodeNext) (*AddNodeNextReply, error) {
- out := new(AddNodeNextReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) Cli(ctx context.Context, in *Cli) (*CliReply, error) {
- out := new(CliReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) CliInband(ctx context.Context, in *CliInband) (*CliInbandReply, error) {
- out := new(CliInbandReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) ControlPing(ctx context.Context, in *ControlPing) (*ControlPingReply, error) {
- out := new(ControlPingReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GetF64EndianValue(ctx context.Context, in *GetF64EndianValue) (*GetF64EndianValueReply, error) {
- out := new(GetF64EndianValueReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(int32(out.Retval))
-}
-
-func (c *serviceClient) GetF64IncrementByOne(ctx context.Context, in *GetF64IncrementByOne) (*GetF64IncrementByOneReply, error) {
- out := new(GetF64IncrementByOneReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(int32(out.Retval))
-}
-
-func (c *serviceClient) GetNextIndex(ctx context.Context, in *GetNextIndex) (*GetNextIndexReply, error) {
- out := new(GetNextIndexReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GetNodeGraph(ctx context.Context, in *GetNodeGraph) (*GetNodeGraphReply, error) {
- out := new(GetNodeGraphReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) GetNodeIndex(ctx context.Context, in *GetNodeIndex) (*GetNodeIndexReply, error) {
- out := new(GetNodeIndexReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) LogDump(ctx context.Context, in *LogDump) (RPCService_LogDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_LogDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_LogDumpClient interface {
- Recv() (*LogDetails, error)
- api.Stream
-}
-
-type serviceClient_LogDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_LogDumpClient) Recv() (*LogDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *LogDetails:
- return m, nil
- case *ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
-
-func (c *serviceClient) ShowThreads(ctx context.Context, in *ShowThreads) (*ShowThreadsReply, error) {
- out := new(ShowThreadsReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) ShowVersion(ctx context.Context, in *ShowVersion) (*ShowVersionReply, error) {
- out := new(ShowVersionReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) ShowVpeSystemTime(ctx context.Context, in *ShowVpeSystemTime) (*ShowVpeSystemTimeReply, error) {
- out := new(ShowVpeSystemTimeReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/testbinapi/binapi2001/vpe_types/vpe_types.ba.go b/internal/testbinapi/binapi2001/vpe_types/vpe_types.ba.go
deleted file mode 100644
index 140995d..0000000
--- a/internal/testbinapi/binapi2001/vpe_types/vpe_types.ba.go
+++ /dev/null
@@ -1,127 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/vpe_types.api.json
-
-// Package vpe_types contains generated bindings for API file vpe_types.api.
-//
-// Contents:
-// 2 aliases
-// 1 enum
-// 1 struct
-//
-package vpe_types
-
-import (
- "strconv"
- "time"
-
- api "git.fd.io/govpp.git/api"
-)
-
-// 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 = "vpe_types"
- APIVersion = ""
- VersionCrc = 0x3369988d
-)
-
-// LogLevel defines enum 'log_level'.
-type LogLevel uint32
-
-const (
- VPE_API_LOG_LEVEL_EMERG LogLevel = 0
- VPE_API_LOG_LEVEL_ALERT LogLevel = 1
- VPE_API_LOG_LEVEL_CRIT LogLevel = 2
- VPE_API_LOG_LEVEL_ERR LogLevel = 3
- VPE_API_LOG_LEVEL_WARNING LogLevel = 4
- VPE_API_LOG_LEVEL_NOTICE LogLevel = 5
- VPE_API_LOG_LEVEL_INFO LogLevel = 6
- VPE_API_LOG_LEVEL_DEBUG LogLevel = 7
- VPE_API_LOG_LEVEL_DISABLED LogLevel = 8
-)
-
-var (
- LogLevel_name = map[uint32]string{
- 0: "VPE_API_LOG_LEVEL_EMERG",
- 1: "VPE_API_LOG_LEVEL_ALERT",
- 2: "VPE_API_LOG_LEVEL_CRIT",
- 3: "VPE_API_LOG_LEVEL_ERR",
- 4: "VPE_API_LOG_LEVEL_WARNING",
- 5: "VPE_API_LOG_LEVEL_NOTICE",
- 6: "VPE_API_LOG_LEVEL_INFO",
- 7: "VPE_API_LOG_LEVEL_DEBUG",
- 8: "VPE_API_LOG_LEVEL_DISABLED",
- }
- LogLevel_value = map[string]uint32{
- "VPE_API_LOG_LEVEL_EMERG": 0,
- "VPE_API_LOG_LEVEL_ALERT": 1,
- "VPE_API_LOG_LEVEL_CRIT": 2,
- "VPE_API_LOG_LEVEL_ERR": 3,
- "VPE_API_LOG_LEVEL_WARNING": 4,
- "VPE_API_LOG_LEVEL_NOTICE": 5,
- "VPE_API_LOG_LEVEL_INFO": 6,
- "VPE_API_LOG_LEVEL_DEBUG": 7,
- "VPE_API_LOG_LEVEL_DISABLED": 8,
- }
-)
-
-func (x LogLevel) String() string {
- s, ok := LogLevel_name[uint32(x)]
- if ok {
- return s
- }
- return "LogLevel(" + strconv.Itoa(int(x)) + ")"
-}
-
-// Timedelta defines alias 'timedelta'.
-type Timedelta float64
-
-// Timestamp defines alias 'timestamp'.
-type Timestamp float64
-
-func NewTimestamp(t time.Time) Timestamp {
- sec := int64(t.Unix())
- nsec := int32(t.Nanosecond())
- ns := float64(sec) + float64(nsec/1e9)
- return Timestamp(ns)
-}
-
-func (x Timestamp) ToTime() time.Time {
- ns := int64(x * 1e9)
- sec := ns / 1e9
- nsec := ns % 1e9
- return time.Unix(sec, nsec)
-}
-
-func (x Timestamp) String() string {
- return x.ToTime().String()
-}
-
-func (x *Timestamp) MarshalText() ([]byte, error) {
- return []byte(x.ToTime().Format(time.RFC3339Nano)), nil
-}
-
-func (x *Timestamp) UnmarshalText(text []byte) error {
- t, err := time.Parse(time.RFC3339Nano, string(text))
- if err != nil {
- return err
- }
- *x = NewTimestamp(t)
- return nil
-}
-
-// Version defines type 'version'.
-type Version struct {
- Major uint32 `binapi:"u32,name=major" json:"major,omitempty"`
- Minor uint32 `binapi:"u32,name=minor" json:"minor,omitempty"`
- Patch uint32 `binapi:"u32,name=patch" json:"patch,omitempty"`
- PreRelease []byte `binapi:"u8[17],name=pre_release" json:"pre_release,omitempty"`
- BuildMetadata []byte `binapi:"u8[17],name=build_metadata" json:"build_metadata,omitempty"`
-}
diff --git a/internal/testbinapi/binapi2001/vxlan/vxlan.ba.go b/internal/testbinapi/binapi2001/vxlan/vxlan.ba.go
deleted file mode 100644
index b3582c9..0000000
--- a/internal/testbinapi/binapi2001/vxlan/vxlan.ba.go
+++ /dev/null
@@ -1,409 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/vxlan.api.json
-
-// Package vxlan contains generated bindings for API file vxlan.api.
-//
-// Contents:
-// 8 messages
-//
-package vxlan
-
-import (
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the GoVPP api package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// GoVPP api package needs to be updated.
-const _ = api.GoVppAPIPackageIsVersion2
-
-const (
- APIFile = "vxlan"
- APIVersion = "1.1.0"
- VersionCrc = 0xa95aa271
-)
-
-// SwInterfaceSetVxlanBypass defines message 'sw_interface_set_vxlan_bypass'.
-type SwInterfaceSetVxlanBypass struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- IsIPv6 uint8 `binapi:"u8,name=is_ipv6" json:"is_ipv6,omitempty"`
- Enable uint8 `binapi:"u8,name=enable" json:"enable,omitempty"`
-}
-
-func (m *SwInterfaceSetVxlanBypass) Reset() { *m = SwInterfaceSetVxlanBypass{} }
-func (*SwInterfaceSetVxlanBypass) GetMessageName() string { return "sw_interface_set_vxlan_bypass" }
-func (*SwInterfaceSetVxlanBypass) GetCrcString() string { return "e74ca095" }
-func (*SwInterfaceSetVxlanBypass) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceSetVxlanBypass) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.IsIPv6
- size += 1 // m.Enable
- return size
-}
-func (m *SwInterfaceSetVxlanBypass) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.SwIfIndex)
- buf.EncodeUint8(m.IsIPv6)
- buf.EncodeUint8(m.Enable)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceSetVxlanBypass) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = buf.DecodeUint32()
- m.IsIPv6 = buf.DecodeUint8()
- m.Enable = buf.DecodeUint8()
- return nil
-}
-
-// SwInterfaceSetVxlanBypassReply defines message 'sw_interface_set_vxlan_bypass_reply'.
-type SwInterfaceSetVxlanBypassReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SwInterfaceSetVxlanBypassReply) Reset() { *m = SwInterfaceSetVxlanBypassReply{} }
-func (*SwInterfaceSetVxlanBypassReply) GetMessageName() string {
- return "sw_interface_set_vxlan_bypass_reply"
-}
-func (*SwInterfaceSetVxlanBypassReply) GetCrcString() string { return "e8d4e804" }
-func (*SwInterfaceSetVxlanBypassReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SwInterfaceSetVxlanBypassReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SwInterfaceSetVxlanBypassReply) 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 *SwInterfaceSetVxlanBypassReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// VxlanAddDelTunnel defines message 'vxlan_add_del_tunnel'.
-type VxlanAddDelTunnel struct {
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
- IsIPv6 uint8 `binapi:"u8,name=is_ipv6" json:"is_ipv6,omitempty"`
- Instance uint32 `binapi:"u32,name=instance" json:"instance,omitempty"`
- SrcAddress []byte `binapi:"u8[16],name=src_address" json:"src_address,omitempty"`
- DstAddress []byte `binapi:"u8[16],name=dst_address" json:"dst_address,omitempty"`
- McastSwIfIndex uint32 `binapi:"u32,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
- EncapVrfID uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
- DecapNextIndex uint32 `binapi:"u32,name=decap_next_index" json:"decap_next_index,omitempty"`
- Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
-}
-
-func (m *VxlanAddDelTunnel) Reset() { *m = VxlanAddDelTunnel{} }
-func (*VxlanAddDelTunnel) GetMessageName() string { return "vxlan_add_del_tunnel" }
-func (*VxlanAddDelTunnel) GetCrcString() string { return "00f4bdd0" }
-func (*VxlanAddDelTunnel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *VxlanAddDelTunnel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 1 // m.IsIPv6
- size += 4 // m.Instance
- size += 1 * 16 // m.SrcAddress
- size += 1 * 16 // m.DstAddress
- size += 4 // m.McastSwIfIndex
- size += 4 // m.EncapVrfID
- size += 4 // m.DecapNextIndex
- size += 4 // m.Vni
- return size
-}
-func (m *VxlanAddDelTunnel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsAdd)
- buf.EncodeUint8(m.IsIPv6)
- buf.EncodeUint32(m.Instance)
- buf.EncodeBytes(m.SrcAddress, 16)
- buf.EncodeBytes(m.DstAddress, 16)
- buf.EncodeUint32(m.McastSwIfIndex)
- buf.EncodeUint32(m.EncapVrfID)
- buf.EncodeUint32(m.DecapNextIndex)
- buf.EncodeUint32(m.Vni)
- return buf.Bytes(), nil
-}
-func (m *VxlanAddDelTunnel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeUint8()
- m.IsIPv6 = buf.DecodeUint8()
- m.Instance = buf.DecodeUint32()
- m.SrcAddress = make([]byte, 16)
- copy(m.SrcAddress, buf.DecodeBytes(len(m.SrcAddress)))
- m.DstAddress = make([]byte, 16)
- copy(m.DstAddress, buf.DecodeBytes(len(m.DstAddress)))
- m.McastSwIfIndex = buf.DecodeUint32()
- m.EncapVrfID = buf.DecodeUint32()
- m.DecapNextIndex = buf.DecodeUint32()
- m.Vni = buf.DecodeUint32()
- return nil
-}
-
-// VxlanAddDelTunnelReply defines message 'vxlan_add_del_tunnel_reply'.
-type VxlanAddDelTunnelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *VxlanAddDelTunnelReply) Reset() { *m = VxlanAddDelTunnelReply{} }
-func (*VxlanAddDelTunnelReply) GetMessageName() string { return "vxlan_add_del_tunnel_reply" }
-func (*VxlanAddDelTunnelReply) GetCrcString() string { return "fda5941f" }
-func (*VxlanAddDelTunnelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *VxlanAddDelTunnelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *VxlanAddDelTunnelReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.SwIfIndex)
- return buf.Bytes(), nil
-}
-func (m *VxlanAddDelTunnelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.SwIfIndex = buf.DecodeUint32()
- return nil
-}
-
-// VxlanOffloadRx defines message 'vxlan_offload_rx'.
-type VxlanOffloadRx struct {
- HwIfIndex uint32 `binapi:"u32,name=hw_if_index" json:"hw_if_index,omitempty"`
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- Enable uint8 `binapi:"u8,name=enable" json:"enable,omitempty"`
-}
-
-func (m *VxlanOffloadRx) Reset() { *m = VxlanOffloadRx{} }
-func (*VxlanOffloadRx) GetMessageName() string { return "vxlan_offload_rx" }
-func (*VxlanOffloadRx) GetCrcString() string { return "f0b08786" }
-func (*VxlanOffloadRx) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *VxlanOffloadRx) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.HwIfIndex
- size += 4 // m.SwIfIndex
- size += 1 // m.Enable
- return size
-}
-func (m *VxlanOffloadRx) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.HwIfIndex)
- buf.EncodeUint32(m.SwIfIndex)
- buf.EncodeUint8(m.Enable)
- return buf.Bytes(), nil
-}
-func (m *VxlanOffloadRx) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.HwIfIndex = buf.DecodeUint32()
- m.SwIfIndex = buf.DecodeUint32()
- m.Enable = buf.DecodeUint8()
- return nil
-}
-
-// VxlanOffloadRxReply defines message 'vxlan_offload_rx_reply'.
-type VxlanOffloadRxReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *VxlanOffloadRxReply) Reset() { *m = VxlanOffloadRxReply{} }
-func (*VxlanOffloadRxReply) GetMessageName() string { return "vxlan_offload_rx_reply" }
-func (*VxlanOffloadRxReply) GetCrcString() string { return "e8d4e804" }
-func (*VxlanOffloadRxReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *VxlanOffloadRxReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *VxlanOffloadRxReply) 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 *VxlanOffloadRxReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// VxlanTunnelDetails defines message 'vxlan_tunnel_details'.
-type VxlanTunnelDetails struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- Instance uint32 `binapi:"u32,name=instance" json:"instance,omitempty"`
- SrcAddress []byte `binapi:"u8[16],name=src_address" json:"src_address,omitempty"`
- DstAddress []byte `binapi:"u8[16],name=dst_address" json:"dst_address,omitempty"`
- McastSwIfIndex uint32 `binapi:"u32,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
- EncapVrfID uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
- DecapNextIndex uint32 `binapi:"u32,name=decap_next_index" json:"decap_next_index,omitempty"`
- Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
- IsIPv6 uint8 `binapi:"u8,name=is_ipv6" json:"is_ipv6,omitempty"`
-}
-
-func (m *VxlanTunnelDetails) Reset() { *m = VxlanTunnelDetails{} }
-func (*VxlanTunnelDetails) GetMessageName() string { return "vxlan_tunnel_details" }
-func (*VxlanTunnelDetails) GetCrcString() string { return "ce38e127" }
-func (*VxlanTunnelDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *VxlanTunnelDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 4 // m.Instance
- size += 1 * 16 // m.SrcAddress
- size += 1 * 16 // m.DstAddress
- size += 4 // m.McastSwIfIndex
- size += 4 // m.EncapVrfID
- size += 4 // m.DecapNextIndex
- size += 4 // m.Vni
- size += 1 // m.IsIPv6
- return size
-}
-func (m *VxlanTunnelDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.SwIfIndex)
- buf.EncodeUint32(m.Instance)
- buf.EncodeBytes(m.SrcAddress, 16)
- buf.EncodeBytes(m.DstAddress, 16)
- buf.EncodeUint32(m.McastSwIfIndex)
- buf.EncodeUint32(m.EncapVrfID)
- buf.EncodeUint32(m.DecapNextIndex)
- buf.EncodeUint32(m.Vni)
- buf.EncodeUint8(m.IsIPv6)
- return buf.Bytes(), nil
-}
-func (m *VxlanTunnelDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = buf.DecodeUint32()
- m.Instance = buf.DecodeUint32()
- m.SrcAddress = make([]byte, 16)
- copy(m.SrcAddress, buf.DecodeBytes(len(m.SrcAddress)))
- m.DstAddress = make([]byte, 16)
- copy(m.DstAddress, buf.DecodeBytes(len(m.DstAddress)))
- m.McastSwIfIndex = buf.DecodeUint32()
- m.EncapVrfID = buf.DecodeUint32()
- m.DecapNextIndex = buf.DecodeUint32()
- m.Vni = buf.DecodeUint32()
- m.IsIPv6 = buf.DecodeUint8()
- return nil
-}
-
-// VxlanTunnelDump defines message 'vxlan_tunnel_dump'.
-type VxlanTunnelDump struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *VxlanTunnelDump) Reset() { *m = VxlanTunnelDump{} }
-func (*VxlanTunnelDump) GetMessageName() string { return "vxlan_tunnel_dump" }
-func (*VxlanTunnelDump) GetCrcString() string { return "529cb13f" }
-func (*VxlanTunnelDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *VxlanTunnelDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *VxlanTunnelDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.SwIfIndex)
- return buf.Bytes(), nil
-}
-func (m *VxlanTunnelDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = buf.DecodeUint32()
- return nil
-}
-
-func init() { file_vxlan_binapi_init() }
-func file_vxlan_binapi_init() {
- api.RegisterMessage((*SwInterfaceSetVxlanBypass)(nil), "sw_interface_set_vxlan_bypass_e74ca095")
- api.RegisterMessage((*SwInterfaceSetVxlanBypassReply)(nil), "sw_interface_set_vxlan_bypass_reply_e8d4e804")
- api.RegisterMessage((*VxlanAddDelTunnel)(nil), "vxlan_add_del_tunnel_00f4bdd0")
- api.RegisterMessage((*VxlanAddDelTunnelReply)(nil), "vxlan_add_del_tunnel_reply_fda5941f")
- api.RegisterMessage((*VxlanOffloadRx)(nil), "vxlan_offload_rx_f0b08786")
- api.RegisterMessage((*VxlanOffloadRxReply)(nil), "vxlan_offload_rx_reply_e8d4e804")
- api.RegisterMessage((*VxlanTunnelDetails)(nil), "vxlan_tunnel_details_ce38e127")
- api.RegisterMessage((*VxlanTunnelDump)(nil), "vxlan_tunnel_dump_529cb13f")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*SwInterfaceSetVxlanBypass)(nil),
- (*SwInterfaceSetVxlanBypassReply)(nil),
- (*VxlanAddDelTunnel)(nil),
- (*VxlanAddDelTunnelReply)(nil),
- (*VxlanOffloadRx)(nil),
- (*VxlanOffloadRxReply)(nil),
- (*VxlanTunnelDetails)(nil),
- (*VxlanTunnelDump)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/vxlan/vxlan_rpc.ba.go b/internal/testbinapi/binapi2001/vxlan/vxlan_rpc.ba.go
deleted file mode 100644
index a80b8b6..0000000
--- a/internal/testbinapi/binapi2001/vxlan/vxlan_rpc.ba.go
+++ /dev/null
@@ -1,98 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package vxlan
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service vxlan.
-type RPCService interface {
- SwInterfaceSetVxlanBypass(ctx context.Context, in *SwInterfaceSetVxlanBypass) (*SwInterfaceSetVxlanBypassReply, error)
- VxlanAddDelTunnel(ctx context.Context, in *VxlanAddDelTunnel) (*VxlanAddDelTunnelReply, error)
- VxlanOffloadRx(ctx context.Context, in *VxlanOffloadRx) (*VxlanOffloadRxReply, error)
- VxlanTunnelDump(ctx context.Context, in *VxlanTunnelDump) (RPCService_VxlanTunnelDumpClient, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) SwInterfaceSetVxlanBypass(ctx context.Context, in *SwInterfaceSetVxlanBypass) (*SwInterfaceSetVxlanBypassReply, error) {
- out := new(SwInterfaceSetVxlanBypassReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) VxlanAddDelTunnel(ctx context.Context, in *VxlanAddDelTunnel) (*VxlanAddDelTunnelReply, error) {
- out := new(VxlanAddDelTunnelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) VxlanOffloadRx(ctx context.Context, in *VxlanOffloadRx) (*VxlanOffloadRxReply, error) {
- out := new(VxlanOffloadRxReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) VxlanTunnelDump(ctx context.Context, in *VxlanTunnelDump) (RPCService_VxlanTunnelDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_VxlanTunnelDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_VxlanTunnelDumpClient interface {
- Recv() (*VxlanTunnelDetails, error)
- api.Stream
-}
-
-type serviceClient_VxlanTunnelDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_VxlanTunnelDumpClient) Recv() (*VxlanTunnelDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *VxlanTunnelDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
diff --git a/internal/testbinapi/binapi2001/vxlan_gbp/vxlan_gbp.ba.go b/internal/testbinapi/binapi2001/vxlan_gbp/vxlan_gbp.ba.go
deleted file mode 100644
index a28a882..0000000
--- a/internal/testbinapi/binapi2001/vxlan_gbp/vxlan_gbp.ba.go
+++ /dev/null
@@ -1,1214 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/vxlan_gbp.api.json
-
-// Package vxlan_gbp contains generated bindings for API file vxlan_gbp.api.
-//
-// Contents:
-// 6 aliases
-// 11 enums
-// 7 structs
-// 1 union
-// 6 messages
-//
-package vxlan_gbp
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the GoVPP api package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// GoVPP api package needs to be updated.
-const _ = api.GoVppAPIPackageIsVersion2
-
-const (
- APIFile = "vxlan_gbp"
- APIVersion = "1.1.1"
- VersionCrc = 0xdc218362
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IfStatusFlags defines enum 'if_status_flags'.
-type IfStatusFlags uint32
-
-const (
- IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
- IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
-)
-
-var (
- IfStatusFlags_name = map[uint32]string{
- 1: "IF_STATUS_API_FLAG_ADMIN_UP",
- 2: "IF_STATUS_API_FLAG_LINK_UP",
- }
- IfStatusFlags_value = map[string]uint32{
- "IF_STATUS_API_FLAG_ADMIN_UP": 1,
- "IF_STATUS_API_FLAG_LINK_UP": 2,
- }
-)
-
-func (x IfStatusFlags) String() string {
- s, ok := IfStatusFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := IfStatusFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// IfType defines enum 'if_type'.
-type IfType uint32
-
-const (
- IF_API_TYPE_HARDWARE IfType = 1
- IF_API_TYPE_SUB IfType = 2
- IF_API_TYPE_P2P IfType = 3
- IF_API_TYPE_PIPE IfType = 4
-)
-
-var (
- IfType_name = map[uint32]string{
- 1: "IF_API_TYPE_HARDWARE",
- 2: "IF_API_TYPE_SUB",
- 3: "IF_API_TYPE_P2P",
- 4: "IF_API_TYPE_PIPE",
- }
- IfType_value = map[string]uint32{
- "IF_API_TYPE_HARDWARE": 1,
- "IF_API_TYPE_SUB": 2,
- "IF_API_TYPE_P2P": 3,
- "IF_API_TYPE_PIPE": 4,
- }
-)
-
-func (x IfType) String() string {
- s, ok := IfType_name[uint32(x)]
- if ok {
- return s
- }
- return "IfType(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// LinkDuplex defines enum 'link_duplex'.
-type LinkDuplex uint32
-
-const (
- LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
- LINK_DUPLEX_API_HALF LinkDuplex = 1
- LINK_DUPLEX_API_FULL LinkDuplex = 2
-)
-
-var (
- LinkDuplex_name = map[uint32]string{
- 0: "LINK_DUPLEX_API_UNKNOWN",
- 1: "LINK_DUPLEX_API_HALF",
- 2: "LINK_DUPLEX_API_FULL",
- }
- LinkDuplex_value = map[string]uint32{
- "LINK_DUPLEX_API_UNKNOWN": 0,
- "LINK_DUPLEX_API_HALF": 1,
- "LINK_DUPLEX_API_FULL": 2,
- }
-)
-
-func (x LinkDuplex) String() string {
- s, ok := LinkDuplex_name[uint32(x)]
- if ok {
- return s
- }
- return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
-}
-
-// MtuProto defines enum 'mtu_proto'.
-type MtuProto uint32
-
-const (
- MTU_PROTO_API_L3 MtuProto = 1
- MTU_PROTO_API_IP4 MtuProto = 2
- MTU_PROTO_API_IP6 MtuProto = 3
- MTU_PROTO_API_MPLS MtuProto = 4
- MTU_PROTO_API_N MtuProto = 5
-)
-
-var (
- MtuProto_name = map[uint32]string{
- 1: "MTU_PROTO_API_L3",
- 2: "MTU_PROTO_API_IP4",
- 3: "MTU_PROTO_API_IP6",
- 4: "MTU_PROTO_API_MPLS",
- 5: "MTU_PROTO_API_N",
- }
- MtuProto_value = map[string]uint32{
- "MTU_PROTO_API_L3": 1,
- "MTU_PROTO_API_IP4": 2,
- "MTU_PROTO_API_IP6": 3,
- "MTU_PROTO_API_MPLS": 4,
- "MTU_PROTO_API_N": 5,
- }
-)
-
-func (x MtuProto) String() string {
- s, ok := MtuProto_name[uint32(x)]
- if ok {
- return s
- }
- return "MtuProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// RxMode defines enum 'rx_mode'.
-type RxMode uint32
-
-const (
- RX_MODE_API_UNKNOWN RxMode = 0
- RX_MODE_API_POLLING RxMode = 1
- RX_MODE_API_INTERRUPT RxMode = 2
- RX_MODE_API_ADAPTIVE RxMode = 3
- RX_MODE_API_DEFAULT RxMode = 4
-)
-
-var (
- RxMode_name = map[uint32]string{
- 0: "RX_MODE_API_UNKNOWN",
- 1: "RX_MODE_API_POLLING",
- 2: "RX_MODE_API_INTERRUPT",
- 3: "RX_MODE_API_ADAPTIVE",
- 4: "RX_MODE_API_DEFAULT",
- }
- RxMode_value = map[string]uint32{
- "RX_MODE_API_UNKNOWN": 0,
- "RX_MODE_API_POLLING": 1,
- "RX_MODE_API_INTERRUPT": 2,
- "RX_MODE_API_ADAPTIVE": 3,
- "RX_MODE_API_DEFAULT": 4,
- }
-)
-
-func (x RxMode) String() string {
- s, ok := RxMode_name[uint32(x)]
- if ok {
- return s
- }
- return "RxMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// SubIfFlags defines enum 'sub_if_flags'.
-type SubIfFlags uint32
-
-const (
- SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
- SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
- SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
- SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
- SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
- SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
- SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
- SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
- SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
- SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
-)
-
-var (
- SubIfFlags_name = map[uint32]string{
- 1: "SUB_IF_API_FLAG_NO_TAGS",
- 2: "SUB_IF_API_FLAG_ONE_TAG",
- 4: "SUB_IF_API_FLAG_TWO_TAGS",
- 8: "SUB_IF_API_FLAG_DOT1AD",
- 16: "SUB_IF_API_FLAG_EXACT_MATCH",
- 32: "SUB_IF_API_FLAG_DEFAULT",
- 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
- 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
- 254: "SUB_IF_API_FLAG_MASK_VNET",
- 256: "SUB_IF_API_FLAG_DOT1AH",
- }
- SubIfFlags_value = map[string]uint32{
- "SUB_IF_API_FLAG_NO_TAGS": 1,
- "SUB_IF_API_FLAG_ONE_TAG": 2,
- "SUB_IF_API_FLAG_TWO_TAGS": 4,
- "SUB_IF_API_FLAG_DOT1AD": 8,
- "SUB_IF_API_FLAG_EXACT_MATCH": 16,
- "SUB_IF_API_FLAG_DEFAULT": 32,
- "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
- "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
- "SUB_IF_API_FLAG_MASK_VNET": 254,
- "SUB_IF_API_FLAG_DOT1AH": 256,
- }
-)
-
-func (x SubIfFlags) String() string {
- s, ok := SubIfFlags_name[uint32(x)]
- if ok {
- return s
- }
- str := func(n uint32) string {
- s, ok := SubIfFlags_name[uint32(n)]
- if ok {
- return s
- }
- return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
- }
- for i := uint32(0); i <= 32; i++ {
- val := uint32(x)
- if val&(1<<i) != 0 {
- if s != "" {
- s += "|"
- }
- s += str(1 << i)
- }
- }
- if s == "" {
- return str(uint32(x))
- }
- return s
-}
-
-// VxlanGbpAPITunnelMode defines enum 'vxlan_gbp_api_tunnel_mode'.
-type VxlanGbpAPITunnelMode uint32
-
-const (
- VXLAN_GBP_API_TUNNEL_MODE_L2 VxlanGbpAPITunnelMode = 1
- VXLAN_GBP_API_TUNNEL_MODE_L3 VxlanGbpAPITunnelMode = 2
-)
-
-var (
- VxlanGbpAPITunnelMode_name = map[uint32]string{
- 1: "VXLAN_GBP_API_TUNNEL_MODE_L2",
- 2: "VXLAN_GBP_API_TUNNEL_MODE_L3",
- }
- VxlanGbpAPITunnelMode_value = map[string]uint32{
- "VXLAN_GBP_API_TUNNEL_MODE_L2": 1,
- "VXLAN_GBP_API_TUNNEL_MODE_L3": 2,
- }
-)
-
-func (x VxlanGbpAPITunnelMode) String() string {
- s, ok := VxlanGbpAPITunnelMode_name[uint32(x)]
- if ok {
- return s
- }
- return "VxlanGbpAPITunnelMode(" + strconv.Itoa(int(x)) + ")"
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// InterfaceIndex defines alias 'interface_index'.
-type InterfaceIndex uint32
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// VxlanGbpTunnel defines type 'vxlan_gbp_tunnel'.
-type VxlanGbpTunnel struct {
- Instance uint32 `binapi:"u32,name=instance" json:"instance,omitempty"`
- Src Address `binapi:"address,name=src" json:"src,omitempty"`
- Dst Address `binapi:"address,name=dst" json:"dst,omitempty"`
- McastSwIfIndex InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
- EncapTableID uint32 `binapi:"u32,name=encap_table_id" json:"encap_table_id,omitempty"`
- Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- Mode VxlanGbpAPITunnelMode `binapi:"vxlan_gbp_api_tunnel_mode,name=mode" json:"mode,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
-
-// SwInterfaceSetVxlanGbpBypass defines message 'sw_interface_set_vxlan_gbp_bypass'.
-type SwInterfaceSetVxlanGbpBypass struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
- IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
- Enable bool `binapi:"bool,name=enable,default=true" json:"enable,omitempty"`
-}
-
-func (m *SwInterfaceSetVxlanGbpBypass) Reset() { *m = SwInterfaceSetVxlanGbpBypass{} }
-func (*SwInterfaceSetVxlanGbpBypass) GetMessageName() string {
- return "sw_interface_set_vxlan_gbp_bypass"
-}
-func (*SwInterfaceSetVxlanGbpBypass) GetCrcString() string { return "65247409" }
-func (*SwInterfaceSetVxlanGbpBypass) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceSetVxlanGbpBypass) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.IsIPv6
- size += 1 // m.Enable
- return size
-}
-func (m *SwInterfaceSetVxlanGbpBypass) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- buf.EncodeBool(m.IsIPv6)
- buf.EncodeBool(m.Enable)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceSetVxlanGbpBypass) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.IsIPv6 = buf.DecodeBool()
- m.Enable = buf.DecodeBool()
- return nil
-}
-
-// SwInterfaceSetVxlanGbpBypassReply defines message 'sw_interface_set_vxlan_gbp_bypass_reply'.
-type SwInterfaceSetVxlanGbpBypassReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SwInterfaceSetVxlanGbpBypassReply) Reset() { *m = SwInterfaceSetVxlanGbpBypassReply{} }
-func (*SwInterfaceSetVxlanGbpBypassReply) GetMessageName() string {
- return "sw_interface_set_vxlan_gbp_bypass_reply"
-}
-func (*SwInterfaceSetVxlanGbpBypassReply) GetCrcString() string { return "e8d4e804" }
-func (*SwInterfaceSetVxlanGbpBypassReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SwInterfaceSetVxlanGbpBypassReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SwInterfaceSetVxlanGbpBypassReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceSetVxlanGbpBypassReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// VxlanGbpTunnelAddDel defines message 'vxlan_gbp_tunnel_add_del'.
-type VxlanGbpTunnelAddDel struct {
- IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
- Tunnel VxlanGbpTunnel `binapi:"vxlan_gbp_tunnel,name=tunnel" json:"tunnel,omitempty"`
-}
-
-func (m *VxlanGbpTunnelAddDel) Reset() { *m = VxlanGbpTunnelAddDel{} }
-func (*VxlanGbpTunnelAddDel) GetMessageName() string { return "vxlan_gbp_tunnel_add_del" }
-func (*VxlanGbpTunnelAddDel) GetCrcString() string { return "8c819166" }
-func (*VxlanGbpTunnelAddDel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *VxlanGbpTunnelAddDel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsAdd
- size += 4 // m.Tunnel.Instance
- size += 4 // m.Tunnel.Src.Af
- size += 1 * 16 // m.Tunnel.Src.Un
- size += 4 // m.Tunnel.Dst.Af
- size += 1 * 16 // m.Tunnel.Dst.Un
- size += 4 // m.Tunnel.McastSwIfIndex
- size += 4 // m.Tunnel.EncapTableID
- size += 4 // m.Tunnel.Vni
- size += 4 // m.Tunnel.SwIfIndex
- size += 4 // m.Tunnel.Mode
- return size
-}
-func (m *VxlanGbpTunnelAddDel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsAdd)
- buf.EncodeUint32(m.Tunnel.Instance)
- buf.EncodeUint32(uint32(m.Tunnel.Src.Af))
- buf.EncodeBytes(m.Tunnel.Src.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.Tunnel.Dst.Af))
- buf.EncodeBytes(m.Tunnel.Dst.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.Tunnel.McastSwIfIndex))
- buf.EncodeUint32(m.Tunnel.EncapTableID)
- buf.EncodeUint32(m.Tunnel.Vni)
- buf.EncodeUint32(uint32(m.Tunnel.SwIfIndex))
- buf.EncodeUint32(uint32(m.Tunnel.Mode))
- return buf.Bytes(), nil
-}
-func (m *VxlanGbpTunnelAddDel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsAdd = buf.DecodeBool()
- m.Tunnel.Instance = buf.DecodeUint32()
- m.Tunnel.Src.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Tunnel.Src.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Tunnel.Dst.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Tunnel.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Tunnel.McastSwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Tunnel.EncapTableID = buf.DecodeUint32()
- m.Tunnel.Vni = buf.DecodeUint32()
- m.Tunnel.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Tunnel.Mode = VxlanGbpAPITunnelMode(buf.DecodeUint32())
- return nil
-}
-
-// VxlanGbpTunnelAddDelReply defines message 'vxlan_gbp_tunnel_add_del_reply'.
-type VxlanGbpTunnelAddDelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *VxlanGbpTunnelAddDelReply) Reset() { *m = VxlanGbpTunnelAddDelReply{} }
-func (*VxlanGbpTunnelAddDelReply) GetMessageName() string { return "vxlan_gbp_tunnel_add_del_reply" }
-func (*VxlanGbpTunnelAddDelReply) GetCrcString() string { return "5383d31f" }
-func (*VxlanGbpTunnelAddDelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *VxlanGbpTunnelAddDelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *VxlanGbpTunnelAddDelReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- return buf.Bytes(), nil
-}
-func (m *VxlanGbpTunnelAddDelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-// VxlanGbpTunnelDetails defines message 'vxlan_gbp_tunnel_details'.
-type VxlanGbpTunnelDetails struct {
- Tunnel VxlanGbpTunnel `binapi:"vxlan_gbp_tunnel,name=tunnel" json:"tunnel,omitempty"`
-}
-
-func (m *VxlanGbpTunnelDetails) Reset() { *m = VxlanGbpTunnelDetails{} }
-func (*VxlanGbpTunnelDetails) GetMessageName() string { return "vxlan_gbp_tunnel_details" }
-func (*VxlanGbpTunnelDetails) GetCrcString() string { return "1da24016" }
-func (*VxlanGbpTunnelDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *VxlanGbpTunnelDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Tunnel.Instance
- size += 4 // m.Tunnel.Src.Af
- size += 1 * 16 // m.Tunnel.Src.Un
- size += 4 // m.Tunnel.Dst.Af
- size += 1 * 16 // m.Tunnel.Dst.Un
- size += 4 // m.Tunnel.McastSwIfIndex
- size += 4 // m.Tunnel.EncapTableID
- size += 4 // m.Tunnel.Vni
- size += 4 // m.Tunnel.SwIfIndex
- size += 4 // m.Tunnel.Mode
- return size
-}
-func (m *VxlanGbpTunnelDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.Tunnel.Instance)
- buf.EncodeUint32(uint32(m.Tunnel.Src.Af))
- buf.EncodeBytes(m.Tunnel.Src.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.Tunnel.Dst.Af))
- buf.EncodeBytes(m.Tunnel.Dst.Un.XXX_UnionData[:], 16)
- buf.EncodeUint32(uint32(m.Tunnel.McastSwIfIndex))
- buf.EncodeUint32(m.Tunnel.EncapTableID)
- buf.EncodeUint32(m.Tunnel.Vni)
- buf.EncodeUint32(uint32(m.Tunnel.SwIfIndex))
- buf.EncodeUint32(uint32(m.Tunnel.Mode))
- return buf.Bytes(), nil
-}
-func (m *VxlanGbpTunnelDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Tunnel.Instance = buf.DecodeUint32()
- m.Tunnel.Src.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Tunnel.Src.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Tunnel.Dst.Af = AddressFamily(buf.DecodeUint32())
- copy(m.Tunnel.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
- m.Tunnel.McastSwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Tunnel.EncapTableID = buf.DecodeUint32()
- m.Tunnel.Vni = buf.DecodeUint32()
- m.Tunnel.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- m.Tunnel.Mode = VxlanGbpAPITunnelMode(buf.DecodeUint32())
- return nil
-}
-
-// VxlanGbpTunnelDump defines message 'vxlan_gbp_tunnel_dump'.
-type VxlanGbpTunnelDump struct {
- SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *VxlanGbpTunnelDump) Reset() { *m = VxlanGbpTunnelDump{} }
-func (*VxlanGbpTunnelDump) GetMessageName() string { return "vxlan_gbp_tunnel_dump" }
-func (*VxlanGbpTunnelDump) GetCrcString() string { return "f9e6675e" }
-func (*VxlanGbpTunnelDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *VxlanGbpTunnelDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *VxlanGbpTunnelDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(uint32(m.SwIfIndex))
- return buf.Bytes(), nil
-}
-func (m *VxlanGbpTunnelDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
- return nil
-}
-
-func init() { file_vxlan_gbp_binapi_init() }
-func file_vxlan_gbp_binapi_init() {
- api.RegisterMessage((*SwInterfaceSetVxlanGbpBypass)(nil), "sw_interface_set_vxlan_gbp_bypass_65247409")
- api.RegisterMessage((*SwInterfaceSetVxlanGbpBypassReply)(nil), "sw_interface_set_vxlan_gbp_bypass_reply_e8d4e804")
- api.RegisterMessage((*VxlanGbpTunnelAddDel)(nil), "vxlan_gbp_tunnel_add_del_8c819166")
- api.RegisterMessage((*VxlanGbpTunnelAddDelReply)(nil), "vxlan_gbp_tunnel_add_del_reply_5383d31f")
- api.RegisterMessage((*VxlanGbpTunnelDetails)(nil), "vxlan_gbp_tunnel_details_1da24016")
- api.RegisterMessage((*VxlanGbpTunnelDump)(nil), "vxlan_gbp_tunnel_dump_f9e6675e")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*SwInterfaceSetVxlanGbpBypass)(nil),
- (*SwInterfaceSetVxlanGbpBypassReply)(nil),
- (*VxlanGbpTunnelAddDel)(nil),
- (*VxlanGbpTunnelAddDelReply)(nil),
- (*VxlanGbpTunnelDetails)(nil),
- (*VxlanGbpTunnelDump)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/vxlan_gbp/vxlan_gbp_rpc.ba.go b/internal/testbinapi/binapi2001/vxlan_gbp/vxlan_gbp_rpc.ba.go
deleted file mode 100644
index c975099..0000000
--- a/internal/testbinapi/binapi2001/vxlan_gbp/vxlan_gbp_rpc.ba.go
+++ /dev/null
@@ -1,88 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package vxlan_gbp
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service vxlan_gbp.
-type RPCService interface {
- SwInterfaceSetVxlanGbpBypass(ctx context.Context, in *SwInterfaceSetVxlanGbpBypass) (*SwInterfaceSetVxlanGbpBypassReply, error)
- VxlanGbpTunnelAddDel(ctx context.Context, in *VxlanGbpTunnelAddDel) (*VxlanGbpTunnelAddDelReply, error)
- VxlanGbpTunnelDump(ctx context.Context, in *VxlanGbpTunnelDump) (RPCService_VxlanGbpTunnelDumpClient, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) SwInterfaceSetVxlanGbpBypass(ctx context.Context, in *SwInterfaceSetVxlanGbpBypass) (*SwInterfaceSetVxlanGbpBypassReply, error) {
- out := new(SwInterfaceSetVxlanGbpBypassReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) VxlanGbpTunnelAddDel(ctx context.Context, in *VxlanGbpTunnelAddDel) (*VxlanGbpTunnelAddDelReply, error) {
- out := new(VxlanGbpTunnelAddDelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) VxlanGbpTunnelDump(ctx context.Context, in *VxlanGbpTunnelDump) (RPCService_VxlanGbpTunnelDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_VxlanGbpTunnelDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_VxlanGbpTunnelDumpClient interface {
- Recv() (*VxlanGbpTunnelDetails, error)
- api.Stream
-}
-
-type serviceClient_VxlanGbpTunnelDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_VxlanGbpTunnelDumpClient) Recv() (*VxlanGbpTunnelDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *VxlanGbpTunnelDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
diff --git a/internal/testbinapi/binapi2001/vxlan_gpe/vxlan_gpe.ba.go b/internal/testbinapi/binapi2001/vxlan_gpe/vxlan_gpe.ba.go
deleted file mode 100644
index f9c4d11..0000000
--- a/internal/testbinapi/binapi2001/vxlan_gpe/vxlan_gpe.ba.go
+++ /dev/null
@@ -1,333 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/core/vxlan_gpe.api.json
-
-// Package vxlan_gpe contains generated bindings for API file vxlan_gpe.api.
-//
-// Contents:
-// 6 messages
-//
-package vxlan_gpe
-
-import (
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the GoVPP api package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// GoVPP api package needs to be updated.
-const _ = api.GoVppAPIPackageIsVersion2
-
-const (
- APIFile = "vxlan_gpe"
- APIVersion = "1.0.0"
- VersionCrc = 0x25bfb55d
-)
-
-// SwInterfaceSetVxlanGpeBypass defines message 'sw_interface_set_vxlan_gpe_bypass'.
-type SwInterfaceSetVxlanGpeBypass struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- IsIPv6 uint8 `binapi:"u8,name=is_ipv6" json:"is_ipv6,omitempty"`
- Enable uint8 `binapi:"u8,name=enable" json:"enable,omitempty"`
-}
-
-func (m *SwInterfaceSetVxlanGpeBypass) Reset() { *m = SwInterfaceSetVxlanGpeBypass{} }
-func (*SwInterfaceSetVxlanGpeBypass) GetMessageName() string {
- return "sw_interface_set_vxlan_gpe_bypass"
-}
-func (*SwInterfaceSetVxlanGpeBypass) GetCrcString() string { return "e74ca095" }
-func (*SwInterfaceSetVxlanGpeBypass) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *SwInterfaceSetVxlanGpeBypass) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 // m.IsIPv6
- size += 1 // m.Enable
- return size
-}
-func (m *SwInterfaceSetVxlanGpeBypass) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.SwIfIndex)
- buf.EncodeUint8(m.IsIPv6)
- buf.EncodeUint8(m.Enable)
- return buf.Bytes(), nil
-}
-func (m *SwInterfaceSetVxlanGpeBypass) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = buf.DecodeUint32()
- m.IsIPv6 = buf.DecodeUint8()
- m.Enable = buf.DecodeUint8()
- return nil
-}
-
-// SwInterfaceSetVxlanGpeBypassReply defines message 'sw_interface_set_vxlan_gpe_bypass_reply'.
-type SwInterfaceSetVxlanGpeBypassReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *SwInterfaceSetVxlanGpeBypassReply) Reset() { *m = SwInterfaceSetVxlanGpeBypassReply{} }
-func (*SwInterfaceSetVxlanGpeBypassReply) GetMessageName() string {
- return "sw_interface_set_vxlan_gpe_bypass_reply"
-}
-func (*SwInterfaceSetVxlanGpeBypassReply) GetCrcString() string { return "e8d4e804" }
-func (*SwInterfaceSetVxlanGpeBypassReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *SwInterfaceSetVxlanGpeBypassReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *SwInterfaceSetVxlanGpeBypassReply) 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 *SwInterfaceSetVxlanGpeBypassReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-// VxlanGpeAddDelTunnel defines message 'vxlan_gpe_add_del_tunnel'.
-type VxlanGpeAddDelTunnel struct {
- IsIPv6 uint8 `binapi:"u8,name=is_ipv6" json:"is_ipv6,omitempty"`
- Local []byte `binapi:"u8[16],name=local" json:"local,omitempty"`
- Remote []byte `binapi:"u8[16],name=remote" json:"remote,omitempty"`
- McastSwIfIndex uint32 `binapi:"u32,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
- EncapVrfID uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
- DecapVrfID uint32 `binapi:"u32,name=decap_vrf_id" json:"decap_vrf_id,omitempty"`
- Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"`
- Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
- IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"`
-}
-
-func (m *VxlanGpeAddDelTunnel) Reset() { *m = VxlanGpeAddDelTunnel{} }
-func (*VxlanGpeAddDelTunnel) GetMessageName() string { return "vxlan_gpe_add_del_tunnel" }
-func (*VxlanGpeAddDelTunnel) GetCrcString() string { return "d15850ba" }
-func (*VxlanGpeAddDelTunnel) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *VxlanGpeAddDelTunnel) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsIPv6
- size += 1 * 16 // m.Local
- size += 1 * 16 // m.Remote
- size += 4 // m.McastSwIfIndex
- size += 4 // m.EncapVrfID
- size += 4 // m.DecapVrfID
- size += 1 // m.Protocol
- size += 4 // m.Vni
- size += 1 // m.IsAdd
- return size
-}
-func (m *VxlanGpeAddDelTunnel) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint8(m.IsIPv6)
- buf.EncodeBytes(m.Local, 16)
- buf.EncodeBytes(m.Remote, 16)
- buf.EncodeUint32(m.McastSwIfIndex)
- buf.EncodeUint32(m.EncapVrfID)
- buf.EncodeUint32(m.DecapVrfID)
- buf.EncodeUint8(m.Protocol)
- buf.EncodeUint32(m.Vni)
- buf.EncodeUint8(m.IsAdd)
- return buf.Bytes(), nil
-}
-func (m *VxlanGpeAddDelTunnel) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsIPv6 = buf.DecodeUint8()
- m.Local = make([]byte, 16)
- copy(m.Local, buf.DecodeBytes(len(m.Local)))
- m.Remote = make([]byte, 16)
- copy(m.Remote, buf.DecodeBytes(len(m.Remote)))
- m.McastSwIfIndex = buf.DecodeUint32()
- m.EncapVrfID = buf.DecodeUint32()
- m.DecapVrfID = buf.DecodeUint32()
- m.Protocol = buf.DecodeUint8()
- m.Vni = buf.DecodeUint32()
- m.IsAdd = buf.DecodeUint8()
- return nil
-}
-
-// VxlanGpeAddDelTunnelReply defines message 'vxlan_gpe_add_del_tunnel_reply'.
-type VxlanGpeAddDelTunnelReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *VxlanGpeAddDelTunnelReply) Reset() { *m = VxlanGpeAddDelTunnelReply{} }
-func (*VxlanGpeAddDelTunnelReply) GetMessageName() string { return "vxlan_gpe_add_del_tunnel_reply" }
-func (*VxlanGpeAddDelTunnelReply) GetCrcString() string { return "fda5941f" }
-func (*VxlanGpeAddDelTunnelReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *VxlanGpeAddDelTunnelReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *VxlanGpeAddDelTunnelReply) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeInt32(m.Retval)
- buf.EncodeUint32(m.SwIfIndex)
- return buf.Bytes(), nil
-}
-func (m *VxlanGpeAddDelTunnelReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- m.SwIfIndex = buf.DecodeUint32()
- return nil
-}
-
-// VxlanGpeTunnelDetails defines message 'vxlan_gpe_tunnel_details'.
-type VxlanGpeTunnelDetails struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
- Local []byte `binapi:"u8[16],name=local" json:"local,omitempty"`
- Remote []byte `binapi:"u8[16],name=remote" json:"remote,omitempty"`
- Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
- Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"`
- McastSwIfIndex uint32 `binapi:"u32,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
- EncapVrfID uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
- DecapVrfID uint32 `binapi:"u32,name=decap_vrf_id" json:"decap_vrf_id,omitempty"`
- IsIPv6 uint8 `binapi:"u8,name=is_ipv6" json:"is_ipv6,omitempty"`
-}
-
-func (m *VxlanGpeTunnelDetails) Reset() { *m = VxlanGpeTunnelDetails{} }
-func (*VxlanGpeTunnelDetails) GetMessageName() string { return "vxlan_gpe_tunnel_details" }
-func (*VxlanGpeTunnelDetails) GetCrcString() string { return "2673fbfa" }
-func (*VxlanGpeTunnelDetails) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *VxlanGpeTunnelDetails) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- size += 1 * 16 // m.Local
- size += 1 * 16 // m.Remote
- size += 4 // m.Vni
- size += 1 // m.Protocol
- size += 4 // m.McastSwIfIndex
- size += 4 // m.EncapVrfID
- size += 4 // m.DecapVrfID
- size += 1 // m.IsIPv6
- return size
-}
-func (m *VxlanGpeTunnelDetails) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.SwIfIndex)
- buf.EncodeBytes(m.Local, 16)
- buf.EncodeBytes(m.Remote, 16)
- buf.EncodeUint32(m.Vni)
- buf.EncodeUint8(m.Protocol)
- buf.EncodeUint32(m.McastSwIfIndex)
- buf.EncodeUint32(m.EncapVrfID)
- buf.EncodeUint32(m.DecapVrfID)
- buf.EncodeUint8(m.IsIPv6)
- return buf.Bytes(), nil
-}
-func (m *VxlanGpeTunnelDetails) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = buf.DecodeUint32()
- m.Local = make([]byte, 16)
- copy(m.Local, buf.DecodeBytes(len(m.Local)))
- m.Remote = make([]byte, 16)
- copy(m.Remote, buf.DecodeBytes(len(m.Remote)))
- m.Vni = buf.DecodeUint32()
- m.Protocol = buf.DecodeUint8()
- m.McastSwIfIndex = buf.DecodeUint32()
- m.EncapVrfID = buf.DecodeUint32()
- m.DecapVrfID = buf.DecodeUint32()
- m.IsIPv6 = buf.DecodeUint8()
- return nil
-}
-
-// VxlanGpeTunnelDump defines message 'vxlan_gpe_tunnel_dump'.
-type VxlanGpeTunnelDump struct {
- SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
-}
-
-func (m *VxlanGpeTunnelDump) Reset() { *m = VxlanGpeTunnelDump{} }
-func (*VxlanGpeTunnelDump) GetMessageName() string { return "vxlan_gpe_tunnel_dump" }
-func (*VxlanGpeTunnelDump) GetCrcString() string { return "529cb13f" }
-func (*VxlanGpeTunnelDump) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *VxlanGpeTunnelDump) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.SwIfIndex
- return size
-}
-func (m *VxlanGpeTunnelDump) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeUint32(m.SwIfIndex)
- return buf.Bytes(), nil
-}
-func (m *VxlanGpeTunnelDump) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.SwIfIndex = buf.DecodeUint32()
- return nil
-}
-
-func init() { file_vxlan_gpe_binapi_init() }
-func file_vxlan_gpe_binapi_init() {
- api.RegisterMessage((*SwInterfaceSetVxlanGpeBypass)(nil), "sw_interface_set_vxlan_gpe_bypass_e74ca095")
- api.RegisterMessage((*SwInterfaceSetVxlanGpeBypassReply)(nil), "sw_interface_set_vxlan_gpe_bypass_reply_e8d4e804")
- api.RegisterMessage((*VxlanGpeAddDelTunnel)(nil), "vxlan_gpe_add_del_tunnel_d15850ba")
- api.RegisterMessage((*VxlanGpeAddDelTunnelReply)(nil), "vxlan_gpe_add_del_tunnel_reply_fda5941f")
- api.RegisterMessage((*VxlanGpeTunnelDetails)(nil), "vxlan_gpe_tunnel_details_2673fbfa")
- api.RegisterMessage((*VxlanGpeTunnelDump)(nil), "vxlan_gpe_tunnel_dump_529cb13f")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*SwInterfaceSetVxlanGpeBypass)(nil),
- (*SwInterfaceSetVxlanGpeBypassReply)(nil),
- (*VxlanGpeAddDelTunnel)(nil),
- (*VxlanGpeAddDelTunnelReply)(nil),
- (*VxlanGpeTunnelDetails)(nil),
- (*VxlanGpeTunnelDump)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/vxlan_gpe/vxlan_gpe_rpc.ba.go b/internal/testbinapi/binapi2001/vxlan_gpe/vxlan_gpe_rpc.ba.go
deleted file mode 100644
index 8c3f496..0000000
--- a/internal/testbinapi/binapi2001/vxlan_gpe/vxlan_gpe_rpc.ba.go
+++ /dev/null
@@ -1,88 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package vxlan_gpe
-
-import (
- "context"
- "fmt"
- "io"
-
- api "git.fd.io/govpp.git/api"
- vpe "git.fd.io/govpp.git/internal/testbinapi/binapi2001/vpe"
-)
-
-// RPCService defines RPC service vxlan_gpe.
-type RPCService interface {
- SwInterfaceSetVxlanGpeBypass(ctx context.Context, in *SwInterfaceSetVxlanGpeBypass) (*SwInterfaceSetVxlanGpeBypassReply, error)
- VxlanGpeAddDelTunnel(ctx context.Context, in *VxlanGpeAddDelTunnel) (*VxlanGpeAddDelTunnelReply, error)
- VxlanGpeTunnelDump(ctx context.Context, in *VxlanGpeTunnelDump) (RPCService_VxlanGpeTunnelDumpClient, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) SwInterfaceSetVxlanGpeBypass(ctx context.Context, in *SwInterfaceSetVxlanGpeBypass) (*SwInterfaceSetVxlanGpeBypassReply, error) {
- out := new(SwInterfaceSetVxlanGpeBypassReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) VxlanGpeAddDelTunnel(ctx context.Context, in *VxlanGpeAddDelTunnel) (*VxlanGpeAddDelTunnelReply, error) {
- out := new(VxlanGpeAddDelTunnelReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
-
-func (c *serviceClient) VxlanGpeTunnelDump(ctx context.Context, in *VxlanGpeTunnelDump) (RPCService_VxlanGpeTunnelDumpClient, error) {
- stream, err := c.conn.NewStream(ctx)
- if err != nil {
- return nil, err
- }
- x := &serviceClient_VxlanGpeTunnelDumpClient{stream}
- if err := x.Stream.SendMsg(in); err != nil {
- return nil, err
- }
- if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil {
- return nil, err
- }
- return x, nil
-}
-
-type RPCService_VxlanGpeTunnelDumpClient interface {
- Recv() (*VxlanGpeTunnelDetails, error)
- api.Stream
-}
-
-type serviceClient_VxlanGpeTunnelDumpClient struct {
- api.Stream
-}
-
-func (c *serviceClient_VxlanGpeTunnelDumpClient) Recv() (*VxlanGpeTunnelDetails, error) {
- msg, err := c.Stream.RecvMsg()
- if err != nil {
- return nil, err
- }
- switch m := msg.(type) {
- case *VxlanGpeTunnelDetails:
- return m, nil
- case *vpe.ControlPingReply:
- err = c.Stream.Close()
- if err != nil {
- return nil, err
- }
- return nil, io.EOF
- default:
- return nil, fmt.Errorf("unexpected message: %T %v", m, m)
- }
-}
diff --git a/internal/testbinapi/binapi2001/vxlan_gpe_ioam_export/vxlan_gpe_ioam_export.ba.go b/internal/testbinapi/binapi2001/vxlan_gpe_ioam_export/vxlan_gpe_ioam_export.ba.go
deleted file mode 100644
index e9c81c1..0000000
--- a/internal/testbinapi/binapi2001/vxlan_gpe_ioam_export/vxlan_gpe_ioam_export.ba.go
+++ /dev/null
@@ -1,719 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-// versions:
-// binapi-generator: v0.5.0-dev
-// VPP: 20.01
-// source: .vppapi/plugins/vxlan_gpe_ioam_export.api.json
-
-// Package vxlan_gpe_ioam_export contains generated bindings for API file vxlan_gpe_ioam_export.api.
-//
-// Contents:
-// 5 aliases
-// 4 enums
-// 6 structs
-// 1 union
-// 2 messages
-//
-package vxlan_gpe_ioam_export
-
-import (
- "fmt"
- "net"
- "strconv"
- "strings"
-
- api "git.fd.io/govpp.git/api"
- codec "git.fd.io/govpp.git/codec"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the GoVPP api package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// GoVPP api package needs to be updated.
-const _ = api.GoVppAPIPackageIsVersion2
-
-const (
- APIFile = "vxlan_gpe_ioam_export"
- APIVersion = "1.0.0"
- VersionCrc = 0xc6fdb83f
-)
-
-// AddressFamily defines enum 'address_family'.
-type AddressFamily uint32
-
-const (
- ADDRESS_IP4 AddressFamily = 0
- ADDRESS_IP6 AddressFamily = 1
-)
-
-var (
- AddressFamily_name = map[uint32]string{
- 0: "ADDRESS_IP4",
- 1: "ADDRESS_IP6",
- }
- AddressFamily_value = map[string]uint32{
- "ADDRESS_IP4": 0,
- "ADDRESS_IP6": 1,
- }
-)
-
-func (x AddressFamily) String() string {
- s, ok := AddressFamily_name[uint32(x)]
- if ok {
- return s
- }
- return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPDscp defines enum 'ip_dscp'.
-type IPDscp uint8
-
-const (
- IP_API_DSCP_CS0 IPDscp = 0
- IP_API_DSCP_CS1 IPDscp = 8
- IP_API_DSCP_AF11 IPDscp = 10
- IP_API_DSCP_AF12 IPDscp = 12
- IP_API_DSCP_AF13 IPDscp = 14
- IP_API_DSCP_CS2 IPDscp = 16
- IP_API_DSCP_AF21 IPDscp = 18
- IP_API_DSCP_AF22 IPDscp = 20
- IP_API_DSCP_AF23 IPDscp = 22
- IP_API_DSCP_CS3 IPDscp = 24
- IP_API_DSCP_AF31 IPDscp = 26
- IP_API_DSCP_AF32 IPDscp = 28
- IP_API_DSCP_AF33 IPDscp = 30
- IP_API_DSCP_CS4 IPDscp = 32
- IP_API_DSCP_AF41 IPDscp = 34
- IP_API_DSCP_AF42 IPDscp = 36
- IP_API_DSCP_AF43 IPDscp = 38
- IP_API_DSCP_CS5 IPDscp = 40
- IP_API_DSCP_EF IPDscp = 46
- IP_API_DSCP_CS6 IPDscp = 48
- IP_API_DSCP_CS7 IPDscp = 50
-)
-
-var (
- IPDscp_name = map[uint8]string{
- 0: "IP_API_DSCP_CS0",
- 8: "IP_API_DSCP_CS1",
- 10: "IP_API_DSCP_AF11",
- 12: "IP_API_DSCP_AF12",
- 14: "IP_API_DSCP_AF13",
- 16: "IP_API_DSCP_CS2",
- 18: "IP_API_DSCP_AF21",
- 20: "IP_API_DSCP_AF22",
- 22: "IP_API_DSCP_AF23",
- 24: "IP_API_DSCP_CS3",
- 26: "IP_API_DSCP_AF31",
- 28: "IP_API_DSCP_AF32",
- 30: "IP_API_DSCP_AF33",
- 32: "IP_API_DSCP_CS4",
- 34: "IP_API_DSCP_AF41",
- 36: "IP_API_DSCP_AF42",
- 38: "IP_API_DSCP_AF43",
- 40: "IP_API_DSCP_CS5",
- 46: "IP_API_DSCP_EF",
- 48: "IP_API_DSCP_CS6",
- 50: "IP_API_DSCP_CS7",
- }
- IPDscp_value = map[string]uint8{
- "IP_API_DSCP_CS0": 0,
- "IP_API_DSCP_CS1": 8,
- "IP_API_DSCP_AF11": 10,
- "IP_API_DSCP_AF12": 12,
- "IP_API_DSCP_AF13": 14,
- "IP_API_DSCP_CS2": 16,
- "IP_API_DSCP_AF21": 18,
- "IP_API_DSCP_AF22": 20,
- "IP_API_DSCP_AF23": 22,
- "IP_API_DSCP_CS3": 24,
- "IP_API_DSCP_AF31": 26,
- "IP_API_DSCP_AF32": 28,
- "IP_API_DSCP_AF33": 30,
- "IP_API_DSCP_CS4": 32,
- "IP_API_DSCP_AF41": 34,
- "IP_API_DSCP_AF42": 36,
- "IP_API_DSCP_AF43": 38,
- "IP_API_DSCP_CS5": 40,
- "IP_API_DSCP_EF": 46,
- "IP_API_DSCP_CS6": 48,
- "IP_API_DSCP_CS7": 50,
- }
-)
-
-func (x IPDscp) String() string {
- s, ok := IPDscp_name[uint8(x)]
- if ok {
- return s
- }
- return "IPDscp(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPEcn defines enum 'ip_ecn'.
-type IPEcn uint8
-
-const (
- IP_API_ECN_NONE IPEcn = 0
- IP_API_ECN_ECT0 IPEcn = 1
- IP_API_ECN_ECT1 IPEcn = 2
- IP_API_ECN_CE IPEcn = 3
-)
-
-var (
- IPEcn_name = map[uint8]string{
- 0: "IP_API_ECN_NONE",
- 1: "IP_API_ECN_ECT0",
- 2: "IP_API_ECN_ECT1",
- 3: "IP_API_ECN_CE",
- }
- IPEcn_value = map[string]uint8{
- "IP_API_ECN_NONE": 0,
- "IP_API_ECN_ECT0": 1,
- "IP_API_ECN_ECT1": 2,
- "IP_API_ECN_CE": 3,
- }
-)
-
-func (x IPEcn) String() string {
- s, ok := IPEcn_name[uint8(x)]
- if ok {
- return s
- }
- return "IPEcn(" + strconv.Itoa(int(x)) + ")"
-}
-
-// IPProto defines enum 'ip_proto'.
-type IPProto uint32
-
-const (
- IP_API_PROTO_HOPOPT IPProto = 0
- IP_API_PROTO_ICMP IPProto = 1
- IP_API_PROTO_IGMP IPProto = 2
- IP_API_PROTO_TCP IPProto = 6
- IP_API_PROTO_UDP IPProto = 17
- IP_API_PROTO_GRE IPProto = 47
- IP_API_PROTO_AH IPProto = 50
- IP_API_PROTO_ESP IPProto = 51
- IP_API_PROTO_EIGRP IPProto = 88
- IP_API_PROTO_OSPF IPProto = 89
- IP_API_PROTO_SCTP IPProto = 132
- IP_API_PROTO_RESERVED IPProto = 255
-)
-
-var (
- IPProto_name = map[uint32]string{
- 0: "IP_API_PROTO_HOPOPT",
- 1: "IP_API_PROTO_ICMP",
- 2: "IP_API_PROTO_IGMP",
- 6: "IP_API_PROTO_TCP",
- 17: "IP_API_PROTO_UDP",
- 47: "IP_API_PROTO_GRE",
- 50: "IP_API_PROTO_AH",
- 51: "IP_API_PROTO_ESP",
- 88: "IP_API_PROTO_EIGRP",
- 89: "IP_API_PROTO_OSPF",
- 132: "IP_API_PROTO_SCTP",
- 255: "IP_API_PROTO_RESERVED",
- }
- IPProto_value = map[string]uint32{
- "IP_API_PROTO_HOPOPT": 0,
- "IP_API_PROTO_ICMP": 1,
- "IP_API_PROTO_IGMP": 2,
- "IP_API_PROTO_TCP": 6,
- "IP_API_PROTO_UDP": 17,
- "IP_API_PROTO_GRE": 47,
- "IP_API_PROTO_AH": 50,
- "IP_API_PROTO_ESP": 51,
- "IP_API_PROTO_EIGRP": 88,
- "IP_API_PROTO_OSPF": 89,
- "IP_API_PROTO_SCTP": 132,
- "IP_API_PROTO_RESERVED": 255,
- }
-)
-
-func (x IPProto) String() string {
- s, ok := IPProto_name[uint32(x)]
- if ok {
- return s
- }
- return "IPProto(" + strconv.Itoa(int(x)) + ")"
-}
-
-// AddressWithPrefix defines alias 'address_with_prefix'.
-type AddressWithPrefix Prefix
-
-func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
- prefix, err := ParsePrefix(s)
- if err != nil {
- return AddressWithPrefix{}, err
- }
- return AddressWithPrefix(prefix), nil
-}
-
-func (x AddressWithPrefix) String() string {
- return Prefix(x).String()
-}
-
-func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
- prefix, err := ParseAddressWithPrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP4Address defines alias 'ip4_address'.
-type IP4Address [4]uint8
-
-func ParseIP4Address(s string) (IP4Address, error) {
- ip := net.ParseIP(s).To4()
- if ip == nil {
- return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP4Address
- copy(ipaddr[:], ip.To4())
- return ipaddr, nil
-}
-
-func (x IP4Address) ToIP() net.IP {
- return net.IP(x[:]).To4()
-}
-
-func (x IP4Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP4Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP4Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
-type IP4AddressWithPrefix IP4Prefix
-
-// IP6Address defines alias 'ip6_address'.
-type IP6Address [16]uint8
-
-func ParseIP6Address(s string) (IP6Address, error) {
- ip := net.ParseIP(s).To16()
- if ip == nil {
- return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
- }
- var ipaddr IP6Address
- copy(ipaddr[:], ip.To16())
- return ipaddr, nil
-}
-
-func (x IP6Address) ToIP() net.IP {
- return net.IP(x[:]).To16()
-}
-
-func (x IP6Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *IP6Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Address) UnmarshalText(text []byte) error {
- ipaddr, err := ParseIP6Address(string(text))
- if err != nil {
- return err
- }
- *x = ipaddr
- return nil
-}
-
-// IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
-type IP6AddressWithPrefix IP6Prefix
-
-// Address defines type 'address'.
-type Address struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
-}
-
-func ParseAddress(s string) (Address, error) {
- ip := net.ParseIP(s)
- if ip == nil {
- return Address{}, fmt.Errorf("invalid address: %s", s)
- }
- return AddressFromIP(ip), nil
-}
-
-func AddressFromIP(ip net.IP) Address {
- var addr Address
- if ip.To4() == nil {
- addr.Af = ADDRESS_IP6
- var ip6 IP6Address
- copy(ip6[:], ip.To16())
- addr.Un.SetIP6(ip6)
- } else {
- addr.Af = ADDRESS_IP4
- var ip4 IP4Address
- copy(ip4[:], ip.To4())
- addr.Un.SetIP4(ip4)
- }
- return addr
-}
-
-func (x Address) ToIP() net.IP {
- if x.Af == ADDRESS_IP6 {
- ip6 := x.Un.GetIP6()
- return net.IP(ip6[:]).To16()
- } else {
- ip4 := x.Un.GetIP4()
- return net.IP(ip4[:]).To4()
- }
-}
-
-func (x Address) String() string {
- return x.ToIP().String()
-}
-
-func (x *Address) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Address) UnmarshalText(text []byte) error {
- addr, err := ParseAddress(string(text))
- if err != nil {
- return err
- }
- *x = addr
- return nil
-}
-
-// IP4Prefix defines type 'ip4_prefix'.
-type IP4Prefix struct {
- Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP4Address(ip.String())
- if err != nil {
- return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP4Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 32)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP4Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP4Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP4Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP4Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// IP6Prefix defines type 'ip6_prefix'.
-type IP6Prefix struct {
- Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
- hasPrefix := strings.Contains(s, "/")
- if hasPrefix {
- ip, network, err := net.ParseCIDR(s)
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- } else {
- ip := net.ParseIP(s)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if ip.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseIP6Address(ip.String())
- if err != nil {
- return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
- }
- }
- return prefix, nil
-}
-
-func (x IP6Prefix) ToIPNet() *net.IPNet {
- mask := net.CIDRMask(int(x.Len), 128)
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x IP6Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *IP6Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *IP6Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParseIP6Prefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// Mprefix defines type 'mprefix'.
-type Mprefix struct {
- Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
- GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
- GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
- SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
-}
-
-// Prefix defines type 'prefix'.
-type Prefix struct {
- Address Address `binapi:"address,name=address" json:"address,omitempty"`
- Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
-}
-
-func ParsePrefix(ip string) (prefix Prefix, err error) {
- hasPrefix := strings.Contains(ip, "/")
- if hasPrefix {
- netIP, network, err := net.ParseCIDR(ip)
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- maskSize, _ := network.Mask.Size()
- prefix.Len = byte(maskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- } else {
- netIP := net.ParseIP(ip)
- defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
- if netIP.To4() == nil {
- defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
- }
- prefix.Len = byte(defaultMaskSize)
- prefix.Address, err = ParseAddress(netIP.String())
- if err != nil {
- return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
- }
- }
- return prefix, nil
-}
-
-func (x Prefix) ToIPNet() *net.IPNet {
- var mask net.IPMask
- if x.Address.Af == ADDRESS_IP4 {
- mask = net.CIDRMask(int(x.Len), 32)
- } else {
- mask = net.CIDRMask(int(x.Len), 128)
- }
- ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
- return ipnet
-}
-
-func (x Prefix) String() string {
- ip := x.Address.String()
- return ip + "/" + strconv.Itoa(int(x.Len))
-}
-
-func (x *Prefix) MarshalText() ([]byte, error) {
- return []byte(x.String()), nil
-}
-
-func (x *Prefix) UnmarshalText(text []byte) error {
- prefix, err := ParsePrefix(string(text))
- if err != nil {
- return err
- }
- *x = prefix
- return nil
-}
-
-// PrefixMatcher defines type 'prefix_matcher'.
-type PrefixMatcher struct {
- Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
- Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
-}
-
-// AddressUnion defines union 'address_union'.
-type AddressUnion struct {
- // AddressUnion can be one of:
- // - IP4 *IP4Address
- // - IP6 *IP6Address
- XXX_UnionData [16]byte
-}
-
-func AddressUnionIP4(a IP4Address) (u AddressUnion) {
- u.SetIP4(a)
- return
-}
-func (u *AddressUnion) SetIP4(a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 4)
-}
-func (u *AddressUnion) GetIP4() (a IP4Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(4))
- return
-}
-
-func AddressUnionIP6(a IP6Address) (u AddressUnion) {
- u.SetIP6(a)
- return
-}
-func (u *AddressUnion) SetIP6(a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- buf.EncodeBytes(a[:], 16)
-}
-func (u *AddressUnion) GetIP6() (a IP6Address) {
- buf := codec.NewBuffer(u.XXX_UnionData[:])
- copy(a[:], buf.DecodeBytes(16))
- return
-}
-
-// VxlanGpeIoamExportEnableDisable defines message 'vxlan_gpe_ioam_export_enable_disable'.
-type VxlanGpeIoamExportEnableDisable struct {
- IsDisable bool `binapi:"bool,name=is_disable" json:"is_disable,omitempty"`
- CollectorAddress IP4Address `binapi:"ip4_address,name=collector_address" json:"collector_address,omitempty"`
- SrcAddress IP4Address `binapi:"ip4_address,name=src_address" json:"src_address,omitempty"`
-}
-
-func (m *VxlanGpeIoamExportEnableDisable) Reset() { *m = VxlanGpeIoamExportEnableDisable{} }
-func (*VxlanGpeIoamExportEnableDisable) GetMessageName() string {
- return "vxlan_gpe_ioam_export_enable_disable"
-}
-func (*VxlanGpeIoamExportEnableDisable) GetCrcString() string { return "e4d4ebfa" }
-func (*VxlanGpeIoamExportEnableDisable) GetMessageType() api.MessageType {
- return api.RequestMessage
-}
-
-func (m *VxlanGpeIoamExportEnableDisable) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 1 // m.IsDisable
- size += 1 * 4 // m.CollectorAddress
- size += 1 * 4 // m.SrcAddress
- return size
-}
-func (m *VxlanGpeIoamExportEnableDisable) Marshal(b []byte) ([]byte, error) {
- if b == nil {
- b = make([]byte, m.Size())
- }
- buf := codec.NewBuffer(b)
- buf.EncodeBool(m.IsDisable)
- buf.EncodeBytes(m.CollectorAddress[:], 4)
- buf.EncodeBytes(m.SrcAddress[:], 4)
- return buf.Bytes(), nil
-}
-func (m *VxlanGpeIoamExportEnableDisable) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.IsDisable = buf.DecodeBool()
- copy(m.CollectorAddress[:], buf.DecodeBytes(4))
- copy(m.SrcAddress[:], buf.DecodeBytes(4))
- return nil
-}
-
-// VxlanGpeIoamExportEnableDisableReply defines message 'vxlan_gpe_ioam_export_enable_disable_reply'.
-type VxlanGpeIoamExportEnableDisableReply struct {
- Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
-}
-
-func (m *VxlanGpeIoamExportEnableDisableReply) Reset() { *m = VxlanGpeIoamExportEnableDisableReply{} }
-func (*VxlanGpeIoamExportEnableDisableReply) GetMessageName() string {
- return "vxlan_gpe_ioam_export_enable_disable_reply"
-}
-func (*VxlanGpeIoamExportEnableDisableReply) GetCrcString() string { return "e8d4e804" }
-func (*VxlanGpeIoamExportEnableDisableReply) GetMessageType() api.MessageType {
- return api.ReplyMessage
-}
-
-func (m *VxlanGpeIoamExportEnableDisableReply) Size() (size int) {
- if m == nil {
- return 0
- }
- size += 4 // m.Retval
- return size
-}
-func (m *VxlanGpeIoamExportEnableDisableReply) 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 *VxlanGpeIoamExportEnableDisableReply) Unmarshal(b []byte) error {
- buf := codec.NewBuffer(b)
- m.Retval = buf.DecodeInt32()
- return nil
-}
-
-func init() { file_vxlan_gpe_ioam_export_binapi_init() }
-func file_vxlan_gpe_ioam_export_binapi_init() {
- api.RegisterMessage((*VxlanGpeIoamExportEnableDisable)(nil), "vxlan_gpe_ioam_export_enable_disable_e4d4ebfa")
- api.RegisterMessage((*VxlanGpeIoamExportEnableDisableReply)(nil), "vxlan_gpe_ioam_export_enable_disable_reply_e8d4e804")
-}
-
-// Messages returns list of all messages in this module.
-func AllMessages() []api.Message {
- return []api.Message{
- (*VxlanGpeIoamExportEnableDisable)(nil),
- (*VxlanGpeIoamExportEnableDisableReply)(nil),
- }
-}
diff --git a/internal/testbinapi/binapi2001/vxlan_gpe_ioam_export/vxlan_gpe_ioam_export_rpc.ba.go b/internal/testbinapi/binapi2001/vxlan_gpe_ioam_export/vxlan_gpe_ioam_export_rpc.ba.go
deleted file mode 100644
index f688803..0000000
--- a/internal/testbinapi/binapi2001/vxlan_gpe_ioam_export/vxlan_gpe_ioam_export_rpc.ba.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
-
-package vxlan_gpe_ioam_export
-
-import (
- "context"
-
- api "git.fd.io/govpp.git/api"
-)
-
-// RPCService defines RPC service vxlan_gpe_ioam_export.
-type RPCService interface {
- VxlanGpeIoamExportEnableDisable(ctx context.Context, in *VxlanGpeIoamExportEnableDisable) (*VxlanGpeIoamExportEnableDisableReply, error)
-}
-
-type serviceClient struct {
- conn api.Connection
-}
-
-func NewServiceClient(conn api.Connection) RPCService {
- return &serviceClient{conn}
-}
-
-func (c *serviceClient) VxlanGpeIoamExportEnableDisable(ctx context.Context, in *VxlanGpeIoamExportEnableDisable) (*VxlanGpeIoamExportEnableDisableReply, error) {
- out := new(VxlanGpeIoamExportEnableDisableReply)
- err := c.conn.Invoke(ctx, in, out)
- if err != nil {
- return nil, err
- }
- return out, api.RetvalToVPPApiError(out.Retval)
-}
diff --git a/internal/version/version.go b/version/version.go
index 9cfbdf6..9cfbdf6 100644
--- a/internal/version/version.go
+++ b/version/version.go