+// Ikev2ProfileDetails defines message 'ikev2_profile_details'.
+// InProgress: the message form may change in the future versions
+type Ikev2ProfileDetails struct {
+ Profile ikev2_types.Ikev2Profile `binapi:"ikev2_profile,name=profile" json:"profile,omitempty"`
+}
+
+func (m *Ikev2ProfileDetails) Reset() { *m = Ikev2ProfileDetails{} }
+func (*Ikev2ProfileDetails) GetMessageName() string { return "ikev2_profile_details" }
+func (*Ikev2ProfileDetails) GetCrcString() string { return "670d01d9" }
+func (*Ikev2ProfileDetails) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *Ikev2ProfileDetails) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 64 // m.Profile.Name
+ size += 1 // m.Profile.LocID.Type
+ size += 1 // m.Profile.LocID.DataLen
+ size += 64 // m.Profile.LocID.Data
+ size += 1 // m.Profile.RemID.Type
+ size += 1 // m.Profile.RemID.DataLen
+ size += 64 // m.Profile.RemID.Data
+ size += 4 // m.Profile.LocTs.SaIndex
+ size += 4 // m.Profile.LocTs.ChildSaIndex
+ size += 1 // m.Profile.LocTs.IsLocal
+ size += 1 // m.Profile.LocTs.ProtocolID
+ size += 2 // m.Profile.LocTs.StartPort
+ size += 2 // m.Profile.LocTs.EndPort
+ size += 1 // m.Profile.LocTs.StartAddr.Af
+ size += 1 * 16 // m.Profile.LocTs.StartAddr.Un
+ size += 1 // m.Profile.LocTs.EndAddr.Af
+ size += 1 * 16 // m.Profile.LocTs.EndAddr.Un
+ size += 4 // m.Profile.RemTs.SaIndex
+ size += 4 // m.Profile.RemTs.ChildSaIndex
+ size += 1 // m.Profile.RemTs.IsLocal
+ size += 1 // m.Profile.RemTs.ProtocolID
+ size += 2 // m.Profile.RemTs.StartPort
+ size += 2 // m.Profile.RemTs.EndPort
+ size += 1 // m.Profile.RemTs.StartAddr.Af
+ size += 1 * 16 // m.Profile.RemTs.StartAddr.Un
+ size += 1 // m.Profile.RemTs.EndAddr.Af
+ size += 1 * 16 // m.Profile.RemTs.EndAddr.Un
+ size += 4 // m.Profile.Responder.SwIfIndex
+ size += 1 // m.Profile.Responder.Addr.Af
+ size += 1 * 16 // m.Profile.Responder.Addr.Un
+ size += 1 // m.Profile.IkeTs.CryptoAlg
+ size += 4 // m.Profile.IkeTs.CryptoKeySize
+ size += 1 // m.Profile.IkeTs.IntegAlg
+ size += 1 // m.Profile.IkeTs.DhGroup
+ size += 1 // m.Profile.EspTs.CryptoAlg
+ size += 4 // m.Profile.EspTs.CryptoKeySize
+ size += 1 // m.Profile.EspTs.IntegAlg
+ size += 8 // m.Profile.Lifetime
+ size += 8 // m.Profile.LifetimeMaxdata
+ size += 4 // m.Profile.LifetimeJitter
+ size += 4 // m.Profile.Handover
+ size += 2 // m.Profile.IpsecOverUDPPort
+ size += 4 // m.Profile.TunItf
+ size += 1 // m.Profile.UDPEncap
+ size += 1 // m.Profile.NattDisabled
+ size += 1 // m.Profile.Auth.Method
+ size += 1 // m.Profile.Auth.Hex
+ size += 4 // m.Profile.Auth.DataLen
+ size += 1 * len(m.Profile.Auth.Data) // m.Profile.Auth.Data
+ return size
+}
+func (m *Ikev2ProfileDetails) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeString(m.Profile.Name, 64)
+ buf.EncodeUint8(m.Profile.LocID.Type)
+ buf.EncodeUint8(m.Profile.LocID.DataLen)
+ buf.EncodeString(m.Profile.LocID.Data, 64)
+ buf.EncodeUint8(m.Profile.RemID.Type)
+ buf.EncodeUint8(m.Profile.RemID.DataLen)
+ buf.EncodeString(m.Profile.RemID.Data, 64)
+ buf.EncodeUint32(m.Profile.LocTs.SaIndex)
+ buf.EncodeUint32(m.Profile.LocTs.ChildSaIndex)
+ buf.EncodeBool(m.Profile.LocTs.IsLocal)
+ buf.EncodeUint8(m.Profile.LocTs.ProtocolID)
+ buf.EncodeUint16(m.Profile.LocTs.StartPort)
+ buf.EncodeUint16(m.Profile.LocTs.EndPort)
+ buf.EncodeUint8(uint8(m.Profile.LocTs.StartAddr.Af))
+ buf.EncodeBytes(m.Profile.LocTs.StartAddr.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint8(uint8(m.Profile.LocTs.EndAddr.Af))
+ buf.EncodeBytes(m.Profile.LocTs.EndAddr.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint32(m.Profile.RemTs.SaIndex)
+ buf.EncodeUint32(m.Profile.RemTs.ChildSaIndex)
+ buf.EncodeBool(m.Profile.RemTs.IsLocal)
+ buf.EncodeUint8(m.Profile.RemTs.ProtocolID)
+ buf.EncodeUint16(m.Profile.RemTs.StartPort)
+ buf.EncodeUint16(m.Profile.RemTs.EndPort)
+ buf.EncodeUint8(uint8(m.Profile.RemTs.StartAddr.Af))
+ buf.EncodeBytes(m.Profile.RemTs.StartAddr.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint8(uint8(m.Profile.RemTs.EndAddr.Af))
+ buf.EncodeBytes(m.Profile.RemTs.EndAddr.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint32(uint32(m.Profile.Responder.SwIfIndex))
+ buf.EncodeUint8(uint8(m.Profile.Responder.Addr.Af))
+ buf.EncodeBytes(m.Profile.Responder.Addr.Un.XXX_UnionData[:], 16)
+ buf.EncodeUint8(m.Profile.IkeTs.CryptoAlg)
+ buf.EncodeUint32(m.Profile.IkeTs.CryptoKeySize)
+ buf.EncodeUint8(m.Profile.IkeTs.IntegAlg)
+ buf.EncodeUint8(m.Profile.IkeTs.DhGroup)
+ buf.EncodeUint8(m.Profile.EspTs.CryptoAlg)
+ buf.EncodeUint32(m.Profile.EspTs.CryptoKeySize)
+ buf.EncodeUint8(m.Profile.EspTs.IntegAlg)
+ buf.EncodeUint64(m.Profile.Lifetime)
+ buf.EncodeUint64(m.Profile.LifetimeMaxdata)
+ buf.EncodeUint32(m.Profile.LifetimeJitter)
+ buf.EncodeUint32(m.Profile.Handover)
+ buf.EncodeUint16(m.Profile.IpsecOverUDPPort)
+ buf.EncodeUint32(m.Profile.TunItf)
+ buf.EncodeBool(m.Profile.UDPEncap)
+ buf.EncodeBool(m.Profile.NattDisabled)
+ buf.EncodeUint8(m.Profile.Auth.Method)
+ buf.EncodeUint8(m.Profile.Auth.Hex)
+ buf.EncodeUint32(uint32(len(m.Profile.Auth.Data)))
+ buf.EncodeBytes(m.Profile.Auth.Data, 0)
+ return buf.Bytes(), nil
+}
+func (m *Ikev2ProfileDetails) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Profile.Name = buf.DecodeString(64)
+ m.Profile.LocID.Type = buf.DecodeUint8()
+ m.Profile.LocID.DataLen = buf.DecodeUint8()
+ m.Profile.LocID.Data = buf.DecodeString(64)
+ m.Profile.RemID.Type = buf.DecodeUint8()
+ m.Profile.RemID.DataLen = buf.DecodeUint8()
+ m.Profile.RemID.Data = buf.DecodeString(64)
+ m.Profile.LocTs.SaIndex = buf.DecodeUint32()
+ m.Profile.LocTs.ChildSaIndex = buf.DecodeUint32()
+ m.Profile.LocTs.IsLocal = buf.DecodeBool()
+ m.Profile.LocTs.ProtocolID = buf.DecodeUint8()
+ m.Profile.LocTs.StartPort = buf.DecodeUint16()
+ m.Profile.LocTs.EndPort = buf.DecodeUint16()
+ m.Profile.LocTs.StartAddr.Af = ip_types.AddressFamily(buf.DecodeUint8())
+ copy(m.Profile.LocTs.StartAddr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
+ m.Profile.LocTs.EndAddr.Af = ip_types.AddressFamily(buf.DecodeUint8())
+ copy(m.Profile.LocTs.EndAddr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
+ m.Profile.RemTs.SaIndex = buf.DecodeUint32()
+ m.Profile.RemTs.ChildSaIndex = buf.DecodeUint32()
+ m.Profile.RemTs.IsLocal = buf.DecodeBool()
+ m.Profile.RemTs.ProtocolID = buf.DecodeUint8()
+ m.Profile.RemTs.StartPort = buf.DecodeUint16()
+ m.Profile.RemTs.EndPort = buf.DecodeUint16()
+ m.Profile.RemTs.StartAddr.Af = ip_types.AddressFamily(buf.DecodeUint8())
+ copy(m.Profile.RemTs.StartAddr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
+ m.Profile.RemTs.EndAddr.Af = ip_types.AddressFamily(buf.DecodeUint8())
+ copy(m.Profile.RemTs.EndAddr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
+ m.Profile.Responder.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
+ m.Profile.Responder.Addr.Af = ip_types.AddressFamily(buf.DecodeUint8())
+ copy(m.Profile.Responder.Addr.Un.XXX_UnionData[:], buf.DecodeBytes(16))
+ m.Profile.IkeTs.CryptoAlg = buf.DecodeUint8()
+ m.Profile.IkeTs.CryptoKeySize = buf.DecodeUint32()
+ m.Profile.IkeTs.IntegAlg = buf.DecodeUint8()
+ m.Profile.IkeTs.DhGroup = buf.DecodeUint8()
+ m.Profile.EspTs.CryptoAlg = buf.DecodeUint8()
+ m.Profile.EspTs.CryptoKeySize = buf.DecodeUint32()
+ m.Profile.EspTs.IntegAlg = buf.DecodeUint8()
+ m.Profile.Lifetime = buf.DecodeUint64()
+ m.Profile.LifetimeMaxdata = buf.DecodeUint64()
+ m.Profile.LifetimeJitter = buf.DecodeUint32()
+ m.Profile.Handover = buf.DecodeUint32()
+ m.Profile.IpsecOverUDPPort = buf.DecodeUint16()
+ m.Profile.TunItf = buf.DecodeUint32()
+ m.Profile.UDPEncap = buf.DecodeBool()
+ m.Profile.NattDisabled = buf.DecodeBool()
+ m.Profile.Auth.Method = buf.DecodeUint8()
+ m.Profile.Auth.Hex = buf.DecodeUint8()
+ m.Profile.Auth.DataLen = buf.DecodeUint32()
+ m.Profile.Auth.Data = make([]byte, m.Profile.Auth.DataLen)
+ copy(m.Profile.Auth.Data, buf.DecodeBytes(len(m.Profile.Auth.Data)))
+ return nil
+}
+
+// Ikev2ProfileDisableNatt defines message 'ikev2_profile_disable_natt'.
+// InProgress: the message form may change in the future versions
+type Ikev2ProfileDisableNatt struct {
+ Name string `binapi:"string[64],name=name" json:"name,omitempty"`
+}
+
+func (m *Ikev2ProfileDisableNatt) Reset() { *m = Ikev2ProfileDisableNatt{} }
+func (*Ikev2ProfileDisableNatt) GetMessageName() string { return "ikev2_profile_disable_natt" }
+func (*Ikev2ProfileDisableNatt) GetCrcString() string { return "ebf79a66" }
+func (*Ikev2ProfileDisableNatt) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *Ikev2ProfileDisableNatt) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 64 // m.Name
+ return size
+}
+func (m *Ikev2ProfileDisableNatt) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ buf.EncodeString(m.Name, 64)
+ return buf.Bytes(), nil
+}
+func (m *Ikev2ProfileDisableNatt) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Name = buf.DecodeString(64)
+ return nil
+}
+
+// Ikev2ProfileDisableNattReply defines message 'ikev2_profile_disable_natt_reply'.
+// InProgress: the message form may change in the future versions
+type Ikev2ProfileDisableNattReply struct {
+ Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
+}
+
+func (m *Ikev2ProfileDisableNattReply) Reset() { *m = Ikev2ProfileDisableNattReply{} }
+func (*Ikev2ProfileDisableNattReply) GetMessageName() string {
+ return "ikev2_profile_disable_natt_reply"
+}
+func (*Ikev2ProfileDisableNattReply) GetCrcString() string { return "e8d4e804" }
+func (*Ikev2ProfileDisableNattReply) GetMessageType() api.MessageType {
+ return api.ReplyMessage
+}
+
+func (m *Ikev2ProfileDisableNattReply) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ size += 4 // m.Retval
+ return size
+}
+func (m *Ikev2ProfileDisableNattReply) 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 *Ikev2ProfileDisableNattReply) Unmarshal(b []byte) error {
+ buf := codec.NewBuffer(b)
+ m.Retval = buf.DecodeInt32()
+ return nil
+}
+
+// Ikev2ProfileDump defines message 'ikev2_profile_dump'.
+// InProgress: the message form may change in the future versions
+type Ikev2ProfileDump struct{}
+
+func (m *Ikev2ProfileDump) Reset() { *m = Ikev2ProfileDump{} }
+func (*Ikev2ProfileDump) GetMessageName() string { return "ikev2_profile_dump" }
+func (*Ikev2ProfileDump) GetCrcString() string { return "51077d14" }
+func (*Ikev2ProfileDump) GetMessageType() api.MessageType {
+ return api.RequestMessage
+}
+
+func (m *Ikev2ProfileDump) Size() (size int) {
+ if m == nil {
+ return 0
+ }
+ return size
+}
+func (m *Ikev2ProfileDump) Marshal(b []byte) ([]byte, error) {
+ if b == nil {
+ b = make([]byte, m.Size())
+ }
+ buf := codec.NewBuffer(b)
+ return buf.Bytes(), nil
+}
+func (m *Ikev2ProfileDump) Unmarshal(b []byte) error {
+ return nil
+}
+