1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.5.0
5 // source: /usr/share/vpp/api/core/ipsec.api.json
7 // Package ipsec contains generated bindings for API file ipsec.api.
19 api "git.fd.io/govpp.git/api"
20 interface_types "git.fd.io/govpp.git/binapi/interface_types"
21 ip_types "git.fd.io/govpp.git/binapi/ip_types"
22 ipsec_types "git.fd.io/govpp.git/binapi/ipsec_types"
23 tunnel_types "git.fd.io/govpp.git/binapi/tunnel_types"
24 codec "git.fd.io/govpp.git/codec"
27 // This is a compile-time assertion to ensure that this generated file
28 // is compatible with the GoVPP api package it is being compiled against.
29 // A compilation error at this line likely means your copy of the
30 // GoVPP api package needs to be updated.
31 const _ = api.GoVppAPIPackageIsVersion2
36 VersionCrc = 0x6b08e91e
39 // IpsecSpdAction defines enum 'ipsec_spd_action'.
40 type IpsecSpdAction uint32
43 IPSEC_API_SPD_ACTION_BYPASS IpsecSpdAction = 0
44 IPSEC_API_SPD_ACTION_DISCARD IpsecSpdAction = 1
45 IPSEC_API_SPD_ACTION_RESOLVE IpsecSpdAction = 2
46 IPSEC_API_SPD_ACTION_PROTECT IpsecSpdAction = 3
50 IpsecSpdAction_name = map[uint32]string{
51 0: "IPSEC_API_SPD_ACTION_BYPASS",
52 1: "IPSEC_API_SPD_ACTION_DISCARD",
53 2: "IPSEC_API_SPD_ACTION_RESOLVE",
54 3: "IPSEC_API_SPD_ACTION_PROTECT",
56 IpsecSpdAction_value = map[string]uint32{
57 "IPSEC_API_SPD_ACTION_BYPASS": 0,
58 "IPSEC_API_SPD_ACTION_DISCARD": 1,
59 "IPSEC_API_SPD_ACTION_RESOLVE": 2,
60 "IPSEC_API_SPD_ACTION_PROTECT": 3,
64 func (x IpsecSpdAction) String() string {
65 s, ok := IpsecSpdAction_name[uint32(x)]
69 return "IpsecSpdAction(" + strconv.Itoa(int(x)) + ")"
72 // IpsecItf defines type 'ipsec_itf'.
73 type IpsecItf struct {
74 UserInstance uint32 `binapi:"u32,name=user_instance,default=4294967295" json:"user_instance,omitempty"`
75 Mode tunnel_types.TunnelMode `binapi:"tunnel_mode,name=mode" json:"mode,omitempty"`
76 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
79 // IpsecSpdEntry defines type 'ipsec_spd_entry'.
80 type IpsecSpdEntry struct {
81 SpdID uint32 `binapi:"u32,name=spd_id" json:"spd_id,omitempty"`
82 Priority int32 `binapi:"i32,name=priority" json:"priority,omitempty"`
83 IsOutbound bool `binapi:"bool,name=is_outbound" json:"is_outbound,omitempty"`
84 SaID uint32 `binapi:"u32,name=sa_id" json:"sa_id,omitempty"`
85 Policy IpsecSpdAction `binapi:"ipsec_spd_action,name=policy" json:"policy,omitempty"`
86 Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"`
87 RemoteAddressStart ip_types.Address `binapi:"address,name=remote_address_start" json:"remote_address_start,omitempty"`
88 RemoteAddressStop ip_types.Address `binapi:"address,name=remote_address_stop" json:"remote_address_stop,omitempty"`
89 LocalAddressStart ip_types.Address `binapi:"address,name=local_address_start" json:"local_address_start,omitempty"`
90 LocalAddressStop ip_types.Address `binapi:"address,name=local_address_stop" json:"local_address_stop,omitempty"`
91 RemotePortStart uint16 `binapi:"u16,name=remote_port_start" json:"remote_port_start,omitempty"`
92 RemotePortStop uint16 `binapi:"u16,name=remote_port_stop" json:"remote_port_stop,omitempty"`
93 LocalPortStart uint16 `binapi:"u16,name=local_port_start" json:"local_port_start,omitempty"`
94 LocalPortStop uint16 `binapi:"u16,name=local_port_stop" json:"local_port_stop,omitempty"`
97 // IpsecTunnelProtect defines type 'ipsec_tunnel_protect'.
98 type IpsecTunnelProtect struct {
99 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
100 Nh ip_types.Address `binapi:"address,name=nh" json:"nh,omitempty"`
101 SaOut uint32 `binapi:"u32,name=sa_out" json:"sa_out,omitempty"`
102 NSaIn uint8 `binapi:"u8,name=n_sa_in" json:"-"`
103 SaIn []uint32 `binapi:"u32[n_sa_in],name=sa_in" json:"sa_in,omitempty"`
106 // IpsecBackendDetails defines message 'ipsec_backend_details'.
107 type IpsecBackendDetails struct {
108 Name string `binapi:"string[128],name=name" json:"name,omitempty"`
109 Protocol ipsec_types.IpsecProto `binapi:"ipsec_proto,name=protocol" json:"protocol,omitempty"`
110 Index uint8 `binapi:"u8,name=index" json:"index,omitempty"`
111 Active bool `binapi:"bool,name=active" json:"active,omitempty"`
114 func (m *IpsecBackendDetails) Reset() { *m = IpsecBackendDetails{} }
115 func (*IpsecBackendDetails) GetMessageName() string { return "ipsec_backend_details" }
116 func (*IpsecBackendDetails) GetCrcString() string { return "ee601c29" }
117 func (*IpsecBackendDetails) GetMessageType() api.MessageType {
118 return api.ReplyMessage
121 func (m *IpsecBackendDetails) Size() (size int) {
125 size += 128 // m.Name
126 size += 4 // m.Protocol
128 size += 1 // m.Active
131 func (m *IpsecBackendDetails) Marshal(b []byte) ([]byte, error) {
133 b = make([]byte, m.Size())
135 buf := codec.NewBuffer(b)
136 buf.EncodeString(m.Name, 128)
137 buf.EncodeUint32(uint32(m.Protocol))
138 buf.EncodeUint8(m.Index)
139 buf.EncodeBool(m.Active)
140 return buf.Bytes(), nil
142 func (m *IpsecBackendDetails) Unmarshal(b []byte) error {
143 buf := codec.NewBuffer(b)
144 m.Name = buf.DecodeString(128)
145 m.Protocol = ipsec_types.IpsecProto(buf.DecodeUint32())
146 m.Index = buf.DecodeUint8()
147 m.Active = buf.DecodeBool()
151 // IpsecBackendDump defines message 'ipsec_backend_dump'.
152 type IpsecBackendDump struct{}
154 func (m *IpsecBackendDump) Reset() { *m = IpsecBackendDump{} }
155 func (*IpsecBackendDump) GetMessageName() string { return "ipsec_backend_dump" }
156 func (*IpsecBackendDump) GetCrcString() string { return "51077d14" }
157 func (*IpsecBackendDump) GetMessageType() api.MessageType {
158 return api.RequestMessage
161 func (m *IpsecBackendDump) Size() (size int) {
167 func (m *IpsecBackendDump) Marshal(b []byte) ([]byte, error) {
169 b = make([]byte, m.Size())
171 buf := codec.NewBuffer(b)
172 return buf.Bytes(), nil
174 func (m *IpsecBackendDump) Unmarshal(b []byte) error {
178 // IpsecInterfaceAddDelSpd defines message 'ipsec_interface_add_del_spd'.
179 type IpsecInterfaceAddDelSpd struct {
180 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
181 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
182 SpdID uint32 `binapi:"u32,name=spd_id" json:"spd_id,omitempty"`
185 func (m *IpsecInterfaceAddDelSpd) Reset() { *m = IpsecInterfaceAddDelSpd{} }
186 func (*IpsecInterfaceAddDelSpd) GetMessageName() string { return "ipsec_interface_add_del_spd" }
187 func (*IpsecInterfaceAddDelSpd) GetCrcString() string { return "80f80cbb" }
188 func (*IpsecInterfaceAddDelSpd) GetMessageType() api.MessageType {
189 return api.RequestMessage
192 func (m *IpsecInterfaceAddDelSpd) Size() (size int) {
197 size += 4 // m.SwIfIndex
201 func (m *IpsecInterfaceAddDelSpd) Marshal(b []byte) ([]byte, error) {
203 b = make([]byte, m.Size())
205 buf := codec.NewBuffer(b)
206 buf.EncodeBool(m.IsAdd)
207 buf.EncodeUint32(uint32(m.SwIfIndex))
208 buf.EncodeUint32(m.SpdID)
209 return buf.Bytes(), nil
211 func (m *IpsecInterfaceAddDelSpd) Unmarshal(b []byte) error {
212 buf := codec.NewBuffer(b)
213 m.IsAdd = buf.DecodeBool()
214 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
215 m.SpdID = buf.DecodeUint32()
219 // IpsecInterfaceAddDelSpdReply defines message 'ipsec_interface_add_del_spd_reply'.
220 type IpsecInterfaceAddDelSpdReply struct {
221 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
224 func (m *IpsecInterfaceAddDelSpdReply) Reset() { *m = IpsecInterfaceAddDelSpdReply{} }
225 func (*IpsecInterfaceAddDelSpdReply) GetMessageName() string {
226 return "ipsec_interface_add_del_spd_reply"
228 func (*IpsecInterfaceAddDelSpdReply) GetCrcString() string { return "e8d4e804" }
229 func (*IpsecInterfaceAddDelSpdReply) GetMessageType() api.MessageType {
230 return api.ReplyMessage
233 func (m *IpsecInterfaceAddDelSpdReply) Size() (size int) {
237 size += 4 // m.Retval
240 func (m *IpsecInterfaceAddDelSpdReply) Marshal(b []byte) ([]byte, error) {
242 b = make([]byte, m.Size())
244 buf := codec.NewBuffer(b)
245 buf.EncodeInt32(m.Retval)
246 return buf.Bytes(), nil
248 func (m *IpsecInterfaceAddDelSpdReply) Unmarshal(b []byte) error {
249 buf := codec.NewBuffer(b)
250 m.Retval = buf.DecodeInt32()
254 // IpsecItfCreate defines message 'ipsec_itf_create'.
255 type IpsecItfCreate struct {
256 Itf IpsecItf `binapi:"ipsec_itf,name=itf" json:"itf,omitempty"`
259 func (m *IpsecItfCreate) Reset() { *m = IpsecItfCreate{} }
260 func (*IpsecItfCreate) GetMessageName() string { return "ipsec_itf_create" }
261 func (*IpsecItfCreate) GetCrcString() string { return "6f50b3bc" }
262 func (*IpsecItfCreate) GetMessageType() api.MessageType {
263 return api.RequestMessage
266 func (m *IpsecItfCreate) Size() (size int) {
270 size += 4 // m.Itf.UserInstance
271 size += 1 // m.Itf.Mode
272 size += 4 // m.Itf.SwIfIndex
275 func (m *IpsecItfCreate) Marshal(b []byte) ([]byte, error) {
277 b = make([]byte, m.Size())
279 buf := codec.NewBuffer(b)
280 buf.EncodeUint32(m.Itf.UserInstance)
281 buf.EncodeUint8(uint8(m.Itf.Mode))
282 buf.EncodeUint32(uint32(m.Itf.SwIfIndex))
283 return buf.Bytes(), nil
285 func (m *IpsecItfCreate) Unmarshal(b []byte) error {
286 buf := codec.NewBuffer(b)
287 m.Itf.UserInstance = buf.DecodeUint32()
288 m.Itf.Mode = tunnel_types.TunnelMode(buf.DecodeUint8())
289 m.Itf.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
293 // IpsecItfCreateReply defines message 'ipsec_itf_create_reply'.
294 type IpsecItfCreateReply struct {
295 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
296 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
299 func (m *IpsecItfCreateReply) Reset() { *m = IpsecItfCreateReply{} }
300 func (*IpsecItfCreateReply) GetMessageName() string { return "ipsec_itf_create_reply" }
301 func (*IpsecItfCreateReply) GetCrcString() string { return "5383d31f" }
302 func (*IpsecItfCreateReply) GetMessageType() api.MessageType {
303 return api.ReplyMessage
306 func (m *IpsecItfCreateReply) Size() (size int) {
310 size += 4 // m.Retval
311 size += 4 // m.SwIfIndex
314 func (m *IpsecItfCreateReply) Marshal(b []byte) ([]byte, error) {
316 b = make([]byte, m.Size())
318 buf := codec.NewBuffer(b)
319 buf.EncodeInt32(m.Retval)
320 buf.EncodeUint32(uint32(m.SwIfIndex))
321 return buf.Bytes(), nil
323 func (m *IpsecItfCreateReply) Unmarshal(b []byte) error {
324 buf := codec.NewBuffer(b)
325 m.Retval = buf.DecodeInt32()
326 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
330 // IpsecItfDelete defines message 'ipsec_itf_delete'.
331 type IpsecItfDelete struct {
332 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
335 func (m *IpsecItfDelete) Reset() { *m = IpsecItfDelete{} }
336 func (*IpsecItfDelete) GetMessageName() string { return "ipsec_itf_delete" }
337 func (*IpsecItfDelete) GetCrcString() string { return "f9e6675e" }
338 func (*IpsecItfDelete) GetMessageType() api.MessageType {
339 return api.RequestMessage
342 func (m *IpsecItfDelete) Size() (size int) {
346 size += 4 // m.SwIfIndex
349 func (m *IpsecItfDelete) Marshal(b []byte) ([]byte, error) {
351 b = make([]byte, m.Size())
353 buf := codec.NewBuffer(b)
354 buf.EncodeUint32(uint32(m.SwIfIndex))
355 return buf.Bytes(), nil
357 func (m *IpsecItfDelete) Unmarshal(b []byte) error {
358 buf := codec.NewBuffer(b)
359 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
363 // IpsecItfDeleteReply defines message 'ipsec_itf_delete_reply'.
364 type IpsecItfDeleteReply struct {
365 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
368 func (m *IpsecItfDeleteReply) Reset() { *m = IpsecItfDeleteReply{} }
369 func (*IpsecItfDeleteReply) GetMessageName() string { return "ipsec_itf_delete_reply" }
370 func (*IpsecItfDeleteReply) GetCrcString() string { return "e8d4e804" }
371 func (*IpsecItfDeleteReply) GetMessageType() api.MessageType {
372 return api.ReplyMessage
375 func (m *IpsecItfDeleteReply) Size() (size int) {
379 size += 4 // m.Retval
382 func (m *IpsecItfDeleteReply) Marshal(b []byte) ([]byte, error) {
384 b = make([]byte, m.Size())
386 buf := codec.NewBuffer(b)
387 buf.EncodeInt32(m.Retval)
388 return buf.Bytes(), nil
390 func (m *IpsecItfDeleteReply) Unmarshal(b []byte) error {
391 buf := codec.NewBuffer(b)
392 m.Retval = buf.DecodeInt32()
396 // IpsecItfDetails defines message 'ipsec_itf_details'.
397 type IpsecItfDetails struct {
398 Itf IpsecItf `binapi:"ipsec_itf,name=itf" json:"itf,omitempty"`
401 func (m *IpsecItfDetails) Reset() { *m = IpsecItfDetails{} }
402 func (*IpsecItfDetails) GetMessageName() string { return "ipsec_itf_details" }
403 func (*IpsecItfDetails) GetCrcString() string { return "548a73b8" }
404 func (*IpsecItfDetails) GetMessageType() api.MessageType {
405 return api.ReplyMessage
408 func (m *IpsecItfDetails) Size() (size int) {
412 size += 4 // m.Itf.UserInstance
413 size += 1 // m.Itf.Mode
414 size += 4 // m.Itf.SwIfIndex
417 func (m *IpsecItfDetails) Marshal(b []byte) ([]byte, error) {
419 b = make([]byte, m.Size())
421 buf := codec.NewBuffer(b)
422 buf.EncodeUint32(m.Itf.UserInstance)
423 buf.EncodeUint8(uint8(m.Itf.Mode))
424 buf.EncodeUint32(uint32(m.Itf.SwIfIndex))
425 return buf.Bytes(), nil
427 func (m *IpsecItfDetails) Unmarshal(b []byte) error {
428 buf := codec.NewBuffer(b)
429 m.Itf.UserInstance = buf.DecodeUint32()
430 m.Itf.Mode = tunnel_types.TunnelMode(buf.DecodeUint8())
431 m.Itf.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
435 // IpsecItfDump defines message 'ipsec_itf_dump'.
436 type IpsecItfDump struct {
437 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
440 func (m *IpsecItfDump) Reset() { *m = IpsecItfDump{} }
441 func (*IpsecItfDump) GetMessageName() string { return "ipsec_itf_dump" }
442 func (*IpsecItfDump) GetCrcString() string { return "f9e6675e" }
443 func (*IpsecItfDump) GetMessageType() api.MessageType {
444 return api.RequestMessage
447 func (m *IpsecItfDump) Size() (size int) {
451 size += 4 // m.SwIfIndex
454 func (m *IpsecItfDump) Marshal(b []byte) ([]byte, error) {
456 b = make([]byte, m.Size())
458 buf := codec.NewBuffer(b)
459 buf.EncodeUint32(uint32(m.SwIfIndex))
460 return buf.Bytes(), nil
462 func (m *IpsecItfDump) Unmarshal(b []byte) error {
463 buf := codec.NewBuffer(b)
464 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
468 // IpsecSaDetails defines message 'ipsec_sa_details'.
469 // Deprecated: the message will be removed in the future versions
470 type IpsecSaDetails struct {
471 Entry ipsec_types.IpsecSadEntry `binapi:"ipsec_sad_entry,name=entry" json:"entry,omitempty"`
472 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
473 Salt uint32 `binapi:"u32,name=salt" json:"salt,omitempty"`
474 SeqOutbound uint64 `binapi:"u64,name=seq_outbound" json:"seq_outbound,omitempty"`
475 LastSeqInbound uint64 `binapi:"u64,name=last_seq_inbound" json:"last_seq_inbound,omitempty"`
476 ReplayWindow uint64 `binapi:"u64,name=replay_window" json:"replay_window,omitempty"`
477 StatIndex uint32 `binapi:"u32,name=stat_index" json:"stat_index,omitempty"`
480 func (m *IpsecSaDetails) Reset() { *m = IpsecSaDetails{} }
481 func (*IpsecSaDetails) GetMessageName() string { return "ipsec_sa_details" }
482 func (*IpsecSaDetails) GetCrcString() string { return "345d14a7" }
483 func (*IpsecSaDetails) GetMessageType() api.MessageType {
484 return api.ReplyMessage
487 func (m *IpsecSaDetails) Size() (size int) {
491 size += 4 // m.Entry.SadID
492 size += 4 // m.Entry.Spi
493 size += 4 // m.Entry.Protocol
494 size += 4 // m.Entry.CryptoAlgorithm
495 size += 1 // m.Entry.CryptoKey.Length
496 size += 1 * 128 // m.Entry.CryptoKey.Data
497 size += 4 // m.Entry.IntegrityAlgorithm
498 size += 1 // m.Entry.IntegrityKey.Length
499 size += 1 * 128 // m.Entry.IntegrityKey.Data
500 size += 4 // m.Entry.Flags
501 size += 1 // m.Entry.TunnelSrc.Af
502 size += 1 * 16 // m.Entry.TunnelSrc.Un
503 size += 1 // m.Entry.TunnelDst.Af
504 size += 1 * 16 // m.Entry.TunnelDst.Un
505 size += 4 // m.Entry.TxTableID
506 size += 4 // m.Entry.Salt
507 size += 2 // m.Entry.UDPSrcPort
508 size += 2 // m.Entry.UDPDstPort
509 size += 4 // m.SwIfIndex
511 size += 8 // m.SeqOutbound
512 size += 8 // m.LastSeqInbound
513 size += 8 // m.ReplayWindow
514 size += 4 // m.StatIndex
517 func (m *IpsecSaDetails) Marshal(b []byte) ([]byte, error) {
519 b = make([]byte, m.Size())
521 buf := codec.NewBuffer(b)
522 buf.EncodeUint32(m.Entry.SadID)
523 buf.EncodeUint32(m.Entry.Spi)
524 buf.EncodeUint32(uint32(m.Entry.Protocol))
525 buf.EncodeUint32(uint32(m.Entry.CryptoAlgorithm))
526 buf.EncodeUint8(m.Entry.CryptoKey.Length)
527 buf.EncodeBytes(m.Entry.CryptoKey.Data, 128)
528 buf.EncodeUint32(uint32(m.Entry.IntegrityAlgorithm))
529 buf.EncodeUint8(m.Entry.IntegrityKey.Length)
530 buf.EncodeBytes(m.Entry.IntegrityKey.Data, 128)
531 buf.EncodeUint32(uint32(m.Entry.Flags))
532 buf.EncodeUint8(uint8(m.Entry.TunnelSrc.Af))
533 buf.EncodeBytes(m.Entry.TunnelSrc.Un.XXX_UnionData[:], 16)
534 buf.EncodeUint8(uint8(m.Entry.TunnelDst.Af))
535 buf.EncodeBytes(m.Entry.TunnelDst.Un.XXX_UnionData[:], 16)
536 buf.EncodeUint32(m.Entry.TxTableID)
537 buf.EncodeUint32(m.Entry.Salt)
538 buf.EncodeUint16(m.Entry.UDPSrcPort)
539 buf.EncodeUint16(m.Entry.UDPDstPort)
540 buf.EncodeUint32(uint32(m.SwIfIndex))
541 buf.EncodeUint32(m.Salt)
542 buf.EncodeUint64(m.SeqOutbound)
543 buf.EncodeUint64(m.LastSeqInbound)
544 buf.EncodeUint64(m.ReplayWindow)
545 buf.EncodeUint32(m.StatIndex)
546 return buf.Bytes(), nil
548 func (m *IpsecSaDetails) Unmarshal(b []byte) error {
549 buf := codec.NewBuffer(b)
550 m.Entry.SadID = buf.DecodeUint32()
551 m.Entry.Spi = buf.DecodeUint32()
552 m.Entry.Protocol = ipsec_types.IpsecProto(buf.DecodeUint32())
553 m.Entry.CryptoAlgorithm = ipsec_types.IpsecCryptoAlg(buf.DecodeUint32())
554 m.Entry.CryptoKey.Length = buf.DecodeUint8()
555 m.Entry.CryptoKey.Data = make([]byte, 128)
556 copy(m.Entry.CryptoKey.Data, buf.DecodeBytes(len(m.Entry.CryptoKey.Data)))
557 m.Entry.IntegrityAlgorithm = ipsec_types.IpsecIntegAlg(buf.DecodeUint32())
558 m.Entry.IntegrityKey.Length = buf.DecodeUint8()
559 m.Entry.IntegrityKey.Data = make([]byte, 128)
560 copy(m.Entry.IntegrityKey.Data, buf.DecodeBytes(len(m.Entry.IntegrityKey.Data)))
561 m.Entry.Flags = ipsec_types.IpsecSadFlags(buf.DecodeUint32())
562 m.Entry.TunnelSrc.Af = ip_types.AddressFamily(buf.DecodeUint8())
563 copy(m.Entry.TunnelSrc.Un.XXX_UnionData[:], buf.DecodeBytes(16))
564 m.Entry.TunnelDst.Af = ip_types.AddressFamily(buf.DecodeUint8())
565 copy(m.Entry.TunnelDst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
566 m.Entry.TxTableID = buf.DecodeUint32()
567 m.Entry.Salt = buf.DecodeUint32()
568 m.Entry.UDPSrcPort = buf.DecodeUint16()
569 m.Entry.UDPDstPort = buf.DecodeUint16()
570 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
571 m.Salt = buf.DecodeUint32()
572 m.SeqOutbound = buf.DecodeUint64()
573 m.LastSeqInbound = buf.DecodeUint64()
574 m.ReplayWindow = buf.DecodeUint64()
575 m.StatIndex = buf.DecodeUint32()
579 // IpsecSaDump defines message 'ipsec_sa_dump'.
580 // Deprecated: the message will be removed in the future versions
581 type IpsecSaDump struct {
582 SaID uint32 `binapi:"u32,name=sa_id" json:"sa_id,omitempty"`
585 func (m *IpsecSaDump) Reset() { *m = IpsecSaDump{} }
586 func (*IpsecSaDump) GetMessageName() string { return "ipsec_sa_dump" }
587 func (*IpsecSaDump) GetCrcString() string { return "2076c2f4" }
588 func (*IpsecSaDump) GetMessageType() api.MessageType {
589 return api.RequestMessage
592 func (m *IpsecSaDump) Size() (size int) {
599 func (m *IpsecSaDump) Marshal(b []byte) ([]byte, error) {
601 b = make([]byte, m.Size())
603 buf := codec.NewBuffer(b)
604 buf.EncodeUint32(m.SaID)
605 return buf.Bytes(), nil
607 func (m *IpsecSaDump) Unmarshal(b []byte) error {
608 buf := codec.NewBuffer(b)
609 m.SaID = buf.DecodeUint32()
613 // IpsecSaV2Details defines message 'ipsec_sa_v2_details'.
614 type IpsecSaV2Details struct {
615 Entry ipsec_types.IpsecSadEntryV2 `binapi:"ipsec_sad_entry_v2,name=entry" json:"entry,omitempty"`
616 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
617 Salt uint32 `binapi:"u32,name=salt" json:"salt,omitempty"`
618 SeqOutbound uint64 `binapi:"u64,name=seq_outbound" json:"seq_outbound,omitempty"`
619 LastSeqInbound uint64 `binapi:"u64,name=last_seq_inbound" json:"last_seq_inbound,omitempty"`
620 ReplayWindow uint64 `binapi:"u64,name=replay_window" json:"replay_window,omitempty"`
621 StatIndex uint32 `binapi:"u32,name=stat_index" json:"stat_index,omitempty"`
624 func (m *IpsecSaV2Details) Reset() { *m = IpsecSaV2Details{} }
625 func (*IpsecSaV2Details) GetMessageName() string { return "ipsec_sa_v2_details" }
626 func (*IpsecSaV2Details) GetCrcString() string { return "e2130051" }
627 func (*IpsecSaV2Details) GetMessageType() api.MessageType {
628 return api.ReplyMessage
631 func (m *IpsecSaV2Details) Size() (size int) {
635 size += 4 // m.Entry.SadID
636 size += 4 // m.Entry.Spi
637 size += 4 // m.Entry.Protocol
638 size += 4 // m.Entry.CryptoAlgorithm
639 size += 1 // m.Entry.CryptoKey.Length
640 size += 1 * 128 // m.Entry.CryptoKey.Data
641 size += 4 // m.Entry.IntegrityAlgorithm
642 size += 1 // m.Entry.IntegrityKey.Length
643 size += 1 * 128 // m.Entry.IntegrityKey.Data
644 size += 4 // m.Entry.Flags
645 size += 1 // m.Entry.TunnelSrc.Af
646 size += 1 * 16 // m.Entry.TunnelSrc.Un
647 size += 1 // m.Entry.TunnelDst.Af
648 size += 1 * 16 // m.Entry.TunnelDst.Un
649 size += 1 // m.Entry.TunnelFlags
650 size += 1 // m.Entry.Dscp
651 size += 4 // m.Entry.TxTableID
652 size += 4 // m.Entry.Salt
653 size += 2 // m.Entry.UDPSrcPort
654 size += 2 // m.Entry.UDPDstPort
655 size += 4 // m.SwIfIndex
657 size += 8 // m.SeqOutbound
658 size += 8 // m.LastSeqInbound
659 size += 8 // m.ReplayWindow
660 size += 4 // m.StatIndex
663 func (m *IpsecSaV2Details) Marshal(b []byte) ([]byte, error) {
665 b = make([]byte, m.Size())
667 buf := codec.NewBuffer(b)
668 buf.EncodeUint32(m.Entry.SadID)
669 buf.EncodeUint32(m.Entry.Spi)
670 buf.EncodeUint32(uint32(m.Entry.Protocol))
671 buf.EncodeUint32(uint32(m.Entry.CryptoAlgorithm))
672 buf.EncodeUint8(m.Entry.CryptoKey.Length)
673 buf.EncodeBytes(m.Entry.CryptoKey.Data, 128)
674 buf.EncodeUint32(uint32(m.Entry.IntegrityAlgorithm))
675 buf.EncodeUint8(m.Entry.IntegrityKey.Length)
676 buf.EncodeBytes(m.Entry.IntegrityKey.Data, 128)
677 buf.EncodeUint32(uint32(m.Entry.Flags))
678 buf.EncodeUint8(uint8(m.Entry.TunnelSrc.Af))
679 buf.EncodeBytes(m.Entry.TunnelSrc.Un.XXX_UnionData[:], 16)
680 buf.EncodeUint8(uint8(m.Entry.TunnelDst.Af))
681 buf.EncodeBytes(m.Entry.TunnelDst.Un.XXX_UnionData[:], 16)
682 buf.EncodeUint8(uint8(m.Entry.TunnelFlags))
683 buf.EncodeUint8(uint8(m.Entry.Dscp))
684 buf.EncodeUint32(m.Entry.TxTableID)
685 buf.EncodeUint32(m.Entry.Salt)
686 buf.EncodeUint16(m.Entry.UDPSrcPort)
687 buf.EncodeUint16(m.Entry.UDPDstPort)
688 buf.EncodeUint32(uint32(m.SwIfIndex))
689 buf.EncodeUint32(m.Salt)
690 buf.EncodeUint64(m.SeqOutbound)
691 buf.EncodeUint64(m.LastSeqInbound)
692 buf.EncodeUint64(m.ReplayWindow)
693 buf.EncodeUint32(m.StatIndex)
694 return buf.Bytes(), nil
696 func (m *IpsecSaV2Details) Unmarshal(b []byte) error {
697 buf := codec.NewBuffer(b)
698 m.Entry.SadID = buf.DecodeUint32()
699 m.Entry.Spi = buf.DecodeUint32()
700 m.Entry.Protocol = ipsec_types.IpsecProto(buf.DecodeUint32())
701 m.Entry.CryptoAlgorithm = ipsec_types.IpsecCryptoAlg(buf.DecodeUint32())
702 m.Entry.CryptoKey.Length = buf.DecodeUint8()
703 m.Entry.CryptoKey.Data = make([]byte, 128)
704 copy(m.Entry.CryptoKey.Data, buf.DecodeBytes(len(m.Entry.CryptoKey.Data)))
705 m.Entry.IntegrityAlgorithm = ipsec_types.IpsecIntegAlg(buf.DecodeUint32())
706 m.Entry.IntegrityKey.Length = buf.DecodeUint8()
707 m.Entry.IntegrityKey.Data = make([]byte, 128)
708 copy(m.Entry.IntegrityKey.Data, buf.DecodeBytes(len(m.Entry.IntegrityKey.Data)))
709 m.Entry.Flags = ipsec_types.IpsecSadFlags(buf.DecodeUint32())
710 m.Entry.TunnelSrc.Af = ip_types.AddressFamily(buf.DecodeUint8())
711 copy(m.Entry.TunnelSrc.Un.XXX_UnionData[:], buf.DecodeBytes(16))
712 m.Entry.TunnelDst.Af = ip_types.AddressFamily(buf.DecodeUint8())
713 copy(m.Entry.TunnelDst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
714 m.Entry.TunnelFlags = tunnel_types.TunnelEncapDecapFlags(buf.DecodeUint8())
715 m.Entry.Dscp = ip_types.IPDscp(buf.DecodeUint8())
716 m.Entry.TxTableID = buf.DecodeUint32()
717 m.Entry.Salt = buf.DecodeUint32()
718 m.Entry.UDPSrcPort = buf.DecodeUint16()
719 m.Entry.UDPDstPort = buf.DecodeUint16()
720 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
721 m.Salt = buf.DecodeUint32()
722 m.SeqOutbound = buf.DecodeUint64()
723 m.LastSeqInbound = buf.DecodeUint64()
724 m.ReplayWindow = buf.DecodeUint64()
725 m.StatIndex = buf.DecodeUint32()
729 // IpsecSaV2Dump defines message 'ipsec_sa_v2_dump'.
730 type IpsecSaV2Dump struct {
731 SaID uint32 `binapi:"u32,name=sa_id" json:"sa_id,omitempty"`
734 func (m *IpsecSaV2Dump) Reset() { *m = IpsecSaV2Dump{} }
735 func (*IpsecSaV2Dump) GetMessageName() string { return "ipsec_sa_v2_dump" }
736 func (*IpsecSaV2Dump) GetCrcString() string { return "2076c2f4" }
737 func (*IpsecSaV2Dump) GetMessageType() api.MessageType {
738 return api.RequestMessage
741 func (m *IpsecSaV2Dump) Size() (size int) {
748 func (m *IpsecSaV2Dump) Marshal(b []byte) ([]byte, error) {
750 b = make([]byte, m.Size())
752 buf := codec.NewBuffer(b)
753 buf.EncodeUint32(m.SaID)
754 return buf.Bytes(), nil
756 func (m *IpsecSaV2Dump) Unmarshal(b []byte) error {
757 buf := codec.NewBuffer(b)
758 m.SaID = buf.DecodeUint32()
762 // IpsecSaV3Details defines message 'ipsec_sa_v3_details'.
763 type IpsecSaV3Details struct {
764 Entry ipsec_types.IpsecSadEntryV3 `binapi:"ipsec_sad_entry_v3,name=entry" json:"entry,omitempty"`
765 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
766 SeqOutbound uint64 `binapi:"u64,name=seq_outbound" json:"seq_outbound,omitempty"`
767 LastSeqInbound uint64 `binapi:"u64,name=last_seq_inbound" json:"last_seq_inbound,omitempty"`
768 ReplayWindow uint64 `binapi:"u64,name=replay_window" json:"replay_window,omitempty"`
769 StatIndex uint32 `binapi:"u32,name=stat_index" json:"stat_index,omitempty"`
772 func (m *IpsecSaV3Details) Reset() { *m = IpsecSaV3Details{} }
773 func (*IpsecSaV3Details) GetMessageName() string { return "ipsec_sa_v3_details" }
774 func (*IpsecSaV3Details) GetCrcString() string { return "2fc991ee" }
775 func (*IpsecSaV3Details) GetMessageType() api.MessageType {
776 return api.ReplyMessage
779 func (m *IpsecSaV3Details) Size() (size int) {
783 size += 4 // m.Entry.SadID
784 size += 4 // m.Entry.Spi
785 size += 4 // m.Entry.Protocol
786 size += 4 // m.Entry.CryptoAlgorithm
787 size += 1 // m.Entry.CryptoKey.Length
788 size += 1 * 128 // m.Entry.CryptoKey.Data
789 size += 4 // m.Entry.IntegrityAlgorithm
790 size += 1 // m.Entry.IntegrityKey.Length
791 size += 1 * 128 // m.Entry.IntegrityKey.Data
792 size += 4 // m.Entry.Flags
793 size += 4 // m.Entry.Tunnel.Instance
794 size += 1 // m.Entry.Tunnel.Src.Af
795 size += 1 * 16 // m.Entry.Tunnel.Src.Un
796 size += 1 // m.Entry.Tunnel.Dst.Af
797 size += 1 * 16 // m.Entry.Tunnel.Dst.Un
798 size += 4 // m.Entry.Tunnel.SwIfIndex
799 size += 4 // m.Entry.Tunnel.TableID
800 size += 1 // m.Entry.Tunnel.EncapDecapFlags
801 size += 1 // m.Entry.Tunnel.Mode
802 size += 1 // m.Entry.Tunnel.Flags
803 size += 1 // m.Entry.Tunnel.Dscp
804 size += 1 // m.Entry.Tunnel.HopLimit
805 size += 4 // m.Entry.Salt
806 size += 2 // m.Entry.UDPSrcPort
807 size += 2 // m.Entry.UDPDstPort
808 size += 4 // m.SwIfIndex
809 size += 8 // m.SeqOutbound
810 size += 8 // m.LastSeqInbound
811 size += 8 // m.ReplayWindow
812 size += 4 // m.StatIndex
815 func (m *IpsecSaV3Details) Marshal(b []byte) ([]byte, error) {
817 b = make([]byte, m.Size())
819 buf := codec.NewBuffer(b)
820 buf.EncodeUint32(m.Entry.SadID)
821 buf.EncodeUint32(m.Entry.Spi)
822 buf.EncodeUint32(uint32(m.Entry.Protocol))
823 buf.EncodeUint32(uint32(m.Entry.CryptoAlgorithm))
824 buf.EncodeUint8(m.Entry.CryptoKey.Length)
825 buf.EncodeBytes(m.Entry.CryptoKey.Data, 128)
826 buf.EncodeUint32(uint32(m.Entry.IntegrityAlgorithm))
827 buf.EncodeUint8(m.Entry.IntegrityKey.Length)
828 buf.EncodeBytes(m.Entry.IntegrityKey.Data, 128)
829 buf.EncodeUint32(uint32(m.Entry.Flags))
830 buf.EncodeUint32(m.Entry.Tunnel.Instance)
831 buf.EncodeUint8(uint8(m.Entry.Tunnel.Src.Af))
832 buf.EncodeBytes(m.Entry.Tunnel.Src.Un.XXX_UnionData[:], 16)
833 buf.EncodeUint8(uint8(m.Entry.Tunnel.Dst.Af))
834 buf.EncodeBytes(m.Entry.Tunnel.Dst.Un.XXX_UnionData[:], 16)
835 buf.EncodeUint32(uint32(m.Entry.Tunnel.SwIfIndex))
836 buf.EncodeUint32(m.Entry.Tunnel.TableID)
837 buf.EncodeUint8(uint8(m.Entry.Tunnel.EncapDecapFlags))
838 buf.EncodeUint8(uint8(m.Entry.Tunnel.Mode))
839 buf.EncodeUint8(uint8(m.Entry.Tunnel.Flags))
840 buf.EncodeUint8(uint8(m.Entry.Tunnel.Dscp))
841 buf.EncodeUint8(m.Entry.Tunnel.HopLimit)
842 buf.EncodeUint32(m.Entry.Salt)
843 buf.EncodeUint16(m.Entry.UDPSrcPort)
844 buf.EncodeUint16(m.Entry.UDPDstPort)
845 buf.EncodeUint32(uint32(m.SwIfIndex))
846 buf.EncodeUint64(m.SeqOutbound)
847 buf.EncodeUint64(m.LastSeqInbound)
848 buf.EncodeUint64(m.ReplayWindow)
849 buf.EncodeUint32(m.StatIndex)
850 return buf.Bytes(), nil
852 func (m *IpsecSaV3Details) Unmarshal(b []byte) error {
853 buf := codec.NewBuffer(b)
854 m.Entry.SadID = buf.DecodeUint32()
855 m.Entry.Spi = buf.DecodeUint32()
856 m.Entry.Protocol = ipsec_types.IpsecProto(buf.DecodeUint32())
857 m.Entry.CryptoAlgorithm = ipsec_types.IpsecCryptoAlg(buf.DecodeUint32())
858 m.Entry.CryptoKey.Length = buf.DecodeUint8()
859 m.Entry.CryptoKey.Data = make([]byte, 128)
860 copy(m.Entry.CryptoKey.Data, buf.DecodeBytes(len(m.Entry.CryptoKey.Data)))
861 m.Entry.IntegrityAlgorithm = ipsec_types.IpsecIntegAlg(buf.DecodeUint32())
862 m.Entry.IntegrityKey.Length = buf.DecodeUint8()
863 m.Entry.IntegrityKey.Data = make([]byte, 128)
864 copy(m.Entry.IntegrityKey.Data, buf.DecodeBytes(len(m.Entry.IntegrityKey.Data)))
865 m.Entry.Flags = ipsec_types.IpsecSadFlags(buf.DecodeUint32())
866 m.Entry.Tunnel.Instance = buf.DecodeUint32()
867 m.Entry.Tunnel.Src.Af = ip_types.AddressFamily(buf.DecodeUint8())
868 copy(m.Entry.Tunnel.Src.Un.XXX_UnionData[:], buf.DecodeBytes(16))
869 m.Entry.Tunnel.Dst.Af = ip_types.AddressFamily(buf.DecodeUint8())
870 copy(m.Entry.Tunnel.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
871 m.Entry.Tunnel.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
872 m.Entry.Tunnel.TableID = buf.DecodeUint32()
873 m.Entry.Tunnel.EncapDecapFlags = tunnel_types.TunnelEncapDecapFlags(buf.DecodeUint8())
874 m.Entry.Tunnel.Mode = tunnel_types.TunnelMode(buf.DecodeUint8())
875 m.Entry.Tunnel.Flags = tunnel_types.TunnelFlags(buf.DecodeUint8())
876 m.Entry.Tunnel.Dscp = ip_types.IPDscp(buf.DecodeUint8())
877 m.Entry.Tunnel.HopLimit = buf.DecodeUint8()
878 m.Entry.Salt = buf.DecodeUint32()
879 m.Entry.UDPSrcPort = buf.DecodeUint16()
880 m.Entry.UDPDstPort = buf.DecodeUint16()
881 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
882 m.SeqOutbound = buf.DecodeUint64()
883 m.LastSeqInbound = buf.DecodeUint64()
884 m.ReplayWindow = buf.DecodeUint64()
885 m.StatIndex = buf.DecodeUint32()
889 // IpsecSaV3Dump defines message 'ipsec_sa_v3_dump'.
890 type IpsecSaV3Dump struct {
891 SaID uint32 `binapi:"u32,name=sa_id" json:"sa_id,omitempty"`
894 func (m *IpsecSaV3Dump) Reset() { *m = IpsecSaV3Dump{} }
895 func (*IpsecSaV3Dump) GetMessageName() string { return "ipsec_sa_v3_dump" }
896 func (*IpsecSaV3Dump) GetCrcString() string { return "2076c2f4" }
897 func (*IpsecSaV3Dump) GetMessageType() api.MessageType {
898 return api.RequestMessage
901 func (m *IpsecSaV3Dump) Size() (size int) {
908 func (m *IpsecSaV3Dump) Marshal(b []byte) ([]byte, error) {
910 b = make([]byte, m.Size())
912 buf := codec.NewBuffer(b)
913 buf.EncodeUint32(m.SaID)
914 return buf.Bytes(), nil
916 func (m *IpsecSaV3Dump) Unmarshal(b []byte) error {
917 buf := codec.NewBuffer(b)
918 m.SaID = buf.DecodeUint32()
922 // IpsecSadEntryAdd defines message 'ipsec_sad_entry_add'.
923 type IpsecSadEntryAdd struct {
924 Entry ipsec_types.IpsecSadEntryV3 `binapi:"ipsec_sad_entry_v3,name=entry" json:"entry,omitempty"`
927 func (m *IpsecSadEntryAdd) Reset() { *m = IpsecSadEntryAdd{} }
928 func (*IpsecSadEntryAdd) GetMessageName() string { return "ipsec_sad_entry_add" }
929 func (*IpsecSadEntryAdd) GetCrcString() string { return "50229353" }
930 func (*IpsecSadEntryAdd) GetMessageType() api.MessageType {
931 return api.RequestMessage
934 func (m *IpsecSadEntryAdd) Size() (size int) {
938 size += 4 // m.Entry.SadID
939 size += 4 // m.Entry.Spi
940 size += 4 // m.Entry.Protocol
941 size += 4 // m.Entry.CryptoAlgorithm
942 size += 1 // m.Entry.CryptoKey.Length
943 size += 1 * 128 // m.Entry.CryptoKey.Data
944 size += 4 // m.Entry.IntegrityAlgorithm
945 size += 1 // m.Entry.IntegrityKey.Length
946 size += 1 * 128 // m.Entry.IntegrityKey.Data
947 size += 4 // m.Entry.Flags
948 size += 4 // m.Entry.Tunnel.Instance
949 size += 1 // m.Entry.Tunnel.Src.Af
950 size += 1 * 16 // m.Entry.Tunnel.Src.Un
951 size += 1 // m.Entry.Tunnel.Dst.Af
952 size += 1 * 16 // m.Entry.Tunnel.Dst.Un
953 size += 4 // m.Entry.Tunnel.SwIfIndex
954 size += 4 // m.Entry.Tunnel.TableID
955 size += 1 // m.Entry.Tunnel.EncapDecapFlags
956 size += 1 // m.Entry.Tunnel.Mode
957 size += 1 // m.Entry.Tunnel.Flags
958 size += 1 // m.Entry.Tunnel.Dscp
959 size += 1 // m.Entry.Tunnel.HopLimit
960 size += 4 // m.Entry.Salt
961 size += 2 // m.Entry.UDPSrcPort
962 size += 2 // m.Entry.UDPDstPort
965 func (m *IpsecSadEntryAdd) Marshal(b []byte) ([]byte, error) {
967 b = make([]byte, m.Size())
969 buf := codec.NewBuffer(b)
970 buf.EncodeUint32(m.Entry.SadID)
971 buf.EncodeUint32(m.Entry.Spi)
972 buf.EncodeUint32(uint32(m.Entry.Protocol))
973 buf.EncodeUint32(uint32(m.Entry.CryptoAlgorithm))
974 buf.EncodeUint8(m.Entry.CryptoKey.Length)
975 buf.EncodeBytes(m.Entry.CryptoKey.Data, 128)
976 buf.EncodeUint32(uint32(m.Entry.IntegrityAlgorithm))
977 buf.EncodeUint8(m.Entry.IntegrityKey.Length)
978 buf.EncodeBytes(m.Entry.IntegrityKey.Data, 128)
979 buf.EncodeUint32(uint32(m.Entry.Flags))
980 buf.EncodeUint32(m.Entry.Tunnel.Instance)
981 buf.EncodeUint8(uint8(m.Entry.Tunnel.Src.Af))
982 buf.EncodeBytes(m.Entry.Tunnel.Src.Un.XXX_UnionData[:], 16)
983 buf.EncodeUint8(uint8(m.Entry.Tunnel.Dst.Af))
984 buf.EncodeBytes(m.Entry.Tunnel.Dst.Un.XXX_UnionData[:], 16)
985 buf.EncodeUint32(uint32(m.Entry.Tunnel.SwIfIndex))
986 buf.EncodeUint32(m.Entry.Tunnel.TableID)
987 buf.EncodeUint8(uint8(m.Entry.Tunnel.EncapDecapFlags))
988 buf.EncodeUint8(uint8(m.Entry.Tunnel.Mode))
989 buf.EncodeUint8(uint8(m.Entry.Tunnel.Flags))
990 buf.EncodeUint8(uint8(m.Entry.Tunnel.Dscp))
991 buf.EncodeUint8(m.Entry.Tunnel.HopLimit)
992 buf.EncodeUint32(m.Entry.Salt)
993 buf.EncodeUint16(m.Entry.UDPSrcPort)
994 buf.EncodeUint16(m.Entry.UDPDstPort)
995 return buf.Bytes(), nil
997 func (m *IpsecSadEntryAdd) Unmarshal(b []byte) error {
998 buf := codec.NewBuffer(b)
999 m.Entry.SadID = buf.DecodeUint32()
1000 m.Entry.Spi = buf.DecodeUint32()
1001 m.Entry.Protocol = ipsec_types.IpsecProto(buf.DecodeUint32())
1002 m.Entry.CryptoAlgorithm = ipsec_types.IpsecCryptoAlg(buf.DecodeUint32())
1003 m.Entry.CryptoKey.Length = buf.DecodeUint8()
1004 m.Entry.CryptoKey.Data = make([]byte, 128)
1005 copy(m.Entry.CryptoKey.Data, buf.DecodeBytes(len(m.Entry.CryptoKey.Data)))
1006 m.Entry.IntegrityAlgorithm = ipsec_types.IpsecIntegAlg(buf.DecodeUint32())
1007 m.Entry.IntegrityKey.Length = buf.DecodeUint8()
1008 m.Entry.IntegrityKey.Data = make([]byte, 128)
1009 copy(m.Entry.IntegrityKey.Data, buf.DecodeBytes(len(m.Entry.IntegrityKey.Data)))
1010 m.Entry.Flags = ipsec_types.IpsecSadFlags(buf.DecodeUint32())
1011 m.Entry.Tunnel.Instance = buf.DecodeUint32()
1012 m.Entry.Tunnel.Src.Af = ip_types.AddressFamily(buf.DecodeUint8())
1013 copy(m.Entry.Tunnel.Src.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1014 m.Entry.Tunnel.Dst.Af = ip_types.AddressFamily(buf.DecodeUint8())
1015 copy(m.Entry.Tunnel.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1016 m.Entry.Tunnel.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1017 m.Entry.Tunnel.TableID = buf.DecodeUint32()
1018 m.Entry.Tunnel.EncapDecapFlags = tunnel_types.TunnelEncapDecapFlags(buf.DecodeUint8())
1019 m.Entry.Tunnel.Mode = tunnel_types.TunnelMode(buf.DecodeUint8())
1020 m.Entry.Tunnel.Flags = tunnel_types.TunnelFlags(buf.DecodeUint8())
1021 m.Entry.Tunnel.Dscp = ip_types.IPDscp(buf.DecodeUint8())
1022 m.Entry.Tunnel.HopLimit = buf.DecodeUint8()
1023 m.Entry.Salt = buf.DecodeUint32()
1024 m.Entry.UDPSrcPort = buf.DecodeUint16()
1025 m.Entry.UDPDstPort = buf.DecodeUint16()
1029 // IpsecSadEntryAddDel defines message 'ipsec_sad_entry_add_del'.
1030 // Deprecated: the message will be removed in the future versions
1031 type IpsecSadEntryAddDel struct {
1032 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1033 Entry ipsec_types.IpsecSadEntry `binapi:"ipsec_sad_entry,name=entry" json:"entry,omitempty"`
1036 func (m *IpsecSadEntryAddDel) Reset() { *m = IpsecSadEntryAddDel{} }
1037 func (*IpsecSadEntryAddDel) GetMessageName() string { return "ipsec_sad_entry_add_del" }
1038 func (*IpsecSadEntryAddDel) GetCrcString() string { return "ab64b5c6" }
1039 func (*IpsecSadEntryAddDel) GetMessageType() api.MessageType {
1040 return api.RequestMessage
1043 func (m *IpsecSadEntryAddDel) Size() (size int) {
1047 size += 1 // m.IsAdd
1048 size += 4 // m.Entry.SadID
1049 size += 4 // m.Entry.Spi
1050 size += 4 // m.Entry.Protocol
1051 size += 4 // m.Entry.CryptoAlgorithm
1052 size += 1 // m.Entry.CryptoKey.Length
1053 size += 1 * 128 // m.Entry.CryptoKey.Data
1054 size += 4 // m.Entry.IntegrityAlgorithm
1055 size += 1 // m.Entry.IntegrityKey.Length
1056 size += 1 * 128 // m.Entry.IntegrityKey.Data
1057 size += 4 // m.Entry.Flags
1058 size += 1 // m.Entry.TunnelSrc.Af
1059 size += 1 * 16 // m.Entry.TunnelSrc.Un
1060 size += 1 // m.Entry.TunnelDst.Af
1061 size += 1 * 16 // m.Entry.TunnelDst.Un
1062 size += 4 // m.Entry.TxTableID
1063 size += 4 // m.Entry.Salt
1064 size += 2 // m.Entry.UDPSrcPort
1065 size += 2 // m.Entry.UDPDstPort
1068 func (m *IpsecSadEntryAddDel) Marshal(b []byte) ([]byte, error) {
1070 b = make([]byte, m.Size())
1072 buf := codec.NewBuffer(b)
1073 buf.EncodeBool(m.IsAdd)
1074 buf.EncodeUint32(m.Entry.SadID)
1075 buf.EncodeUint32(m.Entry.Spi)
1076 buf.EncodeUint32(uint32(m.Entry.Protocol))
1077 buf.EncodeUint32(uint32(m.Entry.CryptoAlgorithm))
1078 buf.EncodeUint8(m.Entry.CryptoKey.Length)
1079 buf.EncodeBytes(m.Entry.CryptoKey.Data, 128)
1080 buf.EncodeUint32(uint32(m.Entry.IntegrityAlgorithm))
1081 buf.EncodeUint8(m.Entry.IntegrityKey.Length)
1082 buf.EncodeBytes(m.Entry.IntegrityKey.Data, 128)
1083 buf.EncodeUint32(uint32(m.Entry.Flags))
1084 buf.EncodeUint8(uint8(m.Entry.TunnelSrc.Af))
1085 buf.EncodeBytes(m.Entry.TunnelSrc.Un.XXX_UnionData[:], 16)
1086 buf.EncodeUint8(uint8(m.Entry.TunnelDst.Af))
1087 buf.EncodeBytes(m.Entry.TunnelDst.Un.XXX_UnionData[:], 16)
1088 buf.EncodeUint32(m.Entry.TxTableID)
1089 buf.EncodeUint32(m.Entry.Salt)
1090 buf.EncodeUint16(m.Entry.UDPSrcPort)
1091 buf.EncodeUint16(m.Entry.UDPDstPort)
1092 return buf.Bytes(), nil
1094 func (m *IpsecSadEntryAddDel) Unmarshal(b []byte) error {
1095 buf := codec.NewBuffer(b)
1096 m.IsAdd = buf.DecodeBool()
1097 m.Entry.SadID = buf.DecodeUint32()
1098 m.Entry.Spi = buf.DecodeUint32()
1099 m.Entry.Protocol = ipsec_types.IpsecProto(buf.DecodeUint32())
1100 m.Entry.CryptoAlgorithm = ipsec_types.IpsecCryptoAlg(buf.DecodeUint32())
1101 m.Entry.CryptoKey.Length = buf.DecodeUint8()
1102 m.Entry.CryptoKey.Data = make([]byte, 128)
1103 copy(m.Entry.CryptoKey.Data, buf.DecodeBytes(len(m.Entry.CryptoKey.Data)))
1104 m.Entry.IntegrityAlgorithm = ipsec_types.IpsecIntegAlg(buf.DecodeUint32())
1105 m.Entry.IntegrityKey.Length = buf.DecodeUint8()
1106 m.Entry.IntegrityKey.Data = make([]byte, 128)
1107 copy(m.Entry.IntegrityKey.Data, buf.DecodeBytes(len(m.Entry.IntegrityKey.Data)))
1108 m.Entry.Flags = ipsec_types.IpsecSadFlags(buf.DecodeUint32())
1109 m.Entry.TunnelSrc.Af = ip_types.AddressFamily(buf.DecodeUint8())
1110 copy(m.Entry.TunnelSrc.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1111 m.Entry.TunnelDst.Af = ip_types.AddressFamily(buf.DecodeUint8())
1112 copy(m.Entry.TunnelDst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1113 m.Entry.TxTableID = buf.DecodeUint32()
1114 m.Entry.Salt = buf.DecodeUint32()
1115 m.Entry.UDPSrcPort = buf.DecodeUint16()
1116 m.Entry.UDPDstPort = buf.DecodeUint16()
1120 // IpsecSadEntryAddDelReply defines message 'ipsec_sad_entry_add_del_reply'.
1121 // Deprecated: the message will be removed in the future versions
1122 type IpsecSadEntryAddDelReply struct {
1123 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1124 StatIndex uint32 `binapi:"u32,name=stat_index" json:"stat_index,omitempty"`
1127 func (m *IpsecSadEntryAddDelReply) Reset() { *m = IpsecSadEntryAddDelReply{} }
1128 func (*IpsecSadEntryAddDelReply) GetMessageName() string { return "ipsec_sad_entry_add_del_reply" }
1129 func (*IpsecSadEntryAddDelReply) GetCrcString() string { return "9ffac24b" }
1130 func (*IpsecSadEntryAddDelReply) GetMessageType() api.MessageType {
1131 return api.ReplyMessage
1134 func (m *IpsecSadEntryAddDelReply) Size() (size int) {
1138 size += 4 // m.Retval
1139 size += 4 // m.StatIndex
1142 func (m *IpsecSadEntryAddDelReply) Marshal(b []byte) ([]byte, error) {
1144 b = make([]byte, m.Size())
1146 buf := codec.NewBuffer(b)
1147 buf.EncodeInt32(m.Retval)
1148 buf.EncodeUint32(m.StatIndex)
1149 return buf.Bytes(), nil
1151 func (m *IpsecSadEntryAddDelReply) Unmarshal(b []byte) error {
1152 buf := codec.NewBuffer(b)
1153 m.Retval = buf.DecodeInt32()
1154 m.StatIndex = buf.DecodeUint32()
1158 // IpsecSadEntryAddDelV2 defines message 'ipsec_sad_entry_add_del_v2'.
1159 type IpsecSadEntryAddDelV2 struct {
1160 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1161 Entry ipsec_types.IpsecSadEntryV2 `binapi:"ipsec_sad_entry_v2,name=entry" json:"entry,omitempty"`
1164 func (m *IpsecSadEntryAddDelV2) Reset() { *m = IpsecSadEntryAddDelV2{} }
1165 func (*IpsecSadEntryAddDelV2) GetMessageName() string { return "ipsec_sad_entry_add_del_v2" }
1166 func (*IpsecSadEntryAddDelV2) GetCrcString() string { return "aca78b27" }
1167 func (*IpsecSadEntryAddDelV2) GetMessageType() api.MessageType {
1168 return api.RequestMessage
1171 func (m *IpsecSadEntryAddDelV2) Size() (size int) {
1175 size += 1 // m.IsAdd
1176 size += 4 // m.Entry.SadID
1177 size += 4 // m.Entry.Spi
1178 size += 4 // m.Entry.Protocol
1179 size += 4 // m.Entry.CryptoAlgorithm
1180 size += 1 // m.Entry.CryptoKey.Length
1181 size += 1 * 128 // m.Entry.CryptoKey.Data
1182 size += 4 // m.Entry.IntegrityAlgorithm
1183 size += 1 // m.Entry.IntegrityKey.Length
1184 size += 1 * 128 // m.Entry.IntegrityKey.Data
1185 size += 4 // m.Entry.Flags
1186 size += 1 // m.Entry.TunnelSrc.Af
1187 size += 1 * 16 // m.Entry.TunnelSrc.Un
1188 size += 1 // m.Entry.TunnelDst.Af
1189 size += 1 * 16 // m.Entry.TunnelDst.Un
1190 size += 1 // m.Entry.TunnelFlags
1191 size += 1 // m.Entry.Dscp
1192 size += 4 // m.Entry.TxTableID
1193 size += 4 // m.Entry.Salt
1194 size += 2 // m.Entry.UDPSrcPort
1195 size += 2 // m.Entry.UDPDstPort
1198 func (m *IpsecSadEntryAddDelV2) Marshal(b []byte) ([]byte, error) {
1200 b = make([]byte, m.Size())
1202 buf := codec.NewBuffer(b)
1203 buf.EncodeBool(m.IsAdd)
1204 buf.EncodeUint32(m.Entry.SadID)
1205 buf.EncodeUint32(m.Entry.Spi)
1206 buf.EncodeUint32(uint32(m.Entry.Protocol))
1207 buf.EncodeUint32(uint32(m.Entry.CryptoAlgorithm))
1208 buf.EncodeUint8(m.Entry.CryptoKey.Length)
1209 buf.EncodeBytes(m.Entry.CryptoKey.Data, 128)
1210 buf.EncodeUint32(uint32(m.Entry.IntegrityAlgorithm))
1211 buf.EncodeUint8(m.Entry.IntegrityKey.Length)
1212 buf.EncodeBytes(m.Entry.IntegrityKey.Data, 128)
1213 buf.EncodeUint32(uint32(m.Entry.Flags))
1214 buf.EncodeUint8(uint8(m.Entry.TunnelSrc.Af))
1215 buf.EncodeBytes(m.Entry.TunnelSrc.Un.XXX_UnionData[:], 16)
1216 buf.EncodeUint8(uint8(m.Entry.TunnelDst.Af))
1217 buf.EncodeBytes(m.Entry.TunnelDst.Un.XXX_UnionData[:], 16)
1218 buf.EncodeUint8(uint8(m.Entry.TunnelFlags))
1219 buf.EncodeUint8(uint8(m.Entry.Dscp))
1220 buf.EncodeUint32(m.Entry.TxTableID)
1221 buf.EncodeUint32(m.Entry.Salt)
1222 buf.EncodeUint16(m.Entry.UDPSrcPort)
1223 buf.EncodeUint16(m.Entry.UDPDstPort)
1224 return buf.Bytes(), nil
1226 func (m *IpsecSadEntryAddDelV2) Unmarshal(b []byte) error {
1227 buf := codec.NewBuffer(b)
1228 m.IsAdd = buf.DecodeBool()
1229 m.Entry.SadID = buf.DecodeUint32()
1230 m.Entry.Spi = buf.DecodeUint32()
1231 m.Entry.Protocol = ipsec_types.IpsecProto(buf.DecodeUint32())
1232 m.Entry.CryptoAlgorithm = ipsec_types.IpsecCryptoAlg(buf.DecodeUint32())
1233 m.Entry.CryptoKey.Length = buf.DecodeUint8()
1234 m.Entry.CryptoKey.Data = make([]byte, 128)
1235 copy(m.Entry.CryptoKey.Data, buf.DecodeBytes(len(m.Entry.CryptoKey.Data)))
1236 m.Entry.IntegrityAlgorithm = ipsec_types.IpsecIntegAlg(buf.DecodeUint32())
1237 m.Entry.IntegrityKey.Length = buf.DecodeUint8()
1238 m.Entry.IntegrityKey.Data = make([]byte, 128)
1239 copy(m.Entry.IntegrityKey.Data, buf.DecodeBytes(len(m.Entry.IntegrityKey.Data)))
1240 m.Entry.Flags = ipsec_types.IpsecSadFlags(buf.DecodeUint32())
1241 m.Entry.TunnelSrc.Af = ip_types.AddressFamily(buf.DecodeUint8())
1242 copy(m.Entry.TunnelSrc.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1243 m.Entry.TunnelDst.Af = ip_types.AddressFamily(buf.DecodeUint8())
1244 copy(m.Entry.TunnelDst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1245 m.Entry.TunnelFlags = tunnel_types.TunnelEncapDecapFlags(buf.DecodeUint8())
1246 m.Entry.Dscp = ip_types.IPDscp(buf.DecodeUint8())
1247 m.Entry.TxTableID = buf.DecodeUint32()
1248 m.Entry.Salt = buf.DecodeUint32()
1249 m.Entry.UDPSrcPort = buf.DecodeUint16()
1250 m.Entry.UDPDstPort = buf.DecodeUint16()
1254 // IpsecSadEntryAddDelV2Reply defines message 'ipsec_sad_entry_add_del_v2_reply'.
1255 type IpsecSadEntryAddDelV2Reply struct {
1256 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1257 StatIndex uint32 `binapi:"u32,name=stat_index" json:"stat_index,omitempty"`
1260 func (m *IpsecSadEntryAddDelV2Reply) Reset() { *m = IpsecSadEntryAddDelV2Reply{} }
1261 func (*IpsecSadEntryAddDelV2Reply) GetMessageName() string { return "ipsec_sad_entry_add_del_v2_reply" }
1262 func (*IpsecSadEntryAddDelV2Reply) GetCrcString() string { return "9ffac24b" }
1263 func (*IpsecSadEntryAddDelV2Reply) GetMessageType() api.MessageType {
1264 return api.ReplyMessage
1267 func (m *IpsecSadEntryAddDelV2Reply) Size() (size int) {
1271 size += 4 // m.Retval
1272 size += 4 // m.StatIndex
1275 func (m *IpsecSadEntryAddDelV2Reply) Marshal(b []byte) ([]byte, error) {
1277 b = make([]byte, m.Size())
1279 buf := codec.NewBuffer(b)
1280 buf.EncodeInt32(m.Retval)
1281 buf.EncodeUint32(m.StatIndex)
1282 return buf.Bytes(), nil
1284 func (m *IpsecSadEntryAddDelV2Reply) Unmarshal(b []byte) error {
1285 buf := codec.NewBuffer(b)
1286 m.Retval = buf.DecodeInt32()
1287 m.StatIndex = buf.DecodeUint32()
1291 // IpsecSadEntryAddDelV3 defines message 'ipsec_sad_entry_add_del_v3'.
1292 type IpsecSadEntryAddDelV3 struct {
1293 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1294 Entry ipsec_types.IpsecSadEntryV3 `binapi:"ipsec_sad_entry_v3,name=entry" json:"entry,omitempty"`
1297 func (m *IpsecSadEntryAddDelV3) Reset() { *m = IpsecSadEntryAddDelV3{} }
1298 func (*IpsecSadEntryAddDelV3) GetMessageName() string { return "ipsec_sad_entry_add_del_v3" }
1299 func (*IpsecSadEntryAddDelV3) GetCrcString() string { return "c77ebd92" }
1300 func (*IpsecSadEntryAddDelV3) GetMessageType() api.MessageType {
1301 return api.RequestMessage
1304 func (m *IpsecSadEntryAddDelV3) Size() (size int) {
1308 size += 1 // m.IsAdd
1309 size += 4 // m.Entry.SadID
1310 size += 4 // m.Entry.Spi
1311 size += 4 // m.Entry.Protocol
1312 size += 4 // m.Entry.CryptoAlgorithm
1313 size += 1 // m.Entry.CryptoKey.Length
1314 size += 1 * 128 // m.Entry.CryptoKey.Data
1315 size += 4 // m.Entry.IntegrityAlgorithm
1316 size += 1 // m.Entry.IntegrityKey.Length
1317 size += 1 * 128 // m.Entry.IntegrityKey.Data
1318 size += 4 // m.Entry.Flags
1319 size += 4 // m.Entry.Tunnel.Instance
1320 size += 1 // m.Entry.Tunnel.Src.Af
1321 size += 1 * 16 // m.Entry.Tunnel.Src.Un
1322 size += 1 // m.Entry.Tunnel.Dst.Af
1323 size += 1 * 16 // m.Entry.Tunnel.Dst.Un
1324 size += 4 // m.Entry.Tunnel.SwIfIndex
1325 size += 4 // m.Entry.Tunnel.TableID
1326 size += 1 // m.Entry.Tunnel.EncapDecapFlags
1327 size += 1 // m.Entry.Tunnel.Mode
1328 size += 1 // m.Entry.Tunnel.Flags
1329 size += 1 // m.Entry.Tunnel.Dscp
1330 size += 1 // m.Entry.Tunnel.HopLimit
1331 size += 4 // m.Entry.Salt
1332 size += 2 // m.Entry.UDPSrcPort
1333 size += 2 // m.Entry.UDPDstPort
1336 func (m *IpsecSadEntryAddDelV3) Marshal(b []byte) ([]byte, error) {
1338 b = make([]byte, m.Size())
1340 buf := codec.NewBuffer(b)
1341 buf.EncodeBool(m.IsAdd)
1342 buf.EncodeUint32(m.Entry.SadID)
1343 buf.EncodeUint32(m.Entry.Spi)
1344 buf.EncodeUint32(uint32(m.Entry.Protocol))
1345 buf.EncodeUint32(uint32(m.Entry.CryptoAlgorithm))
1346 buf.EncodeUint8(m.Entry.CryptoKey.Length)
1347 buf.EncodeBytes(m.Entry.CryptoKey.Data, 128)
1348 buf.EncodeUint32(uint32(m.Entry.IntegrityAlgorithm))
1349 buf.EncodeUint8(m.Entry.IntegrityKey.Length)
1350 buf.EncodeBytes(m.Entry.IntegrityKey.Data, 128)
1351 buf.EncodeUint32(uint32(m.Entry.Flags))
1352 buf.EncodeUint32(m.Entry.Tunnel.Instance)
1353 buf.EncodeUint8(uint8(m.Entry.Tunnel.Src.Af))
1354 buf.EncodeBytes(m.Entry.Tunnel.Src.Un.XXX_UnionData[:], 16)
1355 buf.EncodeUint8(uint8(m.Entry.Tunnel.Dst.Af))
1356 buf.EncodeBytes(m.Entry.Tunnel.Dst.Un.XXX_UnionData[:], 16)
1357 buf.EncodeUint32(uint32(m.Entry.Tunnel.SwIfIndex))
1358 buf.EncodeUint32(m.Entry.Tunnel.TableID)
1359 buf.EncodeUint8(uint8(m.Entry.Tunnel.EncapDecapFlags))
1360 buf.EncodeUint8(uint8(m.Entry.Tunnel.Mode))
1361 buf.EncodeUint8(uint8(m.Entry.Tunnel.Flags))
1362 buf.EncodeUint8(uint8(m.Entry.Tunnel.Dscp))
1363 buf.EncodeUint8(m.Entry.Tunnel.HopLimit)
1364 buf.EncodeUint32(m.Entry.Salt)
1365 buf.EncodeUint16(m.Entry.UDPSrcPort)
1366 buf.EncodeUint16(m.Entry.UDPDstPort)
1367 return buf.Bytes(), nil
1369 func (m *IpsecSadEntryAddDelV3) Unmarshal(b []byte) error {
1370 buf := codec.NewBuffer(b)
1371 m.IsAdd = buf.DecodeBool()
1372 m.Entry.SadID = buf.DecodeUint32()
1373 m.Entry.Spi = buf.DecodeUint32()
1374 m.Entry.Protocol = ipsec_types.IpsecProto(buf.DecodeUint32())
1375 m.Entry.CryptoAlgorithm = ipsec_types.IpsecCryptoAlg(buf.DecodeUint32())
1376 m.Entry.CryptoKey.Length = buf.DecodeUint8()
1377 m.Entry.CryptoKey.Data = make([]byte, 128)
1378 copy(m.Entry.CryptoKey.Data, buf.DecodeBytes(len(m.Entry.CryptoKey.Data)))
1379 m.Entry.IntegrityAlgorithm = ipsec_types.IpsecIntegAlg(buf.DecodeUint32())
1380 m.Entry.IntegrityKey.Length = buf.DecodeUint8()
1381 m.Entry.IntegrityKey.Data = make([]byte, 128)
1382 copy(m.Entry.IntegrityKey.Data, buf.DecodeBytes(len(m.Entry.IntegrityKey.Data)))
1383 m.Entry.Flags = ipsec_types.IpsecSadFlags(buf.DecodeUint32())
1384 m.Entry.Tunnel.Instance = buf.DecodeUint32()
1385 m.Entry.Tunnel.Src.Af = ip_types.AddressFamily(buf.DecodeUint8())
1386 copy(m.Entry.Tunnel.Src.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1387 m.Entry.Tunnel.Dst.Af = ip_types.AddressFamily(buf.DecodeUint8())
1388 copy(m.Entry.Tunnel.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1389 m.Entry.Tunnel.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1390 m.Entry.Tunnel.TableID = buf.DecodeUint32()
1391 m.Entry.Tunnel.EncapDecapFlags = tunnel_types.TunnelEncapDecapFlags(buf.DecodeUint8())
1392 m.Entry.Tunnel.Mode = tunnel_types.TunnelMode(buf.DecodeUint8())
1393 m.Entry.Tunnel.Flags = tunnel_types.TunnelFlags(buf.DecodeUint8())
1394 m.Entry.Tunnel.Dscp = ip_types.IPDscp(buf.DecodeUint8())
1395 m.Entry.Tunnel.HopLimit = buf.DecodeUint8()
1396 m.Entry.Salt = buf.DecodeUint32()
1397 m.Entry.UDPSrcPort = buf.DecodeUint16()
1398 m.Entry.UDPDstPort = buf.DecodeUint16()
1402 // IpsecSadEntryAddDelV3Reply defines message 'ipsec_sad_entry_add_del_v3_reply'.
1403 type IpsecSadEntryAddDelV3Reply struct {
1404 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1405 StatIndex uint32 `binapi:"u32,name=stat_index" json:"stat_index,omitempty"`
1408 func (m *IpsecSadEntryAddDelV3Reply) Reset() { *m = IpsecSadEntryAddDelV3Reply{} }
1409 func (*IpsecSadEntryAddDelV3Reply) GetMessageName() string { return "ipsec_sad_entry_add_del_v3_reply" }
1410 func (*IpsecSadEntryAddDelV3Reply) GetCrcString() string { return "9ffac24b" }
1411 func (*IpsecSadEntryAddDelV3Reply) GetMessageType() api.MessageType {
1412 return api.ReplyMessage
1415 func (m *IpsecSadEntryAddDelV3Reply) Size() (size int) {
1419 size += 4 // m.Retval
1420 size += 4 // m.StatIndex
1423 func (m *IpsecSadEntryAddDelV3Reply) Marshal(b []byte) ([]byte, error) {
1425 b = make([]byte, m.Size())
1427 buf := codec.NewBuffer(b)
1428 buf.EncodeInt32(m.Retval)
1429 buf.EncodeUint32(m.StatIndex)
1430 return buf.Bytes(), nil
1432 func (m *IpsecSadEntryAddDelV3Reply) Unmarshal(b []byte) error {
1433 buf := codec.NewBuffer(b)
1434 m.Retval = buf.DecodeInt32()
1435 m.StatIndex = buf.DecodeUint32()
1439 // IpsecSadEntryAddReply defines message 'ipsec_sad_entry_add_reply'.
1440 type IpsecSadEntryAddReply struct {
1441 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1442 StatIndex uint32 `binapi:"u32,name=stat_index" json:"stat_index,omitempty"`
1445 func (m *IpsecSadEntryAddReply) Reset() { *m = IpsecSadEntryAddReply{} }
1446 func (*IpsecSadEntryAddReply) GetMessageName() string { return "ipsec_sad_entry_add_reply" }
1447 func (*IpsecSadEntryAddReply) GetCrcString() string { return "9ffac24b" }
1448 func (*IpsecSadEntryAddReply) GetMessageType() api.MessageType {
1449 return api.ReplyMessage
1452 func (m *IpsecSadEntryAddReply) Size() (size int) {
1456 size += 4 // m.Retval
1457 size += 4 // m.StatIndex
1460 func (m *IpsecSadEntryAddReply) Marshal(b []byte) ([]byte, error) {
1462 b = make([]byte, m.Size())
1464 buf := codec.NewBuffer(b)
1465 buf.EncodeInt32(m.Retval)
1466 buf.EncodeUint32(m.StatIndex)
1467 return buf.Bytes(), nil
1469 func (m *IpsecSadEntryAddReply) Unmarshal(b []byte) error {
1470 buf := codec.NewBuffer(b)
1471 m.Retval = buf.DecodeInt32()
1472 m.StatIndex = buf.DecodeUint32()
1476 // IpsecSadEntryDel defines message 'ipsec_sad_entry_del'.
1477 type IpsecSadEntryDel struct {
1478 ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
1481 func (m *IpsecSadEntryDel) Reset() { *m = IpsecSadEntryDel{} }
1482 func (*IpsecSadEntryDel) GetMessageName() string { return "ipsec_sad_entry_del" }
1483 func (*IpsecSadEntryDel) GetCrcString() string { return "3a91bde5" }
1484 func (*IpsecSadEntryDel) GetMessageType() api.MessageType {
1485 return api.RequestMessage
1488 func (m *IpsecSadEntryDel) Size() (size int) {
1495 func (m *IpsecSadEntryDel) Marshal(b []byte) ([]byte, error) {
1497 b = make([]byte, m.Size())
1499 buf := codec.NewBuffer(b)
1500 buf.EncodeUint32(m.ID)
1501 return buf.Bytes(), nil
1503 func (m *IpsecSadEntryDel) Unmarshal(b []byte) error {
1504 buf := codec.NewBuffer(b)
1505 m.ID = buf.DecodeUint32()
1509 // IpsecSadEntryDelReply defines message 'ipsec_sad_entry_del_reply'.
1510 type IpsecSadEntryDelReply struct {
1511 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1514 func (m *IpsecSadEntryDelReply) Reset() { *m = IpsecSadEntryDelReply{} }
1515 func (*IpsecSadEntryDelReply) GetMessageName() string { return "ipsec_sad_entry_del_reply" }
1516 func (*IpsecSadEntryDelReply) GetCrcString() string { return "e8d4e804" }
1517 func (*IpsecSadEntryDelReply) GetMessageType() api.MessageType {
1518 return api.ReplyMessage
1521 func (m *IpsecSadEntryDelReply) Size() (size int) {
1525 size += 4 // m.Retval
1528 func (m *IpsecSadEntryDelReply) Marshal(b []byte) ([]byte, error) {
1530 b = make([]byte, m.Size())
1532 buf := codec.NewBuffer(b)
1533 buf.EncodeInt32(m.Retval)
1534 return buf.Bytes(), nil
1536 func (m *IpsecSadEntryDelReply) Unmarshal(b []byte) error {
1537 buf := codec.NewBuffer(b)
1538 m.Retval = buf.DecodeInt32()
1542 // IpsecSelectBackend defines message 'ipsec_select_backend'.
1543 type IpsecSelectBackend struct {
1544 Protocol ipsec_types.IpsecProto `binapi:"ipsec_proto,name=protocol" json:"protocol,omitempty"`
1545 Index uint8 `binapi:"u8,name=index" json:"index,omitempty"`
1548 func (m *IpsecSelectBackend) Reset() { *m = IpsecSelectBackend{} }
1549 func (*IpsecSelectBackend) GetMessageName() string { return "ipsec_select_backend" }
1550 func (*IpsecSelectBackend) GetCrcString() string { return "5bcfd3b7" }
1551 func (*IpsecSelectBackend) GetMessageType() api.MessageType {
1552 return api.RequestMessage
1555 func (m *IpsecSelectBackend) Size() (size int) {
1559 size += 4 // m.Protocol
1560 size += 1 // m.Index
1563 func (m *IpsecSelectBackend) Marshal(b []byte) ([]byte, error) {
1565 b = make([]byte, m.Size())
1567 buf := codec.NewBuffer(b)
1568 buf.EncodeUint32(uint32(m.Protocol))
1569 buf.EncodeUint8(m.Index)
1570 return buf.Bytes(), nil
1572 func (m *IpsecSelectBackend) Unmarshal(b []byte) error {
1573 buf := codec.NewBuffer(b)
1574 m.Protocol = ipsec_types.IpsecProto(buf.DecodeUint32())
1575 m.Index = buf.DecodeUint8()
1579 // IpsecSelectBackendReply defines message 'ipsec_select_backend_reply'.
1580 type IpsecSelectBackendReply struct {
1581 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1584 func (m *IpsecSelectBackendReply) Reset() { *m = IpsecSelectBackendReply{} }
1585 func (*IpsecSelectBackendReply) GetMessageName() string { return "ipsec_select_backend_reply" }
1586 func (*IpsecSelectBackendReply) GetCrcString() string { return "e8d4e804" }
1587 func (*IpsecSelectBackendReply) GetMessageType() api.MessageType {
1588 return api.ReplyMessage
1591 func (m *IpsecSelectBackendReply) Size() (size int) {
1595 size += 4 // m.Retval
1598 func (m *IpsecSelectBackendReply) Marshal(b []byte) ([]byte, error) {
1600 b = make([]byte, m.Size())
1602 buf := codec.NewBuffer(b)
1603 buf.EncodeInt32(m.Retval)
1604 return buf.Bytes(), nil
1606 func (m *IpsecSelectBackendReply) Unmarshal(b []byte) error {
1607 buf := codec.NewBuffer(b)
1608 m.Retval = buf.DecodeInt32()
1612 // IpsecSetAsyncMode defines message 'ipsec_set_async_mode'.
1613 type IpsecSetAsyncMode struct {
1614 AsyncEnable bool `binapi:"bool,name=async_enable" json:"async_enable,omitempty"`
1617 func (m *IpsecSetAsyncMode) Reset() { *m = IpsecSetAsyncMode{} }
1618 func (*IpsecSetAsyncMode) GetMessageName() string { return "ipsec_set_async_mode" }
1619 func (*IpsecSetAsyncMode) GetCrcString() string { return "a6465f7c" }
1620 func (*IpsecSetAsyncMode) GetMessageType() api.MessageType {
1621 return api.RequestMessage
1624 func (m *IpsecSetAsyncMode) Size() (size int) {
1628 size += 1 // m.AsyncEnable
1631 func (m *IpsecSetAsyncMode) Marshal(b []byte) ([]byte, error) {
1633 b = make([]byte, m.Size())
1635 buf := codec.NewBuffer(b)
1636 buf.EncodeBool(m.AsyncEnable)
1637 return buf.Bytes(), nil
1639 func (m *IpsecSetAsyncMode) Unmarshal(b []byte) error {
1640 buf := codec.NewBuffer(b)
1641 m.AsyncEnable = buf.DecodeBool()
1645 // IpsecSetAsyncModeReply defines message 'ipsec_set_async_mode_reply'.
1646 type IpsecSetAsyncModeReply struct {
1647 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1650 func (m *IpsecSetAsyncModeReply) Reset() { *m = IpsecSetAsyncModeReply{} }
1651 func (*IpsecSetAsyncModeReply) GetMessageName() string { return "ipsec_set_async_mode_reply" }
1652 func (*IpsecSetAsyncModeReply) GetCrcString() string { return "e8d4e804" }
1653 func (*IpsecSetAsyncModeReply) GetMessageType() api.MessageType {
1654 return api.ReplyMessage
1657 func (m *IpsecSetAsyncModeReply) Size() (size int) {
1661 size += 4 // m.Retval
1664 func (m *IpsecSetAsyncModeReply) Marshal(b []byte) ([]byte, error) {
1666 b = make([]byte, m.Size())
1668 buf := codec.NewBuffer(b)
1669 buf.EncodeInt32(m.Retval)
1670 return buf.Bytes(), nil
1672 func (m *IpsecSetAsyncModeReply) Unmarshal(b []byte) error {
1673 buf := codec.NewBuffer(b)
1674 m.Retval = buf.DecodeInt32()
1678 // IpsecSpdAddDel defines message 'ipsec_spd_add_del'.
1679 type IpsecSpdAddDel struct {
1680 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1681 SpdID uint32 `binapi:"u32,name=spd_id" json:"spd_id,omitempty"`
1684 func (m *IpsecSpdAddDel) Reset() { *m = IpsecSpdAddDel{} }
1685 func (*IpsecSpdAddDel) GetMessageName() string { return "ipsec_spd_add_del" }
1686 func (*IpsecSpdAddDel) GetCrcString() string { return "20e89a95" }
1687 func (*IpsecSpdAddDel) GetMessageType() api.MessageType {
1688 return api.RequestMessage
1691 func (m *IpsecSpdAddDel) Size() (size int) {
1695 size += 1 // m.IsAdd
1696 size += 4 // m.SpdID
1699 func (m *IpsecSpdAddDel) Marshal(b []byte) ([]byte, error) {
1701 b = make([]byte, m.Size())
1703 buf := codec.NewBuffer(b)
1704 buf.EncodeBool(m.IsAdd)
1705 buf.EncodeUint32(m.SpdID)
1706 return buf.Bytes(), nil
1708 func (m *IpsecSpdAddDel) Unmarshal(b []byte) error {
1709 buf := codec.NewBuffer(b)
1710 m.IsAdd = buf.DecodeBool()
1711 m.SpdID = buf.DecodeUint32()
1715 // IpsecSpdAddDelReply defines message 'ipsec_spd_add_del_reply'.
1716 type IpsecSpdAddDelReply struct {
1717 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1720 func (m *IpsecSpdAddDelReply) Reset() { *m = IpsecSpdAddDelReply{} }
1721 func (*IpsecSpdAddDelReply) GetMessageName() string { return "ipsec_spd_add_del_reply" }
1722 func (*IpsecSpdAddDelReply) GetCrcString() string { return "e8d4e804" }
1723 func (*IpsecSpdAddDelReply) GetMessageType() api.MessageType {
1724 return api.ReplyMessage
1727 func (m *IpsecSpdAddDelReply) Size() (size int) {
1731 size += 4 // m.Retval
1734 func (m *IpsecSpdAddDelReply) Marshal(b []byte) ([]byte, error) {
1736 b = make([]byte, m.Size())
1738 buf := codec.NewBuffer(b)
1739 buf.EncodeInt32(m.Retval)
1740 return buf.Bytes(), nil
1742 func (m *IpsecSpdAddDelReply) Unmarshal(b []byte) error {
1743 buf := codec.NewBuffer(b)
1744 m.Retval = buf.DecodeInt32()
1748 // IpsecSpdDetails defines message 'ipsec_spd_details'.
1749 type IpsecSpdDetails struct {
1750 Entry IpsecSpdEntry `binapi:"ipsec_spd_entry,name=entry" json:"entry,omitempty"`
1753 func (m *IpsecSpdDetails) Reset() { *m = IpsecSpdDetails{} }
1754 func (*IpsecSpdDetails) GetMessageName() string { return "ipsec_spd_details" }
1755 func (*IpsecSpdDetails) GetCrcString() string { return "5813d7a2" }
1756 func (*IpsecSpdDetails) GetMessageType() api.MessageType {
1757 return api.ReplyMessage
1760 func (m *IpsecSpdDetails) Size() (size int) {
1764 size += 4 // m.Entry.SpdID
1765 size += 4 // m.Entry.Priority
1766 size += 1 // m.Entry.IsOutbound
1767 size += 4 // m.Entry.SaID
1768 size += 4 // m.Entry.Policy
1769 size += 1 // m.Entry.Protocol
1770 size += 1 // m.Entry.RemoteAddressStart.Af
1771 size += 1 * 16 // m.Entry.RemoteAddressStart.Un
1772 size += 1 // m.Entry.RemoteAddressStop.Af
1773 size += 1 * 16 // m.Entry.RemoteAddressStop.Un
1774 size += 1 // m.Entry.LocalAddressStart.Af
1775 size += 1 * 16 // m.Entry.LocalAddressStart.Un
1776 size += 1 // m.Entry.LocalAddressStop.Af
1777 size += 1 * 16 // m.Entry.LocalAddressStop.Un
1778 size += 2 // m.Entry.RemotePortStart
1779 size += 2 // m.Entry.RemotePortStop
1780 size += 2 // m.Entry.LocalPortStart
1781 size += 2 // m.Entry.LocalPortStop
1784 func (m *IpsecSpdDetails) Marshal(b []byte) ([]byte, error) {
1786 b = make([]byte, m.Size())
1788 buf := codec.NewBuffer(b)
1789 buf.EncodeUint32(m.Entry.SpdID)
1790 buf.EncodeInt32(m.Entry.Priority)
1791 buf.EncodeBool(m.Entry.IsOutbound)
1792 buf.EncodeUint32(m.Entry.SaID)
1793 buf.EncodeUint32(uint32(m.Entry.Policy))
1794 buf.EncodeUint8(m.Entry.Protocol)
1795 buf.EncodeUint8(uint8(m.Entry.RemoteAddressStart.Af))
1796 buf.EncodeBytes(m.Entry.RemoteAddressStart.Un.XXX_UnionData[:], 16)
1797 buf.EncodeUint8(uint8(m.Entry.RemoteAddressStop.Af))
1798 buf.EncodeBytes(m.Entry.RemoteAddressStop.Un.XXX_UnionData[:], 16)
1799 buf.EncodeUint8(uint8(m.Entry.LocalAddressStart.Af))
1800 buf.EncodeBytes(m.Entry.LocalAddressStart.Un.XXX_UnionData[:], 16)
1801 buf.EncodeUint8(uint8(m.Entry.LocalAddressStop.Af))
1802 buf.EncodeBytes(m.Entry.LocalAddressStop.Un.XXX_UnionData[:], 16)
1803 buf.EncodeUint16(m.Entry.RemotePortStart)
1804 buf.EncodeUint16(m.Entry.RemotePortStop)
1805 buf.EncodeUint16(m.Entry.LocalPortStart)
1806 buf.EncodeUint16(m.Entry.LocalPortStop)
1807 return buf.Bytes(), nil
1809 func (m *IpsecSpdDetails) Unmarshal(b []byte) error {
1810 buf := codec.NewBuffer(b)
1811 m.Entry.SpdID = buf.DecodeUint32()
1812 m.Entry.Priority = buf.DecodeInt32()
1813 m.Entry.IsOutbound = buf.DecodeBool()
1814 m.Entry.SaID = buf.DecodeUint32()
1815 m.Entry.Policy = IpsecSpdAction(buf.DecodeUint32())
1816 m.Entry.Protocol = buf.DecodeUint8()
1817 m.Entry.RemoteAddressStart.Af = ip_types.AddressFamily(buf.DecodeUint8())
1818 copy(m.Entry.RemoteAddressStart.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1819 m.Entry.RemoteAddressStop.Af = ip_types.AddressFamily(buf.DecodeUint8())
1820 copy(m.Entry.RemoteAddressStop.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1821 m.Entry.LocalAddressStart.Af = ip_types.AddressFamily(buf.DecodeUint8())
1822 copy(m.Entry.LocalAddressStart.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1823 m.Entry.LocalAddressStop.Af = ip_types.AddressFamily(buf.DecodeUint8())
1824 copy(m.Entry.LocalAddressStop.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1825 m.Entry.RemotePortStart = buf.DecodeUint16()
1826 m.Entry.RemotePortStop = buf.DecodeUint16()
1827 m.Entry.LocalPortStart = buf.DecodeUint16()
1828 m.Entry.LocalPortStop = buf.DecodeUint16()
1832 // IpsecSpdDump defines message 'ipsec_spd_dump'.
1833 type IpsecSpdDump struct {
1834 SpdID uint32 `binapi:"u32,name=spd_id" json:"spd_id,omitempty"`
1835 SaID uint32 `binapi:"u32,name=sa_id" json:"sa_id,omitempty"`
1838 func (m *IpsecSpdDump) Reset() { *m = IpsecSpdDump{} }
1839 func (*IpsecSpdDump) GetMessageName() string { return "ipsec_spd_dump" }
1840 func (*IpsecSpdDump) GetCrcString() string { return "afefbf7d" }
1841 func (*IpsecSpdDump) GetMessageType() api.MessageType {
1842 return api.RequestMessage
1845 func (m *IpsecSpdDump) Size() (size int) {
1849 size += 4 // m.SpdID
1853 func (m *IpsecSpdDump) Marshal(b []byte) ([]byte, error) {
1855 b = make([]byte, m.Size())
1857 buf := codec.NewBuffer(b)
1858 buf.EncodeUint32(m.SpdID)
1859 buf.EncodeUint32(m.SaID)
1860 return buf.Bytes(), nil
1862 func (m *IpsecSpdDump) Unmarshal(b []byte) error {
1863 buf := codec.NewBuffer(b)
1864 m.SpdID = buf.DecodeUint32()
1865 m.SaID = buf.DecodeUint32()
1869 // IpsecSpdEntryAddDel defines message 'ipsec_spd_entry_add_del'.
1870 type IpsecSpdEntryAddDel struct {
1871 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1872 Entry IpsecSpdEntry `binapi:"ipsec_spd_entry,name=entry" json:"entry,omitempty"`
1875 func (m *IpsecSpdEntryAddDel) Reset() { *m = IpsecSpdEntryAddDel{} }
1876 func (*IpsecSpdEntryAddDel) GetMessageName() string { return "ipsec_spd_entry_add_del" }
1877 func (*IpsecSpdEntryAddDel) GetCrcString() string { return "338b7411" }
1878 func (*IpsecSpdEntryAddDel) GetMessageType() api.MessageType {
1879 return api.RequestMessage
1882 func (m *IpsecSpdEntryAddDel) Size() (size int) {
1886 size += 1 // m.IsAdd
1887 size += 4 // m.Entry.SpdID
1888 size += 4 // m.Entry.Priority
1889 size += 1 // m.Entry.IsOutbound
1890 size += 4 // m.Entry.SaID
1891 size += 4 // m.Entry.Policy
1892 size += 1 // m.Entry.Protocol
1893 size += 1 // m.Entry.RemoteAddressStart.Af
1894 size += 1 * 16 // m.Entry.RemoteAddressStart.Un
1895 size += 1 // m.Entry.RemoteAddressStop.Af
1896 size += 1 * 16 // m.Entry.RemoteAddressStop.Un
1897 size += 1 // m.Entry.LocalAddressStart.Af
1898 size += 1 * 16 // m.Entry.LocalAddressStart.Un
1899 size += 1 // m.Entry.LocalAddressStop.Af
1900 size += 1 * 16 // m.Entry.LocalAddressStop.Un
1901 size += 2 // m.Entry.RemotePortStart
1902 size += 2 // m.Entry.RemotePortStop
1903 size += 2 // m.Entry.LocalPortStart
1904 size += 2 // m.Entry.LocalPortStop
1907 func (m *IpsecSpdEntryAddDel) Marshal(b []byte) ([]byte, error) {
1909 b = make([]byte, m.Size())
1911 buf := codec.NewBuffer(b)
1912 buf.EncodeBool(m.IsAdd)
1913 buf.EncodeUint32(m.Entry.SpdID)
1914 buf.EncodeInt32(m.Entry.Priority)
1915 buf.EncodeBool(m.Entry.IsOutbound)
1916 buf.EncodeUint32(m.Entry.SaID)
1917 buf.EncodeUint32(uint32(m.Entry.Policy))
1918 buf.EncodeUint8(m.Entry.Protocol)
1919 buf.EncodeUint8(uint8(m.Entry.RemoteAddressStart.Af))
1920 buf.EncodeBytes(m.Entry.RemoteAddressStart.Un.XXX_UnionData[:], 16)
1921 buf.EncodeUint8(uint8(m.Entry.RemoteAddressStop.Af))
1922 buf.EncodeBytes(m.Entry.RemoteAddressStop.Un.XXX_UnionData[:], 16)
1923 buf.EncodeUint8(uint8(m.Entry.LocalAddressStart.Af))
1924 buf.EncodeBytes(m.Entry.LocalAddressStart.Un.XXX_UnionData[:], 16)
1925 buf.EncodeUint8(uint8(m.Entry.LocalAddressStop.Af))
1926 buf.EncodeBytes(m.Entry.LocalAddressStop.Un.XXX_UnionData[:], 16)
1927 buf.EncodeUint16(m.Entry.RemotePortStart)
1928 buf.EncodeUint16(m.Entry.RemotePortStop)
1929 buf.EncodeUint16(m.Entry.LocalPortStart)
1930 buf.EncodeUint16(m.Entry.LocalPortStop)
1931 return buf.Bytes(), nil
1933 func (m *IpsecSpdEntryAddDel) Unmarshal(b []byte) error {
1934 buf := codec.NewBuffer(b)
1935 m.IsAdd = buf.DecodeBool()
1936 m.Entry.SpdID = buf.DecodeUint32()
1937 m.Entry.Priority = buf.DecodeInt32()
1938 m.Entry.IsOutbound = buf.DecodeBool()
1939 m.Entry.SaID = buf.DecodeUint32()
1940 m.Entry.Policy = IpsecSpdAction(buf.DecodeUint32())
1941 m.Entry.Protocol = buf.DecodeUint8()
1942 m.Entry.RemoteAddressStart.Af = ip_types.AddressFamily(buf.DecodeUint8())
1943 copy(m.Entry.RemoteAddressStart.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1944 m.Entry.RemoteAddressStop.Af = ip_types.AddressFamily(buf.DecodeUint8())
1945 copy(m.Entry.RemoteAddressStop.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1946 m.Entry.LocalAddressStart.Af = ip_types.AddressFamily(buf.DecodeUint8())
1947 copy(m.Entry.LocalAddressStart.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1948 m.Entry.LocalAddressStop.Af = ip_types.AddressFamily(buf.DecodeUint8())
1949 copy(m.Entry.LocalAddressStop.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1950 m.Entry.RemotePortStart = buf.DecodeUint16()
1951 m.Entry.RemotePortStop = buf.DecodeUint16()
1952 m.Entry.LocalPortStart = buf.DecodeUint16()
1953 m.Entry.LocalPortStop = buf.DecodeUint16()
1957 // IpsecSpdEntryAddDelReply defines message 'ipsec_spd_entry_add_del_reply'.
1958 type IpsecSpdEntryAddDelReply struct {
1959 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1960 StatIndex uint32 `binapi:"u32,name=stat_index" json:"stat_index,omitempty"`
1963 func (m *IpsecSpdEntryAddDelReply) Reset() { *m = IpsecSpdEntryAddDelReply{} }
1964 func (*IpsecSpdEntryAddDelReply) GetMessageName() string { return "ipsec_spd_entry_add_del_reply" }
1965 func (*IpsecSpdEntryAddDelReply) GetCrcString() string { return "9ffac24b" }
1966 func (*IpsecSpdEntryAddDelReply) GetMessageType() api.MessageType {
1967 return api.ReplyMessage
1970 func (m *IpsecSpdEntryAddDelReply) Size() (size int) {
1974 size += 4 // m.Retval
1975 size += 4 // m.StatIndex
1978 func (m *IpsecSpdEntryAddDelReply) Marshal(b []byte) ([]byte, error) {
1980 b = make([]byte, m.Size())
1982 buf := codec.NewBuffer(b)
1983 buf.EncodeInt32(m.Retval)
1984 buf.EncodeUint32(m.StatIndex)
1985 return buf.Bytes(), nil
1987 func (m *IpsecSpdEntryAddDelReply) Unmarshal(b []byte) error {
1988 buf := codec.NewBuffer(b)
1989 m.Retval = buf.DecodeInt32()
1990 m.StatIndex = buf.DecodeUint32()
1994 // IpsecSpdInterfaceDetails defines message 'ipsec_spd_interface_details'.
1995 type IpsecSpdInterfaceDetails struct {
1996 SpdIndex uint32 `binapi:"u32,name=spd_index" json:"spd_index,omitempty"`
1997 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2000 func (m *IpsecSpdInterfaceDetails) Reset() { *m = IpsecSpdInterfaceDetails{} }
2001 func (*IpsecSpdInterfaceDetails) GetMessageName() string { return "ipsec_spd_interface_details" }
2002 func (*IpsecSpdInterfaceDetails) GetCrcString() string { return "7a0bcf3e" }
2003 func (*IpsecSpdInterfaceDetails) GetMessageType() api.MessageType {
2004 return api.ReplyMessage
2007 func (m *IpsecSpdInterfaceDetails) Size() (size int) {
2011 size += 4 // m.SpdIndex
2012 size += 4 // m.SwIfIndex
2015 func (m *IpsecSpdInterfaceDetails) Marshal(b []byte) ([]byte, error) {
2017 b = make([]byte, m.Size())
2019 buf := codec.NewBuffer(b)
2020 buf.EncodeUint32(m.SpdIndex)
2021 buf.EncodeUint32(uint32(m.SwIfIndex))
2022 return buf.Bytes(), nil
2024 func (m *IpsecSpdInterfaceDetails) Unmarshal(b []byte) error {
2025 buf := codec.NewBuffer(b)
2026 m.SpdIndex = buf.DecodeUint32()
2027 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2031 // IpsecSpdInterfaceDump defines message 'ipsec_spd_interface_dump'.
2032 type IpsecSpdInterfaceDump struct {
2033 SpdIndex uint32 `binapi:"u32,name=spd_index" json:"spd_index,omitempty"`
2034 SpdIndexValid uint8 `binapi:"u8,name=spd_index_valid" json:"spd_index_valid,omitempty"`
2037 func (m *IpsecSpdInterfaceDump) Reset() { *m = IpsecSpdInterfaceDump{} }
2038 func (*IpsecSpdInterfaceDump) GetMessageName() string { return "ipsec_spd_interface_dump" }
2039 func (*IpsecSpdInterfaceDump) GetCrcString() string { return "8971de19" }
2040 func (*IpsecSpdInterfaceDump) GetMessageType() api.MessageType {
2041 return api.RequestMessage
2044 func (m *IpsecSpdInterfaceDump) Size() (size int) {
2048 size += 4 // m.SpdIndex
2049 size += 1 // m.SpdIndexValid
2052 func (m *IpsecSpdInterfaceDump) Marshal(b []byte) ([]byte, error) {
2054 b = make([]byte, m.Size())
2056 buf := codec.NewBuffer(b)
2057 buf.EncodeUint32(m.SpdIndex)
2058 buf.EncodeUint8(m.SpdIndexValid)
2059 return buf.Bytes(), nil
2061 func (m *IpsecSpdInterfaceDump) Unmarshal(b []byte) error {
2062 buf := codec.NewBuffer(b)
2063 m.SpdIndex = buf.DecodeUint32()
2064 m.SpdIndexValid = buf.DecodeUint8()
2068 // IpsecSpdsDetails defines message 'ipsec_spds_details'.
2069 type IpsecSpdsDetails struct {
2070 SpdID uint32 `binapi:"u32,name=spd_id" json:"spd_id,omitempty"`
2071 Npolicies uint32 `binapi:"u32,name=npolicies" json:"npolicies,omitempty"`
2074 func (m *IpsecSpdsDetails) Reset() { *m = IpsecSpdsDetails{} }
2075 func (*IpsecSpdsDetails) GetMessageName() string { return "ipsec_spds_details" }
2076 func (*IpsecSpdsDetails) GetCrcString() string { return "a04bb254" }
2077 func (*IpsecSpdsDetails) GetMessageType() api.MessageType {
2078 return api.ReplyMessage
2081 func (m *IpsecSpdsDetails) Size() (size int) {
2085 size += 4 // m.SpdID
2086 size += 4 // m.Npolicies
2089 func (m *IpsecSpdsDetails) Marshal(b []byte) ([]byte, error) {
2091 b = make([]byte, m.Size())
2093 buf := codec.NewBuffer(b)
2094 buf.EncodeUint32(m.SpdID)
2095 buf.EncodeUint32(m.Npolicies)
2096 return buf.Bytes(), nil
2098 func (m *IpsecSpdsDetails) Unmarshal(b []byte) error {
2099 buf := codec.NewBuffer(b)
2100 m.SpdID = buf.DecodeUint32()
2101 m.Npolicies = buf.DecodeUint32()
2105 // IpsecSpdsDump defines message 'ipsec_spds_dump'.
2106 type IpsecSpdsDump struct{}
2108 func (m *IpsecSpdsDump) Reset() { *m = IpsecSpdsDump{} }
2109 func (*IpsecSpdsDump) GetMessageName() string { return "ipsec_spds_dump" }
2110 func (*IpsecSpdsDump) GetCrcString() string { return "51077d14" }
2111 func (*IpsecSpdsDump) GetMessageType() api.MessageType {
2112 return api.RequestMessage
2115 func (m *IpsecSpdsDump) Size() (size int) {
2121 func (m *IpsecSpdsDump) Marshal(b []byte) ([]byte, error) {
2123 b = make([]byte, m.Size())
2125 buf := codec.NewBuffer(b)
2126 return buf.Bytes(), nil
2128 func (m *IpsecSpdsDump) Unmarshal(b []byte) error {
2132 // IpsecTunnelProtectDel defines message 'ipsec_tunnel_protect_del'.
2133 type IpsecTunnelProtectDel struct {
2134 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2135 Nh ip_types.Address `binapi:"address,name=nh" json:"nh,omitempty"`
2138 func (m *IpsecTunnelProtectDel) Reset() { *m = IpsecTunnelProtectDel{} }
2139 func (*IpsecTunnelProtectDel) GetMessageName() string { return "ipsec_tunnel_protect_del" }
2140 func (*IpsecTunnelProtectDel) GetCrcString() string { return "cd239930" }
2141 func (*IpsecTunnelProtectDel) GetMessageType() api.MessageType {
2142 return api.RequestMessage
2145 func (m *IpsecTunnelProtectDel) Size() (size int) {
2149 size += 4 // m.SwIfIndex
2150 size += 1 // m.Nh.Af
2151 size += 1 * 16 // m.Nh.Un
2154 func (m *IpsecTunnelProtectDel) Marshal(b []byte) ([]byte, error) {
2156 b = make([]byte, m.Size())
2158 buf := codec.NewBuffer(b)
2159 buf.EncodeUint32(uint32(m.SwIfIndex))
2160 buf.EncodeUint8(uint8(m.Nh.Af))
2161 buf.EncodeBytes(m.Nh.Un.XXX_UnionData[:], 16)
2162 return buf.Bytes(), nil
2164 func (m *IpsecTunnelProtectDel) Unmarshal(b []byte) error {
2165 buf := codec.NewBuffer(b)
2166 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2167 m.Nh.Af = ip_types.AddressFamily(buf.DecodeUint8())
2168 copy(m.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2172 // IpsecTunnelProtectDelReply defines message 'ipsec_tunnel_protect_del_reply'.
2173 type IpsecTunnelProtectDelReply struct {
2174 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2177 func (m *IpsecTunnelProtectDelReply) Reset() { *m = IpsecTunnelProtectDelReply{} }
2178 func (*IpsecTunnelProtectDelReply) GetMessageName() string { return "ipsec_tunnel_protect_del_reply" }
2179 func (*IpsecTunnelProtectDelReply) GetCrcString() string { return "e8d4e804" }
2180 func (*IpsecTunnelProtectDelReply) GetMessageType() api.MessageType {
2181 return api.ReplyMessage
2184 func (m *IpsecTunnelProtectDelReply) Size() (size int) {
2188 size += 4 // m.Retval
2191 func (m *IpsecTunnelProtectDelReply) Marshal(b []byte) ([]byte, error) {
2193 b = make([]byte, m.Size())
2195 buf := codec.NewBuffer(b)
2196 buf.EncodeInt32(m.Retval)
2197 return buf.Bytes(), nil
2199 func (m *IpsecTunnelProtectDelReply) Unmarshal(b []byte) error {
2200 buf := codec.NewBuffer(b)
2201 m.Retval = buf.DecodeInt32()
2205 // IpsecTunnelProtectDetails defines message 'ipsec_tunnel_protect_details'.
2206 type IpsecTunnelProtectDetails struct {
2207 Tun IpsecTunnelProtect `binapi:"ipsec_tunnel_protect,name=tun" json:"tun,omitempty"`
2210 func (m *IpsecTunnelProtectDetails) Reset() { *m = IpsecTunnelProtectDetails{} }
2211 func (*IpsecTunnelProtectDetails) GetMessageName() string { return "ipsec_tunnel_protect_details" }
2212 func (*IpsecTunnelProtectDetails) GetCrcString() string { return "21663a50" }
2213 func (*IpsecTunnelProtectDetails) GetMessageType() api.MessageType {
2214 return api.ReplyMessage
2217 func (m *IpsecTunnelProtectDetails) Size() (size int) {
2221 size += 4 // m.Tun.SwIfIndex
2222 size += 1 // m.Tun.Nh.Af
2223 size += 1 * 16 // m.Tun.Nh.Un
2224 size += 4 // m.Tun.SaOut
2225 size += 1 // m.Tun.NSaIn
2226 size += 4 * len(m.Tun.SaIn) // m.Tun.SaIn
2229 func (m *IpsecTunnelProtectDetails) Marshal(b []byte) ([]byte, error) {
2231 b = make([]byte, m.Size())
2233 buf := codec.NewBuffer(b)
2234 buf.EncodeUint32(uint32(m.Tun.SwIfIndex))
2235 buf.EncodeUint8(uint8(m.Tun.Nh.Af))
2236 buf.EncodeBytes(m.Tun.Nh.Un.XXX_UnionData[:], 16)
2237 buf.EncodeUint32(m.Tun.SaOut)
2238 buf.EncodeUint8(uint8(len(m.Tun.SaIn)))
2239 for i := 0; i < len(m.Tun.SaIn); i++ {
2241 if i < len(m.Tun.SaIn) {
2242 x = uint32(m.Tun.SaIn[i])
2246 return buf.Bytes(), nil
2248 func (m *IpsecTunnelProtectDetails) Unmarshal(b []byte) error {
2249 buf := codec.NewBuffer(b)
2250 m.Tun.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2251 m.Tun.Nh.Af = ip_types.AddressFamily(buf.DecodeUint8())
2252 copy(m.Tun.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2253 m.Tun.SaOut = buf.DecodeUint32()
2254 m.Tun.NSaIn = buf.DecodeUint8()
2255 m.Tun.SaIn = make([]uint32, m.Tun.NSaIn)
2256 for i := 0; i < len(m.Tun.SaIn); i++ {
2257 m.Tun.SaIn[i] = buf.DecodeUint32()
2262 // IpsecTunnelProtectDump defines message 'ipsec_tunnel_protect_dump'.
2263 type IpsecTunnelProtectDump struct {
2264 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
2267 func (m *IpsecTunnelProtectDump) Reset() { *m = IpsecTunnelProtectDump{} }
2268 func (*IpsecTunnelProtectDump) GetMessageName() string { return "ipsec_tunnel_protect_dump" }
2269 func (*IpsecTunnelProtectDump) GetCrcString() string { return "f9e6675e" }
2270 func (*IpsecTunnelProtectDump) GetMessageType() api.MessageType {
2271 return api.RequestMessage
2274 func (m *IpsecTunnelProtectDump) Size() (size int) {
2278 size += 4 // m.SwIfIndex
2281 func (m *IpsecTunnelProtectDump) Marshal(b []byte) ([]byte, error) {
2283 b = make([]byte, m.Size())
2285 buf := codec.NewBuffer(b)
2286 buf.EncodeUint32(uint32(m.SwIfIndex))
2287 return buf.Bytes(), nil
2289 func (m *IpsecTunnelProtectDump) Unmarshal(b []byte) error {
2290 buf := codec.NewBuffer(b)
2291 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2295 // IpsecTunnelProtectUpdate defines message 'ipsec_tunnel_protect_update'.
2296 type IpsecTunnelProtectUpdate struct {
2297 Tunnel IpsecTunnelProtect `binapi:"ipsec_tunnel_protect,name=tunnel" json:"tunnel,omitempty"`
2300 func (m *IpsecTunnelProtectUpdate) Reset() { *m = IpsecTunnelProtectUpdate{} }
2301 func (*IpsecTunnelProtectUpdate) GetMessageName() string { return "ipsec_tunnel_protect_update" }
2302 func (*IpsecTunnelProtectUpdate) GetCrcString() string { return "30d5f133" }
2303 func (*IpsecTunnelProtectUpdate) GetMessageType() api.MessageType {
2304 return api.RequestMessage
2307 func (m *IpsecTunnelProtectUpdate) Size() (size int) {
2311 size += 4 // m.Tunnel.SwIfIndex
2312 size += 1 // m.Tunnel.Nh.Af
2313 size += 1 * 16 // m.Tunnel.Nh.Un
2314 size += 4 // m.Tunnel.SaOut
2315 size += 1 // m.Tunnel.NSaIn
2316 size += 4 * len(m.Tunnel.SaIn) // m.Tunnel.SaIn
2319 func (m *IpsecTunnelProtectUpdate) Marshal(b []byte) ([]byte, error) {
2321 b = make([]byte, m.Size())
2323 buf := codec.NewBuffer(b)
2324 buf.EncodeUint32(uint32(m.Tunnel.SwIfIndex))
2325 buf.EncodeUint8(uint8(m.Tunnel.Nh.Af))
2326 buf.EncodeBytes(m.Tunnel.Nh.Un.XXX_UnionData[:], 16)
2327 buf.EncodeUint32(m.Tunnel.SaOut)
2328 buf.EncodeUint8(uint8(len(m.Tunnel.SaIn)))
2329 for i := 0; i < len(m.Tunnel.SaIn); i++ {
2331 if i < len(m.Tunnel.SaIn) {
2332 x = uint32(m.Tunnel.SaIn[i])
2336 return buf.Bytes(), nil
2338 func (m *IpsecTunnelProtectUpdate) Unmarshal(b []byte) error {
2339 buf := codec.NewBuffer(b)
2340 m.Tunnel.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
2341 m.Tunnel.Nh.Af = ip_types.AddressFamily(buf.DecodeUint8())
2342 copy(m.Tunnel.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16))
2343 m.Tunnel.SaOut = buf.DecodeUint32()
2344 m.Tunnel.NSaIn = buf.DecodeUint8()
2345 m.Tunnel.SaIn = make([]uint32, m.Tunnel.NSaIn)
2346 for i := 0; i < len(m.Tunnel.SaIn); i++ {
2347 m.Tunnel.SaIn[i] = buf.DecodeUint32()
2352 // IpsecTunnelProtectUpdateReply defines message 'ipsec_tunnel_protect_update_reply'.
2353 type IpsecTunnelProtectUpdateReply struct {
2354 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
2357 func (m *IpsecTunnelProtectUpdateReply) Reset() { *m = IpsecTunnelProtectUpdateReply{} }
2358 func (*IpsecTunnelProtectUpdateReply) GetMessageName() string {
2359 return "ipsec_tunnel_protect_update_reply"
2361 func (*IpsecTunnelProtectUpdateReply) GetCrcString() string { return "e8d4e804" }
2362 func (*IpsecTunnelProtectUpdateReply) GetMessageType() api.MessageType {
2363 return api.ReplyMessage
2366 func (m *IpsecTunnelProtectUpdateReply) Size() (size int) {
2370 size += 4 // m.Retval
2373 func (m *IpsecTunnelProtectUpdateReply) Marshal(b []byte) ([]byte, error) {
2375 b = make([]byte, m.Size())
2377 buf := codec.NewBuffer(b)
2378 buf.EncodeInt32(m.Retval)
2379 return buf.Bytes(), nil
2381 func (m *IpsecTunnelProtectUpdateReply) Unmarshal(b []byte) error {
2382 buf := codec.NewBuffer(b)
2383 m.Retval = buf.DecodeInt32()
2387 func init() { file_ipsec_binapi_init() }
2388 func file_ipsec_binapi_init() {
2389 api.RegisterMessage((*IpsecBackendDetails)(nil), "ipsec_backend_details_ee601c29")
2390 api.RegisterMessage((*IpsecBackendDump)(nil), "ipsec_backend_dump_51077d14")
2391 api.RegisterMessage((*IpsecInterfaceAddDelSpd)(nil), "ipsec_interface_add_del_spd_80f80cbb")
2392 api.RegisterMessage((*IpsecInterfaceAddDelSpdReply)(nil), "ipsec_interface_add_del_spd_reply_e8d4e804")
2393 api.RegisterMessage((*IpsecItfCreate)(nil), "ipsec_itf_create_6f50b3bc")
2394 api.RegisterMessage((*IpsecItfCreateReply)(nil), "ipsec_itf_create_reply_5383d31f")
2395 api.RegisterMessage((*IpsecItfDelete)(nil), "ipsec_itf_delete_f9e6675e")
2396 api.RegisterMessage((*IpsecItfDeleteReply)(nil), "ipsec_itf_delete_reply_e8d4e804")
2397 api.RegisterMessage((*IpsecItfDetails)(nil), "ipsec_itf_details_548a73b8")
2398 api.RegisterMessage((*IpsecItfDump)(nil), "ipsec_itf_dump_f9e6675e")
2399 api.RegisterMessage((*IpsecSaDetails)(nil), "ipsec_sa_details_345d14a7")
2400 api.RegisterMessage((*IpsecSaDump)(nil), "ipsec_sa_dump_2076c2f4")
2401 api.RegisterMessage((*IpsecSaV2Details)(nil), "ipsec_sa_v2_details_e2130051")
2402 api.RegisterMessage((*IpsecSaV2Dump)(nil), "ipsec_sa_v2_dump_2076c2f4")
2403 api.RegisterMessage((*IpsecSaV3Details)(nil), "ipsec_sa_v3_details_2fc991ee")
2404 api.RegisterMessage((*IpsecSaV3Dump)(nil), "ipsec_sa_v3_dump_2076c2f4")
2405 api.RegisterMessage((*IpsecSadEntryAdd)(nil), "ipsec_sad_entry_add_50229353")
2406 api.RegisterMessage((*IpsecSadEntryAddDel)(nil), "ipsec_sad_entry_add_del_ab64b5c6")
2407 api.RegisterMessage((*IpsecSadEntryAddDelReply)(nil), "ipsec_sad_entry_add_del_reply_9ffac24b")
2408 api.RegisterMessage((*IpsecSadEntryAddDelV2)(nil), "ipsec_sad_entry_add_del_v2_aca78b27")
2409 api.RegisterMessage((*IpsecSadEntryAddDelV2Reply)(nil), "ipsec_sad_entry_add_del_v2_reply_9ffac24b")
2410 api.RegisterMessage((*IpsecSadEntryAddDelV3)(nil), "ipsec_sad_entry_add_del_v3_c77ebd92")
2411 api.RegisterMessage((*IpsecSadEntryAddDelV3Reply)(nil), "ipsec_sad_entry_add_del_v3_reply_9ffac24b")
2412 api.RegisterMessage((*IpsecSadEntryAddReply)(nil), "ipsec_sad_entry_add_reply_9ffac24b")
2413 api.RegisterMessage((*IpsecSadEntryDel)(nil), "ipsec_sad_entry_del_3a91bde5")
2414 api.RegisterMessage((*IpsecSadEntryDelReply)(nil), "ipsec_sad_entry_del_reply_e8d4e804")
2415 api.RegisterMessage((*IpsecSelectBackend)(nil), "ipsec_select_backend_5bcfd3b7")
2416 api.RegisterMessage((*IpsecSelectBackendReply)(nil), "ipsec_select_backend_reply_e8d4e804")
2417 api.RegisterMessage((*IpsecSetAsyncMode)(nil), "ipsec_set_async_mode_a6465f7c")
2418 api.RegisterMessage((*IpsecSetAsyncModeReply)(nil), "ipsec_set_async_mode_reply_e8d4e804")
2419 api.RegisterMessage((*IpsecSpdAddDel)(nil), "ipsec_spd_add_del_20e89a95")
2420 api.RegisterMessage((*IpsecSpdAddDelReply)(nil), "ipsec_spd_add_del_reply_e8d4e804")
2421 api.RegisterMessage((*IpsecSpdDetails)(nil), "ipsec_spd_details_5813d7a2")
2422 api.RegisterMessage((*IpsecSpdDump)(nil), "ipsec_spd_dump_afefbf7d")
2423 api.RegisterMessage((*IpsecSpdEntryAddDel)(nil), "ipsec_spd_entry_add_del_338b7411")
2424 api.RegisterMessage((*IpsecSpdEntryAddDelReply)(nil), "ipsec_spd_entry_add_del_reply_9ffac24b")
2425 api.RegisterMessage((*IpsecSpdInterfaceDetails)(nil), "ipsec_spd_interface_details_7a0bcf3e")
2426 api.RegisterMessage((*IpsecSpdInterfaceDump)(nil), "ipsec_spd_interface_dump_8971de19")
2427 api.RegisterMessage((*IpsecSpdsDetails)(nil), "ipsec_spds_details_a04bb254")
2428 api.RegisterMessage((*IpsecSpdsDump)(nil), "ipsec_spds_dump_51077d14")
2429 api.RegisterMessage((*IpsecTunnelProtectDel)(nil), "ipsec_tunnel_protect_del_cd239930")
2430 api.RegisterMessage((*IpsecTunnelProtectDelReply)(nil), "ipsec_tunnel_protect_del_reply_e8d4e804")
2431 api.RegisterMessage((*IpsecTunnelProtectDetails)(nil), "ipsec_tunnel_protect_details_21663a50")
2432 api.RegisterMessage((*IpsecTunnelProtectDump)(nil), "ipsec_tunnel_protect_dump_f9e6675e")
2433 api.RegisterMessage((*IpsecTunnelProtectUpdate)(nil), "ipsec_tunnel_protect_update_30d5f133")
2434 api.RegisterMessage((*IpsecTunnelProtectUpdateReply)(nil), "ipsec_tunnel_protect_update_reply_e8d4e804")
2437 // Messages returns list of all messages in this module.
2438 func AllMessages() []api.Message {
2439 return []api.Message{
2440 (*IpsecBackendDetails)(nil),
2441 (*IpsecBackendDump)(nil),
2442 (*IpsecInterfaceAddDelSpd)(nil),
2443 (*IpsecInterfaceAddDelSpdReply)(nil),
2444 (*IpsecItfCreate)(nil),
2445 (*IpsecItfCreateReply)(nil),
2446 (*IpsecItfDelete)(nil),
2447 (*IpsecItfDeleteReply)(nil),
2448 (*IpsecItfDetails)(nil),
2449 (*IpsecItfDump)(nil),
2450 (*IpsecSaDetails)(nil),
2451 (*IpsecSaDump)(nil),
2452 (*IpsecSaV2Details)(nil),
2453 (*IpsecSaV2Dump)(nil),
2454 (*IpsecSaV3Details)(nil),
2455 (*IpsecSaV3Dump)(nil),
2456 (*IpsecSadEntryAdd)(nil),
2457 (*IpsecSadEntryAddDel)(nil),
2458 (*IpsecSadEntryAddDelReply)(nil),
2459 (*IpsecSadEntryAddDelV2)(nil),
2460 (*IpsecSadEntryAddDelV2Reply)(nil),
2461 (*IpsecSadEntryAddDelV3)(nil),
2462 (*IpsecSadEntryAddDelV3Reply)(nil),
2463 (*IpsecSadEntryAddReply)(nil),
2464 (*IpsecSadEntryDel)(nil),
2465 (*IpsecSadEntryDelReply)(nil),
2466 (*IpsecSelectBackend)(nil),
2467 (*IpsecSelectBackendReply)(nil),
2468 (*IpsecSetAsyncMode)(nil),
2469 (*IpsecSetAsyncModeReply)(nil),
2470 (*IpsecSpdAddDel)(nil),
2471 (*IpsecSpdAddDelReply)(nil),
2472 (*IpsecSpdDetails)(nil),
2473 (*IpsecSpdDump)(nil),
2474 (*IpsecSpdEntryAddDel)(nil),
2475 (*IpsecSpdEntryAddDelReply)(nil),
2476 (*IpsecSpdInterfaceDetails)(nil),
2477 (*IpsecSpdInterfaceDump)(nil),
2478 (*IpsecSpdsDetails)(nil),
2479 (*IpsecSpdsDump)(nil),
2480 (*IpsecTunnelProtectDel)(nil),
2481 (*IpsecTunnelProtectDelReply)(nil),
2482 (*IpsecTunnelProtectDetails)(nil),
2483 (*IpsecTunnelProtectDump)(nil),
2484 (*IpsecTunnelProtectUpdate)(nil),
2485 (*IpsecTunnelProtectUpdateReply)(nil),