1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0
5 // source: /usr/share/vpp/api/plugins/ikev2.api.json
7 // Package ikev2 contains generated bindings for API file ikev2.api.
15 api "git.fd.io/govpp.git/api"
16 ikev2_types "git.fd.io/govpp.git/binapi/ikev2_types"
17 interface_types "git.fd.io/govpp.git/binapi/interface_types"
18 ip_types "git.fd.io/govpp.git/binapi/ip_types"
19 codec "git.fd.io/govpp.git/codec"
22 // This is a compile-time assertion to ensure that this generated file
23 // is compatible with the GoVPP api package it is being compiled against.
24 // A compilation error at this line likely means your copy of the
25 // GoVPP api package needs to be updated.
26 const _ = api.GoVppAPIPackageIsVersion2
31 VersionCrc = 0x8eb2437c
34 // Ikev2ChildSaDetails defines message 'ikev2_child_sa_details'.
35 // InProgress: the message form may change in the future versions
36 type Ikev2ChildSaDetails struct {
37 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
38 ChildSa ikev2_types.Ikev2ChildSa `binapi:"ikev2_child_sa,name=child_sa" json:"child_sa,omitempty"`
41 func (m *Ikev2ChildSaDetails) Reset() { *m = Ikev2ChildSaDetails{} }
42 func (*Ikev2ChildSaDetails) GetMessageName() string { return "ikev2_child_sa_details" }
43 func (*Ikev2ChildSaDetails) GetCrcString() string { return "ff67741f" }
44 func (*Ikev2ChildSaDetails) GetMessageType() api.MessageType {
45 return api.ReplyMessage
48 func (m *Ikev2ChildSaDetails) Size() (size int) {
53 size += 4 // m.ChildSa.SaIndex
54 size += 4 // m.ChildSa.ChildSaIndex
55 size += 4 // m.ChildSa.ISpi
56 size += 4 // m.ChildSa.RSpi
57 size += 1 * 64 // m.ChildSa.Keys.SkD
58 size += 1 // m.ChildSa.Keys.SkDLen
59 size += 1 * 64 // m.ChildSa.Keys.SkAi
60 size += 1 // m.ChildSa.Keys.SkAiLen
61 size += 1 * 64 // m.ChildSa.Keys.SkAr
62 size += 1 // m.ChildSa.Keys.SkArLen
63 size += 1 * 64 // m.ChildSa.Keys.SkEi
64 size += 1 // m.ChildSa.Keys.SkEiLen
65 size += 1 * 64 // m.ChildSa.Keys.SkEr
66 size += 1 // m.ChildSa.Keys.SkErLen
67 size += 1 * 64 // m.ChildSa.Keys.SkPi
68 size += 1 // m.ChildSa.Keys.SkPiLen
69 size += 1 * 64 // m.ChildSa.Keys.SkPr
70 size += 1 // m.ChildSa.Keys.SkPrLen
71 size += 1 // m.ChildSa.Encryption.TransformType
72 size += 2 // m.ChildSa.Encryption.TransformID
73 size += 2 // m.ChildSa.Encryption.KeyLen
74 size += 2 // m.ChildSa.Encryption.KeyTrunc
75 size += 2 // m.ChildSa.Encryption.BlockSize
76 size += 1 // m.ChildSa.Encryption.DhGroup
77 size += 1 // m.ChildSa.Integrity.TransformType
78 size += 2 // m.ChildSa.Integrity.TransformID
79 size += 2 // m.ChildSa.Integrity.KeyLen
80 size += 2 // m.ChildSa.Integrity.KeyTrunc
81 size += 2 // m.ChildSa.Integrity.BlockSize
82 size += 1 // m.ChildSa.Integrity.DhGroup
83 size += 1 // m.ChildSa.Esn.TransformType
84 size += 2 // m.ChildSa.Esn.TransformID
85 size += 2 // m.ChildSa.Esn.KeyLen
86 size += 2 // m.ChildSa.Esn.KeyTrunc
87 size += 2 // m.ChildSa.Esn.BlockSize
88 size += 1 // m.ChildSa.Esn.DhGroup
91 func (m *Ikev2ChildSaDetails) Marshal(b []byte) ([]byte, error) {
93 b = make([]byte, m.Size())
95 buf := codec.NewBuffer(b)
96 buf.EncodeInt32(m.Retval)
97 buf.EncodeUint32(m.ChildSa.SaIndex)
98 buf.EncodeUint32(m.ChildSa.ChildSaIndex)
99 buf.EncodeUint32(m.ChildSa.ISpi)
100 buf.EncodeUint32(m.ChildSa.RSpi)
101 buf.EncodeBytes(m.ChildSa.Keys.SkD, 64)
102 buf.EncodeUint8(m.ChildSa.Keys.SkDLen)
103 buf.EncodeBytes(m.ChildSa.Keys.SkAi, 64)
104 buf.EncodeUint8(m.ChildSa.Keys.SkAiLen)
105 buf.EncodeBytes(m.ChildSa.Keys.SkAr, 64)
106 buf.EncodeUint8(m.ChildSa.Keys.SkArLen)
107 buf.EncodeBytes(m.ChildSa.Keys.SkEi, 64)
108 buf.EncodeUint8(m.ChildSa.Keys.SkEiLen)
109 buf.EncodeBytes(m.ChildSa.Keys.SkEr, 64)
110 buf.EncodeUint8(m.ChildSa.Keys.SkErLen)
111 buf.EncodeBytes(m.ChildSa.Keys.SkPi, 64)
112 buf.EncodeUint8(m.ChildSa.Keys.SkPiLen)
113 buf.EncodeBytes(m.ChildSa.Keys.SkPr, 64)
114 buf.EncodeUint8(m.ChildSa.Keys.SkPrLen)
115 buf.EncodeUint8(m.ChildSa.Encryption.TransformType)
116 buf.EncodeUint16(m.ChildSa.Encryption.TransformID)
117 buf.EncodeUint16(m.ChildSa.Encryption.KeyLen)
118 buf.EncodeUint16(m.ChildSa.Encryption.KeyTrunc)
119 buf.EncodeUint16(m.ChildSa.Encryption.BlockSize)
120 buf.EncodeUint8(m.ChildSa.Encryption.DhGroup)
121 buf.EncodeUint8(m.ChildSa.Integrity.TransformType)
122 buf.EncodeUint16(m.ChildSa.Integrity.TransformID)
123 buf.EncodeUint16(m.ChildSa.Integrity.KeyLen)
124 buf.EncodeUint16(m.ChildSa.Integrity.KeyTrunc)
125 buf.EncodeUint16(m.ChildSa.Integrity.BlockSize)
126 buf.EncodeUint8(m.ChildSa.Integrity.DhGroup)
127 buf.EncodeUint8(m.ChildSa.Esn.TransformType)
128 buf.EncodeUint16(m.ChildSa.Esn.TransformID)
129 buf.EncodeUint16(m.ChildSa.Esn.KeyLen)
130 buf.EncodeUint16(m.ChildSa.Esn.KeyTrunc)
131 buf.EncodeUint16(m.ChildSa.Esn.BlockSize)
132 buf.EncodeUint8(m.ChildSa.Esn.DhGroup)
133 return buf.Bytes(), nil
135 func (m *Ikev2ChildSaDetails) Unmarshal(b []byte) error {
136 buf := codec.NewBuffer(b)
137 m.Retval = buf.DecodeInt32()
138 m.ChildSa.SaIndex = buf.DecodeUint32()
139 m.ChildSa.ChildSaIndex = buf.DecodeUint32()
140 m.ChildSa.ISpi = buf.DecodeUint32()
141 m.ChildSa.RSpi = buf.DecodeUint32()
142 m.ChildSa.Keys.SkD = make([]byte, 64)
143 copy(m.ChildSa.Keys.SkD, buf.DecodeBytes(len(m.ChildSa.Keys.SkD)))
144 m.ChildSa.Keys.SkDLen = buf.DecodeUint8()
145 m.ChildSa.Keys.SkAi = make([]byte, 64)
146 copy(m.ChildSa.Keys.SkAi, buf.DecodeBytes(len(m.ChildSa.Keys.SkAi)))
147 m.ChildSa.Keys.SkAiLen = buf.DecodeUint8()
148 m.ChildSa.Keys.SkAr = make([]byte, 64)
149 copy(m.ChildSa.Keys.SkAr, buf.DecodeBytes(len(m.ChildSa.Keys.SkAr)))
150 m.ChildSa.Keys.SkArLen = buf.DecodeUint8()
151 m.ChildSa.Keys.SkEi = make([]byte, 64)
152 copy(m.ChildSa.Keys.SkEi, buf.DecodeBytes(len(m.ChildSa.Keys.SkEi)))
153 m.ChildSa.Keys.SkEiLen = buf.DecodeUint8()
154 m.ChildSa.Keys.SkEr = make([]byte, 64)
155 copy(m.ChildSa.Keys.SkEr, buf.DecodeBytes(len(m.ChildSa.Keys.SkEr)))
156 m.ChildSa.Keys.SkErLen = buf.DecodeUint8()
157 m.ChildSa.Keys.SkPi = make([]byte, 64)
158 copy(m.ChildSa.Keys.SkPi, buf.DecodeBytes(len(m.ChildSa.Keys.SkPi)))
159 m.ChildSa.Keys.SkPiLen = buf.DecodeUint8()
160 m.ChildSa.Keys.SkPr = make([]byte, 64)
161 copy(m.ChildSa.Keys.SkPr, buf.DecodeBytes(len(m.ChildSa.Keys.SkPr)))
162 m.ChildSa.Keys.SkPrLen = buf.DecodeUint8()
163 m.ChildSa.Encryption.TransformType = buf.DecodeUint8()
164 m.ChildSa.Encryption.TransformID = buf.DecodeUint16()
165 m.ChildSa.Encryption.KeyLen = buf.DecodeUint16()
166 m.ChildSa.Encryption.KeyTrunc = buf.DecodeUint16()
167 m.ChildSa.Encryption.BlockSize = buf.DecodeUint16()
168 m.ChildSa.Encryption.DhGroup = buf.DecodeUint8()
169 m.ChildSa.Integrity.TransformType = buf.DecodeUint8()
170 m.ChildSa.Integrity.TransformID = buf.DecodeUint16()
171 m.ChildSa.Integrity.KeyLen = buf.DecodeUint16()
172 m.ChildSa.Integrity.KeyTrunc = buf.DecodeUint16()
173 m.ChildSa.Integrity.BlockSize = buf.DecodeUint16()
174 m.ChildSa.Integrity.DhGroup = buf.DecodeUint8()
175 m.ChildSa.Esn.TransformType = buf.DecodeUint8()
176 m.ChildSa.Esn.TransformID = buf.DecodeUint16()
177 m.ChildSa.Esn.KeyLen = buf.DecodeUint16()
178 m.ChildSa.Esn.KeyTrunc = buf.DecodeUint16()
179 m.ChildSa.Esn.BlockSize = buf.DecodeUint16()
180 m.ChildSa.Esn.DhGroup = buf.DecodeUint8()
184 // Ikev2ChildSaDump defines message 'ikev2_child_sa_dump'.
185 // InProgress: the message form may change in the future versions
186 type Ikev2ChildSaDump struct {
187 SaIndex uint32 `binapi:"u32,name=sa_index" json:"sa_index,omitempty"`
190 func (m *Ikev2ChildSaDump) Reset() { *m = Ikev2ChildSaDump{} }
191 func (*Ikev2ChildSaDump) GetMessageName() string { return "ikev2_child_sa_dump" }
192 func (*Ikev2ChildSaDump) GetCrcString() string { return "01eab609" }
193 func (*Ikev2ChildSaDump) GetMessageType() api.MessageType {
194 return api.RequestMessage
197 func (m *Ikev2ChildSaDump) Size() (size int) {
201 size += 4 // m.SaIndex
204 func (m *Ikev2ChildSaDump) Marshal(b []byte) ([]byte, error) {
206 b = make([]byte, m.Size())
208 buf := codec.NewBuffer(b)
209 buf.EncodeUint32(m.SaIndex)
210 return buf.Bytes(), nil
212 func (m *Ikev2ChildSaDump) Unmarshal(b []byte) error {
213 buf := codec.NewBuffer(b)
214 m.SaIndex = buf.DecodeUint32()
218 // Ikev2InitiateDelChildSa defines message 'ikev2_initiate_del_child_sa'.
219 // InProgress: the message form may change in the future versions
220 type Ikev2InitiateDelChildSa struct {
221 Ispi uint32 `binapi:"u32,name=ispi" json:"ispi,omitempty"`
224 func (m *Ikev2InitiateDelChildSa) Reset() { *m = Ikev2InitiateDelChildSa{} }
225 func (*Ikev2InitiateDelChildSa) GetMessageName() string { return "ikev2_initiate_del_child_sa" }
226 func (*Ikev2InitiateDelChildSa) GetCrcString() string { return "7f004d2e" }
227 func (*Ikev2InitiateDelChildSa) GetMessageType() api.MessageType {
228 return api.RequestMessage
231 func (m *Ikev2InitiateDelChildSa) Size() (size int) {
238 func (m *Ikev2InitiateDelChildSa) Marshal(b []byte) ([]byte, error) {
240 b = make([]byte, m.Size())
242 buf := codec.NewBuffer(b)
243 buf.EncodeUint32(m.Ispi)
244 return buf.Bytes(), nil
246 func (m *Ikev2InitiateDelChildSa) Unmarshal(b []byte) error {
247 buf := codec.NewBuffer(b)
248 m.Ispi = buf.DecodeUint32()
252 // Ikev2InitiateDelChildSaReply defines message 'ikev2_initiate_del_child_sa_reply'.
253 // InProgress: the message form may change in the future versions
254 type Ikev2InitiateDelChildSaReply struct {
255 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
258 func (m *Ikev2InitiateDelChildSaReply) Reset() { *m = Ikev2InitiateDelChildSaReply{} }
259 func (*Ikev2InitiateDelChildSaReply) GetMessageName() string {
260 return "ikev2_initiate_del_child_sa_reply"
262 func (*Ikev2InitiateDelChildSaReply) GetCrcString() string { return "e8d4e804" }
263 func (*Ikev2InitiateDelChildSaReply) GetMessageType() api.MessageType {
264 return api.ReplyMessage
267 func (m *Ikev2InitiateDelChildSaReply) Size() (size int) {
271 size += 4 // m.Retval
274 func (m *Ikev2InitiateDelChildSaReply) Marshal(b []byte) ([]byte, error) {
276 b = make([]byte, m.Size())
278 buf := codec.NewBuffer(b)
279 buf.EncodeInt32(m.Retval)
280 return buf.Bytes(), nil
282 func (m *Ikev2InitiateDelChildSaReply) Unmarshal(b []byte) error {
283 buf := codec.NewBuffer(b)
284 m.Retval = buf.DecodeInt32()
288 // Ikev2InitiateDelIkeSa defines message 'ikev2_initiate_del_ike_sa'.
289 // InProgress: the message form may change in the future versions
290 type Ikev2InitiateDelIkeSa struct {
291 Ispi uint64 `binapi:"u64,name=ispi" json:"ispi,omitempty"`
294 func (m *Ikev2InitiateDelIkeSa) Reset() { *m = Ikev2InitiateDelIkeSa{} }
295 func (*Ikev2InitiateDelIkeSa) GetMessageName() string { return "ikev2_initiate_del_ike_sa" }
296 func (*Ikev2InitiateDelIkeSa) GetCrcString() string { return "8d125bdd" }
297 func (*Ikev2InitiateDelIkeSa) GetMessageType() api.MessageType {
298 return api.RequestMessage
301 func (m *Ikev2InitiateDelIkeSa) Size() (size int) {
308 func (m *Ikev2InitiateDelIkeSa) Marshal(b []byte) ([]byte, error) {
310 b = make([]byte, m.Size())
312 buf := codec.NewBuffer(b)
313 buf.EncodeUint64(m.Ispi)
314 return buf.Bytes(), nil
316 func (m *Ikev2InitiateDelIkeSa) Unmarshal(b []byte) error {
317 buf := codec.NewBuffer(b)
318 m.Ispi = buf.DecodeUint64()
322 // Ikev2InitiateDelIkeSaReply defines message 'ikev2_initiate_del_ike_sa_reply'.
323 // InProgress: the message form may change in the future versions
324 type Ikev2InitiateDelIkeSaReply struct {
325 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
328 func (m *Ikev2InitiateDelIkeSaReply) Reset() { *m = Ikev2InitiateDelIkeSaReply{} }
329 func (*Ikev2InitiateDelIkeSaReply) GetMessageName() string { return "ikev2_initiate_del_ike_sa_reply" }
330 func (*Ikev2InitiateDelIkeSaReply) GetCrcString() string { return "e8d4e804" }
331 func (*Ikev2InitiateDelIkeSaReply) GetMessageType() api.MessageType {
332 return api.ReplyMessage
335 func (m *Ikev2InitiateDelIkeSaReply) Size() (size int) {
339 size += 4 // m.Retval
342 func (m *Ikev2InitiateDelIkeSaReply) Marshal(b []byte) ([]byte, error) {
344 b = make([]byte, m.Size())
346 buf := codec.NewBuffer(b)
347 buf.EncodeInt32(m.Retval)
348 return buf.Bytes(), nil
350 func (m *Ikev2InitiateDelIkeSaReply) Unmarshal(b []byte) error {
351 buf := codec.NewBuffer(b)
352 m.Retval = buf.DecodeInt32()
356 // Ikev2InitiateRekeyChildSa defines message 'ikev2_initiate_rekey_child_sa'.
357 // InProgress: the message form may change in the future versions
358 type Ikev2InitiateRekeyChildSa struct {
359 Ispi uint32 `binapi:"u32,name=ispi" json:"ispi,omitempty"`
362 func (m *Ikev2InitiateRekeyChildSa) Reset() { *m = Ikev2InitiateRekeyChildSa{} }
363 func (*Ikev2InitiateRekeyChildSa) GetMessageName() string { return "ikev2_initiate_rekey_child_sa" }
364 func (*Ikev2InitiateRekeyChildSa) GetCrcString() string { return "7f004d2e" }
365 func (*Ikev2InitiateRekeyChildSa) GetMessageType() api.MessageType {
366 return api.RequestMessage
369 func (m *Ikev2InitiateRekeyChildSa) Size() (size int) {
376 func (m *Ikev2InitiateRekeyChildSa) Marshal(b []byte) ([]byte, error) {
378 b = make([]byte, m.Size())
380 buf := codec.NewBuffer(b)
381 buf.EncodeUint32(m.Ispi)
382 return buf.Bytes(), nil
384 func (m *Ikev2InitiateRekeyChildSa) Unmarshal(b []byte) error {
385 buf := codec.NewBuffer(b)
386 m.Ispi = buf.DecodeUint32()
390 // Ikev2InitiateRekeyChildSaReply defines message 'ikev2_initiate_rekey_child_sa_reply'.
391 // InProgress: the message form may change in the future versions
392 type Ikev2InitiateRekeyChildSaReply struct {
393 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
396 func (m *Ikev2InitiateRekeyChildSaReply) Reset() { *m = Ikev2InitiateRekeyChildSaReply{} }
397 func (*Ikev2InitiateRekeyChildSaReply) GetMessageName() string {
398 return "ikev2_initiate_rekey_child_sa_reply"
400 func (*Ikev2InitiateRekeyChildSaReply) GetCrcString() string { return "e8d4e804" }
401 func (*Ikev2InitiateRekeyChildSaReply) GetMessageType() api.MessageType {
402 return api.ReplyMessage
405 func (m *Ikev2InitiateRekeyChildSaReply) Size() (size int) {
409 size += 4 // m.Retval
412 func (m *Ikev2InitiateRekeyChildSaReply) Marshal(b []byte) ([]byte, error) {
414 b = make([]byte, m.Size())
416 buf := codec.NewBuffer(b)
417 buf.EncodeInt32(m.Retval)
418 return buf.Bytes(), nil
420 func (m *Ikev2InitiateRekeyChildSaReply) Unmarshal(b []byte) error {
421 buf := codec.NewBuffer(b)
422 m.Retval = buf.DecodeInt32()
426 // Ikev2InitiateSaInit defines message 'ikev2_initiate_sa_init'.
427 // InProgress: the message form may change in the future versions
428 type Ikev2InitiateSaInit struct {
429 Name string `binapi:"string[64],name=name" json:"name,omitempty"`
432 func (m *Ikev2InitiateSaInit) Reset() { *m = Ikev2InitiateSaInit{} }
433 func (*Ikev2InitiateSaInit) GetMessageName() string { return "ikev2_initiate_sa_init" }
434 func (*Ikev2InitiateSaInit) GetCrcString() string { return "ebf79a66" }
435 func (*Ikev2InitiateSaInit) GetMessageType() api.MessageType {
436 return api.RequestMessage
439 func (m *Ikev2InitiateSaInit) Size() (size int) {
446 func (m *Ikev2InitiateSaInit) Marshal(b []byte) ([]byte, error) {
448 b = make([]byte, m.Size())
450 buf := codec.NewBuffer(b)
451 buf.EncodeString(m.Name, 64)
452 return buf.Bytes(), nil
454 func (m *Ikev2InitiateSaInit) Unmarshal(b []byte) error {
455 buf := codec.NewBuffer(b)
456 m.Name = buf.DecodeString(64)
460 // Ikev2InitiateSaInitReply defines message 'ikev2_initiate_sa_init_reply'.
461 // InProgress: the message form may change in the future versions
462 type Ikev2InitiateSaInitReply struct {
463 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
466 func (m *Ikev2InitiateSaInitReply) Reset() { *m = Ikev2InitiateSaInitReply{} }
467 func (*Ikev2InitiateSaInitReply) GetMessageName() string { return "ikev2_initiate_sa_init_reply" }
468 func (*Ikev2InitiateSaInitReply) GetCrcString() string { return "e8d4e804" }
469 func (*Ikev2InitiateSaInitReply) GetMessageType() api.MessageType {
470 return api.ReplyMessage
473 func (m *Ikev2InitiateSaInitReply) Size() (size int) {
477 size += 4 // m.Retval
480 func (m *Ikev2InitiateSaInitReply) Marshal(b []byte) ([]byte, error) {
482 b = make([]byte, m.Size())
484 buf := codec.NewBuffer(b)
485 buf.EncodeInt32(m.Retval)
486 return buf.Bytes(), nil
488 func (m *Ikev2InitiateSaInitReply) Unmarshal(b []byte) error {
489 buf := codec.NewBuffer(b)
490 m.Retval = buf.DecodeInt32()
494 // Ikev2NonceGet defines message 'ikev2_nonce_get'.
495 // InProgress: the message form may change in the future versions
496 type Ikev2NonceGet struct {
497 IsInitiator bool `binapi:"bool,name=is_initiator" json:"is_initiator,omitempty"`
498 SaIndex uint32 `binapi:"u32,name=sa_index" json:"sa_index,omitempty"`
501 func (m *Ikev2NonceGet) Reset() { *m = Ikev2NonceGet{} }
502 func (*Ikev2NonceGet) GetMessageName() string { return "ikev2_nonce_get" }
503 func (*Ikev2NonceGet) GetCrcString() string { return "7fe9ad51" }
504 func (*Ikev2NonceGet) GetMessageType() api.MessageType {
505 return api.RequestMessage
508 func (m *Ikev2NonceGet) Size() (size int) {
512 size += 1 // m.IsInitiator
513 size += 4 // m.SaIndex
516 func (m *Ikev2NonceGet) Marshal(b []byte) ([]byte, error) {
518 b = make([]byte, m.Size())
520 buf := codec.NewBuffer(b)
521 buf.EncodeBool(m.IsInitiator)
522 buf.EncodeUint32(m.SaIndex)
523 return buf.Bytes(), nil
525 func (m *Ikev2NonceGet) Unmarshal(b []byte) error {
526 buf := codec.NewBuffer(b)
527 m.IsInitiator = buf.DecodeBool()
528 m.SaIndex = buf.DecodeUint32()
532 // Ikev2NonceGetReply defines message 'ikev2_nonce_get_reply'.
533 // InProgress: the message form may change in the future versions
534 type Ikev2NonceGetReply struct {
535 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
536 DataLen uint32 `binapi:"u32,name=data_len" json:"-"`
537 Nonce []byte `binapi:"u8[data_len],name=nonce" json:"nonce,omitempty"`
540 func (m *Ikev2NonceGetReply) Reset() { *m = Ikev2NonceGetReply{} }
541 func (*Ikev2NonceGetReply) GetMessageName() string { return "ikev2_nonce_get_reply" }
542 func (*Ikev2NonceGetReply) GetCrcString() string { return "1b37a342" }
543 func (*Ikev2NonceGetReply) GetMessageType() api.MessageType {
544 return api.ReplyMessage
547 func (m *Ikev2NonceGetReply) Size() (size int) {
551 size += 4 // m.Retval
552 size += 4 // m.DataLen
553 size += 1 * len(m.Nonce) // m.Nonce
556 func (m *Ikev2NonceGetReply) Marshal(b []byte) ([]byte, error) {
558 b = make([]byte, m.Size())
560 buf := codec.NewBuffer(b)
561 buf.EncodeInt32(m.Retval)
562 buf.EncodeUint32(uint32(len(m.Nonce)))
563 buf.EncodeBytes(m.Nonce, 0)
564 return buf.Bytes(), nil
566 func (m *Ikev2NonceGetReply) Unmarshal(b []byte) error {
567 buf := codec.NewBuffer(b)
568 m.Retval = buf.DecodeInt32()
569 m.DataLen = buf.DecodeUint32()
570 m.Nonce = make([]byte, m.DataLen)
571 copy(m.Nonce, buf.DecodeBytes(len(m.Nonce)))
575 // Ikev2PluginGetVersion defines message 'ikev2_plugin_get_version'.
576 type Ikev2PluginGetVersion struct{}
578 func (m *Ikev2PluginGetVersion) Reset() { *m = Ikev2PluginGetVersion{} }
579 func (*Ikev2PluginGetVersion) GetMessageName() string { return "ikev2_plugin_get_version" }
580 func (*Ikev2PluginGetVersion) GetCrcString() string { return "51077d14" }
581 func (*Ikev2PluginGetVersion) GetMessageType() api.MessageType {
582 return api.RequestMessage
585 func (m *Ikev2PluginGetVersion) Size() (size int) {
591 func (m *Ikev2PluginGetVersion) Marshal(b []byte) ([]byte, error) {
593 b = make([]byte, m.Size())
595 buf := codec.NewBuffer(b)
596 return buf.Bytes(), nil
598 func (m *Ikev2PluginGetVersion) Unmarshal(b []byte) error {
602 // Ikev2PluginGetVersionReply defines message 'ikev2_plugin_get_version_reply'.
603 type Ikev2PluginGetVersionReply struct {
604 Major uint32 `binapi:"u32,name=major" json:"major,omitempty"`
605 Minor uint32 `binapi:"u32,name=minor" json:"minor,omitempty"`
608 func (m *Ikev2PluginGetVersionReply) Reset() { *m = Ikev2PluginGetVersionReply{} }
609 func (*Ikev2PluginGetVersionReply) GetMessageName() string { return "ikev2_plugin_get_version_reply" }
610 func (*Ikev2PluginGetVersionReply) GetCrcString() string { return "9b32cf86" }
611 func (*Ikev2PluginGetVersionReply) GetMessageType() api.MessageType {
612 return api.ReplyMessage
615 func (m *Ikev2PluginGetVersionReply) Size() (size int) {
623 func (m *Ikev2PluginGetVersionReply) Marshal(b []byte) ([]byte, error) {
625 b = make([]byte, m.Size())
627 buf := codec.NewBuffer(b)
628 buf.EncodeUint32(m.Major)
629 buf.EncodeUint32(m.Minor)
630 return buf.Bytes(), nil
632 func (m *Ikev2PluginGetVersionReply) Unmarshal(b []byte) error {
633 buf := codec.NewBuffer(b)
634 m.Major = buf.DecodeUint32()
635 m.Minor = buf.DecodeUint32()
639 // Ikev2ProfileAddDel defines message 'ikev2_profile_add_del'.
640 // InProgress: the message form may change in the future versions
641 type Ikev2ProfileAddDel struct {
642 Name string `binapi:"string[64],name=name" json:"name,omitempty"`
643 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
646 func (m *Ikev2ProfileAddDel) Reset() { *m = Ikev2ProfileAddDel{} }
647 func (*Ikev2ProfileAddDel) GetMessageName() string { return "ikev2_profile_add_del" }
648 func (*Ikev2ProfileAddDel) GetCrcString() string { return "2c925b55" }
649 func (*Ikev2ProfileAddDel) GetMessageType() api.MessageType {
650 return api.RequestMessage
653 func (m *Ikev2ProfileAddDel) Size() (size int) {
661 func (m *Ikev2ProfileAddDel) Marshal(b []byte) ([]byte, error) {
663 b = make([]byte, m.Size())
665 buf := codec.NewBuffer(b)
666 buf.EncodeString(m.Name, 64)
667 buf.EncodeBool(m.IsAdd)
668 return buf.Bytes(), nil
670 func (m *Ikev2ProfileAddDel) Unmarshal(b []byte) error {
671 buf := codec.NewBuffer(b)
672 m.Name = buf.DecodeString(64)
673 m.IsAdd = buf.DecodeBool()
677 // Ikev2ProfileAddDelReply defines message 'ikev2_profile_add_del_reply'.
678 // InProgress: the message form may change in the future versions
679 type Ikev2ProfileAddDelReply struct {
680 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
683 func (m *Ikev2ProfileAddDelReply) Reset() { *m = Ikev2ProfileAddDelReply{} }
684 func (*Ikev2ProfileAddDelReply) GetMessageName() string { return "ikev2_profile_add_del_reply" }
685 func (*Ikev2ProfileAddDelReply) GetCrcString() string { return "e8d4e804" }
686 func (*Ikev2ProfileAddDelReply) GetMessageType() api.MessageType {
687 return api.ReplyMessage
690 func (m *Ikev2ProfileAddDelReply) Size() (size int) {
694 size += 4 // m.Retval
697 func (m *Ikev2ProfileAddDelReply) Marshal(b []byte) ([]byte, error) {
699 b = make([]byte, m.Size())
701 buf := codec.NewBuffer(b)
702 buf.EncodeInt32(m.Retval)
703 return buf.Bytes(), nil
705 func (m *Ikev2ProfileAddDelReply) Unmarshal(b []byte) error {
706 buf := codec.NewBuffer(b)
707 m.Retval = buf.DecodeInt32()
711 // Ikev2ProfileDetails defines message 'ikev2_profile_details'.
712 // InProgress: the message form may change in the future versions
713 type Ikev2ProfileDetails struct {
714 Profile ikev2_types.Ikev2Profile `binapi:"ikev2_profile,name=profile" json:"profile,omitempty"`
717 func (m *Ikev2ProfileDetails) Reset() { *m = Ikev2ProfileDetails{} }
718 func (*Ikev2ProfileDetails) GetMessageName() string { return "ikev2_profile_details" }
719 func (*Ikev2ProfileDetails) GetCrcString() string { return "670d01d9" }
720 func (*Ikev2ProfileDetails) GetMessageType() api.MessageType {
721 return api.ReplyMessage
724 func (m *Ikev2ProfileDetails) Size() (size int) {
728 size += 64 // m.Profile.Name
729 size += 1 // m.Profile.LocID.Type
730 size += 1 // m.Profile.LocID.DataLen
731 size += 64 // m.Profile.LocID.Data
732 size += 1 // m.Profile.RemID.Type
733 size += 1 // m.Profile.RemID.DataLen
734 size += 64 // m.Profile.RemID.Data
735 size += 4 // m.Profile.LocTs.SaIndex
736 size += 4 // m.Profile.LocTs.ChildSaIndex
737 size += 1 // m.Profile.LocTs.IsLocal
738 size += 1 // m.Profile.LocTs.ProtocolID
739 size += 2 // m.Profile.LocTs.StartPort
740 size += 2 // m.Profile.LocTs.EndPort
741 size += 1 // m.Profile.LocTs.StartAddr.Af
742 size += 1 * 16 // m.Profile.LocTs.StartAddr.Un
743 size += 1 // m.Profile.LocTs.EndAddr.Af
744 size += 1 * 16 // m.Profile.LocTs.EndAddr.Un
745 size += 4 // m.Profile.RemTs.SaIndex
746 size += 4 // m.Profile.RemTs.ChildSaIndex
747 size += 1 // m.Profile.RemTs.IsLocal
748 size += 1 // m.Profile.RemTs.ProtocolID
749 size += 2 // m.Profile.RemTs.StartPort
750 size += 2 // m.Profile.RemTs.EndPort
751 size += 1 // m.Profile.RemTs.StartAddr.Af
752 size += 1 * 16 // m.Profile.RemTs.StartAddr.Un
753 size += 1 // m.Profile.RemTs.EndAddr.Af
754 size += 1 * 16 // m.Profile.RemTs.EndAddr.Un
755 size += 4 // m.Profile.Responder.SwIfIndex
756 size += 1 // m.Profile.Responder.Addr.Af
757 size += 1 * 16 // m.Profile.Responder.Addr.Un
758 size += 1 // m.Profile.IkeTs.CryptoAlg
759 size += 4 // m.Profile.IkeTs.CryptoKeySize
760 size += 1 // m.Profile.IkeTs.IntegAlg
761 size += 1 // m.Profile.IkeTs.DhGroup
762 size += 1 // m.Profile.EspTs.CryptoAlg
763 size += 4 // m.Profile.EspTs.CryptoKeySize
764 size += 1 // m.Profile.EspTs.IntegAlg
765 size += 8 // m.Profile.Lifetime
766 size += 8 // m.Profile.LifetimeMaxdata
767 size += 4 // m.Profile.LifetimeJitter
768 size += 4 // m.Profile.Handover
769 size += 2 // m.Profile.IpsecOverUDPPort
770 size += 4 // m.Profile.TunItf
771 size += 1 // m.Profile.UDPEncap
772 size += 1 // m.Profile.NattDisabled
773 size += 1 // m.Profile.Auth.Method
774 size += 1 // m.Profile.Auth.Hex
775 size += 4 // m.Profile.Auth.DataLen
776 size += 1 * len(m.Profile.Auth.Data) // m.Profile.Auth.Data
779 func (m *Ikev2ProfileDetails) Marshal(b []byte) ([]byte, error) {
781 b = make([]byte, m.Size())
783 buf := codec.NewBuffer(b)
784 buf.EncodeString(m.Profile.Name, 64)
785 buf.EncodeUint8(m.Profile.LocID.Type)
786 buf.EncodeUint8(m.Profile.LocID.DataLen)
787 buf.EncodeString(m.Profile.LocID.Data, 64)
788 buf.EncodeUint8(m.Profile.RemID.Type)
789 buf.EncodeUint8(m.Profile.RemID.DataLen)
790 buf.EncodeString(m.Profile.RemID.Data, 64)
791 buf.EncodeUint32(m.Profile.LocTs.SaIndex)
792 buf.EncodeUint32(m.Profile.LocTs.ChildSaIndex)
793 buf.EncodeBool(m.Profile.LocTs.IsLocal)
794 buf.EncodeUint8(m.Profile.LocTs.ProtocolID)
795 buf.EncodeUint16(m.Profile.LocTs.StartPort)
796 buf.EncodeUint16(m.Profile.LocTs.EndPort)
797 buf.EncodeUint8(uint8(m.Profile.LocTs.StartAddr.Af))
798 buf.EncodeBytes(m.Profile.LocTs.StartAddr.Un.XXX_UnionData[:], 16)
799 buf.EncodeUint8(uint8(m.Profile.LocTs.EndAddr.Af))
800 buf.EncodeBytes(m.Profile.LocTs.EndAddr.Un.XXX_UnionData[:], 16)
801 buf.EncodeUint32(m.Profile.RemTs.SaIndex)
802 buf.EncodeUint32(m.Profile.RemTs.ChildSaIndex)
803 buf.EncodeBool(m.Profile.RemTs.IsLocal)
804 buf.EncodeUint8(m.Profile.RemTs.ProtocolID)
805 buf.EncodeUint16(m.Profile.RemTs.StartPort)
806 buf.EncodeUint16(m.Profile.RemTs.EndPort)
807 buf.EncodeUint8(uint8(m.Profile.RemTs.StartAddr.Af))
808 buf.EncodeBytes(m.Profile.RemTs.StartAddr.Un.XXX_UnionData[:], 16)
809 buf.EncodeUint8(uint8(m.Profile.RemTs.EndAddr.Af))
810 buf.EncodeBytes(m.Profile.RemTs.EndAddr.Un.XXX_UnionData[:], 16)
811 buf.EncodeUint32(uint32(m.Profile.Responder.SwIfIndex))
812 buf.EncodeUint8(uint8(m.Profile.Responder.Addr.Af))
813 buf.EncodeBytes(m.Profile.Responder.Addr.Un.XXX_UnionData[:], 16)
814 buf.EncodeUint8(m.Profile.IkeTs.CryptoAlg)
815 buf.EncodeUint32(m.Profile.IkeTs.CryptoKeySize)
816 buf.EncodeUint8(m.Profile.IkeTs.IntegAlg)
817 buf.EncodeUint8(m.Profile.IkeTs.DhGroup)
818 buf.EncodeUint8(m.Profile.EspTs.CryptoAlg)
819 buf.EncodeUint32(m.Profile.EspTs.CryptoKeySize)
820 buf.EncodeUint8(m.Profile.EspTs.IntegAlg)
821 buf.EncodeUint64(m.Profile.Lifetime)
822 buf.EncodeUint64(m.Profile.LifetimeMaxdata)
823 buf.EncodeUint32(m.Profile.LifetimeJitter)
824 buf.EncodeUint32(m.Profile.Handover)
825 buf.EncodeUint16(m.Profile.IpsecOverUDPPort)
826 buf.EncodeUint32(m.Profile.TunItf)
827 buf.EncodeBool(m.Profile.UDPEncap)
828 buf.EncodeBool(m.Profile.NattDisabled)
829 buf.EncodeUint8(m.Profile.Auth.Method)
830 buf.EncodeUint8(m.Profile.Auth.Hex)
831 buf.EncodeUint32(uint32(len(m.Profile.Auth.Data)))
832 buf.EncodeBytes(m.Profile.Auth.Data, 0)
833 return buf.Bytes(), nil
835 func (m *Ikev2ProfileDetails) Unmarshal(b []byte) error {
836 buf := codec.NewBuffer(b)
837 m.Profile.Name = buf.DecodeString(64)
838 m.Profile.LocID.Type = buf.DecodeUint8()
839 m.Profile.LocID.DataLen = buf.DecodeUint8()
840 m.Profile.LocID.Data = buf.DecodeString(64)
841 m.Profile.RemID.Type = buf.DecodeUint8()
842 m.Profile.RemID.DataLen = buf.DecodeUint8()
843 m.Profile.RemID.Data = buf.DecodeString(64)
844 m.Profile.LocTs.SaIndex = buf.DecodeUint32()
845 m.Profile.LocTs.ChildSaIndex = buf.DecodeUint32()
846 m.Profile.LocTs.IsLocal = buf.DecodeBool()
847 m.Profile.LocTs.ProtocolID = buf.DecodeUint8()
848 m.Profile.LocTs.StartPort = buf.DecodeUint16()
849 m.Profile.LocTs.EndPort = buf.DecodeUint16()
850 m.Profile.LocTs.StartAddr.Af = ip_types.AddressFamily(buf.DecodeUint8())
851 copy(m.Profile.LocTs.StartAddr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
852 m.Profile.LocTs.EndAddr.Af = ip_types.AddressFamily(buf.DecodeUint8())
853 copy(m.Profile.LocTs.EndAddr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
854 m.Profile.RemTs.SaIndex = buf.DecodeUint32()
855 m.Profile.RemTs.ChildSaIndex = buf.DecodeUint32()
856 m.Profile.RemTs.IsLocal = buf.DecodeBool()
857 m.Profile.RemTs.ProtocolID = buf.DecodeUint8()
858 m.Profile.RemTs.StartPort = buf.DecodeUint16()
859 m.Profile.RemTs.EndPort = buf.DecodeUint16()
860 m.Profile.RemTs.StartAddr.Af = ip_types.AddressFamily(buf.DecodeUint8())
861 copy(m.Profile.RemTs.StartAddr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
862 m.Profile.RemTs.EndAddr.Af = ip_types.AddressFamily(buf.DecodeUint8())
863 copy(m.Profile.RemTs.EndAddr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
864 m.Profile.Responder.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
865 m.Profile.Responder.Addr.Af = ip_types.AddressFamily(buf.DecodeUint8())
866 copy(m.Profile.Responder.Addr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
867 m.Profile.IkeTs.CryptoAlg = buf.DecodeUint8()
868 m.Profile.IkeTs.CryptoKeySize = buf.DecodeUint32()
869 m.Profile.IkeTs.IntegAlg = buf.DecodeUint8()
870 m.Profile.IkeTs.DhGroup = buf.DecodeUint8()
871 m.Profile.EspTs.CryptoAlg = buf.DecodeUint8()
872 m.Profile.EspTs.CryptoKeySize = buf.DecodeUint32()
873 m.Profile.EspTs.IntegAlg = buf.DecodeUint8()
874 m.Profile.Lifetime = buf.DecodeUint64()
875 m.Profile.LifetimeMaxdata = buf.DecodeUint64()
876 m.Profile.LifetimeJitter = buf.DecodeUint32()
877 m.Profile.Handover = buf.DecodeUint32()
878 m.Profile.IpsecOverUDPPort = buf.DecodeUint16()
879 m.Profile.TunItf = buf.DecodeUint32()
880 m.Profile.UDPEncap = buf.DecodeBool()
881 m.Profile.NattDisabled = buf.DecodeBool()
882 m.Profile.Auth.Method = buf.DecodeUint8()
883 m.Profile.Auth.Hex = buf.DecodeUint8()
884 m.Profile.Auth.DataLen = buf.DecodeUint32()
885 m.Profile.Auth.Data = make([]byte, m.Profile.Auth.DataLen)
886 copy(m.Profile.Auth.Data, buf.DecodeBytes(len(m.Profile.Auth.Data)))
890 // Ikev2ProfileDisableNatt defines message 'ikev2_profile_disable_natt'.
891 // InProgress: the message form may change in the future versions
892 type Ikev2ProfileDisableNatt struct {
893 Name string `binapi:"string[64],name=name" json:"name,omitempty"`
896 func (m *Ikev2ProfileDisableNatt) Reset() { *m = Ikev2ProfileDisableNatt{} }
897 func (*Ikev2ProfileDisableNatt) GetMessageName() string { return "ikev2_profile_disable_natt" }
898 func (*Ikev2ProfileDisableNatt) GetCrcString() string { return "ebf79a66" }
899 func (*Ikev2ProfileDisableNatt) GetMessageType() api.MessageType {
900 return api.RequestMessage
903 func (m *Ikev2ProfileDisableNatt) Size() (size int) {
910 func (m *Ikev2ProfileDisableNatt) Marshal(b []byte) ([]byte, error) {
912 b = make([]byte, m.Size())
914 buf := codec.NewBuffer(b)
915 buf.EncodeString(m.Name, 64)
916 return buf.Bytes(), nil
918 func (m *Ikev2ProfileDisableNatt) Unmarshal(b []byte) error {
919 buf := codec.NewBuffer(b)
920 m.Name = buf.DecodeString(64)
924 // Ikev2ProfileDisableNattReply defines message 'ikev2_profile_disable_natt_reply'.
925 // InProgress: the message form may change in the future versions
926 type Ikev2ProfileDisableNattReply struct {
927 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
930 func (m *Ikev2ProfileDisableNattReply) Reset() { *m = Ikev2ProfileDisableNattReply{} }
931 func (*Ikev2ProfileDisableNattReply) GetMessageName() string {
932 return "ikev2_profile_disable_natt_reply"
934 func (*Ikev2ProfileDisableNattReply) GetCrcString() string { return "e8d4e804" }
935 func (*Ikev2ProfileDisableNattReply) GetMessageType() api.MessageType {
936 return api.ReplyMessage
939 func (m *Ikev2ProfileDisableNattReply) Size() (size int) {
943 size += 4 // m.Retval
946 func (m *Ikev2ProfileDisableNattReply) Marshal(b []byte) ([]byte, error) {
948 b = make([]byte, m.Size())
950 buf := codec.NewBuffer(b)
951 buf.EncodeInt32(m.Retval)
952 return buf.Bytes(), nil
954 func (m *Ikev2ProfileDisableNattReply) Unmarshal(b []byte) error {
955 buf := codec.NewBuffer(b)
956 m.Retval = buf.DecodeInt32()
960 // Ikev2ProfileDump defines message 'ikev2_profile_dump'.
961 // InProgress: the message form may change in the future versions
962 type Ikev2ProfileDump struct{}
964 func (m *Ikev2ProfileDump) Reset() { *m = Ikev2ProfileDump{} }
965 func (*Ikev2ProfileDump) GetMessageName() string { return "ikev2_profile_dump" }
966 func (*Ikev2ProfileDump) GetCrcString() string { return "51077d14" }
967 func (*Ikev2ProfileDump) GetMessageType() api.MessageType {
968 return api.RequestMessage
971 func (m *Ikev2ProfileDump) Size() (size int) {
977 func (m *Ikev2ProfileDump) Marshal(b []byte) ([]byte, error) {
979 b = make([]byte, m.Size())
981 buf := codec.NewBuffer(b)
982 return buf.Bytes(), nil
984 func (m *Ikev2ProfileDump) Unmarshal(b []byte) error {
988 // Ikev2ProfileSetAuth defines message 'ikev2_profile_set_auth'.
989 // InProgress: the message form may change in the future versions
990 type Ikev2ProfileSetAuth struct {
991 Name string `binapi:"string[64],name=name" json:"name,omitempty"`
992 AuthMethod uint8 `binapi:"u8,name=auth_method" json:"auth_method,omitempty"`
993 IsHex bool `binapi:"bool,name=is_hex" json:"is_hex,omitempty"`
994 DataLen uint32 `binapi:"u32,name=data_len" json:"-"`
995 Data []byte `binapi:"u8[data_len],name=data" json:"data,omitempty"`
998 func (m *Ikev2ProfileSetAuth) Reset() { *m = Ikev2ProfileSetAuth{} }
999 func (*Ikev2ProfileSetAuth) GetMessageName() string { return "ikev2_profile_set_auth" }
1000 func (*Ikev2ProfileSetAuth) GetCrcString() string { return "642c97cd" }
1001 func (*Ikev2ProfileSetAuth) GetMessageType() api.MessageType {
1002 return api.RequestMessage
1005 func (m *Ikev2ProfileSetAuth) Size() (size int) {
1009 size += 64 // m.Name
1010 size += 1 // m.AuthMethod
1011 size += 1 // m.IsHex
1012 size += 4 // m.DataLen
1013 size += 1 * len(m.Data) // m.Data
1016 func (m *Ikev2ProfileSetAuth) Marshal(b []byte) ([]byte, error) {
1018 b = make([]byte, m.Size())
1020 buf := codec.NewBuffer(b)
1021 buf.EncodeString(m.Name, 64)
1022 buf.EncodeUint8(m.AuthMethod)
1023 buf.EncodeBool(m.IsHex)
1024 buf.EncodeUint32(uint32(len(m.Data)))
1025 buf.EncodeBytes(m.Data, 0)
1026 return buf.Bytes(), nil
1028 func (m *Ikev2ProfileSetAuth) Unmarshal(b []byte) error {
1029 buf := codec.NewBuffer(b)
1030 m.Name = buf.DecodeString(64)
1031 m.AuthMethod = buf.DecodeUint8()
1032 m.IsHex = buf.DecodeBool()
1033 m.DataLen = buf.DecodeUint32()
1034 m.Data = make([]byte, m.DataLen)
1035 copy(m.Data, buf.DecodeBytes(len(m.Data)))
1039 // Ikev2ProfileSetAuthReply defines message 'ikev2_profile_set_auth_reply'.
1040 // InProgress: the message form may change in the future versions
1041 type Ikev2ProfileSetAuthReply struct {
1042 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1045 func (m *Ikev2ProfileSetAuthReply) Reset() { *m = Ikev2ProfileSetAuthReply{} }
1046 func (*Ikev2ProfileSetAuthReply) GetMessageName() string { return "ikev2_profile_set_auth_reply" }
1047 func (*Ikev2ProfileSetAuthReply) GetCrcString() string { return "e8d4e804" }
1048 func (*Ikev2ProfileSetAuthReply) GetMessageType() api.MessageType {
1049 return api.ReplyMessage
1052 func (m *Ikev2ProfileSetAuthReply) Size() (size int) {
1056 size += 4 // m.Retval
1059 func (m *Ikev2ProfileSetAuthReply) Marshal(b []byte) ([]byte, error) {
1061 b = make([]byte, m.Size())
1063 buf := codec.NewBuffer(b)
1064 buf.EncodeInt32(m.Retval)
1065 return buf.Bytes(), nil
1067 func (m *Ikev2ProfileSetAuthReply) Unmarshal(b []byte) error {
1068 buf := codec.NewBuffer(b)
1069 m.Retval = buf.DecodeInt32()
1073 // Ikev2ProfileSetID defines message 'ikev2_profile_set_id'.
1074 // InProgress: the message form may change in the future versions
1075 type Ikev2ProfileSetID struct {
1076 Name string `binapi:"string[64],name=name" json:"name,omitempty"`
1077 IsLocal bool `binapi:"bool,name=is_local" json:"is_local,omitempty"`
1078 IDType uint8 `binapi:"u8,name=id_type" json:"id_type,omitempty"`
1079 DataLen uint32 `binapi:"u32,name=data_len" json:"-"`
1080 Data []byte `binapi:"u8[data_len],name=data" json:"data,omitempty"`
1083 func (m *Ikev2ProfileSetID) Reset() { *m = Ikev2ProfileSetID{} }
1084 func (*Ikev2ProfileSetID) GetMessageName() string { return "ikev2_profile_set_id" }
1085 func (*Ikev2ProfileSetID) GetCrcString() string { return "4d7e2418" }
1086 func (*Ikev2ProfileSetID) GetMessageType() api.MessageType {
1087 return api.RequestMessage
1090 func (m *Ikev2ProfileSetID) Size() (size int) {
1094 size += 64 // m.Name
1095 size += 1 // m.IsLocal
1096 size += 1 // m.IDType
1097 size += 4 // m.DataLen
1098 size += 1 * len(m.Data) // m.Data
1101 func (m *Ikev2ProfileSetID) Marshal(b []byte) ([]byte, error) {
1103 b = make([]byte, m.Size())
1105 buf := codec.NewBuffer(b)
1106 buf.EncodeString(m.Name, 64)
1107 buf.EncodeBool(m.IsLocal)
1108 buf.EncodeUint8(m.IDType)
1109 buf.EncodeUint32(uint32(len(m.Data)))
1110 buf.EncodeBytes(m.Data, 0)
1111 return buf.Bytes(), nil
1113 func (m *Ikev2ProfileSetID) Unmarshal(b []byte) error {
1114 buf := codec.NewBuffer(b)
1115 m.Name = buf.DecodeString(64)
1116 m.IsLocal = buf.DecodeBool()
1117 m.IDType = buf.DecodeUint8()
1118 m.DataLen = buf.DecodeUint32()
1119 m.Data = make([]byte, m.DataLen)
1120 copy(m.Data, buf.DecodeBytes(len(m.Data)))
1124 // Ikev2ProfileSetIDReply defines message 'ikev2_profile_set_id_reply'.
1125 // InProgress: the message form may change in the future versions
1126 type Ikev2ProfileSetIDReply struct {
1127 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1130 func (m *Ikev2ProfileSetIDReply) Reset() { *m = Ikev2ProfileSetIDReply{} }
1131 func (*Ikev2ProfileSetIDReply) GetMessageName() string { return "ikev2_profile_set_id_reply" }
1132 func (*Ikev2ProfileSetIDReply) GetCrcString() string { return "e8d4e804" }
1133 func (*Ikev2ProfileSetIDReply) GetMessageType() api.MessageType {
1134 return api.ReplyMessage
1137 func (m *Ikev2ProfileSetIDReply) Size() (size int) {
1141 size += 4 // m.Retval
1144 func (m *Ikev2ProfileSetIDReply) Marshal(b []byte) ([]byte, error) {
1146 b = make([]byte, m.Size())
1148 buf := codec.NewBuffer(b)
1149 buf.EncodeInt32(m.Retval)
1150 return buf.Bytes(), nil
1152 func (m *Ikev2ProfileSetIDReply) Unmarshal(b []byte) error {
1153 buf := codec.NewBuffer(b)
1154 m.Retval = buf.DecodeInt32()
1158 // Ikev2ProfileSetIpsecUDPPort defines message 'ikev2_profile_set_ipsec_udp_port'.
1159 // InProgress: the message form may change in the future versions
1160 type Ikev2ProfileSetIpsecUDPPort struct {
1161 IsSet uint8 `binapi:"u8,name=is_set" json:"is_set,omitempty"`
1162 Port uint16 `binapi:"u16,name=port" json:"port,omitempty"`
1163 Name string `binapi:"string[64],name=name" json:"name,omitempty"`
1166 func (m *Ikev2ProfileSetIpsecUDPPort) Reset() { *m = Ikev2ProfileSetIpsecUDPPort{} }
1167 func (*Ikev2ProfileSetIpsecUDPPort) GetMessageName() string {
1168 return "ikev2_profile_set_ipsec_udp_port"
1170 func (*Ikev2ProfileSetIpsecUDPPort) GetCrcString() string { return "615ce758" }
1171 func (*Ikev2ProfileSetIpsecUDPPort) GetMessageType() api.MessageType {
1172 return api.RequestMessage
1175 func (m *Ikev2ProfileSetIpsecUDPPort) Size() (size int) {
1179 size += 1 // m.IsSet
1181 size += 64 // m.Name
1184 func (m *Ikev2ProfileSetIpsecUDPPort) Marshal(b []byte) ([]byte, error) {
1186 b = make([]byte, m.Size())
1188 buf := codec.NewBuffer(b)
1189 buf.EncodeUint8(m.IsSet)
1190 buf.EncodeUint16(m.Port)
1191 buf.EncodeString(m.Name, 64)
1192 return buf.Bytes(), nil
1194 func (m *Ikev2ProfileSetIpsecUDPPort) Unmarshal(b []byte) error {
1195 buf := codec.NewBuffer(b)
1196 m.IsSet = buf.DecodeUint8()
1197 m.Port = buf.DecodeUint16()
1198 m.Name = buf.DecodeString(64)
1202 // Ikev2ProfileSetIpsecUDPPortReply defines message 'ikev2_profile_set_ipsec_udp_port_reply'.
1203 // InProgress: the message form may change in the future versions
1204 type Ikev2ProfileSetIpsecUDPPortReply struct {
1205 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1208 func (m *Ikev2ProfileSetIpsecUDPPortReply) Reset() { *m = Ikev2ProfileSetIpsecUDPPortReply{} }
1209 func (*Ikev2ProfileSetIpsecUDPPortReply) GetMessageName() string {
1210 return "ikev2_profile_set_ipsec_udp_port_reply"
1212 func (*Ikev2ProfileSetIpsecUDPPortReply) GetCrcString() string { return "e8d4e804" }
1213 func (*Ikev2ProfileSetIpsecUDPPortReply) GetMessageType() api.MessageType {
1214 return api.ReplyMessage
1217 func (m *Ikev2ProfileSetIpsecUDPPortReply) Size() (size int) {
1221 size += 4 // m.Retval
1224 func (m *Ikev2ProfileSetIpsecUDPPortReply) Marshal(b []byte) ([]byte, error) {
1226 b = make([]byte, m.Size())
1228 buf := codec.NewBuffer(b)
1229 buf.EncodeInt32(m.Retval)
1230 return buf.Bytes(), nil
1232 func (m *Ikev2ProfileSetIpsecUDPPortReply) Unmarshal(b []byte) error {
1233 buf := codec.NewBuffer(b)
1234 m.Retval = buf.DecodeInt32()
1238 // Ikev2ProfileSetLiveness defines message 'ikev2_profile_set_liveness'.
1239 // InProgress: the message form may change in the future versions
1240 type Ikev2ProfileSetLiveness struct {
1241 Period uint32 `binapi:"u32,name=period" json:"period,omitempty"`
1242 MaxRetries uint32 `binapi:"u32,name=max_retries" json:"max_retries,omitempty"`
1245 func (m *Ikev2ProfileSetLiveness) Reset() { *m = Ikev2ProfileSetLiveness{} }
1246 func (*Ikev2ProfileSetLiveness) GetMessageName() string { return "ikev2_profile_set_liveness" }
1247 func (*Ikev2ProfileSetLiveness) GetCrcString() string { return "6bdf4d65" }
1248 func (*Ikev2ProfileSetLiveness) GetMessageType() api.MessageType {
1249 return api.RequestMessage
1252 func (m *Ikev2ProfileSetLiveness) Size() (size int) {
1256 size += 4 // m.Period
1257 size += 4 // m.MaxRetries
1260 func (m *Ikev2ProfileSetLiveness) Marshal(b []byte) ([]byte, error) {
1262 b = make([]byte, m.Size())
1264 buf := codec.NewBuffer(b)
1265 buf.EncodeUint32(m.Period)
1266 buf.EncodeUint32(m.MaxRetries)
1267 return buf.Bytes(), nil
1269 func (m *Ikev2ProfileSetLiveness) Unmarshal(b []byte) error {
1270 buf := codec.NewBuffer(b)
1271 m.Period = buf.DecodeUint32()
1272 m.MaxRetries = buf.DecodeUint32()
1276 // Ikev2ProfileSetLivenessReply defines message 'ikev2_profile_set_liveness_reply'.
1277 // InProgress: the message form may change in the future versions
1278 type Ikev2ProfileSetLivenessReply struct {
1279 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1282 func (m *Ikev2ProfileSetLivenessReply) Reset() { *m = Ikev2ProfileSetLivenessReply{} }
1283 func (*Ikev2ProfileSetLivenessReply) GetMessageName() string {
1284 return "ikev2_profile_set_liveness_reply"
1286 func (*Ikev2ProfileSetLivenessReply) GetCrcString() string { return "e8d4e804" }
1287 func (*Ikev2ProfileSetLivenessReply) GetMessageType() api.MessageType {
1288 return api.ReplyMessage
1291 func (m *Ikev2ProfileSetLivenessReply) Size() (size int) {
1295 size += 4 // m.Retval
1298 func (m *Ikev2ProfileSetLivenessReply) Marshal(b []byte) ([]byte, error) {
1300 b = make([]byte, m.Size())
1302 buf := codec.NewBuffer(b)
1303 buf.EncodeInt32(m.Retval)
1304 return buf.Bytes(), nil
1306 func (m *Ikev2ProfileSetLivenessReply) Unmarshal(b []byte) error {
1307 buf := codec.NewBuffer(b)
1308 m.Retval = buf.DecodeInt32()
1312 // Ikev2ProfileSetTs defines message 'ikev2_profile_set_ts'.
1313 // InProgress: the message form may change in the future versions
1314 type Ikev2ProfileSetTs struct {
1315 Name string `binapi:"string[64],name=name" json:"name,omitempty"`
1316 Ts ikev2_types.Ikev2Ts `binapi:"ikev2_ts,name=ts" json:"ts,omitempty"`
1319 func (m *Ikev2ProfileSetTs) Reset() { *m = Ikev2ProfileSetTs{} }
1320 func (*Ikev2ProfileSetTs) GetMessageName() string { return "ikev2_profile_set_ts" }
1321 func (*Ikev2ProfileSetTs) GetCrcString() string { return "8eb8cfd1" }
1322 func (*Ikev2ProfileSetTs) GetMessageType() api.MessageType {
1323 return api.RequestMessage
1326 func (m *Ikev2ProfileSetTs) Size() (size int) {
1330 size += 64 // m.Name
1331 size += 4 // m.Ts.SaIndex
1332 size += 4 // m.Ts.ChildSaIndex
1333 size += 1 // m.Ts.IsLocal
1334 size += 1 // m.Ts.ProtocolID
1335 size += 2 // m.Ts.StartPort
1336 size += 2 // m.Ts.EndPort
1337 size += 1 // m.Ts.StartAddr.Af
1338 size += 1 * 16 // m.Ts.StartAddr.Un
1339 size += 1 // m.Ts.EndAddr.Af
1340 size += 1 * 16 // m.Ts.EndAddr.Un
1343 func (m *Ikev2ProfileSetTs) Marshal(b []byte) ([]byte, error) {
1345 b = make([]byte, m.Size())
1347 buf := codec.NewBuffer(b)
1348 buf.EncodeString(m.Name, 64)
1349 buf.EncodeUint32(m.Ts.SaIndex)
1350 buf.EncodeUint32(m.Ts.ChildSaIndex)
1351 buf.EncodeBool(m.Ts.IsLocal)
1352 buf.EncodeUint8(m.Ts.ProtocolID)
1353 buf.EncodeUint16(m.Ts.StartPort)
1354 buf.EncodeUint16(m.Ts.EndPort)
1355 buf.EncodeUint8(uint8(m.Ts.StartAddr.Af))
1356 buf.EncodeBytes(m.Ts.StartAddr.Un.XXX_UnionData[:], 16)
1357 buf.EncodeUint8(uint8(m.Ts.EndAddr.Af))
1358 buf.EncodeBytes(m.Ts.EndAddr.Un.XXX_UnionData[:], 16)
1359 return buf.Bytes(), nil
1361 func (m *Ikev2ProfileSetTs) Unmarshal(b []byte) error {
1362 buf := codec.NewBuffer(b)
1363 m.Name = buf.DecodeString(64)
1364 m.Ts.SaIndex = buf.DecodeUint32()
1365 m.Ts.ChildSaIndex = buf.DecodeUint32()
1366 m.Ts.IsLocal = buf.DecodeBool()
1367 m.Ts.ProtocolID = buf.DecodeUint8()
1368 m.Ts.StartPort = buf.DecodeUint16()
1369 m.Ts.EndPort = buf.DecodeUint16()
1370 m.Ts.StartAddr.Af = ip_types.AddressFamily(buf.DecodeUint8())
1371 copy(m.Ts.StartAddr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1372 m.Ts.EndAddr.Af = ip_types.AddressFamily(buf.DecodeUint8())
1373 copy(m.Ts.EndAddr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1377 // Ikev2ProfileSetTsReply defines message 'ikev2_profile_set_ts_reply'.
1378 // InProgress: the message form may change in the future versions
1379 type Ikev2ProfileSetTsReply struct {
1380 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1383 func (m *Ikev2ProfileSetTsReply) Reset() { *m = Ikev2ProfileSetTsReply{} }
1384 func (*Ikev2ProfileSetTsReply) GetMessageName() string { return "ikev2_profile_set_ts_reply" }
1385 func (*Ikev2ProfileSetTsReply) GetCrcString() string { return "e8d4e804" }
1386 func (*Ikev2ProfileSetTsReply) GetMessageType() api.MessageType {
1387 return api.ReplyMessage
1390 func (m *Ikev2ProfileSetTsReply) Size() (size int) {
1394 size += 4 // m.Retval
1397 func (m *Ikev2ProfileSetTsReply) Marshal(b []byte) ([]byte, error) {
1399 b = make([]byte, m.Size())
1401 buf := codec.NewBuffer(b)
1402 buf.EncodeInt32(m.Retval)
1403 return buf.Bytes(), nil
1405 func (m *Ikev2ProfileSetTsReply) Unmarshal(b []byte) error {
1406 buf := codec.NewBuffer(b)
1407 m.Retval = buf.DecodeInt32()
1411 // Ikev2ProfileSetUDPEncap defines message 'ikev2_profile_set_udp_encap'.
1412 // InProgress: the message form may change in the future versions
1413 type Ikev2ProfileSetUDPEncap struct {
1414 Name string `binapi:"string[64],name=name" json:"name,omitempty"`
1417 func (m *Ikev2ProfileSetUDPEncap) Reset() { *m = Ikev2ProfileSetUDPEncap{} }
1418 func (*Ikev2ProfileSetUDPEncap) GetMessageName() string { return "ikev2_profile_set_udp_encap" }
1419 func (*Ikev2ProfileSetUDPEncap) GetCrcString() string { return "ebf79a66" }
1420 func (*Ikev2ProfileSetUDPEncap) GetMessageType() api.MessageType {
1421 return api.RequestMessage
1424 func (m *Ikev2ProfileSetUDPEncap) Size() (size int) {
1428 size += 64 // m.Name
1431 func (m *Ikev2ProfileSetUDPEncap) Marshal(b []byte) ([]byte, error) {
1433 b = make([]byte, m.Size())
1435 buf := codec.NewBuffer(b)
1436 buf.EncodeString(m.Name, 64)
1437 return buf.Bytes(), nil
1439 func (m *Ikev2ProfileSetUDPEncap) Unmarshal(b []byte) error {
1440 buf := codec.NewBuffer(b)
1441 m.Name = buf.DecodeString(64)
1445 // Ikev2ProfileSetUDPEncapReply defines message 'ikev2_profile_set_udp_encap_reply'.
1446 // InProgress: the message form may change in the future versions
1447 type Ikev2ProfileSetUDPEncapReply struct {
1448 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1451 func (m *Ikev2ProfileSetUDPEncapReply) Reset() { *m = Ikev2ProfileSetUDPEncapReply{} }
1452 func (*Ikev2ProfileSetUDPEncapReply) GetMessageName() string {
1453 return "ikev2_profile_set_udp_encap_reply"
1455 func (*Ikev2ProfileSetUDPEncapReply) GetCrcString() string { return "e8d4e804" }
1456 func (*Ikev2ProfileSetUDPEncapReply) GetMessageType() api.MessageType {
1457 return api.ReplyMessage
1460 func (m *Ikev2ProfileSetUDPEncapReply) Size() (size int) {
1464 size += 4 // m.Retval
1467 func (m *Ikev2ProfileSetUDPEncapReply) Marshal(b []byte) ([]byte, error) {
1469 b = make([]byte, m.Size())
1471 buf := codec.NewBuffer(b)
1472 buf.EncodeInt32(m.Retval)
1473 return buf.Bytes(), nil
1475 func (m *Ikev2ProfileSetUDPEncapReply) Unmarshal(b []byte) error {
1476 buf := codec.NewBuffer(b)
1477 m.Retval = buf.DecodeInt32()
1481 // Ikev2SaDetails defines message 'ikev2_sa_details'.
1482 // InProgress: the message form may change in the future versions
1483 type Ikev2SaDetails struct {
1484 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1485 Sa ikev2_types.Ikev2Sa `binapi:"ikev2_sa,name=sa" json:"sa,omitempty"`
1488 func (m *Ikev2SaDetails) Reset() { *m = Ikev2SaDetails{} }
1489 func (*Ikev2SaDetails) GetMessageName() string { return "ikev2_sa_details" }
1490 func (*Ikev2SaDetails) GetCrcString() string { return "937c22d5" }
1491 func (*Ikev2SaDetails) GetMessageType() api.MessageType {
1492 return api.ReplyMessage
1495 func (m *Ikev2SaDetails) Size() (size int) {
1499 size += 4 // m.Retval
1500 size += 4 // m.Sa.SaIndex
1501 size += 4 // m.Sa.ProfileIndex
1502 size += 8 // m.Sa.Ispi
1503 size += 8 // m.Sa.Rspi
1504 size += 1 // m.Sa.Iaddr.Af
1505 size += 1 * 16 // m.Sa.Iaddr.Un
1506 size += 1 // m.Sa.Raddr.Af
1507 size += 1 * 16 // m.Sa.Raddr.Un
1508 size += 1 * 64 // m.Sa.Keys.SkD
1509 size += 1 // m.Sa.Keys.SkDLen
1510 size += 1 * 64 // m.Sa.Keys.SkAi
1511 size += 1 // m.Sa.Keys.SkAiLen
1512 size += 1 * 64 // m.Sa.Keys.SkAr
1513 size += 1 // m.Sa.Keys.SkArLen
1514 size += 1 * 64 // m.Sa.Keys.SkEi
1515 size += 1 // m.Sa.Keys.SkEiLen
1516 size += 1 * 64 // m.Sa.Keys.SkEr
1517 size += 1 // m.Sa.Keys.SkErLen
1518 size += 1 * 64 // m.Sa.Keys.SkPi
1519 size += 1 // m.Sa.Keys.SkPiLen
1520 size += 1 * 64 // m.Sa.Keys.SkPr
1521 size += 1 // m.Sa.Keys.SkPrLen
1522 size += 1 // m.Sa.IID.Type
1523 size += 1 // m.Sa.IID.DataLen
1524 size += 64 // m.Sa.IID.Data
1525 size += 1 // m.Sa.RID.Type
1526 size += 1 // m.Sa.RID.DataLen
1527 size += 64 // m.Sa.RID.Data
1528 size += 1 // m.Sa.Encryption.TransformType
1529 size += 2 // m.Sa.Encryption.TransformID
1530 size += 2 // m.Sa.Encryption.KeyLen
1531 size += 2 // m.Sa.Encryption.KeyTrunc
1532 size += 2 // m.Sa.Encryption.BlockSize
1533 size += 1 // m.Sa.Encryption.DhGroup
1534 size += 1 // m.Sa.Integrity.TransformType
1535 size += 2 // m.Sa.Integrity.TransformID
1536 size += 2 // m.Sa.Integrity.KeyLen
1537 size += 2 // m.Sa.Integrity.KeyTrunc
1538 size += 2 // m.Sa.Integrity.BlockSize
1539 size += 1 // m.Sa.Integrity.DhGroup
1540 size += 1 // m.Sa.Prf.TransformType
1541 size += 2 // m.Sa.Prf.TransformID
1542 size += 2 // m.Sa.Prf.KeyLen
1543 size += 2 // m.Sa.Prf.KeyTrunc
1544 size += 2 // m.Sa.Prf.BlockSize
1545 size += 1 // m.Sa.Prf.DhGroup
1546 size += 1 // m.Sa.Dh.TransformType
1547 size += 2 // m.Sa.Dh.TransformID
1548 size += 2 // m.Sa.Dh.KeyLen
1549 size += 2 // m.Sa.Dh.KeyTrunc
1550 size += 2 // m.Sa.Dh.BlockSize
1551 size += 1 // m.Sa.Dh.DhGroup
1552 size += 2 // m.Sa.Stats.NKeepalives
1553 size += 2 // m.Sa.Stats.NRekeyReq
1554 size += 2 // m.Sa.Stats.NSaInitReq
1555 size += 2 // m.Sa.Stats.NSaAuthReq
1556 size += 2 // m.Sa.Stats.NRetransmit
1557 size += 2 // m.Sa.Stats.NInitSaRetransmit
1560 func (m *Ikev2SaDetails) Marshal(b []byte) ([]byte, error) {
1562 b = make([]byte, m.Size())
1564 buf := codec.NewBuffer(b)
1565 buf.EncodeInt32(m.Retval)
1566 buf.EncodeUint32(m.Sa.SaIndex)
1567 buf.EncodeUint32(m.Sa.ProfileIndex)
1568 buf.EncodeUint64(m.Sa.Ispi)
1569 buf.EncodeUint64(m.Sa.Rspi)
1570 buf.EncodeUint8(uint8(m.Sa.Iaddr.Af))
1571 buf.EncodeBytes(m.Sa.Iaddr.Un.XXX_UnionData[:], 16)
1572 buf.EncodeUint8(uint8(m.Sa.Raddr.Af))
1573 buf.EncodeBytes(m.Sa.Raddr.Un.XXX_UnionData[:], 16)
1574 buf.EncodeBytes(m.Sa.Keys.SkD, 64)
1575 buf.EncodeUint8(m.Sa.Keys.SkDLen)
1576 buf.EncodeBytes(m.Sa.Keys.SkAi, 64)
1577 buf.EncodeUint8(m.Sa.Keys.SkAiLen)
1578 buf.EncodeBytes(m.Sa.Keys.SkAr, 64)
1579 buf.EncodeUint8(m.Sa.Keys.SkArLen)
1580 buf.EncodeBytes(m.Sa.Keys.SkEi, 64)
1581 buf.EncodeUint8(m.Sa.Keys.SkEiLen)
1582 buf.EncodeBytes(m.Sa.Keys.SkEr, 64)
1583 buf.EncodeUint8(m.Sa.Keys.SkErLen)
1584 buf.EncodeBytes(m.Sa.Keys.SkPi, 64)
1585 buf.EncodeUint8(m.Sa.Keys.SkPiLen)
1586 buf.EncodeBytes(m.Sa.Keys.SkPr, 64)
1587 buf.EncodeUint8(m.Sa.Keys.SkPrLen)
1588 buf.EncodeUint8(m.Sa.IID.Type)
1589 buf.EncodeUint8(m.Sa.IID.DataLen)
1590 buf.EncodeString(m.Sa.IID.Data, 64)
1591 buf.EncodeUint8(m.Sa.RID.Type)
1592 buf.EncodeUint8(m.Sa.RID.DataLen)
1593 buf.EncodeString(m.Sa.RID.Data, 64)
1594 buf.EncodeUint8(m.Sa.Encryption.TransformType)
1595 buf.EncodeUint16(m.Sa.Encryption.TransformID)
1596 buf.EncodeUint16(m.Sa.Encryption.KeyLen)
1597 buf.EncodeUint16(m.Sa.Encryption.KeyTrunc)
1598 buf.EncodeUint16(m.Sa.Encryption.BlockSize)
1599 buf.EncodeUint8(m.Sa.Encryption.DhGroup)
1600 buf.EncodeUint8(m.Sa.Integrity.TransformType)
1601 buf.EncodeUint16(m.Sa.Integrity.TransformID)
1602 buf.EncodeUint16(m.Sa.Integrity.KeyLen)
1603 buf.EncodeUint16(m.Sa.Integrity.KeyTrunc)
1604 buf.EncodeUint16(m.Sa.Integrity.BlockSize)
1605 buf.EncodeUint8(m.Sa.Integrity.DhGroup)
1606 buf.EncodeUint8(m.Sa.Prf.TransformType)
1607 buf.EncodeUint16(m.Sa.Prf.TransformID)
1608 buf.EncodeUint16(m.Sa.Prf.KeyLen)
1609 buf.EncodeUint16(m.Sa.Prf.KeyTrunc)
1610 buf.EncodeUint16(m.Sa.Prf.BlockSize)
1611 buf.EncodeUint8(m.Sa.Prf.DhGroup)
1612 buf.EncodeUint8(m.Sa.Dh.TransformType)
1613 buf.EncodeUint16(m.Sa.Dh.TransformID)
1614 buf.EncodeUint16(m.Sa.Dh.KeyLen)
1615 buf.EncodeUint16(m.Sa.Dh.KeyTrunc)
1616 buf.EncodeUint16(m.Sa.Dh.BlockSize)
1617 buf.EncodeUint8(m.Sa.Dh.DhGroup)
1618 buf.EncodeUint16(m.Sa.Stats.NKeepalives)
1619 buf.EncodeUint16(m.Sa.Stats.NRekeyReq)
1620 buf.EncodeUint16(m.Sa.Stats.NSaInitReq)
1621 buf.EncodeUint16(m.Sa.Stats.NSaAuthReq)
1622 buf.EncodeUint16(m.Sa.Stats.NRetransmit)
1623 buf.EncodeUint16(m.Sa.Stats.NInitSaRetransmit)
1624 return buf.Bytes(), nil
1626 func (m *Ikev2SaDetails) Unmarshal(b []byte) error {
1627 buf := codec.NewBuffer(b)
1628 m.Retval = buf.DecodeInt32()
1629 m.Sa.SaIndex = buf.DecodeUint32()
1630 m.Sa.ProfileIndex = buf.DecodeUint32()
1631 m.Sa.Ispi = buf.DecodeUint64()
1632 m.Sa.Rspi = buf.DecodeUint64()
1633 m.Sa.Iaddr.Af = ip_types.AddressFamily(buf.DecodeUint8())
1634 copy(m.Sa.Iaddr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1635 m.Sa.Raddr.Af = ip_types.AddressFamily(buf.DecodeUint8())
1636 copy(m.Sa.Raddr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1637 m.Sa.Keys.SkD = make([]byte, 64)
1638 copy(m.Sa.Keys.SkD, buf.DecodeBytes(len(m.Sa.Keys.SkD)))
1639 m.Sa.Keys.SkDLen = buf.DecodeUint8()
1640 m.Sa.Keys.SkAi = make([]byte, 64)
1641 copy(m.Sa.Keys.SkAi, buf.DecodeBytes(len(m.Sa.Keys.SkAi)))
1642 m.Sa.Keys.SkAiLen = buf.DecodeUint8()
1643 m.Sa.Keys.SkAr = make([]byte, 64)
1644 copy(m.Sa.Keys.SkAr, buf.DecodeBytes(len(m.Sa.Keys.SkAr)))
1645 m.Sa.Keys.SkArLen = buf.DecodeUint8()
1646 m.Sa.Keys.SkEi = make([]byte, 64)
1647 copy(m.Sa.Keys.SkEi, buf.DecodeBytes(len(m.Sa.Keys.SkEi)))
1648 m.Sa.Keys.SkEiLen = buf.DecodeUint8()
1649 m.Sa.Keys.SkEr = make([]byte, 64)
1650 copy(m.Sa.Keys.SkEr, buf.DecodeBytes(len(m.Sa.Keys.SkEr)))
1651 m.Sa.Keys.SkErLen = buf.DecodeUint8()
1652 m.Sa.Keys.SkPi = make([]byte, 64)
1653 copy(m.Sa.Keys.SkPi, buf.DecodeBytes(len(m.Sa.Keys.SkPi)))
1654 m.Sa.Keys.SkPiLen = buf.DecodeUint8()
1655 m.Sa.Keys.SkPr = make([]byte, 64)
1656 copy(m.Sa.Keys.SkPr, buf.DecodeBytes(len(m.Sa.Keys.SkPr)))
1657 m.Sa.Keys.SkPrLen = buf.DecodeUint8()
1658 m.Sa.IID.Type = buf.DecodeUint8()
1659 m.Sa.IID.DataLen = buf.DecodeUint8()
1660 m.Sa.IID.Data = buf.DecodeString(64)
1661 m.Sa.RID.Type = buf.DecodeUint8()
1662 m.Sa.RID.DataLen = buf.DecodeUint8()
1663 m.Sa.RID.Data = buf.DecodeString(64)
1664 m.Sa.Encryption.TransformType = buf.DecodeUint8()
1665 m.Sa.Encryption.TransformID = buf.DecodeUint16()
1666 m.Sa.Encryption.KeyLen = buf.DecodeUint16()
1667 m.Sa.Encryption.KeyTrunc = buf.DecodeUint16()
1668 m.Sa.Encryption.BlockSize = buf.DecodeUint16()
1669 m.Sa.Encryption.DhGroup = buf.DecodeUint8()
1670 m.Sa.Integrity.TransformType = buf.DecodeUint8()
1671 m.Sa.Integrity.TransformID = buf.DecodeUint16()
1672 m.Sa.Integrity.KeyLen = buf.DecodeUint16()
1673 m.Sa.Integrity.KeyTrunc = buf.DecodeUint16()
1674 m.Sa.Integrity.BlockSize = buf.DecodeUint16()
1675 m.Sa.Integrity.DhGroup = buf.DecodeUint8()
1676 m.Sa.Prf.TransformType = buf.DecodeUint8()
1677 m.Sa.Prf.TransformID = buf.DecodeUint16()
1678 m.Sa.Prf.KeyLen = buf.DecodeUint16()
1679 m.Sa.Prf.KeyTrunc = buf.DecodeUint16()
1680 m.Sa.Prf.BlockSize = buf.DecodeUint16()
1681 m.Sa.Prf.DhGroup = buf.DecodeUint8()
1682 m.Sa.Dh.TransformType = buf.DecodeUint8()
1683 m.Sa.Dh.TransformID = buf.DecodeUint16()
1684 m.Sa.Dh.KeyLen = buf.DecodeUint16()
1685 m.Sa.Dh.KeyTrunc = buf.DecodeUint16()
1686 m.Sa.Dh.BlockSize = buf.DecodeUint16()
1687 m.Sa.Dh.DhGroup = buf.DecodeUint8()
1688 m.Sa.Stats.NKeepalives = buf.DecodeUint16()
1689 m.Sa.Stats.NRekeyReq = buf.DecodeUint16()
1690 m.Sa.Stats.NSaInitReq = buf.DecodeUint16()
1691 m.Sa.Stats.NSaAuthReq = buf.DecodeUint16()
1692 m.Sa.Stats.NRetransmit = buf.DecodeUint16()
1693 m.Sa.Stats.NInitSaRetransmit = buf.DecodeUint16()
1697 // Ikev2SaDump defines message 'ikev2_sa_dump'.
1698 // InProgress: the message form may change in the future versions
1699 type Ikev2SaDump struct{}
1701 func (m *Ikev2SaDump) Reset() { *m = Ikev2SaDump{} }
1702 func (*Ikev2SaDump) GetMessageName() string { return "ikev2_sa_dump" }
1703 func (*Ikev2SaDump) GetCrcString() string { return "51077d14" }
1704 func (*Ikev2SaDump) GetMessageType() api.MessageType {
1705 return api.RequestMessage
1708 func (m *Ikev2SaDump) Size() (size int) {
1714 func (m *Ikev2SaDump) Marshal(b []byte) ([]byte, error) {
1716 b = make([]byte, m.Size())
1718 buf := codec.NewBuffer(b)
1719 return buf.Bytes(), nil
1721 func (m *Ikev2SaDump) Unmarshal(b []byte) error {
1725 // Ikev2SetEspTransforms defines message 'ikev2_set_esp_transforms'.
1726 // InProgress: the message form may change in the future versions
1727 type Ikev2SetEspTransforms struct {
1728 Name string `binapi:"string[64],name=name" json:"name,omitempty"`
1729 Tr ikev2_types.Ikev2EspTransforms `binapi:"ikev2_esp_transforms,name=tr" json:"tr,omitempty"`
1732 func (m *Ikev2SetEspTransforms) Reset() { *m = Ikev2SetEspTransforms{} }
1733 func (*Ikev2SetEspTransforms) GetMessageName() string { return "ikev2_set_esp_transforms" }
1734 func (*Ikev2SetEspTransforms) GetCrcString() string { return "a63dc205" }
1735 func (*Ikev2SetEspTransforms) GetMessageType() api.MessageType {
1736 return api.RequestMessage
1739 func (m *Ikev2SetEspTransforms) Size() (size int) {
1743 size += 64 // m.Name
1744 size += 1 // m.Tr.CryptoAlg
1745 size += 4 // m.Tr.CryptoKeySize
1746 size += 1 // m.Tr.IntegAlg
1749 func (m *Ikev2SetEspTransforms) Marshal(b []byte) ([]byte, error) {
1751 b = make([]byte, m.Size())
1753 buf := codec.NewBuffer(b)
1754 buf.EncodeString(m.Name, 64)
1755 buf.EncodeUint8(m.Tr.CryptoAlg)
1756 buf.EncodeUint32(m.Tr.CryptoKeySize)
1757 buf.EncodeUint8(m.Tr.IntegAlg)
1758 return buf.Bytes(), nil
1760 func (m *Ikev2SetEspTransforms) Unmarshal(b []byte) error {
1761 buf := codec.NewBuffer(b)
1762 m.Name = buf.DecodeString(64)
1763 m.Tr.CryptoAlg = buf.DecodeUint8()
1764 m.Tr.CryptoKeySize = buf.DecodeUint32()
1765 m.Tr.IntegAlg = buf.DecodeUint8()
1769 // Ikev2SetEspTransformsReply defines message 'ikev2_set_esp_transforms_reply'.
1770 // InProgress: the message form may change in the future versions
1771 type Ikev2SetEspTransformsReply struct {
1772 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1775 func (m *Ikev2SetEspTransformsReply) Reset() { *m = Ikev2SetEspTransformsReply{} }
1776 func (*Ikev2SetEspTransformsReply) GetMessageName() string { return "ikev2_set_esp_transforms_reply" }
1777 func (*Ikev2SetEspTransformsReply) GetCrcString() string { return "e8d4e804" }
1778 func (*Ikev2SetEspTransformsReply) GetMessageType() api.MessageType {
1779 return api.ReplyMessage
1782 func (m *Ikev2SetEspTransformsReply) Size() (size int) {
1786 size += 4 // m.Retval
1789 func (m *Ikev2SetEspTransformsReply) Marshal(b []byte) ([]byte, error) {
1791 b = make([]byte, m.Size())
1793 buf := codec.NewBuffer(b)
1794 buf.EncodeInt32(m.Retval)
1795 return buf.Bytes(), nil
1797 func (m *Ikev2SetEspTransformsReply) Unmarshal(b []byte) error {
1798 buf := codec.NewBuffer(b)
1799 m.Retval = buf.DecodeInt32()
1803 // Ikev2SetIkeTransforms defines message 'ikev2_set_ike_transforms'.
1804 // InProgress: the message form may change in the future versions
1805 type Ikev2SetIkeTransforms struct {
1806 Name string `binapi:"string[64],name=name" json:"name,omitempty"`
1807 Tr ikev2_types.Ikev2IkeTransforms `binapi:"ikev2_ike_transforms,name=tr" json:"tr,omitempty"`
1810 func (m *Ikev2SetIkeTransforms) Reset() { *m = Ikev2SetIkeTransforms{} }
1811 func (*Ikev2SetIkeTransforms) GetMessageName() string { return "ikev2_set_ike_transforms" }
1812 func (*Ikev2SetIkeTransforms) GetCrcString() string { return "076d7378" }
1813 func (*Ikev2SetIkeTransforms) GetMessageType() api.MessageType {
1814 return api.RequestMessage
1817 func (m *Ikev2SetIkeTransforms) Size() (size int) {
1821 size += 64 // m.Name
1822 size += 1 // m.Tr.CryptoAlg
1823 size += 4 // m.Tr.CryptoKeySize
1824 size += 1 // m.Tr.IntegAlg
1825 size += 1 // m.Tr.DhGroup
1828 func (m *Ikev2SetIkeTransforms) Marshal(b []byte) ([]byte, error) {
1830 b = make([]byte, m.Size())
1832 buf := codec.NewBuffer(b)
1833 buf.EncodeString(m.Name, 64)
1834 buf.EncodeUint8(m.Tr.CryptoAlg)
1835 buf.EncodeUint32(m.Tr.CryptoKeySize)
1836 buf.EncodeUint8(m.Tr.IntegAlg)
1837 buf.EncodeUint8(m.Tr.DhGroup)
1838 return buf.Bytes(), nil
1840 func (m *Ikev2SetIkeTransforms) Unmarshal(b []byte) error {
1841 buf := codec.NewBuffer(b)
1842 m.Name = buf.DecodeString(64)
1843 m.Tr.CryptoAlg = buf.DecodeUint8()
1844 m.Tr.CryptoKeySize = buf.DecodeUint32()
1845 m.Tr.IntegAlg = buf.DecodeUint8()
1846 m.Tr.DhGroup = buf.DecodeUint8()
1850 // Ikev2SetIkeTransformsReply defines message 'ikev2_set_ike_transforms_reply'.
1851 // InProgress: the message form may change in the future versions
1852 type Ikev2SetIkeTransformsReply struct {
1853 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1856 func (m *Ikev2SetIkeTransformsReply) Reset() { *m = Ikev2SetIkeTransformsReply{} }
1857 func (*Ikev2SetIkeTransformsReply) GetMessageName() string { return "ikev2_set_ike_transforms_reply" }
1858 func (*Ikev2SetIkeTransformsReply) GetCrcString() string { return "e8d4e804" }
1859 func (*Ikev2SetIkeTransformsReply) GetMessageType() api.MessageType {
1860 return api.ReplyMessage
1863 func (m *Ikev2SetIkeTransformsReply) Size() (size int) {
1867 size += 4 // m.Retval
1870 func (m *Ikev2SetIkeTransformsReply) Marshal(b []byte) ([]byte, error) {
1872 b = make([]byte, m.Size())
1874 buf := codec.NewBuffer(b)
1875 buf.EncodeInt32(m.Retval)
1876 return buf.Bytes(), nil
1878 func (m *Ikev2SetIkeTransformsReply) Unmarshal(b []byte) error {
1879 buf := codec.NewBuffer(b)
1880 m.Retval = buf.DecodeInt32()
1884 // Ikev2SetLocalKey defines message 'ikev2_set_local_key'.
1885 // InProgress: the message form may change in the future versions
1886 type Ikev2SetLocalKey struct {
1887 KeyFile string `binapi:"string[256],name=key_file" json:"key_file,omitempty"`
1890 func (m *Ikev2SetLocalKey) Reset() { *m = Ikev2SetLocalKey{} }
1891 func (*Ikev2SetLocalKey) GetMessageName() string { return "ikev2_set_local_key" }
1892 func (*Ikev2SetLocalKey) GetCrcString() string { return "799b69ec" }
1893 func (*Ikev2SetLocalKey) GetMessageType() api.MessageType {
1894 return api.RequestMessage
1897 func (m *Ikev2SetLocalKey) Size() (size int) {
1901 size += 256 // m.KeyFile
1904 func (m *Ikev2SetLocalKey) Marshal(b []byte) ([]byte, error) {
1906 b = make([]byte, m.Size())
1908 buf := codec.NewBuffer(b)
1909 buf.EncodeString(m.KeyFile, 256)
1910 return buf.Bytes(), nil
1912 func (m *Ikev2SetLocalKey) Unmarshal(b []byte) error {
1913 buf := codec.NewBuffer(b)
1914 m.KeyFile = buf.DecodeString(256)
1918 // Ikev2SetLocalKeyReply defines message 'ikev2_set_local_key_reply'.
1919 // InProgress: the message form may change in the future versions
1920 type Ikev2SetLocalKeyReply struct {
1921 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1924 func (m *Ikev2SetLocalKeyReply) Reset() { *m = Ikev2SetLocalKeyReply{} }
1925 func (*Ikev2SetLocalKeyReply) GetMessageName() string { return "ikev2_set_local_key_reply" }
1926 func (*Ikev2SetLocalKeyReply) GetCrcString() string { return "e8d4e804" }
1927 func (*Ikev2SetLocalKeyReply) GetMessageType() api.MessageType {
1928 return api.ReplyMessage
1931 func (m *Ikev2SetLocalKeyReply) Size() (size int) {
1935 size += 4 // m.Retval
1938 func (m *Ikev2SetLocalKeyReply) Marshal(b []byte) ([]byte, error) {
1940 b = make([]byte, m.Size())
1942 buf := codec.NewBuffer(b)
1943 buf.EncodeInt32(m.Retval)
1944 return buf.Bytes(), nil
1946 func (m *Ikev2SetLocalKeyReply) Unmarshal(b []byte) error {
1947 buf := codec.NewBuffer(b)
1948 m.Retval = buf.DecodeInt32()
1952 // Ikev2SetResponder defines message 'ikev2_set_responder'.
1953 // InProgress: the message form may change in the future versions
1954 type Ikev2SetResponder struct {
1955 Name string `binapi:"string[64],name=name" json:"name,omitempty"`
1956 Responder ikev2_types.Ikev2Responder `binapi:"ikev2_responder,name=responder" json:"responder,omitempty"`
1959 func (m *Ikev2SetResponder) Reset() { *m = Ikev2SetResponder{} }
1960 func (*Ikev2SetResponder) GetMessageName() string { return "ikev2_set_responder" }
1961 func (*Ikev2SetResponder) GetCrcString() string { return "a2055df1" }
1962 func (*Ikev2SetResponder) GetMessageType() api.MessageType {
1963 return api.RequestMessage
1966 func (m *Ikev2SetResponder) Size() (size int) {
1970 size += 64 // m.Name
1971 size += 4 // m.Responder.SwIfIndex
1972 size += 1 // m.Responder.Addr.Af
1973 size += 1 * 16 // m.Responder.Addr.Un
1976 func (m *Ikev2SetResponder) Marshal(b []byte) ([]byte, error) {
1978 b = make([]byte, m.Size())
1980 buf := codec.NewBuffer(b)
1981 buf.EncodeString(m.Name, 64)
1982 buf.EncodeUint32(uint32(m.Responder.SwIfIndex))
1983 buf.EncodeUint8(uint8(m.Responder.Addr.Af))
1984 buf.EncodeBytes(m.Responder.Addr.Un.XXX_UnionData[:], 16)
1985 return buf.Bytes(), nil
1987 func (m *Ikev2SetResponder) Unmarshal(b []byte) error {
1988 buf := codec.NewBuffer(b)
1989 m.Name = buf.DecodeString(64)
1990 m.Responder.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1991 m.Responder.Addr.Af = ip_types.AddressFamily(buf.DecodeUint8())
1992 copy(m.Responder.Addr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1996 // Ikev2SetResponderHostname defines message 'ikev2_set_responder_hostname'.
1997 // InProgress: the message form may change in the future versions
1998 type Ikev2SetResponderHostname struct {
1999 Name string `binapi:"string[64],name=name" json:"name,omitempty"`
2000 Hostname string `binapi:"string[64],name=hostname" json:"hostname,omitempty"`
2001 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2004 func (m *Ikev2SetResponderHostname) Reset() { *m = Ikev2SetResponderHostname{} }
2005 func (*Ikev2SetResponderHostname) GetMessageName() string { return "ikev2_set_responder_hostname" }
2006 func (*Ikev2SetResponderHostname) GetCrcString() string { return "350d6949" }
2007 func (*Ikev2SetResponderHostname) GetMessageType() api.MessageType {
2008 return api.RequestMessage
2011 func (m *Ikev2SetResponderHostname) Size() (size int) {
2015 size += 64 // m.Name
2016 size += 64 // m.Hostname
2017 size += 4 // m.SwIfIndex
2020 func (m *Ikev2SetResponderHostname) Marshal(b []byte) ([]byte, error) {
2022 b = make([]byte, m.Size())
2024 buf := codec.NewBuffer(b)
2025 buf.EncodeString(m.Name, 64)
2026 buf.EncodeString(m.Hostname, 64)
2027 buf.EncodeUint32(uint32(m.SwIfIndex))
2028 return buf.Bytes(), nil
2030 func (m *Ikev2SetResponderHostname) Unmarshal(b []byte) error {
2031 buf := codec.NewBuffer(b)
2032 m.Name = buf.DecodeString(64)
2033 m.Hostname = buf.DecodeString(64)
2034 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2038 // Ikev2SetResponderHostnameReply defines message 'ikev2_set_responder_hostname_reply'.
2039 // InProgress: the message form may change in the future versions
2040 type Ikev2SetResponderHostnameReply struct {
2041 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2044 func (m *Ikev2SetResponderHostnameReply) Reset() { *m = Ikev2SetResponderHostnameReply{} }
2045 func (*Ikev2SetResponderHostnameReply) GetMessageName() string {
2046 return "ikev2_set_responder_hostname_reply"
2048 func (*Ikev2SetResponderHostnameReply) GetCrcString() string { return "e8d4e804" }
2049 func (*Ikev2SetResponderHostnameReply) GetMessageType() api.MessageType {
2050 return api.ReplyMessage
2053 func (m *Ikev2SetResponderHostnameReply) Size() (size int) {
2057 size += 4 // m.Retval
2060 func (m *Ikev2SetResponderHostnameReply) Marshal(b []byte) ([]byte, error) {
2062 b = make([]byte, m.Size())
2064 buf := codec.NewBuffer(b)
2065 buf.EncodeInt32(m.Retval)
2066 return buf.Bytes(), nil
2068 func (m *Ikev2SetResponderHostnameReply) Unmarshal(b []byte) error {
2069 buf := codec.NewBuffer(b)
2070 m.Retval = buf.DecodeInt32()
2074 // Ikev2SetResponderReply defines message 'ikev2_set_responder_reply'.
2075 // InProgress: the message form may change in the future versions
2076 type Ikev2SetResponderReply struct {
2077 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2080 func (m *Ikev2SetResponderReply) Reset() { *m = Ikev2SetResponderReply{} }
2081 func (*Ikev2SetResponderReply) GetMessageName() string { return "ikev2_set_responder_reply" }
2082 func (*Ikev2SetResponderReply) GetCrcString() string { return "e8d4e804" }
2083 func (*Ikev2SetResponderReply) GetMessageType() api.MessageType {
2084 return api.ReplyMessage
2087 func (m *Ikev2SetResponderReply) Size() (size int) {
2091 size += 4 // m.Retval
2094 func (m *Ikev2SetResponderReply) Marshal(b []byte) ([]byte, error) {
2096 b = make([]byte, m.Size())
2098 buf := codec.NewBuffer(b)
2099 buf.EncodeInt32(m.Retval)
2100 return buf.Bytes(), nil
2102 func (m *Ikev2SetResponderReply) Unmarshal(b []byte) error {
2103 buf := codec.NewBuffer(b)
2104 m.Retval = buf.DecodeInt32()
2108 // Ikev2SetSaLifetime defines message 'ikev2_set_sa_lifetime'.
2109 // InProgress: the message form may change in the future versions
2110 type Ikev2SetSaLifetime struct {
2111 Name string `binapi:"string[64],name=name" json:"name,omitempty"`
2112 Lifetime uint64 `binapi:"u64,name=lifetime" json:"lifetime,omitempty"`
2113 LifetimeJitter uint32 `binapi:"u32,name=lifetime_jitter" json:"lifetime_jitter,omitempty"`
2114 Handover uint32 `binapi:"u32,name=handover" json:"handover,omitempty"`
2115 LifetimeMaxdata uint64 `binapi:"u64,name=lifetime_maxdata" json:"lifetime_maxdata,omitempty"`
2118 func (m *Ikev2SetSaLifetime) Reset() { *m = Ikev2SetSaLifetime{} }
2119 func (*Ikev2SetSaLifetime) GetMessageName() string { return "ikev2_set_sa_lifetime" }
2120 func (*Ikev2SetSaLifetime) GetCrcString() string { return "7039feaa" }
2121 func (*Ikev2SetSaLifetime) GetMessageType() api.MessageType {
2122 return api.RequestMessage
2125 func (m *Ikev2SetSaLifetime) Size() (size int) {
2129 size += 64 // m.Name
2130 size += 8 // m.Lifetime
2131 size += 4 // m.LifetimeJitter
2132 size += 4 // m.Handover
2133 size += 8 // m.LifetimeMaxdata
2136 func (m *Ikev2SetSaLifetime) Marshal(b []byte) ([]byte, error) {
2138 b = make([]byte, m.Size())
2140 buf := codec.NewBuffer(b)
2141 buf.EncodeString(m.Name, 64)
2142 buf.EncodeUint64(m.Lifetime)
2143 buf.EncodeUint32(m.LifetimeJitter)
2144 buf.EncodeUint32(m.Handover)
2145 buf.EncodeUint64(m.LifetimeMaxdata)
2146 return buf.Bytes(), nil
2148 func (m *Ikev2SetSaLifetime) Unmarshal(b []byte) error {
2149 buf := codec.NewBuffer(b)
2150 m.Name = buf.DecodeString(64)
2151 m.Lifetime = buf.DecodeUint64()
2152 m.LifetimeJitter = buf.DecodeUint32()
2153 m.Handover = buf.DecodeUint32()
2154 m.LifetimeMaxdata = buf.DecodeUint64()
2158 // Ikev2SetSaLifetimeReply defines message 'ikev2_set_sa_lifetime_reply'.
2159 // InProgress: the message form may change in the future versions
2160 type Ikev2SetSaLifetimeReply struct {
2161 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2164 func (m *Ikev2SetSaLifetimeReply) Reset() { *m = Ikev2SetSaLifetimeReply{} }
2165 func (*Ikev2SetSaLifetimeReply) GetMessageName() string { return "ikev2_set_sa_lifetime_reply" }
2166 func (*Ikev2SetSaLifetimeReply) GetCrcString() string { return "e8d4e804" }
2167 func (*Ikev2SetSaLifetimeReply) GetMessageType() api.MessageType {
2168 return api.ReplyMessage
2171 func (m *Ikev2SetSaLifetimeReply) Size() (size int) {
2175 size += 4 // m.Retval
2178 func (m *Ikev2SetSaLifetimeReply) Marshal(b []byte) ([]byte, error) {
2180 b = make([]byte, m.Size())
2182 buf := codec.NewBuffer(b)
2183 buf.EncodeInt32(m.Retval)
2184 return buf.Bytes(), nil
2186 func (m *Ikev2SetSaLifetimeReply) Unmarshal(b []byte) error {
2187 buf := codec.NewBuffer(b)
2188 m.Retval = buf.DecodeInt32()
2192 // Ikev2SetTunnelInterface defines message 'ikev2_set_tunnel_interface'.
2193 // InProgress: the message form may change in the future versions
2194 type Ikev2SetTunnelInterface struct {
2195 Name string `binapi:"string[64],name=name" json:"name,omitempty"`
2196 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2199 func (m *Ikev2SetTunnelInterface) Reset() { *m = Ikev2SetTunnelInterface{} }
2200 func (*Ikev2SetTunnelInterface) GetMessageName() string { return "ikev2_set_tunnel_interface" }
2201 func (*Ikev2SetTunnelInterface) GetCrcString() string { return "ca67182c" }
2202 func (*Ikev2SetTunnelInterface) GetMessageType() api.MessageType {
2203 return api.RequestMessage
2206 func (m *Ikev2SetTunnelInterface) Size() (size int) {
2210 size += 64 // m.Name
2211 size += 4 // m.SwIfIndex
2214 func (m *Ikev2SetTunnelInterface) Marshal(b []byte) ([]byte, error) {
2216 b = make([]byte, m.Size())
2218 buf := codec.NewBuffer(b)
2219 buf.EncodeString(m.Name, 64)
2220 buf.EncodeUint32(uint32(m.SwIfIndex))
2221 return buf.Bytes(), nil
2223 func (m *Ikev2SetTunnelInterface) Unmarshal(b []byte) error {
2224 buf := codec.NewBuffer(b)
2225 m.Name = buf.DecodeString(64)
2226 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2230 // Ikev2SetTunnelInterfaceReply defines message 'ikev2_set_tunnel_interface_reply'.
2231 // InProgress: the message form may change in the future versions
2232 type Ikev2SetTunnelInterfaceReply struct {
2233 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2236 func (m *Ikev2SetTunnelInterfaceReply) Reset() { *m = Ikev2SetTunnelInterfaceReply{} }
2237 func (*Ikev2SetTunnelInterfaceReply) GetMessageName() string {
2238 return "ikev2_set_tunnel_interface_reply"
2240 func (*Ikev2SetTunnelInterfaceReply) GetCrcString() string { return "e8d4e804" }
2241 func (*Ikev2SetTunnelInterfaceReply) GetMessageType() api.MessageType {
2242 return api.ReplyMessage
2245 func (m *Ikev2SetTunnelInterfaceReply) Size() (size int) {
2249 size += 4 // m.Retval
2252 func (m *Ikev2SetTunnelInterfaceReply) Marshal(b []byte) ([]byte, error) {
2254 b = make([]byte, m.Size())
2256 buf := codec.NewBuffer(b)
2257 buf.EncodeInt32(m.Retval)
2258 return buf.Bytes(), nil
2260 func (m *Ikev2SetTunnelInterfaceReply) Unmarshal(b []byte) error {
2261 buf := codec.NewBuffer(b)
2262 m.Retval = buf.DecodeInt32()
2266 // Ikev2TrafficSelectorDetails defines message 'ikev2_traffic_selector_details'.
2267 // InProgress: the message form may change in the future versions
2268 type Ikev2TrafficSelectorDetails struct {
2269 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2270 Ts ikev2_types.Ikev2Ts `binapi:"ikev2_ts,name=ts" json:"ts,omitempty"`
2273 func (m *Ikev2TrafficSelectorDetails) Reset() { *m = Ikev2TrafficSelectorDetails{} }
2274 func (*Ikev2TrafficSelectorDetails) GetMessageName() string { return "ikev2_traffic_selector_details" }
2275 func (*Ikev2TrafficSelectorDetails) GetCrcString() string { return "518cb06f" }
2276 func (*Ikev2TrafficSelectorDetails) GetMessageType() api.MessageType {
2277 return api.ReplyMessage
2280 func (m *Ikev2TrafficSelectorDetails) Size() (size int) {
2284 size += 4 // m.Retval
2285 size += 4 // m.Ts.SaIndex
2286 size += 4 // m.Ts.ChildSaIndex
2287 size += 1 // m.Ts.IsLocal
2288 size += 1 // m.Ts.ProtocolID
2289 size += 2 // m.Ts.StartPort
2290 size += 2 // m.Ts.EndPort
2291 size += 1 // m.Ts.StartAddr.Af
2292 size += 1 * 16 // m.Ts.StartAddr.Un
2293 size += 1 // m.Ts.EndAddr.Af
2294 size += 1 * 16 // m.Ts.EndAddr.Un
2297 func (m *Ikev2TrafficSelectorDetails) Marshal(b []byte) ([]byte, error) {
2299 b = make([]byte, m.Size())
2301 buf := codec.NewBuffer(b)
2302 buf.EncodeInt32(m.Retval)
2303 buf.EncodeUint32(m.Ts.SaIndex)
2304 buf.EncodeUint32(m.Ts.ChildSaIndex)
2305 buf.EncodeBool(m.Ts.IsLocal)
2306 buf.EncodeUint8(m.Ts.ProtocolID)
2307 buf.EncodeUint16(m.Ts.StartPort)
2308 buf.EncodeUint16(m.Ts.EndPort)
2309 buf.EncodeUint8(uint8(m.Ts.StartAddr.Af))
2310 buf.EncodeBytes(m.Ts.StartAddr.Un.XXX_UnionData[:], 16)
2311 buf.EncodeUint8(uint8(m.Ts.EndAddr.Af))
2312 buf.EncodeBytes(m.Ts.EndAddr.Un.XXX_UnionData[:], 16)
2313 return buf.Bytes(), nil
2315 func (m *Ikev2TrafficSelectorDetails) Unmarshal(b []byte) error {
2316 buf := codec.NewBuffer(b)
2317 m.Retval = buf.DecodeInt32()
2318 m.Ts.SaIndex = buf.DecodeUint32()
2319 m.Ts.ChildSaIndex = buf.DecodeUint32()
2320 m.Ts.IsLocal = buf.DecodeBool()
2321 m.Ts.ProtocolID = buf.DecodeUint8()
2322 m.Ts.StartPort = buf.DecodeUint16()
2323 m.Ts.EndPort = buf.DecodeUint16()
2324 m.Ts.StartAddr.Af = ip_types.AddressFamily(buf.DecodeUint8())
2325 copy(m.Ts.StartAddr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2326 m.Ts.EndAddr.Af = ip_types.AddressFamily(buf.DecodeUint8())
2327 copy(m.Ts.EndAddr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2331 // Ikev2TrafficSelectorDump defines message 'ikev2_traffic_selector_dump'.
2332 // InProgress: the message form may change in the future versions
2333 type Ikev2TrafficSelectorDump struct {
2334 IsInitiator bool `binapi:"bool,name=is_initiator" json:"is_initiator,omitempty"`
2335 SaIndex uint32 `binapi:"u32,name=sa_index" json:"sa_index,omitempty"`
2336 ChildSaIndex uint32 `binapi:"u32,name=child_sa_index" json:"child_sa_index,omitempty"`
2339 func (m *Ikev2TrafficSelectorDump) Reset() { *m = Ikev2TrafficSelectorDump{} }
2340 func (*Ikev2TrafficSelectorDump) GetMessageName() string { return "ikev2_traffic_selector_dump" }
2341 func (*Ikev2TrafficSelectorDump) GetCrcString() string { return "a7385e33" }
2342 func (*Ikev2TrafficSelectorDump) GetMessageType() api.MessageType {
2343 return api.RequestMessage
2346 func (m *Ikev2TrafficSelectorDump) Size() (size int) {
2350 size += 1 // m.IsInitiator
2351 size += 4 // m.SaIndex
2352 size += 4 // m.ChildSaIndex
2355 func (m *Ikev2TrafficSelectorDump) Marshal(b []byte) ([]byte, error) {
2357 b = make([]byte, m.Size())
2359 buf := codec.NewBuffer(b)
2360 buf.EncodeBool(m.IsInitiator)
2361 buf.EncodeUint32(m.SaIndex)
2362 buf.EncodeUint32(m.ChildSaIndex)
2363 return buf.Bytes(), nil
2365 func (m *Ikev2TrafficSelectorDump) Unmarshal(b []byte) error {
2366 buf := codec.NewBuffer(b)
2367 m.IsInitiator = buf.DecodeBool()
2368 m.SaIndex = buf.DecodeUint32()
2369 m.ChildSaIndex = buf.DecodeUint32()
2373 func init() { file_ikev2_binapi_init() }
2374 func file_ikev2_binapi_init() {
2375 api.RegisterMessage((*Ikev2ChildSaDetails)(nil), "ikev2_child_sa_details_ff67741f")
2376 api.RegisterMessage((*Ikev2ChildSaDump)(nil), "ikev2_child_sa_dump_01eab609")
2377 api.RegisterMessage((*Ikev2InitiateDelChildSa)(nil), "ikev2_initiate_del_child_sa_7f004d2e")
2378 api.RegisterMessage((*Ikev2InitiateDelChildSaReply)(nil), "ikev2_initiate_del_child_sa_reply_e8d4e804")
2379 api.RegisterMessage((*Ikev2InitiateDelIkeSa)(nil), "ikev2_initiate_del_ike_sa_8d125bdd")
2380 api.RegisterMessage((*Ikev2InitiateDelIkeSaReply)(nil), "ikev2_initiate_del_ike_sa_reply_e8d4e804")
2381 api.RegisterMessage((*Ikev2InitiateRekeyChildSa)(nil), "ikev2_initiate_rekey_child_sa_7f004d2e")
2382 api.RegisterMessage((*Ikev2InitiateRekeyChildSaReply)(nil), "ikev2_initiate_rekey_child_sa_reply_e8d4e804")
2383 api.RegisterMessage((*Ikev2InitiateSaInit)(nil), "ikev2_initiate_sa_init_ebf79a66")
2384 api.RegisterMessage((*Ikev2InitiateSaInitReply)(nil), "ikev2_initiate_sa_init_reply_e8d4e804")
2385 api.RegisterMessage((*Ikev2NonceGet)(nil), "ikev2_nonce_get_7fe9ad51")
2386 api.RegisterMessage((*Ikev2NonceGetReply)(nil), "ikev2_nonce_get_reply_1b37a342")
2387 api.RegisterMessage((*Ikev2PluginGetVersion)(nil), "ikev2_plugin_get_version_51077d14")
2388 api.RegisterMessage((*Ikev2PluginGetVersionReply)(nil), "ikev2_plugin_get_version_reply_9b32cf86")
2389 api.RegisterMessage((*Ikev2ProfileAddDel)(nil), "ikev2_profile_add_del_2c925b55")
2390 api.RegisterMessage((*Ikev2ProfileAddDelReply)(nil), "ikev2_profile_add_del_reply_e8d4e804")
2391 api.RegisterMessage((*Ikev2ProfileDetails)(nil), "ikev2_profile_details_670d01d9")
2392 api.RegisterMessage((*Ikev2ProfileDisableNatt)(nil), "ikev2_profile_disable_natt_ebf79a66")
2393 api.RegisterMessage((*Ikev2ProfileDisableNattReply)(nil), "ikev2_profile_disable_natt_reply_e8d4e804")
2394 api.RegisterMessage((*Ikev2ProfileDump)(nil), "ikev2_profile_dump_51077d14")
2395 api.RegisterMessage((*Ikev2ProfileSetAuth)(nil), "ikev2_profile_set_auth_642c97cd")
2396 api.RegisterMessage((*Ikev2ProfileSetAuthReply)(nil), "ikev2_profile_set_auth_reply_e8d4e804")
2397 api.RegisterMessage((*Ikev2ProfileSetID)(nil), "ikev2_profile_set_id_4d7e2418")
2398 api.RegisterMessage((*Ikev2ProfileSetIDReply)(nil), "ikev2_profile_set_id_reply_e8d4e804")
2399 api.RegisterMessage((*Ikev2ProfileSetIpsecUDPPort)(nil), "ikev2_profile_set_ipsec_udp_port_615ce758")
2400 api.RegisterMessage((*Ikev2ProfileSetIpsecUDPPortReply)(nil), "ikev2_profile_set_ipsec_udp_port_reply_e8d4e804")
2401 api.RegisterMessage((*Ikev2ProfileSetLiveness)(nil), "ikev2_profile_set_liveness_6bdf4d65")
2402 api.RegisterMessage((*Ikev2ProfileSetLivenessReply)(nil), "ikev2_profile_set_liveness_reply_e8d4e804")
2403 api.RegisterMessage((*Ikev2ProfileSetTs)(nil), "ikev2_profile_set_ts_8eb8cfd1")
2404 api.RegisterMessage((*Ikev2ProfileSetTsReply)(nil), "ikev2_profile_set_ts_reply_e8d4e804")
2405 api.RegisterMessage((*Ikev2ProfileSetUDPEncap)(nil), "ikev2_profile_set_udp_encap_ebf79a66")
2406 api.RegisterMessage((*Ikev2ProfileSetUDPEncapReply)(nil), "ikev2_profile_set_udp_encap_reply_e8d4e804")
2407 api.RegisterMessage((*Ikev2SaDetails)(nil), "ikev2_sa_details_937c22d5")
2408 api.RegisterMessage((*Ikev2SaDump)(nil), "ikev2_sa_dump_51077d14")
2409 api.RegisterMessage((*Ikev2SetEspTransforms)(nil), "ikev2_set_esp_transforms_a63dc205")
2410 api.RegisterMessage((*Ikev2SetEspTransformsReply)(nil), "ikev2_set_esp_transforms_reply_e8d4e804")
2411 api.RegisterMessage((*Ikev2SetIkeTransforms)(nil), "ikev2_set_ike_transforms_076d7378")
2412 api.RegisterMessage((*Ikev2SetIkeTransformsReply)(nil), "ikev2_set_ike_transforms_reply_e8d4e804")
2413 api.RegisterMessage((*Ikev2SetLocalKey)(nil), "ikev2_set_local_key_799b69ec")
2414 api.RegisterMessage((*Ikev2SetLocalKeyReply)(nil), "ikev2_set_local_key_reply_e8d4e804")
2415 api.RegisterMessage((*Ikev2SetResponder)(nil), "ikev2_set_responder_a2055df1")
2416 api.RegisterMessage((*Ikev2SetResponderHostname)(nil), "ikev2_set_responder_hostname_350d6949")
2417 api.RegisterMessage((*Ikev2SetResponderHostnameReply)(nil), "ikev2_set_responder_hostname_reply_e8d4e804")
2418 api.RegisterMessage((*Ikev2SetResponderReply)(nil), "ikev2_set_responder_reply_e8d4e804")
2419 api.RegisterMessage((*Ikev2SetSaLifetime)(nil), "ikev2_set_sa_lifetime_7039feaa")
2420 api.RegisterMessage((*Ikev2SetSaLifetimeReply)(nil), "ikev2_set_sa_lifetime_reply_e8d4e804")
2421 api.RegisterMessage((*Ikev2SetTunnelInterface)(nil), "ikev2_set_tunnel_interface_ca67182c")
2422 api.RegisterMessage((*Ikev2SetTunnelInterfaceReply)(nil), "ikev2_set_tunnel_interface_reply_e8d4e804")
2423 api.RegisterMessage((*Ikev2TrafficSelectorDetails)(nil), "ikev2_traffic_selector_details_518cb06f")
2424 api.RegisterMessage((*Ikev2TrafficSelectorDump)(nil), "ikev2_traffic_selector_dump_a7385e33")
2427 // Messages returns list of all messages in this module.
2428 func AllMessages() []api.Message {
2429 return []api.Message{
2430 (*Ikev2ChildSaDetails)(nil),
2431 (*Ikev2ChildSaDump)(nil),
2432 (*Ikev2InitiateDelChildSa)(nil),
2433 (*Ikev2InitiateDelChildSaReply)(nil),
2434 (*Ikev2InitiateDelIkeSa)(nil),
2435 (*Ikev2InitiateDelIkeSaReply)(nil),
2436 (*Ikev2InitiateRekeyChildSa)(nil),
2437 (*Ikev2InitiateRekeyChildSaReply)(nil),
2438 (*Ikev2InitiateSaInit)(nil),
2439 (*Ikev2InitiateSaInitReply)(nil),
2440 (*Ikev2NonceGet)(nil),
2441 (*Ikev2NonceGetReply)(nil),
2442 (*Ikev2PluginGetVersion)(nil),
2443 (*Ikev2PluginGetVersionReply)(nil),
2444 (*Ikev2ProfileAddDel)(nil),
2445 (*Ikev2ProfileAddDelReply)(nil),
2446 (*Ikev2ProfileDetails)(nil),
2447 (*Ikev2ProfileDisableNatt)(nil),
2448 (*Ikev2ProfileDisableNattReply)(nil),
2449 (*Ikev2ProfileDump)(nil),
2450 (*Ikev2ProfileSetAuth)(nil),
2451 (*Ikev2ProfileSetAuthReply)(nil),
2452 (*Ikev2ProfileSetID)(nil),
2453 (*Ikev2ProfileSetIDReply)(nil),
2454 (*Ikev2ProfileSetIpsecUDPPort)(nil),
2455 (*Ikev2ProfileSetIpsecUDPPortReply)(nil),
2456 (*Ikev2ProfileSetLiveness)(nil),
2457 (*Ikev2ProfileSetLivenessReply)(nil),
2458 (*Ikev2ProfileSetTs)(nil),
2459 (*Ikev2ProfileSetTsReply)(nil),
2460 (*Ikev2ProfileSetUDPEncap)(nil),
2461 (*Ikev2ProfileSetUDPEncapReply)(nil),
2462 (*Ikev2SaDetails)(nil),
2463 (*Ikev2SaDump)(nil),
2464 (*Ikev2SetEspTransforms)(nil),
2465 (*Ikev2SetEspTransformsReply)(nil),
2466 (*Ikev2SetIkeTransforms)(nil),
2467 (*Ikev2SetIkeTransformsReply)(nil),
2468 (*Ikev2SetLocalKey)(nil),
2469 (*Ikev2SetLocalKeyReply)(nil),
2470 (*Ikev2SetResponder)(nil),
2471 (*Ikev2SetResponderHostname)(nil),
2472 (*Ikev2SetResponderHostnameReply)(nil),
2473 (*Ikev2SetResponderReply)(nil),
2474 (*Ikev2SetSaLifetime)(nil),
2475 (*Ikev2SetSaLifetimeReply)(nil),
2476 (*Ikev2SetTunnelInterface)(nil),
2477 (*Ikev2SetTunnelInterfaceReply)(nil),
2478 (*Ikev2TrafficSelectorDetails)(nil),
2479 (*Ikev2TrafficSelectorDump)(nil),