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 = 0x95381587
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() (size int) {
51 size += 4 // m.SwIfIndex
56 func (m *SwInterfaceSetVxlanBypass) Marshal(b []byte) ([]byte, error) {
58 b = make([]byte, m.Size())
60 buf := codec.NewBuffer(b)
61 buf.EncodeUint32(uint32(m.SwIfIndex))
62 buf.EncodeBool(m.IsIPv6)
63 buf.EncodeBool(m.Enable)
64 return buf.Bytes(), nil
66 func (m *SwInterfaceSetVxlanBypass) Unmarshal(b []byte) error {
67 buf := codec.NewBuffer(b)
68 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
69 m.IsIPv6 = buf.DecodeBool()
70 m.Enable = buf.DecodeBool()
74 // SwInterfaceSetVxlanBypassReply defines message 'sw_interface_set_vxlan_bypass_reply'.
75 type SwInterfaceSetVxlanBypassReply struct {
76 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
79 func (m *SwInterfaceSetVxlanBypassReply) Reset() { *m = SwInterfaceSetVxlanBypassReply{} }
80 func (*SwInterfaceSetVxlanBypassReply) GetMessageName() string {
81 return "sw_interface_set_vxlan_bypass_reply"
83 func (*SwInterfaceSetVxlanBypassReply) GetCrcString() string { return "e8d4e804" }
84 func (*SwInterfaceSetVxlanBypassReply) GetMessageType() api.MessageType {
85 return api.ReplyMessage
88 func (m *SwInterfaceSetVxlanBypassReply) Size() (size int) {
95 func (m *SwInterfaceSetVxlanBypassReply) Marshal(b []byte) ([]byte, error) {
97 b = make([]byte, m.Size())
99 buf := codec.NewBuffer(b)
100 buf.EncodeInt32(m.Retval)
101 return buf.Bytes(), nil
103 func (m *SwInterfaceSetVxlanBypassReply) Unmarshal(b []byte) error {
104 buf := codec.NewBuffer(b)
105 m.Retval = buf.DecodeInt32()
109 // VxlanAddDelTunnel defines message 'vxlan_add_del_tunnel'.
110 type VxlanAddDelTunnel struct {
111 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
112 Instance uint32 `binapi:"u32,name=instance" json:"instance,omitempty"`
113 SrcAddress ip_types.Address `binapi:"address,name=src_address" json:"src_address,omitempty"`
114 DstAddress ip_types.Address `binapi:"address,name=dst_address" json:"dst_address,omitempty"`
115 McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
116 EncapVrfID uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
117 DecapNextIndex uint32 `binapi:"u32,name=decap_next_index" json:"decap_next_index,omitempty"`
118 Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
121 func (m *VxlanAddDelTunnel) Reset() { *m = VxlanAddDelTunnel{} }
122 func (*VxlanAddDelTunnel) GetMessageName() string { return "vxlan_add_del_tunnel" }
123 func (*VxlanAddDelTunnel) GetCrcString() string { return "0c09dc80" }
124 func (*VxlanAddDelTunnel) GetMessageType() api.MessageType {
125 return api.RequestMessage
128 func (m *VxlanAddDelTunnel) Size() (size int) {
133 size += 4 // m.Instance
134 size += 1 // m.SrcAddress.Af
135 size += 1 * 16 // m.SrcAddress.Un
136 size += 1 // m.DstAddress.Af
137 size += 1 * 16 // m.DstAddress.Un
138 size += 4 // m.McastSwIfIndex
139 size += 4 // m.EncapVrfID
140 size += 4 // m.DecapNextIndex
144 func (m *VxlanAddDelTunnel) Marshal(b []byte) ([]byte, error) {
146 b = make([]byte, m.Size())
148 buf := codec.NewBuffer(b)
149 buf.EncodeBool(m.IsAdd)
150 buf.EncodeUint32(m.Instance)
151 buf.EncodeUint8(uint8(m.SrcAddress.Af))
152 buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 16)
153 buf.EncodeUint8(uint8(m.DstAddress.Af))
154 buf.EncodeBytes(m.DstAddress.Un.XXX_UnionData[:], 16)
155 buf.EncodeUint32(uint32(m.McastSwIfIndex))
156 buf.EncodeUint32(m.EncapVrfID)
157 buf.EncodeUint32(m.DecapNextIndex)
158 buf.EncodeUint32(m.Vni)
159 return buf.Bytes(), nil
161 func (m *VxlanAddDelTunnel) Unmarshal(b []byte) error {
162 buf := codec.NewBuffer(b)
163 m.IsAdd = buf.DecodeBool()
164 m.Instance = buf.DecodeUint32()
165 m.SrcAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
166 copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
167 m.DstAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
168 copy(m.DstAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
169 m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
170 m.EncapVrfID = buf.DecodeUint32()
171 m.DecapNextIndex = buf.DecodeUint32()
172 m.Vni = buf.DecodeUint32()
176 // VxlanAddDelTunnelReply defines message 'vxlan_add_del_tunnel_reply'.
177 type VxlanAddDelTunnelReply struct {
178 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
179 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
182 func (m *VxlanAddDelTunnelReply) Reset() { *m = VxlanAddDelTunnelReply{} }
183 func (*VxlanAddDelTunnelReply) GetMessageName() string { return "vxlan_add_del_tunnel_reply" }
184 func (*VxlanAddDelTunnelReply) GetCrcString() string { return "5383d31f" }
185 func (*VxlanAddDelTunnelReply) GetMessageType() api.MessageType {
186 return api.ReplyMessage
189 func (m *VxlanAddDelTunnelReply) Size() (size int) {
193 size += 4 // m.Retval
194 size += 4 // m.SwIfIndex
197 func (m *VxlanAddDelTunnelReply) Marshal(b []byte) ([]byte, error) {
199 b = make([]byte, m.Size())
201 buf := codec.NewBuffer(b)
202 buf.EncodeInt32(m.Retval)
203 buf.EncodeUint32(uint32(m.SwIfIndex))
204 return buf.Bytes(), nil
206 func (m *VxlanAddDelTunnelReply) Unmarshal(b []byte) error {
207 buf := codec.NewBuffer(b)
208 m.Retval = buf.DecodeInt32()
209 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
213 // VxlanAddDelTunnelV2 defines message 'vxlan_add_del_tunnel_v2'.
214 type VxlanAddDelTunnelV2 struct {
215 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
216 Instance uint32 `binapi:"u32,name=instance,default=4294967295" json:"instance,omitempty"`
217 SrcAddress ip_types.Address `binapi:"address,name=src_address" json:"src_address,omitempty"`
218 DstAddress ip_types.Address `binapi:"address,name=dst_address" json:"dst_address,omitempty"`
219 SrcPort uint16 `binapi:"u16,name=src_port" json:"src_port,omitempty"`
220 DstPort uint16 `binapi:"u16,name=dst_port" json:"dst_port,omitempty"`
221 McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
222 EncapVrfID uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
223 DecapNextIndex uint32 `binapi:"u32,name=decap_next_index" json:"decap_next_index,omitempty"`
224 Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
227 func (m *VxlanAddDelTunnelV2) Reset() { *m = VxlanAddDelTunnelV2{} }
228 func (*VxlanAddDelTunnelV2) GetMessageName() string { return "vxlan_add_del_tunnel_v2" }
229 func (*VxlanAddDelTunnelV2) GetCrcString() string { return "4f223f40" }
230 func (*VxlanAddDelTunnelV2) GetMessageType() api.MessageType {
231 return api.RequestMessage
234 func (m *VxlanAddDelTunnelV2) Size() (size int) {
239 size += 4 // m.Instance
240 size += 1 // m.SrcAddress.Af
241 size += 1 * 16 // m.SrcAddress.Un
242 size += 1 // m.DstAddress.Af
243 size += 1 * 16 // m.DstAddress.Un
244 size += 2 // m.SrcPort
245 size += 2 // m.DstPort
246 size += 4 // m.McastSwIfIndex
247 size += 4 // m.EncapVrfID
248 size += 4 // m.DecapNextIndex
252 func (m *VxlanAddDelTunnelV2) Marshal(b []byte) ([]byte, error) {
254 b = make([]byte, m.Size())
256 buf := codec.NewBuffer(b)
257 buf.EncodeBool(m.IsAdd)
258 buf.EncodeUint32(m.Instance)
259 buf.EncodeUint8(uint8(m.SrcAddress.Af))
260 buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 16)
261 buf.EncodeUint8(uint8(m.DstAddress.Af))
262 buf.EncodeBytes(m.DstAddress.Un.XXX_UnionData[:], 16)
263 buf.EncodeUint16(m.SrcPort)
264 buf.EncodeUint16(m.DstPort)
265 buf.EncodeUint32(uint32(m.McastSwIfIndex))
266 buf.EncodeUint32(m.EncapVrfID)
267 buf.EncodeUint32(m.DecapNextIndex)
268 buf.EncodeUint32(m.Vni)
269 return buf.Bytes(), nil
271 func (m *VxlanAddDelTunnelV2) Unmarshal(b []byte) error {
272 buf := codec.NewBuffer(b)
273 m.IsAdd = buf.DecodeBool()
274 m.Instance = buf.DecodeUint32()
275 m.SrcAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
276 copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
277 m.DstAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
278 copy(m.DstAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
279 m.SrcPort = buf.DecodeUint16()
280 m.DstPort = buf.DecodeUint16()
281 m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
282 m.EncapVrfID = buf.DecodeUint32()
283 m.DecapNextIndex = buf.DecodeUint32()
284 m.Vni = buf.DecodeUint32()
288 // VxlanAddDelTunnelV2Reply defines message 'vxlan_add_del_tunnel_v2_reply'.
289 type VxlanAddDelTunnelV2Reply struct {
290 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
291 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
294 func (m *VxlanAddDelTunnelV2Reply) Reset() { *m = VxlanAddDelTunnelV2Reply{} }
295 func (*VxlanAddDelTunnelV2Reply) GetMessageName() string { return "vxlan_add_del_tunnel_v2_reply" }
296 func (*VxlanAddDelTunnelV2Reply) GetCrcString() string { return "5383d31f" }
297 func (*VxlanAddDelTunnelV2Reply) GetMessageType() api.MessageType {
298 return api.ReplyMessage
301 func (m *VxlanAddDelTunnelV2Reply) Size() (size int) {
305 size += 4 // m.Retval
306 size += 4 // m.SwIfIndex
309 func (m *VxlanAddDelTunnelV2Reply) Marshal(b []byte) ([]byte, error) {
311 b = make([]byte, m.Size())
313 buf := codec.NewBuffer(b)
314 buf.EncodeInt32(m.Retval)
315 buf.EncodeUint32(uint32(m.SwIfIndex))
316 return buf.Bytes(), nil
318 func (m *VxlanAddDelTunnelV2Reply) Unmarshal(b []byte) error {
319 buf := codec.NewBuffer(b)
320 m.Retval = buf.DecodeInt32()
321 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
325 // VxlanAddDelTunnelV3 defines message 'vxlan_add_del_tunnel_v3'.
326 type VxlanAddDelTunnelV3 struct {
327 IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
328 Instance uint32 `binapi:"u32,name=instance,default=4294967295" json:"instance,omitempty"`
329 SrcAddress ip_types.Address `binapi:"address,name=src_address" json:"src_address,omitempty"`
330 DstAddress ip_types.Address `binapi:"address,name=dst_address" json:"dst_address,omitempty"`
331 SrcPort uint16 `binapi:"u16,name=src_port" json:"src_port,omitempty"`
332 DstPort uint16 `binapi:"u16,name=dst_port" json:"dst_port,omitempty"`
333 McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
334 EncapVrfID uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
335 DecapNextIndex uint32 `binapi:"u32,name=decap_next_index" json:"decap_next_index,omitempty"`
336 Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
337 IsL3 bool `binapi:"bool,name=is_l3,default=false" json:"is_l3,omitempty"`
340 func (m *VxlanAddDelTunnelV3) Reset() { *m = VxlanAddDelTunnelV3{} }
341 func (*VxlanAddDelTunnelV3) GetMessageName() string { return "vxlan_add_del_tunnel_v3" }
342 func (*VxlanAddDelTunnelV3) GetCrcString() string { return "0072b037" }
343 func (*VxlanAddDelTunnelV3) GetMessageType() api.MessageType {
344 return api.RequestMessage
347 func (m *VxlanAddDelTunnelV3) Size() (size int) {
352 size += 4 // m.Instance
353 size += 1 // m.SrcAddress.Af
354 size += 1 * 16 // m.SrcAddress.Un
355 size += 1 // m.DstAddress.Af
356 size += 1 * 16 // m.DstAddress.Un
357 size += 2 // m.SrcPort
358 size += 2 // m.DstPort
359 size += 4 // m.McastSwIfIndex
360 size += 4 // m.EncapVrfID
361 size += 4 // m.DecapNextIndex
366 func (m *VxlanAddDelTunnelV3) Marshal(b []byte) ([]byte, error) {
368 b = make([]byte, m.Size())
370 buf := codec.NewBuffer(b)
371 buf.EncodeBool(m.IsAdd)
372 buf.EncodeUint32(m.Instance)
373 buf.EncodeUint8(uint8(m.SrcAddress.Af))
374 buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 16)
375 buf.EncodeUint8(uint8(m.DstAddress.Af))
376 buf.EncodeBytes(m.DstAddress.Un.XXX_UnionData[:], 16)
377 buf.EncodeUint16(m.SrcPort)
378 buf.EncodeUint16(m.DstPort)
379 buf.EncodeUint32(uint32(m.McastSwIfIndex))
380 buf.EncodeUint32(m.EncapVrfID)
381 buf.EncodeUint32(m.DecapNextIndex)
382 buf.EncodeUint32(m.Vni)
383 buf.EncodeBool(m.IsL3)
384 return buf.Bytes(), nil
386 func (m *VxlanAddDelTunnelV3) Unmarshal(b []byte) error {
387 buf := codec.NewBuffer(b)
388 m.IsAdd = buf.DecodeBool()
389 m.Instance = buf.DecodeUint32()
390 m.SrcAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
391 copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
392 m.DstAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
393 copy(m.DstAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
394 m.SrcPort = buf.DecodeUint16()
395 m.DstPort = buf.DecodeUint16()
396 m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
397 m.EncapVrfID = buf.DecodeUint32()
398 m.DecapNextIndex = buf.DecodeUint32()
399 m.Vni = buf.DecodeUint32()
400 m.IsL3 = buf.DecodeBool()
404 // VxlanAddDelTunnelV3Reply defines message 'vxlan_add_del_tunnel_v3_reply'.
405 type VxlanAddDelTunnelV3Reply struct {
406 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
407 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
410 func (m *VxlanAddDelTunnelV3Reply) Reset() { *m = VxlanAddDelTunnelV3Reply{} }
411 func (*VxlanAddDelTunnelV3Reply) GetMessageName() string { return "vxlan_add_del_tunnel_v3_reply" }
412 func (*VxlanAddDelTunnelV3Reply) GetCrcString() string { return "5383d31f" }
413 func (*VxlanAddDelTunnelV3Reply) GetMessageType() api.MessageType {
414 return api.ReplyMessage
417 func (m *VxlanAddDelTunnelV3Reply) Size() (size int) {
421 size += 4 // m.Retval
422 size += 4 // m.SwIfIndex
425 func (m *VxlanAddDelTunnelV3Reply) Marshal(b []byte) ([]byte, error) {
427 b = make([]byte, m.Size())
429 buf := codec.NewBuffer(b)
430 buf.EncodeInt32(m.Retval)
431 buf.EncodeUint32(uint32(m.SwIfIndex))
432 return buf.Bytes(), nil
434 func (m *VxlanAddDelTunnelV3Reply) Unmarshal(b []byte) error {
435 buf := codec.NewBuffer(b)
436 m.Retval = buf.DecodeInt32()
437 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
441 // VxlanOffloadRx defines message 'vxlan_offload_rx'.
442 type VxlanOffloadRx struct {
443 HwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=hw_if_index" json:"hw_if_index,omitempty"`
444 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
445 Enable bool `binapi:"bool,name=enable,default=true" json:"enable,omitempty"`
448 func (m *VxlanOffloadRx) Reset() { *m = VxlanOffloadRx{} }
449 func (*VxlanOffloadRx) GetMessageName() string { return "vxlan_offload_rx" }
450 func (*VxlanOffloadRx) GetCrcString() string { return "9cc95087" }
451 func (*VxlanOffloadRx) GetMessageType() api.MessageType {
452 return api.RequestMessage
455 func (m *VxlanOffloadRx) Size() (size int) {
459 size += 4 // m.HwIfIndex
460 size += 4 // m.SwIfIndex
461 size += 1 // m.Enable
464 func (m *VxlanOffloadRx) Marshal(b []byte) ([]byte, error) {
466 b = make([]byte, m.Size())
468 buf := codec.NewBuffer(b)
469 buf.EncodeUint32(uint32(m.HwIfIndex))
470 buf.EncodeUint32(uint32(m.SwIfIndex))
471 buf.EncodeBool(m.Enable)
472 return buf.Bytes(), nil
474 func (m *VxlanOffloadRx) Unmarshal(b []byte) error {
475 buf := codec.NewBuffer(b)
476 m.HwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
477 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
478 m.Enable = buf.DecodeBool()
482 // VxlanOffloadRxReply defines message 'vxlan_offload_rx_reply'.
483 type VxlanOffloadRxReply struct {
484 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
487 func (m *VxlanOffloadRxReply) Reset() { *m = VxlanOffloadRxReply{} }
488 func (*VxlanOffloadRxReply) GetMessageName() string { return "vxlan_offload_rx_reply" }
489 func (*VxlanOffloadRxReply) GetCrcString() string { return "e8d4e804" }
490 func (*VxlanOffloadRxReply) GetMessageType() api.MessageType {
491 return api.ReplyMessage
494 func (m *VxlanOffloadRxReply) Size() (size int) {
498 size += 4 // m.Retval
501 func (m *VxlanOffloadRxReply) Marshal(b []byte) ([]byte, error) {
503 b = make([]byte, m.Size())
505 buf := codec.NewBuffer(b)
506 buf.EncodeInt32(m.Retval)
507 return buf.Bytes(), nil
509 func (m *VxlanOffloadRxReply) Unmarshal(b []byte) error {
510 buf := codec.NewBuffer(b)
511 m.Retval = buf.DecodeInt32()
515 // VxlanTunnelDetails defines message 'vxlan_tunnel_details'.
516 type VxlanTunnelDetails struct {
517 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
518 Instance uint32 `binapi:"u32,name=instance" json:"instance,omitempty"`
519 SrcAddress ip_types.Address `binapi:"address,name=src_address" json:"src_address,omitempty"`
520 DstAddress ip_types.Address `binapi:"address,name=dst_address" json:"dst_address,omitempty"`
521 McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
522 EncapVrfID uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
523 DecapNextIndex uint32 `binapi:"u32,name=decap_next_index" json:"decap_next_index,omitempty"`
524 Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
527 func (m *VxlanTunnelDetails) Reset() { *m = VxlanTunnelDetails{} }
528 func (*VxlanTunnelDetails) GetMessageName() string { return "vxlan_tunnel_details" }
529 func (*VxlanTunnelDetails) GetCrcString() string { return "c3916cb1" }
530 func (*VxlanTunnelDetails) GetMessageType() api.MessageType {
531 return api.ReplyMessage
534 func (m *VxlanTunnelDetails) Size() (size int) {
538 size += 4 // m.SwIfIndex
539 size += 4 // m.Instance
540 size += 1 // m.SrcAddress.Af
541 size += 1 * 16 // m.SrcAddress.Un
542 size += 1 // m.DstAddress.Af
543 size += 1 * 16 // m.DstAddress.Un
544 size += 4 // m.McastSwIfIndex
545 size += 4 // m.EncapVrfID
546 size += 4 // m.DecapNextIndex
550 func (m *VxlanTunnelDetails) Marshal(b []byte) ([]byte, error) {
552 b = make([]byte, m.Size())
554 buf := codec.NewBuffer(b)
555 buf.EncodeUint32(uint32(m.SwIfIndex))
556 buf.EncodeUint32(m.Instance)
557 buf.EncodeUint8(uint8(m.SrcAddress.Af))
558 buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 16)
559 buf.EncodeUint8(uint8(m.DstAddress.Af))
560 buf.EncodeBytes(m.DstAddress.Un.XXX_UnionData[:], 16)
561 buf.EncodeUint32(uint32(m.McastSwIfIndex))
562 buf.EncodeUint32(m.EncapVrfID)
563 buf.EncodeUint32(m.DecapNextIndex)
564 buf.EncodeUint32(m.Vni)
565 return buf.Bytes(), nil
567 func (m *VxlanTunnelDetails) Unmarshal(b []byte) error {
568 buf := codec.NewBuffer(b)
569 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
570 m.Instance = buf.DecodeUint32()
571 m.SrcAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
572 copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
573 m.DstAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
574 copy(m.DstAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
575 m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
576 m.EncapVrfID = buf.DecodeUint32()
577 m.DecapNextIndex = buf.DecodeUint32()
578 m.Vni = buf.DecodeUint32()
582 // VxlanTunnelDump defines message 'vxlan_tunnel_dump'.
583 type VxlanTunnelDump struct {
584 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
587 func (m *VxlanTunnelDump) Reset() { *m = VxlanTunnelDump{} }
588 func (*VxlanTunnelDump) GetMessageName() string { return "vxlan_tunnel_dump" }
589 func (*VxlanTunnelDump) GetCrcString() string { return "f9e6675e" }
590 func (*VxlanTunnelDump) GetMessageType() api.MessageType {
591 return api.RequestMessage
594 func (m *VxlanTunnelDump) Size() (size int) {
598 size += 4 // m.SwIfIndex
601 func (m *VxlanTunnelDump) Marshal(b []byte) ([]byte, error) {
603 b = make([]byte, m.Size())
605 buf := codec.NewBuffer(b)
606 buf.EncodeUint32(uint32(m.SwIfIndex))
607 return buf.Bytes(), nil
609 func (m *VxlanTunnelDump) Unmarshal(b []byte) error {
610 buf := codec.NewBuffer(b)
611 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
615 // VxlanTunnelV2Details defines message 'vxlan_tunnel_v2_details'.
616 type VxlanTunnelV2Details struct {
617 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
618 Instance uint32 `binapi:"u32,name=instance" json:"instance,omitempty"`
619 SrcAddress ip_types.Address `binapi:"address,name=src_address" json:"src_address,omitempty"`
620 DstAddress ip_types.Address `binapi:"address,name=dst_address" json:"dst_address,omitempty"`
621 SrcPort uint16 `binapi:"u16,name=src_port" json:"src_port,omitempty"`
622 DstPort uint16 `binapi:"u16,name=dst_port" json:"dst_port,omitempty"`
623 McastSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=mcast_sw_if_index" json:"mcast_sw_if_index,omitempty"`
624 EncapVrfID uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
625 DecapNextIndex uint32 `binapi:"u32,name=decap_next_index" json:"decap_next_index,omitempty"`
626 Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"`
629 func (m *VxlanTunnelV2Details) Reset() { *m = VxlanTunnelV2Details{} }
630 func (*VxlanTunnelV2Details) GetMessageName() string { return "vxlan_tunnel_v2_details" }
631 func (*VxlanTunnelV2Details) GetCrcString() string { return "d3bdd4d9" }
632 func (*VxlanTunnelV2Details) GetMessageType() api.MessageType {
633 return api.ReplyMessage
636 func (m *VxlanTunnelV2Details) Size() (size int) {
640 size += 4 // m.SwIfIndex
641 size += 4 // m.Instance
642 size += 1 // m.SrcAddress.Af
643 size += 1 * 16 // m.SrcAddress.Un
644 size += 1 // m.DstAddress.Af
645 size += 1 * 16 // m.DstAddress.Un
646 size += 2 // m.SrcPort
647 size += 2 // m.DstPort
648 size += 4 // m.McastSwIfIndex
649 size += 4 // m.EncapVrfID
650 size += 4 // m.DecapNextIndex
654 func (m *VxlanTunnelV2Details) Marshal(b []byte) ([]byte, error) {
656 b = make([]byte, m.Size())
658 buf := codec.NewBuffer(b)
659 buf.EncodeUint32(uint32(m.SwIfIndex))
660 buf.EncodeUint32(m.Instance)
661 buf.EncodeUint8(uint8(m.SrcAddress.Af))
662 buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 16)
663 buf.EncodeUint8(uint8(m.DstAddress.Af))
664 buf.EncodeBytes(m.DstAddress.Un.XXX_UnionData[:], 16)
665 buf.EncodeUint16(m.SrcPort)
666 buf.EncodeUint16(m.DstPort)
667 buf.EncodeUint32(uint32(m.McastSwIfIndex))
668 buf.EncodeUint32(m.EncapVrfID)
669 buf.EncodeUint32(m.DecapNextIndex)
670 buf.EncodeUint32(m.Vni)
671 return buf.Bytes(), nil
673 func (m *VxlanTunnelV2Details) Unmarshal(b []byte) error {
674 buf := codec.NewBuffer(b)
675 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
676 m.Instance = buf.DecodeUint32()
677 m.SrcAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
678 copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
679 m.DstAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
680 copy(m.DstAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
681 m.SrcPort = buf.DecodeUint16()
682 m.DstPort = buf.DecodeUint16()
683 m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
684 m.EncapVrfID = buf.DecodeUint32()
685 m.DecapNextIndex = buf.DecodeUint32()
686 m.Vni = buf.DecodeUint32()
690 // VxlanTunnelV2Dump defines message 'vxlan_tunnel_v2_dump'.
691 type VxlanTunnelV2Dump struct {
692 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
695 func (m *VxlanTunnelV2Dump) Reset() { *m = VxlanTunnelV2Dump{} }
696 func (*VxlanTunnelV2Dump) GetMessageName() string { return "vxlan_tunnel_v2_dump" }
697 func (*VxlanTunnelV2Dump) GetCrcString() string { return "f9e6675e" }
698 func (*VxlanTunnelV2Dump) GetMessageType() api.MessageType {
699 return api.RequestMessage
702 func (m *VxlanTunnelV2Dump) Size() (size int) {
706 size += 4 // m.SwIfIndex
709 func (m *VxlanTunnelV2Dump) Marshal(b []byte) ([]byte, error) {
711 b = make([]byte, m.Size())
713 buf := codec.NewBuffer(b)
714 buf.EncodeUint32(uint32(m.SwIfIndex))
715 return buf.Bytes(), nil
717 func (m *VxlanTunnelV2Dump) Unmarshal(b []byte) error {
718 buf := codec.NewBuffer(b)
719 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
723 func init() { file_vxlan_binapi_init() }
724 func file_vxlan_binapi_init() {
725 api.RegisterMessage((*SwInterfaceSetVxlanBypass)(nil), "sw_interface_set_vxlan_bypass_65247409")
726 api.RegisterMessage((*SwInterfaceSetVxlanBypassReply)(nil), "sw_interface_set_vxlan_bypass_reply_e8d4e804")
727 api.RegisterMessage((*VxlanAddDelTunnel)(nil), "vxlan_add_del_tunnel_0c09dc80")
728 api.RegisterMessage((*VxlanAddDelTunnelReply)(nil), "vxlan_add_del_tunnel_reply_5383d31f")
729 api.RegisterMessage((*VxlanAddDelTunnelV2)(nil), "vxlan_add_del_tunnel_v2_4f223f40")
730 api.RegisterMessage((*VxlanAddDelTunnelV2Reply)(nil), "vxlan_add_del_tunnel_v2_reply_5383d31f")
731 api.RegisterMessage((*VxlanAddDelTunnelV3)(nil), "vxlan_add_del_tunnel_v3_0072b037")
732 api.RegisterMessage((*VxlanAddDelTunnelV3Reply)(nil), "vxlan_add_del_tunnel_v3_reply_5383d31f")
733 api.RegisterMessage((*VxlanOffloadRx)(nil), "vxlan_offload_rx_9cc95087")
734 api.RegisterMessage((*VxlanOffloadRxReply)(nil), "vxlan_offload_rx_reply_e8d4e804")
735 api.RegisterMessage((*VxlanTunnelDetails)(nil), "vxlan_tunnel_details_c3916cb1")
736 api.RegisterMessage((*VxlanTunnelDump)(nil), "vxlan_tunnel_dump_f9e6675e")
737 api.RegisterMessage((*VxlanTunnelV2Details)(nil), "vxlan_tunnel_v2_details_d3bdd4d9")
738 api.RegisterMessage((*VxlanTunnelV2Dump)(nil), "vxlan_tunnel_v2_dump_f9e6675e")
741 // Messages returns list of all messages in this module.
742 func AllMessages() []api.Message {
743 return []api.Message{
744 (*SwInterfaceSetVxlanBypass)(nil),
745 (*SwInterfaceSetVxlanBypassReply)(nil),
746 (*VxlanAddDelTunnel)(nil),
747 (*VxlanAddDelTunnelReply)(nil),
748 (*VxlanAddDelTunnelV2)(nil),
749 (*VxlanAddDelTunnelV2Reply)(nil),
750 (*VxlanAddDelTunnelV3)(nil),
751 (*VxlanAddDelTunnelV3Reply)(nil),
752 (*VxlanOffloadRx)(nil),
753 (*VxlanOffloadRxReply)(nil),
754 (*VxlanTunnelDetails)(nil),
755 (*VxlanTunnelDump)(nil),
756 (*VxlanTunnelV2Details)(nil),
757 (*VxlanTunnelV2Dump)(nil),