github.com/edwarnicke/govpp@v0.0.0-20230130211138-14ef5d20b1d0/binapi/ipsec/ipsec.ba.go (about)

     1  // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
     2  // versions:
     3  //  binapi-generator: v0.4.0-dev
     4  //  VPP:              23.02-rc0~189-g57127b32a
     5  // source: /usr/share/vpp/api/core/ipsec.api.json
     6  
     7  // Package ipsec contains generated bindings for API file ipsec.api.
     8  //
     9  // Contents:
    10  //   2 structs
    11  //  48 messages
    12  //
    13  package ipsec
    14  
    15  import (
    16  	api "git.fd.io/govpp.git/api"
    17  	codec "git.fd.io/govpp.git/codec"
    18  	interface_types "github.com/edwarnicke/govpp/binapi/interface_types"
    19  	ip_types "github.com/edwarnicke/govpp/binapi/ip_types"
    20  	ipsec_types "github.com/edwarnicke/govpp/binapi/ipsec_types"
    21  	tunnel_types "github.com/edwarnicke/govpp/binapi/tunnel_types"
    22  )
    23  
    24  // This is a compile-time assertion to ensure that this generated file
    25  // is compatible with the GoVPP api package it is being compiled against.
    26  // A compilation error at this line likely means your copy of the
    27  // GoVPP api package needs to be updated.
    28  const _ = api.GoVppAPIPackageIsVersion2
    29  
    30  const (
    31  	APIFile    = "ipsec"
    32  	APIVersion = "5.0.2"
    33  	VersionCrc = 0xd8d93805
    34  )
    35  
    36  // IpsecItf defines type 'ipsec_itf'.
    37  type IpsecItf struct {
    38  	UserInstance uint32                         `binapi:"u32,name=user_instance,default=4294967295" json:"user_instance,omitempty"`
    39  	Mode         tunnel_types.TunnelMode        `binapi:"tunnel_mode,name=mode" json:"mode,omitempty"`
    40  	SwIfIndex    interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
    41  }
    42  
    43  // IpsecTunnelProtect defines type 'ipsec_tunnel_protect'.
    44  type IpsecTunnelProtect struct {
    45  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
    46  	Nh        ip_types.Address               `binapi:"address,name=nh" json:"nh,omitempty"`
    47  	SaOut     uint32                         `binapi:"u32,name=sa_out" json:"sa_out,omitempty"`
    48  	NSaIn     uint8                          `binapi:"u8,name=n_sa_in" json:"-"`
    49  	SaIn      []uint32                       `binapi:"u32[n_sa_in],name=sa_in" json:"sa_in,omitempty"`
    50  }
    51  
    52  // IpsecBackendDetails defines message 'ipsec_backend_details'.
    53  type IpsecBackendDetails struct {
    54  	Name     string                 `binapi:"string[128],name=name" json:"name,omitempty"`
    55  	Protocol ipsec_types.IpsecProto `binapi:"ipsec_proto,name=protocol" json:"protocol,omitempty"`
    56  	Index    uint8                  `binapi:"u8,name=index" json:"index,omitempty"`
    57  	Active   bool                   `binapi:"bool,name=active" json:"active,omitempty"`
    58  }
    59  
    60  func (m *IpsecBackendDetails) Reset()               { *m = IpsecBackendDetails{} }
    61  func (*IpsecBackendDetails) GetMessageName() string { return "ipsec_backend_details" }
    62  func (*IpsecBackendDetails) GetCrcString() string   { return "ee601c29" }
    63  func (*IpsecBackendDetails) GetMessageType() api.MessageType {
    64  	return api.ReplyMessage
    65  }
    66  
    67  func (m *IpsecBackendDetails) Size() (size int) {
    68  	if m == nil {
    69  		return 0
    70  	}
    71  	size += 128 // m.Name
    72  	size += 4   // m.Protocol
    73  	size += 1   // m.Index
    74  	size += 1   // m.Active
    75  	return size
    76  }
    77  func (m *IpsecBackendDetails) Marshal(b []byte) ([]byte, error) {
    78  	if b == nil {
    79  		b = make([]byte, m.Size())
    80  	}
    81  	buf := codec.NewBuffer(b)
    82  	buf.EncodeString(m.Name, 128)
    83  	buf.EncodeUint32(uint32(m.Protocol))
    84  	buf.EncodeUint8(m.Index)
    85  	buf.EncodeBool(m.Active)
    86  	return buf.Bytes(), nil
    87  }
    88  func (m *IpsecBackendDetails) Unmarshal(b []byte) error {
    89  	buf := codec.NewBuffer(b)
    90  	m.Name = buf.DecodeString(128)
    91  	m.Protocol = ipsec_types.IpsecProto(buf.DecodeUint32())
    92  	m.Index = buf.DecodeUint8()
    93  	m.Active = buf.DecodeBool()
    94  	return nil
    95  }
    96  
    97  // IpsecBackendDump defines message 'ipsec_backend_dump'.
    98  type IpsecBackendDump struct{}
    99  
   100  func (m *IpsecBackendDump) Reset()               { *m = IpsecBackendDump{} }
   101  func (*IpsecBackendDump) GetMessageName() string { return "ipsec_backend_dump" }
   102  func (*IpsecBackendDump) GetCrcString() string   { return "51077d14" }
   103  func (*IpsecBackendDump) GetMessageType() api.MessageType {
   104  	return api.RequestMessage
   105  }
   106  
   107  func (m *IpsecBackendDump) Size() (size int) {
   108  	if m == nil {
   109  		return 0
   110  	}
   111  	return size
   112  }
   113  func (m *IpsecBackendDump) Marshal(b []byte) ([]byte, error) {
   114  	if b == nil {
   115  		b = make([]byte, m.Size())
   116  	}
   117  	buf := codec.NewBuffer(b)
   118  	return buf.Bytes(), nil
   119  }
   120  func (m *IpsecBackendDump) Unmarshal(b []byte) error {
   121  	return nil
   122  }
   123  
   124  // IpsecInterfaceAddDelSpd defines message 'ipsec_interface_add_del_spd'.
   125  type IpsecInterfaceAddDelSpd struct {
   126  	IsAdd     bool                           `binapi:"bool,name=is_add" json:"is_add,omitempty"`
   127  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   128  	SpdID     uint32                         `binapi:"u32,name=spd_id" json:"spd_id,omitempty"`
   129  }
   130  
   131  func (m *IpsecInterfaceAddDelSpd) Reset()               { *m = IpsecInterfaceAddDelSpd{} }
   132  func (*IpsecInterfaceAddDelSpd) GetMessageName() string { return "ipsec_interface_add_del_spd" }
   133  func (*IpsecInterfaceAddDelSpd) GetCrcString() string   { return "80f80cbb" }
   134  func (*IpsecInterfaceAddDelSpd) GetMessageType() api.MessageType {
   135  	return api.RequestMessage
   136  }
   137  
   138  func (m *IpsecInterfaceAddDelSpd) Size() (size int) {
   139  	if m == nil {
   140  		return 0
   141  	}
   142  	size += 1 // m.IsAdd
   143  	size += 4 // m.SwIfIndex
   144  	size += 4 // m.SpdID
   145  	return size
   146  }
   147  func (m *IpsecInterfaceAddDelSpd) Marshal(b []byte) ([]byte, error) {
   148  	if b == nil {
   149  		b = make([]byte, m.Size())
   150  	}
   151  	buf := codec.NewBuffer(b)
   152  	buf.EncodeBool(m.IsAdd)
   153  	buf.EncodeUint32(uint32(m.SwIfIndex))
   154  	buf.EncodeUint32(m.SpdID)
   155  	return buf.Bytes(), nil
   156  }
   157  func (m *IpsecInterfaceAddDelSpd) Unmarshal(b []byte) error {
   158  	buf := codec.NewBuffer(b)
   159  	m.IsAdd = buf.DecodeBool()
   160  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   161  	m.SpdID = buf.DecodeUint32()
   162  	return nil
   163  }
   164  
   165  // IpsecInterfaceAddDelSpdReply defines message 'ipsec_interface_add_del_spd_reply'.
   166  type IpsecInterfaceAddDelSpdReply struct {
   167  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   168  }
   169  
   170  func (m *IpsecInterfaceAddDelSpdReply) Reset() { *m = IpsecInterfaceAddDelSpdReply{} }
   171  func (*IpsecInterfaceAddDelSpdReply) GetMessageName() string {
   172  	return "ipsec_interface_add_del_spd_reply"
   173  }
   174  func (*IpsecInterfaceAddDelSpdReply) GetCrcString() string { return "e8d4e804" }
   175  func (*IpsecInterfaceAddDelSpdReply) GetMessageType() api.MessageType {
   176  	return api.ReplyMessage
   177  }
   178  
   179  func (m *IpsecInterfaceAddDelSpdReply) Size() (size int) {
   180  	if m == nil {
   181  		return 0
   182  	}
   183  	size += 4 // m.Retval
   184  	return size
   185  }
   186  func (m *IpsecInterfaceAddDelSpdReply) Marshal(b []byte) ([]byte, error) {
   187  	if b == nil {
   188  		b = make([]byte, m.Size())
   189  	}
   190  	buf := codec.NewBuffer(b)
   191  	buf.EncodeInt32(m.Retval)
   192  	return buf.Bytes(), nil
   193  }
   194  func (m *IpsecInterfaceAddDelSpdReply) Unmarshal(b []byte) error {
   195  	buf := codec.NewBuffer(b)
   196  	m.Retval = buf.DecodeInt32()
   197  	return nil
   198  }
   199  
   200  // IpsecItfCreate defines message 'ipsec_itf_create'.
   201  type IpsecItfCreate struct {
   202  	Itf IpsecItf `binapi:"ipsec_itf,name=itf" json:"itf,omitempty"`
   203  }
   204  
   205  func (m *IpsecItfCreate) Reset()               { *m = IpsecItfCreate{} }
   206  func (*IpsecItfCreate) GetMessageName() string { return "ipsec_itf_create" }
   207  func (*IpsecItfCreate) GetCrcString() string   { return "6f50b3bc" }
   208  func (*IpsecItfCreate) GetMessageType() api.MessageType {
   209  	return api.RequestMessage
   210  }
   211  
   212  func (m *IpsecItfCreate) Size() (size int) {
   213  	if m == nil {
   214  		return 0
   215  	}
   216  	size += 4 // m.Itf.UserInstance
   217  	size += 1 // m.Itf.Mode
   218  	size += 4 // m.Itf.SwIfIndex
   219  	return size
   220  }
   221  func (m *IpsecItfCreate) Marshal(b []byte) ([]byte, error) {
   222  	if b == nil {
   223  		b = make([]byte, m.Size())
   224  	}
   225  	buf := codec.NewBuffer(b)
   226  	buf.EncodeUint32(m.Itf.UserInstance)
   227  	buf.EncodeUint8(uint8(m.Itf.Mode))
   228  	buf.EncodeUint32(uint32(m.Itf.SwIfIndex))
   229  	return buf.Bytes(), nil
   230  }
   231  func (m *IpsecItfCreate) Unmarshal(b []byte) error {
   232  	buf := codec.NewBuffer(b)
   233  	m.Itf.UserInstance = buf.DecodeUint32()
   234  	m.Itf.Mode = tunnel_types.TunnelMode(buf.DecodeUint8())
   235  	m.Itf.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   236  	return nil
   237  }
   238  
   239  // IpsecItfCreateReply defines message 'ipsec_itf_create_reply'.
   240  type IpsecItfCreateReply struct {
   241  	Retval    int32                          `binapi:"i32,name=retval" json:"retval,omitempty"`
   242  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   243  }
   244  
   245  func (m *IpsecItfCreateReply) Reset()               { *m = IpsecItfCreateReply{} }
   246  func (*IpsecItfCreateReply) GetMessageName() string { return "ipsec_itf_create_reply" }
   247  func (*IpsecItfCreateReply) GetCrcString() string   { return "5383d31f" }
   248  func (*IpsecItfCreateReply) GetMessageType() api.MessageType {
   249  	return api.ReplyMessage
   250  }
   251  
   252  func (m *IpsecItfCreateReply) Size() (size int) {
   253  	if m == nil {
   254  		return 0
   255  	}
   256  	size += 4 // m.Retval
   257  	size += 4 // m.SwIfIndex
   258  	return size
   259  }
   260  func (m *IpsecItfCreateReply) Marshal(b []byte) ([]byte, error) {
   261  	if b == nil {
   262  		b = make([]byte, m.Size())
   263  	}
   264  	buf := codec.NewBuffer(b)
   265  	buf.EncodeInt32(m.Retval)
   266  	buf.EncodeUint32(uint32(m.SwIfIndex))
   267  	return buf.Bytes(), nil
   268  }
   269  func (m *IpsecItfCreateReply) Unmarshal(b []byte) error {
   270  	buf := codec.NewBuffer(b)
   271  	m.Retval = buf.DecodeInt32()
   272  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   273  	return nil
   274  }
   275  
   276  // IpsecItfDelete defines message 'ipsec_itf_delete'.
   277  type IpsecItfDelete struct {
   278  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   279  }
   280  
   281  func (m *IpsecItfDelete) Reset()               { *m = IpsecItfDelete{} }
   282  func (*IpsecItfDelete) GetMessageName() string { return "ipsec_itf_delete" }
   283  func (*IpsecItfDelete) GetCrcString() string   { return "f9e6675e" }
   284  func (*IpsecItfDelete) GetMessageType() api.MessageType {
   285  	return api.RequestMessage
   286  }
   287  
   288  func (m *IpsecItfDelete) Size() (size int) {
   289  	if m == nil {
   290  		return 0
   291  	}
   292  	size += 4 // m.SwIfIndex
   293  	return size
   294  }
   295  func (m *IpsecItfDelete) Marshal(b []byte) ([]byte, error) {
   296  	if b == nil {
   297  		b = make([]byte, m.Size())
   298  	}
   299  	buf := codec.NewBuffer(b)
   300  	buf.EncodeUint32(uint32(m.SwIfIndex))
   301  	return buf.Bytes(), nil
   302  }
   303  func (m *IpsecItfDelete) Unmarshal(b []byte) error {
   304  	buf := codec.NewBuffer(b)
   305  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   306  	return nil
   307  }
   308  
   309  // IpsecItfDeleteReply defines message 'ipsec_itf_delete_reply'.
   310  type IpsecItfDeleteReply struct {
   311  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   312  }
   313  
   314  func (m *IpsecItfDeleteReply) Reset()               { *m = IpsecItfDeleteReply{} }
   315  func (*IpsecItfDeleteReply) GetMessageName() string { return "ipsec_itf_delete_reply" }
   316  func (*IpsecItfDeleteReply) GetCrcString() string   { return "e8d4e804" }
   317  func (*IpsecItfDeleteReply) GetMessageType() api.MessageType {
   318  	return api.ReplyMessage
   319  }
   320  
   321  func (m *IpsecItfDeleteReply) Size() (size int) {
   322  	if m == nil {
   323  		return 0
   324  	}
   325  	size += 4 // m.Retval
   326  	return size
   327  }
   328  func (m *IpsecItfDeleteReply) Marshal(b []byte) ([]byte, error) {
   329  	if b == nil {
   330  		b = make([]byte, m.Size())
   331  	}
   332  	buf := codec.NewBuffer(b)
   333  	buf.EncodeInt32(m.Retval)
   334  	return buf.Bytes(), nil
   335  }
   336  func (m *IpsecItfDeleteReply) Unmarshal(b []byte) error {
   337  	buf := codec.NewBuffer(b)
   338  	m.Retval = buf.DecodeInt32()
   339  	return nil
   340  }
   341  
   342  // IpsecItfDetails defines message 'ipsec_itf_details'.
   343  type IpsecItfDetails struct {
   344  	Itf IpsecItf `binapi:"ipsec_itf,name=itf" json:"itf,omitempty"`
   345  }
   346  
   347  func (m *IpsecItfDetails) Reset()               { *m = IpsecItfDetails{} }
   348  func (*IpsecItfDetails) GetMessageName() string { return "ipsec_itf_details" }
   349  func (*IpsecItfDetails) GetCrcString() string   { return "548a73b8" }
   350  func (*IpsecItfDetails) GetMessageType() api.MessageType {
   351  	return api.ReplyMessage
   352  }
   353  
   354  func (m *IpsecItfDetails) Size() (size int) {
   355  	if m == nil {
   356  		return 0
   357  	}
   358  	size += 4 // m.Itf.UserInstance
   359  	size += 1 // m.Itf.Mode
   360  	size += 4 // m.Itf.SwIfIndex
   361  	return size
   362  }
   363  func (m *IpsecItfDetails) Marshal(b []byte) ([]byte, error) {
   364  	if b == nil {
   365  		b = make([]byte, m.Size())
   366  	}
   367  	buf := codec.NewBuffer(b)
   368  	buf.EncodeUint32(m.Itf.UserInstance)
   369  	buf.EncodeUint8(uint8(m.Itf.Mode))
   370  	buf.EncodeUint32(uint32(m.Itf.SwIfIndex))
   371  	return buf.Bytes(), nil
   372  }
   373  func (m *IpsecItfDetails) Unmarshal(b []byte) error {
   374  	buf := codec.NewBuffer(b)
   375  	m.Itf.UserInstance = buf.DecodeUint32()
   376  	m.Itf.Mode = tunnel_types.TunnelMode(buf.DecodeUint8())
   377  	m.Itf.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   378  	return nil
   379  }
   380  
   381  // IpsecItfDump defines message 'ipsec_itf_dump'.
   382  type IpsecItfDump struct {
   383  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   384  }
   385  
   386  func (m *IpsecItfDump) Reset()               { *m = IpsecItfDump{} }
   387  func (*IpsecItfDump) GetMessageName() string { return "ipsec_itf_dump" }
   388  func (*IpsecItfDump) GetCrcString() string   { return "f9e6675e" }
   389  func (*IpsecItfDump) GetMessageType() api.MessageType {
   390  	return api.RequestMessage
   391  }
   392  
   393  func (m *IpsecItfDump) Size() (size int) {
   394  	if m == nil {
   395  		return 0
   396  	}
   397  	size += 4 // m.SwIfIndex
   398  	return size
   399  }
   400  func (m *IpsecItfDump) Marshal(b []byte) ([]byte, error) {
   401  	if b == nil {
   402  		b = make([]byte, m.Size())
   403  	}
   404  	buf := codec.NewBuffer(b)
   405  	buf.EncodeUint32(uint32(m.SwIfIndex))
   406  	return buf.Bytes(), nil
   407  }
   408  func (m *IpsecItfDump) Unmarshal(b []byte) error {
   409  	buf := codec.NewBuffer(b)
   410  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   411  	return nil
   412  }
   413  
   414  // IpsecSaDetails defines message 'ipsec_sa_details'.
   415  // Deprecated: the message will be removed in the future versions
   416  type IpsecSaDetails struct {
   417  	Entry          ipsec_types.IpsecSadEntry      `binapi:"ipsec_sad_entry,name=entry" json:"entry,omitempty"`
   418  	SwIfIndex      interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   419  	Salt           uint32                         `binapi:"u32,name=salt" json:"salt,omitempty"`
   420  	SeqOutbound    uint64                         `binapi:"u64,name=seq_outbound" json:"seq_outbound,omitempty"`
   421  	LastSeqInbound uint64                         `binapi:"u64,name=last_seq_inbound" json:"last_seq_inbound,omitempty"`
   422  	ReplayWindow   uint64                         `binapi:"u64,name=replay_window" json:"replay_window,omitempty"`
   423  	StatIndex      uint32                         `binapi:"u32,name=stat_index" json:"stat_index,omitempty"`
   424  }
   425  
   426  func (m *IpsecSaDetails) Reset()               { *m = IpsecSaDetails{} }
   427  func (*IpsecSaDetails) GetMessageName() string { return "ipsec_sa_details" }
   428  func (*IpsecSaDetails) GetCrcString() string   { return "345d14a7" }
   429  func (*IpsecSaDetails) GetMessageType() api.MessageType {
   430  	return api.ReplyMessage
   431  }
   432  
   433  func (m *IpsecSaDetails) Size() (size int) {
   434  	if m == nil {
   435  		return 0
   436  	}
   437  	size += 4       // m.Entry.SadID
   438  	size += 4       // m.Entry.Spi
   439  	size += 4       // m.Entry.Protocol
   440  	size += 4       // m.Entry.CryptoAlgorithm
   441  	size += 1       // m.Entry.CryptoKey.Length
   442  	size += 1 * 128 // m.Entry.CryptoKey.Data
   443  	size += 4       // m.Entry.IntegrityAlgorithm
   444  	size += 1       // m.Entry.IntegrityKey.Length
   445  	size += 1 * 128 // m.Entry.IntegrityKey.Data
   446  	size += 4       // m.Entry.Flags
   447  	size += 1       // m.Entry.TunnelSrc.Af
   448  	size += 1 * 16  // m.Entry.TunnelSrc.Un
   449  	size += 1       // m.Entry.TunnelDst.Af
   450  	size += 1 * 16  // m.Entry.TunnelDst.Un
   451  	size += 4       // m.Entry.TxTableID
   452  	size += 4       // m.Entry.Salt
   453  	size += 2       // m.Entry.UDPSrcPort
   454  	size += 2       // m.Entry.UDPDstPort
   455  	size += 4       // m.SwIfIndex
   456  	size += 4       // m.Salt
   457  	size += 8       // m.SeqOutbound
   458  	size += 8       // m.LastSeqInbound
   459  	size += 8       // m.ReplayWindow
   460  	size += 4       // m.StatIndex
   461  	return size
   462  }
   463  func (m *IpsecSaDetails) Marshal(b []byte) ([]byte, error) {
   464  	if b == nil {
   465  		b = make([]byte, m.Size())
   466  	}
   467  	buf := codec.NewBuffer(b)
   468  	buf.EncodeUint32(m.Entry.SadID)
   469  	buf.EncodeUint32(m.Entry.Spi)
   470  	buf.EncodeUint32(uint32(m.Entry.Protocol))
   471  	buf.EncodeUint32(uint32(m.Entry.CryptoAlgorithm))
   472  	buf.EncodeUint8(m.Entry.CryptoKey.Length)
   473  	buf.EncodeBytes(m.Entry.CryptoKey.Data, 128)
   474  	buf.EncodeUint32(uint32(m.Entry.IntegrityAlgorithm))
   475  	buf.EncodeUint8(m.Entry.IntegrityKey.Length)
   476  	buf.EncodeBytes(m.Entry.IntegrityKey.Data, 128)
   477  	buf.EncodeUint32(uint32(m.Entry.Flags))
   478  	buf.EncodeUint8(uint8(m.Entry.TunnelSrc.Af))
   479  	buf.EncodeBytes(m.Entry.TunnelSrc.Un.XXX_UnionData[:], 16)
   480  	buf.EncodeUint8(uint8(m.Entry.TunnelDst.Af))
   481  	buf.EncodeBytes(m.Entry.TunnelDst.Un.XXX_UnionData[:], 16)
   482  	buf.EncodeUint32(m.Entry.TxTableID)
   483  	buf.EncodeUint32(m.Entry.Salt)
   484  	buf.EncodeUint16(m.Entry.UDPSrcPort)
   485  	buf.EncodeUint16(m.Entry.UDPDstPort)
   486  	buf.EncodeUint32(uint32(m.SwIfIndex))
   487  	buf.EncodeUint32(m.Salt)
   488  	buf.EncodeUint64(m.SeqOutbound)
   489  	buf.EncodeUint64(m.LastSeqInbound)
   490  	buf.EncodeUint64(m.ReplayWindow)
   491  	buf.EncodeUint32(m.StatIndex)
   492  	return buf.Bytes(), nil
   493  }
   494  func (m *IpsecSaDetails) Unmarshal(b []byte) error {
   495  	buf := codec.NewBuffer(b)
   496  	m.Entry.SadID = buf.DecodeUint32()
   497  	m.Entry.Spi = buf.DecodeUint32()
   498  	m.Entry.Protocol = ipsec_types.IpsecProto(buf.DecodeUint32())
   499  	m.Entry.CryptoAlgorithm = ipsec_types.IpsecCryptoAlg(buf.DecodeUint32())
   500  	m.Entry.CryptoKey.Length = buf.DecodeUint8()
   501  	m.Entry.CryptoKey.Data = make([]byte, 128)
   502  	copy(m.Entry.CryptoKey.Data, buf.DecodeBytes(len(m.Entry.CryptoKey.Data)))
   503  	m.Entry.IntegrityAlgorithm = ipsec_types.IpsecIntegAlg(buf.DecodeUint32())
   504  	m.Entry.IntegrityKey.Length = buf.DecodeUint8()
   505  	m.Entry.IntegrityKey.Data = make([]byte, 128)
   506  	copy(m.Entry.IntegrityKey.Data, buf.DecodeBytes(len(m.Entry.IntegrityKey.Data)))
   507  	m.Entry.Flags = ipsec_types.IpsecSadFlags(buf.DecodeUint32())
   508  	m.Entry.TunnelSrc.Af = ip_types.AddressFamily(buf.DecodeUint8())
   509  	copy(m.Entry.TunnelSrc.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   510  	m.Entry.TunnelDst.Af = ip_types.AddressFamily(buf.DecodeUint8())
   511  	copy(m.Entry.TunnelDst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   512  	m.Entry.TxTableID = buf.DecodeUint32()
   513  	m.Entry.Salt = buf.DecodeUint32()
   514  	m.Entry.UDPSrcPort = buf.DecodeUint16()
   515  	m.Entry.UDPDstPort = buf.DecodeUint16()
   516  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   517  	m.Salt = buf.DecodeUint32()
   518  	m.SeqOutbound = buf.DecodeUint64()
   519  	m.LastSeqInbound = buf.DecodeUint64()
   520  	m.ReplayWindow = buf.DecodeUint64()
   521  	m.StatIndex = buf.DecodeUint32()
   522  	return nil
   523  }
   524  
   525  // IpsecSaDump defines message 'ipsec_sa_dump'.
   526  // Deprecated: the message will be removed in the future versions
   527  type IpsecSaDump struct {
   528  	SaID uint32 `binapi:"u32,name=sa_id" json:"sa_id,omitempty"`
   529  }
   530  
   531  func (m *IpsecSaDump) Reset()               { *m = IpsecSaDump{} }
   532  func (*IpsecSaDump) GetMessageName() string { return "ipsec_sa_dump" }
   533  func (*IpsecSaDump) GetCrcString() string   { return "2076c2f4" }
   534  func (*IpsecSaDump) GetMessageType() api.MessageType {
   535  	return api.RequestMessage
   536  }
   537  
   538  func (m *IpsecSaDump) Size() (size int) {
   539  	if m == nil {
   540  		return 0
   541  	}
   542  	size += 4 // m.SaID
   543  	return size
   544  }
   545  func (m *IpsecSaDump) Marshal(b []byte) ([]byte, error) {
   546  	if b == nil {
   547  		b = make([]byte, m.Size())
   548  	}
   549  	buf := codec.NewBuffer(b)
   550  	buf.EncodeUint32(m.SaID)
   551  	return buf.Bytes(), nil
   552  }
   553  func (m *IpsecSaDump) Unmarshal(b []byte) error {
   554  	buf := codec.NewBuffer(b)
   555  	m.SaID = buf.DecodeUint32()
   556  	return nil
   557  }
   558  
   559  // IpsecSaV2Details defines message 'ipsec_sa_v2_details'.
   560  type IpsecSaV2Details struct {
   561  	Entry          ipsec_types.IpsecSadEntryV2    `binapi:"ipsec_sad_entry_v2,name=entry" json:"entry,omitempty"`
   562  	SwIfIndex      interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   563  	Salt           uint32                         `binapi:"u32,name=salt" json:"salt,omitempty"`
   564  	SeqOutbound    uint64                         `binapi:"u64,name=seq_outbound" json:"seq_outbound,omitempty"`
   565  	LastSeqInbound uint64                         `binapi:"u64,name=last_seq_inbound" json:"last_seq_inbound,omitempty"`
   566  	ReplayWindow   uint64                         `binapi:"u64,name=replay_window" json:"replay_window,omitempty"`
   567  	StatIndex      uint32                         `binapi:"u32,name=stat_index" json:"stat_index,omitempty"`
   568  }
   569  
   570  func (m *IpsecSaV2Details) Reset()               { *m = IpsecSaV2Details{} }
   571  func (*IpsecSaV2Details) GetMessageName() string { return "ipsec_sa_v2_details" }
   572  func (*IpsecSaV2Details) GetCrcString() string   { return "e2130051" }
   573  func (*IpsecSaV2Details) GetMessageType() api.MessageType {
   574  	return api.ReplyMessage
   575  }
   576  
   577  func (m *IpsecSaV2Details) Size() (size int) {
   578  	if m == nil {
   579  		return 0
   580  	}
   581  	size += 4       // m.Entry.SadID
   582  	size += 4       // m.Entry.Spi
   583  	size += 4       // m.Entry.Protocol
   584  	size += 4       // m.Entry.CryptoAlgorithm
   585  	size += 1       // m.Entry.CryptoKey.Length
   586  	size += 1 * 128 // m.Entry.CryptoKey.Data
   587  	size += 4       // m.Entry.IntegrityAlgorithm
   588  	size += 1       // m.Entry.IntegrityKey.Length
   589  	size += 1 * 128 // m.Entry.IntegrityKey.Data
   590  	size += 4       // m.Entry.Flags
   591  	size += 1       // m.Entry.TunnelSrc.Af
   592  	size += 1 * 16  // m.Entry.TunnelSrc.Un
   593  	size += 1       // m.Entry.TunnelDst.Af
   594  	size += 1 * 16  // m.Entry.TunnelDst.Un
   595  	size += 1       // m.Entry.TunnelFlags
   596  	size += 1       // m.Entry.Dscp
   597  	size += 4       // m.Entry.TxTableID
   598  	size += 4       // m.Entry.Salt
   599  	size += 2       // m.Entry.UDPSrcPort
   600  	size += 2       // m.Entry.UDPDstPort
   601  	size += 4       // m.SwIfIndex
   602  	size += 4       // m.Salt
   603  	size += 8       // m.SeqOutbound
   604  	size += 8       // m.LastSeqInbound
   605  	size += 8       // m.ReplayWindow
   606  	size += 4       // m.StatIndex
   607  	return size
   608  }
   609  func (m *IpsecSaV2Details) Marshal(b []byte) ([]byte, error) {
   610  	if b == nil {
   611  		b = make([]byte, m.Size())
   612  	}
   613  	buf := codec.NewBuffer(b)
   614  	buf.EncodeUint32(m.Entry.SadID)
   615  	buf.EncodeUint32(m.Entry.Spi)
   616  	buf.EncodeUint32(uint32(m.Entry.Protocol))
   617  	buf.EncodeUint32(uint32(m.Entry.CryptoAlgorithm))
   618  	buf.EncodeUint8(m.Entry.CryptoKey.Length)
   619  	buf.EncodeBytes(m.Entry.CryptoKey.Data, 128)
   620  	buf.EncodeUint32(uint32(m.Entry.IntegrityAlgorithm))
   621  	buf.EncodeUint8(m.Entry.IntegrityKey.Length)
   622  	buf.EncodeBytes(m.Entry.IntegrityKey.Data, 128)
   623  	buf.EncodeUint32(uint32(m.Entry.Flags))
   624  	buf.EncodeUint8(uint8(m.Entry.TunnelSrc.Af))
   625  	buf.EncodeBytes(m.Entry.TunnelSrc.Un.XXX_UnionData[:], 16)
   626  	buf.EncodeUint8(uint8(m.Entry.TunnelDst.Af))
   627  	buf.EncodeBytes(m.Entry.TunnelDst.Un.XXX_UnionData[:], 16)
   628  	buf.EncodeUint8(uint8(m.Entry.TunnelFlags))
   629  	buf.EncodeUint8(uint8(m.Entry.Dscp))
   630  	buf.EncodeUint32(m.Entry.TxTableID)
   631  	buf.EncodeUint32(m.Entry.Salt)
   632  	buf.EncodeUint16(m.Entry.UDPSrcPort)
   633  	buf.EncodeUint16(m.Entry.UDPDstPort)
   634  	buf.EncodeUint32(uint32(m.SwIfIndex))
   635  	buf.EncodeUint32(m.Salt)
   636  	buf.EncodeUint64(m.SeqOutbound)
   637  	buf.EncodeUint64(m.LastSeqInbound)
   638  	buf.EncodeUint64(m.ReplayWindow)
   639  	buf.EncodeUint32(m.StatIndex)
   640  	return buf.Bytes(), nil
   641  }
   642  func (m *IpsecSaV2Details) Unmarshal(b []byte) error {
   643  	buf := codec.NewBuffer(b)
   644  	m.Entry.SadID = buf.DecodeUint32()
   645  	m.Entry.Spi = buf.DecodeUint32()
   646  	m.Entry.Protocol = ipsec_types.IpsecProto(buf.DecodeUint32())
   647  	m.Entry.CryptoAlgorithm = ipsec_types.IpsecCryptoAlg(buf.DecodeUint32())
   648  	m.Entry.CryptoKey.Length = buf.DecodeUint8()
   649  	m.Entry.CryptoKey.Data = make([]byte, 128)
   650  	copy(m.Entry.CryptoKey.Data, buf.DecodeBytes(len(m.Entry.CryptoKey.Data)))
   651  	m.Entry.IntegrityAlgorithm = ipsec_types.IpsecIntegAlg(buf.DecodeUint32())
   652  	m.Entry.IntegrityKey.Length = buf.DecodeUint8()
   653  	m.Entry.IntegrityKey.Data = make([]byte, 128)
   654  	copy(m.Entry.IntegrityKey.Data, buf.DecodeBytes(len(m.Entry.IntegrityKey.Data)))
   655  	m.Entry.Flags = ipsec_types.IpsecSadFlags(buf.DecodeUint32())
   656  	m.Entry.TunnelSrc.Af = ip_types.AddressFamily(buf.DecodeUint8())
   657  	copy(m.Entry.TunnelSrc.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   658  	m.Entry.TunnelDst.Af = ip_types.AddressFamily(buf.DecodeUint8())
   659  	copy(m.Entry.TunnelDst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   660  	m.Entry.TunnelFlags = tunnel_types.TunnelEncapDecapFlags(buf.DecodeUint8())
   661  	m.Entry.Dscp = ip_types.IPDscp(buf.DecodeUint8())
   662  	m.Entry.TxTableID = buf.DecodeUint32()
   663  	m.Entry.Salt = buf.DecodeUint32()
   664  	m.Entry.UDPSrcPort = buf.DecodeUint16()
   665  	m.Entry.UDPDstPort = buf.DecodeUint16()
   666  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   667  	m.Salt = buf.DecodeUint32()
   668  	m.SeqOutbound = buf.DecodeUint64()
   669  	m.LastSeqInbound = buf.DecodeUint64()
   670  	m.ReplayWindow = buf.DecodeUint64()
   671  	m.StatIndex = buf.DecodeUint32()
   672  	return nil
   673  }
   674  
   675  // IpsecSaV2Dump defines message 'ipsec_sa_v2_dump'.
   676  type IpsecSaV2Dump struct {
   677  	SaID uint32 `binapi:"u32,name=sa_id" json:"sa_id,omitempty"`
   678  }
   679  
   680  func (m *IpsecSaV2Dump) Reset()               { *m = IpsecSaV2Dump{} }
   681  func (*IpsecSaV2Dump) GetMessageName() string { return "ipsec_sa_v2_dump" }
   682  func (*IpsecSaV2Dump) GetCrcString() string   { return "2076c2f4" }
   683  func (*IpsecSaV2Dump) GetMessageType() api.MessageType {
   684  	return api.RequestMessage
   685  }
   686  
   687  func (m *IpsecSaV2Dump) Size() (size int) {
   688  	if m == nil {
   689  		return 0
   690  	}
   691  	size += 4 // m.SaID
   692  	return size
   693  }
   694  func (m *IpsecSaV2Dump) Marshal(b []byte) ([]byte, error) {
   695  	if b == nil {
   696  		b = make([]byte, m.Size())
   697  	}
   698  	buf := codec.NewBuffer(b)
   699  	buf.EncodeUint32(m.SaID)
   700  	return buf.Bytes(), nil
   701  }
   702  func (m *IpsecSaV2Dump) Unmarshal(b []byte) error {
   703  	buf := codec.NewBuffer(b)
   704  	m.SaID = buf.DecodeUint32()
   705  	return nil
   706  }
   707  
   708  // IpsecSaV3Details defines message 'ipsec_sa_v3_details'.
   709  type IpsecSaV3Details struct {
   710  	Entry          ipsec_types.IpsecSadEntryV3    `binapi:"ipsec_sad_entry_v3,name=entry" json:"entry,omitempty"`
   711  	SwIfIndex      interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   712  	SeqOutbound    uint64                         `binapi:"u64,name=seq_outbound" json:"seq_outbound,omitempty"`
   713  	LastSeqInbound uint64                         `binapi:"u64,name=last_seq_inbound" json:"last_seq_inbound,omitempty"`
   714  	ReplayWindow   uint64                         `binapi:"u64,name=replay_window" json:"replay_window,omitempty"`
   715  	StatIndex      uint32                         `binapi:"u32,name=stat_index" json:"stat_index,omitempty"`
   716  }
   717  
   718  func (m *IpsecSaV3Details) Reset()               { *m = IpsecSaV3Details{} }
   719  func (*IpsecSaV3Details) GetMessageName() string { return "ipsec_sa_v3_details" }
   720  func (*IpsecSaV3Details) GetCrcString() string   { return "2fc991ee" }
   721  func (*IpsecSaV3Details) GetMessageType() api.MessageType {
   722  	return api.ReplyMessage
   723  }
   724  
   725  func (m *IpsecSaV3Details) Size() (size int) {
   726  	if m == nil {
   727  		return 0
   728  	}
   729  	size += 4       // m.Entry.SadID
   730  	size += 4       // m.Entry.Spi
   731  	size += 4       // m.Entry.Protocol
   732  	size += 4       // m.Entry.CryptoAlgorithm
   733  	size += 1       // m.Entry.CryptoKey.Length
   734  	size += 1 * 128 // m.Entry.CryptoKey.Data
   735  	size += 4       // m.Entry.IntegrityAlgorithm
   736  	size += 1       // m.Entry.IntegrityKey.Length
   737  	size += 1 * 128 // m.Entry.IntegrityKey.Data
   738  	size += 4       // m.Entry.Flags
   739  	size += 4       // m.Entry.Tunnel.Instance
   740  	size += 1       // m.Entry.Tunnel.Src.Af
   741  	size += 1 * 16  // m.Entry.Tunnel.Src.Un
   742  	size += 1       // m.Entry.Tunnel.Dst.Af
   743  	size += 1 * 16  // m.Entry.Tunnel.Dst.Un
   744  	size += 4       // m.Entry.Tunnel.SwIfIndex
   745  	size += 4       // m.Entry.Tunnel.TableID
   746  	size += 1       // m.Entry.Tunnel.EncapDecapFlags
   747  	size += 1       // m.Entry.Tunnel.Mode
   748  	size += 1       // m.Entry.Tunnel.Flags
   749  	size += 1       // m.Entry.Tunnel.Dscp
   750  	size += 1       // m.Entry.Tunnel.HopLimit
   751  	size += 4       // m.Entry.Salt
   752  	size += 2       // m.Entry.UDPSrcPort
   753  	size += 2       // m.Entry.UDPDstPort
   754  	size += 4       // m.SwIfIndex
   755  	size += 8       // m.SeqOutbound
   756  	size += 8       // m.LastSeqInbound
   757  	size += 8       // m.ReplayWindow
   758  	size += 4       // m.StatIndex
   759  	return size
   760  }
   761  func (m *IpsecSaV3Details) Marshal(b []byte) ([]byte, error) {
   762  	if b == nil {
   763  		b = make([]byte, m.Size())
   764  	}
   765  	buf := codec.NewBuffer(b)
   766  	buf.EncodeUint32(m.Entry.SadID)
   767  	buf.EncodeUint32(m.Entry.Spi)
   768  	buf.EncodeUint32(uint32(m.Entry.Protocol))
   769  	buf.EncodeUint32(uint32(m.Entry.CryptoAlgorithm))
   770  	buf.EncodeUint8(m.Entry.CryptoKey.Length)
   771  	buf.EncodeBytes(m.Entry.CryptoKey.Data, 128)
   772  	buf.EncodeUint32(uint32(m.Entry.IntegrityAlgorithm))
   773  	buf.EncodeUint8(m.Entry.IntegrityKey.Length)
   774  	buf.EncodeBytes(m.Entry.IntegrityKey.Data, 128)
   775  	buf.EncodeUint32(uint32(m.Entry.Flags))
   776  	buf.EncodeUint32(m.Entry.Tunnel.Instance)
   777  	buf.EncodeUint8(uint8(m.Entry.Tunnel.Src.Af))
   778  	buf.EncodeBytes(m.Entry.Tunnel.Src.Un.XXX_UnionData[:], 16)
   779  	buf.EncodeUint8(uint8(m.Entry.Tunnel.Dst.Af))
   780  	buf.EncodeBytes(m.Entry.Tunnel.Dst.Un.XXX_UnionData[:], 16)
   781  	buf.EncodeUint32(uint32(m.Entry.Tunnel.SwIfIndex))
   782  	buf.EncodeUint32(m.Entry.Tunnel.TableID)
   783  	buf.EncodeUint8(uint8(m.Entry.Tunnel.EncapDecapFlags))
   784  	buf.EncodeUint8(uint8(m.Entry.Tunnel.Mode))
   785  	buf.EncodeUint8(uint8(m.Entry.Tunnel.Flags))
   786  	buf.EncodeUint8(uint8(m.Entry.Tunnel.Dscp))
   787  	buf.EncodeUint8(m.Entry.Tunnel.HopLimit)
   788  	buf.EncodeUint32(m.Entry.Salt)
   789  	buf.EncodeUint16(m.Entry.UDPSrcPort)
   790  	buf.EncodeUint16(m.Entry.UDPDstPort)
   791  	buf.EncodeUint32(uint32(m.SwIfIndex))
   792  	buf.EncodeUint64(m.SeqOutbound)
   793  	buf.EncodeUint64(m.LastSeqInbound)
   794  	buf.EncodeUint64(m.ReplayWindow)
   795  	buf.EncodeUint32(m.StatIndex)
   796  	return buf.Bytes(), nil
   797  }
   798  func (m *IpsecSaV3Details) Unmarshal(b []byte) error {
   799  	buf := codec.NewBuffer(b)
   800  	m.Entry.SadID = buf.DecodeUint32()
   801  	m.Entry.Spi = buf.DecodeUint32()
   802  	m.Entry.Protocol = ipsec_types.IpsecProto(buf.DecodeUint32())
   803  	m.Entry.CryptoAlgorithm = ipsec_types.IpsecCryptoAlg(buf.DecodeUint32())
   804  	m.Entry.CryptoKey.Length = buf.DecodeUint8()
   805  	m.Entry.CryptoKey.Data = make([]byte, 128)
   806  	copy(m.Entry.CryptoKey.Data, buf.DecodeBytes(len(m.Entry.CryptoKey.Data)))
   807  	m.Entry.IntegrityAlgorithm = ipsec_types.IpsecIntegAlg(buf.DecodeUint32())
   808  	m.Entry.IntegrityKey.Length = buf.DecodeUint8()
   809  	m.Entry.IntegrityKey.Data = make([]byte, 128)
   810  	copy(m.Entry.IntegrityKey.Data, buf.DecodeBytes(len(m.Entry.IntegrityKey.Data)))
   811  	m.Entry.Flags = ipsec_types.IpsecSadFlags(buf.DecodeUint32())
   812  	m.Entry.Tunnel.Instance = buf.DecodeUint32()
   813  	m.Entry.Tunnel.Src.Af = ip_types.AddressFamily(buf.DecodeUint8())
   814  	copy(m.Entry.Tunnel.Src.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   815  	m.Entry.Tunnel.Dst.Af = ip_types.AddressFamily(buf.DecodeUint8())
   816  	copy(m.Entry.Tunnel.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   817  	m.Entry.Tunnel.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   818  	m.Entry.Tunnel.TableID = buf.DecodeUint32()
   819  	m.Entry.Tunnel.EncapDecapFlags = tunnel_types.TunnelEncapDecapFlags(buf.DecodeUint8())
   820  	m.Entry.Tunnel.Mode = tunnel_types.TunnelMode(buf.DecodeUint8())
   821  	m.Entry.Tunnel.Flags = tunnel_types.TunnelFlags(buf.DecodeUint8())
   822  	m.Entry.Tunnel.Dscp = ip_types.IPDscp(buf.DecodeUint8())
   823  	m.Entry.Tunnel.HopLimit = buf.DecodeUint8()
   824  	m.Entry.Salt = buf.DecodeUint32()
   825  	m.Entry.UDPSrcPort = buf.DecodeUint16()
   826  	m.Entry.UDPDstPort = buf.DecodeUint16()
   827  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   828  	m.SeqOutbound = buf.DecodeUint64()
   829  	m.LastSeqInbound = buf.DecodeUint64()
   830  	m.ReplayWindow = buf.DecodeUint64()
   831  	m.StatIndex = buf.DecodeUint32()
   832  	return nil
   833  }
   834  
   835  // IpsecSaV3Dump defines message 'ipsec_sa_v3_dump'.
   836  type IpsecSaV3Dump struct {
   837  	SaID uint32 `binapi:"u32,name=sa_id" json:"sa_id,omitempty"`
   838  }
   839  
   840  func (m *IpsecSaV3Dump) Reset()               { *m = IpsecSaV3Dump{} }
   841  func (*IpsecSaV3Dump) GetMessageName() string { return "ipsec_sa_v3_dump" }
   842  func (*IpsecSaV3Dump) GetCrcString() string   { return "2076c2f4" }
   843  func (*IpsecSaV3Dump) GetMessageType() api.MessageType {
   844  	return api.RequestMessage
   845  }
   846  
   847  func (m *IpsecSaV3Dump) Size() (size int) {
   848  	if m == nil {
   849  		return 0
   850  	}
   851  	size += 4 // m.SaID
   852  	return size
   853  }
   854  func (m *IpsecSaV3Dump) Marshal(b []byte) ([]byte, error) {
   855  	if b == nil {
   856  		b = make([]byte, m.Size())
   857  	}
   858  	buf := codec.NewBuffer(b)
   859  	buf.EncodeUint32(m.SaID)
   860  	return buf.Bytes(), nil
   861  }
   862  func (m *IpsecSaV3Dump) Unmarshal(b []byte) error {
   863  	buf := codec.NewBuffer(b)
   864  	m.SaID = buf.DecodeUint32()
   865  	return nil
   866  }
   867  
   868  // IpsecSadEntryAdd defines message 'ipsec_sad_entry_add'.
   869  type IpsecSadEntryAdd struct {
   870  	Entry ipsec_types.IpsecSadEntryV3 `binapi:"ipsec_sad_entry_v3,name=entry" json:"entry,omitempty"`
   871  }
   872  
   873  func (m *IpsecSadEntryAdd) Reset()               { *m = IpsecSadEntryAdd{} }
   874  func (*IpsecSadEntryAdd) GetMessageName() string { return "ipsec_sad_entry_add" }
   875  func (*IpsecSadEntryAdd) GetCrcString() string   { return "50229353" }
   876  func (*IpsecSadEntryAdd) GetMessageType() api.MessageType {
   877  	return api.RequestMessage
   878  }
   879  
   880  func (m *IpsecSadEntryAdd) Size() (size int) {
   881  	if m == nil {
   882  		return 0
   883  	}
   884  	size += 4       // m.Entry.SadID
   885  	size += 4       // m.Entry.Spi
   886  	size += 4       // m.Entry.Protocol
   887  	size += 4       // m.Entry.CryptoAlgorithm
   888  	size += 1       // m.Entry.CryptoKey.Length
   889  	size += 1 * 128 // m.Entry.CryptoKey.Data
   890  	size += 4       // m.Entry.IntegrityAlgorithm
   891  	size += 1       // m.Entry.IntegrityKey.Length
   892  	size += 1 * 128 // m.Entry.IntegrityKey.Data
   893  	size += 4       // m.Entry.Flags
   894  	size += 4       // m.Entry.Tunnel.Instance
   895  	size += 1       // m.Entry.Tunnel.Src.Af
   896  	size += 1 * 16  // m.Entry.Tunnel.Src.Un
   897  	size += 1       // m.Entry.Tunnel.Dst.Af
   898  	size += 1 * 16  // m.Entry.Tunnel.Dst.Un
   899  	size += 4       // m.Entry.Tunnel.SwIfIndex
   900  	size += 4       // m.Entry.Tunnel.TableID
   901  	size += 1       // m.Entry.Tunnel.EncapDecapFlags
   902  	size += 1       // m.Entry.Tunnel.Mode
   903  	size += 1       // m.Entry.Tunnel.Flags
   904  	size += 1       // m.Entry.Tunnel.Dscp
   905  	size += 1       // m.Entry.Tunnel.HopLimit
   906  	size += 4       // m.Entry.Salt
   907  	size += 2       // m.Entry.UDPSrcPort
   908  	size += 2       // m.Entry.UDPDstPort
   909  	return size
   910  }
   911  func (m *IpsecSadEntryAdd) Marshal(b []byte) ([]byte, error) {
   912  	if b == nil {
   913  		b = make([]byte, m.Size())
   914  	}
   915  	buf := codec.NewBuffer(b)
   916  	buf.EncodeUint32(m.Entry.SadID)
   917  	buf.EncodeUint32(m.Entry.Spi)
   918  	buf.EncodeUint32(uint32(m.Entry.Protocol))
   919  	buf.EncodeUint32(uint32(m.Entry.CryptoAlgorithm))
   920  	buf.EncodeUint8(m.Entry.CryptoKey.Length)
   921  	buf.EncodeBytes(m.Entry.CryptoKey.Data, 128)
   922  	buf.EncodeUint32(uint32(m.Entry.IntegrityAlgorithm))
   923  	buf.EncodeUint8(m.Entry.IntegrityKey.Length)
   924  	buf.EncodeBytes(m.Entry.IntegrityKey.Data, 128)
   925  	buf.EncodeUint32(uint32(m.Entry.Flags))
   926  	buf.EncodeUint32(m.Entry.Tunnel.Instance)
   927  	buf.EncodeUint8(uint8(m.Entry.Tunnel.Src.Af))
   928  	buf.EncodeBytes(m.Entry.Tunnel.Src.Un.XXX_UnionData[:], 16)
   929  	buf.EncodeUint8(uint8(m.Entry.Tunnel.Dst.Af))
   930  	buf.EncodeBytes(m.Entry.Tunnel.Dst.Un.XXX_UnionData[:], 16)
   931  	buf.EncodeUint32(uint32(m.Entry.Tunnel.SwIfIndex))
   932  	buf.EncodeUint32(m.Entry.Tunnel.TableID)
   933  	buf.EncodeUint8(uint8(m.Entry.Tunnel.EncapDecapFlags))
   934  	buf.EncodeUint8(uint8(m.Entry.Tunnel.Mode))
   935  	buf.EncodeUint8(uint8(m.Entry.Tunnel.Flags))
   936  	buf.EncodeUint8(uint8(m.Entry.Tunnel.Dscp))
   937  	buf.EncodeUint8(m.Entry.Tunnel.HopLimit)
   938  	buf.EncodeUint32(m.Entry.Salt)
   939  	buf.EncodeUint16(m.Entry.UDPSrcPort)
   940  	buf.EncodeUint16(m.Entry.UDPDstPort)
   941  	return buf.Bytes(), nil
   942  }
   943  func (m *IpsecSadEntryAdd) Unmarshal(b []byte) error {
   944  	buf := codec.NewBuffer(b)
   945  	m.Entry.SadID = buf.DecodeUint32()
   946  	m.Entry.Spi = buf.DecodeUint32()
   947  	m.Entry.Protocol = ipsec_types.IpsecProto(buf.DecodeUint32())
   948  	m.Entry.CryptoAlgorithm = ipsec_types.IpsecCryptoAlg(buf.DecodeUint32())
   949  	m.Entry.CryptoKey.Length = buf.DecodeUint8()
   950  	m.Entry.CryptoKey.Data = make([]byte, 128)
   951  	copy(m.Entry.CryptoKey.Data, buf.DecodeBytes(len(m.Entry.CryptoKey.Data)))
   952  	m.Entry.IntegrityAlgorithm = ipsec_types.IpsecIntegAlg(buf.DecodeUint32())
   953  	m.Entry.IntegrityKey.Length = buf.DecodeUint8()
   954  	m.Entry.IntegrityKey.Data = make([]byte, 128)
   955  	copy(m.Entry.IntegrityKey.Data, buf.DecodeBytes(len(m.Entry.IntegrityKey.Data)))
   956  	m.Entry.Flags = ipsec_types.IpsecSadFlags(buf.DecodeUint32())
   957  	m.Entry.Tunnel.Instance = buf.DecodeUint32()
   958  	m.Entry.Tunnel.Src.Af = ip_types.AddressFamily(buf.DecodeUint8())
   959  	copy(m.Entry.Tunnel.Src.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   960  	m.Entry.Tunnel.Dst.Af = ip_types.AddressFamily(buf.DecodeUint8())
   961  	copy(m.Entry.Tunnel.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   962  	m.Entry.Tunnel.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   963  	m.Entry.Tunnel.TableID = buf.DecodeUint32()
   964  	m.Entry.Tunnel.EncapDecapFlags = tunnel_types.TunnelEncapDecapFlags(buf.DecodeUint8())
   965  	m.Entry.Tunnel.Mode = tunnel_types.TunnelMode(buf.DecodeUint8())
   966  	m.Entry.Tunnel.Flags = tunnel_types.TunnelFlags(buf.DecodeUint8())
   967  	m.Entry.Tunnel.Dscp = ip_types.IPDscp(buf.DecodeUint8())
   968  	m.Entry.Tunnel.HopLimit = buf.DecodeUint8()
   969  	m.Entry.Salt = buf.DecodeUint32()
   970  	m.Entry.UDPSrcPort = buf.DecodeUint16()
   971  	m.Entry.UDPDstPort = buf.DecodeUint16()
   972  	return nil
   973  }
   974  
   975  // IpsecSadEntryAddDel defines message 'ipsec_sad_entry_add_del'.
   976  // Deprecated: the message will be removed in the future versions
   977  type IpsecSadEntryAddDel struct {
   978  	IsAdd bool                      `binapi:"bool,name=is_add" json:"is_add,omitempty"`
   979  	Entry ipsec_types.IpsecSadEntry `binapi:"ipsec_sad_entry,name=entry" json:"entry,omitempty"`
   980  }
   981  
   982  func (m *IpsecSadEntryAddDel) Reset()               { *m = IpsecSadEntryAddDel{} }
   983  func (*IpsecSadEntryAddDel) GetMessageName() string { return "ipsec_sad_entry_add_del" }
   984  func (*IpsecSadEntryAddDel) GetCrcString() string   { return "ab64b5c6" }
   985  func (*IpsecSadEntryAddDel) GetMessageType() api.MessageType {
   986  	return api.RequestMessage
   987  }
   988  
   989  func (m *IpsecSadEntryAddDel) Size() (size int) {
   990  	if m == nil {
   991  		return 0
   992  	}
   993  	size += 1       // m.IsAdd
   994  	size += 4       // m.Entry.SadID
   995  	size += 4       // m.Entry.Spi
   996  	size += 4       // m.Entry.Protocol
   997  	size += 4       // m.Entry.CryptoAlgorithm
   998  	size += 1       // m.Entry.CryptoKey.Length
   999  	size += 1 * 128 // m.Entry.CryptoKey.Data
  1000  	size += 4       // m.Entry.IntegrityAlgorithm
  1001  	size += 1       // m.Entry.IntegrityKey.Length
  1002  	size += 1 * 128 // m.Entry.IntegrityKey.Data
  1003  	size += 4       // m.Entry.Flags
  1004  	size += 1       // m.Entry.TunnelSrc.Af
  1005  	size += 1 * 16  // m.Entry.TunnelSrc.Un
  1006  	size += 1       // m.Entry.TunnelDst.Af
  1007  	size += 1 * 16  // m.Entry.TunnelDst.Un
  1008  	size += 4       // m.Entry.TxTableID
  1009  	size += 4       // m.Entry.Salt
  1010  	size += 2       // m.Entry.UDPSrcPort
  1011  	size += 2       // m.Entry.UDPDstPort
  1012  	return size
  1013  }
  1014  func (m *IpsecSadEntryAddDel) Marshal(b []byte) ([]byte, error) {
  1015  	if b == nil {
  1016  		b = make([]byte, m.Size())
  1017  	}
  1018  	buf := codec.NewBuffer(b)
  1019  	buf.EncodeBool(m.IsAdd)
  1020  	buf.EncodeUint32(m.Entry.SadID)
  1021  	buf.EncodeUint32(m.Entry.Spi)
  1022  	buf.EncodeUint32(uint32(m.Entry.Protocol))
  1023  	buf.EncodeUint32(uint32(m.Entry.CryptoAlgorithm))
  1024  	buf.EncodeUint8(m.Entry.CryptoKey.Length)
  1025  	buf.EncodeBytes(m.Entry.CryptoKey.Data, 128)
  1026  	buf.EncodeUint32(uint32(m.Entry.IntegrityAlgorithm))
  1027  	buf.EncodeUint8(m.Entry.IntegrityKey.Length)
  1028  	buf.EncodeBytes(m.Entry.IntegrityKey.Data, 128)
  1029  	buf.EncodeUint32(uint32(m.Entry.Flags))
  1030  	buf.EncodeUint8(uint8(m.Entry.TunnelSrc.Af))
  1031  	buf.EncodeBytes(m.Entry.TunnelSrc.Un.XXX_UnionData[:], 16)
  1032  	buf.EncodeUint8(uint8(m.Entry.TunnelDst.Af))
  1033  	buf.EncodeBytes(m.Entry.TunnelDst.Un.XXX_UnionData[:], 16)
  1034  	buf.EncodeUint32(m.Entry.TxTableID)
  1035  	buf.EncodeUint32(m.Entry.Salt)
  1036  	buf.EncodeUint16(m.Entry.UDPSrcPort)
  1037  	buf.EncodeUint16(m.Entry.UDPDstPort)
  1038  	return buf.Bytes(), nil
  1039  }
  1040  func (m *IpsecSadEntryAddDel) Unmarshal(b []byte) error {
  1041  	buf := codec.NewBuffer(b)
  1042  	m.IsAdd = buf.DecodeBool()
  1043  	m.Entry.SadID = buf.DecodeUint32()
  1044  	m.Entry.Spi = buf.DecodeUint32()
  1045  	m.Entry.Protocol = ipsec_types.IpsecProto(buf.DecodeUint32())
  1046  	m.Entry.CryptoAlgorithm = ipsec_types.IpsecCryptoAlg(buf.DecodeUint32())
  1047  	m.Entry.CryptoKey.Length = buf.DecodeUint8()
  1048  	m.Entry.CryptoKey.Data = make([]byte, 128)
  1049  	copy(m.Entry.CryptoKey.Data, buf.DecodeBytes(len(m.Entry.CryptoKey.Data)))
  1050  	m.Entry.IntegrityAlgorithm = ipsec_types.IpsecIntegAlg(buf.DecodeUint32())
  1051  	m.Entry.IntegrityKey.Length = buf.DecodeUint8()
  1052  	m.Entry.IntegrityKey.Data = make([]byte, 128)
  1053  	copy(m.Entry.IntegrityKey.Data, buf.DecodeBytes(len(m.Entry.IntegrityKey.Data)))
  1054  	m.Entry.Flags = ipsec_types.IpsecSadFlags(buf.DecodeUint32())
  1055  	m.Entry.TunnelSrc.Af = ip_types.AddressFamily(buf.DecodeUint8())
  1056  	copy(m.Entry.TunnelSrc.Un.XXX_UnionData[:], buf.DecodeBytes(16))
  1057  	m.Entry.TunnelDst.Af = ip_types.AddressFamily(buf.DecodeUint8())
  1058  	copy(m.Entry.TunnelDst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
  1059  	m.Entry.TxTableID = buf.DecodeUint32()
  1060  	m.Entry.Salt = buf.DecodeUint32()
  1061  	m.Entry.UDPSrcPort = buf.DecodeUint16()
  1062  	m.Entry.UDPDstPort = buf.DecodeUint16()
  1063  	return nil
  1064  }
  1065  
  1066  // IpsecSadEntryAddDelReply defines message 'ipsec_sad_entry_add_del_reply'.
  1067  // Deprecated: the message will be removed in the future versions
  1068  type IpsecSadEntryAddDelReply struct {
  1069  	Retval    int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
  1070  	StatIndex uint32 `binapi:"u32,name=stat_index" json:"stat_index,omitempty"`
  1071  }
  1072  
  1073  func (m *IpsecSadEntryAddDelReply) Reset()               { *m = IpsecSadEntryAddDelReply{} }
  1074  func (*IpsecSadEntryAddDelReply) GetMessageName() string { return "ipsec_sad_entry_add_del_reply" }
  1075  func (*IpsecSadEntryAddDelReply) GetCrcString() string   { return "9ffac24b" }
  1076  func (*IpsecSadEntryAddDelReply) GetMessageType() api.MessageType {
  1077  	return api.ReplyMessage
  1078  }
  1079  
  1080  func (m *IpsecSadEntryAddDelReply) Size() (size int) {
  1081  	if m == nil {
  1082  		return 0
  1083  	}
  1084  	size += 4 // m.Retval
  1085  	size += 4 // m.StatIndex
  1086  	return size
  1087  }
  1088  func (m *IpsecSadEntryAddDelReply) Marshal(b []byte) ([]byte, error) {
  1089  	if b == nil {
  1090  		b = make([]byte, m.Size())
  1091  	}
  1092  	buf := codec.NewBuffer(b)
  1093  	buf.EncodeInt32(m.Retval)
  1094  	buf.EncodeUint32(m.StatIndex)
  1095  	return buf.Bytes(), nil
  1096  }
  1097  func (m *IpsecSadEntryAddDelReply) Unmarshal(b []byte) error {
  1098  	buf := codec.NewBuffer(b)
  1099  	m.Retval = buf.DecodeInt32()
  1100  	m.StatIndex = buf.DecodeUint32()
  1101  	return nil
  1102  }
  1103  
  1104  // IpsecSadEntryAddDelV2 defines message 'ipsec_sad_entry_add_del_v2'.
  1105  type IpsecSadEntryAddDelV2 struct {
  1106  	IsAdd bool                        `binapi:"bool,name=is_add" json:"is_add,omitempty"`
  1107  	Entry ipsec_types.IpsecSadEntryV2 `binapi:"ipsec_sad_entry_v2,name=entry" json:"entry,omitempty"`
  1108  }
  1109  
  1110  func (m *IpsecSadEntryAddDelV2) Reset()               { *m = IpsecSadEntryAddDelV2{} }
  1111  func (*IpsecSadEntryAddDelV2) GetMessageName() string { return "ipsec_sad_entry_add_del_v2" }
  1112  func (*IpsecSadEntryAddDelV2) GetCrcString() string   { return "aca78b27" }
  1113  func (*IpsecSadEntryAddDelV2) GetMessageType() api.MessageType {
  1114  	return api.RequestMessage
  1115  }
  1116  
  1117  func (m *IpsecSadEntryAddDelV2) Size() (size int) {
  1118  	if m == nil {
  1119  		return 0
  1120  	}
  1121  	size += 1       // m.IsAdd
  1122  	size += 4       // m.Entry.SadID
  1123  	size += 4       // m.Entry.Spi
  1124  	size += 4       // m.Entry.Protocol
  1125  	size += 4       // m.Entry.CryptoAlgorithm
  1126  	size += 1       // m.Entry.CryptoKey.Length
  1127  	size += 1 * 128 // m.Entry.CryptoKey.Data
  1128  	size += 4       // m.Entry.IntegrityAlgorithm
  1129  	size += 1       // m.Entry.IntegrityKey.Length
  1130  	size += 1 * 128 // m.Entry.IntegrityKey.Data
  1131  	size += 4       // m.Entry.Flags
  1132  	size += 1       // m.Entry.TunnelSrc.Af
  1133  	size += 1 * 16  // m.Entry.TunnelSrc.Un
  1134  	size += 1       // m.Entry.TunnelDst.Af
  1135  	size += 1 * 16  // m.Entry.TunnelDst.Un
  1136  	size += 1       // m.Entry.TunnelFlags
  1137  	size += 1       // m.Entry.Dscp
  1138  	size += 4       // m.Entry.TxTableID
  1139  	size += 4       // m.Entry.Salt
  1140  	size += 2       // m.Entry.UDPSrcPort
  1141  	size += 2       // m.Entry.UDPDstPort
  1142  	return size
  1143  }
  1144  func (m *IpsecSadEntryAddDelV2) Marshal(b []byte) ([]byte, error) {
  1145  	if b == nil {
  1146  		b = make([]byte, m.Size())
  1147  	}
  1148  	buf := codec.NewBuffer(b)
  1149  	buf.EncodeBool(m.IsAdd)
  1150  	buf.EncodeUint32(m.Entry.SadID)
  1151  	buf.EncodeUint32(m.Entry.Spi)
  1152  	buf.EncodeUint32(uint32(m.Entry.Protocol))
  1153  	buf.EncodeUint32(uint32(m.Entry.CryptoAlgorithm))
  1154  	buf.EncodeUint8(m.Entry.CryptoKey.Length)
  1155  	buf.EncodeBytes(m.Entry.CryptoKey.Data, 128)
  1156  	buf.EncodeUint32(uint32(m.Entry.IntegrityAlgorithm))
  1157  	buf.EncodeUint8(m.Entry.IntegrityKey.Length)
  1158  	buf.EncodeBytes(m.Entry.IntegrityKey.Data, 128)
  1159  	buf.EncodeUint32(uint32(m.Entry.Flags))
  1160  	buf.EncodeUint8(uint8(m.Entry.TunnelSrc.Af))
  1161  	buf.EncodeBytes(m.Entry.TunnelSrc.Un.XXX_UnionData[:], 16)
  1162  	buf.EncodeUint8(uint8(m.Entry.TunnelDst.Af))
  1163  	buf.EncodeBytes(m.Entry.TunnelDst.Un.XXX_UnionData[:], 16)
  1164  	buf.EncodeUint8(uint8(m.Entry.TunnelFlags))
  1165  	buf.EncodeUint8(uint8(m.Entry.Dscp))
  1166  	buf.EncodeUint32(m.Entry.TxTableID)
  1167  	buf.EncodeUint32(m.Entry.Salt)
  1168  	buf.EncodeUint16(m.Entry.UDPSrcPort)
  1169  	buf.EncodeUint16(m.Entry.UDPDstPort)
  1170  	return buf.Bytes(), nil
  1171  }
  1172  func (m *IpsecSadEntryAddDelV2) Unmarshal(b []byte) error {
  1173  	buf := codec.NewBuffer(b)
  1174  	m.IsAdd = buf.DecodeBool()
  1175  	m.Entry.SadID = buf.DecodeUint32()
  1176  	m.Entry.Spi = buf.DecodeUint32()
  1177  	m.Entry.Protocol = ipsec_types.IpsecProto(buf.DecodeUint32())
  1178  	m.Entry.CryptoAlgorithm = ipsec_types.IpsecCryptoAlg(buf.DecodeUint32())
  1179  	m.Entry.CryptoKey.Length = buf.DecodeUint8()
  1180  	m.Entry.CryptoKey.Data = make([]byte, 128)
  1181  	copy(m.Entry.CryptoKey.Data, buf.DecodeBytes(len(m.Entry.CryptoKey.Data)))
  1182  	m.Entry.IntegrityAlgorithm = ipsec_types.IpsecIntegAlg(buf.DecodeUint32())
  1183  	m.Entry.IntegrityKey.Length = buf.DecodeUint8()
  1184  	m.Entry.IntegrityKey.Data = make([]byte, 128)
  1185  	copy(m.Entry.IntegrityKey.Data, buf.DecodeBytes(len(m.Entry.IntegrityKey.Data)))
  1186  	m.Entry.Flags = ipsec_types.IpsecSadFlags(buf.DecodeUint32())
  1187  	m.Entry.TunnelSrc.Af = ip_types.AddressFamily(buf.DecodeUint8())
  1188  	copy(m.Entry.TunnelSrc.Un.XXX_UnionData[:], buf.DecodeBytes(16))
  1189  	m.Entry.TunnelDst.Af = ip_types.AddressFamily(buf.DecodeUint8())
  1190  	copy(m.Entry.TunnelDst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
  1191  	m.Entry.TunnelFlags = tunnel_types.TunnelEncapDecapFlags(buf.DecodeUint8())
  1192  	m.Entry.Dscp = ip_types.IPDscp(buf.DecodeUint8())
  1193  	m.Entry.TxTableID = buf.DecodeUint32()
  1194  	m.Entry.Salt = buf.DecodeUint32()
  1195  	m.Entry.UDPSrcPort = buf.DecodeUint16()
  1196  	m.Entry.UDPDstPort = buf.DecodeUint16()
  1197  	return nil
  1198  }
  1199  
  1200  // IpsecSadEntryAddDelV2Reply defines message 'ipsec_sad_entry_add_del_v2_reply'.
  1201  type IpsecSadEntryAddDelV2Reply struct {
  1202  	Retval    int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
  1203  	StatIndex uint32 `binapi:"u32,name=stat_index" json:"stat_index,omitempty"`
  1204  }
  1205  
  1206  func (m *IpsecSadEntryAddDelV2Reply) Reset()               { *m = IpsecSadEntryAddDelV2Reply{} }
  1207  func (*IpsecSadEntryAddDelV2Reply) GetMessageName() string { return "ipsec_sad_entry_add_del_v2_reply" }
  1208  func (*IpsecSadEntryAddDelV2Reply) GetCrcString() string   { return "9ffac24b" }
  1209  func (*IpsecSadEntryAddDelV2Reply) GetMessageType() api.MessageType {
  1210  	return api.ReplyMessage
  1211  }
  1212  
  1213  func (m *IpsecSadEntryAddDelV2Reply) Size() (size int) {
  1214  	if m == nil {
  1215  		return 0
  1216  	}
  1217  	size += 4 // m.Retval
  1218  	size += 4 // m.StatIndex
  1219  	return size
  1220  }
  1221  func (m *IpsecSadEntryAddDelV2Reply) Marshal(b []byte) ([]byte, error) {
  1222  	if b == nil {
  1223  		b = make([]byte, m.Size())
  1224  	}
  1225  	buf := codec.NewBuffer(b)
  1226  	buf.EncodeInt32(m.Retval)
  1227  	buf.EncodeUint32(m.StatIndex)
  1228  	return buf.Bytes(), nil
  1229  }
  1230  func (m *IpsecSadEntryAddDelV2Reply) Unmarshal(b []byte) error {
  1231  	buf := codec.NewBuffer(b)
  1232  	m.Retval = buf.DecodeInt32()
  1233  	m.StatIndex = buf.DecodeUint32()
  1234  	return nil
  1235  }
  1236  
  1237  // IpsecSadEntryAddDelV3 defines message 'ipsec_sad_entry_add_del_v3'.
  1238  type IpsecSadEntryAddDelV3 struct {
  1239  	IsAdd bool                        `binapi:"bool,name=is_add" json:"is_add,omitempty"`
  1240  	Entry ipsec_types.IpsecSadEntryV3 `binapi:"ipsec_sad_entry_v3,name=entry" json:"entry,omitempty"`
  1241  }
  1242  
  1243  func (m *IpsecSadEntryAddDelV3) Reset()               { *m = IpsecSadEntryAddDelV3{} }
  1244  func (*IpsecSadEntryAddDelV3) GetMessageName() string { return "ipsec_sad_entry_add_del_v3" }
  1245  func (*IpsecSadEntryAddDelV3) GetCrcString() string   { return "c77ebd92" }
  1246  func (*IpsecSadEntryAddDelV3) GetMessageType() api.MessageType {
  1247  	return api.RequestMessage
  1248  }
  1249  
  1250  func (m *IpsecSadEntryAddDelV3) Size() (size int) {
  1251  	if m == nil {
  1252  		return 0
  1253  	}
  1254  	size += 1       // m.IsAdd
  1255  	size += 4       // m.Entry.SadID
  1256  	size += 4       // m.Entry.Spi
  1257  	size += 4       // m.Entry.Protocol
  1258  	size += 4       // m.Entry.CryptoAlgorithm
  1259  	size += 1       // m.Entry.CryptoKey.Length
  1260  	size += 1 * 128 // m.Entry.CryptoKey.Data
  1261  	size += 4       // m.Entry.IntegrityAlgorithm
  1262  	size += 1       // m.Entry.IntegrityKey.Length
  1263  	size += 1 * 128 // m.Entry.IntegrityKey.Data
  1264  	size += 4       // m.Entry.Flags
  1265  	size += 4       // m.Entry.Tunnel.Instance
  1266  	size += 1       // m.Entry.Tunnel.Src.Af
  1267  	size += 1 * 16  // m.Entry.Tunnel.Src.Un
  1268  	size += 1       // m.Entry.Tunnel.Dst.Af
  1269  	size += 1 * 16  // m.Entry.Tunnel.Dst.Un
  1270  	size += 4       // m.Entry.Tunnel.SwIfIndex
  1271  	size += 4       // m.Entry.Tunnel.TableID
  1272  	size += 1       // m.Entry.Tunnel.EncapDecapFlags
  1273  	size += 1       // m.Entry.Tunnel.Mode
  1274  	size += 1       // m.Entry.Tunnel.Flags
  1275  	size += 1       // m.Entry.Tunnel.Dscp
  1276  	size += 1       // m.Entry.Tunnel.HopLimit
  1277  	size += 4       // m.Entry.Salt
  1278  	size += 2       // m.Entry.UDPSrcPort
  1279  	size += 2       // m.Entry.UDPDstPort
  1280  	return size
  1281  }
  1282  func (m *IpsecSadEntryAddDelV3) Marshal(b []byte) ([]byte, error) {
  1283  	if b == nil {
  1284  		b = make([]byte, m.Size())
  1285  	}
  1286  	buf := codec.NewBuffer(b)
  1287  	buf.EncodeBool(m.IsAdd)
  1288  	buf.EncodeUint32(m.Entry.SadID)
  1289  	buf.EncodeUint32(m.Entry.Spi)
  1290  	buf.EncodeUint32(uint32(m.Entry.Protocol))
  1291  	buf.EncodeUint32(uint32(m.Entry.CryptoAlgorithm))
  1292  	buf.EncodeUint8(m.Entry.CryptoKey.Length)
  1293  	buf.EncodeBytes(m.Entry.CryptoKey.Data, 128)
  1294  	buf.EncodeUint32(uint32(m.Entry.IntegrityAlgorithm))
  1295  	buf.EncodeUint8(m.Entry.IntegrityKey.Length)
  1296  	buf.EncodeBytes(m.Entry.IntegrityKey.Data, 128)
  1297  	buf.EncodeUint32(uint32(m.Entry.Flags))
  1298  	buf.EncodeUint32(m.Entry.Tunnel.Instance)
  1299  	buf.EncodeUint8(uint8(m.Entry.Tunnel.Src.Af))
  1300  	buf.EncodeBytes(m.Entry.Tunnel.Src.Un.XXX_UnionData[:], 16)
  1301  	buf.EncodeUint8(uint8(m.Entry.Tunnel.Dst.Af))
  1302  	buf.EncodeBytes(m.Entry.Tunnel.Dst.Un.XXX_UnionData[:], 16)
  1303  	buf.EncodeUint32(uint32(m.Entry.Tunnel.SwIfIndex))
  1304  	buf.EncodeUint32(m.Entry.Tunnel.TableID)
  1305  	buf.EncodeUint8(uint8(m.Entry.Tunnel.EncapDecapFlags))
  1306  	buf.EncodeUint8(uint8(m.Entry.Tunnel.Mode))
  1307  	buf.EncodeUint8(uint8(m.Entry.Tunnel.Flags))
  1308  	buf.EncodeUint8(uint8(m.Entry.Tunnel.Dscp))
  1309  	buf.EncodeUint8(m.Entry.Tunnel.HopLimit)
  1310  	buf.EncodeUint32(m.Entry.Salt)
  1311  	buf.EncodeUint16(m.Entry.UDPSrcPort)
  1312  	buf.EncodeUint16(m.Entry.UDPDstPort)
  1313  	return buf.Bytes(), nil
  1314  }
  1315  func (m *IpsecSadEntryAddDelV3) Unmarshal(b []byte) error {
  1316  	buf := codec.NewBuffer(b)
  1317  	m.IsAdd = buf.DecodeBool()
  1318  	m.Entry.SadID = buf.DecodeUint32()
  1319  	m.Entry.Spi = buf.DecodeUint32()
  1320  	m.Entry.Protocol = ipsec_types.IpsecProto(buf.DecodeUint32())
  1321  	m.Entry.CryptoAlgorithm = ipsec_types.IpsecCryptoAlg(buf.DecodeUint32())
  1322  	m.Entry.CryptoKey.Length = buf.DecodeUint8()
  1323  	m.Entry.CryptoKey.Data = make([]byte, 128)
  1324  	copy(m.Entry.CryptoKey.Data, buf.DecodeBytes(len(m.Entry.CryptoKey.Data)))
  1325  	m.Entry.IntegrityAlgorithm = ipsec_types.IpsecIntegAlg(buf.DecodeUint32())
  1326  	m.Entry.IntegrityKey.Length = buf.DecodeUint8()
  1327  	m.Entry.IntegrityKey.Data = make([]byte, 128)
  1328  	copy(m.Entry.IntegrityKey.Data, buf.DecodeBytes(len(m.Entry.IntegrityKey.Data)))
  1329  	m.Entry.Flags = ipsec_types.IpsecSadFlags(buf.DecodeUint32())
  1330  	m.Entry.Tunnel.Instance = buf.DecodeUint32()
  1331  	m.Entry.Tunnel.Src.Af = ip_types.AddressFamily(buf.DecodeUint8())
  1332  	copy(m.Entry.Tunnel.Src.Un.XXX_UnionData[:], buf.DecodeBytes(16))
  1333  	m.Entry.Tunnel.Dst.Af = ip_types.AddressFamily(buf.DecodeUint8())
  1334  	copy(m.Entry.Tunnel.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16))
  1335  	m.Entry.Tunnel.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
  1336  	m.Entry.Tunnel.TableID = buf.DecodeUint32()
  1337  	m.Entry.Tunnel.EncapDecapFlags = tunnel_types.TunnelEncapDecapFlags(buf.DecodeUint8())
  1338  	m.Entry.Tunnel.Mode = tunnel_types.TunnelMode(buf.DecodeUint8())
  1339  	m.Entry.Tunnel.Flags = tunnel_types.TunnelFlags(buf.DecodeUint8())
  1340  	m.Entry.Tunnel.Dscp = ip_types.IPDscp(buf.DecodeUint8())
  1341  	m.Entry.Tunnel.HopLimit = buf.DecodeUint8()
  1342  	m.Entry.Salt = buf.DecodeUint32()
  1343  	m.Entry.UDPSrcPort = buf.DecodeUint16()
  1344  	m.Entry.UDPDstPort = buf.DecodeUint16()
  1345  	return nil
  1346  }
  1347  
  1348  // IpsecSadEntryAddDelV3Reply defines message 'ipsec_sad_entry_add_del_v3_reply'.
  1349  type IpsecSadEntryAddDelV3Reply struct {
  1350  	Retval    int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
  1351  	StatIndex uint32 `binapi:"u32,name=stat_index" json:"stat_index,omitempty"`
  1352  }
  1353  
  1354  func (m *IpsecSadEntryAddDelV3Reply) Reset()               { *m = IpsecSadEntryAddDelV3Reply{} }
  1355  func (*IpsecSadEntryAddDelV3Reply) GetMessageName() string { return "ipsec_sad_entry_add_del_v3_reply" }
  1356  func (*IpsecSadEntryAddDelV3Reply) GetCrcString() string   { return "9ffac24b" }
  1357  func (*IpsecSadEntryAddDelV3Reply) GetMessageType() api.MessageType {
  1358  	return api.ReplyMessage
  1359  }
  1360  
  1361  func (m *IpsecSadEntryAddDelV3Reply) Size() (size int) {
  1362  	if m == nil {
  1363  		return 0
  1364  	}
  1365  	size += 4 // m.Retval
  1366  	size += 4 // m.StatIndex
  1367  	return size
  1368  }
  1369  func (m *IpsecSadEntryAddDelV3Reply) Marshal(b []byte) ([]byte, error) {
  1370  	if b == nil {
  1371  		b = make([]byte, m.Size())
  1372  	}
  1373  	buf := codec.NewBuffer(b)
  1374  	buf.EncodeInt32(m.Retval)
  1375  	buf.EncodeUint32(m.StatIndex)
  1376  	return buf.Bytes(), nil
  1377  }
  1378  func (m *IpsecSadEntryAddDelV3Reply) Unmarshal(b []byte) error {
  1379  	buf := codec.NewBuffer(b)
  1380  	m.Retval = buf.DecodeInt32()
  1381  	m.StatIndex = buf.DecodeUint32()
  1382  	return nil
  1383  }
  1384  
  1385  // IpsecSadEntryAddReply defines message 'ipsec_sad_entry_add_reply'.
  1386  type IpsecSadEntryAddReply struct {
  1387  	Retval    int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
  1388  	StatIndex uint32 `binapi:"u32,name=stat_index" json:"stat_index,omitempty"`
  1389  }
  1390  
  1391  func (m *IpsecSadEntryAddReply) Reset()               { *m = IpsecSadEntryAddReply{} }
  1392  func (*IpsecSadEntryAddReply) GetMessageName() string { return "ipsec_sad_entry_add_reply" }
  1393  func (*IpsecSadEntryAddReply) GetCrcString() string   { return "9ffac24b" }
  1394  func (*IpsecSadEntryAddReply) GetMessageType() api.MessageType {
  1395  	return api.ReplyMessage
  1396  }
  1397  
  1398  func (m *IpsecSadEntryAddReply) Size() (size int) {
  1399  	if m == nil {
  1400  		return 0
  1401  	}
  1402  	size += 4 // m.Retval
  1403  	size += 4 // m.StatIndex
  1404  	return size
  1405  }
  1406  func (m *IpsecSadEntryAddReply) Marshal(b []byte) ([]byte, error) {
  1407  	if b == nil {
  1408  		b = make([]byte, m.Size())
  1409  	}
  1410  	buf := codec.NewBuffer(b)
  1411  	buf.EncodeInt32(m.Retval)
  1412  	buf.EncodeUint32(m.StatIndex)
  1413  	return buf.Bytes(), nil
  1414  }
  1415  func (m *IpsecSadEntryAddReply) Unmarshal(b []byte) error {
  1416  	buf := codec.NewBuffer(b)
  1417  	m.Retval = buf.DecodeInt32()
  1418  	m.StatIndex = buf.DecodeUint32()
  1419  	return nil
  1420  }
  1421  
  1422  // IpsecSadEntryDel defines message 'ipsec_sad_entry_del'.
  1423  type IpsecSadEntryDel struct {
  1424  	ID uint32 `binapi:"u32,name=id" json:"id,omitempty"`
  1425  }
  1426  
  1427  func (m *IpsecSadEntryDel) Reset()               { *m = IpsecSadEntryDel{} }
  1428  func (*IpsecSadEntryDel) GetMessageName() string { return "ipsec_sad_entry_del" }
  1429  func (*IpsecSadEntryDel) GetCrcString() string   { return "3a91bde5" }
  1430  func (*IpsecSadEntryDel) GetMessageType() api.MessageType {
  1431  	return api.RequestMessage
  1432  }
  1433  
  1434  func (m *IpsecSadEntryDel) Size() (size int) {
  1435  	if m == nil {
  1436  		return 0
  1437  	}
  1438  	size += 4 // m.ID
  1439  	return size
  1440  }
  1441  func (m *IpsecSadEntryDel) Marshal(b []byte) ([]byte, error) {
  1442  	if b == nil {
  1443  		b = make([]byte, m.Size())
  1444  	}
  1445  	buf := codec.NewBuffer(b)
  1446  	buf.EncodeUint32(m.ID)
  1447  	return buf.Bytes(), nil
  1448  }
  1449  func (m *IpsecSadEntryDel) Unmarshal(b []byte) error {
  1450  	buf := codec.NewBuffer(b)
  1451  	m.ID = buf.DecodeUint32()
  1452  	return nil
  1453  }
  1454  
  1455  // IpsecSadEntryDelReply defines message 'ipsec_sad_entry_del_reply'.
  1456  type IpsecSadEntryDelReply struct {
  1457  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
  1458  }
  1459  
  1460  func (m *IpsecSadEntryDelReply) Reset()               { *m = IpsecSadEntryDelReply{} }
  1461  func (*IpsecSadEntryDelReply) GetMessageName() string { return "ipsec_sad_entry_del_reply" }
  1462  func (*IpsecSadEntryDelReply) GetCrcString() string   { return "e8d4e804" }
  1463  func (*IpsecSadEntryDelReply) GetMessageType() api.MessageType {
  1464  	return api.ReplyMessage
  1465  }
  1466  
  1467  func (m *IpsecSadEntryDelReply) Size() (size int) {
  1468  	if m == nil {
  1469  		return 0
  1470  	}
  1471  	size += 4 // m.Retval
  1472  	return size
  1473  }
  1474  func (m *IpsecSadEntryDelReply) Marshal(b []byte) ([]byte, error) {
  1475  	if b == nil {
  1476  		b = make([]byte, m.Size())
  1477  	}
  1478  	buf := codec.NewBuffer(b)
  1479  	buf.EncodeInt32(m.Retval)
  1480  	return buf.Bytes(), nil
  1481  }
  1482  func (m *IpsecSadEntryDelReply) Unmarshal(b []byte) error {
  1483  	buf := codec.NewBuffer(b)
  1484  	m.Retval = buf.DecodeInt32()
  1485  	return nil
  1486  }
  1487  
  1488  // IpsecSelectBackend defines message 'ipsec_select_backend'.
  1489  type IpsecSelectBackend struct {
  1490  	Protocol ipsec_types.IpsecProto `binapi:"ipsec_proto,name=protocol" json:"protocol,omitempty"`
  1491  	Index    uint8                  `binapi:"u8,name=index" json:"index,omitempty"`
  1492  }
  1493  
  1494  func (m *IpsecSelectBackend) Reset()               { *m = IpsecSelectBackend{} }
  1495  func (*IpsecSelectBackend) GetMessageName() string { return "ipsec_select_backend" }
  1496  func (*IpsecSelectBackend) GetCrcString() string   { return "5bcfd3b7" }
  1497  func (*IpsecSelectBackend) GetMessageType() api.MessageType {
  1498  	return api.RequestMessage
  1499  }
  1500  
  1501  func (m *IpsecSelectBackend) Size() (size int) {
  1502  	if m == nil {
  1503  		return 0
  1504  	}
  1505  	size += 4 // m.Protocol
  1506  	size += 1 // m.Index
  1507  	return size
  1508  }
  1509  func (m *IpsecSelectBackend) Marshal(b []byte) ([]byte, error) {
  1510  	if b == nil {
  1511  		b = make([]byte, m.Size())
  1512  	}
  1513  	buf := codec.NewBuffer(b)
  1514  	buf.EncodeUint32(uint32(m.Protocol))
  1515  	buf.EncodeUint8(m.Index)
  1516  	return buf.Bytes(), nil
  1517  }
  1518  func (m *IpsecSelectBackend) Unmarshal(b []byte) error {
  1519  	buf := codec.NewBuffer(b)
  1520  	m.Protocol = ipsec_types.IpsecProto(buf.DecodeUint32())
  1521  	m.Index = buf.DecodeUint8()
  1522  	return nil
  1523  }
  1524  
  1525  // IpsecSelectBackendReply defines message 'ipsec_select_backend_reply'.
  1526  type IpsecSelectBackendReply struct {
  1527  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
  1528  }
  1529  
  1530  func (m *IpsecSelectBackendReply) Reset()               { *m = IpsecSelectBackendReply{} }
  1531  func (*IpsecSelectBackendReply) GetMessageName() string { return "ipsec_select_backend_reply" }
  1532  func (*IpsecSelectBackendReply) GetCrcString() string   { return "e8d4e804" }
  1533  func (*IpsecSelectBackendReply) GetMessageType() api.MessageType {
  1534  	return api.ReplyMessage
  1535  }
  1536  
  1537  func (m *IpsecSelectBackendReply) Size() (size int) {
  1538  	if m == nil {
  1539  		return 0
  1540  	}
  1541  	size += 4 // m.Retval
  1542  	return size
  1543  }
  1544  func (m *IpsecSelectBackendReply) Marshal(b []byte) ([]byte, error) {
  1545  	if b == nil {
  1546  		b = make([]byte, m.Size())
  1547  	}
  1548  	buf := codec.NewBuffer(b)
  1549  	buf.EncodeInt32(m.Retval)
  1550  	return buf.Bytes(), nil
  1551  }
  1552  func (m *IpsecSelectBackendReply) Unmarshal(b []byte) error {
  1553  	buf := codec.NewBuffer(b)
  1554  	m.Retval = buf.DecodeInt32()
  1555  	return nil
  1556  }
  1557  
  1558  // IpsecSetAsyncMode defines message 'ipsec_set_async_mode'.
  1559  type IpsecSetAsyncMode struct {
  1560  	AsyncEnable bool `binapi:"bool,name=async_enable" json:"async_enable,omitempty"`
  1561  }
  1562  
  1563  func (m *IpsecSetAsyncMode) Reset()               { *m = IpsecSetAsyncMode{} }
  1564  func (*IpsecSetAsyncMode) GetMessageName() string { return "ipsec_set_async_mode" }
  1565  func (*IpsecSetAsyncMode) GetCrcString() string   { return "a6465f7c" }
  1566  func (*IpsecSetAsyncMode) GetMessageType() api.MessageType {
  1567  	return api.RequestMessage
  1568  }
  1569  
  1570  func (m *IpsecSetAsyncMode) Size() (size int) {
  1571  	if m == nil {
  1572  		return 0
  1573  	}
  1574  	size += 1 // m.AsyncEnable
  1575  	return size
  1576  }
  1577  func (m *IpsecSetAsyncMode) Marshal(b []byte) ([]byte, error) {
  1578  	if b == nil {
  1579  		b = make([]byte, m.Size())
  1580  	}
  1581  	buf := codec.NewBuffer(b)
  1582  	buf.EncodeBool(m.AsyncEnable)
  1583  	return buf.Bytes(), nil
  1584  }
  1585  func (m *IpsecSetAsyncMode) Unmarshal(b []byte) error {
  1586  	buf := codec.NewBuffer(b)
  1587  	m.AsyncEnable = buf.DecodeBool()
  1588  	return nil
  1589  }
  1590  
  1591  // IpsecSetAsyncModeReply defines message 'ipsec_set_async_mode_reply'.
  1592  type IpsecSetAsyncModeReply struct {
  1593  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
  1594  }
  1595  
  1596  func (m *IpsecSetAsyncModeReply) Reset()               { *m = IpsecSetAsyncModeReply{} }
  1597  func (*IpsecSetAsyncModeReply) GetMessageName() string { return "ipsec_set_async_mode_reply" }
  1598  func (*IpsecSetAsyncModeReply) GetCrcString() string   { return "e8d4e804" }
  1599  func (*IpsecSetAsyncModeReply) GetMessageType() api.MessageType {
  1600  	return api.ReplyMessage
  1601  }
  1602  
  1603  func (m *IpsecSetAsyncModeReply) Size() (size int) {
  1604  	if m == nil {
  1605  		return 0
  1606  	}
  1607  	size += 4 // m.Retval
  1608  	return size
  1609  }
  1610  func (m *IpsecSetAsyncModeReply) Marshal(b []byte) ([]byte, error) {
  1611  	if b == nil {
  1612  		b = make([]byte, m.Size())
  1613  	}
  1614  	buf := codec.NewBuffer(b)
  1615  	buf.EncodeInt32(m.Retval)
  1616  	return buf.Bytes(), nil
  1617  }
  1618  func (m *IpsecSetAsyncModeReply) Unmarshal(b []byte) error {
  1619  	buf := codec.NewBuffer(b)
  1620  	m.Retval = buf.DecodeInt32()
  1621  	return nil
  1622  }
  1623  
  1624  // IpsecSpdAddDel defines message 'ipsec_spd_add_del'.
  1625  type IpsecSpdAddDel struct {
  1626  	IsAdd bool   `binapi:"bool,name=is_add" json:"is_add,omitempty"`
  1627  	SpdID uint32 `binapi:"u32,name=spd_id" json:"spd_id,omitempty"`
  1628  }
  1629  
  1630  func (m *IpsecSpdAddDel) Reset()               { *m = IpsecSpdAddDel{} }
  1631  func (*IpsecSpdAddDel) GetMessageName() string { return "ipsec_spd_add_del" }
  1632  func (*IpsecSpdAddDel) GetCrcString() string   { return "20e89a95" }
  1633  func (*IpsecSpdAddDel) GetMessageType() api.MessageType {
  1634  	return api.RequestMessage
  1635  }
  1636  
  1637  func (m *IpsecSpdAddDel) Size() (size int) {
  1638  	if m == nil {
  1639  		return 0
  1640  	}
  1641  	size += 1 // m.IsAdd
  1642  	size += 4 // m.SpdID
  1643  	return size
  1644  }
  1645  func (m *IpsecSpdAddDel) Marshal(b []byte) ([]byte, error) {
  1646  	if b == nil {
  1647  		b = make([]byte, m.Size())
  1648  	}
  1649  	buf := codec.NewBuffer(b)
  1650  	buf.EncodeBool(m.IsAdd)
  1651  	buf.EncodeUint32(m.SpdID)
  1652  	return buf.Bytes(), nil
  1653  }
  1654  func (m *IpsecSpdAddDel) Unmarshal(b []byte) error {
  1655  	buf := codec.NewBuffer(b)
  1656  	m.IsAdd = buf.DecodeBool()
  1657  	m.SpdID = buf.DecodeUint32()
  1658  	return nil
  1659  }
  1660  
  1661  // IpsecSpdAddDelReply defines message 'ipsec_spd_add_del_reply'.
  1662  type IpsecSpdAddDelReply struct {
  1663  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
  1664  }
  1665  
  1666  func (m *IpsecSpdAddDelReply) Reset()               { *m = IpsecSpdAddDelReply{} }
  1667  func (*IpsecSpdAddDelReply) GetMessageName() string { return "ipsec_spd_add_del_reply" }
  1668  func (*IpsecSpdAddDelReply) GetCrcString() string   { return "e8d4e804" }
  1669  func (*IpsecSpdAddDelReply) GetMessageType() api.MessageType {
  1670  	return api.ReplyMessage
  1671  }
  1672  
  1673  func (m *IpsecSpdAddDelReply) Size() (size int) {
  1674  	if m == nil {
  1675  		return 0
  1676  	}
  1677  	size += 4 // m.Retval
  1678  	return size
  1679  }
  1680  func (m *IpsecSpdAddDelReply) Marshal(b []byte) ([]byte, error) {
  1681  	if b == nil {
  1682  		b = make([]byte, m.Size())
  1683  	}
  1684  	buf := codec.NewBuffer(b)
  1685  	buf.EncodeInt32(m.Retval)
  1686  	return buf.Bytes(), nil
  1687  }
  1688  func (m *IpsecSpdAddDelReply) Unmarshal(b []byte) error {
  1689  	buf := codec.NewBuffer(b)
  1690  	m.Retval = buf.DecodeInt32()
  1691  	return nil
  1692  }
  1693  
  1694  // IpsecSpdDetails defines message 'ipsec_spd_details'.
  1695  type IpsecSpdDetails struct {
  1696  	Entry ipsec_types.IpsecSpdEntry `binapi:"ipsec_spd_entry,name=entry" json:"entry,omitempty"`
  1697  }
  1698  
  1699  func (m *IpsecSpdDetails) Reset()               { *m = IpsecSpdDetails{} }
  1700  func (*IpsecSpdDetails) GetMessageName() string { return "ipsec_spd_details" }
  1701  func (*IpsecSpdDetails) GetCrcString() string   { return "5813d7a2" }
  1702  func (*IpsecSpdDetails) GetMessageType() api.MessageType {
  1703  	return api.ReplyMessage
  1704  }
  1705  
  1706  func (m *IpsecSpdDetails) Size() (size int) {
  1707  	if m == nil {
  1708  		return 0
  1709  	}
  1710  	size += 4      // m.Entry.SpdID
  1711  	size += 4      // m.Entry.Priority
  1712  	size += 1      // m.Entry.IsOutbound
  1713  	size += 4      // m.Entry.SaID
  1714  	size += 4      // m.Entry.Policy
  1715  	size += 1      // m.Entry.Protocol
  1716  	size += 1      // m.Entry.RemoteAddressStart.Af
  1717  	size += 1 * 16 // m.Entry.RemoteAddressStart.Un
  1718  	size += 1      // m.Entry.RemoteAddressStop.Af
  1719  	size += 1 * 16 // m.Entry.RemoteAddressStop.Un
  1720  	size += 1      // m.Entry.LocalAddressStart.Af
  1721  	size += 1 * 16 // m.Entry.LocalAddressStart.Un
  1722  	size += 1      // m.Entry.LocalAddressStop.Af
  1723  	size += 1 * 16 // m.Entry.LocalAddressStop.Un
  1724  	size += 2      // m.Entry.RemotePortStart
  1725  	size += 2      // m.Entry.RemotePortStop
  1726  	size += 2      // m.Entry.LocalPortStart
  1727  	size += 2      // m.Entry.LocalPortStop
  1728  	return size
  1729  }
  1730  func (m *IpsecSpdDetails) Marshal(b []byte) ([]byte, error) {
  1731  	if b == nil {
  1732  		b = make([]byte, m.Size())
  1733  	}
  1734  	buf := codec.NewBuffer(b)
  1735  	buf.EncodeUint32(m.Entry.SpdID)
  1736  	buf.EncodeInt32(m.Entry.Priority)
  1737  	buf.EncodeBool(m.Entry.IsOutbound)
  1738  	buf.EncodeUint32(m.Entry.SaID)
  1739  	buf.EncodeUint32(uint32(m.Entry.Policy))
  1740  	buf.EncodeUint8(m.Entry.Protocol)
  1741  	buf.EncodeUint8(uint8(m.Entry.RemoteAddressStart.Af))
  1742  	buf.EncodeBytes(m.Entry.RemoteAddressStart.Un.XXX_UnionData[:], 16)
  1743  	buf.EncodeUint8(uint8(m.Entry.RemoteAddressStop.Af))
  1744  	buf.EncodeBytes(m.Entry.RemoteAddressStop.Un.XXX_UnionData[:], 16)
  1745  	buf.EncodeUint8(uint8(m.Entry.LocalAddressStart.Af))
  1746  	buf.EncodeBytes(m.Entry.LocalAddressStart.Un.XXX_UnionData[:], 16)
  1747  	buf.EncodeUint8(uint8(m.Entry.LocalAddressStop.Af))
  1748  	buf.EncodeBytes(m.Entry.LocalAddressStop.Un.XXX_UnionData[:], 16)
  1749  	buf.EncodeUint16(m.Entry.RemotePortStart)
  1750  	buf.EncodeUint16(m.Entry.RemotePortStop)
  1751  	buf.EncodeUint16(m.Entry.LocalPortStart)
  1752  	buf.EncodeUint16(m.Entry.LocalPortStop)
  1753  	return buf.Bytes(), nil
  1754  }
  1755  func (m *IpsecSpdDetails) Unmarshal(b []byte) error {
  1756  	buf := codec.NewBuffer(b)
  1757  	m.Entry.SpdID = buf.DecodeUint32()
  1758  	m.Entry.Priority = buf.DecodeInt32()
  1759  	m.Entry.IsOutbound = buf.DecodeBool()
  1760  	m.Entry.SaID = buf.DecodeUint32()
  1761  	m.Entry.Policy = ipsec_types.IpsecSpdAction(buf.DecodeUint32())
  1762  	m.Entry.Protocol = buf.DecodeUint8()
  1763  	m.Entry.RemoteAddressStart.Af = ip_types.AddressFamily(buf.DecodeUint8())
  1764  	copy(m.Entry.RemoteAddressStart.Un.XXX_UnionData[:], buf.DecodeBytes(16))
  1765  	m.Entry.RemoteAddressStop.Af = ip_types.AddressFamily(buf.DecodeUint8())
  1766  	copy(m.Entry.RemoteAddressStop.Un.XXX_UnionData[:], buf.DecodeBytes(16))
  1767  	m.Entry.LocalAddressStart.Af = ip_types.AddressFamily(buf.DecodeUint8())
  1768  	copy(m.Entry.LocalAddressStart.Un.XXX_UnionData[:], buf.DecodeBytes(16))
  1769  	m.Entry.LocalAddressStop.Af = ip_types.AddressFamily(buf.DecodeUint8())
  1770  	copy(m.Entry.LocalAddressStop.Un.XXX_UnionData[:], buf.DecodeBytes(16))
  1771  	m.Entry.RemotePortStart = buf.DecodeUint16()
  1772  	m.Entry.RemotePortStop = buf.DecodeUint16()
  1773  	m.Entry.LocalPortStart = buf.DecodeUint16()
  1774  	m.Entry.LocalPortStop = buf.DecodeUint16()
  1775  	return nil
  1776  }
  1777  
  1778  // IpsecSpdDump defines message 'ipsec_spd_dump'.
  1779  type IpsecSpdDump struct {
  1780  	SpdID uint32 `binapi:"u32,name=spd_id" json:"spd_id,omitempty"`
  1781  	SaID  uint32 `binapi:"u32,name=sa_id" json:"sa_id,omitempty"`
  1782  }
  1783  
  1784  func (m *IpsecSpdDump) Reset()               { *m = IpsecSpdDump{} }
  1785  func (*IpsecSpdDump) GetMessageName() string { return "ipsec_spd_dump" }
  1786  func (*IpsecSpdDump) GetCrcString() string   { return "afefbf7d" }
  1787  func (*IpsecSpdDump) GetMessageType() api.MessageType {
  1788  	return api.RequestMessage
  1789  }
  1790  
  1791  func (m *IpsecSpdDump) Size() (size int) {
  1792  	if m == nil {
  1793  		return 0
  1794  	}
  1795  	size += 4 // m.SpdID
  1796  	size += 4 // m.SaID
  1797  	return size
  1798  }
  1799  func (m *IpsecSpdDump) Marshal(b []byte) ([]byte, error) {
  1800  	if b == nil {
  1801  		b = make([]byte, m.Size())
  1802  	}
  1803  	buf := codec.NewBuffer(b)
  1804  	buf.EncodeUint32(m.SpdID)
  1805  	buf.EncodeUint32(m.SaID)
  1806  	return buf.Bytes(), nil
  1807  }
  1808  func (m *IpsecSpdDump) Unmarshal(b []byte) error {
  1809  	buf := codec.NewBuffer(b)
  1810  	m.SpdID = buf.DecodeUint32()
  1811  	m.SaID = buf.DecodeUint32()
  1812  	return nil
  1813  }
  1814  
  1815  // IpsecSpdEntryAddDel defines message 'ipsec_spd_entry_add_del'.
  1816  // Deprecated: the message will be removed in the future versions
  1817  type IpsecSpdEntryAddDel struct {
  1818  	IsAdd bool                      `binapi:"bool,name=is_add" json:"is_add,omitempty"`
  1819  	Entry ipsec_types.IpsecSpdEntry `binapi:"ipsec_spd_entry,name=entry" json:"entry,omitempty"`
  1820  }
  1821  
  1822  func (m *IpsecSpdEntryAddDel) Reset()               { *m = IpsecSpdEntryAddDel{} }
  1823  func (*IpsecSpdEntryAddDel) GetMessageName() string { return "ipsec_spd_entry_add_del" }
  1824  func (*IpsecSpdEntryAddDel) GetCrcString() string   { return "338b7411" }
  1825  func (*IpsecSpdEntryAddDel) GetMessageType() api.MessageType {
  1826  	return api.RequestMessage
  1827  }
  1828  
  1829  func (m *IpsecSpdEntryAddDel) Size() (size int) {
  1830  	if m == nil {
  1831  		return 0
  1832  	}
  1833  	size += 1      // m.IsAdd
  1834  	size += 4      // m.Entry.SpdID
  1835  	size += 4      // m.Entry.Priority
  1836  	size += 1      // m.Entry.IsOutbound
  1837  	size += 4      // m.Entry.SaID
  1838  	size += 4      // m.Entry.Policy
  1839  	size += 1      // m.Entry.Protocol
  1840  	size += 1      // m.Entry.RemoteAddressStart.Af
  1841  	size += 1 * 16 // m.Entry.RemoteAddressStart.Un
  1842  	size += 1      // m.Entry.RemoteAddressStop.Af
  1843  	size += 1 * 16 // m.Entry.RemoteAddressStop.Un
  1844  	size += 1      // m.Entry.LocalAddressStart.Af
  1845  	size += 1 * 16 // m.Entry.LocalAddressStart.Un
  1846  	size += 1      // m.Entry.LocalAddressStop.Af
  1847  	size += 1 * 16 // m.Entry.LocalAddressStop.Un
  1848  	size += 2      // m.Entry.RemotePortStart
  1849  	size += 2      // m.Entry.RemotePortStop
  1850  	size += 2      // m.Entry.LocalPortStart
  1851  	size += 2      // m.Entry.LocalPortStop
  1852  	return size
  1853  }
  1854  func (m *IpsecSpdEntryAddDel) Marshal(b []byte) ([]byte, error) {
  1855  	if b == nil {
  1856  		b = make([]byte, m.Size())
  1857  	}
  1858  	buf := codec.NewBuffer(b)
  1859  	buf.EncodeBool(m.IsAdd)
  1860  	buf.EncodeUint32(m.Entry.SpdID)
  1861  	buf.EncodeInt32(m.Entry.Priority)
  1862  	buf.EncodeBool(m.Entry.IsOutbound)
  1863  	buf.EncodeUint32(m.Entry.SaID)
  1864  	buf.EncodeUint32(uint32(m.Entry.Policy))
  1865  	buf.EncodeUint8(m.Entry.Protocol)
  1866  	buf.EncodeUint8(uint8(m.Entry.RemoteAddressStart.Af))
  1867  	buf.EncodeBytes(m.Entry.RemoteAddressStart.Un.XXX_UnionData[:], 16)
  1868  	buf.EncodeUint8(uint8(m.Entry.RemoteAddressStop.Af))
  1869  	buf.EncodeBytes(m.Entry.RemoteAddressStop.Un.XXX_UnionData[:], 16)
  1870  	buf.EncodeUint8(uint8(m.Entry.LocalAddressStart.Af))
  1871  	buf.EncodeBytes(m.Entry.LocalAddressStart.Un.XXX_UnionData[:], 16)
  1872  	buf.EncodeUint8(uint8(m.Entry.LocalAddressStop.Af))
  1873  	buf.EncodeBytes(m.Entry.LocalAddressStop.Un.XXX_UnionData[:], 16)
  1874  	buf.EncodeUint16(m.Entry.RemotePortStart)
  1875  	buf.EncodeUint16(m.Entry.RemotePortStop)
  1876  	buf.EncodeUint16(m.Entry.LocalPortStart)
  1877  	buf.EncodeUint16(m.Entry.LocalPortStop)
  1878  	return buf.Bytes(), nil
  1879  }
  1880  func (m *IpsecSpdEntryAddDel) Unmarshal(b []byte) error {
  1881  	buf := codec.NewBuffer(b)
  1882  	m.IsAdd = buf.DecodeBool()
  1883  	m.Entry.SpdID = buf.DecodeUint32()
  1884  	m.Entry.Priority = buf.DecodeInt32()
  1885  	m.Entry.IsOutbound = buf.DecodeBool()
  1886  	m.Entry.SaID = buf.DecodeUint32()
  1887  	m.Entry.Policy = ipsec_types.IpsecSpdAction(buf.DecodeUint32())
  1888  	m.Entry.Protocol = buf.DecodeUint8()
  1889  	m.Entry.RemoteAddressStart.Af = ip_types.AddressFamily(buf.DecodeUint8())
  1890  	copy(m.Entry.RemoteAddressStart.Un.XXX_UnionData[:], buf.DecodeBytes(16))
  1891  	m.Entry.RemoteAddressStop.Af = ip_types.AddressFamily(buf.DecodeUint8())
  1892  	copy(m.Entry.RemoteAddressStop.Un.XXX_UnionData[:], buf.DecodeBytes(16))
  1893  	m.Entry.LocalAddressStart.Af = ip_types.AddressFamily(buf.DecodeUint8())
  1894  	copy(m.Entry.LocalAddressStart.Un.XXX_UnionData[:], buf.DecodeBytes(16))
  1895  	m.Entry.LocalAddressStop.Af = ip_types.AddressFamily(buf.DecodeUint8())
  1896  	copy(m.Entry.LocalAddressStop.Un.XXX_UnionData[:], buf.DecodeBytes(16))
  1897  	m.Entry.RemotePortStart = buf.DecodeUint16()
  1898  	m.Entry.RemotePortStop = buf.DecodeUint16()
  1899  	m.Entry.LocalPortStart = buf.DecodeUint16()
  1900  	m.Entry.LocalPortStop = buf.DecodeUint16()
  1901  	return nil
  1902  }
  1903  
  1904  // IpsecSpdEntryAddDelReply defines message 'ipsec_spd_entry_add_del_reply'.
  1905  // Deprecated: the message will be removed in the future versions
  1906  type IpsecSpdEntryAddDelReply struct {
  1907  	Retval    int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
  1908  	StatIndex uint32 `binapi:"u32,name=stat_index" json:"stat_index,omitempty"`
  1909  }
  1910  
  1911  func (m *IpsecSpdEntryAddDelReply) Reset()               { *m = IpsecSpdEntryAddDelReply{} }
  1912  func (*IpsecSpdEntryAddDelReply) GetMessageName() string { return "ipsec_spd_entry_add_del_reply" }
  1913  func (*IpsecSpdEntryAddDelReply) GetCrcString() string   { return "9ffac24b" }
  1914  func (*IpsecSpdEntryAddDelReply) GetMessageType() api.MessageType {
  1915  	return api.ReplyMessage
  1916  }
  1917  
  1918  func (m *IpsecSpdEntryAddDelReply) Size() (size int) {
  1919  	if m == nil {
  1920  		return 0
  1921  	}
  1922  	size += 4 // m.Retval
  1923  	size += 4 // m.StatIndex
  1924  	return size
  1925  }
  1926  func (m *IpsecSpdEntryAddDelReply) Marshal(b []byte) ([]byte, error) {
  1927  	if b == nil {
  1928  		b = make([]byte, m.Size())
  1929  	}
  1930  	buf := codec.NewBuffer(b)
  1931  	buf.EncodeInt32(m.Retval)
  1932  	buf.EncodeUint32(m.StatIndex)
  1933  	return buf.Bytes(), nil
  1934  }
  1935  func (m *IpsecSpdEntryAddDelReply) Unmarshal(b []byte) error {
  1936  	buf := codec.NewBuffer(b)
  1937  	m.Retval = buf.DecodeInt32()
  1938  	m.StatIndex = buf.DecodeUint32()
  1939  	return nil
  1940  }
  1941  
  1942  // IpsecSpdEntryAddDelV2 defines message 'ipsec_spd_entry_add_del_v2'.
  1943  type IpsecSpdEntryAddDelV2 struct {
  1944  	IsAdd bool                        `binapi:"bool,name=is_add" json:"is_add,omitempty"`
  1945  	Entry ipsec_types.IpsecSpdEntryV2 `binapi:"ipsec_spd_entry_v2,name=entry" json:"entry,omitempty"`
  1946  }
  1947  
  1948  func (m *IpsecSpdEntryAddDelV2) Reset()               { *m = IpsecSpdEntryAddDelV2{} }
  1949  func (*IpsecSpdEntryAddDelV2) GetMessageName() string { return "ipsec_spd_entry_add_del_v2" }
  1950  func (*IpsecSpdEntryAddDelV2) GetCrcString() string   { return "7bfe69fc" }
  1951  func (*IpsecSpdEntryAddDelV2) GetMessageType() api.MessageType {
  1952  	return api.RequestMessage
  1953  }
  1954  
  1955  func (m *IpsecSpdEntryAddDelV2) Size() (size int) {
  1956  	if m == nil {
  1957  		return 0
  1958  	}
  1959  	size += 1      // m.IsAdd
  1960  	size += 4      // m.Entry.SpdID
  1961  	size += 4      // m.Entry.Priority
  1962  	size += 1      // m.Entry.IsOutbound
  1963  	size += 4      // m.Entry.SaID
  1964  	size += 4      // m.Entry.Policy
  1965  	size += 1      // m.Entry.Protocol
  1966  	size += 1      // m.Entry.RemoteAddressStart.Af
  1967  	size += 1 * 16 // m.Entry.RemoteAddressStart.Un
  1968  	size += 1      // m.Entry.RemoteAddressStop.Af
  1969  	size += 1 * 16 // m.Entry.RemoteAddressStop.Un
  1970  	size += 1      // m.Entry.LocalAddressStart.Af
  1971  	size += 1 * 16 // m.Entry.LocalAddressStart.Un
  1972  	size += 1      // m.Entry.LocalAddressStop.Af
  1973  	size += 1 * 16 // m.Entry.LocalAddressStop.Un
  1974  	size += 2      // m.Entry.RemotePortStart
  1975  	size += 2      // m.Entry.RemotePortStop
  1976  	size += 2      // m.Entry.LocalPortStart
  1977  	size += 2      // m.Entry.LocalPortStop
  1978  	return size
  1979  }
  1980  func (m *IpsecSpdEntryAddDelV2) Marshal(b []byte) ([]byte, error) {
  1981  	if b == nil {
  1982  		b = make([]byte, m.Size())
  1983  	}
  1984  	buf := codec.NewBuffer(b)
  1985  	buf.EncodeBool(m.IsAdd)
  1986  	buf.EncodeUint32(m.Entry.SpdID)
  1987  	buf.EncodeInt32(m.Entry.Priority)
  1988  	buf.EncodeBool(m.Entry.IsOutbound)
  1989  	buf.EncodeUint32(m.Entry.SaID)
  1990  	buf.EncodeUint32(uint32(m.Entry.Policy))
  1991  	buf.EncodeUint8(m.Entry.Protocol)
  1992  	buf.EncodeUint8(uint8(m.Entry.RemoteAddressStart.Af))
  1993  	buf.EncodeBytes(m.Entry.RemoteAddressStart.Un.XXX_UnionData[:], 16)
  1994  	buf.EncodeUint8(uint8(m.Entry.RemoteAddressStop.Af))
  1995  	buf.EncodeBytes(m.Entry.RemoteAddressStop.Un.XXX_UnionData[:], 16)
  1996  	buf.EncodeUint8(uint8(m.Entry.LocalAddressStart.Af))
  1997  	buf.EncodeBytes(m.Entry.LocalAddressStart.Un.XXX_UnionData[:], 16)
  1998  	buf.EncodeUint8(uint8(m.Entry.LocalAddressStop.Af))
  1999  	buf.EncodeBytes(m.Entry.LocalAddressStop.Un.XXX_UnionData[:], 16)
  2000  	buf.EncodeUint16(m.Entry.RemotePortStart)
  2001  	buf.EncodeUint16(m.Entry.RemotePortStop)
  2002  	buf.EncodeUint16(m.Entry.LocalPortStart)
  2003  	buf.EncodeUint16(m.Entry.LocalPortStop)
  2004  	return buf.Bytes(), nil
  2005  }
  2006  func (m *IpsecSpdEntryAddDelV2) Unmarshal(b []byte) error {
  2007  	buf := codec.NewBuffer(b)
  2008  	m.IsAdd = buf.DecodeBool()
  2009  	m.Entry.SpdID = buf.DecodeUint32()
  2010  	m.Entry.Priority = buf.DecodeInt32()
  2011  	m.Entry.IsOutbound = buf.DecodeBool()
  2012  	m.Entry.SaID = buf.DecodeUint32()
  2013  	m.Entry.Policy = ipsec_types.IpsecSpdAction(buf.DecodeUint32())
  2014  	m.Entry.Protocol = buf.DecodeUint8()
  2015  	m.Entry.RemoteAddressStart.Af = ip_types.AddressFamily(buf.DecodeUint8())
  2016  	copy(m.Entry.RemoteAddressStart.Un.XXX_UnionData[:], buf.DecodeBytes(16))
  2017  	m.Entry.RemoteAddressStop.Af = ip_types.AddressFamily(buf.DecodeUint8())
  2018  	copy(m.Entry.RemoteAddressStop.Un.XXX_UnionData[:], buf.DecodeBytes(16))
  2019  	m.Entry.LocalAddressStart.Af = ip_types.AddressFamily(buf.DecodeUint8())
  2020  	copy(m.Entry.LocalAddressStart.Un.XXX_UnionData[:], buf.DecodeBytes(16))
  2021  	m.Entry.LocalAddressStop.Af = ip_types.AddressFamily(buf.DecodeUint8())
  2022  	copy(m.Entry.LocalAddressStop.Un.XXX_UnionData[:], buf.DecodeBytes(16))
  2023  	m.Entry.RemotePortStart = buf.DecodeUint16()
  2024  	m.Entry.RemotePortStop = buf.DecodeUint16()
  2025  	m.Entry.LocalPortStart = buf.DecodeUint16()
  2026  	m.Entry.LocalPortStop = buf.DecodeUint16()
  2027  	return nil
  2028  }
  2029  
  2030  // IpsecSpdEntryAddDelV2Reply defines message 'ipsec_spd_entry_add_del_v2_reply'.
  2031  type IpsecSpdEntryAddDelV2Reply struct {
  2032  	Retval    int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
  2033  	StatIndex uint32 `binapi:"u32,name=stat_index" json:"stat_index,omitempty"`
  2034  }
  2035  
  2036  func (m *IpsecSpdEntryAddDelV2Reply) Reset()               { *m = IpsecSpdEntryAddDelV2Reply{} }
  2037  func (*IpsecSpdEntryAddDelV2Reply) GetMessageName() string { return "ipsec_spd_entry_add_del_v2_reply" }
  2038  func (*IpsecSpdEntryAddDelV2Reply) GetCrcString() string   { return "9ffac24b" }
  2039  func (*IpsecSpdEntryAddDelV2Reply) GetMessageType() api.MessageType {
  2040  	return api.ReplyMessage
  2041  }
  2042  
  2043  func (m *IpsecSpdEntryAddDelV2Reply) Size() (size int) {
  2044  	if m == nil {
  2045  		return 0
  2046  	}
  2047  	size += 4 // m.Retval
  2048  	size += 4 // m.StatIndex
  2049  	return size
  2050  }
  2051  func (m *IpsecSpdEntryAddDelV2Reply) Marshal(b []byte) ([]byte, error) {
  2052  	if b == nil {
  2053  		b = make([]byte, m.Size())
  2054  	}
  2055  	buf := codec.NewBuffer(b)
  2056  	buf.EncodeInt32(m.Retval)
  2057  	buf.EncodeUint32(m.StatIndex)
  2058  	return buf.Bytes(), nil
  2059  }
  2060  func (m *IpsecSpdEntryAddDelV2Reply) Unmarshal(b []byte) error {
  2061  	buf := codec.NewBuffer(b)
  2062  	m.Retval = buf.DecodeInt32()
  2063  	m.StatIndex = buf.DecodeUint32()
  2064  	return nil
  2065  }
  2066  
  2067  // IpsecSpdInterfaceDetails defines message 'ipsec_spd_interface_details'.
  2068  type IpsecSpdInterfaceDetails struct {
  2069  	SpdIndex  uint32                         `binapi:"u32,name=spd_index" json:"spd_index,omitempty"`
  2070  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
  2071  }
  2072  
  2073  func (m *IpsecSpdInterfaceDetails) Reset()               { *m = IpsecSpdInterfaceDetails{} }
  2074  func (*IpsecSpdInterfaceDetails) GetMessageName() string { return "ipsec_spd_interface_details" }
  2075  func (*IpsecSpdInterfaceDetails) GetCrcString() string   { return "7a0bcf3e" }
  2076  func (*IpsecSpdInterfaceDetails) GetMessageType() api.MessageType {
  2077  	return api.ReplyMessage
  2078  }
  2079  
  2080  func (m *IpsecSpdInterfaceDetails) Size() (size int) {
  2081  	if m == nil {
  2082  		return 0
  2083  	}
  2084  	size += 4 // m.SpdIndex
  2085  	size += 4 // m.SwIfIndex
  2086  	return size
  2087  }
  2088  func (m *IpsecSpdInterfaceDetails) Marshal(b []byte) ([]byte, error) {
  2089  	if b == nil {
  2090  		b = make([]byte, m.Size())
  2091  	}
  2092  	buf := codec.NewBuffer(b)
  2093  	buf.EncodeUint32(m.SpdIndex)
  2094  	buf.EncodeUint32(uint32(m.SwIfIndex))
  2095  	return buf.Bytes(), nil
  2096  }
  2097  func (m *IpsecSpdInterfaceDetails) Unmarshal(b []byte) error {
  2098  	buf := codec.NewBuffer(b)
  2099  	m.SpdIndex = buf.DecodeUint32()
  2100  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
  2101  	return nil
  2102  }
  2103  
  2104  // IpsecSpdInterfaceDump defines message 'ipsec_spd_interface_dump'.
  2105  type IpsecSpdInterfaceDump struct {
  2106  	SpdIndex      uint32 `binapi:"u32,name=spd_index" json:"spd_index,omitempty"`
  2107  	SpdIndexValid uint8  `binapi:"u8,name=spd_index_valid" json:"spd_index_valid,omitempty"`
  2108  }
  2109  
  2110  func (m *IpsecSpdInterfaceDump) Reset()               { *m = IpsecSpdInterfaceDump{} }
  2111  func (*IpsecSpdInterfaceDump) GetMessageName() string { return "ipsec_spd_interface_dump" }
  2112  func (*IpsecSpdInterfaceDump) GetCrcString() string   { return "8971de19" }
  2113  func (*IpsecSpdInterfaceDump) GetMessageType() api.MessageType {
  2114  	return api.RequestMessage
  2115  }
  2116  
  2117  func (m *IpsecSpdInterfaceDump) Size() (size int) {
  2118  	if m == nil {
  2119  		return 0
  2120  	}
  2121  	size += 4 // m.SpdIndex
  2122  	size += 1 // m.SpdIndexValid
  2123  	return size
  2124  }
  2125  func (m *IpsecSpdInterfaceDump) Marshal(b []byte) ([]byte, error) {
  2126  	if b == nil {
  2127  		b = make([]byte, m.Size())
  2128  	}
  2129  	buf := codec.NewBuffer(b)
  2130  	buf.EncodeUint32(m.SpdIndex)
  2131  	buf.EncodeUint8(m.SpdIndexValid)
  2132  	return buf.Bytes(), nil
  2133  }
  2134  func (m *IpsecSpdInterfaceDump) Unmarshal(b []byte) error {
  2135  	buf := codec.NewBuffer(b)
  2136  	m.SpdIndex = buf.DecodeUint32()
  2137  	m.SpdIndexValid = buf.DecodeUint8()
  2138  	return nil
  2139  }
  2140  
  2141  // IpsecSpdsDetails defines message 'ipsec_spds_details'.
  2142  type IpsecSpdsDetails struct {
  2143  	SpdID     uint32 `binapi:"u32,name=spd_id" json:"spd_id,omitempty"`
  2144  	Npolicies uint32 `binapi:"u32,name=npolicies" json:"npolicies,omitempty"`
  2145  }
  2146  
  2147  func (m *IpsecSpdsDetails) Reset()               { *m = IpsecSpdsDetails{} }
  2148  func (*IpsecSpdsDetails) GetMessageName() string { return "ipsec_spds_details" }
  2149  func (*IpsecSpdsDetails) GetCrcString() string   { return "a04bb254" }
  2150  func (*IpsecSpdsDetails) GetMessageType() api.MessageType {
  2151  	return api.ReplyMessage
  2152  }
  2153  
  2154  func (m *IpsecSpdsDetails) Size() (size int) {
  2155  	if m == nil {
  2156  		return 0
  2157  	}
  2158  	size += 4 // m.SpdID
  2159  	size += 4 // m.Npolicies
  2160  	return size
  2161  }
  2162  func (m *IpsecSpdsDetails) Marshal(b []byte) ([]byte, error) {
  2163  	if b == nil {
  2164  		b = make([]byte, m.Size())
  2165  	}
  2166  	buf := codec.NewBuffer(b)
  2167  	buf.EncodeUint32(m.SpdID)
  2168  	buf.EncodeUint32(m.Npolicies)
  2169  	return buf.Bytes(), nil
  2170  }
  2171  func (m *IpsecSpdsDetails) Unmarshal(b []byte) error {
  2172  	buf := codec.NewBuffer(b)
  2173  	m.SpdID = buf.DecodeUint32()
  2174  	m.Npolicies = buf.DecodeUint32()
  2175  	return nil
  2176  }
  2177  
  2178  // IpsecSpdsDump defines message 'ipsec_spds_dump'.
  2179  type IpsecSpdsDump struct{}
  2180  
  2181  func (m *IpsecSpdsDump) Reset()               { *m = IpsecSpdsDump{} }
  2182  func (*IpsecSpdsDump) GetMessageName() string { return "ipsec_spds_dump" }
  2183  func (*IpsecSpdsDump) GetCrcString() string   { return "51077d14" }
  2184  func (*IpsecSpdsDump) GetMessageType() api.MessageType {
  2185  	return api.RequestMessage
  2186  }
  2187  
  2188  func (m *IpsecSpdsDump) Size() (size int) {
  2189  	if m == nil {
  2190  		return 0
  2191  	}
  2192  	return size
  2193  }
  2194  func (m *IpsecSpdsDump) Marshal(b []byte) ([]byte, error) {
  2195  	if b == nil {
  2196  		b = make([]byte, m.Size())
  2197  	}
  2198  	buf := codec.NewBuffer(b)
  2199  	return buf.Bytes(), nil
  2200  }
  2201  func (m *IpsecSpdsDump) Unmarshal(b []byte) error {
  2202  	return nil
  2203  }
  2204  
  2205  // IpsecTunnelProtectDel defines message 'ipsec_tunnel_protect_del'.
  2206  type IpsecTunnelProtectDel struct {
  2207  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
  2208  	Nh        ip_types.Address               `binapi:"address,name=nh" json:"nh,omitempty"`
  2209  }
  2210  
  2211  func (m *IpsecTunnelProtectDel) Reset()               { *m = IpsecTunnelProtectDel{} }
  2212  func (*IpsecTunnelProtectDel) GetMessageName() string { return "ipsec_tunnel_protect_del" }
  2213  func (*IpsecTunnelProtectDel) GetCrcString() string   { return "cd239930" }
  2214  func (*IpsecTunnelProtectDel) GetMessageType() api.MessageType {
  2215  	return api.RequestMessage
  2216  }
  2217  
  2218  func (m *IpsecTunnelProtectDel) Size() (size int) {
  2219  	if m == nil {
  2220  		return 0
  2221  	}
  2222  	size += 4      // m.SwIfIndex
  2223  	size += 1      // m.Nh.Af
  2224  	size += 1 * 16 // m.Nh.Un
  2225  	return size
  2226  }
  2227  func (m *IpsecTunnelProtectDel) Marshal(b []byte) ([]byte, error) {
  2228  	if b == nil {
  2229  		b = make([]byte, m.Size())
  2230  	}
  2231  	buf := codec.NewBuffer(b)
  2232  	buf.EncodeUint32(uint32(m.SwIfIndex))
  2233  	buf.EncodeUint8(uint8(m.Nh.Af))
  2234  	buf.EncodeBytes(m.Nh.Un.XXX_UnionData[:], 16)
  2235  	return buf.Bytes(), nil
  2236  }
  2237  func (m *IpsecTunnelProtectDel) Unmarshal(b []byte) error {
  2238  	buf := codec.NewBuffer(b)
  2239  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
  2240  	m.Nh.Af = ip_types.AddressFamily(buf.DecodeUint8())
  2241  	copy(m.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16))
  2242  	return nil
  2243  }
  2244  
  2245  // IpsecTunnelProtectDelReply defines message 'ipsec_tunnel_protect_del_reply'.
  2246  type IpsecTunnelProtectDelReply struct {
  2247  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
  2248  }
  2249  
  2250  func (m *IpsecTunnelProtectDelReply) Reset()               { *m = IpsecTunnelProtectDelReply{} }
  2251  func (*IpsecTunnelProtectDelReply) GetMessageName() string { return "ipsec_tunnel_protect_del_reply" }
  2252  func (*IpsecTunnelProtectDelReply) GetCrcString() string   { return "e8d4e804" }
  2253  func (*IpsecTunnelProtectDelReply) GetMessageType() api.MessageType {
  2254  	return api.ReplyMessage
  2255  }
  2256  
  2257  func (m *IpsecTunnelProtectDelReply) Size() (size int) {
  2258  	if m == nil {
  2259  		return 0
  2260  	}
  2261  	size += 4 // m.Retval
  2262  	return size
  2263  }
  2264  func (m *IpsecTunnelProtectDelReply) Marshal(b []byte) ([]byte, error) {
  2265  	if b == nil {
  2266  		b = make([]byte, m.Size())
  2267  	}
  2268  	buf := codec.NewBuffer(b)
  2269  	buf.EncodeInt32(m.Retval)
  2270  	return buf.Bytes(), nil
  2271  }
  2272  func (m *IpsecTunnelProtectDelReply) Unmarshal(b []byte) error {
  2273  	buf := codec.NewBuffer(b)
  2274  	m.Retval = buf.DecodeInt32()
  2275  	return nil
  2276  }
  2277  
  2278  // IpsecTunnelProtectDetails defines message 'ipsec_tunnel_protect_details'.
  2279  type IpsecTunnelProtectDetails struct {
  2280  	Tun IpsecTunnelProtect `binapi:"ipsec_tunnel_protect,name=tun" json:"tun,omitempty"`
  2281  }
  2282  
  2283  func (m *IpsecTunnelProtectDetails) Reset()               { *m = IpsecTunnelProtectDetails{} }
  2284  func (*IpsecTunnelProtectDetails) GetMessageName() string { return "ipsec_tunnel_protect_details" }
  2285  func (*IpsecTunnelProtectDetails) GetCrcString() string   { return "21663a50" }
  2286  func (*IpsecTunnelProtectDetails) GetMessageType() api.MessageType {
  2287  	return api.ReplyMessage
  2288  }
  2289  
  2290  func (m *IpsecTunnelProtectDetails) Size() (size int) {
  2291  	if m == nil {
  2292  		return 0
  2293  	}
  2294  	size += 4                   // m.Tun.SwIfIndex
  2295  	size += 1                   // m.Tun.Nh.Af
  2296  	size += 1 * 16              // m.Tun.Nh.Un
  2297  	size += 4                   // m.Tun.SaOut
  2298  	size += 1                   // m.Tun.NSaIn
  2299  	size += 4 * len(m.Tun.SaIn) // m.Tun.SaIn
  2300  	return size
  2301  }
  2302  func (m *IpsecTunnelProtectDetails) Marshal(b []byte) ([]byte, error) {
  2303  	if b == nil {
  2304  		b = make([]byte, m.Size())
  2305  	}
  2306  	buf := codec.NewBuffer(b)
  2307  	buf.EncodeUint32(uint32(m.Tun.SwIfIndex))
  2308  	buf.EncodeUint8(uint8(m.Tun.Nh.Af))
  2309  	buf.EncodeBytes(m.Tun.Nh.Un.XXX_UnionData[:], 16)
  2310  	buf.EncodeUint32(m.Tun.SaOut)
  2311  	buf.EncodeUint8(uint8(len(m.Tun.SaIn)))
  2312  	for i := 0; i < len(m.Tun.SaIn); i++ {
  2313  		var x uint32
  2314  		if i < len(m.Tun.SaIn) {
  2315  			x = uint32(m.Tun.SaIn[i])
  2316  		}
  2317  		buf.EncodeUint32(x)
  2318  	}
  2319  	return buf.Bytes(), nil
  2320  }
  2321  func (m *IpsecTunnelProtectDetails) Unmarshal(b []byte) error {
  2322  	buf := codec.NewBuffer(b)
  2323  	m.Tun.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
  2324  	m.Tun.Nh.Af = ip_types.AddressFamily(buf.DecodeUint8())
  2325  	copy(m.Tun.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16))
  2326  	m.Tun.SaOut = buf.DecodeUint32()
  2327  	m.Tun.NSaIn = buf.DecodeUint8()
  2328  	m.Tun.SaIn = make([]uint32, m.Tun.NSaIn)
  2329  	for i := 0; i < len(m.Tun.SaIn); i++ {
  2330  		m.Tun.SaIn[i] = buf.DecodeUint32()
  2331  	}
  2332  	return nil
  2333  }
  2334  
  2335  // IpsecTunnelProtectDump defines message 'ipsec_tunnel_protect_dump'.
  2336  type IpsecTunnelProtectDump struct {
  2337  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
  2338  }
  2339  
  2340  func (m *IpsecTunnelProtectDump) Reset()               { *m = IpsecTunnelProtectDump{} }
  2341  func (*IpsecTunnelProtectDump) GetMessageName() string { return "ipsec_tunnel_protect_dump" }
  2342  func (*IpsecTunnelProtectDump) GetCrcString() string   { return "f9e6675e" }
  2343  func (*IpsecTunnelProtectDump) GetMessageType() api.MessageType {
  2344  	return api.RequestMessage
  2345  }
  2346  
  2347  func (m *IpsecTunnelProtectDump) Size() (size int) {
  2348  	if m == nil {
  2349  		return 0
  2350  	}
  2351  	size += 4 // m.SwIfIndex
  2352  	return size
  2353  }
  2354  func (m *IpsecTunnelProtectDump) Marshal(b []byte) ([]byte, error) {
  2355  	if b == nil {
  2356  		b = make([]byte, m.Size())
  2357  	}
  2358  	buf := codec.NewBuffer(b)
  2359  	buf.EncodeUint32(uint32(m.SwIfIndex))
  2360  	return buf.Bytes(), nil
  2361  }
  2362  func (m *IpsecTunnelProtectDump) Unmarshal(b []byte) error {
  2363  	buf := codec.NewBuffer(b)
  2364  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
  2365  	return nil
  2366  }
  2367  
  2368  // IpsecTunnelProtectUpdate defines message 'ipsec_tunnel_protect_update'.
  2369  type IpsecTunnelProtectUpdate struct {
  2370  	Tunnel IpsecTunnelProtect `binapi:"ipsec_tunnel_protect,name=tunnel" json:"tunnel,omitempty"`
  2371  }
  2372  
  2373  func (m *IpsecTunnelProtectUpdate) Reset()               { *m = IpsecTunnelProtectUpdate{} }
  2374  func (*IpsecTunnelProtectUpdate) GetMessageName() string { return "ipsec_tunnel_protect_update" }
  2375  func (*IpsecTunnelProtectUpdate) GetCrcString() string   { return "30d5f133" }
  2376  func (*IpsecTunnelProtectUpdate) GetMessageType() api.MessageType {
  2377  	return api.RequestMessage
  2378  }
  2379  
  2380  func (m *IpsecTunnelProtectUpdate) Size() (size int) {
  2381  	if m == nil {
  2382  		return 0
  2383  	}
  2384  	size += 4                      // m.Tunnel.SwIfIndex
  2385  	size += 1                      // m.Tunnel.Nh.Af
  2386  	size += 1 * 16                 // m.Tunnel.Nh.Un
  2387  	size += 4                      // m.Tunnel.SaOut
  2388  	size += 1                      // m.Tunnel.NSaIn
  2389  	size += 4 * len(m.Tunnel.SaIn) // m.Tunnel.SaIn
  2390  	return size
  2391  }
  2392  func (m *IpsecTunnelProtectUpdate) Marshal(b []byte) ([]byte, error) {
  2393  	if b == nil {
  2394  		b = make([]byte, m.Size())
  2395  	}
  2396  	buf := codec.NewBuffer(b)
  2397  	buf.EncodeUint32(uint32(m.Tunnel.SwIfIndex))
  2398  	buf.EncodeUint8(uint8(m.Tunnel.Nh.Af))
  2399  	buf.EncodeBytes(m.Tunnel.Nh.Un.XXX_UnionData[:], 16)
  2400  	buf.EncodeUint32(m.Tunnel.SaOut)
  2401  	buf.EncodeUint8(uint8(len(m.Tunnel.SaIn)))
  2402  	for i := 0; i < len(m.Tunnel.SaIn); i++ {
  2403  		var x uint32
  2404  		if i < len(m.Tunnel.SaIn) {
  2405  			x = uint32(m.Tunnel.SaIn[i])
  2406  		}
  2407  		buf.EncodeUint32(x)
  2408  	}
  2409  	return buf.Bytes(), nil
  2410  }
  2411  func (m *IpsecTunnelProtectUpdate) Unmarshal(b []byte) error {
  2412  	buf := codec.NewBuffer(b)
  2413  	m.Tunnel.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
  2414  	m.Tunnel.Nh.Af = ip_types.AddressFamily(buf.DecodeUint8())
  2415  	copy(m.Tunnel.Nh.Un.XXX_UnionData[:], buf.DecodeBytes(16))
  2416  	m.Tunnel.SaOut = buf.DecodeUint32()
  2417  	m.Tunnel.NSaIn = buf.DecodeUint8()
  2418  	m.Tunnel.SaIn = make([]uint32, m.Tunnel.NSaIn)
  2419  	for i := 0; i < len(m.Tunnel.SaIn); i++ {
  2420  		m.Tunnel.SaIn[i] = buf.DecodeUint32()
  2421  	}
  2422  	return nil
  2423  }
  2424  
  2425  // IpsecTunnelProtectUpdateReply defines message 'ipsec_tunnel_protect_update_reply'.
  2426  type IpsecTunnelProtectUpdateReply struct {
  2427  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
  2428  }
  2429  
  2430  func (m *IpsecTunnelProtectUpdateReply) Reset() { *m = IpsecTunnelProtectUpdateReply{} }
  2431  func (*IpsecTunnelProtectUpdateReply) GetMessageName() string {
  2432  	return "ipsec_tunnel_protect_update_reply"
  2433  }
  2434  func (*IpsecTunnelProtectUpdateReply) GetCrcString() string { return "e8d4e804" }
  2435  func (*IpsecTunnelProtectUpdateReply) GetMessageType() api.MessageType {
  2436  	return api.ReplyMessage
  2437  }
  2438  
  2439  func (m *IpsecTunnelProtectUpdateReply) Size() (size int) {
  2440  	if m == nil {
  2441  		return 0
  2442  	}
  2443  	size += 4 // m.Retval
  2444  	return size
  2445  }
  2446  func (m *IpsecTunnelProtectUpdateReply) Marshal(b []byte) ([]byte, error) {
  2447  	if b == nil {
  2448  		b = make([]byte, m.Size())
  2449  	}
  2450  	buf := codec.NewBuffer(b)
  2451  	buf.EncodeInt32(m.Retval)
  2452  	return buf.Bytes(), nil
  2453  }
  2454  func (m *IpsecTunnelProtectUpdateReply) Unmarshal(b []byte) error {
  2455  	buf := codec.NewBuffer(b)
  2456  	m.Retval = buf.DecodeInt32()
  2457  	return nil
  2458  }
  2459  
  2460  func init() { file_ipsec_binapi_init() }
  2461  func file_ipsec_binapi_init() {
  2462  	api.RegisterMessage((*IpsecBackendDetails)(nil), "ipsec_backend_details_ee601c29")
  2463  	api.RegisterMessage((*IpsecBackendDump)(nil), "ipsec_backend_dump_51077d14")
  2464  	api.RegisterMessage((*IpsecInterfaceAddDelSpd)(nil), "ipsec_interface_add_del_spd_80f80cbb")
  2465  	api.RegisterMessage((*IpsecInterfaceAddDelSpdReply)(nil), "ipsec_interface_add_del_spd_reply_e8d4e804")
  2466  	api.RegisterMessage((*IpsecItfCreate)(nil), "ipsec_itf_create_6f50b3bc")
  2467  	api.RegisterMessage((*IpsecItfCreateReply)(nil), "ipsec_itf_create_reply_5383d31f")
  2468  	api.RegisterMessage((*IpsecItfDelete)(nil), "ipsec_itf_delete_f9e6675e")
  2469  	api.RegisterMessage((*IpsecItfDeleteReply)(nil), "ipsec_itf_delete_reply_e8d4e804")
  2470  	api.RegisterMessage((*IpsecItfDetails)(nil), "ipsec_itf_details_548a73b8")
  2471  	api.RegisterMessage((*IpsecItfDump)(nil), "ipsec_itf_dump_f9e6675e")
  2472  	api.RegisterMessage((*IpsecSaDetails)(nil), "ipsec_sa_details_345d14a7")
  2473  	api.RegisterMessage((*IpsecSaDump)(nil), "ipsec_sa_dump_2076c2f4")
  2474  	api.RegisterMessage((*IpsecSaV2Details)(nil), "ipsec_sa_v2_details_e2130051")
  2475  	api.RegisterMessage((*IpsecSaV2Dump)(nil), "ipsec_sa_v2_dump_2076c2f4")
  2476  	api.RegisterMessage((*IpsecSaV3Details)(nil), "ipsec_sa_v3_details_2fc991ee")
  2477  	api.RegisterMessage((*IpsecSaV3Dump)(nil), "ipsec_sa_v3_dump_2076c2f4")
  2478  	api.RegisterMessage((*IpsecSadEntryAdd)(nil), "ipsec_sad_entry_add_50229353")
  2479  	api.RegisterMessage((*IpsecSadEntryAddDel)(nil), "ipsec_sad_entry_add_del_ab64b5c6")
  2480  	api.RegisterMessage((*IpsecSadEntryAddDelReply)(nil), "ipsec_sad_entry_add_del_reply_9ffac24b")
  2481  	api.RegisterMessage((*IpsecSadEntryAddDelV2)(nil), "ipsec_sad_entry_add_del_v2_aca78b27")
  2482  	api.RegisterMessage((*IpsecSadEntryAddDelV2Reply)(nil), "ipsec_sad_entry_add_del_v2_reply_9ffac24b")
  2483  	api.RegisterMessage((*IpsecSadEntryAddDelV3)(nil), "ipsec_sad_entry_add_del_v3_c77ebd92")
  2484  	api.RegisterMessage((*IpsecSadEntryAddDelV3Reply)(nil), "ipsec_sad_entry_add_del_v3_reply_9ffac24b")
  2485  	api.RegisterMessage((*IpsecSadEntryAddReply)(nil), "ipsec_sad_entry_add_reply_9ffac24b")
  2486  	api.RegisterMessage((*IpsecSadEntryDel)(nil), "ipsec_sad_entry_del_3a91bde5")
  2487  	api.RegisterMessage((*IpsecSadEntryDelReply)(nil), "ipsec_sad_entry_del_reply_e8d4e804")
  2488  	api.RegisterMessage((*IpsecSelectBackend)(nil), "ipsec_select_backend_5bcfd3b7")
  2489  	api.RegisterMessage((*IpsecSelectBackendReply)(nil), "ipsec_select_backend_reply_e8d4e804")
  2490  	api.RegisterMessage((*IpsecSetAsyncMode)(nil), "ipsec_set_async_mode_a6465f7c")
  2491  	api.RegisterMessage((*IpsecSetAsyncModeReply)(nil), "ipsec_set_async_mode_reply_e8d4e804")
  2492  	api.RegisterMessage((*IpsecSpdAddDel)(nil), "ipsec_spd_add_del_20e89a95")
  2493  	api.RegisterMessage((*IpsecSpdAddDelReply)(nil), "ipsec_spd_add_del_reply_e8d4e804")
  2494  	api.RegisterMessage((*IpsecSpdDetails)(nil), "ipsec_spd_details_5813d7a2")
  2495  	api.RegisterMessage((*IpsecSpdDump)(nil), "ipsec_spd_dump_afefbf7d")
  2496  	api.RegisterMessage((*IpsecSpdEntryAddDel)(nil), "ipsec_spd_entry_add_del_338b7411")
  2497  	api.RegisterMessage((*IpsecSpdEntryAddDelReply)(nil), "ipsec_spd_entry_add_del_reply_9ffac24b")
  2498  	api.RegisterMessage((*IpsecSpdEntryAddDelV2)(nil), "ipsec_spd_entry_add_del_v2_7bfe69fc")
  2499  	api.RegisterMessage((*IpsecSpdEntryAddDelV2Reply)(nil), "ipsec_spd_entry_add_del_v2_reply_9ffac24b")
  2500  	api.RegisterMessage((*IpsecSpdInterfaceDetails)(nil), "ipsec_spd_interface_details_7a0bcf3e")
  2501  	api.RegisterMessage((*IpsecSpdInterfaceDump)(nil), "ipsec_spd_interface_dump_8971de19")
  2502  	api.RegisterMessage((*IpsecSpdsDetails)(nil), "ipsec_spds_details_a04bb254")
  2503  	api.RegisterMessage((*IpsecSpdsDump)(nil), "ipsec_spds_dump_51077d14")
  2504  	api.RegisterMessage((*IpsecTunnelProtectDel)(nil), "ipsec_tunnel_protect_del_cd239930")
  2505  	api.RegisterMessage((*IpsecTunnelProtectDelReply)(nil), "ipsec_tunnel_protect_del_reply_e8d4e804")
  2506  	api.RegisterMessage((*IpsecTunnelProtectDetails)(nil), "ipsec_tunnel_protect_details_21663a50")
  2507  	api.RegisterMessage((*IpsecTunnelProtectDump)(nil), "ipsec_tunnel_protect_dump_f9e6675e")
  2508  	api.RegisterMessage((*IpsecTunnelProtectUpdate)(nil), "ipsec_tunnel_protect_update_30d5f133")
  2509  	api.RegisterMessage((*IpsecTunnelProtectUpdateReply)(nil), "ipsec_tunnel_protect_update_reply_e8d4e804")
  2510  }
  2511  
  2512  // Messages returns list of all messages in this module.
  2513  func AllMessages() []api.Message {
  2514  	return []api.Message{
  2515  		(*IpsecBackendDetails)(nil),
  2516  		(*IpsecBackendDump)(nil),
  2517  		(*IpsecInterfaceAddDelSpd)(nil),
  2518  		(*IpsecInterfaceAddDelSpdReply)(nil),
  2519  		(*IpsecItfCreate)(nil),
  2520  		(*IpsecItfCreateReply)(nil),
  2521  		(*IpsecItfDelete)(nil),
  2522  		(*IpsecItfDeleteReply)(nil),
  2523  		(*IpsecItfDetails)(nil),
  2524  		(*IpsecItfDump)(nil),
  2525  		(*IpsecSaDetails)(nil),
  2526  		(*IpsecSaDump)(nil),
  2527  		(*IpsecSaV2Details)(nil),
  2528  		(*IpsecSaV2Dump)(nil),
  2529  		(*IpsecSaV3Details)(nil),
  2530  		(*IpsecSaV3Dump)(nil),
  2531  		(*IpsecSadEntryAdd)(nil),
  2532  		(*IpsecSadEntryAddDel)(nil),
  2533  		(*IpsecSadEntryAddDelReply)(nil),
  2534  		(*IpsecSadEntryAddDelV2)(nil),
  2535  		(*IpsecSadEntryAddDelV2Reply)(nil),
  2536  		(*IpsecSadEntryAddDelV3)(nil),
  2537  		(*IpsecSadEntryAddDelV3Reply)(nil),
  2538  		(*IpsecSadEntryAddReply)(nil),
  2539  		(*IpsecSadEntryDel)(nil),
  2540  		(*IpsecSadEntryDelReply)(nil),
  2541  		(*IpsecSelectBackend)(nil),
  2542  		(*IpsecSelectBackendReply)(nil),
  2543  		(*IpsecSetAsyncMode)(nil),
  2544  		(*IpsecSetAsyncModeReply)(nil),
  2545  		(*IpsecSpdAddDel)(nil),
  2546  		(*IpsecSpdAddDelReply)(nil),
  2547  		(*IpsecSpdDetails)(nil),
  2548  		(*IpsecSpdDump)(nil),
  2549  		(*IpsecSpdEntryAddDel)(nil),
  2550  		(*IpsecSpdEntryAddDelReply)(nil),
  2551  		(*IpsecSpdEntryAddDelV2)(nil),
  2552  		(*IpsecSpdEntryAddDelV2Reply)(nil),
  2553  		(*IpsecSpdInterfaceDetails)(nil),
  2554  		(*IpsecSpdInterfaceDump)(nil),
  2555  		(*IpsecSpdsDetails)(nil),
  2556  		(*IpsecSpdsDump)(nil),
  2557  		(*IpsecTunnelProtectDel)(nil),
  2558  		(*IpsecTunnelProtectDelReply)(nil),
  2559  		(*IpsecTunnelProtectDetails)(nil),
  2560  		(*IpsecTunnelProtectDump)(nil),
  2561  		(*IpsecTunnelProtectUpdate)(nil),
  2562  		(*IpsecTunnelProtectUpdateReply)(nil),
  2563  	}
  2564  }