X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=binapi%2Fikev2%2Fikev2.ba.go;h=444a9ad0b4746e6f197ff72993fe5e90462cea31;hb=66b2e881b96d9eff429d8136129f194a1d17da87;hp=f76c6c3d35b742fc951312ed05a825ce1a5fd989;hpb=c94a962279858fb13eaacc689f47aed358373e44;p=govpp.git diff --git a/binapi/ikev2/ikev2.ba.go b/binapi/ikev2/ikev2.ba.go index f76c6c3..444a9ad 100644 --- a/binapi/ikev2/ikev2.ba.go +++ b/binapi/ikev2/ikev2.ba.go @@ -1,17 +1,19 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 20.05-release +// binapi-generator: v0.5.0 +// VPP: 22.02-release +// source: /usr/share/vpp/api/plugins/ikev2.api.json // Package ikev2 contains generated bindings for API file ikev2.api. // // Contents: -// 36 messages +// 50 messages // package ikev2 import ( api "git.fd.io/govpp.git/api" + ikev2_types "git.fd.io/govpp.git/binapi/ikev2_types" interface_types "git.fd.io/govpp.git/binapi/interface_types" ip_types "git.fd.io/govpp.git/binapi/ip_types" codec "git.fd.io/govpp.git/codec" @@ -26,10 +28,195 @@ const _ = api.GoVppAPIPackageIsVersion2 const ( APIFile = "ikev2" APIVersion = "1.0.1" - VersionCrc = 0x2ebaa2d8 + VersionCrc = 0x8eb2437c ) +// Ikev2ChildSaDetails defines message 'ikev2_child_sa_details'. +// InProgress: the message form may change in the future versions +type Ikev2ChildSaDetails struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` + ChildSa ikev2_types.Ikev2ChildSa `binapi:"ikev2_child_sa,name=child_sa" json:"child_sa,omitempty"` +} + +func (m *Ikev2ChildSaDetails) Reset() { *m = Ikev2ChildSaDetails{} } +func (*Ikev2ChildSaDetails) GetMessageName() string { return "ikev2_child_sa_details" } +func (*Ikev2ChildSaDetails) GetCrcString() string { return "ff67741f" } +func (*Ikev2ChildSaDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Ikev2ChildSaDetails) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + size += 4 // m.ChildSa.SaIndex + size += 4 // m.ChildSa.ChildSaIndex + size += 4 // m.ChildSa.ISpi + size += 4 // m.ChildSa.RSpi + size += 1 * 64 // m.ChildSa.Keys.SkD + size += 1 // m.ChildSa.Keys.SkDLen + size += 1 * 64 // m.ChildSa.Keys.SkAi + size += 1 // m.ChildSa.Keys.SkAiLen + size += 1 * 64 // m.ChildSa.Keys.SkAr + size += 1 // m.ChildSa.Keys.SkArLen + size += 1 * 64 // m.ChildSa.Keys.SkEi + size += 1 // m.ChildSa.Keys.SkEiLen + size += 1 * 64 // m.ChildSa.Keys.SkEr + size += 1 // m.ChildSa.Keys.SkErLen + size += 1 * 64 // m.ChildSa.Keys.SkPi + size += 1 // m.ChildSa.Keys.SkPiLen + size += 1 * 64 // m.ChildSa.Keys.SkPr + size += 1 // m.ChildSa.Keys.SkPrLen + size += 1 // m.ChildSa.Encryption.TransformType + size += 2 // m.ChildSa.Encryption.TransformID + size += 2 // m.ChildSa.Encryption.KeyLen + size += 2 // m.ChildSa.Encryption.KeyTrunc + size += 2 // m.ChildSa.Encryption.BlockSize + size += 1 // m.ChildSa.Encryption.DhGroup + size += 1 // m.ChildSa.Integrity.TransformType + size += 2 // m.ChildSa.Integrity.TransformID + size += 2 // m.ChildSa.Integrity.KeyLen + size += 2 // m.ChildSa.Integrity.KeyTrunc + size += 2 // m.ChildSa.Integrity.BlockSize + size += 1 // m.ChildSa.Integrity.DhGroup + size += 1 // m.ChildSa.Esn.TransformType + size += 2 // m.ChildSa.Esn.TransformID + size += 2 // m.ChildSa.Esn.KeyLen + size += 2 // m.ChildSa.Esn.KeyTrunc + size += 2 // m.ChildSa.Esn.BlockSize + size += 1 // m.ChildSa.Esn.DhGroup + return size +} +func (m *Ikev2ChildSaDetails) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + buf.EncodeUint32(m.ChildSa.SaIndex) + buf.EncodeUint32(m.ChildSa.ChildSaIndex) + buf.EncodeUint32(m.ChildSa.ISpi) + buf.EncodeUint32(m.ChildSa.RSpi) + buf.EncodeBytes(m.ChildSa.Keys.SkD, 64) + buf.EncodeUint8(m.ChildSa.Keys.SkDLen) + buf.EncodeBytes(m.ChildSa.Keys.SkAi, 64) + buf.EncodeUint8(m.ChildSa.Keys.SkAiLen) + buf.EncodeBytes(m.ChildSa.Keys.SkAr, 64) + buf.EncodeUint8(m.ChildSa.Keys.SkArLen) + buf.EncodeBytes(m.ChildSa.Keys.SkEi, 64) + buf.EncodeUint8(m.ChildSa.Keys.SkEiLen) + buf.EncodeBytes(m.ChildSa.Keys.SkEr, 64) + buf.EncodeUint8(m.ChildSa.Keys.SkErLen) + buf.EncodeBytes(m.ChildSa.Keys.SkPi, 64) + buf.EncodeUint8(m.ChildSa.Keys.SkPiLen) + buf.EncodeBytes(m.ChildSa.Keys.SkPr, 64) + buf.EncodeUint8(m.ChildSa.Keys.SkPrLen) + buf.EncodeUint8(m.ChildSa.Encryption.TransformType) + buf.EncodeUint16(m.ChildSa.Encryption.TransformID) + buf.EncodeUint16(m.ChildSa.Encryption.KeyLen) + buf.EncodeUint16(m.ChildSa.Encryption.KeyTrunc) + buf.EncodeUint16(m.ChildSa.Encryption.BlockSize) + buf.EncodeUint8(m.ChildSa.Encryption.DhGroup) + buf.EncodeUint8(m.ChildSa.Integrity.TransformType) + buf.EncodeUint16(m.ChildSa.Integrity.TransformID) + buf.EncodeUint16(m.ChildSa.Integrity.KeyLen) + buf.EncodeUint16(m.ChildSa.Integrity.KeyTrunc) + buf.EncodeUint16(m.ChildSa.Integrity.BlockSize) + buf.EncodeUint8(m.ChildSa.Integrity.DhGroup) + buf.EncodeUint8(m.ChildSa.Esn.TransformType) + buf.EncodeUint16(m.ChildSa.Esn.TransformID) + buf.EncodeUint16(m.ChildSa.Esn.KeyLen) + buf.EncodeUint16(m.ChildSa.Esn.KeyTrunc) + buf.EncodeUint16(m.ChildSa.Esn.BlockSize) + buf.EncodeUint8(m.ChildSa.Esn.DhGroup) + return buf.Bytes(), nil +} +func (m *Ikev2ChildSaDetails) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + m.ChildSa.SaIndex = buf.DecodeUint32() + m.ChildSa.ChildSaIndex = buf.DecodeUint32() + m.ChildSa.ISpi = buf.DecodeUint32() + m.ChildSa.RSpi = buf.DecodeUint32() + m.ChildSa.Keys.SkD = make([]byte, 64) + copy(m.ChildSa.Keys.SkD, buf.DecodeBytes(len(m.ChildSa.Keys.SkD))) + m.ChildSa.Keys.SkDLen = buf.DecodeUint8() + m.ChildSa.Keys.SkAi = make([]byte, 64) + copy(m.ChildSa.Keys.SkAi, buf.DecodeBytes(len(m.ChildSa.Keys.SkAi))) + m.ChildSa.Keys.SkAiLen = buf.DecodeUint8() + m.ChildSa.Keys.SkAr = make([]byte, 64) + copy(m.ChildSa.Keys.SkAr, buf.DecodeBytes(len(m.ChildSa.Keys.SkAr))) + m.ChildSa.Keys.SkArLen = buf.DecodeUint8() + m.ChildSa.Keys.SkEi = make([]byte, 64) + copy(m.ChildSa.Keys.SkEi, buf.DecodeBytes(len(m.ChildSa.Keys.SkEi))) + m.ChildSa.Keys.SkEiLen = buf.DecodeUint8() + m.ChildSa.Keys.SkEr = make([]byte, 64) + copy(m.ChildSa.Keys.SkEr, buf.DecodeBytes(len(m.ChildSa.Keys.SkEr))) + m.ChildSa.Keys.SkErLen = buf.DecodeUint8() + m.ChildSa.Keys.SkPi = make([]byte, 64) + copy(m.ChildSa.Keys.SkPi, buf.DecodeBytes(len(m.ChildSa.Keys.SkPi))) + m.ChildSa.Keys.SkPiLen = buf.DecodeUint8() + m.ChildSa.Keys.SkPr = make([]byte, 64) + copy(m.ChildSa.Keys.SkPr, buf.DecodeBytes(len(m.ChildSa.Keys.SkPr))) + m.ChildSa.Keys.SkPrLen = buf.DecodeUint8() + m.ChildSa.Encryption.TransformType = buf.DecodeUint8() + m.ChildSa.Encryption.TransformID = buf.DecodeUint16() + m.ChildSa.Encryption.KeyLen = buf.DecodeUint16() + m.ChildSa.Encryption.KeyTrunc = buf.DecodeUint16() + m.ChildSa.Encryption.BlockSize = buf.DecodeUint16() + m.ChildSa.Encryption.DhGroup = buf.DecodeUint8() + m.ChildSa.Integrity.TransformType = buf.DecodeUint8() + m.ChildSa.Integrity.TransformID = buf.DecodeUint16() + m.ChildSa.Integrity.KeyLen = buf.DecodeUint16() + m.ChildSa.Integrity.KeyTrunc = buf.DecodeUint16() + m.ChildSa.Integrity.BlockSize = buf.DecodeUint16() + m.ChildSa.Integrity.DhGroup = buf.DecodeUint8() + m.ChildSa.Esn.TransformType = buf.DecodeUint8() + m.ChildSa.Esn.TransformID = buf.DecodeUint16() + m.ChildSa.Esn.KeyLen = buf.DecodeUint16() + m.ChildSa.Esn.KeyTrunc = buf.DecodeUint16() + m.ChildSa.Esn.BlockSize = buf.DecodeUint16() + m.ChildSa.Esn.DhGroup = buf.DecodeUint8() + return nil +} + +// Ikev2ChildSaDump defines message 'ikev2_child_sa_dump'. +// InProgress: the message form may change in the future versions +type Ikev2ChildSaDump struct { + SaIndex uint32 `binapi:"u32,name=sa_index" json:"sa_index,omitempty"` +} + +func (m *Ikev2ChildSaDump) Reset() { *m = Ikev2ChildSaDump{} } +func (*Ikev2ChildSaDump) GetMessageName() string { return "ikev2_child_sa_dump" } +func (*Ikev2ChildSaDump) GetCrcString() string { return "01eab609" } +func (*Ikev2ChildSaDump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Ikev2ChildSaDump) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.SaIndex + return size +} +func (m *Ikev2ChildSaDump) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.SaIndex) + return buf.Bytes(), nil +} +func (m *Ikev2ChildSaDump) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.SaIndex = buf.DecodeUint32() + return nil +} + // Ikev2InitiateDelChildSa defines message 'ikev2_initiate_del_child_sa'. +// InProgress: the message form may change in the future versions type Ikev2InitiateDelChildSa struct { Ispi uint32 `binapi:"u32,name=ispi" json:"ispi,omitempty"` } @@ -63,6 +250,7 @@ func (m *Ikev2InitiateDelChildSa) Unmarshal(b []byte) error { } // Ikev2InitiateDelChildSaReply defines message 'ikev2_initiate_del_child_sa_reply'. +// InProgress: the message form may change in the future versions type Ikev2InitiateDelChildSaReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -98,6 +286,7 @@ func (m *Ikev2InitiateDelChildSaReply) Unmarshal(b []byte) error { } // Ikev2InitiateDelIkeSa defines message 'ikev2_initiate_del_ike_sa'. +// InProgress: the message form may change in the future versions type Ikev2InitiateDelIkeSa struct { Ispi uint64 `binapi:"u64,name=ispi" json:"ispi,omitempty"` } @@ -131,6 +320,7 @@ func (m *Ikev2InitiateDelIkeSa) Unmarshal(b []byte) error { } // Ikev2InitiateDelIkeSaReply defines message 'ikev2_initiate_del_ike_sa_reply'. +// InProgress: the message form may change in the future versions type Ikev2InitiateDelIkeSaReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -164,6 +354,7 @@ func (m *Ikev2InitiateDelIkeSaReply) Unmarshal(b []byte) error { } // Ikev2InitiateRekeyChildSa defines message 'ikev2_initiate_rekey_child_sa'. +// InProgress: the message form may change in the future versions type Ikev2InitiateRekeyChildSa struct { Ispi uint32 `binapi:"u32,name=ispi" json:"ispi,omitempty"` } @@ -197,6 +388,7 @@ func (m *Ikev2InitiateRekeyChildSa) Unmarshal(b []byte) error { } // Ikev2InitiateRekeyChildSaReply defines message 'ikev2_initiate_rekey_child_sa_reply'. +// InProgress: the message form may change in the future versions type Ikev2InitiateRekeyChildSaReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -232,6 +424,7 @@ func (m *Ikev2InitiateRekeyChildSaReply) Unmarshal(b []byte) error { } // Ikev2InitiateSaInit defines message 'ikev2_initiate_sa_init'. +// InProgress: the message form may change in the future versions type Ikev2InitiateSaInit struct { Name string `binapi:"string[64],name=name" json:"name,omitempty"` } @@ -265,6 +458,7 @@ func (m *Ikev2InitiateSaInit) Unmarshal(b []byte) error { } // Ikev2InitiateSaInitReply defines message 'ikev2_initiate_sa_init_reply'. +// InProgress: the message form may change in the future versions type Ikev2InitiateSaInitReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -297,6 +491,87 @@ func (m *Ikev2InitiateSaInitReply) Unmarshal(b []byte) error { return nil } +// Ikev2NonceGet defines message 'ikev2_nonce_get'. +// InProgress: the message form may change in the future versions +type Ikev2NonceGet struct { + IsInitiator bool `binapi:"bool,name=is_initiator" json:"is_initiator,omitempty"` + SaIndex uint32 `binapi:"u32,name=sa_index" json:"sa_index,omitempty"` +} + +func (m *Ikev2NonceGet) Reset() { *m = Ikev2NonceGet{} } +func (*Ikev2NonceGet) GetMessageName() string { return "ikev2_nonce_get" } +func (*Ikev2NonceGet) GetCrcString() string { return "7fe9ad51" } +func (*Ikev2NonceGet) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Ikev2NonceGet) Size() (size int) { + if m == nil { + return 0 + } + size += 1 // m.IsInitiator + size += 4 // m.SaIndex + return size +} +func (m *Ikev2NonceGet) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBool(m.IsInitiator) + buf.EncodeUint32(m.SaIndex) + return buf.Bytes(), nil +} +func (m *Ikev2NonceGet) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.IsInitiator = buf.DecodeBool() + m.SaIndex = buf.DecodeUint32() + return nil +} + +// Ikev2NonceGetReply defines message 'ikev2_nonce_get_reply'. +// InProgress: the message form may change in the future versions +type Ikev2NonceGetReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` + DataLen uint32 `binapi:"u32,name=data_len" json:"-"` + Nonce []byte `binapi:"u8[data_len],name=nonce" json:"nonce,omitempty"` +} + +func (m *Ikev2NonceGetReply) Reset() { *m = Ikev2NonceGetReply{} } +func (*Ikev2NonceGetReply) GetMessageName() string { return "ikev2_nonce_get_reply" } +func (*Ikev2NonceGetReply) GetCrcString() string { return "1b37a342" } +func (*Ikev2NonceGetReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Ikev2NonceGetReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + size += 4 // m.DataLen + size += 1 * len(m.Nonce) // m.Nonce + return size +} +func (m *Ikev2NonceGetReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + buf.EncodeUint32(uint32(len(m.Nonce))) + buf.EncodeBytes(m.Nonce, 0) + return buf.Bytes(), nil +} +func (m *Ikev2NonceGetReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + m.DataLen = buf.DecodeUint32() + m.Nonce = make([]byte, m.DataLen) + copy(m.Nonce, buf.DecodeBytes(len(m.Nonce))) + return nil +} + // Ikev2PluginGetVersion defines message 'ikev2_plugin_get_version'. type Ikev2PluginGetVersion struct{} @@ -362,6 +637,7 @@ func (m *Ikev2PluginGetVersionReply) Unmarshal(b []byte) error { } // Ikev2ProfileAddDel defines message 'ikev2_profile_add_del'. +// InProgress: the message form may change in the future versions type Ikev2ProfileAddDel struct { Name string `binapi:"string[64],name=name" json:"name,omitempty"` IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -399,6 +675,7 @@ func (m *Ikev2ProfileAddDel) Unmarshal(b []byte) error { } // Ikev2ProfileAddDelReply defines message 'ikev2_profile_add_del_reply'. +// InProgress: the message form may change in the future versions type Ikev2ProfileAddDelReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -431,7 +708,285 @@ func (m *Ikev2ProfileAddDelReply) Unmarshal(b []byte) error { return nil } +// 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 +} + // Ikev2ProfileSetAuth defines message 'ikev2_profile_set_auth'. +// InProgress: the message form may change in the future versions type Ikev2ProfileSetAuth struct { Name string `binapi:"string[64],name=name" json:"name,omitempty"` AuthMethod uint8 `binapi:"u8,name=auth_method" json:"auth_method,omitempty"` @@ -482,6 +1037,7 @@ func (m *Ikev2ProfileSetAuth) Unmarshal(b []byte) error { } // Ikev2ProfileSetAuthReply defines message 'ikev2_profile_set_auth_reply'. +// InProgress: the message form may change in the future versions type Ikev2ProfileSetAuthReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -515,6 +1071,7 @@ func (m *Ikev2ProfileSetAuthReply) Unmarshal(b []byte) error { } // Ikev2ProfileSetID defines message 'ikev2_profile_set_id'. +// InProgress: the message form may change in the future versions type Ikev2ProfileSetID struct { Name string `binapi:"string[64],name=name" json:"name,omitempty"` IsLocal bool `binapi:"bool,name=is_local" json:"is_local,omitempty"` @@ -565,6 +1122,7 @@ func (m *Ikev2ProfileSetID) Unmarshal(b []byte) error { } // Ikev2ProfileSetIDReply defines message 'ikev2_profile_set_id_reply'. +// InProgress: the message form may change in the future versions type Ikev2ProfileSetIDReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -598,6 +1156,7 @@ func (m *Ikev2ProfileSetIDReply) Unmarshal(b []byte) error { } // Ikev2ProfileSetIpsecUDPPort defines message 'ikev2_profile_set_ipsec_udp_port'. +// InProgress: the message form may change in the future versions type Ikev2ProfileSetIpsecUDPPort struct { IsSet uint8 `binapi:"u8,name=is_set" json:"is_set,omitempty"` Port uint16 `binapi:"u16,name=port" json:"port,omitempty"` @@ -641,6 +1200,7 @@ func (m *Ikev2ProfileSetIpsecUDPPort) Unmarshal(b []byte) error { } // Ikev2ProfileSetIpsecUDPPortReply defines message 'ikev2_profile_set_ipsec_udp_port_reply'. +// InProgress: the message form may change in the future versions type Ikev2ProfileSetIpsecUDPPortReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -676,6 +1236,7 @@ func (m *Ikev2ProfileSetIpsecUDPPortReply) Unmarshal(b []byte) error { } // Ikev2ProfileSetLiveness defines message 'ikev2_profile_set_liveness'. +// InProgress: the message form may change in the future versions type Ikev2ProfileSetLiveness struct { Period uint32 `binapi:"u32,name=period" json:"period,omitempty"` MaxRetries uint32 `binapi:"u32,name=max_retries" json:"max_retries,omitempty"` @@ -713,6 +1274,7 @@ func (m *Ikev2ProfileSetLiveness) Unmarshal(b []byte) error { } // Ikev2ProfileSetLivenessReply defines message 'ikev2_profile_set_liveness_reply'. +// InProgress: the message form may change in the future versions type Ikev2ProfileSetLivenessReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -748,19 +1310,15 @@ func (m *Ikev2ProfileSetLivenessReply) Unmarshal(b []byte) error { } // Ikev2ProfileSetTs defines message 'ikev2_profile_set_ts'. +// InProgress: the message form may change in the future versions type Ikev2ProfileSetTs struct { - Name string `binapi:"string[64],name=name" json:"name,omitempty"` - IsLocal bool `binapi:"bool,name=is_local" json:"is_local,omitempty"` - Proto uint8 `binapi:"u8,name=proto" json:"proto,omitempty"` - StartPort uint16 `binapi:"u16,name=start_port" json:"start_port,omitempty"` - EndPort uint16 `binapi:"u16,name=end_port" json:"end_port,omitempty"` - StartAddr uint32 `binapi:"u32,name=start_addr" json:"start_addr,omitempty"` - EndAddr uint32 `binapi:"u32,name=end_addr" json:"end_addr,omitempty"` + Name string `binapi:"string[64],name=name" json:"name,omitempty"` + Ts ikev2_types.Ikev2Ts `binapi:"ikev2_ts,name=ts" json:"ts,omitempty"` } func (m *Ikev2ProfileSetTs) Reset() { *m = Ikev2ProfileSetTs{} } func (*Ikev2ProfileSetTs) GetMessageName() string { return "ikev2_profile_set_ts" } -func (*Ikev2ProfileSetTs) GetCrcString() string { return "64d55c16" } +func (*Ikev2ProfileSetTs) GetCrcString() string { return "8eb8cfd1" } func (*Ikev2ProfileSetTs) GetMessageType() api.MessageType { return api.RequestMessage } @@ -769,13 +1327,17 @@ func (m *Ikev2ProfileSetTs) Size() (size int) { if m == nil { return 0 } - size += 64 // m.Name - size += 1 // m.IsLocal - size += 1 // m.Proto - size += 2 // m.StartPort - size += 2 // m.EndPort - size += 4 // m.StartAddr - size += 4 // m.EndAddr + size += 64 // m.Name + size += 4 // m.Ts.SaIndex + size += 4 // m.Ts.ChildSaIndex + size += 1 // m.Ts.IsLocal + size += 1 // m.Ts.ProtocolID + size += 2 // m.Ts.StartPort + size += 2 // m.Ts.EndPort + size += 1 // m.Ts.StartAddr.Af + size += 1 * 16 // m.Ts.StartAddr.Un + size += 1 // m.Ts.EndAddr.Af + size += 1 * 16 // m.Ts.EndAddr.Un return size } func (m *Ikev2ProfileSetTs) Marshal(b []byte) ([]byte, error) { @@ -784,27 +1346,36 @@ func (m *Ikev2ProfileSetTs) Marshal(b []byte) ([]byte, error) { } buf := codec.NewBuffer(b) buf.EncodeString(m.Name, 64) - buf.EncodeBool(m.IsLocal) - buf.EncodeUint8(m.Proto) - buf.EncodeUint16(m.StartPort) - buf.EncodeUint16(m.EndPort) - buf.EncodeUint32(m.StartAddr) - buf.EncodeUint32(m.EndAddr) + buf.EncodeUint32(m.Ts.SaIndex) + buf.EncodeUint32(m.Ts.ChildSaIndex) + buf.EncodeBool(m.Ts.IsLocal) + buf.EncodeUint8(m.Ts.ProtocolID) + buf.EncodeUint16(m.Ts.StartPort) + buf.EncodeUint16(m.Ts.EndPort) + buf.EncodeUint8(uint8(m.Ts.StartAddr.Af)) + buf.EncodeBytes(m.Ts.StartAddr.Un.XXX_UnionData[:], 16) + buf.EncodeUint8(uint8(m.Ts.EndAddr.Af)) + buf.EncodeBytes(m.Ts.EndAddr.Un.XXX_UnionData[:], 16) return buf.Bytes(), nil } func (m *Ikev2ProfileSetTs) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Name = buf.DecodeString(64) - m.IsLocal = buf.DecodeBool() - m.Proto = buf.DecodeUint8() - m.StartPort = buf.DecodeUint16() - m.EndPort = buf.DecodeUint16() - m.StartAddr = buf.DecodeUint32() - m.EndAddr = buf.DecodeUint32() + m.Ts.SaIndex = buf.DecodeUint32() + m.Ts.ChildSaIndex = buf.DecodeUint32() + m.Ts.IsLocal = buf.DecodeBool() + m.Ts.ProtocolID = buf.DecodeUint8() + m.Ts.StartPort = buf.DecodeUint16() + m.Ts.EndPort = buf.DecodeUint16() + m.Ts.StartAddr.Af = ip_types.AddressFamily(buf.DecodeUint8()) + copy(m.Ts.StartAddr.Un.XXX_UnionData[:], buf.DecodeBytes(16)) + m.Ts.EndAddr.Af = ip_types.AddressFamily(buf.DecodeUint8()) + copy(m.Ts.EndAddr.Un.XXX_UnionData[:], buf.DecodeBytes(16)) return nil } // Ikev2ProfileSetTsReply defines message 'ikev2_profile_set_ts_reply'. +// InProgress: the message form may change in the future versions type Ikev2ProfileSetTsReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -838,6 +1409,7 @@ func (m *Ikev2ProfileSetTsReply) Unmarshal(b []byte) error { } // Ikev2ProfileSetUDPEncap defines message 'ikev2_profile_set_udp_encap'. +// InProgress: the message form may change in the future versions type Ikev2ProfileSetUDPEncap struct { Name string `binapi:"string[64],name=name" json:"name,omitempty"` } @@ -871,6 +1443,7 @@ func (m *Ikev2ProfileSetUDPEncap) Unmarshal(b []byte) error { } // Ikev2ProfileSetUDPEncapReply defines message 'ikev2_profile_set_udp_encap_reply'. +// InProgress: the message form may change in the future versions type Ikev2ProfileSetUDPEncapReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -905,18 +1478,260 @@ func (m *Ikev2ProfileSetUDPEncapReply) Unmarshal(b []byte) error { return nil } +// Ikev2SaDetails defines message 'ikev2_sa_details'. +// InProgress: the message form may change in the future versions +type Ikev2SaDetails struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` + Sa ikev2_types.Ikev2Sa `binapi:"ikev2_sa,name=sa" json:"sa,omitempty"` +} + +func (m *Ikev2SaDetails) Reset() { *m = Ikev2SaDetails{} } +func (*Ikev2SaDetails) GetMessageName() string { return "ikev2_sa_details" } +func (*Ikev2SaDetails) GetCrcString() string { return "937c22d5" } +func (*Ikev2SaDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Ikev2SaDetails) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + size += 4 // m.Sa.SaIndex + size += 4 // m.Sa.ProfileIndex + size += 8 // m.Sa.Ispi + size += 8 // m.Sa.Rspi + size += 1 // m.Sa.Iaddr.Af + size += 1 * 16 // m.Sa.Iaddr.Un + size += 1 // m.Sa.Raddr.Af + size += 1 * 16 // m.Sa.Raddr.Un + size += 1 * 64 // m.Sa.Keys.SkD + size += 1 // m.Sa.Keys.SkDLen + size += 1 * 64 // m.Sa.Keys.SkAi + size += 1 // m.Sa.Keys.SkAiLen + size += 1 * 64 // m.Sa.Keys.SkAr + size += 1 // m.Sa.Keys.SkArLen + size += 1 * 64 // m.Sa.Keys.SkEi + size += 1 // m.Sa.Keys.SkEiLen + size += 1 * 64 // m.Sa.Keys.SkEr + size += 1 // m.Sa.Keys.SkErLen + size += 1 * 64 // m.Sa.Keys.SkPi + size += 1 // m.Sa.Keys.SkPiLen + size += 1 * 64 // m.Sa.Keys.SkPr + size += 1 // m.Sa.Keys.SkPrLen + size += 1 // m.Sa.IID.Type + size += 1 // m.Sa.IID.DataLen + size += 64 // m.Sa.IID.Data + size += 1 // m.Sa.RID.Type + size += 1 // m.Sa.RID.DataLen + size += 64 // m.Sa.RID.Data + size += 1 // m.Sa.Encryption.TransformType + size += 2 // m.Sa.Encryption.TransformID + size += 2 // m.Sa.Encryption.KeyLen + size += 2 // m.Sa.Encryption.KeyTrunc + size += 2 // m.Sa.Encryption.BlockSize + size += 1 // m.Sa.Encryption.DhGroup + size += 1 // m.Sa.Integrity.TransformType + size += 2 // m.Sa.Integrity.TransformID + size += 2 // m.Sa.Integrity.KeyLen + size += 2 // m.Sa.Integrity.KeyTrunc + size += 2 // m.Sa.Integrity.BlockSize + size += 1 // m.Sa.Integrity.DhGroup + size += 1 // m.Sa.Prf.TransformType + size += 2 // m.Sa.Prf.TransformID + size += 2 // m.Sa.Prf.KeyLen + size += 2 // m.Sa.Prf.KeyTrunc + size += 2 // m.Sa.Prf.BlockSize + size += 1 // m.Sa.Prf.DhGroup + size += 1 // m.Sa.Dh.TransformType + size += 2 // m.Sa.Dh.TransformID + size += 2 // m.Sa.Dh.KeyLen + size += 2 // m.Sa.Dh.KeyTrunc + size += 2 // m.Sa.Dh.BlockSize + size += 1 // m.Sa.Dh.DhGroup + size += 2 // m.Sa.Stats.NKeepalives + size += 2 // m.Sa.Stats.NRekeyReq + size += 2 // m.Sa.Stats.NSaInitReq + size += 2 // m.Sa.Stats.NSaAuthReq + size += 2 // m.Sa.Stats.NRetransmit + size += 2 // m.Sa.Stats.NInitSaRetransmit + return size +} +func (m *Ikev2SaDetails) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + buf.EncodeUint32(m.Sa.SaIndex) + buf.EncodeUint32(m.Sa.ProfileIndex) + buf.EncodeUint64(m.Sa.Ispi) + buf.EncodeUint64(m.Sa.Rspi) + buf.EncodeUint8(uint8(m.Sa.Iaddr.Af)) + buf.EncodeBytes(m.Sa.Iaddr.Un.XXX_UnionData[:], 16) + buf.EncodeUint8(uint8(m.Sa.Raddr.Af)) + buf.EncodeBytes(m.Sa.Raddr.Un.XXX_UnionData[:], 16) + buf.EncodeBytes(m.Sa.Keys.SkD, 64) + buf.EncodeUint8(m.Sa.Keys.SkDLen) + buf.EncodeBytes(m.Sa.Keys.SkAi, 64) + buf.EncodeUint8(m.Sa.Keys.SkAiLen) + buf.EncodeBytes(m.Sa.Keys.SkAr, 64) + buf.EncodeUint8(m.Sa.Keys.SkArLen) + buf.EncodeBytes(m.Sa.Keys.SkEi, 64) + buf.EncodeUint8(m.Sa.Keys.SkEiLen) + buf.EncodeBytes(m.Sa.Keys.SkEr, 64) + buf.EncodeUint8(m.Sa.Keys.SkErLen) + buf.EncodeBytes(m.Sa.Keys.SkPi, 64) + buf.EncodeUint8(m.Sa.Keys.SkPiLen) + buf.EncodeBytes(m.Sa.Keys.SkPr, 64) + buf.EncodeUint8(m.Sa.Keys.SkPrLen) + buf.EncodeUint8(m.Sa.IID.Type) + buf.EncodeUint8(m.Sa.IID.DataLen) + buf.EncodeString(m.Sa.IID.Data, 64) + buf.EncodeUint8(m.Sa.RID.Type) + buf.EncodeUint8(m.Sa.RID.DataLen) + buf.EncodeString(m.Sa.RID.Data, 64) + buf.EncodeUint8(m.Sa.Encryption.TransformType) + buf.EncodeUint16(m.Sa.Encryption.TransformID) + buf.EncodeUint16(m.Sa.Encryption.KeyLen) + buf.EncodeUint16(m.Sa.Encryption.KeyTrunc) + buf.EncodeUint16(m.Sa.Encryption.BlockSize) + buf.EncodeUint8(m.Sa.Encryption.DhGroup) + buf.EncodeUint8(m.Sa.Integrity.TransformType) + buf.EncodeUint16(m.Sa.Integrity.TransformID) + buf.EncodeUint16(m.Sa.Integrity.KeyLen) + buf.EncodeUint16(m.Sa.Integrity.KeyTrunc) + buf.EncodeUint16(m.Sa.Integrity.BlockSize) + buf.EncodeUint8(m.Sa.Integrity.DhGroup) + buf.EncodeUint8(m.Sa.Prf.TransformType) + buf.EncodeUint16(m.Sa.Prf.TransformID) + buf.EncodeUint16(m.Sa.Prf.KeyLen) + buf.EncodeUint16(m.Sa.Prf.KeyTrunc) + buf.EncodeUint16(m.Sa.Prf.BlockSize) + buf.EncodeUint8(m.Sa.Prf.DhGroup) + buf.EncodeUint8(m.Sa.Dh.TransformType) + buf.EncodeUint16(m.Sa.Dh.TransformID) + buf.EncodeUint16(m.Sa.Dh.KeyLen) + buf.EncodeUint16(m.Sa.Dh.KeyTrunc) + buf.EncodeUint16(m.Sa.Dh.BlockSize) + buf.EncodeUint8(m.Sa.Dh.DhGroup) + buf.EncodeUint16(m.Sa.Stats.NKeepalives) + buf.EncodeUint16(m.Sa.Stats.NRekeyReq) + buf.EncodeUint16(m.Sa.Stats.NSaInitReq) + buf.EncodeUint16(m.Sa.Stats.NSaAuthReq) + buf.EncodeUint16(m.Sa.Stats.NRetransmit) + buf.EncodeUint16(m.Sa.Stats.NInitSaRetransmit) + return buf.Bytes(), nil +} +func (m *Ikev2SaDetails) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + m.Sa.SaIndex = buf.DecodeUint32() + m.Sa.ProfileIndex = buf.DecodeUint32() + m.Sa.Ispi = buf.DecodeUint64() + m.Sa.Rspi = buf.DecodeUint64() + m.Sa.Iaddr.Af = ip_types.AddressFamily(buf.DecodeUint8()) + copy(m.Sa.Iaddr.Un.XXX_UnionData[:], buf.DecodeBytes(16)) + m.Sa.Raddr.Af = ip_types.AddressFamily(buf.DecodeUint8()) + copy(m.Sa.Raddr.Un.XXX_UnionData[:], buf.DecodeBytes(16)) + m.Sa.Keys.SkD = make([]byte, 64) + copy(m.Sa.Keys.SkD, buf.DecodeBytes(len(m.Sa.Keys.SkD))) + m.Sa.Keys.SkDLen = buf.DecodeUint8() + m.Sa.Keys.SkAi = make([]byte, 64) + copy(m.Sa.Keys.SkAi, buf.DecodeBytes(len(m.Sa.Keys.SkAi))) + m.Sa.Keys.SkAiLen = buf.DecodeUint8() + m.Sa.Keys.SkAr = make([]byte, 64) + copy(m.Sa.Keys.SkAr, buf.DecodeBytes(len(m.Sa.Keys.SkAr))) + m.Sa.Keys.SkArLen = buf.DecodeUint8() + m.Sa.Keys.SkEi = make([]byte, 64) + copy(m.Sa.Keys.SkEi, buf.DecodeBytes(len(m.Sa.Keys.SkEi))) + m.Sa.Keys.SkEiLen = buf.DecodeUint8() + m.Sa.Keys.SkEr = make([]byte, 64) + copy(m.Sa.Keys.SkEr, buf.DecodeBytes(len(m.Sa.Keys.SkEr))) + m.Sa.Keys.SkErLen = buf.DecodeUint8() + m.Sa.Keys.SkPi = make([]byte, 64) + copy(m.Sa.Keys.SkPi, buf.DecodeBytes(len(m.Sa.Keys.SkPi))) + m.Sa.Keys.SkPiLen = buf.DecodeUint8() + m.Sa.Keys.SkPr = make([]byte, 64) + copy(m.Sa.Keys.SkPr, buf.DecodeBytes(len(m.Sa.Keys.SkPr))) + m.Sa.Keys.SkPrLen = buf.DecodeUint8() + m.Sa.IID.Type = buf.DecodeUint8() + m.Sa.IID.DataLen = buf.DecodeUint8() + m.Sa.IID.Data = buf.DecodeString(64) + m.Sa.RID.Type = buf.DecodeUint8() + m.Sa.RID.DataLen = buf.DecodeUint8() + m.Sa.RID.Data = buf.DecodeString(64) + m.Sa.Encryption.TransformType = buf.DecodeUint8() + m.Sa.Encryption.TransformID = buf.DecodeUint16() + m.Sa.Encryption.KeyLen = buf.DecodeUint16() + m.Sa.Encryption.KeyTrunc = buf.DecodeUint16() + m.Sa.Encryption.BlockSize = buf.DecodeUint16() + m.Sa.Encryption.DhGroup = buf.DecodeUint8() + m.Sa.Integrity.TransformType = buf.DecodeUint8() + m.Sa.Integrity.TransformID = buf.DecodeUint16() + m.Sa.Integrity.KeyLen = buf.DecodeUint16() + m.Sa.Integrity.KeyTrunc = buf.DecodeUint16() + m.Sa.Integrity.BlockSize = buf.DecodeUint16() + m.Sa.Integrity.DhGroup = buf.DecodeUint8() + m.Sa.Prf.TransformType = buf.DecodeUint8() + m.Sa.Prf.TransformID = buf.DecodeUint16() + m.Sa.Prf.KeyLen = buf.DecodeUint16() + m.Sa.Prf.KeyTrunc = buf.DecodeUint16() + m.Sa.Prf.BlockSize = buf.DecodeUint16() + m.Sa.Prf.DhGroup = buf.DecodeUint8() + m.Sa.Dh.TransformType = buf.DecodeUint8() + m.Sa.Dh.TransformID = buf.DecodeUint16() + m.Sa.Dh.KeyLen = buf.DecodeUint16() + m.Sa.Dh.KeyTrunc = buf.DecodeUint16() + m.Sa.Dh.BlockSize = buf.DecodeUint16() + m.Sa.Dh.DhGroup = buf.DecodeUint8() + m.Sa.Stats.NKeepalives = buf.DecodeUint16() + m.Sa.Stats.NRekeyReq = buf.DecodeUint16() + m.Sa.Stats.NSaInitReq = buf.DecodeUint16() + m.Sa.Stats.NSaAuthReq = buf.DecodeUint16() + m.Sa.Stats.NRetransmit = buf.DecodeUint16() + m.Sa.Stats.NInitSaRetransmit = buf.DecodeUint16() + return nil +} + +// Ikev2SaDump defines message 'ikev2_sa_dump'. +// InProgress: the message form may change in the future versions +type Ikev2SaDump struct{} + +func (m *Ikev2SaDump) Reset() { *m = Ikev2SaDump{} } +func (*Ikev2SaDump) GetMessageName() string { return "ikev2_sa_dump" } +func (*Ikev2SaDump) GetCrcString() string { return "51077d14" } +func (*Ikev2SaDump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Ikev2SaDump) Size() (size int) { + if m == nil { + return 0 + } + return size +} +func (m *Ikev2SaDump) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + return buf.Bytes(), nil +} +func (m *Ikev2SaDump) Unmarshal(b []byte) error { + return nil +} + // Ikev2SetEspTransforms defines message 'ikev2_set_esp_transforms'. +// InProgress: the message form may change in the future versions type Ikev2SetEspTransforms struct { - Name string `binapi:"string[64],name=name" json:"name,omitempty"` - CryptoAlg uint32 `binapi:"u32,name=crypto_alg" json:"crypto_alg,omitempty"` - CryptoKeySize uint32 `binapi:"u32,name=crypto_key_size" json:"crypto_key_size,omitempty"` - IntegAlg uint32 `binapi:"u32,name=integ_alg" json:"integ_alg,omitempty"` - DhGroup uint32 `binapi:"u32,name=dh_group" json:"dh_group,omitempty"` + Name string `binapi:"string[64],name=name" json:"name,omitempty"` + Tr ikev2_types.Ikev2EspTransforms `binapi:"ikev2_esp_transforms,name=tr" json:"tr,omitempty"` } func (m *Ikev2SetEspTransforms) Reset() { *m = Ikev2SetEspTransforms{} } func (*Ikev2SetEspTransforms) GetMessageName() string { return "ikev2_set_esp_transforms" } -func (*Ikev2SetEspTransforms) GetCrcString() string { return "936a1a37" } +func (*Ikev2SetEspTransforms) GetCrcString() string { return "a63dc205" } func (*Ikev2SetEspTransforms) GetMessageType() api.MessageType { return api.RequestMessage } @@ -926,10 +1741,9 @@ func (m *Ikev2SetEspTransforms) Size() (size int) { return 0 } size += 64 // m.Name - size += 4 // m.CryptoAlg - size += 4 // m.CryptoKeySize - size += 4 // m.IntegAlg - size += 4 // m.DhGroup + size += 1 // m.Tr.CryptoAlg + size += 4 // m.Tr.CryptoKeySize + size += 1 // m.Tr.IntegAlg return size } func (m *Ikev2SetEspTransforms) Marshal(b []byte) ([]byte, error) { @@ -938,23 +1752,22 @@ func (m *Ikev2SetEspTransforms) Marshal(b []byte) ([]byte, error) { } buf := codec.NewBuffer(b) buf.EncodeString(m.Name, 64) - buf.EncodeUint32(m.CryptoAlg) - buf.EncodeUint32(m.CryptoKeySize) - buf.EncodeUint32(m.IntegAlg) - buf.EncodeUint32(m.DhGroup) + buf.EncodeUint8(m.Tr.CryptoAlg) + buf.EncodeUint32(m.Tr.CryptoKeySize) + buf.EncodeUint8(m.Tr.IntegAlg) return buf.Bytes(), nil } func (m *Ikev2SetEspTransforms) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Name = buf.DecodeString(64) - m.CryptoAlg = buf.DecodeUint32() - m.CryptoKeySize = buf.DecodeUint32() - m.IntegAlg = buf.DecodeUint32() - m.DhGroup = buf.DecodeUint32() + m.Tr.CryptoAlg = buf.DecodeUint8() + m.Tr.CryptoKeySize = buf.DecodeUint32() + m.Tr.IntegAlg = buf.DecodeUint8() return nil } // Ikev2SetEspTransformsReply defines message 'ikev2_set_esp_transforms_reply'. +// InProgress: the message form may change in the future versions type Ikev2SetEspTransformsReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -988,17 +1801,15 @@ func (m *Ikev2SetEspTransformsReply) Unmarshal(b []byte) error { } // Ikev2SetIkeTransforms defines message 'ikev2_set_ike_transforms'. +// InProgress: the message form may change in the future versions type Ikev2SetIkeTransforms struct { - Name string `binapi:"string[64],name=name" json:"name,omitempty"` - CryptoAlg uint32 `binapi:"u32,name=crypto_alg" json:"crypto_alg,omitempty"` - CryptoKeySize uint32 `binapi:"u32,name=crypto_key_size" json:"crypto_key_size,omitempty"` - IntegAlg uint32 `binapi:"u32,name=integ_alg" json:"integ_alg,omitempty"` - DhGroup uint32 `binapi:"u32,name=dh_group" json:"dh_group,omitempty"` + Name string `binapi:"string[64],name=name" json:"name,omitempty"` + Tr ikev2_types.Ikev2IkeTransforms `binapi:"ikev2_ike_transforms,name=tr" json:"tr,omitempty"` } func (m *Ikev2SetIkeTransforms) Reset() { *m = Ikev2SetIkeTransforms{} } func (*Ikev2SetIkeTransforms) GetMessageName() string { return "ikev2_set_ike_transforms" } -func (*Ikev2SetIkeTransforms) GetCrcString() string { return "936a1a37" } +func (*Ikev2SetIkeTransforms) GetCrcString() string { return "076d7378" } func (*Ikev2SetIkeTransforms) GetMessageType() api.MessageType { return api.RequestMessage } @@ -1008,10 +1819,10 @@ func (m *Ikev2SetIkeTransforms) Size() (size int) { return 0 } size += 64 // m.Name - size += 4 // m.CryptoAlg - size += 4 // m.CryptoKeySize - size += 4 // m.IntegAlg - size += 4 // m.DhGroup + size += 1 // m.Tr.CryptoAlg + size += 4 // m.Tr.CryptoKeySize + size += 1 // m.Tr.IntegAlg + size += 1 // m.Tr.DhGroup return size } func (m *Ikev2SetIkeTransforms) Marshal(b []byte) ([]byte, error) { @@ -1020,23 +1831,24 @@ func (m *Ikev2SetIkeTransforms) Marshal(b []byte) ([]byte, error) { } buf := codec.NewBuffer(b) buf.EncodeString(m.Name, 64) - buf.EncodeUint32(m.CryptoAlg) - buf.EncodeUint32(m.CryptoKeySize) - buf.EncodeUint32(m.IntegAlg) - buf.EncodeUint32(m.DhGroup) + buf.EncodeUint8(m.Tr.CryptoAlg) + buf.EncodeUint32(m.Tr.CryptoKeySize) + buf.EncodeUint8(m.Tr.IntegAlg) + buf.EncodeUint8(m.Tr.DhGroup) return buf.Bytes(), nil } func (m *Ikev2SetIkeTransforms) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Name = buf.DecodeString(64) - m.CryptoAlg = buf.DecodeUint32() - m.CryptoKeySize = buf.DecodeUint32() - m.IntegAlg = buf.DecodeUint32() - m.DhGroup = buf.DecodeUint32() + m.Tr.CryptoAlg = buf.DecodeUint8() + m.Tr.CryptoKeySize = buf.DecodeUint32() + m.Tr.IntegAlg = buf.DecodeUint8() + m.Tr.DhGroup = buf.DecodeUint8() return nil } // Ikev2SetIkeTransformsReply defines message 'ikev2_set_ike_transforms_reply'. +// InProgress: the message form may change in the future versions type Ikev2SetIkeTransformsReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -1070,6 +1882,7 @@ func (m *Ikev2SetIkeTransformsReply) Unmarshal(b []byte) error { } // Ikev2SetLocalKey defines message 'ikev2_set_local_key'. +// InProgress: the message form may change in the future versions type Ikev2SetLocalKey struct { KeyFile string `binapi:"string[256],name=key_file" json:"key_file,omitempty"` } @@ -1103,6 +1916,7 @@ func (m *Ikev2SetLocalKey) Unmarshal(b []byte) error { } // Ikev2SetLocalKeyReply defines message 'ikev2_set_local_key_reply'. +// InProgress: the message form may change in the future versions type Ikev2SetLocalKeyReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -1136,15 +1950,15 @@ func (m *Ikev2SetLocalKeyReply) Unmarshal(b []byte) error { } // Ikev2SetResponder defines message 'ikev2_set_responder'. +// InProgress: the message form may change in the future versions type Ikev2SetResponder struct { - Name string `binapi:"string[64],name=name" json:"name,omitempty"` - SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` - Address ip_types.IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"` + Name string `binapi:"string[64],name=name" json:"name,omitempty"` + Responder ikev2_types.Ikev2Responder `binapi:"ikev2_responder,name=responder" json:"responder,omitempty"` } func (m *Ikev2SetResponder) Reset() { *m = Ikev2SetResponder{} } func (*Ikev2SetResponder) GetMessageName() string { return "ikev2_set_responder" } -func (*Ikev2SetResponder) GetCrcString() string { return "f0d3dc80" } +func (*Ikev2SetResponder) GetCrcString() string { return "a2055df1" } func (*Ikev2SetResponder) GetMessageType() api.MessageType { return api.RequestMessage } @@ -1153,9 +1967,10 @@ func (m *Ikev2SetResponder) Size() (size int) { if m == nil { return 0 } - size += 64 // m.Name - size += 4 // m.SwIfIndex - size += 1 * 4 // m.Address + size += 64 // m.Name + size += 4 // m.Responder.SwIfIndex + size += 1 // m.Responder.Addr.Af + size += 1 * 16 // m.Responder.Addr.Un return size } func (m *Ikev2SetResponder) Marshal(b []byte) ([]byte, error) { @@ -1164,19 +1979,100 @@ func (m *Ikev2SetResponder) Marshal(b []byte) ([]byte, error) { } buf := codec.NewBuffer(b) buf.EncodeString(m.Name, 64) - buf.EncodeUint32(uint32(m.SwIfIndex)) - buf.EncodeBytes(m.Address[:], 4) + buf.EncodeUint32(uint32(m.Responder.SwIfIndex)) + buf.EncodeUint8(uint8(m.Responder.Addr.Af)) + buf.EncodeBytes(m.Responder.Addr.Un.XXX_UnionData[:], 16) return buf.Bytes(), nil } func (m *Ikev2SetResponder) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Name = buf.DecodeString(64) + m.Responder.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + m.Responder.Addr.Af = ip_types.AddressFamily(buf.DecodeUint8()) + copy(m.Responder.Addr.Un.XXX_UnionData[:], buf.DecodeBytes(16)) + return nil +} + +// Ikev2SetResponderHostname defines message 'ikev2_set_responder_hostname'. +// InProgress: the message form may change in the future versions +type Ikev2SetResponderHostname struct { + Name string `binapi:"string[64],name=name" json:"name,omitempty"` + Hostname string `binapi:"string[64],name=hostname" json:"hostname,omitempty"` + SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` +} + +func (m *Ikev2SetResponderHostname) Reset() { *m = Ikev2SetResponderHostname{} } +func (*Ikev2SetResponderHostname) GetMessageName() string { return "ikev2_set_responder_hostname" } +func (*Ikev2SetResponderHostname) GetCrcString() string { return "350d6949" } +func (*Ikev2SetResponderHostname) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Ikev2SetResponderHostname) Size() (size int) { + if m == nil { + return 0 + } + size += 64 // m.Name + size += 64 // m.Hostname + size += 4 // m.SwIfIndex + return size +} +func (m *Ikev2SetResponderHostname) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeString(m.Name, 64) + buf.EncodeString(m.Hostname, 64) + buf.EncodeUint32(uint32(m.SwIfIndex)) + return buf.Bytes(), nil +} +func (m *Ikev2SetResponderHostname) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Name = buf.DecodeString(64) + m.Hostname = buf.DecodeString(64) m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) - copy(m.Address[:], buf.DecodeBytes(4)) + return nil +} + +// Ikev2SetResponderHostnameReply defines message 'ikev2_set_responder_hostname_reply'. +// InProgress: the message form may change in the future versions +type Ikev2SetResponderHostnameReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *Ikev2SetResponderHostnameReply) Reset() { *m = Ikev2SetResponderHostnameReply{} } +func (*Ikev2SetResponderHostnameReply) GetMessageName() string { + return "ikev2_set_responder_hostname_reply" +} +func (*Ikev2SetResponderHostnameReply) GetCrcString() string { return "e8d4e804" } +func (*Ikev2SetResponderHostnameReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Ikev2SetResponderHostnameReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *Ikev2SetResponderHostnameReply) 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 *Ikev2SetResponderHostnameReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() return nil } // Ikev2SetResponderReply defines message 'ikev2_set_responder_reply'. +// InProgress: the message form may change in the future versions type Ikev2SetResponderReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -1210,6 +2106,7 @@ func (m *Ikev2SetResponderReply) Unmarshal(b []byte) error { } // Ikev2SetSaLifetime defines message 'ikev2_set_sa_lifetime'. +// InProgress: the message form may change in the future versions type Ikev2SetSaLifetime struct { Name string `binapi:"string[64],name=name" json:"name,omitempty"` Lifetime uint64 `binapi:"u64,name=lifetime" json:"lifetime,omitempty"` @@ -1259,6 +2156,7 @@ func (m *Ikev2SetSaLifetime) Unmarshal(b []byte) error { } // Ikev2SetSaLifetimeReply defines message 'ikev2_set_sa_lifetime_reply'. +// InProgress: the message form may change in the future versions type Ikev2SetSaLifetimeReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -1292,6 +2190,7 @@ func (m *Ikev2SetSaLifetimeReply) Unmarshal(b []byte) error { } // Ikev2SetTunnelInterface defines message 'ikev2_set_tunnel_interface'. +// InProgress: the message form may change in the future versions type Ikev2SetTunnelInterface struct { Name string `binapi:"string[64],name=name" json:"name,omitempty"` SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1329,6 +2228,7 @@ func (m *Ikev2SetTunnelInterface) Unmarshal(b []byte) error { } // Ikev2SetTunnelInterfaceReply defines message 'ikev2_set_tunnel_interface_reply'. +// InProgress: the message form may change in the future versions type Ikev2SetTunnelInterfaceReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -1363,8 +2263,117 @@ func (m *Ikev2SetTunnelInterfaceReply) Unmarshal(b []byte) error { return nil } +// Ikev2TrafficSelectorDetails defines message 'ikev2_traffic_selector_details'. +// InProgress: the message form may change in the future versions +type Ikev2TrafficSelectorDetails struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` + Ts ikev2_types.Ikev2Ts `binapi:"ikev2_ts,name=ts" json:"ts,omitempty"` +} + +func (m *Ikev2TrafficSelectorDetails) Reset() { *m = Ikev2TrafficSelectorDetails{} } +func (*Ikev2TrafficSelectorDetails) GetMessageName() string { return "ikev2_traffic_selector_details" } +func (*Ikev2TrafficSelectorDetails) GetCrcString() string { return "518cb06f" } +func (*Ikev2TrafficSelectorDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Ikev2TrafficSelectorDetails) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + size += 4 // m.Ts.SaIndex + size += 4 // m.Ts.ChildSaIndex + size += 1 // m.Ts.IsLocal + size += 1 // m.Ts.ProtocolID + size += 2 // m.Ts.StartPort + size += 2 // m.Ts.EndPort + size += 1 // m.Ts.StartAddr.Af + size += 1 * 16 // m.Ts.StartAddr.Un + size += 1 // m.Ts.EndAddr.Af + size += 1 * 16 // m.Ts.EndAddr.Un + return size +} +func (m *Ikev2TrafficSelectorDetails) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + buf.EncodeUint32(m.Ts.SaIndex) + buf.EncodeUint32(m.Ts.ChildSaIndex) + buf.EncodeBool(m.Ts.IsLocal) + buf.EncodeUint8(m.Ts.ProtocolID) + buf.EncodeUint16(m.Ts.StartPort) + buf.EncodeUint16(m.Ts.EndPort) + buf.EncodeUint8(uint8(m.Ts.StartAddr.Af)) + buf.EncodeBytes(m.Ts.StartAddr.Un.XXX_UnionData[:], 16) + buf.EncodeUint8(uint8(m.Ts.EndAddr.Af)) + buf.EncodeBytes(m.Ts.EndAddr.Un.XXX_UnionData[:], 16) + return buf.Bytes(), nil +} +func (m *Ikev2TrafficSelectorDetails) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + m.Ts.SaIndex = buf.DecodeUint32() + m.Ts.ChildSaIndex = buf.DecodeUint32() + m.Ts.IsLocal = buf.DecodeBool() + m.Ts.ProtocolID = buf.DecodeUint8() + m.Ts.StartPort = buf.DecodeUint16() + m.Ts.EndPort = buf.DecodeUint16() + m.Ts.StartAddr.Af = ip_types.AddressFamily(buf.DecodeUint8()) + copy(m.Ts.StartAddr.Un.XXX_UnionData[:], buf.DecodeBytes(16)) + m.Ts.EndAddr.Af = ip_types.AddressFamily(buf.DecodeUint8()) + copy(m.Ts.EndAddr.Un.XXX_UnionData[:], buf.DecodeBytes(16)) + return nil +} + +// Ikev2TrafficSelectorDump defines message 'ikev2_traffic_selector_dump'. +// InProgress: the message form may change in the future versions +type Ikev2TrafficSelectorDump struct { + IsInitiator bool `binapi:"bool,name=is_initiator" json:"is_initiator,omitempty"` + SaIndex uint32 `binapi:"u32,name=sa_index" json:"sa_index,omitempty"` + ChildSaIndex uint32 `binapi:"u32,name=child_sa_index" json:"child_sa_index,omitempty"` +} + +func (m *Ikev2TrafficSelectorDump) Reset() { *m = Ikev2TrafficSelectorDump{} } +func (*Ikev2TrafficSelectorDump) GetMessageName() string { return "ikev2_traffic_selector_dump" } +func (*Ikev2TrafficSelectorDump) GetCrcString() string { return "a7385e33" } +func (*Ikev2TrafficSelectorDump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Ikev2TrafficSelectorDump) Size() (size int) { + if m == nil { + return 0 + } + size += 1 // m.IsInitiator + size += 4 // m.SaIndex + size += 4 // m.ChildSaIndex + return size +} +func (m *Ikev2TrafficSelectorDump) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBool(m.IsInitiator) + buf.EncodeUint32(m.SaIndex) + buf.EncodeUint32(m.ChildSaIndex) + return buf.Bytes(), nil +} +func (m *Ikev2TrafficSelectorDump) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.IsInitiator = buf.DecodeBool() + m.SaIndex = buf.DecodeUint32() + m.ChildSaIndex = buf.DecodeUint32() + return nil +} + func init() { file_ikev2_binapi_init() } func file_ikev2_binapi_init() { + api.RegisterMessage((*Ikev2ChildSaDetails)(nil), "ikev2_child_sa_details_ff67741f") + api.RegisterMessage((*Ikev2ChildSaDump)(nil), "ikev2_child_sa_dump_01eab609") api.RegisterMessage((*Ikev2InitiateDelChildSa)(nil), "ikev2_initiate_del_child_sa_7f004d2e") api.RegisterMessage((*Ikev2InitiateDelChildSaReply)(nil), "ikev2_initiate_del_child_sa_reply_e8d4e804") api.RegisterMessage((*Ikev2InitiateDelIkeSa)(nil), "ikev2_initiate_del_ike_sa_8d125bdd") @@ -1373,10 +2382,16 @@ func file_ikev2_binapi_init() { api.RegisterMessage((*Ikev2InitiateRekeyChildSaReply)(nil), "ikev2_initiate_rekey_child_sa_reply_e8d4e804") api.RegisterMessage((*Ikev2InitiateSaInit)(nil), "ikev2_initiate_sa_init_ebf79a66") api.RegisterMessage((*Ikev2InitiateSaInitReply)(nil), "ikev2_initiate_sa_init_reply_e8d4e804") + api.RegisterMessage((*Ikev2NonceGet)(nil), "ikev2_nonce_get_7fe9ad51") + api.RegisterMessage((*Ikev2NonceGetReply)(nil), "ikev2_nonce_get_reply_1b37a342") api.RegisterMessage((*Ikev2PluginGetVersion)(nil), "ikev2_plugin_get_version_51077d14") api.RegisterMessage((*Ikev2PluginGetVersionReply)(nil), "ikev2_plugin_get_version_reply_9b32cf86") api.RegisterMessage((*Ikev2ProfileAddDel)(nil), "ikev2_profile_add_del_2c925b55") api.RegisterMessage((*Ikev2ProfileAddDelReply)(nil), "ikev2_profile_add_del_reply_e8d4e804") + api.RegisterMessage((*Ikev2ProfileDetails)(nil), "ikev2_profile_details_670d01d9") + api.RegisterMessage((*Ikev2ProfileDisableNatt)(nil), "ikev2_profile_disable_natt_ebf79a66") + api.RegisterMessage((*Ikev2ProfileDisableNattReply)(nil), "ikev2_profile_disable_natt_reply_e8d4e804") + api.RegisterMessage((*Ikev2ProfileDump)(nil), "ikev2_profile_dump_51077d14") api.RegisterMessage((*Ikev2ProfileSetAuth)(nil), "ikev2_profile_set_auth_642c97cd") api.RegisterMessage((*Ikev2ProfileSetAuthReply)(nil), "ikev2_profile_set_auth_reply_e8d4e804") api.RegisterMessage((*Ikev2ProfileSetID)(nil), "ikev2_profile_set_id_4d7e2418") @@ -1385,27 +2400,35 @@ func file_ikev2_binapi_init() { api.RegisterMessage((*Ikev2ProfileSetIpsecUDPPortReply)(nil), "ikev2_profile_set_ipsec_udp_port_reply_e8d4e804") api.RegisterMessage((*Ikev2ProfileSetLiveness)(nil), "ikev2_profile_set_liveness_6bdf4d65") api.RegisterMessage((*Ikev2ProfileSetLivenessReply)(nil), "ikev2_profile_set_liveness_reply_e8d4e804") - api.RegisterMessage((*Ikev2ProfileSetTs)(nil), "ikev2_profile_set_ts_64d55c16") + api.RegisterMessage((*Ikev2ProfileSetTs)(nil), "ikev2_profile_set_ts_8eb8cfd1") api.RegisterMessage((*Ikev2ProfileSetTsReply)(nil), "ikev2_profile_set_ts_reply_e8d4e804") api.RegisterMessage((*Ikev2ProfileSetUDPEncap)(nil), "ikev2_profile_set_udp_encap_ebf79a66") api.RegisterMessage((*Ikev2ProfileSetUDPEncapReply)(nil), "ikev2_profile_set_udp_encap_reply_e8d4e804") - api.RegisterMessage((*Ikev2SetEspTransforms)(nil), "ikev2_set_esp_transforms_936a1a37") + api.RegisterMessage((*Ikev2SaDetails)(nil), "ikev2_sa_details_937c22d5") + api.RegisterMessage((*Ikev2SaDump)(nil), "ikev2_sa_dump_51077d14") + api.RegisterMessage((*Ikev2SetEspTransforms)(nil), "ikev2_set_esp_transforms_a63dc205") api.RegisterMessage((*Ikev2SetEspTransformsReply)(nil), "ikev2_set_esp_transforms_reply_e8d4e804") - api.RegisterMessage((*Ikev2SetIkeTransforms)(nil), "ikev2_set_ike_transforms_936a1a37") + api.RegisterMessage((*Ikev2SetIkeTransforms)(nil), "ikev2_set_ike_transforms_076d7378") api.RegisterMessage((*Ikev2SetIkeTransformsReply)(nil), "ikev2_set_ike_transforms_reply_e8d4e804") api.RegisterMessage((*Ikev2SetLocalKey)(nil), "ikev2_set_local_key_799b69ec") api.RegisterMessage((*Ikev2SetLocalKeyReply)(nil), "ikev2_set_local_key_reply_e8d4e804") - api.RegisterMessage((*Ikev2SetResponder)(nil), "ikev2_set_responder_f0d3dc80") + api.RegisterMessage((*Ikev2SetResponder)(nil), "ikev2_set_responder_a2055df1") + api.RegisterMessage((*Ikev2SetResponderHostname)(nil), "ikev2_set_responder_hostname_350d6949") + api.RegisterMessage((*Ikev2SetResponderHostnameReply)(nil), "ikev2_set_responder_hostname_reply_e8d4e804") api.RegisterMessage((*Ikev2SetResponderReply)(nil), "ikev2_set_responder_reply_e8d4e804") api.RegisterMessage((*Ikev2SetSaLifetime)(nil), "ikev2_set_sa_lifetime_7039feaa") api.RegisterMessage((*Ikev2SetSaLifetimeReply)(nil), "ikev2_set_sa_lifetime_reply_e8d4e804") api.RegisterMessage((*Ikev2SetTunnelInterface)(nil), "ikev2_set_tunnel_interface_ca67182c") api.RegisterMessage((*Ikev2SetTunnelInterfaceReply)(nil), "ikev2_set_tunnel_interface_reply_e8d4e804") + api.RegisterMessage((*Ikev2TrafficSelectorDetails)(nil), "ikev2_traffic_selector_details_518cb06f") + api.RegisterMessage((*Ikev2TrafficSelectorDump)(nil), "ikev2_traffic_selector_dump_a7385e33") } // Messages returns list of all messages in this module. func AllMessages() []api.Message { return []api.Message{ + (*Ikev2ChildSaDetails)(nil), + (*Ikev2ChildSaDump)(nil), (*Ikev2InitiateDelChildSa)(nil), (*Ikev2InitiateDelChildSaReply)(nil), (*Ikev2InitiateDelIkeSa)(nil), @@ -1414,10 +2437,16 @@ func AllMessages() []api.Message { (*Ikev2InitiateRekeyChildSaReply)(nil), (*Ikev2InitiateSaInit)(nil), (*Ikev2InitiateSaInitReply)(nil), + (*Ikev2NonceGet)(nil), + (*Ikev2NonceGetReply)(nil), (*Ikev2PluginGetVersion)(nil), (*Ikev2PluginGetVersionReply)(nil), (*Ikev2ProfileAddDel)(nil), (*Ikev2ProfileAddDelReply)(nil), + (*Ikev2ProfileDetails)(nil), + (*Ikev2ProfileDisableNatt)(nil), + (*Ikev2ProfileDisableNattReply)(nil), + (*Ikev2ProfileDump)(nil), (*Ikev2ProfileSetAuth)(nil), (*Ikev2ProfileSetAuthReply)(nil), (*Ikev2ProfileSetID)(nil), @@ -1430,6 +2459,8 @@ func AllMessages() []api.Message { (*Ikev2ProfileSetTsReply)(nil), (*Ikev2ProfileSetUDPEncap)(nil), (*Ikev2ProfileSetUDPEncapReply)(nil), + (*Ikev2SaDetails)(nil), + (*Ikev2SaDump)(nil), (*Ikev2SetEspTransforms)(nil), (*Ikev2SetEspTransformsReply)(nil), (*Ikev2SetIkeTransforms)(nil), @@ -1437,10 +2468,14 @@ func AllMessages() []api.Message { (*Ikev2SetLocalKey)(nil), (*Ikev2SetLocalKeyReply)(nil), (*Ikev2SetResponder)(nil), + (*Ikev2SetResponderHostname)(nil), + (*Ikev2SetResponderHostnameReply)(nil), (*Ikev2SetResponderReply)(nil), (*Ikev2SetSaLifetime)(nil), (*Ikev2SetSaLifetimeReply)(nil), (*Ikev2SetTunnelInterface)(nil), (*Ikev2SetTunnelInterfaceReply)(nil), + (*Ikev2TrafficSelectorDetails)(nil), + (*Ikev2TrafficSelectorDump)(nil), } }