1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
5 // source: /usr/share/vpp/api/core/vxlan.api.json
7 // Package vxlan contains generated bindings for API file vxlan.api.
15 api "git.fd.io/govpp.git/api"
16 interface_types "git.fd.io/govpp.git/binapi/interface_types"
17 ip_types "git.fd.io/govpp.git/binapi/ip_types"
18 codec "git.fd.io/govpp.git/codec"
21 // This is a compile-time assertion to ensure that this generated file
22 // is compatible with the GoVPP api package it is being compiled against.
23 // A compilation error at this line likely means your copy of the
24 // GoVPP api package needs to be updated.
25 const _ = api.GoVppAPIPackageIsVersion2
30 VersionCrc = 0xf11ad29f
33 // SwInterfaceSetVxlanBypass defines message 'sw_interface_set_vxlan_bypass'.
34 type SwInterfaceSetVxlanBypass struct {
35 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
36 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
37 Enable bool `binapi:"bool,name=enable,default=true" json:"enable,omitempty"`
40 func (m *SwInterfaceSetVxlanBypass) Reset() { *m = SwInterfaceSetVxlanBypass{} }
41 func (*SwInterfaceSetVxlanBypass) GetMessageName() string { return "sw_interface_set_vxlan_bypass" }
42 func (*SwInterfaceSetVxlanBypass) GetCrcString() string { return "65247409" }
43 func (*SwInterfaceSetVxlanBypass) GetMessageType() api.MessageType {
44 return api.RequestMessage
47 func (m *SwInterfaceSetVxlanBypass) Size() int {
52 size += 4 // m.SwIfIndex
57 func (m *SwInterfaceSetVxlanBypass) Marshal(b []byte) ([]byte, error) {
60 buf = codec.NewBuffer(make([]byte, m.Size()))
62 buf = codec.NewBuffer(b)
64 buf.EncodeUint32(uint32(m.SwIfIndex))
65 buf.EncodeBool(m.IsIPv6)
66 buf.EncodeBool(m.Enable)
67 return buf.Bytes(), nil
69 func (m *SwInterfaceSetVxlanBypass) Unmarshal(b []byte) error {
70 buf := codec.NewBuffer(b)
71 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
72 m.IsIPv6 = buf.DecodeBool()
73 m.Enable = buf.DecodeBool()
77 // SwInterfaceSetVxlanBypassReply defines message 'sw_interface_set_vxlan_bypass_reply'.
78 type SwInterfaceSetVxlanBypassReply struct {
79 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
82 func (m *SwInterfaceSetVxlanBypassReply) Reset() { *m = SwInterfaceSetVxlanBypassReply{} }
83 func (*SwInterfaceSetVxlanBypassReply) GetMessageName() string {
84 return "sw_interface_set_vxlan_bypass_reply"
86 func (*SwInterfaceSetVxlanBypassReply) GetCrcString() string { return "e8d4e804" }
87 func (*SwInterfaceSetVxlanBypassReply) GetMessageType() api.MessageType {
88 return api.ReplyMessage
91 func (m *SwInterfaceSetVxlanBypassReply) Size() int {
99 func (m *SwInterfaceSetVxlanBypassReply) Marshal(b []byte) ([]byte, error) {
100 var buf *codec.Buffer
102 buf = codec.NewBuffer(make([]byte, m.Size()))
104 buf = codec.NewBuffer(b)
106 buf.EncodeUint32(uint32(m.Retval))
107 return buf.Bytes(), nil
109 func (m *SwInterfaceSetVxlanBypassReply) Unmarshal(b []byte) error {
110 buf := codec.NewBuffer(b)
111 m.Retval = int32(buf.DecodeUint32())
115 // VxlanAddDelTunnel defines message 'vxlan_add_del_tunnel'.
116 type VxlanAddDelTunnel struct {
117 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
118 Instance uint32 `binapi:"u32,name=instance" json:"instance,omitempty"`
119 SrcAddress ip_types.Address `binapi:"address,name=src_address" json:"src_address,omitempty"`
120 DstAddress ip_types.Address `binapi:"address,name=dst_address" json:"dst_address,omitempty"`
121 McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
122 EncapVrfID uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
123 DecapNextIndex uint32 `binapi:"u32,name=decap_next_index" json:"decap_next_index,omitempty"`
124 Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
127 func (m *VxlanAddDelTunnel) Reset() { *m = VxlanAddDelTunnel{} }
128 func (*VxlanAddDelTunnel) GetMessageName() string { return "vxlan_add_del_tunnel" }
129 func (*VxlanAddDelTunnel) GetCrcString() string { return "a35dc8f5" }
130 func (*VxlanAddDelTunnel) GetMessageType() api.MessageType {
131 return api.RequestMessage
134 func (m *VxlanAddDelTunnel) Size() int {
140 size += 4 // m.Instance
141 size += 1 // m.SrcAddress.Af
142 size += 1 * 16 // m.SrcAddress.Un
143 size += 1 // m.DstAddress.Af
144 size += 1 * 16 // m.DstAddress.Un
145 size += 4 // m.McastSwIfIndex
146 size += 4 // m.EncapVrfID
147 size += 4 // m.DecapNextIndex
151 func (m *VxlanAddDelTunnel) Marshal(b []byte) ([]byte, error) {
152 var buf *codec.Buffer
154 buf = codec.NewBuffer(make([]byte, m.Size()))
156 buf = codec.NewBuffer(b)
158 buf.EncodeBool(m.IsAdd)
159 buf.EncodeUint32(uint32(m.Instance))
160 buf.EncodeUint8(uint8(m.SrcAddress.Af))
161 buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 0)
162 buf.EncodeUint8(uint8(m.DstAddress.Af))
163 buf.EncodeBytes(m.DstAddress.Un.XXX_UnionData[:], 0)
164 buf.EncodeUint32(uint32(m.McastSwIfIndex))
165 buf.EncodeUint32(uint32(m.EncapVrfID))
166 buf.EncodeUint32(uint32(m.DecapNextIndex))
167 buf.EncodeUint32(uint32(m.Vni))
168 return buf.Bytes(), nil
170 func (m *VxlanAddDelTunnel) Unmarshal(b []byte) error {
171 buf := codec.NewBuffer(b)
172 m.IsAdd = buf.DecodeBool()
173 m.Instance = buf.DecodeUint32()
174 m.SrcAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
175 copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
176 m.DstAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
177 copy(m.DstAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
178 m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
179 m.EncapVrfID = buf.DecodeUint32()
180 m.DecapNextIndex = buf.DecodeUint32()
181 m.Vni = buf.DecodeUint32()
185 // VxlanAddDelTunnelReply defines message 'vxlan_add_del_tunnel_reply'.
186 type VxlanAddDelTunnelReply struct {
187 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
188 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
191 func (m *VxlanAddDelTunnelReply) Reset() { *m = VxlanAddDelTunnelReply{} }
192 func (*VxlanAddDelTunnelReply) GetMessageName() string { return "vxlan_add_del_tunnel_reply" }
193 func (*VxlanAddDelTunnelReply) GetCrcString() string { return "5383d31f" }
194 func (*VxlanAddDelTunnelReply) GetMessageType() api.MessageType {
195 return api.ReplyMessage
198 func (m *VxlanAddDelTunnelReply) Size() int {
203 size += 4 // m.Retval
204 size += 4 // m.SwIfIndex
207 func (m *VxlanAddDelTunnelReply) Marshal(b []byte) ([]byte, error) {
208 var buf *codec.Buffer
210 buf = codec.NewBuffer(make([]byte, m.Size()))
212 buf = codec.NewBuffer(b)
214 buf.EncodeUint32(uint32(m.Retval))
215 buf.EncodeUint32(uint32(m.SwIfIndex))
216 return buf.Bytes(), nil
218 func (m *VxlanAddDelTunnelReply) Unmarshal(b []byte) error {
219 buf := codec.NewBuffer(b)
220 m.Retval = int32(buf.DecodeUint32())
221 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
225 // VxlanOffloadRx defines message 'vxlan_offload_rx'.
226 type VxlanOffloadRx struct {
227 HwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=hw_if_index" json:"hw_if_index,omitempty"`
228 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
229 Enable bool `binapi:"bool,name=enable,default=true" json:"enable,omitempty"`
232 func (m *VxlanOffloadRx) Reset() { *m = VxlanOffloadRx{} }
233 func (*VxlanOffloadRx) GetMessageName() string { return "vxlan_offload_rx" }
234 func (*VxlanOffloadRx) GetCrcString() string { return "89a1564b" }
235 func (*VxlanOffloadRx) GetMessageType() api.MessageType {
236 return api.RequestMessage
239 func (m *VxlanOffloadRx) Size() int {
244 size += 4 // m.HwIfIndex
245 size += 4 // m.SwIfIndex
246 size += 1 // m.Enable
249 func (m *VxlanOffloadRx) Marshal(b []byte) ([]byte, error) {
250 var buf *codec.Buffer
252 buf = codec.NewBuffer(make([]byte, m.Size()))
254 buf = codec.NewBuffer(b)
256 buf.EncodeUint32(uint32(m.HwIfIndex))
257 buf.EncodeUint32(uint32(m.SwIfIndex))
258 buf.EncodeBool(m.Enable)
259 return buf.Bytes(), nil
261 func (m *VxlanOffloadRx) Unmarshal(b []byte) error {
262 buf := codec.NewBuffer(b)
263 m.HwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
264 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
265 m.Enable = buf.DecodeBool()
269 // VxlanOffloadRxReply defines message 'vxlan_offload_rx_reply'.
270 type VxlanOffloadRxReply struct {
271 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
274 func (m *VxlanOffloadRxReply) Reset() { *m = VxlanOffloadRxReply{} }
275 func (*VxlanOffloadRxReply) GetMessageName() string { return "vxlan_offload_rx_reply" }
276 func (*VxlanOffloadRxReply) GetCrcString() string { return "e8d4e804" }
277 func (*VxlanOffloadRxReply) GetMessageType() api.MessageType {
278 return api.ReplyMessage
281 func (m *VxlanOffloadRxReply) Size() int {
286 size += 4 // m.Retval
289 func (m *VxlanOffloadRxReply) Marshal(b []byte) ([]byte, error) {
290 var buf *codec.Buffer
292 buf = codec.NewBuffer(make([]byte, m.Size()))
294 buf = codec.NewBuffer(b)
296 buf.EncodeUint32(uint32(m.Retval))
297 return buf.Bytes(), nil
299 func (m *VxlanOffloadRxReply) Unmarshal(b []byte) error {
300 buf := codec.NewBuffer(b)
301 m.Retval = int32(buf.DecodeUint32())
305 // VxlanTunnelDetails defines message 'vxlan_tunnel_details'.
306 type VxlanTunnelDetails struct {
307 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
308 Instance uint32 `binapi:"u32,name=instance" json:"instance,omitempty"`
309 SrcAddress ip_types.Address `binapi:"address,name=src_address" json:"src_address,omitempty"`
310 DstAddress ip_types.Address `binapi:"address,name=dst_address" json:"dst_address,omitempty"`
311 McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
312 EncapVrfID uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
313 DecapNextIndex uint32 `binapi:"u32,name=decap_next_index" json:"decap_next_index,omitempty"`
314 Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
317 func (m *VxlanTunnelDetails) Reset() { *m = VxlanTunnelDetails{} }
318 func (*VxlanTunnelDetails) GetMessageName() string { return "vxlan_tunnel_details" }
319 func (*VxlanTunnelDetails) GetCrcString() string { return "e782f70f" }
320 func (*VxlanTunnelDetails) GetMessageType() api.MessageType {
321 return api.ReplyMessage
324 func (m *VxlanTunnelDetails) Size() int {
329 size += 4 // m.SwIfIndex
330 size += 4 // m.Instance
331 size += 1 // m.SrcAddress.Af
332 size += 1 * 16 // m.SrcAddress.Un
333 size += 1 // m.DstAddress.Af
334 size += 1 * 16 // m.DstAddress.Un
335 size += 4 // m.McastSwIfIndex
336 size += 4 // m.EncapVrfID
337 size += 4 // m.DecapNextIndex
341 func (m *VxlanTunnelDetails) Marshal(b []byte) ([]byte, error) {
342 var buf *codec.Buffer
344 buf = codec.NewBuffer(make([]byte, m.Size()))
346 buf = codec.NewBuffer(b)
348 buf.EncodeUint32(uint32(m.SwIfIndex))
349 buf.EncodeUint32(uint32(m.Instance))
350 buf.EncodeUint8(uint8(m.SrcAddress.Af))
351 buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 0)
352 buf.EncodeUint8(uint8(m.DstAddress.Af))
353 buf.EncodeBytes(m.DstAddress.Un.XXX_UnionData[:], 0)
354 buf.EncodeUint32(uint32(m.McastSwIfIndex))
355 buf.EncodeUint32(uint32(m.EncapVrfID))
356 buf.EncodeUint32(uint32(m.DecapNextIndex))
357 buf.EncodeUint32(uint32(m.Vni))
358 return buf.Bytes(), nil
360 func (m *VxlanTunnelDetails) Unmarshal(b []byte) error {
361 buf := codec.NewBuffer(b)
362 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
363 m.Instance = buf.DecodeUint32()
364 m.SrcAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
365 copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
366 m.DstAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
367 copy(m.DstAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
368 m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
369 m.EncapVrfID = buf.DecodeUint32()
370 m.DecapNextIndex = buf.DecodeUint32()
371 m.Vni = buf.DecodeUint32()
375 // VxlanTunnelDump defines message 'vxlan_tunnel_dump'.
376 type VxlanTunnelDump struct {
377 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
380 func (m *VxlanTunnelDump) Reset() { *m = VxlanTunnelDump{} }
381 func (*VxlanTunnelDump) GetMessageName() string { return "vxlan_tunnel_dump" }
382 func (*VxlanTunnelDump) GetCrcString() string { return "f9e6675e" }
383 func (*VxlanTunnelDump) GetMessageType() api.MessageType {
384 return api.RequestMessage
387 func (m *VxlanTunnelDump) Size() int {
392 size += 4 // m.SwIfIndex
395 func (m *VxlanTunnelDump) Marshal(b []byte) ([]byte, error) {
396 var buf *codec.Buffer
398 buf = codec.NewBuffer(make([]byte, m.Size()))
400 buf = codec.NewBuffer(b)
402 buf.EncodeUint32(uint32(m.SwIfIndex))
403 return buf.Bytes(), nil
405 func (m *VxlanTunnelDump) Unmarshal(b []byte) error {
406 buf := codec.NewBuffer(b)
407 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
411 func init() { file_vxlan_binapi_init() }
412 func file_vxlan_binapi_init() {
413 api.RegisterMessage((*SwInterfaceSetVxlanBypass)(nil), "sw_interface_set_vxlan_bypass_65247409")
414 api.RegisterMessage((*SwInterfaceSetVxlanBypassReply)(nil), "sw_interface_set_vxlan_bypass_reply_e8d4e804")
415 api.RegisterMessage((*VxlanAddDelTunnel)(nil), "vxlan_add_del_tunnel_a35dc8f5")
416 api.RegisterMessage((*VxlanAddDelTunnelReply)(nil), "vxlan_add_del_tunnel_reply_5383d31f")
417 api.RegisterMessage((*VxlanOffloadRx)(nil), "vxlan_offload_rx_89a1564b")
418 api.RegisterMessage((*VxlanOffloadRxReply)(nil), "vxlan_offload_rx_reply_e8d4e804")
419 api.RegisterMessage((*VxlanTunnelDetails)(nil), "vxlan_tunnel_details_e782f70f")
420 api.RegisterMessage((*VxlanTunnelDump)(nil), "vxlan_tunnel_dump_f9e6675e")
423 // Messages returns list of all messages in this module.
424 func AllMessages() []api.Message {
425 return []api.Message{
426 (*SwInterfaceSetVxlanBypass)(nil),
427 (*SwInterfaceSetVxlanBypassReply)(nil),
428 (*VxlanAddDelTunnel)(nil),
429 (*VxlanAddDelTunnelReply)(nil),
430 (*VxlanOffloadRx)(nil),
431 (*VxlanOffloadRxReply)(nil),
432 (*VxlanTunnelDetails)(nil),
433 (*VxlanTunnelDump)(nil),