Update generated binapi to v22.02 & makefile changes
[govpp.git] / internal / testbinapi / binapi2001 / ipsec / ipsec.ba.go
1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
2 // versions:
3 //  binapi-generator: v0.5.0-dev
4 //  VPP:              20.01
5 // source: .vppapi/core/ipsec.api.json
6
7 // Package ipsec contains generated bindings for API file ipsec.api.
8 //
9 // Contents:
10 //   6 aliases
11 //  15 enums
12 //  10 structs
13 //   1 union
14 //  30 messages
15 //
16 package ipsec
17
18 import (
19         "fmt"
20         "net"
21         "strconv"
22         "strings"
23
24         api "git.fd.io/govpp.git/api"
25         codec "git.fd.io/govpp.git/codec"
26 )
27
28 // This is a compile-time assertion to ensure that this generated file
29 // is compatible with the GoVPP api package it is being compiled against.
30 // A compilation error at this line likely means your copy of the
31 // GoVPP api package needs to be updated.
32 const _ = api.GoVppAPIPackageIsVersion2
33
34 const (
35         APIFile    = "ipsec"
36         APIVersion = "3.0.0"
37         VersionCrc = 0x5a59fef9
38 )
39
40 // AddressFamily defines enum 'address_family'.
41 type AddressFamily uint32
42
43 const (
44         ADDRESS_IP4 AddressFamily = 0
45         ADDRESS_IP6 AddressFamily = 1
46 )
47
48 var (
49         AddressFamily_name = map[uint32]string{
50                 0: "ADDRESS_IP4",
51                 1: "ADDRESS_IP6",
52         }
53         AddressFamily_value = map[string]uint32{
54                 "ADDRESS_IP4": 0,
55                 "ADDRESS_IP6": 1,
56         }
57 )
58
59 func (x AddressFamily) String() string {
60         s, ok := AddressFamily_name[uint32(x)]
61         if ok {
62                 return s
63         }
64         return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
65 }
66
67 // IfStatusFlags defines enum 'if_status_flags'.
68 type IfStatusFlags uint32
69
70 const (
71         IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
72         IF_STATUS_API_FLAG_LINK_UP  IfStatusFlags = 2
73 )
74
75 var (
76         IfStatusFlags_name = map[uint32]string{
77                 1: "IF_STATUS_API_FLAG_ADMIN_UP",
78                 2: "IF_STATUS_API_FLAG_LINK_UP",
79         }
80         IfStatusFlags_value = map[string]uint32{
81                 "IF_STATUS_API_FLAG_ADMIN_UP": 1,
82                 "IF_STATUS_API_FLAG_LINK_UP":  2,
83         }
84 )
85
86 func (x IfStatusFlags) String() string {
87         s, ok := IfStatusFlags_name[uint32(x)]
88         if ok {
89                 return s
90         }
91         str := func(n uint32) string {
92                 s, ok := IfStatusFlags_name[uint32(n)]
93                 if ok {
94                         return s
95                 }
96                 return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
97         }
98         for i := uint32(0); i <= 32; i++ {
99                 val := uint32(x)
100                 if val&(1<<i) != 0 {
101                         if s != "" {
102                                 s += "|"
103                         }
104                         s += str(1 << i)
105                 }
106         }
107         if s == "" {
108                 return str(uint32(x))
109         }
110         return s
111 }
112
113 // IfType defines enum 'if_type'.
114 type IfType uint32
115
116 const (
117         IF_API_TYPE_HARDWARE IfType = 1
118         IF_API_TYPE_SUB      IfType = 2
119         IF_API_TYPE_P2P      IfType = 3
120         IF_API_TYPE_PIPE     IfType = 4
121 )
122
123 var (
124         IfType_name = map[uint32]string{
125                 1: "IF_API_TYPE_HARDWARE",
126                 2: "IF_API_TYPE_SUB",
127                 3: "IF_API_TYPE_P2P",
128                 4: "IF_API_TYPE_PIPE",
129         }
130         IfType_value = map[string]uint32{
131                 "IF_API_TYPE_HARDWARE": 1,
132                 "IF_API_TYPE_SUB":      2,
133                 "IF_API_TYPE_P2P":      3,
134                 "IF_API_TYPE_PIPE":     4,
135         }
136 )
137
138 func (x IfType) String() string {
139         s, ok := IfType_name[uint32(x)]
140         if ok {
141                 return s
142         }
143         return "IfType(" + strconv.Itoa(int(x)) + ")"
144 }
145
146 // IPDscp defines enum 'ip_dscp'.
147 type IPDscp uint8
148
149 const (
150         IP_API_DSCP_CS0  IPDscp = 0
151         IP_API_DSCP_CS1  IPDscp = 8
152         IP_API_DSCP_AF11 IPDscp = 10
153         IP_API_DSCP_AF12 IPDscp = 12
154         IP_API_DSCP_AF13 IPDscp = 14
155         IP_API_DSCP_CS2  IPDscp = 16
156         IP_API_DSCP_AF21 IPDscp = 18
157         IP_API_DSCP_AF22 IPDscp = 20
158         IP_API_DSCP_AF23 IPDscp = 22
159         IP_API_DSCP_CS3  IPDscp = 24
160         IP_API_DSCP_AF31 IPDscp = 26
161         IP_API_DSCP_AF32 IPDscp = 28
162         IP_API_DSCP_AF33 IPDscp = 30
163         IP_API_DSCP_CS4  IPDscp = 32
164         IP_API_DSCP_AF41 IPDscp = 34
165         IP_API_DSCP_AF42 IPDscp = 36
166         IP_API_DSCP_AF43 IPDscp = 38
167         IP_API_DSCP_CS5  IPDscp = 40
168         IP_API_DSCP_EF   IPDscp = 46
169         IP_API_DSCP_CS6  IPDscp = 48
170         IP_API_DSCP_CS7  IPDscp = 50
171 )
172
173 var (
174         IPDscp_name = map[uint8]string{
175                 0:  "IP_API_DSCP_CS0",
176                 8:  "IP_API_DSCP_CS1",
177                 10: "IP_API_DSCP_AF11",
178                 12: "IP_API_DSCP_AF12",
179                 14: "IP_API_DSCP_AF13",
180                 16: "IP_API_DSCP_CS2",
181                 18: "IP_API_DSCP_AF21",
182                 20: "IP_API_DSCP_AF22",
183                 22: "IP_API_DSCP_AF23",
184                 24: "IP_API_DSCP_CS3",
185                 26: "IP_API_DSCP_AF31",
186                 28: "IP_API_DSCP_AF32",
187                 30: "IP_API_DSCP_AF33",
188                 32: "IP_API_DSCP_CS4",
189                 34: "IP_API_DSCP_AF41",
190                 36: "IP_API_DSCP_AF42",
191                 38: "IP_API_DSCP_AF43",
192                 40: "IP_API_DSCP_CS5",
193                 46: "IP_API_DSCP_EF",
194                 48: "IP_API_DSCP_CS6",
195                 50: "IP_API_DSCP_CS7",
196         }
197         IPDscp_value = map[string]uint8{
198                 "IP_API_DSCP_CS0":  0,
199                 "IP_API_DSCP_CS1":  8,
200                 "IP_API_DSCP_AF11": 10,
201                 "IP_API_DSCP_AF12": 12,
202                 "IP_API_DSCP_AF13": 14,
203                 "IP_API_DSCP_CS2":  16,
204                 "IP_API_DSCP_AF21": 18,
205                 "IP_API_DSCP_AF22": 20,
206                 "IP_API_DSCP_AF23": 22,
207                 "IP_API_DSCP_CS3":  24,
208                 "IP_API_DSCP_AF31": 26,
209                 "IP_API_DSCP_AF32": 28,
210                 "IP_API_DSCP_AF33": 30,
211                 "IP_API_DSCP_CS4":  32,
212                 "IP_API_DSCP_AF41": 34,
213                 "IP_API_DSCP_AF42": 36,
214                 "IP_API_DSCP_AF43": 38,
215                 "IP_API_DSCP_CS5":  40,
216                 "IP_API_DSCP_EF":   46,
217                 "IP_API_DSCP_CS6":  48,
218                 "IP_API_DSCP_CS7":  50,
219         }
220 )
221
222 func (x IPDscp) String() string {
223         s, ok := IPDscp_name[uint8(x)]
224         if ok {
225                 return s
226         }
227         return "IPDscp(" + strconv.Itoa(int(x)) + ")"
228 }
229
230 // IPEcn defines enum 'ip_ecn'.
231 type IPEcn uint8
232
233 const (
234         IP_API_ECN_NONE IPEcn = 0
235         IP_API_ECN_ECT0 IPEcn = 1
236         IP_API_ECN_ECT1 IPEcn = 2
237         IP_API_ECN_CE   IPEcn = 3
238 )
239
240 var (
241         IPEcn_name = map[uint8]string{
242                 0: "IP_API_ECN_NONE",
243                 1: "IP_API_ECN_ECT0",
244                 2: "IP_API_ECN_ECT1",
245                 3: "IP_API_ECN_CE",
246         }
247         IPEcn_value = map[string]uint8{
248                 "IP_API_ECN_NONE": 0,
249                 "IP_API_ECN_ECT0": 1,
250                 "IP_API_ECN_ECT1": 2,
251                 "IP_API_ECN_CE":   3,
252         }
253 )
254
255 func (x IPEcn) String() string {
256         s, ok := IPEcn_name[uint8(x)]
257         if ok {
258                 return s
259         }
260         return "IPEcn(" + strconv.Itoa(int(x)) + ")"
261 }
262
263 // IPProto defines enum 'ip_proto'.
264 type IPProto uint32
265
266 const (
267         IP_API_PROTO_HOPOPT   IPProto = 0
268         IP_API_PROTO_ICMP     IPProto = 1
269         IP_API_PROTO_IGMP     IPProto = 2
270         IP_API_PROTO_TCP      IPProto = 6
271         IP_API_PROTO_UDP      IPProto = 17
272         IP_API_PROTO_GRE      IPProto = 47
273         IP_API_PROTO_AH       IPProto = 50
274         IP_API_PROTO_ESP      IPProto = 51
275         IP_API_PROTO_EIGRP    IPProto = 88
276         IP_API_PROTO_OSPF     IPProto = 89
277         IP_API_PROTO_SCTP     IPProto = 132
278         IP_API_PROTO_RESERVED IPProto = 255
279 )
280
281 var (
282         IPProto_name = map[uint32]string{
283                 0:   "IP_API_PROTO_HOPOPT",
284                 1:   "IP_API_PROTO_ICMP",
285                 2:   "IP_API_PROTO_IGMP",
286                 6:   "IP_API_PROTO_TCP",
287                 17:  "IP_API_PROTO_UDP",
288                 47:  "IP_API_PROTO_GRE",
289                 50:  "IP_API_PROTO_AH",
290                 51:  "IP_API_PROTO_ESP",
291                 88:  "IP_API_PROTO_EIGRP",
292                 89:  "IP_API_PROTO_OSPF",
293                 132: "IP_API_PROTO_SCTP",
294                 255: "IP_API_PROTO_RESERVED",
295         }
296         IPProto_value = map[string]uint32{
297                 "IP_API_PROTO_HOPOPT":   0,
298                 "IP_API_PROTO_ICMP":     1,
299                 "IP_API_PROTO_IGMP":     2,
300                 "IP_API_PROTO_TCP":      6,
301                 "IP_API_PROTO_UDP":      17,
302                 "IP_API_PROTO_GRE":      47,
303                 "IP_API_PROTO_AH":       50,
304                 "IP_API_PROTO_ESP":      51,
305                 "IP_API_PROTO_EIGRP":    88,
306                 "IP_API_PROTO_OSPF":     89,
307                 "IP_API_PROTO_SCTP":     132,
308                 "IP_API_PROTO_RESERVED": 255,
309         }
310 )
311
312 func (x IPProto) String() string {
313         s, ok := IPProto_name[uint32(x)]
314         if ok {
315                 return s
316         }
317         return "IPProto(" + strconv.Itoa(int(x)) + ")"
318 }
319
320 // IpsecCryptoAlg defines enum 'ipsec_crypto_alg'.
321 type IpsecCryptoAlg uint32
322
323 const (
324         IPSEC_API_CRYPTO_ALG_NONE        IpsecCryptoAlg = 0
325         IPSEC_API_CRYPTO_ALG_AES_CBC_128 IpsecCryptoAlg = 1
326         IPSEC_API_CRYPTO_ALG_AES_CBC_192 IpsecCryptoAlg = 2
327         IPSEC_API_CRYPTO_ALG_AES_CBC_256 IpsecCryptoAlg = 3
328         IPSEC_API_CRYPTO_ALG_AES_CTR_128 IpsecCryptoAlg = 4
329         IPSEC_API_CRYPTO_ALG_AES_CTR_192 IpsecCryptoAlg = 5
330         IPSEC_API_CRYPTO_ALG_AES_CTR_256 IpsecCryptoAlg = 6
331         IPSEC_API_CRYPTO_ALG_AES_GCM_128 IpsecCryptoAlg = 7
332         IPSEC_API_CRYPTO_ALG_AES_GCM_192 IpsecCryptoAlg = 8
333         IPSEC_API_CRYPTO_ALG_AES_GCM_256 IpsecCryptoAlg = 9
334         IPSEC_API_CRYPTO_ALG_DES_CBC     IpsecCryptoAlg = 10
335         IPSEC_API_CRYPTO_ALG_3DES_CBC    IpsecCryptoAlg = 11
336 )
337
338 var (
339         IpsecCryptoAlg_name = map[uint32]string{
340                 0:  "IPSEC_API_CRYPTO_ALG_NONE",
341                 1:  "IPSEC_API_CRYPTO_ALG_AES_CBC_128",
342                 2:  "IPSEC_API_CRYPTO_ALG_AES_CBC_192",
343                 3:  "IPSEC_API_CRYPTO_ALG_AES_CBC_256",
344                 4:  "IPSEC_API_CRYPTO_ALG_AES_CTR_128",
345                 5:  "IPSEC_API_CRYPTO_ALG_AES_CTR_192",
346                 6:  "IPSEC_API_CRYPTO_ALG_AES_CTR_256",
347                 7:  "IPSEC_API_CRYPTO_ALG_AES_GCM_128",
348                 8:  "IPSEC_API_CRYPTO_ALG_AES_GCM_192",
349                 9:  "IPSEC_API_CRYPTO_ALG_AES_GCM_256",
350                 10: "IPSEC_API_CRYPTO_ALG_DES_CBC",
351                 11: "IPSEC_API_CRYPTO_ALG_3DES_CBC",
352         }
353         IpsecCryptoAlg_value = map[string]uint32{
354                 "IPSEC_API_CRYPTO_ALG_NONE":        0,
355                 "IPSEC_API_CRYPTO_ALG_AES_CBC_128": 1,
356                 "IPSEC_API_CRYPTO_ALG_AES_CBC_192": 2,
357                 "IPSEC_API_CRYPTO_ALG_AES_CBC_256": 3,
358                 "IPSEC_API_CRYPTO_ALG_AES_CTR_128": 4,
359                 "IPSEC_API_CRYPTO_ALG_AES_CTR_192": 5,
360                 "IPSEC_API_CRYPTO_ALG_AES_CTR_256": 6,
361                 "IPSEC_API_CRYPTO_ALG_AES_GCM_128": 7,
362                 "IPSEC_API_CRYPTO_ALG_AES_GCM_192": 8,
363                 "IPSEC_API_CRYPTO_ALG_AES_GCM_256": 9,
364                 "IPSEC_API_CRYPTO_ALG_DES_CBC":     10,
365                 "IPSEC_API_CRYPTO_ALG_3DES_CBC":    11,
366         }
367 )
368
369 func (x IpsecCryptoAlg) String() string {
370         s, ok := IpsecCryptoAlg_name[uint32(x)]
371         if ok {
372                 return s
373         }
374         return "IpsecCryptoAlg(" + strconv.Itoa(int(x)) + ")"
375 }
376
377 // IpsecIntegAlg defines enum 'ipsec_integ_alg'.
378 type IpsecIntegAlg uint32
379
380 const (
381         IPSEC_API_INTEG_ALG_NONE        IpsecIntegAlg = 0
382         IPSEC_API_INTEG_ALG_MD5_96      IpsecIntegAlg = 1
383         IPSEC_API_INTEG_ALG_SHA1_96     IpsecIntegAlg = 2
384         IPSEC_API_INTEG_ALG_SHA_256_96  IpsecIntegAlg = 3
385         IPSEC_API_INTEG_ALG_SHA_256_128 IpsecIntegAlg = 4
386         IPSEC_API_INTEG_ALG_SHA_384_192 IpsecIntegAlg = 5
387         IPSEC_API_INTEG_ALG_SHA_512_256 IpsecIntegAlg = 6
388 )
389
390 var (
391         IpsecIntegAlg_name = map[uint32]string{
392                 0: "IPSEC_API_INTEG_ALG_NONE",
393                 1: "IPSEC_API_INTEG_ALG_MD5_96",
394                 2: "IPSEC_API_INTEG_ALG_SHA1_96",
395                 3: "IPSEC_API_INTEG_ALG_SHA_256_96",
396                 4: "IPSEC_API_INTEG_ALG_SHA_256_128",
397                 5: "IPSEC_API_INTEG_ALG_SHA_384_192",
398                 6: "IPSEC_API_INTEG_ALG_SHA_512_256",
399         }
400         IpsecIntegAlg_value = map[string]uint32{
401                 "IPSEC_API_INTEG_ALG_NONE":        0,
402                 "IPSEC_API_INTEG_ALG_MD5_96":      1,
403                 "IPSEC_API_INTEG_ALG_SHA1_96":     2,
404                 "IPSEC_API_INTEG_ALG_SHA_256_96":  3,
405                 "IPSEC_API_INTEG_ALG_SHA_256_128": 4,
406                 "IPSEC_API_INTEG_ALG_SHA_384_192": 5,
407                 "IPSEC_API_INTEG_ALG_SHA_512_256": 6,
408         }
409 )
410
411 func (x IpsecIntegAlg) String() string {
412         s, ok := IpsecIntegAlg_name[uint32(x)]
413         if ok {
414                 return s
415         }
416         return "IpsecIntegAlg(" + strconv.Itoa(int(x)) + ")"
417 }
418
419 // IpsecProto defines enum 'ipsec_proto'.
420 type IpsecProto uint32
421
422 const (
423         IPSEC_API_PROTO_ESP IpsecProto = 1
424         IPSEC_API_PROTO_AH  IpsecProto = 2
425 )
426
427 var (
428         IpsecProto_name = map[uint32]string{
429                 1: "IPSEC_API_PROTO_ESP",
430                 2: "IPSEC_API_PROTO_AH",
431         }
432         IpsecProto_value = map[string]uint32{
433                 "IPSEC_API_PROTO_ESP": 1,
434                 "IPSEC_API_PROTO_AH":  2,
435         }
436 )
437
438 func (x IpsecProto) String() string {
439         s, ok := IpsecProto_name[uint32(x)]
440         if ok {
441                 return s
442         }
443         return "IpsecProto(" + strconv.Itoa(int(x)) + ")"
444 }
445
446 // IpsecSadFlags defines enum 'ipsec_sad_flags'.
447 type IpsecSadFlags uint32
448
449 const (
450         IPSEC_API_SAD_FLAG_NONE            IpsecSadFlags = 0
451         IPSEC_API_SAD_FLAG_USE_ESN         IpsecSadFlags = 1
452         IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY IpsecSadFlags = 2
453         IPSEC_API_SAD_FLAG_IS_TUNNEL       IpsecSadFlags = 4
454         IPSEC_API_SAD_FLAG_IS_TUNNEL_V6    IpsecSadFlags = 8
455         IPSEC_API_SAD_FLAG_UDP_ENCAP       IpsecSadFlags = 16
456 )
457
458 var (
459         IpsecSadFlags_name = map[uint32]string{
460                 0:  "IPSEC_API_SAD_FLAG_NONE",
461                 1:  "IPSEC_API_SAD_FLAG_USE_ESN",
462                 2:  "IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY",
463                 4:  "IPSEC_API_SAD_FLAG_IS_TUNNEL",
464                 8:  "IPSEC_API_SAD_FLAG_IS_TUNNEL_V6",
465                 16: "IPSEC_API_SAD_FLAG_UDP_ENCAP",
466         }
467         IpsecSadFlags_value = map[string]uint32{
468                 "IPSEC_API_SAD_FLAG_NONE":            0,
469                 "IPSEC_API_SAD_FLAG_USE_ESN":         1,
470                 "IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY": 2,
471                 "IPSEC_API_SAD_FLAG_IS_TUNNEL":       4,
472                 "IPSEC_API_SAD_FLAG_IS_TUNNEL_V6":    8,
473                 "IPSEC_API_SAD_FLAG_UDP_ENCAP":       16,
474         }
475 )
476
477 func (x IpsecSadFlags) String() string {
478         s, ok := IpsecSadFlags_name[uint32(x)]
479         if ok {
480                 return s
481         }
482         str := func(n uint32) string {
483                 s, ok := IpsecSadFlags_name[uint32(n)]
484                 if ok {
485                         return s
486                 }
487                 return "IpsecSadFlags(" + strconv.Itoa(int(n)) + ")"
488         }
489         for i := uint32(0); i <= 32; i++ {
490                 val := uint32(x)
491                 if val&(1<<i) != 0 {
492                         if s != "" {
493                                 s += "|"
494                         }
495                         s += str(1 << i)
496                 }
497         }
498         if s == "" {
499                 return str(uint32(x))
500         }
501         return s
502 }
503
504 // IpsecSpdAction defines enum 'ipsec_spd_action'.
505 type IpsecSpdAction uint32
506
507 const (
508         IPSEC_API_SPD_ACTION_BYPASS  IpsecSpdAction = 0
509         IPSEC_API_SPD_ACTION_DISCARD IpsecSpdAction = 1
510         IPSEC_API_SPD_ACTION_RESOLVE IpsecSpdAction = 2
511         IPSEC_API_SPD_ACTION_PROTECT IpsecSpdAction = 3
512 )
513
514 var (
515         IpsecSpdAction_name = map[uint32]string{
516                 0: "IPSEC_API_SPD_ACTION_BYPASS",
517                 1: "IPSEC_API_SPD_ACTION_DISCARD",
518                 2: "IPSEC_API_SPD_ACTION_RESOLVE",
519                 3: "IPSEC_API_SPD_ACTION_PROTECT",
520         }
521         IpsecSpdAction_value = map[string]uint32{
522                 "IPSEC_API_SPD_ACTION_BYPASS":  0,
523                 "IPSEC_API_SPD_ACTION_DISCARD": 1,
524                 "IPSEC_API_SPD_ACTION_RESOLVE": 2,
525                 "IPSEC_API_SPD_ACTION_PROTECT": 3,
526         }
527 )
528
529 func (x IpsecSpdAction) String() string {
530         s, ok := IpsecSpdAction_name[uint32(x)]
531         if ok {
532                 return s
533         }
534         return "IpsecSpdAction(" + strconv.Itoa(int(x)) + ")"
535 }
536
537 // LinkDuplex defines enum 'link_duplex'.
538 type LinkDuplex uint32
539
540 const (
541         LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
542         LINK_DUPLEX_API_HALF    LinkDuplex = 1
543         LINK_DUPLEX_API_FULL    LinkDuplex = 2
544 )
545
546 var (
547         LinkDuplex_name = map[uint32]string{
548                 0: "LINK_DUPLEX_API_UNKNOWN",
549                 1: "LINK_DUPLEX_API_HALF",
550                 2: "LINK_DUPLEX_API_FULL",
551         }
552         LinkDuplex_value = map[string]uint32{
553                 "LINK_DUPLEX_API_UNKNOWN": 0,
554                 "LINK_DUPLEX_API_HALF":    1,
555                 "LINK_DUPLEX_API_FULL":    2,
556         }
557 )
558
559 func (x LinkDuplex) String() string {
560         s, ok := LinkDuplex_name[uint32(x)]
561         if ok {
562                 return s
563         }
564         return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
565 }
566
567 // MtuProto defines enum 'mtu_proto'.
568 type MtuProto uint32
569
570 const (
571         MTU_PROTO_API_L3   MtuProto = 1
572         MTU_PROTO_API_IP4  MtuProto = 2
573         MTU_PROTO_API_IP6  MtuProto = 3
574         MTU_PROTO_API_MPLS MtuProto = 4
575         MTU_PROTO_API_N    MtuProto = 5
576 )
577
578 var (
579         MtuProto_name = map[uint32]string{
580                 1: "MTU_PROTO_API_L3",
581                 2: "MTU_PROTO_API_IP4",
582                 3: "MTU_PROTO_API_IP6",
583                 4: "MTU_PROTO_API_MPLS",
584                 5: "MTU_PROTO_API_N",
585         }
586         MtuProto_value = map[string]uint32{
587                 "MTU_PROTO_API_L3":   1,
588                 "MTU_PROTO_API_IP4":  2,
589                 "MTU_PROTO_API_IP6":  3,
590                 "MTU_PROTO_API_MPLS": 4,
591                 "MTU_PROTO_API_N":    5,
592         }
593 )
594
595 func (x MtuProto) String() string {
596         s, ok := MtuProto_name[uint32(x)]
597         if ok {
598                 return s
599         }
600         return "MtuProto(" + strconv.Itoa(int(x)) + ")"
601 }
602
603 // RxMode defines enum 'rx_mode'.
604 type RxMode uint32
605
606 const (
607         RX_MODE_API_UNKNOWN   RxMode = 0
608         RX_MODE_API_POLLING   RxMode = 1
609         RX_MODE_API_INTERRUPT RxMode = 2
610         RX_MODE_API_ADAPTIVE  RxMode = 3
611         RX_MODE_API_DEFAULT   RxMode = 4
612 )
613
614 var (
615         RxMode_name = map[uint32]string{
616                 0: "RX_MODE_API_UNKNOWN",
617                 1: "RX_MODE_API_POLLING",
618                 2: "RX_MODE_API_INTERRUPT",
619                 3: "RX_MODE_API_ADAPTIVE",
620                 4: "RX_MODE_API_DEFAULT",
621         }
622         RxMode_value = map[string]uint32{
623                 "RX_MODE_API_UNKNOWN":   0,
624                 "RX_MODE_API_POLLING":   1,
625                 "RX_MODE_API_INTERRUPT": 2,
626                 "RX_MODE_API_ADAPTIVE":  3,
627                 "RX_MODE_API_DEFAULT":   4,
628         }
629 )
630
631 func (x RxMode) String() string {
632         s, ok := RxMode_name[uint32(x)]
633         if ok {
634                 return s
635         }
636         return "RxMode(" + strconv.Itoa(int(x)) + ")"
637 }
638
639 // SubIfFlags defines enum 'sub_if_flags'.
640 type SubIfFlags uint32
641
642 const (
643         SUB_IF_API_FLAG_NO_TAGS           SubIfFlags = 1
644         SUB_IF_API_FLAG_ONE_TAG           SubIfFlags = 2
645         SUB_IF_API_FLAG_TWO_TAGS          SubIfFlags = 4
646         SUB_IF_API_FLAG_DOT1AD            SubIfFlags = 8
647         SUB_IF_API_FLAG_EXACT_MATCH       SubIfFlags = 16
648         SUB_IF_API_FLAG_DEFAULT           SubIfFlags = 32
649         SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
650         SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
651         SUB_IF_API_FLAG_MASK_VNET         SubIfFlags = 254
652         SUB_IF_API_FLAG_DOT1AH            SubIfFlags = 256
653 )
654
655 var (
656         SubIfFlags_name = map[uint32]string{
657                 1:   "SUB_IF_API_FLAG_NO_TAGS",
658                 2:   "SUB_IF_API_FLAG_ONE_TAG",
659                 4:   "SUB_IF_API_FLAG_TWO_TAGS",
660                 8:   "SUB_IF_API_FLAG_DOT1AD",
661                 16:  "SUB_IF_API_FLAG_EXACT_MATCH",
662                 32:  "SUB_IF_API_FLAG_DEFAULT",
663                 64:  "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
664                 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
665                 254: "SUB_IF_API_FLAG_MASK_VNET",
666                 256: "SUB_IF_API_FLAG_DOT1AH",
667         }
668         SubIfFlags_value = map[string]uint32{
669                 "SUB_IF_API_FLAG_NO_TAGS":           1,
670                 "SUB_IF_API_FLAG_ONE_TAG":           2,
671                 "SUB_IF_API_FLAG_TWO_TAGS":          4,
672                 "SUB_IF_API_FLAG_DOT1AD":            8,
673                 "SUB_IF_API_FLAG_EXACT_MATCH":       16,
674                 "SUB_IF_API_FLAG_DEFAULT":           32,
675                 "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
676                 "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
677                 "SUB_IF_API_FLAG_MASK_VNET":         254,
678                 "SUB_IF_API_FLAG_DOT1AH":            256,
679         }
680 )
681
682 func (x SubIfFlags) String() string {
683         s, ok := SubIfFlags_name[uint32(x)]
684         if ok {
685                 return s
686         }
687         str := func(n uint32) string {
688                 s, ok := SubIfFlags_name[uint32(n)]
689                 if ok {
690                         return s
691                 }
692                 return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
693         }
694         for i := uint32(0); i <= 32; i++ {
695                 val := uint32(x)
696                 if val&(1<<i) != 0 {
697                         if s != "" {
698                                 s += "|"
699                         }
700                         s += str(1 << i)
701                 }
702         }
703         if s == "" {
704                 return str(uint32(x))
705         }
706         return s
707 }
708
709 // AddressWithPrefix defines alias 'address_with_prefix'.
710 type AddressWithPrefix Prefix
711
712 func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
713         prefix, err := ParsePrefix(s)
714         if err != nil {
715                 return AddressWithPrefix{}, err
716         }
717         return AddressWithPrefix(prefix), nil
718 }
719
720 func (x AddressWithPrefix) String() string {
721         return Prefix(x).String()
722 }
723
724 func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
725         return []byte(x.String()), nil
726 }
727
728 func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
729         prefix, err := ParseAddressWithPrefix(string(text))
730         if err != nil {
731                 return err
732         }
733         *x = prefix
734         return nil
735 }
736
737 // InterfaceIndex defines alias 'interface_index'.
738 type InterfaceIndex uint32
739
740 // IP4Address defines alias 'ip4_address'.
741 type IP4Address [4]uint8
742
743 func ParseIP4Address(s string) (IP4Address, error) {
744         ip := net.ParseIP(s).To4()
745         if ip == nil {
746                 return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
747         }
748         var ipaddr IP4Address
749         copy(ipaddr[:], ip.To4())
750         return ipaddr, nil
751 }
752
753 func (x IP4Address) ToIP() net.IP {
754         return net.IP(x[:]).To4()
755 }
756
757 func (x IP4Address) String() string {
758         return x.ToIP().String()
759 }
760
761 func (x *IP4Address) MarshalText() ([]byte, error) {
762         return []byte(x.String()), nil
763 }
764
765 func (x *IP4Address) UnmarshalText(text []byte) error {
766         ipaddr, err := ParseIP4Address(string(text))
767         if err != nil {
768                 return err
769         }
770         *x = ipaddr
771         return nil
772 }
773
774 // IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
775 type IP4AddressWithPrefix IP4Prefix
776
777 // IP6Address defines alias 'ip6_address'.
778 type IP6Address [16]uint8
779
780 func ParseIP6Address(s string) (IP6Address, error) {
781         ip := net.ParseIP(s).To16()
782         if ip == nil {
783                 return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
784         }
785         var ipaddr IP6Address
786         copy(ipaddr[:], ip.To16())
787         return ipaddr, nil
788 }
789
790 func (x IP6Address) ToIP() net.IP {
791         return net.IP(x[:]).To16()
792 }
793
794 func (x IP6Address) String() string {
795         return x.ToIP().String()
796 }
797
798 func (x *IP6Address) MarshalText() ([]byte, error) {
799         return []byte(x.String()), nil
800 }
801
802 func (x *IP6Address) UnmarshalText(text []byte) error {
803         ipaddr, err := ParseIP6Address(string(text))
804         if err != nil {
805                 return err
806         }
807         *x = ipaddr
808         return nil
809 }
810
811 // IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
812 type IP6AddressWithPrefix IP6Prefix
813
814 // Address defines type 'address'.
815 type Address struct {
816         Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
817         Un AddressUnion  `binapi:"address_union,name=un" json:"un,omitempty"`
818 }
819
820 func ParseAddress(s string) (Address, error) {
821         ip := net.ParseIP(s)
822         if ip == nil {
823                 return Address{}, fmt.Errorf("invalid address: %s", s)
824         }
825         return AddressFromIP(ip), nil
826 }
827
828 func AddressFromIP(ip net.IP) Address {
829         var addr Address
830         if ip.To4() == nil {
831                 addr.Af = ADDRESS_IP6
832                 var ip6 IP6Address
833                 copy(ip6[:], ip.To16())
834                 addr.Un.SetIP6(ip6)
835         } else {
836                 addr.Af = ADDRESS_IP4
837                 var ip4 IP4Address
838                 copy(ip4[:], ip.To4())
839                 addr.Un.SetIP4(ip4)
840         }
841         return addr
842 }
843
844 func (x Address) ToIP() net.IP {
845         if x.Af == ADDRESS_IP6 {
846                 ip6 := x.Un.GetIP6()
847                 return net.IP(ip6[:]).To16()
848         } else {
849                 ip4 := x.Un.GetIP4()
850                 return net.IP(ip4[:]).To4()
851         }
852 }
853
854 func (x Address) String() string {
855         return x.ToIP().String()
856 }
857
858 func (x *Address) MarshalText() ([]byte, error) {
859         return []byte(x.String()), nil
860 }
861
862 func (x *Address) UnmarshalText(text []byte) error {
863         addr, err := ParseAddress(string(text))
864         if err != nil {
865                 return err
866         }
867         *x = addr
868         return nil
869 }
870
871 // IP4Prefix defines type 'ip4_prefix'.
872 type IP4Prefix struct {
873         Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
874         Len     uint8      `binapi:"u8,name=len" json:"len,omitempty"`
875 }
876
877 func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
878         hasPrefix := strings.Contains(s, "/")
879         if hasPrefix {
880                 ip, network, err := net.ParseCIDR(s)
881                 if err != nil {
882                         return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
883                 }
884                 maskSize, _ := network.Mask.Size()
885                 prefix.Len = byte(maskSize)
886                 prefix.Address, err = ParseIP4Address(ip.String())
887                 if err != nil {
888                         return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
889                 }
890         } else {
891                 ip := net.ParseIP(s)
892                 defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
893                 if ip.To4() == nil {
894                         defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
895                 }
896                 prefix.Len = byte(defaultMaskSize)
897                 prefix.Address, err = ParseIP4Address(ip.String())
898                 if err != nil {
899                         return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
900                 }
901         }
902         return prefix, nil
903 }
904
905 func (x IP4Prefix) ToIPNet() *net.IPNet {
906         mask := net.CIDRMask(int(x.Len), 32)
907         ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
908         return ipnet
909 }
910
911 func (x IP4Prefix) String() string {
912         ip := x.Address.String()
913         return ip + "/" + strconv.Itoa(int(x.Len))
914 }
915
916 func (x *IP4Prefix) MarshalText() ([]byte, error) {
917         return []byte(x.String()), nil
918 }
919
920 func (x *IP4Prefix) UnmarshalText(text []byte) error {
921         prefix, err := ParseIP4Prefix(string(text))
922         if err != nil {
923                 return err
924         }
925         *x = prefix
926         return nil
927 }
928
929 // IP6Prefix defines type 'ip6_prefix'.
930 type IP6Prefix struct {
931         Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
932         Len     uint8      `binapi:"u8,name=len" json:"len,omitempty"`
933 }
934
935 func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
936         hasPrefix := strings.Contains(s, "/")
937         if hasPrefix {
938                 ip, network, err := net.ParseCIDR(s)
939                 if err != nil {
940                         return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
941                 }
942                 maskSize, _ := network.Mask.Size()
943                 prefix.Len = byte(maskSize)
944                 prefix.Address, err = ParseIP6Address(ip.String())
945                 if err != nil {
946                         return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
947                 }
948         } else {
949                 ip := net.ParseIP(s)
950                 defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
951                 if ip.To4() == nil {
952                         defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
953                 }
954                 prefix.Len = byte(defaultMaskSize)
955                 prefix.Address, err = ParseIP6Address(ip.String())
956                 if err != nil {
957                         return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
958                 }
959         }
960         return prefix, nil
961 }
962
963 func (x IP6Prefix) ToIPNet() *net.IPNet {
964         mask := net.CIDRMask(int(x.Len), 128)
965         ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
966         return ipnet
967 }
968
969 func (x IP6Prefix) String() string {
970         ip := x.Address.String()
971         return ip + "/" + strconv.Itoa(int(x.Len))
972 }
973
974 func (x *IP6Prefix) MarshalText() ([]byte, error) {
975         return []byte(x.String()), nil
976 }
977
978 func (x *IP6Prefix) UnmarshalText(text []byte) error {
979         prefix, err := ParseIP6Prefix(string(text))
980         if err != nil {
981                 return err
982         }
983         *x = prefix
984         return nil
985 }
986
987 // IpsecSadEntry defines type 'ipsec_sad_entry'.
988 type IpsecSadEntry struct {
989         SadID              uint32         `binapi:"u32,name=sad_id" json:"sad_id,omitempty"`
990         Spi                uint32         `binapi:"u32,name=spi" json:"spi,omitempty"`
991         Protocol           IpsecProto     `binapi:"ipsec_proto,name=protocol" json:"protocol,omitempty"`
992         CryptoAlgorithm    IpsecCryptoAlg `binapi:"ipsec_crypto_alg,name=crypto_algorithm" json:"crypto_algorithm,omitempty"`
993         CryptoKey          Key            `binapi:"key,name=crypto_key" json:"crypto_key,omitempty"`
994         IntegrityAlgorithm IpsecIntegAlg  `binapi:"ipsec_integ_alg,name=integrity_algorithm" json:"integrity_algorithm,omitempty"`
995         IntegrityKey       Key            `binapi:"key,name=integrity_key" json:"integrity_key,omitempty"`
996         Flags              IpsecSadFlags  `binapi:"ipsec_sad_flags,name=flags" json:"flags,omitempty"`
997         TunnelSrc          Address        `binapi:"address,name=tunnel_src" json:"tunnel_src,omitempty"`
998         TunnelDst          Address        `binapi:"address,name=tunnel_dst" json:"tunnel_dst,omitempty"`
999         TxTableID          uint32         `binapi:"u32,name=tx_table_id" json:"tx_table_id,omitempty"`
1000         Salt               uint32         `binapi:"u32,name=salt" json:"salt,omitempty"`
1001 }
1002
1003 // IpsecSpdEntry defines type 'ipsec_spd_entry'.
1004 type IpsecSpdEntry struct {
1005         SpdID              uint32         `binapi:"u32,name=spd_id" json:"spd_id,omitempty"`
1006         Priority           int32          `binapi:"i32,name=priority" json:"priority,omitempty"`
1007         IsOutbound         uint8          `binapi:"u8,name=is_outbound" json:"is_outbound,omitempty"`
1008         SaID               uint32         `binapi:"u32,name=sa_id" json:"sa_id,omitempty"`
1009         Policy             IpsecSpdAction `binapi:"ipsec_spd_action,name=policy" json:"policy,omitempty"`
1010         Protocol           uint8          `binapi:"u8,name=protocol" json:"protocol,omitempty"`
1011         RemoteAddressStart Address        `binapi:"address,name=remote_address_start" json:"remote_address_start,omitempty"`
1012         RemoteAddressStop  Address        `binapi:"address,name=remote_address_stop" json:"remote_address_stop,omitempty"`
1013         LocalAddressStart  Address        `binapi:"address,name=local_address_start" json:"local_address_start,omitempty"`
1014         LocalAddressStop   Address        `binapi:"address,name=local_address_stop" json:"local_address_stop,omitempty"`
1015         RemotePortStart    uint16         `binapi:"u16,name=remote_port_start" json:"remote_port_start,omitempty"`
1016         RemotePortStop     uint16         `binapi:"u16,name=remote_port_stop" json:"remote_port_stop,omitempty"`
1017         LocalPortStart     uint16         `binapi:"u16,name=local_port_start" json:"local_port_start,omitempty"`
1018         LocalPortStop      uint16         `binapi:"u16,name=local_port_stop" json:"local_port_stop,omitempty"`
1019 }
1020
1021 // IpsecTunnelProtect defines type 'ipsec_tunnel_protect'.
1022 type IpsecTunnelProtect struct {
1023         SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1024         SaOut     uint32         `binapi:"u32,name=sa_out" json:"sa_out,omitempty"`
1025         NSaIn     uint8          `binapi:"u8,name=n_sa_in" json:"-"`
1026         SaIn      []uint32       `binapi:"u32[n_sa_in],name=sa_in" json:"sa_in,omitempty"`
1027 }
1028
1029 // Key defines type 'key'.
1030 type Key struct {
1031         Length uint8  `binapi:"u8,name=length" json:"length,omitempty"`
1032         Data   []byte `binapi:"u8[128],name=data" json:"data,omitempty"`
1033 }
1034
1035 // Mprefix defines type 'mprefix'.
1036 type Mprefix struct {
1037         Af               AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
1038         GrpAddressLength uint16        `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
1039         GrpAddress       AddressUnion  `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
1040         SrcAddress       AddressUnion  `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
1041 }
1042
1043 // Prefix defines type 'prefix'.
1044 type Prefix struct {
1045         Address Address `binapi:"address,name=address" json:"address,omitempty"`
1046         Len     uint8   `binapi:"u8,name=len" json:"len,omitempty"`
1047 }
1048
1049 func ParsePrefix(ip string) (prefix Prefix, err error) {
1050         hasPrefix := strings.Contains(ip, "/")
1051         if hasPrefix {
1052                 netIP, network, err := net.ParseCIDR(ip)
1053                 if err != nil {
1054                         return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
1055                 }
1056                 maskSize, _ := network.Mask.Size()
1057                 prefix.Len = byte(maskSize)
1058                 prefix.Address, err = ParseAddress(netIP.String())
1059                 if err != nil {
1060                         return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
1061                 }
1062         } else {
1063                 netIP := net.ParseIP(ip)
1064                 defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
1065                 if netIP.To4() == nil {
1066                         defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
1067                 }
1068                 prefix.Len = byte(defaultMaskSize)
1069                 prefix.Address, err = ParseAddress(netIP.String())
1070                 if err != nil {
1071                         return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
1072                 }
1073         }
1074         return prefix, nil
1075 }
1076
1077 func (x Prefix) ToIPNet() *net.IPNet {
1078         var mask net.IPMask
1079         if x.Address.Af == ADDRESS_IP4 {
1080                 mask = net.CIDRMask(int(x.Len), 32)
1081         } else {
1082                 mask = net.CIDRMask(int(x.Len), 128)
1083         }
1084         ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
1085         return ipnet
1086 }
1087
1088 func (x Prefix) String() string {
1089         ip := x.Address.String()
1090         return ip + "/" + strconv.Itoa(int(x.Len))
1091 }
1092
1093 func (x *Prefix) MarshalText() ([]byte, error) {
1094         return []byte(x.String()), nil
1095 }
1096
1097 func (x *Prefix) UnmarshalText(text []byte) error {
1098         prefix, err := ParsePrefix(string(text))
1099         if err != nil {
1100                 return err
1101         }
1102         *x = prefix
1103         return nil
1104 }
1105
1106 // PrefixMatcher defines type 'prefix_matcher'.
1107 type PrefixMatcher struct {
1108         Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
1109         Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
1110 }
1111
1112 // AddressUnion defines union 'address_union'.
1113 type AddressUnion struct {
1114         // AddressUnion can be one of:
1115         // - IP4 *IP4Address
1116         // - IP6 *IP6Address
1117         XXX_UnionData [16]byte
1118 }
1119
1120 func AddressUnionIP4(a IP4Address) (u AddressUnion) {
1121         u.SetIP4(a)
1122         return
1123 }
1124 func (u *AddressUnion) SetIP4(a IP4Address) {
1125         buf := codec.NewBuffer(u.XXX_UnionData[:])
1126         buf.EncodeBytes(a[:], 4)
1127 }
1128 func (u *AddressUnion) GetIP4() (a IP4Address) {
1129         buf := codec.NewBuffer(u.XXX_UnionData[:])
1130         copy(a[:], buf.DecodeBytes(4))
1131         return
1132 }
1133
1134 func AddressUnionIP6(a IP6Address) (u AddressUnion) {
1135         u.SetIP6(a)
1136         return
1137 }
1138 func (u *AddressUnion) SetIP6(a IP6Address) {
1139         buf := codec.NewBuffer(u.XXX_UnionData[:])
1140         buf.EncodeBytes(a[:], 16)
1141 }
1142 func (u *AddressUnion) GetIP6() (a IP6Address) {
1143         buf := codec.NewBuffer(u.XXX_UnionData[:])
1144         copy(a[:], buf.DecodeBytes(16))
1145         return
1146 }
1147
1148 // IpsecBackendDetails defines message 'ipsec_backend_details'.
1149 type IpsecBackendDetails struct {
1150         Name     []byte     `binapi:"u8[128],name=name" json:"name,omitempty"`
1151         Protocol IpsecProto `binapi:"ipsec_proto,name=protocol" json:"protocol,omitempty"`
1152         Index    uint8      `binapi:"u8,name=index" json:"index,omitempty"`
1153         Active   uint8      `binapi:"u8,name=active" json:"active,omitempty"`
1154 }
1155
1156 func (m *IpsecBackendDetails) Reset()               { *m = IpsecBackendDetails{} }
1157 func (*IpsecBackendDetails) GetMessageName() string { return "ipsec_backend_details" }
1158 func (*IpsecBackendDetails) GetCrcString() string   { return "7700751c" }
1159 func (*IpsecBackendDetails) GetMessageType() api.MessageType {
1160         return api.ReplyMessage
1161 }
1162
1163 func (m *IpsecBackendDetails) Size() (size int) {
1164         if m == nil {
1165                 return 0
1166         }
1167         size += 1 * 128 // m.Name
1168         size += 4       // m.Protocol
1169         size += 1       // m.Index
1170         size += 1       // m.Active
1171         return size
1172 }
1173 func (m *IpsecBackendDetails) Marshal(b []byte) ([]byte, error) {
1174         if b == nil {
1175                 b = make([]byte, m.Size())
1176         }
1177         buf := codec.NewBuffer(b)
1178         buf.EncodeBytes(m.Name, 128)
1179         buf.EncodeUint32(uint32(m.Protocol))
1180         buf.EncodeUint8(m.Index)
1181         buf.EncodeUint8(m.Active)
1182         return buf.Bytes(), nil
1183 }
1184 func (m *IpsecBackendDetails) Unmarshal(b []byte) error {
1185         buf := codec.NewBuffer(b)
1186         m.Name = make([]byte, 128)
1187         copy(m.Name, buf.DecodeBytes(len(m.Name)))
1188         m.Protocol = IpsecProto(buf.DecodeUint32())
1189         m.Index = buf.DecodeUint8()
1190         m.Active = buf.DecodeUint8()
1191         return nil
1192 }
1193
1194 // IpsecBackendDump defines message 'ipsec_backend_dump'.
1195 type IpsecBackendDump struct{}
1196
1197 func (m *IpsecBackendDump) Reset()               { *m = IpsecBackendDump{} }
1198 func (*IpsecBackendDump) GetMessageName() string { return "ipsec_backend_dump" }
1199 func (*IpsecBackendDump) GetCrcString() string   { return "51077d14" }
1200 func (*IpsecBackendDump) GetMessageType() api.MessageType {
1201         return api.RequestMessage
1202 }
1203
1204 func (m *IpsecBackendDump) Size() (size int) {
1205         if m == nil {
1206                 return 0
1207         }
1208         return size
1209 }
1210 func (m *IpsecBackendDump) Marshal(b []byte) ([]byte, error) {
1211         if b == nil {
1212                 b = make([]byte, m.Size())
1213         }
1214         buf := codec.NewBuffer(b)
1215         return buf.Bytes(), nil
1216 }
1217 func (m *IpsecBackendDump) Unmarshal(b []byte) error {
1218         return nil
1219 }
1220
1221 // IpsecInterfaceAddDelSpd defines message 'ipsec_interface_add_del_spd'.
1222 type IpsecInterfaceAddDelSpd struct {
1223         IsAdd     uint8  `binapi:"u8,name=is_add" json:"is_add,omitempty"`
1224         SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
1225         SpdID     uint32 `binapi:"u32,name=spd_id" json:"spd_id,omitempty"`
1226 }
1227
1228 func (m *IpsecInterfaceAddDelSpd) Reset()               { *m = IpsecInterfaceAddDelSpd{} }
1229 func (*IpsecInterfaceAddDelSpd) GetMessageName() string { return "ipsec_interface_add_del_spd" }
1230 func (*IpsecInterfaceAddDelSpd) GetCrcString() string   { return "1e3b8286" }
1231 func (*IpsecInterfaceAddDelSpd) GetMessageType() api.MessageType {
1232         return api.RequestMessage
1233 }
1234
1235 func (m *IpsecInterfaceAddDelSpd) Size() (size int) {
1236         if m == nil {
1237                 return 0
1238         }
1239         size += 1 // m.IsAdd
1240         size += 4 // m.SwIfIndex
1241         size += 4 // m.SpdID
1242         return size
1243 }
1244 func (m *IpsecInterfaceAddDelSpd) Marshal(b []byte) ([]byte, error) {
1245         if b == nil {
1246                 b = make([]byte, m.Size())
1247         }
1248         buf := codec.NewBuffer(b)
1249         buf.EncodeUint8(m.IsAdd)
1250         buf.EncodeUint32(m.SwIfIndex)
1251         buf.EncodeUint32(m.SpdID)
1252         return buf.Bytes(), nil
1253 }
1254 func (m *IpsecInterfaceAddDelSpd) Unmarshal(b []byte) error {
1255         buf := codec.NewBuffer(b)
1256         m.IsAdd = buf.DecodeUint8()
1257         m.SwIfIndex = buf.DecodeUint32()
1258         m.SpdID = buf.DecodeUint32()
1259         return nil
1260 }
1261
1262 // IpsecInterfaceAddDelSpdReply defines message 'ipsec_interface_add_del_spd_reply'.
1263 type IpsecInterfaceAddDelSpdReply struct {
1264         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1265 }
1266
1267 func (m *IpsecInterfaceAddDelSpdReply) Reset() { *m = IpsecInterfaceAddDelSpdReply{} }
1268 func (*IpsecInterfaceAddDelSpdReply) GetMessageName() string {
1269         return "ipsec_interface_add_del_spd_reply"
1270 }
1271 func (*IpsecInterfaceAddDelSpdReply) GetCrcString() string { return "e8d4e804" }
1272 func (*IpsecInterfaceAddDelSpdReply) GetMessageType() api.MessageType {
1273         return api.ReplyMessage
1274 }
1275
1276 func (m *IpsecInterfaceAddDelSpdReply) Size() (size int) {
1277         if m == nil {
1278                 return 0
1279         }
1280         size += 4 // m.Retval
1281         return size
1282 }
1283 func (m *IpsecInterfaceAddDelSpdReply) Marshal(b []byte) ([]byte, error) {
1284         if b == nil {
1285                 b = make([]byte, m.Size())
1286         }
1287         buf := codec.NewBuffer(b)
1288         buf.EncodeInt32(m.Retval)
1289         return buf.Bytes(), nil
1290 }
1291 func (m *IpsecInterfaceAddDelSpdReply) Unmarshal(b []byte) error {
1292         buf := codec.NewBuffer(b)
1293         m.Retval = buf.DecodeInt32()
1294         return nil
1295 }
1296
1297 // IpsecSaDetails defines message 'ipsec_sa_details'.
1298 type IpsecSaDetails struct {
1299         Entry          IpsecSadEntry `binapi:"ipsec_sad_entry,name=entry" json:"entry,omitempty"`
1300         SwIfIndex      uint32        `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
1301         Salt           uint32        `binapi:"u32,name=salt" json:"salt,omitempty"`
1302         SeqOutbound    uint64        `binapi:"u64,name=seq_outbound" json:"seq_outbound,omitempty"`
1303         LastSeqInbound uint64        `binapi:"u64,name=last_seq_inbound" json:"last_seq_inbound,omitempty"`
1304         ReplayWindow   uint64        `binapi:"u64,name=replay_window" json:"replay_window,omitempty"`
1305         TotalDataSize  uint64        `binapi:"u64,name=total_data_size" json:"total_data_size,omitempty"`
1306 }
1307
1308 func (m *IpsecSaDetails) Reset()               { *m = IpsecSaDetails{} }
1309 func (*IpsecSaDetails) GetMessageName() string { return "ipsec_sa_details" }
1310 func (*IpsecSaDetails) GetCrcString() string   { return "9c8d829a" }
1311 func (*IpsecSaDetails) GetMessageType() api.MessageType {
1312         return api.ReplyMessage
1313 }
1314
1315 func (m *IpsecSaDetails) Size() (size int) {
1316         if m == nil {
1317                 return 0
1318         }
1319         size += 4       // m.Entry.SadID
1320         size += 4       // m.Entry.Spi
1321         size += 4       // m.Entry.Protocol
1322         size += 4       // m.Entry.CryptoAlgorithm
1323         size += 1       // m.Entry.CryptoKey.Length
1324         size += 1 * 128 // m.Entry.CryptoKey.Data
1325         size += 4       // m.Entry.IntegrityAlgorithm
1326         size += 1       // m.Entry.IntegrityKey.Length
1327         size += 1 * 128 // m.Entry.IntegrityKey.Data
1328         size += 4       // m.Entry.Flags
1329         size += 4       // m.Entry.TunnelSrc.Af
1330         size += 1 * 16  // m.Entry.TunnelSrc.Un
1331         size += 4       // m.Entry.TunnelDst.Af
1332         size += 1 * 16  // m.Entry.TunnelDst.Un
1333         size += 4       // m.Entry.TxTableID
1334         size += 4       // m.Entry.Salt
1335         size += 4       // m.SwIfIndex
1336         size += 4       // m.Salt
1337         size += 8       // m.SeqOutbound
1338         size += 8       // m.LastSeqInbound
1339         size += 8       // m.ReplayWindow
1340         size += 8       // m.TotalDataSize
1341         return size
1342 }
1343 func (m *IpsecSaDetails) Marshal(b []byte) ([]byte, error) {
1344         if b == nil {
1345                 b = make([]byte, m.Size())
1346         }
1347         buf := codec.NewBuffer(b)
1348         buf.EncodeUint32(m.Entry.SadID)
1349         buf.EncodeUint32(m.Entry.Spi)
1350         buf.EncodeUint32(uint32(m.Entry.Protocol))
1351         buf.EncodeUint32(uint32(m.Entry.CryptoAlgorithm))
1352         buf.EncodeUint8(m.Entry.CryptoKey.Length)
1353         buf.EncodeBytes(m.Entry.CryptoKey.Data, 128)
1354         buf.EncodeUint32(uint32(m.Entry.IntegrityAlgorithm))
1355         buf.EncodeUint8(m.Entry.IntegrityKey.Length)
1356         buf.EncodeBytes(m.Entry.IntegrityKey.Data, 128)
1357         buf.EncodeUint32(uint32(m.Entry.Flags))
1358         buf.EncodeUint32(uint32(m.Entry.TunnelSrc.Af))
1359         buf.EncodeBytes(m.Entry.TunnelSrc.Un.XXX_UnionData[:], 16)
1360         buf.EncodeUint32(uint32(m.Entry.TunnelDst.Af))
1361         buf.EncodeBytes(m.Entry.TunnelDst.Un.XXX_UnionData[:], 16)
1362         buf.EncodeUint32(m.Entry.TxTableID)
1363         buf.EncodeUint32(m.Entry.Salt)
1364         buf.EncodeUint32(m.SwIfIndex)
1365         buf.EncodeUint32(m.Salt)
1366         buf.EncodeUint64(m.SeqOutbound)
1367         buf.EncodeUint64(m.LastSeqInbound)
1368         buf.EncodeUint64(m.ReplayWindow)
1369         buf.EncodeUint64(m.TotalDataSize)
1370         return buf.Bytes(), nil
1371 }
1372 func (m *IpsecSaDetails) Unmarshal(b []byte) error {
1373         buf := codec.NewBuffer(b)
1374         m.Entry.SadID = buf.DecodeUint32()
1375         m.Entry.Spi = buf.DecodeUint32()
1376         m.Entry.Protocol = IpsecProto(buf.DecodeUint32())
1377         m.Entry.CryptoAlgorithm = IpsecCryptoAlg(buf.DecodeUint32())
1378         m.Entry.CryptoKey.Length = buf.DecodeUint8()
1379         m.Entry.CryptoKey.Data = make([]byte, 128)
1380         copy(m.Entry.CryptoKey.Data, buf.DecodeBytes(len(m.Entry.CryptoKey.Data)))
1381         m.Entry.IntegrityAlgorithm = IpsecIntegAlg(buf.DecodeUint32())
1382         m.Entry.IntegrityKey.Length = buf.DecodeUint8()
1383         m.Entry.IntegrityKey.Data = make([]byte, 128)
1384         copy(m.Entry.IntegrityKey.Data, buf.DecodeBytes(len(m.Entry.IntegrityKey.Data)))
1385         m.Entry.Flags = IpsecSadFlags(buf.DecodeUint32())
1386         m.Entry.TunnelSrc.Af = AddressFamily(buf.DecodeUint32())
1387         copy(m.Entry.TunnelSrc.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1388         m.Entry.TunnelDst.Af = AddressFamily(buf.DecodeUint32())
1389         copy(m.Entry.TunnelDst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1390         m.Entry.TxTableID = buf.DecodeUint32()
1391         m.Entry.Salt = buf.DecodeUint32()
1392         m.SwIfIndex = buf.DecodeUint32()
1393         m.Salt = buf.DecodeUint32()
1394         m.SeqOutbound = buf.DecodeUint64()
1395         m.LastSeqInbound = buf.DecodeUint64()
1396         m.ReplayWindow = buf.DecodeUint64()
1397         m.TotalDataSize = buf.DecodeUint64()
1398         return nil
1399 }
1400
1401 // IpsecSaDump defines message 'ipsec_sa_dump'.
1402 type IpsecSaDump struct {
1403         SaID uint32 `binapi:"u32,name=sa_id" json:"sa_id,omitempty"`
1404 }
1405
1406 func (m *IpsecSaDump) Reset()               { *m = IpsecSaDump{} }
1407 func (*IpsecSaDump) GetMessageName() string { return "ipsec_sa_dump" }
1408 func (*IpsecSaDump) GetCrcString() string   { return "2076c2f4" }
1409 func (*IpsecSaDump) GetMessageType() api.MessageType {
1410         return api.RequestMessage
1411 }
1412
1413 func (m *IpsecSaDump) Size() (size int) {
1414         if m == nil {
1415                 return 0
1416         }
1417         size += 4 // m.SaID
1418         return size
1419 }
1420 func (m *IpsecSaDump) Marshal(b []byte) ([]byte, error) {
1421         if b == nil {
1422                 b = make([]byte, m.Size())
1423         }
1424         buf := codec.NewBuffer(b)
1425         buf.EncodeUint32(m.SaID)
1426         return buf.Bytes(), nil
1427 }
1428 func (m *IpsecSaDump) Unmarshal(b []byte) error {
1429         buf := codec.NewBuffer(b)
1430         m.SaID = buf.DecodeUint32()
1431         return nil
1432 }
1433
1434 // IpsecSadEntryAddDel defines message 'ipsec_sad_entry_add_del'.
1435 type IpsecSadEntryAddDel struct {
1436         IsAdd uint8         `binapi:"u8,name=is_add" json:"is_add,omitempty"`
1437         Entry IpsecSadEntry `binapi:"ipsec_sad_entry,name=entry" json:"entry,omitempty"`
1438 }
1439
1440 func (m *IpsecSadEntryAddDel) Reset()               { *m = IpsecSadEntryAddDel{} }
1441 func (*IpsecSadEntryAddDel) GetMessageName() string { return "ipsec_sad_entry_add_del" }
1442 func (*IpsecSadEntryAddDel) GetCrcString() string   { return "a25ab61e" }
1443 func (*IpsecSadEntryAddDel) GetMessageType() api.MessageType {
1444         return api.RequestMessage
1445 }
1446
1447 func (m *IpsecSadEntryAddDel) Size() (size int) {
1448         if m == nil {
1449                 return 0
1450         }
1451         size += 1       // m.IsAdd
1452         size += 4       // m.Entry.SadID
1453         size += 4       // m.Entry.Spi
1454         size += 4       // m.Entry.Protocol
1455         size += 4       // m.Entry.CryptoAlgorithm
1456         size += 1       // m.Entry.CryptoKey.Length
1457         size += 1 * 128 // m.Entry.CryptoKey.Data
1458         size += 4       // m.Entry.IntegrityAlgorithm
1459         size += 1       // m.Entry.IntegrityKey.Length
1460         size += 1 * 128 // m.Entry.IntegrityKey.Data
1461         size += 4       // m.Entry.Flags
1462         size += 4       // m.Entry.TunnelSrc.Af
1463         size += 1 * 16  // m.Entry.TunnelSrc.Un
1464         size += 4       // m.Entry.TunnelDst.Af
1465         size += 1 * 16  // m.Entry.TunnelDst.Un
1466         size += 4       // m.Entry.TxTableID
1467         size += 4       // m.Entry.Salt
1468         return size
1469 }
1470 func (m *IpsecSadEntryAddDel) Marshal(b []byte) ([]byte, error) {
1471         if b == nil {
1472                 b = make([]byte, m.Size())
1473         }
1474         buf := codec.NewBuffer(b)
1475         buf.EncodeUint8(m.IsAdd)
1476         buf.EncodeUint32(m.Entry.SadID)
1477         buf.EncodeUint32(m.Entry.Spi)
1478         buf.EncodeUint32(uint32(m.Entry.Protocol))
1479         buf.EncodeUint32(uint32(m.Entry.CryptoAlgorithm))
1480         buf.EncodeUint8(m.Entry.CryptoKey.Length)
1481         buf.EncodeBytes(m.Entry.CryptoKey.Data, 128)
1482         buf.EncodeUint32(uint32(m.Entry.IntegrityAlgorithm))
1483         buf.EncodeUint8(m.Entry.IntegrityKey.Length)
1484         buf.EncodeBytes(m.Entry.IntegrityKey.Data, 128)
1485         buf.EncodeUint32(uint32(m.Entry.Flags))
1486         buf.EncodeUint32(uint32(m.Entry.TunnelSrc.Af))
1487         buf.EncodeBytes(m.Entry.TunnelSrc.Un.XXX_UnionData[:], 16)
1488         buf.EncodeUint32(uint32(m.Entry.TunnelDst.Af))
1489         buf.EncodeBytes(m.Entry.TunnelDst.Un.XXX_UnionData[:], 16)
1490         buf.EncodeUint32(m.Entry.TxTableID)
1491         buf.EncodeUint32(m.Entry.Salt)
1492         return buf.Bytes(), nil
1493 }
1494 func (m *IpsecSadEntryAddDel) Unmarshal(b []byte) error {
1495         buf := codec.NewBuffer(b)
1496         m.IsAdd = buf.DecodeUint8()
1497         m.Entry.SadID = buf.DecodeUint32()
1498         m.Entry.Spi = buf.DecodeUint32()
1499         m.Entry.Protocol = IpsecProto(buf.DecodeUint32())
1500         m.Entry.CryptoAlgorithm = IpsecCryptoAlg(buf.DecodeUint32())
1501         m.Entry.CryptoKey.Length = buf.DecodeUint8()
1502         m.Entry.CryptoKey.Data = make([]byte, 128)
1503         copy(m.Entry.CryptoKey.Data, buf.DecodeBytes(len(m.Entry.CryptoKey.Data)))
1504         m.Entry.IntegrityAlgorithm = IpsecIntegAlg(buf.DecodeUint32())
1505         m.Entry.IntegrityKey.Length = buf.DecodeUint8()
1506         m.Entry.IntegrityKey.Data = make([]byte, 128)
1507         copy(m.Entry.IntegrityKey.Data, buf.DecodeBytes(len(m.Entry.IntegrityKey.Data)))
1508         m.Entry.Flags = IpsecSadFlags(buf.DecodeUint32())
1509         m.Entry.TunnelSrc.Af = AddressFamily(buf.DecodeUint32())
1510         copy(m.Entry.TunnelSrc.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1511         m.Entry.TunnelDst.Af = AddressFamily(buf.DecodeUint32())
1512         copy(m.Entry.TunnelDst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1513         m.Entry.TxTableID = buf.DecodeUint32()
1514         m.Entry.Salt = buf.DecodeUint32()
1515         return nil
1516 }
1517
1518 // IpsecSadEntryAddDelReply defines message 'ipsec_sad_entry_add_del_reply'.
1519 type IpsecSadEntryAddDelReply struct {
1520         Retval    int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
1521         StatIndex uint32 `binapi:"u32,name=stat_index" json:"stat_index,omitempty"`
1522 }
1523
1524 func (m *IpsecSadEntryAddDelReply) Reset()               { *m = IpsecSadEntryAddDelReply{} }
1525 func (*IpsecSadEntryAddDelReply) GetMessageName() string { return "ipsec_sad_entry_add_del_reply" }
1526 func (*IpsecSadEntryAddDelReply) GetCrcString() string   { return "9ffac24b" }
1527 func (*IpsecSadEntryAddDelReply) GetMessageType() api.MessageType {
1528         return api.ReplyMessage
1529 }
1530
1531 func (m *IpsecSadEntryAddDelReply) Size() (size int) {
1532         if m == nil {
1533                 return 0
1534         }
1535         size += 4 // m.Retval
1536         size += 4 // m.StatIndex
1537         return size
1538 }
1539 func (m *IpsecSadEntryAddDelReply) Marshal(b []byte) ([]byte, error) {
1540         if b == nil {
1541                 b = make([]byte, m.Size())
1542         }
1543         buf := codec.NewBuffer(b)
1544         buf.EncodeInt32(m.Retval)
1545         buf.EncodeUint32(m.StatIndex)
1546         return buf.Bytes(), nil
1547 }
1548 func (m *IpsecSadEntryAddDelReply) Unmarshal(b []byte) error {
1549         buf := codec.NewBuffer(b)
1550         m.Retval = buf.DecodeInt32()
1551         m.StatIndex = buf.DecodeUint32()
1552         return nil
1553 }
1554
1555 // IpsecSelectBackend defines message 'ipsec_select_backend'.
1556 type IpsecSelectBackend struct {
1557         Protocol IpsecProto `binapi:"ipsec_proto,name=protocol" json:"protocol,omitempty"`
1558         Index    uint8      `binapi:"u8,name=index" json:"index,omitempty"`
1559 }
1560
1561 func (m *IpsecSelectBackend) Reset()               { *m = IpsecSelectBackend{} }
1562 func (*IpsecSelectBackend) GetMessageName() string { return "ipsec_select_backend" }
1563 func (*IpsecSelectBackend) GetCrcString() string   { return "4fd24836" }
1564 func (*IpsecSelectBackend) GetMessageType() api.MessageType {
1565         return api.RequestMessage
1566 }
1567
1568 func (m *IpsecSelectBackend) Size() (size int) {
1569         if m == nil {
1570                 return 0
1571         }
1572         size += 4 // m.Protocol
1573         size += 1 // m.Index
1574         return size
1575 }
1576 func (m *IpsecSelectBackend) Marshal(b []byte) ([]byte, error) {
1577         if b == nil {
1578                 b = make([]byte, m.Size())
1579         }
1580         buf := codec.NewBuffer(b)
1581         buf.EncodeUint32(uint32(m.Protocol))
1582         buf.EncodeUint8(m.Index)
1583         return buf.Bytes(), nil
1584 }
1585 func (m *IpsecSelectBackend) Unmarshal(b []byte) error {
1586         buf := codec.NewBuffer(b)
1587         m.Protocol = IpsecProto(buf.DecodeUint32())
1588         m.Index = buf.DecodeUint8()
1589         return nil
1590 }
1591
1592 // IpsecSelectBackendReply defines message 'ipsec_select_backend_reply'.
1593 type IpsecSelectBackendReply struct {
1594         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1595 }
1596
1597 func (m *IpsecSelectBackendReply) Reset()               { *m = IpsecSelectBackendReply{} }
1598 func (*IpsecSelectBackendReply) GetMessageName() string { return "ipsec_select_backend_reply" }
1599 func (*IpsecSelectBackendReply) GetCrcString() string   { return "e8d4e804" }
1600 func (*IpsecSelectBackendReply) GetMessageType() api.MessageType {
1601         return api.ReplyMessage
1602 }
1603
1604 func (m *IpsecSelectBackendReply) Size() (size int) {
1605         if m == nil {
1606                 return 0
1607         }
1608         size += 4 // m.Retval
1609         return size
1610 }
1611 func (m *IpsecSelectBackendReply) Marshal(b []byte) ([]byte, error) {
1612         if b == nil {
1613                 b = make([]byte, m.Size())
1614         }
1615         buf := codec.NewBuffer(b)
1616         buf.EncodeInt32(m.Retval)
1617         return buf.Bytes(), nil
1618 }
1619 func (m *IpsecSelectBackendReply) Unmarshal(b []byte) error {
1620         buf := codec.NewBuffer(b)
1621         m.Retval = buf.DecodeInt32()
1622         return nil
1623 }
1624
1625 // IpsecSpdAddDel defines message 'ipsec_spd_add_del'.
1626 type IpsecSpdAddDel struct {
1627         IsAdd uint8  `binapi:"u8,name=is_add" json:"is_add,omitempty"`
1628         SpdID uint32 `binapi:"u32,name=spd_id" json:"spd_id,omitempty"`
1629 }
1630
1631 func (m *IpsecSpdAddDel) Reset()               { *m = IpsecSpdAddDel{} }
1632 func (*IpsecSpdAddDel) GetMessageName() string { return "ipsec_spd_add_del" }
1633 func (*IpsecSpdAddDel) GetCrcString() string   { return "9ffdf5da" }
1634 func (*IpsecSpdAddDel) GetMessageType() api.MessageType {
1635         return api.RequestMessage
1636 }
1637
1638 func (m *IpsecSpdAddDel) Size() (size int) {
1639         if m == nil {
1640                 return 0
1641         }
1642         size += 1 // m.IsAdd
1643         size += 4 // m.SpdID
1644         return size
1645 }
1646 func (m *IpsecSpdAddDel) Marshal(b []byte) ([]byte, error) {
1647         if b == nil {
1648                 b = make([]byte, m.Size())
1649         }
1650         buf := codec.NewBuffer(b)
1651         buf.EncodeUint8(m.IsAdd)
1652         buf.EncodeUint32(m.SpdID)
1653         return buf.Bytes(), nil
1654 }
1655 func (m *IpsecSpdAddDel) Unmarshal(b []byte) error {
1656         buf := codec.NewBuffer(b)
1657         m.IsAdd = buf.DecodeUint8()
1658         m.SpdID = buf.DecodeUint32()
1659         return nil
1660 }
1661
1662 // IpsecSpdAddDelReply defines message 'ipsec_spd_add_del_reply'.
1663 type IpsecSpdAddDelReply struct {
1664         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1665 }
1666
1667 func (m *IpsecSpdAddDelReply) Reset()               { *m = IpsecSpdAddDelReply{} }
1668 func (*IpsecSpdAddDelReply) GetMessageName() string { return "ipsec_spd_add_del_reply" }
1669 func (*IpsecSpdAddDelReply) GetCrcString() string   { return "e8d4e804" }
1670 func (*IpsecSpdAddDelReply) GetMessageType() api.MessageType {
1671         return api.ReplyMessage
1672 }
1673
1674 func (m *IpsecSpdAddDelReply) Size() (size int) {
1675         if m == nil {
1676                 return 0
1677         }
1678         size += 4 // m.Retval
1679         return size
1680 }
1681 func (m *IpsecSpdAddDelReply) Marshal(b []byte) ([]byte, error) {
1682         if b == nil {
1683                 b = make([]byte, m.Size())
1684         }
1685         buf := codec.NewBuffer(b)
1686         buf.EncodeInt32(m.Retval)
1687         return buf.Bytes(), nil
1688 }
1689 func (m *IpsecSpdAddDelReply) Unmarshal(b []byte) error {
1690         buf := codec.NewBuffer(b)
1691         m.Retval = buf.DecodeInt32()
1692         return nil
1693 }
1694
1695 // IpsecSpdDetails defines message 'ipsec_spd_details'.
1696 type IpsecSpdDetails struct {
1697         Entry IpsecSpdEntry `binapi:"ipsec_spd_entry,name=entry" json:"entry,omitempty"`
1698 }
1699
1700 func (m *IpsecSpdDetails) Reset()               { *m = IpsecSpdDetails{} }
1701 func (*IpsecSpdDetails) GetMessageName() string { return "ipsec_spd_details" }
1702 func (*IpsecSpdDetails) GetCrcString() string   { return "021e2c20" }
1703 func (*IpsecSpdDetails) GetMessageType() api.MessageType {
1704         return api.ReplyMessage
1705 }
1706
1707 func (m *IpsecSpdDetails) Size() (size int) {
1708         if m == nil {
1709                 return 0
1710         }
1711         size += 4      // m.Entry.SpdID
1712         size += 4      // m.Entry.Priority
1713         size += 1      // m.Entry.IsOutbound
1714         size += 4      // m.Entry.SaID
1715         size += 4      // m.Entry.Policy
1716         size += 1      // m.Entry.Protocol
1717         size += 4      // m.Entry.RemoteAddressStart.Af
1718         size += 1 * 16 // m.Entry.RemoteAddressStart.Un
1719         size += 4      // m.Entry.RemoteAddressStop.Af
1720         size += 1 * 16 // m.Entry.RemoteAddressStop.Un
1721         size += 4      // m.Entry.LocalAddressStart.Af
1722         size += 1 * 16 // m.Entry.LocalAddressStart.Un
1723         size += 4      // m.Entry.LocalAddressStop.Af
1724         size += 1 * 16 // m.Entry.LocalAddressStop.Un
1725         size += 2      // m.Entry.RemotePortStart
1726         size += 2      // m.Entry.RemotePortStop
1727         size += 2      // m.Entry.LocalPortStart
1728         size += 2      // m.Entry.LocalPortStop
1729         return size
1730 }
1731 func (m *IpsecSpdDetails) Marshal(b []byte) ([]byte, error) {
1732         if b == nil {
1733                 b = make([]byte, m.Size())
1734         }
1735         buf := codec.NewBuffer(b)
1736         buf.EncodeUint32(m.Entry.SpdID)
1737         buf.EncodeInt32(m.Entry.Priority)
1738         buf.EncodeUint8(m.Entry.IsOutbound)
1739         buf.EncodeUint32(m.Entry.SaID)
1740         buf.EncodeUint32(uint32(m.Entry.Policy))
1741         buf.EncodeUint8(m.Entry.Protocol)
1742         buf.EncodeUint32(uint32(m.Entry.RemoteAddressStart.Af))
1743         buf.EncodeBytes(m.Entry.RemoteAddressStart.Un.XXX_UnionData[:], 16)
1744         buf.EncodeUint32(uint32(m.Entry.RemoteAddressStop.Af))
1745         buf.EncodeBytes(m.Entry.RemoteAddressStop.Un.XXX_UnionData[:], 16)
1746         buf.EncodeUint32(uint32(m.Entry.LocalAddressStart.Af))
1747         buf.EncodeBytes(m.Entry.LocalAddressStart.Un.XXX_UnionData[:], 16)
1748         buf.EncodeUint32(uint32(m.Entry.LocalAddressStop.Af))
1749         buf.EncodeBytes(m.Entry.LocalAddressStop.Un.XXX_UnionData[:], 16)
1750         buf.EncodeUint16(m.Entry.RemotePortStart)
1751         buf.EncodeUint16(m.Entry.RemotePortStop)
1752         buf.EncodeUint16(m.Entry.LocalPortStart)
1753         buf.EncodeUint16(m.Entry.LocalPortStop)
1754         return buf.Bytes(), nil
1755 }
1756 func (m *IpsecSpdDetails) Unmarshal(b []byte) error {
1757         buf := codec.NewBuffer(b)
1758         m.Entry.SpdID = buf.DecodeUint32()
1759         m.Entry.Priority = buf.DecodeInt32()
1760         m.Entry.IsOutbound = buf.DecodeUint8()
1761         m.Entry.SaID = buf.DecodeUint32()
1762         m.Entry.Policy = IpsecSpdAction(buf.DecodeUint32())
1763         m.Entry.Protocol = buf.DecodeUint8()
1764         m.Entry.RemoteAddressStart.Af = AddressFamily(buf.DecodeUint32())
1765         copy(m.Entry.RemoteAddressStart.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1766         m.Entry.RemoteAddressStop.Af = AddressFamily(buf.DecodeUint32())
1767         copy(m.Entry.RemoteAddressStop.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1768         m.Entry.LocalAddressStart.Af = AddressFamily(buf.DecodeUint32())
1769         copy(m.Entry.LocalAddressStart.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1770         m.Entry.LocalAddressStop.Af = AddressFamily(buf.DecodeUint32())
1771         copy(m.Entry.LocalAddressStop.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1772         m.Entry.RemotePortStart = buf.DecodeUint16()
1773         m.Entry.RemotePortStop = buf.DecodeUint16()
1774         m.Entry.LocalPortStart = buf.DecodeUint16()
1775         m.Entry.LocalPortStop = buf.DecodeUint16()
1776         return nil
1777 }
1778
1779 // IpsecSpdDump defines message 'ipsec_spd_dump'.
1780 type IpsecSpdDump struct {
1781         SpdID uint32 `binapi:"u32,name=spd_id" json:"spd_id,omitempty"`
1782         SaID  uint32 `binapi:"u32,name=sa_id" json:"sa_id,omitempty"`
1783 }
1784
1785 func (m *IpsecSpdDump) Reset()               { *m = IpsecSpdDump{} }
1786 func (*IpsecSpdDump) GetMessageName() string { return "ipsec_spd_dump" }
1787 func (*IpsecSpdDump) GetCrcString() string   { return "afefbf7d" }
1788 func (*IpsecSpdDump) GetMessageType() api.MessageType {
1789         return api.RequestMessage
1790 }
1791
1792 func (m *IpsecSpdDump) Size() (size int) {
1793         if m == nil {
1794                 return 0
1795         }
1796         size += 4 // m.SpdID
1797         size += 4 // m.SaID
1798         return size
1799 }
1800 func (m *IpsecSpdDump) Marshal(b []byte) ([]byte, error) {
1801         if b == nil {
1802                 b = make([]byte, m.Size())
1803         }
1804         buf := codec.NewBuffer(b)
1805         buf.EncodeUint32(m.SpdID)
1806         buf.EncodeUint32(m.SaID)
1807         return buf.Bytes(), nil
1808 }
1809 func (m *IpsecSpdDump) Unmarshal(b []byte) error {
1810         buf := codec.NewBuffer(b)
1811         m.SpdID = buf.DecodeUint32()
1812         m.SaID = buf.DecodeUint32()
1813         return nil
1814 }
1815
1816 // IpsecSpdEntryAddDel defines message 'ipsec_spd_entry_add_del'.
1817 type IpsecSpdEntryAddDel struct {
1818         IsAdd uint8         `binapi:"u8,name=is_add" json:"is_add,omitempty"`
1819         Entry IpsecSpdEntry `binapi:"ipsec_spd_entry,name=entry" json:"entry,omitempty"`
1820 }
1821
1822 func (m *IpsecSpdEntryAddDel) Reset()               { *m = IpsecSpdEntryAddDel{} }
1823 func (*IpsecSpdEntryAddDel) GetMessageName() string { return "ipsec_spd_entry_add_del" }
1824 func (*IpsecSpdEntryAddDel) GetCrcString() string   { return "db217840" }
1825 func (*IpsecSpdEntryAddDel) GetMessageType() api.MessageType {
1826         return api.RequestMessage
1827 }
1828
1829 func (m *IpsecSpdEntryAddDel) Size() (size int) {
1830         if m == nil {
1831                 return 0
1832         }
1833         size += 1      // m.IsAdd
1834         size += 4      // m.Entry.SpdID
1835         size += 4      // m.Entry.Priority
1836         size += 1      // m.Entry.IsOutbound
1837         size += 4      // m.Entry.SaID
1838         size += 4      // m.Entry.Policy
1839         size += 1      // m.Entry.Protocol
1840         size += 4      // m.Entry.RemoteAddressStart.Af
1841         size += 1 * 16 // m.Entry.RemoteAddressStart.Un
1842         size += 4      // m.Entry.RemoteAddressStop.Af
1843         size += 1 * 16 // m.Entry.RemoteAddressStop.Un
1844         size += 4      // m.Entry.LocalAddressStart.Af
1845         size += 1 * 16 // m.Entry.LocalAddressStart.Un
1846         size += 4      // m.Entry.LocalAddressStop.Af
1847         size += 1 * 16 // m.Entry.LocalAddressStop.Un
1848         size += 2      // m.Entry.RemotePortStart
1849         size += 2      // m.Entry.RemotePortStop
1850         size += 2      // m.Entry.LocalPortStart
1851         size += 2      // m.Entry.LocalPortStop
1852         return size
1853 }
1854 func (m *IpsecSpdEntryAddDel) Marshal(b []byte) ([]byte, error) {
1855         if b == nil {
1856                 b = make([]byte, m.Size())
1857         }
1858         buf := codec.NewBuffer(b)
1859         buf.EncodeUint8(m.IsAdd)
1860         buf.EncodeUint32(m.Entry.SpdID)
1861         buf.EncodeInt32(m.Entry.Priority)
1862         buf.EncodeUint8(m.Entry.IsOutbound)
1863         buf.EncodeUint32(m.Entry.SaID)
1864         buf.EncodeUint32(uint32(m.Entry.Policy))
1865         buf.EncodeUint8(m.Entry.Protocol)
1866         buf.EncodeUint32(uint32(m.Entry.RemoteAddressStart.Af))
1867         buf.EncodeBytes(m.Entry.RemoteAddressStart.Un.XXX_UnionData[:], 16)
1868         buf.EncodeUint32(uint32(m.Entry.RemoteAddressStop.Af))
1869         buf.EncodeBytes(m.Entry.RemoteAddressStop.Un.XXX_UnionData[:], 16)
1870         buf.EncodeUint32(uint32(m.Entry.LocalAddressStart.Af))
1871         buf.EncodeBytes(m.Entry.LocalAddressStart.Un.XXX_UnionData[:], 16)
1872         buf.EncodeUint32(uint32(m.Entry.LocalAddressStop.Af))
1873         buf.EncodeBytes(m.Entry.LocalAddressStop.Un.XXX_UnionData[:], 16)
1874         buf.EncodeUint16(m.Entry.RemotePortStart)
1875         buf.EncodeUint16(m.Entry.RemotePortStop)
1876         buf.EncodeUint16(m.Entry.LocalPortStart)
1877         buf.EncodeUint16(m.Entry.LocalPortStop)
1878         return buf.Bytes(), nil
1879 }
1880 func (m *IpsecSpdEntryAddDel) Unmarshal(b []byte) error {
1881         buf := codec.NewBuffer(b)
1882         m.IsAdd = buf.DecodeUint8()
1883         m.Entry.SpdID = buf.DecodeUint32()
1884         m.Entry.Priority = buf.DecodeInt32()
1885         m.Entry.IsOutbound = buf.DecodeUint8()
1886         m.Entry.SaID = buf.DecodeUint32()
1887         m.Entry.Policy = IpsecSpdAction(buf.DecodeUint32())
1888         m.Entry.Protocol = buf.DecodeUint8()
1889         m.Entry.RemoteAddressStart.Af = AddressFamily(buf.DecodeUint32())
1890         copy(m.Entry.RemoteAddressStart.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1891         m.Entry.RemoteAddressStop.Af = AddressFamily(buf.DecodeUint32())
1892         copy(m.Entry.RemoteAddressStop.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1893         m.Entry.LocalAddressStart.Af = AddressFamily(buf.DecodeUint32())
1894         copy(m.Entry.LocalAddressStart.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1895         m.Entry.LocalAddressStop.Af = AddressFamily(buf.DecodeUint32())
1896         copy(m.Entry.LocalAddressStop.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1897         m.Entry.RemotePortStart = buf.DecodeUint16()
1898         m.Entry.RemotePortStop = buf.DecodeUint16()
1899         m.Entry.LocalPortStart = buf.DecodeUint16()
1900         m.Entry.LocalPortStop = buf.DecodeUint16()
1901         return nil
1902 }
1903
1904 // IpsecSpdEntryAddDelReply defines message 'ipsec_spd_entry_add_del_reply'.
1905 type IpsecSpdEntryAddDelReply struct {
1906         Retval    int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
1907         StatIndex uint32 `binapi:"u32,name=stat_index" json:"stat_index,omitempty"`
1908 }
1909
1910 func (m *IpsecSpdEntryAddDelReply) Reset()               { *m = IpsecSpdEntryAddDelReply{} }
1911 func (*IpsecSpdEntryAddDelReply) GetMessageName() string { return "ipsec_spd_entry_add_del_reply" }
1912 func (*IpsecSpdEntryAddDelReply) GetCrcString() string   { return "9ffac24b" }
1913 func (*IpsecSpdEntryAddDelReply) GetMessageType() api.MessageType {
1914         return api.ReplyMessage
1915 }
1916
1917 func (m *IpsecSpdEntryAddDelReply) Size() (size int) {
1918         if m == nil {
1919                 return 0
1920         }
1921         size += 4 // m.Retval
1922         size += 4 // m.StatIndex
1923         return size
1924 }
1925 func (m *IpsecSpdEntryAddDelReply) Marshal(b []byte) ([]byte, error) {
1926         if b == nil {
1927                 b = make([]byte, m.Size())
1928         }
1929         buf := codec.NewBuffer(b)
1930         buf.EncodeInt32(m.Retval)
1931         buf.EncodeUint32(m.StatIndex)
1932         return buf.Bytes(), nil
1933 }
1934 func (m *IpsecSpdEntryAddDelReply) Unmarshal(b []byte) error {
1935         buf := codec.NewBuffer(b)
1936         m.Retval = buf.DecodeInt32()
1937         m.StatIndex = buf.DecodeUint32()
1938         return nil
1939 }
1940
1941 // IpsecSpdInterfaceDetails defines message 'ipsec_spd_interface_details'.
1942 type IpsecSpdInterfaceDetails struct {
1943         SpdIndex  uint32 `binapi:"u32,name=spd_index" json:"spd_index,omitempty"`
1944         SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
1945 }
1946
1947 func (m *IpsecSpdInterfaceDetails) Reset()               { *m = IpsecSpdInterfaceDetails{} }
1948 func (*IpsecSpdInterfaceDetails) GetMessageName() string { return "ipsec_spd_interface_details" }
1949 func (*IpsecSpdInterfaceDetails) GetCrcString() string   { return "2c54296d" }
1950 func (*IpsecSpdInterfaceDetails) GetMessageType() api.MessageType {
1951         return api.ReplyMessage
1952 }
1953
1954 func (m *IpsecSpdInterfaceDetails) Size() (size int) {
1955         if m == nil {
1956                 return 0
1957         }
1958         size += 4 // m.SpdIndex
1959         size += 4 // m.SwIfIndex
1960         return size
1961 }
1962 func (m *IpsecSpdInterfaceDetails) Marshal(b []byte) ([]byte, error) {
1963         if b == nil {
1964                 b = make([]byte, m.Size())
1965         }
1966         buf := codec.NewBuffer(b)
1967         buf.EncodeUint32(m.SpdIndex)
1968         buf.EncodeUint32(m.SwIfIndex)
1969         return buf.Bytes(), nil
1970 }
1971 func (m *IpsecSpdInterfaceDetails) Unmarshal(b []byte) error {
1972         buf := codec.NewBuffer(b)
1973         m.SpdIndex = buf.DecodeUint32()
1974         m.SwIfIndex = buf.DecodeUint32()
1975         return nil
1976 }
1977
1978 // IpsecSpdInterfaceDump defines message 'ipsec_spd_interface_dump'.
1979 type IpsecSpdInterfaceDump struct {
1980         SpdIndex      uint32 `binapi:"u32,name=spd_index" json:"spd_index,omitempty"`
1981         SpdIndexValid uint8  `binapi:"u8,name=spd_index_valid" json:"spd_index_valid,omitempty"`
1982 }
1983
1984 func (m *IpsecSpdInterfaceDump) Reset()               { *m = IpsecSpdInterfaceDump{} }
1985 func (*IpsecSpdInterfaceDump) GetMessageName() string { return "ipsec_spd_interface_dump" }
1986 func (*IpsecSpdInterfaceDump) GetCrcString() string   { return "8971de19" }
1987 func (*IpsecSpdInterfaceDump) GetMessageType() api.MessageType {
1988         return api.RequestMessage
1989 }
1990
1991 func (m *IpsecSpdInterfaceDump) Size() (size int) {
1992         if m == nil {
1993                 return 0
1994         }
1995         size += 4 // m.SpdIndex
1996         size += 1 // m.SpdIndexValid
1997         return size
1998 }
1999 func (m *IpsecSpdInterfaceDump) Marshal(b []byte) ([]byte, error) {
2000         if b == nil {
2001                 b = make([]byte, m.Size())
2002         }
2003         buf := codec.NewBuffer(b)
2004         buf.EncodeUint32(m.SpdIndex)
2005         buf.EncodeUint8(m.SpdIndexValid)
2006         return buf.Bytes(), nil
2007 }
2008 func (m *IpsecSpdInterfaceDump) Unmarshal(b []byte) error {
2009         buf := codec.NewBuffer(b)
2010         m.SpdIndex = buf.DecodeUint32()
2011         m.SpdIndexValid = buf.DecodeUint8()
2012         return nil
2013 }
2014
2015 // IpsecSpdsDetails defines message 'ipsec_spds_details'.
2016 type IpsecSpdsDetails struct {
2017         SpdID     uint32 `binapi:"u32,name=spd_id" json:"spd_id,omitempty"`
2018         Npolicies uint32 `binapi:"u32,name=npolicies" json:"npolicies,omitempty"`
2019 }
2020
2021 func (m *IpsecSpdsDetails) Reset()               { *m = IpsecSpdsDetails{} }
2022 func (*IpsecSpdsDetails) GetMessageName() string { return "ipsec_spds_details" }
2023 func (*IpsecSpdsDetails) GetCrcString() string   { return "a04bb254" }
2024 func (*IpsecSpdsDetails) GetMessageType() api.MessageType {
2025         return api.ReplyMessage
2026 }
2027
2028 func (m *IpsecSpdsDetails) Size() (size int) {
2029         if m == nil {
2030                 return 0
2031         }
2032         size += 4 // m.SpdID
2033         size += 4 // m.Npolicies
2034         return size
2035 }
2036 func (m *IpsecSpdsDetails) Marshal(b []byte) ([]byte, error) {
2037         if b == nil {
2038                 b = make([]byte, m.Size())
2039         }
2040         buf := codec.NewBuffer(b)
2041         buf.EncodeUint32(m.SpdID)
2042         buf.EncodeUint32(m.Npolicies)
2043         return buf.Bytes(), nil
2044 }
2045 func (m *IpsecSpdsDetails) Unmarshal(b []byte) error {
2046         buf := codec.NewBuffer(b)
2047         m.SpdID = buf.DecodeUint32()
2048         m.Npolicies = buf.DecodeUint32()
2049         return nil
2050 }
2051
2052 // IpsecSpdsDump defines message 'ipsec_spds_dump'.
2053 type IpsecSpdsDump struct{}
2054
2055 func (m *IpsecSpdsDump) Reset()               { *m = IpsecSpdsDump{} }
2056 func (*IpsecSpdsDump) GetMessageName() string { return "ipsec_spds_dump" }
2057 func (*IpsecSpdsDump) GetCrcString() string   { return "51077d14" }
2058 func (*IpsecSpdsDump) GetMessageType() api.MessageType {
2059         return api.RequestMessage
2060 }
2061
2062 func (m *IpsecSpdsDump) Size() (size int) {
2063         if m == nil {
2064                 return 0
2065         }
2066         return size
2067 }
2068 func (m *IpsecSpdsDump) Marshal(b []byte) ([]byte, error) {
2069         if b == nil {
2070                 b = make([]byte, m.Size())
2071         }
2072         buf := codec.NewBuffer(b)
2073         return buf.Bytes(), nil
2074 }
2075 func (m *IpsecSpdsDump) Unmarshal(b []byte) error {
2076         return nil
2077 }
2078
2079 // IpsecTunnelIfAddDel defines message 'ipsec_tunnel_if_add_del'.
2080 type IpsecTunnelIfAddDel struct {
2081         IsAdd              uint8   `binapi:"u8,name=is_add" json:"is_add,omitempty"`
2082         Esn                uint8   `binapi:"u8,name=esn" json:"esn,omitempty"`
2083         AntiReplay         uint8   `binapi:"u8,name=anti_replay" json:"anti_replay,omitempty"`
2084         LocalIP            Address `binapi:"address,name=local_ip" json:"local_ip,omitempty"`
2085         RemoteIP           Address `binapi:"address,name=remote_ip" json:"remote_ip,omitempty"`
2086         LocalSpi           uint32  `binapi:"u32,name=local_spi" json:"local_spi,omitempty"`
2087         RemoteSpi          uint32  `binapi:"u32,name=remote_spi" json:"remote_spi,omitempty"`
2088         CryptoAlg          uint8   `binapi:"u8,name=crypto_alg" json:"crypto_alg,omitempty"`
2089         LocalCryptoKeyLen  uint8   `binapi:"u8,name=local_crypto_key_len" json:"local_crypto_key_len,omitempty"`
2090         LocalCryptoKey     []byte  `binapi:"u8[128],name=local_crypto_key" json:"local_crypto_key,omitempty"`
2091         RemoteCryptoKeyLen uint8   `binapi:"u8,name=remote_crypto_key_len" json:"remote_crypto_key_len,omitempty"`
2092         RemoteCryptoKey    []byte  `binapi:"u8[128],name=remote_crypto_key" json:"remote_crypto_key,omitempty"`
2093         IntegAlg           uint8   `binapi:"u8,name=integ_alg" json:"integ_alg,omitempty"`
2094         LocalIntegKeyLen   uint8   `binapi:"u8,name=local_integ_key_len" json:"local_integ_key_len,omitempty"`
2095         LocalIntegKey      []byte  `binapi:"u8[128],name=local_integ_key" json:"local_integ_key,omitempty"`
2096         RemoteIntegKeyLen  uint8   `binapi:"u8,name=remote_integ_key_len" json:"remote_integ_key_len,omitempty"`
2097         RemoteIntegKey     []byte  `binapi:"u8[128],name=remote_integ_key" json:"remote_integ_key,omitempty"`
2098         Renumber           uint8   `binapi:"u8,name=renumber" json:"renumber,omitempty"`
2099         ShowInstance       uint32  `binapi:"u32,name=show_instance" json:"show_instance,omitempty"`
2100         UDPEncap           uint8   `binapi:"u8,name=udp_encap" json:"udp_encap,omitempty"`
2101         TxTableID          uint32  `binapi:"u32,name=tx_table_id" json:"tx_table_id,omitempty"`
2102         Salt               uint32  `binapi:"u32,name=salt" json:"salt,omitempty"`
2103 }
2104
2105 func (m *IpsecTunnelIfAddDel) Reset()               { *m = IpsecTunnelIfAddDel{} }
2106 func (*IpsecTunnelIfAddDel) GetMessageName() string { return "ipsec_tunnel_if_add_del" }
2107 func (*IpsecTunnelIfAddDel) GetCrcString() string   { return "d5a98274" }
2108 func (*IpsecTunnelIfAddDel) GetMessageType() api.MessageType {
2109         return api.RequestMessage
2110 }
2111
2112 func (m *IpsecTunnelIfAddDel) Size() (size int) {
2113         if m == nil {
2114                 return 0
2115         }
2116         size += 1       // m.IsAdd
2117         size += 1       // m.Esn
2118         size += 1       // m.AntiReplay
2119         size += 4       // m.LocalIP.Af
2120         size += 1 * 16  // m.LocalIP.Un
2121         size += 4       // m.RemoteIP.Af
2122         size += 1 * 16  // m.RemoteIP.Un
2123         size += 4       // m.LocalSpi
2124         size += 4       // m.RemoteSpi
2125         size += 1       // m.CryptoAlg
2126         size += 1       // m.LocalCryptoKeyLen
2127         size += 1 * 128 // m.LocalCryptoKey
2128         size += 1       // m.RemoteCryptoKeyLen
2129         size += 1 * 128 // m.RemoteCryptoKey
2130         size += 1       // m.IntegAlg
2131         size += 1       // m.LocalIntegKeyLen
2132         size += 1 * 128 // m.LocalIntegKey
2133         size += 1       // m.RemoteIntegKeyLen
2134         size += 1 * 128 // m.RemoteIntegKey
2135         size += 1       // m.Renumber
2136         size += 4       // m.ShowInstance
2137         size += 1       // m.UDPEncap
2138         size += 4       // m.TxTableID
2139         size += 4       // m.Salt
2140         return size
2141 }
2142 func (m *IpsecTunnelIfAddDel) Marshal(b []byte) ([]byte, error) {
2143         if b == nil {
2144                 b = make([]byte, m.Size())
2145         }
2146         buf := codec.NewBuffer(b)
2147         buf.EncodeUint8(m.IsAdd)
2148         buf.EncodeUint8(m.Esn)
2149         buf.EncodeUint8(m.AntiReplay)
2150         buf.EncodeUint32(uint32(m.LocalIP.Af))
2151         buf.EncodeBytes(m.LocalIP.Un.XXX_UnionData[:], 16)
2152         buf.EncodeUint32(uint32(m.RemoteIP.Af))
2153         buf.EncodeBytes(m.RemoteIP.Un.XXX_UnionData[:], 16)
2154         buf.EncodeUint32(m.LocalSpi)
2155         buf.EncodeUint32(m.RemoteSpi)
2156         buf.EncodeUint8(m.CryptoAlg)
2157         buf.EncodeUint8(m.LocalCryptoKeyLen)
2158         buf.EncodeBytes(m.LocalCryptoKey, 128)
2159         buf.EncodeUint8(m.RemoteCryptoKeyLen)
2160         buf.EncodeBytes(m.RemoteCryptoKey, 128)
2161         buf.EncodeUint8(m.IntegAlg)
2162         buf.EncodeUint8(m.LocalIntegKeyLen)
2163         buf.EncodeBytes(m.LocalIntegKey, 128)
2164         buf.EncodeUint8(m.RemoteIntegKeyLen)
2165         buf.EncodeBytes(m.RemoteIntegKey, 128)
2166         buf.EncodeUint8(m.Renumber)
2167         buf.EncodeUint32(m.ShowInstance)
2168         buf.EncodeUint8(m.UDPEncap)
2169         buf.EncodeUint32(m.TxTableID)
2170         buf.EncodeUint32(m.Salt)
2171         return buf.Bytes(), nil
2172 }
2173 func (m *IpsecTunnelIfAddDel) Unmarshal(b []byte) error {
2174         buf := codec.NewBuffer(b)
2175         m.IsAdd = buf.DecodeUint8()
2176         m.Esn = buf.DecodeUint8()
2177         m.AntiReplay = buf.DecodeUint8()
2178         m.LocalIP.Af = AddressFamily(buf.DecodeUint32())
2179         copy(m.LocalIP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2180         m.RemoteIP.Af = AddressFamily(buf.DecodeUint32())
2181         copy(m.RemoteIP.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2182         m.LocalSpi = buf.DecodeUint32()
2183         m.RemoteSpi = buf.DecodeUint32()
2184         m.CryptoAlg = buf.DecodeUint8()
2185         m.LocalCryptoKeyLen = buf.DecodeUint8()
2186         m.LocalCryptoKey = make([]byte, 128)
2187         copy(m.LocalCryptoKey, buf.DecodeBytes(len(m.LocalCryptoKey)))
2188         m.RemoteCryptoKeyLen = buf.DecodeUint8()
2189         m.RemoteCryptoKey = make([]byte, 128)
2190         copy(m.RemoteCryptoKey, buf.DecodeBytes(len(m.RemoteCryptoKey)))
2191         m.IntegAlg = buf.DecodeUint8()
2192         m.LocalIntegKeyLen = buf.DecodeUint8()
2193         m.LocalIntegKey = make([]byte, 128)
2194         copy(m.LocalIntegKey, buf.DecodeBytes(len(m.LocalIntegKey)))
2195         m.RemoteIntegKeyLen = buf.DecodeUint8()
2196         m.RemoteIntegKey = make([]byte, 128)
2197         copy(m.RemoteIntegKey, buf.DecodeBytes(len(m.RemoteIntegKey)))
2198         m.Renumber = buf.DecodeUint8()
2199         m.ShowInstance = buf.DecodeUint32()
2200         m.UDPEncap = buf.DecodeUint8()
2201         m.TxTableID = buf.DecodeUint32()
2202         m.Salt = buf.DecodeUint32()
2203         return nil
2204 }
2205
2206 // IpsecTunnelIfAddDelReply defines message 'ipsec_tunnel_if_add_del_reply'.
2207 type IpsecTunnelIfAddDelReply struct {
2208         Retval    int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
2209         SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
2210 }
2211
2212 func (m *IpsecTunnelIfAddDelReply) Reset()               { *m = IpsecTunnelIfAddDelReply{} }
2213 func (*IpsecTunnelIfAddDelReply) GetMessageName() string { return "ipsec_tunnel_if_add_del_reply" }
2214 func (*IpsecTunnelIfAddDelReply) GetCrcString() string   { return "fda5941f" }
2215 func (*IpsecTunnelIfAddDelReply) GetMessageType() api.MessageType {
2216         return api.ReplyMessage
2217 }
2218
2219 func (m *IpsecTunnelIfAddDelReply) Size() (size int) {
2220         if m == nil {
2221                 return 0
2222         }
2223         size += 4 // m.Retval
2224         size += 4 // m.SwIfIndex
2225         return size
2226 }
2227 func (m *IpsecTunnelIfAddDelReply) Marshal(b []byte) ([]byte, error) {
2228         if b == nil {
2229                 b = make([]byte, m.Size())
2230         }
2231         buf := codec.NewBuffer(b)
2232         buf.EncodeInt32(m.Retval)
2233         buf.EncodeUint32(m.SwIfIndex)
2234         return buf.Bytes(), nil
2235 }
2236 func (m *IpsecTunnelIfAddDelReply) Unmarshal(b []byte) error {
2237         buf := codec.NewBuffer(b)
2238         m.Retval = buf.DecodeInt32()
2239         m.SwIfIndex = buf.DecodeUint32()
2240         return nil
2241 }
2242
2243 // IpsecTunnelIfSetSa defines message 'ipsec_tunnel_if_set_sa'.
2244 type IpsecTunnelIfSetSa struct {
2245         SwIfIndex  uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"`
2246         SaID       uint32 `binapi:"u32,name=sa_id" json:"sa_id,omitempty"`
2247         IsOutbound uint8  `binapi:"u8,name=is_outbound" json:"is_outbound,omitempty"`
2248 }
2249
2250 func (m *IpsecTunnelIfSetSa) Reset()               { *m = IpsecTunnelIfSetSa{} }
2251 func (*IpsecTunnelIfSetSa) GetMessageName() string { return "ipsec_tunnel_if_set_sa" }
2252 func (*IpsecTunnelIfSetSa) GetCrcString() string   { return "6ab567f2" }
2253 func (*IpsecTunnelIfSetSa) GetMessageType() api.MessageType {
2254         return api.RequestMessage
2255 }
2256
2257 func (m *IpsecTunnelIfSetSa) Size() (size int) {
2258         if m == nil {
2259                 return 0
2260         }
2261         size += 4 // m.SwIfIndex
2262         size += 4 // m.SaID
2263         size += 1 // m.IsOutbound
2264         return size
2265 }
2266 func (m *IpsecTunnelIfSetSa) Marshal(b []byte) ([]byte, error) {
2267         if b == nil {
2268                 b = make([]byte, m.Size())
2269         }
2270         buf := codec.NewBuffer(b)
2271         buf.EncodeUint32(m.SwIfIndex)
2272         buf.EncodeUint32(m.SaID)
2273         buf.EncodeUint8(m.IsOutbound)
2274         return buf.Bytes(), nil
2275 }
2276 func (m *IpsecTunnelIfSetSa) Unmarshal(b []byte) error {
2277         buf := codec.NewBuffer(b)
2278         m.SwIfIndex = buf.DecodeUint32()
2279         m.SaID = buf.DecodeUint32()
2280         m.IsOutbound = buf.DecodeUint8()
2281         return nil
2282 }
2283
2284 // IpsecTunnelIfSetSaReply defines message 'ipsec_tunnel_if_set_sa_reply'.
2285 type IpsecTunnelIfSetSaReply struct {
2286         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2287 }
2288
2289 func (m *IpsecTunnelIfSetSaReply) Reset()               { *m = IpsecTunnelIfSetSaReply{} }
2290 func (*IpsecTunnelIfSetSaReply) GetMessageName() string { return "ipsec_tunnel_if_set_sa_reply" }
2291 func (*IpsecTunnelIfSetSaReply) GetCrcString() string   { return "e8d4e804" }
2292 func (*IpsecTunnelIfSetSaReply) GetMessageType() api.MessageType {
2293         return api.ReplyMessage
2294 }
2295
2296 func (m *IpsecTunnelIfSetSaReply) Size() (size int) {
2297         if m == nil {
2298                 return 0
2299         }
2300         size += 4 // m.Retval
2301         return size
2302 }
2303 func (m *IpsecTunnelIfSetSaReply) Marshal(b []byte) ([]byte, error) {
2304         if b == nil {
2305                 b = make([]byte, m.Size())
2306         }
2307         buf := codec.NewBuffer(b)
2308         buf.EncodeInt32(m.Retval)
2309         return buf.Bytes(), nil
2310 }
2311 func (m *IpsecTunnelIfSetSaReply) Unmarshal(b []byte) error {
2312         buf := codec.NewBuffer(b)
2313         m.Retval = buf.DecodeInt32()
2314         return nil
2315 }
2316
2317 // IpsecTunnelProtectDel defines message 'ipsec_tunnel_protect_del'.
2318 type IpsecTunnelProtectDel struct {
2319         SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2320 }
2321
2322 func (m *IpsecTunnelProtectDel) Reset()               { *m = IpsecTunnelProtectDel{} }
2323 func (*IpsecTunnelProtectDel) GetMessageName() string { return "ipsec_tunnel_protect_del" }
2324 func (*IpsecTunnelProtectDel) GetCrcString() string   { return "f9e6675e" }
2325 func (*IpsecTunnelProtectDel) GetMessageType() api.MessageType {
2326         return api.RequestMessage
2327 }
2328
2329 func (m *IpsecTunnelProtectDel) Size() (size int) {
2330         if m == nil {
2331                 return 0
2332         }
2333         size += 4 // m.SwIfIndex
2334         return size
2335 }
2336 func (m *IpsecTunnelProtectDel) Marshal(b []byte) ([]byte, error) {
2337         if b == nil {
2338                 b = make([]byte, m.Size())
2339         }
2340         buf := codec.NewBuffer(b)
2341         buf.EncodeUint32(uint32(m.SwIfIndex))
2342         return buf.Bytes(), nil
2343 }
2344 func (m *IpsecTunnelProtectDel) Unmarshal(b []byte) error {
2345         buf := codec.NewBuffer(b)
2346         m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2347         return nil
2348 }
2349
2350 // IpsecTunnelProtectDelReply defines message 'ipsec_tunnel_protect_del_reply'.
2351 type IpsecTunnelProtectDelReply struct {
2352         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2353 }
2354
2355 func (m *IpsecTunnelProtectDelReply) Reset()               { *m = IpsecTunnelProtectDelReply{} }
2356 func (*IpsecTunnelProtectDelReply) GetMessageName() string { return "ipsec_tunnel_protect_del_reply" }
2357 func (*IpsecTunnelProtectDelReply) GetCrcString() string   { return "e8d4e804" }
2358 func (*IpsecTunnelProtectDelReply) GetMessageType() api.MessageType {
2359         return api.ReplyMessage
2360 }
2361
2362 func (m *IpsecTunnelProtectDelReply) Size() (size int) {
2363         if m == nil {
2364                 return 0
2365         }
2366         size += 4 // m.Retval
2367         return size
2368 }
2369 func (m *IpsecTunnelProtectDelReply) Marshal(b []byte) ([]byte, error) {
2370         if b == nil {
2371                 b = make([]byte, m.Size())
2372         }
2373         buf := codec.NewBuffer(b)
2374         buf.EncodeInt32(m.Retval)
2375         return buf.Bytes(), nil
2376 }
2377 func (m *IpsecTunnelProtectDelReply) Unmarshal(b []byte) error {
2378         buf := codec.NewBuffer(b)
2379         m.Retval = buf.DecodeInt32()
2380         return nil
2381 }
2382
2383 // IpsecTunnelProtectDetails defines message 'ipsec_tunnel_protect_details'.
2384 type IpsecTunnelProtectDetails struct {
2385         Tun IpsecTunnelProtect `binapi:"ipsec_tunnel_protect,name=tun" json:"tun,omitempty"`
2386 }
2387
2388 func (m *IpsecTunnelProtectDetails) Reset()               { *m = IpsecTunnelProtectDetails{} }
2389 func (*IpsecTunnelProtectDetails) GetMessageName() string { return "ipsec_tunnel_protect_details" }
2390 func (*IpsecTunnelProtectDetails) GetCrcString() string   { return "7520eefe" }
2391 func (*IpsecTunnelProtectDetails) GetMessageType() api.MessageType {
2392         return api.ReplyMessage
2393 }
2394
2395 func (m *IpsecTunnelProtectDetails) Size() (size int) {
2396         if m == nil {
2397                 return 0
2398         }
2399         size += 4                   // m.Tun.SwIfIndex
2400         size += 4                   // m.Tun.SaOut
2401         size += 1                   // m.Tun.NSaIn
2402         size += 4 * len(m.Tun.SaIn) // m.Tun.SaIn
2403         return size
2404 }
2405 func (m *IpsecTunnelProtectDetails) Marshal(b []byte) ([]byte, error) {
2406         if b == nil {
2407                 b = make([]byte, m.Size())
2408         }
2409         buf := codec.NewBuffer(b)
2410         buf.EncodeUint32(uint32(m.Tun.SwIfIndex))
2411         buf.EncodeUint32(m.Tun.SaOut)
2412         buf.EncodeUint8(uint8(len(m.Tun.SaIn)))
2413         for i := 0; i < len(m.Tun.SaIn); i++ {
2414                 var x uint32
2415                 if i < len(m.Tun.SaIn) {
2416                         x = uint32(m.Tun.SaIn[i])
2417                 }
2418                 buf.EncodeUint32(x)
2419         }
2420         return buf.Bytes(), nil
2421 }
2422 func (m *IpsecTunnelProtectDetails) Unmarshal(b []byte) error {
2423         buf := codec.NewBuffer(b)
2424         m.Tun.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2425         m.Tun.SaOut = buf.DecodeUint32()
2426         m.Tun.NSaIn = buf.DecodeUint8()
2427         m.Tun.SaIn = make([]uint32, m.Tun.NSaIn)
2428         for i := 0; i < len(m.Tun.SaIn); i++ {
2429                 m.Tun.SaIn[i] = buf.DecodeUint32()
2430         }
2431         return nil
2432 }
2433
2434 // IpsecTunnelProtectDump defines message 'ipsec_tunnel_protect_dump'.
2435 type IpsecTunnelProtectDump struct {
2436         SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2437 }
2438
2439 func (m *IpsecTunnelProtectDump) Reset()               { *m = IpsecTunnelProtectDump{} }
2440 func (*IpsecTunnelProtectDump) GetMessageName() string { return "ipsec_tunnel_protect_dump" }
2441 func (*IpsecTunnelProtectDump) GetCrcString() string   { return "f9e6675e" }
2442 func (*IpsecTunnelProtectDump) GetMessageType() api.MessageType {
2443         return api.RequestMessage
2444 }
2445
2446 func (m *IpsecTunnelProtectDump) Size() (size int) {
2447         if m == nil {
2448                 return 0
2449         }
2450         size += 4 // m.SwIfIndex
2451         return size
2452 }
2453 func (m *IpsecTunnelProtectDump) Marshal(b []byte) ([]byte, error) {
2454         if b == nil {
2455                 b = make([]byte, m.Size())
2456         }
2457         buf := codec.NewBuffer(b)
2458         buf.EncodeUint32(uint32(m.SwIfIndex))
2459         return buf.Bytes(), nil
2460 }
2461 func (m *IpsecTunnelProtectDump) Unmarshal(b []byte) error {
2462         buf := codec.NewBuffer(b)
2463         m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2464         return nil
2465 }
2466
2467 // IpsecTunnelProtectUpdate defines message 'ipsec_tunnel_protect_update'.
2468 type IpsecTunnelProtectUpdate struct {
2469         Tunnel IpsecTunnelProtect `binapi:"ipsec_tunnel_protect,name=tunnel" json:"tunnel,omitempty"`
2470 }
2471
2472 func (m *IpsecTunnelProtectUpdate) Reset()               { *m = IpsecTunnelProtectUpdate{} }
2473 func (*IpsecTunnelProtectUpdate) GetMessageName() string { return "ipsec_tunnel_protect_update" }
2474 func (*IpsecTunnelProtectUpdate) GetCrcString() string   { return "eccbc177" }
2475 func (*IpsecTunnelProtectUpdate) GetMessageType() api.MessageType {
2476         return api.RequestMessage
2477 }
2478
2479 func (m *IpsecTunnelProtectUpdate) Size() (size int) {
2480         if m == nil {
2481                 return 0
2482         }
2483         size += 4                      // m.Tunnel.SwIfIndex
2484         size += 4                      // m.Tunnel.SaOut
2485         size += 1                      // m.Tunnel.NSaIn
2486         size += 4 * len(m.Tunnel.SaIn) // m.Tunnel.SaIn
2487         return size
2488 }
2489 func (m *IpsecTunnelProtectUpdate) Marshal(b []byte) ([]byte, error) {
2490         if b == nil {
2491                 b = make([]byte, m.Size())
2492         }
2493         buf := codec.NewBuffer(b)
2494         buf.EncodeUint32(uint32(m.Tunnel.SwIfIndex))
2495         buf.EncodeUint32(m.Tunnel.SaOut)
2496         buf.EncodeUint8(uint8(len(m.Tunnel.SaIn)))
2497         for i := 0; i < len(m.Tunnel.SaIn); i++ {
2498                 var x uint32
2499                 if i < len(m.Tunnel.SaIn) {
2500                         x = uint32(m.Tunnel.SaIn[i])
2501                 }
2502                 buf.EncodeUint32(x)
2503         }
2504         return buf.Bytes(), nil
2505 }
2506 func (m *IpsecTunnelProtectUpdate) Unmarshal(b []byte) error {
2507         buf := codec.NewBuffer(b)
2508         m.Tunnel.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
2509         m.Tunnel.SaOut = buf.DecodeUint32()
2510         m.Tunnel.NSaIn = buf.DecodeUint8()
2511         m.Tunnel.SaIn = make([]uint32, m.Tunnel.NSaIn)
2512         for i := 0; i < len(m.Tunnel.SaIn); i++ {
2513                 m.Tunnel.SaIn[i] = buf.DecodeUint32()
2514         }
2515         return nil
2516 }
2517
2518 // IpsecTunnelProtectUpdateReply defines message 'ipsec_tunnel_protect_update_reply'.
2519 type IpsecTunnelProtectUpdateReply struct {
2520         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2521 }
2522
2523 func (m *IpsecTunnelProtectUpdateReply) Reset() { *m = IpsecTunnelProtectUpdateReply{} }
2524 func (*IpsecTunnelProtectUpdateReply) GetMessageName() string {
2525         return "ipsec_tunnel_protect_update_reply"
2526 }
2527 func (*IpsecTunnelProtectUpdateReply) GetCrcString() string { return "e8d4e804" }
2528 func (*IpsecTunnelProtectUpdateReply) GetMessageType() api.MessageType {
2529         return api.ReplyMessage
2530 }
2531
2532 func (m *IpsecTunnelProtectUpdateReply) Size() (size int) {
2533         if m == nil {
2534                 return 0
2535         }
2536         size += 4 // m.Retval
2537         return size
2538 }
2539 func (m *IpsecTunnelProtectUpdateReply) Marshal(b []byte) ([]byte, error) {
2540         if b == nil {
2541                 b = make([]byte, m.Size())
2542         }
2543         buf := codec.NewBuffer(b)
2544         buf.EncodeInt32(m.Retval)
2545         return buf.Bytes(), nil
2546 }
2547 func (m *IpsecTunnelProtectUpdateReply) Unmarshal(b []byte) error {
2548         buf := codec.NewBuffer(b)
2549         m.Retval = buf.DecodeInt32()
2550         return nil
2551 }
2552
2553 func init() { file_ipsec_binapi_init() }
2554 func file_ipsec_binapi_init() {
2555         api.RegisterMessage((*IpsecBackendDetails)(nil), "ipsec_backend_details_7700751c")
2556         api.RegisterMessage((*IpsecBackendDump)(nil), "ipsec_backend_dump_51077d14")
2557         api.RegisterMessage((*IpsecInterfaceAddDelSpd)(nil), "ipsec_interface_add_del_spd_1e3b8286")
2558         api.RegisterMessage((*IpsecInterfaceAddDelSpdReply)(nil), "ipsec_interface_add_del_spd_reply_e8d4e804")
2559         api.RegisterMessage((*IpsecSaDetails)(nil), "ipsec_sa_details_9c8d829a")
2560         api.RegisterMessage((*IpsecSaDump)(nil), "ipsec_sa_dump_2076c2f4")
2561         api.RegisterMessage((*IpsecSadEntryAddDel)(nil), "ipsec_sad_entry_add_del_a25ab61e")
2562         api.RegisterMessage((*IpsecSadEntryAddDelReply)(nil), "ipsec_sad_entry_add_del_reply_9ffac24b")
2563         api.RegisterMessage((*IpsecSelectBackend)(nil), "ipsec_select_backend_4fd24836")
2564         api.RegisterMessage((*IpsecSelectBackendReply)(nil), "ipsec_select_backend_reply_e8d4e804")
2565         api.RegisterMessage((*IpsecSpdAddDel)(nil), "ipsec_spd_add_del_9ffdf5da")
2566         api.RegisterMessage((*IpsecSpdAddDelReply)(nil), "ipsec_spd_add_del_reply_e8d4e804")
2567         api.RegisterMessage((*IpsecSpdDetails)(nil), "ipsec_spd_details_021e2c20")
2568         api.RegisterMessage((*IpsecSpdDump)(nil), "ipsec_spd_dump_afefbf7d")
2569         api.RegisterMessage((*IpsecSpdEntryAddDel)(nil), "ipsec_spd_entry_add_del_db217840")
2570         api.RegisterMessage((*IpsecSpdEntryAddDelReply)(nil), "ipsec_spd_entry_add_del_reply_9ffac24b")
2571         api.RegisterMessage((*IpsecSpdInterfaceDetails)(nil), "ipsec_spd_interface_details_2c54296d")
2572         api.RegisterMessage((*IpsecSpdInterfaceDump)(nil), "ipsec_spd_interface_dump_8971de19")
2573         api.RegisterMessage((*IpsecSpdsDetails)(nil), "ipsec_spds_details_a04bb254")
2574         api.RegisterMessage((*IpsecSpdsDump)(nil), "ipsec_spds_dump_51077d14")
2575         api.RegisterMessage((*IpsecTunnelIfAddDel)(nil), "ipsec_tunnel_if_add_del_d5a98274")
2576         api.RegisterMessage((*IpsecTunnelIfAddDelReply)(nil), "ipsec_tunnel_if_add_del_reply_fda5941f")
2577         api.RegisterMessage((*IpsecTunnelIfSetSa)(nil), "ipsec_tunnel_if_set_sa_6ab567f2")
2578         api.RegisterMessage((*IpsecTunnelIfSetSaReply)(nil), "ipsec_tunnel_if_set_sa_reply_e8d4e804")
2579         api.RegisterMessage((*IpsecTunnelProtectDel)(nil), "ipsec_tunnel_protect_del_f9e6675e")
2580         api.RegisterMessage((*IpsecTunnelProtectDelReply)(nil), "ipsec_tunnel_protect_del_reply_e8d4e804")
2581         api.RegisterMessage((*IpsecTunnelProtectDetails)(nil), "ipsec_tunnel_protect_details_7520eefe")
2582         api.RegisterMessage((*IpsecTunnelProtectDump)(nil), "ipsec_tunnel_protect_dump_f9e6675e")
2583         api.RegisterMessage((*IpsecTunnelProtectUpdate)(nil), "ipsec_tunnel_protect_update_eccbc177")
2584         api.RegisterMessage((*IpsecTunnelProtectUpdateReply)(nil), "ipsec_tunnel_protect_update_reply_e8d4e804")
2585 }
2586
2587 // Messages returns list of all messages in this module.
2588 func AllMessages() []api.Message {
2589         return []api.Message{
2590                 (*IpsecBackendDetails)(nil),
2591                 (*IpsecBackendDump)(nil),
2592                 (*IpsecInterfaceAddDelSpd)(nil),
2593                 (*IpsecInterfaceAddDelSpdReply)(nil),
2594                 (*IpsecSaDetails)(nil),
2595                 (*IpsecSaDump)(nil),
2596                 (*IpsecSadEntryAddDel)(nil),
2597                 (*IpsecSadEntryAddDelReply)(nil),
2598                 (*IpsecSelectBackend)(nil),
2599                 (*IpsecSelectBackendReply)(nil),
2600                 (*IpsecSpdAddDel)(nil),
2601                 (*IpsecSpdAddDelReply)(nil),
2602                 (*IpsecSpdDetails)(nil),
2603                 (*IpsecSpdDump)(nil),
2604                 (*IpsecSpdEntryAddDel)(nil),
2605                 (*IpsecSpdEntryAddDelReply)(nil),
2606                 (*IpsecSpdInterfaceDetails)(nil),
2607                 (*IpsecSpdInterfaceDump)(nil),
2608                 (*IpsecSpdsDetails)(nil),
2609                 (*IpsecSpdsDump)(nil),
2610                 (*IpsecTunnelIfAddDel)(nil),
2611                 (*IpsecTunnelIfAddDelReply)(nil),
2612                 (*IpsecTunnelIfSetSa)(nil),
2613                 (*IpsecTunnelIfSetSaReply)(nil),
2614                 (*IpsecTunnelProtectDel)(nil),
2615                 (*IpsecTunnelProtectDelReply)(nil),
2616                 (*IpsecTunnelProtectDetails)(nil),
2617                 (*IpsecTunnelProtectDump)(nil),
2618                 (*IpsecTunnelProtectUpdate)(nil),
2619                 (*IpsecTunnelProtectUpdateReply)(nil),
2620         }
2621 }