X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=internal%2Ftestbinapi%2Fbinapi2001%2Fl2%2Fl2.ba.go;fp=internal%2Ftestbinapi%2Fbinapi2001%2Fl2%2Fl2.ba.go;h=d4af668a0d5f570d08bc0cc9e6c12843f29993cc;hb=58da9ac6e691a8c660eb8ca838a154e11da0db68;hp=0000000000000000000000000000000000000000;hpb=a155cd438c6558da266c1c5931361ea088b35653;p=govpp.git diff --git a/internal/testbinapi/binapi2001/l2/l2.ba.go b/internal/testbinapi/binapi2001/l2/l2.ba.go new file mode 100644 index 0000000..d4af668 --- /dev/null +++ b/internal/testbinapi/binapi2001/l2/l2.ba.go @@ -0,0 +1,3250 @@ +// Code generated by GoVPP's binapi-generator. DO NOT EDIT. +// versions: +// binapi-generator: v0.4.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" + api "git.fd.io/govpp.git/api" + codec "git.fd.io/govpp.git/codec" + "net" + "strconv" + "strings" +) + +// 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<