github.com/networkservicemesh/govpp@v0.0.0-20240328101142-8a444680fbba/binapi/classify/classify.ba.go (about)

     1  // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
     2  // versions:
     3  //  binapi-generator: v0.10.0-dev
     4  //  VPP:              23.10-rc0~170-g6f1548434
     5  // source: core/classify.api.json
     6  
     7  // Package classify contains generated bindings for API file classify.api.
     8  //
     9  // Contents:
    10  // -  3 enums
    11  // - 44 messages
    12  package classify
    13  
    14  import (
    15  	"strconv"
    16  
    17  	interface_types "github.com/networkservicemesh/govpp/binapi/interface_types"
    18  	api "go.fd.io/govpp/api"
    19  	codec "go.fd.io/govpp/codec"
    20  )
    21  
    22  // This is a compile-time assertion to ensure that this generated file
    23  // is compatible with the GoVPP api package it is being compiled against.
    24  // A compilation error at this line likely means your copy of the
    25  // GoVPP api package needs to be updated.
    26  const _ = api.GoVppAPIPackageIsVersion2
    27  
    28  const (
    29  	APIFile    = "classify"
    30  	APIVersion = "3.1.0"
    31  	VersionCrc = 0x92a4f2c8
    32  )
    33  
    34  // ClassifyAction defines enum 'classify_action'.
    35  type ClassifyAction uint8
    36  
    37  const (
    38  	CLASSIFY_API_ACTION_NONE              ClassifyAction = 0
    39  	CLASSIFY_API_ACTION_SET_IP4_FIB_INDEX ClassifyAction = 1
    40  	CLASSIFY_API_ACTION_SET_IP6_FIB_INDEX ClassifyAction = 2
    41  	CLASSIFY_API_ACTION_SET_METADATA      ClassifyAction = 3
    42  )
    43  
    44  var (
    45  	ClassifyAction_name = map[uint8]string{
    46  		0: "CLASSIFY_API_ACTION_NONE",
    47  		1: "CLASSIFY_API_ACTION_SET_IP4_FIB_INDEX",
    48  		2: "CLASSIFY_API_ACTION_SET_IP6_FIB_INDEX",
    49  		3: "CLASSIFY_API_ACTION_SET_METADATA",
    50  	}
    51  	ClassifyAction_value = map[string]uint8{
    52  		"CLASSIFY_API_ACTION_NONE":              0,
    53  		"CLASSIFY_API_ACTION_SET_IP4_FIB_INDEX": 1,
    54  		"CLASSIFY_API_ACTION_SET_IP6_FIB_INDEX": 2,
    55  		"CLASSIFY_API_ACTION_SET_METADATA":      3,
    56  	}
    57  )
    58  
    59  func (x ClassifyAction) String() string {
    60  	s, ok := ClassifyAction_name[uint8(x)]
    61  	if ok {
    62  		return s
    63  	}
    64  	return "ClassifyAction(" + strconv.Itoa(int(x)) + ")"
    65  }
    66  
    67  // FlowClassifyTable defines enum 'flow_classify_table'.
    68  type FlowClassifyTable uint8
    69  
    70  const (
    71  	FLOW_CLASSIFY_API_TABLE_IP4 FlowClassifyTable = 0
    72  	FLOW_CLASSIFY_API_TABLE_IP6 FlowClassifyTable = 1
    73  )
    74  
    75  var (
    76  	FlowClassifyTable_name = map[uint8]string{
    77  		0: "FLOW_CLASSIFY_API_TABLE_IP4",
    78  		1: "FLOW_CLASSIFY_API_TABLE_IP6",
    79  	}
    80  	FlowClassifyTable_value = map[string]uint8{
    81  		"FLOW_CLASSIFY_API_TABLE_IP4": 0,
    82  		"FLOW_CLASSIFY_API_TABLE_IP6": 1,
    83  	}
    84  )
    85  
    86  func (x FlowClassifyTable) String() string {
    87  	s, ok := FlowClassifyTable_name[uint8(x)]
    88  	if ok {
    89  		return s
    90  	}
    91  	return "FlowClassifyTable(" + strconv.Itoa(int(x)) + ")"
    92  }
    93  
    94  // PolicerClassifyTable defines enum 'policer_classify_table'.
    95  type PolicerClassifyTable uint8
    96  
    97  const (
    98  	POLICER_CLASSIFY_API_TABLE_IP4 PolicerClassifyTable = 0
    99  	POLICER_CLASSIFY_API_TABLE_IP6 PolicerClassifyTable = 1
   100  	POLICER_CLASSIFY_API_TABLE_L2  PolicerClassifyTable = 2
   101  )
   102  
   103  var (
   104  	PolicerClassifyTable_name = map[uint8]string{
   105  		0: "POLICER_CLASSIFY_API_TABLE_IP4",
   106  		1: "POLICER_CLASSIFY_API_TABLE_IP6",
   107  		2: "POLICER_CLASSIFY_API_TABLE_L2",
   108  	}
   109  	PolicerClassifyTable_value = map[string]uint8{
   110  		"POLICER_CLASSIFY_API_TABLE_IP4": 0,
   111  		"POLICER_CLASSIFY_API_TABLE_IP6": 1,
   112  		"POLICER_CLASSIFY_API_TABLE_L2":  2,
   113  	}
   114  )
   115  
   116  func (x PolicerClassifyTable) String() string {
   117  	s, ok := PolicerClassifyTable_name[uint8(x)]
   118  	if ok {
   119  		return s
   120  	}
   121  	return "PolicerClassifyTable(" + strconv.Itoa(int(x)) + ")"
   122  }
   123  
   124  // Classify add / del session request
   125  //   - is_add - add session if non-zero, else delete
   126  //   - table_index - index of the table to add/del the session, required
   127  //   - hit_next_index - for add, hit_next_index of new session, required
   128  //   - opaque_index - for add, opaque_index of new session
   129  //   - advance -for add, advance value for session
   130  //   - action -
   131  //     0: no action (by default)
   132  //     metadata is not used.
   133  //     1: Classified IP packets will be looked up from the
   134  //     specified ipv4 fib table (configured by metadata as VRF id).
   135  //     Only valid for L3 input ACL node
   136  //     2: Classified IP packets will be looked up from the
   137  //     specified ipv6 fib table (configured by metadata as VRF id).
   138  //     Only valid for L3 input ACL node
   139  //     3: Classified packet will be steered to source routing policy
   140  //     of given index (in metadata).
   141  //     This is only valid for IPv6 packets redirected to a source
   142  //     routing node.
   143  //   - metadata - valid only if action != 0
   144  //     VRF id if action is 1 or 2.
   145  //     sr policy index if action is 3.
   146  //   - match_len - length of match, should be equal to skip_n_vectors plus match_n_vectors
   147  //     of target table times sizeof (u32x4)
   148  //   - match - for add, match value for session, required,
   149  //     needs to include bytes in front
   150  //     with length of skip_n_vectors of target table times sizeof (u32x4)
   151  //     (values of those bytes will be ignored)
   152  //
   153  // ClassifyAddDelSession defines message 'classify_add_del_session'.
   154  type ClassifyAddDelSession struct {
   155  	IsAdd        bool           `binapi:"bool,name=is_add" json:"is_add,omitempty"`
   156  	TableIndex   uint32         `binapi:"u32,name=table_index" json:"table_index,omitempty"`
   157  	HitNextIndex uint32         `binapi:"u32,name=hit_next_index,default=4294967295" json:"hit_next_index,omitempty"`
   158  	OpaqueIndex  uint32         `binapi:"u32,name=opaque_index,default=4294967295" json:"opaque_index,omitempty"`
   159  	Advance      int32          `binapi:"i32,name=advance,default=0" json:"advance,omitempty"`
   160  	Action       ClassifyAction `binapi:"classify_action,name=action,default=0" json:"action,omitempty"`
   161  	Metadata     uint32         `binapi:"u32,name=metadata,default=0" json:"metadata,omitempty"`
   162  	MatchLen     uint32         `binapi:"u32,name=match_len" json:"-"`
   163  	Match        []byte         `binapi:"u8[match_len],name=match" json:"match,omitempty"`
   164  }
   165  
   166  func (m *ClassifyAddDelSession) Reset()               { *m = ClassifyAddDelSession{} }
   167  func (*ClassifyAddDelSession) GetMessageName() string { return "classify_add_del_session" }
   168  func (*ClassifyAddDelSession) GetCrcString() string   { return "f20879f0" }
   169  func (*ClassifyAddDelSession) GetMessageType() api.MessageType {
   170  	return api.RequestMessage
   171  }
   172  
   173  func (m *ClassifyAddDelSession) Size() (size int) {
   174  	if m == nil {
   175  		return 0
   176  	}
   177  	size += 1                // m.IsAdd
   178  	size += 4                // m.TableIndex
   179  	size += 4                // m.HitNextIndex
   180  	size += 4                // m.OpaqueIndex
   181  	size += 4                // m.Advance
   182  	size += 1                // m.Action
   183  	size += 4                // m.Metadata
   184  	size += 4                // m.MatchLen
   185  	size += 1 * len(m.Match) // m.Match
   186  	return size
   187  }
   188  func (m *ClassifyAddDelSession) Marshal(b []byte) ([]byte, error) {
   189  	if b == nil {
   190  		b = make([]byte, m.Size())
   191  	}
   192  	buf := codec.NewBuffer(b)
   193  	buf.EncodeBool(m.IsAdd)
   194  	buf.EncodeUint32(m.TableIndex)
   195  	buf.EncodeUint32(m.HitNextIndex)
   196  	buf.EncodeUint32(m.OpaqueIndex)
   197  	buf.EncodeInt32(m.Advance)
   198  	buf.EncodeUint8(uint8(m.Action))
   199  	buf.EncodeUint32(m.Metadata)
   200  	buf.EncodeUint32(uint32(len(m.Match)))
   201  	buf.EncodeBytes(m.Match, 0)
   202  	return buf.Bytes(), nil
   203  }
   204  func (m *ClassifyAddDelSession) Unmarshal(b []byte) error {
   205  	buf := codec.NewBuffer(b)
   206  	m.IsAdd = buf.DecodeBool()
   207  	m.TableIndex = buf.DecodeUint32()
   208  	m.HitNextIndex = buf.DecodeUint32()
   209  	m.OpaqueIndex = buf.DecodeUint32()
   210  	m.Advance = buf.DecodeInt32()
   211  	m.Action = ClassifyAction(buf.DecodeUint8())
   212  	m.Metadata = buf.DecodeUint32()
   213  	m.MatchLen = buf.DecodeUint32()
   214  	m.Match = make([]byte, m.MatchLen)
   215  	copy(m.Match, buf.DecodeBytes(len(m.Match)))
   216  	return nil
   217  }
   218  
   219  // ClassifyAddDelSessionReply defines message 'classify_add_del_session_reply'.
   220  type ClassifyAddDelSessionReply struct {
   221  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   222  }
   223  
   224  func (m *ClassifyAddDelSessionReply) Reset()               { *m = ClassifyAddDelSessionReply{} }
   225  func (*ClassifyAddDelSessionReply) GetMessageName() string { return "classify_add_del_session_reply" }
   226  func (*ClassifyAddDelSessionReply) GetCrcString() string   { return "e8d4e804" }
   227  func (*ClassifyAddDelSessionReply) GetMessageType() api.MessageType {
   228  	return api.ReplyMessage
   229  }
   230  
   231  func (m *ClassifyAddDelSessionReply) Size() (size int) {
   232  	if m == nil {
   233  		return 0
   234  	}
   235  	size += 4 // m.Retval
   236  	return size
   237  }
   238  func (m *ClassifyAddDelSessionReply) Marshal(b []byte) ([]byte, error) {
   239  	if b == nil {
   240  		b = make([]byte, m.Size())
   241  	}
   242  	buf := codec.NewBuffer(b)
   243  	buf.EncodeInt32(m.Retval)
   244  	return buf.Bytes(), nil
   245  }
   246  func (m *ClassifyAddDelSessionReply) Unmarshal(b []byte) error {
   247  	buf := codec.NewBuffer(b)
   248  	m.Retval = buf.DecodeInt32()
   249  	return nil
   250  }
   251  
   252  // Add/Delete classification table request
   253  //   - is_add- if non-zero add the table, else delete it
   254  //   - del_chain - if non-zero delete the whole chain of tables
   255  //   - table_index - if add, returns index of the created table, else specifies the table to delete
   256  //   - nbuckets - number of buckets when adding a table
   257  //   - memory_size - memory size when adding a table
   258  //   - match_n_vectors - number of match vectors
   259  //   - next_table_index - index of next table
   260  //   - miss_next_index - index of miss table
   261  //   - current_data_flag - option to use current node's packet payload
   262  //     as the starting point from where packets are classified,
   263  //     This option is only valid for L2/L3 input ACL for now.
   264  //     0: by default, classify data from the buffer's start location
   265  //     1: classify packets from VPP node’s current data pointer
   266  //   - current_data_offset - a signed value to shift the start location of
   267  //     the packet to be classified
   268  //     For example, if input IP ACL node is used, L2 header’s first byte
   269  //     can be accessible by configuring current_data_offset to -14
   270  //     if there is no vlan tag.
   271  //     This is valid only if current_data_flag is set to 1.
   272  //   - mask_len - length of match mask, should be equal to match_n_vectors * sizeof (u32x4)
   273  //   - mask - match mask
   274  //
   275  // ClassifyAddDelTable defines message 'classify_add_del_table'.
   276  type ClassifyAddDelTable struct {
   277  	IsAdd             bool   `binapi:"bool,name=is_add" json:"is_add,omitempty"`
   278  	DelChain          bool   `binapi:"bool,name=del_chain" json:"del_chain,omitempty"`
   279  	TableIndex        uint32 `binapi:"u32,name=table_index,default=4294967295" json:"table_index,omitempty"`
   280  	Nbuckets          uint32 `binapi:"u32,name=nbuckets,default=2" json:"nbuckets,omitempty"`
   281  	MemorySize        uint32 `binapi:"u32,name=memory_size,default=2097152" json:"memory_size,omitempty"`
   282  	SkipNVectors      uint32 `binapi:"u32,name=skip_n_vectors,default=0" json:"skip_n_vectors,omitempty"`
   283  	MatchNVectors     uint32 `binapi:"u32,name=match_n_vectors,default=1" json:"match_n_vectors,omitempty"`
   284  	NextTableIndex    uint32 `binapi:"u32,name=next_table_index,default=4294967295" json:"next_table_index,omitempty"`
   285  	MissNextIndex     uint32 `binapi:"u32,name=miss_next_index,default=4294967295" json:"miss_next_index,omitempty"`
   286  	CurrentDataFlag   uint8  `binapi:"u8,name=current_data_flag,default=0" json:"current_data_flag,omitempty"`
   287  	CurrentDataOffset int16  `binapi:"i16,name=current_data_offset,default=0" json:"current_data_offset,omitempty"`
   288  	MaskLen           uint32 `binapi:"u32,name=mask_len" json:"-"`
   289  	Mask              []byte `binapi:"u8[mask_len],name=mask" json:"mask,omitempty"`
   290  }
   291  
   292  func (m *ClassifyAddDelTable) Reset()               { *m = ClassifyAddDelTable{} }
   293  func (*ClassifyAddDelTable) GetMessageName() string { return "classify_add_del_table" }
   294  func (*ClassifyAddDelTable) GetCrcString() string   { return "6849e39e" }
   295  func (*ClassifyAddDelTable) GetMessageType() api.MessageType {
   296  	return api.RequestMessage
   297  }
   298  
   299  func (m *ClassifyAddDelTable) Size() (size int) {
   300  	if m == nil {
   301  		return 0
   302  	}
   303  	size += 1               // m.IsAdd
   304  	size += 1               // m.DelChain
   305  	size += 4               // m.TableIndex
   306  	size += 4               // m.Nbuckets
   307  	size += 4               // m.MemorySize
   308  	size += 4               // m.SkipNVectors
   309  	size += 4               // m.MatchNVectors
   310  	size += 4               // m.NextTableIndex
   311  	size += 4               // m.MissNextIndex
   312  	size += 1               // m.CurrentDataFlag
   313  	size += 2               // m.CurrentDataOffset
   314  	size += 4               // m.MaskLen
   315  	size += 1 * len(m.Mask) // m.Mask
   316  	return size
   317  }
   318  func (m *ClassifyAddDelTable) Marshal(b []byte) ([]byte, error) {
   319  	if b == nil {
   320  		b = make([]byte, m.Size())
   321  	}
   322  	buf := codec.NewBuffer(b)
   323  	buf.EncodeBool(m.IsAdd)
   324  	buf.EncodeBool(m.DelChain)
   325  	buf.EncodeUint32(m.TableIndex)
   326  	buf.EncodeUint32(m.Nbuckets)
   327  	buf.EncodeUint32(m.MemorySize)
   328  	buf.EncodeUint32(m.SkipNVectors)
   329  	buf.EncodeUint32(m.MatchNVectors)
   330  	buf.EncodeUint32(m.NextTableIndex)
   331  	buf.EncodeUint32(m.MissNextIndex)
   332  	buf.EncodeUint8(m.CurrentDataFlag)
   333  	buf.EncodeInt16(m.CurrentDataOffset)
   334  	buf.EncodeUint32(uint32(len(m.Mask)))
   335  	buf.EncodeBytes(m.Mask, 0)
   336  	return buf.Bytes(), nil
   337  }
   338  func (m *ClassifyAddDelTable) Unmarshal(b []byte) error {
   339  	buf := codec.NewBuffer(b)
   340  	m.IsAdd = buf.DecodeBool()
   341  	m.DelChain = buf.DecodeBool()
   342  	m.TableIndex = buf.DecodeUint32()
   343  	m.Nbuckets = buf.DecodeUint32()
   344  	m.MemorySize = buf.DecodeUint32()
   345  	m.SkipNVectors = buf.DecodeUint32()
   346  	m.MatchNVectors = buf.DecodeUint32()
   347  	m.NextTableIndex = buf.DecodeUint32()
   348  	m.MissNextIndex = buf.DecodeUint32()
   349  	m.CurrentDataFlag = buf.DecodeUint8()
   350  	m.CurrentDataOffset = buf.DecodeInt16()
   351  	m.MaskLen = buf.DecodeUint32()
   352  	m.Mask = make([]byte, m.MaskLen)
   353  	copy(m.Mask, buf.DecodeBytes(len(m.Mask)))
   354  	return nil
   355  }
   356  
   357  // Add/Delete classification table response
   358  //   - retval - return code for the table add/del request
   359  //   - new_table_index - for add, returned index of the new table
   360  //   - skip_n_vectors - for add, returned value of skip_n_vectors in table
   361  //   - match_n_vectors -for add, returned value of match_n_vectors in table
   362  //
   363  // ClassifyAddDelTableReply defines message 'classify_add_del_table_reply'.
   364  type ClassifyAddDelTableReply struct {
   365  	Retval        int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
   366  	NewTableIndex uint32 `binapi:"u32,name=new_table_index" json:"new_table_index,omitempty"`
   367  	SkipNVectors  uint32 `binapi:"u32,name=skip_n_vectors" json:"skip_n_vectors,omitempty"`
   368  	MatchNVectors uint32 `binapi:"u32,name=match_n_vectors" json:"match_n_vectors,omitempty"`
   369  }
   370  
   371  func (m *ClassifyAddDelTableReply) Reset()               { *m = ClassifyAddDelTableReply{} }
   372  func (*ClassifyAddDelTableReply) GetMessageName() string { return "classify_add_del_table_reply" }
   373  func (*ClassifyAddDelTableReply) GetCrcString() string   { return "05486349" }
   374  func (*ClassifyAddDelTableReply) GetMessageType() api.MessageType {
   375  	return api.ReplyMessage
   376  }
   377  
   378  func (m *ClassifyAddDelTableReply) Size() (size int) {
   379  	if m == nil {
   380  		return 0
   381  	}
   382  	size += 4 // m.Retval
   383  	size += 4 // m.NewTableIndex
   384  	size += 4 // m.SkipNVectors
   385  	size += 4 // m.MatchNVectors
   386  	return size
   387  }
   388  func (m *ClassifyAddDelTableReply) Marshal(b []byte) ([]byte, error) {
   389  	if b == nil {
   390  		b = make([]byte, m.Size())
   391  	}
   392  	buf := codec.NewBuffer(b)
   393  	buf.EncodeInt32(m.Retval)
   394  	buf.EncodeUint32(m.NewTableIndex)
   395  	buf.EncodeUint32(m.SkipNVectors)
   396  	buf.EncodeUint32(m.MatchNVectors)
   397  	return buf.Bytes(), nil
   398  }
   399  func (m *ClassifyAddDelTableReply) Unmarshal(b []byte) error {
   400  	buf := codec.NewBuffer(b)
   401  	m.Retval = buf.DecodeInt32()
   402  	m.NewTableIndex = buf.DecodeUint32()
   403  	m.SkipNVectors = buf.DecodeUint32()
   404  	m.MatchNVectors = buf.DecodeUint32()
   405  	return nil
   406  }
   407  
   408  // Classify get the PCAP table indices for an interface
   409  // ClassifyPcapGetTables defines message 'classify_pcap_get_tables'.
   410  type ClassifyPcapGetTables struct {
   411  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   412  }
   413  
   414  func (m *ClassifyPcapGetTables) Reset()               { *m = ClassifyPcapGetTables{} }
   415  func (*ClassifyPcapGetTables) GetMessageName() string { return "classify_pcap_get_tables" }
   416  func (*ClassifyPcapGetTables) GetCrcString() string   { return "f9e6675e" }
   417  func (*ClassifyPcapGetTables) GetMessageType() api.MessageType {
   418  	return api.RequestMessage
   419  }
   420  
   421  func (m *ClassifyPcapGetTables) Size() (size int) {
   422  	if m == nil {
   423  		return 0
   424  	}
   425  	size += 4 // m.SwIfIndex
   426  	return size
   427  }
   428  func (m *ClassifyPcapGetTables) Marshal(b []byte) ([]byte, error) {
   429  	if b == nil {
   430  		b = make([]byte, m.Size())
   431  	}
   432  	buf := codec.NewBuffer(b)
   433  	buf.EncodeUint32(uint32(m.SwIfIndex))
   434  	return buf.Bytes(), nil
   435  }
   436  func (m *ClassifyPcapGetTables) Unmarshal(b []byte) error {
   437  	buf := codec.NewBuffer(b)
   438  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   439  	return nil
   440  }
   441  
   442  // Classify get a PCAP tables response
   443  //   - retval - return code for the request
   444  //   - count - number of ids returned in response
   445  //   - indices - array of classify table indices
   446  //
   447  // ClassifyPcapGetTablesReply defines message 'classify_pcap_get_tables_reply'.
   448  type ClassifyPcapGetTablesReply struct {
   449  	Retval  int32    `binapi:"i32,name=retval" json:"retval,omitempty"`
   450  	Count   uint32   `binapi:"u32,name=count" json:"-"`
   451  	Indices []uint32 `binapi:"u32[count],name=indices" json:"indices,omitempty"`
   452  }
   453  
   454  func (m *ClassifyPcapGetTablesReply) Reset()               { *m = ClassifyPcapGetTablesReply{} }
   455  func (*ClassifyPcapGetTablesReply) GetMessageName() string { return "classify_pcap_get_tables_reply" }
   456  func (*ClassifyPcapGetTablesReply) GetCrcString() string   { return "5f5bc9e6" }
   457  func (*ClassifyPcapGetTablesReply) GetMessageType() api.MessageType {
   458  	return api.ReplyMessage
   459  }
   460  
   461  func (m *ClassifyPcapGetTablesReply) Size() (size int) {
   462  	if m == nil {
   463  		return 0
   464  	}
   465  	size += 4                  // m.Retval
   466  	size += 4                  // m.Count
   467  	size += 4 * len(m.Indices) // m.Indices
   468  	return size
   469  }
   470  func (m *ClassifyPcapGetTablesReply) Marshal(b []byte) ([]byte, error) {
   471  	if b == nil {
   472  		b = make([]byte, m.Size())
   473  	}
   474  	buf := codec.NewBuffer(b)
   475  	buf.EncodeInt32(m.Retval)
   476  	buf.EncodeUint32(uint32(len(m.Indices)))
   477  	for i := 0; i < len(m.Indices); i++ {
   478  		var x uint32
   479  		if i < len(m.Indices) {
   480  			x = uint32(m.Indices[i])
   481  		}
   482  		buf.EncodeUint32(x)
   483  	}
   484  	return buf.Bytes(), nil
   485  }
   486  func (m *ClassifyPcapGetTablesReply) Unmarshal(b []byte) error {
   487  	buf := codec.NewBuffer(b)
   488  	m.Retval = buf.DecodeInt32()
   489  	m.Count = buf.DecodeUint32()
   490  	m.Indices = make([]uint32, m.Count)
   491  	for i := 0; i < len(m.Indices); i++ {
   492  		m.Indices[i] = buf.DecodeUint32()
   493  	}
   494  	return nil
   495  }
   496  
   497  // Find a compatible Classify table in a PCAP chain
   498  //   - sw_if_index - interface whose chain will be searched, 0==system-wide
   499  //   - skip_n_vectors - number of u32x4 skip vectors
   500  //   - match_n_vectors - number of u32x4 vectors, 1..5
   501  //   - mask_len - length of mask, match_n_vectors * sizeof(u32x4)
   502  //   - mask - match mask
   503  //
   504  // ClassifyPcapLookupTable defines message 'classify_pcap_lookup_table'.
   505  type ClassifyPcapLookupTable struct {
   506  	SwIfIndex     interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
   507  	SkipNVectors  uint32                         `binapi:"u32,name=skip_n_vectors,default=0" json:"skip_n_vectors,omitempty"`
   508  	MatchNVectors uint32                         `binapi:"u32,name=match_n_vectors,default=1" json:"match_n_vectors,omitempty"`
   509  	MaskLen       uint32                         `binapi:"u32,name=mask_len" json:"-"`
   510  	Mask          []byte                         `binapi:"u8[mask_len],name=mask" json:"mask,omitempty"`
   511  }
   512  
   513  func (m *ClassifyPcapLookupTable) Reset()               { *m = ClassifyPcapLookupTable{} }
   514  func (*ClassifyPcapLookupTable) GetMessageName() string { return "classify_pcap_lookup_table" }
   515  func (*ClassifyPcapLookupTable) GetCrcString() string   { return "e1b4cc6b" }
   516  func (*ClassifyPcapLookupTable) GetMessageType() api.MessageType {
   517  	return api.RequestMessage
   518  }
   519  
   520  func (m *ClassifyPcapLookupTable) Size() (size int) {
   521  	if m == nil {
   522  		return 0
   523  	}
   524  	size += 4               // m.SwIfIndex
   525  	size += 4               // m.SkipNVectors
   526  	size += 4               // m.MatchNVectors
   527  	size += 4               // m.MaskLen
   528  	size += 1 * len(m.Mask) // m.Mask
   529  	return size
   530  }
   531  func (m *ClassifyPcapLookupTable) Marshal(b []byte) ([]byte, error) {
   532  	if b == nil {
   533  		b = make([]byte, m.Size())
   534  	}
   535  	buf := codec.NewBuffer(b)
   536  	buf.EncodeUint32(uint32(m.SwIfIndex))
   537  	buf.EncodeUint32(m.SkipNVectors)
   538  	buf.EncodeUint32(m.MatchNVectors)
   539  	buf.EncodeUint32(uint32(len(m.Mask)))
   540  	buf.EncodeBytes(m.Mask, 0)
   541  	return buf.Bytes(), nil
   542  }
   543  func (m *ClassifyPcapLookupTable) Unmarshal(b []byte) error {
   544  	buf := codec.NewBuffer(b)
   545  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   546  	m.SkipNVectors = buf.DecodeUint32()
   547  	m.MatchNVectors = buf.DecodeUint32()
   548  	m.MaskLen = buf.DecodeUint32()
   549  	m.Mask = make([]byte, m.MaskLen)
   550  	copy(m.Mask, buf.DecodeBytes(len(m.Mask)))
   551  	return nil
   552  }
   553  
   554  // Classify pcap table lookup response
   555  //   - retval - return code for the table lookup request
   556  //   - table_index - returned index of the found table, or ~0
   557  //
   558  // ClassifyPcapLookupTableReply defines message 'classify_pcap_lookup_table_reply'.
   559  type ClassifyPcapLookupTableReply struct {
   560  	Retval     int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
   561  	TableIndex uint32 `binapi:"u32,name=table_index" json:"table_index,omitempty"`
   562  }
   563  
   564  func (m *ClassifyPcapLookupTableReply) Reset() { *m = ClassifyPcapLookupTableReply{} }
   565  func (*ClassifyPcapLookupTableReply) GetMessageName() string {
   566  	return "classify_pcap_lookup_table_reply"
   567  }
   568  func (*ClassifyPcapLookupTableReply) GetCrcString() string { return "9c6c6773" }
   569  func (*ClassifyPcapLookupTableReply) GetMessageType() api.MessageType {
   570  	return api.ReplyMessage
   571  }
   572  
   573  func (m *ClassifyPcapLookupTableReply) Size() (size int) {
   574  	if m == nil {
   575  		return 0
   576  	}
   577  	size += 4 // m.Retval
   578  	size += 4 // m.TableIndex
   579  	return size
   580  }
   581  func (m *ClassifyPcapLookupTableReply) Marshal(b []byte) ([]byte, error) {
   582  	if b == nil {
   583  		b = make([]byte, m.Size())
   584  	}
   585  	buf := codec.NewBuffer(b)
   586  	buf.EncodeInt32(m.Retval)
   587  	buf.EncodeUint32(m.TableIndex)
   588  	return buf.Bytes(), nil
   589  }
   590  func (m *ClassifyPcapLookupTableReply) Unmarshal(b []byte) error {
   591  	buf := codec.NewBuffer(b)
   592  	m.Retval = buf.DecodeInt32()
   593  	m.TableIndex = buf.DecodeUint32()
   594  	return nil
   595  }
   596  
   597  // Add a Classify table into a PCAP chain on an interface
   598  //   - sw_if_index - interface whose chain will be searched, 0==system-wide
   599  //   - table_index - Classify table to be added
   600  //   - sort_masks - 1=sort masks into most-to-least specific order
   601  //
   602  // ClassifyPcapSetTable defines message 'classify_pcap_set_table'.
   603  type ClassifyPcapSetTable struct {
   604  	SwIfIndex  interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   605  	TableIndex uint32                         `binapi:"u32,name=table_index,default=4294967295" json:"table_index,omitempty"`
   606  	SortMasks  bool                           `binapi:"bool,name=sort_masks,default=0" json:"sort_masks,omitempty"`
   607  }
   608  
   609  func (m *ClassifyPcapSetTable) Reset()               { *m = ClassifyPcapSetTable{} }
   610  func (*ClassifyPcapSetTable) GetMessageName() string { return "classify_pcap_set_table" }
   611  func (*ClassifyPcapSetTable) GetCrcString() string   { return "006051b3" }
   612  func (*ClassifyPcapSetTable) GetMessageType() api.MessageType {
   613  	return api.RequestMessage
   614  }
   615  
   616  func (m *ClassifyPcapSetTable) Size() (size int) {
   617  	if m == nil {
   618  		return 0
   619  	}
   620  	size += 4 // m.SwIfIndex
   621  	size += 4 // m.TableIndex
   622  	size += 1 // m.SortMasks
   623  	return size
   624  }
   625  func (m *ClassifyPcapSetTable) Marshal(b []byte) ([]byte, error) {
   626  	if b == nil {
   627  		b = make([]byte, m.Size())
   628  	}
   629  	buf := codec.NewBuffer(b)
   630  	buf.EncodeUint32(uint32(m.SwIfIndex))
   631  	buf.EncodeUint32(m.TableIndex)
   632  	buf.EncodeBool(m.SortMasks)
   633  	return buf.Bytes(), nil
   634  }
   635  func (m *ClassifyPcapSetTable) Unmarshal(b []byte) error {
   636  	buf := codec.NewBuffer(b)
   637  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   638  	m.TableIndex = buf.DecodeUint32()
   639  	m.SortMasks = buf.DecodeBool()
   640  	return nil
   641  }
   642  
   643  // Classify pcap table lookup response
   644  //   - retval - return code for the table lookup request
   645  //   - table_index - returned index of the sorted table chain
   646  //
   647  // ClassifyPcapSetTableReply defines message 'classify_pcap_set_table_reply'.
   648  type ClassifyPcapSetTableReply struct {
   649  	Retval     int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
   650  	TableIndex uint32 `binapi:"u32,name=table_index" json:"table_index,omitempty"`
   651  }
   652  
   653  func (m *ClassifyPcapSetTableReply) Reset()               { *m = ClassifyPcapSetTableReply{} }
   654  func (*ClassifyPcapSetTableReply) GetMessageName() string { return "classify_pcap_set_table_reply" }
   655  func (*ClassifyPcapSetTableReply) GetCrcString() string   { return "9c6c6773" }
   656  func (*ClassifyPcapSetTableReply) GetMessageType() api.MessageType {
   657  	return api.ReplyMessage
   658  }
   659  
   660  func (m *ClassifyPcapSetTableReply) Size() (size int) {
   661  	if m == nil {
   662  		return 0
   663  	}
   664  	size += 4 // m.Retval
   665  	size += 4 // m.TableIndex
   666  	return size
   667  }
   668  func (m *ClassifyPcapSetTableReply) Marshal(b []byte) ([]byte, error) {
   669  	if b == nil {
   670  		b = make([]byte, m.Size())
   671  	}
   672  	buf := codec.NewBuffer(b)
   673  	buf.EncodeInt32(m.Retval)
   674  	buf.EncodeUint32(m.TableIndex)
   675  	return buf.Bytes(), nil
   676  }
   677  func (m *ClassifyPcapSetTableReply) Unmarshal(b []byte) error {
   678  	buf := codec.NewBuffer(b)
   679  	m.Retval = buf.DecodeInt32()
   680  	m.TableIndex = buf.DecodeUint32()
   681  	return nil
   682  }
   683  
   684  // Reply for classify table session dump request
   685  //   - count - number of ids returned in response
   686  //   - table_id - classify table index
   687  //   - hit_next_index - hit_next_index of session
   688  //   - opaque_index - for add, opaque_index of session
   689  //   - advance - advance value of session
   690  //   - match[] - match value for session
   691  //
   692  // ClassifySessionDetails defines message 'classify_session_details'.
   693  type ClassifySessionDetails struct {
   694  	Retval       int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
   695  	TableID      uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
   696  	HitNextIndex uint32 `binapi:"u32,name=hit_next_index" json:"hit_next_index,omitempty"`
   697  	Advance      int32  `binapi:"i32,name=advance" json:"advance,omitempty"`
   698  	OpaqueIndex  uint32 `binapi:"u32,name=opaque_index" json:"opaque_index,omitempty"`
   699  	MatchLength  uint32 `binapi:"u32,name=match_length" json:"-"`
   700  	Match        []byte `binapi:"u8[match_length],name=match" json:"match,omitempty"`
   701  }
   702  
   703  func (m *ClassifySessionDetails) Reset()               { *m = ClassifySessionDetails{} }
   704  func (*ClassifySessionDetails) GetMessageName() string { return "classify_session_details" }
   705  func (*ClassifySessionDetails) GetCrcString() string   { return "60e3ef94" }
   706  func (*ClassifySessionDetails) GetMessageType() api.MessageType {
   707  	return api.ReplyMessage
   708  }
   709  
   710  func (m *ClassifySessionDetails) Size() (size int) {
   711  	if m == nil {
   712  		return 0
   713  	}
   714  	size += 4                // m.Retval
   715  	size += 4                // m.TableID
   716  	size += 4                // m.HitNextIndex
   717  	size += 4                // m.Advance
   718  	size += 4                // m.OpaqueIndex
   719  	size += 4                // m.MatchLength
   720  	size += 1 * len(m.Match) // m.Match
   721  	return size
   722  }
   723  func (m *ClassifySessionDetails) Marshal(b []byte) ([]byte, error) {
   724  	if b == nil {
   725  		b = make([]byte, m.Size())
   726  	}
   727  	buf := codec.NewBuffer(b)
   728  	buf.EncodeInt32(m.Retval)
   729  	buf.EncodeUint32(m.TableID)
   730  	buf.EncodeUint32(m.HitNextIndex)
   731  	buf.EncodeInt32(m.Advance)
   732  	buf.EncodeUint32(m.OpaqueIndex)
   733  	buf.EncodeUint32(uint32(len(m.Match)))
   734  	buf.EncodeBytes(m.Match, 0)
   735  	return buf.Bytes(), nil
   736  }
   737  func (m *ClassifySessionDetails) Unmarshal(b []byte) error {
   738  	buf := codec.NewBuffer(b)
   739  	m.Retval = buf.DecodeInt32()
   740  	m.TableID = buf.DecodeUint32()
   741  	m.HitNextIndex = buf.DecodeUint32()
   742  	m.Advance = buf.DecodeInt32()
   743  	m.OpaqueIndex = buf.DecodeUint32()
   744  	m.MatchLength = buf.DecodeUint32()
   745  	m.Match = make([]byte, m.MatchLength)
   746  	copy(m.Match, buf.DecodeBytes(len(m.Match)))
   747  	return nil
   748  }
   749  
   750  // Classify sessions dump request
   751  //   - table_id - classify table index
   752  //
   753  // ClassifySessionDump defines message 'classify_session_dump'.
   754  type ClassifySessionDump struct {
   755  	TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
   756  }
   757  
   758  func (m *ClassifySessionDump) Reset()               { *m = ClassifySessionDump{} }
   759  func (*ClassifySessionDump) GetMessageName() string { return "classify_session_dump" }
   760  func (*ClassifySessionDump) GetCrcString() string   { return "0cca2cd9" }
   761  func (*ClassifySessionDump) GetMessageType() api.MessageType {
   762  	return api.RequestMessage
   763  }
   764  
   765  func (m *ClassifySessionDump) Size() (size int) {
   766  	if m == nil {
   767  		return 0
   768  	}
   769  	size += 4 // m.TableID
   770  	return size
   771  }
   772  func (m *ClassifySessionDump) Marshal(b []byte) ([]byte, error) {
   773  	if b == nil {
   774  		b = make([]byte, m.Size())
   775  	}
   776  	buf := codec.NewBuffer(b)
   777  	buf.EncodeUint32(m.TableID)
   778  	return buf.Bytes(), nil
   779  }
   780  func (m *ClassifySessionDump) Unmarshal(b []byte) error {
   781  	buf := codec.NewBuffer(b)
   782  	m.TableID = buf.DecodeUint32()
   783  	return nil
   784  }
   785  
   786  // Set/unset the classification table for an interface request
   787  //   - is_ipv6 - ipv6 if non-zero, else ipv4
   788  //   - sw_if_index - interface to associate with the table
   789  //   - table_index - index of the table, if ~0 unset the table
   790  //
   791  // ClassifySetInterfaceIPTable defines message 'classify_set_interface_ip_table'.
   792  type ClassifySetInterfaceIPTable struct {
   793  	IsIPv6     bool                           `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
   794  	SwIfIndex  interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   795  	TableIndex uint32                         `binapi:"u32,name=table_index" json:"table_index,omitempty"`
   796  }
   797  
   798  func (m *ClassifySetInterfaceIPTable) Reset()               { *m = ClassifySetInterfaceIPTable{} }
   799  func (*ClassifySetInterfaceIPTable) GetMessageName() string { return "classify_set_interface_ip_table" }
   800  func (*ClassifySetInterfaceIPTable) GetCrcString() string   { return "e0b097c7" }
   801  func (*ClassifySetInterfaceIPTable) GetMessageType() api.MessageType {
   802  	return api.RequestMessage
   803  }
   804  
   805  func (m *ClassifySetInterfaceIPTable) Size() (size int) {
   806  	if m == nil {
   807  		return 0
   808  	}
   809  	size += 1 // m.IsIPv6
   810  	size += 4 // m.SwIfIndex
   811  	size += 4 // m.TableIndex
   812  	return size
   813  }
   814  func (m *ClassifySetInterfaceIPTable) Marshal(b []byte) ([]byte, error) {
   815  	if b == nil {
   816  		b = make([]byte, m.Size())
   817  	}
   818  	buf := codec.NewBuffer(b)
   819  	buf.EncodeBool(m.IsIPv6)
   820  	buf.EncodeUint32(uint32(m.SwIfIndex))
   821  	buf.EncodeUint32(m.TableIndex)
   822  	return buf.Bytes(), nil
   823  }
   824  func (m *ClassifySetInterfaceIPTable) Unmarshal(b []byte) error {
   825  	buf := codec.NewBuffer(b)
   826  	m.IsIPv6 = buf.DecodeBool()
   827  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   828  	m.TableIndex = buf.DecodeUint32()
   829  	return nil
   830  }
   831  
   832  // ClassifySetInterfaceIPTableReply defines message 'classify_set_interface_ip_table_reply'.
   833  type ClassifySetInterfaceIPTableReply struct {
   834  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   835  }
   836  
   837  func (m *ClassifySetInterfaceIPTableReply) Reset() { *m = ClassifySetInterfaceIPTableReply{} }
   838  func (*ClassifySetInterfaceIPTableReply) GetMessageName() string {
   839  	return "classify_set_interface_ip_table_reply"
   840  }
   841  func (*ClassifySetInterfaceIPTableReply) GetCrcString() string { return "e8d4e804" }
   842  func (*ClassifySetInterfaceIPTableReply) GetMessageType() api.MessageType {
   843  	return api.ReplyMessage
   844  }
   845  
   846  func (m *ClassifySetInterfaceIPTableReply) Size() (size int) {
   847  	if m == nil {
   848  		return 0
   849  	}
   850  	size += 4 // m.Retval
   851  	return size
   852  }
   853  func (m *ClassifySetInterfaceIPTableReply) Marshal(b []byte) ([]byte, error) {
   854  	if b == nil {
   855  		b = make([]byte, m.Size())
   856  	}
   857  	buf := codec.NewBuffer(b)
   858  	buf.EncodeInt32(m.Retval)
   859  	return buf.Bytes(), nil
   860  }
   861  func (m *ClassifySetInterfaceIPTableReply) Unmarshal(b []byte) error {
   862  	buf := codec.NewBuffer(b)
   863  	m.Retval = buf.DecodeInt32()
   864  	return nil
   865  }
   866  
   867  // Set/unset l2 classification tables for an interface request
   868  //   - sw_if_index - interface to set/unset tables for
   869  //   - ip4_table_index - ip4 index, use ~0 for all 3 indexes to unset
   870  //   - ip6_table_index - ip6 index
   871  //   - other_table_index - other index
   872  //
   873  // ClassifySetInterfaceL2Tables defines message 'classify_set_interface_l2_tables'.
   874  type ClassifySetInterfaceL2Tables struct {
   875  	SwIfIndex       interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   876  	IP4TableIndex   uint32                         `binapi:"u32,name=ip4_table_index" json:"ip4_table_index,omitempty"`
   877  	IP6TableIndex   uint32                         `binapi:"u32,name=ip6_table_index" json:"ip6_table_index,omitempty"`
   878  	OtherTableIndex uint32                         `binapi:"u32,name=other_table_index" json:"other_table_index,omitempty"`
   879  	IsInput         bool                           `binapi:"bool,name=is_input" json:"is_input,omitempty"`
   880  }
   881  
   882  func (m *ClassifySetInterfaceL2Tables) Reset() { *m = ClassifySetInterfaceL2Tables{} }
   883  func (*ClassifySetInterfaceL2Tables) GetMessageName() string {
   884  	return "classify_set_interface_l2_tables"
   885  }
   886  func (*ClassifySetInterfaceL2Tables) GetCrcString() string { return "5a6ddf65" }
   887  func (*ClassifySetInterfaceL2Tables) GetMessageType() api.MessageType {
   888  	return api.RequestMessage
   889  }
   890  
   891  func (m *ClassifySetInterfaceL2Tables) Size() (size int) {
   892  	if m == nil {
   893  		return 0
   894  	}
   895  	size += 4 // m.SwIfIndex
   896  	size += 4 // m.IP4TableIndex
   897  	size += 4 // m.IP6TableIndex
   898  	size += 4 // m.OtherTableIndex
   899  	size += 1 // m.IsInput
   900  	return size
   901  }
   902  func (m *ClassifySetInterfaceL2Tables) Marshal(b []byte) ([]byte, error) {
   903  	if b == nil {
   904  		b = make([]byte, m.Size())
   905  	}
   906  	buf := codec.NewBuffer(b)
   907  	buf.EncodeUint32(uint32(m.SwIfIndex))
   908  	buf.EncodeUint32(m.IP4TableIndex)
   909  	buf.EncodeUint32(m.IP6TableIndex)
   910  	buf.EncodeUint32(m.OtherTableIndex)
   911  	buf.EncodeBool(m.IsInput)
   912  	return buf.Bytes(), nil
   913  }
   914  func (m *ClassifySetInterfaceL2Tables) Unmarshal(b []byte) error {
   915  	buf := codec.NewBuffer(b)
   916  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   917  	m.IP4TableIndex = buf.DecodeUint32()
   918  	m.IP6TableIndex = buf.DecodeUint32()
   919  	m.OtherTableIndex = buf.DecodeUint32()
   920  	m.IsInput = buf.DecodeBool()
   921  	return nil
   922  }
   923  
   924  // ClassifySetInterfaceL2TablesReply defines message 'classify_set_interface_l2_tables_reply'.
   925  type ClassifySetInterfaceL2TablesReply struct {
   926  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
   927  }
   928  
   929  func (m *ClassifySetInterfaceL2TablesReply) Reset() { *m = ClassifySetInterfaceL2TablesReply{} }
   930  func (*ClassifySetInterfaceL2TablesReply) GetMessageName() string {
   931  	return "classify_set_interface_l2_tables_reply"
   932  }
   933  func (*ClassifySetInterfaceL2TablesReply) GetCrcString() string { return "e8d4e804" }
   934  func (*ClassifySetInterfaceL2TablesReply) GetMessageType() api.MessageType {
   935  	return api.ReplyMessage
   936  }
   937  
   938  func (m *ClassifySetInterfaceL2TablesReply) Size() (size int) {
   939  	if m == nil {
   940  		return 0
   941  	}
   942  	size += 4 // m.Retval
   943  	return size
   944  }
   945  func (m *ClassifySetInterfaceL2TablesReply) Marshal(b []byte) ([]byte, error) {
   946  	if b == nil {
   947  		b = make([]byte, m.Size())
   948  	}
   949  	buf := codec.NewBuffer(b)
   950  	buf.EncodeInt32(m.Retval)
   951  	return buf.Bytes(), nil
   952  }
   953  func (m *ClassifySetInterfaceL2TablesReply) Unmarshal(b []byte) error {
   954  	buf := codec.NewBuffer(b)
   955  	m.Retval = buf.DecodeInt32()
   956  	return nil
   957  }
   958  
   959  // Classify table ids by interface index request
   960  //   - sw_if_index - index of the interface
   961  //
   962  // ClassifyTableByInterface defines message 'classify_table_by_interface'.
   963  type ClassifyTableByInterface struct {
   964  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
   965  }
   966  
   967  func (m *ClassifyTableByInterface) Reset()               { *m = ClassifyTableByInterface{} }
   968  func (*ClassifyTableByInterface) GetMessageName() string { return "classify_table_by_interface" }
   969  func (*ClassifyTableByInterface) GetCrcString() string   { return "f9e6675e" }
   970  func (*ClassifyTableByInterface) GetMessageType() api.MessageType {
   971  	return api.RequestMessage
   972  }
   973  
   974  func (m *ClassifyTableByInterface) Size() (size int) {
   975  	if m == nil {
   976  		return 0
   977  	}
   978  	size += 4 // m.SwIfIndex
   979  	return size
   980  }
   981  func (m *ClassifyTableByInterface) Marshal(b []byte) ([]byte, error) {
   982  	if b == nil {
   983  		b = make([]byte, m.Size())
   984  	}
   985  	buf := codec.NewBuffer(b)
   986  	buf.EncodeUint32(uint32(m.SwIfIndex))
   987  	return buf.Bytes(), nil
   988  }
   989  func (m *ClassifyTableByInterface) Unmarshal(b []byte) error {
   990  	buf := codec.NewBuffer(b)
   991  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
   992  	return nil
   993  }
   994  
   995  // Reply for classify table id by interface index request
   996  //   - count - number of ids returned in response
   997  //   - sw_if_index - index of the interface
   998  //   - l2_table_id - l2 classify table index
   999  //   - ip4_table_id - ip4 classify table index
  1000  //   - ip6_table_id - ip6 classify table index
  1001  //
  1002  // ClassifyTableByInterfaceReply defines message 'classify_table_by_interface_reply'.
  1003  type ClassifyTableByInterfaceReply struct {
  1004  	Retval     int32                          `binapi:"i32,name=retval" json:"retval,omitempty"`
  1005  	SwIfIndex  interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
  1006  	L2TableID  uint32                         `binapi:"u32,name=l2_table_id" json:"l2_table_id,omitempty"`
  1007  	IP4TableID uint32                         `binapi:"u32,name=ip4_table_id" json:"ip4_table_id,omitempty"`
  1008  	IP6TableID uint32                         `binapi:"u32,name=ip6_table_id" json:"ip6_table_id,omitempty"`
  1009  }
  1010  
  1011  func (m *ClassifyTableByInterfaceReply) Reset() { *m = ClassifyTableByInterfaceReply{} }
  1012  func (*ClassifyTableByInterfaceReply) GetMessageName() string {
  1013  	return "classify_table_by_interface_reply"
  1014  }
  1015  func (*ClassifyTableByInterfaceReply) GetCrcString() string { return "ed4197db" }
  1016  func (*ClassifyTableByInterfaceReply) GetMessageType() api.MessageType {
  1017  	return api.ReplyMessage
  1018  }
  1019  
  1020  func (m *ClassifyTableByInterfaceReply) Size() (size int) {
  1021  	if m == nil {
  1022  		return 0
  1023  	}
  1024  	size += 4 // m.Retval
  1025  	size += 4 // m.SwIfIndex
  1026  	size += 4 // m.L2TableID
  1027  	size += 4 // m.IP4TableID
  1028  	size += 4 // m.IP6TableID
  1029  	return size
  1030  }
  1031  func (m *ClassifyTableByInterfaceReply) Marshal(b []byte) ([]byte, error) {
  1032  	if b == nil {
  1033  		b = make([]byte, m.Size())
  1034  	}
  1035  	buf := codec.NewBuffer(b)
  1036  	buf.EncodeInt32(m.Retval)
  1037  	buf.EncodeUint32(uint32(m.SwIfIndex))
  1038  	buf.EncodeUint32(m.L2TableID)
  1039  	buf.EncodeUint32(m.IP4TableID)
  1040  	buf.EncodeUint32(m.IP6TableID)
  1041  	return buf.Bytes(), nil
  1042  }
  1043  func (m *ClassifyTableByInterfaceReply) Unmarshal(b []byte) error {
  1044  	buf := codec.NewBuffer(b)
  1045  	m.Retval = buf.DecodeInt32()
  1046  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
  1047  	m.L2TableID = buf.DecodeUint32()
  1048  	m.IP4TableID = buf.DecodeUint32()
  1049  	m.IP6TableID = buf.DecodeUint32()
  1050  	return nil
  1051  }
  1052  
  1053  // Classify get table IDs request
  1054  // ClassifyTableIds defines message 'classify_table_ids'.
  1055  type ClassifyTableIds struct{}
  1056  
  1057  func (m *ClassifyTableIds) Reset()               { *m = ClassifyTableIds{} }
  1058  func (*ClassifyTableIds) GetMessageName() string { return "classify_table_ids" }
  1059  func (*ClassifyTableIds) GetCrcString() string   { return "51077d14" }
  1060  func (*ClassifyTableIds) GetMessageType() api.MessageType {
  1061  	return api.RequestMessage
  1062  }
  1063  
  1064  func (m *ClassifyTableIds) Size() (size int) {
  1065  	if m == nil {
  1066  		return 0
  1067  	}
  1068  	return size
  1069  }
  1070  func (m *ClassifyTableIds) Marshal(b []byte) ([]byte, error) {
  1071  	if b == nil {
  1072  		b = make([]byte, m.Size())
  1073  	}
  1074  	buf := codec.NewBuffer(b)
  1075  	return buf.Bytes(), nil
  1076  }
  1077  func (m *ClassifyTableIds) Unmarshal(b []byte) error {
  1078  	return nil
  1079  }
  1080  
  1081  // Reply for classify get table IDs request
  1082  //   - count - number of ids returned in response
  1083  //   - ids - array of classify table ids
  1084  //
  1085  // ClassifyTableIdsReply defines message 'classify_table_ids_reply'.
  1086  type ClassifyTableIdsReply struct {
  1087  	Retval int32    `binapi:"i32,name=retval" json:"retval,omitempty"`
  1088  	Count  uint32   `binapi:"u32,name=count" json:"-"`
  1089  	Ids    []uint32 `binapi:"u32[count],name=ids" json:"ids,omitempty"`
  1090  }
  1091  
  1092  func (m *ClassifyTableIdsReply) Reset()               { *m = ClassifyTableIdsReply{} }
  1093  func (*ClassifyTableIdsReply) GetMessageName() string { return "classify_table_ids_reply" }
  1094  func (*ClassifyTableIdsReply) GetCrcString() string   { return "d1d20e1d" }
  1095  func (*ClassifyTableIdsReply) GetMessageType() api.MessageType {
  1096  	return api.ReplyMessage
  1097  }
  1098  
  1099  func (m *ClassifyTableIdsReply) Size() (size int) {
  1100  	if m == nil {
  1101  		return 0
  1102  	}
  1103  	size += 4              // m.Retval
  1104  	size += 4              // m.Count
  1105  	size += 4 * len(m.Ids) // m.Ids
  1106  	return size
  1107  }
  1108  func (m *ClassifyTableIdsReply) Marshal(b []byte) ([]byte, error) {
  1109  	if b == nil {
  1110  		b = make([]byte, m.Size())
  1111  	}
  1112  	buf := codec.NewBuffer(b)
  1113  	buf.EncodeInt32(m.Retval)
  1114  	buf.EncodeUint32(uint32(len(m.Ids)))
  1115  	for i := 0; i < len(m.Ids); i++ {
  1116  		var x uint32
  1117  		if i < len(m.Ids) {
  1118  			x = uint32(m.Ids[i])
  1119  		}
  1120  		buf.EncodeUint32(x)
  1121  	}
  1122  	return buf.Bytes(), nil
  1123  }
  1124  func (m *ClassifyTableIdsReply) Unmarshal(b []byte) error {
  1125  	buf := codec.NewBuffer(b)
  1126  	m.Retval = buf.DecodeInt32()
  1127  	m.Count = buf.DecodeUint32()
  1128  	m.Ids = make([]uint32, m.Count)
  1129  	for i := 0; i < len(m.Ids); i++ {
  1130  		m.Ids[i] = buf.DecodeUint32()
  1131  	}
  1132  	return nil
  1133  }
  1134  
  1135  // Classify table info
  1136  //   - table_id - classify table index
  1137  //
  1138  // ClassifyTableInfo defines message 'classify_table_info'.
  1139  type ClassifyTableInfo struct {
  1140  	TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
  1141  }
  1142  
  1143  func (m *ClassifyTableInfo) Reset()               { *m = ClassifyTableInfo{} }
  1144  func (*ClassifyTableInfo) GetMessageName() string { return "classify_table_info" }
  1145  func (*ClassifyTableInfo) GetCrcString() string   { return "0cca2cd9" }
  1146  func (*ClassifyTableInfo) GetMessageType() api.MessageType {
  1147  	return api.RequestMessage
  1148  }
  1149  
  1150  func (m *ClassifyTableInfo) Size() (size int) {
  1151  	if m == nil {
  1152  		return 0
  1153  	}
  1154  	size += 4 // m.TableID
  1155  	return size
  1156  }
  1157  func (m *ClassifyTableInfo) Marshal(b []byte) ([]byte, error) {
  1158  	if b == nil {
  1159  		b = make([]byte, m.Size())
  1160  	}
  1161  	buf := codec.NewBuffer(b)
  1162  	buf.EncodeUint32(m.TableID)
  1163  	return buf.Bytes(), nil
  1164  }
  1165  func (m *ClassifyTableInfo) Unmarshal(b []byte) error {
  1166  	buf := codec.NewBuffer(b)
  1167  	m.TableID = buf.DecodeUint32()
  1168  	return nil
  1169  }
  1170  
  1171  // Reply for classify table info request
  1172  //   - count - number of ids returned in response
  1173  //   - table_id - classify table index
  1174  //   - nbuckets - number of buckets when adding a table
  1175  //   - match_n_vectors - number of match vectors
  1176  //   - skip_n_vectors - number of skip_n_vectors
  1177  //   - active_sessions - number of sessions (active entries)
  1178  //   - next_table_index - index of next table
  1179  //   - miss_next_index - index of miss table
  1180  //   - mask[] - match mask
  1181  //
  1182  // ClassifyTableInfoReply defines message 'classify_table_info_reply'.
  1183  type ClassifyTableInfoReply struct {
  1184  	Retval         int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
  1185  	TableID        uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
  1186  	Nbuckets       uint32 `binapi:"u32,name=nbuckets" json:"nbuckets,omitempty"`
  1187  	MatchNVectors  uint32 `binapi:"u32,name=match_n_vectors" json:"match_n_vectors,omitempty"`
  1188  	SkipNVectors   uint32 `binapi:"u32,name=skip_n_vectors" json:"skip_n_vectors,omitempty"`
  1189  	ActiveSessions uint32 `binapi:"u32,name=active_sessions" json:"active_sessions,omitempty"`
  1190  	NextTableIndex uint32 `binapi:"u32,name=next_table_index" json:"next_table_index,omitempty"`
  1191  	MissNextIndex  uint32 `binapi:"u32,name=miss_next_index" json:"miss_next_index,omitempty"`
  1192  	MaskLength     uint32 `binapi:"u32,name=mask_length" json:"-"`
  1193  	Mask           []byte `binapi:"u8[mask_length],name=mask" json:"mask,omitempty"`
  1194  }
  1195  
  1196  func (m *ClassifyTableInfoReply) Reset()               { *m = ClassifyTableInfoReply{} }
  1197  func (*ClassifyTableInfoReply) GetMessageName() string { return "classify_table_info_reply" }
  1198  func (*ClassifyTableInfoReply) GetCrcString() string   { return "4a573c0e" }
  1199  func (*ClassifyTableInfoReply) GetMessageType() api.MessageType {
  1200  	return api.ReplyMessage
  1201  }
  1202  
  1203  func (m *ClassifyTableInfoReply) Size() (size int) {
  1204  	if m == nil {
  1205  		return 0
  1206  	}
  1207  	size += 4               // m.Retval
  1208  	size += 4               // m.TableID
  1209  	size += 4               // m.Nbuckets
  1210  	size += 4               // m.MatchNVectors
  1211  	size += 4               // m.SkipNVectors
  1212  	size += 4               // m.ActiveSessions
  1213  	size += 4               // m.NextTableIndex
  1214  	size += 4               // m.MissNextIndex
  1215  	size += 4               // m.MaskLength
  1216  	size += 1 * len(m.Mask) // m.Mask
  1217  	return size
  1218  }
  1219  func (m *ClassifyTableInfoReply) Marshal(b []byte) ([]byte, error) {
  1220  	if b == nil {
  1221  		b = make([]byte, m.Size())
  1222  	}
  1223  	buf := codec.NewBuffer(b)
  1224  	buf.EncodeInt32(m.Retval)
  1225  	buf.EncodeUint32(m.TableID)
  1226  	buf.EncodeUint32(m.Nbuckets)
  1227  	buf.EncodeUint32(m.MatchNVectors)
  1228  	buf.EncodeUint32(m.SkipNVectors)
  1229  	buf.EncodeUint32(m.ActiveSessions)
  1230  	buf.EncodeUint32(m.NextTableIndex)
  1231  	buf.EncodeUint32(m.MissNextIndex)
  1232  	buf.EncodeUint32(uint32(len(m.Mask)))
  1233  	buf.EncodeBytes(m.Mask, 0)
  1234  	return buf.Bytes(), nil
  1235  }
  1236  func (m *ClassifyTableInfoReply) Unmarshal(b []byte) error {
  1237  	buf := codec.NewBuffer(b)
  1238  	m.Retval = buf.DecodeInt32()
  1239  	m.TableID = buf.DecodeUint32()
  1240  	m.Nbuckets = buf.DecodeUint32()
  1241  	m.MatchNVectors = buf.DecodeUint32()
  1242  	m.SkipNVectors = buf.DecodeUint32()
  1243  	m.ActiveSessions = buf.DecodeUint32()
  1244  	m.NextTableIndex = buf.DecodeUint32()
  1245  	m.MissNextIndex = buf.DecodeUint32()
  1246  	m.MaskLength = buf.DecodeUint32()
  1247  	m.Mask = make([]byte, m.MaskLength)
  1248  	copy(m.Mask, buf.DecodeBytes(len(m.Mask)))
  1249  	return nil
  1250  }
  1251  
  1252  // Classify get the Trace table indices
  1253  // ClassifyTraceGetTables defines message 'classify_trace_get_tables'.
  1254  type ClassifyTraceGetTables struct{}
  1255  
  1256  func (m *ClassifyTraceGetTables) Reset()               { *m = ClassifyTraceGetTables{} }
  1257  func (*ClassifyTraceGetTables) GetMessageName() string { return "classify_trace_get_tables" }
  1258  func (*ClassifyTraceGetTables) GetCrcString() string   { return "51077d14" }
  1259  func (*ClassifyTraceGetTables) GetMessageType() api.MessageType {
  1260  	return api.RequestMessage
  1261  }
  1262  
  1263  func (m *ClassifyTraceGetTables) Size() (size int) {
  1264  	if m == nil {
  1265  		return 0
  1266  	}
  1267  	return size
  1268  }
  1269  func (m *ClassifyTraceGetTables) Marshal(b []byte) ([]byte, error) {
  1270  	if b == nil {
  1271  		b = make([]byte, m.Size())
  1272  	}
  1273  	buf := codec.NewBuffer(b)
  1274  	return buf.Bytes(), nil
  1275  }
  1276  func (m *ClassifyTraceGetTables) Unmarshal(b []byte) error {
  1277  	return nil
  1278  }
  1279  
  1280  // Classify get the Trace tables response
  1281  //   - retval - return code for the request
  1282  //   - count - number of ids returned in response
  1283  //   - indices - array of classify table indices
  1284  //
  1285  // ClassifyTraceGetTablesReply defines message 'classify_trace_get_tables_reply'.
  1286  type ClassifyTraceGetTablesReply struct {
  1287  	Retval  int32    `binapi:"i32,name=retval" json:"retval,omitempty"`
  1288  	Count   uint32   `binapi:"u32,name=count" json:"-"`
  1289  	Indices []uint32 `binapi:"u32[count],name=indices" json:"indices,omitempty"`
  1290  }
  1291  
  1292  func (m *ClassifyTraceGetTablesReply) Reset()               { *m = ClassifyTraceGetTablesReply{} }
  1293  func (*ClassifyTraceGetTablesReply) GetMessageName() string { return "classify_trace_get_tables_reply" }
  1294  func (*ClassifyTraceGetTablesReply) GetCrcString() string   { return "5f5bc9e6" }
  1295  func (*ClassifyTraceGetTablesReply) GetMessageType() api.MessageType {
  1296  	return api.ReplyMessage
  1297  }
  1298  
  1299  func (m *ClassifyTraceGetTablesReply) Size() (size int) {
  1300  	if m == nil {
  1301  		return 0
  1302  	}
  1303  	size += 4                  // m.Retval
  1304  	size += 4                  // m.Count
  1305  	size += 4 * len(m.Indices) // m.Indices
  1306  	return size
  1307  }
  1308  func (m *ClassifyTraceGetTablesReply) Marshal(b []byte) ([]byte, error) {
  1309  	if b == nil {
  1310  		b = make([]byte, m.Size())
  1311  	}
  1312  	buf := codec.NewBuffer(b)
  1313  	buf.EncodeInt32(m.Retval)
  1314  	buf.EncodeUint32(uint32(len(m.Indices)))
  1315  	for i := 0; i < len(m.Indices); i++ {
  1316  		var x uint32
  1317  		if i < len(m.Indices) {
  1318  			x = uint32(m.Indices[i])
  1319  		}
  1320  		buf.EncodeUint32(x)
  1321  	}
  1322  	return buf.Bytes(), nil
  1323  }
  1324  func (m *ClassifyTraceGetTablesReply) Unmarshal(b []byte) error {
  1325  	buf := codec.NewBuffer(b)
  1326  	m.Retval = buf.DecodeInt32()
  1327  	m.Count = buf.DecodeUint32()
  1328  	m.Indices = make([]uint32, m.Count)
  1329  	for i := 0; i < len(m.Indices); i++ {
  1330  		m.Indices[i] = buf.DecodeUint32()
  1331  	}
  1332  	return nil
  1333  }
  1334  
  1335  // Find a mask-compatible Classify table in the Trace chain
  1336  //   - skip_n_vectors - number of u32x4 skip vectors
  1337  //   - match_n_vectors - number of u32x4 vectors, 1..5
  1338  //   - mask_len - length of mask, match_n_vectors * sizeof(u32x4)
  1339  //   - mask - match mask
  1340  //
  1341  // ClassifyTraceLookupTable defines message 'classify_trace_lookup_table'.
  1342  type ClassifyTraceLookupTable struct {
  1343  	SkipNVectors  uint32 `binapi:"u32,name=skip_n_vectors,default=0" json:"skip_n_vectors,omitempty"`
  1344  	MatchNVectors uint32 `binapi:"u32,name=match_n_vectors,default=1" json:"match_n_vectors,omitempty"`
  1345  	MaskLen       uint32 `binapi:"u32,name=mask_len" json:"-"`
  1346  	Mask          []byte `binapi:"u8[mask_len],name=mask" json:"mask,omitempty"`
  1347  }
  1348  
  1349  func (m *ClassifyTraceLookupTable) Reset()               { *m = ClassifyTraceLookupTable{} }
  1350  func (*ClassifyTraceLookupTable) GetMessageName() string { return "classify_trace_lookup_table" }
  1351  func (*ClassifyTraceLookupTable) GetCrcString() string   { return "3f7b72e4" }
  1352  func (*ClassifyTraceLookupTable) GetMessageType() api.MessageType {
  1353  	return api.RequestMessage
  1354  }
  1355  
  1356  func (m *ClassifyTraceLookupTable) Size() (size int) {
  1357  	if m == nil {
  1358  		return 0
  1359  	}
  1360  	size += 4               // m.SkipNVectors
  1361  	size += 4               // m.MatchNVectors
  1362  	size += 4               // m.MaskLen
  1363  	size += 1 * len(m.Mask) // m.Mask
  1364  	return size
  1365  }
  1366  func (m *ClassifyTraceLookupTable) Marshal(b []byte) ([]byte, error) {
  1367  	if b == nil {
  1368  		b = make([]byte, m.Size())
  1369  	}
  1370  	buf := codec.NewBuffer(b)
  1371  	buf.EncodeUint32(m.SkipNVectors)
  1372  	buf.EncodeUint32(m.MatchNVectors)
  1373  	buf.EncodeUint32(uint32(len(m.Mask)))
  1374  	buf.EncodeBytes(m.Mask, 0)
  1375  	return buf.Bytes(), nil
  1376  }
  1377  func (m *ClassifyTraceLookupTable) Unmarshal(b []byte) error {
  1378  	buf := codec.NewBuffer(b)
  1379  	m.SkipNVectors = buf.DecodeUint32()
  1380  	m.MatchNVectors = buf.DecodeUint32()
  1381  	m.MaskLen = buf.DecodeUint32()
  1382  	m.Mask = make([]byte, m.MaskLen)
  1383  	copy(m.Mask, buf.DecodeBytes(len(m.Mask)))
  1384  	return nil
  1385  }
  1386  
  1387  // Classify trace table lookup response
  1388  //   - retval - return code for the table lookup request
  1389  //   - table_index - returned index of the found table, or ~0
  1390  //
  1391  // ClassifyTraceLookupTableReply defines message 'classify_trace_lookup_table_reply'.
  1392  type ClassifyTraceLookupTableReply struct {
  1393  	Retval     int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
  1394  	TableIndex uint32 `binapi:"u32,name=table_index" json:"table_index,omitempty"`
  1395  }
  1396  
  1397  func (m *ClassifyTraceLookupTableReply) Reset() { *m = ClassifyTraceLookupTableReply{} }
  1398  func (*ClassifyTraceLookupTableReply) GetMessageName() string {
  1399  	return "classify_trace_lookup_table_reply"
  1400  }
  1401  func (*ClassifyTraceLookupTableReply) GetCrcString() string { return "9c6c6773" }
  1402  func (*ClassifyTraceLookupTableReply) GetMessageType() api.MessageType {
  1403  	return api.ReplyMessage
  1404  }
  1405  
  1406  func (m *ClassifyTraceLookupTableReply) Size() (size int) {
  1407  	if m == nil {
  1408  		return 0
  1409  	}
  1410  	size += 4 // m.Retval
  1411  	size += 4 // m.TableIndex
  1412  	return size
  1413  }
  1414  func (m *ClassifyTraceLookupTableReply) Marshal(b []byte) ([]byte, error) {
  1415  	if b == nil {
  1416  		b = make([]byte, m.Size())
  1417  	}
  1418  	buf := codec.NewBuffer(b)
  1419  	buf.EncodeInt32(m.Retval)
  1420  	buf.EncodeUint32(m.TableIndex)
  1421  	return buf.Bytes(), nil
  1422  }
  1423  func (m *ClassifyTraceLookupTableReply) Unmarshal(b []byte) error {
  1424  	buf := codec.NewBuffer(b)
  1425  	m.Retval = buf.DecodeInt32()
  1426  	m.TableIndex = buf.DecodeUint32()
  1427  	return nil
  1428  }
  1429  
  1430  // Add a Classify table into the Trace chain
  1431  //   - table_index - Classify table to be added
  1432  //   - sort_masks - 1=sort masks into most-to-least specific order
  1433  //
  1434  // ClassifyTraceSetTable defines message 'classify_trace_set_table'.
  1435  type ClassifyTraceSetTable struct {
  1436  	TableIndex uint32 `binapi:"u32,name=table_index,default=4294967295" json:"table_index,omitempty"`
  1437  	SortMasks  bool   `binapi:"bool,name=sort_masks,default=0" json:"sort_masks,omitempty"`
  1438  }
  1439  
  1440  func (m *ClassifyTraceSetTable) Reset()               { *m = ClassifyTraceSetTable{} }
  1441  func (*ClassifyTraceSetTable) GetMessageName() string { return "classify_trace_set_table" }
  1442  func (*ClassifyTraceSetTable) GetCrcString() string   { return "3909b55a" }
  1443  func (*ClassifyTraceSetTable) GetMessageType() api.MessageType {
  1444  	return api.RequestMessage
  1445  }
  1446  
  1447  func (m *ClassifyTraceSetTable) Size() (size int) {
  1448  	if m == nil {
  1449  		return 0
  1450  	}
  1451  	size += 4 // m.TableIndex
  1452  	size += 1 // m.SortMasks
  1453  	return size
  1454  }
  1455  func (m *ClassifyTraceSetTable) Marshal(b []byte) ([]byte, error) {
  1456  	if b == nil {
  1457  		b = make([]byte, m.Size())
  1458  	}
  1459  	buf := codec.NewBuffer(b)
  1460  	buf.EncodeUint32(m.TableIndex)
  1461  	buf.EncodeBool(m.SortMasks)
  1462  	return buf.Bytes(), nil
  1463  }
  1464  func (m *ClassifyTraceSetTable) Unmarshal(b []byte) error {
  1465  	buf := codec.NewBuffer(b)
  1466  	m.TableIndex = buf.DecodeUint32()
  1467  	m.SortMasks = buf.DecodeBool()
  1468  	return nil
  1469  }
  1470  
  1471  // Classify Trace table lookup response
  1472  //   - retval - return code for the table lookup request
  1473  //   - table_index - returned index of the sorted table chain
  1474  //
  1475  // ClassifyTraceSetTableReply defines message 'classify_trace_set_table_reply'.
  1476  type ClassifyTraceSetTableReply struct {
  1477  	Retval     int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
  1478  	TableIndex uint32 `binapi:"u32,name=table_index" json:"table_index,omitempty"`
  1479  }
  1480  
  1481  func (m *ClassifyTraceSetTableReply) Reset()               { *m = ClassifyTraceSetTableReply{} }
  1482  func (*ClassifyTraceSetTableReply) GetMessageName() string { return "classify_trace_set_table_reply" }
  1483  func (*ClassifyTraceSetTableReply) GetCrcString() string   { return "9c6c6773" }
  1484  func (*ClassifyTraceSetTableReply) GetMessageType() api.MessageType {
  1485  	return api.ReplyMessage
  1486  }
  1487  
  1488  func (m *ClassifyTraceSetTableReply) Size() (size int) {
  1489  	if m == nil {
  1490  		return 0
  1491  	}
  1492  	size += 4 // m.Retval
  1493  	size += 4 // m.TableIndex
  1494  	return size
  1495  }
  1496  func (m *ClassifyTraceSetTableReply) Marshal(b []byte) ([]byte, error) {
  1497  	if b == nil {
  1498  		b = make([]byte, m.Size())
  1499  	}
  1500  	buf := codec.NewBuffer(b)
  1501  	buf.EncodeInt32(m.Retval)
  1502  	buf.EncodeUint32(m.TableIndex)
  1503  	return buf.Bytes(), nil
  1504  }
  1505  func (m *ClassifyTraceSetTableReply) Unmarshal(b []byte) error {
  1506  	buf := codec.NewBuffer(b)
  1507  	m.Retval = buf.DecodeInt32()
  1508  	m.TableIndex = buf.DecodeUint32()
  1509  	return nil
  1510  }
  1511  
  1512  // Flow classify operational state response.
  1513  //   - sw_if_index - software interface index
  1514  //   - table_index - classify table index
  1515  //
  1516  // FlowClassifyDetails defines message 'flow_classify_details'.
  1517  type FlowClassifyDetails struct {
  1518  	SwIfIndex  interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
  1519  	TableIndex uint32                         `binapi:"u32,name=table_index" json:"table_index,omitempty"`
  1520  }
  1521  
  1522  func (m *FlowClassifyDetails) Reset()               { *m = FlowClassifyDetails{} }
  1523  func (*FlowClassifyDetails) GetMessageName() string { return "flow_classify_details" }
  1524  func (*FlowClassifyDetails) GetCrcString() string   { return "dfd08765" }
  1525  func (*FlowClassifyDetails) GetMessageType() api.MessageType {
  1526  	return api.ReplyMessage
  1527  }
  1528  
  1529  func (m *FlowClassifyDetails) Size() (size int) {
  1530  	if m == nil {
  1531  		return 0
  1532  	}
  1533  	size += 4 // m.SwIfIndex
  1534  	size += 4 // m.TableIndex
  1535  	return size
  1536  }
  1537  func (m *FlowClassifyDetails) Marshal(b []byte) ([]byte, error) {
  1538  	if b == nil {
  1539  		b = make([]byte, m.Size())
  1540  	}
  1541  	buf := codec.NewBuffer(b)
  1542  	buf.EncodeUint32(uint32(m.SwIfIndex))
  1543  	buf.EncodeUint32(m.TableIndex)
  1544  	return buf.Bytes(), nil
  1545  }
  1546  func (m *FlowClassifyDetails) Unmarshal(b []byte) error {
  1547  	buf := codec.NewBuffer(b)
  1548  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
  1549  	m.TableIndex = buf.DecodeUint32()
  1550  	return nil
  1551  }
  1552  
  1553  // Get list of flow classify interfaces and tables
  1554  //   - type - flow classify table type
  1555  //   - sw_if_index - filter on sw_if_index
  1556  //
  1557  // FlowClassifyDump defines message 'flow_classify_dump'.
  1558  type FlowClassifyDump struct {
  1559  	Type      FlowClassifyTable              `binapi:"flow_classify_table,name=type" json:"type,omitempty"`
  1560  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
  1561  }
  1562  
  1563  func (m *FlowClassifyDump) Reset()               { *m = FlowClassifyDump{} }
  1564  func (*FlowClassifyDump) GetMessageName() string { return "flow_classify_dump" }
  1565  func (*FlowClassifyDump) GetCrcString() string   { return "25dd3e4c" }
  1566  func (*FlowClassifyDump) GetMessageType() api.MessageType {
  1567  	return api.RequestMessage
  1568  }
  1569  
  1570  func (m *FlowClassifyDump) Size() (size int) {
  1571  	if m == nil {
  1572  		return 0
  1573  	}
  1574  	size += 1 // m.Type
  1575  	size += 4 // m.SwIfIndex
  1576  	return size
  1577  }
  1578  func (m *FlowClassifyDump) Marshal(b []byte) ([]byte, error) {
  1579  	if b == nil {
  1580  		b = make([]byte, m.Size())
  1581  	}
  1582  	buf := codec.NewBuffer(b)
  1583  	buf.EncodeUint8(uint8(m.Type))
  1584  	buf.EncodeUint32(uint32(m.SwIfIndex))
  1585  	return buf.Bytes(), nil
  1586  }
  1587  func (m *FlowClassifyDump) Unmarshal(b []byte) error {
  1588  	buf := codec.NewBuffer(b)
  1589  	m.Type = FlowClassifyTable(buf.DecodeUint8())
  1590  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
  1591  	return nil
  1592  }
  1593  
  1594  // Set/unset flow classify interface
  1595  //   - sw_if_index - interface to set/unset flow classify
  1596  //   - ip4_table_index - ip4 classify table index (~0 for skip)
  1597  //   - ip6_table_index - ip6 classify table index (~0 for skip)
  1598  //   - l2_table_index  -  l2 classify table index (~0 for skip)
  1599  //   - is_add - Set if non-zero, else unset
  1600  //     Note: User is recommended to use just one valid table_index per call.
  1601  //     (ip4_table_index, ip6_table_index, or l2_table_index)
  1602  //
  1603  // FlowClassifySetInterface defines message 'flow_classify_set_interface'.
  1604  type FlowClassifySetInterface struct {
  1605  	SwIfIndex     interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
  1606  	IP4TableIndex uint32                         `binapi:"u32,name=ip4_table_index" json:"ip4_table_index,omitempty"`
  1607  	IP6TableIndex uint32                         `binapi:"u32,name=ip6_table_index" json:"ip6_table_index,omitempty"`
  1608  	IsAdd         bool                           `binapi:"bool,name=is_add" json:"is_add,omitempty"`
  1609  }
  1610  
  1611  func (m *FlowClassifySetInterface) Reset()               { *m = FlowClassifySetInterface{} }
  1612  func (*FlowClassifySetInterface) GetMessageName() string { return "flow_classify_set_interface" }
  1613  func (*FlowClassifySetInterface) GetCrcString() string   { return "b6192f1c" }
  1614  func (*FlowClassifySetInterface) GetMessageType() api.MessageType {
  1615  	return api.RequestMessage
  1616  }
  1617  
  1618  func (m *FlowClassifySetInterface) Size() (size int) {
  1619  	if m == nil {
  1620  		return 0
  1621  	}
  1622  	size += 4 // m.SwIfIndex
  1623  	size += 4 // m.IP4TableIndex
  1624  	size += 4 // m.IP6TableIndex
  1625  	size += 1 // m.IsAdd
  1626  	return size
  1627  }
  1628  func (m *FlowClassifySetInterface) Marshal(b []byte) ([]byte, error) {
  1629  	if b == nil {
  1630  		b = make([]byte, m.Size())
  1631  	}
  1632  	buf := codec.NewBuffer(b)
  1633  	buf.EncodeUint32(uint32(m.SwIfIndex))
  1634  	buf.EncodeUint32(m.IP4TableIndex)
  1635  	buf.EncodeUint32(m.IP6TableIndex)
  1636  	buf.EncodeBool(m.IsAdd)
  1637  	return buf.Bytes(), nil
  1638  }
  1639  func (m *FlowClassifySetInterface) Unmarshal(b []byte) error {
  1640  	buf := codec.NewBuffer(b)
  1641  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
  1642  	m.IP4TableIndex = buf.DecodeUint32()
  1643  	m.IP6TableIndex = buf.DecodeUint32()
  1644  	m.IsAdd = buf.DecodeBool()
  1645  	return nil
  1646  }
  1647  
  1648  // FlowClassifySetInterfaceReply defines message 'flow_classify_set_interface_reply'.
  1649  type FlowClassifySetInterfaceReply struct {
  1650  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
  1651  }
  1652  
  1653  func (m *FlowClassifySetInterfaceReply) Reset() { *m = FlowClassifySetInterfaceReply{} }
  1654  func (*FlowClassifySetInterfaceReply) GetMessageName() string {
  1655  	return "flow_classify_set_interface_reply"
  1656  }
  1657  func (*FlowClassifySetInterfaceReply) GetCrcString() string { return "e8d4e804" }
  1658  func (*FlowClassifySetInterfaceReply) GetMessageType() api.MessageType {
  1659  	return api.ReplyMessage
  1660  }
  1661  
  1662  func (m *FlowClassifySetInterfaceReply) Size() (size int) {
  1663  	if m == nil {
  1664  		return 0
  1665  	}
  1666  	size += 4 // m.Retval
  1667  	return size
  1668  }
  1669  func (m *FlowClassifySetInterfaceReply) Marshal(b []byte) ([]byte, error) {
  1670  	if b == nil {
  1671  		b = make([]byte, m.Size())
  1672  	}
  1673  	buf := codec.NewBuffer(b)
  1674  	buf.EncodeInt32(m.Retval)
  1675  	return buf.Bytes(), nil
  1676  }
  1677  func (m *FlowClassifySetInterfaceReply) Unmarshal(b []byte) error {
  1678  	buf := codec.NewBuffer(b)
  1679  	m.Retval = buf.DecodeInt32()
  1680  	return nil
  1681  }
  1682  
  1683  // Set/unset input ACL interface
  1684  //   - sw_if_index - interface to set/unset input ACL
  1685  //   - ip4_table_index - ip4 classify table index (~0 for skip)
  1686  //   - ip6_table_index - ip6 classify table index (~0 for skip)
  1687  //   - l2_table_index  -  l2 classify table index (~0 for skip)
  1688  //   - is_add - Set input ACL if non-zero, else unset
  1689  //     Note: User is recommended to use just one valid table_index per call.
  1690  //     (ip4_table_index, ip6_table_index, or l2_table_index)
  1691  //
  1692  // InputACLSetInterface defines message 'input_acl_set_interface'.
  1693  type InputACLSetInterface struct {
  1694  	SwIfIndex     interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
  1695  	IP4TableIndex uint32                         `binapi:"u32,name=ip4_table_index" json:"ip4_table_index,omitempty"`
  1696  	IP6TableIndex uint32                         `binapi:"u32,name=ip6_table_index" json:"ip6_table_index,omitempty"`
  1697  	L2TableIndex  uint32                         `binapi:"u32,name=l2_table_index" json:"l2_table_index,omitempty"`
  1698  	IsAdd         bool                           `binapi:"bool,name=is_add" json:"is_add,omitempty"`
  1699  }
  1700  
  1701  func (m *InputACLSetInterface) Reset()               { *m = InputACLSetInterface{} }
  1702  func (*InputACLSetInterface) GetMessageName() string { return "input_acl_set_interface" }
  1703  func (*InputACLSetInterface) GetCrcString() string   { return "de7ad708" }
  1704  func (*InputACLSetInterface) GetMessageType() api.MessageType {
  1705  	return api.RequestMessage
  1706  }
  1707  
  1708  func (m *InputACLSetInterface) Size() (size int) {
  1709  	if m == nil {
  1710  		return 0
  1711  	}
  1712  	size += 4 // m.SwIfIndex
  1713  	size += 4 // m.IP4TableIndex
  1714  	size += 4 // m.IP6TableIndex
  1715  	size += 4 // m.L2TableIndex
  1716  	size += 1 // m.IsAdd
  1717  	return size
  1718  }
  1719  func (m *InputACLSetInterface) Marshal(b []byte) ([]byte, error) {
  1720  	if b == nil {
  1721  		b = make([]byte, m.Size())
  1722  	}
  1723  	buf := codec.NewBuffer(b)
  1724  	buf.EncodeUint32(uint32(m.SwIfIndex))
  1725  	buf.EncodeUint32(m.IP4TableIndex)
  1726  	buf.EncodeUint32(m.IP6TableIndex)
  1727  	buf.EncodeUint32(m.L2TableIndex)
  1728  	buf.EncodeBool(m.IsAdd)
  1729  	return buf.Bytes(), nil
  1730  }
  1731  func (m *InputACLSetInterface) Unmarshal(b []byte) error {
  1732  	buf := codec.NewBuffer(b)
  1733  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
  1734  	m.IP4TableIndex = buf.DecodeUint32()
  1735  	m.IP6TableIndex = buf.DecodeUint32()
  1736  	m.L2TableIndex = buf.DecodeUint32()
  1737  	m.IsAdd = buf.DecodeBool()
  1738  	return nil
  1739  }
  1740  
  1741  // InputACLSetInterfaceReply defines message 'input_acl_set_interface_reply'.
  1742  type InputACLSetInterfaceReply struct {
  1743  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
  1744  }
  1745  
  1746  func (m *InputACLSetInterfaceReply) Reset()               { *m = InputACLSetInterfaceReply{} }
  1747  func (*InputACLSetInterfaceReply) GetMessageName() string { return "input_acl_set_interface_reply" }
  1748  func (*InputACLSetInterfaceReply) GetCrcString() string   { return "e8d4e804" }
  1749  func (*InputACLSetInterfaceReply) GetMessageType() api.MessageType {
  1750  	return api.ReplyMessage
  1751  }
  1752  
  1753  func (m *InputACLSetInterfaceReply) Size() (size int) {
  1754  	if m == nil {
  1755  		return 0
  1756  	}
  1757  	size += 4 // m.Retval
  1758  	return size
  1759  }
  1760  func (m *InputACLSetInterfaceReply) Marshal(b []byte) ([]byte, error) {
  1761  	if b == nil {
  1762  		b = make([]byte, m.Size())
  1763  	}
  1764  	buf := codec.NewBuffer(b)
  1765  	buf.EncodeInt32(m.Retval)
  1766  	return buf.Bytes(), nil
  1767  }
  1768  func (m *InputACLSetInterfaceReply) Unmarshal(b []byte) error {
  1769  	buf := codec.NewBuffer(b)
  1770  	m.Retval = buf.DecodeInt32()
  1771  	return nil
  1772  }
  1773  
  1774  // Set/unset output ACL interface
  1775  //   - sw_if_index - interface to set/unset output ACL
  1776  //   - ip4_table_index - ip4 classify table index (~0 for skip)
  1777  //   - ip6_table_index - ip6 classify table index (~0 for skip)
  1778  //   - l2_table_index  -  l2 classify table index (~0 for skip)
  1779  //   - is_add - Set output ACL if non-zero, else unset
  1780  //     Note: User is recommended to use just one valid table_index per call.
  1781  //     (ip4_table_index, ip6_table_index, or l2_table_index)
  1782  //
  1783  // OutputACLSetInterface defines message 'output_acl_set_interface'.
  1784  type OutputACLSetInterface struct {
  1785  	SwIfIndex     interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
  1786  	IP4TableIndex uint32                         `binapi:"u32,name=ip4_table_index" json:"ip4_table_index,omitempty"`
  1787  	IP6TableIndex uint32                         `binapi:"u32,name=ip6_table_index" json:"ip6_table_index,omitempty"`
  1788  	L2TableIndex  uint32                         `binapi:"u32,name=l2_table_index" json:"l2_table_index,omitempty"`
  1789  	IsAdd         bool                           `binapi:"bool,name=is_add" json:"is_add,omitempty"`
  1790  }
  1791  
  1792  func (m *OutputACLSetInterface) Reset()               { *m = OutputACLSetInterface{} }
  1793  func (*OutputACLSetInterface) GetMessageName() string { return "output_acl_set_interface" }
  1794  func (*OutputACLSetInterface) GetCrcString() string   { return "de7ad708" }
  1795  func (*OutputACLSetInterface) GetMessageType() api.MessageType {
  1796  	return api.RequestMessage
  1797  }
  1798  
  1799  func (m *OutputACLSetInterface) Size() (size int) {
  1800  	if m == nil {
  1801  		return 0
  1802  	}
  1803  	size += 4 // m.SwIfIndex
  1804  	size += 4 // m.IP4TableIndex
  1805  	size += 4 // m.IP6TableIndex
  1806  	size += 4 // m.L2TableIndex
  1807  	size += 1 // m.IsAdd
  1808  	return size
  1809  }
  1810  func (m *OutputACLSetInterface) Marshal(b []byte) ([]byte, error) {
  1811  	if b == nil {
  1812  		b = make([]byte, m.Size())
  1813  	}
  1814  	buf := codec.NewBuffer(b)
  1815  	buf.EncodeUint32(uint32(m.SwIfIndex))
  1816  	buf.EncodeUint32(m.IP4TableIndex)
  1817  	buf.EncodeUint32(m.IP6TableIndex)
  1818  	buf.EncodeUint32(m.L2TableIndex)
  1819  	buf.EncodeBool(m.IsAdd)
  1820  	return buf.Bytes(), nil
  1821  }
  1822  func (m *OutputACLSetInterface) Unmarshal(b []byte) error {
  1823  	buf := codec.NewBuffer(b)
  1824  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
  1825  	m.IP4TableIndex = buf.DecodeUint32()
  1826  	m.IP6TableIndex = buf.DecodeUint32()
  1827  	m.L2TableIndex = buf.DecodeUint32()
  1828  	m.IsAdd = buf.DecodeBool()
  1829  	return nil
  1830  }
  1831  
  1832  // OutputACLSetInterfaceReply defines message 'output_acl_set_interface_reply'.
  1833  type OutputACLSetInterfaceReply struct {
  1834  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
  1835  }
  1836  
  1837  func (m *OutputACLSetInterfaceReply) Reset()               { *m = OutputACLSetInterfaceReply{} }
  1838  func (*OutputACLSetInterfaceReply) GetMessageName() string { return "output_acl_set_interface_reply" }
  1839  func (*OutputACLSetInterfaceReply) GetCrcString() string   { return "e8d4e804" }
  1840  func (*OutputACLSetInterfaceReply) GetMessageType() api.MessageType {
  1841  	return api.ReplyMessage
  1842  }
  1843  
  1844  func (m *OutputACLSetInterfaceReply) Size() (size int) {
  1845  	if m == nil {
  1846  		return 0
  1847  	}
  1848  	size += 4 // m.Retval
  1849  	return size
  1850  }
  1851  func (m *OutputACLSetInterfaceReply) Marshal(b []byte) ([]byte, error) {
  1852  	if b == nil {
  1853  		b = make([]byte, m.Size())
  1854  	}
  1855  	buf := codec.NewBuffer(b)
  1856  	buf.EncodeInt32(m.Retval)
  1857  	return buf.Bytes(), nil
  1858  }
  1859  func (m *OutputACLSetInterfaceReply) Unmarshal(b []byte) error {
  1860  	buf := codec.NewBuffer(b)
  1861  	m.Retval = buf.DecodeInt32()
  1862  	return nil
  1863  }
  1864  
  1865  // Policer classify operational state response.
  1866  //   - sw_if_index - software interface index
  1867  //   - table_index - classify table index
  1868  //
  1869  // PolicerClassifyDetails defines message 'policer_classify_details'.
  1870  type PolicerClassifyDetails struct {
  1871  	SwIfIndex  interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
  1872  	TableIndex uint32                         `binapi:"u32,name=table_index" json:"table_index,omitempty"`
  1873  }
  1874  
  1875  func (m *PolicerClassifyDetails) Reset()               { *m = PolicerClassifyDetails{} }
  1876  func (*PolicerClassifyDetails) GetMessageName() string { return "policer_classify_details" }
  1877  func (*PolicerClassifyDetails) GetCrcString() string   { return "dfd08765" }
  1878  func (*PolicerClassifyDetails) GetMessageType() api.MessageType {
  1879  	return api.ReplyMessage
  1880  }
  1881  
  1882  func (m *PolicerClassifyDetails) Size() (size int) {
  1883  	if m == nil {
  1884  		return 0
  1885  	}
  1886  	size += 4 // m.SwIfIndex
  1887  	size += 4 // m.TableIndex
  1888  	return size
  1889  }
  1890  func (m *PolicerClassifyDetails) Marshal(b []byte) ([]byte, error) {
  1891  	if b == nil {
  1892  		b = make([]byte, m.Size())
  1893  	}
  1894  	buf := codec.NewBuffer(b)
  1895  	buf.EncodeUint32(uint32(m.SwIfIndex))
  1896  	buf.EncodeUint32(m.TableIndex)
  1897  	return buf.Bytes(), nil
  1898  }
  1899  func (m *PolicerClassifyDetails) Unmarshal(b []byte) error {
  1900  	buf := codec.NewBuffer(b)
  1901  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
  1902  	m.TableIndex = buf.DecodeUint32()
  1903  	return nil
  1904  }
  1905  
  1906  // Get list of policer classify interfaces and tables
  1907  //   - type - classify table type
  1908  //   - sw_if_index - filter on sw_if_index
  1909  //
  1910  // PolicerClassifyDump defines message 'policer_classify_dump'.
  1911  type PolicerClassifyDump struct {
  1912  	Type      PolicerClassifyTable           `binapi:"policer_classify_table,name=type" json:"type,omitempty"`
  1913  	SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
  1914  }
  1915  
  1916  func (m *PolicerClassifyDump) Reset()               { *m = PolicerClassifyDump{} }
  1917  func (*PolicerClassifyDump) GetMessageName() string { return "policer_classify_dump" }
  1918  func (*PolicerClassifyDump) GetCrcString() string   { return "56cbb5fb" }
  1919  func (*PolicerClassifyDump) GetMessageType() api.MessageType {
  1920  	return api.RequestMessage
  1921  }
  1922  
  1923  func (m *PolicerClassifyDump) Size() (size int) {
  1924  	if m == nil {
  1925  		return 0
  1926  	}
  1927  	size += 1 // m.Type
  1928  	size += 4 // m.SwIfIndex
  1929  	return size
  1930  }
  1931  func (m *PolicerClassifyDump) Marshal(b []byte) ([]byte, error) {
  1932  	if b == nil {
  1933  		b = make([]byte, m.Size())
  1934  	}
  1935  	buf := codec.NewBuffer(b)
  1936  	buf.EncodeUint8(uint8(m.Type))
  1937  	buf.EncodeUint32(uint32(m.SwIfIndex))
  1938  	return buf.Bytes(), nil
  1939  }
  1940  func (m *PolicerClassifyDump) Unmarshal(b []byte) error {
  1941  	buf := codec.NewBuffer(b)
  1942  	m.Type = PolicerClassifyTable(buf.DecodeUint8())
  1943  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
  1944  	return nil
  1945  }
  1946  
  1947  // Set/unset policer classify interface
  1948  //   - sw_if_index - interface to set/unset policer classify
  1949  //   - ip4_table_index - ip4 classify table index (~0 for skip)
  1950  //   - ip6_table_index - ip6 classify table index (~0 for skip)
  1951  //   - l2_table_index  -  l2 classify table index (~0 for skip)
  1952  //   - is_add - Set if non-zero, else unset
  1953  //     Note: User is recommended to use just one valid table_index per call.
  1954  //     (ip4_table_index, ip6_table_index, or l2_table_index)
  1955  //
  1956  // PolicerClassifySetInterface defines message 'policer_classify_set_interface'.
  1957  type PolicerClassifySetInterface struct {
  1958  	SwIfIndex     interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
  1959  	IP4TableIndex uint32                         `binapi:"u32,name=ip4_table_index" json:"ip4_table_index,omitempty"`
  1960  	IP6TableIndex uint32                         `binapi:"u32,name=ip6_table_index" json:"ip6_table_index,omitempty"`
  1961  	L2TableIndex  uint32                         `binapi:"u32,name=l2_table_index" json:"l2_table_index,omitempty"`
  1962  	IsAdd         bool                           `binapi:"bool,name=is_add" json:"is_add,omitempty"`
  1963  }
  1964  
  1965  func (m *PolicerClassifySetInterface) Reset()               { *m = PolicerClassifySetInterface{} }
  1966  func (*PolicerClassifySetInterface) GetMessageName() string { return "policer_classify_set_interface" }
  1967  func (*PolicerClassifySetInterface) GetCrcString() string   { return "de7ad708" }
  1968  func (*PolicerClassifySetInterface) GetMessageType() api.MessageType {
  1969  	return api.RequestMessage
  1970  }
  1971  
  1972  func (m *PolicerClassifySetInterface) Size() (size int) {
  1973  	if m == nil {
  1974  		return 0
  1975  	}
  1976  	size += 4 // m.SwIfIndex
  1977  	size += 4 // m.IP4TableIndex
  1978  	size += 4 // m.IP6TableIndex
  1979  	size += 4 // m.L2TableIndex
  1980  	size += 1 // m.IsAdd
  1981  	return size
  1982  }
  1983  func (m *PolicerClassifySetInterface) Marshal(b []byte) ([]byte, error) {
  1984  	if b == nil {
  1985  		b = make([]byte, m.Size())
  1986  	}
  1987  	buf := codec.NewBuffer(b)
  1988  	buf.EncodeUint32(uint32(m.SwIfIndex))
  1989  	buf.EncodeUint32(m.IP4TableIndex)
  1990  	buf.EncodeUint32(m.IP6TableIndex)
  1991  	buf.EncodeUint32(m.L2TableIndex)
  1992  	buf.EncodeBool(m.IsAdd)
  1993  	return buf.Bytes(), nil
  1994  }
  1995  func (m *PolicerClassifySetInterface) Unmarshal(b []byte) error {
  1996  	buf := codec.NewBuffer(b)
  1997  	m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
  1998  	m.IP4TableIndex = buf.DecodeUint32()
  1999  	m.IP6TableIndex = buf.DecodeUint32()
  2000  	m.L2TableIndex = buf.DecodeUint32()
  2001  	m.IsAdd = buf.DecodeBool()
  2002  	return nil
  2003  }
  2004  
  2005  // PolicerClassifySetInterfaceReply defines message 'policer_classify_set_interface_reply'.
  2006  type PolicerClassifySetInterfaceReply struct {
  2007  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
  2008  }
  2009  
  2010  func (m *PolicerClassifySetInterfaceReply) Reset() { *m = PolicerClassifySetInterfaceReply{} }
  2011  func (*PolicerClassifySetInterfaceReply) GetMessageName() string {
  2012  	return "policer_classify_set_interface_reply"
  2013  }
  2014  func (*PolicerClassifySetInterfaceReply) GetCrcString() string { return "e8d4e804" }
  2015  func (*PolicerClassifySetInterfaceReply) GetMessageType() api.MessageType {
  2016  	return api.ReplyMessage
  2017  }
  2018  
  2019  func (m *PolicerClassifySetInterfaceReply) Size() (size int) {
  2020  	if m == nil {
  2021  		return 0
  2022  	}
  2023  	size += 4 // m.Retval
  2024  	return size
  2025  }
  2026  func (m *PolicerClassifySetInterfaceReply) Marshal(b []byte) ([]byte, error) {
  2027  	if b == nil {
  2028  		b = make([]byte, m.Size())
  2029  	}
  2030  	buf := codec.NewBuffer(b)
  2031  	buf.EncodeInt32(m.Retval)
  2032  	return buf.Bytes(), nil
  2033  }
  2034  func (m *PolicerClassifySetInterfaceReply) Unmarshal(b []byte) error {
  2035  	buf := codec.NewBuffer(b)
  2036  	m.Retval = buf.DecodeInt32()
  2037  	return nil
  2038  }
  2039  
  2040  // Add/del punt ACL
  2041  //   - ip4_table_index - ip4 punt classify table index (~0 for skip)
  2042  //   - ip6_table_index - ip6 punt classify table index (~0 for skip)
  2043  //   - is_add - add punt ACL if non-zero, else delete
  2044  //
  2045  // PuntACLAddDel defines message 'punt_acl_add_del'.
  2046  type PuntACLAddDel struct {
  2047  	IP4TableIndex uint32 `binapi:"u32,name=ip4_table_index,default=4294967295" json:"ip4_table_index,omitempty"`
  2048  	IP6TableIndex uint32 `binapi:"u32,name=ip6_table_index,default=4294967295" json:"ip6_table_index,omitempty"`
  2049  	IsAdd         bool   `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"`
  2050  }
  2051  
  2052  func (m *PuntACLAddDel) Reset()               { *m = PuntACLAddDel{} }
  2053  func (*PuntACLAddDel) GetMessageName() string { return "punt_acl_add_del" }
  2054  func (*PuntACLAddDel) GetCrcString() string   { return "a93bf3a0" }
  2055  func (*PuntACLAddDel) GetMessageType() api.MessageType {
  2056  	return api.RequestMessage
  2057  }
  2058  
  2059  func (m *PuntACLAddDel) Size() (size int) {
  2060  	if m == nil {
  2061  		return 0
  2062  	}
  2063  	size += 4 // m.IP4TableIndex
  2064  	size += 4 // m.IP6TableIndex
  2065  	size += 1 // m.IsAdd
  2066  	return size
  2067  }
  2068  func (m *PuntACLAddDel) Marshal(b []byte) ([]byte, error) {
  2069  	if b == nil {
  2070  		b = make([]byte, m.Size())
  2071  	}
  2072  	buf := codec.NewBuffer(b)
  2073  	buf.EncodeUint32(m.IP4TableIndex)
  2074  	buf.EncodeUint32(m.IP6TableIndex)
  2075  	buf.EncodeBool(m.IsAdd)
  2076  	return buf.Bytes(), nil
  2077  }
  2078  func (m *PuntACLAddDel) Unmarshal(b []byte) error {
  2079  	buf := codec.NewBuffer(b)
  2080  	m.IP4TableIndex = buf.DecodeUint32()
  2081  	m.IP6TableIndex = buf.DecodeUint32()
  2082  	m.IsAdd = buf.DecodeBool()
  2083  	return nil
  2084  }
  2085  
  2086  // PuntACLAddDelReply defines message 'punt_acl_add_del_reply'.
  2087  type PuntACLAddDelReply struct {
  2088  	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
  2089  }
  2090  
  2091  func (m *PuntACLAddDelReply) Reset()               { *m = PuntACLAddDelReply{} }
  2092  func (*PuntACLAddDelReply) GetMessageName() string { return "punt_acl_add_del_reply" }
  2093  func (*PuntACLAddDelReply) GetCrcString() string   { return "e8d4e804" }
  2094  func (*PuntACLAddDelReply) GetMessageType() api.MessageType {
  2095  	return api.ReplyMessage
  2096  }
  2097  
  2098  func (m *PuntACLAddDelReply) Size() (size int) {
  2099  	if m == nil {
  2100  		return 0
  2101  	}
  2102  	size += 4 // m.Retval
  2103  	return size
  2104  }
  2105  func (m *PuntACLAddDelReply) Marshal(b []byte) ([]byte, error) {
  2106  	if b == nil {
  2107  		b = make([]byte, m.Size())
  2108  	}
  2109  	buf := codec.NewBuffer(b)
  2110  	buf.EncodeInt32(m.Retval)
  2111  	return buf.Bytes(), nil
  2112  }
  2113  func (m *PuntACLAddDelReply) Unmarshal(b []byte) error {
  2114  	buf := codec.NewBuffer(b)
  2115  	m.Retval = buf.DecodeInt32()
  2116  	return nil
  2117  }
  2118  
  2119  // Get classify table ids configured for punt ACL
  2120  // PuntACLGet defines message 'punt_acl_get'.
  2121  type PuntACLGet struct{}
  2122  
  2123  func (m *PuntACLGet) Reset()               { *m = PuntACLGet{} }
  2124  func (*PuntACLGet) GetMessageName() string { return "punt_acl_get" }
  2125  func (*PuntACLGet) GetCrcString() string   { return "51077d14" }
  2126  func (*PuntACLGet) GetMessageType() api.MessageType {
  2127  	return api.RequestMessage
  2128  }
  2129  
  2130  func (m *PuntACLGet) Size() (size int) {
  2131  	if m == nil {
  2132  		return 0
  2133  	}
  2134  	return size
  2135  }
  2136  func (m *PuntACLGet) Marshal(b []byte) ([]byte, error) {
  2137  	if b == nil {
  2138  		b = make([]byte, m.Size())
  2139  	}
  2140  	buf := codec.NewBuffer(b)
  2141  	return buf.Bytes(), nil
  2142  }
  2143  func (m *PuntACLGet) Unmarshal(b []byte) error {
  2144  	return nil
  2145  }
  2146  
  2147  // Reply for punt_acl_get
  2148  //   - retval - return value (0 for success)
  2149  //   - ip4_table_index - ip4 punt classify table index (~0 for none)
  2150  //   - ip6_table_index - ip6 punt classify table index (~0 for none)
  2151  //
  2152  // PuntACLGetReply defines message 'punt_acl_get_reply'.
  2153  type PuntACLGetReply struct {
  2154  	Retval        int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
  2155  	IP4TableIndex uint32 `binapi:"u32,name=ip4_table_index" json:"ip4_table_index,omitempty"`
  2156  	IP6TableIndex uint32 `binapi:"u32,name=ip6_table_index" json:"ip6_table_index,omitempty"`
  2157  }
  2158  
  2159  func (m *PuntACLGetReply) Reset()               { *m = PuntACLGetReply{} }
  2160  func (*PuntACLGetReply) GetMessageName() string { return "punt_acl_get_reply" }
  2161  func (*PuntACLGetReply) GetCrcString() string   { return "8409b9dd" }
  2162  func (*PuntACLGetReply) GetMessageType() api.MessageType {
  2163  	return api.ReplyMessage
  2164  }
  2165  
  2166  func (m *PuntACLGetReply) Size() (size int) {
  2167  	if m == nil {
  2168  		return 0
  2169  	}
  2170  	size += 4 // m.Retval
  2171  	size += 4 // m.IP4TableIndex
  2172  	size += 4 // m.IP6TableIndex
  2173  	return size
  2174  }
  2175  func (m *PuntACLGetReply) Marshal(b []byte) ([]byte, error) {
  2176  	if b == nil {
  2177  		b = make([]byte, m.Size())
  2178  	}
  2179  	buf := codec.NewBuffer(b)
  2180  	buf.EncodeInt32(m.Retval)
  2181  	buf.EncodeUint32(m.IP4TableIndex)
  2182  	buf.EncodeUint32(m.IP6TableIndex)
  2183  	return buf.Bytes(), nil
  2184  }
  2185  func (m *PuntACLGetReply) Unmarshal(b []byte) error {
  2186  	buf := codec.NewBuffer(b)
  2187  	m.Retval = buf.DecodeInt32()
  2188  	m.IP4TableIndex = buf.DecodeUint32()
  2189  	m.IP6TableIndex = buf.DecodeUint32()
  2190  	return nil
  2191  }
  2192  
  2193  func init() { file_classify_binapi_init() }
  2194  func file_classify_binapi_init() {
  2195  	api.RegisterMessage((*ClassifyAddDelSession)(nil), "classify_add_del_session_f20879f0")
  2196  	api.RegisterMessage((*ClassifyAddDelSessionReply)(nil), "classify_add_del_session_reply_e8d4e804")
  2197  	api.RegisterMessage((*ClassifyAddDelTable)(nil), "classify_add_del_table_6849e39e")
  2198  	api.RegisterMessage((*ClassifyAddDelTableReply)(nil), "classify_add_del_table_reply_05486349")
  2199  	api.RegisterMessage((*ClassifyPcapGetTables)(nil), "classify_pcap_get_tables_f9e6675e")
  2200  	api.RegisterMessage((*ClassifyPcapGetTablesReply)(nil), "classify_pcap_get_tables_reply_5f5bc9e6")
  2201  	api.RegisterMessage((*ClassifyPcapLookupTable)(nil), "classify_pcap_lookup_table_e1b4cc6b")
  2202  	api.RegisterMessage((*ClassifyPcapLookupTableReply)(nil), "classify_pcap_lookup_table_reply_9c6c6773")
  2203  	api.RegisterMessage((*ClassifyPcapSetTable)(nil), "classify_pcap_set_table_006051b3")
  2204  	api.RegisterMessage((*ClassifyPcapSetTableReply)(nil), "classify_pcap_set_table_reply_9c6c6773")
  2205  	api.RegisterMessage((*ClassifySessionDetails)(nil), "classify_session_details_60e3ef94")
  2206  	api.RegisterMessage((*ClassifySessionDump)(nil), "classify_session_dump_0cca2cd9")
  2207  	api.RegisterMessage((*ClassifySetInterfaceIPTable)(nil), "classify_set_interface_ip_table_e0b097c7")
  2208  	api.RegisterMessage((*ClassifySetInterfaceIPTableReply)(nil), "classify_set_interface_ip_table_reply_e8d4e804")
  2209  	api.RegisterMessage((*ClassifySetInterfaceL2Tables)(nil), "classify_set_interface_l2_tables_5a6ddf65")
  2210  	api.RegisterMessage((*ClassifySetInterfaceL2TablesReply)(nil), "classify_set_interface_l2_tables_reply_e8d4e804")
  2211  	api.RegisterMessage((*ClassifyTableByInterface)(nil), "classify_table_by_interface_f9e6675e")
  2212  	api.RegisterMessage((*ClassifyTableByInterfaceReply)(nil), "classify_table_by_interface_reply_ed4197db")
  2213  	api.RegisterMessage((*ClassifyTableIds)(nil), "classify_table_ids_51077d14")
  2214  	api.RegisterMessage((*ClassifyTableIdsReply)(nil), "classify_table_ids_reply_d1d20e1d")
  2215  	api.RegisterMessage((*ClassifyTableInfo)(nil), "classify_table_info_0cca2cd9")
  2216  	api.RegisterMessage((*ClassifyTableInfoReply)(nil), "classify_table_info_reply_4a573c0e")
  2217  	api.RegisterMessage((*ClassifyTraceGetTables)(nil), "classify_trace_get_tables_51077d14")
  2218  	api.RegisterMessage((*ClassifyTraceGetTablesReply)(nil), "classify_trace_get_tables_reply_5f5bc9e6")
  2219  	api.RegisterMessage((*ClassifyTraceLookupTable)(nil), "classify_trace_lookup_table_3f7b72e4")
  2220  	api.RegisterMessage((*ClassifyTraceLookupTableReply)(nil), "classify_trace_lookup_table_reply_9c6c6773")
  2221  	api.RegisterMessage((*ClassifyTraceSetTable)(nil), "classify_trace_set_table_3909b55a")
  2222  	api.RegisterMessage((*ClassifyTraceSetTableReply)(nil), "classify_trace_set_table_reply_9c6c6773")
  2223  	api.RegisterMessage((*FlowClassifyDetails)(nil), "flow_classify_details_dfd08765")
  2224  	api.RegisterMessage((*FlowClassifyDump)(nil), "flow_classify_dump_25dd3e4c")
  2225  	api.RegisterMessage((*FlowClassifySetInterface)(nil), "flow_classify_set_interface_b6192f1c")
  2226  	api.RegisterMessage((*FlowClassifySetInterfaceReply)(nil), "flow_classify_set_interface_reply_e8d4e804")
  2227  	api.RegisterMessage((*InputACLSetInterface)(nil), "input_acl_set_interface_de7ad708")
  2228  	api.RegisterMessage((*InputACLSetInterfaceReply)(nil), "input_acl_set_interface_reply_e8d4e804")
  2229  	api.RegisterMessage((*OutputACLSetInterface)(nil), "output_acl_set_interface_de7ad708")
  2230  	api.RegisterMessage((*OutputACLSetInterfaceReply)(nil), "output_acl_set_interface_reply_e8d4e804")
  2231  	api.RegisterMessage((*PolicerClassifyDetails)(nil), "policer_classify_details_dfd08765")
  2232  	api.RegisterMessage((*PolicerClassifyDump)(nil), "policer_classify_dump_56cbb5fb")
  2233  	api.RegisterMessage((*PolicerClassifySetInterface)(nil), "policer_classify_set_interface_de7ad708")
  2234  	api.RegisterMessage((*PolicerClassifySetInterfaceReply)(nil), "policer_classify_set_interface_reply_e8d4e804")
  2235  	api.RegisterMessage((*PuntACLAddDel)(nil), "punt_acl_add_del_a93bf3a0")
  2236  	api.RegisterMessage((*PuntACLAddDelReply)(nil), "punt_acl_add_del_reply_e8d4e804")
  2237  	api.RegisterMessage((*PuntACLGet)(nil), "punt_acl_get_51077d14")
  2238  	api.RegisterMessage((*PuntACLGetReply)(nil), "punt_acl_get_reply_8409b9dd")
  2239  }
  2240  
  2241  // Messages returns list of all messages in this module.
  2242  func AllMessages() []api.Message {
  2243  	return []api.Message{
  2244  		(*ClassifyAddDelSession)(nil),
  2245  		(*ClassifyAddDelSessionReply)(nil),
  2246  		(*ClassifyAddDelTable)(nil),
  2247  		(*ClassifyAddDelTableReply)(nil),
  2248  		(*ClassifyPcapGetTables)(nil),
  2249  		(*ClassifyPcapGetTablesReply)(nil),
  2250  		(*ClassifyPcapLookupTable)(nil),
  2251  		(*ClassifyPcapLookupTableReply)(nil),
  2252  		(*ClassifyPcapSetTable)(nil),
  2253  		(*ClassifyPcapSetTableReply)(nil),
  2254  		(*ClassifySessionDetails)(nil),
  2255  		(*ClassifySessionDump)(nil),
  2256  		(*ClassifySetInterfaceIPTable)(nil),
  2257  		(*ClassifySetInterfaceIPTableReply)(nil),
  2258  		(*ClassifySetInterfaceL2Tables)(nil),
  2259  		(*ClassifySetInterfaceL2TablesReply)(nil),
  2260  		(*ClassifyTableByInterface)(nil),
  2261  		(*ClassifyTableByInterfaceReply)(nil),
  2262  		(*ClassifyTableIds)(nil),
  2263  		(*ClassifyTableIdsReply)(nil),
  2264  		(*ClassifyTableInfo)(nil),
  2265  		(*ClassifyTableInfoReply)(nil),
  2266  		(*ClassifyTraceGetTables)(nil),
  2267  		(*ClassifyTraceGetTablesReply)(nil),
  2268  		(*ClassifyTraceLookupTable)(nil),
  2269  		(*ClassifyTraceLookupTableReply)(nil),
  2270  		(*ClassifyTraceSetTable)(nil),
  2271  		(*ClassifyTraceSetTableReply)(nil),
  2272  		(*FlowClassifyDetails)(nil),
  2273  		(*FlowClassifyDump)(nil),
  2274  		(*FlowClassifySetInterface)(nil),
  2275  		(*FlowClassifySetInterfaceReply)(nil),
  2276  		(*InputACLSetInterface)(nil),
  2277  		(*InputACLSetInterfaceReply)(nil),
  2278  		(*OutputACLSetInterface)(nil),
  2279  		(*OutputACLSetInterfaceReply)(nil),
  2280  		(*PolicerClassifyDetails)(nil),
  2281  		(*PolicerClassifyDump)(nil),
  2282  		(*PolicerClassifySetInterface)(nil),
  2283  		(*PolicerClassifySetInterfaceReply)(nil),
  2284  		(*PuntACLAddDel)(nil),
  2285  		(*PuntACLAddDelReply)(nil),
  2286  		(*PuntACLGet)(nil),
  2287  		(*PuntACLGetReply)(nil),
  2288  	}
  2289  }