github.com/edwarnicke/govpp@v0.0.0-20230130211138-14ef5d20b1d0/binapi/ipfix_export/ipfix_export.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/ipfix_export.api.json
     6  
     7  // Package ipfix_export contains generated bindings for API file ipfix_export.api.
     8  //
     9  // Contents:
    10  //  19 messages
    11  //
    12  package ipfix_export
    13  
    14  import (
    15  	api "git.fd.io/govpp.git/api"
    16  	codec "git.fd.io/govpp.git/codec"
    17  	ip_types "github.com/edwarnicke/govpp/binapi/ip_types"
    18  )
    19  
    20  // This is a compile-time assertion to ensure that this generated file
    21  // is compatible with the GoVPP api package it is being compiled against.
    22  // A compilation error at this line likely means your copy of the
    23  // GoVPP api package needs to be updated.
    24  const _ = api.GoVppAPIPackageIsVersion2
    25  
    26  const (
    27  	APIFile    = "ipfix_export"
    28  	APIVersion = "2.0.3"
    29  	VersionCrc = 0x63e0810a
    30  )
    31  
    32  // IpfixAllExporterDetails defines message 'ipfix_all_exporter_details'.
    33  type IpfixAllExporterDetails struct {
    34  	CollectorAddress ip_types.Address `binapi:"address,name=collector_address" json:"collector_address,omitempty"`
    35  	CollectorPort    uint16           `binapi:"u16,name=collector_port" json:"collector_port,omitempty"`
    36  	SrcAddress       ip_types.Address `binapi:"address,name=src_address" json:"src_address,omitempty"`
    37  	VrfID            uint32           `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
    38  	PathMtu          uint32           `binapi:"u32,name=path_mtu" json:"path_mtu,omitempty"`
    39  	TemplateInterval uint32           `binapi:"u32,name=template_interval" json:"template_interval,omitempty"`
    40  	UDPChecksum      bool             `binapi:"bool,name=udp_checksum" json:"udp_checksum,omitempty"`
    41  }
    42  
    43  func (m *IpfixAllExporterDetails) Reset()               { *m = IpfixAllExporterDetails{} }
    44  func (*IpfixAllExporterDetails) GetMessageName() string { return "ipfix_all_exporter_details" }
    45  func (*IpfixAllExporterDetails) GetCrcString() string   { return "0dedbfe4" }
    46  func (*IpfixAllExporterDetails) GetMessageType() api.MessageType {
    47  	return api.ReplyMessage
    48  }
    49  
    50  func (m *IpfixAllExporterDetails) Size() (size int) {
    51  	if m == nil {
    52  		return 0
    53  	}
    54  	size += 1      // m.CollectorAddress.Af
    55  	size += 1 * 16 // m.CollectorAddress.Un
    56  	size += 2      // m.CollectorPort
    57  	size += 1      // m.SrcAddress.Af
    58  	size += 1 * 16 // m.SrcAddress.Un
    59  	size += 4      // m.VrfID
    60  	size += 4      // m.PathMtu
    61  	size += 4      // m.TemplateInterval
    62  	size += 1      // m.UDPChecksum
    63  	return size
    64  }
    65  func (m *IpfixAllExporterDetails) Marshal(b []byte) ([]byte, error) {
    66  	if b == nil {
    67  		b = make([]byte, m.Size())
    68  	}
    69  	buf := codec.NewBuffer(b)
    70  	buf.EncodeUint8(uint8(m.CollectorAddress.Af))
    71  	buf.EncodeBytes(m.CollectorAddress.Un.XXX_UnionData[:], 16)
    72  	buf.EncodeUint16(m.CollectorPort)
    73  	buf.EncodeUint8(uint8(m.SrcAddress.Af))
    74  	buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 16)
    75  	buf.EncodeUint32(m.VrfID)
    76  	buf.EncodeUint32(m.PathMtu)
    77  	buf.EncodeUint32(m.TemplateInterval)
    78  	buf.EncodeBool(m.UDPChecksum)
    79  	return buf.Bytes(), nil
    80  }
    81  func (m *IpfixAllExporterDetails) Unmarshal(b []byte) error {
    82  	buf := codec.NewBuffer(b)
    83  	m.CollectorAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
    84  	copy(m.CollectorAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
    85  	m.CollectorPort = buf.DecodeUint16()
    86  	m.SrcAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
    87  	copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
    88  	m.VrfID = buf.DecodeUint32()
    89  	m.PathMtu = buf.DecodeUint32()
    90  	m.TemplateInterval = buf.DecodeUint32()
    91  	m.UDPChecksum = buf.DecodeBool()
    92  	return nil
    93  }
    94  
    95  // IpfixAllExporterGet defines message 'ipfix_all_exporter_get'.
    96  type IpfixAllExporterGet struct {
    97  	Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"`
    98  }
    99  
   100  func (m *IpfixAllExporterGet) Reset()               { *m = IpfixAllExporterGet{} }
   101  func (*IpfixAllExporterGet) GetMessageName() string { return "ipfix_all_exporter_get" }
   102  func (*IpfixAllExporterGet) GetCrcString() string   { return "f75ba505" }
   103  func (*IpfixAllExporterGet) GetMessageType() api.MessageType {
   104  	return api.RequestMessage
   105  }
   106  
   107  func (m *IpfixAllExporterGet) Size() (size int) {
   108  	if m == nil {
   109  		return 0
   110  	}
   111  	size += 4 // m.Cursor
   112  	return size
   113  }
   114  func (m *IpfixAllExporterGet) Marshal(b []byte) ([]byte, error) {
   115  	if b == nil {
   116  		b = make([]byte, m.Size())
   117  	}
   118  	buf := codec.NewBuffer(b)
   119  	buf.EncodeUint32(m.Cursor)
   120  	return buf.Bytes(), nil
   121  }
   122  func (m *IpfixAllExporterGet) Unmarshal(b []byte) error {
   123  	buf := codec.NewBuffer(b)
   124  	m.Cursor = buf.DecodeUint32()
   125  	return nil
   126  }
   127  
   128  // IpfixAllExporterGetReply defines message 'ipfix_all_exporter_get_reply'.
   129  type IpfixAllExporterGetReply struct {
   130  	Retval int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
   131  	Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"`
   132  }
   133  
   134  func (m *IpfixAllExporterGetReply) Reset()               { *m = IpfixAllExporterGetReply{} }
   135  func (*IpfixAllExporterGetReply) GetMessageName() string { return "ipfix_all_exporter_get_reply" }
   136  func (*IpfixAllExporterGetReply) GetCrcString() string   { return "53b48f5d" }
   137  func (*IpfixAllExporterGetReply) GetMessageType() api.MessageType {
   138  	return api.ReplyMessage
   139  }
   140  
   141  func (m *IpfixAllExporterGetReply) Size() (size int) {
   142  	if m == nil {
   143  		return 0
   144  	}
   145  	size += 4 // m.Retval
   146  	size += 4 // m.Cursor
   147  	return size
   148  }
   149  func (m *IpfixAllExporterGetReply) Marshal(b []byte) ([]byte, error) {
   150  	if b == nil {
   151  		b = make([]byte, m.Size())
   152  	}
   153  	buf := codec.NewBuffer(b)
   154  	buf.EncodeInt32(m.Retval)
   155  	buf.EncodeUint32(m.Cursor)
   156  	return buf.Bytes(), nil
   157  }
   158  func (m *IpfixAllExporterGetReply) Unmarshal(b []byte) error {
   159  	buf := codec.NewBuffer(b)
   160  	m.Retval = buf.DecodeInt32()
   161  	m.Cursor = buf.DecodeUint32()
   162  	return nil
   163  }
   164  
   165  // IpfixClassifyStreamDetails defines message 'ipfix_classify_stream_details'.
   166  type IpfixClassifyStreamDetails struct {
   167  	DomainID uint32 `binapi:"u32,name=domain_id" json:"domain_id,omitempty"`
   168  	SrcPort  uint16 `binapi:"u16,name=src_port" json:"src_port,omitempty"`
   169  }
   170  
   171  func (m *IpfixClassifyStreamDetails) Reset()               { *m = IpfixClassifyStreamDetails{} }
   172  func (*IpfixClassifyStreamDetails) GetMessageName() string { return "ipfix_classify_stream_details" }
   173  func (*IpfixClassifyStreamDetails) GetCrcString() string   { return "2903539d" }
   174  func (*IpfixClassifyStreamDetails) GetMessageType() api.MessageType {
   175  	return api.ReplyMessage
   176  }
   177  
   178  func (m *IpfixClassifyStreamDetails) Size() (size int) {
   179  	if m == nil {
   180  		return 0
   181  	}
   182  	size += 4 // m.DomainID
   183  	size += 2 // m.SrcPort
   184  	return size
   185  }
   186  func (m *IpfixClassifyStreamDetails) Marshal(b []byte) ([]byte, error) {
   187  	if b == nil {
   188  		b = make([]byte, m.Size())
   189  	}
   190  	buf := codec.NewBuffer(b)
   191  	buf.EncodeUint32(m.DomainID)
   192  	buf.EncodeUint16(m.SrcPort)
   193  	return buf.Bytes(), nil
   194  }
   195  func (m *IpfixClassifyStreamDetails) Unmarshal(b []byte) error {
   196  	buf := codec.NewBuffer(b)
   197  	m.DomainID = buf.DecodeUint32()
   198  	m.SrcPort = buf.DecodeUint16()
   199  	return nil
   200  }
   201  
   202  // IpfixClassifyStreamDump defines message 'ipfix_classify_stream_dump'.
   203  type IpfixClassifyStreamDump struct{}
   204  
   205  func (m *IpfixClassifyStreamDump) Reset()               { *m = IpfixClassifyStreamDump{} }
   206  func (*IpfixClassifyStreamDump) GetMessageName() string { return "ipfix_classify_stream_dump" }
   207  func (*IpfixClassifyStreamDump) GetCrcString() string   { return "51077d14" }
   208  func (*IpfixClassifyStreamDump) GetMessageType() api.MessageType {
   209  	return api.RequestMessage
   210  }
   211  
   212  func (m *IpfixClassifyStreamDump) Size() (size int) {
   213  	if m == nil {
   214  		return 0
   215  	}
   216  	return size
   217  }
   218  func (m *IpfixClassifyStreamDump) Marshal(b []byte) ([]byte, error) {
   219  	if b == nil {
   220  		b = make([]byte, m.Size())
   221  	}
   222  	buf := codec.NewBuffer(b)
   223  	return buf.Bytes(), nil
   224  }
   225  func (m *IpfixClassifyStreamDump) Unmarshal(b []byte) error {
   226  	return nil
   227  }
   228  
   229  // IpfixClassifyTableAddDel defines message 'ipfix_classify_table_add_del'.
   230  type IpfixClassifyTableAddDel struct {
   231  	TableID           uint32                 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
   232  	IPVersion         ip_types.AddressFamily `binapi:"address_family,name=ip_version" json:"ip_version,omitempty"`
   233  	TransportProtocol ip_types.IPProto       `binapi:"ip_proto,name=transport_protocol" json:"transport_protocol,omitempty"`
   234  	IsAdd             bool                   `binapi:"bool,name=is_add" json:"is_add,omitempty"`
   235  }
   236  
   237  func (m *IpfixClassifyTableAddDel) Reset()               { *m = IpfixClassifyTableAddDel{} }
   238  func (*IpfixClassifyTableAddDel) GetMessageName() string { return "ipfix_classify_table_add_del" }
   239  func (*IpfixClassifyTableAddDel) GetCrcString() string   { return "3e449bb9" }
   240  func (*IpfixClassifyTableAddDel) GetMessageType() api.MessageType {
   241  	return api.RequestMessage
   242  }
   243  
   244  func (m *IpfixClassifyTableAddDel) Size() (size int) {
   245  	if m == nil {
   246  		return 0
   247  	}
   248  	size += 4 // m.TableID
   249  	size += 1 // m.IPVersion
   250  	size += 1 // m.TransportProtocol
   251  	size += 1 // m.IsAdd
   252  	return size
   253  }
   254  func (m *IpfixClassifyTableAddDel) Marshal(b []byte) ([]byte, error) {
   255  	if b == nil {
   256  		b = make([]byte, m.Size())
   257  	}
   258  	buf := codec.NewBuffer(b)
   259  	buf.EncodeUint32(m.TableID)
   260  	buf.EncodeUint8(uint8(m.IPVersion))
   261  	buf.EncodeUint8(uint8(m.TransportProtocol))
   262  	buf.EncodeBool(m.IsAdd)
   263  	return buf.Bytes(), nil
   264  }
   265  func (m *IpfixClassifyTableAddDel) Unmarshal(b []byte) error {
   266  	buf := codec.NewBuffer(b)
   267  	m.TableID = buf.DecodeUint32()
   268  	m.IPVersion = ip_types.AddressFamily(buf.DecodeUint8())
   269  	m.TransportProtocol = ip_types.IPProto(buf.DecodeUint8())
   270  	m.IsAdd = buf.DecodeBool()
   271  	return nil
   272  }
   273  
   274  // IpfixClassifyTableAddDelReply defines message 'ipfix_classify_table_add_del_reply'.
   275  type IpfixClassifyTableAddDelReply struct {
   276  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   277  }
   278  
   279  func (m *IpfixClassifyTableAddDelReply) Reset() { *m = IpfixClassifyTableAddDelReply{} }
   280  func (*IpfixClassifyTableAddDelReply) GetMessageName() string {
   281  	return "ipfix_classify_table_add_del_reply"
   282  }
   283  func (*IpfixClassifyTableAddDelReply) GetCrcString() string { return "e8d4e804" }
   284  func (*IpfixClassifyTableAddDelReply) GetMessageType() api.MessageType {
   285  	return api.ReplyMessage
   286  }
   287  
   288  func (m *IpfixClassifyTableAddDelReply) Size() (size int) {
   289  	if m == nil {
   290  		return 0
   291  	}
   292  	size += 4 // m.Retval
   293  	return size
   294  }
   295  func (m *IpfixClassifyTableAddDelReply) Marshal(b []byte) ([]byte, error) {
   296  	if b == nil {
   297  		b = make([]byte, m.Size())
   298  	}
   299  	buf := codec.NewBuffer(b)
   300  	buf.EncodeInt32(m.Retval)
   301  	return buf.Bytes(), nil
   302  }
   303  func (m *IpfixClassifyTableAddDelReply) Unmarshal(b []byte) error {
   304  	buf := codec.NewBuffer(b)
   305  	m.Retval = buf.DecodeInt32()
   306  	return nil
   307  }
   308  
   309  // IpfixClassifyTableDetails defines message 'ipfix_classify_table_details'.
   310  type IpfixClassifyTableDetails struct {
   311  	TableID           uint32                 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
   312  	IPVersion         ip_types.AddressFamily `binapi:"address_family,name=ip_version" json:"ip_version,omitempty"`
   313  	TransportProtocol ip_types.IPProto       `binapi:"ip_proto,name=transport_protocol" json:"transport_protocol,omitempty"`
   314  }
   315  
   316  func (m *IpfixClassifyTableDetails) Reset()               { *m = IpfixClassifyTableDetails{} }
   317  func (*IpfixClassifyTableDetails) GetMessageName() string { return "ipfix_classify_table_details" }
   318  func (*IpfixClassifyTableDetails) GetCrcString() string   { return "1af8c28c" }
   319  func (*IpfixClassifyTableDetails) GetMessageType() api.MessageType {
   320  	return api.ReplyMessage
   321  }
   322  
   323  func (m *IpfixClassifyTableDetails) Size() (size int) {
   324  	if m == nil {
   325  		return 0
   326  	}
   327  	size += 4 // m.TableID
   328  	size += 1 // m.IPVersion
   329  	size += 1 // m.TransportProtocol
   330  	return size
   331  }
   332  func (m *IpfixClassifyTableDetails) Marshal(b []byte) ([]byte, error) {
   333  	if b == nil {
   334  		b = make([]byte, m.Size())
   335  	}
   336  	buf := codec.NewBuffer(b)
   337  	buf.EncodeUint32(m.TableID)
   338  	buf.EncodeUint8(uint8(m.IPVersion))
   339  	buf.EncodeUint8(uint8(m.TransportProtocol))
   340  	return buf.Bytes(), nil
   341  }
   342  func (m *IpfixClassifyTableDetails) Unmarshal(b []byte) error {
   343  	buf := codec.NewBuffer(b)
   344  	m.TableID = buf.DecodeUint32()
   345  	m.IPVersion = ip_types.AddressFamily(buf.DecodeUint8())
   346  	m.TransportProtocol = ip_types.IPProto(buf.DecodeUint8())
   347  	return nil
   348  }
   349  
   350  // IpfixClassifyTableDump defines message 'ipfix_classify_table_dump'.
   351  type IpfixClassifyTableDump struct{}
   352  
   353  func (m *IpfixClassifyTableDump) Reset()               { *m = IpfixClassifyTableDump{} }
   354  func (*IpfixClassifyTableDump) GetMessageName() string { return "ipfix_classify_table_dump" }
   355  func (*IpfixClassifyTableDump) GetCrcString() string   { return "51077d14" }
   356  func (*IpfixClassifyTableDump) GetMessageType() api.MessageType {
   357  	return api.RequestMessage
   358  }
   359  
   360  func (m *IpfixClassifyTableDump) Size() (size int) {
   361  	if m == nil {
   362  		return 0
   363  	}
   364  	return size
   365  }
   366  func (m *IpfixClassifyTableDump) Marshal(b []byte) ([]byte, error) {
   367  	if b == nil {
   368  		b = make([]byte, m.Size())
   369  	}
   370  	buf := codec.NewBuffer(b)
   371  	return buf.Bytes(), nil
   372  }
   373  func (m *IpfixClassifyTableDump) Unmarshal(b []byte) error {
   374  	return nil
   375  }
   376  
   377  // IpfixExporterCreateDelete defines message 'ipfix_exporter_create_delete'.
   378  type IpfixExporterCreateDelete struct {
   379  	IsCreate         bool             `binapi:"bool,name=is_create" json:"is_create,omitempty"`
   380  	CollectorAddress ip_types.Address `binapi:"address,name=collector_address" json:"collector_address,omitempty"`
   381  	CollectorPort    uint16           `binapi:"u16,name=collector_port" json:"collector_port,omitempty"`
   382  	SrcAddress       ip_types.Address `binapi:"address,name=src_address" json:"src_address,omitempty"`
   383  	VrfID            uint32           `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
   384  	PathMtu          uint32           `binapi:"u32,name=path_mtu" json:"path_mtu,omitempty"`
   385  	TemplateInterval uint32           `binapi:"u32,name=template_interval" json:"template_interval,omitempty"`
   386  	UDPChecksum      bool             `binapi:"bool,name=udp_checksum" json:"udp_checksum,omitempty"`
   387  }
   388  
   389  func (m *IpfixExporterCreateDelete) Reset()               { *m = IpfixExporterCreateDelete{} }
   390  func (*IpfixExporterCreateDelete) GetMessageName() string { return "ipfix_exporter_create_delete" }
   391  func (*IpfixExporterCreateDelete) GetCrcString() string   { return "0753a768" }
   392  func (*IpfixExporterCreateDelete) GetMessageType() api.MessageType {
   393  	return api.RequestMessage
   394  }
   395  
   396  func (m *IpfixExporterCreateDelete) Size() (size int) {
   397  	if m == nil {
   398  		return 0
   399  	}
   400  	size += 1      // m.IsCreate
   401  	size += 1      // m.CollectorAddress.Af
   402  	size += 1 * 16 // m.CollectorAddress.Un
   403  	size += 2      // m.CollectorPort
   404  	size += 1      // m.SrcAddress.Af
   405  	size += 1 * 16 // m.SrcAddress.Un
   406  	size += 4      // m.VrfID
   407  	size += 4      // m.PathMtu
   408  	size += 4      // m.TemplateInterval
   409  	size += 1      // m.UDPChecksum
   410  	return size
   411  }
   412  func (m *IpfixExporterCreateDelete) Marshal(b []byte) ([]byte, error) {
   413  	if b == nil {
   414  		b = make([]byte, m.Size())
   415  	}
   416  	buf := codec.NewBuffer(b)
   417  	buf.EncodeBool(m.IsCreate)
   418  	buf.EncodeUint8(uint8(m.CollectorAddress.Af))
   419  	buf.EncodeBytes(m.CollectorAddress.Un.XXX_UnionData[:], 16)
   420  	buf.EncodeUint16(m.CollectorPort)
   421  	buf.EncodeUint8(uint8(m.SrcAddress.Af))
   422  	buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 16)
   423  	buf.EncodeUint32(m.VrfID)
   424  	buf.EncodeUint32(m.PathMtu)
   425  	buf.EncodeUint32(m.TemplateInterval)
   426  	buf.EncodeBool(m.UDPChecksum)
   427  	return buf.Bytes(), nil
   428  }
   429  func (m *IpfixExporterCreateDelete) Unmarshal(b []byte) error {
   430  	buf := codec.NewBuffer(b)
   431  	m.IsCreate = buf.DecodeBool()
   432  	m.CollectorAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
   433  	copy(m.CollectorAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   434  	m.CollectorPort = buf.DecodeUint16()
   435  	m.SrcAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
   436  	copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   437  	m.VrfID = buf.DecodeUint32()
   438  	m.PathMtu = buf.DecodeUint32()
   439  	m.TemplateInterval = buf.DecodeUint32()
   440  	m.UDPChecksum = buf.DecodeBool()
   441  	return nil
   442  }
   443  
   444  // IpfixExporterCreateDeleteReply defines message 'ipfix_exporter_create_delete_reply'.
   445  type IpfixExporterCreateDeleteReply struct {
   446  	Retval    int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
   447  	StatIndex uint32 `binapi:"u32,name=stat_index" json:"stat_index,omitempty"`
   448  }
   449  
   450  func (m *IpfixExporterCreateDeleteReply) Reset() { *m = IpfixExporterCreateDeleteReply{} }
   451  func (*IpfixExporterCreateDeleteReply) GetMessageName() string {
   452  	return "ipfix_exporter_create_delete_reply"
   453  }
   454  func (*IpfixExporterCreateDeleteReply) GetCrcString() string { return "9ffac24b" }
   455  func (*IpfixExporterCreateDeleteReply) GetMessageType() api.MessageType {
   456  	return api.ReplyMessage
   457  }
   458  
   459  func (m *IpfixExporterCreateDeleteReply) Size() (size int) {
   460  	if m == nil {
   461  		return 0
   462  	}
   463  	size += 4 // m.Retval
   464  	size += 4 // m.StatIndex
   465  	return size
   466  }
   467  func (m *IpfixExporterCreateDeleteReply) Marshal(b []byte) ([]byte, error) {
   468  	if b == nil {
   469  		b = make([]byte, m.Size())
   470  	}
   471  	buf := codec.NewBuffer(b)
   472  	buf.EncodeInt32(m.Retval)
   473  	buf.EncodeUint32(m.StatIndex)
   474  	return buf.Bytes(), nil
   475  }
   476  func (m *IpfixExporterCreateDeleteReply) Unmarshal(b []byte) error {
   477  	buf := codec.NewBuffer(b)
   478  	m.Retval = buf.DecodeInt32()
   479  	m.StatIndex = buf.DecodeUint32()
   480  	return nil
   481  }
   482  
   483  // IpfixExporterDetails defines message 'ipfix_exporter_details'.
   484  type IpfixExporterDetails struct {
   485  	CollectorAddress ip_types.Address `binapi:"address,name=collector_address" json:"collector_address,omitempty"`
   486  	CollectorPort    uint16           `binapi:"u16,name=collector_port" json:"collector_port,omitempty"`
   487  	SrcAddress       ip_types.Address `binapi:"address,name=src_address" json:"src_address,omitempty"`
   488  	VrfID            uint32           `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
   489  	PathMtu          uint32           `binapi:"u32,name=path_mtu" json:"path_mtu,omitempty"`
   490  	TemplateInterval uint32           `binapi:"u32,name=template_interval" json:"template_interval,omitempty"`
   491  	UDPChecksum      bool             `binapi:"bool,name=udp_checksum" json:"udp_checksum,omitempty"`
   492  }
   493  
   494  func (m *IpfixExporterDetails) Reset()               { *m = IpfixExporterDetails{} }
   495  func (*IpfixExporterDetails) GetMessageName() string { return "ipfix_exporter_details" }
   496  func (*IpfixExporterDetails) GetCrcString() string   { return "0dedbfe4" }
   497  func (*IpfixExporterDetails) GetMessageType() api.MessageType {
   498  	return api.ReplyMessage
   499  }
   500  
   501  func (m *IpfixExporterDetails) Size() (size int) {
   502  	if m == nil {
   503  		return 0
   504  	}
   505  	size += 1      // m.CollectorAddress.Af
   506  	size += 1 * 16 // m.CollectorAddress.Un
   507  	size += 2      // m.CollectorPort
   508  	size += 1      // m.SrcAddress.Af
   509  	size += 1 * 16 // m.SrcAddress.Un
   510  	size += 4      // m.VrfID
   511  	size += 4      // m.PathMtu
   512  	size += 4      // m.TemplateInterval
   513  	size += 1      // m.UDPChecksum
   514  	return size
   515  }
   516  func (m *IpfixExporterDetails) Marshal(b []byte) ([]byte, error) {
   517  	if b == nil {
   518  		b = make([]byte, m.Size())
   519  	}
   520  	buf := codec.NewBuffer(b)
   521  	buf.EncodeUint8(uint8(m.CollectorAddress.Af))
   522  	buf.EncodeBytes(m.CollectorAddress.Un.XXX_UnionData[:], 16)
   523  	buf.EncodeUint16(m.CollectorPort)
   524  	buf.EncodeUint8(uint8(m.SrcAddress.Af))
   525  	buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 16)
   526  	buf.EncodeUint32(m.VrfID)
   527  	buf.EncodeUint32(m.PathMtu)
   528  	buf.EncodeUint32(m.TemplateInterval)
   529  	buf.EncodeBool(m.UDPChecksum)
   530  	return buf.Bytes(), nil
   531  }
   532  func (m *IpfixExporterDetails) Unmarshal(b []byte) error {
   533  	buf := codec.NewBuffer(b)
   534  	m.CollectorAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
   535  	copy(m.CollectorAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   536  	m.CollectorPort = buf.DecodeUint16()
   537  	m.SrcAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
   538  	copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   539  	m.VrfID = buf.DecodeUint32()
   540  	m.PathMtu = buf.DecodeUint32()
   541  	m.TemplateInterval = buf.DecodeUint32()
   542  	m.UDPChecksum = buf.DecodeBool()
   543  	return nil
   544  }
   545  
   546  // IpfixExporterDump defines message 'ipfix_exporter_dump'.
   547  type IpfixExporterDump struct{}
   548  
   549  func (m *IpfixExporterDump) Reset()               { *m = IpfixExporterDump{} }
   550  func (*IpfixExporterDump) GetMessageName() string { return "ipfix_exporter_dump" }
   551  func (*IpfixExporterDump) GetCrcString() string   { return "51077d14" }
   552  func (*IpfixExporterDump) GetMessageType() api.MessageType {
   553  	return api.RequestMessage
   554  }
   555  
   556  func (m *IpfixExporterDump) Size() (size int) {
   557  	if m == nil {
   558  		return 0
   559  	}
   560  	return size
   561  }
   562  func (m *IpfixExporterDump) Marshal(b []byte) ([]byte, error) {
   563  	if b == nil {
   564  		b = make([]byte, m.Size())
   565  	}
   566  	buf := codec.NewBuffer(b)
   567  	return buf.Bytes(), nil
   568  }
   569  func (m *IpfixExporterDump) Unmarshal(b []byte) error {
   570  	return nil
   571  }
   572  
   573  // IpfixFlush defines message 'ipfix_flush'.
   574  type IpfixFlush struct{}
   575  
   576  func (m *IpfixFlush) Reset()               { *m = IpfixFlush{} }
   577  func (*IpfixFlush) GetMessageName() string { return "ipfix_flush" }
   578  func (*IpfixFlush) GetCrcString() string   { return "51077d14" }
   579  func (*IpfixFlush) GetMessageType() api.MessageType {
   580  	return api.RequestMessage
   581  }
   582  
   583  func (m *IpfixFlush) Size() (size int) {
   584  	if m == nil {
   585  		return 0
   586  	}
   587  	return size
   588  }
   589  func (m *IpfixFlush) Marshal(b []byte) ([]byte, error) {
   590  	if b == nil {
   591  		b = make([]byte, m.Size())
   592  	}
   593  	buf := codec.NewBuffer(b)
   594  	return buf.Bytes(), nil
   595  }
   596  func (m *IpfixFlush) Unmarshal(b []byte) error {
   597  	return nil
   598  }
   599  
   600  // IpfixFlushReply defines message 'ipfix_flush_reply'.
   601  type IpfixFlushReply struct {
   602  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   603  }
   604  
   605  func (m *IpfixFlushReply) Reset()               { *m = IpfixFlushReply{} }
   606  func (*IpfixFlushReply) GetMessageName() string { return "ipfix_flush_reply" }
   607  func (*IpfixFlushReply) GetCrcString() string   { return "e8d4e804" }
   608  func (*IpfixFlushReply) GetMessageType() api.MessageType {
   609  	return api.ReplyMessage
   610  }
   611  
   612  func (m *IpfixFlushReply) Size() (size int) {
   613  	if m == nil {
   614  		return 0
   615  	}
   616  	size += 4 // m.Retval
   617  	return size
   618  }
   619  func (m *IpfixFlushReply) Marshal(b []byte) ([]byte, error) {
   620  	if b == nil {
   621  		b = make([]byte, m.Size())
   622  	}
   623  	buf := codec.NewBuffer(b)
   624  	buf.EncodeInt32(m.Retval)
   625  	return buf.Bytes(), nil
   626  }
   627  func (m *IpfixFlushReply) Unmarshal(b []byte) error {
   628  	buf := codec.NewBuffer(b)
   629  	m.Retval = buf.DecodeInt32()
   630  	return nil
   631  }
   632  
   633  // SetIpfixClassifyStream defines message 'set_ipfix_classify_stream'.
   634  type SetIpfixClassifyStream struct {
   635  	DomainID uint32 `binapi:"u32,name=domain_id" json:"domain_id,omitempty"`
   636  	SrcPort  uint16 `binapi:"u16,name=src_port" json:"src_port,omitempty"`
   637  }
   638  
   639  func (m *SetIpfixClassifyStream) Reset()               { *m = SetIpfixClassifyStream{} }
   640  func (*SetIpfixClassifyStream) GetMessageName() string { return "set_ipfix_classify_stream" }
   641  func (*SetIpfixClassifyStream) GetCrcString() string   { return "c9cbe053" }
   642  func (*SetIpfixClassifyStream) GetMessageType() api.MessageType {
   643  	return api.RequestMessage
   644  }
   645  
   646  func (m *SetIpfixClassifyStream) Size() (size int) {
   647  	if m == nil {
   648  		return 0
   649  	}
   650  	size += 4 // m.DomainID
   651  	size += 2 // m.SrcPort
   652  	return size
   653  }
   654  func (m *SetIpfixClassifyStream) Marshal(b []byte) ([]byte, error) {
   655  	if b == nil {
   656  		b = make([]byte, m.Size())
   657  	}
   658  	buf := codec.NewBuffer(b)
   659  	buf.EncodeUint32(m.DomainID)
   660  	buf.EncodeUint16(m.SrcPort)
   661  	return buf.Bytes(), nil
   662  }
   663  func (m *SetIpfixClassifyStream) Unmarshal(b []byte) error {
   664  	buf := codec.NewBuffer(b)
   665  	m.DomainID = buf.DecodeUint32()
   666  	m.SrcPort = buf.DecodeUint16()
   667  	return nil
   668  }
   669  
   670  // SetIpfixClassifyStreamReply defines message 'set_ipfix_classify_stream_reply'.
   671  type SetIpfixClassifyStreamReply struct {
   672  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   673  }
   674  
   675  func (m *SetIpfixClassifyStreamReply) Reset()               { *m = SetIpfixClassifyStreamReply{} }
   676  func (*SetIpfixClassifyStreamReply) GetMessageName() string { return "set_ipfix_classify_stream_reply" }
   677  func (*SetIpfixClassifyStreamReply) GetCrcString() string   { return "e8d4e804" }
   678  func (*SetIpfixClassifyStreamReply) GetMessageType() api.MessageType {
   679  	return api.ReplyMessage
   680  }
   681  
   682  func (m *SetIpfixClassifyStreamReply) Size() (size int) {
   683  	if m == nil {
   684  		return 0
   685  	}
   686  	size += 4 // m.Retval
   687  	return size
   688  }
   689  func (m *SetIpfixClassifyStreamReply) Marshal(b []byte) ([]byte, error) {
   690  	if b == nil {
   691  		b = make([]byte, m.Size())
   692  	}
   693  	buf := codec.NewBuffer(b)
   694  	buf.EncodeInt32(m.Retval)
   695  	return buf.Bytes(), nil
   696  }
   697  func (m *SetIpfixClassifyStreamReply) Unmarshal(b []byte) error {
   698  	buf := codec.NewBuffer(b)
   699  	m.Retval = buf.DecodeInt32()
   700  	return nil
   701  }
   702  
   703  // SetIpfixExporter defines message 'set_ipfix_exporter'.
   704  type SetIpfixExporter struct {
   705  	CollectorAddress ip_types.Address `binapi:"address,name=collector_address" json:"collector_address,omitempty"`
   706  	CollectorPort    uint16           `binapi:"u16,name=collector_port" json:"collector_port,omitempty"`
   707  	SrcAddress       ip_types.Address `binapi:"address,name=src_address" json:"src_address,omitempty"`
   708  	VrfID            uint32           `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"`
   709  	PathMtu          uint32           `binapi:"u32,name=path_mtu" json:"path_mtu,omitempty"`
   710  	TemplateInterval uint32           `binapi:"u32,name=template_interval" json:"template_interval,omitempty"`
   711  	UDPChecksum      bool             `binapi:"bool,name=udp_checksum" json:"udp_checksum,omitempty"`
   712  }
   713  
   714  func (m *SetIpfixExporter) Reset()               { *m = SetIpfixExporter{} }
   715  func (*SetIpfixExporter) GetMessageName() string { return "set_ipfix_exporter" }
   716  func (*SetIpfixExporter) GetCrcString() string   { return "5530c8a0" }
   717  func (*SetIpfixExporter) GetMessageType() api.MessageType {
   718  	return api.RequestMessage
   719  }
   720  
   721  func (m *SetIpfixExporter) Size() (size int) {
   722  	if m == nil {
   723  		return 0
   724  	}
   725  	size += 1      // m.CollectorAddress.Af
   726  	size += 1 * 16 // m.CollectorAddress.Un
   727  	size += 2      // m.CollectorPort
   728  	size += 1      // m.SrcAddress.Af
   729  	size += 1 * 16 // m.SrcAddress.Un
   730  	size += 4      // m.VrfID
   731  	size += 4      // m.PathMtu
   732  	size += 4      // m.TemplateInterval
   733  	size += 1      // m.UDPChecksum
   734  	return size
   735  }
   736  func (m *SetIpfixExporter) Marshal(b []byte) ([]byte, error) {
   737  	if b == nil {
   738  		b = make([]byte, m.Size())
   739  	}
   740  	buf := codec.NewBuffer(b)
   741  	buf.EncodeUint8(uint8(m.CollectorAddress.Af))
   742  	buf.EncodeBytes(m.CollectorAddress.Un.XXX_UnionData[:], 16)
   743  	buf.EncodeUint16(m.CollectorPort)
   744  	buf.EncodeUint8(uint8(m.SrcAddress.Af))
   745  	buf.EncodeBytes(m.SrcAddress.Un.XXX_UnionData[:], 16)
   746  	buf.EncodeUint32(m.VrfID)
   747  	buf.EncodeUint32(m.PathMtu)
   748  	buf.EncodeUint32(m.TemplateInterval)
   749  	buf.EncodeBool(m.UDPChecksum)
   750  	return buf.Bytes(), nil
   751  }
   752  func (m *SetIpfixExporter) Unmarshal(b []byte) error {
   753  	buf := codec.NewBuffer(b)
   754  	m.CollectorAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
   755  	copy(m.CollectorAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   756  	m.CollectorPort = buf.DecodeUint16()
   757  	m.SrcAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
   758  	copy(m.SrcAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
   759  	m.VrfID = buf.DecodeUint32()
   760  	m.PathMtu = buf.DecodeUint32()
   761  	m.TemplateInterval = buf.DecodeUint32()
   762  	m.UDPChecksum = buf.DecodeBool()
   763  	return nil
   764  }
   765  
   766  // SetIpfixExporterReply defines message 'set_ipfix_exporter_reply'.
   767  type SetIpfixExporterReply struct {
   768  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   769  }
   770  
   771  func (m *SetIpfixExporterReply) Reset()               { *m = SetIpfixExporterReply{} }
   772  func (*SetIpfixExporterReply) GetMessageName() string { return "set_ipfix_exporter_reply" }
   773  func (*SetIpfixExporterReply) GetCrcString() string   { return "e8d4e804" }
   774  func (*SetIpfixExporterReply) GetMessageType() api.MessageType {
   775  	return api.ReplyMessage
   776  }
   777  
   778  func (m *SetIpfixExporterReply) Size() (size int) {
   779  	if m == nil {
   780  		return 0
   781  	}
   782  	size += 4 // m.Retval
   783  	return size
   784  }
   785  func (m *SetIpfixExporterReply) Marshal(b []byte) ([]byte, error) {
   786  	if b == nil {
   787  		b = make([]byte, m.Size())
   788  	}
   789  	buf := codec.NewBuffer(b)
   790  	buf.EncodeInt32(m.Retval)
   791  	return buf.Bytes(), nil
   792  }
   793  func (m *SetIpfixExporterReply) Unmarshal(b []byte) error {
   794  	buf := codec.NewBuffer(b)
   795  	m.Retval = buf.DecodeInt32()
   796  	return nil
   797  }
   798  
   799  func init() { file_ipfix_export_binapi_init() }
   800  func file_ipfix_export_binapi_init() {
   801  	api.RegisterMessage((*IpfixAllExporterDetails)(nil), "ipfix_all_exporter_details_0dedbfe4")
   802  	api.RegisterMessage((*IpfixAllExporterGet)(nil), "ipfix_all_exporter_get_f75ba505")
   803  	api.RegisterMessage((*IpfixAllExporterGetReply)(nil), "ipfix_all_exporter_get_reply_53b48f5d")
   804  	api.RegisterMessage((*IpfixClassifyStreamDetails)(nil), "ipfix_classify_stream_details_2903539d")
   805  	api.RegisterMessage((*IpfixClassifyStreamDump)(nil), "ipfix_classify_stream_dump_51077d14")
   806  	api.RegisterMessage((*IpfixClassifyTableAddDel)(nil), "ipfix_classify_table_add_del_3e449bb9")
   807  	api.RegisterMessage((*IpfixClassifyTableAddDelReply)(nil), "ipfix_classify_table_add_del_reply_e8d4e804")
   808  	api.RegisterMessage((*IpfixClassifyTableDetails)(nil), "ipfix_classify_table_details_1af8c28c")
   809  	api.RegisterMessage((*IpfixClassifyTableDump)(nil), "ipfix_classify_table_dump_51077d14")
   810  	api.RegisterMessage((*IpfixExporterCreateDelete)(nil), "ipfix_exporter_create_delete_0753a768")
   811  	api.RegisterMessage((*IpfixExporterCreateDeleteReply)(nil), "ipfix_exporter_create_delete_reply_9ffac24b")
   812  	api.RegisterMessage((*IpfixExporterDetails)(nil), "ipfix_exporter_details_0dedbfe4")
   813  	api.RegisterMessage((*IpfixExporterDump)(nil), "ipfix_exporter_dump_51077d14")
   814  	api.RegisterMessage((*IpfixFlush)(nil), "ipfix_flush_51077d14")
   815  	api.RegisterMessage((*IpfixFlushReply)(nil), "ipfix_flush_reply_e8d4e804")
   816  	api.RegisterMessage((*SetIpfixClassifyStream)(nil), "set_ipfix_classify_stream_c9cbe053")
   817  	api.RegisterMessage((*SetIpfixClassifyStreamReply)(nil), "set_ipfix_classify_stream_reply_e8d4e804")
   818  	api.RegisterMessage((*SetIpfixExporter)(nil), "set_ipfix_exporter_5530c8a0")
   819  	api.RegisterMessage((*SetIpfixExporterReply)(nil), "set_ipfix_exporter_reply_e8d4e804")
   820  }
   821  
   822  // Messages returns list of all messages in this module.
   823  func AllMessages() []api.Message {
   824  	return []api.Message{
   825  		(*IpfixAllExporterDetails)(nil),
   826  		(*IpfixAllExporterGet)(nil),
   827  		(*IpfixAllExporterGetReply)(nil),
   828  		(*IpfixClassifyStreamDetails)(nil),
   829  		(*IpfixClassifyStreamDump)(nil),
   830  		(*IpfixClassifyTableAddDel)(nil),
   831  		(*IpfixClassifyTableAddDelReply)(nil),
   832  		(*IpfixClassifyTableDetails)(nil),
   833  		(*IpfixClassifyTableDump)(nil),
   834  		(*IpfixExporterCreateDelete)(nil),
   835  		(*IpfixExporterCreateDeleteReply)(nil),
   836  		(*IpfixExporterDetails)(nil),
   837  		(*IpfixExporterDump)(nil),
   838  		(*IpfixFlush)(nil),
   839  		(*IpfixFlushReply)(nil),
   840  		(*SetIpfixClassifyStream)(nil),
   841  		(*SetIpfixClassifyStreamReply)(nil),
   842  		(*SetIpfixExporter)(nil),
   843  		(*SetIpfixExporterReply)(nil),
   844  	}
   845  }