1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.4.0-dev
5 // source: /usr/share/vpp/api/core/classify.api.json
7 // Package classify contains generated bindings for API file classify.api.
18 api "git.fd.io/govpp.git/api"
19 interface_types "git.fd.io/govpp.git/binapi/interface_types"
20 codec "git.fd.io/govpp.git/codec"
23 // This is a compile-time assertion to ensure that this generated file
24 // is compatible with the GoVPP api package it is being compiled against.
25 // A compilation error at this line likely means your copy of the
26 // GoVPP api package needs to be updated.
27 const _ = api.GoVppAPIPackageIsVersion2
32 VersionCrc = 0x24ea656e
35 // ClassifyAction defines enum 'classify_action'.
36 type ClassifyAction uint8
39 CLASSIFY_API_ACTION_NONE ClassifyAction = 0
40 CLASSIFY_API_ACTION_SET_IP4_FIB_INDEX ClassifyAction = 1
41 CLASSIFY_API_ACTION_SET_IP6_FIB_INDEX ClassifyAction = 2
42 CLASSIFY_API_ACTION_SET_METADATA ClassifyAction = 3
46 ClassifyAction_name = map[uint8]string{
47 0: "CLASSIFY_API_ACTION_NONE",
48 1: "CLASSIFY_API_ACTION_SET_IP4_FIB_INDEX",
49 2: "CLASSIFY_API_ACTION_SET_IP6_FIB_INDEX",
50 3: "CLASSIFY_API_ACTION_SET_METADATA",
52 ClassifyAction_value = map[string]uint8{
53 "CLASSIFY_API_ACTION_NONE": 0,
54 "CLASSIFY_API_ACTION_SET_IP4_FIB_INDEX": 1,
55 "CLASSIFY_API_ACTION_SET_IP6_FIB_INDEX": 2,
56 "CLASSIFY_API_ACTION_SET_METADATA": 3,
60 func (x ClassifyAction) String() string {
61 s, ok := ClassifyAction_name[uint8(x)]
65 return "ClassifyAction(" + strconv.Itoa(int(x)) + ")"
68 // FlowClassifyTable defines enum 'flow_classify_table'.
69 type FlowClassifyTable uint8
72 FLOW_CLASSIFY_API_TABLE_IP4 FlowClassifyTable = 1
73 FLOW_CLASSIFY_API_TABLE_IP6 FlowClassifyTable = 2
77 FlowClassifyTable_name = map[uint8]string{
78 1: "FLOW_CLASSIFY_API_TABLE_IP4",
79 2: "FLOW_CLASSIFY_API_TABLE_IP6",
81 FlowClassifyTable_value = map[string]uint8{
82 "FLOW_CLASSIFY_API_TABLE_IP4": 1,
83 "FLOW_CLASSIFY_API_TABLE_IP6": 2,
87 func (x FlowClassifyTable) String() string {
88 s, ok := FlowClassifyTable_name[uint8(x)]
92 return "FlowClassifyTable(" + strconv.Itoa(int(x)) + ")"
95 // PolicerClassifyTable defines enum 'policer_classify_table'.
96 type PolicerClassifyTable uint8
99 POLICER_CLASSIFY_API_TABLE_IP4 PolicerClassifyTable = 1
100 POLICER_CLASSIFY_API_TABLE_IP6 PolicerClassifyTable = 2
101 POLICER_CLASSIFY_API_TABLE_L2 PolicerClassifyTable = 3
105 PolicerClassifyTable_name = map[uint8]string{
106 1: "POLICER_CLASSIFY_API_TABLE_IP4",
107 2: "POLICER_CLASSIFY_API_TABLE_IP6",
108 3: "POLICER_CLASSIFY_API_TABLE_L2",
110 PolicerClassifyTable_value = map[string]uint8{
111 "POLICER_CLASSIFY_API_TABLE_IP4": 1,
112 "POLICER_CLASSIFY_API_TABLE_IP6": 2,
113 "POLICER_CLASSIFY_API_TABLE_L2": 3,
117 func (x PolicerClassifyTable) String() string {
118 s, ok := PolicerClassifyTable_name[uint8(x)]
122 return "PolicerClassifyTable(" + strconv.Itoa(int(x)) + ")"
125 // ClassifyAddDelSession defines message 'classify_add_del_session'.
126 type ClassifyAddDelSession struct {
127 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
128 TableIndex uint32 `binapi:"u32,name=table_index" json:"table_index,omitempty"`
129 HitNextIndex uint32 `binapi:"u32,name=hit_next_index,default=4294967295" json:"hit_next_index,omitempty"`
130 OpaqueIndex uint32 `binapi:"u32,name=opaque_index,default=4294967295" json:"opaque_index,omitempty"`
131 Advance int32 `binapi:"i32,name=advance,default=0" json:"advance,omitempty"`
132 Action ClassifyAction `binapi:"classify_action,name=action,default=0" json:"action,omitempty"`
133 Metadata uint32 `binapi:"u32,name=metadata,default=0" json:"metadata,omitempty"`
134 MatchLen uint32 `binapi:"u32,name=match_len" json:"-"`
135 Match []byte `binapi:"u8[match_len],name=match" json:"match,omitempty"`
138 func (m *ClassifyAddDelSession) Reset() { *m = ClassifyAddDelSession{} }
139 func (*ClassifyAddDelSession) GetMessageName() string { return "classify_add_del_session" }
140 func (*ClassifyAddDelSession) GetCrcString() string { return "f20879f0" }
141 func (*ClassifyAddDelSession) GetMessageType() api.MessageType {
142 return api.RequestMessage
145 func (m *ClassifyAddDelSession) Size() (size int) {
150 size += 4 // m.TableIndex
151 size += 4 // m.HitNextIndex
152 size += 4 // m.OpaqueIndex
153 size += 4 // m.Advance
154 size += 1 // m.Action
155 size += 4 // m.Metadata
156 size += 4 // m.MatchLen
157 size += 1 * len(m.Match) // m.Match
160 func (m *ClassifyAddDelSession) Marshal(b []byte) ([]byte, error) {
162 b = make([]byte, m.Size())
164 buf := codec.NewBuffer(b)
165 buf.EncodeBool(m.IsAdd)
166 buf.EncodeUint32(m.TableIndex)
167 buf.EncodeUint32(m.HitNextIndex)
168 buf.EncodeUint32(m.OpaqueIndex)
169 buf.EncodeInt32(m.Advance)
170 buf.EncodeUint8(uint8(m.Action))
171 buf.EncodeUint32(m.Metadata)
172 buf.EncodeUint32(uint32(len(m.Match)))
173 buf.EncodeBytes(m.Match, 0)
174 return buf.Bytes(), nil
176 func (m *ClassifyAddDelSession) Unmarshal(b []byte) error {
177 buf := codec.NewBuffer(b)
178 m.IsAdd = buf.DecodeBool()
179 m.TableIndex = buf.DecodeUint32()
180 m.HitNextIndex = buf.DecodeUint32()
181 m.OpaqueIndex = buf.DecodeUint32()
182 m.Advance = buf.DecodeInt32()
183 m.Action = ClassifyAction(buf.DecodeUint8())
184 m.Metadata = buf.DecodeUint32()
185 m.MatchLen = buf.DecodeUint32()
186 m.Match = make([]byte, m.MatchLen)
187 copy(m.Match, buf.DecodeBytes(len(m.Match)))
191 // ClassifyAddDelSessionReply defines message 'classify_add_del_session_reply'.
192 type ClassifyAddDelSessionReply struct {
193 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
196 func (m *ClassifyAddDelSessionReply) Reset() { *m = ClassifyAddDelSessionReply{} }
197 func (*ClassifyAddDelSessionReply) GetMessageName() string { return "classify_add_del_session_reply" }
198 func (*ClassifyAddDelSessionReply) GetCrcString() string { return "e8d4e804" }
199 func (*ClassifyAddDelSessionReply) GetMessageType() api.MessageType {
200 return api.ReplyMessage
203 func (m *ClassifyAddDelSessionReply) Size() (size int) {
207 size += 4 // m.Retval
210 func (m *ClassifyAddDelSessionReply) Marshal(b []byte) ([]byte, error) {
212 b = make([]byte, m.Size())
214 buf := codec.NewBuffer(b)
215 buf.EncodeInt32(m.Retval)
216 return buf.Bytes(), nil
218 func (m *ClassifyAddDelSessionReply) Unmarshal(b []byte) error {
219 buf := codec.NewBuffer(b)
220 m.Retval = buf.DecodeInt32()
224 // ClassifyAddDelTable defines message 'classify_add_del_table'.
225 type ClassifyAddDelTable struct {
226 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
227 DelChain bool `binapi:"bool,name=del_chain" json:"del_chain,omitempty"`
228 TableIndex uint32 `binapi:"u32,name=table_index,default=4294967295" json:"table_index,omitempty"`
229 Nbuckets uint32 `binapi:"u32,name=nbuckets,default=2" json:"nbuckets,omitempty"`
230 MemorySize uint32 `binapi:"u32,name=memory_size,default=2097152" json:"memory_size,omitempty"`
231 SkipNVectors uint32 `binapi:"u32,name=skip_n_vectors,default=0" json:"skip_n_vectors,omitempty"`
232 MatchNVectors uint32 `binapi:"u32,name=match_n_vectors,default=1" json:"match_n_vectors,omitempty"`
233 NextTableIndex uint32 `binapi:"u32,name=next_table_index,default=4294967295" json:"next_table_index,omitempty"`
234 MissNextIndex uint32 `binapi:"u32,name=miss_next_index,default=4294967295" json:"miss_next_index,omitempty"`
235 CurrentDataFlag uint8 `binapi:"u8,name=current_data_flag,default=0" json:"current_data_flag,omitempty"`
236 CurrentDataOffset int16 `binapi:"i16,name=current_data_offset,default=0" json:"current_data_offset,omitempty"`
237 MaskLen uint32 `binapi:"u32,name=mask_len" json:"-"`
238 Mask []byte `binapi:"u8[mask_len],name=mask" json:"mask,omitempty"`
241 func (m *ClassifyAddDelTable) Reset() { *m = ClassifyAddDelTable{} }
242 func (*ClassifyAddDelTable) GetMessageName() string { return "classify_add_del_table" }
243 func (*ClassifyAddDelTable) GetCrcString() string { return "6849e39e" }
244 func (*ClassifyAddDelTable) GetMessageType() api.MessageType {
245 return api.RequestMessage
248 func (m *ClassifyAddDelTable) Size() (size int) {
253 size += 1 // m.DelChain
254 size += 4 // m.TableIndex
255 size += 4 // m.Nbuckets
256 size += 4 // m.MemorySize
257 size += 4 // m.SkipNVectors
258 size += 4 // m.MatchNVectors
259 size += 4 // m.NextTableIndex
260 size += 4 // m.MissNextIndex
261 size += 1 // m.CurrentDataFlag
262 size += 2 // m.CurrentDataOffset
263 size += 4 // m.MaskLen
264 size += 1 * len(m.Mask) // m.Mask
267 func (m *ClassifyAddDelTable) Marshal(b []byte) ([]byte, error) {
269 b = make([]byte, m.Size())
271 buf := codec.NewBuffer(b)
272 buf.EncodeBool(m.IsAdd)
273 buf.EncodeBool(m.DelChain)
274 buf.EncodeUint32(m.TableIndex)
275 buf.EncodeUint32(m.Nbuckets)
276 buf.EncodeUint32(m.MemorySize)
277 buf.EncodeUint32(m.SkipNVectors)
278 buf.EncodeUint32(m.MatchNVectors)
279 buf.EncodeUint32(m.NextTableIndex)
280 buf.EncodeUint32(m.MissNextIndex)
281 buf.EncodeUint8(m.CurrentDataFlag)
282 buf.EncodeInt16(m.CurrentDataOffset)
283 buf.EncodeUint32(uint32(len(m.Mask)))
284 buf.EncodeBytes(m.Mask, 0)
285 return buf.Bytes(), nil
287 func (m *ClassifyAddDelTable) Unmarshal(b []byte) error {
288 buf := codec.NewBuffer(b)
289 m.IsAdd = buf.DecodeBool()
290 m.DelChain = buf.DecodeBool()
291 m.TableIndex = buf.DecodeUint32()
292 m.Nbuckets = buf.DecodeUint32()
293 m.MemorySize = buf.DecodeUint32()
294 m.SkipNVectors = buf.DecodeUint32()
295 m.MatchNVectors = buf.DecodeUint32()
296 m.NextTableIndex = buf.DecodeUint32()
297 m.MissNextIndex = buf.DecodeUint32()
298 m.CurrentDataFlag = buf.DecodeUint8()
299 m.CurrentDataOffset = buf.DecodeInt16()
300 m.MaskLen = buf.DecodeUint32()
301 m.Mask = make([]byte, m.MaskLen)
302 copy(m.Mask, buf.DecodeBytes(len(m.Mask)))
306 // ClassifyAddDelTableReply defines message 'classify_add_del_table_reply'.
307 type ClassifyAddDelTableReply struct {
308 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
309 NewTableIndex uint32 `binapi:"u32,name=new_table_index" json:"new_table_index,omitempty"`
310 SkipNVectors uint32 `binapi:"u32,name=skip_n_vectors" json:"skip_n_vectors,omitempty"`
311 MatchNVectors uint32 `binapi:"u32,name=match_n_vectors" json:"match_n_vectors,omitempty"`
314 func (m *ClassifyAddDelTableReply) Reset() { *m = ClassifyAddDelTableReply{} }
315 func (*ClassifyAddDelTableReply) GetMessageName() string { return "classify_add_del_table_reply" }
316 func (*ClassifyAddDelTableReply) GetCrcString() string { return "05486349" }
317 func (*ClassifyAddDelTableReply) GetMessageType() api.MessageType {
318 return api.ReplyMessage
321 func (m *ClassifyAddDelTableReply) Size() (size int) {
325 size += 4 // m.Retval
326 size += 4 // m.NewTableIndex
327 size += 4 // m.SkipNVectors
328 size += 4 // m.MatchNVectors
331 func (m *ClassifyAddDelTableReply) Marshal(b []byte) ([]byte, error) {
333 b = make([]byte, m.Size())
335 buf := codec.NewBuffer(b)
336 buf.EncodeInt32(m.Retval)
337 buf.EncodeUint32(m.NewTableIndex)
338 buf.EncodeUint32(m.SkipNVectors)
339 buf.EncodeUint32(m.MatchNVectors)
340 return buf.Bytes(), nil
342 func (m *ClassifyAddDelTableReply) Unmarshal(b []byte) error {
343 buf := codec.NewBuffer(b)
344 m.Retval = buf.DecodeInt32()
345 m.NewTableIndex = buf.DecodeUint32()
346 m.SkipNVectors = buf.DecodeUint32()
347 m.MatchNVectors = buf.DecodeUint32()
351 // ClassifyPcapGetTables defines message 'classify_pcap_get_tables'.
352 type ClassifyPcapGetTables struct {
353 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
356 func (m *ClassifyPcapGetTables) Reset() { *m = ClassifyPcapGetTables{} }
357 func (*ClassifyPcapGetTables) GetMessageName() string { return "classify_pcap_get_tables" }
358 func (*ClassifyPcapGetTables) GetCrcString() string { return "f9e6675e" }
359 func (*ClassifyPcapGetTables) GetMessageType() api.MessageType {
360 return api.RequestMessage
363 func (m *ClassifyPcapGetTables) Size() (size int) {
367 size += 4 // m.SwIfIndex
370 func (m *ClassifyPcapGetTables) Marshal(b []byte) ([]byte, error) {
372 b = make([]byte, m.Size())
374 buf := codec.NewBuffer(b)
375 buf.EncodeUint32(uint32(m.SwIfIndex))
376 return buf.Bytes(), nil
378 func (m *ClassifyPcapGetTables) Unmarshal(b []byte) error {
379 buf := codec.NewBuffer(b)
380 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
384 // ClassifyPcapGetTablesReply defines message 'classify_pcap_get_tables_reply'.
385 type ClassifyPcapGetTablesReply struct {
386 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
387 Count uint32 `binapi:"u32,name=count" json:"-"`
388 Indices []uint32 `binapi:"u32[count],name=indices" json:"indices,omitempty"`
391 func (m *ClassifyPcapGetTablesReply) Reset() { *m = ClassifyPcapGetTablesReply{} }
392 func (*ClassifyPcapGetTablesReply) GetMessageName() string { return "classify_pcap_get_tables_reply" }
393 func (*ClassifyPcapGetTablesReply) GetCrcString() string { return "5f5bc9e6" }
394 func (*ClassifyPcapGetTablesReply) GetMessageType() api.MessageType {
395 return api.ReplyMessage
398 func (m *ClassifyPcapGetTablesReply) Size() (size int) {
402 size += 4 // m.Retval
404 size += 4 * len(m.Indices) // m.Indices
407 func (m *ClassifyPcapGetTablesReply) Marshal(b []byte) ([]byte, error) {
409 b = make([]byte, m.Size())
411 buf := codec.NewBuffer(b)
412 buf.EncodeInt32(m.Retval)
413 buf.EncodeUint32(uint32(len(m.Indices)))
414 for i := 0; i < len(m.Indices); i++ {
416 if i < len(m.Indices) {
417 x = uint32(m.Indices[i])
421 return buf.Bytes(), nil
423 func (m *ClassifyPcapGetTablesReply) Unmarshal(b []byte) error {
424 buf := codec.NewBuffer(b)
425 m.Retval = buf.DecodeInt32()
426 m.Count = buf.DecodeUint32()
427 m.Indices = make([]uint32, m.Count)
428 for i := 0; i < len(m.Indices); i++ {
429 m.Indices[i] = buf.DecodeUint32()
434 // ClassifyPcapLookupTable defines message 'classify_pcap_lookup_table'.
435 type ClassifyPcapLookupTable struct {
436 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"`
437 SkipNVectors uint32 `binapi:"u32,name=skip_n_vectors,default=0" json:"skip_n_vectors,omitempty"`
438 MatchNVectors uint32 `binapi:"u32,name=match_n_vectors,default=1" json:"match_n_vectors,omitempty"`
439 MaskLen uint32 `binapi:"u32,name=mask_len" json:"-"`
440 Mask []byte `binapi:"u8[mask_len],name=mask" json:"mask,omitempty"`
443 func (m *ClassifyPcapLookupTable) Reset() { *m = ClassifyPcapLookupTable{} }
444 func (*ClassifyPcapLookupTable) GetMessageName() string { return "classify_pcap_lookup_table" }
445 func (*ClassifyPcapLookupTable) GetCrcString() string { return "e1b4cc6b" }
446 func (*ClassifyPcapLookupTable) GetMessageType() api.MessageType {
447 return api.RequestMessage
450 func (m *ClassifyPcapLookupTable) Size() (size int) {
454 size += 4 // m.SwIfIndex
455 size += 4 // m.SkipNVectors
456 size += 4 // m.MatchNVectors
457 size += 4 // m.MaskLen
458 size += 1 * len(m.Mask) // m.Mask
461 func (m *ClassifyPcapLookupTable) Marshal(b []byte) ([]byte, error) {
463 b = make([]byte, m.Size())
465 buf := codec.NewBuffer(b)
466 buf.EncodeUint32(uint32(m.SwIfIndex))
467 buf.EncodeUint32(m.SkipNVectors)
468 buf.EncodeUint32(m.MatchNVectors)
469 buf.EncodeUint32(uint32(len(m.Mask)))
470 buf.EncodeBytes(m.Mask, 0)
471 return buf.Bytes(), nil
473 func (m *ClassifyPcapLookupTable) Unmarshal(b []byte) error {
474 buf := codec.NewBuffer(b)
475 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
476 m.SkipNVectors = buf.DecodeUint32()
477 m.MatchNVectors = buf.DecodeUint32()
478 m.MaskLen = buf.DecodeUint32()
479 m.Mask = make([]byte, m.MaskLen)
480 copy(m.Mask, buf.DecodeBytes(len(m.Mask)))
484 // ClassifyPcapLookupTableReply defines message 'classify_pcap_lookup_table_reply'.
485 type ClassifyPcapLookupTableReply struct {
486 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
487 TableIndex uint32 `binapi:"u32,name=table_index" json:"table_index,omitempty"`
490 func (m *ClassifyPcapLookupTableReply) Reset() { *m = ClassifyPcapLookupTableReply{} }
491 func (*ClassifyPcapLookupTableReply) GetMessageName() string {
492 return "classify_pcap_lookup_table_reply"
494 func (*ClassifyPcapLookupTableReply) GetCrcString() string { return "9c6c6773" }
495 func (*ClassifyPcapLookupTableReply) GetMessageType() api.MessageType {
496 return api.ReplyMessage
499 func (m *ClassifyPcapLookupTableReply) Size() (size int) {
503 size += 4 // m.Retval
504 size += 4 // m.TableIndex
507 func (m *ClassifyPcapLookupTableReply) Marshal(b []byte) ([]byte, error) {
509 b = make([]byte, m.Size())
511 buf := codec.NewBuffer(b)
512 buf.EncodeInt32(m.Retval)
513 buf.EncodeUint32(m.TableIndex)
514 return buf.Bytes(), nil
516 func (m *ClassifyPcapLookupTableReply) Unmarshal(b []byte) error {
517 buf := codec.NewBuffer(b)
518 m.Retval = buf.DecodeInt32()
519 m.TableIndex = buf.DecodeUint32()
523 // ClassifyPcapSetTable defines message 'classify_pcap_set_table'.
524 type ClassifyPcapSetTable struct {
525 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
526 TableIndex uint32 `binapi:"u32,name=table_index,default=4294967295" json:"table_index,omitempty"`
527 SortMasks bool `binapi:"bool,name=sort_masks,default=0" json:"sort_masks,omitempty"`
530 func (m *ClassifyPcapSetTable) Reset() { *m = ClassifyPcapSetTable{} }
531 func (*ClassifyPcapSetTable) GetMessageName() string { return "classify_pcap_set_table" }
532 func (*ClassifyPcapSetTable) GetCrcString() string { return "006051b3" }
533 func (*ClassifyPcapSetTable) GetMessageType() api.MessageType {
534 return api.RequestMessage
537 func (m *ClassifyPcapSetTable) Size() (size int) {
541 size += 4 // m.SwIfIndex
542 size += 4 // m.TableIndex
543 size += 1 // m.SortMasks
546 func (m *ClassifyPcapSetTable) Marshal(b []byte) ([]byte, error) {
548 b = make([]byte, m.Size())
550 buf := codec.NewBuffer(b)
551 buf.EncodeUint32(uint32(m.SwIfIndex))
552 buf.EncodeUint32(m.TableIndex)
553 buf.EncodeBool(m.SortMasks)
554 return buf.Bytes(), nil
556 func (m *ClassifyPcapSetTable) Unmarshal(b []byte) error {
557 buf := codec.NewBuffer(b)
558 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
559 m.TableIndex = buf.DecodeUint32()
560 m.SortMasks = buf.DecodeBool()
564 // ClassifyPcapSetTableReply defines message 'classify_pcap_set_table_reply'.
565 type ClassifyPcapSetTableReply struct {
566 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
567 TableIndex uint32 `binapi:"u32,name=table_index" json:"table_index,omitempty"`
570 func (m *ClassifyPcapSetTableReply) Reset() { *m = ClassifyPcapSetTableReply{} }
571 func (*ClassifyPcapSetTableReply) GetMessageName() string { return "classify_pcap_set_table_reply" }
572 func (*ClassifyPcapSetTableReply) GetCrcString() string { return "9c6c6773" }
573 func (*ClassifyPcapSetTableReply) GetMessageType() api.MessageType {
574 return api.ReplyMessage
577 func (m *ClassifyPcapSetTableReply) Size() (size int) {
581 size += 4 // m.Retval
582 size += 4 // m.TableIndex
585 func (m *ClassifyPcapSetTableReply) Marshal(b []byte) ([]byte, error) {
587 b = make([]byte, m.Size())
589 buf := codec.NewBuffer(b)
590 buf.EncodeInt32(m.Retval)
591 buf.EncodeUint32(m.TableIndex)
592 return buf.Bytes(), nil
594 func (m *ClassifyPcapSetTableReply) Unmarshal(b []byte) error {
595 buf := codec.NewBuffer(b)
596 m.Retval = buf.DecodeInt32()
597 m.TableIndex = buf.DecodeUint32()
601 // ClassifySessionDetails defines message 'classify_session_details'.
602 type ClassifySessionDetails struct {
603 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
604 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
605 HitNextIndex uint32 `binapi:"u32,name=hit_next_index" json:"hit_next_index,omitempty"`
606 Advance int32 `binapi:"i32,name=advance" json:"advance,omitempty"`
607 OpaqueIndex uint32 `binapi:"u32,name=opaque_index" json:"opaque_index,omitempty"`
608 MatchLength uint32 `binapi:"u32,name=match_length" json:"-"`
609 Match []byte `binapi:"u8[match_length],name=match" json:"match,omitempty"`
612 func (m *ClassifySessionDetails) Reset() { *m = ClassifySessionDetails{} }
613 func (*ClassifySessionDetails) GetMessageName() string { return "classify_session_details" }
614 func (*ClassifySessionDetails) GetCrcString() string { return "60e3ef94" }
615 func (*ClassifySessionDetails) GetMessageType() api.MessageType {
616 return api.ReplyMessage
619 func (m *ClassifySessionDetails) Size() (size int) {
623 size += 4 // m.Retval
624 size += 4 // m.TableID
625 size += 4 // m.HitNextIndex
626 size += 4 // m.Advance
627 size += 4 // m.OpaqueIndex
628 size += 4 // m.MatchLength
629 size += 1 * len(m.Match) // m.Match
632 func (m *ClassifySessionDetails) Marshal(b []byte) ([]byte, error) {
634 b = make([]byte, m.Size())
636 buf := codec.NewBuffer(b)
637 buf.EncodeInt32(m.Retval)
638 buf.EncodeUint32(m.TableID)
639 buf.EncodeUint32(m.HitNextIndex)
640 buf.EncodeInt32(m.Advance)
641 buf.EncodeUint32(m.OpaqueIndex)
642 buf.EncodeUint32(uint32(len(m.Match)))
643 buf.EncodeBytes(m.Match, 0)
644 return buf.Bytes(), nil
646 func (m *ClassifySessionDetails) Unmarshal(b []byte) error {
647 buf := codec.NewBuffer(b)
648 m.Retval = buf.DecodeInt32()
649 m.TableID = buf.DecodeUint32()
650 m.HitNextIndex = buf.DecodeUint32()
651 m.Advance = buf.DecodeInt32()
652 m.OpaqueIndex = buf.DecodeUint32()
653 m.MatchLength = buf.DecodeUint32()
654 m.Match = make([]byte, m.MatchLength)
655 copy(m.Match, buf.DecodeBytes(len(m.Match)))
659 // ClassifySessionDump defines message 'classify_session_dump'.
660 type ClassifySessionDump struct {
661 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
664 func (m *ClassifySessionDump) Reset() { *m = ClassifySessionDump{} }
665 func (*ClassifySessionDump) GetMessageName() string { return "classify_session_dump" }
666 func (*ClassifySessionDump) GetCrcString() string { return "0cca2cd9" }
667 func (*ClassifySessionDump) GetMessageType() api.MessageType {
668 return api.RequestMessage
671 func (m *ClassifySessionDump) Size() (size int) {
675 size += 4 // m.TableID
678 func (m *ClassifySessionDump) Marshal(b []byte) ([]byte, error) {
680 b = make([]byte, m.Size())
682 buf := codec.NewBuffer(b)
683 buf.EncodeUint32(m.TableID)
684 return buf.Bytes(), nil
686 func (m *ClassifySessionDump) Unmarshal(b []byte) error {
687 buf := codec.NewBuffer(b)
688 m.TableID = buf.DecodeUint32()
692 // ClassifySetInterfaceIPTable defines message 'classify_set_interface_ip_table'.
693 type ClassifySetInterfaceIPTable struct {
694 IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"`
695 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
696 TableIndex uint32 `binapi:"u32,name=table_index" json:"table_index,omitempty"`
699 func (m *ClassifySetInterfaceIPTable) Reset() { *m = ClassifySetInterfaceIPTable{} }
700 func (*ClassifySetInterfaceIPTable) GetMessageName() string { return "classify_set_interface_ip_table" }
701 func (*ClassifySetInterfaceIPTable) GetCrcString() string { return "e0b097c7" }
702 func (*ClassifySetInterfaceIPTable) GetMessageType() api.MessageType {
703 return api.RequestMessage
706 func (m *ClassifySetInterfaceIPTable) Size() (size int) {
710 size += 1 // m.IsIPv6
711 size += 4 // m.SwIfIndex
712 size += 4 // m.TableIndex
715 func (m *ClassifySetInterfaceIPTable) Marshal(b []byte) ([]byte, error) {
717 b = make([]byte, m.Size())
719 buf := codec.NewBuffer(b)
720 buf.EncodeBool(m.IsIPv6)
721 buf.EncodeUint32(uint32(m.SwIfIndex))
722 buf.EncodeUint32(m.TableIndex)
723 return buf.Bytes(), nil
725 func (m *ClassifySetInterfaceIPTable) Unmarshal(b []byte) error {
726 buf := codec.NewBuffer(b)
727 m.IsIPv6 = buf.DecodeBool()
728 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
729 m.TableIndex = buf.DecodeUint32()
733 // ClassifySetInterfaceIPTableReply defines message 'classify_set_interface_ip_table_reply'.
734 type ClassifySetInterfaceIPTableReply struct {
735 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
738 func (m *ClassifySetInterfaceIPTableReply) Reset() { *m = ClassifySetInterfaceIPTableReply{} }
739 func (*ClassifySetInterfaceIPTableReply) GetMessageName() string {
740 return "classify_set_interface_ip_table_reply"
742 func (*ClassifySetInterfaceIPTableReply) GetCrcString() string { return "e8d4e804" }
743 func (*ClassifySetInterfaceIPTableReply) GetMessageType() api.MessageType {
744 return api.ReplyMessage
747 func (m *ClassifySetInterfaceIPTableReply) Size() (size int) {
751 size += 4 // m.Retval
754 func (m *ClassifySetInterfaceIPTableReply) Marshal(b []byte) ([]byte, error) {
756 b = make([]byte, m.Size())
758 buf := codec.NewBuffer(b)
759 buf.EncodeInt32(m.Retval)
760 return buf.Bytes(), nil
762 func (m *ClassifySetInterfaceIPTableReply) Unmarshal(b []byte) error {
763 buf := codec.NewBuffer(b)
764 m.Retval = buf.DecodeInt32()
768 // ClassifySetInterfaceL2Tables defines message 'classify_set_interface_l2_tables'.
769 type ClassifySetInterfaceL2Tables struct {
770 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
771 IP4TableIndex uint32 `binapi:"u32,name=ip4_table_index" json:"ip4_table_index,omitempty"`
772 IP6TableIndex uint32 `binapi:"u32,name=ip6_table_index" json:"ip6_table_index,omitempty"`
773 OtherTableIndex uint32 `binapi:"u32,name=other_table_index" json:"other_table_index,omitempty"`
774 IsInput bool `binapi:"bool,name=is_input" json:"is_input,omitempty"`
777 func (m *ClassifySetInterfaceL2Tables) Reset() { *m = ClassifySetInterfaceL2Tables{} }
778 func (*ClassifySetInterfaceL2Tables) GetMessageName() string {
779 return "classify_set_interface_l2_tables"
781 func (*ClassifySetInterfaceL2Tables) GetCrcString() string { return "5a6ddf65" }
782 func (*ClassifySetInterfaceL2Tables) GetMessageType() api.MessageType {
783 return api.RequestMessage
786 func (m *ClassifySetInterfaceL2Tables) Size() (size int) {
790 size += 4 // m.SwIfIndex
791 size += 4 // m.IP4TableIndex
792 size += 4 // m.IP6TableIndex
793 size += 4 // m.OtherTableIndex
794 size += 1 // m.IsInput
797 func (m *ClassifySetInterfaceL2Tables) Marshal(b []byte) ([]byte, error) {
799 b = make([]byte, m.Size())
801 buf := codec.NewBuffer(b)
802 buf.EncodeUint32(uint32(m.SwIfIndex))
803 buf.EncodeUint32(m.IP4TableIndex)
804 buf.EncodeUint32(m.IP6TableIndex)
805 buf.EncodeUint32(m.OtherTableIndex)
806 buf.EncodeBool(m.IsInput)
807 return buf.Bytes(), nil
809 func (m *ClassifySetInterfaceL2Tables) Unmarshal(b []byte) error {
810 buf := codec.NewBuffer(b)
811 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
812 m.IP4TableIndex = buf.DecodeUint32()
813 m.IP6TableIndex = buf.DecodeUint32()
814 m.OtherTableIndex = buf.DecodeUint32()
815 m.IsInput = buf.DecodeBool()
819 // ClassifySetInterfaceL2TablesReply defines message 'classify_set_interface_l2_tables_reply'.
820 type ClassifySetInterfaceL2TablesReply struct {
821 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
824 func (m *ClassifySetInterfaceL2TablesReply) Reset() { *m = ClassifySetInterfaceL2TablesReply{} }
825 func (*ClassifySetInterfaceL2TablesReply) GetMessageName() string {
826 return "classify_set_interface_l2_tables_reply"
828 func (*ClassifySetInterfaceL2TablesReply) GetCrcString() string { return "e8d4e804" }
829 func (*ClassifySetInterfaceL2TablesReply) GetMessageType() api.MessageType {
830 return api.ReplyMessage
833 func (m *ClassifySetInterfaceL2TablesReply) Size() (size int) {
837 size += 4 // m.Retval
840 func (m *ClassifySetInterfaceL2TablesReply) Marshal(b []byte) ([]byte, error) {
842 b = make([]byte, m.Size())
844 buf := codec.NewBuffer(b)
845 buf.EncodeInt32(m.Retval)
846 return buf.Bytes(), nil
848 func (m *ClassifySetInterfaceL2TablesReply) Unmarshal(b []byte) error {
849 buf := codec.NewBuffer(b)
850 m.Retval = buf.DecodeInt32()
854 // ClassifyTableByInterface defines message 'classify_table_by_interface'.
855 type ClassifyTableByInterface struct {
856 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
859 func (m *ClassifyTableByInterface) Reset() { *m = ClassifyTableByInterface{} }
860 func (*ClassifyTableByInterface) GetMessageName() string { return "classify_table_by_interface" }
861 func (*ClassifyTableByInterface) GetCrcString() string { return "f9e6675e" }
862 func (*ClassifyTableByInterface) GetMessageType() api.MessageType {
863 return api.RequestMessage
866 func (m *ClassifyTableByInterface) Size() (size int) {
870 size += 4 // m.SwIfIndex
873 func (m *ClassifyTableByInterface) Marshal(b []byte) ([]byte, error) {
875 b = make([]byte, m.Size())
877 buf := codec.NewBuffer(b)
878 buf.EncodeUint32(uint32(m.SwIfIndex))
879 return buf.Bytes(), nil
881 func (m *ClassifyTableByInterface) Unmarshal(b []byte) error {
882 buf := codec.NewBuffer(b)
883 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
887 // ClassifyTableByInterfaceReply defines message 'classify_table_by_interface_reply'.
888 type ClassifyTableByInterfaceReply struct {
889 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
890 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
891 L2TableID uint32 `binapi:"u32,name=l2_table_id" json:"l2_table_id,omitempty"`
892 IP4TableID uint32 `binapi:"u32,name=ip4_table_id" json:"ip4_table_id,omitempty"`
893 IP6TableID uint32 `binapi:"u32,name=ip6_table_id" json:"ip6_table_id,omitempty"`
896 func (m *ClassifyTableByInterfaceReply) Reset() { *m = ClassifyTableByInterfaceReply{} }
897 func (*ClassifyTableByInterfaceReply) GetMessageName() string {
898 return "classify_table_by_interface_reply"
900 func (*ClassifyTableByInterfaceReply) GetCrcString() string { return "ed4197db" }
901 func (*ClassifyTableByInterfaceReply) GetMessageType() api.MessageType {
902 return api.ReplyMessage
905 func (m *ClassifyTableByInterfaceReply) Size() (size int) {
909 size += 4 // m.Retval
910 size += 4 // m.SwIfIndex
911 size += 4 // m.L2TableID
912 size += 4 // m.IP4TableID
913 size += 4 // m.IP6TableID
916 func (m *ClassifyTableByInterfaceReply) Marshal(b []byte) ([]byte, error) {
918 b = make([]byte, m.Size())
920 buf := codec.NewBuffer(b)
921 buf.EncodeInt32(m.Retval)
922 buf.EncodeUint32(uint32(m.SwIfIndex))
923 buf.EncodeUint32(m.L2TableID)
924 buf.EncodeUint32(m.IP4TableID)
925 buf.EncodeUint32(m.IP6TableID)
926 return buf.Bytes(), nil
928 func (m *ClassifyTableByInterfaceReply) Unmarshal(b []byte) error {
929 buf := codec.NewBuffer(b)
930 m.Retval = buf.DecodeInt32()
931 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
932 m.L2TableID = buf.DecodeUint32()
933 m.IP4TableID = buf.DecodeUint32()
934 m.IP6TableID = buf.DecodeUint32()
938 // ClassifyTableIds defines message 'classify_table_ids'.
939 type ClassifyTableIds struct{}
941 func (m *ClassifyTableIds) Reset() { *m = ClassifyTableIds{} }
942 func (*ClassifyTableIds) GetMessageName() string { return "classify_table_ids" }
943 func (*ClassifyTableIds) GetCrcString() string { return "51077d14" }
944 func (*ClassifyTableIds) GetMessageType() api.MessageType {
945 return api.RequestMessage
948 func (m *ClassifyTableIds) Size() (size int) {
954 func (m *ClassifyTableIds) Marshal(b []byte) ([]byte, error) {
956 b = make([]byte, m.Size())
958 buf := codec.NewBuffer(b)
959 return buf.Bytes(), nil
961 func (m *ClassifyTableIds) Unmarshal(b []byte) error {
965 // ClassifyTableIdsReply defines message 'classify_table_ids_reply'.
966 type ClassifyTableIdsReply struct {
967 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
968 Count uint32 `binapi:"u32,name=count" json:"-"`
969 Ids []uint32 `binapi:"u32[count],name=ids" json:"ids,omitempty"`
972 func (m *ClassifyTableIdsReply) Reset() { *m = ClassifyTableIdsReply{} }
973 func (*ClassifyTableIdsReply) GetMessageName() string { return "classify_table_ids_reply" }
974 func (*ClassifyTableIdsReply) GetCrcString() string { return "d1d20e1d" }
975 func (*ClassifyTableIdsReply) GetMessageType() api.MessageType {
976 return api.ReplyMessage
979 func (m *ClassifyTableIdsReply) Size() (size int) {
983 size += 4 // m.Retval
985 size += 4 * len(m.Ids) // m.Ids
988 func (m *ClassifyTableIdsReply) Marshal(b []byte) ([]byte, error) {
990 b = make([]byte, m.Size())
992 buf := codec.NewBuffer(b)
993 buf.EncodeInt32(m.Retval)
994 buf.EncodeUint32(uint32(len(m.Ids)))
995 for i := 0; i < len(m.Ids); i++ {
1002 return buf.Bytes(), nil
1004 func (m *ClassifyTableIdsReply) Unmarshal(b []byte) error {
1005 buf := codec.NewBuffer(b)
1006 m.Retval = buf.DecodeInt32()
1007 m.Count = buf.DecodeUint32()
1008 m.Ids = make([]uint32, m.Count)
1009 for i := 0; i < len(m.Ids); i++ {
1010 m.Ids[i] = buf.DecodeUint32()
1015 // ClassifyTableInfo defines message 'classify_table_info'.
1016 type ClassifyTableInfo struct {
1017 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
1020 func (m *ClassifyTableInfo) Reset() { *m = ClassifyTableInfo{} }
1021 func (*ClassifyTableInfo) GetMessageName() string { return "classify_table_info" }
1022 func (*ClassifyTableInfo) GetCrcString() string { return "0cca2cd9" }
1023 func (*ClassifyTableInfo) GetMessageType() api.MessageType {
1024 return api.RequestMessage
1027 func (m *ClassifyTableInfo) Size() (size int) {
1031 size += 4 // m.TableID
1034 func (m *ClassifyTableInfo) Marshal(b []byte) ([]byte, error) {
1036 b = make([]byte, m.Size())
1038 buf := codec.NewBuffer(b)
1039 buf.EncodeUint32(m.TableID)
1040 return buf.Bytes(), nil
1042 func (m *ClassifyTableInfo) Unmarshal(b []byte) error {
1043 buf := codec.NewBuffer(b)
1044 m.TableID = buf.DecodeUint32()
1048 // ClassifyTableInfoReply defines message 'classify_table_info_reply'.
1049 type ClassifyTableInfoReply struct {
1050 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1051 TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"`
1052 Nbuckets uint32 `binapi:"u32,name=nbuckets" json:"nbuckets,omitempty"`
1053 MatchNVectors uint32 `binapi:"u32,name=match_n_vectors" json:"match_n_vectors,omitempty"`
1054 SkipNVectors uint32 `binapi:"u32,name=skip_n_vectors" json:"skip_n_vectors,omitempty"`
1055 ActiveSessions uint32 `binapi:"u32,name=active_sessions" json:"active_sessions,omitempty"`
1056 NextTableIndex uint32 `binapi:"u32,name=next_table_index" json:"next_table_index,omitempty"`
1057 MissNextIndex uint32 `binapi:"u32,name=miss_next_index" json:"miss_next_index,omitempty"`
1058 MaskLength uint32 `binapi:"u32,name=mask_length" json:"-"`
1059 Mask []byte `binapi:"u8[mask_length],name=mask" json:"mask,omitempty"`
1062 func (m *ClassifyTableInfoReply) Reset() { *m = ClassifyTableInfoReply{} }
1063 func (*ClassifyTableInfoReply) GetMessageName() string { return "classify_table_info_reply" }
1064 func (*ClassifyTableInfoReply) GetCrcString() string { return "4a573c0e" }
1065 func (*ClassifyTableInfoReply) GetMessageType() api.MessageType {
1066 return api.ReplyMessage
1069 func (m *ClassifyTableInfoReply) Size() (size int) {
1073 size += 4 // m.Retval
1074 size += 4 // m.TableID
1075 size += 4 // m.Nbuckets
1076 size += 4 // m.MatchNVectors
1077 size += 4 // m.SkipNVectors
1078 size += 4 // m.ActiveSessions
1079 size += 4 // m.NextTableIndex
1080 size += 4 // m.MissNextIndex
1081 size += 4 // m.MaskLength
1082 size += 1 * len(m.Mask) // m.Mask
1085 func (m *ClassifyTableInfoReply) Marshal(b []byte) ([]byte, error) {
1087 b = make([]byte, m.Size())
1089 buf := codec.NewBuffer(b)
1090 buf.EncodeInt32(m.Retval)
1091 buf.EncodeUint32(m.TableID)
1092 buf.EncodeUint32(m.Nbuckets)
1093 buf.EncodeUint32(m.MatchNVectors)
1094 buf.EncodeUint32(m.SkipNVectors)
1095 buf.EncodeUint32(m.ActiveSessions)
1096 buf.EncodeUint32(m.NextTableIndex)
1097 buf.EncodeUint32(m.MissNextIndex)
1098 buf.EncodeUint32(uint32(len(m.Mask)))
1099 buf.EncodeBytes(m.Mask, 0)
1100 return buf.Bytes(), nil
1102 func (m *ClassifyTableInfoReply) Unmarshal(b []byte) error {
1103 buf := codec.NewBuffer(b)
1104 m.Retval = buf.DecodeInt32()
1105 m.TableID = buf.DecodeUint32()
1106 m.Nbuckets = buf.DecodeUint32()
1107 m.MatchNVectors = buf.DecodeUint32()
1108 m.SkipNVectors = buf.DecodeUint32()
1109 m.ActiveSessions = buf.DecodeUint32()
1110 m.NextTableIndex = buf.DecodeUint32()
1111 m.MissNextIndex = buf.DecodeUint32()
1112 m.MaskLength = buf.DecodeUint32()
1113 m.Mask = make([]byte, m.MaskLength)
1114 copy(m.Mask, buf.DecodeBytes(len(m.Mask)))
1118 // ClassifyTraceGetTables defines message 'classify_trace_get_tables'.
1119 type ClassifyTraceGetTables struct{}
1121 func (m *ClassifyTraceGetTables) Reset() { *m = ClassifyTraceGetTables{} }
1122 func (*ClassifyTraceGetTables) GetMessageName() string { return "classify_trace_get_tables" }
1123 func (*ClassifyTraceGetTables) GetCrcString() string { return "51077d14" }
1124 func (*ClassifyTraceGetTables) GetMessageType() api.MessageType {
1125 return api.RequestMessage
1128 func (m *ClassifyTraceGetTables) Size() (size int) {
1134 func (m *ClassifyTraceGetTables) Marshal(b []byte) ([]byte, error) {
1136 b = make([]byte, m.Size())
1138 buf := codec.NewBuffer(b)
1139 return buf.Bytes(), nil
1141 func (m *ClassifyTraceGetTables) Unmarshal(b []byte) error {
1145 // ClassifyTraceGetTablesReply defines message 'classify_trace_get_tables_reply'.
1146 type ClassifyTraceGetTablesReply struct {
1147 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1148 Count uint32 `binapi:"u32,name=count" json:"-"`
1149 Indices []uint32 `binapi:"u32[count],name=indices" json:"indices,omitempty"`
1152 func (m *ClassifyTraceGetTablesReply) Reset() { *m = ClassifyTraceGetTablesReply{} }
1153 func (*ClassifyTraceGetTablesReply) GetMessageName() string { return "classify_trace_get_tables_reply" }
1154 func (*ClassifyTraceGetTablesReply) GetCrcString() string { return "5f5bc9e6" }
1155 func (*ClassifyTraceGetTablesReply) GetMessageType() api.MessageType {
1156 return api.ReplyMessage
1159 func (m *ClassifyTraceGetTablesReply) Size() (size int) {
1163 size += 4 // m.Retval
1164 size += 4 // m.Count
1165 size += 4 * len(m.Indices) // m.Indices
1168 func (m *ClassifyTraceGetTablesReply) Marshal(b []byte) ([]byte, error) {
1170 b = make([]byte, m.Size())
1172 buf := codec.NewBuffer(b)
1173 buf.EncodeInt32(m.Retval)
1174 buf.EncodeUint32(uint32(len(m.Indices)))
1175 for i := 0; i < len(m.Indices); i++ {
1177 if i < len(m.Indices) {
1178 x = uint32(m.Indices[i])
1182 return buf.Bytes(), nil
1184 func (m *ClassifyTraceGetTablesReply) Unmarshal(b []byte) error {
1185 buf := codec.NewBuffer(b)
1186 m.Retval = buf.DecodeInt32()
1187 m.Count = buf.DecodeUint32()
1188 m.Indices = make([]uint32, m.Count)
1189 for i := 0; i < len(m.Indices); i++ {
1190 m.Indices[i] = buf.DecodeUint32()
1195 // ClassifyTraceLookupTable defines message 'classify_trace_lookup_table'.
1196 type ClassifyTraceLookupTable struct {
1197 SkipNVectors uint32 `binapi:"u32,name=skip_n_vectors,default=0" json:"skip_n_vectors,omitempty"`
1198 MatchNVectors uint32 `binapi:"u32,name=match_n_vectors,default=1" json:"match_n_vectors,omitempty"`
1199 MaskLen uint32 `binapi:"u32,name=mask_len" json:"-"`
1200 Mask []byte `binapi:"u8[mask_len],name=mask" json:"mask,omitempty"`
1203 func (m *ClassifyTraceLookupTable) Reset() { *m = ClassifyTraceLookupTable{} }
1204 func (*ClassifyTraceLookupTable) GetMessageName() string { return "classify_trace_lookup_table" }
1205 func (*ClassifyTraceLookupTable) GetCrcString() string { return "3f7b72e4" }
1206 func (*ClassifyTraceLookupTable) GetMessageType() api.MessageType {
1207 return api.RequestMessage
1210 func (m *ClassifyTraceLookupTable) Size() (size int) {
1214 size += 4 // m.SkipNVectors
1215 size += 4 // m.MatchNVectors
1216 size += 4 // m.MaskLen
1217 size += 1 * len(m.Mask) // m.Mask
1220 func (m *ClassifyTraceLookupTable) Marshal(b []byte) ([]byte, error) {
1222 b = make([]byte, m.Size())
1224 buf := codec.NewBuffer(b)
1225 buf.EncodeUint32(m.SkipNVectors)
1226 buf.EncodeUint32(m.MatchNVectors)
1227 buf.EncodeUint32(uint32(len(m.Mask)))
1228 buf.EncodeBytes(m.Mask, 0)
1229 return buf.Bytes(), nil
1231 func (m *ClassifyTraceLookupTable) Unmarshal(b []byte) error {
1232 buf := codec.NewBuffer(b)
1233 m.SkipNVectors = buf.DecodeUint32()
1234 m.MatchNVectors = buf.DecodeUint32()
1235 m.MaskLen = buf.DecodeUint32()
1236 m.Mask = make([]byte, m.MaskLen)
1237 copy(m.Mask, buf.DecodeBytes(len(m.Mask)))
1241 // ClassifyTraceLookupTableReply defines message 'classify_trace_lookup_table_reply'.
1242 type ClassifyTraceLookupTableReply struct {
1243 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1244 TableIndex uint32 `binapi:"u32,name=table_index" json:"table_index,omitempty"`
1247 func (m *ClassifyTraceLookupTableReply) Reset() { *m = ClassifyTraceLookupTableReply{} }
1248 func (*ClassifyTraceLookupTableReply) GetMessageName() string {
1249 return "classify_trace_lookup_table_reply"
1251 func (*ClassifyTraceLookupTableReply) GetCrcString() string { return "9c6c6773" }
1252 func (*ClassifyTraceLookupTableReply) GetMessageType() api.MessageType {
1253 return api.ReplyMessage
1256 func (m *ClassifyTraceLookupTableReply) Size() (size int) {
1260 size += 4 // m.Retval
1261 size += 4 // m.TableIndex
1264 func (m *ClassifyTraceLookupTableReply) Marshal(b []byte) ([]byte, error) {
1266 b = make([]byte, m.Size())
1268 buf := codec.NewBuffer(b)
1269 buf.EncodeInt32(m.Retval)
1270 buf.EncodeUint32(m.TableIndex)
1271 return buf.Bytes(), nil
1273 func (m *ClassifyTraceLookupTableReply) Unmarshal(b []byte) error {
1274 buf := codec.NewBuffer(b)
1275 m.Retval = buf.DecodeInt32()
1276 m.TableIndex = buf.DecodeUint32()
1280 // ClassifyTraceSetTable defines message 'classify_trace_set_table'.
1281 type ClassifyTraceSetTable struct {
1282 TableIndex uint32 `binapi:"u32,name=table_index,default=4294967295" json:"table_index,omitempty"`
1283 SortMasks bool `binapi:"bool,name=sort_masks,default=0" json:"sort_masks,omitempty"`
1286 func (m *ClassifyTraceSetTable) Reset() { *m = ClassifyTraceSetTable{} }
1287 func (*ClassifyTraceSetTable) GetMessageName() string { return "classify_trace_set_table" }
1288 func (*ClassifyTraceSetTable) GetCrcString() string { return "3909b55a" }
1289 func (*ClassifyTraceSetTable) GetMessageType() api.MessageType {
1290 return api.RequestMessage
1293 func (m *ClassifyTraceSetTable) Size() (size int) {
1297 size += 4 // m.TableIndex
1298 size += 1 // m.SortMasks
1301 func (m *ClassifyTraceSetTable) Marshal(b []byte) ([]byte, error) {
1303 b = make([]byte, m.Size())
1305 buf := codec.NewBuffer(b)
1306 buf.EncodeUint32(m.TableIndex)
1307 buf.EncodeBool(m.SortMasks)
1308 return buf.Bytes(), nil
1310 func (m *ClassifyTraceSetTable) Unmarshal(b []byte) error {
1311 buf := codec.NewBuffer(b)
1312 m.TableIndex = buf.DecodeUint32()
1313 m.SortMasks = buf.DecodeBool()
1317 // ClassifyTraceSetTableReply defines message 'classify_trace_set_table_reply'.
1318 type ClassifyTraceSetTableReply struct {
1319 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1320 TableIndex uint32 `binapi:"u32,name=table_index" json:"table_index,omitempty"`
1323 func (m *ClassifyTraceSetTableReply) Reset() { *m = ClassifyTraceSetTableReply{} }
1324 func (*ClassifyTraceSetTableReply) GetMessageName() string { return "classify_trace_set_table_reply" }
1325 func (*ClassifyTraceSetTableReply) GetCrcString() string { return "9c6c6773" }
1326 func (*ClassifyTraceSetTableReply) GetMessageType() api.MessageType {
1327 return api.ReplyMessage
1330 func (m *ClassifyTraceSetTableReply) Size() (size int) {
1334 size += 4 // m.Retval
1335 size += 4 // m.TableIndex
1338 func (m *ClassifyTraceSetTableReply) Marshal(b []byte) ([]byte, error) {
1340 b = make([]byte, m.Size())
1342 buf := codec.NewBuffer(b)
1343 buf.EncodeInt32(m.Retval)
1344 buf.EncodeUint32(m.TableIndex)
1345 return buf.Bytes(), nil
1347 func (m *ClassifyTraceSetTableReply) Unmarshal(b []byte) error {
1348 buf := codec.NewBuffer(b)
1349 m.Retval = buf.DecodeInt32()
1350 m.TableIndex = buf.DecodeUint32()
1354 // FlowClassifyDetails defines message 'flow_classify_details'.
1355 type FlowClassifyDetails struct {
1356 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1357 TableIndex uint32 `binapi:"u32,name=table_index" json:"table_index,omitempty"`
1360 func (m *FlowClassifyDetails) Reset() { *m = FlowClassifyDetails{} }
1361 func (*FlowClassifyDetails) GetMessageName() string { return "flow_classify_details" }
1362 func (*FlowClassifyDetails) GetCrcString() string { return "dfd08765" }
1363 func (*FlowClassifyDetails) GetMessageType() api.MessageType {
1364 return api.ReplyMessage
1367 func (m *FlowClassifyDetails) Size() (size int) {
1371 size += 4 // m.SwIfIndex
1372 size += 4 // m.TableIndex
1375 func (m *FlowClassifyDetails) Marshal(b []byte) ([]byte, error) {
1377 b = make([]byte, m.Size())
1379 buf := codec.NewBuffer(b)
1380 buf.EncodeUint32(uint32(m.SwIfIndex))
1381 buf.EncodeUint32(m.TableIndex)
1382 return buf.Bytes(), nil
1384 func (m *FlowClassifyDetails) Unmarshal(b []byte) error {
1385 buf := codec.NewBuffer(b)
1386 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1387 m.TableIndex = buf.DecodeUint32()
1391 // FlowClassifyDump defines message 'flow_classify_dump'.
1392 type FlowClassifyDump struct {
1393 Type FlowClassifyTable `binapi:"flow_classify_table,name=type" json:"type,omitempty"`
1394 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1397 func (m *FlowClassifyDump) Reset() { *m = FlowClassifyDump{} }
1398 func (*FlowClassifyDump) GetMessageName() string { return "flow_classify_dump" }
1399 func (*FlowClassifyDump) GetCrcString() string { return "8a6ad43d" }
1400 func (*FlowClassifyDump) GetMessageType() api.MessageType {
1401 return api.RequestMessage
1404 func (m *FlowClassifyDump) Size() (size int) {
1409 size += 4 // m.SwIfIndex
1412 func (m *FlowClassifyDump) Marshal(b []byte) ([]byte, error) {
1414 b = make([]byte, m.Size())
1416 buf := codec.NewBuffer(b)
1417 buf.EncodeUint8(uint8(m.Type))
1418 buf.EncodeUint32(uint32(m.SwIfIndex))
1419 return buf.Bytes(), nil
1421 func (m *FlowClassifyDump) Unmarshal(b []byte) error {
1422 buf := codec.NewBuffer(b)
1423 m.Type = FlowClassifyTable(buf.DecodeUint8())
1424 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1428 // FlowClassifySetInterface defines message 'flow_classify_set_interface'.
1429 type FlowClassifySetInterface struct {
1430 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1431 IP4TableIndex uint32 `binapi:"u32,name=ip4_table_index" json:"ip4_table_index,omitempty"`
1432 IP6TableIndex uint32 `binapi:"u32,name=ip6_table_index" json:"ip6_table_index,omitempty"`
1433 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1436 func (m *FlowClassifySetInterface) Reset() { *m = FlowClassifySetInterface{} }
1437 func (*FlowClassifySetInterface) GetMessageName() string { return "flow_classify_set_interface" }
1438 func (*FlowClassifySetInterface) GetCrcString() string { return "b6192f1c" }
1439 func (*FlowClassifySetInterface) GetMessageType() api.MessageType {
1440 return api.RequestMessage
1443 func (m *FlowClassifySetInterface) Size() (size int) {
1447 size += 4 // m.SwIfIndex
1448 size += 4 // m.IP4TableIndex
1449 size += 4 // m.IP6TableIndex
1450 size += 1 // m.IsAdd
1453 func (m *FlowClassifySetInterface) Marshal(b []byte) ([]byte, error) {
1455 b = make([]byte, m.Size())
1457 buf := codec.NewBuffer(b)
1458 buf.EncodeUint32(uint32(m.SwIfIndex))
1459 buf.EncodeUint32(m.IP4TableIndex)
1460 buf.EncodeUint32(m.IP6TableIndex)
1461 buf.EncodeBool(m.IsAdd)
1462 return buf.Bytes(), nil
1464 func (m *FlowClassifySetInterface) Unmarshal(b []byte) error {
1465 buf := codec.NewBuffer(b)
1466 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1467 m.IP4TableIndex = buf.DecodeUint32()
1468 m.IP6TableIndex = buf.DecodeUint32()
1469 m.IsAdd = buf.DecodeBool()
1473 // FlowClassifySetInterfaceReply defines message 'flow_classify_set_interface_reply'.
1474 type FlowClassifySetInterfaceReply struct {
1475 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1478 func (m *FlowClassifySetInterfaceReply) Reset() { *m = FlowClassifySetInterfaceReply{} }
1479 func (*FlowClassifySetInterfaceReply) GetMessageName() string {
1480 return "flow_classify_set_interface_reply"
1482 func (*FlowClassifySetInterfaceReply) GetCrcString() string { return "e8d4e804" }
1483 func (*FlowClassifySetInterfaceReply) GetMessageType() api.MessageType {
1484 return api.ReplyMessage
1487 func (m *FlowClassifySetInterfaceReply) Size() (size int) {
1491 size += 4 // m.Retval
1494 func (m *FlowClassifySetInterfaceReply) Marshal(b []byte) ([]byte, error) {
1496 b = make([]byte, m.Size())
1498 buf := codec.NewBuffer(b)
1499 buf.EncodeInt32(m.Retval)
1500 return buf.Bytes(), nil
1502 func (m *FlowClassifySetInterfaceReply) Unmarshal(b []byte) error {
1503 buf := codec.NewBuffer(b)
1504 m.Retval = buf.DecodeInt32()
1508 // InputACLSetInterface defines message 'input_acl_set_interface'.
1509 type InputACLSetInterface struct {
1510 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1511 IP4TableIndex uint32 `binapi:"u32,name=ip4_table_index" json:"ip4_table_index,omitempty"`
1512 IP6TableIndex uint32 `binapi:"u32,name=ip6_table_index" json:"ip6_table_index,omitempty"`
1513 L2TableIndex uint32 `binapi:"u32,name=l2_table_index" json:"l2_table_index,omitempty"`
1514 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1517 func (m *InputACLSetInterface) Reset() { *m = InputACLSetInterface{} }
1518 func (*InputACLSetInterface) GetMessageName() string { return "input_acl_set_interface" }
1519 func (*InputACLSetInterface) GetCrcString() string { return "de7ad708" }
1520 func (*InputACLSetInterface) GetMessageType() api.MessageType {
1521 return api.RequestMessage
1524 func (m *InputACLSetInterface) Size() (size int) {
1528 size += 4 // m.SwIfIndex
1529 size += 4 // m.IP4TableIndex
1530 size += 4 // m.IP6TableIndex
1531 size += 4 // m.L2TableIndex
1532 size += 1 // m.IsAdd
1535 func (m *InputACLSetInterface) Marshal(b []byte) ([]byte, error) {
1537 b = make([]byte, m.Size())
1539 buf := codec.NewBuffer(b)
1540 buf.EncodeUint32(uint32(m.SwIfIndex))
1541 buf.EncodeUint32(m.IP4TableIndex)
1542 buf.EncodeUint32(m.IP6TableIndex)
1543 buf.EncodeUint32(m.L2TableIndex)
1544 buf.EncodeBool(m.IsAdd)
1545 return buf.Bytes(), nil
1547 func (m *InputACLSetInterface) Unmarshal(b []byte) error {
1548 buf := codec.NewBuffer(b)
1549 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1550 m.IP4TableIndex = buf.DecodeUint32()
1551 m.IP6TableIndex = buf.DecodeUint32()
1552 m.L2TableIndex = buf.DecodeUint32()
1553 m.IsAdd = buf.DecodeBool()
1557 // InputACLSetInterfaceReply defines message 'input_acl_set_interface_reply'.
1558 type InputACLSetInterfaceReply struct {
1559 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1562 func (m *InputACLSetInterfaceReply) Reset() { *m = InputACLSetInterfaceReply{} }
1563 func (*InputACLSetInterfaceReply) GetMessageName() string { return "input_acl_set_interface_reply" }
1564 func (*InputACLSetInterfaceReply) GetCrcString() string { return "e8d4e804" }
1565 func (*InputACLSetInterfaceReply) GetMessageType() api.MessageType {
1566 return api.ReplyMessage
1569 func (m *InputACLSetInterfaceReply) Size() (size int) {
1573 size += 4 // m.Retval
1576 func (m *InputACLSetInterfaceReply) Marshal(b []byte) ([]byte, error) {
1578 b = make([]byte, m.Size())
1580 buf := codec.NewBuffer(b)
1581 buf.EncodeInt32(m.Retval)
1582 return buf.Bytes(), nil
1584 func (m *InputACLSetInterfaceReply) Unmarshal(b []byte) error {
1585 buf := codec.NewBuffer(b)
1586 m.Retval = buf.DecodeInt32()
1590 // OutputACLSetInterface defines message 'output_acl_set_interface'.
1591 type OutputACLSetInterface struct {
1592 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1593 IP4TableIndex uint32 `binapi:"u32,name=ip4_table_index" json:"ip4_table_index,omitempty"`
1594 IP6TableIndex uint32 `binapi:"u32,name=ip6_table_index" json:"ip6_table_index,omitempty"`
1595 L2TableIndex uint32 `binapi:"u32,name=l2_table_index" json:"l2_table_index,omitempty"`
1596 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1599 func (m *OutputACLSetInterface) Reset() { *m = OutputACLSetInterface{} }
1600 func (*OutputACLSetInterface) GetMessageName() string { return "output_acl_set_interface" }
1601 func (*OutputACLSetInterface) GetCrcString() string { return "de7ad708" }
1602 func (*OutputACLSetInterface) GetMessageType() api.MessageType {
1603 return api.RequestMessage
1606 func (m *OutputACLSetInterface) Size() (size int) {
1610 size += 4 // m.SwIfIndex
1611 size += 4 // m.IP4TableIndex
1612 size += 4 // m.IP6TableIndex
1613 size += 4 // m.L2TableIndex
1614 size += 1 // m.IsAdd
1617 func (m *OutputACLSetInterface) Marshal(b []byte) ([]byte, error) {
1619 b = make([]byte, m.Size())
1621 buf := codec.NewBuffer(b)
1622 buf.EncodeUint32(uint32(m.SwIfIndex))
1623 buf.EncodeUint32(m.IP4TableIndex)
1624 buf.EncodeUint32(m.IP6TableIndex)
1625 buf.EncodeUint32(m.L2TableIndex)
1626 buf.EncodeBool(m.IsAdd)
1627 return buf.Bytes(), nil
1629 func (m *OutputACLSetInterface) Unmarshal(b []byte) error {
1630 buf := codec.NewBuffer(b)
1631 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1632 m.IP4TableIndex = buf.DecodeUint32()
1633 m.IP6TableIndex = buf.DecodeUint32()
1634 m.L2TableIndex = buf.DecodeUint32()
1635 m.IsAdd = buf.DecodeBool()
1639 // OutputACLSetInterfaceReply defines message 'output_acl_set_interface_reply'.
1640 type OutputACLSetInterfaceReply struct {
1641 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1644 func (m *OutputACLSetInterfaceReply) Reset() { *m = OutputACLSetInterfaceReply{} }
1645 func (*OutputACLSetInterfaceReply) GetMessageName() string { return "output_acl_set_interface_reply" }
1646 func (*OutputACLSetInterfaceReply) GetCrcString() string { return "e8d4e804" }
1647 func (*OutputACLSetInterfaceReply) GetMessageType() api.MessageType {
1648 return api.ReplyMessage
1651 func (m *OutputACLSetInterfaceReply) Size() (size int) {
1655 size += 4 // m.Retval
1658 func (m *OutputACLSetInterfaceReply) Marshal(b []byte) ([]byte, error) {
1660 b = make([]byte, m.Size())
1662 buf := codec.NewBuffer(b)
1663 buf.EncodeInt32(m.Retval)
1664 return buf.Bytes(), nil
1666 func (m *OutputACLSetInterfaceReply) Unmarshal(b []byte) error {
1667 buf := codec.NewBuffer(b)
1668 m.Retval = buf.DecodeInt32()
1672 // PolicerClassifyDetails defines message 'policer_classify_details'.
1673 type PolicerClassifyDetails struct {
1674 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1675 TableIndex uint32 `binapi:"u32,name=table_index" json:"table_index,omitempty"`
1678 func (m *PolicerClassifyDetails) Reset() { *m = PolicerClassifyDetails{} }
1679 func (*PolicerClassifyDetails) GetMessageName() string { return "policer_classify_details" }
1680 func (*PolicerClassifyDetails) GetCrcString() string { return "dfd08765" }
1681 func (*PolicerClassifyDetails) GetMessageType() api.MessageType {
1682 return api.ReplyMessage
1685 func (m *PolicerClassifyDetails) Size() (size int) {
1689 size += 4 // m.SwIfIndex
1690 size += 4 // m.TableIndex
1693 func (m *PolicerClassifyDetails) Marshal(b []byte) ([]byte, error) {
1695 b = make([]byte, m.Size())
1697 buf := codec.NewBuffer(b)
1698 buf.EncodeUint32(uint32(m.SwIfIndex))
1699 buf.EncodeUint32(m.TableIndex)
1700 return buf.Bytes(), nil
1702 func (m *PolicerClassifyDetails) Unmarshal(b []byte) error {
1703 buf := codec.NewBuffer(b)
1704 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1705 m.TableIndex = buf.DecodeUint32()
1709 // PolicerClassifyDump defines message 'policer_classify_dump'.
1710 type PolicerClassifyDump struct {
1711 Type PolicerClassifyTable `binapi:"policer_classify_table,name=type" json:"type,omitempty"`
1712 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1715 func (m *PolicerClassifyDump) Reset() { *m = PolicerClassifyDump{} }
1716 func (*PolicerClassifyDump) GetMessageName() string { return "policer_classify_dump" }
1717 func (*PolicerClassifyDump) GetCrcString() string { return "6bfe6603" }
1718 func (*PolicerClassifyDump) GetMessageType() api.MessageType {
1719 return api.RequestMessage
1722 func (m *PolicerClassifyDump) Size() (size int) {
1727 size += 4 // m.SwIfIndex
1730 func (m *PolicerClassifyDump) Marshal(b []byte) ([]byte, error) {
1732 b = make([]byte, m.Size())
1734 buf := codec.NewBuffer(b)
1735 buf.EncodeUint8(uint8(m.Type))
1736 buf.EncodeUint32(uint32(m.SwIfIndex))
1737 return buf.Bytes(), nil
1739 func (m *PolicerClassifyDump) Unmarshal(b []byte) error {
1740 buf := codec.NewBuffer(b)
1741 m.Type = PolicerClassifyTable(buf.DecodeUint8())
1742 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1746 // PolicerClassifySetInterface defines message 'policer_classify_set_interface'.
1747 type PolicerClassifySetInterface struct {
1748 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1749 IP4TableIndex uint32 `binapi:"u32,name=ip4_table_index" json:"ip4_table_index,omitempty"`
1750 IP6TableIndex uint32 `binapi:"u32,name=ip6_table_index" json:"ip6_table_index,omitempty"`
1751 L2TableIndex uint32 `binapi:"u32,name=l2_table_index" json:"l2_table_index,omitempty"`
1752 IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"`
1755 func (m *PolicerClassifySetInterface) Reset() { *m = PolicerClassifySetInterface{} }
1756 func (*PolicerClassifySetInterface) GetMessageName() string { return "policer_classify_set_interface" }
1757 func (*PolicerClassifySetInterface) GetCrcString() string { return "de7ad708" }
1758 func (*PolicerClassifySetInterface) GetMessageType() api.MessageType {
1759 return api.RequestMessage
1762 func (m *PolicerClassifySetInterface) Size() (size int) {
1766 size += 4 // m.SwIfIndex
1767 size += 4 // m.IP4TableIndex
1768 size += 4 // m.IP6TableIndex
1769 size += 4 // m.L2TableIndex
1770 size += 1 // m.IsAdd
1773 func (m *PolicerClassifySetInterface) Marshal(b []byte) ([]byte, error) {
1775 b = make([]byte, m.Size())
1777 buf := codec.NewBuffer(b)
1778 buf.EncodeUint32(uint32(m.SwIfIndex))
1779 buf.EncodeUint32(m.IP4TableIndex)
1780 buf.EncodeUint32(m.IP6TableIndex)
1781 buf.EncodeUint32(m.L2TableIndex)
1782 buf.EncodeBool(m.IsAdd)
1783 return buf.Bytes(), nil
1785 func (m *PolicerClassifySetInterface) Unmarshal(b []byte) error {
1786 buf := codec.NewBuffer(b)
1787 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
1788 m.IP4TableIndex = buf.DecodeUint32()
1789 m.IP6TableIndex = buf.DecodeUint32()
1790 m.L2TableIndex = buf.DecodeUint32()
1791 m.IsAdd = buf.DecodeBool()
1795 // PolicerClassifySetInterfaceReply defines message 'policer_classify_set_interface_reply'.
1796 type PolicerClassifySetInterfaceReply struct {
1797 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1800 func (m *PolicerClassifySetInterfaceReply) Reset() { *m = PolicerClassifySetInterfaceReply{} }
1801 func (*PolicerClassifySetInterfaceReply) GetMessageName() string {
1802 return "policer_classify_set_interface_reply"
1804 func (*PolicerClassifySetInterfaceReply) GetCrcString() string { return "e8d4e804" }
1805 func (*PolicerClassifySetInterfaceReply) GetMessageType() api.MessageType {
1806 return api.ReplyMessage
1809 func (m *PolicerClassifySetInterfaceReply) Size() (size int) {
1813 size += 4 // m.Retval
1816 func (m *PolicerClassifySetInterfaceReply) Marshal(b []byte) ([]byte, error) {
1818 b = make([]byte, m.Size())
1820 buf := codec.NewBuffer(b)
1821 buf.EncodeInt32(m.Retval)
1822 return buf.Bytes(), nil
1824 func (m *PolicerClassifySetInterfaceReply) Unmarshal(b []byte) error {
1825 buf := codec.NewBuffer(b)
1826 m.Retval = buf.DecodeInt32()
1830 func init() { file_classify_binapi_init() }
1831 func file_classify_binapi_init() {
1832 api.RegisterMessage((*ClassifyAddDelSession)(nil), "classify_add_del_session_f20879f0")
1833 api.RegisterMessage((*ClassifyAddDelSessionReply)(nil), "classify_add_del_session_reply_e8d4e804")
1834 api.RegisterMessage((*ClassifyAddDelTable)(nil), "classify_add_del_table_6849e39e")
1835 api.RegisterMessage((*ClassifyAddDelTableReply)(nil), "classify_add_del_table_reply_05486349")
1836 api.RegisterMessage((*ClassifyPcapGetTables)(nil), "classify_pcap_get_tables_f9e6675e")
1837 api.RegisterMessage((*ClassifyPcapGetTablesReply)(nil), "classify_pcap_get_tables_reply_5f5bc9e6")
1838 api.RegisterMessage((*ClassifyPcapLookupTable)(nil), "classify_pcap_lookup_table_e1b4cc6b")
1839 api.RegisterMessage((*ClassifyPcapLookupTableReply)(nil), "classify_pcap_lookup_table_reply_9c6c6773")
1840 api.RegisterMessage((*ClassifyPcapSetTable)(nil), "classify_pcap_set_table_006051b3")
1841 api.RegisterMessage((*ClassifyPcapSetTableReply)(nil), "classify_pcap_set_table_reply_9c6c6773")
1842 api.RegisterMessage((*ClassifySessionDetails)(nil), "classify_session_details_60e3ef94")
1843 api.RegisterMessage((*ClassifySessionDump)(nil), "classify_session_dump_0cca2cd9")
1844 api.RegisterMessage((*ClassifySetInterfaceIPTable)(nil), "classify_set_interface_ip_table_e0b097c7")
1845 api.RegisterMessage((*ClassifySetInterfaceIPTableReply)(nil), "classify_set_interface_ip_table_reply_e8d4e804")
1846 api.RegisterMessage((*ClassifySetInterfaceL2Tables)(nil), "classify_set_interface_l2_tables_5a6ddf65")
1847 api.RegisterMessage((*ClassifySetInterfaceL2TablesReply)(nil), "classify_set_interface_l2_tables_reply_e8d4e804")
1848 api.RegisterMessage((*ClassifyTableByInterface)(nil), "classify_table_by_interface_f9e6675e")
1849 api.RegisterMessage((*ClassifyTableByInterfaceReply)(nil), "classify_table_by_interface_reply_ed4197db")
1850 api.RegisterMessage((*ClassifyTableIds)(nil), "classify_table_ids_51077d14")
1851 api.RegisterMessage((*ClassifyTableIdsReply)(nil), "classify_table_ids_reply_d1d20e1d")
1852 api.RegisterMessage((*ClassifyTableInfo)(nil), "classify_table_info_0cca2cd9")
1853 api.RegisterMessage((*ClassifyTableInfoReply)(nil), "classify_table_info_reply_4a573c0e")
1854 api.RegisterMessage((*ClassifyTraceGetTables)(nil), "classify_trace_get_tables_51077d14")
1855 api.RegisterMessage((*ClassifyTraceGetTablesReply)(nil), "classify_trace_get_tables_reply_5f5bc9e6")
1856 api.RegisterMessage((*ClassifyTraceLookupTable)(nil), "classify_trace_lookup_table_3f7b72e4")
1857 api.RegisterMessage((*ClassifyTraceLookupTableReply)(nil), "classify_trace_lookup_table_reply_9c6c6773")
1858 api.RegisterMessage((*ClassifyTraceSetTable)(nil), "classify_trace_set_table_3909b55a")
1859 api.RegisterMessage((*ClassifyTraceSetTableReply)(nil), "classify_trace_set_table_reply_9c6c6773")
1860 api.RegisterMessage((*FlowClassifyDetails)(nil), "flow_classify_details_dfd08765")
1861 api.RegisterMessage((*FlowClassifyDump)(nil), "flow_classify_dump_8a6ad43d")
1862 api.RegisterMessage((*FlowClassifySetInterface)(nil), "flow_classify_set_interface_b6192f1c")
1863 api.RegisterMessage((*FlowClassifySetInterfaceReply)(nil), "flow_classify_set_interface_reply_e8d4e804")
1864 api.RegisterMessage((*InputACLSetInterface)(nil), "input_acl_set_interface_de7ad708")
1865 api.RegisterMessage((*InputACLSetInterfaceReply)(nil), "input_acl_set_interface_reply_e8d4e804")
1866 api.RegisterMessage((*OutputACLSetInterface)(nil), "output_acl_set_interface_de7ad708")
1867 api.RegisterMessage((*OutputACLSetInterfaceReply)(nil), "output_acl_set_interface_reply_e8d4e804")
1868 api.RegisterMessage((*PolicerClassifyDetails)(nil), "policer_classify_details_dfd08765")
1869 api.RegisterMessage((*PolicerClassifyDump)(nil), "policer_classify_dump_6bfe6603")
1870 api.RegisterMessage((*PolicerClassifySetInterface)(nil), "policer_classify_set_interface_de7ad708")
1871 api.RegisterMessage((*PolicerClassifySetInterfaceReply)(nil), "policer_classify_set_interface_reply_e8d4e804")
1874 // Messages returns list of all messages in this module.
1875 func AllMessages() []api.Message {
1876 return []api.Message{
1877 (*ClassifyAddDelSession)(nil),
1878 (*ClassifyAddDelSessionReply)(nil),
1879 (*ClassifyAddDelTable)(nil),
1880 (*ClassifyAddDelTableReply)(nil),
1881 (*ClassifyPcapGetTables)(nil),
1882 (*ClassifyPcapGetTablesReply)(nil),
1883 (*ClassifyPcapLookupTable)(nil),
1884 (*ClassifyPcapLookupTableReply)(nil),
1885 (*ClassifyPcapSetTable)(nil),
1886 (*ClassifyPcapSetTableReply)(nil),
1887 (*ClassifySessionDetails)(nil),
1888 (*ClassifySessionDump)(nil),
1889 (*ClassifySetInterfaceIPTable)(nil),
1890 (*ClassifySetInterfaceIPTableReply)(nil),
1891 (*ClassifySetInterfaceL2Tables)(nil),
1892 (*ClassifySetInterfaceL2TablesReply)(nil),
1893 (*ClassifyTableByInterface)(nil),
1894 (*ClassifyTableByInterfaceReply)(nil),
1895 (*ClassifyTableIds)(nil),
1896 (*ClassifyTableIdsReply)(nil),
1897 (*ClassifyTableInfo)(nil),
1898 (*ClassifyTableInfoReply)(nil),
1899 (*ClassifyTraceGetTables)(nil),
1900 (*ClassifyTraceGetTablesReply)(nil),
1901 (*ClassifyTraceLookupTable)(nil),
1902 (*ClassifyTraceLookupTableReply)(nil),
1903 (*ClassifyTraceSetTable)(nil),
1904 (*ClassifyTraceSetTableReply)(nil),
1905 (*FlowClassifyDetails)(nil),
1906 (*FlowClassifyDump)(nil),
1907 (*FlowClassifySetInterface)(nil),
1908 (*FlowClassifySetInterfaceReply)(nil),
1909 (*InputACLSetInterface)(nil),
1910 (*InputACLSetInterfaceReply)(nil),
1911 (*OutputACLSetInterface)(nil),
1912 (*OutputACLSetInterfaceReply)(nil),
1913 (*PolicerClassifyDetails)(nil),
1914 (*PolicerClassifyDump)(nil),
1915 (*PolicerClassifySetInterface)(nil),
1916 (*PolicerClassifySetInterfaceReply)(nil),