summaryrefslogtreecommitdiffstats
path: root/binapi/ipsec/ipsec.ba.go
diff options
context:
space:
mode:
Diffstat (limited to 'binapi/ipsec/ipsec.ba.go')
-rw-r--r--binapi/ipsec/ipsec.ba.go226
1 files changed, 222 insertions, 4 deletions
diff --git a/binapi/ipsec/ipsec.ba.go b/binapi/ipsec/ipsec.ba.go
index 352ee3c..1ef8e6c 100644
--- a/binapi/ipsec/ipsec.ba.go
+++ b/binapi/ipsec/ipsec.ba.go
@@ -1,7 +1,7 @@
// Code generated by GoVPP's binapi-generator. DO NOT EDIT.
// versions:
// binapi-generator: v0.5.0-dev
-// VPP: 21.06-release
+// VPP: 22.02-release
// source: /usr/share/vpp/api/core/ipsec.api.json
// Package ipsec contains generated bindings for API file ipsec.api.
@@ -9,7 +9,7 @@
// Contents:
// 1 enum
// 3 structs
-// 42 messages
+// 46 messages
//
package ipsec
@@ -32,8 +32,8 @@ const _ = api.GoVppAPIPackageIsVersion2
const (
APIFile = "ipsec"
- APIVersion = "5.0.1"
- VersionCrc = 0x196d64b0
+ APIVersion = "5.0.2"
+ VersionCrc = 0x6b08e91e
)
// IpsecSpdAction defines enum 'ipsec_spd_action'.
@@ -919,6 +919,113 @@ func (m *IpsecSaV3Dump) Unmarshal(b []byte) error {
return nil
}
+// IpsecSadEntryAdd defines message 'ipsec_sad_entry_add'.
+type IpsecSadEntryAdd struct {
+ Entry ipsec_types.IpsecSadEntryV3 `binapi:"ipsec_sad_entry_v3,name=entry" json:"entry,omitempty"`
+}
+
+func (m *IpsecSadEntryAdd) Reset() { *m = IpsecSadEntryAdd{} }
+func (*IpsecSadEntryAdd) GetMessageName() string { return "ipsec_sad_entry_add" }
+func (*IpsecSadEntryAdd) GetCrcString() string { return "50229353" }
+func (*IpsecSadEntryAdd) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *IpsecSadEntryAdd) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Entry.SadID
+ size += 4 // m.Entry.Spi
+ size += 4 // m.Entry.Protocol
+ size += 4 // m.Entry.CryptoAlgorithm
+ size += 1 // m.Entry.CryptoKey.Length
+ size += 1 * 128 // m.Entry.CryptoKey.Data
+ size += 4 // m.Entry.IntegrityAlgorithm
+ size += 1 // m.Entry.IntegrityKey.Length
+ size += 1 * 128 // m.Entry.IntegrityKey.Data
+ size += 4 // m.Entry.Flags
+ size += 4 // m.Entry.Tunnel.Instance
+ size += 1 // m.Entry.Tunnel.Src.Af
+ size += 1 * 16 // m.Entry.Tunnel.Src.Un
+ size += 1 // m.Entry.Tunnel.Dst.Af
+ size += 1 * 16 // m.Entry.Tunnel.Dst.Un
+ size += 4 // m.Entry.Tunnel.SwIfIndex
+ size += 4 // m.Entry.Tunnel.TableID
+ size += 1 // m.Entry.Tunnel.EncapDecapFlags
+ size += 1 // m.Entry.Tunnel.Mode
+ size += 1 // m.Entry.Tunnel.Flags
+ size += 1 // m.Entry.Tunnel.Dscp
+ size += 1 // m.Entry.Tunnel.HopLimit
+ size += 4 // m.Entry.Salt
+ size += 2 // m.Entry.UDPSrcPort
+ size += 2 // m.Entry.UDPDstPort
+ return size
+}
+func (m *IpsecSadEntryAdd) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.Entry.SadID)
+ buf.EncodeUint32(m.Entry.Spi)
+ buf.EncodeUint32(uint32(m.Entry.Protocol))
+ buf.EncodeUint32(uint32(m.Entry.CryptoAlgorithm))
+ buf.EncodeUint8(m.Entry.CryptoKey.Length)
+ buf.EncodeBytes(m.Entry.CryptoKey.Data, 128)
+ buf.EncodeUint32(uint32(m.Entry.IntegrityAlgorithm))
+ buf.EncodeUint8(m.Entry.IntegrityKey.Length)
+ buf.EncodeBytes(m.Entry.IntegrityKey.Data, 128)
+ buf.EncodeUint32(uint32(m.Entry.Flags))
+ buf.EncodeUint32(m.Entry.Tunnel.Instance)
+ buf.EncodeUint8(uint8(m.Entry.Tunnel.Src.Af))
+ buf.EncodeBytes(m.Entry.Tunnel.Src.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint8(uint8(m.Entry.Tunnel.Dst.Af))
+ buf.EncodeBytes(m.Entry.Tunnel.Dst.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint32(uint32(m.Entry.Tunnel.SwIfIndex))
+ buf.EncodeUint32(m.Entry.Tunnel.TableID)
+ buf.EncodeUint8(uint8(m.Entry.Tunnel.EncapDecapFlags))
+ buf.EncodeUint8(uint8(m.Entry.Tunnel.Mode))
+ buf.EncodeUint8(uint8(m.Entry.Tunnel.Flags))
+ buf.EncodeUint8(uint8(m.Entry.Tunnel.Dscp))
+ buf.EncodeUint8(m.Entry.Tunnel.HopLimit)
+ buf.EncodeUint32(m.Entry.Salt)
+ buf.EncodeUint16(m.Entry.UDPSrcPort)
+ buf.EncodeUint16(m.Entry.UDPDstPort)
+ return buf.Bytes(), nil
+}
+func (m *IpsecSadEntryAdd) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Entry.SadID = buf.DecodeUint32()
+ m.Entry.Spi = buf.DecodeUint32()
+ m.Entry.Protocol = ipsec_types.IpsecProto(buf.DecodeUint32())
+ m.Entry.CryptoAlgorithm = ipsec_types.IpsecCryptoAlg(buf.DecodeUint32())
+ m.Entry.CryptoKey.Length = buf.DecodeUint8()
+ m.Entry.CryptoKey.Data = make([]byte, 128)
+ copy(m.Entry.CryptoKey.Data, buf.DecodeBytes(len(m.Entry.CryptoKey.Data)))
+ m.Entry.IntegrityAlgorithm = ipsec_types.IpsecIntegAlg(buf.DecodeUint32())
+ m.Entry.IntegrityKey.Length = buf.DecodeUint8()
+ m.Entry.IntegrityKey.Data = make([]byte, 128)
+ copy(m.Entry.IntegrityKey.Data, buf.DecodeBytes(len(m.Entry.IntegrityKey.Data)))
+ m.Entry.Flags = ipsec_types.IpsecSadFlags(buf.DecodeUint32())
+ m.Entry.Tunnel.Instance = buf.DecodeUint32()
+ m.Entry.Tunnel.Src.Af = ip_types.AddressFamily(buf.DecodeUint8())
+ copy(m.Entry.Tunnel.Src.Un.XXX_UnionData[:], buf.DecodeBytes(16))
+ m.Entry.Tunnel.Dst.Af = ip_types.AddressFamily(buf.DecodeUint8())
+ copy(m.Entry.Tunnel.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
+ m.Entry.Tunnel.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ m.Entry.Tunnel.TableID = buf.DecodeUint32()
+ m.Entry.Tunnel.EncapDecapFlags = tunnel_types.TunnelEncapDecapFlags(buf.DecodeUint8())
+ m.Entry.Tunnel.Mode = tunnel_types.TunnelMode(buf.DecodeUint8())
+ m.Entry.Tunnel.Flags = tunnel_types.TunnelFlags(buf.DecodeUint8())
+ m.Entry.Tunnel.Dscp = ip_types.IPDscp(buf.DecodeUint8())
+ m.Entry.Tunnel.HopLimit = buf.DecodeUint8()
+ m.Entry.Salt = buf.DecodeUint32()
+ m.Entry.UDPSrcPort = buf.DecodeUint16()
+ m.Entry.UDPDstPort = buf.DecodeUint16()
+ return nil
+}
+
// IpsecSadEntryAddDel defines message 'ipsec_sad_entry_add_del'.
// Deprecated: the message will be removed in the future versions
type IpsecSadEntryAddDel struct {
@@ -1329,6 +1436,109 @@ func (m *IpsecSadEntryAddDelV3Reply) Unmarshal(b []byte) error {
return nil
}
+// IpsecSadEntryAddReply defines message 'ipsec_sad_entry_add_reply'.
+type IpsecSadEntryAddReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ StatIndex uint32 `binapi:"u32,name=stat_index" json:"stat_index,omitempty"`
+}
+
+func (m *IpsecSadEntryAddReply) Reset() { *m = IpsecSadEntryAddReply{} }
+func (*IpsecSadEntryAddReply) GetMessageName() string { return "ipsec_sad_entry_add_reply" }
+func (*IpsecSadEntryAddReply) GetCrcString() string { return "9ffac24b" }
+func (*IpsecSadEntryAddReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *IpsecSadEntryAddReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ size += 4 // m.StatIndex
+ return size
+}
+func (m *IpsecSadEntryAddReply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint32(m.StatIndex)
+ return buf.Bytes(), nil
+}
+func (m *IpsecSadEntryAddReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ m.StatIndex = buf.DecodeUint32()
+ return nil
+}
+
+// IpsecSadEntryDel defines message 'ipsec_sad_entry_del'.
+type IpsecSadEntryDel struct {
+ ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
+}
+
+func (m *IpsecSadEntryDel) Reset() { *m = IpsecSadEntryDel{} }
+func (*IpsecSadEntryDel) GetMessageName() string { return "ipsec_sad_entry_del" }
+func (*IpsecSadEntryDel) GetCrcString() string { return "3a91bde5" }
+func (*IpsecSadEntryDel) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *IpsecSadEntryDel) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.ID
+ return size
+}
+func (m *IpsecSadEntryDel) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.ID)
+ return buf.Bytes(), nil
+}
+func (m *IpsecSadEntryDel) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.ID = buf.DecodeUint32()
+ return nil
+}
+
+// IpsecSadEntryDelReply defines message 'ipsec_sad_entry_del_reply'.
+type IpsecSadEntryDelReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+}
+
+func (m *IpsecSadEntryDelReply) Reset() { *m = IpsecSadEntryDelReply{} }
+func (*IpsecSadEntryDelReply) GetMessageName() string { return "ipsec_sad_entry_del_reply" }
+func (*IpsecSadEntryDelReply) GetCrcString() string { return "e8d4e804" }
+func (*IpsecSadEntryDelReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *IpsecSadEntryDelReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ return size
+}
+func (m *IpsecSadEntryDelReply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ return buf.Bytes(), nil
+}
+func (m *IpsecSadEntryDelReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ return nil
+}
+
// IpsecSelectBackend defines message 'ipsec_select_backend'.
type IpsecSelectBackend struct {
Protocol ipsec_types.IpsecProto `binapi:"ipsec_proto,name=protocol" json:"protocol,omitempty"`
@@ -2192,12 +2402,16 @@ func file_ipsec_binapi_init() {
api.RegisterMessage((*IpsecSaV2Dump)(nil), "ipsec_sa_v2_dump_2076c2f4")
api.RegisterMessage((*IpsecSaV3Details)(nil), "ipsec_sa_v3_details_2fc991ee")
api.RegisterMessage((*IpsecSaV3Dump)(nil), "ipsec_sa_v3_dump_2076c2f4")
+ api.RegisterMessage((*IpsecSadEntryAdd)(nil), "ipsec_sad_entry_add_50229353")
api.RegisterMessage((*IpsecSadEntryAddDel)(nil), "ipsec_sad_entry_add_del_ab64b5c6")
api.RegisterMessage((*IpsecSadEntryAddDelReply)(nil), "ipsec_sad_entry_add_del_reply_9ffac24b")
api.RegisterMessage((*IpsecSadEntryAddDelV2)(nil), "ipsec_sad_entry_add_del_v2_aca78b27")
api.RegisterMessage((*IpsecSadEntryAddDelV2Reply)(nil), "ipsec_sad_entry_add_del_v2_reply_9ffac24b")
api.RegisterMessage((*IpsecSadEntryAddDelV3)(nil), "ipsec_sad_entry_add_del_v3_c77ebd92")
api.RegisterMessage((*IpsecSadEntryAddDelV3Reply)(nil), "ipsec_sad_entry_add_del_v3_reply_9ffac24b")
+ api.RegisterMessage((*IpsecSadEntryAddReply)(nil), "ipsec_sad_entry_add_reply_9ffac24b")
+ api.RegisterMessage((*IpsecSadEntryDel)(nil), "ipsec_sad_entry_del_3a91bde5")
+ api.RegisterMessage((*IpsecSadEntryDelReply)(nil), "ipsec_sad_entry_del_reply_e8d4e804")
api.RegisterMessage((*IpsecSelectBackend)(nil), "ipsec_select_backend_5bcfd3b7")
api.RegisterMessage((*IpsecSelectBackendReply)(nil), "ipsec_select_backend_reply_e8d4e804")
api.RegisterMessage((*IpsecSetAsyncMode)(nil), "ipsec_set_async_mode_a6465f7c")
@@ -2239,12 +2453,16 @@ func AllMessages() []api.Message {
(*IpsecSaV2Dump)(nil),
(*IpsecSaV3Details)(nil),
(*IpsecSaV3Dump)(nil),
+ (*IpsecSadEntryAdd)(nil),
(*IpsecSadEntryAddDel)(nil),
(*IpsecSadEntryAddDelReply)(nil),
(*IpsecSadEntryAddDelV2)(nil),
(*IpsecSadEntryAddDelV2Reply)(nil),
(*IpsecSadEntryAddDelV3)(nil),
(*IpsecSadEntryAddDelV3Reply)(nil),
+ (*IpsecSadEntryAddReply)(nil),
+ (*IpsecSadEntryDel)(nil),
+ (*IpsecSadEntryDelReply)(nil),
(*IpsecSelectBackend)(nil),
(*IpsecSelectBackendReply)(nil),
(*IpsecSetAsyncMode)(nil),