Improve binapi generator
[govpp.git] / binapi / ikev2 / ikev2.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.05-release
5 // source: /usr/share/vpp/api/plugins/ikev2.api.json
6
7 // Package ikev2 contains generated bindings for API file ikev2.api.
8 //
9 // Contents:
10 //  36 messages
11 //
12 package ikev2
13
14 import (
15         api "git.fd.io/govpp.git/api"
16         interface_types "git.fd.io/govpp.git/binapi/interface_types"
17         ip_types "git.fd.io/govpp.git/binapi/ip_types"
18         codec "git.fd.io/govpp.git/codec"
19 )
20
21 // This is a compile-time assertion to ensure that this generated file
22 // is compatible with the GoVPP api package it is being compiled against.
23 // A compilation error at this line likely means your copy of the
24 // GoVPP api package needs to be updated.
25 const _ = api.GoVppAPIPackageIsVersion2
26
27 const (
28         APIFile    = "ikev2"
29         APIVersion = "1.0.1"
30         VersionCrc = 0x2ebaa2d8
31 )
32
33 // Ikev2InitiateDelChildSa defines message 'ikev2_initiate_del_child_sa'.
34 type Ikev2InitiateDelChildSa struct {
35         Ispi uint32 `binapi:"u32,name=ispi" json:"ispi,omitempty"`
36 }
37
38 func (m *Ikev2InitiateDelChildSa) Reset()               { *m = Ikev2InitiateDelChildSa{} }
39 func (*Ikev2InitiateDelChildSa) GetMessageName() string { return "ikev2_initiate_del_child_sa" }
40 func (*Ikev2InitiateDelChildSa) GetCrcString() string   { return "7f004d2e" }
41 func (*Ikev2InitiateDelChildSa) GetMessageType() api.MessageType {
42         return api.RequestMessage
43 }
44
45 func (m *Ikev2InitiateDelChildSa) Size() int {
46         if m == nil {
47                 return 0
48         }
49         var size int
50         size += 4 // m.Ispi
51         return size
52 }
53 func (m *Ikev2InitiateDelChildSa) Marshal(b []byte) ([]byte, error) {
54         var buf *codec.Buffer
55         if b == nil {
56                 buf = codec.NewBuffer(make([]byte, m.Size()))
57         } else {
58                 buf = codec.NewBuffer(b)
59         }
60         buf.EncodeUint32(uint32(m.Ispi))
61         return buf.Bytes(), nil
62 }
63 func (m *Ikev2InitiateDelChildSa) Unmarshal(b []byte) error {
64         buf := codec.NewBuffer(b)
65         m.Ispi = buf.DecodeUint32()
66         return nil
67 }
68
69 // Ikev2InitiateDelChildSaReply defines message 'ikev2_initiate_del_child_sa_reply'.
70 type Ikev2InitiateDelChildSaReply struct {
71         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
72 }
73
74 func (m *Ikev2InitiateDelChildSaReply) Reset() { *m = Ikev2InitiateDelChildSaReply{} }
75 func (*Ikev2InitiateDelChildSaReply) GetMessageName() string {
76         return "ikev2_initiate_del_child_sa_reply"
77 }
78 func (*Ikev2InitiateDelChildSaReply) GetCrcString() string { return "e8d4e804" }
79 func (*Ikev2InitiateDelChildSaReply) GetMessageType() api.MessageType {
80         return api.ReplyMessage
81 }
82
83 func (m *Ikev2InitiateDelChildSaReply) Size() int {
84         if m == nil {
85                 return 0
86         }
87         var size int
88         size += 4 // m.Retval
89         return size
90 }
91 func (m *Ikev2InitiateDelChildSaReply) Marshal(b []byte) ([]byte, error) {
92         var buf *codec.Buffer
93         if b == nil {
94                 buf = codec.NewBuffer(make([]byte, m.Size()))
95         } else {
96                 buf = codec.NewBuffer(b)
97         }
98         buf.EncodeUint32(uint32(m.Retval))
99         return buf.Bytes(), nil
100 }
101 func (m *Ikev2InitiateDelChildSaReply) Unmarshal(b []byte) error {
102         buf := codec.NewBuffer(b)
103         m.Retval = int32(buf.DecodeUint32())
104         return nil
105 }
106
107 // Ikev2InitiateDelIkeSa defines message 'ikev2_initiate_del_ike_sa'.
108 type Ikev2InitiateDelIkeSa struct {
109         Ispi uint64 `binapi:"u64,name=ispi" json:"ispi,omitempty"`
110 }
111
112 func (m *Ikev2InitiateDelIkeSa) Reset()               { *m = Ikev2InitiateDelIkeSa{} }
113 func (*Ikev2InitiateDelIkeSa) GetMessageName() string { return "ikev2_initiate_del_ike_sa" }
114 func (*Ikev2InitiateDelIkeSa) GetCrcString() string   { return "8d125bdd" }
115 func (*Ikev2InitiateDelIkeSa) GetMessageType() api.MessageType {
116         return api.RequestMessage
117 }
118
119 func (m *Ikev2InitiateDelIkeSa) Size() int {
120         if m == nil {
121                 return 0
122         }
123         var size int
124         size += 8 // m.Ispi
125         return size
126 }
127 func (m *Ikev2InitiateDelIkeSa) Marshal(b []byte) ([]byte, error) {
128         var buf *codec.Buffer
129         if b == nil {
130                 buf = codec.NewBuffer(make([]byte, m.Size()))
131         } else {
132                 buf = codec.NewBuffer(b)
133         }
134         buf.EncodeUint64(uint64(m.Ispi))
135         return buf.Bytes(), nil
136 }
137 func (m *Ikev2InitiateDelIkeSa) Unmarshal(b []byte) error {
138         buf := codec.NewBuffer(b)
139         m.Ispi = buf.DecodeUint64()
140         return nil
141 }
142
143 // Ikev2InitiateDelIkeSaReply defines message 'ikev2_initiate_del_ike_sa_reply'.
144 type Ikev2InitiateDelIkeSaReply struct {
145         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
146 }
147
148 func (m *Ikev2InitiateDelIkeSaReply) Reset()               { *m = Ikev2InitiateDelIkeSaReply{} }
149 func (*Ikev2InitiateDelIkeSaReply) GetMessageName() string { return "ikev2_initiate_del_ike_sa_reply" }
150 func (*Ikev2InitiateDelIkeSaReply) GetCrcString() string   { return "e8d4e804" }
151 func (*Ikev2InitiateDelIkeSaReply) GetMessageType() api.MessageType {
152         return api.ReplyMessage
153 }
154
155 func (m *Ikev2InitiateDelIkeSaReply) Size() int {
156         if m == nil {
157                 return 0
158         }
159         var size int
160         size += 4 // m.Retval
161         return size
162 }
163 func (m *Ikev2InitiateDelIkeSaReply) Marshal(b []byte) ([]byte, error) {
164         var buf *codec.Buffer
165         if b == nil {
166                 buf = codec.NewBuffer(make([]byte, m.Size()))
167         } else {
168                 buf = codec.NewBuffer(b)
169         }
170         buf.EncodeUint32(uint32(m.Retval))
171         return buf.Bytes(), nil
172 }
173 func (m *Ikev2InitiateDelIkeSaReply) Unmarshal(b []byte) error {
174         buf := codec.NewBuffer(b)
175         m.Retval = int32(buf.DecodeUint32())
176         return nil
177 }
178
179 // Ikev2InitiateRekeyChildSa defines message 'ikev2_initiate_rekey_child_sa'.
180 type Ikev2InitiateRekeyChildSa struct {
181         Ispi uint32 `binapi:"u32,name=ispi" json:"ispi,omitempty"`
182 }
183
184 func (m *Ikev2InitiateRekeyChildSa) Reset()               { *m = Ikev2InitiateRekeyChildSa{} }
185 func (*Ikev2InitiateRekeyChildSa) GetMessageName() string { return "ikev2_initiate_rekey_child_sa" }
186 func (*Ikev2InitiateRekeyChildSa) GetCrcString() string   { return "7f004d2e" }
187 func (*Ikev2InitiateRekeyChildSa) GetMessageType() api.MessageType {
188         return api.RequestMessage
189 }
190
191 func (m *Ikev2InitiateRekeyChildSa) Size() int {
192         if m == nil {
193                 return 0
194         }
195         var size int
196         size += 4 // m.Ispi
197         return size
198 }
199 func (m *Ikev2InitiateRekeyChildSa) Marshal(b []byte) ([]byte, error) {
200         var buf *codec.Buffer
201         if b == nil {
202                 buf = codec.NewBuffer(make([]byte, m.Size()))
203         } else {
204                 buf = codec.NewBuffer(b)
205         }
206         buf.EncodeUint32(uint32(m.Ispi))
207         return buf.Bytes(), nil
208 }
209 func (m *Ikev2InitiateRekeyChildSa) Unmarshal(b []byte) error {
210         buf := codec.NewBuffer(b)
211         m.Ispi = buf.DecodeUint32()
212         return nil
213 }
214
215 // Ikev2InitiateRekeyChildSaReply defines message 'ikev2_initiate_rekey_child_sa_reply'.
216 type Ikev2InitiateRekeyChildSaReply struct {
217         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
218 }
219
220 func (m *Ikev2InitiateRekeyChildSaReply) Reset() { *m = Ikev2InitiateRekeyChildSaReply{} }
221 func (*Ikev2InitiateRekeyChildSaReply) GetMessageName() string {
222         return "ikev2_initiate_rekey_child_sa_reply"
223 }
224 func (*Ikev2InitiateRekeyChildSaReply) GetCrcString() string { return "e8d4e804" }
225 func (*Ikev2InitiateRekeyChildSaReply) GetMessageType() api.MessageType {
226         return api.ReplyMessage
227 }
228
229 func (m *Ikev2InitiateRekeyChildSaReply) Size() int {
230         if m == nil {
231                 return 0
232         }
233         var size int
234         size += 4 // m.Retval
235         return size
236 }
237 func (m *Ikev2InitiateRekeyChildSaReply) Marshal(b []byte) ([]byte, error) {
238         var buf *codec.Buffer
239         if b == nil {
240                 buf = codec.NewBuffer(make([]byte, m.Size()))
241         } else {
242                 buf = codec.NewBuffer(b)
243         }
244         buf.EncodeUint32(uint32(m.Retval))
245         return buf.Bytes(), nil
246 }
247 func (m *Ikev2InitiateRekeyChildSaReply) Unmarshal(b []byte) error {
248         buf := codec.NewBuffer(b)
249         m.Retval = int32(buf.DecodeUint32())
250         return nil
251 }
252
253 // Ikev2InitiateSaInit defines message 'ikev2_initiate_sa_init'.
254 type Ikev2InitiateSaInit struct {
255         Name string `binapi:"string[64],name=name" json:"name,omitempty"`
256 }
257
258 func (m *Ikev2InitiateSaInit) Reset()               { *m = Ikev2InitiateSaInit{} }
259 func (*Ikev2InitiateSaInit) GetMessageName() string { return "ikev2_initiate_sa_init" }
260 func (*Ikev2InitiateSaInit) GetCrcString() string   { return "ebf79a66" }
261 func (*Ikev2InitiateSaInit) GetMessageType() api.MessageType {
262         return api.RequestMessage
263 }
264
265 func (m *Ikev2InitiateSaInit) Size() int {
266         if m == nil {
267                 return 0
268         }
269         var size int
270         size += 64 // m.Name
271         return size
272 }
273 func (m *Ikev2InitiateSaInit) Marshal(b []byte) ([]byte, error) {
274         var buf *codec.Buffer
275         if b == nil {
276                 buf = codec.NewBuffer(make([]byte, m.Size()))
277         } else {
278                 buf = codec.NewBuffer(b)
279         }
280         buf.EncodeString(m.Name, 64)
281         return buf.Bytes(), nil
282 }
283 func (m *Ikev2InitiateSaInit) Unmarshal(b []byte) error {
284         buf := codec.NewBuffer(b)
285         m.Name = buf.DecodeString(64)
286         return nil
287 }
288
289 // Ikev2InitiateSaInitReply defines message 'ikev2_initiate_sa_init_reply'.
290 type Ikev2InitiateSaInitReply struct {
291         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
292 }
293
294 func (m *Ikev2InitiateSaInitReply) Reset()               { *m = Ikev2InitiateSaInitReply{} }
295 func (*Ikev2InitiateSaInitReply) GetMessageName() string { return "ikev2_initiate_sa_init_reply" }
296 func (*Ikev2InitiateSaInitReply) GetCrcString() string   { return "e8d4e804" }
297 func (*Ikev2InitiateSaInitReply) GetMessageType() api.MessageType {
298         return api.ReplyMessage
299 }
300
301 func (m *Ikev2InitiateSaInitReply) Size() int {
302         if m == nil {
303                 return 0
304         }
305         var size int
306         size += 4 // m.Retval
307         return size
308 }
309 func (m *Ikev2InitiateSaInitReply) Marshal(b []byte) ([]byte, error) {
310         var buf *codec.Buffer
311         if b == nil {
312                 buf = codec.NewBuffer(make([]byte, m.Size()))
313         } else {
314                 buf = codec.NewBuffer(b)
315         }
316         buf.EncodeUint32(uint32(m.Retval))
317         return buf.Bytes(), nil
318 }
319 func (m *Ikev2InitiateSaInitReply) Unmarshal(b []byte) error {
320         buf := codec.NewBuffer(b)
321         m.Retval = int32(buf.DecodeUint32())
322         return nil
323 }
324
325 // Ikev2PluginGetVersion defines message 'ikev2_plugin_get_version'.
326 type Ikev2PluginGetVersion struct{}
327
328 func (m *Ikev2PluginGetVersion) Reset()               { *m = Ikev2PluginGetVersion{} }
329 func (*Ikev2PluginGetVersion) GetMessageName() string { return "ikev2_plugin_get_version" }
330 func (*Ikev2PluginGetVersion) GetCrcString() string   { return "51077d14" }
331 func (*Ikev2PluginGetVersion) GetMessageType() api.MessageType {
332         return api.RequestMessage
333 }
334
335 func (m *Ikev2PluginGetVersion) Size() int {
336         if m == nil {
337                 return 0
338         }
339         var size int
340         return size
341 }
342 func (m *Ikev2PluginGetVersion) Marshal(b []byte) ([]byte, error) {
343         var buf *codec.Buffer
344         if b == nil {
345                 buf = codec.NewBuffer(make([]byte, m.Size()))
346         } else {
347                 buf = codec.NewBuffer(b)
348         }
349         return buf.Bytes(), nil
350 }
351 func (m *Ikev2PluginGetVersion) Unmarshal(b []byte) error {
352         return nil
353 }
354
355 // Ikev2PluginGetVersionReply defines message 'ikev2_plugin_get_version_reply'.
356 type Ikev2PluginGetVersionReply struct {
357         Major uint32 `binapi:"u32,name=major" json:"major,omitempty"`
358         Minor uint32 `binapi:"u32,name=minor" json:"minor,omitempty"`
359 }
360
361 func (m *Ikev2PluginGetVersionReply) Reset()               { *m = Ikev2PluginGetVersionReply{} }
362 func (*Ikev2PluginGetVersionReply) GetMessageName() string { return "ikev2_plugin_get_version_reply" }
363 func (*Ikev2PluginGetVersionReply) GetCrcString() string   { return "9b32cf86" }
364 func (*Ikev2PluginGetVersionReply) GetMessageType() api.MessageType {
365         return api.ReplyMessage
366 }
367
368 func (m *Ikev2PluginGetVersionReply) Size() int {
369         if m == nil {
370                 return 0
371         }
372         var size int
373         size += 4 // m.Major
374         size += 4 // m.Minor
375         return size
376 }
377 func (m *Ikev2PluginGetVersionReply) Marshal(b []byte) ([]byte, error) {
378         var buf *codec.Buffer
379         if b == nil {
380                 buf = codec.NewBuffer(make([]byte, m.Size()))
381         } else {
382                 buf = codec.NewBuffer(b)
383         }
384         buf.EncodeUint32(uint32(m.Major))
385         buf.EncodeUint32(uint32(m.Minor))
386         return buf.Bytes(), nil
387 }
388 func (m *Ikev2PluginGetVersionReply) Unmarshal(b []byte) error {
389         buf := codec.NewBuffer(b)
390         m.Major = buf.DecodeUint32()
391         m.Minor = buf.DecodeUint32()
392         return nil
393 }
394
395 // Ikev2ProfileAddDel defines message 'ikev2_profile_add_del'.
396 type Ikev2ProfileAddDel struct {
397         Name  string `binapi:"string[64],name=name" json:"name,omitempty"`
398         IsAdd bool   `binapi:"bool,name=is_add" json:"is_add,omitempty"`
399 }
400
401 func (m *Ikev2ProfileAddDel) Reset()               { *m = Ikev2ProfileAddDel{} }
402 func (*Ikev2ProfileAddDel) GetMessageName() string { return "ikev2_profile_add_del" }
403 func (*Ikev2ProfileAddDel) GetCrcString() string   { return "2c925b55" }
404 func (*Ikev2ProfileAddDel) GetMessageType() api.MessageType {
405         return api.RequestMessage
406 }
407
408 func (m *Ikev2ProfileAddDel) Size() int {
409         if m == nil {
410                 return 0
411         }
412         var size int
413         size += 64 // m.Name
414         size += 1  // m.IsAdd
415         return size
416 }
417 func (m *Ikev2ProfileAddDel) Marshal(b []byte) ([]byte, error) {
418         var buf *codec.Buffer
419         if b == nil {
420                 buf = codec.NewBuffer(make([]byte, m.Size()))
421         } else {
422                 buf = codec.NewBuffer(b)
423         }
424         buf.EncodeString(m.Name, 64)
425         buf.EncodeBool(m.IsAdd)
426         return buf.Bytes(), nil
427 }
428 func (m *Ikev2ProfileAddDel) Unmarshal(b []byte) error {
429         buf := codec.NewBuffer(b)
430         m.Name = buf.DecodeString(64)
431         m.IsAdd = buf.DecodeBool()
432         return nil
433 }
434
435 // Ikev2ProfileAddDelReply defines message 'ikev2_profile_add_del_reply'.
436 type Ikev2ProfileAddDelReply struct {
437         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
438 }
439
440 func (m *Ikev2ProfileAddDelReply) Reset()               { *m = Ikev2ProfileAddDelReply{} }
441 func (*Ikev2ProfileAddDelReply) GetMessageName() string { return "ikev2_profile_add_del_reply" }
442 func (*Ikev2ProfileAddDelReply) GetCrcString() string   { return "e8d4e804" }
443 func (*Ikev2ProfileAddDelReply) GetMessageType() api.MessageType {
444         return api.ReplyMessage
445 }
446
447 func (m *Ikev2ProfileAddDelReply) Size() int {
448         if m == nil {
449                 return 0
450         }
451         var size int
452         size += 4 // m.Retval
453         return size
454 }
455 func (m *Ikev2ProfileAddDelReply) Marshal(b []byte) ([]byte, error) {
456         var buf *codec.Buffer
457         if b == nil {
458                 buf = codec.NewBuffer(make([]byte, m.Size()))
459         } else {
460                 buf = codec.NewBuffer(b)
461         }
462         buf.EncodeUint32(uint32(m.Retval))
463         return buf.Bytes(), nil
464 }
465 func (m *Ikev2ProfileAddDelReply) Unmarshal(b []byte) error {
466         buf := codec.NewBuffer(b)
467         m.Retval = int32(buf.DecodeUint32())
468         return nil
469 }
470
471 // Ikev2ProfileSetAuth defines message 'ikev2_profile_set_auth'.
472 type Ikev2ProfileSetAuth struct {
473         Name       string `binapi:"string[64],name=name" json:"name,omitempty"`
474         AuthMethod uint8  `binapi:"u8,name=auth_method" json:"auth_method,omitempty"`
475         IsHex      bool   `binapi:"bool,name=is_hex" json:"is_hex,omitempty"`
476         DataLen    uint32 `binapi:"u32,name=data_len" json:"-"`
477         Data       []byte `binapi:"u8[data_len],name=data" json:"data,omitempty"`
478 }
479
480 func (m *Ikev2ProfileSetAuth) Reset()               { *m = Ikev2ProfileSetAuth{} }
481 func (*Ikev2ProfileSetAuth) GetMessageName() string { return "ikev2_profile_set_auth" }
482 func (*Ikev2ProfileSetAuth) GetCrcString() string   { return "642c97cd" }
483 func (*Ikev2ProfileSetAuth) GetMessageType() api.MessageType {
484         return api.RequestMessage
485 }
486
487 func (m *Ikev2ProfileSetAuth) Size() int {
488         if m == nil {
489                 return 0
490         }
491         var size int
492         size += 64              // m.Name
493         size += 1               // m.AuthMethod
494         size += 1               // m.IsHex
495         size += 4               // m.DataLen
496         size += 1 * len(m.Data) // m.Data
497         return size
498 }
499 func (m *Ikev2ProfileSetAuth) Marshal(b []byte) ([]byte, error) {
500         var buf *codec.Buffer
501         if b == nil {
502                 buf = codec.NewBuffer(make([]byte, m.Size()))
503         } else {
504                 buf = codec.NewBuffer(b)
505         }
506         buf.EncodeString(m.Name, 64)
507         buf.EncodeUint8(uint8(m.AuthMethod))
508         buf.EncodeBool(m.IsHex)
509         buf.EncodeUint32(uint32(len(m.Data)))
510         buf.EncodeBytes(m.Data[:], 0)
511         return buf.Bytes(), nil
512 }
513 func (m *Ikev2ProfileSetAuth) Unmarshal(b []byte) error {
514         buf := codec.NewBuffer(b)
515         m.Name = buf.DecodeString(64)
516         m.AuthMethod = buf.DecodeUint8()
517         m.IsHex = buf.DecodeBool()
518         m.DataLen = buf.DecodeUint32()
519         copy(m.Data[:], buf.DecodeBytes(0))
520         return nil
521 }
522
523 // Ikev2ProfileSetAuthReply defines message 'ikev2_profile_set_auth_reply'.
524 type Ikev2ProfileSetAuthReply struct {
525         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
526 }
527
528 func (m *Ikev2ProfileSetAuthReply) Reset()               { *m = Ikev2ProfileSetAuthReply{} }
529 func (*Ikev2ProfileSetAuthReply) GetMessageName() string { return "ikev2_profile_set_auth_reply" }
530 func (*Ikev2ProfileSetAuthReply) GetCrcString() string   { return "e8d4e804" }
531 func (*Ikev2ProfileSetAuthReply) GetMessageType() api.MessageType {
532         return api.ReplyMessage
533 }
534
535 func (m *Ikev2ProfileSetAuthReply) Size() int {
536         if m == nil {
537                 return 0
538         }
539         var size int
540         size += 4 // m.Retval
541         return size
542 }
543 func (m *Ikev2ProfileSetAuthReply) Marshal(b []byte) ([]byte, error) {
544         var buf *codec.Buffer
545         if b == nil {
546                 buf = codec.NewBuffer(make([]byte, m.Size()))
547         } else {
548                 buf = codec.NewBuffer(b)
549         }
550         buf.EncodeUint32(uint32(m.Retval))
551         return buf.Bytes(), nil
552 }
553 func (m *Ikev2ProfileSetAuthReply) Unmarshal(b []byte) error {
554         buf := codec.NewBuffer(b)
555         m.Retval = int32(buf.DecodeUint32())
556         return nil
557 }
558
559 // Ikev2ProfileSetID defines message 'ikev2_profile_set_id'.
560 type Ikev2ProfileSetID struct {
561         Name    string `binapi:"string[64],name=name" json:"name,omitempty"`
562         IsLocal bool   `binapi:"bool,name=is_local" json:"is_local,omitempty"`
563         IDType  uint8  `binapi:"u8,name=id_type" json:"id_type,omitempty"`
564         DataLen uint32 `binapi:"u32,name=data_len" json:"-"`
565         Data    []byte `binapi:"u8[data_len],name=data" json:"data,omitempty"`
566 }
567
568 func (m *Ikev2ProfileSetID) Reset()               { *m = Ikev2ProfileSetID{} }
569 func (*Ikev2ProfileSetID) GetMessageName() string { return "ikev2_profile_set_id" }
570 func (*Ikev2ProfileSetID) GetCrcString() string   { return "4d7e2418" }
571 func (*Ikev2ProfileSetID) GetMessageType() api.MessageType {
572         return api.RequestMessage
573 }
574
575 func (m *Ikev2ProfileSetID) Size() int {
576         if m == nil {
577                 return 0
578         }
579         var size int
580         size += 64              // m.Name
581         size += 1               // m.IsLocal
582         size += 1               // m.IDType
583         size += 4               // m.DataLen
584         size += 1 * len(m.Data) // m.Data
585         return size
586 }
587 func (m *Ikev2ProfileSetID) Marshal(b []byte) ([]byte, error) {
588         var buf *codec.Buffer
589         if b == nil {
590                 buf = codec.NewBuffer(make([]byte, m.Size()))
591         } else {
592                 buf = codec.NewBuffer(b)
593         }
594         buf.EncodeString(m.Name, 64)
595         buf.EncodeBool(m.IsLocal)
596         buf.EncodeUint8(uint8(m.IDType))
597         buf.EncodeUint32(uint32(len(m.Data)))
598         buf.EncodeBytes(m.Data[:], 0)
599         return buf.Bytes(), nil
600 }
601 func (m *Ikev2ProfileSetID) Unmarshal(b []byte) error {
602         buf := codec.NewBuffer(b)
603         m.Name = buf.DecodeString(64)
604         m.IsLocal = buf.DecodeBool()
605         m.IDType = buf.DecodeUint8()
606         m.DataLen = buf.DecodeUint32()
607         copy(m.Data[:], buf.DecodeBytes(0))
608         return nil
609 }
610
611 // Ikev2ProfileSetIDReply defines message 'ikev2_profile_set_id_reply'.
612 type Ikev2ProfileSetIDReply struct {
613         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
614 }
615
616 func (m *Ikev2ProfileSetIDReply) Reset()               { *m = Ikev2ProfileSetIDReply{} }
617 func (*Ikev2ProfileSetIDReply) GetMessageName() string { return "ikev2_profile_set_id_reply" }
618 func (*Ikev2ProfileSetIDReply) GetCrcString() string   { return "e8d4e804" }
619 func (*Ikev2ProfileSetIDReply) GetMessageType() api.MessageType {
620         return api.ReplyMessage
621 }
622
623 func (m *Ikev2ProfileSetIDReply) Size() int {
624         if m == nil {
625                 return 0
626         }
627         var size int
628         size += 4 // m.Retval
629         return size
630 }
631 func (m *Ikev2ProfileSetIDReply) Marshal(b []byte) ([]byte, error) {
632         var buf *codec.Buffer
633         if b == nil {
634                 buf = codec.NewBuffer(make([]byte, m.Size()))
635         } else {
636                 buf = codec.NewBuffer(b)
637         }
638         buf.EncodeUint32(uint32(m.Retval))
639         return buf.Bytes(), nil
640 }
641 func (m *Ikev2ProfileSetIDReply) Unmarshal(b []byte) error {
642         buf := codec.NewBuffer(b)
643         m.Retval = int32(buf.DecodeUint32())
644         return nil
645 }
646
647 // Ikev2ProfileSetIpsecUDPPort defines message 'ikev2_profile_set_ipsec_udp_port'.
648 type Ikev2ProfileSetIpsecUDPPort struct {
649         IsSet uint8  `binapi:"u8,name=is_set" json:"is_set,omitempty"`
650         Port  uint16 `binapi:"u16,name=port" json:"port,omitempty"`
651         Name  string `binapi:"string[64],name=name" json:"name,omitempty"`
652 }
653
654 func (m *Ikev2ProfileSetIpsecUDPPort) Reset() { *m = Ikev2ProfileSetIpsecUDPPort{} }
655 func (*Ikev2ProfileSetIpsecUDPPort) GetMessageName() string {
656         return "ikev2_profile_set_ipsec_udp_port"
657 }
658 func (*Ikev2ProfileSetIpsecUDPPort) GetCrcString() string { return "615ce758" }
659 func (*Ikev2ProfileSetIpsecUDPPort) GetMessageType() api.MessageType {
660         return api.RequestMessage
661 }
662
663 func (m *Ikev2ProfileSetIpsecUDPPort) Size() int {
664         if m == nil {
665                 return 0
666         }
667         var size int
668         size += 1  // m.IsSet
669         size += 2  // m.Port
670         size += 64 // m.Name
671         return size
672 }
673 func (m *Ikev2ProfileSetIpsecUDPPort) Marshal(b []byte) ([]byte, error) {
674         var buf *codec.Buffer
675         if b == nil {
676                 buf = codec.NewBuffer(make([]byte, m.Size()))
677         } else {
678                 buf = codec.NewBuffer(b)
679         }
680         buf.EncodeUint8(uint8(m.IsSet))
681         buf.EncodeUint16(uint16(m.Port))
682         buf.EncodeString(m.Name, 64)
683         return buf.Bytes(), nil
684 }
685 func (m *Ikev2ProfileSetIpsecUDPPort) Unmarshal(b []byte) error {
686         buf := codec.NewBuffer(b)
687         m.IsSet = buf.DecodeUint8()
688         m.Port = buf.DecodeUint16()
689         m.Name = buf.DecodeString(64)
690         return nil
691 }
692
693 // Ikev2ProfileSetIpsecUDPPortReply defines message 'ikev2_profile_set_ipsec_udp_port_reply'.
694 type Ikev2ProfileSetIpsecUDPPortReply struct {
695         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
696 }
697
698 func (m *Ikev2ProfileSetIpsecUDPPortReply) Reset() { *m = Ikev2ProfileSetIpsecUDPPortReply{} }
699 func (*Ikev2ProfileSetIpsecUDPPortReply) GetMessageName() string {
700         return "ikev2_profile_set_ipsec_udp_port_reply"
701 }
702 func (*Ikev2ProfileSetIpsecUDPPortReply) GetCrcString() string { return "e8d4e804" }
703 func (*Ikev2ProfileSetIpsecUDPPortReply) GetMessageType() api.MessageType {
704         return api.ReplyMessage
705 }
706
707 func (m *Ikev2ProfileSetIpsecUDPPortReply) Size() int {
708         if m == nil {
709                 return 0
710         }
711         var size int
712         size += 4 // m.Retval
713         return size
714 }
715 func (m *Ikev2ProfileSetIpsecUDPPortReply) Marshal(b []byte) ([]byte, error) {
716         var buf *codec.Buffer
717         if b == nil {
718                 buf = codec.NewBuffer(make([]byte, m.Size()))
719         } else {
720                 buf = codec.NewBuffer(b)
721         }
722         buf.EncodeUint32(uint32(m.Retval))
723         return buf.Bytes(), nil
724 }
725 func (m *Ikev2ProfileSetIpsecUDPPortReply) Unmarshal(b []byte) error {
726         buf := codec.NewBuffer(b)
727         m.Retval = int32(buf.DecodeUint32())
728         return nil
729 }
730
731 // Ikev2ProfileSetLiveness defines message 'ikev2_profile_set_liveness'.
732 type Ikev2ProfileSetLiveness struct {
733         Period     uint32 `binapi:"u32,name=period" json:"period,omitempty"`
734         MaxRetries uint32 `binapi:"u32,name=max_retries" json:"max_retries,omitempty"`
735 }
736
737 func (m *Ikev2ProfileSetLiveness) Reset()               { *m = Ikev2ProfileSetLiveness{} }
738 func (*Ikev2ProfileSetLiveness) GetMessageName() string { return "ikev2_profile_set_liveness" }
739 func (*Ikev2ProfileSetLiveness) GetCrcString() string   { return "6bdf4d65" }
740 func (*Ikev2ProfileSetLiveness) GetMessageType() api.MessageType {
741         return api.RequestMessage
742 }
743
744 func (m *Ikev2ProfileSetLiveness) Size() int {
745         if m == nil {
746                 return 0
747         }
748         var size int
749         size += 4 // m.Period
750         size += 4 // m.MaxRetries
751         return size
752 }
753 func (m *Ikev2ProfileSetLiveness) Marshal(b []byte) ([]byte, error) {
754         var buf *codec.Buffer
755         if b == nil {
756                 buf = codec.NewBuffer(make([]byte, m.Size()))
757         } else {
758                 buf = codec.NewBuffer(b)
759         }
760         buf.EncodeUint32(uint32(m.Period))
761         buf.EncodeUint32(uint32(m.MaxRetries))
762         return buf.Bytes(), nil
763 }
764 func (m *Ikev2ProfileSetLiveness) Unmarshal(b []byte) error {
765         buf := codec.NewBuffer(b)
766         m.Period = buf.DecodeUint32()
767         m.MaxRetries = buf.DecodeUint32()
768         return nil
769 }
770
771 // Ikev2ProfileSetLivenessReply defines message 'ikev2_profile_set_liveness_reply'.
772 type Ikev2ProfileSetLivenessReply struct {
773         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
774 }
775
776 func (m *Ikev2ProfileSetLivenessReply) Reset() { *m = Ikev2ProfileSetLivenessReply{} }
777 func (*Ikev2ProfileSetLivenessReply) GetMessageName() string {
778         return "ikev2_profile_set_liveness_reply"
779 }
780 func (*Ikev2ProfileSetLivenessReply) GetCrcString() string { return "e8d4e804" }
781 func (*Ikev2ProfileSetLivenessReply) GetMessageType() api.MessageType {
782         return api.ReplyMessage
783 }
784
785 func (m *Ikev2ProfileSetLivenessReply) Size() int {
786         if m == nil {
787                 return 0
788         }
789         var size int
790         size += 4 // m.Retval
791         return size
792 }
793 func (m *Ikev2ProfileSetLivenessReply) Marshal(b []byte) ([]byte, error) {
794         var buf *codec.Buffer
795         if b == nil {
796                 buf = codec.NewBuffer(make([]byte, m.Size()))
797         } else {
798                 buf = codec.NewBuffer(b)
799         }
800         buf.EncodeUint32(uint32(m.Retval))
801         return buf.Bytes(), nil
802 }
803 func (m *Ikev2ProfileSetLivenessReply) Unmarshal(b []byte) error {
804         buf := codec.NewBuffer(b)
805         m.Retval = int32(buf.DecodeUint32())
806         return nil
807 }
808
809 // Ikev2ProfileSetTs defines message 'ikev2_profile_set_ts'.
810 type Ikev2ProfileSetTs struct {
811         Name      string `binapi:"string[64],name=name" json:"name,omitempty"`
812         IsLocal   bool   `binapi:"bool,name=is_local" json:"is_local,omitempty"`
813         Proto     uint8  `binapi:"u8,name=proto" json:"proto,omitempty"`
814         StartPort uint16 `binapi:"u16,name=start_port" json:"start_port,omitempty"`
815         EndPort   uint16 `binapi:"u16,name=end_port" json:"end_port,omitempty"`
816         StartAddr uint32 `binapi:"u32,name=start_addr" json:"start_addr,omitempty"`
817         EndAddr   uint32 `binapi:"u32,name=end_addr" json:"end_addr,omitempty"`
818 }
819
820 func (m *Ikev2ProfileSetTs) Reset()               { *m = Ikev2ProfileSetTs{} }
821 func (*Ikev2ProfileSetTs) GetMessageName() string { return "ikev2_profile_set_ts" }
822 func (*Ikev2ProfileSetTs) GetCrcString() string   { return "64d55c16" }
823 func (*Ikev2ProfileSetTs) GetMessageType() api.MessageType {
824         return api.RequestMessage
825 }
826
827 func (m *Ikev2ProfileSetTs) Size() int {
828         if m == nil {
829                 return 0
830         }
831         var size int
832         size += 64 // m.Name
833         size += 1  // m.IsLocal
834         size += 1  // m.Proto
835         size += 2  // m.StartPort
836         size += 2  // m.EndPort
837         size += 4  // m.StartAddr
838         size += 4  // m.EndAddr
839         return size
840 }
841 func (m *Ikev2ProfileSetTs) Marshal(b []byte) ([]byte, error) {
842         var buf *codec.Buffer
843         if b == nil {
844                 buf = codec.NewBuffer(make([]byte, m.Size()))
845         } else {
846                 buf = codec.NewBuffer(b)
847         }
848         buf.EncodeString(m.Name, 64)
849         buf.EncodeBool(m.IsLocal)
850         buf.EncodeUint8(uint8(m.Proto))
851         buf.EncodeUint16(uint16(m.StartPort))
852         buf.EncodeUint16(uint16(m.EndPort))
853         buf.EncodeUint32(uint32(m.StartAddr))
854         buf.EncodeUint32(uint32(m.EndAddr))
855         return buf.Bytes(), nil
856 }
857 func (m *Ikev2ProfileSetTs) Unmarshal(b []byte) error {
858         buf := codec.NewBuffer(b)
859         m.Name = buf.DecodeString(64)
860         m.IsLocal = buf.DecodeBool()
861         m.Proto = buf.DecodeUint8()
862         m.StartPort = buf.DecodeUint16()
863         m.EndPort = buf.DecodeUint16()
864         m.StartAddr = buf.DecodeUint32()
865         m.EndAddr = buf.DecodeUint32()
866         return nil
867 }
868
869 // Ikev2ProfileSetTsReply defines message 'ikev2_profile_set_ts_reply'.
870 type Ikev2ProfileSetTsReply struct {
871         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
872 }
873
874 func (m *Ikev2ProfileSetTsReply) Reset()               { *m = Ikev2ProfileSetTsReply{} }
875 func (*Ikev2ProfileSetTsReply) GetMessageName() string { return "ikev2_profile_set_ts_reply" }
876 func (*Ikev2ProfileSetTsReply) GetCrcString() string   { return "e8d4e804" }
877 func (*Ikev2ProfileSetTsReply) GetMessageType() api.MessageType {
878         return api.ReplyMessage
879 }
880
881 func (m *Ikev2ProfileSetTsReply) Size() int {
882         if m == nil {
883                 return 0
884         }
885         var size int
886         size += 4 // m.Retval
887         return size
888 }
889 func (m *Ikev2ProfileSetTsReply) Marshal(b []byte) ([]byte, error) {
890         var buf *codec.Buffer
891         if b == nil {
892                 buf = codec.NewBuffer(make([]byte, m.Size()))
893         } else {
894                 buf = codec.NewBuffer(b)
895         }
896         buf.EncodeUint32(uint32(m.Retval))
897         return buf.Bytes(), nil
898 }
899 func (m *Ikev2ProfileSetTsReply) Unmarshal(b []byte) error {
900         buf := codec.NewBuffer(b)
901         m.Retval = int32(buf.DecodeUint32())
902         return nil
903 }
904
905 // Ikev2ProfileSetUDPEncap defines message 'ikev2_profile_set_udp_encap'.
906 type Ikev2ProfileSetUDPEncap struct {
907         Name string `binapi:"string[64],name=name" json:"name,omitempty"`
908 }
909
910 func (m *Ikev2ProfileSetUDPEncap) Reset()               { *m = Ikev2ProfileSetUDPEncap{} }
911 func (*Ikev2ProfileSetUDPEncap) GetMessageName() string { return "ikev2_profile_set_udp_encap" }
912 func (*Ikev2ProfileSetUDPEncap) GetCrcString() string   { return "ebf79a66" }
913 func (*Ikev2ProfileSetUDPEncap) GetMessageType() api.MessageType {
914         return api.RequestMessage
915 }
916
917 func (m *Ikev2ProfileSetUDPEncap) Size() int {
918         if m == nil {
919                 return 0
920         }
921         var size int
922         size += 64 // m.Name
923         return size
924 }
925 func (m *Ikev2ProfileSetUDPEncap) Marshal(b []byte) ([]byte, error) {
926         var buf *codec.Buffer
927         if b == nil {
928                 buf = codec.NewBuffer(make([]byte, m.Size()))
929         } else {
930                 buf = codec.NewBuffer(b)
931         }
932         buf.EncodeString(m.Name, 64)
933         return buf.Bytes(), nil
934 }
935 func (m *Ikev2ProfileSetUDPEncap) Unmarshal(b []byte) error {
936         buf := codec.NewBuffer(b)
937         m.Name = buf.DecodeString(64)
938         return nil
939 }
940
941 // Ikev2ProfileSetUDPEncapReply defines message 'ikev2_profile_set_udp_encap_reply'.
942 type Ikev2ProfileSetUDPEncapReply struct {
943         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
944 }
945
946 func (m *Ikev2ProfileSetUDPEncapReply) Reset() { *m = Ikev2ProfileSetUDPEncapReply{} }
947 func (*Ikev2ProfileSetUDPEncapReply) GetMessageName() string {
948         return "ikev2_profile_set_udp_encap_reply"
949 }
950 func (*Ikev2ProfileSetUDPEncapReply) GetCrcString() string { return "e8d4e804" }
951 func (*Ikev2ProfileSetUDPEncapReply) GetMessageType() api.MessageType {
952         return api.ReplyMessage
953 }
954
955 func (m *Ikev2ProfileSetUDPEncapReply) Size() int {
956         if m == nil {
957                 return 0
958         }
959         var size int
960         size += 4 // m.Retval
961         return size
962 }
963 func (m *Ikev2ProfileSetUDPEncapReply) Marshal(b []byte) ([]byte, error) {
964         var buf *codec.Buffer
965         if b == nil {
966                 buf = codec.NewBuffer(make([]byte, m.Size()))
967         } else {
968                 buf = codec.NewBuffer(b)
969         }
970         buf.EncodeUint32(uint32(m.Retval))
971         return buf.Bytes(), nil
972 }
973 func (m *Ikev2ProfileSetUDPEncapReply) Unmarshal(b []byte) error {
974         buf := codec.NewBuffer(b)
975         m.Retval = int32(buf.DecodeUint32())
976         return nil
977 }
978
979 // Ikev2SetEspTransforms defines message 'ikev2_set_esp_transforms'.
980 type Ikev2SetEspTransforms struct {
981         Name          string `binapi:"string[64],name=name" json:"name,omitempty"`
982         CryptoAlg     uint32 `binapi:"u32,name=crypto_alg" json:"crypto_alg,omitempty"`
983         CryptoKeySize uint32 `binapi:"u32,name=crypto_key_size" json:"crypto_key_size,omitempty"`
984         IntegAlg      uint32 `binapi:"u32,name=integ_alg" json:"integ_alg,omitempty"`
985         DhGroup       uint32 `binapi:"u32,name=dh_group" json:"dh_group,omitempty"`
986 }
987
988 func (m *Ikev2SetEspTransforms) Reset()               { *m = Ikev2SetEspTransforms{} }
989 func (*Ikev2SetEspTransforms) GetMessageName() string { return "ikev2_set_esp_transforms" }
990 func (*Ikev2SetEspTransforms) GetCrcString() string   { return "936a1a37" }
991 func (*Ikev2SetEspTransforms) GetMessageType() api.MessageType {
992         return api.RequestMessage
993 }
994
995 func (m *Ikev2SetEspTransforms) Size() int {
996         if m == nil {
997                 return 0
998         }
999         var size int
1000         size += 64 // m.Name
1001         size += 4  // m.CryptoAlg
1002         size += 4  // m.CryptoKeySize
1003         size += 4  // m.IntegAlg
1004         size += 4  // m.DhGroup
1005         return size
1006 }
1007 func (m *Ikev2SetEspTransforms) Marshal(b []byte) ([]byte, error) {
1008         var buf *codec.Buffer
1009         if b == nil {
1010                 buf = codec.NewBuffer(make([]byte, m.Size()))
1011         } else {
1012                 buf = codec.NewBuffer(b)
1013         }
1014         buf.EncodeString(m.Name, 64)
1015         buf.EncodeUint32(uint32(m.CryptoAlg))
1016         buf.EncodeUint32(uint32(m.CryptoKeySize))
1017         buf.EncodeUint32(uint32(m.IntegAlg))
1018         buf.EncodeUint32(uint32(m.DhGroup))
1019         return buf.Bytes(), nil
1020 }
1021 func (m *Ikev2SetEspTransforms) Unmarshal(b []byte) error {
1022         buf := codec.NewBuffer(b)
1023         m.Name = buf.DecodeString(64)
1024         m.CryptoAlg = buf.DecodeUint32()
1025         m.CryptoKeySize = buf.DecodeUint32()
1026         m.IntegAlg = buf.DecodeUint32()
1027         m.DhGroup = buf.DecodeUint32()
1028         return nil
1029 }
1030
1031 // Ikev2SetEspTransformsReply defines message 'ikev2_set_esp_transforms_reply'.
1032 type Ikev2SetEspTransformsReply struct {
1033         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1034 }
1035
1036 func (m *Ikev2SetEspTransformsReply) Reset()               { *m = Ikev2SetEspTransformsReply{} }
1037 func (*Ikev2SetEspTransformsReply) GetMessageName() string { return "ikev2_set_esp_transforms_reply" }
1038 func (*Ikev2SetEspTransformsReply) GetCrcString() string   { return "e8d4e804" }
1039 func (*Ikev2SetEspTransformsReply) GetMessageType() api.MessageType {
1040         return api.ReplyMessage
1041 }
1042
1043 func (m *Ikev2SetEspTransformsReply) Size() int {
1044         if m == nil {
1045                 return 0
1046         }
1047         var size int
1048         size += 4 // m.Retval
1049         return size
1050 }
1051 func (m *Ikev2SetEspTransformsReply) Marshal(b []byte) ([]byte, error) {
1052         var buf *codec.Buffer
1053         if b == nil {
1054                 buf = codec.NewBuffer(make([]byte, m.Size()))
1055         } else {
1056                 buf = codec.NewBuffer(b)
1057         }
1058         buf.EncodeUint32(uint32(m.Retval))
1059         return buf.Bytes(), nil
1060 }
1061 func (m *Ikev2SetEspTransformsReply) Unmarshal(b []byte) error {
1062         buf := codec.NewBuffer(b)
1063         m.Retval = int32(buf.DecodeUint32())
1064         return nil
1065 }
1066
1067 // Ikev2SetIkeTransforms defines message 'ikev2_set_ike_transforms'.
1068 type Ikev2SetIkeTransforms struct {
1069         Name          string `binapi:"string[64],name=name" json:"name,omitempty"`
1070         CryptoAlg     uint32 `binapi:"u32,name=crypto_alg" json:"crypto_alg,omitempty"`
1071         CryptoKeySize uint32 `binapi:"u32,name=crypto_key_size" json:"crypto_key_size,omitempty"`
1072         IntegAlg      uint32 `binapi:"u32,name=integ_alg" json:"integ_alg,omitempty"`
1073         DhGroup       uint32 `binapi:"u32,name=dh_group" json:"dh_group,omitempty"`
1074 }
1075
1076 func (m *Ikev2SetIkeTransforms) Reset()               { *m = Ikev2SetIkeTransforms{} }
1077 func (*Ikev2SetIkeTransforms) GetMessageName() string { return "ikev2_set_ike_transforms" }
1078 func (*Ikev2SetIkeTransforms) GetCrcString() string   { return "936a1a37" }
1079 func (*Ikev2SetIkeTransforms) GetMessageType() api.MessageType {
1080         return api.RequestMessage
1081 }
1082
1083 func (m *Ikev2SetIkeTransforms) Size() int {
1084         if m == nil {
1085                 return 0
1086         }
1087         var size int
1088         size += 64 // m.Name
1089         size += 4  // m.CryptoAlg
1090         size += 4  // m.CryptoKeySize
1091         size += 4  // m.IntegAlg
1092         size += 4  // m.DhGroup
1093         return size
1094 }
1095 func (m *Ikev2SetIkeTransforms) Marshal(b []byte) ([]byte, error) {
1096         var buf *codec.Buffer
1097         if b == nil {
1098                 buf = codec.NewBuffer(make([]byte, m.Size()))
1099         } else {
1100                 buf = codec.NewBuffer(b)
1101         }
1102         buf.EncodeString(m.Name, 64)
1103         buf.EncodeUint32(uint32(m.CryptoAlg))
1104         buf.EncodeUint32(uint32(m.CryptoKeySize))
1105         buf.EncodeUint32(uint32(m.IntegAlg))
1106         buf.EncodeUint32(uint32(m.DhGroup))
1107         return buf.Bytes(), nil
1108 }
1109 func (m *Ikev2SetIkeTransforms) Unmarshal(b []byte) error {
1110         buf := codec.NewBuffer(b)
1111         m.Name = buf.DecodeString(64)
1112         m.CryptoAlg = buf.DecodeUint32()
1113         m.CryptoKeySize = buf.DecodeUint32()
1114         m.IntegAlg = buf.DecodeUint32()
1115         m.DhGroup = buf.DecodeUint32()
1116         return nil
1117 }
1118
1119 // Ikev2SetIkeTransformsReply defines message 'ikev2_set_ike_transforms_reply'.
1120 type Ikev2SetIkeTransformsReply struct {
1121         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1122 }
1123
1124 func (m *Ikev2SetIkeTransformsReply) Reset()               { *m = Ikev2SetIkeTransformsReply{} }
1125 func (*Ikev2SetIkeTransformsReply) GetMessageName() string { return "ikev2_set_ike_transforms_reply" }
1126 func (*Ikev2SetIkeTransformsReply) GetCrcString() string   { return "e8d4e804" }
1127 func (*Ikev2SetIkeTransformsReply) GetMessageType() api.MessageType {
1128         return api.ReplyMessage
1129 }
1130
1131 func (m *Ikev2SetIkeTransformsReply) Size() int {
1132         if m == nil {
1133                 return 0
1134         }
1135         var size int
1136         size += 4 // m.Retval
1137         return size
1138 }
1139 func (m *Ikev2SetIkeTransformsReply) Marshal(b []byte) ([]byte, error) {
1140         var buf *codec.Buffer
1141         if b == nil {
1142                 buf = codec.NewBuffer(make([]byte, m.Size()))
1143         } else {
1144                 buf = codec.NewBuffer(b)
1145         }
1146         buf.EncodeUint32(uint32(m.Retval))
1147         return buf.Bytes(), nil
1148 }
1149 func (m *Ikev2SetIkeTransformsReply) Unmarshal(b []byte) error {
1150         buf := codec.NewBuffer(b)
1151         m.Retval = int32(buf.DecodeUint32())
1152         return nil
1153 }
1154
1155 // Ikev2SetLocalKey defines message 'ikev2_set_local_key'.
1156 type Ikev2SetLocalKey struct {
1157         KeyFile string `binapi:"string[256],name=key_file" json:"key_file,omitempty"`
1158 }
1159
1160 func (m *Ikev2SetLocalKey) Reset()               { *m = Ikev2SetLocalKey{} }
1161 func (*Ikev2SetLocalKey) GetMessageName() string { return "ikev2_set_local_key" }
1162 func (*Ikev2SetLocalKey) GetCrcString() string   { return "799b69ec" }
1163 func (*Ikev2SetLocalKey) GetMessageType() api.MessageType {
1164         return api.RequestMessage
1165 }
1166
1167 func (m *Ikev2SetLocalKey) Size() int {
1168         if m == nil {
1169                 return 0
1170         }
1171         var size int
1172         size += 256 // m.KeyFile
1173         return size
1174 }
1175 func (m *Ikev2SetLocalKey) Marshal(b []byte) ([]byte, error) {
1176         var buf *codec.Buffer
1177         if b == nil {
1178                 buf = codec.NewBuffer(make([]byte, m.Size()))
1179         } else {
1180                 buf = codec.NewBuffer(b)
1181         }
1182         buf.EncodeString(m.KeyFile, 256)
1183         return buf.Bytes(), nil
1184 }
1185 func (m *Ikev2SetLocalKey) Unmarshal(b []byte) error {
1186         buf := codec.NewBuffer(b)
1187         m.KeyFile = buf.DecodeString(256)
1188         return nil
1189 }
1190
1191 // Ikev2SetLocalKeyReply defines message 'ikev2_set_local_key_reply'.
1192 type Ikev2SetLocalKeyReply struct {
1193         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1194 }
1195
1196 func (m *Ikev2SetLocalKeyReply) Reset()               { *m = Ikev2SetLocalKeyReply{} }
1197 func (*Ikev2SetLocalKeyReply) GetMessageName() string { return "ikev2_set_local_key_reply" }
1198 func (*Ikev2SetLocalKeyReply) GetCrcString() string   { return "e8d4e804" }
1199 func (*Ikev2SetLocalKeyReply) GetMessageType() api.MessageType {
1200         return api.ReplyMessage
1201 }
1202
1203 func (m *Ikev2SetLocalKeyReply) Size() int {
1204         if m == nil {
1205                 return 0
1206         }
1207         var size int
1208         size += 4 // m.Retval
1209         return size
1210 }
1211 func (m *Ikev2SetLocalKeyReply) Marshal(b []byte) ([]byte, error) {
1212         var buf *codec.Buffer
1213         if b == nil {
1214                 buf = codec.NewBuffer(make([]byte, m.Size()))
1215         } else {
1216                 buf = codec.NewBuffer(b)
1217         }
1218         buf.EncodeUint32(uint32(m.Retval))
1219         return buf.Bytes(), nil
1220 }
1221 func (m *Ikev2SetLocalKeyReply) Unmarshal(b []byte) error {
1222         buf := codec.NewBuffer(b)
1223         m.Retval = int32(buf.DecodeUint32())
1224         return nil
1225 }
1226
1227 // Ikev2SetResponder defines message 'ikev2_set_responder'.
1228 type Ikev2SetResponder struct {
1229         Name      string                         `binapi:"string[64],name=name" json:"name,omitempty"`
1230         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1231         Address   ip_types.IP4Address            `binapi:"ip4_address,name=address" json:"address,omitempty"`
1232 }
1233
1234 func (m *Ikev2SetResponder) Reset()               { *m = Ikev2SetResponder{} }
1235 func (*Ikev2SetResponder) GetMessageName() string { return "ikev2_set_responder" }
1236 func (*Ikev2SetResponder) GetCrcString() string   { return "f0d3dc80" }
1237 func (*Ikev2SetResponder) GetMessageType() api.MessageType {
1238         return api.RequestMessage
1239 }
1240
1241 func (m *Ikev2SetResponder) Size() int {
1242         if m == nil {
1243                 return 0
1244         }
1245         var size int
1246         size += 64    // m.Name
1247         size += 4     // m.SwIfIndex
1248         size += 1 * 4 // m.Address
1249         return size
1250 }
1251 func (m *Ikev2SetResponder) Marshal(b []byte) ([]byte, error) {
1252         var buf *codec.Buffer
1253         if b == nil {
1254                 buf = codec.NewBuffer(make([]byte, m.Size()))
1255         } else {
1256                 buf = codec.NewBuffer(b)
1257         }
1258         buf.EncodeString(m.Name, 64)
1259         buf.EncodeUint32(uint32(m.SwIfIndex))
1260         buf.EncodeBytes(m.Address[:], 4)
1261         return buf.Bytes(), nil
1262 }
1263 func (m *Ikev2SetResponder) Unmarshal(b []byte) error {
1264         buf := codec.NewBuffer(b)
1265         m.Name = buf.DecodeString(64)
1266         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1267         copy(m.Address[:], buf.DecodeBytes(4))
1268         return nil
1269 }
1270
1271 // Ikev2SetResponderReply defines message 'ikev2_set_responder_reply'.
1272 type Ikev2SetResponderReply struct {
1273         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1274 }
1275
1276 func (m *Ikev2SetResponderReply) Reset()               { *m = Ikev2SetResponderReply{} }
1277 func (*Ikev2SetResponderReply) GetMessageName() string { return "ikev2_set_responder_reply" }
1278 func (*Ikev2SetResponderReply) GetCrcString() string   { return "e8d4e804" }
1279 func (*Ikev2SetResponderReply) GetMessageType() api.MessageType {
1280         return api.ReplyMessage
1281 }
1282
1283 func (m *Ikev2SetResponderReply) Size() int {
1284         if m == nil {
1285                 return 0
1286         }
1287         var size int
1288         size += 4 // m.Retval
1289         return size
1290 }
1291 func (m *Ikev2SetResponderReply) Marshal(b []byte) ([]byte, error) {
1292         var buf *codec.Buffer
1293         if b == nil {
1294                 buf = codec.NewBuffer(make([]byte, m.Size()))
1295         } else {
1296                 buf = codec.NewBuffer(b)
1297         }
1298         buf.EncodeUint32(uint32(m.Retval))
1299         return buf.Bytes(), nil
1300 }
1301 func (m *Ikev2SetResponderReply) Unmarshal(b []byte) error {
1302         buf := codec.NewBuffer(b)
1303         m.Retval = int32(buf.DecodeUint32())
1304         return nil
1305 }
1306
1307 // Ikev2SetSaLifetime defines message 'ikev2_set_sa_lifetime'.
1308 type Ikev2SetSaLifetime struct {
1309         Name            string `binapi:"string[64],name=name" json:"name,omitempty"`
1310         Lifetime        uint64 `binapi:"u64,name=lifetime" json:"lifetime,omitempty"`
1311         LifetimeJitter  uint32 `binapi:"u32,name=lifetime_jitter" json:"lifetime_jitter,omitempty"`
1312         Handover        uint32 `binapi:"u32,name=handover" json:"handover,omitempty"`
1313         LifetimeMaxdata uint64 `binapi:"u64,name=lifetime_maxdata" json:"lifetime_maxdata,omitempty"`
1314 }
1315
1316 func (m *Ikev2SetSaLifetime) Reset()               { *m = Ikev2SetSaLifetime{} }
1317 func (*Ikev2SetSaLifetime) GetMessageName() string { return "ikev2_set_sa_lifetime" }
1318 func (*Ikev2SetSaLifetime) GetCrcString() string   { return "7039feaa" }
1319 func (*Ikev2SetSaLifetime) GetMessageType() api.MessageType {
1320         return api.RequestMessage
1321 }
1322
1323 func (m *Ikev2SetSaLifetime) Size() int {
1324         if m == nil {
1325                 return 0
1326         }
1327         var size int
1328         size += 64 // m.Name
1329         size += 8  // m.Lifetime
1330         size += 4  // m.LifetimeJitter
1331         size += 4  // m.Handover
1332         size += 8  // m.LifetimeMaxdata
1333         return size
1334 }
1335 func (m *Ikev2SetSaLifetime) Marshal(b []byte) ([]byte, error) {
1336         var buf *codec.Buffer
1337         if b == nil {
1338                 buf = codec.NewBuffer(make([]byte, m.Size()))
1339         } else {
1340                 buf = codec.NewBuffer(b)
1341         }
1342         buf.EncodeString(m.Name, 64)
1343         buf.EncodeUint64(uint64(m.Lifetime))
1344         buf.EncodeUint32(uint32(m.LifetimeJitter))
1345         buf.EncodeUint32(uint32(m.Handover))
1346         buf.EncodeUint64(uint64(m.LifetimeMaxdata))
1347         return buf.Bytes(), nil
1348 }
1349 func (m *Ikev2SetSaLifetime) Unmarshal(b []byte) error {
1350         buf := codec.NewBuffer(b)
1351         m.Name = buf.DecodeString(64)
1352         m.Lifetime = buf.DecodeUint64()
1353         m.LifetimeJitter = buf.DecodeUint32()
1354         m.Handover = buf.DecodeUint32()
1355         m.LifetimeMaxdata = buf.DecodeUint64()
1356         return nil
1357 }
1358
1359 // Ikev2SetSaLifetimeReply defines message 'ikev2_set_sa_lifetime_reply'.
1360 type Ikev2SetSaLifetimeReply struct {
1361         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1362 }
1363
1364 func (m *Ikev2SetSaLifetimeReply) Reset()               { *m = Ikev2SetSaLifetimeReply{} }
1365 func (*Ikev2SetSaLifetimeReply) GetMessageName() string { return "ikev2_set_sa_lifetime_reply" }
1366 func (*Ikev2SetSaLifetimeReply) GetCrcString() string   { return "e8d4e804" }
1367 func (*Ikev2SetSaLifetimeReply) GetMessageType() api.MessageType {
1368         return api.ReplyMessage
1369 }
1370
1371 func (m *Ikev2SetSaLifetimeReply) Size() int {
1372         if m == nil {
1373                 return 0
1374         }
1375         var size int
1376         size += 4 // m.Retval
1377         return size
1378 }
1379 func (m *Ikev2SetSaLifetimeReply) Marshal(b []byte) ([]byte, error) {
1380         var buf *codec.Buffer
1381         if b == nil {
1382                 buf = codec.NewBuffer(make([]byte, m.Size()))
1383         } else {
1384                 buf = codec.NewBuffer(b)
1385         }
1386         buf.EncodeUint32(uint32(m.Retval))
1387         return buf.Bytes(), nil
1388 }
1389 func (m *Ikev2SetSaLifetimeReply) Unmarshal(b []byte) error {
1390         buf := codec.NewBuffer(b)
1391         m.Retval = int32(buf.DecodeUint32())
1392         return nil
1393 }
1394
1395 // Ikev2SetTunnelInterface defines message 'ikev2_set_tunnel_interface'.
1396 type Ikev2SetTunnelInterface struct {
1397         Name      string                         `binapi:"string[64],name=name" json:"name,omitempty"`
1398         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1399 }
1400
1401 func (m *Ikev2SetTunnelInterface) Reset()               { *m = Ikev2SetTunnelInterface{} }
1402 func (*Ikev2SetTunnelInterface) GetMessageName() string { return "ikev2_set_tunnel_interface" }
1403 func (*Ikev2SetTunnelInterface) GetCrcString() string   { return "ca67182c" }
1404 func (*Ikev2SetTunnelInterface) GetMessageType() api.MessageType {
1405         return api.RequestMessage
1406 }
1407
1408 func (m *Ikev2SetTunnelInterface) Size() int {
1409         if m == nil {
1410                 return 0
1411         }
1412         var size int
1413         size += 64 // m.Name
1414         size += 4  // m.SwIfIndex
1415         return size
1416 }
1417 func (m *Ikev2SetTunnelInterface) Marshal(b []byte) ([]byte, error) {
1418         var buf *codec.Buffer
1419         if b == nil {
1420                 buf = codec.NewBuffer(make([]byte, m.Size()))
1421         } else {
1422                 buf = codec.NewBuffer(b)
1423         }
1424         buf.EncodeString(m.Name, 64)
1425         buf.EncodeUint32(uint32(m.SwIfIndex))
1426         return buf.Bytes(), nil
1427 }
1428 func (m *Ikev2SetTunnelInterface) Unmarshal(b []byte) error {
1429         buf := codec.NewBuffer(b)
1430         m.Name = buf.DecodeString(64)
1431         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1432         return nil
1433 }
1434
1435 // Ikev2SetTunnelInterfaceReply defines message 'ikev2_set_tunnel_interface_reply'.
1436 type Ikev2SetTunnelInterfaceReply struct {
1437         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1438 }
1439
1440 func (m *Ikev2SetTunnelInterfaceReply) Reset() { *m = Ikev2SetTunnelInterfaceReply{} }
1441 func (*Ikev2SetTunnelInterfaceReply) GetMessageName() string {
1442         return "ikev2_set_tunnel_interface_reply"
1443 }
1444 func (*Ikev2SetTunnelInterfaceReply) GetCrcString() string { return "e8d4e804" }
1445 func (*Ikev2SetTunnelInterfaceReply) GetMessageType() api.MessageType {
1446         return api.ReplyMessage
1447 }
1448
1449 func (m *Ikev2SetTunnelInterfaceReply) Size() int {
1450         if m == nil {
1451                 return 0
1452         }
1453         var size int
1454         size += 4 // m.Retval
1455         return size
1456 }
1457 func (m *Ikev2SetTunnelInterfaceReply) Marshal(b []byte) ([]byte, error) {
1458         var buf *codec.Buffer
1459         if b == nil {
1460                 buf = codec.NewBuffer(make([]byte, m.Size()))
1461         } else {
1462                 buf = codec.NewBuffer(b)
1463         }
1464         buf.EncodeUint32(uint32(m.Retval))
1465         return buf.Bytes(), nil
1466 }
1467 func (m *Ikev2SetTunnelInterfaceReply) Unmarshal(b []byte) error {
1468         buf := codec.NewBuffer(b)
1469         m.Retval = int32(buf.DecodeUint32())
1470         return nil
1471 }
1472
1473 func init() { file_ikev2_binapi_init() }
1474 func file_ikev2_binapi_init() {
1475         api.RegisterMessage((*Ikev2InitiateDelChildSa)(nil), "ikev2_initiate_del_child_sa_7f004d2e")
1476         api.RegisterMessage((*Ikev2InitiateDelChildSaReply)(nil), "ikev2_initiate_del_child_sa_reply_e8d4e804")
1477         api.RegisterMessage((*Ikev2InitiateDelIkeSa)(nil), "ikev2_initiate_del_ike_sa_8d125bdd")
1478         api.RegisterMessage((*Ikev2InitiateDelIkeSaReply)(nil), "ikev2_initiate_del_ike_sa_reply_e8d4e804")
1479         api.RegisterMessage((*Ikev2InitiateRekeyChildSa)(nil), "ikev2_initiate_rekey_child_sa_7f004d2e")
1480         api.RegisterMessage((*Ikev2InitiateRekeyChildSaReply)(nil), "ikev2_initiate_rekey_child_sa_reply_e8d4e804")
1481         api.RegisterMessage((*Ikev2InitiateSaInit)(nil), "ikev2_initiate_sa_init_ebf79a66")
1482         api.RegisterMessage((*Ikev2InitiateSaInitReply)(nil), "ikev2_initiate_sa_init_reply_e8d4e804")
1483         api.RegisterMessage((*Ikev2PluginGetVersion)(nil), "ikev2_plugin_get_version_51077d14")
1484         api.RegisterMessage((*Ikev2PluginGetVersionReply)(nil), "ikev2_plugin_get_version_reply_9b32cf86")
1485         api.RegisterMessage((*Ikev2ProfileAddDel)(nil), "ikev2_profile_add_del_2c925b55")
1486         api.RegisterMessage((*Ikev2ProfileAddDelReply)(nil), "ikev2_profile_add_del_reply_e8d4e804")
1487         api.RegisterMessage((*Ikev2ProfileSetAuth)(nil), "ikev2_profile_set_auth_642c97cd")
1488         api.RegisterMessage((*Ikev2ProfileSetAuthReply)(nil), "ikev2_profile_set_auth_reply_e8d4e804")
1489         api.RegisterMessage((*Ikev2ProfileSetID)(nil), "ikev2_profile_set_id_4d7e2418")
1490         api.RegisterMessage((*Ikev2ProfileSetIDReply)(nil), "ikev2_profile_set_id_reply_e8d4e804")
1491         api.RegisterMessage((*Ikev2ProfileSetIpsecUDPPort)(nil), "ikev2_profile_set_ipsec_udp_port_615ce758")
1492         api.RegisterMessage((*Ikev2ProfileSetIpsecUDPPortReply)(nil), "ikev2_profile_set_ipsec_udp_port_reply_e8d4e804")
1493         api.RegisterMessage((*Ikev2ProfileSetLiveness)(nil), "ikev2_profile_set_liveness_6bdf4d65")
1494         api.RegisterMessage((*Ikev2ProfileSetLivenessReply)(nil), "ikev2_profile_set_liveness_reply_e8d4e804")
1495         api.RegisterMessage((*Ikev2ProfileSetTs)(nil), "ikev2_profile_set_ts_64d55c16")
1496         api.RegisterMessage((*Ikev2ProfileSetTsReply)(nil), "ikev2_profile_set_ts_reply_e8d4e804")
1497         api.RegisterMessage((*Ikev2ProfileSetUDPEncap)(nil), "ikev2_profile_set_udp_encap_ebf79a66")
1498         api.RegisterMessage((*Ikev2ProfileSetUDPEncapReply)(nil), "ikev2_profile_set_udp_encap_reply_e8d4e804")
1499         api.RegisterMessage((*Ikev2SetEspTransforms)(nil), "ikev2_set_esp_transforms_936a1a37")
1500         api.RegisterMessage((*Ikev2SetEspTransformsReply)(nil), "ikev2_set_esp_transforms_reply_e8d4e804")
1501         api.RegisterMessage((*Ikev2SetIkeTransforms)(nil), "ikev2_set_ike_transforms_936a1a37")
1502         api.RegisterMessage((*Ikev2SetIkeTransformsReply)(nil), "ikev2_set_ike_transforms_reply_e8d4e804")
1503         api.RegisterMessage((*Ikev2SetLocalKey)(nil), "ikev2_set_local_key_799b69ec")
1504         api.RegisterMessage((*Ikev2SetLocalKeyReply)(nil), "ikev2_set_local_key_reply_e8d4e804")
1505         api.RegisterMessage((*Ikev2SetResponder)(nil), "ikev2_set_responder_f0d3dc80")
1506         api.RegisterMessage((*Ikev2SetResponderReply)(nil), "ikev2_set_responder_reply_e8d4e804")
1507         api.RegisterMessage((*Ikev2SetSaLifetime)(nil), "ikev2_set_sa_lifetime_7039feaa")
1508         api.RegisterMessage((*Ikev2SetSaLifetimeReply)(nil), "ikev2_set_sa_lifetime_reply_e8d4e804")
1509         api.RegisterMessage((*Ikev2SetTunnelInterface)(nil), "ikev2_set_tunnel_interface_ca67182c")
1510         api.RegisterMessage((*Ikev2SetTunnelInterfaceReply)(nil), "ikev2_set_tunnel_interface_reply_e8d4e804")
1511 }
1512
1513 // Messages returns list of all messages in this module.
1514 func AllMessages() []api.Message {
1515         return []api.Message{
1516                 (*Ikev2InitiateDelChildSa)(nil),
1517                 (*Ikev2InitiateDelChildSaReply)(nil),
1518                 (*Ikev2InitiateDelIkeSa)(nil),
1519                 (*Ikev2InitiateDelIkeSaReply)(nil),
1520                 (*Ikev2InitiateRekeyChildSa)(nil),
1521                 (*Ikev2InitiateRekeyChildSaReply)(nil),
1522                 (*Ikev2InitiateSaInit)(nil),
1523                 (*Ikev2InitiateSaInitReply)(nil),
1524                 (*Ikev2PluginGetVersion)(nil),
1525                 (*Ikev2PluginGetVersionReply)(nil),
1526                 (*Ikev2ProfileAddDel)(nil),
1527                 (*Ikev2ProfileAddDelReply)(nil),
1528                 (*Ikev2ProfileSetAuth)(nil),
1529                 (*Ikev2ProfileSetAuthReply)(nil),
1530                 (*Ikev2ProfileSetID)(nil),
1531                 (*Ikev2ProfileSetIDReply)(nil),
1532                 (*Ikev2ProfileSetIpsecUDPPort)(nil),
1533                 (*Ikev2ProfileSetIpsecUDPPortReply)(nil),
1534                 (*Ikev2ProfileSetLiveness)(nil),
1535                 (*Ikev2ProfileSetLivenessReply)(nil),
1536                 (*Ikev2ProfileSetTs)(nil),
1537                 (*Ikev2ProfileSetTsReply)(nil),
1538                 (*Ikev2ProfileSetUDPEncap)(nil),
1539                 (*Ikev2ProfileSetUDPEncapReply)(nil),
1540                 (*Ikev2SetEspTransforms)(nil),
1541                 (*Ikev2SetEspTransformsReply)(nil),
1542                 (*Ikev2SetIkeTransforms)(nil),
1543                 (*Ikev2SetIkeTransformsReply)(nil),
1544                 (*Ikev2SetLocalKey)(nil),
1545                 (*Ikev2SetLocalKeyReply)(nil),
1546                 (*Ikev2SetResponder)(nil),
1547                 (*Ikev2SetResponderReply)(nil),
1548                 (*Ikev2SetSaLifetime)(nil),
1549                 (*Ikev2SetSaLifetimeReply)(nil),
1550                 (*Ikev2SetTunnelInterface)(nil),
1551                 (*Ikev2SetTunnelInterfaceReply)(nil),
1552         }
1553 }