/
ipsec.ba.go
1213 lines (1065 loc) · 32.9 KB
/
ipsec.ba.go
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
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// source: /usr/share/vpp/api/core/ipsec.api.json
/*
Package ipsec is a generated VPP binary API for 'ipsec' module.
It consists of:
6 enums
2 aliases
8 types
1 union
28 messages
14 services
*/
package ipsec
import (
bytes "bytes"
context "context"
api "git.fd.io/govpp.git/api"
struc "github.com/lunixbochs/struc"
io "io"
strconv "strconv"
)
const (
// ModuleName is the name of this module.
ModuleName = "ipsec"
// APIVersion is the API version of this module.
APIVersion = "3.0.0"
// VersionCrc is the CRC of this module.
VersionCrc = 0xdd4e73c8
)
// AddressFamily represents VPP binary API 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",
}
var 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 strconv.Itoa(int(x))
}
// IpsecCryptoAlg represents VPP binary API enum 'ipsec_crypto_alg'.
type IpsecCryptoAlg uint32
const (
IPSEC_API_CRYPTO_ALG_NONE IpsecCryptoAlg = 0
IPSEC_API_CRYPTO_ALG_AES_CBC_128 IpsecCryptoAlg = 1
IPSEC_API_CRYPTO_ALG_AES_CBC_192 IpsecCryptoAlg = 2
IPSEC_API_CRYPTO_ALG_AES_CBC_256 IpsecCryptoAlg = 3
IPSEC_API_CRYPTO_ALG_AES_CTR_128 IpsecCryptoAlg = 4
IPSEC_API_CRYPTO_ALG_AES_CTR_192 IpsecCryptoAlg = 5
IPSEC_API_CRYPTO_ALG_AES_CTR_256 IpsecCryptoAlg = 6
IPSEC_API_CRYPTO_ALG_AES_GCM_128 IpsecCryptoAlg = 7
IPSEC_API_CRYPTO_ALG_AES_GCM_192 IpsecCryptoAlg = 8
IPSEC_API_CRYPTO_ALG_AES_GCM_256 IpsecCryptoAlg = 9
IPSEC_API_CRYPTO_ALG_DES_CBC IpsecCryptoAlg = 10
IPSEC_API_CRYPTO_ALG_3DES_CBC IpsecCryptoAlg = 11
)
var IpsecCryptoAlg_name = map[uint32]string{
0: "IPSEC_API_CRYPTO_ALG_NONE",
1: "IPSEC_API_CRYPTO_ALG_AES_CBC_128",
2: "IPSEC_API_CRYPTO_ALG_AES_CBC_192",
3: "IPSEC_API_CRYPTO_ALG_AES_CBC_256",
4: "IPSEC_API_CRYPTO_ALG_AES_CTR_128",
5: "IPSEC_API_CRYPTO_ALG_AES_CTR_192",
6: "IPSEC_API_CRYPTO_ALG_AES_CTR_256",
7: "IPSEC_API_CRYPTO_ALG_AES_GCM_128",
8: "IPSEC_API_CRYPTO_ALG_AES_GCM_192",
9: "IPSEC_API_CRYPTO_ALG_AES_GCM_256",
10: "IPSEC_API_CRYPTO_ALG_DES_CBC",
11: "IPSEC_API_CRYPTO_ALG_3DES_CBC",
}
var IpsecCryptoAlg_value = map[string]uint32{
"IPSEC_API_CRYPTO_ALG_NONE": 0,
"IPSEC_API_CRYPTO_ALG_AES_CBC_128": 1,
"IPSEC_API_CRYPTO_ALG_AES_CBC_192": 2,
"IPSEC_API_CRYPTO_ALG_AES_CBC_256": 3,
"IPSEC_API_CRYPTO_ALG_AES_CTR_128": 4,
"IPSEC_API_CRYPTO_ALG_AES_CTR_192": 5,
"IPSEC_API_CRYPTO_ALG_AES_CTR_256": 6,
"IPSEC_API_CRYPTO_ALG_AES_GCM_128": 7,
"IPSEC_API_CRYPTO_ALG_AES_GCM_192": 8,
"IPSEC_API_CRYPTO_ALG_AES_GCM_256": 9,
"IPSEC_API_CRYPTO_ALG_DES_CBC": 10,
"IPSEC_API_CRYPTO_ALG_3DES_CBC": 11,
}
func (x IpsecCryptoAlg) String() string {
s, ok := IpsecCryptoAlg_name[uint32(x)]
if ok {
return s
}
return strconv.Itoa(int(x))
}
// IpsecIntegAlg represents VPP binary API enum 'ipsec_integ_alg'.
type IpsecIntegAlg uint32
const (
IPSEC_API_INTEG_ALG_NONE IpsecIntegAlg = 0
IPSEC_API_INTEG_ALG_MD5_96 IpsecIntegAlg = 1
IPSEC_API_INTEG_ALG_SHA1_96 IpsecIntegAlg = 2
IPSEC_API_INTEG_ALG_SHA_256_96 IpsecIntegAlg = 3
IPSEC_API_INTEG_ALG_SHA_256_128 IpsecIntegAlg = 4
IPSEC_API_INTEG_ALG_SHA_384_192 IpsecIntegAlg = 5
IPSEC_API_INTEG_ALG_SHA_512_256 IpsecIntegAlg = 6
)
var IpsecIntegAlg_name = map[uint32]string{
0: "IPSEC_API_INTEG_ALG_NONE",
1: "IPSEC_API_INTEG_ALG_MD5_96",
2: "IPSEC_API_INTEG_ALG_SHA1_96",
3: "IPSEC_API_INTEG_ALG_SHA_256_96",
4: "IPSEC_API_INTEG_ALG_SHA_256_128",
5: "IPSEC_API_INTEG_ALG_SHA_384_192",
6: "IPSEC_API_INTEG_ALG_SHA_512_256",
}
var IpsecIntegAlg_value = map[string]uint32{
"IPSEC_API_INTEG_ALG_NONE": 0,
"IPSEC_API_INTEG_ALG_MD5_96": 1,
"IPSEC_API_INTEG_ALG_SHA1_96": 2,
"IPSEC_API_INTEG_ALG_SHA_256_96": 3,
"IPSEC_API_INTEG_ALG_SHA_256_128": 4,
"IPSEC_API_INTEG_ALG_SHA_384_192": 5,
"IPSEC_API_INTEG_ALG_SHA_512_256": 6,
}
func (x IpsecIntegAlg) String() string {
s, ok := IpsecIntegAlg_name[uint32(x)]
if ok {
return s
}
return strconv.Itoa(int(x))
}
// IpsecProto represents VPP binary API enum 'ipsec_proto'.
type IpsecProto uint32
const (
IPSEC_API_PROTO_ESP IpsecProto = 1
IPSEC_API_PROTO_AH IpsecProto = 2
)
var IpsecProto_name = map[uint32]string{
1: "IPSEC_API_PROTO_ESP",
2: "IPSEC_API_PROTO_AH",
}
var IpsecProto_value = map[string]uint32{
"IPSEC_API_PROTO_ESP": 1,
"IPSEC_API_PROTO_AH": 2,
}
func (x IpsecProto) String() string {
s, ok := IpsecProto_name[uint32(x)]
if ok {
return s
}
return strconv.Itoa(int(x))
}
// IpsecSadFlags represents VPP binary API enum 'ipsec_sad_flags'.
type IpsecSadFlags uint32
const (
IPSEC_API_SAD_FLAG_NONE IpsecSadFlags = 0
IPSEC_API_SAD_FLAG_USE_ESN IpsecSadFlags = 1
IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY IpsecSadFlags = 2
IPSEC_API_SAD_FLAG_IS_TUNNEL IpsecSadFlags = 4
IPSEC_API_SAD_FLAG_IS_TUNNEL_V6 IpsecSadFlags = 8
IPSEC_API_SAD_FLAG_UDP_ENCAP IpsecSadFlags = 16
)
var IpsecSadFlags_name = map[uint32]string{
0: "IPSEC_API_SAD_FLAG_NONE",
1: "IPSEC_API_SAD_FLAG_USE_ESN",
2: "IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY",
4: "IPSEC_API_SAD_FLAG_IS_TUNNEL",
8: "IPSEC_API_SAD_FLAG_IS_TUNNEL_V6",
16: "IPSEC_API_SAD_FLAG_UDP_ENCAP",
}
var IpsecSadFlags_value = map[string]uint32{
"IPSEC_API_SAD_FLAG_NONE": 0,
"IPSEC_API_SAD_FLAG_USE_ESN": 1,
"IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY": 2,
"IPSEC_API_SAD_FLAG_IS_TUNNEL": 4,
"IPSEC_API_SAD_FLAG_IS_TUNNEL_V6": 8,
"IPSEC_API_SAD_FLAG_UDP_ENCAP": 16,
}
func (x IpsecSadFlags) String() string {
s, ok := IpsecSadFlags_name[uint32(x)]
if ok {
return s
}
return strconv.Itoa(int(x))
}
// IpsecSpdAction represents VPP binary API enum 'ipsec_spd_action'.
type IpsecSpdAction uint32
const (
IPSEC_API_SPD_ACTION_BYPASS IpsecSpdAction = 0
IPSEC_API_SPD_ACTION_DISCARD IpsecSpdAction = 1
IPSEC_API_SPD_ACTION_RESOLVE IpsecSpdAction = 2
IPSEC_API_SPD_ACTION_PROTECT IpsecSpdAction = 3
)
var IpsecSpdAction_name = map[uint32]string{
0: "IPSEC_API_SPD_ACTION_BYPASS",
1: "IPSEC_API_SPD_ACTION_DISCARD",
2: "IPSEC_API_SPD_ACTION_RESOLVE",
3: "IPSEC_API_SPD_ACTION_PROTECT",
}
var IpsecSpdAction_value = map[string]uint32{
"IPSEC_API_SPD_ACTION_BYPASS": 0,
"IPSEC_API_SPD_ACTION_DISCARD": 1,
"IPSEC_API_SPD_ACTION_RESOLVE": 2,
"IPSEC_API_SPD_ACTION_PROTECT": 3,
}
func (x IpsecSpdAction) String() string {
s, ok := IpsecSpdAction_name[uint32(x)]
if ok {
return s
}
return strconv.Itoa(int(x))
}
// IP4Address represents VPP binary API alias 'ip4_address'.
type IP4Address [4]uint8
// IP6Address represents VPP binary API alias 'ip6_address'.
type IP6Address [16]uint8
// Address represents VPP binary API type 'address'.
type Address struct {
Af AddressFamily
Un AddressUnion
}
func (*Address) GetTypeName() string {
return "address"
}
func (*Address) GetCrcString() string {
return "09f11671"
}
// IP4Prefix represents VPP binary API type 'ip4_prefix'.
type IP4Prefix struct {
Prefix IP4Address
Len uint8
}
func (*IP4Prefix) GetTypeName() string {
return "ip4_prefix"
}
func (*IP4Prefix) GetCrcString() string {
return "ea8dc11d"
}
// IP6Prefix represents VPP binary API type 'ip6_prefix'.
type IP6Prefix struct {
Prefix IP6Address
Len uint8
}
func (*IP6Prefix) GetTypeName() string {
return "ip6_prefix"
}
func (*IP6Prefix) GetCrcString() string {
return "779fd64f"
}
// IpsecSadEntry represents VPP binary API type 'ipsec_sad_entry'.
type IpsecSadEntry struct {
SadID uint32
Spi uint32
Protocol IpsecProto
CryptoAlgorithm IpsecCryptoAlg
CryptoKey Key
IntegrityAlgorithm IpsecIntegAlg
IntegrityKey Key
Flags IpsecSadFlags
TunnelSrc Address
TunnelDst Address
TxTableID uint32
}
func (*IpsecSadEntry) GetTypeName() string {
return "ipsec_sad_entry"
}
func (*IpsecSadEntry) GetCrcString() string {
return "ca3da05d"
}
// IpsecSpdEntry represents VPP binary API type 'ipsec_spd_entry'.
type IpsecSpdEntry struct {
SpdID uint32
Priority int32
IsOutbound uint8
SaID uint32
Policy IpsecSpdAction
Protocol uint8
RemoteAddressStart Address
RemoteAddressStop Address
LocalAddressStart Address
LocalAddressStop Address
RemotePortStart uint16
RemotePortStop uint16
LocalPortStart uint16
LocalPortStop uint16
}
func (*IpsecSpdEntry) GetTypeName() string {
return "ipsec_spd_entry"
}
func (*IpsecSpdEntry) GetCrcString() string {
return "876fdb2c"
}
// Key represents VPP binary API type 'key'.
type Key struct {
Length uint8
Data []byte `struc:"[128]byte"`
}
func (*Key) GetTypeName() string {
return "key"
}
func (*Key) GetCrcString() string {
return "f3d0c4fd"
}
// Mprefix represents VPP binary API type 'mprefix'.
type Mprefix struct {
Af AddressFamily
GrpAddressLength uint16
GrpAddress AddressUnion
SrcAddress AddressUnion
}
func (*Mprefix) GetTypeName() string {
return "mprefix"
}
func (*Mprefix) GetCrcString() string {
return "1c4cba05"
}
// Prefix represents VPP binary API type 'prefix'.
type Prefix struct {
Address Address
AddressLength uint8
}
func (*Prefix) GetTypeName() string {
return "prefix"
}
func (*Prefix) GetCrcString() string {
return "0403aebc"
}
// AddressUnion represents VPP binary API union 'address_union'.
type AddressUnion struct {
XXX_UnionData [16]byte
}
func (*AddressUnion) GetTypeName() string {
return "address_union"
}
func (*AddressUnion) GetCrcString() string {
return "d68a2fb4"
}
func AddressUnionIP4(a IP4Address) (u AddressUnion) {
u.SetIP4(a)
return
}
func (u *AddressUnion) SetIP4(a IP4Address) {
var b = new(bytes.Buffer)
if err := struc.Pack(b, &a); err != nil {
return
}
copy(u.XXX_UnionData[:], b.Bytes())
}
func (u *AddressUnion) GetIP4() (a IP4Address) {
var b = bytes.NewReader(u.XXX_UnionData[:])
struc.Unpack(b, &a)
return
}
func AddressUnionIP6(a IP6Address) (u AddressUnion) {
u.SetIP6(a)
return
}
func (u *AddressUnion) SetIP6(a IP6Address) {
var b = new(bytes.Buffer)
if err := struc.Pack(b, &a); err != nil {
return
}
copy(u.XXX_UnionData[:], b.Bytes())
}
func (u *AddressUnion) GetIP6() (a IP6Address) {
var b = bytes.NewReader(u.XXX_UnionData[:])
struc.Unpack(b, &a)
return
}
// IpsecBackendDetails represents VPP binary API message 'ipsec_backend_details'.
type IpsecBackendDetails struct {
Name []byte `struc:"[128]byte"`
Protocol IpsecProto
Index uint8
Active uint8
}
func (*IpsecBackendDetails) GetMessageName() string {
return "ipsec_backend_details"
}
func (*IpsecBackendDetails) GetCrcString() string {
return "3341f485"
}
func (*IpsecBackendDetails) GetMessageType() api.MessageType {
return api.ReplyMessage
}
// IpsecBackendDump represents VPP binary API message 'ipsec_backend_dump'.
type IpsecBackendDump struct{}
func (*IpsecBackendDump) GetMessageName() string {
return "ipsec_backend_dump"
}
func (*IpsecBackendDump) GetCrcString() string {
return "51077d14"
}
func (*IpsecBackendDump) GetMessageType() api.MessageType {
return api.RequestMessage
}
// IpsecInterfaceAddDelSpd represents VPP binary API message 'ipsec_interface_add_del_spd'.
type IpsecInterfaceAddDelSpd struct {
IsAdd uint8
SwIfIndex uint32
SpdID uint32
}
func (*IpsecInterfaceAddDelSpd) GetMessageName() string {
return "ipsec_interface_add_del_spd"
}
func (*IpsecInterfaceAddDelSpd) GetCrcString() string {
return "1e3b8286"
}
func (*IpsecInterfaceAddDelSpd) GetMessageType() api.MessageType {
return api.RequestMessage
}
// IpsecInterfaceAddDelSpdReply represents VPP binary API message 'ipsec_interface_add_del_spd_reply'.
type IpsecInterfaceAddDelSpdReply struct {
Retval int32
}
func (*IpsecInterfaceAddDelSpdReply) GetMessageName() string {
return "ipsec_interface_add_del_spd_reply"
}
func (*IpsecInterfaceAddDelSpdReply) GetCrcString() string {
return "e8d4e804"
}
func (*IpsecInterfaceAddDelSpdReply) GetMessageType() api.MessageType {
return api.ReplyMessage
}
// IpsecSaDetails represents VPP binary API message 'ipsec_sa_details'.
type IpsecSaDetails struct {
Entry IpsecSadEntry
SwIfIndex uint32
Salt uint32
SeqOutbound uint64
LastSeqInbound uint64
ReplayWindow uint64
TotalDataSize uint64
}
func (*IpsecSaDetails) GetMessageName() string {
return "ipsec_sa_details"
}
func (*IpsecSaDetails) GetCrcString() string {
return "62f0eab8"
}
func (*IpsecSaDetails) GetMessageType() api.MessageType {
return api.ReplyMessage
}
// IpsecSaDump represents VPP binary API message 'ipsec_sa_dump'.
type IpsecSaDump struct {
SaID uint32
}
func (*IpsecSaDump) GetMessageName() string {
return "ipsec_sa_dump"
}
func (*IpsecSaDump) GetCrcString() string {
return "2076c2f4"
}
func (*IpsecSaDump) GetMessageType() api.MessageType {
return api.RequestMessage
}
// IpsecSaSetKey represents VPP binary API message 'ipsec_sa_set_key'.
type IpsecSaSetKey struct {
SaID uint32
CryptoKey Key
IntegrityKey Key
}
func (*IpsecSaSetKey) GetMessageName() string {
return "ipsec_sa_set_key"
}
func (*IpsecSaSetKey) GetCrcString() string {
return "f407f496"
}
func (*IpsecSaSetKey) GetMessageType() api.MessageType {
return api.RequestMessage
}
// IpsecSaSetKeyReply represents VPP binary API message 'ipsec_sa_set_key_reply'.
type IpsecSaSetKeyReply struct {
Retval int32
}
func (*IpsecSaSetKeyReply) GetMessageName() string {
return "ipsec_sa_set_key_reply"
}
func (*IpsecSaSetKeyReply) GetCrcString() string {
return "e8d4e804"
}
func (*IpsecSaSetKeyReply) GetMessageType() api.MessageType {
return api.ReplyMessage
}
// IpsecSadEntryAddDel represents VPP binary API message 'ipsec_sad_entry_add_del'.
type IpsecSadEntryAddDel struct {
IsAdd uint8
Entry IpsecSadEntry
}
func (*IpsecSadEntryAddDel) GetMessageName() string {
return "ipsec_sad_entry_add_del"
}
func (*IpsecSadEntryAddDel) GetCrcString() string {
return "05747d5b"
}
func (*IpsecSadEntryAddDel) GetMessageType() api.MessageType {
return api.RequestMessage
}
// IpsecSadEntryAddDelReply represents VPP binary API message 'ipsec_sad_entry_add_del_reply'.
type IpsecSadEntryAddDelReply struct {
Retval int32
StatIndex uint32
}
func (*IpsecSadEntryAddDelReply) GetMessageName() string {
return "ipsec_sad_entry_add_del_reply"
}
func (*IpsecSadEntryAddDelReply) GetCrcString() string {
return "9ffac24b"
}
func (*IpsecSadEntryAddDelReply) GetMessageType() api.MessageType {
return api.ReplyMessage
}
// IpsecSelectBackend represents VPP binary API message 'ipsec_select_backend'.
type IpsecSelectBackend struct {
Protocol IpsecProto
Index uint8
}
func (*IpsecSelectBackend) GetMessageName() string {
return "ipsec_select_backend"
}
func (*IpsecSelectBackend) GetCrcString() string {
return "b36bcff3"
}
func (*IpsecSelectBackend) GetMessageType() api.MessageType {
return api.RequestMessage
}
// IpsecSelectBackendReply represents VPP binary API message 'ipsec_select_backend_reply'.
type IpsecSelectBackendReply struct {
Retval int32
}
func (*IpsecSelectBackendReply) GetMessageName() string {
return "ipsec_select_backend_reply"
}
func (*IpsecSelectBackendReply) GetCrcString() string {
return "e8d4e804"
}
func (*IpsecSelectBackendReply) GetMessageType() api.MessageType {
return api.ReplyMessage
}
// IpsecSpdAddDel represents VPP binary API message 'ipsec_spd_add_del'.
type IpsecSpdAddDel struct {
IsAdd uint8
SpdID uint32
}
func (*IpsecSpdAddDel) GetMessageName() string {
return "ipsec_spd_add_del"
}
func (*IpsecSpdAddDel) GetCrcString() string {
return "9ffdf5da"
}
func (*IpsecSpdAddDel) GetMessageType() api.MessageType {
return api.RequestMessage
}
// IpsecSpdAddDelReply represents VPP binary API message 'ipsec_spd_add_del_reply'.
type IpsecSpdAddDelReply struct {
Retval int32
}
func (*IpsecSpdAddDelReply) GetMessageName() string {
return "ipsec_spd_add_del_reply"
}
func (*IpsecSpdAddDelReply) GetCrcString() string {
return "e8d4e804"
}
func (*IpsecSpdAddDelReply) GetMessageType() api.MessageType {
return api.ReplyMessage
}
// IpsecSpdDetails represents VPP binary API message 'ipsec_spd_details'.
type IpsecSpdDetails struct {
Entry IpsecSpdEntry
}
func (*IpsecSpdDetails) GetMessageName() string {
return "ipsec_spd_details"
}
func (*IpsecSpdDetails) GetCrcString() string {
return "928e5fcc"
}
func (*IpsecSpdDetails) GetMessageType() api.MessageType {
return api.ReplyMessage
}
// IpsecSpdDump represents VPP binary API message 'ipsec_spd_dump'.
type IpsecSpdDump struct {
SpdID uint32
SaID uint32
}
func (*IpsecSpdDump) GetMessageName() string {
return "ipsec_spd_dump"
}
func (*IpsecSpdDump) GetCrcString() string {
return "afefbf7d"
}
func (*IpsecSpdDump) GetMessageType() api.MessageType {
return api.RequestMessage
}
// IpsecSpdEntryAddDel represents VPP binary API message 'ipsec_spd_entry_add_del'.
type IpsecSpdEntryAddDel struct {
IsAdd uint8
Entry IpsecSpdEntry
}
func (*IpsecSpdEntryAddDel) GetMessageName() string {
return "ipsec_spd_entry_add_del"
}
func (*IpsecSpdEntryAddDel) GetCrcString() string {
return "bbab53da"
}
func (*IpsecSpdEntryAddDel) GetMessageType() api.MessageType {
return api.RequestMessage
}
// IpsecSpdEntryAddDelReply represents VPP binary API message 'ipsec_spd_entry_add_del_reply'.
type IpsecSpdEntryAddDelReply struct {
Retval int32
StatIndex uint32
}
func (*IpsecSpdEntryAddDelReply) GetMessageName() string {
return "ipsec_spd_entry_add_del_reply"
}
func (*IpsecSpdEntryAddDelReply) GetCrcString() string {
return "9ffac24b"
}
func (*IpsecSpdEntryAddDelReply) GetMessageType() api.MessageType {
return api.ReplyMessage
}
// IpsecSpdInterfaceDetails represents VPP binary API message 'ipsec_spd_interface_details'.
type IpsecSpdInterfaceDetails struct {
SpdIndex uint32
SwIfIndex uint32
}
func (*IpsecSpdInterfaceDetails) GetMessageName() string {
return "ipsec_spd_interface_details"
}
func (*IpsecSpdInterfaceDetails) GetCrcString() string {
return "2c54296d"
}
func (*IpsecSpdInterfaceDetails) GetMessageType() api.MessageType {
return api.ReplyMessage
}
// IpsecSpdInterfaceDump represents VPP binary API message 'ipsec_spd_interface_dump'.
type IpsecSpdInterfaceDump struct {
SpdIndex uint32
SpdIndexValid uint8
}
func (*IpsecSpdInterfaceDump) GetMessageName() string {
return "ipsec_spd_interface_dump"
}
func (*IpsecSpdInterfaceDump) GetCrcString() string {
return "8971de19"
}
func (*IpsecSpdInterfaceDump) GetMessageType() api.MessageType {
return api.RequestMessage
}
// IpsecSpdsDetails represents VPP binary API message 'ipsec_spds_details'.
type IpsecSpdsDetails struct {
SpdID uint32
Npolicies uint32
}
func (*IpsecSpdsDetails) GetMessageName() string {
return "ipsec_spds_details"
}
func (*IpsecSpdsDetails) GetCrcString() string {
return "a04bb254"
}
func (*IpsecSpdsDetails) GetMessageType() api.MessageType {
return api.ReplyMessage
}
// IpsecSpdsDump represents VPP binary API message 'ipsec_spds_dump'.
type IpsecSpdsDump struct{}
func (*IpsecSpdsDump) GetMessageName() string {
return "ipsec_spds_dump"
}
func (*IpsecSpdsDump) GetCrcString() string {
return "51077d14"
}
func (*IpsecSpdsDump) GetMessageType() api.MessageType {
return api.RequestMessage
}
// IpsecTunnelIfAddDel represents VPP binary API message 'ipsec_tunnel_if_add_del'.
type IpsecTunnelIfAddDel struct {
IsAdd uint8
Esn uint8
AntiReplay uint8
LocalIP Address
RemoteIP Address
LocalSpi uint32
RemoteSpi uint32
CryptoAlg uint8
LocalCryptoKeyLen uint8
LocalCryptoKey []byte `struc:"[128]byte"`
RemoteCryptoKeyLen uint8
RemoteCryptoKey []byte `struc:"[128]byte"`
IntegAlg uint8
LocalIntegKeyLen uint8
LocalIntegKey []byte `struc:"[128]byte"`
RemoteIntegKeyLen uint8
RemoteIntegKey []byte `struc:"[128]byte"`
Renumber uint8
ShowInstance uint32
UDPEncap uint8
TxTableID uint32
}
func (*IpsecTunnelIfAddDel) GetMessageName() string {
return "ipsec_tunnel_if_add_del"
}
func (*IpsecTunnelIfAddDel) GetCrcString() string {
return "58e7f5ee"
}
func (*IpsecTunnelIfAddDel) GetMessageType() api.MessageType {
return api.RequestMessage
}
// IpsecTunnelIfAddDelReply represents VPP binary API message 'ipsec_tunnel_if_add_del_reply'.
type IpsecTunnelIfAddDelReply struct {
Retval int32
SwIfIndex uint32
}
func (*IpsecTunnelIfAddDelReply) GetMessageName() string {
return "ipsec_tunnel_if_add_del_reply"
}
func (*IpsecTunnelIfAddDelReply) GetCrcString() string {
return "fda5941f"
}
func (*IpsecTunnelIfAddDelReply) GetMessageType() api.MessageType {
return api.ReplyMessage
}
// IpsecTunnelIfSetKey represents VPP binary API message 'ipsec_tunnel_if_set_key'.
type IpsecTunnelIfSetKey struct {
SwIfIndex uint32
KeyType uint8
Alg uint8
KeyLen uint8
Key []byte `struc:"[128]byte"`
}
func (*IpsecTunnelIfSetKey) GetMessageName() string {
return "ipsec_tunnel_if_set_key"
}
func (*IpsecTunnelIfSetKey) GetCrcString() string {
return "326169a8"
}
func (*IpsecTunnelIfSetKey) GetMessageType() api.MessageType {
return api.RequestMessage
}
// IpsecTunnelIfSetKeyReply represents VPP binary API message 'ipsec_tunnel_if_set_key_reply'.
type IpsecTunnelIfSetKeyReply struct {
Retval int32
}
func (*IpsecTunnelIfSetKeyReply) GetMessageName() string {
return "ipsec_tunnel_if_set_key_reply"
}
func (*IpsecTunnelIfSetKeyReply) GetCrcString() string {
return "e8d4e804"
}
func (*IpsecTunnelIfSetKeyReply) GetMessageType() api.MessageType {
return api.ReplyMessage
}
// IpsecTunnelIfSetSa represents VPP binary API message 'ipsec_tunnel_if_set_sa'.
type IpsecTunnelIfSetSa struct {
SwIfIndex uint32
SaID uint32
IsOutbound uint8
}
func (*IpsecTunnelIfSetSa) GetMessageName() string {
return "ipsec_tunnel_if_set_sa"
}
func (*IpsecTunnelIfSetSa) GetCrcString() string {
return "6ab567f2"
}
func (*IpsecTunnelIfSetSa) GetMessageType() api.MessageType {
return api.RequestMessage
}
// IpsecTunnelIfSetSaReply represents VPP binary API message 'ipsec_tunnel_if_set_sa_reply'.
type IpsecTunnelIfSetSaReply struct {
Retval int32
}
func (*IpsecTunnelIfSetSaReply) GetMessageName() string {
return "ipsec_tunnel_if_set_sa_reply"
}
func (*IpsecTunnelIfSetSaReply) GetCrcString() string {
return "e8d4e804"
}
func (*IpsecTunnelIfSetSaReply) GetMessageType() api.MessageType {
return api.ReplyMessage
}
func init() {
api.RegisterMessage((*IpsecBackendDetails)(nil), "ipsec.IpsecBackendDetails")
api.RegisterMessage((*IpsecBackendDump)(nil), "ipsec.IpsecBackendDump")
api.RegisterMessage((*IpsecInterfaceAddDelSpd)(nil), "ipsec.IpsecInterfaceAddDelSpd")
api.RegisterMessage((*IpsecInterfaceAddDelSpdReply)(nil), "ipsec.IpsecInterfaceAddDelSpdReply")
api.RegisterMessage((*IpsecSaDetails)(nil), "ipsec.IpsecSaDetails")
api.RegisterMessage((*IpsecSaDump)(nil), "ipsec.IpsecSaDump")
api.RegisterMessage((*IpsecSaSetKey)(nil), "ipsec.IpsecSaSetKey")
api.RegisterMessage((*IpsecSaSetKeyReply)(nil), "ipsec.IpsecSaSetKeyReply")
api.RegisterMessage((*IpsecSadEntryAddDel)(nil), "ipsec.IpsecSadEntryAddDel")
api.RegisterMessage((*IpsecSadEntryAddDelReply)(nil), "ipsec.IpsecSadEntryAddDelReply")
api.RegisterMessage((*IpsecSelectBackend)(nil), "ipsec.IpsecSelectBackend")
api.RegisterMessage((*IpsecSelectBackendReply)(nil), "ipsec.IpsecSelectBackendReply")
api.RegisterMessage((*IpsecSpdAddDel)(nil), "ipsec.IpsecSpdAddDel")
api.RegisterMessage((*IpsecSpdAddDelReply)(nil), "ipsec.IpsecSpdAddDelReply")
api.RegisterMessage((*IpsecSpdDetails)(nil), "ipsec.IpsecSpdDetails")
api.RegisterMessage((*IpsecSpdDump)(nil), "ipsec.IpsecSpdDump")
api.RegisterMessage((*IpsecSpdEntryAddDel)(nil), "ipsec.IpsecSpdEntryAddDel")
api.RegisterMessage((*IpsecSpdEntryAddDelReply)(nil), "ipsec.IpsecSpdEntryAddDelReply")
api.RegisterMessage((*IpsecSpdInterfaceDetails)(nil), "ipsec.IpsecSpdInterfaceDetails")
api.RegisterMessage((*IpsecSpdInterfaceDump)(nil), "ipsec.IpsecSpdInterfaceDump")
api.RegisterMessage((*IpsecSpdsDetails)(nil), "ipsec.IpsecSpdsDetails")
api.RegisterMessage((*IpsecSpdsDump)(nil), "ipsec.IpsecSpdsDump")
api.RegisterMessage((*IpsecTunnelIfAddDel)(nil), "ipsec.IpsecTunnelIfAddDel")
api.RegisterMessage((*IpsecTunnelIfAddDelReply)(nil), "ipsec.IpsecTunnelIfAddDelReply")
api.RegisterMessage((*IpsecTunnelIfSetKey)(nil), "ipsec.IpsecTunnelIfSetKey")
api.RegisterMessage((*IpsecTunnelIfSetKeyReply)(nil), "ipsec.IpsecTunnelIfSetKeyReply")
api.RegisterMessage((*IpsecTunnelIfSetSa)(nil), "ipsec.IpsecTunnelIfSetSa")
api.RegisterMessage((*IpsecTunnelIfSetSaReply)(nil), "ipsec.IpsecTunnelIfSetSaReply")
}
// Messages returns list of all messages in this module.
func AllMessages() []api.Message {
return []api.Message{
(*IpsecBackendDetails)(nil),
(*IpsecBackendDump)(nil),
(*IpsecInterfaceAddDelSpd)(nil),
(*IpsecInterfaceAddDelSpdReply)(nil),
(*IpsecSaDetails)(nil),
(*IpsecSaDump)(nil),
(*IpsecSaSetKey)(nil),
(*IpsecSaSetKeyReply)(nil),
(*IpsecSadEntryAddDel)(nil),
(*IpsecSadEntryAddDelReply)(nil),
(*IpsecSelectBackend)(nil),
(*IpsecSelectBackendReply)(nil),
(*IpsecSpdAddDel)(nil),
(*IpsecSpdAddDelReply)(nil),
(*IpsecSpdDetails)(nil),
(*IpsecSpdDump)(nil),
(*IpsecSpdEntryAddDel)(nil),
(*IpsecSpdEntryAddDelReply)(nil),
(*IpsecSpdInterfaceDetails)(nil),
(*IpsecSpdInterfaceDump)(nil),
(*IpsecSpdsDetails)(nil),
(*IpsecSpdsDump)(nil),
(*IpsecTunnelIfAddDel)(nil),
(*IpsecTunnelIfAddDelReply)(nil),
(*IpsecTunnelIfSetKey)(nil),
(*IpsecTunnelIfSetKeyReply)(nil),
(*IpsecTunnelIfSetSa)(nil),
(*IpsecTunnelIfSetSaReply)(nil),
}
}
// RPCService represents RPC service API for ipsec module.
type RPCService interface {
DumpIpsecBackend(ctx context.Context, in *IpsecBackendDump) (RPCService_DumpIpsecBackendClient, error)
DumpIpsecSa(ctx context.Context, in *IpsecSaDump) (RPCService_DumpIpsecSaClient, error)
DumpIpsecSpd(ctx context.Context, in *IpsecSpdDump) (RPCService_DumpIpsecSpdClient, error)
DumpIpsecSpdInterface(ctx context.Context, in *IpsecSpdInterfaceDump) (RPCService_DumpIpsecSpdInterfaceClient, error)
DumpIpsecSpds(ctx context.Context, in *IpsecSpdsDump) (RPCService_DumpIpsecSpdsClient, error)
IpsecInterfaceAddDelSpd(ctx context.Context, in *IpsecInterfaceAddDelSpd) (*IpsecInterfaceAddDelSpdReply, error)
IpsecSaSetKey(ctx context.Context, in *IpsecSaSetKey) (*IpsecSaSetKeyReply, error)
IpsecSadEntryAddDel(ctx context.Context, in *IpsecSadEntryAddDel) (*IpsecSadEntryAddDelReply, error)
IpsecSelectBackend(ctx context.Context, in *IpsecSelectBackend) (*IpsecSelectBackendReply, error)
IpsecSpdAddDel(ctx context.Context, in *IpsecSpdAddDel) (*IpsecSpdAddDelReply, error)
IpsecSpdEntryAddDel(ctx context.Context, in *IpsecSpdEntryAddDel) (*IpsecSpdEntryAddDelReply, error)
IpsecTunnelIfAddDel(ctx context.Context, in *IpsecTunnelIfAddDel) (*IpsecTunnelIfAddDelReply, error)
IpsecTunnelIfSetKey(ctx context.Context, in *IpsecTunnelIfSetKey) (*IpsecTunnelIfSetKeyReply, error)
IpsecTunnelIfSetSa(ctx context.Context, in *IpsecTunnelIfSetSa) (*IpsecTunnelIfSetSaReply, error)
}
type serviceClient struct {
ch api.Channel
}
func NewServiceClient(ch api.Channel) RPCService {
return &serviceClient{ch}
}
func (c *serviceClient) DumpIpsecBackend(ctx context.Context, in *IpsecBackendDump) (RPCService_DumpIpsecBackendClient, error) {
stream := c.ch.SendMultiRequest(in)
x := &serviceClient_DumpIpsecBackendClient{stream}
return x, nil
}
type RPCService_DumpIpsecBackendClient interface {
Recv() (*IpsecBackendDetails, error)
}
type serviceClient_DumpIpsecBackendClient struct {