1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
|
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
// binapi-generator: v0.5.0-dev
// VPP: 22.02-release
// source: /usr/share/vpp/api/core/vxlan.api.json
// Package vxlan contains generated bindings for API file vxlan.api.
//
// Contents:
// 14 messages
//
package vxlan
import (
api "git.fd.io/govpp.git/api"
interface_types "git.fd.io/govpp.git/binapi/interface_types"
ip_types "git.fd.io/govpp.git/binapi/ip_types"
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 = "2.1.0"
VersionCrc = 0x95381587
)
// SwInterfaceSetVxlanBypass defines message 'sw_interface_set_vxlan_bypass'.
type SwInterfaceSetVxlanBypass struct {
SwIfIndex interface_types.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 *SwInterfaceSetVxlanBypass) Reset() { *m = SwInterfaceSetVxlanBypass{} }
func (*SwInterfaceSetVxlanBypass) GetMessageName() string { return "sw_interface_set_vxlan_bypass" }
func (*SwInterfaceSetVxlanBypass) GetCrcString() string { return "65247409" }
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(uint32(m.SwIfIndex))
buf.EncodeBool(m.IsIPv6)
buf.EncodeBool(m.Enable)
return buf.Bytes(), nil
}
func (m *SwInterfaceSetVxlanBypass) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
m.IsIPv6 = buf.DecodeBool()
m.Enable = buf.DecodeBool()
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 bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
Instance uint32 `binapi:"u32,name=instance" json:"instance,omitempty"`
SrcAddress ip_types.Address `binapi:"address,name=src_address" json:"src_address,omitempty"`
DstAddress ip_types.Address `binapi:"address,name=dst_address" json:"dst_address,omitempty"`
McastSwIfIndex interface_types.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 *VxlanAddDelTunnel) Reset() { *m = VxlanAddDelTunnel{} }
func (*VxlanAddDelTunnel) GetMessageName() string { return "vxlan_add_del_tunnel" }
func (*VxlanAddDelTunnel) GetCrcString() string { return "0c09dc80" }
func (*VxlanAddDelTunnel) GetMessageType() api.MessageType {
return api.RequestMessage
}
func (m *VxlanAddDelTunnel) Size() (size int) {
if m == nil {
return 0
}
size += 1 // m.IsAdd
size += 4 // m.Instance
size += 1 // m.SrcAddress.Af
size += 1 * 16 // m.SrcAddress.Un
size += 1 // 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 *VxlanAddDelTunnel) Marshal(b []byte) ([]byte, error) {
if b == nil {
b = make([]byte, m.Size())
}
buf := codec.NewBuffer(b)
buf.EncodeBool(m.IsAdd)
buf.EncodeUint32(m.Instance)
buf.EncodeUint8(uint8(m.SrcAddress.Af))
buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 16)
buf.EncodeUint8(uint8(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 *VxlanAddDelTunnel) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
m.IsAdd = buf.DecodeBool()
m.Instance = buf.DecodeUint32()
m.SrcAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
m.DstAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
copy(m.DstAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
m.McastSwIfIndex = interface_types.InterfaceIndex(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 interface_types.InterfaceIndex `binapi:"interface_index,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 "5383d31f" }
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(uint32(m.SwIfIndex))
return buf.Bytes(), nil
}
func (m *VxlanAddDelTunnelReply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
m.Retval = buf.DecodeInt32()
m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
return nil
}
// VxlanAddDelTunnelV2 defines message 'vxlan_add_del_tunnel_v2'.
type VxlanAddDelTunnelV2 struct {
IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
Instance uint32 `binapi:"u32,name=instance,default=4294967295" json:"instance,omitempty"`
SrcAddress ip_types.Address `binapi:"address,name=src_address" json:"src_address,omitempty"`
DstAddress ip_types.Address `binapi:"address,name=dst_address" json:"dst_address,omitempty"`
SrcPort uint16 `binapi:"u16,name=src_port" json:"src_port,omitempty"`
DstPort uint16 `binapi:"u16,name=dst_port" json:"dst_port,omitempty"`
McastSwIfIndex interface_types.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 *VxlanAddDelTunnelV2) Reset() { *m = VxlanAddDelTunnelV2{} }
func (*VxlanAddDelTunnelV2) GetMessageName() string { return "vxlan_add_del_tunnel_v2" }
func (*VxlanAddDelTunnelV2) GetCrcString() string { return "4f223f40" }
func (*VxlanAddDelTunnelV2) GetMessageType() api.MessageType {
return api.RequestMessage
}
func (m *VxlanAddDelTunnelV2) Size() (size int) {
if m == nil {
return 0
}
size += 1 // m.IsAdd
size += 4 // m.Instance
size += 1 // m.SrcAddress.Af
size += 1 * 16 // m.SrcAddress.Un
size += 1 // m.DstAddress.Af
size += 1 * 16 // m.DstAddress.Un
size += 2 // m.SrcPort
size += 2 // m.DstPort
size += 4 // m.McastSwIfIndex
size += 4 // m.EncapVrfID
size += 4 // m.DecapNextIndex
size += 4 // m.Vni
return size
}
func (m *VxlanAddDelTunnelV2) Marshal(b []byte) ([]byte, error) {
if b == nil {
b = make([]byte, m.Size())
}
buf := codec.NewBuffer(b)
buf.EncodeBool(m.IsAdd)
buf.EncodeUint32(m.Instance)
buf.EncodeUint8(uint8(m.SrcAddress.Af))
buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 16)
buf.EncodeUint8(uint8(m.DstAddress.Af))
buf.EncodeBytes(m.DstAddress.Un.XXX_UnionData[:], 16)
buf.EncodeUint16(m.SrcPort)
buf.EncodeUint16(m.DstPort)
buf.EncodeUint32(uint32(m.McastSwIfIndex))
buf.EncodeUint32(m.EncapVrfID)
buf.EncodeUint32(m.DecapNextIndex)
buf.EncodeUint32(m.Vni)
return buf.Bytes(), nil
}
func (m *VxlanAddDelTunnelV2) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
m.IsAdd = buf.DecodeBool()
m.Instance = buf.DecodeUint32()
m.SrcAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
m.DstAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
copy(m.DstAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
m.SrcPort = buf.DecodeUint16()
m.DstPort = buf.DecodeUint16()
m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
m.EncapVrfID = buf.DecodeUint32()
m.DecapNextIndex = buf.DecodeUint32()
m.Vni = buf.DecodeUint32()
return nil
}
// VxlanAddDelTunnelV2Reply defines message 'vxlan_add_del_tunnel_v2_reply'.
type VxlanAddDelTunnelV2Reply struct {
Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
}
func (m *VxlanAddDelTunnelV2Reply) Reset() { *m = VxlanAddDelTunnelV2Reply{} }
func (*VxlanAddDelTunnelV2Reply) GetMessageName() string { return "vxlan_add_del_tunnel_v2_reply" }
func (*VxlanAddDelTunnelV2Reply) GetCrcString() string { return "5383d31f" }
func (*VxlanAddDelTunnelV2Reply) GetMessageType() api.MessageType {
return api.ReplyMessage
}
func (m *VxlanAddDelTunnelV2Reply) Size() (size int) {
if m == nil {
return 0
}
size += 4 // m.Retval
size += 4 // m.SwIfIndex
return size
}
func (m *VxlanAddDelTunnelV2Reply) 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 *VxlanAddDelTunnelV2Reply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
m.Retval = buf.DecodeInt32()
m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
return nil
}
// VxlanAddDelTunnelV3 defines message 'vxlan_add_del_tunnel_v3'.
type VxlanAddDelTunnelV3 struct {
IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
Instance uint32 `binapi:"u32,name=instance,default=4294967295" json:"instance,omitempty"`
SrcAddress ip_types.Address `binapi:"address,name=src_address" json:"src_address,omitempty"`
DstAddress ip_types.Address `binapi:"address,name=dst_address" json:"dst_address,omitempty"`
SrcPort uint16 `binapi:"u16,name=src_port" json:"src_port,omitempty"`
DstPort uint16 `binapi:"u16,name=dst_port" json:"dst_port,omitempty"`
McastSwIfIndex interface_types.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"`
IsL3 bool `binapi:"bool,name=is_l3,default=false" json:"is_l3,omitempty"`
}
func (m *VxlanAddDelTunnelV3) Reset() { *m = VxlanAddDelTunnelV3{} }
func (*VxlanAddDelTunnelV3) GetMessageName() string { return "vxlan_add_del_tunnel_v3" }
func (*VxlanAddDelTunnelV3) GetCrcString() string { return "0072b037" }
func (*VxlanAddDelTunnelV3) GetMessageType() api.MessageType {
return api.RequestMessage
}
func (m *VxlanAddDelTunnelV3) Size() (size int) {
if m == nil {
return 0
}
size += 1 // m.IsAdd
size += 4 // m.Instance
size += 1 // m.SrcAddress.Af
size += 1 * 16 // m.SrcAddress.Un
size += 1 // m.DstAddress.Af
size += 1 * 16 // m.DstAddress.Un
size += 2 // m.SrcPort
size += 2 // m.DstPort
size += 4 // m.McastSwIfIndex
size += 4 // m.EncapVrfID
size += 4 // m.DecapNextIndex
size += 4 // m.Vni
size += 1 // m.IsL3
return size
}
func (m *VxlanAddDelTunnelV3) Marshal(b []byte) ([]byte, error) {
if b == nil {
b = make([]byte, m.Size())
}
buf := codec.NewBuffer(b)
buf.EncodeBool(m.IsAdd)
buf.EncodeUint32(m.Instance)
buf.EncodeUint8(uint8(m.SrcAddress.Af))
buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 16)
buf.EncodeUint8(uint8(m.DstAddress.Af))
buf.EncodeBytes(m.DstAddress.Un.XXX_UnionData[:], 16)
buf.EncodeUint16(m.SrcPort)
buf.EncodeUint16(m.DstPort)
buf.EncodeUint32(uint32(m.McastSwIfIndex))
buf.EncodeUint32(m.EncapVrfID)
buf.EncodeUint32(m.DecapNextIndex)
buf.EncodeUint32(m.Vni)
buf.EncodeBool(m.IsL3)
return buf.Bytes(), nil
}
func (m *VxlanAddDelTunnelV3) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
m.IsAdd = buf.DecodeBool()
m.Instance = buf.DecodeUint32()
m.SrcAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
m.DstAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
copy(m.DstAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
m.SrcPort = buf.DecodeUint16()
m.DstPort = buf.DecodeUint16()
m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
m.EncapVrfID = buf.DecodeUint32()
m.DecapNextIndex = buf.DecodeUint32()
m.Vni = buf.DecodeUint32()
m.IsL3 = buf.DecodeBool()
return nil
}
// VxlanAddDelTunnelV3Reply defines message 'vxlan_add_del_tunnel_v3_reply'.
type VxlanAddDelTunnelV3Reply struct {
Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
}
func (m *VxlanAddDelTunnelV3Reply) Reset() { *m = VxlanAddDelTunnelV3Reply{} }
func (*VxlanAddDelTunnelV3Reply) GetMessageName() string { return "vxlan_add_del_tunnel_v3_reply" }
func (*VxlanAddDelTunnelV3Reply) GetCrcString() string { return "5383d31f" }
func (*VxlanAddDelTunnelV3Reply) GetMessageType() api.MessageType {
return api.ReplyMessage
}
func (m *VxlanAddDelTunnelV3Reply) Size() (size int) {
if m == nil {
return 0
}
size += 4 // m.Retval
size += 4 // m.SwIfIndex
return size
}
func (m *VxlanAddDelTunnelV3Reply) 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 *VxlanAddDelTunnelV3Reply) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
m.Retval = buf.DecodeInt32()
m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
return nil
}
// VxlanOffloadRx defines message 'vxlan_offload_rx'.
type VxlanOffloadRx struct {
HwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=hw_if_index" json:"hw_if_index,omitempty"`
SwIfIndex interface_types.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 *VxlanOffloadRx) Reset() { *m = VxlanOffloadRx{} }
func (*VxlanOffloadRx) GetMessageName() string { return "vxlan_offload_rx" }
func (*VxlanOffloadRx) GetCrcString() string { return "9cc95087" }
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(uint32(m.HwIfIndex))
buf.EncodeUint32(uint32(m.SwIfIndex))
buf.EncodeBool(m.Enable)
return buf.Bytes(), nil
}
func (m *VxlanOffloadRx) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
m.HwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
m.Enable = buf.DecodeBool()
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 interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
Instance uint32 `binapi:"u32,name=instance" json:"instance,omitempty"`
SrcAddress ip_types.Address `binapi:"address,name=src_address" json:"src_address,omitempty"`
DstAddress ip_types.Address `binapi:"address,name=dst_address" json:"dst_address,omitempty"`
McastSwIfIndex interface_types.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 *VxlanTunnelDetails) Reset() { *m = VxlanTunnelDetails{} }
func (*VxlanTunnelDetails) GetMessageName() string { return "vxlan_tunnel_details" }
func (*VxlanTunnelDetails) GetCrcString() string { return "c3916cb1" }
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 // m.SrcAddress.Af
size += 1 * 16 // m.SrcAddress.Un
size += 1 // 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 *VxlanTunnelDetails) 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.Instance)
buf.EncodeUint8(uint8(m.SrcAddress.Af))
buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 16)
buf.EncodeUint8(uint8(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 *VxlanTunnelDetails) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
m.Instance = buf.DecodeUint32()
m.SrcAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
m.DstAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
copy(m.DstAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
m.EncapVrfID = buf.DecodeUint32()
m.DecapNextIndex = buf.DecodeUint32()
m.Vni = buf.DecodeUint32()
return nil
}
// VxlanTunnelDump defines message 'vxlan_tunnel_dump'.
type VxlanTunnelDump struct {
SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,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 "f9e6675e" }
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(uint32(m.SwIfIndex))
return buf.Bytes(), nil
}
func (m *VxlanTunnelDump) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
return nil
}
// VxlanTunnelV2Details defines message 'vxlan_tunnel_v2_details'.
type VxlanTunnelV2Details struct {
SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
Instance uint32 `binapi:"u32,name=instance" json:"instance,omitempty"`
SrcAddress ip_types.Address `binapi:"address,name=src_address" json:"src_address,omitempty"`
DstAddress ip_types.Address `binapi:"address,name=dst_address" json:"dst_address,omitempty"`
SrcPort uint16 `binapi:"u16,name=src_port" json:"src_port,omitempty"`
DstPort uint16 `binapi:"u16,name=dst_port" json:"dst_port,omitempty"`
McastSwIfIndex interface_types.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 *VxlanTunnelV2Details) Reset() { *m = VxlanTunnelV2Details{} }
func (*VxlanTunnelV2Details) GetMessageName() string { return "vxlan_tunnel_v2_details" }
func (*VxlanTunnelV2Details) GetCrcString() string { return "d3bdd4d9" }
func (*VxlanTunnelV2Details) GetMessageType() api.MessageType {
return api.ReplyMessage
}
func (m *VxlanTunnelV2Details) Size() (size int) {
if m == nil {
return 0
}
size += 4 // m.SwIfIndex
size += 4 // m.Instance
size += 1 // m.SrcAddress.Af
size += 1 * 16 // m.SrcAddress.Un
size += 1 // m.DstAddress.Af
size += 1 * 16 // m.DstAddress.Un
size += 2 // m.SrcPort
size += 2 // m.DstPort
size += 4 // m.McastSwIfIndex
size += 4 // m.EncapVrfID
size += 4 // m.DecapNextIndex
size += 4 // m.Vni
return size
}
func (m *VxlanTunnelV2Details) 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.Instance)
buf.EncodeUint8(uint8(m.SrcAddress.Af))
buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 16)
buf.EncodeUint8(uint8(m.DstAddress.Af))
buf.EncodeBytes(m.DstAddress.Un.XXX_UnionData[:], 16)
buf.EncodeUint16(m.SrcPort)
buf.EncodeUint16(m.DstPort)
buf.EncodeUint32(uint32(m.McastSwIfIndex))
buf.EncodeUint32(m.EncapVrfID)
buf.EncodeUint32(m.DecapNextIndex)
buf.EncodeUint32(m.Vni)
return buf.Bytes(), nil
}
func (m *VxlanTunnelV2Details) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
m.Instance = buf.DecodeUint32()
m.SrcAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
m.DstAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
copy(m.DstAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
m.SrcPort = buf.DecodeUint16()
m.DstPort = buf.DecodeUint16()
m.McastSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
m.EncapVrfID = buf.DecodeUint32()
m.DecapNextIndex = buf.DecodeUint32()
m.Vni = buf.DecodeUint32()
return nil
}
// VxlanTunnelV2Dump defines message 'vxlan_tunnel_v2_dump'.
type VxlanTunnelV2Dump struct {
SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
}
func (m *VxlanTunnelV2Dump) Reset() { *m = VxlanTunnelV2Dump{} }
func (*VxlanTunnelV2Dump) GetMessageName() string { return "vxlan_tunnel_v2_dump" }
func (*VxlanTunnelV2Dump) GetCrcString() string { return "f9e6675e" }
func (*VxlanTunnelV2Dump) GetMessageType() api.MessageType {
return api.RequestMessage
}
func (m *VxlanTunnelV2Dump) Size() (size int) {
if m == nil {
return 0
}
size += 4 // m.SwIfIndex
return size
}
func (m *VxlanTunnelV2Dump) 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 *VxlanTunnelV2Dump) Unmarshal(b []byte) error {
buf := codec.NewBuffer(b)
m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
return nil
}
func init() { file_vxlan_binapi_init() }
func file_vxlan_binapi_init() {
api.RegisterMessage((*SwInterfaceSetVxlanBypass)(nil), "sw_interface_set_vxlan_bypass_65247409")
api.RegisterMessage((*SwInterfaceSetVxlanBypassReply)(nil), "sw_interface_set_vxlan_bypass_reply_e8d4e804")
api.RegisterMessage((*VxlanAddDelTunnel)(nil), "vxlan_add_del_tunnel_0c09dc80")
api.RegisterMessage((*VxlanAddDelTunnelReply)(nil), "vxlan_add_del_tunnel_reply_5383d31f")
api.RegisterMessage((*VxlanAddDelTunnelV2)(nil), "vxlan_add_del_tunnel_v2_4f223f40")
api.RegisterMessage((*VxlanAddDelTunnelV2Reply)(nil), "vxlan_add_del_tunnel_v2_reply_5383d31f")
api.RegisterMessage((*VxlanAddDelTunnelV3)(nil), "vxlan_add_del_tunnel_v3_0072b037")
api.RegisterMessage((*VxlanAddDelTunnelV3Reply)(nil), "vxlan_add_del_tunnel_v3_reply_5383d31f")
api.RegisterMessage((*VxlanOffloadRx)(nil), "vxlan_offload_rx_9cc95087")
api.RegisterMessage((*VxlanOffloadRxReply)(nil), "vxlan_offload_rx_reply_e8d4e804")
api.RegisterMessage((*VxlanTunnelDetails)(nil), "vxlan_tunnel_details_c3916cb1")
api.RegisterMessage((*VxlanTunnelDump)(nil), "vxlan_tunnel_dump_f9e6675e")
api.RegisterMessage((*VxlanTunnelV2Details)(nil), "vxlan_tunnel_v2_details_d3bdd4d9")
api.RegisterMessage((*VxlanTunnelV2Dump)(nil), "vxlan_tunnel_v2_dump_f9e6675e")
}
// Messages returns list of all messages in this module.
func AllMessages() []api.Message {
return []api.Message{
(*SwInterfaceSetVxlanBypass)(nil),
(*SwInterfaceSetVxlanBypassReply)(nil),
(*VxlanAddDelTunnel)(nil),
(*VxlanAddDelTunnelReply)(nil),
(*VxlanAddDelTunnelV2)(nil),
(*VxlanAddDelTunnelV2Reply)(nil),
(*VxlanAddDelTunnelV3)(nil),
(*VxlanAddDelTunnelV3Reply)(nil),
(*VxlanOffloadRx)(nil),
(*VxlanOffloadRxReply)(nil),
(*VxlanTunnelDetails)(nil),
(*VxlanTunnelDump)(nil),
(*VxlanTunnelV2Details)(nil),
(*VxlanTunnelV2Dump)(nil),
}
}
|