1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0
4 // VPP: 20.05.1-release
5 // source: /usr/share/vpp/api/core/vxlan_gbp.api.json
7 // Package vxlan_gbp contains generated bindings for API file vxlan_gbp.api.
19 api "git.fd.io/govpp.git/api"
20 interface_types "git.fd.io/govpp.git/binapi/interface_types"
21 ip_types "git.fd.io/govpp.git/binapi/ip_types"
22 codec "git.fd.io/govpp.git/codec"
25 // This is a compile-time assertion to ensure that this generated file
26 // is compatible with the GoVPP api package it is being compiled against.
27 // A compilation error at this line likely means your copy of the
28 // GoVPP api package needs to be updated.
29 const _ = api.GoVppAPIPackageIsVersion2
34 VersionCrc = 0xfa8aff54
37 // VxlanGbpAPITunnelMode defines enum 'vxlan_gbp_api_tunnel_mode'.
38 type VxlanGbpAPITunnelMode uint32
41 VXLAN_GBP_API_TUNNEL_MODE_L2 VxlanGbpAPITunnelMode = 1
42 VXLAN_GBP_API_TUNNEL_MODE_L3 VxlanGbpAPITunnelMode = 2
46 VxlanGbpAPITunnelMode_name = map[uint32]string{
47 1: "VXLAN_GBP_API_TUNNEL_MODE_L2",
48 2: "VXLAN_GBP_API_TUNNEL_MODE_L3",
50 VxlanGbpAPITunnelMode_value = map[string]uint32{
51 "VXLAN_GBP_API_TUNNEL_MODE_L2": 1,
52 "VXLAN_GBP_API_TUNNEL_MODE_L3": 2,
56 func (x VxlanGbpAPITunnelMode) String() string {
57 s, ok := VxlanGbpAPITunnelMode_name[uint32(x)]
61 return "VxlanGbpAPITunnelMode(" + strconv.Itoa(int(x)) + ")"
64 // VxlanGbpTunnel defines type 'vxlan_gbp_tunnel'.
65 type VxlanGbpTunnel struct {
66 Instance uint32 `binapi:"u32,name=instance" json:"instance,omitempty"`
67 Src ip_types.Address `binapi:"address,name=src" json:"src,omitempty"`
68 Dst ip_types.Address `binapi:"address,name=dst" json:"dst,omitempty"`
69 McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
70 EncapTableID uint32 `binapi:"u32,name=encap_table_id" json:"encap_table_id,omitempty"`
71 Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
72 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
73 Mode VxlanGbpAPITunnelMode `binapi:"vxlan_gbp_api_tunnel_mode,name=mode" json:"mode,omitempty"`
76 // SwInterfaceSetVxlanGbpBypass defines message 'sw_interface_set_vxlan_gbp_bypass'.
77 type SwInterfaceSetVxlanGbpBypass struct {
78 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
79 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
80 Enable bool `binapi:"bool,name=enable,default=true" json:"enable,omitempty"`
83 func (m *SwInterfaceSetVxlanGbpBypass) Reset() { *m = SwInterfaceSetVxlanGbpBypass{} }
84 func (*SwInterfaceSetVxlanGbpBypass) GetMessageName() string {
85 return "sw_interface_set_vxlan_gbp_bypass"
87 func (*SwInterfaceSetVxlanGbpBypass) GetCrcString() string { return "65247409" }
88 func (*SwInterfaceSetVxlanGbpBypass) GetMessageType() api.MessageType {
89 return api.RequestMessage
92 func (m *SwInterfaceSetVxlanGbpBypass) Size() (size int) {
96 size += 4 // m.SwIfIndex
101 func (m *SwInterfaceSetVxlanGbpBypass) Marshal(b []byte) ([]byte, error) {
103 b = make([]byte, m.Size())
105 buf := codec.NewBuffer(b)
106 buf.EncodeUint32(uint32(m.SwIfIndex))
107 buf.EncodeBool(m.IsIPv6)
108 buf.EncodeBool(m.Enable)
109 return buf.Bytes(), nil
111 func (m *SwInterfaceSetVxlanGbpBypass) Unmarshal(b []byte) error {
112 buf := codec.NewBuffer(b)
113 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
114 m.IsIPv6 = buf.DecodeBool()
115 m.Enable = buf.DecodeBool()
119 // SwInterfaceSetVxlanGbpBypassReply defines message 'sw_interface_set_vxlan_gbp_bypass_reply'.
120 type SwInterfaceSetVxlanGbpBypassReply struct {
121 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
124 func (m *SwInterfaceSetVxlanGbpBypassReply) Reset() { *m = SwInterfaceSetVxlanGbpBypassReply{} }
125 func (*SwInterfaceSetVxlanGbpBypassReply) GetMessageName() string {
126 return "sw_interface_set_vxlan_gbp_bypass_reply"
128 func (*SwInterfaceSetVxlanGbpBypassReply) GetCrcString() string { return "e8d4e804" }
129 func (*SwInterfaceSetVxlanGbpBypassReply) GetMessageType() api.MessageType {
130 return api.ReplyMessage
133 func (m *SwInterfaceSetVxlanGbpBypassReply) Size() (size int) {
137 size += 4 // m.Retval
140 func (m *SwInterfaceSetVxlanGbpBypassReply) Marshal(b []byte) ([]byte, error) {
142 b = make([]byte, m.Size())
144 buf := codec.NewBuffer(b)
145 buf.EncodeInt32(m.Retval)
146 return buf.Bytes(), nil
148 func (m *SwInterfaceSetVxlanGbpBypassReply) Unmarshal(b []byte) error {
149 buf := codec.NewBuffer(b)
150 m.Retval = buf.DecodeInt32()
154 // VxlanGbpTunnelAddDel defines message 'vxlan_gbp_tunnel_add_del'.
155 type VxlanGbpTunnelAddDel struct {
156 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
157 Tunnel VxlanGbpTunnel `binapi:"vxlan_gbp_tunnel,name=tunnel" json:"tunnel,omitempty"`
160 func (m *VxlanGbpTunnelAddDel) Reset() { *m = VxlanGbpTunnelAddDel{} }
161 func (*VxlanGbpTunnelAddDel) GetMessageName() string { return "vxlan_gbp_tunnel_add_del" }
162 func (*VxlanGbpTunnelAddDel) GetCrcString() string { return "8c819166" }
163 func (*VxlanGbpTunnelAddDel) GetMessageType() api.MessageType {
164 return api.RequestMessage
167 func (m *VxlanGbpTunnelAddDel) Size() (size int) {
172 size += 4 // m.Tunnel.Instance
173 size += 1 // m.Tunnel.Src.Af
174 size += 1 * 16 // m.Tunnel.Src.Un
175 size += 1 // m.Tunnel.Dst.Af
176 size += 1 * 16 // m.Tunnel.Dst.Un
177 size += 4 // m.Tunnel.McastSwIfIndex
178 size += 4 // m.Tunnel.EncapTableID
179 size += 4 // m.Tunnel.Vni
180 size += 4 // m.Tunnel.SwIfIndex
181 size += 4 // m.Tunnel.Mode
184 func (m *VxlanGbpTunnelAddDel) Marshal(b []byte) ([]byte, error) {
186 b = make([]byte, m.Size())
188 buf := codec.NewBuffer(b)
189 buf.EncodeBool(m.IsAdd)
190 buf.EncodeUint32(m.Tunnel.Instance)
191 buf.EncodeUint8(uint8(m.Tunnel.Src.Af))
192 buf.EncodeBytes(m.Tunnel.Src.Un.XXX_UnionData[:], 16)
193 buf.EncodeUint8(uint8(m.Tunnel.Dst.Af))
194 buf.EncodeBytes(m.Tunnel.Dst.Un.XXX_UnionData[:], 16)
195 buf.EncodeUint32(uint32(m.Tunnel.McastSwIfIndex))
196 buf.EncodeUint32(m.Tunnel.EncapTableID)
197 buf.EncodeUint32(m.Tunnel.Vni)
198 buf.EncodeUint32(uint32(m.Tunnel.SwIfIndex))
199 buf.EncodeUint32(uint32(m.Tunnel.Mode))
200 return buf.Bytes(), nil
202 func (m *VxlanGbpTunnelAddDel) Unmarshal(b []byte) error {
203 buf := codec.NewBuffer(b)
204 m.IsAdd = buf.DecodeBool()
205 m.Tunnel.Instance = buf.DecodeUint32()
206 m.Tunnel.Src.Af = ip_types.AddressFamily(buf.DecodeUint8())
207 copy(m.Tunnel.Src.Un.XXX_UnionData[:], buf.DecodeBytes(16))
208 m.Tunnel.Dst.Af = ip_types.AddressFamily(buf.DecodeUint8())
209 copy(m.Tunnel.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
210 m.Tunnel.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
211 m.Tunnel.EncapTableID = buf.DecodeUint32()
212 m.Tunnel.Vni = buf.DecodeUint32()
213 m.Tunnel.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
214 m.Tunnel.Mode = VxlanGbpAPITunnelMode(buf.DecodeUint32())
218 // VxlanGbpTunnelAddDelReply defines message 'vxlan_gbp_tunnel_add_del_reply'.
219 type VxlanGbpTunnelAddDelReply struct {
220 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
221 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
224 func (m *VxlanGbpTunnelAddDelReply) Reset() { *m = VxlanGbpTunnelAddDelReply{} }
225 func (*VxlanGbpTunnelAddDelReply) GetMessageName() string { return "vxlan_gbp_tunnel_add_del_reply" }
226 func (*VxlanGbpTunnelAddDelReply) GetCrcString() string { return "5383d31f" }
227 func (*VxlanGbpTunnelAddDelReply) GetMessageType() api.MessageType {
228 return api.ReplyMessage
231 func (m *VxlanGbpTunnelAddDelReply) Size() (size int) {
235 size += 4 // m.Retval
236 size += 4 // m.SwIfIndex
239 func (m *VxlanGbpTunnelAddDelReply) Marshal(b []byte) ([]byte, error) {
241 b = make([]byte, m.Size())
243 buf := codec.NewBuffer(b)
244 buf.EncodeInt32(m.Retval)
245 buf.EncodeUint32(uint32(m.SwIfIndex))
246 return buf.Bytes(), nil
248 func (m *VxlanGbpTunnelAddDelReply) Unmarshal(b []byte) error {
249 buf := codec.NewBuffer(b)
250 m.Retval = buf.DecodeInt32()
251 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
255 // VxlanGbpTunnelDetails defines message 'vxlan_gbp_tunnel_details'.
256 type VxlanGbpTunnelDetails struct {
257 Tunnel VxlanGbpTunnel `binapi:"vxlan_gbp_tunnel,name=tunnel" json:"tunnel,omitempty"`
260 func (m *VxlanGbpTunnelDetails) Reset() { *m = VxlanGbpTunnelDetails{} }
261 func (*VxlanGbpTunnelDetails) GetMessageName() string { return "vxlan_gbp_tunnel_details" }
262 func (*VxlanGbpTunnelDetails) GetCrcString() string { return "1da24016" }
263 func (*VxlanGbpTunnelDetails) GetMessageType() api.MessageType {
264 return api.ReplyMessage
267 func (m *VxlanGbpTunnelDetails) Size() (size int) {
271 size += 4 // m.Tunnel.Instance
272 size += 1 // m.Tunnel.Src.Af
273 size += 1 * 16 // m.Tunnel.Src.Un
274 size += 1 // m.Tunnel.Dst.Af
275 size += 1 * 16 // m.Tunnel.Dst.Un
276 size += 4 // m.Tunnel.McastSwIfIndex
277 size += 4 // m.Tunnel.EncapTableID
278 size += 4 // m.Tunnel.Vni
279 size += 4 // m.Tunnel.SwIfIndex
280 size += 4 // m.Tunnel.Mode
283 func (m *VxlanGbpTunnelDetails) Marshal(b []byte) ([]byte, error) {
285 b = make([]byte, m.Size())
287 buf := codec.NewBuffer(b)
288 buf.EncodeUint32(m.Tunnel.Instance)
289 buf.EncodeUint8(uint8(m.Tunnel.Src.Af))
290 buf.EncodeBytes(m.Tunnel.Src.Un.XXX_UnionData[:], 16)
291 buf.EncodeUint8(uint8(m.Tunnel.Dst.Af))
292 buf.EncodeBytes(m.Tunnel.Dst.Un.XXX_UnionData[:], 16)
293 buf.EncodeUint32(uint32(m.Tunnel.McastSwIfIndex))
294 buf.EncodeUint32(m.Tunnel.EncapTableID)
295 buf.EncodeUint32(m.Tunnel.Vni)
296 buf.EncodeUint32(uint32(m.Tunnel.SwIfIndex))
297 buf.EncodeUint32(uint32(m.Tunnel.Mode))
298 return buf.Bytes(), nil
300 func (m *VxlanGbpTunnelDetails) Unmarshal(b []byte) error {
301 buf := codec.NewBuffer(b)
302 m.Tunnel.Instance = buf.DecodeUint32()
303 m.Tunnel.Src.Af = ip_types.AddressFamily(buf.DecodeUint8())
304 copy(m.Tunnel.Src.Un.XXX_UnionData[:], buf.DecodeBytes(16))
305 m.Tunnel.Dst.Af = ip_types.AddressFamily(buf.DecodeUint8())
306 copy(m.Tunnel.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
307 m.Tunnel.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
308 m.Tunnel.EncapTableID = buf.DecodeUint32()
309 m.Tunnel.Vni = buf.DecodeUint32()
310 m.Tunnel.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
311 m.Tunnel.Mode = VxlanGbpAPITunnelMode(buf.DecodeUint32())
315 // VxlanGbpTunnelDump defines message 'vxlan_gbp_tunnel_dump'.
316 type VxlanGbpTunnelDump struct {
317 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
320 func (m *VxlanGbpTunnelDump) Reset() { *m = VxlanGbpTunnelDump{} }
321 func (*VxlanGbpTunnelDump) GetMessageName() string { return "vxlan_gbp_tunnel_dump" }
322 func (*VxlanGbpTunnelDump) GetCrcString() string { return "f9e6675e" }
323 func (*VxlanGbpTunnelDump) GetMessageType() api.MessageType {
324 return api.RequestMessage
327 func (m *VxlanGbpTunnelDump) Size() (size int) {
331 size += 4 // m.SwIfIndex
334 func (m *VxlanGbpTunnelDump) Marshal(b []byte) ([]byte, error) {
336 b = make([]byte, m.Size())
338 buf := codec.NewBuffer(b)
339 buf.EncodeUint32(uint32(m.SwIfIndex))
340 return buf.Bytes(), nil
342 func (m *VxlanGbpTunnelDump) Unmarshal(b []byte) error {
343 buf := codec.NewBuffer(b)
344 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
348 func init() { file_vxlan_gbp_binapi_init() }
349 func file_vxlan_gbp_binapi_init() {
350 api.RegisterMessage((*SwInterfaceSetVxlanGbpBypass)(nil), "sw_interface_set_vxlan_gbp_bypass_65247409")
351 api.RegisterMessage((*SwInterfaceSetVxlanGbpBypassReply)(nil), "sw_interface_set_vxlan_gbp_bypass_reply_e8d4e804")
352 api.RegisterMessage((*VxlanGbpTunnelAddDel)(nil), "vxlan_gbp_tunnel_add_del_8c819166")
353 api.RegisterMessage((*VxlanGbpTunnelAddDelReply)(nil), "vxlan_gbp_tunnel_add_del_reply_5383d31f")
354 api.RegisterMessage((*VxlanGbpTunnelDetails)(nil), "vxlan_gbp_tunnel_details_1da24016")
355 api.RegisterMessage((*VxlanGbpTunnelDump)(nil), "vxlan_gbp_tunnel_dump_f9e6675e")
358 // Messages returns list of all messages in this module.
359 func AllMessages() []api.Message {
360 return []api.Message{
361 (*SwInterfaceSetVxlanGbpBypass)(nil),
362 (*SwInterfaceSetVxlanGbpBypassReply)(nil),
363 (*VxlanGbpTunnelAddDel)(nil),
364 (*VxlanGbpTunnelAddDelReply)(nil),
365 (*VxlanGbpTunnelDetails)(nil),
366 (*VxlanGbpTunnelDump)(nil),