// Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: // binapi-generator: v0.6.0-dev // VPP: 22.02-release // source: /usr/share/vpp/api/plugins/ikev2.api.json // Package ikev2 contains generated bindings for API file ikev2.api. // // Contents: // 50 messages // package ikev2 import ( api "go.fd.io/govpp/api" ikev2_types "go.fd.io/govpp/binapi/ikev2_types" interface_types "go.fd.io/govpp/binapi/interface_types" ip_types "go.fd.io/govpp/binapi/ip_types" codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the GoVPP api package it is being compiled against. // A compilation error at this line likely means your copy of the // GoVPP api package needs to be updated. const _ = api.GoVppAPIPackageIsVersion2 const ( APIFile = "ikev2" APIVersion = "1.0.1" 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"` } func (m *Ikev2InitiateDelChildSa) Reset() { *m = Ikev2InitiateDelChildSa{} } func (*Ikev2InitiateDelChildSa) GetMessageName() string { return "ikev2_initiate_del_child_sa" } func (*Ikev2InitiateDelChildSa) GetCrcString() string { return "7f004d2e" } func (*Ikev2InitiateDelChildSa) GetMessageType() api.MessageType { return api.RequestMessage } func (m *Ikev2InitiateDelChildSa) Size() (size int) { if m == nil { return 0 } size += 4 // m.Ispi return size } func (m *Ikev2InitiateDelChildSa) Marshal(b []byte) ([]byte, error) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) buf.EncodeUint32(m.Ispi) return buf.Bytes(), nil } func (m *Ikev2InitiateDelChildSa) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Ispi = buf.DecodeUint32() return nil } // 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"` } func (m *Ikev2InitiateDelChildSaReply) Reset() { *m = Ikev2InitiateDelChildSaReply{} } func (*Ikev2InitiateDelChildSaReply) GetMessageName() string { return "ikev2_initiate_del_child_sa_reply" } func (*Ikev2InitiateDelChildSaReply) GetCrcString() string { return "e8d4e804" } func (*Ikev2InitiateDelChildSaReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *Ikev2InitiateDelChildSaReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval return size } func (m *Ikev2InitiateDelChildSaReply) 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 *Ikev2InitiateDelChildSaReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Retval = buf.DecodeInt32() return nil } // 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"` } func (m *Ikev2InitiateDelIkeSa) Reset() { *m = Ikev2InitiateDelIkeSa{} } func (*Ikev2InitiateDelIkeSa) GetMessageName() string { return "ikev2_initiate_del_ike_sa" } func (*Ikev2InitiateDelIkeSa) GetCrcString() string { return "8d125bdd" } func (*Ikev2InitiateDelIkeSa) GetMessageType() api.MessageType { return api.RequestMessage } func (m *Ikev2InitiateDelIkeSa) Size() (size int) { if m == nil { return 0 } size += 8 // m.Ispi return size } func (m *Ikev2InitiateDelIkeSa) Marshal(b []byte) ([]byte, error) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) buf.EncodeUint64(m.Ispi) return buf.Bytes(), nil } func (m *Ikev2InitiateDelIkeSa) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Ispi = buf.DecodeUint64() return nil } // 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"` } func (m *Ikev2InitiateDelIkeSaReply) Reset() { *m = Ikev2InitiateDelIkeSaReply{} } func (*Ikev2InitiateDelIkeSaReply) GetMessageName() string { return "ikev2_initiate_del_ike_sa_reply" } func (*Ikev2InitiateDelIkeSaReply) GetCrcString() string { return "e8d4e804" } func (*Ikev2InitiateDelIkeSaReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *Ikev2InitiateDelIkeSaReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval return size } func (m *Ikev2InitiateDelIkeSaReply) 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 *Ikev2InitiateDelIkeSaReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Retval = buf.DecodeInt32() return nil } // 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"` } func (m *Ikev2InitiateRekeyChildSa) Reset() { *m = Ikev2InitiateRekeyChildSa{} } func (*Ikev2InitiateRekeyChildSa) GetMessageName() string { return "ikev2_initiate_rekey_child_sa" } func (*Ikev2InitiateRekeyChildSa) GetCrcString() string { return "7f004d2e" } func (*Ikev2InitiateRekeyChildSa) GetMessageType() api.MessageType { return api.RequestMessage } func (m *Ikev2InitiateRekeyChildSa) Size() (size int) { if m == nil { return 0 } size += 4 // m.Ispi return size } func (m *Ikev2InitiateRekeyChildSa) Marshal(b []byte) ([]byte, error) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) buf.EncodeUint32(m.Ispi) return buf.Bytes(), nil } func (m *Ikev2InitiateRekeyChildSa) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Ispi = buf.DecodeUint32() return nil } // 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"` } func (m *Ikev2InitiateRekeyChildSaReply) Reset() { *m = Ikev2InitiateRekeyChildSaReply{} } func (*Ikev2InitiateRekeyChildSaReply) GetMessageName() string { return "ikev2_initiate_rekey_child_sa_reply" } func (*Ikev2InitiateRekeyChildSaReply) GetCrcString() string { return "e8d4e804" } func (*Ikev2InitiateRekeyChildSaReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *Ikev2InitiateRekeyChildSaReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval return size } func (m *Ikev2InitiateRekeyChildSaReply) 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 *Ikev2InitiateRekeyChildSaReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Retval = buf.DecodeInt32() return nil } // 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"` } func (m *Ikev2InitiateSaInit) Reset() { *m = Ikev2InitiateSaInit{} } func (*Ikev2InitiateSaInit) GetMessageName() string { return "ikev2_initiate_sa_init" } func (*Ikev2InitiateSaInit) GetCrcString() string { return "ebf79a66" } func (*Ikev2InitiateSaInit) GetMessageType() api.MessageType { return api.RequestMessage } func (m *Ikev2InitiateSaInit) Size() (size int) { if m == nil { return 0 } size += 64 // m.Name return size } func (m *Ikev2InitiateSaInit) 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 *Ikev2InitiateSaInit) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Name = buf.DecodeString(64) return nil } // 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"` } func (m *Ikev2InitiateSaInitReply) Reset() { *m = Ikev2InitiateSaInitReply{} } func (*Ikev2InitiateSaInitReply) GetMessageName() string { return "ikev2_initiate_sa_init_reply" } func (*Ikev2InitiateSaInitReply) GetCrcString() string { return "e8d4e804" } func (*Ikev2InitiateSaInitReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *Ikev2InitiateSaInitReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval return size } func (m *Ikev2InitiateSaInitReply) 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 *Ikev2InitiateSaInitReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Retval = buf.DecodeInt32() 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{} func (m *Ikev2PluginGetVersion) Reset() { *m = Ikev2PluginGetVersion{} } func (*Ikev2PluginGetVersion) GetMessageName() string { return "ikev2_plugin_get_version" } func (*Ikev2PluginGetVersion) GetCrcString() string { return "51077d14" } func (*Ikev2PluginGetVersion) GetMessageType() api.MessageType { return api.RequestMessage } func (m *Ikev2PluginGetVersion) Size() (size int) { if m == nil { return 0 } return size } func (m *Ikev2PluginGetVersion) Marshal(b []byte) ([]byte, error) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) return buf.Bytes(), nil } func (m *Ikev2PluginGetVersion) Unmarshal(b []byte) error { return nil } // Ikev2PluginGetVersionReply defines message 'ikev2_plugin_get_version_reply'. type Ikev2PluginGetVersionReply struct { Major uint32 `binapi:"u32,name=major" json:"major,omitempty"` Minor uint32 `binapi:"u32,name=minor" json:"minor,omitempty"` } func (m *Ikev2PluginGetVersionReply) Reset() { *m = Ikev2PluginGetVersionReply{} } func (*Ikev2PluginGetVersionReply) GetMessageName() string { return "ikev2_plugin_get_version_reply" } func (*Ikev2PluginGetVersionReply) GetCrcString() string { return "9b32cf86" } func (*Ikev2PluginGetVersionReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *Ikev2PluginGetVersionReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Major size += 4 // m.Minor return size } func (m *Ikev2PluginGetVersionReply) Marshal(b []byte) ([]byte, error) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) buf.EncodeUint32(m.Major) buf.EncodeUint32(m.Minor) return buf.Bytes(), nil } func (m *Ikev2PluginGetVersionReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Major = buf.DecodeUint32() m.Minor = buf.DecodeUint32() return nil } // 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"` } func (m *Ikev2ProfileAddDel) Reset() { *m = Ikev2ProfileAddDel{} } func (*Ikev2ProfileAddDel) GetMessageName() string { return "ikev2_profile_add_del" } func (*Ikev2ProfileAddDel) GetCrcString() string { return "2c925b55" } func (*Ikev2ProfileAddDel) GetMessageType() api.MessageType { return api.RequestMessage } func (m *Ikev2ProfileAddDel) Size() (size int) { if m == nil { return 0 } size += 64 // m.Name size += 1 // m.IsAdd return size } func (m *Ikev2ProfileAddDel) Marshal(b []byte) ([]byte, error) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) buf.EncodeString(m.Name, 64) buf.EncodeBool(m.IsAdd) return buf.Bytes(), nil } func (m *Ikev2ProfileAddDel) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Name = buf.DecodeString(64) m.IsAdd = buf.DecodeBool() return nil } // 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"` } func (m *Ikev2ProfileAddDelReply) Reset() { *m = Ikev2ProfileAddDelReply{} } func (*Ikev2ProfileAddDelReply) GetMessageName() string { return "ikev2_profile_add_del_reply" } func (*Ikev2ProfileAddDelReply) GetCrcString() string { return "e8d4e804" } func (*Ikev2ProfileAddDelReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *Ikev2ProfileAddDelReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval return size } func (m *Ikev2ProfileAddDelReply) 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 *Ikev2ProfileAddDelReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Retval = buf.DecodeInt32() 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"` IsHex bool `binapi:"bool,name=is_hex" json:"is_hex,omitempty"` DataLen uint32 `binapi:"u32,name=data_len" json:"-"` Data []byte `binapi:"u8[data_len],name=data" json:"data,omitempty"` } func (m *Ikev2ProfileSetAuth) Reset() { *m = Ikev2ProfileSetAuth{} } func (*Ikev2ProfileSetAuth) GetMessageName() string { return "ikev2_profile_set_auth" } func (*Ikev2ProfileSetAuth) GetCrcString() string { return "642c97cd" } func (*Ikev2ProfileSetAuth) GetMessageType() api.MessageType { return api.RequestMessage } func (m *Ikev2ProfileSetAuth) Size() (size int) { if m == nil { return 0 } size += 64 // m.Name size += 1 // m.AuthMethod size += 1 // m.IsHex size += 4 // m.DataLen size += 1 * len(m.Data) // m.Data return size } func (m *Ikev2ProfileSetAuth) Marshal(b []byte) ([]byte, error) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) buf.EncodeString(m.Name, 64) buf.EncodeUint8(m.AuthMethod) buf.EncodeBool(m.IsHex) buf.EncodeUint32(uint32(len(m.Data))) buf.EncodeBytes(m.Data, 0) return buf.Bytes(), nil } func (m *Ikev2ProfileSetAuth) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Name = buf.DecodeString(64) m.AuthMethod = buf.DecodeUint8() m.IsHex = buf.DecodeBool() m.DataLen = buf.DecodeUint32() m.Data = make([]byte, m.DataLen) copy(m.Data, buf.DecodeBytes(len(m.Data))) return nil } // 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"` } func (m *Ikev2ProfileSetAuthReply) Reset() { *m = Ikev2ProfileSetAuthReply{} } func (*Ikev2ProfileSetAuthReply) GetMessageName() string { return "ikev2_profile_set_auth_reply" } func (*Ikev2ProfileSetAuthReply) GetCrcString() string { return "e8d4e804" } func (*Ikev2ProfileSetAuthReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *Ikev2ProfileSetAuthReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval return size } func (m *Ikev2ProfileSetAuthReply) 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 *Ikev2ProfileSetAuthReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Retval = buf.DecodeInt32() return nil } // 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"` IDType uint8 `binapi:"u8,name=id_type" json:"id_type,omitempty"` DataLen uint32 `binapi:"u32,name=data_len" json:"-"` Data []byte `binapi:"u8[data_len],name=data" json:"data,omitempty"` } func (m *Ikev2ProfileSetID) Reset() { *m = Ikev2ProfileSetID{} } func (*Ikev2ProfileSetID) GetMessageName() string { return "ikev2_profile_set_id" } func (*Ikev2ProfileSetID) GetCrcString() string { return "4d7e2418" } func (*Ikev2ProfileSetID) GetMessageType() api.MessageType { return api.RequestMessage } func (m *Ikev2ProfileSetID) Size() (size int) { if m == nil { return 0 } size += 64 // m.Name size += 1 // m.IsLocal size += 1 // m.IDType size += 4 // m.DataLen size += 1 * len(m.Data) // m.Data return size } func (m *Ikev2ProfileSetID) Marshal(b []byte) ([]byte, error) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) buf.EncodeString(m.Name, 64) buf.EncodeBool(m.IsLocal) buf.EncodeUint8(m.IDType) buf.EncodeUint32(uint32(len(m.Data))) buf.EncodeBytes(m.Data, 0) return buf.Bytes(), nil } func (m *Ikev2ProfileSetID) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Name = buf.DecodeString(64) m.IsLocal = buf.DecodeBool() m.IDType = buf.DecodeUint8() m.DataLen = buf.DecodeUint32() m.Data = make([]byte, m.DataLen) copy(m.Data, buf.DecodeBytes(len(m.Data))) return nil } // 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"` } func (m *Ikev2ProfileSetIDReply) Reset() { *m = Ikev2ProfileSetIDReply{} } func (*Ikev2ProfileSetIDReply) GetMessageName() string { return "ikev2_profile_set_id_reply" } func (*Ikev2ProfileSetIDReply) GetCrcString() string { return "e8d4e804" } func (*Ikev2ProfileSetIDReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *Ikev2ProfileSetIDReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval return size } func (m *Ikev2ProfileSetIDReply) 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 *Ikev2ProfileSetIDReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Retval = buf.DecodeInt32() return nil } // 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"` Name string `binapi:"string[64],name=name" json:"name,omitempty"` } func (m *Ikev2ProfileSetIpsecUDPPort) Reset() { *m = Ikev2ProfileSetIpsecUDPPort{} } func (*Ikev2ProfileSetIpsecUDPPort) GetMessageName() string { return "ikev2_profile_set_ipsec_udp_port" } func (*Ikev2ProfileSetIpsecUDPPort) GetCrcString() string { return "615ce758" } func (*Ikev2ProfileSetIpsecUDPPort) GetMessageType() api.MessageType { return api.RequestMessage } func (m *Ikev2ProfileSetIpsecUDPPort) Size() (size int) { if m == nil { return 0 } size += 1 // m.IsSet size += 2 // m.Port size += 64 // m.Name return size } func (m *Ikev2ProfileSetIpsecUDPPort) Marshal(b []byte) ([]byte, error) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) buf.EncodeUint8(m.IsSet) buf.EncodeUint16(m.Port) buf.EncodeString(m.Name, 64) return buf.Bytes(), nil } func (m *Ikev2ProfileSetIpsecUDPPort) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.IsSet = buf.DecodeUint8() m.Port = buf.DecodeUint16() m.Name = buf.DecodeString(64) return nil } // 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"` } func (m *Ikev2ProfileSetIpsecUDPPortReply) Reset() { *m = Ikev2ProfileSetIpsecUDPPortReply{} } func (*Ikev2ProfileSetIpsecUDPPortReply) GetMessageName() string { return "ikev2_profile_set_ipsec_udp_port_reply" } func (*Ikev2ProfileSetIpsecUDPPortReply) GetCrcString() string { return "e8d4e804" } func (*Ikev2ProfileSetIpsecUDPPortReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *Ikev2ProfileSetIpsecUDPPortReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval return size } func (m *Ikev2ProfileSetIpsecUDPPortReply) 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 *Ikev2ProfileSetIpsecUDPPortReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Retval = buf.DecodeInt32() return nil } // 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"` } func (m *Ikev2ProfileSetLiveness) Reset() { *m = Ikev2ProfileSetLiveness{} } func (*Ikev2ProfileSetLiveness) GetMessageName() string { return "ikev2_profile_set_liveness" } func (*Ikev2ProfileSetLiveness) GetCrcString() string { return "6bdf4d65" } func (*Ikev2ProfileSetLiveness) GetMessageType() api.MessageType { return api.RequestMessage } func (m *Ikev2ProfileSetLiveness) Size() (size int) { if m == nil { return 0 } size += 4 // m.Period size += 4 // m.MaxRetries return size } func (m *Ikev2ProfileSetLiveness) Marshal(b []byte) ([]byte, error) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) buf.EncodeUint32(m.Period) buf.EncodeUint32(m.MaxRetries) return buf.Bytes(), nil } func (m *Ikev2ProfileSetLiveness) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Period = buf.DecodeUint32() m.MaxRetries = buf.DecodeUint32() return nil } // 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"` } func (m *Ikev2ProfileSetLivenessReply) Reset() { *m = Ikev2ProfileSetLivenessReply{} } func (*Ikev2ProfileSetLivenessReply) GetMessageName() string { return "ikev2_profile_set_liveness_reply" } func (*Ikev2ProfileSetLivenessReply) GetCrcString() string { return "e8d4e804" } func (*Ikev2ProfileSetLivenessReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *Ikev2ProfileSetLivenessReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval return size } func (m *Ikev2ProfileSetLivenessReply) 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 *Ikev2ProfileSetLivenessReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Retval = buf.DecodeInt32() return nil } // 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"` 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 "8eb8cfd1" } func (*Ikev2ProfileSetTs) GetMessageType() api.MessageType { return api.RequestMessage } func (m *Ikev2ProfileSetTs) Size() (size int) { if m == nil { return 0 } 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) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) buf.EncodeString(m.Name, 64) 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.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"` } func (m *Ikev2ProfileSetTsReply) Reset() { *m = Ikev2ProfileSetTsReply{} } func (*Ikev2ProfileSetTsReply) GetMessageName() string { return "ikev2_profile_set_ts_reply" } func (*Ikev2ProfileSetTsReply) GetCrcString() string { return "e8d4e804" } func (*Ikev2ProfileSetTsReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *Ikev2ProfileSetTsReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval return size } func (m *Ikev2ProfileSetTsReply) 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 *Ikev2ProfileSetTsReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Retval = buf.DecodeInt32() return nil } // 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"` } func (m *Ikev2ProfileSetUDPEncap) Reset() { *m = Ikev2ProfileSetUDPEncap{} } func (*Ikev2ProfileSetUDPEncap) GetMessageName() string { return "ikev2_profile_set_udp_encap" } func (*Ikev2ProfileSetUDPEncap) GetCrcString() string { return "ebf79a66" } func (*Ikev2ProfileSetUDPEncap) GetMessageType() api.MessageType { return api.RequestMessage } func (m *Ikev2ProfileSetUDPEncap) Size() (size int) { if m == nil { return 0 } size += 64 // m.Name return size } func (m *Ikev2ProfileSetUDPEncap) 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 *Ikev2ProfileSetUDPEncap) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Name = buf.DecodeString(64) return nil } // 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"` } func (m *Ikev2ProfileSetUDPEncapReply) Reset() { *m = Ikev2ProfileSetUDPEncapReply{} } func (*Ikev2ProfileSetUDPEncapReply) GetMessageName() string { return "ikev2_profile_set_udp_encap_reply" } func (*Ikev2ProfileSetUDPEncapReply) GetCrcString() string { return "e8d4e804" } func (*Ikev2ProfileSetUDPEncapReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *Ikev2ProfileSetUDPEncapReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval return size } func (m *Ikev2ProfileSetUDPEncapReply) 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 *Ikev2ProfileSetUDPEncapReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Retval = buf.DecodeInt32() 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"` 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 "a63dc205" } func (*Ikev2SetEspTransforms) GetMessageType() api.MessageType { return api.RequestMessage } func (m *Ikev2SetEspTransforms) Size() (size int) { if m == nil { return 0 } size += 64 // m.Name 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) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) buf.EncodeString(m.Name, 64) 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.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"` } func (m *Ikev2SetEspTransformsReply) Reset() { *m = Ikev2SetEspTransformsReply{} } func (*Ikev2SetEspTransformsReply) GetMessageName() string { return "ikev2_set_esp_transforms_reply" } func (*Ikev2SetEspTransformsReply) GetCrcString() string { return "e8d4e804" } func (*Ikev2SetEspTransformsReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *Ikev2SetEspTransformsReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval return size } func (m *Ikev2SetEspTransformsReply) 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 *Ikev2SetEspTransformsReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Retval = buf.DecodeInt32() return nil } // 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"` 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 "076d7378" } func (*Ikev2SetIkeTransforms) GetMessageType() api.MessageType { return api.RequestMessage } func (m *Ikev2SetIkeTransforms) Size() (size int) { if m == nil { return 0 } size += 64 // m.Name 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) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) buf.EncodeString(m.Name, 64) 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.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"` } func (m *Ikev2SetIkeTransformsReply) Reset() { *m = Ikev2SetIkeTransformsReply{} } func (*Ikev2SetIkeTransformsReply) GetMessageName() string { return "ikev2_set_ike_transforms_reply" } func (*Ikev2SetIkeTransformsReply) GetCrcString() string { return "e8d4e804" } func (*Ikev2SetIkeTransformsReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *Ikev2SetIkeTransformsReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval return size } func (m *Ikev2SetIkeTransformsReply) 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 *Ikev2SetIkeTransformsReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Retval = buf.DecodeInt32() return nil } // 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"` } func (m *Ikev2SetLocalKey) Reset() { *m = Ikev2SetLocalKey{} } func (*Ikev2SetLocalKey) GetMessageName() string { return "ikev2_set_local_key" } func (*Ikev2SetLocalKey) GetCrcString() string { return "799b69ec" } func (*Ikev2SetLocalKey) GetMessageType() api.MessageType { return api.RequestMessage } func (m *Ikev2SetLocalKey) Size() (size int) { if m == nil { return 0 } size += 256 // m.KeyFile return size } func (m *Ikev2SetLocalKey) Marshal(b []byte) ([]byte, error) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) buf.EncodeString(m.KeyFile, 256) return buf.Bytes(), nil } func (m *Ikev2SetLocalKey) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.KeyFile = buf.DecodeString(256) return nil } // 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"` } func (m *Ikev2SetLocalKeyReply) Reset() { *m = Ikev2SetLocalKeyReply{} } func (*Ikev2SetLocalKeyReply) GetMessageName() string { return "ikev2_set_local_key_reply" } func (*Ikev2SetLocalKeyReply) GetCrcString() string { return "e8d4e804" } func (*Ikev2SetLocalKeyReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *Ikev2SetLocalKeyReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval return size } func (m *Ikev2SetLocalKeyReply) 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 *Ikev2SetLocalKeyReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Retval = buf.DecodeInt32() return nil } // 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"` 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 "a2055df1" } func (*Ikev2SetResponder) GetMessageType() api.MessageType { return api.RequestMessage } func (m *Ikev2SetResponder) Size() (size int) { if m == nil { return 0 } 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) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) buf.EncodeString(m.Name, 64) 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()) 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"` } func (m *Ikev2SetResponderReply) Reset() { *m = Ikev2SetResponderReply{} } func (*Ikev2SetResponderReply) GetMessageName() string { return "ikev2_set_responder_reply" } func (*Ikev2SetResponderReply) GetCrcString() string { return "e8d4e804" } func (*Ikev2SetResponderReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *Ikev2SetResponderReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval return size } func (m *Ikev2SetResponderReply) 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 *Ikev2SetResponderReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Retval = buf.DecodeInt32() return nil } // 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"` LifetimeJitter uint32 `binapi:"u32,name=lifetime_jitter" json:"lifetime_jitter,omitempty"` Handover uint32 `binapi:"u32,name=handover" json:"handover,omitempty"` LifetimeMaxdata uint64 `binapi:"u64,name=lifetime_maxdata" json:"lifetime_maxdata,omitempty"` } func (m *Ikev2SetSaLifetime) Reset() { *m = Ikev2SetSaLifetime{} } func (*Ikev2SetSaLifetime) GetMessageName() string { return "ikev2_set_sa_lifetime" } func (*Ikev2SetSaLifetime) GetCrcString() string { return "7039feaa" } func (*Ikev2SetSaLifetime) GetMessageType() api.MessageType { return api.RequestMessage } func (m *Ikev2SetSaLifetime) Size() (size int) { if m == nil { return 0 } size += 64 // m.Name size += 8 // m.Lifetime size += 4 // m.LifetimeJitter size += 4 // m.Handover size += 8 // m.LifetimeMaxdata return size } func (m *Ikev2SetSaLifetime) Marshal(b []byte) ([]byte, error) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) buf.EncodeString(m.Name, 64) buf.EncodeUint64(m.Lifetime) buf.EncodeUint32(m.LifetimeJitter) buf.EncodeUint32(m.Handover) buf.EncodeUint64(m.LifetimeMaxdata) return buf.Bytes(), nil } func (m *Ikev2SetSaLifetime) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Name = buf.DecodeString(64) m.Lifetime = buf.DecodeUint64() m.LifetimeJitter = buf.DecodeUint32() m.Handover = buf.DecodeUint32() m.LifetimeMaxdata = buf.DecodeUint64() return nil } // 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"` } func (m *Ikev2SetSaLifetimeReply) Reset() { *m = Ikev2SetSaLifetimeReply{} } func (*Ikev2SetSaLifetimeReply) GetMessageName() string { return "ikev2_set_sa_lifetime_reply" } func (*Ikev2SetSaLifetimeReply) GetCrcString() string { return "e8d4e804" } func (*Ikev2SetSaLifetimeReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *Ikev2SetSaLifetimeReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval return size } func (m *Ikev2SetSaLifetimeReply) 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 *Ikev2SetSaLifetimeReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Retval = buf.DecodeInt32() return nil } // 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"` } func (m *Ikev2SetTunnelInterface) Reset() { *m = Ikev2SetTunnelInterface{} } func (*Ikev2SetTunnelInterface) GetMessageName() string { return "ikev2_set_tunnel_interface" } func (*Ikev2SetTunnelInterface) GetCrcString() string { return "ca67182c" } func (*Ikev2SetTunnelInterface) GetMessageType() api.MessageType { return api.RequestMessage } func (m *Ikev2SetTunnelInterface) Size() (size int) { if m == nil { return 0 } size += 64 // m.Name size += 4 // m.SwIfIndex return size } func (m *Ikev2SetTunnelInterface) Marshal(b []byte) ([]byte, error) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) buf.EncodeString(m.Name, 64) buf.EncodeUint32(uint32(m.SwIfIndex)) return buf.Bytes(), nil } func (m *Ikev2SetTunnelInterface) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Name = buf.DecodeString(64) m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) return nil } // 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"` } func (m *Ikev2SetTunnelInterfaceReply) Reset() { *m = Ikev2SetTunnelInterfaceReply{} } func (*Ikev2SetTunnelInterfaceReply) GetMessageName() string { return "ikev2_set_tunnel_interface_reply" } func (*Ikev2SetTunnelInterfaceReply) GetCrcString() string { return "e8d4e804" } func (*Ikev2SetTunnelInterfaceReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *Ikev2SetTunnelInterfaceReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval return size } func (m *Ikev2SetTunnelInterfaceReply) 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 *Ikev2SetTunnelInterfaceReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Retval = buf.DecodeInt32() 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") api.RegisterMessage((*Ikev2InitiateDelIkeSaReply)(nil), "ikev2_initiate_del_ike_sa_reply_e8d4e804") api.RegisterMessage((*Ikev2InitiateRekeyChildSa)(nil), "ikev2_initiate_rekey_child_sa_7f004d2e") 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") api.RegisterMessage((*Ikev2ProfileSetIDReply)(nil), "ikev2_profile_set_id_reply_e8d4e804") api.RegisterMessage((*Ikev2ProfileSetIpsecUDPPort)(nil), "ikev2_profile_set_ipsec_udp_port_615ce758") 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_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((*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_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_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), (*Ikev2InitiateDelIkeSaReply)(nil), (*Ikev2InitiateRekeyChildSa)(nil), (*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), (*Ikev2ProfileSetIDReply)(nil), (*Ikev2ProfileSetIpsecUDPPort)(nil), (*Ikev2ProfileSetIpsecUDPPortReply)(nil), (*Ikev2ProfileSetLiveness)(nil), (*Ikev2ProfileSetLivenessReply)(nil), (*Ikev2ProfileSetTs)(nil), (*Ikev2ProfileSetTsReply)(nil), (*Ikev2ProfileSetUDPEncap)(nil), (*Ikev2ProfileSetUDPEncapReply)(nil), (*Ikev2SaDetails)(nil), (*Ikev2SaDump)(nil), (*Ikev2SetEspTransforms)(nil), (*Ikev2SetEspTransformsReply)(nil), (*Ikev2SetIkeTransforms)(nil), (*Ikev2SetIkeTransformsReply)(nil), (*Ikev2SetLocalKey)(nil), (*Ikev2SetLocalKeyReply)(nil), (*Ikev2SetResponder)(nil), (*Ikev2SetResponderHostname)(nil), (*Ikev2SetResponderHostnameReply)(nil), (*Ikev2SetResponderReply)(nil), (*Ikev2SetSaLifetime)(nil), (*Ikev2SetSaLifetimeReply)(nil), (*Ikev2SetTunnelInterface)(nil), (*Ikev2SetTunnelInterfaceReply)(nil), (*Ikev2TrafficSelectorDetails)(nil), (*Ikev2TrafficSelectorDump)(nil), } }