+func (m *IpsecInterfaceAddDelSpdReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ return size
+}
+func (m *IpsecInterfaceAddDelSpdReply) 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 *IpsecInterfaceAddDelSpdReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ return nil
+}
+
+// IpsecItfCreate defines message 'ipsec_itf_create'.
+type IpsecItfCreate struct {
+ Itf IpsecItf `binapi:"ipsec_itf,name=itf" json:"itf,omitempty"`
+}
+
+func (m *IpsecItfCreate) Reset() { *m = IpsecItfCreate{} }
+func (*IpsecItfCreate) GetMessageName() string { return "ipsec_itf_create" }
+func (*IpsecItfCreate) GetCrcString() string { return "6f50b3bc" }
+func (*IpsecItfCreate) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *IpsecItfCreate) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Itf.UserInstance
+ size += 1 // m.Itf.Mode
+ size += 4 // m.Itf.SwIfIndex
+ return size
+}
+func (m *IpsecItfCreate) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.Itf.UserInstance)
+ buf.EncodeUint8(uint8(m.Itf.Mode))
+ buf.EncodeUint32(uint32(m.Itf.SwIfIndex))
+ return buf.Bytes(), nil
+}
+func (m *IpsecItfCreate) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Itf.UserInstance = buf.DecodeUint32()
+ m.Itf.Mode = tunnel_types.TunnelMode(buf.DecodeUint8())
+ m.Itf.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ return nil
+}
+
+// IpsecItfCreateReply defines message 'ipsec_itf_create_reply'.
+type IpsecItfCreateReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+}
+
+func (m *IpsecItfCreateReply) Reset() { *m = IpsecItfCreateReply{} }
+func (*IpsecItfCreateReply) GetMessageName() string { return "ipsec_itf_create_reply" }
+func (*IpsecItfCreateReply) GetCrcString() string { return "5383d31f" }
+func (*IpsecItfCreateReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *IpsecItfCreateReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ size += 4 // m.SwIfIndex
+ return size
+}
+func (m *IpsecItfCreateReply) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeInt32(m.Retval)
+ buf.EncodeUint32(uint32(m.SwIfIndex))
+ return buf.Bytes(), nil
+}
+func (m *IpsecItfCreateReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ return nil
+}
+
+// IpsecItfDelete defines message 'ipsec_itf_delete'.
+type IpsecItfDelete struct {
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+}
+
+func (m *IpsecItfDelete) Reset() { *m = IpsecItfDelete{} }
+func (*IpsecItfDelete) GetMessageName() string { return "ipsec_itf_delete" }
+func (*IpsecItfDelete) GetCrcString() string { return "f9e6675e" }
+func (*IpsecItfDelete) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *IpsecItfDelete) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.SwIfIndex
+ return size
+}
+func (m *IpsecItfDelete) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(uint32(m.SwIfIndex))
+ return buf.Bytes(), nil
+}
+func (m *IpsecItfDelete) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ return nil
+}
+
+// IpsecItfDeleteReply defines message 'ipsec_itf_delete_reply'.
+type IpsecItfDeleteReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+}
+
+func (m *IpsecItfDeleteReply) Reset() { *m = IpsecItfDeleteReply{} }
+func (*IpsecItfDeleteReply) GetMessageName() string { return "ipsec_itf_delete_reply" }
+func (*IpsecItfDeleteReply) GetCrcString() string { return "e8d4e804" }
+func (*IpsecItfDeleteReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *IpsecItfDeleteReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ return size
+}
+func (m *IpsecItfDeleteReply) 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 *IpsecItfDeleteReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ return nil
+}
+
+// IpsecItfDetails defines message 'ipsec_itf_details'.
+type IpsecItfDetails struct {
+ Itf IpsecItf `binapi:"ipsec_itf,name=itf" json:"itf,omitempty"`
+}
+
+func (m *IpsecItfDetails) Reset() { *m = IpsecItfDetails{} }
+func (*IpsecItfDetails) GetMessageName() string { return "ipsec_itf_details" }
+func (*IpsecItfDetails) GetCrcString() string { return "548a73b8" }
+func (*IpsecItfDetails) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *IpsecItfDetails) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Itf.UserInstance
+ size += 1 // m.Itf.Mode
+ size += 4 // m.Itf.SwIfIndex
+ return size
+}
+func (m *IpsecItfDetails) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.Itf.UserInstance)
+ buf.EncodeUint8(uint8(m.Itf.Mode))
+ buf.EncodeUint32(uint32(m.Itf.SwIfIndex))
+ return buf.Bytes(), nil
+}
+func (m *IpsecItfDetails) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Itf.UserInstance = buf.DecodeUint32()
+ m.Itf.Mode = tunnel_types.TunnelMode(buf.DecodeUint8())
+ m.Itf.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ return nil
+}
+
+// IpsecItfDump defines message 'ipsec_itf_dump'.
+type IpsecItfDump struct {
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+}
+
+func (m *IpsecItfDump) Reset() { *m = IpsecItfDump{} }
+func (*IpsecItfDump) GetMessageName() string { return "ipsec_itf_dump" }
+func (*IpsecItfDump) GetCrcString() string { return "f9e6675e" }
+func (*IpsecItfDump) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *IpsecItfDump) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.SwIfIndex
+ return size
+}
+func (m *IpsecItfDump) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(uint32(m.SwIfIndex))
+ return buf.Bytes(), nil
+}
+func (m *IpsecItfDump) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ return nil
+}
+
+// IpsecSaDetails defines message 'ipsec_sa_details'.
+// Deprecated: the message will be removed in the future versions
+type IpsecSaDetails struct {
+ Entry ipsec_types.IpsecSadEntry `binapi:"ipsec_sad_entry,name=entry" json:"entry,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ Salt uint32 `binapi:"u32,name=salt" json:"salt,omitempty"`
+ SeqOutbound uint64 `binapi:"u64,name=seq_outbound" json:"seq_outbound,omitempty"`
+ LastSeqInbound uint64 `binapi:"u64,name=last_seq_inbound" json:"last_seq_inbound,omitempty"`
+ ReplayWindow uint64 `binapi:"u64,name=replay_window" json:"replay_window,omitempty"`
+ StatIndex uint32 `binapi:"u32,name=stat_index" json:"stat_index,omitempty"`
+}
+
+func (m *IpsecSaDetails) Reset() { *m = IpsecSaDetails{} }
+func (*IpsecSaDetails) GetMessageName() string { return "ipsec_sa_details" }
+func (*IpsecSaDetails) GetCrcString() string { return "345d14a7" }
+func (*IpsecSaDetails) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *IpsecSaDetails) 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 += 1 // m.Entry.TunnelSrc.Af
+ size += 1 * 16 // m.Entry.TunnelSrc.Un
+ size += 1 // m.Entry.TunnelDst.Af
+ size += 1 * 16 // m.Entry.TunnelDst.Un
+ size += 4 // m.Entry.TxTableID
+ size += 4 // m.Entry.Salt
+ size += 2 // m.Entry.UDPSrcPort
+ size += 2 // m.Entry.UDPDstPort
+ size += 4 // m.SwIfIndex
+ size += 4 // m.Salt
+ size += 8 // m.SeqOutbound
+ size += 8 // m.LastSeqInbound
+ size += 8 // m.ReplayWindow
+ size += 4 // m.StatIndex
+ return size
+}
+func (m *IpsecSaDetails) 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.EncodeUint8(uint8(m.Entry.TunnelSrc.Af))
+ buf.EncodeBytes(m.Entry.TunnelSrc.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint8(uint8(m.Entry.TunnelDst.Af))
+ buf.EncodeBytes(m.Entry.TunnelDst.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint32(m.Entry.TxTableID)
+ buf.EncodeUint32(m.Entry.Salt)
+ buf.EncodeUint16(m.Entry.UDPSrcPort)
+ buf.EncodeUint16(m.Entry.UDPDstPort)
+ buf.EncodeUint32(uint32(m.SwIfIndex))
+ buf.EncodeUint32(m.Salt)
+ buf.EncodeUint64(m.SeqOutbound)
+ buf.EncodeUint64(m.LastSeqInbound)
+ buf.EncodeUint64(m.ReplayWindow)
+ buf.EncodeUint32(m.StatIndex)
+ return buf.Bytes(), nil
+}
+func (m *IpsecSaDetails) 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.TunnelSrc.Af = ip_types.AddressFamily(buf.DecodeUint8())
+ copy(m.Entry.TunnelSrc.Un.XXX_UnionData[:], buf.DecodeBytes(16))
+ m.Entry.TunnelDst.Af = ip_types.AddressFamily(buf.DecodeUint8())
+ copy(m.Entry.TunnelDst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
+ m.Entry.TxTableID = buf.DecodeUint32()
+ m.Entry.Salt = buf.DecodeUint32()
+ m.Entry.UDPSrcPort = buf.DecodeUint16()
+ m.Entry.UDPDstPort = buf.DecodeUint16()
+ m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ m.Salt = buf.DecodeUint32()
+ m.SeqOutbound = buf.DecodeUint64()
+ m.LastSeqInbound = buf.DecodeUint64()
+ m.ReplayWindow = buf.DecodeUint64()
+ m.StatIndex = buf.DecodeUint32()
+ return nil
+}
+
+// IpsecSaDump defines message 'ipsec_sa_dump'.
+// Deprecated: the message will be removed in the future versions
+type IpsecSaDump struct {
+ SaID uint32 `binapi:"u32,name=sa_id" json:"sa_id,omitempty"`
+}
+
+func (m *IpsecSaDump) Reset() { *m = IpsecSaDump{} }
+func (*IpsecSaDump) GetMessageName() string { return "ipsec_sa_dump" }
+func (*IpsecSaDump) GetCrcString() string { return "2076c2f4" }
+func (*IpsecSaDump) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *IpsecSaDump) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.SaID
+ return size
+}
+func (m *IpsecSaDump) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.SaID)
+ return buf.Bytes(), nil
+}
+func (m *IpsecSaDump) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.SaID = buf.DecodeUint32()
+ return nil
+}
+
+// IpsecSaV2Details defines message 'ipsec_sa_v2_details'.
+type IpsecSaV2Details struct {
+ Entry ipsec_types.IpsecSadEntryV2 `binapi:"ipsec_sad_entry_v2,name=entry" json:"entry,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ Salt uint32 `binapi:"u32,name=salt" json:"salt,omitempty"`
+ SeqOutbound uint64 `binapi:"u64,name=seq_outbound" json:"seq_outbound,omitempty"`
+ LastSeqInbound uint64 `binapi:"u64,name=last_seq_inbound" json:"last_seq_inbound,omitempty"`
+ ReplayWindow uint64 `binapi:"u64,name=replay_window" json:"replay_window,omitempty"`
+ StatIndex uint32 `binapi:"u32,name=stat_index" json:"stat_index,omitempty"`
+}
+
+func (m *IpsecSaV2Details) Reset() { *m = IpsecSaV2Details{} }
+func (*IpsecSaV2Details) GetMessageName() string { return "ipsec_sa_v2_details" }
+func (*IpsecSaV2Details) GetCrcString() string { return "e2130051" }
+func (*IpsecSaV2Details) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *IpsecSaV2Details) 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 += 1 // m.Entry.TunnelSrc.Af
+ size += 1 * 16 // m.Entry.TunnelSrc.Un
+ size += 1 // m.Entry.TunnelDst.Af
+ size += 1 * 16 // m.Entry.TunnelDst.Un
+ size += 1 // m.Entry.TunnelFlags
+ size += 1 // m.Entry.Dscp
+ size += 4 // m.Entry.TxTableID
+ size += 4 // m.Entry.Salt
+ size += 2 // m.Entry.UDPSrcPort
+ size += 2 // m.Entry.UDPDstPort
+ size += 4 // m.SwIfIndex
+ size += 4 // m.Salt
+ size += 8 // m.SeqOutbound
+ size += 8 // m.LastSeqInbound
+ size += 8 // m.ReplayWindow
+ size += 4 // m.StatIndex
+ return size
+}
+func (m *IpsecSaV2Details) 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.EncodeUint8(uint8(m.Entry.TunnelSrc.Af))
+ buf.EncodeBytes(m.Entry.TunnelSrc.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint8(uint8(m.Entry.TunnelDst.Af))
+ buf.EncodeBytes(m.Entry.TunnelDst.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint8(uint8(m.Entry.TunnelFlags))
+ buf.EncodeUint8(uint8(m.Entry.Dscp))
+ buf.EncodeUint32(m.Entry.TxTableID)
+ buf.EncodeUint32(m.Entry.Salt)
+ buf.EncodeUint16(m.Entry.UDPSrcPort)
+ buf.EncodeUint16(m.Entry.UDPDstPort)
+ buf.EncodeUint32(uint32(m.SwIfIndex))
+ buf.EncodeUint32(m.Salt)
+ buf.EncodeUint64(m.SeqOutbound)
+ buf.EncodeUint64(m.LastSeqInbound)
+ buf.EncodeUint64(m.ReplayWindow)
+ buf.EncodeUint32(m.StatIndex)
+ return buf.Bytes(), nil
+}
+func (m *IpsecSaV2Details) 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.TunnelSrc.Af = ip_types.AddressFamily(buf.DecodeUint8())
+ copy(m.Entry.TunnelSrc.Un.XXX_UnionData[:], buf.DecodeBytes(16))
+ m.Entry.TunnelDst.Af = ip_types.AddressFamily(buf.DecodeUint8())
+ copy(m.Entry.TunnelDst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
+ m.Entry.TunnelFlags = tunnel_types.TunnelEncapDecapFlags(buf.DecodeUint8())
+ m.Entry.Dscp = ip_types.IPDscp(buf.DecodeUint8())
+ m.Entry.TxTableID = buf.DecodeUint32()
+ m.Entry.Salt = buf.DecodeUint32()
+ m.Entry.UDPSrcPort = buf.DecodeUint16()
+ m.Entry.UDPDstPort = buf.DecodeUint16()
+ m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ m.Salt = buf.DecodeUint32()
+ m.SeqOutbound = buf.DecodeUint64()
+ m.LastSeqInbound = buf.DecodeUint64()
+ m.ReplayWindow = buf.DecodeUint64()
+ m.StatIndex = buf.DecodeUint32()
+ return nil
+}
+
+// IpsecSaV2Dump defines message 'ipsec_sa_v2_dump'.
+type IpsecSaV2Dump struct {
+ SaID uint32 `binapi:"u32,name=sa_id" json:"sa_id,omitempty"`
+}
+
+func (m *IpsecSaV2Dump) Reset() { *m = IpsecSaV2Dump{} }
+func (*IpsecSaV2Dump) GetMessageName() string { return "ipsec_sa_v2_dump" }
+func (*IpsecSaV2Dump) GetCrcString() string { return "2076c2f4" }
+func (*IpsecSaV2Dump) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *IpsecSaV2Dump) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.SaID
+ return size
+}
+func (m *IpsecSaV2Dump) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.SaID)
+ return buf.Bytes(), nil
+}
+func (m *IpsecSaV2Dump) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.SaID = buf.DecodeUint32()
+ return nil
+}
+
+// IpsecSaV3Details defines message 'ipsec_sa_v3_details'.
+type IpsecSaV3Details struct {
+ Entry ipsec_types.IpsecSadEntryV3 `binapi:"ipsec_sad_entry_v3,name=entry" json:"entry,omitempty"`
+ SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
+ SeqOutbound uint64 `binapi:"u64,name=seq_outbound" json:"seq_outbound,omitempty"`
+ LastSeqInbound uint64 `binapi:"u64,name=last_seq_inbound" json:"last_seq_inbound,omitempty"`
+ ReplayWindow uint64 `binapi:"u64,name=replay_window" json:"replay_window,omitempty"`
+ StatIndex uint32 `binapi:"u32,name=stat_index" json:"stat_index,omitempty"`
+}
+
+func (m *IpsecSaV3Details) Reset() { *m = IpsecSaV3Details{} }
+func (*IpsecSaV3Details) GetMessageName() string { return "ipsec_sa_v3_details" }
+func (*IpsecSaV3Details) GetCrcString() string { return "2fc991ee" }
+func (*IpsecSaV3Details) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *IpsecSaV3Details) 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
+ size += 4 // m.SwIfIndex
+ size += 8 // m.SeqOutbound
+ size += 8 // m.LastSeqInbound
+ size += 8 // m.ReplayWindow
+ size += 4 // m.StatIndex
+ return size
+}
+func (m *IpsecSaV3Details) 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)
+ buf.EncodeUint32(uint32(m.SwIfIndex))
+ buf.EncodeUint64(m.SeqOutbound)
+ buf.EncodeUint64(m.LastSeqInbound)
+ buf.EncodeUint64(m.ReplayWindow)
+ buf.EncodeUint32(m.StatIndex)
+ return buf.Bytes(), nil
+}
+func (m *IpsecSaV3Details) 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()
+ m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ m.SeqOutbound = buf.DecodeUint64()
+ m.LastSeqInbound = buf.DecodeUint64()
+ m.ReplayWindow = buf.DecodeUint64()
+ m.StatIndex = buf.DecodeUint32()
+ return nil
+}
+
+// IpsecSaV3Dump defines message 'ipsec_sa_v3_dump'.
+type IpsecSaV3Dump struct {
+ SaID uint32 `binapi:"u32,name=sa_id" json:"sa_id,omitempty"`
+}
+
+func (m *IpsecSaV3Dump) Reset() { *m = IpsecSaV3Dump{} }
+func (*IpsecSaV3Dump) GetMessageName() string { return "ipsec_sa_v3_dump" }
+func (*IpsecSaV3Dump) GetCrcString() string { return "2076c2f4" }
+func (*IpsecSaV3Dump) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *IpsecSaV3Dump) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.SaID
+ return size
+}
+func (m *IpsecSaV3Dump) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeUint32(m.SaID)
+ return buf.Bytes(), nil
+}
+func (m *IpsecSaV3Dump) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.SaID = buf.DecodeUint32()
+ return nil
+}
+
+// IpsecSadEntryAddDel defines message 'ipsec_sad_entry_add_del'.
+// Deprecated: the message will be removed in the future versions
+type IpsecSadEntryAddDel struct {
+ IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
+ Entry ipsec_types.IpsecSadEntry `binapi:"ipsec_sad_entry,name=entry" json:"entry,omitempty"`
+}
+
+func (m *IpsecSadEntryAddDel) Reset() { *m = IpsecSadEntryAddDel{} }
+func (*IpsecSadEntryAddDel) GetMessageName() string { return "ipsec_sad_entry_add_del" }
+func (*IpsecSadEntryAddDel) GetCrcString() string { return "ab64b5c6" }
+func (*IpsecSadEntryAddDel) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *IpsecSadEntryAddDel) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 1 // m.IsAdd
+ 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 += 1 // m.Entry.TunnelSrc.Af
+ size += 1 * 16 // m.Entry.TunnelSrc.Un
+ size += 1 // m.Entry.TunnelDst.Af
+ size += 1 * 16 // m.Entry.TunnelDst.Un
+ size += 4 // m.Entry.TxTableID
+ size += 4 // m.Entry.Salt
+ size += 2 // m.Entry.UDPSrcPort
+ size += 2 // m.Entry.UDPDstPort
+ return size
+}
+func (m *IpsecSadEntryAddDel) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeBool(m.IsAdd)
+ 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.EncodeUint8(uint8(m.Entry.TunnelSrc.Af))
+ buf.EncodeBytes(m.Entry.TunnelSrc.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint8(uint8(m.Entry.TunnelDst.Af))
+ buf.EncodeBytes(m.Entry.TunnelDst.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint32(m.Entry.TxTableID)
+ buf.EncodeUint32(m.Entry.Salt)
+ buf.EncodeUint16(m.Entry.UDPSrcPort)
+ buf.EncodeUint16(m.Entry.UDPDstPort)
+ return buf.Bytes(), nil
+}
+func (m *IpsecSadEntryAddDel) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.IsAdd = buf.DecodeBool()
+ 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.TunnelSrc.Af = ip_types.AddressFamily(buf.DecodeUint8())
+ copy(m.Entry.TunnelSrc.Un.XXX_UnionData[:], buf.DecodeBytes(16))
+ m.Entry.TunnelDst.Af = ip_types.AddressFamily(buf.DecodeUint8())
+ copy(m.Entry.TunnelDst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
+ m.Entry.TxTableID = buf.DecodeUint32()
+ m.Entry.Salt = buf.DecodeUint32()
+ m.Entry.UDPSrcPort = buf.DecodeUint16()
+ m.Entry.UDPDstPort = buf.DecodeUint16()
+ return nil
+}
+
+// IpsecSadEntryAddDelReply defines message 'ipsec_sad_entry_add_del_reply'.
+// Deprecated: the message will be removed in the future versions
+type IpsecSadEntryAddDelReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+ StatIndex uint32 `binapi:"u32,name=stat_index" json:"stat_index,omitempty"`
+}
+
+func (m *IpsecSadEntryAddDelReply) Reset() { *m = IpsecSadEntryAddDelReply{} }
+func (*IpsecSadEntryAddDelReply) GetMessageName() string { return "ipsec_sad_entry_add_del_reply" }
+func (*IpsecSadEntryAddDelReply) GetCrcString() string { return "9ffac24b" }
+func (*IpsecSadEntryAddDelReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *IpsecSadEntryAddDelReply) Size() (size int) {