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